Mon Jan 8 07:55:54 UTC 2024 I: starting to build rocksdb/bullseye/armhf on jenkins on '2024-01-08 07:55' Mon Jan 8 07:55:54 UTC 2024 I: The jenkins build log is/was available at https://jenkins.debian.net/userContent/reproducible/debian/build_service/armhf_34/4497/console.log Mon Jan 8 07:55:54 UTC 2024 I: Downloading source for bullseye/rocksdb=6.11.4-3+deb11u1 --2024-01-08 07:55:54-- http://cdn-fastly.deb.debian.org/debian/pool/main/r/rocksdb/rocksdb_6.11.4-3%2bdeb11u1.dsc Connecting to 78.137.99.97:3128... connected. Proxy request sent, awaiting response... 200 OK Length: 2261 (2.2K) [text/prs.lines.tag] Saving to: ‘rocksdb_6.11.4-3+deb11u1.dsc’ 0K .. 100% 321M=0s 2024-01-08 07:55:54 (321 MB/s) - ‘rocksdb_6.11.4-3+deb11u1.dsc’ saved [2261/2261] Mon Jan 8 07:55:54 UTC 2024 I: rocksdb_6.11.4-3+deb11u1.dsc -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Format: 3.0 (quilt) Source: rocksdb Binary: librocksdb-dev, librocksdb6.11, rocksdb-tools Architecture: amd64 arm64 armel armhf ppc64el mips mipsel mips64el sparc64 s390x i386 riscv64 Version: 6.11.4-3+deb11u1 Maintainer: Laszlo Boszormenyi (GCS) Homepage: https://rocksdb.org/ Standards-Version: 4.5.0 Build-Depends: debhelper-compat (= 11), libgflags-dev, libsnappy-dev, libbz2-dev, zlib1g-dev, liblz4-dev, libzstd-dev Package-List: librocksdb-dev deb libdevel optional arch=amd64,arm64,armel,armhf,ppc64el,mips,mipsel,mips64el,sparc64,s390x,i386,riscv64 librocksdb6.11 deb libs optional arch=amd64,arm64,armel,armhf,ppc64el,mips,mipsel,mips64el,sparc64,s390x,i386,riscv64 rocksdb-tools deb database optional arch=amd64,arm64,armel,armhf,ppc64el,mips,mipsel,mips64el,sparc64,s390x,i386,riscv64 Checksums-Sha1: f0f5722ffbf617a04b65933efb228f4831fe3e9d 6209087 rocksdb_6.11.4.orig.tar.gz 06a80b639683fe2215faf0a62ce9fd7b63d0c19c 8032 rocksdb_6.11.4-3+deb11u1.debian.tar.xz Checksums-Sha256: 6793ef000a933af4a834b59b0cd45d3a03a3aac452a68ae669fb916ddd270532 6209087 rocksdb_6.11.4.orig.tar.gz 8c91597759003f18097bb6be0e0698a5c377e570f75a2729316f57fe24d53a85 8032 rocksdb_6.11.4-3+deb11u1.debian.tar.xz Files: 3687e21f5126567c75fea577ca7feff2 6209087 rocksdb_6.11.4.orig.tar.gz e6b205eae40a76cbd2192b9757884346 8032 rocksdb_6.11.4-3+deb11u1.debian.tar.xz -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEfYh9yLp7u6e4NeO63OMQ54ZMyL8FAmMTdlYACgkQ3OMQ54ZM yL9/og/9Ev7Eazl3nqdksxRbonfBZwU6I7/Y16YiY+qQ3QqA9CYvAezcZTBfNe9q hXqpEXfcuYtF4qadu22Q2MLTXsYF3V14UMHchXFNGTlXfgTWps27aBzM5DjArmDn 2amLEOgOadwuGVV87UeN3wwarbWOsVzzCZhjVFVcIjcit7yzWHs4YutihRO0etY9 JjsZoHUF6zgw6tBrd72gIsJIO+z4vQXqoXJ8lopnrpC4McgjzfAPWgVJ+wNFWFxp mDjphZOtkz64UqdCeHBKG4WZXwILs1WwmOrC1/Yf+vR1n2bBwlFEfCQqDJWJuVlN GQ/+1Mkc5dLZqYRrs8WJjTHo1f3tbx8caiF612Ewi5DFk0epW4dE8PldQw2ix4ZA e0/eG50W9t1OByFHsZmsczolBVO/tPzlWe86bWWA4/nm/q4BwR2mnQT451Wl0JFJ RLmKQbKyHBDpgqrZVgAvz7O+RrEzWKM6V/hzpT5/as/LXAmwmFK6mw82ksHPduvF 7ILZFPZtNGCzqsoBATrn6o+5RfsNREyS3BnvMSQu6v6P/n7rwapBsTREbe1bVypu eanW3hITLlpXNGZq0DyUHx1opaetbFccOTlEqAsrY9b5hjm7mEtCu7/aPDhCfoKs n82oa1aODfLTzou3sEK5gI/cP/8mQAGlsw+6sVuN7zeSpVGdyLk= =Klsr -----END PGP SIGNATURE----- Mon Jan 8 07:55:54 UTC 2024 I: Checking whether the package is not for us Mon Jan 8 07:55:54 UTC 2024 I: Starting 1st build on remote node virt32c-armhf-rb.debian.net. Mon Jan 8 07:55:54 UTC 2024 I: Preparing to do remote build '1' on virt32c-armhf-rb.debian.net. Mon Jan 8 08:15:34 UTC 2024 I: Deleting $TMPDIR on virt32c-armhf-rb.debian.net. I: pbuilder: network access will be disabled during build I: Current time: Sun Jan 7 19:56:05 -12 2024 I: pbuilder-time-stamp: 1704700565 I: Building the build Environment I: extracting base tarball [/var/cache/pbuilder/bullseye-reproducible-base.tgz] I: copying local configuration W: --override-config is not set; not updating apt.conf Read the manpage for details. I: mounting /proc filesystem I: mounting /sys filesystem I: creating /{dev,run}/shm I: mounting /dev/pts filesystem I: redirecting /dev/ptmx to /dev/pts/ptmx I: policy-rc.d already exists I: Copying source file I: copying [rocksdb_6.11.4-3+deb11u1.dsc] I: copying [./rocksdb_6.11.4.orig.tar.gz] I: copying [./rocksdb_6.11.4-3+deb11u1.debian.tar.xz] I: Extracting source gpgv: unknown type of key resource 'trustedkeys.kbx' gpgv: keyblock resource '/tmp/dpkg-verify-sig.f0gQPz0h/trustedkeys.kbx': General error gpgv: Signature made Sat Sep 3 15:44:22 2022 gpgv: using RSA key 7D887DC8BA7BBBA7B835E3BADCE310E7864CC8BF gpgv: Can't check signature: No public key dpkg-source: warning: failed to verify signature on ./rocksdb_6.11.4-3+deb11u1.dsc dpkg-source: info: extracting rocksdb in rocksdb-6.11.4 dpkg-source: info: unpacking rocksdb_6.11.4.orig.tar.gz dpkg-source: info: unpacking rocksdb_6.11.4-3+deb11u1.debian.tar.xz dpkg-source: info: using patch list from debian/patches/series dpkg-source: info: applying install_dir-is-destdir.patch dpkg-source: info: applying build_reproducible.patch dpkg-source: info: applying verbose_build.patch dpkg-source: info: applying fix_db_test.patch dpkg-source: info: applying link_with_dl.patch dpkg-source: info: applying fix_illegal_instruction.patch I: using fakeroot in build. I: Installing the build-deps I: user script /srv/workspace/pbuilder/3813/tmp/hooks/D02_print_environment starting I: set BUILDDIR='/build/reproducible-path' BUILDUSERGECOS='first user,first room,first work-phone,first home-phone,first other' BUILDUSERNAME='pbuilder1' BUILD_ARCH='armhf' DEBIAN_FRONTEND='noninteractive' DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all,-fixfilepath parallel=3 ' DISTRIBUTION='bullseye' HOME='/root' HOST_ARCH='armhf' IFS=' ' INVOCATION_ID='672b03c44c724285bb4b85915c5a4d4a' LANG='C' LANGUAGE='en_US:en' LC_ALL='C' MAIL='/var/mail/root' OPTIND='1' PATH='/usr/sbin:/usr/bin:/sbin:/bin:/usr/games' PBCURRENTCOMMANDLINEOPERATION='build' PBUILDER_OPERATION='build' PBUILDER_PKGDATADIR='/usr/share/pbuilder' PBUILDER_PKGLIBDIR='/usr/lib/pbuilder' PBUILDER_SYSCONFDIR='/etc' PPID='3813' PS1='# ' PS2='> ' PS4='+ ' PWD='/' SHELL='/bin/bash' SHLVL='2' SUDO_COMMAND='/usr/bin/timeout -k 18.1h 18h /usr/bin/ionice -c 3 /usr/bin/nice /usr/sbin/pbuilder --build --configfile /srv/reproducible-results/rbuild-debian/r-b-build.LUd0FkgX/pbuilderrc_tTSl --distribution bullseye --hookdir /etc/pbuilder/first-build-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/bullseye-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.LUd0FkgX/b1 --logfile b1/build.log rocksdb_6.11.4-3+deb11u1.dsc' SUDO_GID='113' SUDO_UID='107' SUDO_USER='jenkins' TERM='unknown' TZ='/usr/share/zoneinfo/Etc/GMT+12' USER='root' _='/usr/bin/systemd-run' http_proxy='http://10.0.0.15:3142/' I: uname -a Linux virt32c 6.1.0-17-armmp-lpae #1 SMP Debian 6.1.69-1 (2023-12-30) armv7l GNU/Linux I: ls -l /bin total 3580 -rwxr-xr-x 1 root root 816764 Mar 27 2022 bash -rwxr-xr-x 3 root root 26052 Jul 20 2020 bunzip2 -rwxr-xr-x 3 root root 26052 Jul 20 2020 bzcat lrwxrwxrwx 1 root root 6 Jul 20 2020 bzcmp -> bzdiff -rwxr-xr-x 1 root root 2225 Jul 20 2020 bzdiff lrwxrwxrwx 1 root root 6 Jul 20 2020 bzegrep -> bzgrep -rwxr-xr-x 1 root root 4877 Sep 4 2019 bzexe lrwxrwxrwx 1 root root 6 Jul 20 2020 bzfgrep -> bzgrep -rwxr-xr-x 1 root root 3775 Jul 20 2020 bzgrep -rwxr-xr-x 3 root root 26052 Jul 20 2020 bzip2 -rwxr-xr-x 1 root root 9636 Jul 20 2020 bzip2recover lrwxrwxrwx 1 root root 6 Jul 20 2020 bzless -> bzmore -rwxr-xr-x 1 root root 1297 Jul 20 2020 bzmore -rwxr-xr-x 1 root root 26668 Sep 22 2020 cat -rwxr-xr-x 1 root root 43104 Sep 22 2020 chgrp -rwxr-xr-x 1 root root 38984 Sep 22 2020 chmod -rwxr-xr-x 1 root root 43112 Sep 22 2020 chown -rwxr-xr-x 1 root root 92616 Sep 22 2020 cp -rwxr-xr-x 1 root root 75524 Dec 10 2020 dash -rwxr-xr-x 1 root root 75880 Sep 22 2020 date -rwxr-xr-x 1 root root 55436 Sep 22 2020 dd -rwxr-xr-x 1 root root 59912 Sep 22 2020 df -rwxr-xr-x 1 root root 96764 Sep 22 2020 dir -rwxr-xr-x 1 root root 55012 Jan 20 2022 dmesg lrwxrwxrwx 1 root root 8 Nov 7 2019 dnsdomainname -> hostname lrwxrwxrwx 1 root root 8 Nov 7 2019 domainname -> hostname -rwxr-xr-x 1 root root 22508 Sep 22 2020 echo -rwxr-xr-x 1 root root 28 Jan 25 2023 egrep -rwxr-xr-x 1 root root 22496 Sep 22 2020 false -rwxr-xr-x 1 root root 28 Jan 25 2023 fgrep -rwxr-xr-x 1 root root 47492 Jan 20 2022 findmnt -rwsr-xr-x 1 root root 26076 Feb 26 2021 fusermount -rwxr-xr-x 1 root root 124508 Jan 25 2023 grep -rwxr-xr-x 2 root root 2346 Apr 10 2022 gunzip -rwxr-xr-x 1 root root 6447 Apr 10 2022 gzexe -rwxr-xr-x 1 root root 64212 Apr 10 2022 gzip -rwxr-xr-x 1 root root 13784 Nov 7 2019 hostname -rwxr-xr-x 1 root root 43180 Sep 22 2020 ln -rwxr-xr-x 1 root root 35068 Feb 7 2020 login -rwxr-xr-x 1 root root 96764 Sep 22 2020 ls -rwxr-xr-x 1 root root 99940 Jan 20 2022 lsblk -rwxr-xr-x 1 root root 51408 Sep 22 2020 mkdir -rwxr-xr-x 1 root root 43184 Sep 22 2020 mknod -rwxr-xr-x 1 root root 30780 Sep 22 2020 mktemp -rwxr-xr-x 1 root root 34408 Jan 20 2022 more -rwsr-xr-x 1 root root 34400 Jan 20 2022 mount -rwxr-xr-x 1 root root 9824 Jan 20 2022 mountpoint -rwxr-xr-x 1 root root 88524 Sep 22 2020 mv lrwxrwxrwx 1 root root 8 Nov 7 2019 nisdomainname -> hostname lrwxrwxrwx 1 root root 14 Dec 16 2021 pidof -> /sbin/killall5 -rwxr-xr-x 1 root root 26652 Sep 22 2020 pwd lrwxrwxrwx 1 root root 4 Mar 27 2022 rbash -> bash -rwxr-xr-x 1 root root 30740 Sep 22 2020 readlink -rwxr-xr-x 1 root root 43104 Sep 22 2020 rm -rwxr-xr-x 1 root root 30732 Sep 22 2020 rmdir -rwxr-xr-x 1 root root 14144 Sep 27 2020 run-parts -rwxr-xr-x 1 root root 76012 Dec 22 2018 sed lrwxrwxrwx 1 root root 4 Jan 7 09:26 sh -> dash -rwxr-xr-x 1 root root 22532 Sep 22 2020 sleep -rwxr-xr-x 1 root root 55360 Sep 22 2020 stty -rwsr-xr-x 1 root root 46704 Jan 20 2022 su -rwxr-xr-x 1 root root 22532 Sep 22 2020 sync -rwxr-xr-x 1 root root 340872 Feb 17 2021 tar -rwxr-xr-x 1 root root 9808 Sep 27 2020 tempfile -rwxr-xr-x 1 root root 67696 Sep 22 2020 touch -rwxr-xr-x 1 root root 22496 Sep 22 2020 true -rwxr-xr-x 1 root root 9636 Feb 26 2021 ulockmgr_server -rwsr-xr-x 1 root root 22108 Jan 20 2022 umount -rwxr-xr-x 1 root root 22520 Sep 22 2020 uname -rwxr-xr-x 2 root root 2346 Apr 10 2022 uncompress -rwxr-xr-x 1 root root 96764 Sep 22 2020 vdir -rwxr-xr-x 1 root root 38512 Jan 20 2022 wdctl lrwxrwxrwx 1 root root 8 Nov 7 2019 ypdomainname -> hostname -rwxr-xr-x 1 root root 1984 Apr 10 2022 zcat -rwxr-xr-x 1 root root 1678 Apr 10 2022 zcmp -rwxr-xr-x 1 root root 5898 Apr 10 2022 zdiff -rwxr-xr-x 1 root root 29 Apr 10 2022 zegrep -rwxr-xr-x 1 root root 29 Apr 10 2022 zfgrep -rwxr-xr-x 1 root root 2081 Apr 10 2022 zforce -rwxr-xr-x 1 root root 8049 Apr 10 2022 zgrep -rwxr-xr-x 1 root root 2206 Apr 10 2022 zless -rwxr-xr-x 1 root root 1842 Apr 10 2022 zmore -rwxr-xr-x 1 root root 4577 Apr 10 2022 znew I: user script /srv/workspace/pbuilder/3813/tmp/hooks/D02_print_environment finished -> Attempting to satisfy build-dependencies -> Creating pbuilder-satisfydepends-dummy package Package: pbuilder-satisfydepends-dummy Version: 0.invalid.0 Architecture: armhf Maintainer: Debian Pbuilder Team Description: Dummy package to satisfy dependencies with aptitude - created by pbuilder This package was created automatically by pbuilder to satisfy the build-dependencies of the package being currently built. Depends: debhelper-compat (= 11), libgflags-dev, libsnappy-dev, libbz2-dev, zlib1g-dev, liblz4-dev, libzstd-dev dpkg-deb: building package 'pbuilder-satisfydepends-dummy' in '/tmp/satisfydepends-aptitude/pbuilder-satisfydepends-dummy.deb'. Selecting previously unselected package pbuilder-satisfydepends-dummy. (Reading database ... 17486 files and directories currently installed.) Preparing to unpack .../pbuilder-satisfydepends-dummy.deb ... Unpacking pbuilder-satisfydepends-dummy (0.invalid.0) ... dpkg: pbuilder-satisfydepends-dummy: dependency problems, but configuring anyway as you requested: pbuilder-satisfydepends-dummy depends on debhelper-compat (= 11); however: Package debhelper-compat is not installed. pbuilder-satisfydepends-dummy depends on libgflags-dev; however: Package libgflags-dev is not installed. pbuilder-satisfydepends-dummy depends on libsnappy-dev; however: Package libsnappy-dev is not installed. pbuilder-satisfydepends-dummy depends on libbz2-dev; however: Package libbz2-dev is not installed. pbuilder-satisfydepends-dummy depends on zlib1g-dev; however: Package zlib1g-dev is not installed. pbuilder-satisfydepends-dummy depends on liblz4-dev; however: Package liblz4-dev is not installed. pbuilder-satisfydepends-dummy depends on libzstd-dev; however: Package libzstd-dev is not installed. Setting up pbuilder-satisfydepends-dummy (0.invalid.0) ... Reading package lists... Building dependency tree... Reading state information... Initializing package states... Writing extended state information... Building tag database... pbuilder-satisfydepends-dummy is already installed at the requested version (0.invalid.0) pbuilder-satisfydepends-dummy is already installed at the requested version (0.invalid.0) The following NEW packages will be installed: autoconf{a} automake{a} autopoint{a} autotools-dev{a} bsdextrautils{a} debhelper{a} dh-autoreconf{a} dh-strip-nondeterminism{a} dwz{a} file{a} gettext{a} gettext-base{a} groff-base{a} intltool-debian{a} libarchive-zip-perl{a} libbz2-dev{a} libdebhelper-perl{a} libelf1{a} libfile-stripnondeterminism-perl{a} libgflags-dev{a} libgflags2.2{a} libicu67{a} liblz4-dev{a} libmagic-mgc{a} libmagic1{a} libpipeline1{a} libsigsegv2{a} libsnappy-dev{a} libsnappy1v5{a} libsub-override-perl{a} libtool{a} libuchardet0{a} libxml2{a} libzstd-dev{a} m4{a} man-db{a} po-debconf{a} sensible-utils{a} zlib1g-dev{a} The following packages are RECOMMENDED but will NOT be installed: bzip2-doc curl libarchive-cpio-perl libltdl-dev libmail-sendmail-perl lynx wget 0 packages upgraded, 39 newly installed, 0 to remove and 0 not upgraded. Need to get 18.5 MB of archives. After unpacking 65.5 MB will be used. Writing extended state information... Get: 1 http://deb.debian.org/debian bullseye/main armhf bsdextrautils armhf 2.36.1-8+deb11u1 [139 kB] Get: 2 http://deb.debian.org/debian bullseye/main armhf libuchardet0 armhf 0.0.7-1 [65.0 kB] Get: 3 http://deb.debian.org/debian bullseye/main armhf groff-base armhf 1.22.4-6 [847 kB] Get: 4 http://deb.debian.org/debian bullseye/main armhf libpipeline1 armhf 1.5.3-1 [30.1 kB] Get: 5 http://deb.debian.org/debian bullseye/main armhf man-db armhf 2.9.4-2 [1319 kB] Get: 6 http://deb.debian.org/debian bullseye/main armhf sensible-utils all 0.0.14 [14.8 kB] Get: 7 http://deb.debian.org/debian bullseye/main armhf libmagic-mgc armhf 1:5.39-3+deb11u1 [273 kB] Get: 8 http://deb.debian.org/debian bullseye/main armhf libmagic1 armhf 1:5.39-3+deb11u1 [120 kB] Get: 9 http://deb.debian.org/debian bullseye/main armhf file armhf 1:5.39-3+deb11u1 [68.2 kB] Get: 10 http://deb.debian.org/debian bullseye/main armhf gettext-base armhf 0.21-4 [171 kB] Get: 11 http://deb.debian.org/debian bullseye/main armhf libsigsegv2 armhf 2.13-1 [34.0 kB] Get: 12 http://deb.debian.org/debian bullseye/main armhf m4 armhf 1.4.18-5 [192 kB] Get: 13 http://deb.debian.org/debian bullseye/main armhf autoconf all 2.69-14 [313 kB] Get: 14 http://deb.debian.org/debian bullseye/main armhf autotools-dev all 20180224.1+nmu1 [77.1 kB] Get: 15 http://deb.debian.org/debian bullseye/main armhf automake all 1:1.16.3-2 [814 kB] Get: 16 http://deb.debian.org/debian bullseye/main armhf autopoint all 0.21-4 [510 kB] Get: 17 http://deb.debian.org/debian bullseye/main armhf libdebhelper-perl all 13.3.4 [189 kB] Get: 18 http://deb.debian.org/debian bullseye/main armhf libtool all 2.4.6-15 [513 kB] Get: 19 http://deb.debian.org/debian bullseye/main armhf dh-autoreconf all 20 [17.1 kB] Get: 20 http://deb.debian.org/debian bullseye/main armhf libarchive-zip-perl all 1.68-1 [104 kB] Get: 21 http://deb.debian.org/debian bullseye/main armhf libsub-override-perl all 0.09-2 [10.2 kB] Get: 22 http://deb.debian.org/debian bullseye/main armhf libfile-stripnondeterminism-perl all 1.12.0-1 [26.3 kB] Get: 23 http://deb.debian.org/debian bullseye/main armhf dh-strip-nondeterminism all 1.12.0-1 [15.4 kB] Get: 24 http://deb.debian.org/debian bullseye/main armhf libelf1 armhf 0.183-1 [161 kB] Get: 25 http://deb.debian.org/debian bullseye/main armhf dwz armhf 0.13+20210201-1 [179 kB] Get: 26 http://deb.debian.org/debian bullseye/main armhf libicu67 armhf 67.1-7 [8319 kB] Get: 27 http://deb.debian.org/debian bullseye/main armhf libxml2 armhf 2.9.10+dfsg-6.7+deb11u4 [602 kB] Get: 28 http://deb.debian.org/debian bullseye/main armhf gettext armhf 0.21-4 [1243 kB] Get: 29 http://deb.debian.org/debian bullseye/main armhf intltool-debian all 0.35.0+20060710.5 [26.8 kB] Get: 30 http://deb.debian.org/debian bullseye/main armhf po-debconf all 1.0.21+nmu1 [248 kB] Get: 31 http://deb.debian.org/debian bullseye/main armhf debhelper all 13.3.4 [1049 kB] Get: 32 http://deb.debian.org/debian bullseye/main armhf libbz2-dev armhf 1.0.8-4 [29.2 kB] Get: 33 http://deb.debian.org/debian bullseye/main armhf libgflags2.2 armhf 2.2.2-2 [66.4 kB] Get: 34 http://deb.debian.org/debian bullseye/main armhf libgflags-dev armhf 2.2.2-2 [88.6 kB] Get: 35 http://deb.debian.org/debian bullseye/main armhf liblz4-dev armhf 1.9.3-2 [70.2 kB] Get: 36 http://deb.debian.org/debian bullseye/main armhf libsnappy1v5 armhf 1.1.8-1 [16.5 kB] Get: 37 http://deb.debian.org/debian bullseye/main armhf libsnappy-dev armhf 1.1.8-1 [30.4 kB] Get: 38 http://deb.debian.org/debian bullseye/main armhf libzstd-dev armhf 1.4.8+dfsg-2.1 [339 kB] Get: 39 http://deb.debian.org/debian bullseye/main armhf zlib1g-dev armhf 1:1.2.11.dfsg-2+deb11u2 [185 kB] Fetched 18.5 MB in 1s (17.8 MB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package bsdextrautils. (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 17486 files and directories currently installed.) Preparing to unpack .../00-bsdextrautils_2.36.1-8+deb11u1_armhf.deb ... Unpacking bsdextrautils (2.36.1-8+deb11u1) ... Selecting previously unselected package libuchardet0:armhf. Preparing to unpack .../01-libuchardet0_0.0.7-1_armhf.deb ... Unpacking libuchardet0:armhf (0.0.7-1) ... Selecting previously unselected package groff-base. Preparing to unpack .../02-groff-base_1.22.4-6_armhf.deb ... Unpacking groff-base (1.22.4-6) ... Selecting previously unselected package libpipeline1:armhf. Preparing to unpack .../03-libpipeline1_1.5.3-1_armhf.deb ... Unpacking libpipeline1:armhf (1.5.3-1) ... Selecting previously unselected package man-db. Preparing to unpack .../04-man-db_2.9.4-2_armhf.deb ... Unpacking man-db (2.9.4-2) ... Selecting previously unselected package sensible-utils. Preparing to unpack .../05-sensible-utils_0.0.14_all.deb ... Unpacking sensible-utils (0.0.14) ... Selecting previously unselected package libmagic-mgc. Preparing to unpack .../06-libmagic-mgc_1%3a5.39-3+deb11u1_armhf.deb ... Unpacking libmagic-mgc (1:5.39-3+deb11u1) ... Selecting previously unselected package libmagic1:armhf. Preparing to unpack .../07-libmagic1_1%3a5.39-3+deb11u1_armhf.deb ... Unpacking libmagic1:armhf (1:5.39-3+deb11u1) ... Selecting previously unselected package file. Preparing to unpack .../08-file_1%3a5.39-3+deb11u1_armhf.deb ... Unpacking file (1:5.39-3+deb11u1) ... Selecting previously unselected package gettext-base. Preparing to unpack .../09-gettext-base_0.21-4_armhf.deb ... Unpacking gettext-base (0.21-4) ... Selecting previously unselected package libsigsegv2:armhf. Preparing to unpack .../10-libsigsegv2_2.13-1_armhf.deb ... Unpacking libsigsegv2:armhf (2.13-1) ... Selecting previously unselected package m4. Preparing to unpack .../11-m4_1.4.18-5_armhf.deb ... Unpacking m4 (1.4.18-5) ... Selecting previously unselected package autoconf. Preparing to unpack .../12-autoconf_2.69-14_all.deb ... Unpacking autoconf (2.69-14) ... Selecting previously unselected package autotools-dev. Preparing to unpack .../13-autotools-dev_20180224.1+nmu1_all.deb ... Unpacking autotools-dev (20180224.1+nmu1) ... Selecting previously unselected package automake. Preparing to unpack .../14-automake_1%3a1.16.3-2_all.deb ... Unpacking automake (1:1.16.3-2) ... Selecting previously unselected package autopoint. Preparing to unpack .../15-autopoint_0.21-4_all.deb ... Unpacking autopoint (0.21-4) ... Selecting previously unselected package libdebhelper-perl. Preparing to unpack .../16-libdebhelper-perl_13.3.4_all.deb ... Unpacking libdebhelper-perl (13.3.4) ... Selecting previously unselected package libtool. Preparing to unpack .../17-libtool_2.4.6-15_all.deb ... Unpacking libtool (2.4.6-15) ... Selecting previously unselected package dh-autoreconf. Preparing to unpack .../18-dh-autoreconf_20_all.deb ... Unpacking dh-autoreconf (20) ... Selecting previously unselected package libarchive-zip-perl. Preparing to unpack .../19-libarchive-zip-perl_1.68-1_all.deb ... Unpacking libarchive-zip-perl (1.68-1) ... Selecting previously unselected package libsub-override-perl. Preparing to unpack .../20-libsub-override-perl_0.09-2_all.deb ... Unpacking libsub-override-perl (0.09-2) ... Selecting previously unselected package libfile-stripnondeterminism-perl. Preparing to unpack .../21-libfile-stripnondeterminism-perl_1.12.0-1_all.deb ... Unpacking libfile-stripnondeterminism-perl (1.12.0-1) ... Selecting previously unselected package dh-strip-nondeterminism. Preparing to unpack .../22-dh-strip-nondeterminism_1.12.0-1_all.deb ... Unpacking dh-strip-nondeterminism (1.12.0-1) ... Selecting previously unselected package libelf1:armhf. Preparing to unpack .../23-libelf1_0.183-1_armhf.deb ... Unpacking libelf1:armhf (0.183-1) ... Selecting previously unselected package dwz. Preparing to unpack .../24-dwz_0.13+20210201-1_armhf.deb ... Unpacking dwz (0.13+20210201-1) ... Selecting previously unselected package libicu67:armhf. Preparing to unpack .../25-libicu67_67.1-7_armhf.deb ... Unpacking libicu67:armhf (67.1-7) ... Selecting previously unselected package libxml2:armhf. Preparing to unpack .../26-libxml2_2.9.10+dfsg-6.7+deb11u4_armhf.deb ... Unpacking libxml2:armhf (2.9.10+dfsg-6.7+deb11u4) ... Selecting previously unselected package gettext. Preparing to unpack .../27-gettext_0.21-4_armhf.deb ... Unpacking gettext (0.21-4) ... Selecting previously unselected package intltool-debian. Preparing to unpack .../28-intltool-debian_0.35.0+20060710.5_all.deb ... Unpacking intltool-debian (0.35.0+20060710.5) ... Selecting previously unselected package po-debconf. Preparing to unpack .../29-po-debconf_1.0.21+nmu1_all.deb ... Unpacking po-debconf (1.0.21+nmu1) ... Selecting previously unselected package debhelper. Preparing to unpack .../30-debhelper_13.3.4_all.deb ... Unpacking debhelper (13.3.4) ... Selecting previously unselected package libbz2-dev:armhf. Preparing to unpack .../31-libbz2-dev_1.0.8-4_armhf.deb ... Unpacking libbz2-dev:armhf (1.0.8-4) ... Selecting previously unselected package libgflags2.2. Preparing to unpack .../32-libgflags2.2_2.2.2-2_armhf.deb ... Unpacking libgflags2.2 (2.2.2-2) ... Selecting previously unselected package libgflags-dev. Preparing to unpack .../33-libgflags-dev_2.2.2-2_armhf.deb ... Unpacking libgflags-dev (2.2.2-2) ... Selecting previously unselected package liblz4-dev:armhf. Preparing to unpack .../34-liblz4-dev_1.9.3-2_armhf.deb ... Unpacking liblz4-dev:armhf (1.9.3-2) ... Selecting previously unselected package libsnappy1v5:armhf. Preparing to unpack .../35-libsnappy1v5_1.1.8-1_armhf.deb ... Unpacking libsnappy1v5:armhf (1.1.8-1) ... Selecting previously unselected package libsnappy-dev:armhf. Preparing to unpack .../36-libsnappy-dev_1.1.8-1_armhf.deb ... Unpacking libsnappy-dev:armhf (1.1.8-1) ... Selecting previously unselected package libzstd-dev:armhf. Preparing to unpack .../37-libzstd-dev_1.4.8+dfsg-2.1_armhf.deb ... Unpacking libzstd-dev:armhf (1.4.8+dfsg-2.1) ... Selecting previously unselected package zlib1g-dev:armhf. Preparing to unpack .../38-zlib1g-dev_1%3a1.2.11.dfsg-2+deb11u2_armhf.deb ... Unpacking zlib1g-dev:armhf (1:1.2.11.dfsg-2+deb11u2) ... Setting up libpipeline1:armhf (1.5.3-1) ... Setting up libzstd-dev:armhf (1.4.8+dfsg-2.1) ... Setting up bsdextrautils (2.36.1-8+deb11u1) ... update-alternatives: using /usr/bin/write.ul to provide /usr/bin/write (write) in auto mode Setting up libicu67:armhf (67.1-7) ... Setting up libmagic-mgc (1:5.39-3+deb11u1) ... Setting up libarchive-zip-perl (1.68-1) ... Setting up libdebhelper-perl (13.3.4) ... Setting up libmagic1:armhf (1:5.39-3+deb11u1) ... Setting up gettext-base (0.21-4) ... Setting up file (1:5.39-3+deb11u1) ... Setting up libsnappy1v5:armhf (1.1.8-1) ... Setting up autotools-dev (20180224.1+nmu1) ... Setting up libsigsegv2:armhf (2.13-1) ... Setting up autopoint (0.21-4) ... Setting up liblz4-dev:armhf (1.9.3-2) ... Setting up zlib1g-dev:armhf (1:1.2.11.dfsg-2+deb11u2) ... Setting up sensible-utils (0.0.14) ... Setting up libuchardet0:armhf (0.0.7-1) ... Setting up libsub-override-perl (0.09-2) ... Setting up libelf1:armhf (0.183-1) ... Setting up libxml2:armhf (2.9.10+dfsg-6.7+deb11u4) ... Setting up libgflags2.2 (2.2.2-2) ... Setting up libbz2-dev:armhf (1.0.8-4) ... Setting up libfile-stripnondeterminism-perl (1.12.0-1) ... Setting up gettext (0.21-4) ... Setting up libtool (2.4.6-15) ... Setting up libsnappy-dev:armhf (1.1.8-1) ... Setting up m4 (1.4.18-5) ... Setting up intltool-debian (0.35.0+20060710.5) ... Setting up libgflags-dev (2.2.2-2) ... Setting up autoconf (2.69-14) ... Setting up dh-strip-nondeterminism (1.12.0-1) ... Setting up dwz (0.13+20210201-1) ... Setting up groff-base (1.22.4-6) ... Setting up automake (1:1.16.3-2) ... update-alternatives: using /usr/bin/automake-1.16 to provide /usr/bin/automake (automake) in auto mode Setting up po-debconf (1.0.21+nmu1) ... Setting up man-db (2.9.4-2) ... Not building database; man-db/auto-update is not 'true'. Setting up dh-autoreconf (20) ... Setting up debhelper (13.3.4) ... Processing triggers for libc-bin (2.31-13+deb11u6) ... Reading package lists... Building dependency tree... Reading state information... Reading extended state information... Initializing package states... Writing extended state information... Building tag database... -> Finished parsing the build-deps Reading package lists... Building dependency tree... Reading state information... fakeroot is already the newest version (1.25.3-1.1). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. I: Building the package I: Running cd /build/reproducible-path/rocksdb-6.11.4/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-buildpackage -us -uc -b && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-genchanges -S > ../rocksdb_6.11.4-3+deb11u1_source.changes dpkg-buildpackage: info: source package rocksdb dpkg-buildpackage: info: source version 6.11.4-3+deb11u1 dpkg-buildpackage: info: source distribution bullseye dpkg-buildpackage: info: source changed by Laszlo Boszormenyi (GCS) dpkg-source --before-build . dpkg-buildpackage: info: host architecture armhf fakeroot debian/rules clean dh clean dh_auto_clean make -j3 clean make[1]: Entering directory '/build/reproducible-path/rocksdb-6.11.4' $DEBUG_LEVEL is 0 Makefile:244: Warning: /build/reproducible-path/rocksdb-6.11.4=. does not exist rm -rf bzip2* snappy* zlib* lz4* zstd* rm -f db_bench table_reader_bench cache_bench memtablerep_bench filter_bench persistent_cache_bench range_del_aggregator_bench sst_dump db_sanity_test db_stress write_stress ldb db_repl_stress rocksdb_dump rocksdb_undump blob_dump trace_analyzer block_cache_trace_analyzer db_basic_test db_with_timestamp_basic_test db_encryption_test db_test2 external_sst_file_basic_test auto_roll_logger_test bloom_test dynamic_bloom_test c_test checkpoint_test crc32c_test coding_test inlineskiplist_test env_basic_test env_test env_logger_test io_posix_test hash_test random_test thread_local_test work_queue_test rate_limiter_test perf_context_test iostats_context_test db_wal_test db_block_cache_test db_test db_logical_block_size_cache_test db_blob_index_test db_iter_test db_iter_stress_test db_log_iter_test db_bloom_filter_test db_compaction_filter_test db_compaction_test db_dynamic_level_test db_flush_test db_inplace_update_test db_iterator_test db_memtable_test db_merge_operator_test db_merge_operand_test db_options_test db_range_del_test db_secondary_test db_sst_test db_tailing_iter_test db_io_failure_test db_properties_test db_table_properties_test db_statistics_test db_write_test error_handler_fs_test autovector_test blob_db_test cleanable_test column_family_test table_properties_collector_test arena_test memkind_kmem_allocator_test block_test data_block_hash_index_test cache_test corruption_test slice_test slice_transform_test dbformat_test fault_injection_test filelock_test filename_test random_access_file_reader_test file_reader_writer_test block_based_filter_block_test block_based_table_reader_test full_filter_block_test partitioned_filter_block_test hash_table_test histogram_test log_test manual_compaction_test mock_env_test memtable_list_test merge_helper_test memory_test merge_test merger_test util_merge_operators_test options_file_test reduce_levels_test plain_table_db_test comparator_db_test external_sst_file_test import_column_family_test prefix_test skiplist_test write_buffer_manager_test stringappend_test cassandra_format_test cassandra_functional_test cassandra_row_merge_test cassandra_serialize_test ttl_test backupable_db_test cache_simulator_test sim_cache_test version_edit_test version_set_test compaction_picker_test version_builder_test file_indexer_test write_batch_test write_batch_with_index_test write_controller_test deletefile_test obsolete_files_test table_test block_fetcher_test delete_scheduler_test options_test options_settable_test options_util_test event_logger_test timer_queue_test cuckoo_table_builder_test cuckoo_table_reader_test cuckoo_table_db_test flush_job_test wal_manager_test listener_test compaction_iterator_test compaction_job_test thread_list_test sst_dump_test compact_files_test optimistic_transaction_test write_callback_test heap_test compact_on_deletion_collector_test compaction_job_stats_test option_change_migration_test transaction_test transaction_lock_mgr_test ldb_cmd_test persistent_cache_test statistics_test stats_history_test lru_cache_test object_registry_test repair_test env_timed_test write_prepared_transaction_test write_unprepared_transaction_test db_universal_compaction_test trace_analyzer_test repeatable_thread_test range_tombstone_fragmenter_test range_del_aggregator_test sst_file_reader_test db_secondary_test block_cache_tracer_test block_cache_trace_analyzer_test defer_test blob_file_addition_test blob_file_garbage_test timer_test db_with_timestamp_compaction_test testutil_test folly_synchronization_distributed_mutex_test backupable_db_test db_bloom_filter_test db_compaction_filter_test db_compaction_test db_merge_operator_test db_sst_test db_test db_universal_compaction_test db_wal_test external_sst_file_test import_column_family_test fault_injection_test file_reader_writer_test inlineskiplist_test manual_compaction_test persistent_cache_test table_test transaction_test transaction_lock_mgr_test write_prepared_transaction_test write_unprepared_transaction_test folly_synchronization_distributed_mutex_test librocksdb.a librocksdb.so librocksdb.so.6 librocksdb.so.6.11 librocksdb.so.6.11.4 cd java && make clean rm -rf make_config.mk shared-objects t LOG /dev/shm/rocksdb.5dHT unity.cc jls jl ios-x86 ios-arm scan_build_report make[2]: Entering directory '/build/reproducible-path/rocksdb-6.11.4/java' find . -name "*.[oda]" -exec rm -f {} \; rm -rf ./include rm -rf test-libs rm -rf target rm -rf benchmark/target rm -rf samples/target make[2]: Leaving directory '/build/reproducible-path/rocksdb-6.11.4/java' find . -type f -regex ".*\.\(\(gcda\)\|\(gcno\)\)" -exec rm {} \; make[1]: Leaving directory '/build/reproducible-path/rocksdb-6.11.4' dh_clean debian/rules build dh build dh_update_autotools_config dh_autoreconf dh_auto_configure debian/rules override_dh_auto_build make[1]: Entering directory '/build/reproducible-path/rocksdb-6.11.4' PORTABLE=1 dh_auto_build -- all make -j3 "INSTALL=install --strip-program=true" all make[2]: Entering directory '/build/reproducible-path/rocksdb-6.11.4' $DEBUG_LEVEL is 1 Makefile:179: Warning: Compiling in debug mode. Don't use the resulting binary in production Makefile:244: Warning: /build/reproducible-path/rocksdb-6.11.4=. does not exist rm -f util/build_version.cc-t sed -e s/@@GIT_SHA@@// -e s/@@GIT_DATE_TIME@@/2022-08-27/ util/build_version.cc.in > util/build_version.cc-t if test -f util/build_version.cc; then \ cmp -s util/build_version.cc-t util/build_version.cc && rm -f util/build_version.cc-t || mv -f util/build_version.cc-t util/build_version.cc; \ else mv -f util/build_version.cc-t util/build_version.cc; fi $DEBUG_LEVEL is 1 Makefile:179: Warning: Compiling in debug mode. Don't use the resulting binary in production Makefile:244: Warning: /build/reproducible-path/rocksdb-6.11.4=. does not exist rm -f util/build_version.cc-t sed -e s/@@GIT_SHA@@// -e s/@@GIT_DATE_TIME@@/2022-08-27/ util/build_version.cc.in > util/build_version.cc-t if test -f util/build_version.cc; then \ cmp -s util/build_version.cc-t util/build_version.cc && rm -f util/build_version.cc-t || mv -f util/build_version.cc-t util/build_version.cc; \ else mv -f util/build_version.cc-t util/build_version.cc; fi g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c cache/cache.cc -o cache/cache.o g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c cache/clock_cache.cc -o cache/clock_cache.o g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c cache/lru_cache.cc -o cache/lru_cache.o g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c cache/sharded_cache.cc -o cache/sharded_cache.o g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/arena_wrapped_db_iter.cc -o db/arena_wrapped_db_iter.o g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/blob/blob_file_addition.cc -o db/blob/blob_file_addition.o g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/blob/blob_file_garbage.cc -o db/blob/blob_file_garbage.o g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/blob/blob_file_meta.cc -o db/blob/blob_file_meta.o g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/blob/blob_log_format.cc -o db/blob/blob_log_format.o g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/blob/blob_log_reader.cc -o db/blob/blob_log_reader.o g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/blob/blob_log_writer.cc -o db/blob/blob_log_writer.o g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/builder.cc -o db/builder.o g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/c.cc -o db/c.o g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/column_family.cc -o db/column_family.o g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/compacted_db_impl.cc -o db/compacted_db_impl.o In file included from /usr/include/c++/10/vector:72, from ./include/rocksdb/options.h:17, from ./port/port_posix.h:16, from ./port/port.h:18, from db/c.cc:15: /usr/include/c++/10/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {std::__cxx11::basic_string, std::allocator >, rocksdb::ColumnFamilyOptions}; _Tp = rocksdb::ColumnFamilyDescriptor; _Alloc = std::allocator]': /usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type 'std::vector::iterator' changed in GCC 7.1 426 | vector<_Tp, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/vector.tcc: In function 'rocksdb_t* rocksdb_open_as_secondary_column_families(const rocksdb_options_t*, const char*, const char*, int, const char* const*, const rocksdb_options_t* const*, rocksdb_column_family_handle_t**, char**)': /usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 121 | _M_realloc_insert(end(), std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/10/memory:66, from /usr/include/c++/10/thread:44, from ./port/port_posix.h:14, from ./port/port.h:18, from db/c.cc:15: /usr/include/c++/10/bits/stl_uninitialized.h: In static member function 'static _ForwardIterator std::__uninitialized_copy<_TrivialValueTypes>::__uninit_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = __gnu_cxx::__normal_iterator >; _ForwardIterator = rocksdb::DbPath*; bool _TrivialValueTypes = false]': /usr/include/c++/10/bits/stl_uninitialized.h:84:9: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 84 | __uninit_copy(_InputIterator __first, _InputIterator __last, | ^~~~~~~~~~~~~ /usr/include/c++/10/bits/stl_uninitialized.h:84:9: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 /usr/include/c++/10/bits/stl_uninitialized.h: In function 'void rocksdb_options_set_db_paths(rocksdb_options_t*, const rocksdb_dbpath_t**, size_t)': /usr/include/c++/10/bits/stl_uninitialized.h:150:15: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 147 | return std::__uninitialized_copy<__is_trivial(_ValueType1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 148 | && __is_trivial(_ValueType2) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 149 | && __assignable>:: | ~~~~~~~~~~~~~~~~~~ 150 | __uninit_copy(__first, __last, __result); | ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/10/vector:72, from ./include/rocksdb/options.h:17, from ./port/port_posix.h:16, from ./port/port.h:18, from db/c.cc:15: /usr/include/c++/10/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {rocksdb::ColumnFamilyDescriptor}; _Tp = rocksdb::ColumnFamilyDescriptor; _Alloc = std::allocator]': /usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type 'std::vector::iterator' changed in GCC 7.1 426 | vector<_Tp, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/vector.tcc: In function 'rocksdb_t* rocksdb_open_for_read_only_column_families(const rocksdb_options_t*, const char*, int, const char* const*, const rocksdb_options_t* const*, rocksdb_column_family_handle_t**, unsigned char, char**)': /usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 121 | _M_realloc_insert(end(), std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/vector.tcc: In function 'rocksdb_transactiondb_t* rocksdb_transactiondb_open_column_families(const rocksdb_options_t*, const rocksdb_transactiondb_options_t*, const char*, int, const char* const*, const rocksdb_options_t* const*, rocksdb_column_family_handle_t**, char**)': /usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 121 | _M_realloc_insert(end(), std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/vector.tcc: In function 'rocksdb_t* rocksdb_open_column_families(const rocksdb_options_t*, const char*, int, const char* const*, const rocksdb_options_t* const*, rocksdb_column_family_handle_t**, char**)': /usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 121 | _M_realloc_insert(end(), std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/vector.tcc: In function 'rocksdb_optimistictransactiondb_t* rocksdb_optimistictransactiondb_open_column_families(const rocksdb_options_t*, const char*, int, const char* const*, const rocksdb_options_t* const*, rocksdb_column_family_handle_t**, char**)': /usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 121 | _M_realloc_insert(end(), std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/compaction/compaction.cc -o db/compaction/compaction.o g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/compaction/compaction_iterator.cc -o db/compaction/compaction_iterator.o g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/compaction/compaction_job.cc -o db/compaction/compaction_job.o g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/compaction/compaction_picker.cc -o db/compaction/compaction_picker.o g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/compaction/compaction_picker_fifo.cc -o db/compaction/compaction_picker_fifo.o In file included from /usr/include/c++/10/vector:72, from /usr/include/c++/10/bits/random.h:34, from /usr/include/c++/10/random:49, from db/compaction/compaction_job.cc:15: /usr/include/c++/10/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {const rocksdb::Slice&, const rocksdb::Slice&, long long unsigned int&}; _Tp = rocksdb::RangeWithSize; _Alloc = std::allocator]': /usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type 'std::vector::iterator' changed in GCC 7.1 426 | vector<_Tp, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {long long unsigned int&}; _Tp = long long unsigned int; _Alloc = std::allocator]': /usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type 'std::vector::iterator' changed in GCC 7.1 /usr/include/c++/10/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {long long unsigned int}; _Tp = long long unsigned int; _Alloc = std::allocator]': /usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type 'std::vector::iterator' changed in GCC 7.1 /usr/include/c++/10/bits/vector.tcc: In member function 'void rocksdb::CompactionJob::GenSubcompactionBoundaries()': /usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 121 | _M_realloc_insert(end(), std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 121 | _M_realloc_insert(end(), std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 121 | _M_realloc_insert(end(), std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 121 | _M_realloc_insert(end(), std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {int&, const rocksdb::FileMetaData&}; _Tp = std::pair; _Alloc = std::allocator >]': /usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type 'std::vector >::iterator' changed in GCC 7.1 426 | vector<_Tp, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/vector.tcc: In member function 'rocksdb::Status rocksdb::CompactionJob::InstallCompactionResults(const rocksdb::MutableCFOptions&)': /usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator*, std::vector > >' changed in GCC 7.1 121 | _M_realloc_insert(end(), std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {const rocksdb::CompactionJob::SubcompactionState::Output&}; _Tp = rocksdb::CompactionJob::SubcompactionState::Output; _Alloc = std::allocator]': /usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type 'std::vector::iterator' changed in GCC 7.1 426 | vector<_Tp, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/10/vector:67, from /usr/include/c++/10/bits/random.h:34, from /usr/include/c++/10/random:49, from db/compaction/compaction_job.cc:15: /usr/include/c++/10/bits/stl_vector.h: In member function 'rocksdb::Status rocksdb::CompactionJob::OpenCompactionOutputFile(rocksdb::CompactionJob::SubcompactionState*)': /usr/include/c++/10/bits/stl_vector.h:1198:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 1198 | _M_realloc_insert(end(), __x); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~ g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/compaction/compaction_picker_level.cc -o db/compaction/compaction_picker_level.o g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/compaction/compaction_picker_universal.cc -o db/compaction/compaction_picker_universal.o In file included from /usr/include/c++/10/memory:66, from db/compaction/compaction_job.cc:14: /usr/include/c++/10/bits/stl_uninitialized.h: In static member function 'static _ForwardIterator std::__uninitialized_copy<_TrivialValueTypes>::__uninit_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = std::move_iterator; _ForwardIterator = rocksdb::CompactionJob::SubcompactionState*; bool _TrivialValueTypes = false]': /usr/include/c++/10/bits/stl_uninitialized.h:84:9: note: parameter passing for argument of type 'std::move_iterator' changed in GCC 7.1 84 | __uninit_copy(_InputIterator __first, _InputIterator __last, | ^~~~~~~~~~~~~ /usr/include/c++/10/bits/stl_uninitialized.h:84:9: note: parameter passing for argument of type 'std::move_iterator' changed in GCC 7.1 In file included from /usr/include/c++/10/vector:72, from /usr/include/c++/10/bits/random.h:34, from /usr/include/c++/10/random:49, from db/compaction/compaction_job.cc:15: /usr/include/c++/10/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {rocksdb::Compaction*&, rocksdb::Slice*&, rocksdb::Slice*&, long long unsigned int&}; _Tp = rocksdb::CompactionJob::SubcompactionState; _Alloc = std::allocator]': /usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type 'std::vector::iterator' changed in GCC 7.1 426 | vector<_Tp, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/10/memory:66, from db/compaction/compaction_job.cc:14: /usr/include/c++/10/bits/stl_uninitialized.h:150:15: note: parameter passing for argument of type 'std::move_iterator' changed in GCC 7.1 147 | return std::__uninitialized_copy<__is_trivial(_ValueType1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 148 | && __is_trivial(_ValueType2) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 149 | && __assignable>:: | ~~~~~~~~~~~~~~~~~~ 150 | __uninit_copy(__first, __last, __result); | ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/stl_uninitialized.h:150:15: note: parameter passing for argument of type 'std::move_iterator' changed in GCC 7.1 147 | return std::__uninitialized_copy<__is_trivial(_ValueType1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 148 | && __is_trivial(_ValueType2) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 149 | && __assignable>:: | ~~~~~~~~~~~~~~~~~~ 150 | __uninit_copy(__first, __last, __result); | ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/10/vector:72, from /usr/include/c++/10/bits/random.h:34, from /usr/include/c++/10/random:49, from db/compaction/compaction_job.cc:15: /usr/include/c++/10/bits/vector.tcc: In member function 'void rocksdb::CompactionJob::Prepare()': /usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 121 | _M_realloc_insert(end(), std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/10/memory:66, from db/compaction/compaction_job.cc:14: /usr/include/c++/10/bits/stl_uninitialized.h:150:15: note: parameter passing for argument of type 'std::move_iterator' changed in GCC 7.1 147 | return std::__uninitialized_copy<__is_trivial(_ValueType1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 148 | && __is_trivial(_ValueType2) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 149 | && __assignable>:: | ~~~~~~~~~~~~~~~~~~ 150 | __uninit_copy(__first, __last, __result); | ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/stl_uninitialized.h:150:15: note: parameter passing for argument of type 'std::move_iterator' changed in GCC 7.1 147 | return std::__uninitialized_copy<__is_trivial(_ValueType1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 148 | && __is_trivial(_ValueType2) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 149 | && __assignable>:: | ~~~~~~~~~~~~~~~~~~ 150 | __uninit_copy(__first, __last, __result); | ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/convenience.cc -o db/convenience.o g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/db_filesnapshot.cc -o db/db_filesnapshot.o g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/db_impl/db_impl.cc -o db/db_impl/db_impl.o g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/db_impl/db_impl_compaction_flush.cc -o db/db_impl/db_impl_compaction_flush.o g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/db_impl/db_impl_debug.cc -o db/db_impl/db_impl_debug.o In file included from /usr/include/c++/10/vector:72, from ./db/column_family.h:14, from db/db_impl/db_impl_debug.cc:12: /usr/include/c++/10/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {const rocksdb::FileMetaData&}; _Tp = rocksdb::FileMetaData; _Alloc = std::allocator]': /usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type 'std::vector::iterator' changed in GCC 7.1 426 | vector<_Tp, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/10/vector:67, from ./db/column_family.h:14, from db/db_impl/db_impl_debug.cc:12: /usr/include/c++/10/bits/stl_vector.h: In member function 'void rocksdb::DBImpl::TEST_GetFilesMetaData(rocksdb::ColumnFamilyHandle*, std::vector >*)': /usr/include/c++/10/bits/stl_vector.h:1198:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 1198 | _M_realloc_insert(end(), __x); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/10/vector:72, from ./db/db_impl/db_impl.h:20, from db/db_impl/db_impl_compaction_flush.cc:9: /usr/include/c++/10/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {const long long unsigned int&}; _Tp = long long unsigned int; _Alloc = std::allocator]': /usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type 'std::vector::iterator' changed in GCC 7.1 426 | vector<_Tp, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/10/vector:67, from ./db/db_impl/db_impl.h:20, from db/db_impl/db_impl_compaction_flush.cc:9: /usr/include/c++/10/bits/stl_vector.h: In member function 'void rocksdb::DBImpl::GetSnapshotContext(rocksdb::JobContext*, std::vector*, rocksdb::SequenceNumber*, rocksdb::SnapshotChecker**)': /usr/include/c++/10/bits/stl_vector.h:1198:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 1198 | _M_realloc_insert(end(), __x); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/10/vector:72, from ./db/db_impl/db_impl.h:20, from db/db_impl/db_impl_compaction_flush.cc:9: /usr/include/c++/10/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {const rocksdb::MutableCFOptions&}; _Tp = rocksdb::MutableCFOptions; _Alloc = std::allocator]': /usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type 'std::vector::iterator' changed in GCC 7.1 426 | vector<_Tp, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~ g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/db_impl/db_impl_experimental.cc -o db/db_impl/db_impl_experimental.o /usr/include/c++/10/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {rocksdb::CompactionFileInfo}; _Tp = rocksdb::CompactionFileInfo; _Alloc = std::allocator]': /usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type 'std::vector::iterator' changed in GCC 7.1 /usr/include/c++/10/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {rocksdb::CompactionFileInfo}; _Tp = rocksdb::CompactionFileInfo; _Alloc = std::allocator]': /usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 121 | _M_realloc_insert(end(), std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {rocksdb::ColumnFamilyData*&, const long long unsigned int&, rocksdb::SuperVersionContext*}; _Tp = rocksdb::DBImpl::BGFlushArg; _Alloc = std::allocator]': /usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type 'std::vector >::iterator' changed in GCC 7.1 426 | vector<_Tp, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/vector.tcc: In member function 'rocksdb::Status rocksdb::DBImpl::AtomicFlushMemTablesToOutputFiles(const rocksdb::autovector&, bool*, rocksdb::JobContext*, rocksdb::LogBuffer*, rocksdb::Env::Priority)': /usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 121 | _M_realloc_insert(end(), std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/vector.tcc: In member function 'rocksdb::Status rocksdb::DBImpl::BackgroundFlush(bool*, rocksdb::JobContext*, rocksdb::LogBuffer*, rocksdb::FlushReason*, rocksdb::Env::Priority)': /usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator > >' changed in GCC 7.1 121 | _M_realloc_insert(end(), std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {int&, rocksdb::FileMetaData}; _Tp = std::pair; _Alloc = std::allocator >]': /usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type 'std::vector >::iterator' changed in GCC 7.1 426 | vector<_Tp, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/vector.tcc: In member function 'void rocksdb::VersionEdit::AddFile(int, uint64_t, uint32_t, uint64_t, const rocksdb::InternalKey&, const rocksdb::InternalKey&, const SequenceNumber&, const SequenceNumber&, bool, uint64_t, uint64_t, uint64_t, const string&, const string&)': /usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator*, std::vector > >' changed in GCC 7.1 121 | _M_realloc_insert(end(), std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/10/vector:72, from ./db/db_impl/db_impl.h:20, from db/db_impl/db_impl_experimental.cc:10: /usr/include/c++/10/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {int&, rocksdb::FileMetaData}; _Tp = std::pair; _Alloc = std::allocator >]': /usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type 'std::vector >::iterator' changed in GCC 7.1 426 | vector<_Tp, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/vector.tcc: In member function 'void rocksdb::VersionEdit::AddFile(int, uint64_t, uint32_t, uint64_t, const rocksdb::InternalKey&, const rocksdb::InternalKey&, const SequenceNumber&, const SequenceNumber&, bool, uint64_t, uint64_t, uint64_t, const string&, const string&)': /usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator*, std::vector > >' changed in GCC 7.1 121 | _M_realloc_insert(end(), std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/10/vector:72, from ./db/db_impl/db_impl.h:20, from db/db_impl/db_impl.cc:9: /usr/include/c++/10/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {rocksdb::ReadRequest&}; _Tp = rocksdb::ReadRequest; _Alloc = std::allocator]': /usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type 'std::vector::iterator' changed in GCC 7.1 426 | vector<_Tp, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/vector.tcc: In member function 'virtual rocksdb::IOStatus rocksdb::LegacyRandomAccessFileWrapper::MultiRead(rocksdb::FSReadRequest*, size_t, const rocksdb::IOOptions&, rocksdb::IODebugContext*)': /usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 121 | _M_realloc_insert(end(), std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/db_impl/db_impl_files.cc -o db/db_impl/db_impl_files.o In file included from /usr/include/c++/10/map:60, from ./db/db_impl/db_impl.h:16, from db/db_impl/db_impl.cc:9: /usr/include/c++/10/bits/stl_tree.h: In member function 'std::pair std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_get_insert_hint_unique_pos(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator, const key_type&) [with _Key = std::__cxx11::basic_string; _Val = std::pair, long long unsigned int>; _KeyOfValue = std::_Select1st, long long unsigned int> >; _Compare = std::less >; _Alloc = std::allocator, long long unsigned int> >]': /usr/include/c++/10/bits/stl_tree.h:2193:5: note: parameter passing for argument of type 'std::_Rb_tree, std::pair, long long unsigned int>, std::_Select1st, long long unsigned int> >, std::less >, std::allocator, long long unsigned int> > >::const_iterator' changed in GCC 7.1 2193 | _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/stl_tree.h: In function 'std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_emplace_hint_unique(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator, _Args&& ...) [with _Args = {const std::piecewise_construct_t&, std::tuple, std::allocator >&>, std::tuple<>}; _Key = std::__cxx11::basic_string; _Val = std::pair, long long unsigned int>; _KeyOfValue = std::_Select1st, long long unsigned int> >; _Compare = std::less >; _Alloc = std::allocator, long long unsigned int> >]': /usr/include/c++/10/bits/stl_tree.h:2458:7: note: parameter passing for argument of type 'std::_Rb_tree, std::pair, long long unsigned int>, std::_Select1st, long long unsigned int> >, std::less >, std::allocator, long long unsigned int> > >::const_iterator' changed in GCC 7.1 2458 | _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/stl_tree.h:2458:7: note: parameter passing for argument of type 'std::_Rb_tree, std::pair, long long unsigned int>, std::_Select1st, long long unsigned int> >, std::less >, std::allocator, long long unsigned int> > >::const_iterator' changed in GCC 7.1 In file included from /usr/include/c++/10/vector:72, from ./db/db_impl/db_impl.h:20, from db/db_impl/db_impl.cc:9: /usr/include/c++/10/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {rocksdb::ColumnFamilyHandle*&, const rocksdb::Slice&, rocksdb::PinnableSlice*, std::__cxx11::basic_string, std::allocator >*, rocksdb::Status*}; _Tp = rocksdb::KeyContext; _Alloc = std::allocator]': /usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type 'std::vector >::iterator' changed in GCC 7.1 426 | vector<_Tp, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {rocksdb::ColumnFamilyHandle*&, const rocksdb::Slice&, rocksdb::PinnableSlice*, std::__cxx11::basic_string, std::allocator >*, rocksdb::Status*}; _Tp = rocksdb::KeyContext; _Alloc = std::allocator]': /usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator > >' changed in GCC 7.1 121 | _M_realloc_insert(end(), std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/db_impl/db_impl_open.cc -o db/db_impl/db_impl_open.o /usr/include/c++/10/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {rocksdb::ColumnFamilyOptions}; _Tp = rocksdb::ColumnFamilyOptions; _Alloc = std::allocator]': /usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type 'std::vector::iterator' changed in GCC 7.1 426 | vector<_Tp, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/vector.tcc: In member function 'rocksdb::Status rocksdb::DBImpl::WriteOptionsFile(bool, bool)': /usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 121 | _M_realloc_insert(end(), std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/10/deque:66, from ./db/db_impl/db_impl.h:12, from db/db_impl/db_impl.cc:9: /usr/include/c++/10/bits/stl_uninitialized.h: In static member function 'static _ForwardIterator std::__uninitialized_copy<_TrivialValueTypes>::__uninit_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = __gnu_cxx::__normal_iterator >; _ForwardIterator = rocksdb::LiveFileMetaData*; bool _TrivialValueTypes = false]': /usr/include/c++/10/bits/stl_uninitialized.h:84:9: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 84 | __uninit_copy(_InputIterator __first, _InputIterator __last, | ^~~~~~~~~~~~~ /usr/include/c++/10/bits/stl_uninitialized.h:84:9: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 /usr/include/c++/10/bits/stl_uninitialized.h: In member function 'virtual rocksdb::Status rocksdb::DBImpl::CreateColumnFamilyWithImport(const rocksdb::ColumnFamilyOptions&, const string&, const rocksdb::ImportColumnFamilyOptions&, const rocksdb::ExportImportFilesMetaData&, rocksdb::ColumnFamilyHandle**)': /usr/include/c++/10/bits/stl_uninitialized.h:150:15: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 147 | return std::__uninitialized_copy<__is_trivial(_ValueType1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 148 | && __is_trivial(_ValueType2) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 149 | && __assignable>:: | ~~~~~~~~~~~~~~~~~~ 150 | __uninit_copy(__first, __last, __result); | ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/stl_uninitialized.h: In static member function 'static _ForwardIterator std::__uninitialized_copy<_TrivialValueTypes>::__uninit_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = __gnu_cxx::__normal_iterator*, std::vector > >; _ForwardIterator = std::pair*; bool _TrivialValueTypes = false]': /usr/include/c++/10/bits/stl_uninitialized.h:84:9: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator*, std::vector > >' changed in GCC 7.1 84 | __uninit_copy(_InputIterator __first, _InputIterator __last, | ^~~~~~~~~~~~~ /usr/include/c++/10/bits/stl_uninitialized.h:84:9: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator*, std::vector > >' changed in GCC 7.1 /usr/include/c++/10/bits/stl_uninitialized.h: In copy constructor 'rocksdb::VersionEdit::VersionEdit(const rocksdb::VersionEdit&)': /usr/include/c++/10/bits/stl_uninitialized.h:150:15: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator*, std::vector > >' changed in GCC 7.1 147 | return std::__uninitialized_copy<__is_trivial(_ValueType1) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 148 | && __is_trivial(_ValueType2) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 149 | && __assignable>:: | ~~~~~~~~~~~~~~~~~~ 150 | __uninit_copy(__first, __last, __result); | ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/10/vector:72, from ./db/db_impl/db_impl.h:20, from db/db_impl/db_impl_files.cc:9: /usr/include/c++/10/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {const long long unsigned int&}; _Tp = long long unsigned int; _Alloc = std::allocator]': /usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type 'std::vector::iterator' changed in GCC 7.1 426 | vector<_Tp, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/10/vector:72, from ./db/db_impl/db_impl.h:20, from db/db_impl/db_impl.cc:9: /usr/include/c++/10/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {rocksdb::Env* const&, rocksdb::VersionSet*, rocksdb::ColumnFamilyData*&, const rocksdb::ImmutableDBOptions&, const rocksdb::FileOptions&, rocksdb::SnapshotList*, const rocksdb::IngestExternalFileOptions&, rocksdb::Directories*, rocksdb::EventLogger*}; _Tp = rocksdb::ExternalSstFileIngestionJob; _Alloc = std::allocator]': /usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type 'std::vector::iterator' changed in GCC 7.1 426 | vector<_Tp, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/10/unordered_map:46, from ./db/column_family.h:12, from ./db/db_impl/db_impl.h:22, from db/db_impl/db_impl_files.cc:9: /usr/include/c++/10/bits/hashtable.h: In constructor 'std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::_Hashtable(_InputIterator, _InputIterator, std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::size_type, const _H1&, const _H2&, const _Hash&, const _Equal&, const _ExtractKey&, const allocator_type&) [with _InputIterator = __gnu_cxx::__normal_iterator >; _Key = long long unsigned int; _Value = long long unsigned int; _Alloc = std::allocator; _ExtractKey = std::__detail::_Identity; _Equal = std::equal_to; _H1 = std::hash; _H2 = std::__detail::_Mod_range_hashing; _Hash = std::__detail::_Default_ranged_hash; _RehashPolicy = std::__detail::_Prime_rehash_policy; _Traits = std::__detail::_Hashtable_traits]': /usr/include/c++/10/bits/hashtable.h:1015:7: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 1015 | _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1016 | _H1, _H2, _Hash, _RehashPolicy, _Traits>:: | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/hashtable.h:1015:7: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 In file included from /usr/include/c++/10/vector:72, from ./db/db_impl/db_impl.h:20, from db/db_impl/db_impl_files.cc:9: /usr/include/c++/10/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {long long unsigned int&}; _Tp = long long unsigned int; _Alloc = std::allocator]': /usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type 'std::vector::iterator' changed in GCC 7.1 426 | vector<_Tp, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/vector.tcc: In member function 'virtual rocksdb::Status rocksdb::DBImpl::IngestExternalFiles(const std::vector&)': /usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 121 | _M_realloc_insert(end(), std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/10/vector:67, from ./db/db_impl/db_impl.h:20, from db/db_impl/db_impl_files.cc:9: /usr/include/c++/10/bits/stl_vector.h: In member function 'void rocksdb::DBImpl::FindObsoleteFiles(rocksdb::JobContext*, bool, bool)': /usr/include/c++/10/bits/stl_vector.h:1198:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 1198 | _M_realloc_insert(end(), __x); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~ db/db_impl/db_impl_files.cc:297:1: note: parameter passing for argument of type 'std::vector::iterator' changed in GCC 7.1 297 | } | ^ In file included from /usr/include/c++/10/bits/stl_algo.h:61, from /usr/include/c++/10/algorithm:62, from ./db/merge_context.h:7, from ./db/dbformat.h:16, from ./db/memtable_list.h:15, from ./db/column_family.h:17, from ./db/db_impl/db_impl.h:22, from db/db_impl/db_impl_open.cc:9: /usr/include/c++/10/bits/stl_heap.h: In function 'void std::__adjust_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator >; _Distance = int; _Tp = long long unsigned int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]': /usr/include/c++/10/bits/stl_heap.h:223:5: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 223 | __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex, | ^~~~~~~~~~~~~ In file included from /usr/include/c++/10/algorithm:62, from ./db/merge_context.h:7, from ./db/dbformat.h:16, from ./db/memtable_list.h:15, from ./db/column_family.h:17, from ./db/db_impl/db_impl.h:22, from db/db_impl/db_impl_open.cc:9: /usr/include/c++/10/bits/stl_algo.h: In function 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator >; _Size = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]': /usr/include/c++/10/bits/stl_algo.h:1945:5: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 1945 | __introsort_loop(_RandomAccessIterator __first, | ^~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/stl_algo.h:1945:5: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 /usr/include/c++/10/bits/stl_algo.h:1959:25: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 1959 | std::__introsort_loop(__cut, __last, __depth_limit, __comp); | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/10/map:61, from ./db/db_impl/db_impl.h:16, from db/db_impl/db_impl.cc:9: /usr/include/c++/10/bits/stl_map.h: In member function 'void rocksdb::DBImpl::PersistStats()': /usr/include/c++/10/bits/stl_map.h:501:37: note: parameter passing for argument of type 'std::_Rb_tree, std::pair, long long unsigned int>, std::_Select1st, long long unsigned int> >, std::less >, std::allocator, long long unsigned int> > >::const_iterator' changed in GCC 7.1 501 | __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 502 | std::tuple(__k), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 503 | std::tuple<>()); | ~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/stl_map.h:501:37: note: parameter passing for argument of type 'std::_Rb_tree, std::pair, long long unsigned int>, std::_Select1st, long long unsigned int> >, std::less >, std::allocator, long long unsigned int> > >::const_iterator' changed in GCC 7.1 501 | __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 502 | std::tuple(__k), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 503 | std::tuple<>()); | ~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/stl_map.h:501:37: note: parameter passing for argument of type 'std::_Rb_tree, std::pair, long long unsigned int>, std::_Select1st, long long unsigned int> >, std::less >, std::allocator, long long unsigned int> > >::const_iterator' changed in GCC 7.1 501 | __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 502 | std::tuple(__k), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 503 | std::tuple<>()); | ~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/stl_algo.h: In function 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator >; _Compare = __gnu_cxx::__ops::_Iter_less_iter]': /usr/include/c++/10/bits/stl_algo.h:1839:5: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 1839 | __insertion_sort(_RandomAccessIterator __first, | ^~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/stl_algo.h:1839:5: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 In file included from /usr/include/c++/10/unordered_map:46, from ./db/column_family.h:12, from ./db/db_impl/db_impl.h:22, from db/db_impl/db_impl_files.cc:9: /usr/include/c++/10/bits/hashtable.h: In member function 'void rocksdb::DBImpl::PurgeObsoleteFiles(rocksdb::JobContext&, bool)': /usr/include/c++/10/bits/hashtable.h:494:28: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 494 | __key_extract(), __a) | ^ /usr/include/c++/10/bits/hashtable.h:494:28: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 494 | __key_extract(), __a) | ^ /usr/include/c++/10/bits/hashtable.h:494:28: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 494 | __key_extract(), __a) | ^ In file included from /usr/include/c++/10/vector:72, from ./db/db_impl/db_impl.h:20, from db/db_impl/db_impl_files.cc:9: /usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 121 | _M_realloc_insert(end(), std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/10/vector:72, from ./db/db_impl/db_impl.h:20, from db/db_impl/db_impl_open.cc:9: /usr/include/c++/10/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {const long long unsigned int&}; _Tp = long long unsigned int; _Alloc = std::allocator]': /usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type 'std::vector::iterator' changed in GCC 7.1 426 | vector<_Tp, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {const std::__cxx11::basic_string, std::allocator >&, long long unsigned int}; _Tp = rocksdb::DbPath; _Alloc = std::allocator]': /usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type 'std::vector::iterator' changed in GCC 7.1 /usr/include/c++/10/bits/vector.tcc: In function 'rocksdb::DBOptions rocksdb::SanitizeOptions(const string&, const rocksdb::DBOptions&)': /usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 121 | _M_realloc_insert(end(), std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ db/db_impl/db_impl_open.cc:175:1: note: parameter passing for argument of type 'std::vector::iterator' changed in GCC 7.1 175 | } | ^ In file included from /usr/include/c++/10/vector:72, from ./db/db_impl/db_impl.h:20, from db/db_impl/db_impl_open.cc:9: /usr/include/c++/10/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {rocksdb::ColumnFamilyDescriptor}; _Tp = rocksdb::ColumnFamilyDescriptor; _Alloc = std::allocator]': /usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type 'std::vector::iterator' changed in GCC 7.1 426 | vector<_Tp, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {int&, rocksdb::FileMetaData}; _Tp = std::pair; _Alloc = std::allocator >]': /usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type 'std::vector >::iterator' changed in GCC 7.1 /usr/include/c++/10/bits/vector.tcc: In member function 'void rocksdb::VersionEdit::AddFile(int, uint64_t, uint32_t, uint64_t, const rocksdb::InternalKey&, const rocksdb::InternalKey&, const SequenceNumber&, const SequenceNumber&, bool, uint64_t, uint64_t, uint64_t, const string&, const string&)': /usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator*, std::vector > >' changed in GCC 7.1 121 | _M_realloc_insert(end(), std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/db_impl/db_impl_readonly.cc -o db/db_impl/db_impl_readonly.o g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/db_impl/db_impl_secondary.cc -o db/db_impl/db_impl_secondary.o /usr/include/c++/10/bits/vector.tcc: In static member function 'static rocksdb::Status rocksdb::DB::Open(const rocksdb::Options&, const string&, rocksdb::DB**)': /usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 121 | _M_realloc_insert(end(), std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 121 | _M_realloc_insert(end(), std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/10/vector:67, from ./db/db_impl/db_impl.h:20, from db/db_impl/db_impl_open.cc:9: /usr/include/c++/10/bits/stl_vector.h: In member function 'rocksdb::Status rocksdb::DBImpl::WriteLevel0TableForRecovery(int, rocksdb::ColumnFamilyData*, rocksdb::MemTable*, rocksdb::VersionEdit*)': /usr/include/c++/10/bits/stl_vector.h:1198:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 1198 | _M_realloc_insert(end(), __x); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~ /usr/include/c++/10/bits/stl_vector.h: In member function 'virtual rocksdb::Status rocksdb::DBImpl::Recover(const std::vector&, bool, bool, bool, uint64_t*)': /usr/include/c++/10/bits/stl_vector.h:1198:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 1198 | _M_realloc_insert(end(), __x); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/10/algorithm:62, from ./db/merge_context.h:7, from ./db/dbformat.h:16, from ./db/memtable_list.h:15, from ./db/column_family.h:17, from ./db/db_impl/db_impl.h:22, from db/db_impl/db_impl_open.cc:9: /usr/include/c++/10/bits/stl_algo.h:1974:25: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 1974 | std::__introsort_loop(__first, __last, | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ 1975 | std::__lg(__last - __first) * 2, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1976 | __comp); | ~~~~~~~ /usr/include/c++/10/bits/stl_algo.h:1886:25: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 1886 | std::__insertion_sort(__first, __first + int(_S_threshold), __comp); | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/stl_algo.h:1891:23: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 1891 | std::__insertion_sort(__first, __last, __comp); | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ db/db_impl/db_impl_open.cc:625:1: note: parameter passing for argument of type 'std::vector::iterator' changed in GCC 7.1 625 | } | ^ g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/db_impl/db_impl_write.cc -o db/db_impl/db_impl_write.o In file included from /usr/include/c++/10/vector:72, from ./db/db_impl/db_impl_readonly.h:11, from db/db_impl/db_impl_readonly.cc:6: /usr/include/c++/10/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {rocksdb::ColumnFamilyDescriptor}; _Tp = rocksdb::ColumnFamilyDescriptor; _Alloc = std::allocator]': /usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type 'std::vector::iterator' changed in GCC 7.1 426 | vector<_Tp, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/vector.tcc: In static member function 'static rocksdb::Status rocksdb::DB::OpenForReadOnly(const rocksdb::Options&, const string&, rocksdb::DB**, bool)': /usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 121 | _M_realloc_insert(end(), std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/10/bits/stl_algo.h:61, from /usr/include/c++/10/algorithm:62, from ./db/merge_context.h:7, from ./db/dbformat.h:16, from ./db/memtable_list.h:15, from ./db/column_family.h:17, from ./db/db_impl/db_impl.h:22, from ./db/db_impl/db_impl_secondary.h:12, from db/db_impl/db_impl_secondary.cc:6: /usr/include/c++/10/bits/stl_heap.h: In function 'void std::__adjust_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator >; _Distance = int; _Tp = long long unsigned int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]': /usr/include/c++/10/bits/stl_heap.h:223:5: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 223 | __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex, | ^~~~~~~~~~~~~ In file included from /usr/include/c++/10/algorithm:62, from ./db/merge_context.h:7, from ./db/dbformat.h:16, from ./db/memtable_list.h:15, from ./db/column_family.h:17, from ./db/db_impl/db_impl.h:22, from ./db/db_impl/db_impl_secondary.h:12, from db/db_impl/db_impl_secondary.cc:6: /usr/include/c++/10/bits/stl_algo.h: In function 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator >; _Compare = __gnu_cxx::__ops::_Iter_less_iter]': /usr/include/c++/10/bits/stl_algo.h:1839:5: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 1839 | __insertion_sort(_RandomAccessIterator __first, | ^~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/stl_algo.h:1839:5: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 /usr/include/c++/10/bits/stl_algo.h:1839:5: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 /usr/include/c++/10/bits/stl_algo.h: In function 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator >; _Size = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]': /usr/include/c++/10/bits/stl_algo.h:1945:5: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 1945 | __introsort_loop(_RandomAccessIterator __first, | ^~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/stl_algo.h:1945:5: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 /usr/include/c++/10/bits/stl_algo.h:1945:5: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 /usr/include/c++/10/bits/stl_algo.h:1959:25: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 1959 | std::__introsort_loop(__cut, __last, __depth_limit, __comp); | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/db_info_dumper.cc -o db/db_info_dumper.o In file included from /usr/include/c++/10/vector:72, from ./db/db_impl/db_impl_secondary.h:11, from db/db_impl/db_impl_secondary.cc:6: /usr/include/c++/10/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {const long long unsigned int&}; _Tp = long long unsigned int; _Alloc = std::allocator]': /usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type 'std::vector::iterator' changed in GCC 7.1 426 | vector<_Tp, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/10/vector:67, from ./db/db_impl/db_impl_secondary.h:11, from db/db_impl/db_impl_secondary.cc:6: /usr/include/c++/10/bits/stl_vector.h: In member function 'rocksdb::Status rocksdb::DBImplSecondary::FindNewLogNumbers(std::vector*)': /usr/include/c++/10/bits/stl_vector.h:1198:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 1198 | _M_realloc_insert(end(), __x); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/10/algorithm:62, from ./db/merge_context.h:7, from ./db/dbformat.h:16, from ./db/memtable_list.h:15, from ./db/column_family.h:17, from ./db/db_impl/db_impl.h:22, from ./db/db_impl/db_impl_secondary.h:12, from db/db_impl/db_impl_secondary.cc:6: /usr/include/c++/10/bits/stl_algo.h:1974:25: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 1974 | std::__introsort_loop(__first, __last, | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ 1975 | std::__lg(__last - __first) * 2, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1976 | __comp); | ~~~~~~~ /usr/include/c++/10/bits/stl_algo.h:1886:25: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 1886 | std::__insertion_sort(__first, __first + int(_S_threshold), __comp); | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/stl_algo.h:1891:23: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 1891 | std::__insertion_sort(__first, __last, __comp); | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/10/map:60, from ./db/db_impl/db_impl.h:16, from ./db/db_impl/db_impl_secondary.h:12, from db/db_impl/db_impl_secondary.cc:6: /usr/include/c++/10/bits/stl_tree.h: In member function 'void std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_erase_aux(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator) [with _Key = long long unsigned int; _Val = std::pair >; _KeyOfValue = std::_Select1st > >; _Compare = std::less; _Alloc = std::allocator > >]': /usr/include/c++/10/bits/stl_tree.h:2510:5: note: parameter passing for argument of type 'std::_Rb_tree >, std::_Select1st > >, std::less, std::allocator > > >::const_iterator' changed in GCC 7.1 2510 | _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/stl_tree.h: In member function 'rocksdb::Status rocksdb::DBImplSecondary::MaybeInitLogReader(uint64_t, rocksdb::log::FragmentBufferedReader**)': /usr/include/c++/10/bits/stl_tree.h:1216:14: note: parameter passing for argument of type 'std::_Rb_tree >, std::_Select1st > >, std::less, std::allocator > > >::const_iterator' changed in GCC 7.1 1216 | _M_erase_aux(__position); | ~~~~~~~~~~~~^~~~~~~~~~~~ /usr/include/c++/10/bits/stl_tree.h: In member function 'void std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_erase_aux(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator, std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator) [with _Key = long long unsigned int; _Val = std::pair >; _KeyOfValue = std::_Select1st > >; _Compare = std::less; _Alloc = std::allocator > >]': /usr/include/c++/10/bits/stl_tree.h:2524:5: note: parameter passing for argument of type 'std::_Rb_tree >, std::_Select1st > >, std::less, std::allocator > > >::const_iterator' changed in GCC 7.1 2524 | _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/stl_tree.h:2524:5: note: parameter passing for argument of type 'std::_Rb_tree >, std::_Select1st > >, std::less, std::allocator > > >::const_iterator' changed in GCC 7.1 g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/db_iter.cc -o db/db_iter.o /usr/include/c++/10/bits/stl_tree.h: In member function 'rocksdb::Status rocksdb::DBImplSecondary::RecoverLogFiles(const std::vector&, rocksdb::SequenceNumber*, std::unordered_set*, rocksdb::JobContext*)': /usr/include/c++/10/bits/stl_tree.h:1245:14: note: parameter passing for argument of type 'std::_Rb_tree >, std::_Select1st > >, std::less, std::allocator > > >::const_iterator' changed in GCC 7.1 1245 | _M_erase_aux(__first, __last); | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/dbformat.cc -o db/dbformat.o g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/error_handler.cc -o db/error_handler.o g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/event_helpers.cc -o db/event_helpers.o g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/experimental.cc -o db/experimental.o g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/external_sst_file_ingestion_job.cc -o db/external_sst_file_ingestion_job.o g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/file_indexer.cc -o db/file_indexer.o g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/flush_job.cc -o db/flush_job.o g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/flush_scheduler.cc -o db/flush_scheduler.o In file included from /usr/include/c++/10/vector:72, from ./db/external_sst_file_ingestion_job.h:9, from db/external_sst_file_ingestion_job.cc:8: /usr/include/c++/10/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {const rocksdb::IngestedFileInfo&}; _Tp = rocksdb::IngestedFileInfo; _Alloc = std::allocator]': /usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type 'std::vector >::iterator' changed in GCC 7.1 426 | vector<_Tp, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/10/vector:67, from ./db/external_sst_file_ingestion_job.h:9, from db/external_sst_file_ingestion_job.cc:8: /usr/include/c++/10/bits/stl_vector.h: In member function 'void rocksdb::autovector::push_back(const T&) [with T = rocksdb::IngestedFileInfo; unsigned int kSize = 8]': /usr/include/c++/10/bits/stl_vector.h:1198:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator > >' changed in GCC 7.1 1198 | _M_realloc_insert(end(), __x); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~ g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/forward_iterator.cc -o db/forward_iterator.o In file included from /usr/include/c++/10/vector:72, from ./db/external_sst_file_ingestion_job.h:9, from db/external_sst_file_ingestion_job.cc:8: /usr/include/c++/10/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {int&, rocksdb::FileMetaData}; _Tp = std::pair; _Alloc = std::allocator >]': /usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type 'std::vector >::iterator' changed in GCC 7.1 426 | vector<_Tp, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/vector.tcc: In member function 'rocksdb::Status rocksdb::ExternalSstFileIngestionJob::Run()': /usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator*, std::vector > >' changed in GCC 7.1 121 | _M_realloc_insert(end(), std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/import_column_family_job.cc -o db/import_column_family_job.o In file included from /usr/include/c++/10/vector:72, from ./db/flush_job.h:18, from db/flush_job.cc:10: /usr/include/c++/10/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {int&, rocksdb::FileMetaData}; _Tp = std::pair; _Alloc = std::allocator >]': /usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type 'std::vector >::iterator' changed in GCC 7.1 426 | vector<_Tp, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/vector.tcc: In member function 'void rocksdb::VersionEdit::AddFile(int, uint64_t, uint32_t, uint64_t, const rocksdb::InternalKey&, const rocksdb::InternalKey&, const SequenceNumber&, const SequenceNumber&, bool, uint64_t, uint64_t, uint64_t, const string&, const string&)': /usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator*, std::vector > >' changed in GCC 7.1 121 | _M_realloc_insert(end(), std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/internal_stats.cc -o db/internal_stats.o g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/logs_with_prep_tracker.cc -o db/logs_with_prep_tracker.o In file included from /usr/include/c++/10/vector:72, from ./db/import_column_family_job.h:4, from db/import_column_family_job.cc:3: /usr/include/c++/10/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {const rocksdb::IngestedFileInfo&}; _Tp = rocksdb::IngestedFileInfo; _Alloc = std::allocator]': /usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type 'std::vector >::iterator' changed in GCC 7.1 426 | vector<_Tp, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/10/vector:72, from ./db/logs_with_prep_tracker.h:13, from db/logs_with_prep_tracker.cc:6: /usr/include/c++/10/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {rocksdb::LogsWithPrepTracker::LogCnt}; _Tp = rocksdb::LogsWithPrepTracker::LogCnt; _Alloc = std::allocator]': /usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type 'std::vector::iterator' changed in GCC 7.1 426 | vector<_Tp, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/vector.tcc: In member function 'void rocksdb::LogsWithPrepTracker::MarkLogAsContainingPrepSection(uint64_t)': /usr/include/c++/10/bits/vector.tcc:356:19: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 356 | _M_realloc_insert(begin() + __n, std::move(__v)); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/log_reader.cc -o db/log_reader.o In file included from /usr/include/c++/10/vector:67, from ./db/import_column_family_job.h:4, from db/import_column_family_job.cc:3: /usr/include/c++/10/bits/stl_vector.h: In member function 'rocksdb::Status rocksdb::ImportColumnFamilyJob::Prepare(uint64_t, rocksdb::SuperVersion*)': /usr/include/c++/10/bits/stl_vector.h:1198:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator > >' changed in GCC 7.1 1198 | _M_realloc_insert(end(), __x); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/10/vector:72, from ./db/import_column_family_job.h:4, from db/import_column_family_job.cc:3: /usr/include/c++/10/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {int&, rocksdb::FileMetaData}; _Tp = std::pair; _Alloc = std::allocator >]': /usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type 'std::vector >::iterator' changed in GCC 7.1 426 | vector<_Tp, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/vector.tcc: In member function 'rocksdb::Status rocksdb::ImportColumnFamilyJob::Run()': /usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator*, std::vector > >' changed in GCC 7.1 121 | _M_realloc_insert(end(), std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/10/map:60, from ./db/internal_stats.h:12, from db/internal_stats.cc:11: /usr/include/c++/10/bits/stl_tree.h: In function 'std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_emplace_hint_unique(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator, _Args&& ...) [with _Args = {const std::piecewise_construct_t&, std::tuple, std::tuple<>}; _Key = rocksdb::LevelStatType; _Val = std::pair; _KeyOfValue = std::_Select1st >; _Compare = std::less; _Alloc = std::allocator >]': /usr/include/c++/10/bits/stl_tree.h:2458:7: note: parameter passing for argument of type 'std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::const_iterator' changed in GCC 7.1 2458 | _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/10/map:61, from ./db/internal_stats.h:12, from db/internal_stats.cc:11: /usr/include/c++/10/bits/stl_map.h: In function 'void rocksdb::{anonymous}::PrepareLevelStats(std::map*, int, int, double, double, double, const rocksdb::InternalStats::CompactionStats&)': /usr/include/c++/10/bits/stl_map.h:520:37: note: parameter passing for argument of type 'std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::const_iterator' changed in GCC 7.1 520 | __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 521 | std::forward_as_tuple(std::move(__k)), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 522 | std::tuple<>()); | ~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/stl_map.h:520:37: note: parameter passing for argument of type 'std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::const_iterator' changed in GCC 7.1 520 | __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 521 | std::forward_as_tuple(std::move(__k)), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 522 | std::tuple<>()); | ~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/stl_map.h:520:37: note: parameter passing for argument of type 'std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::const_iterator' changed in GCC 7.1 520 | __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 521 | std::forward_as_tuple(std::move(__k)), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 522 | std::tuple<>()); | ~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/stl_map.h:520:37: note: parameter passing for argument of type 'std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::const_iterator' changed in GCC 7.1 520 | __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 521 | std::forward_as_tuple(std::move(__k)), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 522 | std::tuple<>()); | ~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/stl_map.h:520:37: note: parameter passing for argument of type 'std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::const_iterator' changed in GCC 7.1 520 | __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 521 | std::forward_as_tuple(std::move(__k)), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 522 | std::tuple<>()); | ~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/stl_map.h:520:37: note: parameter passing for argument of type 'std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::const_iterator' changed in GCC 7.1 520 | __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 521 | std::forward_as_tuple(std::move(__k)), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 522 | std::tuple<>()); | ~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/stl_map.h:520:37: note: parameter passing for argument of type 'std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::const_iterator' changed in GCC 7.1 520 | __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 521 | std::forward_as_tuple(std::move(__k)), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 522 | std::tuple<>()); | ~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/stl_map.h:520:37: note: parameter passing for argument of type 'std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::const_iterator' changed in GCC 7.1 520 | __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 521 | std::forward_as_tuple(std::move(__k)), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 522 | std::tuple<>()); | ~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/stl_map.h:520:37: note: parameter passing for argument of type 'std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::const_iterator' changed in GCC 7.1 520 | __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 521 | std::forward_as_tuple(std::move(__k)), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 522 | std::tuple<>()); | ~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/stl_map.h:520:37: note: parameter passing for argument of type 'std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::const_iterator' changed in GCC 7.1 520 | __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 521 | std::forward_as_tuple(std::move(__k)), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 522 | std::tuple<>()); | ~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/stl_map.h:520:37: note: parameter passing for argument of type 'std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::const_iterator' changed in GCC 7.1 520 | __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 521 | std::forward_as_tuple(std::move(__k)), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 522 | std::tuple<>()); | ~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/stl_map.h:520:37: note: parameter passing for argument of type 'std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::const_iterator' changed in GCC 7.1 520 | __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 521 | std::forward_as_tuple(std::move(__k)), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 522 | std::tuple<>()); | ~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/stl_map.h:520:37: note: parameter passing for argument of type 'std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::const_iterator' changed in GCC 7.1 520 | __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 521 | std::forward_as_tuple(std::move(__k)), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 522 | std::tuple<>()); | ~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/stl_map.h:520:37: note: parameter passing for argument of type 'std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::const_iterator' changed in GCC 7.1 520 | __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 521 | std::forward_as_tuple(std::move(__k)), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 522 | std::tuple<>()); | ~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/stl_map.h:520:37: note: parameter passing for argument of type 'std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::const_iterator' changed in GCC 7.1 520 | __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 521 | std::forward_as_tuple(std::move(__k)), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 522 | std::tuple<>()); | ~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/stl_map.h:520:37: note: parameter passing for argument of type 'std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::const_iterator' changed in GCC 7.1 520 | __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 521 | std::forward_as_tuple(std::move(__k)), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 522 | std::tuple<>()); | ~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/stl_map.h:520:37: note: parameter passing for argument of type 'std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::const_iterator' changed in GCC 7.1 520 | __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 521 | std::forward_as_tuple(std::move(__k)), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 522 | std::tuple<>()); | ~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/stl_map.h:520:37: note: parameter passing for argument of type 'std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::const_iterator' changed in GCC 7.1 520 | __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 521 | std::forward_as_tuple(std::move(__k)), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 522 | std::tuple<>()); | ~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/stl_map.h:520:37: note: parameter passing for argument of type 'std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::const_iterator' changed in GCC 7.1 520 | __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 521 | std::forward_as_tuple(std::move(__k)), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 522 | std::tuple<>()); | ~~~~~~~~~~~~~~~ g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/log_writer.cc -o db/log_writer.o g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/malloc_stats.cc -o db/malloc_stats.o g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/memtable.cc -o db/memtable.o g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/memtable_list.cc -o db/memtable_list.o g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/merge_helper.cc -o db/merge_helper.o db/memtable.cc: In member function 'void rocksdb::MemTable::UpdateOldestKeyTime()': db/memtable.cc:232:1: error: insn does not satisfy its constraints: 232 | } | ^ (insn 220 219 221 13 (set (reg:CC_DNE 100 cc) (compare:CC_DNE (ior:SI (ne:SI (reg:SI 0 r0 [163]) (const_int -1 [0xffffffffffffffff])) (ne:SI (reg:SI 1 r1 [+4 ]) (const_int -1 [0xffffffffffffffff]))) (const_int 0 [0]))) "/usr/include/c++/10/bits/atomic_base.h":509:36 337 {*cmp_ior} (expr_list:REG_DEAD (reg:SI 1 r1 [+4 ]) (expr_list:REG_DEAD (reg:SI 0 r0 [163]) (nil)))) during RTL pass: cprop_hardreg db/memtable.cc:232:1: internal compiler error: in extract_constrain_insn, at recog.c:2195 Please submit a full bug report, with preprocessed source if appropriate. See for instructions. g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/merge_operator.cc -o db/merge_operator.o g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/range_del_aggregator.cc -o db/range_del_aggregator.o g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/range_tombstone_fragmenter.cc -o db/range_tombstone_fragmenter.o In file included from /usr/include/c++/10/list:60, from ./db/range_tombstone_fragmenter.h:8, from db/range_tombstone_fragmenter.cc:6: /usr/include/c++/10/bits/stl_algobase.h: In function '_ForwardIterator std::__lower_bound(_ForwardIterator, _ForwardIterator, const _Tp&, _Compare) [with _ForwardIterator = __gnu_cxx::__normal_iterator >; _Tp = long long unsigned int; _Compare = __gnu_cxx::__ops::_Iter_comp_val >]': /usr/include/c++/10/bits/stl_algobase.h:1309:5: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 1309 | __lower_bound(_ForwardIterator __first, _ForwardIterator __last, | ^~~~~~~~~~~~~ /usr/include/c++/10/bits/stl_algobase.h:1309:5: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 In file included from /usr/include/c++/10/algorithm:62, from ./db/merge_context.h:7, from ./db/dbformat.h:16, from ./db/range_tombstone_fragmenter.h:14, from db/range_tombstone_fragmenter.cc:6: /usr/include/c++/10/bits/stl_algo.h: In member function 'void rocksdb::FragmentedRangeTombstoneIterator::SeekToCoveringTombstone(const rocksdb::Slice&)': /usr/include/c++/10/bits/stl_algo.h:2041:32: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 2041 | return std::__lower_bound(__first, __last, __val, | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ 2042 | __gnu_cxx::__ops::__iter_comp_val(__comp)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/stl_algo.h: In member function 'void rocksdb::FragmentedRangeTombstoneIterator::SeekForPrevToCoveringTombstone(const rocksdb::Slice&)': /usr/include/c++/10/bits/stl_algo.h:2041:32: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 2041 | return std::__lower_bound(__first, __last, __val, | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ 2042 | __gnu_cxx::__ops::__iter_comp_val(__comp)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/stl_algo.h: In member function 'void rocksdb::FragmentedRangeTombstoneIterator::ScanForwardToVisibleTombstone()': /usr/include/c++/10/bits/stl_algo.h:2041:32: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 2041 | return std::__lower_bound(__first, __last, __val, | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ 2042 | __gnu_cxx::__ops::__iter_comp_val(__comp)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ db/range_tombstone_fragmenter.cc:346:1: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 346 | } | ^ In file included from /usr/include/c++/10/algorithm:62, from ./db/merge_context.h:7, from ./db/dbformat.h:16, from ./db/range_tombstone_fragmenter.h:14, from db/range_tombstone_fragmenter.cc:6: /usr/include/c++/10/bits/stl_algo.h: In member function 'void rocksdb::FragmentedRangeTombstoneIterator::SeekToTopFirst()': /usr/include/c++/10/bits/stl_algo.h:2041:32: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 2041 | return std::__lower_bound(__first, __last, __val, | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ 2042 | __gnu_cxx::__ops::__iter_comp_val(__comp)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/stl_algo.h: In member function 'void rocksdb::FragmentedRangeTombstoneIterator::ScanBackwardToVisibleTombstone()': /usr/include/c++/10/bits/stl_algo.h:2041:32: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 2041 | return std::__lower_bound(__first, __last, __val, | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ 2042 | __gnu_cxx::__ops::__iter_comp_val(__comp)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/stl_algo.h: In member function 'void rocksdb::FragmentedRangeTombstoneIterator::SeekToTopLast()': /usr/include/c++/10/bits/stl_algo.h:2041:32: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 2041 | return std::__lower_bound(__first, __last, __val, | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ 2042 | __gnu_cxx::__ops::__iter_comp_val(__comp)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/stl_algo.h: In member function 'void rocksdb::FragmentedRangeTombstoneIterator::TopNext()': /usr/include/c++/10/bits/stl_algo.h:2041:32: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 2041 | return std::__lower_bound(__first, __last, __val, | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ 2042 | __gnu_cxx::__ops::__iter_comp_val(__comp)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/stl_algo.h: In member function 'void rocksdb::FragmentedRangeTombstoneIterator::TopPrev()': /usr/include/c++/10/bits/stl_algo.h:2041:32: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 2041 | return std::__lower_bound(__first, __last, __val, | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ 2042 | __gnu_cxx::__ops::__iter_comp_val(__comp)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/10/vector:72, from ./db/range_tombstone_fragmenter.h:12, from db/range_tombstone_fragmenter.cc:6: /usr/include/c++/10/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {const long long unsigned int&}; _Tp = long long unsigned int; _Alloc = std::allocator]': /usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type 'std::vector::iterator' changed in GCC 7.1 426 | vector<_Tp, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/10/vector:67, from ./db/range_tombstone_fragmenter.h:12, from db/range_tombstone_fragmenter.cc:6: /usr/include/c++/10/bits/stl_vector.h: In lambda function: /usr/include/c++/10/bits/stl_vector.h:1198:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 1198 | _M_realloc_insert(end(), __x); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~ /usr/include/c++/10/bits/stl_vector.h:1198:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 1198 | _M_realloc_insert(end(), __x); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~ db/range_tombstone_fragmenter.cc:167:3: note: parameter passing for argument of type 'std::vector::iterator' changed in GCC 7.1 167 | }; | ^ db/range_tombstone_fragmenter.cc:167:3: note: parameter passing for argument of type 'std::vector::iterator' changed in GCC 7.1 g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/repair.cc -o db/repair.o g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/snapshot_impl.cc -o db/snapshot_impl.o g++ -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -march=armv8-a+crc+crypto -DROCKSDB_USE_RTTI -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -I. -I./include -std=c++11 -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -faligned-new -DHAVE_ALIGNED_NEW -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -g -O2 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -Wformat -Werror=format-security -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=1 -DZLIB -DBZIP2 -DLZ4 -DZSTD -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_BACKTRACE -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_AUXV_GETAUXVAL_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly -O2 -fno-omit-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/table_cache.cc -o db/table_cache.o Preprocessed source stored into /tmp/ccrAuUKb.out file, please attach this to your bugreport. === BEGIN GCC DUMP === 20472: // Target: arm-linux-gnueabihf 20472: // Configured with: ../src/configure -v --with-pkgversion='Debian 10.2.1-6' --with-bugurl=file:///usr/share/doc/gcc-10/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-10 --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 --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-sjlj-exceptions --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb --disable-werror --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf 20472: // Thread model: posix 20472: // Supported LTO compression algorithms: zlib zstd 20472: // gcc version 10.2.1 20210110 (Debian 10.2.1-6) 20472: // 20472: // db/memtable.cc: In member function 'void rocksdb::MemTable::UpdateOldestKeyTime()': 20472: // db/memtable.cc:232:1: error: insn does not satisfy its constraints: 20472: // 232 | } 20472: // | ^ 20472: // (insn 220 219 221 13 (set (reg:CC_DNE 100 cc) 20472: // (compare:CC_DNE (ior:SI (ne:SI (reg:SI 0 r0 [163]) 20472: // (const_int -1 [0xffffffffffffffff])) 20472: // (ne:SI (reg:SI 1 r1 [+4 ]) 20472: // (const_int -1 [0xffffffffffffffff]))) 20472: // (const_int 0 [0]))) "/usr/include/c++/10/bits/atomic_base.h":509:36 337 {*cmp_ior} 20472: // (expr_list:REG_DEAD (reg:SI 1 r1 [+4 ]) 20472: // (expr_list:REG_DEAD (reg:SI 0 r0 [163]) 20472: // (nil)))) 20472: // during RTL pass: cprop_hardreg 20472: // db/memtable.cc:232:1: internal compiler error: in extract_constrain_insn, at recog.c:2195 20472: // Please submit a full bug report, 20472: // with preprocessed source if appropriate. 20472: // See for instructions. 20472: 20472: // /usr/lib/gcc/arm-linux-gnueabihf/10/cc1plus -quiet -I . -I ./include -imultilib . -imultiarch arm-linux-gnueabihf -D_GNU_SOURCE -D ROCKSDB_USE_RTTI -D HAVE_ALIGNED_NEW -D ROCKSDB_PLATFORM_POSIX -D ROCKSDB_LIB_IO_POSIX -D OS_LINUX -D ROCKSDB_FALLOCATE_PRESENT -D SNAPPY -D GFLAGS=1 -D ZLIB -D BZIP2 -D LZ4 -D ZSTD -D ROCKSDB_MALLOC_USABLE_SIZE -D ROCKSDB_PTHREAD_ADAPTIVE_MUTEX -D ROCKSDB_BACKTRACE -D ROCKSDB_RANGESYNC_PRESENT -D ROCKSDB_SCHED_GETCPU_PRESENT -D ROCKSDB_AUXV_GETAUXVAL_PRESENT -D ROCKSDB_SUPPORT_THREAD_LOCAL -isystem third-party/gtest-1.8.1/fused-src -isystem ./third-party/folly db/memtable.cc -quiet -dumpbase memtable.cc -mfloat-abi=hard -mfpu=vfpv3-d16 -mthumb -mtls-dialect=gnu -march=armv8-a+crc+crypto -auxbase-strip db/memtable.o -g -g -g -g -O2 -O2 -O2 -O2 -Wformat=1 -Werror=format-security -Wextra -Wall -Wsign-compare -Wshadow -Wunused-parameter -Werror -Wformat=1 -Werror=format-security -Wformat=1 -Werror=format-security -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -std=c++11 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -faligned-new=1 -fdebug-prefix-map=/build/reproducible-path/rocksdb-6.11.4=. -fstack-protector-strong -fno-builtin-memcmp -fno-omit-frame-pointer -o - -frandom-seed=0 -fdump-noaddr 20472: 20472: # 1 "db/memtable.cc" 20472: # 1 "/build/reproducible-path/rocksdb-6.11.4//" 20472: # 1 "" 20472: # 1 "" 20472: # 1 "/usr/include/stdc-predef.h" 1 3 4 20472: # 1 "" 2 20472: # 1 "db/memtable.cc" 20472: # 10 "db/memtable.cc" 20472: # 1 "./db/memtable.h" 1 20472: # 10 "./db/memtable.h" 20472: 20472: # 1 "/usr/include/c++/10/atomic" 1 3 20472: # 35 "/usr/include/c++/10/atomic" 3 20472: 20472: # 36 "/usr/include/c++/10/atomic" 3 20472: 20472: 20472: 20472: 20472: 20472: # 1 "/usr/include/c++/10/bits/atomic_base.h" 1 3 20472: # 33 "/usr/include/c++/10/bits/atomic_base.h" 3 20472: 20472: # 34 "/usr/include/c++/10/bits/atomic_base.h" 3 20472: 20472: # 1 "/usr/include/arm-linux-gnueabihf/c++/10/bits/c++config.h" 1 3 20472: # 262 "/usr/include/arm-linux-gnueabihf/c++/10/bits/c++config.h" 3 20472: 20472: # 262 "/usr/include/arm-linux-gnueabihf/c++/10/bits/c++config.h" 3 20472: namespace std 20472: { 20472: typedef unsigned int size_t; 20472: typedef int ptrdiff_t; 20472: 20472: 20472: typedef decltype(nullptr) nullptr_t; 20472: 20472: } 20472: # 284 "/usr/include/arm-linux-gnueabihf/c++/10/bits/c++config.h" 3 20472: namespace std 20472: { 20472: inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { } 20472: } 20472: namespace __gnu_cxx 20472: { 20472: inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { } 20472: } 20472: # 522 "/usr/include/arm-linux-gnueabihf/c++/10/bits/c++config.h" 3 20472: # 1 "/usr/include/arm-linux-gnueabihf/c++/10/bits/os_defines.h" 1 3 20472: # 39 "/usr/include/arm-linux-gnueabihf/c++/10/bits/os_defines.h" 3 20472: # 1 "/usr/include/features.h" 1 3 4 20472: # 461 "/usr/include/features.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/sys/cdefs.h" 1 3 4 20472: # 452 "/usr/include/arm-linux-gnueabihf/sys/cdefs.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/wordsize.h" 1 3 4 20472: # 453 "/usr/include/arm-linux-gnueabihf/sys/cdefs.h" 2 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/long-double.h" 1 3 4 20472: # 454 "/usr/include/arm-linux-gnueabihf/sys/cdefs.h" 2 3 4 20472: # 462 "/usr/include/features.h" 2 3 4 20472: # 485 "/usr/include/features.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/gnu/stubs.h" 1 3 4 20472: # 10 "/usr/include/arm-linux-gnueabihf/gnu/stubs.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/gnu/stubs-hard.h" 1 3 4 20472: # 11 "/usr/include/arm-linux-gnueabihf/gnu/stubs.h" 2 3 4 20472: # 486 "/usr/include/features.h" 2 3 4 20472: # 40 "/usr/include/arm-linux-gnueabihf/c++/10/bits/os_defines.h" 2 3 20472: # 523 "/usr/include/arm-linux-gnueabihf/c++/10/bits/c++config.h" 2 3 20472: 20472: 20472: # 1 "/usr/include/arm-linux-gnueabihf/c++/10/bits/cpu_defines.h" 1 3 20472: # 526 "/usr/include/arm-linux-gnueabihf/c++/10/bits/c++config.h" 2 3 20472: # 36 "/usr/include/c++/10/bits/atomic_base.h" 2 3 20472: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/10/include/stdint.h" 1 3 4 20472: # 9 "/usr/lib/gcc/arm-linux-gnueabihf/10/include/stdint.h" 3 4 20472: # 1 "/usr/include/stdint.h" 1 3 4 20472: # 26 "/usr/include/stdint.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/libc-header-start.h" 1 3 4 20472: # 27 "/usr/include/stdint.h" 2 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/types.h" 1 3 4 20472: # 27 "/usr/include/arm-linux-gnueabihf/bits/types.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/wordsize.h" 1 3 4 20472: # 28 "/usr/include/arm-linux-gnueabihf/bits/types.h" 2 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/timesize.h" 1 3 4 20472: # 19 "/usr/include/arm-linux-gnueabihf/bits/timesize.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/wordsize.h" 1 3 4 20472: # 20 "/usr/include/arm-linux-gnueabihf/bits/timesize.h" 2 3 4 20472: # 29 "/usr/include/arm-linux-gnueabihf/bits/types.h" 2 3 4 20472: 20472: 20472: typedef unsigned char __u_char; 20472: typedef unsigned short int __u_short; 20472: typedef unsigned int __u_int; 20472: typedef unsigned long int __u_long; 20472: 20472: 20472: typedef signed char __int8_t; 20472: typedef unsigned char __uint8_t; 20472: typedef signed short int __int16_t; 20472: typedef unsigned short int __uint16_t; 20472: typedef signed int __int32_t; 20472: typedef unsigned int __uint32_t; 20472: 20472: 20472: 20472: 20472: __extension__ typedef signed long long int __int64_t; 20472: __extension__ typedef unsigned long long int __uint64_t; 20472: 20472: 20472: 20472: typedef __int8_t __int_least8_t; 20472: typedef __uint8_t __uint_least8_t; 20472: typedef __int16_t __int_least16_t; 20472: typedef __uint16_t __uint_least16_t; 20472: typedef __int32_t __int_least32_t; 20472: typedef __uint32_t __uint_least32_t; 20472: typedef __int64_t __int_least64_t; 20472: typedef __uint64_t __uint_least64_t; 20472: 20472: 20472: 20472: 20472: 20472: 20472: __extension__ typedef long long int __quad_t; 20472: __extension__ typedef unsigned long long int __u_quad_t; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: __extension__ typedef long long int __intmax_t; 20472: __extension__ typedef unsigned long long int __uintmax_t; 20472: # 141 "/usr/include/arm-linux-gnueabihf/bits/types.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/typesizes.h" 1 3 4 20472: # 142 "/usr/include/arm-linux-gnueabihf/bits/types.h" 2 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/time64.h" 1 3 4 20472: # 143 "/usr/include/arm-linux-gnueabihf/bits/types.h" 2 3 4 20472: 20472: 20472: __extension__ typedef __uint64_t __dev_t; 20472: __extension__ typedef unsigned int __uid_t; 20472: __extension__ typedef unsigned int __gid_t; 20472: __extension__ typedef unsigned long int __ino_t; 20472: __extension__ typedef __uint64_t __ino64_t; 20472: __extension__ typedef unsigned int __mode_t; 20472: __extension__ typedef unsigned int __nlink_t; 20472: __extension__ typedef long int __off_t; 20472: __extension__ typedef __int64_t __off64_t; 20472: __extension__ typedef int __pid_t; 20472: __extension__ typedef struct { int __val[2]; } __fsid_t; 20472: __extension__ typedef long int __clock_t; 20472: __extension__ typedef unsigned long int __rlim_t; 20472: __extension__ typedef __uint64_t __rlim64_t; 20472: __extension__ typedef unsigned int __id_t; 20472: __extension__ typedef long int __time_t; 20472: __extension__ typedef unsigned int __useconds_t; 20472: __extension__ typedef long int __suseconds_t; 20472: 20472: __extension__ typedef int __daddr_t; 20472: __extension__ typedef int __key_t; 20472: 20472: 20472: __extension__ typedef int __clockid_t; 20472: 20472: 20472: __extension__ typedef void * __timer_t; 20472: 20472: 20472: __extension__ typedef long int __blksize_t; 20472: 20472: 20472: 20472: 20472: __extension__ typedef long int __blkcnt_t; 20472: __extension__ typedef __int64_t __blkcnt64_t; 20472: 20472: 20472: __extension__ typedef unsigned long int __fsblkcnt_t; 20472: __extension__ typedef __uint64_t __fsblkcnt64_t; 20472: 20472: 20472: __extension__ typedef unsigned long int __fsfilcnt_t; 20472: __extension__ typedef __uint64_t __fsfilcnt64_t; 20472: 20472: 20472: __extension__ typedef int __fsword_t; 20472: 20472: __extension__ typedef int __ssize_t; 20472: 20472: 20472: __extension__ typedef long int __syscall_slong_t; 20472: 20472: __extension__ typedef unsigned long int __syscall_ulong_t; 20472: 20472: 20472: 20472: typedef __off64_t __loff_t; 20472: typedef char *__caddr_t; 20472: 20472: 20472: __extension__ typedef int __intptr_t; 20472: 20472: 20472: __extension__ typedef unsigned int __socklen_t; 20472: 20472: 20472: 20472: 20472: typedef int __sig_atomic_t; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: __extension__ typedef __int64_t __time64_t; 20472: # 28 "/usr/include/stdint.h" 2 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/wchar.h" 1 3 4 20472: # 29 "/usr/include/stdint.h" 2 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/wordsize.h" 1 3 4 20472: # 30 "/usr/include/stdint.h" 2 3 4 20472: 20472: 20472: 20472: 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/stdint-intn.h" 1 3 4 20472: # 24 "/usr/include/arm-linux-gnueabihf/bits/stdint-intn.h" 3 4 20472: typedef __int8_t int8_t; 20472: typedef __int16_t int16_t; 20472: typedef __int32_t int32_t; 20472: typedef __int64_t int64_t; 20472: # 35 "/usr/include/stdint.h" 2 3 4 20472: 20472: 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/stdint-uintn.h" 1 3 4 20472: # 24 "/usr/include/arm-linux-gnueabihf/bits/stdint-uintn.h" 3 4 20472: typedef __uint8_t uint8_t; 20472: typedef __uint16_t uint16_t; 20472: typedef __uint32_t uint32_t; 20472: typedef __uint64_t uint64_t; 20472: # 38 "/usr/include/stdint.h" 2 3 4 20472: 20472: 20472: 20472: 20472: 20472: typedef __int_least8_t int_least8_t; 20472: typedef __int_least16_t int_least16_t; 20472: typedef __int_least32_t int_least32_t; 20472: typedef __int_least64_t int_least64_t; 20472: 20472: 20472: typedef __uint_least8_t uint_least8_t; 20472: typedef __uint_least16_t uint_least16_t; 20472: typedef __uint_least32_t uint_least32_t; 20472: typedef __uint_least64_t uint_least64_t; 20472: 20472: 20472: 20472: 20472: 20472: typedef signed char int_fast8_t; 20472: 20472: 20472: 20472: 20472: 20472: typedef int int_fast16_t; 20472: typedef int int_fast32_t; 20472: __extension__ 20472: typedef long long int int_fast64_t; 20472: 20472: 20472: 20472: typedef unsigned char uint_fast8_t; 20472: 20472: 20472: 20472: 20472: 20472: typedef unsigned int uint_fast16_t; 20472: typedef unsigned int uint_fast32_t; 20472: __extension__ 20472: typedef unsigned long long int uint_fast64_t; 20472: # 93 "/usr/include/stdint.h" 3 4 20472: typedef int intptr_t; 20472: 20472: 20472: typedef unsigned int uintptr_t; 20472: 20472: 20472: 20472: 20472: typedef __intmax_t intmax_t; 20472: typedef __uintmax_t uintmax_t; 20472: # 10 "/usr/lib/gcc/arm-linux-gnueabihf/10/include/stdint.h" 2 3 4 20472: # 37 "/usr/include/c++/10/bits/atomic_base.h" 2 3 20472: # 1 "/usr/include/c++/10/bits/atomic_lockfree_defines.h" 1 3 20472: # 33 "/usr/include/c++/10/bits/atomic_lockfree_defines.h" 3 20472: 20472: # 34 "/usr/include/c++/10/bits/atomic_lockfree_defines.h" 3 20472: # 38 "/usr/include/c++/10/bits/atomic_base.h" 2 3 20472: # 1 "/usr/include/c++/10/bits/move.h" 1 3 20472: # 38 "/usr/include/c++/10/bits/move.h" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: inline constexpr _Tp* 20472: __addressof(_Tp& __r) noexcept 20472: { return __builtin_addressof(__r); } 20472: 20472: 20472: 20472: 20472: } 20472: 20472: # 1 "/usr/include/c++/10/type_traits" 1 3 20472: # 32 "/usr/include/c++/10/type_traits" 3 20472: 20472: # 33 "/usr/include/c++/10/type_traits" 3 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: # 56 "/usr/include/c++/10/type_traits" 3 20472: template 20472: struct integral_constant 20472: { 20472: static constexpr _Tp value = __v; 20472: typedef _Tp value_type; 20472: typedef integral_constant<_Tp, __v> type; 20472: constexpr operator value_type() const noexcept { return value; } 20472: 20472: 20472: 20472: 20472: 20472: 20472: }; 20472: 20472: template 20472: constexpr _Tp integral_constant<_Tp, __v>::value; 20472: 20472: 20472: typedef integral_constant true_type; 20472: 20472: 20472: typedef integral_constant false_type; 20472: 20472: template 20472: using __bool_constant = integral_constant; 20472: # 91 "/usr/include/c++/10/type_traits" 3 20472: template 20472: struct conditional; 20472: 20472: template 20472: struct __type_identity 20472: { using type = _Type; }; 20472: 20472: template 20472: using __type_identity_t = typename __type_identity<_Tp>::type; 20472: 20472: template 20472: struct __or_; 20472: 20472: template<> 20472: struct __or_<> 20472: : public false_type 20472: { }; 20472: 20472: template 20472: struct __or_<_B1> 20472: : public _B1 20472: { }; 20472: 20472: template 20472: struct __or_<_B1, _B2> 20472: : public conditional<_B1::value, _B1, _B2>::type 20472: { }; 20472: 20472: template 20472: struct __or_<_B1, _B2, _B3, _Bn...> 20472: : public conditional<_B1::value, _B1, __or_<_B2, _B3, _Bn...>>::type 20472: { }; 20472: 20472: template 20472: struct __and_; 20472: 20472: template<> 20472: struct __and_<> 20472: : public true_type 20472: { }; 20472: 20472: template 20472: struct __and_<_B1> 20472: : public _B1 20472: { }; 20472: 20472: template 20472: struct __and_<_B1, _B2> 20472: : public conditional<_B1::value, _B2, _B1>::type 20472: { }; 20472: 20472: template 20472: struct __and_<_B1, _B2, _B3, _Bn...> 20472: : public conditional<_B1::value, __and_<_B2, _B3, _Bn...>, _B1>::type 20472: { }; 20472: 20472: template 20472: struct __not_ 20472: : public __bool_constant 20472: { }; 20472: # 188 "/usr/include/c++/10/type_traits" 3 20472: template 20472: struct is_reference; 20472: template 20472: struct is_function; 20472: template 20472: struct is_void; 20472: template 20472: struct __is_array_unknown_bounds; 20472: 20472: 20472: 20472: 20472: template 20472: constexpr true_type __is_complete_or_unbounded(__type_identity<_Tp>) 20472: { return {}; } 20472: 20472: template 20472: constexpr typename __or_< 20472: is_reference<_NestedType>, 20472: is_function<_NestedType>, 20472: is_void<_NestedType>, 20472: __is_array_unknown_bounds<_NestedType> 20472: >::type __is_complete_or_unbounded(_TypeIdentity) 20472: { return {}; } 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct __success_type 20472: { typedef _Tp type; }; 20472: 20472: struct __failure_type 20472: { }; 20472: 20472: template 20472: struct remove_cv; 20472: 20472: 20472: template 20472: using __remove_cv_t = typename remove_cv<_Tp>::type; 20472: 20472: template 20472: struct is_const; 20472: 20472: 20472: 20472: template 20472: struct __is_void_helper 20472: : public false_type { }; 20472: 20472: template<> 20472: struct __is_void_helper 20472: : public true_type { }; 20472: 20472: 20472: template 20472: struct is_void 20472: : public __is_void_helper<__remove_cv_t<_Tp>>::type 20472: { }; 20472: 20472: template 20472: struct __is_integral_helper 20472: : public false_type { }; 20472: 20472: template<> 20472: struct __is_integral_helper 20472: : public true_type { }; 20472: 20472: template<> 20472: struct __is_integral_helper 20472: : public true_type { }; 20472: 20472: template<> 20472: struct __is_integral_helper 20472: : public true_type { }; 20472: 20472: template<> 20472: struct __is_integral_helper 20472: : public true_type { }; 20472: 20472: 20472: template<> 20472: struct __is_integral_helper 20472: : public true_type { }; 20472: # 284 "/usr/include/c++/10/type_traits" 3 20472: template<> 20472: struct __is_integral_helper 20472: : public true_type { }; 20472: 20472: template<> 20472: struct __is_integral_helper 20472: : public true_type { }; 20472: 20472: template<> 20472: struct __is_integral_helper 20472: : public true_type { }; 20472: 20472: template<> 20472: struct __is_integral_helper 20472: : public true_type { }; 20472: 20472: template<> 20472: struct __is_integral_helper 20472: : public true_type { }; 20472: 20472: template<> 20472: struct __is_integral_helper 20472: : public true_type { }; 20472: 20472: template<> 20472: struct __is_integral_helper 20472: : public true_type { }; 20472: 20472: template<> 20472: struct __is_integral_helper 20472: : public true_type { }; 20472: 20472: template<> 20472: struct __is_integral_helper 20472: : public true_type { }; 20472: 20472: template<> 20472: struct __is_integral_helper 20472: : public true_type { }; 20472: # 364 "/usr/include/c++/10/type_traits" 3 20472: template 20472: struct is_integral 20472: : public __is_integral_helper<__remove_cv_t<_Tp>>::type 20472: { }; 20472: 20472: template 20472: struct __is_floating_point_helper 20472: : public false_type { }; 20472: 20472: template<> 20472: struct __is_floating_point_helper 20472: : public true_type { }; 20472: 20472: template<> 20472: struct __is_floating_point_helper 20472: : public true_type { }; 20472: 20472: template<> 20472: struct __is_floating_point_helper 20472: : public true_type { }; 20472: # 392 "/usr/include/c++/10/type_traits" 3 20472: template 20472: struct is_floating_point 20472: : public __is_floating_point_helper<__remove_cv_t<_Tp>>::type 20472: { }; 20472: 20472: 20472: template 20472: struct is_array 20472: : public false_type { }; 20472: 20472: template 20472: struct is_array<_Tp[_Size]> 20472: : public true_type { }; 20472: 20472: template 20472: struct is_array<_Tp[]> 20472: : public true_type { }; 20472: 20472: template 20472: struct __is_pointer_helper 20472: : public false_type { }; 20472: 20472: template 20472: struct __is_pointer_helper<_Tp*> 20472: : public true_type { }; 20472: 20472: 20472: template 20472: struct is_pointer 20472: : public __is_pointer_helper<__remove_cv_t<_Tp>>::type 20472: { }; 20472: 20472: 20472: template 20472: struct is_lvalue_reference 20472: : public false_type { }; 20472: 20472: template 20472: struct is_lvalue_reference<_Tp&> 20472: : public true_type { }; 20472: 20472: 20472: template 20472: struct is_rvalue_reference 20472: : public false_type { }; 20472: 20472: template 20472: struct is_rvalue_reference<_Tp&&> 20472: : public true_type { }; 20472: 20472: template 20472: struct __is_member_object_pointer_helper 20472: : public false_type { }; 20472: 20472: template 20472: struct __is_member_object_pointer_helper<_Tp _Cp::*> 20472: : public __not_>::type { }; 20472: 20472: 20472: template 20472: struct is_member_object_pointer 20472: : public __is_member_object_pointer_helper<__remove_cv_t<_Tp>>::type 20472: { }; 20472: 20472: template 20472: struct __is_member_function_pointer_helper 20472: : public false_type { }; 20472: 20472: template 20472: struct __is_member_function_pointer_helper<_Tp _Cp::*> 20472: : public is_function<_Tp>::type { }; 20472: 20472: 20472: template 20472: struct is_member_function_pointer 20472: : public __is_member_function_pointer_helper<__remove_cv_t<_Tp>>::type 20472: { }; 20472: 20472: 20472: template 20472: struct is_enum 20472: : public integral_constant 20472: { }; 20472: 20472: 20472: template 20472: struct is_union 20472: : public integral_constant 20472: { }; 20472: 20472: 20472: template 20472: struct is_class 20472: : public integral_constant 20472: { }; 20472: 20472: 20472: template 20472: struct is_function 20472: : public __bool_constant::value> { }; 20472: 20472: template 20472: struct is_function<_Tp&> 20472: : public false_type { }; 20472: 20472: template 20472: struct is_function<_Tp&&> 20472: : public false_type { }; 20472: 20472: 20472: 20472: template 20472: struct __is_null_pointer_helper 20472: : public false_type { }; 20472: 20472: template<> 20472: struct __is_null_pointer_helper 20472: : public true_type { }; 20472: 20472: 20472: template 20472: struct is_null_pointer 20472: : public __is_null_pointer_helper<__remove_cv_t<_Tp>>::type 20472: { }; 20472: 20472: 20472: template 20472: struct __is_nullptr_t 20472: : public is_null_pointer<_Tp> 20472: { } __attribute__ ((__deprecated__ ("use '" "std::is_null_pointer" "' instead"))); 20472: 20472: 20472: 20472: 20472: template 20472: struct is_reference 20472: : public __or_, 20472: is_rvalue_reference<_Tp>>::type 20472: { }; 20472: 20472: 20472: template 20472: struct is_arithmetic 20472: : public __or_, is_floating_point<_Tp>>::type 20472: { }; 20472: 20472: 20472: template 20472: struct is_fundamental 20472: : public __or_, is_void<_Tp>, 20472: is_null_pointer<_Tp>>::type 20472: { }; 20472: 20472: 20472: template 20472: struct is_object 20472: : public __not_<__or_, is_reference<_Tp>, 20472: is_void<_Tp>>>::type 20472: { }; 20472: 20472: template 20472: struct is_member_pointer; 20472: 20472: 20472: template 20472: struct is_scalar 20472: : public __or_, is_enum<_Tp>, is_pointer<_Tp>, 20472: is_member_pointer<_Tp>, is_null_pointer<_Tp>>::type 20472: { }; 20472: 20472: 20472: template 20472: struct is_compound 20472: : public __not_>::type { }; 20472: 20472: template 20472: struct __is_member_pointer_helper 20472: : public false_type { }; 20472: 20472: template 20472: struct __is_member_pointer_helper<_Tp _Cp::*> 20472: : public true_type { }; 20472: 20472: 20472: template 20472: struct is_member_pointer 20472: : public __is_member_pointer_helper<__remove_cv_t<_Tp>>::type 20472: { }; 20472: 20472: template 20472: struct is_same; 20472: 20472: template 20472: using __is_one_of = __or_...>; 20472: 20472: 20472: template 20472: using __is_signed_integer = __is_one_of<__remove_cv_t<_Tp>, 20472: signed char, signed short, signed int, signed long, 20472: signed long long 20472: # 604 "/usr/include/c++/10/type_traits" 3 20472: >; 20472: 20472: 20472: template 20472: using __is_unsigned_integer = __is_one_of<__remove_cv_t<_Tp>, 20472: unsigned char, unsigned short, unsigned int, unsigned long, 20472: unsigned long long 20472: # 623 "/usr/include/c++/10/type_traits" 3 20472: >; 20472: 20472: 20472: template 20472: using __is_standard_integer 20472: = __or_<__is_signed_integer<_Tp>, __is_unsigned_integer<_Tp>>; 20472: 20472: 20472: template using __void_t = void; 20472: 20472: 20472: 20472: template 20472: struct __is_referenceable 20472: : public false_type 20472: { }; 20472: 20472: template 20472: struct __is_referenceable<_Tp, __void_t<_Tp&>> 20472: : public true_type 20472: { }; 20472: 20472: 20472: 20472: 20472: template 20472: struct is_const 20472: : public false_type { }; 20472: 20472: template 20472: struct is_const<_Tp const> 20472: : public true_type { }; 20472: 20472: 20472: template 20472: struct is_volatile 20472: : public false_type { }; 20472: 20472: template 20472: struct is_volatile<_Tp volatile> 20472: : public true_type { }; 20472: 20472: 20472: template 20472: struct is_trivial 20472: : public integral_constant 20472: { 20472: static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), 20472: "template argument must be a complete class or an unbounded array"); 20472: }; 20472: 20472: 20472: template 20472: struct is_trivially_copyable 20472: : public integral_constant 20472: { 20472: static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), 20472: "template argument must be a complete class or an unbounded array"); 20472: }; 20472: 20472: 20472: template 20472: struct is_standard_layout 20472: : public integral_constant 20472: { 20472: static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), 20472: "template argument must be a complete class or an unbounded array"); 20472: }; 20472: 20472: 20472: 20472: template 20472: struct 20472: 20472: is_pod 20472: : public integral_constant 20472: { 20472: static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), 20472: "template argument must be a complete class or an unbounded array"); 20472: }; 20472: 20472: 20472: template 20472: struct is_literal_type 20472: : public integral_constant 20472: { 20472: static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), 20472: "template argument must be a complete class or an unbounded array"); 20472: }; 20472: 20472: 20472: template 20472: struct is_empty 20472: : public integral_constant 20472: { }; 20472: 20472: 20472: template 20472: struct is_polymorphic 20472: : public integral_constant 20472: { }; 20472: # 735 "/usr/include/c++/10/type_traits" 3 20472: template 20472: struct is_abstract 20472: : public integral_constant 20472: { }; 20472: 20472: template::value> 20472: struct __is_signed_helper 20472: : public false_type { }; 20472: 20472: template 20472: struct __is_signed_helper<_Tp, true> 20472: : public integral_constant 20472: { }; 20472: 20472: 20472: template 20472: struct is_signed 20472: : public __is_signed_helper<_Tp>::type 20472: { }; 20472: 20472: 20472: template 20472: struct is_unsigned 20472: : public __and_, __not_>> 20472: { }; 20472: # 770 "/usr/include/c++/10/type_traits" 3 20472: template 20472: _Up 20472: __declval(int); 20472: 20472: template 20472: _Tp 20472: __declval(long); 20472: 20472: template 20472: auto declval() noexcept -> decltype(__declval<_Tp>(0)); 20472: 20472: template 20472: struct extent; 20472: 20472: template 20472: struct remove_all_extents; 20472: 20472: template 20472: struct __is_array_known_bounds 20472: : public integral_constant::value > 0)> 20472: { }; 20472: 20472: template 20472: struct __is_array_unknown_bounds 20472: : public __and_, __not_>> 20472: { }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: struct __do_is_destructible_impl 20472: { 20472: template().~_Tp())> 20472: static true_type __test(int); 20472: 20472: template 20472: static false_type __test(...); 20472: }; 20472: 20472: template 20472: struct __is_destructible_impl 20472: : public __do_is_destructible_impl 20472: { 20472: typedef decltype(__test<_Tp>(0)) type; 20472: }; 20472: 20472: template, 20472: __is_array_unknown_bounds<_Tp>, 20472: is_function<_Tp>>::value, 20472: bool = __or_, is_scalar<_Tp>>::value> 20472: struct __is_destructible_safe; 20472: 20472: template 20472: struct __is_destructible_safe<_Tp, false, false> 20472: : public __is_destructible_impl::type>::type 20472: { }; 20472: 20472: template 20472: struct __is_destructible_safe<_Tp, true, false> 20472: : public false_type { }; 20472: 20472: template 20472: struct __is_destructible_safe<_Tp, false, true> 20472: : public true_type { }; 20472: 20472: 20472: template 20472: struct is_destructible 20472: : public __is_destructible_safe<_Tp>::type 20472: { 20472: static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), 20472: "template argument must be a complete class or an unbounded array"); 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: struct __do_is_nt_destructible_impl 20472: { 20472: template 20472: static __bool_constant().~_Tp())> 20472: __test(int); 20472: 20472: template 20472: static false_type __test(...); 20472: }; 20472: 20472: template 20472: struct __is_nt_destructible_impl 20472: : public __do_is_nt_destructible_impl 20472: { 20472: typedef decltype(__test<_Tp>(0)) type; 20472: }; 20472: 20472: template, 20472: __is_array_unknown_bounds<_Tp>, 20472: is_function<_Tp>>::value, 20472: bool = __or_, is_scalar<_Tp>>::value> 20472: struct __is_nt_destructible_safe; 20472: 20472: template 20472: struct __is_nt_destructible_safe<_Tp, false, false> 20472: : public __is_nt_destructible_impl::type>::type 20472: { }; 20472: 20472: template 20472: struct __is_nt_destructible_safe<_Tp, true, false> 20472: : public false_type { }; 20472: 20472: template 20472: struct __is_nt_destructible_safe<_Tp, false, true> 20472: : public true_type { }; 20472: 20472: 20472: template 20472: struct is_nothrow_destructible 20472: : public __is_nt_destructible_safe<_Tp>::type 20472: { 20472: static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), 20472: "template argument must be a complete class or an unbounded array"); 20472: }; 20472: 20472: template 20472: struct __is_constructible_impl 20472: : public __bool_constant<__is_constructible(_Tp, _Args...)> 20472: { }; 20472: 20472: 20472: template 20472: struct is_constructible 20472: : public __is_constructible_impl<_Tp, _Args...> 20472: { 20472: static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), 20472: "template argument must be a complete class or an unbounded array"); 20472: }; 20472: 20472: 20472: template 20472: struct is_default_constructible 20472: : public __is_constructible_impl<_Tp>::type 20472: { 20472: static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), 20472: "template argument must be a complete class or an unbounded array"); 20472: }; 20472: 20472: template::value> 20472: struct __is_copy_constructible_impl; 20472: 20472: template 20472: struct __is_copy_constructible_impl<_Tp, false> 20472: : public false_type { }; 20472: 20472: template 20472: struct __is_copy_constructible_impl<_Tp, true> 20472: : public __is_constructible_impl<_Tp, const _Tp&> 20472: { }; 20472: 20472: 20472: template 20472: struct is_copy_constructible 20472: : public __is_copy_constructible_impl<_Tp> 20472: { 20472: static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), 20472: "template argument must be a complete class or an unbounded array"); 20472: }; 20472: 20472: template::value> 20472: struct __is_move_constructible_impl; 20472: 20472: template 20472: struct __is_move_constructible_impl<_Tp, false> 20472: : public false_type { }; 20472: 20472: template 20472: struct __is_move_constructible_impl<_Tp, true> 20472: : public __is_constructible_impl<_Tp, _Tp&&> 20472: { }; 20472: 20472: 20472: template 20472: struct is_move_constructible 20472: : public __is_move_constructible_impl<_Tp> 20472: { 20472: static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), 20472: "template argument must be a complete class or an unbounded array"); 20472: }; 20472: 20472: template 20472: struct __is_nt_constructible_impl 20472: : public false_type 20472: { }; 20472: 20472: template 20472: struct __is_nt_constructible_impl 20472: : public __bool_constant()...))> 20472: { }; 20472: 20472: template 20472: struct __is_nt_constructible_impl 20472: : public __bool_constant(std::declval<_Arg>()))> 20472: { }; 20472: 20472: template 20472: struct __is_nt_constructible_impl 20472: : public __bool_constant 20472: { }; 20472: 20472: template 20472: struct __is_nt_constructible_impl 20472: : public __bool_constant::type())> 20472: { }; 20472: # 1001 "/usr/include/c++/10/type_traits" 3 20472: template 20472: using __is_nothrow_constructible_impl 20472: = __is_nt_constructible_impl<__is_constructible(_Tp, _Args...), 20472: _Tp, _Args...>; 20472: 20472: 20472: template 20472: struct is_nothrow_constructible 20472: : public __is_nothrow_constructible_impl<_Tp, _Args...>::type 20472: { 20472: static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), 20472: "template argument must be a complete class or an unbounded array"); 20472: }; 20472: 20472: 20472: template 20472: struct is_nothrow_default_constructible 20472: : public __is_nothrow_constructible_impl<_Tp>::type 20472: { 20472: static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), 20472: "template argument must be a complete class or an unbounded array"); 20472: }; 20472: 20472: 20472: template::value> 20472: struct __is_nothrow_copy_constructible_impl; 20472: 20472: template 20472: struct __is_nothrow_copy_constructible_impl<_Tp, false> 20472: : public false_type { }; 20472: 20472: template 20472: struct __is_nothrow_copy_constructible_impl<_Tp, true> 20472: : public __is_nothrow_constructible_impl<_Tp, const _Tp&> 20472: { }; 20472: 20472: 20472: template 20472: struct is_nothrow_copy_constructible 20472: : public __is_nothrow_copy_constructible_impl<_Tp>::type 20472: { 20472: static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), 20472: "template argument must be a complete class or an unbounded array"); 20472: }; 20472: 20472: template::value> 20472: struct __is_nothrow_move_constructible_impl; 20472: 20472: template 20472: struct __is_nothrow_move_constructible_impl<_Tp, false> 20472: : public false_type { }; 20472: 20472: template 20472: struct __is_nothrow_move_constructible_impl<_Tp, true> 20472: : public __is_nothrow_constructible_impl<_Tp, _Tp&&> 20472: { }; 20472: 20472: 20472: template 20472: struct is_nothrow_move_constructible 20472: : public __is_nothrow_move_constructible_impl<_Tp>::type 20472: { 20472: static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), 20472: "template argument must be a complete class or an unbounded array"); 20472: }; 20472: 20472: 20472: template 20472: struct is_assignable 20472: : public __bool_constant<__is_assignable(_Tp, _Up)> 20472: { 20472: static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), 20472: "template argument must be a complete class or an unbounded array"); 20472: }; 20472: 20472: template::value> 20472: struct __is_copy_assignable_impl; 20472: 20472: template 20472: struct __is_copy_assignable_impl<_Tp, false> 20472: : public false_type { }; 20472: 20472: template 20472: struct __is_copy_assignable_impl<_Tp, true> 20472: : public __bool_constant<__is_assignable(_Tp&, const _Tp&)> 20472: { }; 20472: 20472: 20472: template 20472: struct is_copy_assignable 20472: : public __is_copy_assignable_impl<_Tp>::type 20472: { 20472: static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), 20472: "template argument must be a complete class or an unbounded array"); 20472: }; 20472: 20472: template::value> 20472: struct __is_move_assignable_impl; 20472: 20472: template 20472: struct __is_move_assignable_impl<_Tp, false> 20472: : public false_type { }; 20472: 20472: template 20472: struct __is_move_assignable_impl<_Tp, true> 20472: : public __bool_constant<__is_assignable(_Tp&, _Tp&&)> 20472: { }; 20472: 20472: 20472: template 20472: struct is_move_assignable 20472: : public __is_move_assignable_impl<_Tp>::type 20472: { 20472: static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), 20472: "template argument must be a complete class or an unbounded array"); 20472: }; 20472: 20472: template 20472: struct __is_nt_assignable_impl 20472: : public integral_constant() = declval<_Up>())> 20472: { }; 20472: 20472: template 20472: struct __is_nothrow_assignable_impl 20472: : public __and_<__bool_constant<__is_assignable(_Tp, _Up)>, 20472: __is_nt_assignable_impl<_Tp, _Up>> 20472: { }; 20472: 20472: 20472: template 20472: struct is_nothrow_assignable 20472: : public __is_nothrow_assignable_impl<_Tp, _Up> 20472: { 20472: static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), 20472: "template argument must be a complete class or an unbounded array"); 20472: }; 20472: 20472: template::value> 20472: struct __is_nt_copy_assignable_impl; 20472: 20472: template 20472: struct __is_nt_copy_assignable_impl<_Tp, false> 20472: : public false_type { }; 20472: 20472: template 20472: struct __is_nt_copy_assignable_impl<_Tp, true> 20472: : public __is_nothrow_assignable_impl<_Tp&, const _Tp&> 20472: { }; 20472: 20472: 20472: template 20472: struct is_nothrow_copy_assignable 20472: : public __is_nt_copy_assignable_impl<_Tp> 20472: { 20472: static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), 20472: "template argument must be a complete class or an unbounded array"); 20472: }; 20472: 20472: template::value> 20472: struct __is_nt_move_assignable_impl; 20472: 20472: template 20472: struct __is_nt_move_assignable_impl<_Tp, false> 20472: : public false_type { }; 20472: 20472: template 20472: struct __is_nt_move_assignable_impl<_Tp, true> 20472: : public __is_nothrow_assignable_impl<_Tp&, _Tp&&> 20472: { }; 20472: 20472: 20472: template 20472: struct is_nothrow_move_assignable 20472: : public __is_nt_move_assignable_impl<_Tp> 20472: { 20472: static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), 20472: "template argument must be a complete class or an unbounded array"); 20472: }; 20472: 20472: 20472: template 20472: struct is_trivially_constructible 20472: : public __bool_constant<__is_trivially_constructible(_Tp, _Args...)> 20472: { 20472: static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), 20472: "template argument must be a complete class or an unbounded array"); 20472: }; 20472: 20472: 20472: template 20472: struct is_trivially_default_constructible 20472: : public __bool_constant<__is_trivially_constructible(_Tp)> 20472: { 20472: static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), 20472: "template argument must be a complete class or an unbounded array"); 20472: }; 20472: 20472: struct __do_is_implicitly_default_constructible_impl 20472: { 20472: template 20472: static void __helper(const _Tp&); 20472: 20472: template 20472: static true_type __test(const _Tp&, 20472: decltype(__helper({}))* = 0); 20472: 20472: static false_type __test(...); 20472: }; 20472: 20472: template 20472: struct __is_implicitly_default_constructible_impl 20472: : public __do_is_implicitly_default_constructible_impl 20472: { 20472: typedef decltype(__test(declval<_Tp>())) type; 20472: }; 20472: 20472: template 20472: struct __is_implicitly_default_constructible_safe 20472: : public __is_implicitly_default_constructible_impl<_Tp>::type 20472: { }; 20472: 20472: template 20472: struct __is_implicitly_default_constructible 20472: : public __and_<__is_constructible_impl<_Tp>, 20472: __is_implicitly_default_constructible_safe<_Tp>> 20472: { }; 20472: 20472: template::value> 20472: struct __is_trivially_copy_constructible_impl; 20472: 20472: template 20472: struct __is_trivially_copy_constructible_impl<_Tp, false> 20472: : public false_type { }; 20472: 20472: template 20472: struct __is_trivially_copy_constructible_impl<_Tp, true> 20472: : public __and_<__is_copy_constructible_impl<_Tp>, 20472: integral_constant> 20472: { }; 20472: 20472: 20472: template 20472: struct is_trivially_copy_constructible 20472: : public __is_trivially_copy_constructible_impl<_Tp> 20472: { 20472: static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), 20472: "template argument must be a complete class or an unbounded array"); 20472: }; 20472: 20472: template::value> 20472: struct __is_trivially_move_constructible_impl; 20472: 20472: template 20472: struct __is_trivially_move_constructible_impl<_Tp, false> 20472: : public false_type { }; 20472: 20472: template 20472: struct __is_trivially_move_constructible_impl<_Tp, true> 20472: : public __and_<__is_move_constructible_impl<_Tp>, 20472: integral_constant> 20472: { }; 20472: 20472: 20472: template 20472: struct is_trivially_move_constructible 20472: : public __is_trivially_move_constructible_impl<_Tp> 20472: { 20472: static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), 20472: "template argument must be a complete class or an unbounded array"); 20472: }; 20472: 20472: 20472: template 20472: struct is_trivially_assignable 20472: : public __bool_constant<__is_trivially_assignable(_Tp, _Up)> 20472: { 20472: static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), 20472: "template argument must be a complete class or an unbounded array"); 20472: }; 20472: 20472: template::value> 20472: struct __is_trivially_copy_assignable_impl; 20472: 20472: template 20472: struct __is_trivially_copy_assignable_impl<_Tp, false> 20472: : public false_type { }; 20472: 20472: template 20472: struct __is_trivially_copy_assignable_impl<_Tp, true> 20472: : public __bool_constant<__is_trivially_assignable(_Tp&, const _Tp&)> 20472: { }; 20472: 20472: 20472: template 20472: struct is_trivially_copy_assignable 20472: : public __is_trivially_copy_assignable_impl<_Tp> 20472: { 20472: static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), 20472: "template argument must be a complete class or an unbounded array"); 20472: }; 20472: 20472: template::value> 20472: struct __is_trivially_move_assignable_impl; 20472: 20472: template 20472: struct __is_trivially_move_assignable_impl<_Tp, false> 20472: : public false_type { }; 20472: 20472: template 20472: struct __is_trivially_move_assignable_impl<_Tp, true> 20472: : public __bool_constant<__is_trivially_assignable(_Tp&, _Tp&&)> 20472: { }; 20472: 20472: 20472: template 20472: struct is_trivially_move_assignable 20472: : public __is_trivially_move_assignable_impl<_Tp> 20472: { 20472: static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), 20472: "template argument must be a complete class or an unbounded array"); 20472: }; 20472: 20472: 20472: template 20472: struct is_trivially_destructible 20472: : public __and_<__is_destructible_safe<_Tp>, 20472: __bool_constant<__has_trivial_destructor(_Tp)>> 20472: { 20472: static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), 20472: "template argument must be a complete class or an unbounded array"); 20472: }; 20472: 20472: 20472: 20472: template 20472: struct has_virtual_destructor 20472: : public integral_constant 20472: { 20472: static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), 20472: "template argument must be a complete class or an unbounded array"); 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct alignment_of 20472: : public integral_constant 20472: { 20472: static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), 20472: "template argument must be a complete class or an unbounded array"); 20472: }; 20472: 20472: 20472: template 20472: struct rank 20472: : public integral_constant { }; 20472: 20472: template 20472: struct rank<_Tp[_Size]> 20472: : public integral_constant::value> { }; 20472: 20472: template 20472: struct rank<_Tp[]> 20472: : public integral_constant::value> { }; 20472: 20472: 20472: template 20472: struct extent 20472: : public integral_constant { }; 20472: 20472: template 20472: struct extent<_Tp[_Size], _Uint> 20472: : public integral_constant::value> 20472: { }; 20472: 20472: template 20472: struct extent<_Tp[], _Uint> 20472: : public integral_constant::value> 20472: { }; 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct is_same 20472: 20472: : public integral_constant 20472: 20472: 20472: 20472: { }; 20472: # 1410 "/usr/include/c++/10/type_traits" 3 20472: template 20472: struct is_base_of 20472: : public integral_constant 20472: { }; 20472: 20472: template, is_function<_To>, 20472: is_array<_To>>::value> 20472: struct __is_convertible_helper 20472: { 20472: typedef typename is_void<_To>::type type; 20472: }; 20472: 20472: #pragma GCC diagnostic push 20472: #pragma GCC diagnostic ignored "-Wctor-dtor-privacy" 20472: template 20472: class __is_convertible_helper<_From, _To, false> 20472: { 20472: template 20472: static void __test_aux(_To1) noexcept; 20472: 20472: template(std::declval<_From1>()))> 20472: static true_type 20472: __test(int); 20472: 20472: template 20472: static false_type 20472: __test(...); 20472: 20472: public: 20472: typedef decltype(__test<_From, _To>(0)) type; 20472: }; 20472: #pragma GCC diagnostic pop 20472: 20472: 20472: template 20472: struct is_convertible 20472: : public __is_convertible_helper<_From, _To>::type 20472: { }; 20472: 20472: 20472: template 20472: using __is_array_convertible 20472: = is_convertible<_FromElementType(*)[], _ToElementType(*)[]>; 20472: 20472: template, is_function<_To>, 20472: is_array<_To>>::value> 20472: struct __is_nt_convertible_helper 20472: : is_void<_To> 20472: { }; 20472: 20472: #pragma GCC diagnostic push 20472: #pragma GCC diagnostic ignored "-Wctor-dtor-privacy" 20472: template 20472: class __is_nt_convertible_helper<_From, _To, false> 20472: { 20472: template 20472: static void __test_aux(_To1) noexcept; 20472: 20472: template 20472: static 20472: __bool_constant(std::declval<_From1>()))> 20472: __test(int); 20472: 20472: template 20472: static false_type 20472: __test(...); 20472: 20472: public: 20472: using type = decltype(__test<_From, _To>(0)); 20472: }; 20472: #pragma GCC diagnostic pop 20472: 20472: 20472: template 20472: struct __is_nothrow_convertible 20472: : public __is_nt_convertible_helper<_From, _To>::type 20472: { }; 20472: # 1508 "/usr/include/c++/10/type_traits" 3 20472: template 20472: struct remove_const 20472: { typedef _Tp type; }; 20472: 20472: template 20472: struct remove_const<_Tp const> 20472: { typedef _Tp type; }; 20472: 20472: 20472: template 20472: struct remove_volatile 20472: { typedef _Tp type; }; 20472: 20472: template 20472: struct remove_volatile<_Tp volatile> 20472: { typedef _Tp type; }; 20472: 20472: 20472: template 20472: struct remove_cv 20472: { using type = _Tp; }; 20472: 20472: template 20472: struct remove_cv 20472: { using type = _Tp; }; 20472: 20472: template 20472: struct remove_cv 20472: { using type = _Tp; }; 20472: 20472: template 20472: struct remove_cv 20472: { using type = _Tp; }; 20472: 20472: 20472: template 20472: struct add_const 20472: { typedef _Tp const type; }; 20472: 20472: 20472: template 20472: struct add_volatile 20472: { typedef _Tp volatile type; }; 20472: 20472: 20472: template 20472: struct add_cv 20472: { 20472: typedef typename 20472: add_const::type>::type type; 20472: }; 20472: # 1592 "/usr/include/c++/10/type_traits" 3 20472: template 20472: struct remove_reference 20472: { typedef _Tp type; }; 20472: 20472: template 20472: struct remove_reference<_Tp&> 20472: { typedef _Tp type; }; 20472: 20472: template 20472: struct remove_reference<_Tp&&> 20472: { typedef _Tp type; }; 20472: 20472: template::value> 20472: struct __add_lvalue_reference_helper 20472: { typedef _Tp type; }; 20472: 20472: template 20472: struct __add_lvalue_reference_helper<_Tp, true> 20472: { typedef _Tp& type; }; 20472: 20472: 20472: template 20472: struct add_lvalue_reference 20472: : public __add_lvalue_reference_helper<_Tp> 20472: { }; 20472: 20472: template::value> 20472: struct __add_rvalue_reference_helper 20472: { typedef _Tp type; }; 20472: 20472: template 20472: struct __add_rvalue_reference_helper<_Tp, true> 20472: { typedef _Tp&& type; }; 20472: 20472: 20472: template 20472: struct add_rvalue_reference 20472: : public __add_rvalue_reference_helper<_Tp> 20472: { }; 20472: # 1649 "/usr/include/c++/10/type_traits" 3 20472: template 20472: struct __cv_selector; 20472: 20472: template 20472: struct __cv_selector<_Unqualified, false, false> 20472: { typedef _Unqualified __type; }; 20472: 20472: template 20472: struct __cv_selector<_Unqualified, false, true> 20472: { typedef volatile _Unqualified __type; }; 20472: 20472: template 20472: struct __cv_selector<_Unqualified, true, false> 20472: { typedef const _Unqualified __type; }; 20472: 20472: template 20472: struct __cv_selector<_Unqualified, true, true> 20472: { typedef const volatile _Unqualified __type; }; 20472: 20472: template::value, 20472: bool _IsVol = is_volatile<_Qualified>::value> 20472: class __match_cv_qualifiers 20472: { 20472: typedef __cv_selector<_Unqualified, _IsConst, _IsVol> __match; 20472: 20472: public: 20472: typedef typename __match::__type __type; 20472: }; 20472: 20472: 20472: template 20472: struct __make_unsigned 20472: { typedef _Tp __type; }; 20472: 20472: template<> 20472: struct __make_unsigned 20472: { typedef unsigned char __type; }; 20472: 20472: template<> 20472: struct __make_unsigned 20472: { typedef unsigned char __type; }; 20472: 20472: template<> 20472: struct __make_unsigned 20472: { typedef unsigned short __type; }; 20472: 20472: template<> 20472: struct __make_unsigned 20472: { typedef unsigned int __type; }; 20472: 20472: template<> 20472: struct __make_unsigned 20472: { typedef unsigned long __type; }; 20472: 20472: template<> 20472: struct __make_unsigned 20472: { typedef unsigned long long __type; }; 20472: # 1730 "/usr/include/c++/10/type_traits" 3 20472: template::value, 20472: bool _IsEnum = is_enum<_Tp>::value> 20472: class __make_unsigned_selector; 20472: 20472: template 20472: class __make_unsigned_selector<_Tp, true, false> 20472: { 20472: using __unsigned_type 20472: = typename __make_unsigned<__remove_cv_t<_Tp>>::__type; 20472: 20472: public: 20472: using __type 20472: = typename __match_cv_qualifiers<_Tp, __unsigned_type>::__type; 20472: }; 20472: 20472: class __make_unsigned_selector_base 20472: { 20472: protected: 20472: template struct _List { }; 20472: 20472: template 20472: struct _List<_Tp, _Up...> : _List<_Up...> 20472: { static constexpr size_t __size = sizeof(_Tp); }; 20472: 20472: template 20472: struct __select; 20472: 20472: template 20472: struct __select<_Sz, _List<_Uint, _UInts...>, true> 20472: { using __type = _Uint; }; 20472: 20472: template 20472: struct __select<_Sz, _List<_Uint, _UInts...>, false> 20472: : __select<_Sz, _List<_UInts...>> 20472: { }; 20472: }; 20472: 20472: 20472: template 20472: class __make_unsigned_selector<_Tp, false, true> 20472: : __make_unsigned_selector_base 20472: { 20472: 20472: using _UInts = _List; 20472: 20472: using __unsigned_type = typename __select::__type; 20472: 20472: public: 20472: using __type 20472: = typename __match_cv_qualifiers<_Tp, __unsigned_type>::__type; 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: template<> 20472: struct __make_unsigned 20472: { 20472: using __type 20472: = typename __make_unsigned_selector::__type; 20472: }; 20472: # 1806 "/usr/include/c++/10/type_traits" 3 20472: template<> 20472: struct __make_unsigned 20472: { 20472: using __type 20472: = typename __make_unsigned_selector::__type; 20472: }; 20472: 20472: template<> 20472: struct __make_unsigned 20472: { 20472: using __type 20472: = typename __make_unsigned_selector::__type; 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct make_unsigned 20472: { typedef typename __make_unsigned_selector<_Tp>::__type type; }; 20472: 20472: 20472: template<> 20472: struct make_unsigned; 20472: 20472: 20472: 20472: template 20472: struct __make_signed 20472: { typedef _Tp __type; }; 20472: 20472: template<> 20472: struct __make_signed 20472: { typedef signed char __type; }; 20472: 20472: template<> 20472: struct __make_signed 20472: { typedef signed char __type; }; 20472: 20472: template<> 20472: struct __make_signed 20472: { typedef signed short __type; }; 20472: 20472: template<> 20472: struct __make_signed 20472: { typedef signed int __type; }; 20472: 20472: template<> 20472: struct __make_signed 20472: { typedef signed long __type; }; 20472: 20472: template<> 20472: struct __make_signed 20472: { typedef signed long long __type; }; 20472: # 1884 "/usr/include/c++/10/type_traits" 3 20472: template::value, 20472: bool _IsEnum = is_enum<_Tp>::value> 20472: class __make_signed_selector; 20472: 20472: template 20472: class __make_signed_selector<_Tp, true, false> 20472: { 20472: using __signed_type 20472: = typename __make_signed<__remove_cv_t<_Tp>>::__type; 20472: 20472: public: 20472: using __type 20472: = typename __match_cv_qualifiers<_Tp, __signed_type>::__type; 20472: }; 20472: 20472: 20472: template 20472: class __make_signed_selector<_Tp, false, true> 20472: { 20472: typedef typename __make_unsigned_selector<_Tp>::__type __unsigned_type; 20472: 20472: public: 20472: typedef typename __make_signed_selector<__unsigned_type>::__type __type; 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: template<> 20472: struct __make_signed 20472: { 20472: using __type 20472: = typename __make_signed_selector::__type; 20472: }; 20472: # 1932 "/usr/include/c++/10/type_traits" 3 20472: template<> 20472: struct __make_signed 20472: { 20472: using __type 20472: = typename __make_signed_selector::__type; 20472: }; 20472: 20472: template<> 20472: struct __make_signed 20472: { 20472: using __type 20472: = typename __make_signed_selector::__type; 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct make_signed 20472: { typedef typename __make_signed_selector<_Tp>::__type type; }; 20472: 20472: 20472: template<> 20472: struct make_signed; 20472: # 1971 "/usr/include/c++/10/type_traits" 3 20472: template 20472: struct remove_extent 20472: { typedef _Tp type; }; 20472: 20472: template 20472: struct remove_extent<_Tp[_Size]> 20472: { typedef _Tp type; }; 20472: 20472: template 20472: struct remove_extent<_Tp[]> 20472: { typedef _Tp type; }; 20472: 20472: 20472: template 20472: struct remove_all_extents 20472: { typedef _Tp type; }; 20472: 20472: template 20472: struct remove_all_extents<_Tp[_Size]> 20472: { typedef typename remove_all_extents<_Tp>::type type; }; 20472: 20472: template 20472: struct remove_all_extents<_Tp[]> 20472: { typedef typename remove_all_extents<_Tp>::type type; }; 20472: # 2008 "/usr/include/c++/10/type_traits" 3 20472: template 20472: struct __remove_pointer_helper 20472: { typedef _Tp type; }; 20472: 20472: template 20472: struct __remove_pointer_helper<_Tp, _Up*> 20472: { typedef _Up type; }; 20472: 20472: 20472: template 20472: struct remove_pointer 20472: : public __remove_pointer_helper<_Tp, __remove_cv_t<_Tp>> 20472: { }; 20472: 20472: 20472: template, 20472: is_void<_Tp>>::value> 20472: struct __add_pointer_helper 20472: { typedef _Tp type; }; 20472: 20472: template 20472: struct __add_pointer_helper<_Tp, true> 20472: { typedef typename remove_reference<_Tp>::type* type; }; 20472: 20472: template 20472: struct add_pointer 20472: : public __add_pointer_helper<_Tp> 20472: { }; 20472: # 2047 "/usr/include/c++/10/type_traits" 3 20472: template 20472: struct __aligned_storage_msa 20472: { 20472: union __type 20472: { 20472: unsigned char __data[_Len]; 20472: struct __attribute__((__aligned__)) { } __align; 20472: }; 20472: }; 20472: # 2067 "/usr/include/c++/10/type_traits" 3 20472: template::__type)> 20472: struct aligned_storage 20472: { 20472: union type 20472: { 20472: unsigned char __data[_Len]; 20472: struct __attribute__((__aligned__((_Align)))) { } __align; 20472: }; 20472: }; 20472: 20472: template 20472: struct __strictest_alignment 20472: { 20472: static const size_t _S_alignment = 0; 20472: static const size_t _S_size = 0; 20472: }; 20472: 20472: template 20472: struct __strictest_alignment<_Tp, _Types...> 20472: { 20472: static const size_t _S_alignment = 20472: alignof(_Tp) > __strictest_alignment<_Types...>::_S_alignment 20472: ? alignof(_Tp) : __strictest_alignment<_Types...>::_S_alignment; 20472: static const size_t _S_size = 20472: sizeof(_Tp) > __strictest_alignment<_Types...>::_S_size 20472: ? sizeof(_Tp) : __strictest_alignment<_Types...>::_S_size; 20472: }; 20472: # 2106 "/usr/include/c++/10/type_traits" 3 20472: template 20472: struct aligned_union 20472: { 20472: private: 20472: static_assert(sizeof...(_Types) != 0, "At least one type is required"); 20472: 20472: using __strictest = __strictest_alignment<_Types...>; 20472: static const size_t _S_len = _Len > __strictest::_S_size 20472: ? _Len : __strictest::_S_size; 20472: public: 20472: 20472: static const size_t alignment_value = __strictest::_S_alignment; 20472: 20472: typedef typename aligned_storage<_S_len, alignment_value>::type type; 20472: }; 20472: 20472: template 20472: const size_t aligned_union<_Len, _Types...>::alignment_value; 20472: 20472: 20472: 20472: template::value, 20472: bool _IsFunction = is_function<_Up>::value> 20472: struct __decay_selector; 20472: 20472: 20472: template 20472: struct __decay_selector<_Up, false, false> 20472: { typedef __remove_cv_t<_Up> __type; }; 20472: 20472: template 20472: struct __decay_selector<_Up, true, false> 20472: { typedef typename remove_extent<_Up>::type* __type; }; 20472: 20472: template 20472: struct __decay_selector<_Up, false, true> 20472: { typedef typename add_pointer<_Up>::type __type; }; 20472: 20472: 20472: template 20472: class decay 20472: { 20472: typedef typename remove_reference<_Tp>::type __remove_type; 20472: 20472: public: 20472: typedef typename __decay_selector<__remove_type>::__type type; 20472: }; 20472: 20472: 20472: template 20472: using __decay_t = typename decay<_Tp>::type; 20472: 20472: template 20472: class reference_wrapper; 20472: 20472: 20472: template 20472: struct __strip_reference_wrapper 20472: { 20472: typedef _Tp __type; 20472: }; 20472: 20472: template 20472: struct __strip_reference_wrapper > 20472: { 20472: typedef _Tp& __type; 20472: }; 20472: 20472: template 20472: using __decay_and_strip = __strip_reference_wrapper<__decay_t<_Tp>>; 20472: 20472: 20472: 20472: 20472: template 20472: struct enable_if 20472: { }; 20472: 20472: 20472: template 20472: struct enable_if 20472: { typedef _Tp type; }; 20472: 20472: 20472: template 20472: using __enable_if_t = typename enable_if<_Cond, _Tp>::type; 20472: 20472: template 20472: using _Require = __enable_if_t<__and_<_Cond...>::value>; 20472: 20472: 20472: 20472: template 20472: struct conditional 20472: { typedef _Iftrue type; }; 20472: 20472: 20472: template 20472: struct conditional 20472: { typedef _Iffalse type; }; 20472: 20472: 20472: template 20472: using __remove_cvref_t 20472: = typename remove_cv::type>::type; 20472: 20472: 20472: template 20472: struct common_type; 20472: 20472: 20472: 20472: struct __do_common_type_impl 20472: { 20472: template 20472: using __cond_t 20472: = decltype(true ? std::declval<_Tp>() : std::declval<_Up>()); 20472: 20472: 20472: 20472: template 20472: static __success_type<__decay_t<__cond_t<_Tp, _Up>>> 20472: _S_test(int); 20472: # 2239 "/usr/include/c++/10/type_traits" 3 20472: template 20472: static __failure_type 20472: _S_test_2(...); 20472: 20472: template 20472: static decltype(_S_test_2<_Tp, _Up>(0)) 20472: _S_test(...); 20472: }; 20472: 20472: 20472: template<> 20472: struct common_type<> 20472: { }; 20472: 20472: 20472: template 20472: struct common_type<_Tp0> 20472: : public common_type<_Tp0, _Tp0> 20472: { }; 20472: 20472: 20472: template, typename _Dp2 = __decay_t<_Tp2>> 20472: struct __common_type_impl 20472: { 20472: 20472: 20472: using type = common_type<_Dp1, _Dp2>; 20472: }; 20472: 20472: template 20472: struct __common_type_impl<_Tp1, _Tp2, _Tp1, _Tp2> 20472: : private __do_common_type_impl 20472: { 20472: 20472: 20472: using type = decltype(_S_test<_Tp1, _Tp2>(0)); 20472: }; 20472: 20472: 20472: template 20472: struct common_type<_Tp1, _Tp2> 20472: : public __common_type_impl<_Tp1, _Tp2>::type 20472: { }; 20472: 20472: template 20472: struct __common_type_pack 20472: { }; 20472: 20472: template 20472: struct __common_type_fold; 20472: 20472: 20472: template 20472: struct common_type<_Tp1, _Tp2, _Rp...> 20472: : public __common_type_fold, 20472: __common_type_pack<_Rp...>> 20472: { }; 20472: 20472: 20472: 20472: 20472: template 20472: struct __common_type_fold<_CTp, __common_type_pack<_Rp...>, 20472: __void_t> 20472: : public common_type 20472: { }; 20472: 20472: 20472: template 20472: struct __common_type_fold<_CTp, _Rp, void> 20472: { }; 20472: 20472: template::value> 20472: struct __underlying_type_impl 20472: { 20472: using type = __underlying_type(_Tp); 20472: }; 20472: 20472: template 20472: struct __underlying_type_impl<_Tp, false> 20472: { }; 20472: 20472: 20472: template 20472: struct underlying_type 20472: : public __underlying_type_impl<_Tp> 20472: { }; 20472: 20472: template 20472: struct __declval_protector 20472: { 20472: static const bool __stop = false; 20472: }; 20472: 20472: template 20472: auto declval() noexcept -> decltype(__declval<_Tp>(0)) 20472: { 20472: static_assert(__declval_protector<_Tp>::__stop, 20472: "declval() must not be used!"); 20472: return __declval<_Tp>(0); 20472: } 20472: 20472: 20472: template 20472: class result_of; 20472: 20472: 20472: 20472: 20472: 20472: struct __invoke_memfun_ref { }; 20472: struct __invoke_memfun_deref { }; 20472: struct __invoke_memobj_ref { }; 20472: struct __invoke_memobj_deref { }; 20472: struct __invoke_other { }; 20472: 20472: 20472: template 20472: struct __result_of_success : __success_type<_Tp> 20472: { using __invoke_type = _Tag; }; 20472: 20472: 20472: struct __result_of_memfun_ref_impl 20472: { 20472: template 20472: static __result_of_success().*std::declval<_Fp>())(std::declval<_Args>()...) 20472: ), __invoke_memfun_ref> _S_test(int); 20472: 20472: template 20472: static __failure_type _S_test(...); 20472: }; 20472: 20472: template 20472: struct __result_of_memfun_ref 20472: : private __result_of_memfun_ref_impl 20472: { 20472: typedef decltype(_S_test<_MemPtr, _Arg, _Args...>(0)) type; 20472: }; 20472: 20472: 20472: struct __result_of_memfun_deref_impl 20472: { 20472: template 20472: static __result_of_success()).*std::declval<_Fp>())(std::declval<_Args>()...) 20472: ), __invoke_memfun_deref> _S_test(int); 20472: 20472: template 20472: static __failure_type _S_test(...); 20472: }; 20472: 20472: template 20472: struct __result_of_memfun_deref 20472: : private __result_of_memfun_deref_impl 20472: { 20472: typedef decltype(_S_test<_MemPtr, _Arg, _Args...>(0)) type; 20472: }; 20472: 20472: 20472: struct __result_of_memobj_ref_impl 20472: { 20472: template 20472: static __result_of_success().*std::declval<_Fp>() 20472: ), __invoke_memobj_ref> _S_test(int); 20472: 20472: template 20472: static __failure_type _S_test(...); 20472: }; 20472: 20472: template 20472: struct __result_of_memobj_ref 20472: : private __result_of_memobj_ref_impl 20472: { 20472: typedef decltype(_S_test<_MemPtr, _Arg>(0)) type; 20472: }; 20472: 20472: 20472: struct __result_of_memobj_deref_impl 20472: { 20472: template 20472: static __result_of_success()).*std::declval<_Fp>() 20472: ), __invoke_memobj_deref> _S_test(int); 20472: 20472: template 20472: static __failure_type _S_test(...); 20472: }; 20472: 20472: template 20472: struct __result_of_memobj_deref 20472: : private __result_of_memobj_deref_impl 20472: { 20472: typedef decltype(_S_test<_MemPtr, _Arg>(0)) type; 20472: }; 20472: 20472: template 20472: struct __result_of_memobj; 20472: 20472: template 20472: struct __result_of_memobj<_Res _Class::*, _Arg> 20472: { 20472: typedef __remove_cvref_t<_Arg> _Argval; 20472: typedef _Res _Class::* _MemPtr; 20472: typedef typename conditional<__or_, 20472: is_base_of<_Class, _Argval>>::value, 20472: __result_of_memobj_ref<_MemPtr, _Arg>, 20472: __result_of_memobj_deref<_MemPtr, _Arg> 20472: >::type::type type; 20472: }; 20472: 20472: template 20472: struct __result_of_memfun; 20472: 20472: template 20472: struct __result_of_memfun<_Res _Class::*, _Arg, _Args...> 20472: { 20472: typedef typename remove_reference<_Arg>::type _Argval; 20472: typedef _Res _Class::* _MemPtr; 20472: typedef typename conditional::value, 20472: __result_of_memfun_ref<_MemPtr, _Arg, _Args...>, 20472: __result_of_memfun_deref<_MemPtr, _Arg, _Args...> 20472: >::type::type type; 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: template> 20472: struct __inv_unwrap 20472: { 20472: using type = _Tp; 20472: }; 20472: 20472: template 20472: struct __inv_unwrap<_Tp, reference_wrapper<_Up>> 20472: { 20472: using type = _Up&; 20472: }; 20472: 20472: template 20472: struct __result_of_impl 20472: { 20472: typedef __failure_type type; 20472: }; 20472: 20472: template 20472: struct __result_of_impl 20472: : public __result_of_memobj<__decay_t<_MemPtr>, 20472: typename __inv_unwrap<_Arg>::type> 20472: { }; 20472: 20472: template 20472: struct __result_of_impl 20472: : public __result_of_memfun<__decay_t<_MemPtr>, 20472: typename __inv_unwrap<_Arg>::type, _Args...> 20472: { }; 20472: 20472: 20472: struct __result_of_other_impl 20472: { 20472: template 20472: static __result_of_success()(std::declval<_Args>()...) 20472: ), __invoke_other> _S_test(int); 20472: 20472: template 20472: static __failure_type _S_test(...); 20472: }; 20472: 20472: template 20472: struct __result_of_impl 20472: : private __result_of_other_impl 20472: { 20472: typedef decltype(_S_test<_Functor, _ArgTypes...>(0)) type; 20472: }; 20472: 20472: 20472: template 20472: struct __invoke_result 20472: : public __result_of_impl< 20472: is_member_object_pointer< 20472: typename remove_reference<_Functor>::type 20472: >::value, 20472: is_member_function_pointer< 20472: typename remove_reference<_Functor>::type 20472: >::value, 20472: _Functor, _ArgTypes... 20472: >::type 20472: { }; 20472: 20472: template 20472: struct result_of<_Functor(_ArgTypes...)> 20472: : public __invoke_result<_Functor, _ArgTypes...> 20472: { }; 20472: # 2580 "/usr/include/c++/10/type_traits" 3 20472: template class _Op, typename... _Args> 20472: struct __detector 20472: { 20472: using value_t = false_type; 20472: using type = _Default; 20472: }; 20472: 20472: 20472: template class _Op, 20472: typename... _Args> 20472: struct __detector<_Default, __void_t<_Op<_Args...>>, _Op, _Args...> 20472: { 20472: using value_t = true_type; 20472: using type = _Op<_Args...>; 20472: }; 20472: 20472: 20472: template class _Op, 20472: typename... _Args> 20472: using __detected_or = __detector<_Default, void, _Op, _Args...>; 20472: 20472: 20472: template class _Op, 20472: typename... _Args> 20472: using __detected_or_t 20472: = typename __detected_or<_Default, _Op, _Args...>::type; 20472: # 2624 "/usr/include/c++/10/type_traits" 3 20472: template 20472: struct __is_swappable; 20472: 20472: template 20472: struct __is_nothrow_swappable; 20472: 20472: template 20472: class tuple; 20472: 20472: template 20472: struct __is_tuple_like_impl : false_type 20472: { }; 20472: 20472: template 20472: struct __is_tuple_like_impl> : true_type 20472: { }; 20472: 20472: 20472: template 20472: struct __is_tuple_like 20472: : public __is_tuple_like_impl<__remove_cvref_t<_Tp>>::type 20472: { }; 20472: 20472: template 20472: 20472: inline 20472: _Require<__not_<__is_tuple_like<_Tp>>, 20472: is_move_constructible<_Tp>, 20472: is_move_assignable<_Tp>> 20472: swap(_Tp&, _Tp&) 20472: noexcept(__and_, 20472: is_nothrow_move_assignable<_Tp>>::value); 20472: 20472: template 20472: 20472: inline 20472: __enable_if_t<__is_swappable<_Tp>::value> 20472: swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) 20472: noexcept(__is_nothrow_swappable<_Tp>::value); 20472: 20472: namespace __swappable_details { 20472: using std::swap; 20472: 20472: struct __do_is_swappable_impl 20472: { 20472: template(), std::declval<_Tp&>()))> 20472: static true_type __test(int); 20472: 20472: template 20472: static false_type __test(...); 20472: }; 20472: 20472: struct __do_is_nothrow_swappable_impl 20472: { 20472: template 20472: static __bool_constant< 20472: noexcept(swap(std::declval<_Tp&>(), std::declval<_Tp&>())) 20472: > __test(int); 20472: 20472: template 20472: static false_type __test(...); 20472: }; 20472: 20472: } 20472: 20472: template 20472: struct __is_swappable_impl 20472: : public __swappable_details::__do_is_swappable_impl 20472: { 20472: typedef decltype(__test<_Tp>(0)) type; 20472: }; 20472: 20472: template 20472: struct __is_nothrow_swappable_impl 20472: : public __swappable_details::__do_is_nothrow_swappable_impl 20472: { 20472: typedef decltype(__test<_Tp>(0)) type; 20472: }; 20472: 20472: template 20472: struct __is_swappable 20472: : public __is_swappable_impl<_Tp>::type 20472: { }; 20472: 20472: template 20472: struct __is_nothrow_swappable 20472: : public __is_nothrow_swappable_impl<_Tp>::type 20472: { }; 20472: # 2837 "/usr/include/c++/10/type_traits" 3 20472: template::value, typename = void> 20472: struct __is_invocable_impl : false_type { }; 20472: 20472: 20472: template 20472: struct __is_invocable_impl<_Result, _Ret, 20472: true, 20472: __void_t> 20472: : true_type 20472: { }; 20472: 20472: #pragma GCC diagnostic push 20472: #pragma GCC diagnostic ignored "-Wctor-dtor-privacy" 20472: 20472: template 20472: struct __is_invocable_impl<_Result, _Ret, 20472: false, 20472: __void_t> 20472: { 20472: private: 20472: 20472: 20472: static typename _Result::type _S_get(); 20472: 20472: template 20472: static void _S_conv(_Tp); 20472: 20472: 20472: template(_S_get()))> 20472: static true_type 20472: _S_test(int); 20472: 20472: template 20472: static false_type 20472: _S_test(...); 20472: 20472: public: 20472: using type = decltype(_S_test<_Ret>(1)); 20472: }; 20472: #pragma GCC diagnostic pop 20472: 20472: template 20472: struct __is_invocable 20472: : __is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, void>::type 20472: { }; 20472: 20472: template 20472: constexpr bool __call_is_nt(__invoke_memfun_ref) 20472: { 20472: using _Up = typename __inv_unwrap<_Tp>::type; 20472: return noexcept((std::declval<_Up>().*std::declval<_Fn>())( 20472: std::declval<_Args>()...)); 20472: } 20472: 20472: template 20472: constexpr bool __call_is_nt(__invoke_memfun_deref) 20472: { 20472: return noexcept(((*std::declval<_Tp>()).*std::declval<_Fn>())( 20472: std::declval<_Args>()...)); 20472: } 20472: 20472: template 20472: constexpr bool __call_is_nt(__invoke_memobj_ref) 20472: { 20472: using _Up = typename __inv_unwrap<_Tp>::type; 20472: return noexcept(std::declval<_Up>().*std::declval<_Fn>()); 20472: } 20472: 20472: template 20472: constexpr bool __call_is_nt(__invoke_memobj_deref) 20472: { 20472: return noexcept((*std::declval<_Tp>()).*std::declval<_Fn>()); 20472: } 20472: 20472: template 20472: constexpr bool __call_is_nt(__invoke_other) 20472: { 20472: return noexcept(std::declval<_Fn>()(std::declval<_Args>()...)); 20472: } 20472: 20472: template 20472: struct __call_is_nothrow 20472: : __bool_constant< 20472: std::__call_is_nt<_Fn, _Args...>(typename _Result::__invoke_type{}) 20472: > 20472: { }; 20472: 20472: template 20472: using __call_is_nothrow_ 20472: = __call_is_nothrow<__invoke_result<_Fn, _Args...>, _Fn, _Args...>; 20472: 20472: 20472: template 20472: struct __is_nothrow_invocable 20472: : __and_<__is_invocable<_Fn, _Args...>, 20472: __call_is_nothrow_<_Fn, _Args...>>::type 20472: { }; 20472: 20472: #pragma GCC diagnostic push 20472: #pragma GCC diagnostic ignored "-Wctor-dtor-privacy" 20472: struct __nonesuchbase {}; 20472: struct __nonesuch : private __nonesuchbase { 20472: ~__nonesuch() = delete; 20472: __nonesuch(__nonesuch const&) = delete; 20472: void operator=(__nonesuch const&) = delete; 20472: }; 20472: #pragma GCC diagnostic pop 20472: # 3455 "/usr/include/c++/10/type_traits" 3 20472: 20472: } 20472: # 58 "/usr/include/c++/10/bits/move.h" 2 3 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: # 74 "/usr/include/c++/10/bits/move.h" 3 20472: template 20472: constexpr _Tp&& 20472: forward(typename std::remove_reference<_Tp>::type& __t) noexcept 20472: { return static_cast<_Tp&&>(__t); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: constexpr _Tp&& 20472: forward(typename std::remove_reference<_Tp>::type&& __t) noexcept 20472: { 20472: static_assert(!std::is_lvalue_reference<_Tp>::value, "template argument" 20472: " substituting _Tp is an lvalue reference type"); 20472: return static_cast<_Tp&&>(__t); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: constexpr typename std::remove_reference<_Tp>::type&& 20472: move(_Tp&& __t) noexcept 20472: { return static_cast::type&&>(__t); } 20472: 20472: 20472: template 20472: struct __move_if_noexcept_cond 20472: : public __and_<__not_>, 20472: is_copy_constructible<_Tp>>::type { }; 20472: # 118 "/usr/include/c++/10/bits/move.h" 3 20472: template 20472: constexpr typename 20472: conditional<__move_if_noexcept_cond<_Tp>::value, const _Tp&, _Tp&&>::type 20472: move_if_noexcept(_Tp& __x) noexcept 20472: { return std::move(__x); } 20472: # 138 "/usr/include/c++/10/bits/move.h" 3 20472: template 20472: inline _Tp* 20472: addressof(_Tp& __r) noexcept 20472: { return std::__addressof(__r); } 20472: 20472: 20472: 20472: template 20472: const _Tp* addressof(const _Tp&&) = delete; 20472: 20472: 20472: template 20472: 20472: inline _Tp 20472: __exchange(_Tp& __obj, _Up&& __new_val) 20472: { 20472: _Tp __old_val = std::move(__obj); 20472: __obj = std::forward<_Up>(__new_val); 20472: return __old_val; 20472: } 20472: # 179 "/usr/include/c++/10/bits/move.h" 3 20472: template 20472: 20472: inline 20472: 20472: typename enable_if<__and_<__not_<__is_tuple_like<_Tp>>, 20472: is_move_constructible<_Tp>, 20472: is_move_assignable<_Tp>>::value>::type 20472: 20472: 20472: 20472: swap(_Tp& __a, _Tp& __b) 20472: noexcept(__and_, is_nothrow_move_assignable<_Tp>>::value) 20472: 20472: { 20472: 20472: 20472: 20472: 20472: _Tp __tmp = std::move(__a); 20472: __a = std::move(__b); 20472: __b = std::move(__tmp); 20472: } 20472: 20472: 20472: 20472: 20472: template 20472: 20472: inline 20472: 20472: typename enable_if<__is_swappable<_Tp>::value>::type 20472: 20472: 20472: 20472: swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) 20472: noexcept(__is_nothrow_swappable<_Tp>::value) 20472: { 20472: for (size_t __n = 0; __n < _Nm; ++__n) 20472: swap(__a[__n], __b[__n]); 20472: } 20472: 20472: 20472: 20472: } 20472: # 39 "/usr/include/c++/10/bits/atomic_base.h" 2 3 20472: 20472: 20472: 20472: 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: # 74 "/usr/include/c++/10/bits/atomic_base.h" 3 20472: typedef enum memory_order 20472: { 20472: memory_order_relaxed, 20472: memory_order_consume, 20472: memory_order_acquire, 20472: memory_order_release, 20472: memory_order_acq_rel, 20472: memory_order_seq_cst 20472: } memory_order; 20472: 20472: 20472: enum __memory_order_modifier 20472: { 20472: __memory_order_mask = 0x0ffff, 20472: __memory_order_modifier_mask = 0xffff0000, 20472: __memory_order_hle_acquire = 0x10000, 20472: __memory_order_hle_release = 0x20000 20472: }; 20472: 20472: constexpr memory_order 20472: operator|(memory_order __m, __memory_order_modifier __mod) 20472: { 20472: return memory_order(int(__m) | int(__mod)); 20472: } 20472: 20472: constexpr memory_order 20472: operator&(memory_order __m, __memory_order_modifier __mod) 20472: { 20472: return memory_order(int(__m) & int(__mod)); 20472: } 20472: 20472: 20472: constexpr memory_order 20472: __cmpexch_failure_order2(memory_order __m) noexcept 20472: { 20472: return __m == memory_order_acq_rel ? memory_order_acquire 20472: : __m == memory_order_release ? memory_order_relaxed : __m; 20472: } 20472: 20472: constexpr memory_order 20472: __cmpexch_failure_order(memory_order __m) noexcept 20472: { 20472: return memory_order(__cmpexch_failure_order2(__m & __memory_order_mask) 20472: | __memory_order_modifier(__m & __memory_order_modifier_mask)); 20472: } 20472: 20472: inline __attribute__((__always_inline__)) void 20472: atomic_thread_fence(memory_order __m) noexcept 20472: { __atomic_thread_fence(int(__m)); } 20472: 20472: inline __attribute__((__always_inline__)) void 20472: atomic_signal_fence(memory_order __m) noexcept 20472: { __atomic_signal_fence(int(__m)); } 20472: 20472: 20472: template 20472: inline _Tp 20472: kill_dependency(_Tp __y) noexcept 20472: { 20472: _Tp __ret(__y); 20472: return __ret; 20472: } 20472: 20472: 20472: 20472: template 20472: struct __atomic_base; 20472: # 151 "/usr/include/c++/10/bits/atomic_base.h" 3 20472: template 20472: struct atomic; 20472: 20472: template 20472: struct atomic<_Tp*>; 20472: 20472: 20472: 20472: typedef bool __atomic_flag_data_type; 20472: # 174 "/usr/include/c++/10/bits/atomic_base.h" 3 20472: extern "C" { 20472: 20472: struct __atomic_flag_base 20472: { 20472: __atomic_flag_data_type _M_i ; 20472: }; 20472: 20472: } 20472: 20472: 20472: 20472: 20472: struct atomic_flag : public __atomic_flag_base 20472: { 20472: atomic_flag() noexcept = default; 20472: ~atomic_flag() noexcept = default; 20472: atomic_flag(const atomic_flag&) = delete; 20472: atomic_flag& operator=(const atomic_flag&) = delete; 20472: atomic_flag& operator=(const atomic_flag&) volatile = delete; 20472: 20472: 20472: constexpr atomic_flag(bool __i) noexcept 20472: : __atomic_flag_base{ _S_init(__i) } 20472: { } 20472: 20472: inline __attribute__((__always_inline__)) bool 20472: test_and_set(memory_order __m = memory_order_seq_cst) noexcept 20472: { 20472: return __atomic_test_and_set (&_M_i, int(__m)); 20472: } 20472: 20472: inline __attribute__((__always_inline__)) bool 20472: test_and_set(memory_order __m = memory_order_seq_cst) volatile noexcept 20472: { 20472: return __atomic_test_and_set (&_M_i, int(__m)); 20472: } 20472: 20472: inline __attribute__((__always_inline__)) void 20472: clear(memory_order __m = memory_order_seq_cst) noexcept 20472: { 20472: memory_order __b = __m & __memory_order_mask; 20472: ; 20472: ; 20472: ; 20472: 20472: __atomic_clear (&_M_i, int(__m)); 20472: } 20472: 20472: inline __attribute__((__always_inline__)) void 20472: clear(memory_order __m = memory_order_seq_cst) volatile noexcept 20472: { 20472: memory_order __b = __m & __memory_order_mask; 20472: ; 20472: ; 20472: ; 20472: 20472: __atomic_clear (&_M_i, int(__m)); 20472: } 20472: 20472: private: 20472: static constexpr __atomic_flag_data_type 20472: _S_init(bool __i) 20472: { return __i ? 1 : 0; } 20472: }; 20472: # 264 "/usr/include/c++/10/bits/atomic_base.h" 3 20472: template 20472: struct __atomic_base 20472: { 20472: using value_type = _ITp; 20472: using difference_type = value_type; 20472: 20472: private: 20472: typedef _ITp __int_type; 20472: 20472: static constexpr int _S_alignment = 20472: sizeof(_ITp) > alignof(_ITp) ? sizeof(_ITp) : alignof(_ITp); 20472: 20472: alignas(_S_alignment) __int_type _M_i ; 20472: 20472: public: 20472: __atomic_base() noexcept = default; 20472: ~__atomic_base() noexcept = default; 20472: __atomic_base(const __atomic_base&) = delete; 20472: __atomic_base& operator=(const __atomic_base&) = delete; 20472: __atomic_base& operator=(const __atomic_base&) volatile = delete; 20472: 20472: 20472: constexpr __atomic_base(__int_type __i) noexcept : _M_i (__i) { } 20472: 20472: operator __int_type() const noexcept 20472: { return load(); } 20472: 20472: operator __int_type() const volatile noexcept 20472: { return load(); } 20472: 20472: __int_type 20472: operator=(__int_type __i) noexcept 20472: { 20472: store(__i); 20472: return __i; 20472: } 20472: 20472: __int_type 20472: operator=(__int_type __i) volatile noexcept 20472: { 20472: store(__i); 20472: return __i; 20472: } 20472: 20472: __int_type 20472: operator++(int) noexcept 20472: { return fetch_add(1); } 20472: 20472: __int_type 20472: operator++(int) volatile noexcept 20472: { return fetch_add(1); } 20472: 20472: __int_type 20472: operator--(int) noexcept 20472: { return fetch_sub(1); } 20472: 20472: __int_type 20472: operator--(int) volatile noexcept 20472: { return fetch_sub(1); } 20472: 20472: __int_type 20472: operator++() noexcept 20472: { return __atomic_add_fetch(&_M_i, 1, int(memory_order_seq_cst)); } 20472: 20472: __int_type 20472: operator++() volatile noexcept 20472: { return __atomic_add_fetch(&_M_i, 1, int(memory_order_seq_cst)); } 20472: 20472: __int_type 20472: operator--() noexcept 20472: { return __atomic_sub_fetch(&_M_i, 1, int(memory_order_seq_cst)); } 20472: 20472: __int_type 20472: operator--() volatile noexcept 20472: { return __atomic_sub_fetch(&_M_i, 1, int(memory_order_seq_cst)); } 20472: 20472: __int_type 20472: operator+=(__int_type __i) noexcept 20472: { return __atomic_add_fetch(&_M_i, __i, int(memory_order_seq_cst)); } 20472: 20472: __int_type 20472: operator+=(__int_type __i) volatile noexcept 20472: { return __atomic_add_fetch(&_M_i, __i, int(memory_order_seq_cst)); } 20472: 20472: __int_type 20472: operator-=(__int_type __i) noexcept 20472: { return __atomic_sub_fetch(&_M_i, __i, int(memory_order_seq_cst)); } 20472: 20472: __int_type 20472: operator-=(__int_type __i) volatile noexcept 20472: { return __atomic_sub_fetch(&_M_i, __i, int(memory_order_seq_cst)); } 20472: 20472: __int_type 20472: operator&=(__int_type __i) noexcept 20472: { return __atomic_and_fetch(&_M_i, __i, int(memory_order_seq_cst)); } 20472: 20472: __int_type 20472: operator&=(__int_type __i) volatile noexcept 20472: { return __atomic_and_fetch(&_M_i, __i, int(memory_order_seq_cst)); } 20472: 20472: __int_type 20472: operator|=(__int_type __i) noexcept 20472: { return __atomic_or_fetch(&_M_i, __i, int(memory_order_seq_cst)); } 20472: 20472: __int_type 20472: operator|=(__int_type __i) volatile noexcept 20472: { return __atomic_or_fetch(&_M_i, __i, int(memory_order_seq_cst)); } 20472: 20472: __int_type 20472: operator^=(__int_type __i) noexcept 20472: { return __atomic_xor_fetch(&_M_i, __i, int(memory_order_seq_cst)); } 20472: 20472: __int_type 20472: operator^=(__int_type __i) volatile noexcept 20472: { return __atomic_xor_fetch(&_M_i, __i, int(memory_order_seq_cst)); } 20472: 20472: bool 20472: is_lock_free() const noexcept 20472: { 20472: 20472: return __atomic_is_lock_free(sizeof(_M_i), 20472: reinterpret_cast(-_S_alignment)); 20472: } 20472: 20472: bool 20472: is_lock_free() const volatile noexcept 20472: { 20472: 20472: return __atomic_is_lock_free(sizeof(_M_i), 20472: reinterpret_cast(-_S_alignment)); 20472: } 20472: 20472: inline __attribute__((__always_inline__)) void 20472: store(__int_type __i, memory_order __m = memory_order_seq_cst) noexcept 20472: { 20472: memory_order __b = __m & __memory_order_mask; 20472: ; 20472: ; 20472: ; 20472: 20472: __atomic_store_n(&_M_i, __i, int(__m)); 20472: } 20472: 20472: inline __attribute__((__always_inline__)) void 20472: store(__int_type __i, 20472: memory_order __m = memory_order_seq_cst) volatile noexcept 20472: { 20472: memory_order __b = __m & __memory_order_mask; 20472: ; 20472: ; 20472: ; 20472: 20472: __atomic_store_n(&_M_i, __i, int(__m)); 20472: } 20472: 20472: inline __attribute__((__always_inline__)) __int_type 20472: load(memory_order __m = memory_order_seq_cst) const noexcept 20472: { 20472: memory_order __b = __m & __memory_order_mask; 20472: ; 20472: ; 20472: 20472: return __atomic_load_n(&_M_i, int(__m)); 20472: } 20472: 20472: inline __attribute__((__always_inline__)) __int_type 20472: load(memory_order __m = memory_order_seq_cst) const volatile noexcept 20472: { 20472: memory_order __b = __m & __memory_order_mask; 20472: ; 20472: ; 20472: 20472: return __atomic_load_n(&_M_i, int(__m)); 20472: } 20472: 20472: inline __attribute__((__always_inline__)) __int_type 20472: exchange(__int_type __i, 20472: memory_order __m = memory_order_seq_cst) noexcept 20472: { 20472: return __atomic_exchange_n(&_M_i, __i, int(__m)); 20472: } 20472: 20472: 20472: inline __attribute__((__always_inline__)) __int_type 20472: exchange(__int_type __i, 20472: memory_order __m = memory_order_seq_cst) volatile noexcept 20472: { 20472: return __atomic_exchange_n(&_M_i, __i, int(__m)); 20472: } 20472: 20472: inline __attribute__((__always_inline__)) bool 20472: compare_exchange_weak(__int_type& __i1, __int_type __i2, 20472: memory_order __m1, memory_order __m2) noexcept 20472: { 20472: memory_order __b2 = __m2 & __memory_order_mask; 20472: memory_order __b1 = __m1 & __memory_order_mask; 20472: ; 20472: ; 20472: ; 20472: 20472: return __atomic_compare_exchange_n(&_M_i, &__i1, __i2, 1, 20472: int(__m1), int(__m2)); 20472: } 20472: 20472: inline __attribute__((__always_inline__)) bool 20472: compare_exchange_weak(__int_type& __i1, __int_type __i2, 20472: memory_order __m1, 20472: memory_order __m2) volatile noexcept 20472: { 20472: memory_order __b2 = __m2 & __memory_order_mask; 20472: memory_order __b1 = __m1 & __memory_order_mask; 20472: ; 20472: ; 20472: ; 20472: 20472: return __atomic_compare_exchange_n(&_M_i, &__i1, __i2, 1, 20472: int(__m1), int(__m2)); 20472: } 20472: 20472: inline __attribute__((__always_inline__)) bool 20472: compare_exchange_weak(__int_type& __i1, __int_type __i2, 20472: memory_order __m = memory_order_seq_cst) noexcept 20472: { 20472: return compare_exchange_weak(__i1, __i2, __m, 20472: __cmpexch_failure_order(__m)); 20472: } 20472: 20472: inline __attribute__((__always_inline__)) bool 20472: compare_exchange_weak(__int_type& __i1, __int_type __i2, 20472: memory_order __m = memory_order_seq_cst) volatile noexcept 20472: { 20472: return compare_exchange_weak(__i1, __i2, __m, 20472: __cmpexch_failure_order(__m)); 20472: } 20472: 20472: inline __attribute__((__always_inline__)) bool 20472: compare_exchange_strong(__int_type& __i1, __int_type __i2, 20472: memory_order __m1, memory_order __m2) noexcept 20472: { 20472: memory_order __b2 = __m2 & __memory_order_mask; 20472: memory_order __b1 = __m1 & __memory_order_mask; 20472: ; 20472: ; 20472: ; 20472: 20472: return __atomic_compare_exchange_n(&_M_i, &__i1, __i2, 0, 20472: int(__m1), int(__m2)); 20472: } 20472: 20472: inline __attribute__((__always_inline__)) bool 20472: compare_exchange_strong(__int_type& __i1, __int_type __i2, 20472: memory_order __m1, 20472: memory_order __m2) volatile noexcept 20472: { 20472: memory_order __b2 = __m2 & __memory_order_mask; 20472: memory_order __b1 = __m1 & __memory_order_mask; 20472: 20472: ; 20472: ; 20472: ; 20472: 20472: return __atomic_compare_exchange_n(&_M_i, &__i1, __i2, 0, 20472: int(__m1), int(__m2)); 20472: } 20472: 20472: inline __attribute__((__always_inline__)) bool 20472: compare_exchange_strong(__int_type& __i1, __int_type __i2, 20472: memory_order __m = memory_order_seq_cst) noexcept 20472: { 20472: return compare_exchange_strong(__i1, __i2, __m, 20472: __cmpexch_failure_order(__m)); 20472: } 20472: 20472: inline __attribute__((__always_inline__)) bool 20472: compare_exchange_strong(__int_type& __i1, __int_type __i2, 20472: memory_order __m = memory_order_seq_cst) volatile noexcept 20472: { 20472: return compare_exchange_strong(__i1, __i2, __m, 20472: __cmpexch_failure_order(__m)); 20472: } 20472: 20472: inline __attribute__((__always_inline__)) __int_type 20472: fetch_add(__int_type __i, 20472: memory_order __m = memory_order_seq_cst) noexcept 20472: { return __atomic_fetch_add(&_M_i, __i, int(__m)); } 20472: 20472: inline __attribute__((__always_inline__)) __int_type 20472: fetch_add(__int_type __i, 20472: memory_order __m = memory_order_seq_cst) volatile noexcept 20472: { return __atomic_fetch_add(&_M_i, __i, int(__m)); } 20472: 20472: inline __attribute__((__always_inline__)) __int_type 20472: fetch_sub(__int_type __i, 20472: memory_order __m = memory_order_seq_cst) noexcept 20472: { return __atomic_fetch_sub(&_M_i, __i, int(__m)); } 20472: 20472: inline __attribute__((__always_inline__)) __int_type 20472: fetch_sub(__int_type __i, 20472: memory_order __m = memory_order_seq_cst) volatile noexcept 20472: { return __atomic_fetch_sub(&_M_i, __i, int(__m)); } 20472: 20472: inline __attribute__((__always_inline__)) __int_type 20472: fetch_and(__int_type __i, 20472: memory_order __m = memory_order_seq_cst) noexcept 20472: { return __atomic_fetch_and(&_M_i, __i, int(__m)); } 20472: 20472: inline __attribute__((__always_inline__)) __int_type 20472: fetch_and(__int_type __i, 20472: memory_order __m = memory_order_seq_cst) volatile noexcept 20472: { return __atomic_fetch_and(&_M_i, __i, int(__m)); } 20472: 20472: inline __attribute__((__always_inline__)) __int_type 20472: fetch_or(__int_type __i, 20472: memory_order __m = memory_order_seq_cst) noexcept 20472: { return __atomic_fetch_or(&_M_i, __i, int(__m)); } 20472: 20472: inline __attribute__((__always_inline__)) __int_type 20472: fetch_or(__int_type __i, 20472: memory_order __m = memory_order_seq_cst) volatile noexcept 20472: { return __atomic_fetch_or(&_M_i, __i, int(__m)); } 20472: 20472: inline __attribute__((__always_inline__)) __int_type 20472: fetch_xor(__int_type __i, 20472: memory_order __m = memory_order_seq_cst) noexcept 20472: { return __atomic_fetch_xor(&_M_i, __i, int(__m)); } 20472: 20472: inline __attribute__((__always_inline__)) __int_type 20472: fetch_xor(__int_type __i, 20472: memory_order __m = memory_order_seq_cst) volatile noexcept 20472: { return __atomic_fetch_xor(&_M_i, __i, int(__m)); } 20472: }; 20472: 20472: 20472: 20472: template 20472: struct __atomic_base<_PTp*> 20472: { 20472: private: 20472: typedef _PTp* __pointer_type; 20472: 20472: __pointer_type _M_p ; 20472: 20472: 20472: constexpr ptrdiff_t 20472: _M_type_size(ptrdiff_t __d) const { return __d * sizeof(_PTp); } 20472: 20472: constexpr ptrdiff_t 20472: _M_type_size(ptrdiff_t __d) const volatile { return __d * sizeof(_PTp); } 20472: 20472: public: 20472: __atomic_base() noexcept = default; 20472: ~__atomic_base() noexcept = default; 20472: __atomic_base(const __atomic_base&) = delete; 20472: __atomic_base& operator=(const __atomic_base&) = delete; 20472: __atomic_base& operator=(const __atomic_base&) volatile = delete; 20472: 20472: 20472: constexpr __atomic_base(__pointer_type __p) noexcept : _M_p (__p) { } 20472: 20472: operator __pointer_type() const noexcept 20472: { return load(); } 20472: 20472: operator __pointer_type() const volatile noexcept 20472: { return load(); } 20472: 20472: __pointer_type 20472: operator=(__pointer_type __p) noexcept 20472: { 20472: store(__p); 20472: return __p; 20472: } 20472: 20472: __pointer_type 20472: operator=(__pointer_type __p) volatile noexcept 20472: { 20472: store(__p); 20472: return __p; 20472: } 20472: 20472: __pointer_type 20472: operator++(int) noexcept 20472: { return fetch_add(1); } 20472: 20472: __pointer_type 20472: operator++(int) volatile noexcept 20472: { return fetch_add(1); } 20472: 20472: __pointer_type 20472: operator--(int) noexcept 20472: { return fetch_sub(1); } 20472: 20472: __pointer_type 20472: operator--(int) volatile noexcept 20472: { return fetch_sub(1); } 20472: 20472: __pointer_type 20472: operator++() noexcept 20472: { return __atomic_add_fetch(&_M_p, _M_type_size(1), 20472: int(memory_order_seq_cst)); } 20472: 20472: __pointer_type 20472: operator++() volatile noexcept 20472: { return __atomic_add_fetch(&_M_p, _M_type_size(1), 20472: int(memory_order_seq_cst)); } 20472: 20472: __pointer_type 20472: operator--() noexcept 20472: { return __atomic_sub_fetch(&_M_p, _M_type_size(1), 20472: int(memory_order_seq_cst)); } 20472: 20472: __pointer_type 20472: operator--() volatile noexcept 20472: { return __atomic_sub_fetch(&_M_p, _M_type_size(1), 20472: int(memory_order_seq_cst)); } 20472: 20472: __pointer_type 20472: operator+=(ptrdiff_t __d) noexcept 20472: { return __atomic_add_fetch(&_M_p, _M_type_size(__d), 20472: int(memory_order_seq_cst)); } 20472: 20472: __pointer_type 20472: operator+=(ptrdiff_t __d) volatile noexcept 20472: { return __atomic_add_fetch(&_M_p, _M_type_size(__d), 20472: int(memory_order_seq_cst)); } 20472: 20472: __pointer_type 20472: operator-=(ptrdiff_t __d) noexcept 20472: { return __atomic_sub_fetch(&_M_p, _M_type_size(__d), 20472: int(memory_order_seq_cst)); } 20472: 20472: __pointer_type 20472: operator-=(ptrdiff_t __d) volatile noexcept 20472: { return __atomic_sub_fetch(&_M_p, _M_type_size(__d), 20472: int(memory_order_seq_cst)); } 20472: 20472: bool 20472: is_lock_free() const noexcept 20472: { 20472: 20472: return __atomic_is_lock_free(sizeof(_M_p), 20472: reinterpret_cast(-__alignof(_M_p))); 20472: } 20472: 20472: bool 20472: is_lock_free() const volatile noexcept 20472: { 20472: 20472: return __atomic_is_lock_free(sizeof(_M_p), 20472: reinterpret_cast(-__alignof(_M_p))); 20472: } 20472: 20472: inline __attribute__((__always_inline__)) void 20472: store(__pointer_type __p, 20472: memory_order __m = memory_order_seq_cst) noexcept 20472: { 20472: memory_order __b = __m & __memory_order_mask; 20472: 20472: ; 20472: ; 20472: ; 20472: 20472: __atomic_store_n(&_M_p, __p, int(__m)); 20472: } 20472: 20472: inline __attribute__((__always_inline__)) void 20472: store(__pointer_type __p, 20472: memory_order __m = memory_order_seq_cst) volatile noexcept 20472: { 20472: memory_order __b = __m & __memory_order_mask; 20472: ; 20472: ; 20472: ; 20472: 20472: __atomic_store_n(&_M_p, __p, int(__m)); 20472: } 20472: 20472: inline __attribute__((__always_inline__)) __pointer_type 20472: load(memory_order __m = memory_order_seq_cst) const noexcept 20472: { 20472: memory_order __b = __m & __memory_order_mask; 20472: ; 20472: ; 20472: 20472: return __atomic_load_n(&_M_p, int(__m)); 20472: } 20472: 20472: inline __attribute__((__always_inline__)) __pointer_type 20472: load(memory_order __m = memory_order_seq_cst) const volatile noexcept 20472: { 20472: memory_order __b = __m & __memory_order_mask; 20472: ; 20472: ; 20472: 20472: return __atomic_load_n(&_M_p, int(__m)); 20472: } 20472: 20472: inline __attribute__((__always_inline__)) __pointer_type 20472: exchange(__pointer_type __p, 20472: memory_order __m = memory_order_seq_cst) noexcept 20472: { 20472: return __atomic_exchange_n(&_M_p, __p, int(__m)); 20472: } 20472: 20472: 20472: inline __attribute__((__always_inline__)) __pointer_type 20472: exchange(__pointer_type __p, 20472: memory_order __m = memory_order_seq_cst) volatile noexcept 20472: { 20472: return __atomic_exchange_n(&_M_p, __p, int(__m)); 20472: } 20472: 20472: inline __attribute__((__always_inline__)) bool 20472: compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, 20472: memory_order __m1, 20472: memory_order __m2) noexcept 20472: { 20472: memory_order __b2 = __m2 & __memory_order_mask; 20472: memory_order __b1 = __m1 & __memory_order_mask; 20472: ; 20472: ; 20472: ; 20472: 20472: return __atomic_compare_exchange_n(&_M_p, &__p1, __p2, 0, 20472: int(__m1), int(__m2)); 20472: } 20472: 20472: inline __attribute__((__always_inline__)) bool 20472: compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, 20472: memory_order __m1, 20472: memory_order __m2) volatile noexcept 20472: { 20472: memory_order __b2 = __m2 & __memory_order_mask; 20472: memory_order __b1 = __m1 & __memory_order_mask; 20472: 20472: ; 20472: ; 20472: ; 20472: 20472: return __atomic_compare_exchange_n(&_M_p, &__p1, __p2, 0, 20472: int(__m1), int(__m2)); 20472: } 20472: 20472: inline __attribute__((__always_inline__)) __pointer_type 20472: fetch_add(ptrdiff_t __d, 20472: memory_order __m = memory_order_seq_cst) noexcept 20472: { return __atomic_fetch_add(&_M_p, _M_type_size(__d), int(__m)); } 20472: 20472: inline __attribute__((__always_inline__)) __pointer_type 20472: fetch_add(ptrdiff_t __d, 20472: memory_order __m = memory_order_seq_cst) volatile noexcept 20472: { return __atomic_fetch_add(&_M_p, _M_type_size(__d), int(__m)); } 20472: 20472: inline __attribute__((__always_inline__)) __pointer_type 20472: fetch_sub(ptrdiff_t __d, 20472: memory_order __m = memory_order_seq_cst) noexcept 20472: { return __atomic_fetch_sub(&_M_p, _M_type_size(__d), int(__m)); } 20472: 20472: inline __attribute__((__always_inline__)) __pointer_type 20472: fetch_sub(ptrdiff_t __d, 20472: memory_order __m = memory_order_seq_cst) volatile noexcept 20472: { return __atomic_fetch_sub(&_M_p, _M_type_size(__d), int(__m)); } 20472: }; 20472: # 1700 "/usr/include/c++/10/bits/atomic_base.h" 3 20472: 20472: } 20472: # 42 "/usr/include/c++/10/atomic" 2 3 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: # 56 "/usr/include/c++/10/atomic" 3 20472: template 20472: struct atomic; 20472: 20472: 20472: 20472: template<> 20472: struct atomic 20472: { 20472: using value_type = bool; 20472: 20472: private: 20472: __atomic_base _M_base; 20472: 20472: public: 20472: atomic() noexcept = default; 20472: ~atomic() noexcept = default; 20472: atomic(const atomic&) = delete; 20472: atomic& operator=(const atomic&) = delete; 20472: atomic& operator=(const atomic&) volatile = delete; 20472: 20472: constexpr atomic(bool __i) noexcept : _M_base(__i) { } 20472: 20472: bool 20472: operator=(bool __i) noexcept 20472: { return _M_base.operator=(__i); } 20472: 20472: bool 20472: operator=(bool __i) volatile noexcept 20472: { return _M_base.operator=(__i); } 20472: 20472: operator bool() const noexcept 20472: { return _M_base.load(); } 20472: 20472: operator bool() const volatile noexcept 20472: { return _M_base.load(); } 20472: 20472: bool 20472: is_lock_free() const noexcept { return _M_base.is_lock_free(); } 20472: 20472: bool 20472: is_lock_free() const volatile noexcept { return _M_base.is_lock_free(); } 20472: 20472: 20472: 20472: 20472: 20472: void 20472: store(bool __i, memory_order __m = memory_order_seq_cst) noexcept 20472: { _M_base.store(__i, __m); } 20472: 20472: void 20472: store(bool __i, memory_order __m = memory_order_seq_cst) volatile noexcept 20472: { _M_base.store(__i, __m); } 20472: 20472: bool 20472: load(memory_order __m = memory_order_seq_cst) const noexcept 20472: { return _M_base.load(__m); } 20472: 20472: bool 20472: load(memory_order __m = memory_order_seq_cst) const volatile noexcept 20472: { return _M_base.load(__m); } 20472: 20472: bool 20472: exchange(bool __i, memory_order __m = memory_order_seq_cst) noexcept 20472: { return _M_base.exchange(__i, __m); } 20472: 20472: bool 20472: exchange(bool __i, 20472: memory_order __m = memory_order_seq_cst) volatile noexcept 20472: { return _M_base.exchange(__i, __m); } 20472: 20472: bool 20472: compare_exchange_weak(bool& __i1, bool __i2, memory_order __m1, 20472: memory_order __m2) noexcept 20472: { return _M_base.compare_exchange_weak(__i1, __i2, __m1, __m2); } 20472: 20472: bool 20472: compare_exchange_weak(bool& __i1, bool __i2, memory_order __m1, 20472: memory_order __m2) volatile noexcept 20472: { return _M_base.compare_exchange_weak(__i1, __i2, __m1, __m2); } 20472: 20472: bool 20472: compare_exchange_weak(bool& __i1, bool __i2, 20472: memory_order __m = memory_order_seq_cst) noexcept 20472: { return _M_base.compare_exchange_weak(__i1, __i2, __m); } 20472: 20472: bool 20472: compare_exchange_weak(bool& __i1, bool __i2, 20472: memory_order __m = memory_order_seq_cst) volatile noexcept 20472: { return _M_base.compare_exchange_weak(__i1, __i2, __m); } 20472: 20472: bool 20472: compare_exchange_strong(bool& __i1, bool __i2, memory_order __m1, 20472: memory_order __m2) noexcept 20472: { return _M_base.compare_exchange_strong(__i1, __i2, __m1, __m2); } 20472: 20472: bool 20472: compare_exchange_strong(bool& __i1, bool __i2, memory_order __m1, 20472: memory_order __m2) volatile noexcept 20472: { return _M_base.compare_exchange_strong(__i1, __i2, __m1, __m2); } 20472: 20472: bool 20472: compare_exchange_strong(bool& __i1, bool __i2, 20472: memory_order __m = memory_order_seq_cst) noexcept 20472: { return _M_base.compare_exchange_strong(__i1, __i2, __m); } 20472: 20472: bool 20472: compare_exchange_strong(bool& __i1, bool __i2, 20472: memory_order __m = memory_order_seq_cst) volatile noexcept 20472: { return _M_base.compare_exchange_strong(__i1, __i2, __m); } 20472: }; 20472: # 179 "/usr/include/c++/10/atomic" 3 20472: template 20472: struct atomic 20472: { 20472: using value_type = _Tp; 20472: 20472: private: 20472: 20472: static constexpr int _S_min_alignment 20472: = (sizeof(_Tp) & (sizeof(_Tp) - 1)) || sizeof(_Tp) > 16 20472: ? 0 : sizeof(_Tp); 20472: 20472: static constexpr int _S_alignment 20472: = _S_min_alignment > alignof(_Tp) ? _S_min_alignment : alignof(_Tp); 20472: 20472: alignas(_S_alignment) _Tp _M_i ; 20472: 20472: static_assert(__is_trivially_copyable(_Tp), 20472: "std::atomic requires a trivially copyable type"); 20472: 20472: static_assert(sizeof(_Tp) > 0, 20472: "Incomplete or zero-sized types are not supported"); 20472: 20472: public: 20472: atomic() = default; 20472: ~atomic() noexcept = default; 20472: atomic(const atomic&) = delete; 20472: atomic& operator=(const atomic&) = delete; 20472: atomic& operator=(const atomic&) volatile = delete; 20472: 20472: constexpr atomic(_Tp __i) noexcept : _M_i(__i) { } 20472: 20472: operator _Tp() const noexcept 20472: { return load(); } 20472: 20472: operator _Tp() const volatile noexcept 20472: { return load(); } 20472: 20472: _Tp 20472: operator=(_Tp __i) noexcept 20472: { store(__i); return __i; } 20472: 20472: _Tp 20472: operator=(_Tp __i) volatile noexcept 20472: { store(__i); return __i; } 20472: 20472: bool 20472: is_lock_free() const noexcept 20472: { 20472: 20472: return __atomic_is_lock_free(sizeof(_M_i), 20472: reinterpret_cast(-_S_alignment)); 20472: } 20472: 20472: bool 20472: is_lock_free() const volatile noexcept 20472: { 20472: 20472: return __atomic_is_lock_free(sizeof(_M_i), 20472: reinterpret_cast(-_S_alignment)); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: void 20472: store(_Tp __i, memory_order __m = memory_order_seq_cst) noexcept 20472: { __atomic_store(std::__addressof(_M_i), std::__addressof(__i), int(__m)); } 20472: 20472: void 20472: store(_Tp __i, memory_order __m = memory_order_seq_cst) volatile noexcept 20472: { __atomic_store(std::__addressof(_M_i), std::__addressof(__i), int(__m)); } 20472: 20472: _Tp 20472: load(memory_order __m = memory_order_seq_cst) const noexcept 20472: { 20472: alignas(_Tp) unsigned char __buf[sizeof(_Tp)]; 20472: _Tp* __ptr = reinterpret_cast<_Tp*>(__buf); 20472: __atomic_load(std::__addressof(_M_i), __ptr, int(__m)); 20472: return *__ptr; 20472: } 20472: 20472: _Tp 20472: load(memory_order __m = memory_order_seq_cst) const volatile noexcept 20472: { 20472: alignas(_Tp) unsigned char __buf[sizeof(_Tp)]; 20472: _Tp* __ptr = reinterpret_cast<_Tp*>(__buf); 20472: __atomic_load(std::__addressof(_M_i), __ptr, int(__m)); 20472: return *__ptr; 20472: } 20472: 20472: _Tp 20472: exchange(_Tp __i, memory_order __m = memory_order_seq_cst) noexcept 20472: { 20472: alignas(_Tp) unsigned char __buf[sizeof(_Tp)]; 20472: _Tp* __ptr = reinterpret_cast<_Tp*>(__buf); 20472: __atomic_exchange(std::__addressof(_M_i), std::__addressof(__i), 20472: __ptr, int(__m)); 20472: return *__ptr; 20472: } 20472: 20472: _Tp 20472: exchange(_Tp __i, 20472: memory_order __m = memory_order_seq_cst) volatile noexcept 20472: { 20472: alignas(_Tp) unsigned char __buf[sizeof(_Tp)]; 20472: _Tp* __ptr = reinterpret_cast<_Tp*>(__buf); 20472: __atomic_exchange(std::__addressof(_M_i), std::__addressof(__i), 20472: __ptr, int(__m)); 20472: return *__ptr; 20472: } 20472: 20472: bool 20472: compare_exchange_weak(_Tp& __e, _Tp __i, memory_order __s, 20472: memory_order __f) noexcept 20472: { 20472: return __atomic_compare_exchange(std::__addressof(_M_i), 20472: std::__addressof(__e), 20472: std::__addressof(__i), 20472: true, int(__s), int(__f)); 20472: } 20472: 20472: bool 20472: compare_exchange_weak(_Tp& __e, _Tp __i, memory_order __s, 20472: memory_order __f) volatile noexcept 20472: { 20472: return __atomic_compare_exchange(std::__addressof(_M_i), 20472: std::__addressof(__e), 20472: std::__addressof(__i), 20472: true, int(__s), int(__f)); 20472: } 20472: 20472: bool 20472: compare_exchange_weak(_Tp& __e, _Tp __i, 20472: memory_order __m = memory_order_seq_cst) noexcept 20472: { return compare_exchange_weak(__e, __i, __m, 20472: __cmpexch_failure_order(__m)); } 20472: 20472: bool 20472: compare_exchange_weak(_Tp& __e, _Tp __i, 20472: memory_order __m = memory_order_seq_cst) volatile noexcept 20472: { return compare_exchange_weak(__e, __i, __m, 20472: __cmpexch_failure_order(__m)); } 20472: 20472: bool 20472: compare_exchange_strong(_Tp& __e, _Tp __i, memory_order __s, 20472: memory_order __f) noexcept 20472: { 20472: return __atomic_compare_exchange(std::__addressof(_M_i), 20472: std::__addressof(__e), 20472: std::__addressof(__i), 20472: false, int(__s), int(__f)); 20472: } 20472: 20472: bool 20472: compare_exchange_strong(_Tp& __e, _Tp __i, memory_order __s, 20472: memory_order __f) volatile noexcept 20472: { 20472: return __atomic_compare_exchange(std::__addressof(_M_i), 20472: std::__addressof(__e), 20472: std::__addressof(__i), 20472: false, int(__s), int(__f)); 20472: } 20472: 20472: bool 20472: compare_exchange_strong(_Tp& __e, _Tp __i, 20472: memory_order __m = memory_order_seq_cst) noexcept 20472: { return compare_exchange_strong(__e, __i, __m, 20472: __cmpexch_failure_order(__m)); } 20472: 20472: bool 20472: compare_exchange_strong(_Tp& __e, _Tp __i, 20472: memory_order __m = memory_order_seq_cst) volatile noexcept 20472: { return compare_exchange_strong(__e, __i, __m, 20472: __cmpexch_failure_order(__m)); } 20472: }; 20472: 20472: 20472: 20472: template 20472: struct atomic<_Tp*> 20472: { 20472: using value_type = _Tp*; 20472: using difference_type = ptrdiff_t; 20472: 20472: typedef _Tp* __pointer_type; 20472: typedef __atomic_base<_Tp*> __base_type; 20472: __base_type _M_b; 20472: 20472: atomic() noexcept = default; 20472: ~atomic() noexcept = default; 20472: atomic(const atomic&) = delete; 20472: atomic& operator=(const atomic&) = delete; 20472: atomic& operator=(const atomic&) volatile = delete; 20472: 20472: constexpr atomic(__pointer_type __p) noexcept : _M_b(__p) { } 20472: 20472: operator __pointer_type() const noexcept 20472: { return __pointer_type(_M_b); } 20472: 20472: operator __pointer_type() const volatile noexcept 20472: { return __pointer_type(_M_b); } 20472: 20472: __pointer_type 20472: operator=(__pointer_type __p) noexcept 20472: { return _M_b.operator=(__p); } 20472: 20472: __pointer_type 20472: operator=(__pointer_type __p) volatile noexcept 20472: { return _M_b.operator=(__p); } 20472: 20472: __pointer_type 20472: operator++(int) noexcept 20472: { 20472: 20472: 20472: 20472: return _M_b++; 20472: } 20472: 20472: __pointer_type 20472: operator++(int) volatile noexcept 20472: { 20472: 20472: 20472: 20472: return _M_b++; 20472: } 20472: 20472: __pointer_type 20472: operator--(int) noexcept 20472: { 20472: 20472: 20472: 20472: return _M_b--; 20472: } 20472: 20472: __pointer_type 20472: operator--(int) volatile noexcept 20472: { 20472: 20472: 20472: 20472: return _M_b--; 20472: } 20472: 20472: __pointer_type 20472: operator++() noexcept 20472: { 20472: 20472: 20472: 20472: return ++_M_b; 20472: } 20472: 20472: __pointer_type 20472: operator++() volatile noexcept 20472: { 20472: 20472: 20472: 20472: return ++_M_b; 20472: } 20472: 20472: __pointer_type 20472: operator--() noexcept 20472: { 20472: 20472: 20472: 20472: return --_M_b; 20472: } 20472: 20472: __pointer_type 20472: operator--() volatile noexcept 20472: { 20472: 20472: 20472: 20472: return --_M_b; 20472: } 20472: 20472: __pointer_type 20472: operator+=(ptrdiff_t __d) noexcept 20472: { 20472: 20472: 20472: 20472: return _M_b.operator+=(__d); 20472: } 20472: 20472: __pointer_type 20472: operator+=(ptrdiff_t __d) volatile noexcept 20472: { 20472: 20472: 20472: 20472: return _M_b.operator+=(__d); 20472: } 20472: 20472: __pointer_type 20472: operator-=(ptrdiff_t __d) noexcept 20472: { 20472: 20472: 20472: 20472: return _M_b.operator-=(__d); 20472: } 20472: 20472: __pointer_type 20472: operator-=(ptrdiff_t __d) volatile noexcept 20472: { 20472: 20472: 20472: 20472: return _M_b.operator-=(__d); 20472: } 20472: 20472: bool 20472: is_lock_free() const noexcept 20472: { return _M_b.is_lock_free(); } 20472: 20472: bool 20472: is_lock_free() const volatile noexcept 20472: { return _M_b.is_lock_free(); } 20472: 20472: 20472: 20472: 20472: 20472: void 20472: store(__pointer_type __p, 20472: memory_order __m = memory_order_seq_cst) noexcept 20472: { return _M_b.store(__p, __m); } 20472: 20472: void 20472: store(__pointer_type __p, 20472: memory_order __m = memory_order_seq_cst) volatile noexcept 20472: { return _M_b.store(__p, __m); } 20472: 20472: __pointer_type 20472: load(memory_order __m = memory_order_seq_cst) const noexcept 20472: { return _M_b.load(__m); } 20472: 20472: __pointer_type 20472: load(memory_order __m = memory_order_seq_cst) const volatile noexcept 20472: { return _M_b.load(__m); } 20472: 20472: __pointer_type 20472: exchange(__pointer_type __p, 20472: memory_order __m = memory_order_seq_cst) noexcept 20472: { return _M_b.exchange(__p, __m); } 20472: 20472: __pointer_type 20472: exchange(__pointer_type __p, 20472: memory_order __m = memory_order_seq_cst) volatile noexcept 20472: { return _M_b.exchange(__p, __m); } 20472: 20472: bool 20472: compare_exchange_weak(__pointer_type& __p1, __pointer_type __p2, 20472: memory_order __m1, memory_order __m2) noexcept 20472: { return _M_b.compare_exchange_strong(__p1, __p2, __m1, __m2); } 20472: 20472: bool 20472: compare_exchange_weak(__pointer_type& __p1, __pointer_type __p2, 20472: memory_order __m1, 20472: memory_order __m2) volatile noexcept 20472: { return _M_b.compare_exchange_strong(__p1, __p2, __m1, __m2); } 20472: 20472: bool 20472: compare_exchange_weak(__pointer_type& __p1, __pointer_type __p2, 20472: memory_order __m = memory_order_seq_cst) noexcept 20472: { 20472: return compare_exchange_weak(__p1, __p2, __m, 20472: __cmpexch_failure_order(__m)); 20472: } 20472: 20472: bool 20472: compare_exchange_weak(__pointer_type& __p1, __pointer_type __p2, 20472: memory_order __m = memory_order_seq_cst) volatile noexcept 20472: { 20472: return compare_exchange_weak(__p1, __p2, __m, 20472: __cmpexch_failure_order(__m)); 20472: } 20472: 20472: bool 20472: compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, 20472: memory_order __m1, memory_order __m2) noexcept 20472: { return _M_b.compare_exchange_strong(__p1, __p2, __m1, __m2); } 20472: 20472: bool 20472: compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, 20472: memory_order __m1, 20472: memory_order __m2) volatile noexcept 20472: { return _M_b.compare_exchange_strong(__p1, __p2, __m1, __m2); } 20472: 20472: bool 20472: compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, 20472: memory_order __m = memory_order_seq_cst) noexcept 20472: { 20472: return _M_b.compare_exchange_strong(__p1, __p2, __m, 20472: __cmpexch_failure_order(__m)); 20472: } 20472: 20472: bool 20472: compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, 20472: memory_order __m = memory_order_seq_cst) volatile noexcept 20472: { 20472: return _M_b.compare_exchange_strong(__p1, __p2, __m, 20472: __cmpexch_failure_order(__m)); 20472: } 20472: 20472: __pointer_type 20472: fetch_add(ptrdiff_t __d, 20472: memory_order __m = memory_order_seq_cst) noexcept 20472: { 20472: 20472: 20472: 20472: return _M_b.fetch_add(__d, __m); 20472: } 20472: 20472: __pointer_type 20472: fetch_add(ptrdiff_t __d, 20472: memory_order __m = memory_order_seq_cst) volatile noexcept 20472: { 20472: 20472: 20472: 20472: return _M_b.fetch_add(__d, __m); 20472: } 20472: 20472: __pointer_type 20472: fetch_sub(ptrdiff_t __d, 20472: memory_order __m = memory_order_seq_cst) noexcept 20472: { 20472: 20472: 20472: 20472: return _M_b.fetch_sub(__d, __m); 20472: } 20472: 20472: __pointer_type 20472: fetch_sub(ptrdiff_t __d, 20472: memory_order __m = memory_order_seq_cst) volatile noexcept 20472: { 20472: 20472: 20472: 20472: return _M_b.fetch_sub(__d, __m); 20472: } 20472: }; 20472: 20472: 20472: 20472: template<> 20472: struct atomic : __atomic_base 20472: { 20472: typedef char __integral_type; 20472: typedef __atomic_base __base_type; 20472: 20472: atomic() noexcept = default; 20472: ~atomic() noexcept = default; 20472: atomic(const atomic&) = delete; 20472: atomic& operator=(const atomic&) = delete; 20472: atomic& operator=(const atomic&) volatile = delete; 20472: 20472: constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } 20472: 20472: using __base_type::operator __integral_type; 20472: using __base_type::operator=; 20472: 20472: 20472: 20472: 20472: }; 20472: 20472: 20472: template<> 20472: struct atomic : __atomic_base 20472: { 20472: typedef signed char __integral_type; 20472: typedef __atomic_base __base_type; 20472: 20472: atomic() noexcept= default; 20472: ~atomic() noexcept = default; 20472: atomic(const atomic&) = delete; 20472: atomic& operator=(const atomic&) = delete; 20472: atomic& operator=(const atomic&) volatile = delete; 20472: 20472: constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } 20472: 20472: using __base_type::operator __integral_type; 20472: using __base_type::operator=; 20472: 20472: 20472: 20472: 20472: }; 20472: 20472: 20472: template<> 20472: struct atomic : __atomic_base 20472: { 20472: typedef unsigned char __integral_type; 20472: typedef __atomic_base __base_type; 20472: 20472: atomic() noexcept= default; 20472: ~atomic() noexcept = default; 20472: atomic(const atomic&) = delete; 20472: atomic& operator=(const atomic&) = delete; 20472: atomic& operator=(const atomic&) volatile = delete; 20472: 20472: constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } 20472: 20472: using __base_type::operator __integral_type; 20472: using __base_type::operator=; 20472: 20472: 20472: 20472: 20472: }; 20472: 20472: 20472: template<> 20472: struct atomic : __atomic_base 20472: { 20472: typedef short __integral_type; 20472: typedef __atomic_base __base_type; 20472: 20472: atomic() noexcept = default; 20472: ~atomic() noexcept = default; 20472: atomic(const atomic&) = delete; 20472: atomic& operator=(const atomic&) = delete; 20472: atomic& operator=(const atomic&) volatile = delete; 20472: 20472: constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } 20472: 20472: using __base_type::operator __integral_type; 20472: using __base_type::operator=; 20472: 20472: 20472: 20472: 20472: }; 20472: 20472: 20472: template<> 20472: struct atomic : __atomic_base 20472: { 20472: typedef unsigned short __integral_type; 20472: typedef __atomic_base __base_type; 20472: 20472: atomic() noexcept = default; 20472: ~atomic() noexcept = default; 20472: atomic(const atomic&) = delete; 20472: atomic& operator=(const atomic&) = delete; 20472: atomic& operator=(const atomic&) volatile = delete; 20472: 20472: constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } 20472: 20472: using __base_type::operator __integral_type; 20472: using __base_type::operator=; 20472: 20472: 20472: 20472: 20472: }; 20472: 20472: 20472: template<> 20472: struct atomic : __atomic_base 20472: { 20472: typedef int __integral_type; 20472: typedef __atomic_base __base_type; 20472: 20472: atomic() noexcept = default; 20472: ~atomic() noexcept = default; 20472: atomic(const atomic&) = delete; 20472: atomic& operator=(const atomic&) = delete; 20472: atomic& operator=(const atomic&) volatile = delete; 20472: 20472: constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } 20472: 20472: using __base_type::operator __integral_type; 20472: using __base_type::operator=; 20472: 20472: 20472: 20472: 20472: }; 20472: 20472: 20472: template<> 20472: struct atomic : __atomic_base 20472: { 20472: typedef unsigned int __integral_type; 20472: typedef __atomic_base __base_type; 20472: 20472: atomic() noexcept = default; 20472: ~atomic() noexcept = default; 20472: atomic(const atomic&) = delete; 20472: atomic& operator=(const atomic&) = delete; 20472: atomic& operator=(const atomic&) volatile = delete; 20472: 20472: constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } 20472: 20472: using __base_type::operator __integral_type; 20472: using __base_type::operator=; 20472: 20472: 20472: 20472: 20472: }; 20472: 20472: 20472: template<> 20472: struct atomic : __atomic_base 20472: { 20472: typedef long __integral_type; 20472: typedef __atomic_base __base_type; 20472: 20472: atomic() noexcept = default; 20472: ~atomic() noexcept = default; 20472: atomic(const atomic&) = delete; 20472: atomic& operator=(const atomic&) = delete; 20472: atomic& operator=(const atomic&) volatile = delete; 20472: 20472: constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } 20472: 20472: using __base_type::operator __integral_type; 20472: using __base_type::operator=; 20472: 20472: 20472: 20472: 20472: }; 20472: 20472: 20472: template<> 20472: struct atomic : __atomic_base 20472: { 20472: typedef unsigned long __integral_type; 20472: typedef __atomic_base __base_type; 20472: 20472: atomic() noexcept = default; 20472: ~atomic() noexcept = default; 20472: atomic(const atomic&) = delete; 20472: atomic& operator=(const atomic&) = delete; 20472: atomic& operator=(const atomic&) volatile = delete; 20472: 20472: constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } 20472: 20472: using __base_type::operator __integral_type; 20472: using __base_type::operator=; 20472: 20472: 20472: 20472: 20472: }; 20472: 20472: 20472: template<> 20472: struct atomic : __atomic_base 20472: { 20472: typedef long long __integral_type; 20472: typedef __atomic_base __base_type; 20472: 20472: atomic() noexcept = default; 20472: ~atomic() noexcept = default; 20472: atomic(const atomic&) = delete; 20472: atomic& operator=(const atomic&) = delete; 20472: atomic& operator=(const atomic&) volatile = delete; 20472: 20472: constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } 20472: 20472: using __base_type::operator __integral_type; 20472: using __base_type::operator=; 20472: 20472: 20472: 20472: 20472: }; 20472: 20472: 20472: template<> 20472: struct atomic : __atomic_base 20472: { 20472: typedef unsigned long long __integral_type; 20472: typedef __atomic_base __base_type; 20472: 20472: atomic() noexcept = default; 20472: ~atomic() noexcept = default; 20472: atomic(const atomic&) = delete; 20472: atomic& operator=(const atomic&) = delete; 20472: atomic& operator=(const atomic&) volatile = delete; 20472: 20472: constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } 20472: 20472: using __base_type::operator __integral_type; 20472: using __base_type::operator=; 20472: 20472: 20472: 20472: 20472: }; 20472: 20472: 20472: template<> 20472: struct atomic : __atomic_base 20472: { 20472: typedef wchar_t __integral_type; 20472: typedef __atomic_base __base_type; 20472: 20472: atomic() noexcept = default; 20472: ~atomic() noexcept = default; 20472: atomic(const atomic&) = delete; 20472: atomic& operator=(const atomic&) = delete; 20472: atomic& operator=(const atomic&) volatile = delete; 20472: 20472: constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } 20472: 20472: using __base_type::operator __integral_type; 20472: using __base_type::operator=; 20472: 20472: 20472: 20472: 20472: }; 20472: # 937 "/usr/include/c++/10/atomic" 3 20472: template<> 20472: struct atomic : __atomic_base 20472: { 20472: typedef char16_t __integral_type; 20472: typedef __atomic_base __base_type; 20472: 20472: atomic() noexcept = default; 20472: ~atomic() noexcept = default; 20472: atomic(const atomic&) = delete; 20472: atomic& operator=(const atomic&) = delete; 20472: atomic& operator=(const atomic&) volatile = delete; 20472: 20472: constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } 20472: 20472: using __base_type::operator __integral_type; 20472: using __base_type::operator=; 20472: 20472: 20472: 20472: 20472: }; 20472: 20472: 20472: template<> 20472: struct atomic : __atomic_base 20472: { 20472: typedef char32_t __integral_type; 20472: typedef __atomic_base __base_type; 20472: 20472: atomic() noexcept = default; 20472: ~atomic() noexcept = default; 20472: atomic(const atomic&) = delete; 20472: atomic& operator=(const atomic&) = delete; 20472: atomic& operator=(const atomic&) volatile = delete; 20472: 20472: constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } 20472: 20472: using __base_type::operator __integral_type; 20472: using __base_type::operator=; 20472: 20472: 20472: 20472: 20472: }; 20472: 20472: 20472: 20472: typedef atomic atomic_bool; 20472: 20472: 20472: typedef atomic atomic_char; 20472: 20472: 20472: typedef atomic atomic_schar; 20472: 20472: 20472: typedef atomic atomic_uchar; 20472: 20472: 20472: typedef atomic atomic_short; 20472: 20472: 20472: typedef atomic atomic_ushort; 20472: 20472: 20472: typedef atomic atomic_int; 20472: 20472: 20472: typedef atomic atomic_uint; 20472: 20472: 20472: typedef atomic atomic_long; 20472: 20472: 20472: typedef atomic atomic_ulong; 20472: 20472: 20472: typedef atomic atomic_llong; 20472: 20472: 20472: typedef atomic atomic_ullong; 20472: 20472: 20472: typedef atomic atomic_wchar_t; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: typedef atomic atomic_char16_t; 20472: 20472: 20472: typedef atomic atomic_char32_t; 20472: 20472: 20472: 20472: 20472: 20472: 20472: typedef atomic atomic_int8_t; 20472: 20472: 20472: typedef atomic atomic_uint8_t; 20472: 20472: 20472: typedef atomic atomic_int16_t; 20472: 20472: 20472: typedef atomic atomic_uint16_t; 20472: 20472: 20472: typedef atomic atomic_int32_t; 20472: 20472: 20472: typedef atomic atomic_uint32_t; 20472: 20472: 20472: typedef atomic atomic_int64_t; 20472: 20472: 20472: typedef atomic atomic_uint64_t; 20472: 20472: 20472: 20472: typedef atomic atomic_int_least8_t; 20472: 20472: 20472: typedef atomic atomic_uint_least8_t; 20472: 20472: 20472: typedef atomic atomic_int_least16_t; 20472: 20472: 20472: typedef atomic atomic_uint_least16_t; 20472: 20472: 20472: typedef atomic atomic_int_least32_t; 20472: 20472: 20472: typedef atomic atomic_uint_least32_t; 20472: 20472: 20472: typedef atomic atomic_int_least64_t; 20472: 20472: 20472: typedef atomic atomic_uint_least64_t; 20472: 20472: 20472: 20472: typedef atomic atomic_int_fast8_t; 20472: 20472: 20472: typedef atomic atomic_uint_fast8_t; 20472: 20472: 20472: typedef atomic atomic_int_fast16_t; 20472: 20472: 20472: typedef atomic atomic_uint_fast16_t; 20472: 20472: 20472: typedef atomic atomic_int_fast32_t; 20472: 20472: 20472: typedef atomic atomic_uint_fast32_t; 20472: 20472: 20472: typedef atomic atomic_int_fast64_t; 20472: 20472: 20472: typedef atomic atomic_uint_fast64_t; 20472: 20472: 20472: 20472: 20472: typedef atomic atomic_intptr_t; 20472: 20472: 20472: typedef atomic atomic_uintptr_t; 20472: 20472: 20472: typedef atomic atomic_size_t; 20472: 20472: 20472: typedef atomic atomic_ptrdiff_t; 20472: 20472: 20472: 20472: typedef atomic atomic_intmax_t; 20472: 20472: 20472: typedef atomic atomic_uintmax_t; 20472: 20472: 20472: 20472: inline bool 20472: atomic_flag_test_and_set_explicit(atomic_flag* __a, 20472: memory_order __m) noexcept 20472: { return __a->test_and_set(__m); } 20472: 20472: inline bool 20472: atomic_flag_test_and_set_explicit(volatile atomic_flag* __a, 20472: memory_order __m) noexcept 20472: { return __a->test_and_set(__m); } 20472: 20472: inline void 20472: atomic_flag_clear_explicit(atomic_flag* __a, memory_order __m) noexcept 20472: { __a->clear(__m); } 20472: 20472: inline void 20472: atomic_flag_clear_explicit(volatile atomic_flag* __a, 20472: memory_order __m) noexcept 20472: { __a->clear(__m); } 20472: 20472: inline bool 20472: atomic_flag_test_and_set(atomic_flag* __a) noexcept 20472: { return atomic_flag_test_and_set_explicit(__a, memory_order_seq_cst); } 20472: 20472: inline bool 20472: atomic_flag_test_and_set(volatile atomic_flag* __a) noexcept 20472: { return atomic_flag_test_and_set_explicit(__a, memory_order_seq_cst); } 20472: 20472: inline void 20472: atomic_flag_clear(atomic_flag* __a) noexcept 20472: { atomic_flag_clear_explicit(__a, memory_order_seq_cst); } 20472: 20472: inline void 20472: atomic_flag_clear(volatile atomic_flag* __a) noexcept 20472: { atomic_flag_clear_explicit(__a, memory_order_seq_cst); } 20472: 20472: 20472: template 20472: using __atomic_val_t = typename atomic<_Tp>::value_type; 20472: template 20472: using __atomic_diff_t = typename atomic<_Tp>::difference_type; 20472: 20472: 20472: 20472: template 20472: inline bool 20472: atomic_is_lock_free(const atomic<_ITp>* __a) noexcept 20472: { return __a->is_lock_free(); } 20472: 20472: template 20472: inline bool 20472: atomic_is_lock_free(const volatile atomic<_ITp>* __a) noexcept 20472: { return __a->is_lock_free(); } 20472: 20472: template 20472: inline void 20472: atomic_init(atomic<_ITp>* __a, __atomic_val_t<_ITp> __i) noexcept 20472: { __a->store(__i, memory_order_relaxed); } 20472: 20472: template 20472: inline void 20472: atomic_init(volatile atomic<_ITp>* __a, __atomic_val_t<_ITp> __i) noexcept 20472: { __a->store(__i, memory_order_relaxed); } 20472: 20472: template 20472: inline void 20472: atomic_store_explicit(atomic<_ITp>* __a, __atomic_val_t<_ITp> __i, 20472: memory_order __m) noexcept 20472: { __a->store(__i, __m); } 20472: 20472: template 20472: inline void 20472: atomic_store_explicit(volatile atomic<_ITp>* __a, __atomic_val_t<_ITp> __i, 20472: memory_order __m) noexcept 20472: { __a->store(__i, __m); } 20472: 20472: template 20472: inline _ITp 20472: atomic_load_explicit(const atomic<_ITp>* __a, memory_order __m) noexcept 20472: { return __a->load(__m); } 20472: 20472: template 20472: inline _ITp 20472: atomic_load_explicit(const volatile atomic<_ITp>* __a, 20472: memory_order __m) noexcept 20472: { return __a->load(__m); } 20472: 20472: template 20472: inline _ITp 20472: atomic_exchange_explicit(atomic<_ITp>* __a, __atomic_val_t<_ITp> __i, 20472: memory_order __m) noexcept 20472: { return __a->exchange(__i, __m); } 20472: 20472: template 20472: inline _ITp 20472: atomic_exchange_explicit(volatile atomic<_ITp>* __a, 20472: __atomic_val_t<_ITp> __i, 20472: memory_order __m) noexcept 20472: { return __a->exchange(__i, __m); } 20472: 20472: template 20472: inline bool 20472: atomic_compare_exchange_weak_explicit(atomic<_ITp>* __a, 20472: __atomic_val_t<_ITp>* __i1, 20472: __atomic_val_t<_ITp> __i2, 20472: memory_order __m1, 20472: memory_order __m2) noexcept 20472: { return __a->compare_exchange_weak(*__i1, __i2, __m1, __m2); } 20472: 20472: template 20472: inline bool 20472: atomic_compare_exchange_weak_explicit(volatile atomic<_ITp>* __a, 20472: __atomic_val_t<_ITp>* __i1, 20472: __atomic_val_t<_ITp> __i2, 20472: memory_order __m1, 20472: memory_order __m2) noexcept 20472: { return __a->compare_exchange_weak(*__i1, __i2, __m1, __m2); } 20472: 20472: template 20472: inline bool 20472: atomic_compare_exchange_strong_explicit(atomic<_ITp>* __a, 20472: __atomic_val_t<_ITp>* __i1, 20472: __atomic_val_t<_ITp> __i2, 20472: memory_order __m1, 20472: memory_order __m2) noexcept 20472: { return __a->compare_exchange_strong(*__i1, __i2, __m1, __m2); } 20472: 20472: template 20472: inline bool 20472: atomic_compare_exchange_strong_explicit(volatile atomic<_ITp>* __a, 20472: __atomic_val_t<_ITp>* __i1, 20472: __atomic_val_t<_ITp> __i2, 20472: memory_order __m1, 20472: memory_order __m2) noexcept 20472: { return __a->compare_exchange_strong(*__i1, __i2, __m1, __m2); } 20472: 20472: 20472: template 20472: inline void 20472: atomic_store(atomic<_ITp>* __a, __atomic_val_t<_ITp> __i) noexcept 20472: { atomic_store_explicit(__a, __i, memory_order_seq_cst); } 20472: 20472: template 20472: inline void 20472: atomic_store(volatile atomic<_ITp>* __a, __atomic_val_t<_ITp> __i) noexcept 20472: { atomic_store_explicit(__a, __i, memory_order_seq_cst); } 20472: 20472: template 20472: inline _ITp 20472: atomic_load(const atomic<_ITp>* __a) noexcept 20472: { return atomic_load_explicit(__a, memory_order_seq_cst); } 20472: 20472: template 20472: inline _ITp 20472: atomic_load(const volatile atomic<_ITp>* __a) noexcept 20472: { return atomic_load_explicit(__a, memory_order_seq_cst); } 20472: 20472: template 20472: inline _ITp 20472: atomic_exchange(atomic<_ITp>* __a, __atomic_val_t<_ITp> __i) noexcept 20472: { return atomic_exchange_explicit(__a, __i, memory_order_seq_cst); } 20472: 20472: template 20472: inline _ITp 20472: atomic_exchange(volatile atomic<_ITp>* __a, 20472: __atomic_val_t<_ITp> __i) noexcept 20472: { return atomic_exchange_explicit(__a, __i, memory_order_seq_cst); } 20472: 20472: template 20472: inline bool 20472: atomic_compare_exchange_weak(atomic<_ITp>* __a, 20472: __atomic_val_t<_ITp>* __i1, 20472: __atomic_val_t<_ITp> __i2) noexcept 20472: { 20472: return atomic_compare_exchange_weak_explicit(__a, __i1, __i2, 20472: memory_order_seq_cst, 20472: memory_order_seq_cst); 20472: } 20472: 20472: template 20472: inline bool 20472: atomic_compare_exchange_weak(volatile atomic<_ITp>* __a, 20472: __atomic_val_t<_ITp>* __i1, 20472: __atomic_val_t<_ITp> __i2) noexcept 20472: { 20472: return atomic_compare_exchange_weak_explicit(__a, __i1, __i2, 20472: memory_order_seq_cst, 20472: memory_order_seq_cst); 20472: } 20472: 20472: template 20472: inline bool 20472: atomic_compare_exchange_strong(atomic<_ITp>* __a, 20472: __atomic_val_t<_ITp>* __i1, 20472: __atomic_val_t<_ITp> __i2) noexcept 20472: { 20472: return atomic_compare_exchange_strong_explicit(__a, __i1, __i2, 20472: memory_order_seq_cst, 20472: memory_order_seq_cst); 20472: } 20472: 20472: template 20472: inline bool 20472: atomic_compare_exchange_strong(volatile atomic<_ITp>* __a, 20472: __atomic_val_t<_ITp>* __i1, 20472: __atomic_val_t<_ITp> __i2) noexcept 20472: { 20472: return atomic_compare_exchange_strong_explicit(__a, __i1, __i2, 20472: memory_order_seq_cst, 20472: memory_order_seq_cst); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: template 20472: inline _ITp 20472: atomic_fetch_add_explicit(atomic<_ITp>* __a, 20472: __atomic_diff_t<_ITp> __i, 20472: memory_order __m) noexcept 20472: { return __a->fetch_add(__i, __m); } 20472: 20472: template 20472: inline _ITp 20472: atomic_fetch_add_explicit(volatile atomic<_ITp>* __a, 20472: __atomic_diff_t<_ITp> __i, 20472: memory_order __m) noexcept 20472: { return __a->fetch_add(__i, __m); } 20472: 20472: template 20472: inline _ITp 20472: atomic_fetch_sub_explicit(atomic<_ITp>* __a, 20472: __atomic_diff_t<_ITp> __i, 20472: memory_order __m) noexcept 20472: { return __a->fetch_sub(__i, __m); } 20472: 20472: template 20472: inline _ITp 20472: atomic_fetch_sub_explicit(volatile atomic<_ITp>* __a, 20472: __atomic_diff_t<_ITp> __i, 20472: memory_order __m) noexcept 20472: { return __a->fetch_sub(__i, __m); } 20472: 20472: template 20472: inline _ITp 20472: atomic_fetch_and_explicit(__atomic_base<_ITp>* __a, 20472: __atomic_val_t<_ITp> __i, 20472: memory_order __m) noexcept 20472: { return __a->fetch_and(__i, __m); } 20472: 20472: template 20472: inline _ITp 20472: atomic_fetch_and_explicit(volatile __atomic_base<_ITp>* __a, 20472: __atomic_val_t<_ITp> __i, 20472: memory_order __m) noexcept 20472: { return __a->fetch_and(__i, __m); } 20472: 20472: template 20472: inline _ITp 20472: atomic_fetch_or_explicit(__atomic_base<_ITp>* __a, 20472: __atomic_val_t<_ITp> __i, 20472: memory_order __m) noexcept 20472: { return __a->fetch_or(__i, __m); } 20472: 20472: template 20472: inline _ITp 20472: atomic_fetch_or_explicit(volatile __atomic_base<_ITp>* __a, 20472: __atomic_val_t<_ITp> __i, 20472: memory_order __m) noexcept 20472: { return __a->fetch_or(__i, __m); } 20472: 20472: template 20472: inline _ITp 20472: atomic_fetch_xor_explicit(__atomic_base<_ITp>* __a, 20472: __atomic_val_t<_ITp> __i, 20472: memory_order __m) noexcept 20472: { return __a->fetch_xor(__i, __m); } 20472: 20472: template 20472: inline _ITp 20472: atomic_fetch_xor_explicit(volatile __atomic_base<_ITp>* __a, 20472: __atomic_val_t<_ITp> __i, 20472: memory_order __m) noexcept 20472: { return __a->fetch_xor(__i, __m); } 20472: 20472: template 20472: inline _ITp 20472: atomic_fetch_add(atomic<_ITp>* __a, 20472: __atomic_diff_t<_ITp> __i) noexcept 20472: { return atomic_fetch_add_explicit(__a, __i, memory_order_seq_cst); } 20472: 20472: template 20472: inline _ITp 20472: atomic_fetch_add(volatile atomic<_ITp>* __a, 20472: __atomic_diff_t<_ITp> __i) noexcept 20472: { return atomic_fetch_add_explicit(__a, __i, memory_order_seq_cst); } 20472: 20472: template 20472: inline _ITp 20472: atomic_fetch_sub(atomic<_ITp>* __a, 20472: __atomic_diff_t<_ITp> __i) noexcept 20472: { return atomic_fetch_sub_explicit(__a, __i, memory_order_seq_cst); } 20472: 20472: template 20472: inline _ITp 20472: atomic_fetch_sub(volatile atomic<_ITp>* __a, 20472: __atomic_diff_t<_ITp> __i) noexcept 20472: { return atomic_fetch_sub_explicit(__a, __i, memory_order_seq_cst); } 20472: 20472: template 20472: inline _ITp 20472: atomic_fetch_and(__atomic_base<_ITp>* __a, 20472: __atomic_val_t<_ITp> __i) noexcept 20472: { return atomic_fetch_and_explicit(__a, __i, memory_order_seq_cst); } 20472: 20472: template 20472: inline _ITp 20472: atomic_fetch_and(volatile __atomic_base<_ITp>* __a, 20472: __atomic_val_t<_ITp> __i) noexcept 20472: { return atomic_fetch_and_explicit(__a, __i, memory_order_seq_cst); } 20472: 20472: template 20472: inline _ITp 20472: atomic_fetch_or(__atomic_base<_ITp>* __a, 20472: __atomic_val_t<_ITp> __i) noexcept 20472: { return atomic_fetch_or_explicit(__a, __i, memory_order_seq_cst); } 20472: 20472: template 20472: inline _ITp 20472: atomic_fetch_or(volatile __atomic_base<_ITp>* __a, 20472: __atomic_val_t<_ITp> __i) noexcept 20472: { return atomic_fetch_or_explicit(__a, __i, memory_order_seq_cst); } 20472: 20472: template 20472: inline _ITp 20472: atomic_fetch_xor(__atomic_base<_ITp>* __a, 20472: __atomic_val_t<_ITp> __i) noexcept 20472: { return atomic_fetch_xor_explicit(__a, __i, memory_order_seq_cst); } 20472: 20472: template 20472: inline _ITp 20472: atomic_fetch_xor(volatile __atomic_base<_ITp>* __a, 20472: __atomic_val_t<_ITp> __i) noexcept 20472: { return atomic_fetch_xor_explicit(__a, __i, memory_order_seq_cst); } 20472: # 1547 "/usr/include/c++/10/atomic" 3 20472: 20472: } 20472: # 12 "./db/memtable.h" 2 20472: # 1 "/usr/include/c++/10/deque" 1 3 20472: # 58 "/usr/include/c++/10/deque" 3 20472: 20472: # 59 "/usr/include/c++/10/deque" 3 20472: 20472: # 1 "/usr/include/c++/10/bits/stl_algobase.h" 1 3 20472: # 60 "/usr/include/c++/10/bits/stl_algobase.h" 3 20472: # 1 "/usr/include/c++/10/bits/functexcept.h" 1 3 20472: # 40 "/usr/include/c++/10/bits/functexcept.h" 3 20472: # 1 "/usr/include/c++/10/bits/exception_defines.h" 1 3 20472: # 41 "/usr/include/c++/10/bits/functexcept.h" 2 3 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: void 20472: __throw_bad_exception(void) __attribute__((__noreturn__)); 20472: 20472: 20472: void 20472: __throw_bad_alloc(void) __attribute__((__noreturn__)); 20472: 20472: 20472: void 20472: __throw_bad_cast(void) __attribute__((__noreturn__)); 20472: 20472: void 20472: __throw_bad_typeid(void) __attribute__((__noreturn__)); 20472: 20472: 20472: void 20472: __throw_logic_error(const char*) __attribute__((__noreturn__)); 20472: 20472: void 20472: __throw_domain_error(const char*) __attribute__((__noreturn__)); 20472: 20472: void 20472: __throw_invalid_argument(const char*) __attribute__((__noreturn__)); 20472: 20472: void 20472: __throw_length_error(const char*) __attribute__((__noreturn__)); 20472: 20472: void 20472: __throw_out_of_range(const char*) __attribute__((__noreturn__)); 20472: 20472: void 20472: __throw_out_of_range_fmt(const char*, ...) __attribute__((__noreturn__)) 20472: __attribute__((__format__(__gnu_printf__, 1, 2))); 20472: 20472: void 20472: __throw_runtime_error(const char*) __attribute__((__noreturn__)); 20472: 20472: void 20472: __throw_range_error(const char*) __attribute__((__noreturn__)); 20472: 20472: void 20472: __throw_overflow_error(const char*) __attribute__((__noreturn__)); 20472: 20472: void 20472: __throw_underflow_error(const char*) __attribute__((__noreturn__)); 20472: 20472: 20472: void 20472: __throw_ios_failure(const char*) __attribute__((__noreturn__)); 20472: 20472: void 20472: __throw_ios_failure(const char*, int) __attribute__((__noreturn__)); 20472: 20472: 20472: void 20472: __throw_system_error(int) __attribute__((__noreturn__)); 20472: 20472: 20472: void 20472: __throw_future_error(int) __attribute__((__noreturn__)); 20472: 20472: 20472: void 20472: __throw_bad_function_call() __attribute__((__noreturn__)); 20472: 20472: 20472: } 20472: # 61 "/usr/include/c++/10/bits/stl_algobase.h" 2 3 20472: # 1 "/usr/include/c++/10/bits/cpp_type_traits.h" 1 3 20472: # 35 "/usr/include/c++/10/bits/cpp_type_traits.h" 3 20472: 20472: # 36 "/usr/include/c++/10/bits/cpp_type_traits.h" 3 20472: # 67 "/usr/include/c++/10/bits/cpp_type_traits.h" 3 20472: extern "C++" { 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: struct __true_type { }; 20472: struct __false_type { }; 20472: 20472: template 20472: struct __truth_type 20472: { typedef __false_type __type; }; 20472: 20472: template<> 20472: struct __truth_type 20472: { typedef __true_type __type; }; 20472: 20472: 20472: 20472: template 20472: struct __traitor 20472: { 20472: enum { __value = bool(_Sp::__value) || bool(_Tp::__value) }; 20472: typedef typename __truth_type<__value>::__type __type; 20472: }; 20472: 20472: 20472: template 20472: struct __are_same 20472: { 20472: enum { __value = 0 }; 20472: typedef __false_type __type; 20472: }; 20472: 20472: template 20472: struct __are_same<_Tp, _Tp> 20472: { 20472: enum { __value = 1 }; 20472: typedef __true_type __type; 20472: }; 20472: 20472: 20472: template 20472: struct __is_void 20472: { 20472: enum { __value = 0 }; 20472: typedef __false_type __type; 20472: }; 20472: 20472: template<> 20472: struct __is_void 20472: { 20472: enum { __value = 1 }; 20472: typedef __true_type __type; 20472: }; 20472: 20472: 20472: 20472: 20472: template 20472: struct __is_integer 20472: { 20472: enum { __value = 0 }; 20472: typedef __false_type __type; 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: template<> 20472: struct __is_integer 20472: { 20472: enum { __value = 1 }; 20472: typedef __true_type __type; 20472: }; 20472: 20472: template<> 20472: struct __is_integer 20472: { 20472: enum { __value = 1 }; 20472: typedef __true_type __type; 20472: }; 20472: 20472: template<> 20472: struct __is_integer 20472: { 20472: enum { __value = 1 }; 20472: typedef __true_type __type; 20472: }; 20472: 20472: template<> 20472: struct __is_integer 20472: { 20472: enum { __value = 1 }; 20472: typedef __true_type __type; 20472: }; 20472: 20472: 20472: template<> 20472: struct __is_integer 20472: { 20472: enum { __value = 1 }; 20472: typedef __true_type __type; 20472: }; 20472: # 184 "/usr/include/c++/10/bits/cpp_type_traits.h" 3 20472: template<> 20472: struct __is_integer 20472: { 20472: enum { __value = 1 }; 20472: typedef __true_type __type; 20472: }; 20472: 20472: template<> 20472: struct __is_integer 20472: { 20472: enum { __value = 1 }; 20472: typedef __true_type __type; 20472: }; 20472: 20472: 20472: template<> 20472: struct __is_integer 20472: { 20472: enum { __value = 1 }; 20472: typedef __true_type __type; 20472: }; 20472: 20472: template<> 20472: struct __is_integer 20472: { 20472: enum { __value = 1 }; 20472: typedef __true_type __type; 20472: }; 20472: 20472: template<> 20472: struct __is_integer 20472: { 20472: enum { __value = 1 }; 20472: typedef __true_type __type; 20472: }; 20472: 20472: template<> 20472: struct __is_integer 20472: { 20472: enum { __value = 1 }; 20472: typedef __true_type __type; 20472: }; 20472: 20472: template<> 20472: struct __is_integer 20472: { 20472: enum { __value = 1 }; 20472: typedef __true_type __type; 20472: }; 20472: 20472: template<> 20472: struct __is_integer 20472: { 20472: enum { __value = 1 }; 20472: typedef __true_type __type; 20472: }; 20472: 20472: template<> 20472: struct __is_integer 20472: { 20472: enum { __value = 1 }; 20472: typedef __true_type __type; 20472: }; 20472: 20472: template<> 20472: struct __is_integer 20472: { 20472: enum { __value = 1 }; 20472: typedef __true_type __type; 20472: }; 20472: # 287 "/usr/include/c++/10/bits/cpp_type_traits.h" 3 20472: template 20472: struct __is_floating 20472: { 20472: enum { __value = 0 }; 20472: typedef __false_type __type; 20472: }; 20472: 20472: 20472: template<> 20472: struct __is_floating 20472: { 20472: enum { __value = 1 }; 20472: typedef __true_type __type; 20472: }; 20472: 20472: template<> 20472: struct __is_floating 20472: { 20472: enum { __value = 1 }; 20472: typedef __true_type __type; 20472: }; 20472: 20472: template<> 20472: struct __is_floating 20472: { 20472: enum { __value = 1 }; 20472: typedef __true_type __type; 20472: }; 20472: 20472: 20472: 20472: 20472: template 20472: struct __is_pointer 20472: { 20472: enum { __value = 0 }; 20472: typedef __false_type __type; 20472: }; 20472: 20472: template 20472: struct __is_pointer<_Tp*> 20472: { 20472: enum { __value = 1 }; 20472: typedef __true_type __type; 20472: }; 20472: 20472: 20472: 20472: 20472: template 20472: struct __is_arithmetic 20472: : public __traitor<__is_integer<_Tp>, __is_floating<_Tp> > 20472: { }; 20472: 20472: 20472: 20472: 20472: template 20472: struct __is_scalar 20472: : public __traitor<__is_arithmetic<_Tp>, __is_pointer<_Tp> > 20472: { }; 20472: 20472: 20472: 20472: 20472: template 20472: struct __is_char 20472: { 20472: enum { __value = 0 }; 20472: typedef __false_type __type; 20472: }; 20472: 20472: template<> 20472: struct __is_char 20472: { 20472: enum { __value = 1 }; 20472: typedef __true_type __type; 20472: }; 20472: 20472: 20472: template<> 20472: struct __is_char 20472: { 20472: enum { __value = 1 }; 20472: typedef __true_type __type; 20472: }; 20472: 20472: 20472: template 20472: struct __is_byte 20472: { 20472: enum { __value = 0 }; 20472: typedef __false_type __type; 20472: }; 20472: 20472: template<> 20472: struct __is_byte 20472: { 20472: enum { __value = 1 }; 20472: typedef __true_type __type; 20472: }; 20472: 20472: template<> 20472: struct __is_byte 20472: { 20472: enum { __value = 1 }; 20472: typedef __true_type __type; 20472: }; 20472: 20472: template<> 20472: struct __is_byte 20472: { 20472: enum { __value = 1 }; 20472: typedef __true_type __type; 20472: }; 20472: # 423 "/usr/include/c++/10/bits/cpp_type_traits.h" 3 20472: template struct iterator_traits; 20472: 20472: 20472: template 20472: struct __is_nonvolatile_trivially_copyable 20472: { 20472: enum { __value = __is_trivially_copyable(_Tp) }; 20472: }; 20472: 20472: 20472: 20472: 20472: template 20472: struct __is_nonvolatile_trivially_copyable 20472: { 20472: enum { __value = 0 }; 20472: }; 20472: 20472: 20472: template 20472: struct __memcpyable 20472: { 20472: enum { __value = 0 }; 20472: }; 20472: 20472: template 20472: struct __memcpyable<_Tp*, _Tp*> 20472: : __is_nonvolatile_trivially_copyable<_Tp> 20472: { }; 20472: 20472: template 20472: struct __memcpyable<_Tp*, const _Tp*> 20472: : __is_nonvolatile_trivially_copyable<_Tp> 20472: { }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct __memcmpable 20472: { 20472: enum { __value = 0 }; 20472: }; 20472: 20472: 20472: template 20472: struct __memcmpable<_Tp*, _Tp*> 20472: : __is_nonvolatile_trivially_copyable<_Tp> 20472: { }; 20472: 20472: template 20472: struct __memcmpable 20472: : __is_nonvolatile_trivially_copyable<_Tp> 20472: { }; 20472: 20472: template 20472: struct __memcmpable<_Tp*, const _Tp*> 20472: : __is_nonvolatile_trivially_copyable<_Tp> 20472: { }; 20472: 20472: 20472: 20472: 20472: template::__value> 20472: struct __is_memcmp_ordered 20472: { 20472: static const bool __value = _Tp(-1) > _Tp(1); 20472: }; 20472: 20472: template 20472: struct __is_memcmp_ordered<_Tp, false> 20472: { 20472: static const bool __value = false; 20472: }; 20472: 20472: 20472: template 20472: struct __is_memcmp_ordered_with 20472: { 20472: static const bool __value = __is_memcmp_ordered<_Tp>::__value 20472: && __is_memcmp_ordered<_Up>::__value; 20472: }; 20472: 20472: template 20472: struct __is_memcmp_ordered_with<_Tp, _Up, false> 20472: { 20472: static const bool __value = false; 20472: }; 20472: # 532 "/usr/include/c++/10/bits/cpp_type_traits.h" 3 20472: template 20472: struct __is_move_iterator 20472: { 20472: enum { __value = 0 }; 20472: typedef __false_type __type; 20472: }; 20472: 20472: 20472: 20472: template 20472: 20472: inline _Iterator 20472: __miter_base(_Iterator __it) 20472: { return __it; } 20472: 20472: 20472: } 20472: } 20472: # 62 "/usr/include/c++/10/bits/stl_algobase.h" 2 3 20472: # 1 "/usr/include/c++/10/ext/type_traits.h" 1 3 20472: # 32 "/usr/include/c++/10/ext/type_traits.h" 3 20472: 20472: # 33 "/usr/include/c++/10/ext/type_traits.h" 3 20472: 20472: 20472: 20472: 20472: extern "C++" { 20472: 20472: namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: template 20472: struct __enable_if 20472: { }; 20472: 20472: template 20472: struct __enable_if 20472: { typedef _Tp __type; }; 20472: 20472: 20472: 20472: template 20472: struct __conditional_type 20472: { typedef _Iftrue __type; }; 20472: 20472: template 20472: struct __conditional_type 20472: { typedef _Iffalse __type; }; 20472: 20472: 20472: 20472: template 20472: struct __add_unsigned 20472: { 20472: private: 20472: typedef __enable_if::__value, _Tp> __if_type; 20472: 20472: public: 20472: typedef typename __if_type::__type __type; 20472: }; 20472: 20472: template<> 20472: struct __add_unsigned 20472: { typedef unsigned char __type; }; 20472: 20472: template<> 20472: struct __add_unsigned 20472: { typedef unsigned char __type; }; 20472: 20472: template<> 20472: struct __add_unsigned 20472: { typedef unsigned short __type; }; 20472: 20472: template<> 20472: struct __add_unsigned 20472: { typedef unsigned int __type; }; 20472: 20472: template<> 20472: struct __add_unsigned 20472: { typedef unsigned long __type; }; 20472: 20472: template<> 20472: struct __add_unsigned 20472: { typedef unsigned long long __type; }; 20472: 20472: 20472: template<> 20472: struct __add_unsigned; 20472: 20472: template<> 20472: struct __add_unsigned; 20472: 20472: 20472: 20472: template 20472: struct __remove_unsigned 20472: { 20472: private: 20472: typedef __enable_if::__value, _Tp> __if_type; 20472: 20472: public: 20472: typedef typename __if_type::__type __type; 20472: }; 20472: 20472: template<> 20472: struct __remove_unsigned 20472: { typedef signed char __type; }; 20472: 20472: template<> 20472: struct __remove_unsigned 20472: { typedef signed char __type; }; 20472: 20472: template<> 20472: struct __remove_unsigned 20472: { typedef short __type; }; 20472: 20472: template<> 20472: struct __remove_unsigned 20472: { typedef int __type; }; 20472: 20472: template<> 20472: struct __remove_unsigned 20472: { typedef long __type; }; 20472: 20472: template<> 20472: struct __remove_unsigned 20472: { typedef long long __type; }; 20472: 20472: 20472: template<> 20472: struct __remove_unsigned; 20472: 20472: template<> 20472: struct __remove_unsigned; 20472: 20472: 20472: 20472: template 20472: inline bool 20472: __is_null_pointer(_Type* __ptr) 20472: { return __ptr == 0; } 20472: 20472: template 20472: inline bool 20472: __is_null_pointer(_Type) 20472: { return false; } 20472: 20472: 20472: inline bool 20472: __is_null_pointer(std::nullptr_t) 20472: { return true; } 20472: 20472: 20472: 20472: template::__value> 20472: struct __promote 20472: { typedef double __type; }; 20472: 20472: 20472: 20472: 20472: template 20472: struct __promote<_Tp, false> 20472: { }; 20472: 20472: template<> 20472: struct __promote 20472: { typedef long double __type; }; 20472: 20472: template<> 20472: struct __promote 20472: { typedef double __type; }; 20472: 20472: template<> 20472: struct __promote 20472: { typedef float __type; }; 20472: 20472: template::__type, 20472: typename _Up2 = typename __promote<_Up>::__type> 20472: struct __promote_2 20472: { 20472: typedef __typeof__(_Tp2() + _Up2()) __type; 20472: }; 20472: 20472: template::__type, 20472: typename _Up2 = typename __promote<_Up>::__type, 20472: typename _Vp2 = typename __promote<_Vp>::__type> 20472: struct __promote_3 20472: { 20472: typedef __typeof__(_Tp2() + _Up2() + _Vp2()) __type; 20472: }; 20472: 20472: template::__type, 20472: typename _Up2 = typename __promote<_Up>::__type, 20472: typename _Vp2 = typename __promote<_Vp>::__type, 20472: typename _Wp2 = typename __promote<_Wp>::__type> 20472: struct __promote_4 20472: { 20472: typedef __typeof__(_Tp2() + _Up2() + _Vp2() + _Wp2()) __type; 20472: }; 20472: 20472: 20472: } 20472: } 20472: # 63 "/usr/include/c++/10/bits/stl_algobase.h" 2 3 20472: # 1 "/usr/include/c++/10/ext/numeric_traits.h" 1 3 20472: # 32 "/usr/include/c++/10/ext/numeric_traits.h" 3 20472: 20472: # 33 "/usr/include/c++/10/ext/numeric_traits.h" 3 20472: 20472: 20472: 20472: 20472: namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: # 50 "/usr/include/c++/10/ext/numeric_traits.h" 3 20472: template 20472: struct __is_integer_nonstrict 20472: : public std::__is_integer<_Tp> 20472: { 20472: using std::__is_integer<_Tp>::__value; 20472: 20472: 20472: enum { __width = __value ? sizeof(_Tp) * 8 : 0 }; 20472: }; 20472: 20472: template 20472: struct __numeric_traits_integer 20472: { 20472: 20472: static_assert(__is_integer_nonstrict<_Value>::__value, 20472: "invalid specialization"); 20472: 20472: 20472: 20472: 20472: static const bool __is_signed = (_Value)(-1) < 0; 20472: static const int __digits 20472: = __is_integer_nonstrict<_Value>::__width - __is_signed; 20472: 20472: 20472: static const _Value __max = __is_signed 20472: ? (((((_Value)1 << (__digits - 1)) - 1) << 1) + 1) 20472: : ~(_Value)0; 20472: static const _Value __min = __is_signed ? -__max - 1 : (_Value)0; 20472: }; 20472: 20472: template 20472: const _Value __numeric_traits_integer<_Value>::__min; 20472: 20472: template 20472: const _Value __numeric_traits_integer<_Value>::__max; 20472: 20472: template 20472: const bool __numeric_traits_integer<_Value>::__is_signed; 20472: 20472: template 20472: const int __numeric_traits_integer<_Value>::__digits; 20472: # 135 "/usr/include/c++/10/ext/numeric_traits.h" 3 20472: template 20472: using __int_traits = __numeric_traits_integer<_Tp>; 20472: # 155 "/usr/include/c++/10/ext/numeric_traits.h" 3 20472: template 20472: struct __numeric_traits_floating 20472: { 20472: 20472: static const int __max_digits10 = (2 + (std::__are_same<_Value, float>::__value ? 24 : std::__are_same<_Value, double>::__value ? 53 : 53) * 643L / 2136); 20472: 20472: 20472: static const bool __is_signed = true; 20472: static const int __digits10 = (std::__are_same<_Value, float>::__value ? 6 : std::__are_same<_Value, double>::__value ? 15 : 15); 20472: static const int __max_exponent10 = (std::__are_same<_Value, float>::__value ? 38 : std::__are_same<_Value, double>::__value ? 308 : 308); 20472: }; 20472: 20472: template 20472: const int __numeric_traits_floating<_Value>::__max_digits10; 20472: 20472: template 20472: const bool __numeric_traits_floating<_Value>::__is_signed; 20472: 20472: template 20472: const int __numeric_traits_floating<_Value>::__digits10; 20472: 20472: template 20472: const int __numeric_traits_floating<_Value>::__max_exponent10; 20472: 20472: template 20472: struct __numeric_traits 20472: : public __conditional_type<__is_integer_nonstrict<_Value>::__value, 20472: __numeric_traits_integer<_Value>, 20472: __numeric_traits_floating<_Value> >::__type 20472: { }; 20472: 20472: 20472: } 20472: # 64 "/usr/include/c++/10/bits/stl_algobase.h" 2 3 20472: # 1 "/usr/include/c++/10/bits/stl_pair.h" 1 3 20472: # 69 "/usr/include/c++/10/bits/stl_pair.h" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: # 80 "/usr/include/c++/10/bits/stl_pair.h" 3 20472: struct piecewise_construct_t { explicit piecewise_construct_t() = default; }; 20472: 20472: 20472: constexpr piecewise_construct_t piecewise_construct = 20472: piecewise_construct_t(); 20472: 20472: 20472: 20472: 20472: template 20472: class tuple; 20472: 20472: template 20472: struct _Index_tuple; 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct _PCC 20472: { 20472: template 20472: static constexpr bool _ConstructiblePair() 20472: { 20472: return __and_, 20472: is_constructible<_T2, const _U2&>>::value; 20472: } 20472: 20472: template 20472: static constexpr bool _ImplicitlyConvertiblePair() 20472: { 20472: return __and_, 20472: is_convertible>::value; 20472: } 20472: 20472: template 20472: static constexpr bool _MoveConstructiblePair() 20472: { 20472: return __and_, 20472: is_constructible<_T2, _U2&&>>::value; 20472: } 20472: 20472: template 20472: static constexpr bool _ImplicitlyMoveConvertiblePair() 20472: { 20472: return __and_, 20472: is_convertible<_U2&&, _T2>>::value; 20472: } 20472: 20472: template 20472: static constexpr bool _CopyMovePair() 20472: { 20472: using __do_converts = __and_, 20472: is_convertible<_U2&&, _T2>>; 20472: using __converts = typename conditional<__implicit, 20472: __do_converts, 20472: __not_<__do_converts>>::type; 20472: return __and_, 20472: is_constructible<_T2, _U2&&>, 20472: __converts 20472: >::value; 20472: } 20472: 20472: template 20472: static constexpr bool _MoveCopyPair() 20472: { 20472: using __do_converts = __and_, 20472: is_convertible>; 20472: using __converts = typename conditional<__implicit, 20472: __do_converts, 20472: __not_<__do_converts>>::type; 20472: return __and_, 20472: is_constructible<_T2, const _U2&&>, 20472: __converts 20472: >::value; 20472: } 20472: }; 20472: 20472: template 20472: struct _PCC 20472: { 20472: template 20472: static constexpr bool _ConstructiblePair() 20472: { 20472: return false; 20472: } 20472: 20472: template 20472: static constexpr bool _ImplicitlyConvertiblePair() 20472: { 20472: return false; 20472: } 20472: 20472: template 20472: static constexpr bool _MoveConstructiblePair() 20472: { 20472: return false; 20472: } 20472: 20472: template 20472: static constexpr bool _ImplicitlyMoveConvertiblePair() 20472: { 20472: return false; 20472: } 20472: }; 20472: 20472: 20472: template class __pair_base 20472: { 20472: 20472: template friend struct pair; 20472: __pair_base() = default; 20472: ~__pair_base() = default; 20472: __pair_base(const __pair_base&) = default; 20472: __pair_base& operator=(const __pair_base&) = delete; 20472: 20472: }; 20472: # 210 "/usr/include/c++/10/bits/stl_pair.h" 3 20472: template 20472: struct pair 20472: : private __pair_base<_T1, _T2> 20472: { 20472: typedef _T1 first_type; 20472: typedef _T2 second_type; 20472: 20472: _T1 first; 20472: _T2 second; 20472: 20472: 20472: 20472: 20472: 20472: 20472: template , 20472: __is_implicitly_default_constructible<_U2>> 20472: ::value, bool>::type = true> 20472: 20472: constexpr pair() 20472: : first(), second() { } 20472: 20472: 20472: template , 20472: is_default_constructible<_U2>, 20472: __not_< 20472: __and_<__is_implicitly_default_constructible<_U1>, 20472: __is_implicitly_default_constructible<_U2>>>> 20472: ::value, bool>::type = false> 20472: explicit constexpr pair() 20472: : first(), second() { } 20472: # 256 "/usr/include/c++/10/bits/stl_pair.h" 3 20472: using _PCCP = _PCC; 20472: 20472: 20472: 20472: template() 20472: && _PCCP::template 20472: _ImplicitlyConvertiblePair<_U1, _U2>(), 20472: bool>::type=true> 20472: constexpr pair(const _T1& __a, const _T2& __b) 20472: : first(__a), second(__b) { } 20472: 20472: 20472: template() 20472: && !_PCCP::template 20472: _ImplicitlyConvertiblePair<_U1, _U2>(), 20472: bool>::type=false> 20472: explicit constexpr pair(const _T1& __a, const _T2& __b) 20472: : first(__a), second(__b) { } 20472: # 288 "/usr/include/c++/10/bits/stl_pair.h" 3 20472: template 20472: using _PCCFP = _PCC::value 20472: || !is_same<_T2, _U2>::value, 20472: _T1, _T2>; 20472: 20472: 20472: template::template 20472: _ConstructiblePair<_U1, _U2>() 20472: && _PCCFP<_U1, _U2>::template 20472: _ImplicitlyConvertiblePair<_U1, _U2>(), 20472: bool>::type=true> 20472: constexpr pair(const pair<_U1, _U2>& __p) 20472: : first(__p.first), second(__p.second) { } 20472: 20472: template::template 20472: _ConstructiblePair<_U1, _U2>() 20472: && !_PCCFP<_U1, _U2>::template 20472: _ImplicitlyConvertiblePair<_U1, _U2>(), 20472: bool>::type=false> 20472: explicit constexpr pair(const pair<_U1, _U2>& __p) 20472: : first(__p.first), second(__p.second) { } 20472: 20472: 20472: 20472: constexpr pair(const pair&) = default; 20472: constexpr pair(pair&&) = default; 20472: 20472: 20472: template(), 20472: bool>::type=true> 20472: constexpr pair(_U1&& __x, const _T2& __y) 20472: : first(std::forward<_U1>(__x)), second(__y) { } 20472: 20472: template(), 20472: bool>::type=false> 20472: explicit constexpr pair(_U1&& __x, const _T2& __y) 20472: : first(std::forward<_U1>(__x)), second(__y) { } 20472: 20472: template(), 20472: bool>::type=true> 20472: constexpr pair(const _T1& __x, _U2&& __y) 20472: : first(__x), second(std::forward<_U2>(__y)) { } 20472: 20472: template(), 20472: bool>::type=false> 20472: explicit pair(const _T1& __x, _U2&& __y) 20472: : first(__x), second(std::forward<_U2>(__y)) { } 20472: 20472: template() 20472: && _PCCP::template 20472: _ImplicitlyMoveConvertiblePair<_U1, _U2>(), 20472: bool>::type=true> 20472: constexpr pair(_U1&& __x, _U2&& __y) 20472: : first(std::forward<_U1>(__x)), second(std::forward<_U2>(__y)) { } 20472: 20472: template() 20472: && !_PCCP::template 20472: _ImplicitlyMoveConvertiblePair<_U1, _U2>(), 20472: bool>::type=false> 20472: explicit constexpr pair(_U1&& __x, _U2&& __y) 20472: : first(std::forward<_U1>(__x)), second(std::forward<_U2>(__y)) { } 20472: 20472: 20472: template::template 20472: _MoveConstructiblePair<_U1, _U2>() 20472: && _PCCFP<_U1, _U2>::template 20472: _ImplicitlyMoveConvertiblePair<_U1, _U2>(), 20472: bool>::type=true> 20472: constexpr pair(pair<_U1, _U2>&& __p) 20472: : first(std::forward<_U1>(__p.first)), 20472: second(std::forward<_U2>(__p.second)) { } 20472: 20472: template::template 20472: _MoveConstructiblePair<_U1, _U2>() 20472: && !_PCCFP<_U1, _U2>::template 20472: _ImplicitlyMoveConvertiblePair<_U1, _U2>(), 20472: bool>::type=false> 20472: explicit constexpr pair(pair<_U1, _U2>&& __p) 20472: : first(std::forward<_U1>(__p.first)), 20472: second(std::forward<_U2>(__p.second)) { } 20472: 20472: template 20472: 20472: pair(piecewise_construct_t, tuple<_Args1...>, tuple<_Args2...>); 20472: 20472: pair& 20472: operator=(typename conditional< 20472: __and_, 20472: is_copy_assignable<_T2>>::value, 20472: const pair&, const __nonesuch&>::type __p) 20472: { 20472: first = __p.first; 20472: second = __p.second; 20472: return *this; 20472: } 20472: 20472: pair& 20472: operator=(typename conditional< 20472: __and_, 20472: is_move_assignable<_T2>>::value, 20472: pair&&, __nonesuch&&>::type __p) 20472: noexcept(__and_, 20472: is_nothrow_move_assignable<_T2>>::value) 20472: { 20472: first = std::forward(__p.first); 20472: second = std::forward(__p.second); 20472: return *this; 20472: } 20472: 20472: template 20472: 20472: typename enable_if<__and_, 20472: is_assignable<_T2&, const _U2&>>::value, 20472: pair&>::type 20472: operator=(const pair<_U1, _U2>& __p) 20472: { 20472: first = __p.first; 20472: second = __p.second; 20472: return *this; 20472: } 20472: 20472: template 20472: 20472: typename enable_if<__and_, 20472: is_assignable<_T2&, _U2&&>>::value, 20472: pair&>::type 20472: operator=(pair<_U1, _U2>&& __p) 20472: { 20472: first = std::forward<_U1>(__p.first); 20472: second = std::forward<_U2>(__p.second); 20472: return *this; 20472: } 20472: 20472: 20472: void 20472: swap(pair& __p) 20472: noexcept(__and_<__is_nothrow_swappable<_T1>, 20472: __is_nothrow_swappable<_T2>>::value) 20472: { 20472: using std::swap; 20472: swap(first, __p.first); 20472: swap(second, __p.second); 20472: } 20472: 20472: private: 20472: template 20472: 20472: pair(tuple<_Args1...>&, tuple<_Args2...>&, 20472: _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>); 20472: 20472: }; 20472: # 464 "/usr/include/c++/10/bits/stl_pair.h" 3 20472: template 20472: inline constexpr bool 20472: operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) 20472: { return __x.first == __y.first && __x.second == __y.second; } 20472: # 487 "/usr/include/c++/10/bits/stl_pair.h" 3 20472: template 20472: inline constexpr bool 20472: operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) 20472: { return __x.first < __y.first 20472: || (!(__y.first < __x.first) && __x.second < __y.second); } 20472: 20472: 20472: template 20472: inline constexpr bool 20472: operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) 20472: { return !(__x == __y); } 20472: 20472: 20472: template 20472: inline constexpr bool 20472: operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) 20472: { return __y < __x; } 20472: 20472: 20472: template 20472: inline constexpr bool 20472: operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) 20472: { return !(__y < __x); } 20472: 20472: 20472: template 20472: inline constexpr bool 20472: operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) 20472: { return !(__x < __y); } 20472: # 524 "/usr/include/c++/10/bits/stl_pair.h" 3 20472: template 20472: inline 20472: 20472: 20472: 20472: 20472: 20472: void 20472: 20472: swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y) 20472: noexcept(noexcept(__x.swap(__y))) 20472: { __x.swap(__y); } 20472: # 564 "/usr/include/c++/10/bits/stl_pair.h" 3 20472: template 20472: constexpr pair::__type, 20472: typename __decay_and_strip<_T2>::__type> 20472: make_pair(_T1&& __x, _T2&& __y) 20472: { 20472: typedef typename __decay_and_strip<_T1>::__type __ds_type1; 20472: typedef typename __decay_and_strip<_T2>::__type __ds_type2; 20472: typedef pair<__ds_type1, __ds_type2> __pair_type; 20472: return __pair_type(std::forward<_T1>(__x), std::forward<_T2>(__y)); 20472: } 20472: # 583 "/usr/include/c++/10/bits/stl_pair.h" 3 20472: 20472: } 20472: # 65 "/usr/include/c++/10/bits/stl_algobase.h" 2 3 20472: # 1 "/usr/include/c++/10/bits/stl_iterator_base_types.h" 1 3 20472: # 62 "/usr/include/c++/10/bits/stl_iterator_base_types.h" 3 20472: 20472: # 63 "/usr/include/c++/10/bits/stl_iterator_base_types.h" 3 20472: # 74 "/usr/include/c++/10/bits/stl_iterator_base_types.h" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: # 93 "/usr/include/c++/10/bits/stl_iterator_base_types.h" 3 20472: struct input_iterator_tag { }; 20472: 20472: 20472: struct output_iterator_tag { }; 20472: 20472: 20472: struct forward_iterator_tag : public input_iterator_tag { }; 20472: 20472: 20472: 20472: struct bidirectional_iterator_tag : public forward_iterator_tag { }; 20472: 20472: 20472: 20472: struct random_access_iterator_tag : public bidirectional_iterator_tag { }; 20472: # 125 "/usr/include/c++/10/bits/stl_iterator_base_types.h" 3 20472: template 20472: struct iterator 20472: { 20472: 20472: typedef _Category iterator_category; 20472: 20472: typedef _Tp value_type; 20472: 20472: typedef _Distance difference_type; 20472: 20472: typedef _Pointer pointer; 20472: 20472: typedef _Reference reference; 20472: }; 20472: # 149 "/usr/include/c++/10/bits/stl_iterator_base_types.h" 3 20472: template 20472: struct iterator_traits; 20472: 20472: 20472: 20472: 20472: template> 20472: struct __iterator_traits { }; 20472: 20472: 20472: 20472: template 20472: struct __iterator_traits<_Iterator, 20472: __void_t> 20472: { 20472: typedef typename _Iterator::iterator_category iterator_category; 20472: typedef typename _Iterator::value_type value_type; 20472: typedef typename _Iterator::difference_type difference_type; 20472: typedef typename _Iterator::pointer pointer; 20472: typedef typename _Iterator::reference reference; 20472: }; 20472: 20472: 20472: template 20472: struct iterator_traits 20472: : public __iterator_traits<_Iterator> { }; 20472: # 209 "/usr/include/c++/10/bits/stl_iterator_base_types.h" 3 20472: template 20472: struct iterator_traits<_Tp*> 20472: { 20472: typedef random_access_iterator_tag iterator_category; 20472: typedef _Tp value_type; 20472: typedef ptrdiff_t difference_type; 20472: typedef _Tp* pointer; 20472: typedef _Tp& reference; 20472: }; 20472: 20472: 20472: template 20472: struct iterator_traits 20472: { 20472: typedef random_access_iterator_tag iterator_category; 20472: typedef _Tp value_type; 20472: typedef ptrdiff_t difference_type; 20472: typedef const _Tp* pointer; 20472: typedef const _Tp& reference; 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: inline constexpr 20472: typename iterator_traits<_Iter>::iterator_category 20472: __iterator_category(const _Iter&) 20472: { return typename iterator_traits<_Iter>::iterator_category(); } 20472: 20472: 20472: 20472: 20472: template 20472: using __iterator_category_t 20472: = typename iterator_traits<_Iter>::iterator_category; 20472: 20472: template 20472: using _RequireInputIter = 20472: __enable_if_t, 20472: input_iterator_tag>::value>; 20472: 20472: template> 20472: struct __is_random_access_iter 20472: : is_base_of 20472: { 20472: typedef is_base_of _Base; 20472: enum { __value = _Base::value }; 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: } 20472: # 66 "/usr/include/c++/10/bits/stl_algobase.h" 2 3 20472: # 1 "/usr/include/c++/10/bits/stl_iterator_base_funcs.h" 1 3 20472: # 62 "/usr/include/c++/10/bits/stl_iterator_base_funcs.h" 3 20472: 20472: # 63 "/usr/include/c++/10/bits/stl_iterator_base_funcs.h" 3 20472: 20472: # 1 "/usr/include/c++/10/bits/concept_check.h" 1 3 20472: # 33 "/usr/include/c++/10/bits/concept_check.h" 3 20472: 20472: # 34 "/usr/include/c++/10/bits/concept_check.h" 3 20472: # 65 "/usr/include/c++/10/bits/stl_iterator_base_funcs.h" 2 3 20472: # 1 "/usr/include/c++/10/debug/assertions.h" 1 3 20472: # 66 "/usr/include/c++/10/bits/stl_iterator_base_funcs.h" 2 3 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: 20472: template struct _List_iterator; 20472: template struct _List_const_iterator; 20472: 20472: 20472: template 20472: inline 20472: typename iterator_traits<_InputIterator>::difference_type 20472: __distance(_InputIterator __first, _InputIterator __last, 20472: input_iterator_tag) 20472: { 20472: 20472: 20472: 20472: typename iterator_traits<_InputIterator>::difference_type __n = 0; 20472: while (__first != __last) 20472: { 20472: ++__first; 20472: ++__n; 20472: } 20472: return __n; 20472: } 20472: 20472: template 20472: inline 20472: typename iterator_traits<_RandomAccessIterator>::difference_type 20472: __distance(_RandomAccessIterator __first, _RandomAccessIterator __last, 20472: random_access_iterator_tag) 20472: { 20472: 20472: 20472: 20472: return __last - __first; 20472: } 20472: 20472: 20472: 20472: template 20472: ptrdiff_t 20472: __distance(std::_List_iterator<_Tp>, 20472: std::_List_iterator<_Tp>, 20472: input_iterator_tag); 20472: 20472: template 20472: ptrdiff_t 20472: __distance(std::_List_const_iterator<_Tp>, 20472: std::_List_const_iterator<_Tp>, 20472: input_iterator_tag); 20472: # 135 "/usr/include/c++/10/bits/stl_iterator_base_funcs.h" 3 20472: template 20472: inline 20472: typename iterator_traits<_InputIterator>::difference_type 20472: distance(_InputIterator __first, _InputIterator __last) 20472: { 20472: 20472: return std::__distance(__first, __last, 20472: std::__iterator_category(__first)); 20472: } 20472: 20472: template 20472: inline void 20472: __advance(_InputIterator& __i, _Distance __n, input_iterator_tag) 20472: { 20472: 20472: 20472: ; 20472: while (__n--) 20472: ++__i; 20472: } 20472: 20472: template 20472: inline void 20472: __advance(_BidirectionalIterator& __i, _Distance __n, 20472: bidirectional_iterator_tag) 20472: { 20472: 20472: 20472: 20472: if (__n > 0) 20472: while (__n--) 20472: ++__i; 20472: else 20472: while (__n++) 20472: --__i; 20472: } 20472: 20472: template 20472: inline void 20472: __advance(_RandomAccessIterator& __i, _Distance __n, 20472: random_access_iterator_tag) 20472: { 20472: 20472: 20472: 20472: if (__builtin_constant_p(__n) && __n == 1) 20472: ++__i; 20472: else if (__builtin_constant_p(__n) && __n == -1) 20472: --__i; 20472: else 20472: __i += __n; 20472: } 20472: # 200 "/usr/include/c++/10/bits/stl_iterator_base_funcs.h" 3 20472: template 20472: inline void 20472: advance(_InputIterator& __i, _Distance __n) 20472: { 20472: 20472: typename iterator_traits<_InputIterator>::difference_type __d = __n; 20472: std::__advance(__i, __d, std::__iterator_category(__i)); 20472: } 20472: 20472: 20472: 20472: template 20472: inline _InputIterator 20472: next(_InputIterator __x, typename 20472: iterator_traits<_InputIterator>::difference_type __n = 1) 20472: { 20472: 20472: 20472: std::advance(__x, __n); 20472: return __x; 20472: } 20472: 20472: template 20472: inline _BidirectionalIterator 20472: prev(_BidirectionalIterator __x, typename 20472: iterator_traits<_BidirectionalIterator>::difference_type __n = 1) 20472: { 20472: 20472: 20472: 20472: std::advance(__x, -__n); 20472: return __x; 20472: } 20472: 20472: 20472: 20472: 20472: } 20472: # 67 "/usr/include/c++/10/bits/stl_algobase.h" 2 3 20472: # 1 "/usr/include/c++/10/bits/stl_iterator.h" 1 3 20472: # 66 "/usr/include/c++/10/bits/stl_iterator.h" 3 20472: # 1 "/usr/include/c++/10/bits/ptr_traits.h" 1 3 20472: # 42 "/usr/include/c++/10/bits/ptr_traits.h" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: class __undefined; 20472: 20472: 20472: template 20472: struct __get_first_arg 20472: { using type = __undefined; }; 20472: 20472: template class _Template, typename _Tp, 20472: typename... _Types> 20472: struct __get_first_arg<_Template<_Tp, _Types...>> 20472: { using type = _Tp; }; 20472: 20472: template 20472: using __get_first_arg_t = typename __get_first_arg<_Tp>::type; 20472: 20472: 20472: template 20472: struct __replace_first_arg 20472: { }; 20472: 20472: template class _Template, typename _Up, 20472: typename _Tp, typename... _Types> 20472: struct __replace_first_arg<_Template<_Tp, _Types...>, _Up> 20472: { using type = _Template<_Up, _Types...>; }; 20472: 20472: template 20472: using __replace_first_arg_t = typename __replace_first_arg<_Tp, _Up>::type; 20472: 20472: template 20472: using __make_not_void 20472: = typename conditional::value, __undefined, _Tp>::type; 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct pointer_traits 20472: { 20472: private: 20472: template 20472: using __element_type = typename _Tp::element_type; 20472: 20472: template 20472: using __difference_type = typename _Tp::difference_type; 20472: 20472: template 20472: struct __rebind : __replace_first_arg<_Tp, _Up> { }; 20472: 20472: template 20472: struct __rebind<_Tp, _Up, __void_t>> 20472: { using type = typename _Tp::template rebind<_Up>; }; 20472: 20472: public: 20472: 20472: using pointer = _Ptr; 20472: 20472: 20472: using element_type 20472: = __detected_or_t<__get_first_arg_t<_Ptr>, __element_type, _Ptr>; 20472: 20472: 20472: using difference_type 20472: = __detected_or_t; 20472: 20472: 20472: template 20472: using rebind = typename __rebind<_Ptr, _Up>::type; 20472: 20472: static _Ptr 20472: pointer_to(__make_not_void& __e) 20472: { return _Ptr::pointer_to(__e); } 20472: 20472: static_assert(!is_same::value, 20472: "pointer type defines element_type or is like SomePointer"); 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct pointer_traits<_Tp*> 20472: { 20472: 20472: typedef _Tp* pointer; 20472: 20472: typedef _Tp element_type; 20472: 20472: typedef ptrdiff_t difference_type; 20472: 20472: template 20472: using rebind = _Up*; 20472: 20472: 20472: 20472: 20472: 20472: 20472: static pointer 20472: pointer_to(__make_not_void& __r) noexcept 20472: { return std::addressof(__r); } 20472: }; 20472: 20472: 20472: template 20472: using __ptr_rebind = typename pointer_traits<_Ptr>::template rebind<_Tp>; 20472: 20472: template 20472: constexpr _Tp* 20472: __to_address(_Tp* __ptr) noexcept 20472: { 20472: static_assert(!std::is_function<_Tp>::value, "not a function pointer"); 20472: return __ptr; 20472: } 20472: 20472: 20472: template 20472: constexpr typename std::pointer_traits<_Ptr>::element_type* 20472: __to_address(const _Ptr& __ptr) 20472: { return std::__to_address(__ptr.operator->()); } 20472: # 210 "/usr/include/c++/10/bits/ptr_traits.h" 3 20472: 20472: } 20472: # 67 "/usr/include/c++/10/bits/stl_iterator.h" 2 3 20472: # 85 "/usr/include/c++/10/bits/stl_iterator.h" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: # 124 "/usr/include/c++/10/bits/stl_iterator.h" 3 20472: template 20472: class reverse_iterator 20472: : public iterator::iterator_category, 20472: typename iterator_traits<_Iterator>::value_type, 20472: typename iterator_traits<_Iterator>::difference_type, 20472: typename iterator_traits<_Iterator>::pointer, 20472: typename iterator_traits<_Iterator>::reference> 20472: { 20472: protected: 20472: _Iterator current; 20472: 20472: typedef iterator_traits<_Iterator> __traits_type; 20472: 20472: public: 20472: typedef _Iterator iterator_type; 20472: typedef typename __traits_type::difference_type difference_type; 20472: typedef typename __traits_type::pointer pointer; 20472: typedef typename __traits_type::reference reference; 20472: # 160 "/usr/include/c++/10/bits/stl_iterator.h" 3 20472: 20472: reverse_iterator() : current() { } 20472: 20472: 20472: 20472: 20472: explicit 20472: reverse_iterator(iterator_type __x) : current(__x) { } 20472: 20472: 20472: 20472: 20472: 20472: reverse_iterator(const reverse_iterator& __x) 20472: : current(__x.current) { } 20472: 20472: 20472: reverse_iterator& operator=(const reverse_iterator&) = default; 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: 20472: reverse_iterator(const reverse_iterator<_Iter>& __x) 20472: : current(__x.base()) { } 20472: 20472: 20472: 20472: 20472: iterator_type 20472: base() const 20472: { return current; } 20472: # 206 "/usr/include/c++/10/bits/stl_iterator.h" 3 20472: reference 20472: operator*() const 20472: { 20472: _Iterator __tmp = current; 20472: return *--__tmp; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: pointer 20472: operator->() const 20472: 20472: 20472: 20472: 20472: { 20472: 20472: 20472: _Iterator __tmp = current; 20472: --__tmp; 20472: return _S_to_pointer(__tmp); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: reverse_iterator& 20472: operator++() 20472: { 20472: --current; 20472: return *this; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: reverse_iterator 20472: operator++(int) 20472: { 20472: reverse_iterator __tmp = *this; 20472: --current; 20472: return __tmp; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: reverse_iterator& 20472: operator--() 20472: { 20472: ++current; 20472: return *this; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: reverse_iterator 20472: operator--(int) 20472: { 20472: reverse_iterator __tmp = *this; 20472: ++current; 20472: return __tmp; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: reverse_iterator 20472: operator+(difference_type __n) const 20472: { return reverse_iterator(current - __n); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: reverse_iterator& 20472: operator+=(difference_type __n) 20472: { 20472: current -= __n; 20472: return *this; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: reverse_iterator 20472: operator-(difference_type __n) const 20472: { return reverse_iterator(current + __n); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: reverse_iterator& 20472: operator-=(difference_type __n) 20472: { 20472: current += __n; 20472: return *this; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: reference 20472: operator[](difference_type __n) const 20472: { return *(*this + __n); } 20472: # 360 "/usr/include/c++/10/bits/stl_iterator.h" 3 20472: private: 20472: template 20472: static _Tp* 20472: _S_to_pointer(_Tp* __p) 20472: { return __p; } 20472: 20472: template 20472: static pointer 20472: _S_to_pointer(_Tp __t) 20472: { return __t.operator->(); } 20472: }; 20472: # 383 "/usr/include/c++/10/bits/stl_iterator.h" 3 20472: template 20472: inline bool 20472: operator==(const reverse_iterator<_Iterator>& __x, 20472: const reverse_iterator<_Iterator>& __y) 20472: { return __x.base() == __y.base(); } 20472: 20472: template 20472: inline bool 20472: operator<(const reverse_iterator<_Iterator>& __x, 20472: const reverse_iterator<_Iterator>& __y) 20472: { return __y.base() < __x.base(); } 20472: 20472: template 20472: inline bool 20472: operator!=(const reverse_iterator<_Iterator>& __x, 20472: const reverse_iterator<_Iterator>& __y) 20472: { return !(__x == __y); } 20472: 20472: template 20472: inline bool 20472: operator>(const reverse_iterator<_Iterator>& __x, 20472: const reverse_iterator<_Iterator>& __y) 20472: { return __y < __x; } 20472: 20472: template 20472: inline bool 20472: operator<=(const reverse_iterator<_Iterator>& __x, 20472: const reverse_iterator<_Iterator>& __y) 20472: { return !(__y < __x); } 20472: 20472: template 20472: inline bool 20472: operator>=(const reverse_iterator<_Iterator>& __x, 20472: const reverse_iterator<_Iterator>& __y) 20472: { return !(__x < __y); } 20472: 20472: 20472: 20472: template 20472: inline bool 20472: operator==(const reverse_iterator<_IteratorL>& __x, 20472: const reverse_iterator<_IteratorR>& __y) 20472: { return __x.base() == __y.base(); } 20472: 20472: template 20472: inline bool 20472: operator<(const reverse_iterator<_IteratorL>& __x, 20472: const reverse_iterator<_IteratorR>& __y) 20472: { return __y.base() < __x.base(); } 20472: 20472: template 20472: inline bool 20472: operator!=(const reverse_iterator<_IteratorL>& __x, 20472: const reverse_iterator<_IteratorR>& __y) 20472: { return !(__x == __y); } 20472: 20472: template 20472: inline bool 20472: operator>(const reverse_iterator<_IteratorL>& __x, 20472: const reverse_iterator<_IteratorR>& __y) 20472: { return __y < __x; } 20472: 20472: template 20472: inline bool 20472: operator<=(const reverse_iterator<_IteratorL>& __x, 20472: const reverse_iterator<_IteratorR>& __y) 20472: { return !(__y < __x); } 20472: 20472: template 20472: inline bool 20472: operator>=(const reverse_iterator<_IteratorL>& __x, 20472: const reverse_iterator<_IteratorR>& __y) 20472: { return !(__x < __y); } 20472: # 523 "/usr/include/c++/10/bits/stl_iterator.h" 3 20472: template 20472: inline auto 20472: operator-(const reverse_iterator<_IteratorL>& __x, 20472: const reverse_iterator<_IteratorR>& __y) 20472: -> decltype(__y.base() - __x.base()) 20472: { return __y.base() - __x.base(); } 20472: 20472: 20472: template 20472: inline reverse_iterator<_Iterator> 20472: operator+(typename reverse_iterator<_Iterator>::difference_type __n, 20472: const reverse_iterator<_Iterator>& __x) 20472: { return reverse_iterator<_Iterator>(__x.base() - __n); } 20472: 20472: 20472: 20472: template 20472: inline reverse_iterator<_Iterator> 20472: __make_reverse_iterator(_Iterator __i) 20472: { return reverse_iterator<_Iterator>(__i); } 20472: # 564 "/usr/include/c++/10/bits/stl_iterator.h" 3 20472: template 20472: 20472: auto 20472: __niter_base(reverse_iterator<_Iterator> __it) 20472: -> decltype(__make_reverse_iterator(__niter_base(__it.base()))) 20472: { return __make_reverse_iterator(__niter_base(__it.base())); } 20472: 20472: template 20472: struct __is_move_iterator > 20472: : __is_move_iterator<_Iterator> 20472: { }; 20472: 20472: template 20472: 20472: auto 20472: __miter_base(reverse_iterator<_Iterator> __it) 20472: -> decltype(__make_reverse_iterator(__miter_base(__it.base()))) 20472: { return __make_reverse_iterator(__miter_base(__it.base())); } 20472: # 595 "/usr/include/c++/10/bits/stl_iterator.h" 3 20472: template 20472: class back_insert_iterator 20472: : public iterator 20472: { 20472: protected: 20472: _Container* container; 20472: 20472: public: 20472: 20472: typedef _Container container_type; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: explicit 20472: back_insert_iterator(_Container& __x) 20472: : container(std::__addressof(__x)) { } 20472: # 635 "/usr/include/c++/10/bits/stl_iterator.h" 3 20472: 20472: back_insert_iterator& 20472: operator=(const typename _Container::value_type& __value) 20472: { 20472: container->push_back(__value); 20472: return *this; 20472: } 20472: 20472: 20472: back_insert_iterator& 20472: operator=(typename _Container::value_type&& __value) 20472: { 20472: container->push_back(std::move(__value)); 20472: return *this; 20472: } 20472: 20472: 20472: 20472: 20472: back_insert_iterator& 20472: operator*() 20472: { return *this; } 20472: 20472: 20472: 20472: back_insert_iterator& 20472: operator++() 20472: { return *this; } 20472: 20472: 20472: 20472: back_insert_iterator 20472: operator++(int) 20472: { return *this; } 20472: }; 20472: # 682 "/usr/include/c++/10/bits/stl_iterator.h" 3 20472: template 20472: 20472: inline back_insert_iterator<_Container> 20472: back_inserter(_Container& __x) 20472: { return back_insert_iterator<_Container>(__x); } 20472: # 698 "/usr/include/c++/10/bits/stl_iterator.h" 3 20472: template 20472: class front_insert_iterator 20472: : public iterator 20472: { 20472: protected: 20472: _Container* container; 20472: 20472: public: 20472: 20472: typedef _Container container_type; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: explicit 20472: front_insert_iterator(_Container& __x) 20472: : container(std::__addressof(__x)) { } 20472: # 738 "/usr/include/c++/10/bits/stl_iterator.h" 3 20472: 20472: front_insert_iterator& 20472: operator=(const typename _Container::value_type& __value) 20472: { 20472: container->push_front(__value); 20472: return *this; 20472: } 20472: 20472: 20472: front_insert_iterator& 20472: operator=(typename _Container::value_type&& __value) 20472: { 20472: container->push_front(std::move(__value)); 20472: return *this; 20472: } 20472: 20472: 20472: 20472: 20472: front_insert_iterator& 20472: operator*() 20472: { return *this; } 20472: 20472: 20472: 20472: front_insert_iterator& 20472: operator++() 20472: { return *this; } 20472: 20472: 20472: 20472: front_insert_iterator 20472: operator++(int) 20472: { return *this; } 20472: }; 20472: # 785 "/usr/include/c++/10/bits/stl_iterator.h" 3 20472: template 20472: 20472: inline front_insert_iterator<_Container> 20472: front_inserter(_Container& __x) 20472: { return front_insert_iterator<_Container>(__x); } 20472: # 805 "/usr/include/c++/10/bits/stl_iterator.h" 3 20472: template 20472: class insert_iterator 20472: : public iterator 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: typedef typename _Container::iterator _Iter; 20472: 20472: protected: 20472: _Container* container; 20472: _Iter iter; 20472: 20472: 20472: public: 20472: 20472: typedef _Container container_type; 20472: # 837 "/usr/include/c++/10/bits/stl_iterator.h" 3 20472: 20472: insert_iterator(_Container& __x, _Iter __i) 20472: : container(std::__addressof(__x)), iter(__i) {} 20472: # 873 "/usr/include/c++/10/bits/stl_iterator.h" 3 20472: 20472: insert_iterator& 20472: operator=(const typename _Container::value_type& __value) 20472: { 20472: iter = container->insert(iter, __value); 20472: ++iter; 20472: return *this; 20472: } 20472: 20472: 20472: insert_iterator& 20472: operator=(typename _Container::value_type&& __value) 20472: { 20472: iter = container->insert(iter, std::move(__value)); 20472: ++iter; 20472: return *this; 20472: } 20472: 20472: 20472: 20472: 20472: insert_iterator& 20472: operator*() 20472: { return *this; } 20472: 20472: 20472: 20472: insert_iterator& 20472: operator++() 20472: { return *this; } 20472: 20472: 20472: 20472: insert_iterator& 20472: operator++(int) 20472: { return *this; } 20472: }; 20472: # 929 "/usr/include/c++/10/bits/stl_iterator.h" 3 20472: template 20472: inline insert_iterator<_Container> 20472: inserter(_Container& __x, _Iterator __i) 20472: { 20472: return insert_iterator<_Container>(__x, 20472: typename _Container::iterator(__i)); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: } 20472: 20472: namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: # 954 "/usr/include/c++/10/bits/stl_iterator.h" 3 20472: template 20472: class __normal_iterator 20472: { 20472: protected: 20472: _Iterator _M_current; 20472: 20472: typedef std::iterator_traits<_Iterator> __traits_type; 20472: 20472: public: 20472: typedef _Iterator iterator_type; 20472: typedef typename __traits_type::iterator_category iterator_category; 20472: typedef typename __traits_type::value_type value_type; 20472: typedef typename __traits_type::difference_type difference_type; 20472: typedef typename __traits_type::reference reference; 20472: typedef typename __traits_type::pointer pointer; 20472: 20472: 20472: 20472: 20472: 20472: constexpr __normal_iterator() noexcept 20472: : _M_current(_Iterator()) { } 20472: 20472: explicit 20472: __normal_iterator(const _Iterator& __i) noexcept 20472: : _M_current(__i) { } 20472: 20472: 20472: template 20472: 20472: __normal_iterator(const __normal_iterator<_Iter, 20472: typename __enable_if< 20472: (std::__are_same<_Iter, typename _Container::pointer>::__value), 20472: _Container>::__type>& __i) noexcept 20472: : _M_current(__i.base()) { } 20472: 20472: 20472: 20472: reference 20472: operator*() const noexcept 20472: { return *_M_current; } 20472: 20472: 20472: pointer 20472: operator->() const noexcept 20472: { return _M_current; } 20472: 20472: 20472: __normal_iterator& 20472: operator++() noexcept 20472: { 20472: ++_M_current; 20472: return *this; 20472: } 20472: 20472: 20472: __normal_iterator 20472: operator++(int) noexcept 20472: { return __normal_iterator(_M_current++); } 20472: 20472: 20472: 20472: __normal_iterator& 20472: operator--() noexcept 20472: { 20472: --_M_current; 20472: return *this; 20472: } 20472: 20472: 20472: __normal_iterator 20472: operator--(int) noexcept 20472: { return __normal_iterator(_M_current--); } 20472: 20472: 20472: 20472: reference 20472: operator[](difference_type __n) const noexcept 20472: { return _M_current[__n]; } 20472: 20472: 20472: __normal_iterator& 20472: operator+=(difference_type __n) noexcept 20472: { _M_current += __n; return *this; } 20472: 20472: 20472: __normal_iterator 20472: operator+(difference_type __n) const noexcept 20472: { return __normal_iterator(_M_current + __n); } 20472: 20472: 20472: __normal_iterator& 20472: operator-=(difference_type __n) noexcept 20472: { _M_current -= __n; return *this; } 20472: 20472: 20472: __normal_iterator 20472: operator-(difference_type __n) const noexcept 20472: { return __normal_iterator(_M_current - __n); } 20472: 20472: 20472: const _Iterator& 20472: base() const noexcept 20472: { return _M_current; } 20472: }; 20472: # 1086 "/usr/include/c++/10/bits/stl_iterator.h" 3 20472: template 20472: 20472: inline bool 20472: operator==(const __normal_iterator<_IteratorL, _Container>& __lhs, 20472: const __normal_iterator<_IteratorR, _Container>& __rhs) 20472: noexcept 20472: { return __lhs.base() == __rhs.base(); } 20472: 20472: template 20472: 20472: inline bool 20472: operator==(const __normal_iterator<_Iterator, _Container>& __lhs, 20472: const __normal_iterator<_Iterator, _Container>& __rhs) 20472: noexcept 20472: { return __lhs.base() == __rhs.base(); } 20472: 20472: template 20472: 20472: inline bool 20472: operator!=(const __normal_iterator<_IteratorL, _Container>& __lhs, 20472: const __normal_iterator<_IteratorR, _Container>& __rhs) 20472: noexcept 20472: { return __lhs.base() != __rhs.base(); } 20472: 20472: template 20472: 20472: inline bool 20472: operator!=(const __normal_iterator<_Iterator, _Container>& __lhs, 20472: const __normal_iterator<_Iterator, _Container>& __rhs) 20472: noexcept 20472: { return __lhs.base() != __rhs.base(); } 20472: 20472: 20472: template 20472: inline bool 20472: operator<(const __normal_iterator<_IteratorL, _Container>& __lhs, 20472: const __normal_iterator<_IteratorR, _Container>& __rhs) 20472: noexcept 20472: { return __lhs.base() < __rhs.base(); } 20472: 20472: template 20472: 20472: inline bool 20472: operator<(const __normal_iterator<_Iterator, _Container>& __lhs, 20472: const __normal_iterator<_Iterator, _Container>& __rhs) 20472: noexcept 20472: { return __lhs.base() < __rhs.base(); } 20472: 20472: template 20472: inline bool 20472: operator>(const __normal_iterator<_IteratorL, _Container>& __lhs, 20472: const __normal_iterator<_IteratorR, _Container>& __rhs) 20472: noexcept 20472: { return __lhs.base() > __rhs.base(); } 20472: 20472: template 20472: 20472: inline bool 20472: operator>(const __normal_iterator<_Iterator, _Container>& __lhs, 20472: const __normal_iterator<_Iterator, _Container>& __rhs) 20472: noexcept 20472: { return __lhs.base() > __rhs.base(); } 20472: 20472: template 20472: inline bool 20472: operator<=(const __normal_iterator<_IteratorL, _Container>& __lhs, 20472: const __normal_iterator<_IteratorR, _Container>& __rhs) 20472: noexcept 20472: { return __lhs.base() <= __rhs.base(); } 20472: 20472: template 20472: 20472: inline bool 20472: operator<=(const __normal_iterator<_Iterator, _Container>& __lhs, 20472: const __normal_iterator<_Iterator, _Container>& __rhs) 20472: noexcept 20472: { return __lhs.base() <= __rhs.base(); } 20472: 20472: template 20472: inline bool 20472: operator>=(const __normal_iterator<_IteratorL, _Container>& __lhs, 20472: const __normal_iterator<_IteratorR, _Container>& __rhs) 20472: noexcept 20472: { return __lhs.base() >= __rhs.base(); } 20472: 20472: template 20472: 20472: inline bool 20472: operator>=(const __normal_iterator<_Iterator, _Container>& __lhs, 20472: const __normal_iterator<_Iterator, _Container>& __rhs) 20472: noexcept 20472: { return __lhs.base() >= __rhs.base(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: 20472: 20472: 20472: inline auto 20472: operator-(const __normal_iterator<_IteratorL, _Container>& __lhs, 20472: const __normal_iterator<_IteratorR, _Container>& __rhs) noexcept 20472: -> decltype(__lhs.base() - __rhs.base()) 20472: 20472: 20472: 20472: 20472: 20472: { return __lhs.base() - __rhs.base(); } 20472: 20472: template 20472: 20472: inline typename __normal_iterator<_Iterator, _Container>::difference_type 20472: operator-(const __normal_iterator<_Iterator, _Container>& __lhs, 20472: const __normal_iterator<_Iterator, _Container>& __rhs) 20472: noexcept 20472: { return __lhs.base() - __rhs.base(); } 20472: 20472: template 20472: 20472: inline __normal_iterator<_Iterator, _Container> 20472: operator+(typename __normal_iterator<_Iterator, _Container>::difference_type 20472: __n, const __normal_iterator<_Iterator, _Container>& __i) 20472: noexcept 20472: { return __normal_iterator<_Iterator, _Container>(__i.base() + __n); } 20472: 20472: 20472: } 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: template 20472: 20472: _Iterator 20472: __niter_base(__gnu_cxx::__normal_iterator<_Iterator, _Container> __it) 20472: noexcept(std::is_nothrow_copy_constructible<_Iterator>::value) 20472: { return __it.base(); } 20472: # 1285 "/usr/include/c++/10/bits/stl_iterator.h" 3 20472: template 20472: class move_iterator 20472: { 20472: _Iterator _M_current; 20472: 20472: using __traits_type = iterator_traits<_Iterator>; 20472: 20472: 20472: 20472: using __base_ref = typename __traits_type::reference; 20472: 20472: 20472: public: 20472: using iterator_type = _Iterator; 20472: # 1309 "/usr/include/c++/10/bits/stl_iterator.h" 3 20472: typedef typename __traits_type::iterator_category iterator_category; 20472: typedef typename __traits_type::value_type value_type; 20472: typedef typename __traits_type::difference_type difference_type; 20472: 20472: typedef _Iterator pointer; 20472: 20472: 20472: typedef typename conditional::value, 20472: typename remove_reference<__base_ref>::type&&, 20472: __base_ref>::type reference; 20472: 20472: 20472: 20472: move_iterator() 20472: : _M_current() { } 20472: 20472: explicit 20472: move_iterator(iterator_type __i) 20472: : _M_current(std::move(__i)) { } 20472: 20472: template 20472: 20472: move_iterator(const move_iterator<_Iter>& __i) 20472: : _M_current(__i.base()) { } 20472: 20472: 20472: iterator_type 20472: base() const 20472: { return _M_current; } 20472: # 1351 "/usr/include/c++/10/bits/stl_iterator.h" 3 20472: reference 20472: operator*() const 20472: 20472: 20472: 20472: { return static_cast(*_M_current); } 20472: 20472: 20472: pointer 20472: operator->() const 20472: { return _M_current; } 20472: 20472: move_iterator& 20472: operator++() 20472: { 20472: ++_M_current; 20472: return *this; 20472: } 20472: 20472: move_iterator 20472: operator++(int) 20472: { 20472: move_iterator __tmp = *this; 20472: ++_M_current; 20472: return __tmp; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: move_iterator& 20472: operator--() 20472: { 20472: --_M_current; 20472: return *this; 20472: } 20472: 20472: move_iterator 20472: operator--(int) 20472: { 20472: move_iterator __tmp = *this; 20472: --_M_current; 20472: return __tmp; 20472: } 20472: 20472: move_iterator 20472: operator+(difference_type __n) const 20472: { return move_iterator(_M_current + __n); } 20472: 20472: move_iterator& 20472: operator+=(difference_type __n) 20472: { 20472: _M_current += __n; 20472: return *this; 20472: } 20472: 20472: move_iterator 20472: operator-(difference_type __n) const 20472: { return move_iterator(_M_current - __n); } 20472: 20472: move_iterator& 20472: operator-=(difference_type __n) 20472: { 20472: _M_current -= __n; 20472: return *this; 20472: } 20472: 20472: reference 20472: operator[](difference_type __n) const 20472: 20472: 20472: 20472: { return std::move(_M_current[__n]); } 20472: # 1456 "/usr/include/c++/10/bits/stl_iterator.h" 3 20472: }; 20472: 20472: template 20472: inline bool 20472: operator==(const move_iterator<_IteratorL>& __x, 20472: const move_iterator<_IteratorR>& __y) 20472: 20472: 20472: 20472: { return __x.base() == __y.base(); } 20472: # 1475 "/usr/include/c++/10/bits/stl_iterator.h" 3 20472: template 20472: inline bool 20472: operator!=(const move_iterator<_IteratorL>& __x, 20472: const move_iterator<_IteratorR>& __y) 20472: { return !(__x == __y); } 20472: 20472: 20472: template 20472: inline bool 20472: operator<(const move_iterator<_IteratorL>& __x, 20472: const move_iterator<_IteratorR>& __y) 20472: 20472: 20472: 20472: { return __x.base() < __y.base(); } 20472: 20472: template 20472: inline bool 20472: operator<=(const move_iterator<_IteratorL>& __x, 20472: const move_iterator<_IteratorR>& __y) 20472: 20472: 20472: 20472: { return !(__y < __x); } 20472: 20472: template 20472: inline bool 20472: operator>(const move_iterator<_IteratorL>& __x, 20472: const move_iterator<_IteratorR>& __y) 20472: 20472: 20472: 20472: { return __y < __x; } 20472: 20472: template 20472: inline bool 20472: operator>=(const move_iterator<_IteratorL>& __x, 20472: const move_iterator<_IteratorR>& __y) 20472: 20472: 20472: 20472: { return !(__x < __y); } 20472: # 1526 "/usr/include/c++/10/bits/stl_iterator.h" 3 20472: template 20472: inline bool 20472: operator==(const move_iterator<_Iterator>& __x, 20472: const move_iterator<_Iterator>& __y) 20472: { return __x.base() == __y.base(); } 20472: 20472: template 20472: inline bool 20472: operator!=(const move_iterator<_Iterator>& __x, 20472: const move_iterator<_Iterator>& __y) 20472: { return !(__x == __y); } 20472: 20472: template 20472: inline bool 20472: operator<(const move_iterator<_Iterator>& __x, 20472: const move_iterator<_Iterator>& __y) 20472: { return __x.base() < __y.base(); } 20472: 20472: template 20472: inline bool 20472: operator<=(const move_iterator<_Iterator>& __x, 20472: const move_iterator<_Iterator>& __y) 20472: { return !(__y < __x); } 20472: 20472: template 20472: inline bool 20472: operator>(const move_iterator<_Iterator>& __x, 20472: const move_iterator<_Iterator>& __y) 20472: { return __y < __x; } 20472: 20472: template 20472: inline bool 20472: operator>=(const move_iterator<_Iterator>& __x, 20472: const move_iterator<_Iterator>& __y) 20472: { return !(__x < __y); } 20472: 20472: 20472: 20472: template 20472: inline auto 20472: operator-(const move_iterator<_IteratorL>& __x, 20472: const move_iterator<_IteratorR>& __y) 20472: -> decltype(__x.base() - __y.base()) 20472: { return __x.base() - __y.base(); } 20472: 20472: template 20472: inline move_iterator<_Iterator> 20472: operator+(typename move_iterator<_Iterator>::difference_type __n, 20472: const move_iterator<_Iterator>& __x) 20472: { return __x + __n; } 20472: 20472: template 20472: inline move_iterator<_Iterator> 20472: make_move_iterator(_Iterator __i) 20472: { return move_iterator<_Iterator>(std::move(__i)); } 20472: 20472: template::value_type>::value, 20472: _Iterator, move_iterator<_Iterator>>::type> 20472: inline _ReturnType 20472: __make_move_if_noexcept_iterator(_Iterator __i) 20472: { return _ReturnType(__i); } 20472: 20472: 20472: 20472: template::value, 20472: const _Tp*, move_iterator<_Tp*>>::type> 20472: inline _ReturnType 20472: __make_move_if_noexcept_iterator(_Tp* __i) 20472: { return _ReturnType(__i); } 20472: # 2183 "/usr/include/c++/10/bits/stl_iterator.h" 3 20472: template 20472: auto 20472: __niter_base(move_iterator<_Iterator> __it) 20472: -> decltype(make_move_iterator(__niter_base(__it.base()))) 20472: { return make_move_iterator(__niter_base(__it.base())); } 20472: 20472: template 20472: struct __is_move_iterator > 20472: { 20472: enum { __value = 1 }; 20472: typedef __true_type __type; 20472: }; 20472: 20472: template 20472: auto 20472: __miter_base(move_iterator<_Iterator> __it) 20472: -> decltype(__miter_base(__it.base())) 20472: { return __miter_base(__it.base()); } 20472: # 2230 "/usr/include/c++/10/bits/stl_iterator.h" 3 20472: 20472: } 20472: # 68 "/usr/include/c++/10/bits/stl_algobase.h" 2 3 20472: 20472: # 1 "/usr/include/c++/10/debug/debug.h" 1 3 20472: # 48 "/usr/include/c++/10/debug/debug.h" 3 20472: namespace std 20472: { 20472: namespace __debug { } 20472: } 20472: 20472: 20472: 20472: 20472: namespace __gnu_debug 20472: { 20472: using namespace std::__debug; 20472: 20472: template 20472: struct _Safe_iterator; 20472: } 20472: # 70 "/usr/include/c++/10/bits/stl_algobase.h" 2 3 20472: 20472: # 1 "/usr/include/c++/10/bits/predefined_ops.h" 1 3 20472: # 33 "/usr/include/c++/10/bits/predefined_ops.h" 3 20472: namespace __gnu_cxx 20472: { 20472: namespace __ops 20472: { 20472: struct _Iter_less_iter 20472: { 20472: template 20472: 20472: bool 20472: operator()(_Iterator1 __it1, _Iterator2 __it2) const 20472: { return *__it1 < *__it2; } 20472: }; 20472: 20472: 20472: inline _Iter_less_iter 20472: __iter_less_iter() 20472: { return _Iter_less_iter(); } 20472: 20472: struct _Iter_less_val 20472: { 20472: 20472: constexpr _Iter_less_val() = default; 20472: 20472: 20472: 20472: 20472: 20472: explicit 20472: _Iter_less_val(_Iter_less_iter) { } 20472: 20472: template 20472: 20472: bool 20472: operator()(_Iterator __it, _Value& __val) const 20472: { return *__it < __val; } 20472: }; 20472: 20472: 20472: inline _Iter_less_val 20472: __iter_less_val() 20472: { return _Iter_less_val(); } 20472: 20472: 20472: inline _Iter_less_val 20472: __iter_comp_val(_Iter_less_iter) 20472: { return _Iter_less_val(); } 20472: 20472: struct _Val_less_iter 20472: { 20472: 20472: constexpr _Val_less_iter() = default; 20472: 20472: 20472: 20472: 20472: 20472: explicit 20472: _Val_less_iter(_Iter_less_iter) { } 20472: 20472: template 20472: 20472: bool 20472: operator()(_Value& __val, _Iterator __it) const 20472: { return __val < *__it; } 20472: }; 20472: 20472: 20472: inline _Val_less_iter 20472: __val_less_iter() 20472: { return _Val_less_iter(); } 20472: 20472: 20472: inline _Val_less_iter 20472: __val_comp_iter(_Iter_less_iter) 20472: { return _Val_less_iter(); } 20472: 20472: struct _Iter_equal_to_iter 20472: { 20472: template 20472: 20472: bool 20472: operator()(_Iterator1 __it1, _Iterator2 __it2) const 20472: { return *__it1 == *__it2; } 20472: }; 20472: 20472: 20472: inline _Iter_equal_to_iter 20472: __iter_equal_to_iter() 20472: { return _Iter_equal_to_iter(); } 20472: 20472: struct _Iter_equal_to_val 20472: { 20472: template 20472: 20472: bool 20472: operator()(_Iterator __it, _Value& __val) const 20472: { return *__it == __val; } 20472: }; 20472: 20472: 20472: inline _Iter_equal_to_val 20472: __iter_equal_to_val() 20472: { return _Iter_equal_to_val(); } 20472: 20472: 20472: inline _Iter_equal_to_val 20472: __iter_comp_val(_Iter_equal_to_iter) 20472: { return _Iter_equal_to_val(); } 20472: 20472: template 20472: struct _Iter_comp_iter 20472: { 20472: _Compare _M_comp; 20472: 20472: explicit 20472: _Iter_comp_iter(_Compare __comp) 20472: : _M_comp(std::move(__comp)) 20472: { } 20472: 20472: template 20472: 20472: bool 20472: operator()(_Iterator1 __it1, _Iterator2 __it2) 20472: { return bool(_M_comp(*__it1, *__it2)); } 20472: }; 20472: 20472: template 20472: 20472: inline _Iter_comp_iter<_Compare> 20472: __iter_comp_iter(_Compare __comp) 20472: { return _Iter_comp_iter<_Compare>(std::move(__comp)); } 20472: 20472: template 20472: struct _Iter_comp_val 20472: { 20472: _Compare _M_comp; 20472: 20472: 20472: explicit 20472: _Iter_comp_val(_Compare __comp) 20472: : _M_comp(std::move(__comp)) 20472: { } 20472: 20472: 20472: explicit 20472: _Iter_comp_val(const _Iter_comp_iter<_Compare>& __comp) 20472: : _M_comp(__comp._M_comp) 20472: { } 20472: 20472: 20472: 20472: explicit 20472: _Iter_comp_val(_Iter_comp_iter<_Compare>&& __comp) 20472: : _M_comp(std::move(__comp._M_comp)) 20472: { } 20472: 20472: 20472: template 20472: 20472: bool 20472: operator()(_Iterator __it, _Value& __val) 20472: { return bool(_M_comp(*__it, __val)); } 20472: }; 20472: 20472: template 20472: 20472: inline _Iter_comp_val<_Compare> 20472: __iter_comp_val(_Compare __comp) 20472: { return _Iter_comp_val<_Compare>(std::move(__comp)); } 20472: 20472: template 20472: 20472: inline _Iter_comp_val<_Compare> 20472: __iter_comp_val(_Iter_comp_iter<_Compare> __comp) 20472: { return _Iter_comp_val<_Compare>(std::move(__comp)); } 20472: 20472: template 20472: struct _Val_comp_iter 20472: { 20472: _Compare _M_comp; 20472: 20472: 20472: explicit 20472: _Val_comp_iter(_Compare __comp) 20472: : _M_comp(std::move(__comp)) 20472: { } 20472: 20472: 20472: explicit 20472: _Val_comp_iter(const _Iter_comp_iter<_Compare>& __comp) 20472: : _M_comp(__comp._M_comp) 20472: { } 20472: 20472: 20472: 20472: explicit 20472: _Val_comp_iter(_Iter_comp_iter<_Compare>&& __comp) 20472: : _M_comp(std::move(__comp._M_comp)) 20472: { } 20472: 20472: 20472: template 20472: 20472: bool 20472: operator()(_Value& __val, _Iterator __it) 20472: { return bool(_M_comp(__val, *__it)); } 20472: }; 20472: 20472: template 20472: 20472: inline _Val_comp_iter<_Compare> 20472: __val_comp_iter(_Compare __comp) 20472: { return _Val_comp_iter<_Compare>(std::move(__comp)); } 20472: 20472: template 20472: 20472: inline _Val_comp_iter<_Compare> 20472: __val_comp_iter(_Iter_comp_iter<_Compare> __comp) 20472: { return _Val_comp_iter<_Compare>(std::move(__comp)); } 20472: 20472: template 20472: struct _Iter_equals_val 20472: { 20472: _Value& _M_value; 20472: 20472: 20472: explicit 20472: _Iter_equals_val(_Value& __value) 20472: : _M_value(__value) 20472: { } 20472: 20472: template 20472: 20472: bool 20472: operator()(_Iterator __it) 20472: { return *__it == _M_value; } 20472: }; 20472: 20472: template 20472: 20472: inline _Iter_equals_val<_Value> 20472: __iter_equals_val(_Value& __val) 20472: { return _Iter_equals_val<_Value>(__val); } 20472: 20472: template 20472: struct _Iter_equals_iter 20472: { 20472: _Iterator1 _M_it1; 20472: 20472: 20472: explicit 20472: _Iter_equals_iter(_Iterator1 __it1) 20472: : _M_it1(__it1) 20472: { } 20472: 20472: template 20472: 20472: bool 20472: operator()(_Iterator2 __it2) 20472: { return *__it2 == *_M_it1; } 20472: }; 20472: 20472: template 20472: 20472: inline _Iter_equals_iter<_Iterator> 20472: __iter_comp_iter(_Iter_equal_to_iter, _Iterator __it) 20472: { return _Iter_equals_iter<_Iterator>(__it); } 20472: 20472: template 20472: struct _Iter_pred 20472: { 20472: _Predicate _M_pred; 20472: 20472: 20472: explicit 20472: _Iter_pred(_Predicate __pred) 20472: : _M_pred(std::move(__pred)) 20472: { } 20472: 20472: template 20472: 20472: bool 20472: operator()(_Iterator __it) 20472: { return bool(_M_pred(*__it)); } 20472: }; 20472: 20472: template 20472: 20472: inline _Iter_pred<_Predicate> 20472: __pred_iter(_Predicate __pred) 20472: { return _Iter_pred<_Predicate>(std::move(__pred)); } 20472: 20472: template 20472: struct _Iter_comp_to_val 20472: { 20472: _Compare _M_comp; 20472: _Value& _M_value; 20472: 20472: 20472: _Iter_comp_to_val(_Compare __comp, _Value& __value) 20472: : _M_comp(std::move(__comp)), _M_value(__value) 20472: { } 20472: 20472: template 20472: 20472: bool 20472: operator()(_Iterator __it) 20472: { return bool(_M_comp(*__it, _M_value)); } 20472: }; 20472: 20472: template 20472: _Iter_comp_to_val<_Compare, _Value> 20472: 20472: __iter_comp_val(_Compare __comp, _Value &__val) 20472: { 20472: return _Iter_comp_to_val<_Compare, _Value>(std::move(__comp), __val); 20472: } 20472: 20472: template 20472: struct _Iter_comp_to_iter 20472: { 20472: _Compare _M_comp; 20472: _Iterator1 _M_it1; 20472: 20472: 20472: _Iter_comp_to_iter(_Compare __comp, _Iterator1 __it1) 20472: : _M_comp(std::move(__comp)), _M_it1(__it1) 20472: { } 20472: 20472: template 20472: 20472: bool 20472: operator()(_Iterator2 __it2) 20472: { return bool(_M_comp(*__it2, *_M_it1)); } 20472: }; 20472: 20472: template 20472: 20472: inline _Iter_comp_to_iter<_Compare, _Iterator> 20472: __iter_comp_iter(_Iter_comp_iter<_Compare> __comp, _Iterator __it) 20472: { 20472: return _Iter_comp_to_iter<_Compare, _Iterator>( 20472: std::move(__comp._M_comp), __it); 20472: } 20472: 20472: template 20472: struct _Iter_negate 20472: { 20472: _Predicate _M_pred; 20472: 20472: 20472: explicit 20472: _Iter_negate(_Predicate __pred) 20472: : _M_pred(std::move(__pred)) 20472: { } 20472: 20472: template 20472: 20472: bool 20472: operator()(_Iterator __it) 20472: { return !bool(_M_pred(*__it)); } 20472: }; 20472: 20472: template 20472: 20472: inline _Iter_negate<_Predicate> 20472: __negate(_Iter_pred<_Predicate> __pred) 20472: { return _Iter_negate<_Predicate>(std::move(__pred._M_pred)); } 20472: 20472: } 20472: } 20472: # 72 "/usr/include/c++/10/bits/stl_algobase.h" 2 3 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: 20472: inline int 20472: __memcmp(const _Tp* __first1, const _Up* __first2, size_t __num) 20472: { 20472: 20472: static_assert(sizeof(_Tp) == sizeof(_Up), "can be compared with memcmp"); 20472: # 105 "/usr/include/c++/10/bits/stl_algobase.h" 3 20472: return __builtin_memcmp(__first1, __first2, sizeof(_Tp) * __num); 20472: } 20472: # 149 "/usr/include/c++/10/bits/stl_algobase.h" 3 20472: template 20472: 20472: inline void 20472: iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) 20472: { 20472: 20472: 20472: 20472: 20472: # 182 "/usr/include/c++/10/bits/stl_algobase.h" 3 20472: swap(*__a, *__b); 20472: 20472: } 20472: # 198 "/usr/include/c++/10/bits/stl_algobase.h" 3 20472: template 20472: 20472: _ForwardIterator2 20472: swap_ranges(_ForwardIterator1 __first1, _ForwardIterator1 __last1, 20472: _ForwardIterator2 __first2) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: 20472: for (; __first1 != __last1; ++__first1, (void)++__first2) 20472: std::iter_swap(__first1, __first2); 20472: return __first2; 20472: } 20472: # 227 "/usr/include/c++/10/bits/stl_algobase.h" 3 20472: template 20472: 20472: inline const _Tp& 20472: min(const _Tp& __a, const _Tp& __b) 20472: { 20472: 20472: 20472: 20472: if (__b < __a) 20472: return __b; 20472: return __a; 20472: } 20472: # 251 "/usr/include/c++/10/bits/stl_algobase.h" 3 20472: template 20472: 20472: inline const _Tp& 20472: max(const _Tp& __a, const _Tp& __b) 20472: { 20472: 20472: 20472: 20472: if (__a < __b) 20472: return __b; 20472: return __a; 20472: } 20472: # 275 "/usr/include/c++/10/bits/stl_algobase.h" 3 20472: template 20472: 20472: inline const _Tp& 20472: min(const _Tp& __a, const _Tp& __b, _Compare __comp) 20472: { 20472: 20472: if (__comp(__b, __a)) 20472: return __b; 20472: return __a; 20472: } 20472: # 297 "/usr/include/c++/10/bits/stl_algobase.h" 3 20472: template 20472: 20472: inline const _Tp& 20472: max(const _Tp& __a, const _Tp& __b, _Compare __comp) 20472: { 20472: 20472: if (__comp(__a, __b)) 20472: return __b; 20472: return __a; 20472: } 20472: 20472: 20472: 20472: template 20472: 20472: inline _Iterator 20472: __niter_base(_Iterator __it) 20472: noexcept(std::is_nothrow_copy_constructible<_Iterator>::value) 20472: { return __it; } 20472: 20472: 20472: 20472: 20472: template 20472: 20472: inline _From 20472: __niter_wrap(_From __from, _To __res) 20472: { return __from + (__res - std::__niter_base(__from)); } 20472: 20472: 20472: template 20472: 20472: inline _Iterator 20472: __niter_wrap(const _Iterator&, _Iterator __res) 20472: { return __res; } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct __copy_move 20472: { 20472: template 20472: 20472: static _OI 20472: __copy_m(_II __first, _II __last, _OI __result) 20472: { 20472: for (; __first != __last; ++__result, (void)++__first) 20472: *__result = *__first; 20472: return __result; 20472: } 20472: }; 20472: 20472: 20472: template 20472: struct __copy_move 20472: { 20472: template 20472: 20472: static _OI 20472: __copy_m(_II __first, _II __last, _OI __result) 20472: { 20472: for (; __first != __last; ++__result, (void)++__first) 20472: *__result = std::move(*__first); 20472: return __result; 20472: } 20472: }; 20472: 20472: 20472: template<> 20472: struct __copy_move 20472: { 20472: template 20472: 20472: static _OI 20472: __copy_m(_II __first, _II __last, _OI __result) 20472: { 20472: typedef typename iterator_traits<_II>::difference_type _Distance; 20472: for(_Distance __n = __last - __first; __n > 0; --__n) 20472: { 20472: *__result = *__first; 20472: ++__first; 20472: ++__result; 20472: } 20472: return __result; 20472: } 20472: }; 20472: 20472: 20472: template<> 20472: struct __copy_move 20472: { 20472: template 20472: 20472: static _OI 20472: __copy_m(_II __first, _II __last, _OI __result) 20472: { 20472: typedef typename iterator_traits<_II>::difference_type _Distance; 20472: for(_Distance __n = __last - __first; __n > 0; --__n) 20472: { 20472: *__result = std::move(*__first); 20472: ++__first; 20472: ++__result; 20472: } 20472: return __result; 20472: } 20472: }; 20472: 20472: 20472: template 20472: struct __copy_move<_IsMove, true, random_access_iterator_tag> 20472: { 20472: template 20472: 20472: static _Tp* 20472: __copy_m(const _Tp* __first, const _Tp* __last, _Tp* __result) 20472: { 20472: 20472: using __assignable = conditional<_IsMove, 20472: is_move_assignable<_Tp>, 20472: is_copy_assignable<_Tp>>; 20472: 20472: static_assert( __assignable::type::value, "type is not assignable" ); 20472: 20472: const ptrdiff_t _Num = __last - __first; 20472: if (_Num) 20472: __builtin_memmove(__result, __first, sizeof(_Tp) * _Num); 20472: return __result + _Num; 20472: } 20472: }; 20472: 20472: 20472: 20472: template 20472: struct char_traits; 20472: 20472: template 20472: class istreambuf_iterator; 20472: 20472: template 20472: class ostreambuf_iterator; 20472: 20472: template 20472: typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, 20472: ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type 20472: __copy_move_a2(_CharT*, _CharT*, 20472: ostreambuf_iterator<_CharT, char_traits<_CharT> >); 20472: 20472: template 20472: typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, 20472: ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type 20472: __copy_move_a2(const _CharT*, const _CharT*, 20472: ostreambuf_iterator<_CharT, char_traits<_CharT> >); 20472: 20472: template 20472: typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, 20472: _CharT*>::__type 20472: __copy_move_a2(istreambuf_iterator<_CharT, char_traits<_CharT> >, 20472: istreambuf_iterator<_CharT, char_traits<_CharT> >, _CharT*); 20472: 20472: template 20472: 20472: inline _OI 20472: __copy_move_a2(_II __first, _II __last, _OI __result) 20472: { 20472: typedef typename iterator_traits<_II>::iterator_category _Category; 20472: 20472: 20472: 20472: 20472: 20472: return std::__copy_move<_IsMove, __memcpyable<_OI, _II>::__value, 20472: _Category>::__copy_m(__first, __last, __result); 20472: } 20472: 20472: 20472: 20472: template 20472: struct _Deque_iterator; 20472: 20472: 20472: 20472: template 20472: _OI 20472: __copy_move_a1(std::_Deque_iterator<_Tp, _Ref, _Ptr>, 20472: std::_Deque_iterator<_Tp, _Ref, _Ptr>, 20472: _OI); 20472: 20472: template 20472: std::_Deque_iterator<_OTp, _OTp&, _OTp*> 20472: __copy_move_a1(std::_Deque_iterator<_ITp, _IRef, _IPtr>, 20472: std::_Deque_iterator<_ITp, _IRef, _IPtr>, 20472: std::_Deque_iterator<_OTp, _OTp&, _OTp*>); 20472: 20472: template 20472: typename __gnu_cxx::__enable_if< 20472: __is_random_access_iter<_II>::__value, 20472: std::_Deque_iterator<_Tp, _Tp&, _Tp*> >::__type 20472: __copy_move_a1(_II, _II, std::_Deque_iterator<_Tp, _Tp&, _Tp*>); 20472: 20472: template 20472: 20472: inline _OI 20472: __copy_move_a1(_II __first, _II __last, _OI __result) 20472: { return std::__copy_move_a2<_IsMove>(__first, __last, __result); } 20472: 20472: template 20472: 20472: inline _OI 20472: __copy_move_a(_II __first, _II __last, _OI __result) 20472: { 20472: return std::__niter_wrap(__result, 20472: std::__copy_move_a1<_IsMove>(std::__niter_base(__first), 20472: std::__niter_base(__last), 20472: std::__niter_base(__result))); 20472: } 20472: 20472: template 20472: _OI 20472: __copy_move_a(const ::__gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat>&, 20472: const ::__gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat>&, 20472: _OI); 20472: 20472: template 20472: __gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat> 20472: __copy_move_a(_II, _II, 20472: const ::__gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat>&); 20472: 20472: template 20472: ::__gnu_debug::_Safe_iterator<_OIte, _OSeq, _OCat> 20472: __copy_move_a(const ::__gnu_debug::_Safe_iterator<_IIte, _ISeq, _ICat>&, 20472: const ::__gnu_debug::_Safe_iterator<_IIte, _ISeq, _ICat>&, 20472: const ::__gnu_debug::_Safe_iterator<_OIte, _OSeq, _OCat>&); 20472: # 557 "/usr/include/c++/10/bits/stl_algobase.h" 3 20472: template 20472: 20472: inline _OI 20472: copy(_II __first, _II __last, _OI __result) 20472: { 20472: 20472: 20472: 20472: 20472: ; 20472: 20472: return std::__copy_move_a<__is_move_iterator<_II>::__value> 20472: (std::__miter_base(__first), std::__miter_base(__last), __result); 20472: } 20472: # 590 "/usr/include/c++/10/bits/stl_algobase.h" 3 20472: template 20472: 20472: inline _OI 20472: move(_II __first, _II __last, _OI __result) 20472: { 20472: 20472: 20472: 20472: 20472: ; 20472: 20472: return std::__copy_move_a(std::__miter_base(__first), 20472: std::__miter_base(__last), __result); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct __copy_move_backward 20472: { 20472: template 20472: 20472: static _BI2 20472: __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) 20472: { 20472: while (__first != __last) 20472: *--__result = *--__last; 20472: return __result; 20472: } 20472: }; 20472: 20472: 20472: template 20472: struct __copy_move_backward 20472: { 20472: template 20472: 20472: static _BI2 20472: __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) 20472: { 20472: while (__first != __last) 20472: *--__result = std::move(*--__last); 20472: return __result; 20472: } 20472: }; 20472: 20472: 20472: template<> 20472: struct __copy_move_backward 20472: { 20472: template 20472: 20472: static _BI2 20472: __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) 20472: { 20472: typename iterator_traits<_BI1>::difference_type 20472: __n = __last - __first; 20472: for (; __n > 0; --__n) 20472: *--__result = *--__last; 20472: return __result; 20472: } 20472: }; 20472: 20472: 20472: template<> 20472: struct __copy_move_backward 20472: { 20472: template 20472: 20472: static _BI2 20472: __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) 20472: { 20472: typename iterator_traits<_BI1>::difference_type 20472: __n = __last - __first; 20472: for (; __n > 0; --__n) 20472: *--__result = std::move(*--__last); 20472: return __result; 20472: } 20472: }; 20472: 20472: 20472: template 20472: struct __copy_move_backward<_IsMove, true, random_access_iterator_tag> 20472: { 20472: template 20472: 20472: static _Tp* 20472: __copy_move_b(const _Tp* __first, const _Tp* __last, _Tp* __result) 20472: { 20472: 20472: using __assignable = conditional<_IsMove, 20472: is_move_assignable<_Tp>, 20472: is_copy_assignable<_Tp>>; 20472: 20472: static_assert( __assignable::type::value, "type is not assignable" ); 20472: 20472: const ptrdiff_t _Num = __last - __first; 20472: if (_Num) 20472: __builtin_memmove(__result - _Num, __first, sizeof(_Tp) * _Num); 20472: return __result - _Num; 20472: } 20472: }; 20472: 20472: template 20472: 20472: inline _BI2 20472: __copy_move_backward_a2(_BI1 __first, _BI1 __last, _BI2 __result) 20472: { 20472: typedef typename iterator_traits<_BI1>::iterator_category _Category; 20472: 20472: 20472: 20472: 20472: 20472: return std::__copy_move_backward<_IsMove, 20472: __memcpyable<_BI2, _BI1>::__value, 20472: _Category>::__copy_move_b(__first, 20472: __last, 20472: __result); 20472: } 20472: 20472: template 20472: 20472: inline _BI2 20472: __copy_move_backward_a1(_BI1 __first, _BI1 __last, _BI2 __result) 20472: { return std::__copy_move_backward_a2<_IsMove>(__first, __last, __result); } 20472: 20472: template 20472: _OI 20472: __copy_move_backward_a1(std::_Deque_iterator<_Tp, _Ref, _Ptr>, 20472: std::_Deque_iterator<_Tp, _Ref, _Ptr>, 20472: _OI); 20472: 20472: template 20472: std::_Deque_iterator<_OTp, _OTp&, _OTp*> 20472: __copy_move_backward_a1( 20472: std::_Deque_iterator<_ITp, _IRef, _IPtr>, 20472: std::_Deque_iterator<_ITp, _IRef, _IPtr>, 20472: std::_Deque_iterator<_OTp, _OTp&, _OTp*>); 20472: 20472: template 20472: typename __gnu_cxx::__enable_if< 20472: __is_random_access_iter<_II>::__value, 20472: std::_Deque_iterator<_Tp, _Tp&, _Tp*> >::__type 20472: __copy_move_backward_a1(_II, _II, 20472: std::_Deque_iterator<_Tp, _Tp&, _Tp*>); 20472: 20472: template 20472: 20472: inline _OI 20472: __copy_move_backward_a(_II __first, _II __last, _OI __result) 20472: { 20472: return std::__niter_wrap(__result, 20472: std::__copy_move_backward_a1<_IsMove> 20472: (std::__niter_base(__first), std::__niter_base(__last), 20472: std::__niter_base(__result))); 20472: } 20472: 20472: template 20472: _OI 20472: __copy_move_backward_a( 20472: const ::__gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat>&, 20472: const ::__gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat>&, 20472: _OI); 20472: 20472: template 20472: __gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat> 20472: __copy_move_backward_a(_II, _II, 20472: const ::__gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat>&); 20472: 20472: template 20472: ::__gnu_debug::_Safe_iterator<_OIte, _OSeq, _OCat> 20472: __copy_move_backward_a( 20472: const ::__gnu_debug::_Safe_iterator<_IIte, _ISeq, _ICat>&, 20472: const ::__gnu_debug::_Safe_iterator<_IIte, _ISeq, _ICat>&, 20472: const ::__gnu_debug::_Safe_iterator<_OIte, _OSeq, _OCat>&); 20472: # 794 "/usr/include/c++/10/bits/stl_algobase.h" 3 20472: template 20472: 20472: inline _BI2 20472: copy_backward(_BI1 __first, _BI1 __last, _BI2 __result) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: 20472: return std::__copy_move_backward_a<__is_move_iterator<_BI1>::__value> 20472: (std::__miter_base(__first), std::__miter_base(__last), __result); 20472: } 20472: # 830 "/usr/include/c++/10/bits/stl_algobase.h" 3 20472: template 20472: 20472: inline _BI2 20472: move_backward(_BI1 __first, _BI1 __last, _BI2 __result) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: 20472: return std::__copy_move_backward_a(std::__miter_base(__first), 20472: std::__miter_base(__last), 20472: __result); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: 20472: inline typename 20472: __gnu_cxx::__enable_if::__value, void>::__type 20472: __fill_a1(_ForwardIterator __first, _ForwardIterator __last, 20472: const _Tp& __value) 20472: { 20472: for (; __first != __last; ++__first) 20472: *__first = __value; 20472: } 20472: 20472: template 20472: 20472: inline typename 20472: __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, void>::__type 20472: __fill_a1(_ForwardIterator __first, _ForwardIterator __last, 20472: const _Tp& __value) 20472: { 20472: const _Tp __tmp = __value; 20472: for (; __first != __last; ++__first) 20472: *__first = __tmp; 20472: } 20472: 20472: 20472: template 20472: 20472: inline typename 20472: __gnu_cxx::__enable_if<__is_byte<_Tp>::__value, void>::__type 20472: __fill_a1(_Tp* __first, _Tp* __last, const _Tp& __c) 20472: { 20472: const _Tp __tmp = __c; 20472: # 892 "/usr/include/c++/10/bits/stl_algobase.h" 3 20472: if (const size_t __len = __last - __first) 20472: __builtin_memset(__first, static_cast(__tmp), __len); 20472: } 20472: 20472: template 20472: 20472: inline void 20472: __fill_a1(::__gnu_cxx::__normal_iterator<_Ite, _Cont> __first, 20472: ::__gnu_cxx::__normal_iterator<_Ite, _Cont> __last, 20472: const _Tp& __value) 20472: { std::__fill_a1(__first.base(), __last.base(), __value); } 20472: 20472: template 20472: void 20472: __fill_a1(const std::_Deque_iterator<_Tp, _Tp&, _Tp*>&, 20472: const std::_Deque_iterator<_Tp, _Tp&, _Tp*>&, 20472: const _VTp&); 20472: 20472: template 20472: 20472: inline void 20472: __fill_a(_FIte __first, _FIte __last, const _Tp& __value) 20472: { std::__fill_a1(__first, __last, __value); } 20472: 20472: template 20472: void 20472: __fill_a(const ::__gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat>&, 20472: const ::__gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat>&, 20472: const _Tp&); 20472: # 934 "/usr/include/c++/10/bits/stl_algobase.h" 3 20472: template 20472: 20472: inline void 20472: fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) 20472: { 20472: 20472: 20472: 20472: ; 20472: 20472: std::__fill_a(__first, __last, __value); 20472: } 20472: 20472: 20472: inline constexpr int 20472: __size_to_integer(int __n) { return __n; } 20472: inline constexpr unsigned 20472: __size_to_integer(unsigned __n) { return __n; } 20472: inline constexpr long 20472: __size_to_integer(long __n) { return __n; } 20472: inline constexpr unsigned long 20472: __size_to_integer(unsigned long __n) { return __n; } 20472: inline constexpr long long 20472: __size_to_integer(long long __n) { return __n; } 20472: inline constexpr unsigned long long 20472: __size_to_integer(unsigned long long __n) { return __n; } 20472: # 986 "/usr/include/c++/10/bits/stl_algobase.h" 3 20472: inline constexpr long long 20472: __size_to_integer(float __n) { return __n; } 20472: inline constexpr long long 20472: __size_to_integer(double __n) { return __n; } 20472: inline constexpr long long 20472: __size_to_integer(long double __n) { return __n; } 20472: 20472: 20472: 20472: 20472: 20472: template 20472: 20472: inline typename 20472: __gnu_cxx::__enable_if::__value, _OutputIterator>::__type 20472: __fill_n_a1(_OutputIterator __first, _Size __n, const _Tp& __value) 20472: { 20472: for (; __n > 0; --__n, (void) ++__first) 20472: *__first = __value; 20472: return __first; 20472: } 20472: 20472: template 20472: 20472: inline typename 20472: __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, _OutputIterator>::__type 20472: __fill_n_a1(_OutputIterator __first, _Size __n, const _Tp& __value) 20472: { 20472: const _Tp __tmp = __value; 20472: for (; __n > 0; --__n, (void) ++__first) 20472: *__first = __tmp; 20472: return __first; 20472: } 20472: 20472: template 20472: ::__gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat> 20472: __fill_n_a(const ::__gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat>& __first, 20472: _Size __n, const _Tp& __value, 20472: std::input_iterator_tag); 20472: 20472: template 20472: 20472: inline _OutputIterator 20472: __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value, 20472: std::output_iterator_tag) 20472: { 20472: 20472: static_assert(is_integral<_Size>{}, "fill_n must pass integral size"); 20472: 20472: return __fill_n_a1(__first, __n, __value); 20472: } 20472: 20472: template 20472: 20472: inline _OutputIterator 20472: __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value, 20472: std::input_iterator_tag) 20472: { 20472: 20472: static_assert(is_integral<_Size>{}, "fill_n must pass integral size"); 20472: 20472: return __fill_n_a1(__first, __n, __value); 20472: } 20472: 20472: template 20472: 20472: inline _OutputIterator 20472: __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value, 20472: std::random_access_iterator_tag) 20472: { 20472: 20472: static_assert(is_integral<_Size>{}, "fill_n must pass integral size"); 20472: 20472: if (__n <= 0) 20472: return __first; 20472: 20472: ; 20472: 20472: std::__fill_a(__first, __first + __n, __value); 20472: return __first + __n; 20472: } 20472: # 1086 "/usr/include/c++/10/bits/stl_algobase.h" 3 20472: template 20472: 20472: inline _OI 20472: fill_n(_OI __first, _Size __n, const _Tp& __value) 20472: { 20472: 20472: 20472: 20472: return std::__fill_n_a(__first, std::__size_to_integer(__n), __value, 20472: std::__iterator_category(__first)); 20472: } 20472: 20472: template 20472: struct __equal 20472: { 20472: template 20472: 20472: static bool 20472: equal(_II1 __first1, _II1 __last1, _II2 __first2) 20472: { 20472: for (; __first1 != __last1; ++__first1, (void) ++__first2) 20472: if (!(*__first1 == *__first2)) 20472: return false; 20472: return true; 20472: } 20472: }; 20472: 20472: template<> 20472: struct __equal 20472: { 20472: template 20472: 20472: static bool 20472: equal(const _Tp* __first1, const _Tp* __last1, const _Tp* __first2) 20472: { 20472: if (const size_t __len = (__last1 - __first1)) 20472: return !std::__memcmp(__first1, __first2, __len); 20472: return true; 20472: } 20472: }; 20472: 20472: template 20472: typename __gnu_cxx::__enable_if< 20472: __is_random_access_iter<_II>::__value, bool>::__type 20472: __equal_aux1(std::_Deque_iterator<_Tp, _Ref, _Ptr>, 20472: std::_Deque_iterator<_Tp, _Ref, _Ptr>, 20472: _II); 20472: 20472: template 20472: bool 20472: __equal_aux1(std::_Deque_iterator<_Tp1, _Ref1, _Ptr1>, 20472: std::_Deque_iterator<_Tp1, _Ref1, _Ptr1>, 20472: std::_Deque_iterator<_Tp2, _Ref2, _Ptr2>); 20472: 20472: template 20472: typename __gnu_cxx::__enable_if< 20472: __is_random_access_iter<_II>::__value, bool>::__type 20472: __equal_aux1(_II, _II, 20472: std::_Deque_iterator<_Tp, _Ref, _Ptr>); 20472: 20472: template 20472: 20472: inline bool 20472: __equal_aux1(_II1 __first1, _II1 __last1, _II2 __first2) 20472: { 20472: typedef typename iterator_traits<_II1>::value_type _ValueType1; 20472: const bool __simple = ((__is_integer<_ValueType1>::__value 20472: || __is_pointer<_ValueType1>::__value) 20472: && __memcmpable<_II1, _II2>::__value); 20472: return std::__equal<__simple>::equal(__first1, __last1, __first2); 20472: } 20472: 20472: template 20472: 20472: inline bool 20472: __equal_aux(_II1 __first1, _II1 __last1, _II2 __first2) 20472: { 20472: return std::__equal_aux1(std::__niter_base(__first1), 20472: std::__niter_base(__last1), 20472: std::__niter_base(__first2)); 20472: } 20472: 20472: template 20472: bool 20472: __equal_aux(const ::__gnu_debug::_Safe_iterator<_II1, _Seq1, _Cat1>&, 20472: const ::__gnu_debug::_Safe_iterator<_II1, _Seq1, _Cat1>&, 20472: _II2); 20472: 20472: template 20472: bool 20472: __equal_aux(_II1, _II1, 20472: const ::__gnu_debug::_Safe_iterator<_II2, _Seq2, _Cat2>&); 20472: 20472: template 20472: bool 20472: __equal_aux(const ::__gnu_debug::_Safe_iterator<_II1, _Seq1, _Cat1>&, 20472: const ::__gnu_debug::_Safe_iterator<_II1, _Seq1, _Cat1>&, 20472: const ::__gnu_debug::_Safe_iterator<_II2, _Seq2, _Cat2>&); 20472: 20472: template 20472: struct __lc_rai 20472: { 20472: template 20472: 20472: static _II1 20472: __newlast1(_II1, _II1 __last1, _II2, _II2) 20472: { return __last1; } 20472: 20472: template 20472: 20472: static bool 20472: __cnd2(_II __first, _II __last) 20472: { return __first != __last; } 20472: }; 20472: 20472: template<> 20472: struct __lc_rai 20472: { 20472: template 20472: 20472: static _RAI1 20472: __newlast1(_RAI1 __first1, _RAI1 __last1, 20472: _RAI2 __first2, _RAI2 __last2) 20472: { 20472: const typename iterator_traits<_RAI1>::difference_type 20472: __diff1 = __last1 - __first1; 20472: const typename iterator_traits<_RAI2>::difference_type 20472: __diff2 = __last2 - __first2; 20472: return __diff2 < __diff1 ? __first1 + __diff2 : __last1; 20472: } 20472: 20472: template 20472: static bool 20472: __cnd2(_RAI, _RAI) 20472: { return true; } 20472: }; 20472: 20472: template 20472: 20472: bool 20472: __lexicographical_compare_impl(_II1 __first1, _II1 __last1, 20472: _II2 __first2, _II2 __last2, 20472: _Compare __comp) 20472: { 20472: typedef typename iterator_traits<_II1>::iterator_category _Category1; 20472: typedef typename iterator_traits<_II2>::iterator_category _Category2; 20472: typedef std::__lc_rai<_Category1, _Category2> __rai_type; 20472: 20472: __last1 = __rai_type::__newlast1(__first1, __last1, __first2, __last2); 20472: for (; __first1 != __last1 && __rai_type::__cnd2(__first2, __last2); 20472: ++__first1, (void)++__first2) 20472: { 20472: if (__comp(__first1, __first2)) 20472: return true; 20472: if (__comp(__first2, __first1)) 20472: return false; 20472: } 20472: return __first1 == __last1 && __first2 != __last2; 20472: } 20472: 20472: template 20472: struct __lexicographical_compare 20472: { 20472: template 20472: 20472: static bool 20472: __lc(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) 20472: { 20472: using __gnu_cxx::__ops::__iter_less_iter; 20472: return std::__lexicographical_compare_impl(__first1, __last1, 20472: __first2, __last2, 20472: __iter_less_iter()); 20472: } 20472: }; 20472: 20472: template<> 20472: struct __lexicographical_compare 20472: { 20472: template 20472: 20472: static bool 20472: __lc(const _Tp* __first1, const _Tp* __last1, 20472: const _Up* __first2, const _Up* __last2) 20472: { 20472: const size_t __len1 = __last1 - __first1; 20472: const size_t __len2 = __last2 - __first2; 20472: if (const size_t __len = std::min(__len1, __len2)) 20472: if (int __result = std::__memcmp(__first1, __first2, __len)) 20472: return __result < 0; 20472: return __len1 < __len2; 20472: } 20472: }; 20472: 20472: template 20472: 20472: inline bool 20472: __lexicographical_compare_aux(_II1 __first1, _II1 __last1, 20472: _II2 __first2, _II2 __last2) 20472: { 20472: typedef typename iterator_traits<_II1>::value_type _ValueType1; 20472: typedef typename iterator_traits<_II2>::value_type _ValueType2; 20472: const bool __simple = 20472: (__is_memcmp_ordered_with<_ValueType1, _ValueType2>::__value 20472: && __is_pointer<_II1>::__value 20472: && __is_pointer<_II2>::__value 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: ); 20472: 20472: return std::__lexicographical_compare<__simple>::__lc(__first1, __last1, 20472: __first2, __last2); 20472: } 20472: 20472: template 20472: 20472: _ForwardIterator 20472: __lower_bound(_ForwardIterator __first, _ForwardIterator __last, 20472: const _Tp& __val, _Compare __comp) 20472: { 20472: typedef typename iterator_traits<_ForwardIterator>::difference_type 20472: _DistanceType; 20472: 20472: _DistanceType __len = std::distance(__first, __last); 20472: 20472: while (__len > 0) 20472: { 20472: _DistanceType __half = __len >> 1; 20472: _ForwardIterator __middle = __first; 20472: std::advance(__middle, __half); 20472: if (__comp(__middle, __val)) 20472: { 20472: __first = __middle; 20472: ++__first; 20472: __len = __len - __half - 1; 20472: } 20472: else 20472: __len = __half; 20472: } 20472: return __first; 20472: } 20472: # 1345 "/usr/include/c++/10/bits/stl_algobase.h" 3 20472: template 20472: 20472: inline _ForwardIterator 20472: lower_bound(_ForwardIterator __first, _ForwardIterator __last, 20472: const _Tp& __val) 20472: { 20472: 20472: 20472: 20472: 20472: ; 20472: 20472: return std::__lower_bound(__first, __last, __val, 20472: __gnu_cxx::__ops::__iter_less_val()); 20472: } 20472: 20472: 20472: 20472: inline constexpr int 20472: __lg(int __n) 20472: { return (int)sizeof(int) * 8 - 1 - __builtin_clz(__n); } 20472: 20472: inline constexpr unsigned 20472: __lg(unsigned __n) 20472: { return (int)sizeof(int) * 8 - 1 - __builtin_clz(__n); } 20472: 20472: inline constexpr long 20472: __lg(long __n) 20472: { return (int)sizeof(long) * 8 - 1 - __builtin_clzl(__n); } 20472: 20472: inline constexpr unsigned long 20472: __lg(unsigned long __n) 20472: { return (int)sizeof(long) * 8 - 1 - __builtin_clzl(__n); } 20472: 20472: inline constexpr long long 20472: __lg(long long __n) 20472: { return (int)sizeof(long long) * 8 - 1 - __builtin_clzll(__n); } 20472: 20472: inline constexpr unsigned long long 20472: __lg(unsigned long long __n) 20472: { return (int)sizeof(long long) * 8 - 1 - __builtin_clzll(__n); } 20472: 20472: 20472: # 1401 "/usr/include/c++/10/bits/stl_algobase.h" 3 20472: template 20472: 20472: inline bool 20472: equal(_II1 __first1, _II1 __last1, _II2 __first2) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: 20472: return std::__equal_aux(__first1, __last1, __first2); 20472: } 20472: # 1432 "/usr/include/c++/10/bits/stl_algobase.h" 3 20472: template 20472: 20472: inline bool 20472: equal(_IIter1 __first1, _IIter1 __last1, 20472: _IIter2 __first2, _BinaryPredicate __binary_pred) 20472: { 20472: 20472: 20472: 20472: ; 20472: 20472: for (; __first1 != __last1; ++__first1, (void)++__first2) 20472: if (!bool(__binary_pred(*__first1, *__first2))) 20472: return false; 20472: return true; 20472: } 20472: 20472: 20472: 20472: template 20472: 20472: inline bool 20472: __equal4(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) 20472: { 20472: using _RATag = random_access_iterator_tag; 20472: using _Cat1 = typename iterator_traits<_II1>::iterator_category; 20472: using _Cat2 = typename iterator_traits<_II2>::iterator_category; 20472: using _RAIters = __and_, is_same<_Cat2, _RATag>>; 20472: if (_RAIters()) 20472: { 20472: auto __d1 = std::distance(__first1, __last1); 20472: auto __d2 = std::distance(__first2, __last2); 20472: if (__d1 != __d2) 20472: return false; 20472: return std::equal(__first1, __last1, __first2); 20472: } 20472: 20472: for (; __first1 != __last1 && __first2 != __last2; 20472: ++__first1, (void)++__first2) 20472: if (!(*__first1 == *__first2)) 20472: return false; 20472: return __first1 == __last1 && __first2 == __last2; 20472: } 20472: 20472: 20472: template 20472: 20472: inline bool 20472: __equal4(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2, 20472: _BinaryPredicate __binary_pred) 20472: { 20472: using _RATag = random_access_iterator_tag; 20472: using _Cat1 = typename iterator_traits<_II1>::iterator_category; 20472: using _Cat2 = typename iterator_traits<_II2>::iterator_category; 20472: using _RAIters = __and_, is_same<_Cat2, _RATag>>; 20472: if (_RAIters()) 20472: { 20472: auto __d1 = std::distance(__first1, __last1); 20472: auto __d2 = std::distance(__first2, __last2); 20472: if (__d1 != __d2) 20472: return false; 20472: return std::equal(__first1, __last1, __first2, 20472: __binary_pred); 20472: } 20472: 20472: for (; __first1 != __last1 && __first2 != __last2; 20472: ++__first1, (void)++__first2) 20472: if (!bool(__binary_pred(*__first1, *__first2))) 20472: return false; 20472: return __first1 == __last1 && __first2 == __last2; 20472: } 20472: # 1587 "/usr/include/c++/10/bits/stl_algobase.h" 3 20472: template 20472: 20472: inline bool 20472: lexicographical_compare(_II1 __first1, _II1 __last1, 20472: _II2 __first2, _II2 __last2) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: 20472: return std::__lexicographical_compare_aux(std::__niter_base(__first1), 20472: std::__niter_base(__last1), 20472: std::__niter_base(__first2), 20472: std::__niter_base(__last2)); 20472: } 20472: # 1624 "/usr/include/c++/10/bits/stl_algobase.h" 3 20472: template 20472: 20472: inline bool 20472: lexicographical_compare(_II1 __first1, _II1 __last1, 20472: _II2 __first2, _II2 __last2, _Compare __comp) 20472: { 20472: 20472: 20472: 20472: ; 20472: ; 20472: 20472: return std::__lexicographical_compare_impl 20472: (__first1, __last1, __first2, __last2, 20472: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 20472: } 20472: # 1737 "/usr/include/c++/10/bits/stl_algobase.h" 3 20472: template 20472: 20472: pair<_InputIterator1, _InputIterator2> 20472: __mismatch(_InputIterator1 __first1, _InputIterator1 __last1, 20472: _InputIterator2 __first2, _BinaryPredicate __binary_pred) 20472: { 20472: while (__first1 != __last1 && __binary_pred(__first1, __first2)) 20472: { 20472: ++__first1; 20472: ++__first2; 20472: } 20472: return pair<_InputIterator1, _InputIterator2>(__first1, __first2); 20472: } 20472: # 1765 "/usr/include/c++/10/bits/stl_algobase.h" 3 20472: template 20472: 20472: inline pair<_InputIterator1, _InputIterator2> 20472: mismatch(_InputIterator1 __first1, _InputIterator1 __last1, 20472: _InputIterator2 __first2) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: 20472: return std::__mismatch(__first1, __last1, __first2, 20472: __gnu_cxx::__ops::__iter_equal_to_iter()); 20472: } 20472: # 1799 "/usr/include/c++/10/bits/stl_algobase.h" 3 20472: template 20472: 20472: inline pair<_InputIterator1, _InputIterator2> 20472: mismatch(_InputIterator1 __first1, _InputIterator1 __last1, 20472: _InputIterator2 __first2, _BinaryPredicate __binary_pred) 20472: { 20472: 20472: 20472: 20472: ; 20472: 20472: return std::__mismatch(__first1, __last1, __first2, 20472: __gnu_cxx::__ops::__iter_comp_iter(__binary_pred)); 20472: } 20472: # 1903 "/usr/include/c++/10/bits/stl_algobase.h" 3 20472: 20472: 20472: 20472: template 20472: 20472: inline _InputIterator 20472: __find_if(_InputIterator __first, _InputIterator __last, 20472: _Predicate __pred, input_iterator_tag) 20472: { 20472: while (__first != __last && !__pred(__first)) 20472: ++__first; 20472: return __first; 20472: } 20472: 20472: 20472: template 20472: 20472: _RandomAccessIterator 20472: __find_if(_RandomAccessIterator __first, _RandomAccessIterator __last, 20472: _Predicate __pred, random_access_iterator_tag) 20472: { 20472: typename iterator_traits<_RandomAccessIterator>::difference_type 20472: __trip_count = (__last - __first) >> 2; 20472: 20472: for (; __trip_count > 0; --__trip_count) 20472: { 20472: if (__pred(__first)) 20472: return __first; 20472: ++__first; 20472: 20472: if (__pred(__first)) 20472: return __first; 20472: ++__first; 20472: 20472: if (__pred(__first)) 20472: return __first; 20472: ++__first; 20472: 20472: if (__pred(__first)) 20472: return __first; 20472: ++__first; 20472: } 20472: 20472: switch (__last - __first) 20472: { 20472: case 3: 20472: if (__pred(__first)) 20472: return __first; 20472: ++__first; 20472: 20472: case 2: 20472: if (__pred(__first)) 20472: return __first; 20472: ++__first; 20472: 20472: case 1: 20472: if (__pred(__first)) 20472: return __first; 20472: ++__first; 20472: 20472: case 0: 20472: default: 20472: return __last; 20472: } 20472: } 20472: 20472: template 20472: 20472: inline _Iterator 20472: __find_if(_Iterator __first, _Iterator __last, _Predicate __pred) 20472: { 20472: return __find_if(__first, __last, __pred, 20472: std::__iterator_category(__first)); 20472: } 20472: 20472: template 20472: 20472: typename iterator_traits<_InputIterator>::difference_type 20472: __count_if(_InputIterator __first, _InputIterator __last, _Predicate __pred) 20472: { 20472: typename iterator_traits<_InputIterator>::difference_type __n = 0; 20472: for (; __first != __last; ++__first) 20472: if (__pred(__first)) 20472: ++__n; 20472: return __n; 20472: } 20472: 20472: 20472: template 20472: 20472: bool 20472: __is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, 20472: _ForwardIterator2 __first2, _BinaryPredicate __pred) 20472: { 20472: 20472: 20472: for (; __first1 != __last1; ++__first1, (void)++__first2) 20472: if (!__pred(__first1, __first2)) 20472: break; 20472: 20472: if (__first1 == __last1) 20472: return true; 20472: 20472: 20472: 20472: _ForwardIterator2 __last2 = __first2; 20472: std::advance(__last2, std::distance(__first1, __last1)); 20472: for (_ForwardIterator1 __scan = __first1; __scan != __last1; ++__scan) 20472: { 20472: if (__scan != std::__find_if(__first1, __scan, 20472: __gnu_cxx::__ops::__iter_comp_iter(__pred, __scan))) 20472: continue; 20472: 20472: auto __matches 20472: = std::__count_if(__first2, __last2, 20472: __gnu_cxx::__ops::__iter_comp_iter(__pred, __scan)); 20472: if (0 == __matches || 20472: std::__count_if(__scan, __last1, 20472: __gnu_cxx::__ops::__iter_comp_iter(__pred, __scan)) 20472: != __matches) 20472: return false; 20472: } 20472: return true; 20472: } 20472: # 2041 "/usr/include/c++/10/bits/stl_algobase.h" 3 20472: template 20472: 20472: inline bool 20472: is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, 20472: _ForwardIterator2 __first2) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: 20472: return std::__is_permutation(__first1, __last1, __first2, 20472: __gnu_cxx::__ops::__iter_equal_to_iter()); 20472: } 20472: 20472: 20472: 20472: } 20472: # 61 "/usr/include/c++/10/deque" 2 3 20472: 20472: 20472: 20472: # 1 "/usr/include/c++/10/bits/allocator.h" 1 3 20472: # 46 "/usr/include/c++/10/bits/allocator.h" 3 20472: # 1 "/usr/include/arm-linux-gnueabihf/c++/10/bits/c++allocator.h" 1 3 20472: # 33 "/usr/include/arm-linux-gnueabihf/c++/10/bits/c++allocator.h" 3 20472: # 1 "/usr/include/c++/10/ext/new_allocator.h" 1 3 20472: # 33 "/usr/include/c++/10/ext/new_allocator.h" 3 20472: # 1 "/usr/include/c++/10/new" 1 3 20472: # 38 "/usr/include/c++/10/new" 3 20472: 20472: # 39 "/usr/include/c++/10/new" 3 20472: 20472: 20472: # 1 "/usr/include/c++/10/exception" 1 3 20472: # 33 "/usr/include/c++/10/exception" 3 20472: 20472: # 34 "/usr/include/c++/10/exception" 3 20472: 20472: #pragma GCC visibility push(default) 20472: 20472: 20472: # 1 "/usr/include/c++/10/bits/exception.h" 1 3 20472: # 34 "/usr/include/c++/10/bits/exception.h" 3 20472: 20472: # 35 "/usr/include/c++/10/bits/exception.h" 3 20472: 20472: #pragma GCC visibility push(default) 20472: 20472: 20472: 20472: extern "C++" { 20472: 20472: namespace std 20472: { 20472: # 60 "/usr/include/c++/10/bits/exception.h" 3 20472: class exception 20472: { 20472: public: 20472: exception() noexcept { } 20472: virtual ~exception() noexcept; 20472: 20472: exception(const exception&) = default; 20472: exception& operator=(const exception&) = default; 20472: exception(exception&&) = default; 20472: exception& operator=(exception&&) = default; 20472: 20472: 20472: 20472: 20472: virtual const char* 20472: what() const noexcept; 20472: }; 20472: 20472: } 20472: 20472: } 20472: 20472: #pragma GCC visibility pop 20472: # 39 "/usr/include/c++/10/exception" 2 3 20472: 20472: extern "C++" { 20472: 20472: namespace std 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: class bad_exception : public exception 20472: { 20472: public: 20472: bad_exception() noexcept { } 20472: 20472: 20472: 20472: virtual ~bad_exception() noexcept; 20472: 20472: 20472: virtual const char* 20472: what() const noexcept; 20472: }; 20472: 20472: 20472: typedef void (*terminate_handler) (); 20472: 20472: 20472: typedef void (*unexpected_handler) (); 20472: 20472: 20472: terminate_handler set_terminate(terminate_handler) noexcept; 20472: 20472: 20472: 20472: terminate_handler get_terminate() noexcept; 20472: 20472: 20472: 20472: 20472: void terminate() noexcept __attribute__ ((__noreturn__)); 20472: 20472: 20472: unexpected_handler set_unexpected(unexpected_handler) noexcept; 20472: 20472: 20472: 20472: unexpected_handler get_unexpected() noexcept; 20472: 20472: 20472: 20472: 20472: void unexpected() __attribute__ ((__noreturn__)); 20472: # 105 "/usr/include/c++/10/exception" 3 20472: 20472: bool uncaught_exception() noexcept __attribute__ ((__pure__)); 20472: # 115 "/usr/include/c++/10/exception" 3 20472: } 20472: 20472: namespace __gnu_cxx 20472: { 20472: 20472: # 137 "/usr/include/c++/10/exception" 3 20472: void __verbose_terminate_handler(); 20472: 20472: 20472: } 20472: 20472: } 20472: 20472: #pragma GCC visibility pop 20472: 20472: 20472: # 1 "/usr/include/c++/10/bits/exception_ptr.h" 1 3 20472: # 34 "/usr/include/c++/10/bits/exception_ptr.h" 3 20472: #pragma GCC visibility push(default) 20472: 20472: 20472: 20472: # 1 "/usr/include/c++/10/bits/cxxabi_init_exception.h" 1 3 20472: # 34 "/usr/include/c++/10/bits/cxxabi_init_exception.h" 3 20472: 20472: # 35 "/usr/include/c++/10/bits/cxxabi_init_exception.h" 3 20472: 20472: #pragma GCC visibility push(default) 20472: 20472: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/10/include/stddef.h" 1 3 4 20472: # 143 "/usr/lib/gcc/arm-linux-gnueabihf/10/include/stddef.h" 3 4 20472: typedef int ptrdiff_t; 20472: # 209 "/usr/lib/gcc/arm-linux-gnueabihf/10/include/stddef.h" 3 4 20472: typedef unsigned int size_t; 20472: # 415 "/usr/lib/gcc/arm-linux-gnueabihf/10/include/stddef.h" 3 4 20472: typedef struct { 20472: long long __max_align_ll __attribute__((__aligned__(__alignof__(long long)))); 20472: long double __max_align_ld __attribute__((__aligned__(__alignof__(long double)))); 20472: # 426 "/usr/lib/gcc/arm-linux-gnueabihf/10/include/stddef.h" 3 4 20472: } max_align_t; 20472: 20472: 20472: 20472: 20472: 20472: 20472: typedef decltype(nullptr) nullptr_t; 20472: # 39 "/usr/include/c++/10/bits/cxxabi_init_exception.h" 2 3 20472: # 50 "/usr/include/c++/10/bits/cxxabi_init_exception.h" 3 20472: namespace std 20472: { 20472: class type_info; 20472: } 20472: 20472: namespace __cxxabiv1 20472: { 20472: struct __cxa_refcounted_exception; 20472: 20472: extern "C" 20472: { 20472: 20472: void* 20472: __cxa_allocate_exception(size_t) noexcept; 20472: 20472: void 20472: __cxa_free_exception(void*) noexcept; 20472: 20472: 20472: __cxa_refcounted_exception* 20472: __cxa_init_primary_exception(void *object, std::type_info *tinfo, 20472: void ( *dest) (void *)) noexcept; 20472: 20472: } 20472: } 20472: 20472: 20472: 20472: #pragma GCC visibility pop 20472: # 39 "/usr/include/c++/10/bits/exception_ptr.h" 2 3 20472: # 1 "/usr/include/c++/10/typeinfo" 1 3 20472: # 32 "/usr/include/c++/10/typeinfo" 3 20472: 20472: # 33 "/usr/include/c++/10/typeinfo" 3 20472: 20472: 20472: 20472: # 1 "/usr/include/c++/10/bits/hash_bytes.h" 1 3 20472: # 33 "/usr/include/c++/10/bits/hash_bytes.h" 3 20472: 20472: # 34 "/usr/include/c++/10/bits/hash_bytes.h" 3 20472: 20472: 20472: 20472: namespace std 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: size_t 20472: _Hash_bytes(const void* __ptr, size_t __len, size_t __seed); 20472: 20472: 20472: 20472: 20472: 20472: size_t 20472: _Fnv_hash_bytes(const void* __ptr, size_t __len, size_t __seed); 20472: 20472: 20472: } 20472: # 37 "/usr/include/c++/10/typeinfo" 2 3 20472: 20472: 20472: #pragma GCC visibility push(default) 20472: 20472: extern "C++" { 20472: 20472: namespace __cxxabiv1 20472: { 20472: class __class_type_info; 20472: } 20472: # 80 "/usr/include/c++/10/typeinfo" 3 20472: namespace std 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: class type_info 20472: { 20472: public: 20472: 20472: 20472: 20472: 20472: virtual ~type_info(); 20472: 20472: 20472: 20472: const char* name() const noexcept 20472: { return __name[0] == '*' ? __name + 1 : __name; } 20472: 20472: 20472: 20472: 20472: 20472: bool before(const type_info& __arg) const noexcept; 20472: bool operator==(const type_info& __arg) const noexcept; 20472: # 138 "/usr/include/c++/10/typeinfo" 3 20472: bool operator!=(const type_info& __arg) const noexcept 20472: { return !operator==(__arg); } 20472: 20472: 20472: 20472: size_t hash_code() const noexcept 20472: { 20472: 20472: return _Hash_bytes(name(), __builtin_strlen(name()), 20472: static_cast(0xc70f6907UL)); 20472: 20472: 20472: 20472: } 20472: 20472: 20472: 20472: virtual bool __is_pointer_p() const; 20472: 20472: 20472: virtual bool __is_function_p() const; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual bool __do_catch(const type_info *__thr_type, void **__thr_obj, 20472: unsigned __outer) const; 20472: 20472: 20472: virtual bool __do_upcast(const __cxxabiv1::__class_type_info *__target, 20472: void **__obj_ptr) const; 20472: 20472: protected: 20472: const char *__name; 20472: 20472: explicit type_info(const char *__n): __name(__n) { } 20472: 20472: private: 20472: 20472: type_info& operator=(const type_info&); 20472: type_info(const type_info&); 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: class bad_cast : public exception 20472: { 20472: public: 20472: bad_cast() noexcept { } 20472: 20472: 20472: 20472: virtual ~bad_cast() noexcept; 20472: 20472: 20472: virtual const char* what() const noexcept; 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: class bad_typeid : public exception 20472: { 20472: public: 20472: bad_typeid () noexcept { } 20472: 20472: 20472: 20472: virtual ~bad_typeid() noexcept; 20472: 20472: 20472: virtual const char* what() const noexcept; 20472: }; 20472: } 20472: 20472: } 20472: 20472: #pragma GCC visibility pop 20472: # 40 "/usr/include/c++/10/bits/exception_ptr.h" 2 3 20472: # 1 "/usr/include/c++/10/new" 1 3 20472: # 41 "/usr/include/c++/10/bits/exception_ptr.h" 2 3 20472: 20472: extern "C++" { 20472: 20472: namespace std 20472: { 20472: class type_info; 20472: 20472: 20472: 20472: 20472: 20472: 20472: namespace __exception_ptr 20472: { 20472: class exception_ptr; 20472: } 20472: 20472: using __exception_ptr::exception_ptr; 20472: 20472: 20472: 20472: 20472: 20472: exception_ptr current_exception() noexcept; 20472: 20472: template 20472: exception_ptr make_exception_ptr(_Ex) noexcept; 20472: 20472: 20472: void rethrow_exception(exception_ptr) __attribute__ ((__noreturn__)); 20472: 20472: namespace __exception_ptr 20472: { 20472: using std::rethrow_exception; 20472: 20472: 20472: 20472: 20472: 20472: class exception_ptr 20472: { 20472: void* _M_exception_object; 20472: 20472: explicit exception_ptr(void* __e) noexcept; 20472: 20472: void _M_addref() noexcept; 20472: void _M_release() noexcept; 20472: 20472: void *_M_get() const noexcept __attribute__ ((__pure__)); 20472: 20472: friend exception_ptr std::current_exception() noexcept; 20472: friend void std::rethrow_exception(exception_ptr); 20472: template 20472: friend exception_ptr std::make_exception_ptr(_Ex) noexcept; 20472: 20472: public: 20472: exception_ptr() noexcept; 20472: 20472: exception_ptr(const exception_ptr&) noexcept; 20472: 20472: 20472: exception_ptr(nullptr_t) noexcept 20472: : _M_exception_object(0) 20472: { } 20472: 20472: exception_ptr(exception_ptr&& __o) noexcept 20472: : _M_exception_object(__o._M_exception_object) 20472: { __o._M_exception_object = 0; } 20472: # 118 "/usr/include/c++/10/bits/exception_ptr.h" 3 20472: exception_ptr& 20472: operator=(const exception_ptr&) noexcept; 20472: 20472: 20472: exception_ptr& 20472: operator=(exception_ptr&& __o) noexcept 20472: { 20472: exception_ptr(static_cast(__o)).swap(*this); 20472: return *this; 20472: } 20472: 20472: 20472: ~exception_ptr() noexcept; 20472: 20472: void 20472: swap(exception_ptr&) noexcept; 20472: # 145 "/usr/include/c++/10/bits/exception_ptr.h" 3 20472: explicit operator bool() const 20472: { return _M_exception_object; } 20472: 20472: 20472: friend bool 20472: operator==(const exception_ptr&, const exception_ptr&) 20472: noexcept __attribute__ ((__pure__)); 20472: 20472: const class std::type_info* 20472: __cxa_exception_type() const noexcept 20472: __attribute__ ((__pure__)); 20472: }; 20472: 20472: 20472: 20472: bool 20472: operator==(const exception_ptr&, const exception_ptr&) 20472: noexcept __attribute__ ((__pure__)); 20472: 20472: bool 20472: operator!=(const exception_ptr&, const exception_ptr&) 20472: noexcept __attribute__ ((__pure__)); 20472: 20472: inline void 20472: swap(exception_ptr& __lhs, exception_ptr& __rhs) 20472: { __lhs.swap(__rhs); } 20472: 20472: 20472: 20472: 20472: template 20472: inline void 20472: __dest_thunk(void* __x) 20472: { static_cast<_Ex*>(__x)->~_Ex(); } 20472: 20472: 20472: } 20472: 20472: 20472: template 20472: exception_ptr 20472: make_exception_ptr(_Ex __ex) noexcept 20472: { 20472: 20472: void* __e = __cxxabiv1::__cxa_allocate_exception(sizeof(_Ex)); 20472: (void) __cxxabiv1::__cxa_init_primary_exception( 20472: __e, const_cast(&typeid(__ex)), 20472: __exception_ptr::__dest_thunk<_Ex>); 20472: try 20472: { 20472: ::new (__e) _Ex(__ex); 20472: return exception_ptr(__e); 20472: } 20472: catch(...) 20472: { 20472: __cxxabiv1::__cxa_free_exception(__e); 20472: return current_exception(); 20472: } 20472: # 215 "/usr/include/c++/10/bits/exception_ptr.h" 3 20472: } 20472: 20472: 20472: } 20472: 20472: } 20472: 20472: #pragma GCC visibility pop 20472: # 148 "/usr/include/c++/10/exception" 2 3 20472: # 1 "/usr/include/c++/10/bits/nested_exception.h" 1 3 20472: # 33 "/usr/include/c++/10/bits/nested_exception.h" 3 20472: #pragma GCC visibility push(default) 20472: # 42 "/usr/include/c++/10/bits/nested_exception.h" 3 20472: extern "C++" { 20472: 20472: namespace std 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: class nested_exception 20472: { 20472: exception_ptr _M_ptr; 20472: 20472: public: 20472: nested_exception() noexcept : _M_ptr(current_exception()) { } 20472: 20472: nested_exception(const nested_exception&) noexcept = default; 20472: 20472: nested_exception& operator=(const nested_exception&) noexcept = default; 20472: 20472: virtual ~nested_exception() noexcept; 20472: 20472: [[noreturn]] 20472: void 20472: rethrow_nested() const 20472: { 20472: if (_M_ptr) 20472: rethrow_exception(_M_ptr); 20472: std::terminate(); 20472: } 20472: 20472: exception_ptr 20472: nested_ptr() const noexcept 20472: { return _M_ptr; } 20472: }; 20472: 20472: 20472: 20472: template 20472: struct _Nested_exception : public _Except, public nested_exception 20472: { 20472: explicit _Nested_exception(const _Except& __ex) 20472: : _Except(__ex) 20472: { } 20472: 20472: explicit _Nested_exception(_Except&& __ex) 20472: : _Except(static_cast<_Except&&>(__ex)) 20472: { } 20472: }; 20472: 20472: 20472: 20472: 20472: template 20472: [[noreturn]] 20472: inline void 20472: __throw_with_nested_impl(_Tp&& __t, true_type) 20472: { 20472: using _Up = typename remove_reference<_Tp>::type; 20472: throw _Nested_exception<_Up>{std::forward<_Tp>(__t)}; 20472: } 20472: 20472: template 20472: [[noreturn]] 20472: inline void 20472: __throw_with_nested_impl(_Tp&& __t, false_type) 20472: { throw std::forward<_Tp>(__t); } 20472: 20472: 20472: 20472: 20472: 20472: template 20472: [[noreturn]] 20472: inline void 20472: throw_with_nested(_Tp&& __t) 20472: { 20472: using _Up = typename decay<_Tp>::type; 20472: using _CopyConstructible 20472: = __and_, is_move_constructible<_Up>>; 20472: static_assert(_CopyConstructible::value, 20472: "throw_with_nested argument must be CopyConstructible"); 20472: using __nest = __and_, __bool_constant, 20472: __not_>>; 20472: std::__throw_with_nested_impl(std::forward<_Tp>(__t), __nest{}); 20472: } 20472: 20472: 20472: 20472: 20472: template 20472: using __rethrow_if_nested_cond = typename enable_if< 20472: __and_, 20472: __or_<__not_>, 20472: is_convertible<_Tp*, nested_exception*>>>::value 20472: >::type; 20472: 20472: 20472: template 20472: inline __rethrow_if_nested_cond<_Ex> 20472: __rethrow_if_nested_impl(const _Ex* __ptr) 20472: { 20472: if (auto __ne_ptr = dynamic_cast(__ptr)) 20472: __ne_ptr->rethrow_nested(); 20472: } 20472: 20472: 20472: inline void 20472: __rethrow_if_nested_impl(const void*) 20472: { } 20472: 20472: 20472: 20472: 20472: template 20472: inline void 20472: rethrow_if_nested(const _Ex& __ex) 20472: { std::__rethrow_if_nested_impl(std::__addressof(__ex)); } 20472: 20472: 20472: } 20472: 20472: } 20472: 20472: 20472: 20472: #pragma GCC visibility pop 20472: # 149 "/usr/include/c++/10/exception" 2 3 20472: # 42 "/usr/include/c++/10/new" 2 3 20472: 20472: #pragma GCC visibility push(default) 20472: 20472: extern "C++" { 20472: 20472: namespace std 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: class bad_alloc : public exception 20472: { 20472: public: 20472: bad_alloc() throw() { } 20472: 20472: 20472: bad_alloc(const bad_alloc&) = default; 20472: bad_alloc& operator=(const bad_alloc&) = default; 20472: 20472: 20472: 20472: 20472: virtual ~bad_alloc() throw(); 20472: 20472: 20472: virtual const char* what() const throw(); 20472: }; 20472: 20472: 20472: class bad_array_new_length : public bad_alloc 20472: { 20472: public: 20472: bad_array_new_length() throw() { } 20472: 20472: 20472: 20472: virtual ~bad_array_new_length() throw(); 20472: 20472: 20472: virtual const char* what() const throw(); 20472: }; 20472: 20472: 20472: 20472: enum class align_val_t: size_t {}; 20472: 20472: 20472: struct nothrow_t 20472: { 20472: 20472: explicit nothrow_t() = default; 20472: 20472: }; 20472: 20472: extern const nothrow_t nothrow; 20472: 20472: 20472: 20472: typedef void (*new_handler)(); 20472: 20472: 20472: 20472: new_handler set_new_handler(new_handler) throw(); 20472: 20472: 20472: 20472: new_handler get_new_handler() noexcept; 20472: 20472: } 20472: # 126 "/usr/include/c++/10/new" 3 20472: void* operator new(std::size_t) 20472: __attribute__((__externally_visible__)); 20472: void* operator new[](std::size_t) 20472: __attribute__((__externally_visible__)); 20472: void operator delete(void*) noexcept 20472: __attribute__((__externally_visible__)); 20472: void operator delete[](void*) noexcept 20472: __attribute__((__externally_visible__)); 20472: 20472: 20472: 20472: 20472: 20472: 20472: void* operator new(std::size_t, const std::nothrow_t&) noexcept 20472: __attribute__((__externally_visible__, __malloc__)); 20472: void* operator new[](std::size_t, const std::nothrow_t&) noexcept 20472: __attribute__((__externally_visible__, __malloc__)); 20472: void operator delete(void*, const std::nothrow_t&) noexcept 20472: __attribute__((__externally_visible__)); 20472: void operator delete[](void*, const std::nothrow_t&) noexcept 20472: __attribute__((__externally_visible__)); 20472: 20472: void* operator new(std::size_t, std::align_val_t) 20472: __attribute__((__externally_visible__)); 20472: void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) 20472: noexcept __attribute__((__externally_visible__, __malloc__)); 20472: void operator delete(void*, std::align_val_t) 20472: noexcept __attribute__((__externally_visible__)); 20472: void operator delete(void*, std::align_val_t, const std::nothrow_t&) 20472: noexcept __attribute__((__externally_visible__)); 20472: void* operator new[](std::size_t, std::align_val_t) 20472: __attribute__((__externally_visible__)); 20472: void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) 20472: noexcept __attribute__((__externally_visible__, __malloc__)); 20472: void operator delete[](void*, std::align_val_t) 20472: noexcept __attribute__((__externally_visible__)); 20472: void operator delete[](void*, std::align_val_t, const std::nothrow_t&) 20472: noexcept __attribute__((__externally_visible__)); 20472: # 174 "/usr/include/c++/10/new" 3 20472: inline void* operator new(std::size_t, void* __p) noexcept 20472: { return __p; } 20472: inline void* operator new[](std::size_t, void* __p) noexcept 20472: { return __p; } 20472: 20472: 20472: inline void operator delete (void*, void*) noexcept { } 20472: inline void operator delete[](void*, void*) noexcept { } 20472: 20472: } 20472: # 230 "/usr/include/c++/10/new" 3 20472: #pragma GCC visibility pop 20472: # 34 "/usr/include/c++/10/ext/new_allocator.h" 2 3 20472: 20472: 20472: 20472: 20472: 20472: 20472: namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: # 54 "/usr/include/c++/10/ext/new_allocator.h" 3 20472: template 20472: class new_allocator 20472: { 20472: public: 20472: typedef _Tp value_type; 20472: typedef std::size_t size_type; 20472: typedef std::ptrdiff_t difference_type; 20472: 20472: typedef _Tp* pointer; 20472: typedef const _Tp* const_pointer; 20472: typedef _Tp& reference; 20472: typedef const _Tp& const_reference; 20472: 20472: template 20472: struct rebind 20472: { typedef new_allocator<_Tp1> other; }; 20472: 20472: 20472: 20472: 20472: 20472: typedef std::true_type propagate_on_container_move_assignment; 20472: 20472: 20472: 20472: new_allocator() noexcept { } 20472: 20472: 20472: new_allocator(const new_allocator&) noexcept { } 20472: 20472: template 20472: 20472: new_allocator(const new_allocator<_Tp1>&) noexcept { } 20472: 20472: 20472: ~new_allocator() noexcept { } 20472: 20472: pointer 20472: address(reference __x) const noexcept 20472: { return std::__addressof(__x); } 20472: 20472: const_pointer 20472: address(const_reference __x) const noexcept 20472: { return std::__addressof(__x); } 20472: 20472: 20472: 20472: 20472: _Tp* 20472: allocate(size_type __n, const void* = static_cast(0)) 20472: { 20472: if (__n > this->_M_max_size()) 20472: std::__throw_bad_alloc(); 20472: 20472: 20472: if (alignof(_Tp) > 8) 20472: { 20472: std::align_val_t __al = std::align_val_t(alignof(_Tp)); 20472: return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp), __al)); 20472: } 20472: 20472: return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp))); 20472: } 20472: 20472: 20472: void 20472: deallocate(_Tp* __p, size_type __t) 20472: { 20472: 20472: if (alignof(_Tp) > 8) 20472: { 20472: ::operator delete(__p, 20472: 20472: 20472: 20472: std::align_val_t(alignof(_Tp))); 20472: return; 20472: } 20472: 20472: ::operator delete(__p 20472: 20472: 20472: 20472: ); 20472: } 20472: 20472: 20472: size_type 20472: max_size() const noexcept 20472: { return _M_max_size(); } 20472: 20472: 20472: template 20472: void 20472: construct(_Up* __p, _Args&&... __args) 20472: noexcept(std::is_nothrow_constructible<_Up, _Args...>::value) 20472: { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); } 20472: 20472: template 20472: void 20472: destroy(_Up* __p) 20472: noexcept(std::is_nothrow_destructible<_Up>::value) 20472: { __p->~_Up(); } 20472: # 169 "/usr/include/c++/10/ext/new_allocator.h" 3 20472: template 20472: friend bool 20472: operator==(const new_allocator&, const new_allocator<_Up>&) 20472: noexcept 20472: { return true; } 20472: 20472: 20472: template 20472: friend bool 20472: operator!=(const new_allocator&, const new_allocator<_Up>&) 20472: noexcept 20472: { return false; } 20472: 20472: 20472: private: 20472: constexpr size_type 20472: _M_max_size() const noexcept 20472: { 20472: 20472: return std::size_t(0x7fffffff) / sizeof(_Tp); 20472: 20472: 20472: 20472: } 20472: }; 20472: 20472: 20472: } 20472: # 34 "/usr/include/arm-linux-gnueabihf/c++/10/bits/c++allocator.h" 2 3 20472: 20472: 20472: namespace std 20472: { 20472: # 47 "/usr/include/arm-linux-gnueabihf/c++/10/bits/c++allocator.h" 3 20472: template 20472: using __allocator_base = __gnu_cxx::new_allocator<_Tp>; 20472: } 20472: # 47 "/usr/include/c++/10/bits/allocator.h" 2 3 20472: # 1 "/usr/include/c++/10/bits/memoryfwd.h" 1 3 20472: # 46 "/usr/include/c++/10/bits/memoryfwd.h" 3 20472: 20472: # 47 "/usr/include/c++/10/bits/memoryfwd.h" 3 20472: 20472: 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: # 63 "/usr/include/c++/10/bits/memoryfwd.h" 3 20472: template 20472: class allocator; 20472: 20472: 20472: template<> 20472: class allocator; 20472: 20472: 20472: 20472: 20472: template 20472: struct uses_allocator; 20472: 20472: 20472: 20472: 20472: 20472: } 20472: # 48 "/usr/include/c++/10/bits/allocator.h" 2 3 20472: 20472: 20472: 20472: 20472: 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template<> 20472: class allocator 20472: { 20472: public: 20472: typedef void value_type; 20472: typedef size_t size_type; 20472: typedef ptrdiff_t difference_type; 20472: 20472: typedef void* pointer; 20472: typedef const void* const_pointer; 20472: 20472: template 20472: struct rebind 20472: { typedef allocator<_Tp1> other; }; 20472: # 89 "/usr/include/c++/10/bits/allocator.h" 3 20472: typedef true_type propagate_on_container_move_assignment; 20472: 20472: typedef true_type is_always_equal; 20472: 20472: template 20472: void 20472: construct(_Up* __p, _Args&&... __args) 20472: noexcept(std::is_nothrow_constructible<_Up, _Args...>::value) 20472: { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); } 20472: 20472: template 20472: void 20472: destroy(_Up* __p) 20472: noexcept(std::is_nothrow_destructible<_Up>::value) 20472: { __p->~_Up(); } 20472: 20472: }; 20472: # 115 "/usr/include/c++/10/bits/allocator.h" 3 20472: template 20472: class allocator : public __allocator_base<_Tp> 20472: { 20472: public: 20472: typedef _Tp value_type; 20472: typedef size_t size_type; 20472: typedef ptrdiff_t difference_type; 20472: 20472: typedef _Tp* pointer; 20472: typedef const _Tp* const_pointer; 20472: typedef _Tp& reference; 20472: typedef const _Tp& const_reference; 20472: 20472: template 20472: struct rebind 20472: { typedef allocator<_Tp1> other; }; 20472: 20472: 20472: 20472: 20472: 20472: typedef true_type propagate_on_container_move_assignment; 20472: 20472: typedef true_type is_always_equal; 20472: 20472: 20472: 20472: 20472: 20472: allocator() noexcept { } 20472: 20472: 20472: allocator(const allocator& __a) noexcept 20472: : __allocator_base<_Tp>(__a) { } 20472: 20472: 20472: 20472: allocator& operator=(const allocator&) = default; 20472: 20472: 20472: template 20472: 20472: allocator(const allocator<_Tp1>&) noexcept { } 20472: 20472: 20472: 20472: 20472: ~allocator() noexcept { } 20472: # 191 "/usr/include/c++/10/bits/allocator.h" 3 20472: friend bool 20472: operator==(const allocator&, const allocator&) noexcept 20472: { return true; } 20472: 20472: 20472: friend bool 20472: operator!=(const allocator&, const allocator&) noexcept 20472: { return false; } 20472: 20472: 20472: 20472: }; 20472: 20472: template 20472: inline bool 20472: operator==(const allocator<_T1>&, const allocator<_T2>&) 20472: noexcept 20472: { return true; } 20472: 20472: 20472: template 20472: inline bool 20472: operator!=(const allocator<_T1>&, const allocator<_T2>&) 20472: noexcept 20472: { return false; } 20472: 20472: 20472: 20472: 20472: template 20472: class allocator 20472: { 20472: public: 20472: typedef _Tp value_type; 20472: template allocator(const allocator<_Up>&) { } 20472: }; 20472: 20472: template 20472: class allocator 20472: { 20472: public: 20472: typedef _Tp value_type; 20472: template allocator(const allocator<_Up>&) { } 20472: }; 20472: 20472: template 20472: class allocator 20472: { 20472: public: 20472: typedef _Tp value_type; 20472: template allocator(const allocator<_Up>&) { } 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern template class allocator; 20472: extern template class allocator; 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct __alloc_swap 20472: { static void _S_do_it(_Alloc&, _Alloc&) noexcept { } }; 20472: 20472: template 20472: struct __alloc_swap<_Alloc, false> 20472: { 20472: static void 20472: _S_do_it(_Alloc& __one, _Alloc& __two) noexcept 20472: { 20472: 20472: if (__one != __two) 20472: swap(__one, __two); 20472: } 20472: }; 20472: 20472: 20472: template 20472: struct __alloc_neq 20472: { 20472: static bool 20472: _S_do_it(const _Alloc&, const _Alloc&) 20472: { return false; } 20472: }; 20472: 20472: template 20472: struct __alloc_neq<_Alloc, false> 20472: { 20472: static bool 20472: _S_do_it(const _Alloc& __one, const _Alloc& __two) 20472: { return __one != __two; } 20472: }; 20472: 20472: 20472: template, 20472: is_nothrow_move_constructible>::value> 20472: struct __shrink_to_fit_aux 20472: { static bool _S_do_it(_Tp&) noexcept { return false; } }; 20472: 20472: template 20472: struct __shrink_to_fit_aux<_Tp, true> 20472: { 20472: static bool 20472: _S_do_it(_Tp& __c) noexcept 20472: { 20472: 20472: try 20472: { 20472: _Tp(__make_move_if_noexcept_iterator(__c.begin()), 20472: __make_move_if_noexcept_iterator(__c.end()), 20472: __c.get_allocator()).swap(__c); 20472: return true; 20472: } 20472: catch(...) 20472: { return false; } 20472: 20472: 20472: 20472: } 20472: }; 20472: 20472: 20472: 20472: } 20472: # 65 "/usr/include/c++/10/deque" 2 3 20472: # 1 "/usr/include/c++/10/bits/stl_construct.h" 1 3 20472: # 73 "/usr/include/c++/10/bits/stl_construct.h" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: # 106 "/usr/include/c++/10/bits/stl_construct.h" 3 20472: template 20472: inline void 20472: _Construct(_Tp* __p, _Args&&... __args) 20472: { ::new(static_cast(__p)) _Tp(std::forward<_Args>(__args)...); } 20472: # 121 "/usr/include/c++/10/bits/stl_construct.h" 3 20472: template 20472: inline void 20472: _Construct_novalue(_T1* __p) 20472: { ::new(static_cast(__p)) _T1; } 20472: 20472: template 20472: void 20472: _Destroy(_ForwardIterator __first, _ForwardIterator __last); 20472: 20472: 20472: 20472: 20472: template 20472: inline void 20472: _Destroy(_Tp* __pointer) 20472: { 20472: 20472: 20472: 20472: __pointer->~_Tp(); 20472: 20472: } 20472: 20472: template 20472: struct _Destroy_aux 20472: { 20472: template 20472: static void 20472: __destroy(_ForwardIterator __first, _ForwardIterator __last) 20472: { 20472: for (; __first != __last; ++__first) 20472: std::_Destroy(std::__addressof(*__first)); 20472: } 20472: }; 20472: 20472: template<> 20472: struct _Destroy_aux 20472: { 20472: template 20472: static void 20472: __destroy(_ForwardIterator, _ForwardIterator) { } 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: inline void 20472: _Destroy(_ForwardIterator __first, _ForwardIterator __last) 20472: { 20472: typedef typename iterator_traits<_ForwardIterator>::value_type 20472: _Value_type; 20472: 20472: 20472: static_assert(is_destructible<_Value_type>::value, 20472: "value type is destructible"); 20472: 20472: 20472: 20472: 20472: 20472: std::_Destroy_aux<__has_trivial_destructor(_Value_type)>:: 20472: __destroy(__first, __last); 20472: } 20472: 20472: template 20472: struct _Destroy_n_aux 20472: { 20472: template 20472: static _ForwardIterator 20472: __destroy_n(_ForwardIterator __first, _Size __count) 20472: { 20472: for (; __count > 0; (void)++__first, --__count) 20472: std::_Destroy(std::__addressof(*__first)); 20472: return __first; 20472: } 20472: }; 20472: 20472: template<> 20472: struct _Destroy_n_aux 20472: { 20472: template 20472: static _ForwardIterator 20472: __destroy_n(_ForwardIterator __first, _Size __count) 20472: { 20472: std::advance(__first, __count); 20472: return __first; 20472: } 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: inline _ForwardIterator 20472: _Destroy_n(_ForwardIterator __first, _Size __count) 20472: { 20472: typedef typename iterator_traits<_ForwardIterator>::value_type 20472: _Value_type; 20472: 20472: 20472: static_assert(is_destructible<_Value_type>::value, 20472: "value type is destructible"); 20472: 20472: 20472: 20472: 20472: 20472: return std::_Destroy_n_aux<__has_trivial_destructor(_Value_type)>:: 20472: __destroy_n(__first, __count); 20472: } 20472: # 253 "/usr/include/c++/10/bits/stl_construct.h" 3 20472: 20472: } 20472: # 66 "/usr/include/c++/10/deque" 2 3 20472: # 1 "/usr/include/c++/10/bits/stl_uninitialized.h" 1 3 20472: # 67 "/usr/include/c++/10/bits/stl_uninitialized.h" 3 20472: # 1 "/usr/include/c++/10/ext/alloc_traits.h" 1 3 20472: # 32 "/usr/include/c++/10/ext/alloc_traits.h" 3 20472: 20472: # 33 "/usr/include/c++/10/ext/alloc_traits.h" 3 20472: 20472: # 1 "/usr/include/c++/10/bits/alloc_traits.h" 1 3 20472: # 41 "/usr/include/c++/10/bits/alloc_traits.h" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: struct __allocator_traits_base 20472: { 20472: template 20472: struct __rebind : __replace_first_arg<_Tp, _Up> { }; 20472: 20472: template 20472: struct __rebind<_Tp, _Up, 20472: __void_t::other>> 20472: { using type = typename _Tp::template rebind<_Up>::other; }; 20472: 20472: protected: 20472: template 20472: using __pointer = typename _Tp::pointer; 20472: template 20472: using __c_pointer = typename _Tp::const_pointer; 20472: template 20472: using __v_pointer = typename _Tp::void_pointer; 20472: template 20472: using __cv_pointer = typename _Tp::const_void_pointer; 20472: template 20472: using __pocca = typename _Tp::propagate_on_container_copy_assignment; 20472: template 20472: using __pocma = typename _Tp::propagate_on_container_move_assignment; 20472: template 20472: using __pocs = typename _Tp::propagate_on_container_swap; 20472: template 20472: using __equal = typename _Tp::is_always_equal; 20472: }; 20472: 20472: template 20472: using __alloc_rebind 20472: = typename __allocator_traits_base::template __rebind<_Alloc, _Up>::type; 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct allocator_traits : __allocator_traits_base 20472: { 20472: 20472: typedef _Alloc allocator_type; 20472: 20472: typedef typename _Alloc::value_type value_type; 20472: 20472: 20472: 20472: 20472: 20472: 20472: using pointer = __detected_or_t; 20472: 20472: private: 20472: 20472: template class _Func, typename _Tp, typename = void> 20472: struct _Ptr 20472: { 20472: using type = typename pointer_traits::template rebind<_Tp>; 20472: }; 20472: 20472: template class _Func, typename _Tp> 20472: struct _Ptr<_Func, _Tp, __void_t<_Func<_Alloc>>> 20472: { 20472: using type = _Func<_Alloc>; 20472: }; 20472: 20472: 20472: template 20472: struct _Diff 20472: { using type = typename pointer_traits<_PtrT>::difference_type; }; 20472: 20472: template 20472: struct _Diff<_A2, _PtrT, __void_t> 20472: { using type = typename _A2::difference_type; }; 20472: 20472: 20472: template 20472: struct _Size : make_unsigned<_DiffT> { }; 20472: 20472: template 20472: struct _Size<_A2, _DiffT, __void_t> 20472: { using type = typename _A2::size_type; }; 20472: 20472: public: 20472: 20472: 20472: 20472: 20472: 20472: 20472: using const_pointer = typename _Ptr<__c_pointer, const value_type>::type; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: using void_pointer = typename _Ptr<__v_pointer, void>::type; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: using const_void_pointer = typename _Ptr<__cv_pointer, const void>::type; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: using difference_type = typename _Diff<_Alloc, pointer>::type; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: using size_type = typename _Size<_Alloc, difference_type>::type; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: using propagate_on_container_copy_assignment 20472: = __detected_or_t; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: using propagate_on_container_move_assignment 20472: = __detected_or_t; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: using propagate_on_container_swap 20472: = __detected_or_t; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: using is_always_equal 20472: = __detected_or_t::type, __equal, _Alloc>; 20472: 20472: template 20472: using rebind_alloc = __alloc_rebind<_Alloc, _Tp>; 20472: template 20472: using rebind_traits = allocator_traits>; 20472: 20472: private: 20472: template 20472: static constexpr auto 20472: _S_allocate(_Alloc2& __a, size_type __n, const_void_pointer __hint, int) 20472: -> decltype(__a.allocate(__n, __hint)) 20472: { return __a.allocate(__n, __hint); } 20472: 20472: template 20472: static constexpr pointer 20472: _S_allocate(_Alloc2& __a, size_type __n, const_void_pointer, ...) 20472: { return __a.allocate(__n); } 20472: 20472: template 20472: struct __construct_helper 20472: { 20472: template()->construct( 20472: std::declval<_Tp*>(), std::declval<_Args>()...))> 20472: static true_type __test(int); 20472: 20472: template 20472: static false_type __test(...); 20472: 20472: using type = decltype(__test<_Alloc>(0)); 20472: }; 20472: 20472: template 20472: using __has_construct 20472: = typename __construct_helper<_Tp, _Args...>::type; 20472: 20472: template 20472: static _Require<__has_construct<_Tp, _Args...>> 20472: _S_construct(_Alloc& __a, _Tp* __p, _Args&&... __args) 20472: noexcept(noexcept(__a.construct(__p, std::forward<_Args>(__args)...))) 20472: { __a.construct(__p, std::forward<_Args>(__args)...); } 20472: 20472: template 20472: static 20472: _Require<__and_<__not_<__has_construct<_Tp, _Args...>>, 20472: is_constructible<_Tp, _Args...>>> 20472: _S_construct(_Alloc&, _Tp* __p, _Args&&... __args) 20472: noexcept(std::is_nothrow_constructible<_Tp, _Args...>::value) 20472: { 20472: 20472: ::new((void*)__p) _Tp(std::forward<_Args>(__args)...); 20472: 20472: 20472: 20472: } 20472: 20472: template 20472: static auto 20472: _S_destroy(_Alloc2& __a, _Tp* __p, int) 20472: noexcept(noexcept(__a.destroy(__p))) 20472: -> decltype(__a.destroy(__p)) 20472: { __a.destroy(__p); } 20472: 20472: template 20472: static void 20472: _S_destroy(_Alloc2&, _Tp* __p, ...) 20472: noexcept(std::is_nothrow_destructible<_Tp>::value) 20472: { std::_Destroy(__p); } 20472: 20472: template 20472: static constexpr auto 20472: _S_max_size(_Alloc2& __a, int) 20472: -> decltype(__a.max_size()) 20472: { return __a.max_size(); } 20472: 20472: template 20472: static constexpr size_type 20472: _S_max_size(_Alloc2&, ...) 20472: { 20472: 20472: 20472: return __gnu_cxx::__numeric_traits::__max 20472: / sizeof(value_type); 20472: } 20472: 20472: template 20472: static constexpr auto 20472: _S_select(_Alloc2& __a, int) 20472: -> decltype(__a.select_on_container_copy_construction()) 20472: { return __a.select_on_container_copy_construction(); } 20472: 20472: template 20472: static constexpr _Alloc2 20472: _S_select(_Alloc2& __a, ...) 20472: { return __a; } 20472: 20472: public: 20472: # 312 "/usr/include/c++/10/bits/alloc_traits.h" 3 20472: static pointer 20472: allocate(_Alloc& __a, size_type __n) 20472: { return __a.allocate(__n); } 20472: # 327 "/usr/include/c++/10/bits/alloc_traits.h" 3 20472: static pointer 20472: allocate(_Alloc& __a, size_type __n, const_void_pointer __hint) 20472: { return _S_allocate(__a, __n, __hint, 0); } 20472: # 339 "/usr/include/c++/10/bits/alloc_traits.h" 3 20472: static void 20472: deallocate(_Alloc& __a, pointer __p, size_type __n) 20472: { __a.deallocate(__p, __n); } 20472: # 354 "/usr/include/c++/10/bits/alloc_traits.h" 3 20472: template 20472: static auto 20472: construct(_Alloc& __a, _Tp* __p, _Args&&... __args) 20472: noexcept(noexcept(_S_construct(__a, __p, 20472: std::forward<_Args>(__args)...))) 20472: -> decltype(_S_construct(__a, __p, std::forward<_Args>(__args)...)) 20472: { _S_construct(__a, __p, std::forward<_Args>(__args)...); } 20472: # 370 "/usr/include/c++/10/bits/alloc_traits.h" 3 20472: template 20472: static void 20472: destroy(_Alloc& __a, _Tp* __p) 20472: noexcept(noexcept(_S_destroy(__a, __p, 0))) 20472: { _S_destroy(__a, __p, 0); } 20472: # 384 "/usr/include/c++/10/bits/alloc_traits.h" 3 20472: static size_type 20472: max_size(const _Alloc& __a) noexcept 20472: { return _S_max_size(__a, 0); } 20472: # 396 "/usr/include/c++/10/bits/alloc_traits.h" 3 20472: static _Alloc 20472: select_on_container_copy_construction(const _Alloc& __rhs) 20472: { return _S_select(__rhs, 0); } 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct allocator_traits> 20472: { 20472: 20472: using allocator_type = allocator<_Tp>; 20472: 20472: 20472: using value_type = _Tp; 20472: 20472: 20472: using pointer = _Tp*; 20472: 20472: 20472: using const_pointer = const _Tp*; 20472: 20472: 20472: using void_pointer = void*; 20472: 20472: 20472: using const_void_pointer = const void*; 20472: 20472: 20472: using difference_type = std::ptrdiff_t; 20472: 20472: 20472: using size_type = std::size_t; 20472: 20472: 20472: using propagate_on_container_copy_assignment = false_type; 20472: 20472: 20472: using propagate_on_container_move_assignment = true_type; 20472: 20472: 20472: using propagate_on_container_swap = false_type; 20472: 20472: 20472: using is_always_equal = true_type; 20472: 20472: template 20472: using rebind_alloc = allocator<_Up>; 20472: 20472: template 20472: using rebind_traits = allocator_traits>; 20472: # 458 "/usr/include/c++/10/bits/alloc_traits.h" 3 20472: static pointer 20472: allocate(allocator_type& __a, size_type __n) 20472: { return __a.allocate(__n); } 20472: # 472 "/usr/include/c++/10/bits/alloc_traits.h" 3 20472: static pointer 20472: allocate(allocator_type& __a, size_type __n, const_void_pointer __hint) 20472: { 20472: 20472: return __a.allocate(__n, __hint); 20472: 20472: 20472: 20472: } 20472: # 490 "/usr/include/c++/10/bits/alloc_traits.h" 3 20472: static void 20472: deallocate(allocator_type& __a, pointer __p, size_type __n) 20472: { __a.deallocate(__p, __n); } 20472: # 505 "/usr/include/c++/10/bits/alloc_traits.h" 3 20472: template 20472: static void 20472: construct(allocator_type& __a __attribute__((__unused__)), _Up* __p, 20472: _Args&&... __args) 20472: noexcept(std::is_nothrow_constructible<_Up, _Args...>::value) 20472: { 20472: 20472: __a.construct(__p, std::forward<_Args>(__args)...); 20472: 20472: 20472: 20472: } 20472: # 525 "/usr/include/c++/10/bits/alloc_traits.h" 3 20472: template 20472: static void 20472: destroy(allocator_type& __a __attribute__((__unused__)), _Up* __p) 20472: noexcept(is_nothrow_destructible<_Up>::value) 20472: { 20472: 20472: __a.destroy(__p); 20472: 20472: 20472: 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: static size_type 20472: max_size(const allocator_type& __a __attribute__((__unused__))) noexcept 20472: { 20472: 20472: return __a.max_size(); 20472: 20472: 20472: 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: static allocator_type 20472: select_on_container_copy_construction(const allocator_type& __rhs) 20472: { return __rhs; } 20472: }; 20472: 20472: 20472: template 20472: inline void 20472: __do_alloc_on_copy(_Alloc& __one, const _Alloc& __two, true_type) 20472: { __one = __two; } 20472: 20472: template 20472: inline void 20472: __do_alloc_on_copy(_Alloc&, const _Alloc&, false_type) 20472: { } 20472: 20472: 20472: template 20472: inline void 20472: __alloc_on_copy(_Alloc& __one, const _Alloc& __two) 20472: { 20472: typedef allocator_traits<_Alloc> __traits; 20472: typedef typename __traits::propagate_on_container_copy_assignment __pocca; 20472: 20472: 20472: 20472: 20472: __do_alloc_on_copy(__one, __two, __pocca()); 20472: 20472: } 20472: 20472: template 20472: constexpr _Alloc 20472: __alloc_on_copy(const _Alloc& __a) 20472: { 20472: typedef allocator_traits<_Alloc> __traits; 20472: return __traits::select_on_container_copy_construction(__a); 20472: } 20472: 20472: 20472: template 20472: inline void __do_alloc_on_move(_Alloc& __one, _Alloc& __two, true_type) 20472: { __one = std::move(__two); } 20472: 20472: template 20472: inline void __do_alloc_on_move(_Alloc&, _Alloc&, false_type) 20472: { } 20472: 20472: 20472: template 20472: inline void 20472: __alloc_on_move(_Alloc& __one, _Alloc& __two) 20472: { 20472: typedef allocator_traits<_Alloc> __traits; 20472: typedef typename __traits::propagate_on_container_move_assignment __pocma; 20472: 20472: 20472: 20472: 20472: __do_alloc_on_move(__one, __two, __pocma()); 20472: 20472: } 20472: 20472: 20472: template 20472: inline void __do_alloc_on_swap(_Alloc& __one, _Alloc& __two, true_type) 20472: { 20472: using std::swap; 20472: swap(__one, __two); 20472: } 20472: 20472: template 20472: inline void __do_alloc_on_swap(_Alloc&, _Alloc&, false_type) 20472: { } 20472: 20472: 20472: template 20472: inline void 20472: __alloc_on_swap(_Alloc& __one, _Alloc& __two) 20472: { 20472: typedef allocator_traits<_Alloc> __traits; 20472: typedef typename __traits::propagate_on_container_swap __pocs; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: __do_alloc_on_swap(__one, __two, __pocs()); 20472: 20472: } 20472: 20472: template, 20472: typename = void> 20472: struct __is_alloc_insertable_impl 20472: : false_type 20472: { }; 20472: 20472: template 20472: struct __is_alloc_insertable_impl<_Alloc, _Tp, _ValueT, 20472: __void_t::construct( 20472: std::declval<_Alloc&>(), std::declval<_ValueT*>(), 20472: std::declval<_Tp>()))>> 20472: : true_type 20472: { }; 20472: 20472: 20472: 20472: 20472: template 20472: struct __is_copy_insertable 20472: : __is_alloc_insertable_impl<_Alloc, 20472: typename _Alloc::value_type const&>::type 20472: { }; 20472: 20472: 20472: template 20472: struct __is_copy_insertable> 20472: : is_copy_constructible<_Tp> 20472: { }; 20472: 20472: 20472: 20472: 20472: template 20472: struct __is_move_insertable 20472: : __is_alloc_insertable_impl<_Alloc, typename _Alloc::value_type>::type 20472: { }; 20472: 20472: 20472: template 20472: struct __is_move_insertable> 20472: : is_move_constructible<_Tp> 20472: { }; 20472: 20472: 20472: template 20472: struct __is_allocator : false_type { }; 20472: 20472: template 20472: struct __is_allocator<_Alloc, 20472: __void_t().allocate(size_t{}))>> 20472: : true_type { }; 20472: 20472: template 20472: using _RequireAllocator 20472: = typename enable_if<__is_allocator<_Alloc>::value, _Alloc>::type; 20472: 20472: template 20472: using _RequireNotAllocator 20472: = typename enable_if::value, _Alloc>::type; 20472: # 719 "/usr/include/c++/10/bits/alloc_traits.h" 3 20472: template 20472: void 20472: _Destroy(_ForwardIterator __first, _ForwardIterator __last, 20472: _Allocator& __alloc) 20472: { 20472: for (; __first != __last; ++__first) 20472: 20472: 20472: 20472: allocator_traits<_Allocator>::destroy(__alloc, 20472: std::__addressof(*__first)); 20472: 20472: } 20472: 20472: template 20472: inline void 20472: _Destroy(_ForwardIterator __first, _ForwardIterator __last, 20472: allocator<_Tp>&) 20472: { 20472: _Destroy(__first, __last); 20472: } 20472: 20472: 20472: } 20472: # 35 "/usr/include/c++/10/ext/alloc_traits.h" 2 3 20472: 20472: 20472: 20472: 20472: namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct __alloc_traits 20472: 20472: : std::allocator_traits<_Alloc> 20472: 20472: { 20472: typedef _Alloc allocator_type; 20472: 20472: typedef std::allocator_traits<_Alloc> _Base_type; 20472: typedef typename _Base_type::value_type value_type; 20472: typedef typename _Base_type::pointer pointer; 20472: typedef typename _Base_type::const_pointer const_pointer; 20472: typedef typename _Base_type::size_type size_type; 20472: typedef typename _Base_type::difference_type difference_type; 20472: 20472: typedef value_type& reference; 20472: typedef const value_type& const_reference; 20472: using _Base_type::allocate; 20472: using _Base_type::deallocate; 20472: using _Base_type::construct; 20472: using _Base_type::destroy; 20472: using _Base_type::max_size; 20472: 20472: private: 20472: template 20472: using __is_custom_pointer 20472: = std::__and_, 20472: std::__not_>>; 20472: 20472: public: 20472: 20472: template 20472: static 20472: std::__enable_if_t<__is_custom_pointer<_Ptr>::value> 20472: construct(_Alloc& __a, _Ptr __p, _Args&&... __args) 20472: noexcept(noexcept(_Base_type::construct(__a, std::__to_address(__p), 20472: std::forward<_Args>(__args)...))) 20472: { 20472: _Base_type::construct(__a, std::__to_address(__p), 20472: std::forward<_Args>(__args)...); 20472: } 20472: 20472: 20472: template 20472: static 20472: std::__enable_if_t<__is_custom_pointer<_Ptr>::value> 20472: destroy(_Alloc& __a, _Ptr __p) 20472: noexcept(noexcept(_Base_type::destroy(__a, std::__to_address(__p)))) 20472: { _Base_type::destroy(__a, std::__to_address(__p)); } 20472: 20472: static constexpr _Alloc _S_select_on_copy(const _Alloc& __a) 20472: { return _Base_type::select_on_container_copy_construction(__a); } 20472: 20472: static void _S_on_swap(_Alloc& __a, _Alloc& __b) 20472: { std::__alloc_on_swap(__a, __b); } 20472: 20472: static constexpr bool _S_propagate_on_copy_assign() 20472: { return _Base_type::propagate_on_container_copy_assignment::value; } 20472: 20472: static constexpr bool _S_propagate_on_move_assign() 20472: { return _Base_type::propagate_on_container_move_assignment::value; } 20472: 20472: static constexpr bool _S_propagate_on_swap() 20472: { return _Base_type::propagate_on_container_swap::value; } 20472: 20472: static constexpr bool _S_always_equal() 20472: { return _Base_type::is_always_equal::value; } 20472: 20472: static constexpr bool _S_nothrow_move() 20472: { return _S_propagate_on_move_assign() || _S_always_equal(); } 20472: 20472: template 20472: struct rebind 20472: { typedef typename _Base_type::template rebind_alloc<_Tp> other; }; 20472: # 166 "/usr/include/c++/10/ext/alloc_traits.h" 3 20472: }; 20472: 20472: 20472: } 20472: # 68 "/usr/include/c++/10/bits/stl_uninitialized.h" 2 3 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct __uninitialized_copy 20472: { 20472: template 20472: static _ForwardIterator 20472: __uninit_copy(_InputIterator __first, _InputIterator __last, 20472: _ForwardIterator __result) 20472: { 20472: _ForwardIterator __cur = __result; 20472: try 20472: { 20472: for (; __first != __last; ++__first, (void)++__cur) 20472: std::_Construct(std::__addressof(*__cur), *__first); 20472: return __cur; 20472: } 20472: catch(...) 20472: { 20472: std::_Destroy(__result, __cur); 20472: throw; 20472: } 20472: } 20472: }; 20472: 20472: template<> 20472: struct __uninitialized_copy 20472: { 20472: template 20472: static _ForwardIterator 20472: __uninit_copy(_InputIterator __first, _InputIterator __last, 20472: _ForwardIterator __result) 20472: { return std::copy(__first, __last, __result); } 20472: }; 20472: # 123 "/usr/include/c++/10/bits/stl_uninitialized.h" 3 20472: template 20472: inline _ForwardIterator 20472: uninitialized_copy(_InputIterator __first, _InputIterator __last, 20472: _ForwardIterator __result) 20472: { 20472: typedef typename iterator_traits<_InputIterator>::value_type 20472: _ValueType1; 20472: typedef typename iterator_traits<_ForwardIterator>::value_type 20472: _ValueType2; 20472: 20472: 20472: 20472: 20472: 20472: static_assert(is_constructible<_ValueType2, decltype(*__first)>::value, 20472: "result type must be constructible from value type of input range"); 20472: 20472: typedef typename iterator_traits<_InputIterator>::reference _RefType1; 20472: typedef typename iterator_traits<_ForwardIterator>::reference _RefType2; 20472: 20472: 20472: const bool __assignable = is_assignable<_RefType2, _RefType1>::value; 20472: 20472: 20472: return std::__uninitialized_copy<__is_trivial(_ValueType1) 20472: && __is_trivial(_ValueType2) 20472: && __assignable>:: 20472: __uninit_copy(__first, __last, __result); 20472: } 20472: 20472: 20472: 20472: template 20472: struct __uninitialized_fill 20472: { 20472: template 20472: static void 20472: __uninit_fill(_ForwardIterator __first, _ForwardIterator __last, 20472: const _Tp& __x) 20472: { 20472: _ForwardIterator __cur = __first; 20472: try 20472: { 20472: for (; __cur != __last; ++__cur) 20472: std::_Construct(std::__addressof(*__cur), __x); 20472: } 20472: catch(...) 20472: { 20472: std::_Destroy(__first, __cur); 20472: throw; 20472: } 20472: } 20472: }; 20472: 20472: template<> 20472: struct __uninitialized_fill 20472: { 20472: template 20472: static void 20472: __uninit_fill(_ForwardIterator __first, _ForwardIterator __last, 20472: const _Tp& __x) 20472: { std::fill(__first, __last, __x); } 20472: }; 20472: # 198 "/usr/include/c++/10/bits/stl_uninitialized.h" 3 20472: template 20472: inline void 20472: uninitialized_fill(_ForwardIterator __first, _ForwardIterator __last, 20472: const _Tp& __x) 20472: { 20472: typedef typename iterator_traits<_ForwardIterator>::value_type 20472: _ValueType; 20472: 20472: 20472: 20472: 20472: 20472: static_assert(is_constructible<_ValueType, const _Tp&>::value, 20472: "result type must be constructible from input type"); 20472: 20472: 20472: 20472: const bool __assignable = is_copy_assignable<_ValueType>::value; 20472: 20472: 20472: std::__uninitialized_fill<__is_trivial(_ValueType) && __assignable>:: 20472: __uninit_fill(__first, __last, __x); 20472: } 20472: 20472: 20472: 20472: template 20472: struct __uninitialized_fill_n 20472: { 20472: template 20472: static _ForwardIterator 20472: __uninit_fill_n(_ForwardIterator __first, _Size __n, 20472: const _Tp& __x) 20472: { 20472: _ForwardIterator __cur = __first; 20472: try 20472: { 20472: for (; __n > 0; --__n, (void) ++__cur) 20472: std::_Construct(std::__addressof(*__cur), __x); 20472: return __cur; 20472: } 20472: catch(...) 20472: { 20472: std::_Destroy(__first, __cur); 20472: throw; 20472: } 20472: } 20472: }; 20472: 20472: template<> 20472: struct __uninitialized_fill_n 20472: { 20472: template 20472: static _ForwardIterator 20472: __uninit_fill_n(_ForwardIterator __first, _Size __n, 20472: const _Tp& __x) 20472: { return std::fill_n(__first, __n, __x); } 20472: }; 20472: # 270 "/usr/include/c++/10/bits/stl_uninitialized.h" 3 20472: template 20472: inline _ForwardIterator 20472: uninitialized_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __x) 20472: { 20472: typedef typename iterator_traits<_ForwardIterator>::value_type 20472: _ValueType; 20472: 20472: 20472: 20472: 20472: 20472: static_assert(is_constructible<_ValueType, const _Tp&>::value, 20472: "result type must be constructible from input type"); 20472: 20472: 20472: 20472: const bool __assignable = is_copy_assignable<_ValueType>::value; 20472: 20472: return __uninitialized_fill_n<__is_trivial(_ValueType) && __assignable>:: 20472: __uninit_fill_n(__first, __n, __x); 20472: } 20472: # 300 "/usr/include/c++/10/bits/stl_uninitialized.h" 3 20472: template 20472: _ForwardIterator 20472: __uninitialized_copy_a(_InputIterator __first, _InputIterator __last, 20472: _ForwardIterator __result, _Allocator& __alloc) 20472: { 20472: _ForwardIterator __cur = __result; 20472: try 20472: { 20472: typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; 20472: for (; __first != __last; ++__first, (void)++__cur) 20472: __traits::construct(__alloc, std::__addressof(*__cur), *__first); 20472: return __cur; 20472: } 20472: catch(...) 20472: { 20472: std::_Destroy(__result, __cur, __alloc); 20472: throw; 20472: } 20472: } 20472: 20472: template 20472: inline _ForwardIterator 20472: __uninitialized_copy_a(_InputIterator __first, _InputIterator __last, 20472: _ForwardIterator __result, allocator<_Tp>&) 20472: { return std::uninitialized_copy(__first, __last, __result); } 20472: 20472: template 20472: inline _ForwardIterator 20472: __uninitialized_move_a(_InputIterator __first, _InputIterator __last, 20472: _ForwardIterator __result, _Allocator& __alloc) 20472: { 20472: return std::__uninitialized_copy_a(std::make_move_iterator(__first), 20472: std::make_move_iterator(__last), 20472: __result, __alloc); 20472: } 20472: 20472: template 20472: inline _ForwardIterator 20472: __uninitialized_move_if_noexcept_a(_InputIterator __first, 20472: _InputIterator __last, 20472: _ForwardIterator __result, 20472: _Allocator& __alloc) 20472: { 20472: return std::__uninitialized_copy_a 20472: (std::__make_move_if_noexcept_iterator(__first), 20472: std::__make_move_if_noexcept_iterator(__last), __result, __alloc); 20472: } 20472: 20472: template 20472: void 20472: __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last, 20472: const _Tp& __x, _Allocator& __alloc) 20472: { 20472: _ForwardIterator __cur = __first; 20472: try 20472: { 20472: typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; 20472: for (; __cur != __last; ++__cur) 20472: __traits::construct(__alloc, std::__addressof(*__cur), __x); 20472: } 20472: catch(...) 20472: { 20472: std::_Destroy(__first, __cur, __alloc); 20472: throw; 20472: } 20472: } 20472: 20472: template 20472: inline void 20472: __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last, 20472: const _Tp& __x, allocator<_Tp2>&) 20472: { std::uninitialized_fill(__first, __last, __x); } 20472: 20472: template 20472: _ForwardIterator 20472: __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n, 20472: const _Tp& __x, _Allocator& __alloc) 20472: { 20472: _ForwardIterator __cur = __first; 20472: try 20472: { 20472: typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; 20472: for (; __n > 0; --__n, (void) ++__cur) 20472: __traits::construct(__alloc, std::__addressof(*__cur), __x); 20472: return __cur; 20472: } 20472: catch(...) 20472: { 20472: std::_Destroy(__first, __cur, __alloc); 20472: throw; 20472: } 20472: } 20472: 20472: template 20472: inline _ForwardIterator 20472: __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n, 20472: const _Tp& __x, allocator<_Tp2>&) 20472: { return std::uninitialized_fill_n(__first, __n, __x); } 20472: # 414 "/usr/include/c++/10/bits/stl_uninitialized.h" 3 20472: template 20472: inline _ForwardIterator 20472: __uninitialized_copy_move(_InputIterator1 __first1, 20472: _InputIterator1 __last1, 20472: _InputIterator2 __first2, 20472: _InputIterator2 __last2, 20472: _ForwardIterator __result, 20472: _Allocator& __alloc) 20472: { 20472: _ForwardIterator __mid = std::__uninitialized_copy_a(__first1, __last1, 20472: __result, 20472: __alloc); 20472: try 20472: { 20472: return std::__uninitialized_move_a(__first2, __last2, __mid, __alloc); 20472: } 20472: catch(...) 20472: { 20472: std::_Destroy(__result, __mid, __alloc); 20472: throw; 20472: } 20472: } 20472: 20472: 20472: 20472: 20472: 20472: template 20472: inline _ForwardIterator 20472: __uninitialized_move_copy(_InputIterator1 __first1, 20472: _InputIterator1 __last1, 20472: _InputIterator2 __first2, 20472: _InputIterator2 __last2, 20472: _ForwardIterator __result, 20472: _Allocator& __alloc) 20472: { 20472: _ForwardIterator __mid = std::__uninitialized_move_a(__first1, __last1, 20472: __result, 20472: __alloc); 20472: try 20472: { 20472: return std::__uninitialized_copy_a(__first2, __last2, __mid, __alloc); 20472: } 20472: catch(...) 20472: { 20472: std::_Destroy(__result, __mid, __alloc); 20472: throw; 20472: } 20472: } 20472: 20472: 20472: 20472: 20472: template 20472: inline _ForwardIterator 20472: __uninitialized_fill_move(_ForwardIterator __result, _ForwardIterator __mid, 20472: const _Tp& __x, _InputIterator __first, 20472: _InputIterator __last, _Allocator& __alloc) 20472: { 20472: std::__uninitialized_fill_a(__result, __mid, __x, __alloc); 20472: try 20472: { 20472: return std::__uninitialized_move_a(__first, __last, __mid, __alloc); 20472: } 20472: catch(...) 20472: { 20472: std::_Destroy(__result, __mid, __alloc); 20472: throw; 20472: } 20472: } 20472: 20472: 20472: 20472: 20472: template 20472: inline void 20472: __uninitialized_move_fill(_InputIterator __first1, _InputIterator __last1, 20472: _ForwardIterator __first2, 20472: _ForwardIterator __last2, const _Tp& __x, 20472: _Allocator& __alloc) 20472: { 20472: _ForwardIterator __mid2 = std::__uninitialized_move_a(__first1, __last1, 20472: __first2, 20472: __alloc); 20472: try 20472: { 20472: std::__uninitialized_fill_a(__mid2, __last2, __x, __alloc); 20472: } 20472: catch(...) 20472: { 20472: std::_Destroy(__first2, __mid2, __alloc); 20472: throw; 20472: } 20472: } 20472: # 521 "/usr/include/c++/10/bits/stl_uninitialized.h" 3 20472: template 20472: struct __uninitialized_default_1 20472: { 20472: template 20472: static void 20472: __uninit_default(_ForwardIterator __first, _ForwardIterator __last) 20472: { 20472: _ForwardIterator __cur = __first; 20472: try 20472: { 20472: for (; __cur != __last; ++__cur) 20472: std::_Construct(std::__addressof(*__cur)); 20472: } 20472: catch(...) 20472: { 20472: std::_Destroy(__first, __cur); 20472: throw; 20472: } 20472: } 20472: }; 20472: 20472: template<> 20472: struct __uninitialized_default_1 20472: { 20472: template 20472: static void 20472: __uninit_default(_ForwardIterator __first, _ForwardIterator __last) 20472: { 20472: typedef typename iterator_traits<_ForwardIterator>::value_type 20472: _ValueType; 20472: 20472: std::fill(__first, __last, _ValueType()); 20472: } 20472: }; 20472: 20472: template 20472: struct __uninitialized_default_n_1 20472: { 20472: template 20472: static _ForwardIterator 20472: __uninit_default_n(_ForwardIterator __first, _Size __n) 20472: { 20472: _ForwardIterator __cur = __first; 20472: try 20472: { 20472: for (; __n > 0; --__n, (void) ++__cur) 20472: std::_Construct(std::__addressof(*__cur)); 20472: return __cur; 20472: } 20472: catch(...) 20472: { 20472: std::_Destroy(__first, __cur); 20472: throw; 20472: } 20472: } 20472: }; 20472: 20472: template<> 20472: struct __uninitialized_default_n_1 20472: { 20472: template 20472: static _ForwardIterator 20472: __uninit_default_n(_ForwardIterator __first, _Size __n) 20472: { 20472: typedef typename iterator_traits<_ForwardIterator>::value_type 20472: _ValueType; 20472: 20472: return std::fill_n(__first, __n, _ValueType()); 20472: } 20472: }; 20472: 20472: 20472: 20472: 20472: template 20472: inline void 20472: __uninitialized_default(_ForwardIterator __first, 20472: _ForwardIterator __last) 20472: { 20472: typedef typename iterator_traits<_ForwardIterator>::value_type 20472: _ValueType; 20472: 20472: const bool __assignable = is_copy_assignable<_ValueType>::value; 20472: 20472: std::__uninitialized_default_1<__is_trivial(_ValueType) 20472: && __assignable>:: 20472: __uninit_default(__first, __last); 20472: } 20472: 20472: 20472: 20472: template 20472: inline _ForwardIterator 20472: __uninitialized_default_n(_ForwardIterator __first, _Size __n) 20472: { 20472: typedef typename iterator_traits<_ForwardIterator>::value_type 20472: _ValueType; 20472: 20472: const bool __assignable = is_copy_assignable<_ValueType>::value; 20472: 20472: return __uninitialized_default_n_1<__is_trivial(_ValueType) 20472: && __assignable>:: 20472: __uninit_default_n(__first, __n); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: template 20472: void 20472: __uninitialized_default_a(_ForwardIterator __first, 20472: _ForwardIterator __last, 20472: _Allocator& __alloc) 20472: { 20472: _ForwardIterator __cur = __first; 20472: try 20472: { 20472: typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; 20472: for (; __cur != __last; ++__cur) 20472: __traits::construct(__alloc, std::__addressof(*__cur)); 20472: } 20472: catch(...) 20472: { 20472: std::_Destroy(__first, __cur, __alloc); 20472: throw; 20472: } 20472: } 20472: 20472: template 20472: inline void 20472: __uninitialized_default_a(_ForwardIterator __first, 20472: _ForwardIterator __last, 20472: allocator<_Tp>&) 20472: { std::__uninitialized_default(__first, __last); } 20472: 20472: 20472: 20472: 20472: 20472: template 20472: _ForwardIterator 20472: __uninitialized_default_n_a(_ForwardIterator __first, _Size __n, 20472: _Allocator& __alloc) 20472: { 20472: _ForwardIterator __cur = __first; 20472: try 20472: { 20472: typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; 20472: for (; __n > 0; --__n, (void) ++__cur) 20472: __traits::construct(__alloc, std::__addressof(*__cur)); 20472: return __cur; 20472: } 20472: catch(...) 20472: { 20472: std::_Destroy(__first, __cur, __alloc); 20472: throw; 20472: } 20472: } 20472: 20472: template 20472: inline _ForwardIterator 20472: __uninitialized_default_n_a(_ForwardIterator __first, _Size __n, 20472: allocator<_Tp>&) 20472: { return std::__uninitialized_default_n(__first, __n); } 20472: 20472: template 20472: struct __uninitialized_default_novalue_1 20472: { 20472: template 20472: static void 20472: __uninit_default_novalue(_ForwardIterator __first, 20472: _ForwardIterator __last) 20472: { 20472: _ForwardIterator __cur = __first; 20472: try 20472: { 20472: for (; __cur != __last; ++__cur) 20472: std::_Construct_novalue(std::__addressof(*__cur)); 20472: } 20472: catch(...) 20472: { 20472: std::_Destroy(__first, __cur); 20472: throw; 20472: } 20472: } 20472: }; 20472: 20472: template<> 20472: struct __uninitialized_default_novalue_1 20472: { 20472: template 20472: static void 20472: __uninit_default_novalue(_ForwardIterator __first, 20472: _ForwardIterator __last) 20472: { 20472: } 20472: }; 20472: 20472: template 20472: struct __uninitialized_default_novalue_n_1 20472: { 20472: template 20472: static _ForwardIterator 20472: __uninit_default_novalue_n(_ForwardIterator __first, _Size __n) 20472: { 20472: _ForwardIterator __cur = __first; 20472: try 20472: { 20472: for (; __n > 0; --__n, (void) ++__cur) 20472: std::_Construct_novalue(std::__addressof(*__cur)); 20472: return __cur; 20472: } 20472: catch(...) 20472: { 20472: std::_Destroy(__first, __cur); 20472: throw; 20472: } 20472: } 20472: }; 20472: 20472: template<> 20472: struct __uninitialized_default_novalue_n_1 20472: { 20472: template 20472: static _ForwardIterator 20472: __uninit_default_novalue_n(_ForwardIterator __first, _Size __n) 20472: { return std::next(__first, __n); } 20472: }; 20472: 20472: 20472: 20472: 20472: template 20472: inline void 20472: __uninitialized_default_novalue(_ForwardIterator __first, 20472: _ForwardIterator __last) 20472: { 20472: typedef typename iterator_traits<_ForwardIterator>::value_type 20472: _ValueType; 20472: 20472: std::__uninitialized_default_novalue_1< 20472: is_trivially_default_constructible<_ValueType>::value>:: 20472: __uninit_default_novalue(__first, __last); 20472: } 20472: 20472: 20472: 20472: template 20472: inline _ForwardIterator 20472: __uninitialized_default_novalue_n(_ForwardIterator __first, _Size __n) 20472: { 20472: typedef typename iterator_traits<_ForwardIterator>::value_type 20472: _ValueType; 20472: 20472: return __uninitialized_default_novalue_n_1< 20472: is_trivially_default_constructible<_ValueType>::value>:: 20472: __uninit_default_novalue_n(__first, __n); 20472: } 20472: 20472: template 20472: _ForwardIterator 20472: __uninitialized_copy_n(_InputIterator __first, _Size __n, 20472: _ForwardIterator __result, input_iterator_tag) 20472: { 20472: _ForwardIterator __cur = __result; 20472: try 20472: { 20472: for (; __n > 0; --__n, (void) ++__first, ++__cur) 20472: std::_Construct(std::__addressof(*__cur), *__first); 20472: return __cur; 20472: } 20472: catch(...) 20472: { 20472: std::_Destroy(__result, __cur); 20472: throw; 20472: } 20472: } 20472: 20472: template 20472: inline _ForwardIterator 20472: __uninitialized_copy_n(_RandomAccessIterator __first, _Size __n, 20472: _ForwardIterator __result, 20472: random_access_iterator_tag) 20472: { return std::uninitialized_copy(__first, __first + __n, __result); } 20472: 20472: template 20472: pair<_InputIterator, _ForwardIterator> 20472: __uninitialized_copy_n_pair(_InputIterator __first, _Size __n, 20472: _ForwardIterator __result, input_iterator_tag) 20472: { 20472: _ForwardIterator __cur = __result; 20472: try 20472: { 20472: for (; __n > 0; --__n, (void) ++__first, ++__cur) 20472: std::_Construct(std::__addressof(*__cur), *__first); 20472: return {__first, __cur}; 20472: } 20472: catch(...) 20472: { 20472: std::_Destroy(__result, __cur); 20472: throw; 20472: } 20472: } 20472: 20472: template 20472: inline pair<_RandomAccessIterator, _ForwardIterator> 20472: __uninitialized_copy_n_pair(_RandomAccessIterator __first, _Size __n, 20472: _ForwardIterator __result, 20472: random_access_iterator_tag) 20472: { 20472: auto __second_res = uninitialized_copy(__first, __first + __n, __result); 20472: auto __first_res = std::next(__first, __n); 20472: return {__first_res, __second_res}; 20472: } 20472: # 852 "/usr/include/c++/10/bits/stl_uninitialized.h" 3 20472: template 20472: inline _ForwardIterator 20472: uninitialized_copy_n(_InputIterator __first, _Size __n, 20472: _ForwardIterator __result) 20472: { return std::__uninitialized_copy_n(__first, __n, __result, 20472: std::__iterator_category(__first)); } 20472: 20472: 20472: template 20472: inline pair<_InputIterator, _ForwardIterator> 20472: __uninitialized_copy_n_pair(_InputIterator __first, _Size __n, 20472: _ForwardIterator __result) 20472: { 20472: return 20472: std::__uninitialized_copy_n_pair(__first, __n, __result, 20472: std::__iterator_category(__first)); 20472: } 20472: # 966 "/usr/include/c++/10/bits/stl_uninitialized.h" 3 20472: template 20472: inline void 20472: __relocate_object_a(_Tp* __restrict __dest, _Up* __restrict __orig, 20472: _Allocator& __alloc) 20472: noexcept(noexcept(std::allocator_traits<_Allocator>::construct(__alloc, 20472: __dest, std::move(*__orig))) 20472: && noexcept(std::allocator_traits<_Allocator>::destroy( 20472: __alloc, std::__addressof(*__orig)))) 20472: { 20472: typedef std::allocator_traits<_Allocator> __traits; 20472: __traits::construct(__alloc, __dest, std::move(*__orig)); 20472: __traits::destroy(__alloc, std::__addressof(*__orig)); 20472: } 20472: 20472: 20472: 20472: template 20472: struct __is_bitwise_relocatable 20472: : is_trivial<_Tp> { }; 20472: 20472: template 20472: inline __enable_if_t::value, _Tp*> 20472: __relocate_a_1(_Tp* __first, _Tp* __last, 20472: _Tp* __result, allocator<_Up>&) noexcept 20472: { 20472: ptrdiff_t __count = __last - __first; 20472: if (__count > 0) 20472: __builtin_memmove(__result, __first, __count * sizeof(_Tp)); 20472: return __result + __count; 20472: } 20472: 20472: template 20472: inline _ForwardIterator 20472: __relocate_a_1(_InputIterator __first, _InputIterator __last, 20472: _ForwardIterator __result, _Allocator& __alloc) 20472: noexcept(noexcept(std::__relocate_object_a(std::addressof(*__result), 20472: std::addressof(*__first), 20472: __alloc))) 20472: { 20472: typedef typename iterator_traits<_InputIterator>::value_type 20472: _ValueType; 20472: typedef typename iterator_traits<_ForwardIterator>::value_type 20472: _ValueType2; 20472: static_assert(std::is_same<_ValueType, _ValueType2>::value, 20472: "relocation is only possible for values of the same type"); 20472: _ForwardIterator __cur = __result; 20472: for (; __first != __last; ++__first, (void)++__cur) 20472: std::__relocate_object_a(std::__addressof(*__cur), 20472: std::__addressof(*__first), __alloc); 20472: return __cur; 20472: } 20472: 20472: template 20472: inline _ForwardIterator 20472: __relocate_a(_InputIterator __first, _InputIterator __last, 20472: _ForwardIterator __result, _Allocator& __alloc) 20472: noexcept(noexcept(__relocate_a_1(std::__niter_base(__first), 20472: std::__niter_base(__last), 20472: std::__niter_base(__result), __alloc))) 20472: { 20472: return __relocate_a_1(std::__niter_base(__first), 20472: std::__niter_base(__last), 20472: std::__niter_base(__result), __alloc); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: } 20472: # 67 "/usr/include/c++/10/deque" 2 3 20472: # 1 "/usr/include/c++/10/bits/stl_deque.h" 1 3 20472: # 63 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: # 1 "/usr/include/c++/10/initializer_list" 1 3 20472: # 33 "/usr/include/c++/10/initializer_list" 3 20472: 20472: # 34 "/usr/include/c++/10/initializer_list" 3 20472: 20472: 20472: 20472: 20472: 20472: #pragma GCC visibility push(default) 20472: 20472: 20472: 20472: namespace std 20472: { 20472: 20472: template 20472: class initializer_list 20472: { 20472: public: 20472: typedef _E value_type; 20472: typedef const _E& reference; 20472: typedef const _E& const_reference; 20472: typedef size_t size_type; 20472: typedef const _E* iterator; 20472: typedef const _E* const_iterator; 20472: 20472: private: 20472: iterator _M_array; 20472: size_type _M_len; 20472: 20472: 20472: constexpr initializer_list(const_iterator __a, size_type __l) 20472: : _M_array(__a), _M_len(__l) { } 20472: 20472: public: 20472: constexpr initializer_list() noexcept 20472: : _M_array(0), _M_len(0) { } 20472: 20472: 20472: constexpr size_type 20472: size() const noexcept { return _M_len; } 20472: 20472: 20472: constexpr const_iterator 20472: begin() const noexcept { return _M_array; } 20472: 20472: 20472: constexpr const_iterator 20472: end() const noexcept { return begin() + size(); } 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: constexpr const _Tp* 20472: begin(initializer_list<_Tp> __ils) noexcept 20472: { return __ils.begin(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: constexpr const _Tp* 20472: end(initializer_list<_Tp> __ils) noexcept 20472: { return __ils.end(); } 20472: } 20472: 20472: #pragma GCC visibility pop 20472: # 64 "/usr/include/c++/10/bits/stl_deque.h" 2 3 20472: # 72 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: # 95 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: constexpr inline size_t 20472: __deque_buf_size(size_t __size) 20472: { return (__size < 512 20472: ? size_t(512 / __size) : size_t(1)); } 20472: # 112 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: template 20472: struct _Deque_iterator 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: private: 20472: template 20472: using __iter = _Deque_iterator<_Tp, _CvTp&, __ptr_rebind<_Ptr, _CvTp>>; 20472: public: 20472: typedef __iter<_Tp> iterator; 20472: typedef __iter const_iterator; 20472: typedef __ptr_rebind<_Ptr, _Tp> _Elt_pointer; 20472: typedef __ptr_rebind<_Ptr, _Elt_pointer> _Map_pointer; 20472: 20472: 20472: static size_t _S_buffer_size() noexcept 20472: { return __deque_buf_size(sizeof(_Tp)); } 20472: 20472: typedef std::random_access_iterator_tag iterator_category; 20472: typedef _Tp value_type; 20472: typedef _Ptr pointer; 20472: typedef _Ref reference; 20472: typedef size_t size_type; 20472: typedef ptrdiff_t difference_type; 20472: typedef _Deque_iterator _Self; 20472: 20472: _Elt_pointer _M_cur; 20472: _Elt_pointer _M_first; 20472: _Elt_pointer _M_last; 20472: _Map_pointer _M_node; 20472: 20472: _Deque_iterator(_Elt_pointer __x, _Map_pointer __y) noexcept 20472: : _M_cur(__x), _M_first(*__y), 20472: _M_last(*__y + _S_buffer_size()), _M_node(__y) { } 20472: 20472: _Deque_iterator() noexcept 20472: : _M_cur(), _M_first(), _M_last(), _M_node() { } 20472: # 161 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: template, 20472: is_same<_Iter, iterator>>> 20472: _Deque_iterator(const _Iter& __x) noexcept 20472: : _M_cur(__x._M_cur), _M_first(__x._M_first), 20472: _M_last(__x._M_last), _M_node(__x._M_node) { } 20472: 20472: _Deque_iterator(const _Deque_iterator& __x) noexcept 20472: : _M_cur(__x._M_cur), _M_first(__x._M_first), 20472: _M_last(__x._M_last), _M_node(__x._M_node) { } 20472: 20472: _Deque_iterator& operator=(const _Deque_iterator&) = default; 20472: 20472: 20472: iterator 20472: _M_const_cast() const noexcept 20472: { return iterator(_M_cur, _M_node); } 20472: 20472: reference 20472: operator*() const noexcept 20472: { return *_M_cur; } 20472: 20472: pointer 20472: operator->() const noexcept 20472: { return _M_cur; } 20472: 20472: _Self& 20472: operator++() noexcept 20472: { 20472: ++_M_cur; 20472: if (_M_cur == _M_last) 20472: { 20472: _M_set_node(_M_node + 1); 20472: _M_cur = _M_first; 20472: } 20472: return *this; 20472: } 20472: 20472: _Self 20472: operator++(int) noexcept 20472: { 20472: _Self __tmp = *this; 20472: ++*this; 20472: return __tmp; 20472: } 20472: 20472: _Self& 20472: operator--() noexcept 20472: { 20472: if (_M_cur == _M_first) 20472: { 20472: _M_set_node(_M_node - 1); 20472: _M_cur = _M_last; 20472: } 20472: --_M_cur; 20472: return *this; 20472: } 20472: 20472: _Self 20472: operator--(int) noexcept 20472: { 20472: _Self __tmp = *this; 20472: --*this; 20472: return __tmp; 20472: } 20472: 20472: _Self& 20472: operator+=(difference_type __n) noexcept 20472: { 20472: const difference_type __offset = __n + (_M_cur - _M_first); 20472: if (__offset >= 0 && __offset < difference_type(_S_buffer_size())) 20472: _M_cur += __n; 20472: else 20472: { 20472: const difference_type __node_offset = 20472: __offset > 0 ? __offset / difference_type(_S_buffer_size()) 20472: : -difference_type((-__offset - 1) 20472: / _S_buffer_size()) - 1; 20472: _M_set_node(_M_node + __node_offset); 20472: _M_cur = _M_first + (__offset - __node_offset 20472: * difference_type(_S_buffer_size())); 20472: } 20472: return *this; 20472: } 20472: 20472: _Self& 20472: operator-=(difference_type __n) noexcept 20472: { return *this += -__n; } 20472: 20472: reference 20472: operator[](difference_type __n) const noexcept 20472: { return *(*this + __n); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: void 20472: _M_set_node(_Map_pointer __new_node) noexcept 20472: { 20472: _M_node = __new_node; 20472: _M_first = *__new_node; 20472: _M_last = _M_first + difference_type(_S_buffer_size()); 20472: } 20472: 20472: friend bool 20472: operator==(const _Self& __x, const _Self& __y) noexcept 20472: { return __x._M_cur == __y._M_cur; } 20472: 20472: 20472: 20472: 20472: template 20472: friend bool 20472: operator==(const _Self& __x, 20472: const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) 20472: noexcept 20472: { return __x._M_cur == __y._M_cur; } 20472: # 290 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: friend bool 20472: operator!=(const _Self& __x, const _Self& __y) noexcept 20472: { return !(__x == __y); } 20472: 20472: template 20472: friend bool 20472: operator!=(const _Self& __x, 20472: const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) 20472: noexcept 20472: { return !(__x == __y); } 20472: 20472: friend bool 20472: operator<(const _Self& __x, const _Self& __y) noexcept 20472: { 20472: return (__x._M_node == __y._M_node) 20472: ? (__x._M_cur < __y._M_cur) : (__x._M_node < __y._M_node); 20472: } 20472: 20472: template 20472: friend bool 20472: operator<(const _Self& __x, 20472: const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) 20472: noexcept 20472: { 20472: return (__x._M_node == __y._M_node) 20472: ? (__x._M_cur < __y._M_cur) : (__x._M_node < __y._M_node); 20472: } 20472: 20472: friend bool 20472: operator>(const _Self& __x, const _Self& __y) noexcept 20472: { return __y < __x; } 20472: 20472: template 20472: friend bool 20472: operator>(const _Self& __x, 20472: const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) 20472: noexcept 20472: { return __y < __x; } 20472: 20472: friend bool 20472: operator<=(const _Self& __x, const _Self& __y) noexcept 20472: { return !(__y < __x); } 20472: 20472: template 20472: friend bool 20472: operator<=(const _Self& __x, 20472: const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) 20472: noexcept 20472: { return !(__y < __x); } 20472: 20472: friend bool 20472: operator>=(const _Self& __x, const _Self& __y) noexcept 20472: { return !(__x < __y); } 20472: 20472: template 20472: friend bool 20472: operator>=(const _Self& __x, 20472: const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) 20472: noexcept 20472: { return !(__x < __y); } 20472: 20472: 20472: friend difference_type 20472: operator-(const _Self& __x, const _Self& __y) noexcept 20472: { 20472: return difference_type(_S_buffer_size()) 20472: * (__x._M_node - __y._M_node - 1) + (__x._M_cur - __x._M_first) 20472: + (__y._M_last - __y._M_cur); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: template 20472: friend difference_type 20472: operator-(const _Self& __x, 20472: const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) noexcept 20472: { 20472: return difference_type(_S_buffer_size()) 20472: * (__x._M_node - __y._M_node - 1) + (__x._M_cur - __x._M_first) 20472: + (__y._M_last - __y._M_cur); 20472: } 20472: 20472: friend _Self 20472: operator+(const _Self& __x, difference_type __n) noexcept 20472: { 20472: _Self __tmp = __x; 20472: __tmp += __n; 20472: return __tmp; 20472: } 20472: 20472: friend _Self 20472: operator-(const _Self& __x, difference_type __n) noexcept 20472: { 20472: _Self __tmp = __x; 20472: __tmp -= __n; 20472: return __tmp; 20472: } 20472: 20472: friend _Self 20472: operator+(difference_type __n, const _Self& __x) noexcept 20472: { return __x + __n; } 20472: }; 20472: # 405 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: template 20472: class _Deque_base 20472: { 20472: protected: 20472: typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template 20472: rebind<_Tp>::other _Tp_alloc_type; 20472: typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Alloc_traits; 20472: 20472: 20472: 20472: 20472: 20472: typedef typename _Alloc_traits::pointer _Ptr; 20472: typedef typename _Alloc_traits::const_pointer _Ptr_const; 20472: 20472: 20472: typedef typename _Alloc_traits::template rebind<_Ptr>::other 20472: _Map_alloc_type; 20472: typedef __gnu_cxx::__alloc_traits<_Map_alloc_type> _Map_alloc_traits; 20472: 20472: typedef _Alloc allocator_type; 20472: 20472: allocator_type 20472: get_allocator() const noexcept 20472: { return allocator_type(_M_get_Tp_allocator()); } 20472: 20472: typedef _Deque_iterator<_Tp, _Tp&, _Ptr> iterator; 20472: typedef _Deque_iterator<_Tp, const _Tp&, _Ptr_const> const_iterator; 20472: 20472: _Deque_base() 20472: : _M_impl() 20472: { _M_initialize_map(0); } 20472: 20472: _Deque_base(size_t __num_elements) 20472: : _M_impl() 20472: { _M_initialize_map(__num_elements); } 20472: 20472: _Deque_base(const allocator_type& __a, size_t __num_elements) 20472: : _M_impl(__a) 20472: { _M_initialize_map(__num_elements); } 20472: 20472: _Deque_base(const allocator_type& __a) 20472: : _M_impl(__a) 20472: { } 20472: 20472: 20472: _Deque_base(_Deque_base&& __x) 20472: : _M_impl(std::move(__x._M_get_Tp_allocator())) 20472: { 20472: _M_initialize_map(0); 20472: if (__x._M_impl._M_map) 20472: this->_M_impl._M_swap_data(__x._M_impl); 20472: } 20472: 20472: _Deque_base(_Deque_base&& __x, const allocator_type& __a) 20472: : _M_impl(std::move(__x._M_impl), _Tp_alloc_type(__a)) 20472: { __x._M_initialize_map(0); } 20472: 20472: _Deque_base(_Deque_base&& __x, const allocator_type& __a, size_t __n) 20472: : _M_impl(__a) 20472: { 20472: if (__x.get_allocator() == __a) 20472: { 20472: if (__x._M_impl._M_map) 20472: { 20472: _M_initialize_map(0); 20472: this->_M_impl._M_swap_data(__x._M_impl); 20472: } 20472: } 20472: else 20472: { 20472: _M_initialize_map(__n); 20472: } 20472: } 20472: 20472: 20472: ~_Deque_base() noexcept; 20472: 20472: typedef typename iterator::_Map_pointer _Map_pointer; 20472: 20472: struct _Deque_impl_data 20472: { 20472: _Map_pointer _M_map; 20472: size_t _M_map_size; 20472: iterator _M_start; 20472: iterator _M_finish; 20472: 20472: _Deque_impl_data() noexcept 20472: : _M_map(), _M_map_size(), _M_start(), _M_finish() 20472: { } 20472: 20472: 20472: _Deque_impl_data(const _Deque_impl_data&) = default; 20472: _Deque_impl_data& 20472: operator=(const _Deque_impl_data&) = default; 20472: 20472: _Deque_impl_data(_Deque_impl_data&& __x) noexcept 20472: : _Deque_impl_data(__x) 20472: { __x = _Deque_impl_data(); } 20472: 20472: 20472: void 20472: _M_swap_data(_Deque_impl_data& __x) noexcept 20472: { 20472: 20472: 20472: std::swap(*this, __x); 20472: } 20472: }; 20472: 20472: 20472: 20472: 20472: struct _Deque_impl 20472: : public _Tp_alloc_type, public _Deque_impl_data 20472: { 20472: _Deque_impl() noexcept(is_nothrow_default_constructible<_Tp_alloc_type>::value) 20472: 20472: : _Tp_alloc_type() 20472: { } 20472: 20472: _Deque_impl(const _Tp_alloc_type& __a) noexcept 20472: : _Tp_alloc_type(__a) 20472: { } 20472: 20472: 20472: _Deque_impl(_Deque_impl&&) = default; 20472: 20472: _Deque_impl(_Tp_alloc_type&& __a) noexcept 20472: : _Tp_alloc_type(std::move(__a)) 20472: { } 20472: 20472: _Deque_impl(_Deque_impl&& __d, _Tp_alloc_type&& __a) 20472: : _Tp_alloc_type(std::move(__a)), _Deque_impl_data(std::move(__d)) 20472: { } 20472: 20472: }; 20472: 20472: _Tp_alloc_type& 20472: _M_get_Tp_allocator() noexcept 20472: { return this->_M_impl; } 20472: 20472: const _Tp_alloc_type& 20472: _M_get_Tp_allocator() const noexcept 20472: { return this->_M_impl; } 20472: 20472: _Map_alloc_type 20472: _M_get_map_allocator() const noexcept 20472: { return _Map_alloc_type(_M_get_Tp_allocator()); } 20472: 20472: _Ptr 20472: _M_allocate_node() 20472: { 20472: typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Traits; 20472: return _Traits::allocate(_M_impl, __deque_buf_size(sizeof(_Tp))); 20472: } 20472: 20472: void 20472: _M_deallocate_node(_Ptr __p) noexcept 20472: { 20472: typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Traits; 20472: _Traits::deallocate(_M_impl, __p, __deque_buf_size(sizeof(_Tp))); 20472: } 20472: 20472: _Map_pointer 20472: _M_allocate_map(size_t __n) 20472: { 20472: _Map_alloc_type __map_alloc = _M_get_map_allocator(); 20472: return _Map_alloc_traits::allocate(__map_alloc, __n); 20472: } 20472: 20472: void 20472: _M_deallocate_map(_Map_pointer __p, size_t __n) noexcept 20472: { 20472: _Map_alloc_type __map_alloc = _M_get_map_allocator(); 20472: _Map_alloc_traits::deallocate(__map_alloc, __p, __n); 20472: } 20472: 20472: void _M_initialize_map(size_t); 20472: void _M_create_nodes(_Map_pointer __nstart, _Map_pointer __nfinish); 20472: void _M_destroy_nodes(_Map_pointer __nstart, 20472: _Map_pointer __nfinish) noexcept; 20472: enum { _S_initial_map_size = 8 }; 20472: 20472: _Deque_impl _M_impl; 20472: }; 20472: 20472: template 20472: _Deque_base<_Tp, _Alloc>:: 20472: ~_Deque_base() noexcept 20472: { 20472: if (this->_M_impl._M_map) 20472: { 20472: _M_destroy_nodes(this->_M_impl._M_start._M_node, 20472: this->_M_impl._M_finish._M_node + 1); 20472: _M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size); 20472: } 20472: } 20472: # 612 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: template 20472: void 20472: _Deque_base<_Tp, _Alloc>:: 20472: _M_initialize_map(size_t __num_elements) 20472: { 20472: const size_t __num_nodes = (__num_elements / __deque_buf_size(sizeof(_Tp)) 20472: + 1); 20472: 20472: this->_M_impl._M_map_size = std::max((size_t) _S_initial_map_size, 20472: size_t(__num_nodes + 2)); 20472: this->_M_impl._M_map = _M_allocate_map(this->_M_impl._M_map_size); 20472: 20472: 20472: 20472: 20472: 20472: 20472: _Map_pointer __nstart = (this->_M_impl._M_map 20472: + (this->_M_impl._M_map_size - __num_nodes) / 2); 20472: _Map_pointer __nfinish = __nstart + __num_nodes; 20472: 20472: try 20472: { _M_create_nodes(__nstart, __nfinish); } 20472: catch(...) 20472: { 20472: _M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size); 20472: this->_M_impl._M_map = _Map_pointer(); 20472: this->_M_impl._M_map_size = 0; 20472: throw; 20472: } 20472: 20472: this->_M_impl._M_start._M_set_node(__nstart); 20472: this->_M_impl._M_finish._M_set_node(__nfinish - 1); 20472: this->_M_impl._M_start._M_cur = _M_impl._M_start._M_first; 20472: this->_M_impl._M_finish._M_cur = (this->_M_impl._M_finish._M_first 20472: + __num_elements 20472: % __deque_buf_size(sizeof(_Tp))); 20472: } 20472: 20472: template 20472: void 20472: _Deque_base<_Tp, _Alloc>:: 20472: _M_create_nodes(_Map_pointer __nstart, _Map_pointer __nfinish) 20472: { 20472: _Map_pointer __cur; 20472: try 20472: { 20472: for (__cur = __nstart; __cur < __nfinish; ++__cur) 20472: *__cur = this->_M_allocate_node(); 20472: } 20472: catch(...) 20472: { 20472: _M_destroy_nodes(__nstart, __cur); 20472: throw; 20472: } 20472: } 20472: 20472: template 20472: void 20472: _Deque_base<_Tp, _Alloc>:: 20472: _M_destroy_nodes(_Map_pointer __nstart, 20472: _Map_pointer __nfinish) noexcept 20472: { 20472: for (_Map_pointer __n = __nstart; __n < __nfinish; ++__n) 20472: _M_deallocate_node(*__n); 20472: } 20472: # 763 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: template > 20472: class deque : protected _Deque_base<_Tp, _Alloc> 20472: { 20472: # 776 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: static_assert(is_same::type, _Tp>::value, 20472: "std::deque must have a non-const, non-volatile value_type"); 20472: 20472: static_assert(is_same::value, 20472: "std::deque must have the same value_type as its allocator"); 20472: 20472: 20472: 20472: typedef _Deque_base<_Tp, _Alloc> _Base; 20472: typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; 20472: typedef typename _Base::_Alloc_traits _Alloc_traits; 20472: typedef typename _Base::_Map_pointer _Map_pointer; 20472: 20472: public: 20472: typedef _Tp value_type; 20472: typedef typename _Alloc_traits::pointer pointer; 20472: typedef typename _Alloc_traits::const_pointer const_pointer; 20472: typedef typename _Alloc_traits::reference reference; 20472: typedef typename _Alloc_traits::const_reference const_reference; 20472: typedef typename _Base::iterator iterator; 20472: typedef typename _Base::const_iterator const_iterator; 20472: typedef std::reverse_iterator const_reverse_iterator; 20472: typedef std::reverse_iterator reverse_iterator; 20472: typedef size_t size_type; 20472: typedef ptrdiff_t difference_type; 20472: typedef _Alloc allocator_type; 20472: 20472: private: 20472: static size_t _S_buffer_size() noexcept 20472: { return __deque_buf_size(sizeof(_Tp)); } 20472: 20472: 20472: using _Base::_M_initialize_map; 20472: using _Base::_M_create_nodes; 20472: using _Base::_M_destroy_nodes; 20472: using _Base::_M_allocate_node; 20472: using _Base::_M_deallocate_node; 20472: using _Base::_M_allocate_map; 20472: using _Base::_M_deallocate_map; 20472: using _Base::_M_get_Tp_allocator; 20472: 20472: 20472: 20472: 20472: 20472: using _Base::_M_impl; 20472: 20472: public: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: deque() = default; 20472: # 840 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: explicit 20472: deque(const allocator_type& __a) 20472: : _Base(__a, 0) { } 20472: # 853 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: explicit 20472: deque(size_type __n, const allocator_type& __a = allocator_type()) 20472: : _Base(__a, _S_check_init_len(__n, __a)) 20472: { _M_default_initialize(); } 20472: # 866 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: deque(size_type __n, const value_type& __value, 20472: const allocator_type& __a = allocator_type()) 20472: : _Base(__a, _S_check_init_len(__n, __a)) 20472: { _M_fill_initialize(__value); } 20472: # 893 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: deque(const deque& __x) 20472: : _Base(_Alloc_traits::_S_select_on_copy(__x._M_get_Tp_allocator()), 20472: __x.size()) 20472: { std::__uninitialized_copy_a(__x.begin(), __x.end(), 20472: this->_M_impl._M_start, 20472: _M_get_Tp_allocator()); } 20472: # 909 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: deque(deque&&) = default; 20472: 20472: 20472: deque(const deque& __x, const allocator_type& __a) 20472: : _Base(__a, __x.size()) 20472: { std::__uninitialized_copy_a(__x.begin(), __x.end(), 20472: this->_M_impl._M_start, 20472: _M_get_Tp_allocator()); } 20472: 20472: 20472: deque(deque&& __x, const allocator_type& __a) 20472: : deque(std::move(__x), __a, typename _Alloc_traits::is_always_equal{}) 20472: { } 20472: 20472: private: 20472: deque(deque&& __x, const allocator_type& __a, true_type) 20472: : _Base(std::move(__x), __a) 20472: { } 20472: 20472: deque(deque&& __x, const allocator_type& __a, false_type) 20472: : _Base(std::move(__x), __a, __x.size()) 20472: { 20472: if (__x.get_allocator() != __a && !__x.empty()) 20472: { 20472: std::__uninitialized_move_a(__x.begin(), __x.end(), 20472: this->_M_impl._M_start, 20472: _M_get_Tp_allocator()); 20472: __x.clear(); 20472: } 20472: } 20472: 20472: public: 20472: # 952 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: deque(initializer_list __l, 20472: const allocator_type& __a = allocator_type()) 20472: : _Base(__a) 20472: { 20472: _M_range_initialize(__l.begin(), __l.end(), 20472: random_access_iterator_tag()); 20472: } 20472: # 977 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: template> 20472: deque(_InputIterator __first, _InputIterator __last, 20472: const allocator_type& __a = allocator_type()) 20472: : _Base(__a) 20472: { 20472: _M_range_initialize(__first, __last, 20472: std::__iterator_category(__first)); 20472: } 20472: # 1003 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: ~deque() 20472: { _M_destroy_data(begin(), end(), _M_get_Tp_allocator()); } 20472: # 1015 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: deque& 20472: operator=(const deque& __x); 20472: # 1027 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: deque& 20472: operator=(deque&& __x) noexcept(_Alloc_traits::_S_always_equal()) 20472: { 20472: using __always_equal = typename _Alloc_traits::is_always_equal; 20472: _M_move_assign1(std::move(__x), __always_equal{}); 20472: return *this; 20472: } 20472: # 1046 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: deque& 20472: operator=(initializer_list __l) 20472: { 20472: _M_assign_aux(__l.begin(), __l.end(), 20472: random_access_iterator_tag()); 20472: return *this; 20472: } 20472: # 1065 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: void 20472: assign(size_type __n, const value_type& __val) 20472: { _M_fill_assign(__n, __val); } 20472: # 1082 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: template> 20472: void 20472: assign(_InputIterator __first, _InputIterator __last) 20472: { _M_assign_aux(__first, __last, std::__iterator_category(__first)); } 20472: # 1109 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: void 20472: assign(initializer_list __l) 20472: { _M_assign_aux(__l.begin(), __l.end(), random_access_iterator_tag()); } 20472: 20472: 20472: 20472: allocator_type 20472: get_allocator() const noexcept 20472: { return _Base::get_allocator(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: iterator 20472: begin() noexcept 20472: { return this->_M_impl._M_start; } 20472: 20472: 20472: 20472: 20472: 20472: const_iterator 20472: begin() const noexcept 20472: { return this->_M_impl._M_start; } 20472: 20472: 20472: 20472: 20472: 20472: 20472: iterator 20472: end() noexcept 20472: { return this->_M_impl._M_finish; } 20472: 20472: 20472: 20472: 20472: 20472: 20472: const_iterator 20472: end() const noexcept 20472: { return this->_M_impl._M_finish; } 20472: 20472: 20472: 20472: 20472: 20472: 20472: reverse_iterator 20472: rbegin() noexcept 20472: { return reverse_iterator(this->_M_impl._M_finish); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: const_reverse_iterator 20472: rbegin() const noexcept 20472: { return const_reverse_iterator(this->_M_impl._M_finish); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: reverse_iterator 20472: rend() noexcept 20472: { return reverse_iterator(this->_M_impl._M_start); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: const_reverse_iterator 20472: rend() const noexcept 20472: { return const_reverse_iterator(this->_M_impl._M_start); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: const_iterator 20472: cbegin() const noexcept 20472: { return this->_M_impl._M_start; } 20472: 20472: 20472: 20472: 20472: 20472: 20472: const_iterator 20472: cend() const noexcept 20472: { return this->_M_impl._M_finish; } 20472: 20472: 20472: 20472: 20472: 20472: 20472: const_reverse_iterator 20472: crbegin() const noexcept 20472: { return const_reverse_iterator(this->_M_impl._M_finish); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: const_reverse_iterator 20472: crend() const noexcept 20472: { return const_reverse_iterator(this->_M_impl._M_start); } 20472: 20472: 20472: 20472: 20472: size_type 20472: size() const noexcept 20472: { return this->_M_impl._M_finish - this->_M_impl._M_start; } 20472: 20472: 20472: size_type 20472: max_size() const noexcept 20472: { return _S_max_size(_M_get_Tp_allocator()); } 20472: # 1248 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: void 20472: resize(size_type __new_size) 20472: { 20472: const size_type __len = size(); 20472: if (__new_size > __len) 20472: _M_default_append(__new_size - __len); 20472: else if (__new_size < __len) 20472: _M_erase_at_end(this->_M_impl._M_start 20472: + difference_type(__new_size)); 20472: } 20472: # 1270 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: void 20472: resize(size_type __new_size, const value_type& __x) 20472: # 1287 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: { 20472: const size_type __len = size(); 20472: if (__new_size > __len) 20472: _M_fill_insert(this->_M_impl._M_finish, __new_size - __len, __x); 20472: else if (__new_size < __len) 20472: _M_erase_at_end(this->_M_impl._M_start 20472: + difference_type(__new_size)); 20472: } 20472: 20472: 20472: 20472: void 20472: shrink_to_fit() noexcept 20472: { _M_shrink_to_fit(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: bool 20472: empty() const noexcept 20472: { return this->_M_impl._M_finish == this->_M_impl._M_start; } 20472: # 1323 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: reference 20472: operator[](size_type __n) noexcept 20472: { 20472: ; 20472: return this->_M_impl._M_start[difference_type(__n)]; 20472: } 20472: # 1341 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: const_reference 20472: operator[](size_type __n) const noexcept 20472: { 20472: ; 20472: return this->_M_impl._M_start[difference_type(__n)]; 20472: } 20472: 20472: protected: 20472: 20472: void 20472: _M_range_check(size_type __n) const 20472: { 20472: if (__n >= this->size()) 20472: __throw_out_of_range_fmt(("deque::_M_range_check: __n " "(which is %zu)>= this->size() " "(which is %zu)") 20472: 20472: , 20472: __n, this->size()); 20472: } 20472: 20472: public: 20472: # 1372 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: reference 20472: at(size_type __n) 20472: { 20472: _M_range_check(__n); 20472: return (*this)[__n]; 20472: } 20472: # 1390 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: const_reference 20472: at(size_type __n) const 20472: { 20472: _M_range_check(__n); 20472: return (*this)[__n]; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: reference 20472: front() noexcept 20472: { 20472: ; 20472: return *begin(); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: const_reference 20472: front() const noexcept 20472: { 20472: ; 20472: return *begin(); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: reference 20472: back() noexcept 20472: { 20472: ; 20472: iterator __tmp = end(); 20472: --__tmp; 20472: return *__tmp; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: const_reference 20472: back() const noexcept 20472: { 20472: ; 20472: const_iterator __tmp = end(); 20472: --__tmp; 20472: return *__tmp; 20472: } 20472: # 1455 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: void 20472: push_front(const value_type& __x) 20472: { 20472: if (this->_M_impl._M_start._M_cur != this->_M_impl._M_start._M_first) 20472: { 20472: _Alloc_traits::construct(this->_M_impl, 20472: this->_M_impl._M_start._M_cur - 1, 20472: __x); 20472: --this->_M_impl._M_start._M_cur; 20472: } 20472: else 20472: _M_push_front_aux(__x); 20472: } 20472: 20472: 20472: void 20472: push_front(value_type&& __x) 20472: { emplace_front(std::move(__x)); } 20472: 20472: template 20472: 20472: 20472: 20472: void 20472: 20472: emplace_front(_Args&&... __args); 20472: # 1492 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: void 20472: push_back(const value_type& __x) 20472: { 20472: if (this->_M_impl._M_finish._M_cur 20472: != this->_M_impl._M_finish._M_last - 1) 20472: { 20472: _Alloc_traits::construct(this->_M_impl, 20472: this->_M_impl._M_finish._M_cur, __x); 20472: ++this->_M_impl._M_finish._M_cur; 20472: } 20472: else 20472: _M_push_back_aux(__x); 20472: } 20472: 20472: 20472: void 20472: push_back(value_type&& __x) 20472: { emplace_back(std::move(__x)); } 20472: 20472: template 20472: 20472: 20472: 20472: void 20472: 20472: emplace_back(_Args&&... __args); 20472: # 1528 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: void 20472: pop_front() noexcept 20472: { 20472: ; 20472: if (this->_M_impl._M_start._M_cur 20472: != this->_M_impl._M_start._M_last - 1) 20472: { 20472: _Alloc_traits::destroy(_M_get_Tp_allocator(), 20472: this->_M_impl._M_start._M_cur); 20472: ++this->_M_impl._M_start._M_cur; 20472: } 20472: else 20472: _M_pop_front_aux(); 20472: } 20472: # 1551 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: void 20472: pop_back() noexcept 20472: { 20472: ; 20472: if (this->_M_impl._M_finish._M_cur 20472: != this->_M_impl._M_finish._M_first) 20472: { 20472: --this->_M_impl._M_finish._M_cur; 20472: _Alloc_traits::destroy(_M_get_Tp_allocator(), 20472: this->_M_impl._M_finish._M_cur); 20472: } 20472: else 20472: _M_pop_back_aux(); 20472: } 20472: # 1576 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: template 20472: iterator 20472: emplace(const_iterator __position, _Args&&... __args); 20472: # 1589 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: iterator 20472: insert(const_iterator __position, const value_type& __x); 20472: # 1615 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: iterator 20472: insert(const_iterator __position, value_type&& __x) 20472: { return emplace(__position, std::move(__x)); } 20472: # 1629 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: iterator 20472: insert(const_iterator __p, initializer_list __l) 20472: { 20472: auto __offset = __p - cbegin(); 20472: _M_range_insert_aux(__p._M_const_cast(), __l.begin(), __l.end(), 20472: std::random_access_iterator_tag()); 20472: return begin() + __offset; 20472: } 20472: # 1648 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: iterator 20472: insert(const_iterator __position, size_type __n, const value_type& __x) 20472: { 20472: difference_type __offset = __position - cbegin(); 20472: _M_fill_insert(__position._M_const_cast(), __n, __x); 20472: return begin() + __offset; 20472: } 20472: # 1682 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: template> 20472: iterator 20472: insert(const_iterator __position, _InputIterator __first, 20472: _InputIterator __last) 20472: { 20472: difference_type __offset = __position - cbegin(); 20472: _M_range_insert_aux(__position._M_const_cast(), __first, __last, 20472: std::__iterator_category(__first)); 20472: return begin() + __offset; 20472: } 20472: # 1728 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: iterator 20472: 20472: erase(const_iterator __position) 20472: 20472: 20472: 20472: { return _M_erase(__position._M_const_cast()); } 20472: # 1752 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: iterator 20472: 20472: erase(const_iterator __first, const_iterator __last) 20472: 20472: 20472: 20472: { return _M_erase(__first._M_const_cast(), __last._M_const_cast()); } 20472: # 1771 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: void 20472: swap(deque& __x) noexcept 20472: { 20472: 20472: 20472: ; 20472: 20472: _M_impl._M_swap_data(__x._M_impl); 20472: _Alloc_traits::_S_on_swap(_M_get_Tp_allocator(), 20472: __x._M_get_Tp_allocator()); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: void 20472: clear() noexcept 20472: { _M_erase_at_end(begin()); } 20472: 20472: protected: 20472: # 1821 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: static size_t 20472: _S_check_init_len(size_t __n, const allocator_type& __a) 20472: { 20472: if (__n > _S_max_size(__a)) 20472: __throw_length_error( 20472: ("cannot create std::deque larger than max_size()")); 20472: return __n; 20472: } 20472: 20472: static size_type 20472: _S_max_size(const _Tp_alloc_type& __a) noexcept 20472: { 20472: const size_t __diffmax = __gnu_cxx::__numeric_traits::__max; 20472: const size_t __allocmax = _Alloc_traits::max_size(__a); 20472: return (std::min)(__diffmax, __allocmax); 20472: } 20472: # 1850 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: template 20472: void 20472: _M_range_initialize(_InputIterator __first, _InputIterator __last, 20472: std::input_iterator_tag); 20472: 20472: 20472: template 20472: void 20472: _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last, 20472: std::forward_iterator_tag); 20472: # 1872 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: void 20472: _M_fill_initialize(const value_type& __value); 20472: 20472: 20472: 20472: void 20472: _M_default_initialize(); 20472: # 1903 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: template 20472: void 20472: _M_assign_aux(_InputIterator __first, _InputIterator __last, 20472: std::input_iterator_tag); 20472: 20472: 20472: template 20472: void 20472: _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, 20472: std::forward_iterator_tag) 20472: { 20472: const size_type __len = std::distance(__first, __last); 20472: if (__len > size()) 20472: { 20472: _ForwardIterator __mid = __first; 20472: std::advance(__mid, size()); 20472: std::copy(__first, __mid, begin()); 20472: _M_range_insert_aux(end(), __mid, __last, 20472: std::__iterator_category(__first)); 20472: } 20472: else 20472: _M_erase_at_end(std::copy(__first, __last, begin())); 20472: } 20472: 20472: 20472: 20472: void 20472: _M_fill_assign(size_type __n, const value_type& __val) 20472: { 20472: if (__n > size()) 20472: { 20472: std::fill(begin(), end(), __val); 20472: _M_fill_insert(end(), __n - size(), __val); 20472: } 20472: else 20472: { 20472: _M_erase_at_end(begin() + difference_type(__n)); 20472: std::fill(begin(), end(), __val); 20472: } 20472: } 20472: # 1951 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: template 20472: void _M_push_back_aux(_Args&&... __args); 20472: 20472: template 20472: void _M_push_front_aux(_Args&&... __args); 20472: 20472: 20472: void _M_pop_back_aux(); 20472: 20472: void _M_pop_front_aux(); 20472: # 1990 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: template 20472: void 20472: _M_range_insert_aux(iterator __pos, _InputIterator __first, 20472: _InputIterator __last, std::input_iterator_tag); 20472: 20472: 20472: template 20472: void 20472: _M_range_insert_aux(iterator __pos, _ForwardIterator __first, 20472: _ForwardIterator __last, std::forward_iterator_tag); 20472: 20472: 20472: 20472: 20472: void 20472: _M_fill_insert(iterator __pos, size_type __n, const value_type& __x); 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: iterator 20472: _M_insert_aux(iterator __pos, _Args&&... __args); 20472: 20472: 20472: 20472: void 20472: _M_insert_aux(iterator __pos, size_type __n, const value_type& __x); 20472: 20472: 20472: template 20472: void 20472: _M_insert_aux(iterator __pos, 20472: _ForwardIterator __first, _ForwardIterator __last, 20472: size_type __n); 20472: 20472: 20472: 20472: 20472: void 20472: _M_destroy_data_aux(iterator __first, iterator __last); 20472: 20472: 20472: 20472: template 20472: void 20472: _M_destroy_data(iterator __first, iterator __last, const _Alloc1&) 20472: { _M_destroy_data_aux(__first, __last); } 20472: 20472: void 20472: _M_destroy_data(iterator __first, iterator __last, 20472: const std::allocator<_Tp>&) 20472: { 20472: if (!__has_trivial_destructor(value_type)) 20472: _M_destroy_data_aux(__first, __last); 20472: } 20472: 20472: 20472: void 20472: _M_erase_at_begin(iterator __pos) 20472: { 20472: _M_destroy_data(begin(), __pos, _M_get_Tp_allocator()); 20472: _M_destroy_nodes(this->_M_impl._M_start._M_node, __pos._M_node); 20472: this->_M_impl._M_start = __pos; 20472: } 20472: 20472: 20472: 20472: void 20472: _M_erase_at_end(iterator __pos) 20472: { 20472: _M_destroy_data(__pos, end(), _M_get_Tp_allocator()); 20472: _M_destroy_nodes(__pos._M_node + 1, 20472: this->_M_impl._M_finish._M_node + 1); 20472: this->_M_impl._M_finish = __pos; 20472: } 20472: 20472: iterator 20472: _M_erase(iterator __pos); 20472: 20472: iterator 20472: _M_erase(iterator __first, iterator __last); 20472: 20472: 20472: 20472: void 20472: _M_default_append(size_type __n); 20472: 20472: bool 20472: _M_shrink_to_fit(); 20472: 20472: 20472: 20472: 20472: iterator 20472: _M_reserve_elements_at_front(size_type __n) 20472: { 20472: const size_type __vacancies = this->_M_impl._M_start._M_cur 20472: - this->_M_impl._M_start._M_first; 20472: if (__n > __vacancies) 20472: _M_new_elements_at_front(__n - __vacancies); 20472: return this->_M_impl._M_start - difference_type(__n); 20472: } 20472: 20472: iterator 20472: _M_reserve_elements_at_back(size_type __n) 20472: { 20472: const size_type __vacancies = (this->_M_impl._M_finish._M_last 20472: - this->_M_impl._M_finish._M_cur) - 1; 20472: if (__n > __vacancies) 20472: _M_new_elements_at_back(__n - __vacancies); 20472: return this->_M_impl._M_finish + difference_type(__n); 20472: } 20472: 20472: void 20472: _M_new_elements_at_front(size_type __new_elements); 20472: 20472: void 20472: _M_new_elements_at_back(size_type __new_elements); 20472: # 2122 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: void 20472: _M_reserve_map_at_back(size_type __nodes_to_add = 1) 20472: { 20472: if (__nodes_to_add + 1 > this->_M_impl._M_map_size 20472: - (this->_M_impl._M_finish._M_node - this->_M_impl._M_map)) 20472: _M_reallocate_map(__nodes_to_add, false); 20472: } 20472: 20472: void 20472: _M_reserve_map_at_front(size_type __nodes_to_add = 1) 20472: { 20472: if (__nodes_to_add > size_type(this->_M_impl._M_start._M_node 20472: - this->_M_impl._M_map)) 20472: _M_reallocate_map(__nodes_to_add, true); 20472: } 20472: 20472: void 20472: _M_reallocate_map(size_type __nodes_to_add, bool __add_at_front); 20472: 20472: 20472: 20472: 20472: 20472: void 20472: _M_move_assign1(deque&& __x, true_type) noexcept 20472: { 20472: this->_M_impl._M_swap_data(__x._M_impl); 20472: __x.clear(); 20472: std::__alloc_on_move(_M_get_Tp_allocator(), __x._M_get_Tp_allocator()); 20472: } 20472: 20472: 20472: 20472: 20472: void 20472: _M_move_assign1(deque&& __x, false_type) 20472: { 20472: constexpr bool __move_storage = 20472: _Alloc_traits::_S_propagate_on_move_assign(); 20472: _M_move_assign2(std::move(__x), __bool_constant<__move_storage>()); 20472: } 20472: 20472: 20472: 20472: template 20472: void 20472: _M_replace_map(_Args&&... __args) 20472: { 20472: 20472: deque __newobj(std::forward<_Args>(__args)...); 20472: 20472: clear(); 20472: _M_deallocate_node(*begin()._M_node); 20472: _M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size); 20472: this->_M_impl._M_map = nullptr; 20472: this->_M_impl._M_map_size = 0; 20472: 20472: this->_M_impl._M_swap_data(__newobj._M_impl); 20472: } 20472: 20472: 20472: void 20472: _M_move_assign2(deque&& __x, true_type) 20472: { 20472: 20472: auto __alloc = __x._M_get_Tp_allocator(); 20472: 20472: 20472: _M_replace_map(std::move(__x)); 20472: 20472: _M_get_Tp_allocator() = std::move(__alloc); 20472: } 20472: 20472: 20472: 20472: void 20472: _M_move_assign2(deque&& __x, false_type) 20472: { 20472: if (__x._M_get_Tp_allocator() == this->_M_get_Tp_allocator()) 20472: { 20472: 20472: 20472: _M_replace_map(std::move(__x), __x.get_allocator()); 20472: } 20472: else 20472: { 20472: 20472: 20472: _M_assign_aux(std::make_move_iterator(__x.begin()), 20472: std::make_move_iterator(__x.end()), 20472: std::random_access_iterator_tag()); 20472: __x.clear(); 20472: } 20472: } 20472: 20472: }; 20472: # 2239 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: template 20472: inline bool 20472: operator==(const deque<_Tp, _Alloc>& __x, const deque<_Tp, _Alloc>& __y) 20472: { return __x.size() == __y.size() 20472: && std::equal(__x.begin(), __x.end(), __y.begin()); } 20472: # 2277 "/usr/include/c++/10/bits/stl_deque.h" 3 20472: template 20472: inline bool 20472: operator<(const deque<_Tp, _Alloc>& __x, const deque<_Tp, _Alloc>& __y) 20472: { return std::lexicographical_compare(__x.begin(), __x.end(), 20472: __y.begin(), __y.end()); } 20472: 20472: 20472: template 20472: inline bool 20472: operator!=(const deque<_Tp, _Alloc>& __x, const deque<_Tp, _Alloc>& __y) 20472: { return !(__x == __y); } 20472: 20472: 20472: template 20472: inline bool 20472: operator>(const deque<_Tp, _Alloc>& __x, const deque<_Tp, _Alloc>& __y) 20472: { return __y < __x; } 20472: 20472: 20472: template 20472: inline bool 20472: operator<=(const deque<_Tp, _Alloc>& __x, const deque<_Tp, _Alloc>& __y) 20472: { return !(__y < __x); } 20472: 20472: 20472: template 20472: inline bool 20472: operator>=(const deque<_Tp, _Alloc>& __x, const deque<_Tp, _Alloc>& __y) 20472: { return !(__x < __y); } 20472: 20472: 20472: 20472: template 20472: inline void 20472: swap(deque<_Tp,_Alloc>& __x, deque<_Tp,_Alloc>& __y) 20472: noexcept(noexcept(__x.swap(__y))) 20472: { __x.swap(__y); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct __is_bitwise_relocatable> 20472: : true_type { }; 20472: 20472: 20472: 20472: } 20472: # 68 "/usr/include/c++/10/deque" 2 3 20472: # 1 "/usr/include/c++/10/bits/range_access.h" 1 3 20472: # 33 "/usr/include/c++/10/bits/range_access.h" 3 20472: 20472: # 34 "/usr/include/c++/10/bits/range_access.h" 3 20472: 20472: 20472: 20472: # 1 "/usr/include/c++/10/bits/iterator_concepts.h" 1 3 20472: # 33 "/usr/include/c++/10/bits/iterator_concepts.h" 3 20472: 20472: # 34 "/usr/include/c++/10/bits/iterator_concepts.h" 3 20472: 20472: # 1 "/usr/include/c++/10/concepts" 1 3 20472: # 36 "/usr/include/c++/10/bits/iterator_concepts.h" 2 3 20472: 20472: # 1 "/usr/include/c++/10/bits/range_cmp.h" 1 3 20472: # 38 "/usr/include/c++/10/bits/iterator_concepts.h" 2 3 20472: # 38 "/usr/include/c++/10/bits/range_access.h" 2 3 20472: 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: inline auto 20472: begin(_Container& __cont) -> decltype(__cont.begin()) 20472: { return __cont.begin(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: inline auto 20472: begin(const _Container& __cont) -> decltype(__cont.begin()) 20472: { return __cont.begin(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: inline auto 20472: end(_Container& __cont) -> decltype(__cont.end()) 20472: { return __cont.end(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: inline auto 20472: end(const _Container& __cont) -> decltype(__cont.end()) 20472: { return __cont.end(); } 20472: 20472: 20472: 20472: 20472: 20472: template 20472: inline _Tp* 20472: begin(_Tp (&__arr)[_Nm]) 20472: { return __arr; } 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: inline _Tp* 20472: end(_Tp (&__arr)[_Nm]) 20472: { return __arr + _Nm; } 20472: # 1153 "/usr/include/c++/10/bits/range_access.h" 3 20472: 20472: } 20472: # 69 "/usr/include/c++/10/deque" 2 3 20472: # 1 "/usr/include/c++/10/bits/deque.tcc" 1 3 20472: # 61 "/usr/include/c++/10/bits/deque.tcc" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: 20472: template 20472: void 20472: deque<_Tp, _Alloc>:: 20472: _M_default_initialize() 20472: { 20472: _Map_pointer __cur; 20472: try 20472: { 20472: for (__cur = this->_M_impl._M_start._M_node; 20472: __cur < this->_M_impl._M_finish._M_node; 20472: ++__cur) 20472: std::__uninitialized_default_a(*__cur, *__cur + _S_buffer_size(), 20472: _M_get_Tp_allocator()); 20472: std::__uninitialized_default_a(this->_M_impl._M_finish._M_first, 20472: this->_M_impl._M_finish._M_cur, 20472: _M_get_Tp_allocator()); 20472: } 20472: catch(...) 20472: { 20472: std::_Destroy(this->_M_impl._M_start, iterator(*__cur, __cur), 20472: _M_get_Tp_allocator()); 20472: throw; 20472: } 20472: } 20472: 20472: 20472: template 20472: deque<_Tp, _Alloc>& 20472: deque<_Tp, _Alloc>:: 20472: operator=(const deque& __x) 20472: { 20472: if (&__x != this) 20472: { 20472: 20472: if (_Alloc_traits::_S_propagate_on_copy_assign()) 20472: { 20472: if (!_Alloc_traits::_S_always_equal() 20472: && _M_get_Tp_allocator() != __x._M_get_Tp_allocator()) 20472: { 20472: 20472: 20472: _M_replace_map(__x, __x.get_allocator()); 20472: std::__alloc_on_copy(_M_get_Tp_allocator(), 20472: __x._M_get_Tp_allocator()); 20472: return *this; 20472: } 20472: std::__alloc_on_copy(_M_get_Tp_allocator(), 20472: __x._M_get_Tp_allocator()); 20472: } 20472: 20472: const size_type __len = size(); 20472: if (__len >= __x.size()) 20472: _M_erase_at_end(std::copy(__x.begin(), __x.end(), 20472: this->_M_impl._M_start)); 20472: else 20472: { 20472: const_iterator __mid = __x.begin() + difference_type(__len); 20472: std::copy(__x.begin(), __mid, this->_M_impl._M_start); 20472: _M_range_insert_aux(this->_M_impl._M_finish, __mid, __x.end(), 20472: std::random_access_iterator_tag()); 20472: } 20472: } 20472: return *this; 20472: } 20472: 20472: 20472: template 20472: template 20472: 20472: 20472: 20472: void 20472: 20472: deque<_Tp, _Alloc>:: 20472: emplace_front(_Args&&... __args) 20472: { 20472: if (this->_M_impl._M_start._M_cur != this->_M_impl._M_start._M_first) 20472: { 20472: _Alloc_traits::construct(this->_M_impl, 20472: this->_M_impl._M_start._M_cur - 1, 20472: std::forward<_Args>(__args)...); 20472: --this->_M_impl._M_start._M_cur; 20472: } 20472: else 20472: _M_push_front_aux(std::forward<_Args>(__args)...); 20472: 20472: 20472: 20472: } 20472: 20472: template 20472: template 20472: 20472: 20472: 20472: void 20472: 20472: deque<_Tp, _Alloc>:: 20472: emplace_back(_Args&&... __args) 20472: { 20472: if (this->_M_impl._M_finish._M_cur 20472: != this->_M_impl._M_finish._M_last - 1) 20472: { 20472: _Alloc_traits::construct(this->_M_impl, 20472: this->_M_impl._M_finish._M_cur, 20472: std::forward<_Args>(__args)...); 20472: ++this->_M_impl._M_finish._M_cur; 20472: } 20472: else 20472: _M_push_back_aux(std::forward<_Args>(__args)...); 20472: 20472: 20472: 20472: } 20472: 20472: 20472: 20472: template 20472: template 20472: typename deque<_Tp, _Alloc>::iterator 20472: deque<_Tp, _Alloc>:: 20472: emplace(const_iterator __position, _Args&&... __args) 20472: { 20472: if (__position._M_cur == this->_M_impl._M_start._M_cur) 20472: { 20472: emplace_front(std::forward<_Args>(__args)...); 20472: return this->_M_impl._M_start; 20472: } 20472: else if (__position._M_cur == this->_M_impl._M_finish._M_cur) 20472: { 20472: emplace_back(std::forward<_Args>(__args)...); 20472: iterator __tmp = this->_M_impl._M_finish; 20472: --__tmp; 20472: return __tmp; 20472: } 20472: else 20472: return _M_insert_aux(__position._M_const_cast(), 20472: std::forward<_Args>(__args)...); 20472: } 20472: 20472: 20472: template 20472: typename deque<_Tp, _Alloc>::iterator 20472: deque<_Tp, _Alloc>:: 20472: 20472: insert(const_iterator __position, const value_type& __x) 20472: 20472: 20472: 20472: { 20472: if (__position._M_cur == this->_M_impl._M_start._M_cur) 20472: { 20472: push_front(__x); 20472: return this->_M_impl._M_start; 20472: } 20472: else if (__position._M_cur == this->_M_impl._M_finish._M_cur) 20472: { 20472: push_back(__x); 20472: iterator __tmp = this->_M_impl._M_finish; 20472: --__tmp; 20472: return __tmp; 20472: } 20472: else 20472: return _M_insert_aux(__position._M_const_cast(), __x); 20472: } 20472: 20472: template 20472: typename deque<_Tp, _Alloc>::iterator 20472: deque<_Tp, _Alloc>:: 20472: _M_erase(iterator __position) 20472: { 20472: iterator __next = __position; 20472: ++__next; 20472: const difference_type __index = __position - begin(); 20472: if (static_cast(__index) < (size() >> 1)) 20472: { 20472: if (__position != begin()) 20472: std::move_backward(begin(), __position, __next); 20472: pop_front(); 20472: } 20472: else 20472: { 20472: if (__next != end()) 20472: std::move(__next, end(), __position); 20472: pop_back(); 20472: } 20472: return begin() + __index; 20472: } 20472: 20472: template 20472: typename deque<_Tp, _Alloc>::iterator 20472: deque<_Tp, _Alloc>:: 20472: _M_erase(iterator __first, iterator __last) 20472: { 20472: if (__first == __last) 20472: return __first; 20472: else if (__first == begin() && __last == end()) 20472: { 20472: clear(); 20472: return end(); 20472: } 20472: else 20472: { 20472: const difference_type __n = __last - __first; 20472: const difference_type __elems_before = __first - begin(); 20472: if (static_cast(__elems_before) <= (size() - __n) / 2) 20472: { 20472: if (__first != begin()) 20472: std::move_backward(begin(), __first, __last); 20472: _M_erase_at_begin(begin() + __n); 20472: } 20472: else 20472: { 20472: if (__last != end()) 20472: std::move(__last, end(), __first); 20472: _M_erase_at_end(end() - __n); 20472: } 20472: return begin() + __elems_before; 20472: } 20472: } 20472: 20472: template 20472: template 20472: void 20472: deque<_Tp, _Alloc>:: 20472: _M_assign_aux(_InputIterator __first, _InputIterator __last, 20472: std::input_iterator_tag) 20472: { 20472: iterator __cur = begin(); 20472: for (; __first != __last && __cur != end(); ++__cur, (void)++__first) 20472: *__cur = *__first; 20472: if (__first == __last) 20472: _M_erase_at_end(__cur); 20472: else 20472: _M_range_insert_aux(end(), __first, __last, 20472: std::__iterator_category(__first)); 20472: } 20472: 20472: template 20472: void 20472: deque<_Tp, _Alloc>:: 20472: _M_fill_insert(iterator __pos, size_type __n, const value_type& __x) 20472: { 20472: if (__pos._M_cur == this->_M_impl._M_start._M_cur) 20472: { 20472: iterator __new_start = _M_reserve_elements_at_front(__n); 20472: try 20472: { 20472: std::__uninitialized_fill_a(__new_start, this->_M_impl._M_start, 20472: __x, _M_get_Tp_allocator()); 20472: this->_M_impl._M_start = __new_start; 20472: } 20472: catch(...) 20472: { 20472: _M_destroy_nodes(__new_start._M_node, 20472: this->_M_impl._M_start._M_node); 20472: throw; 20472: } 20472: } 20472: else if (__pos._M_cur == this->_M_impl._M_finish._M_cur) 20472: { 20472: iterator __new_finish = _M_reserve_elements_at_back(__n); 20472: try 20472: { 20472: std::__uninitialized_fill_a(this->_M_impl._M_finish, 20472: __new_finish, __x, 20472: _M_get_Tp_allocator()); 20472: this->_M_impl._M_finish = __new_finish; 20472: } 20472: catch(...) 20472: { 20472: _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, 20472: __new_finish._M_node + 1); 20472: throw; 20472: } 20472: } 20472: else 20472: _M_insert_aux(__pos, __n, __x); 20472: } 20472: 20472: 20472: template 20472: void 20472: deque<_Tp, _Alloc>:: 20472: _M_default_append(size_type __n) 20472: { 20472: if (__n) 20472: { 20472: iterator __new_finish = _M_reserve_elements_at_back(__n); 20472: try 20472: { 20472: std::__uninitialized_default_a(this->_M_impl._M_finish, 20472: __new_finish, 20472: _M_get_Tp_allocator()); 20472: this->_M_impl._M_finish = __new_finish; 20472: } 20472: catch(...) 20472: { 20472: _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, 20472: __new_finish._M_node + 1); 20472: throw; 20472: } 20472: } 20472: } 20472: 20472: template 20472: bool 20472: deque<_Tp, _Alloc>:: 20472: _M_shrink_to_fit() 20472: { 20472: const difference_type __front_capacity 20472: = (this->_M_impl._M_start._M_cur - this->_M_impl._M_start._M_first); 20472: if (__front_capacity == 0) 20472: return false; 20472: 20472: const difference_type __back_capacity 20472: = (this->_M_impl._M_finish._M_last - this->_M_impl._M_finish._M_cur); 20472: if (__front_capacity + __back_capacity < _S_buffer_size()) 20472: return false; 20472: 20472: return std::__shrink_to_fit_aux::_S_do_it(*this); 20472: } 20472: 20472: 20472: template 20472: void 20472: deque<_Tp, _Alloc>:: 20472: _M_fill_initialize(const value_type& __value) 20472: { 20472: _Map_pointer __cur; 20472: try 20472: { 20472: for (__cur = this->_M_impl._M_start._M_node; 20472: __cur < this->_M_impl._M_finish._M_node; 20472: ++__cur) 20472: std::__uninitialized_fill_a(*__cur, *__cur + _S_buffer_size(), 20472: __value, _M_get_Tp_allocator()); 20472: std::__uninitialized_fill_a(this->_M_impl._M_finish._M_first, 20472: this->_M_impl._M_finish._M_cur, 20472: __value, _M_get_Tp_allocator()); 20472: } 20472: catch(...) 20472: { 20472: std::_Destroy(this->_M_impl._M_start, iterator(*__cur, __cur), 20472: _M_get_Tp_allocator()); 20472: throw; 20472: } 20472: } 20472: 20472: template 20472: template 20472: void 20472: deque<_Tp, _Alloc>:: 20472: _M_range_initialize(_InputIterator __first, _InputIterator __last, 20472: std::input_iterator_tag) 20472: { 20472: this->_M_initialize_map(0); 20472: try 20472: { 20472: for (; __first != __last; ++__first) 20472: 20472: emplace_back(*__first); 20472: 20472: 20472: 20472: } 20472: catch(...) 20472: { 20472: clear(); 20472: throw; 20472: } 20472: } 20472: 20472: template 20472: template 20472: void 20472: deque<_Tp, _Alloc>:: 20472: _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last, 20472: std::forward_iterator_tag) 20472: { 20472: const size_type __n = std::distance(__first, __last); 20472: this->_M_initialize_map(_S_check_init_len(__n, _M_get_Tp_allocator())); 20472: 20472: _Map_pointer __cur_node; 20472: try 20472: { 20472: for (__cur_node = this->_M_impl._M_start._M_node; 20472: __cur_node < this->_M_impl._M_finish._M_node; 20472: ++__cur_node) 20472: { 20472: _ForwardIterator __mid = __first; 20472: std::advance(__mid, _S_buffer_size()); 20472: std::__uninitialized_copy_a(__first, __mid, *__cur_node, 20472: _M_get_Tp_allocator()); 20472: __first = __mid; 20472: } 20472: std::__uninitialized_copy_a(__first, __last, 20472: this->_M_impl._M_finish._M_first, 20472: _M_get_Tp_allocator()); 20472: } 20472: catch(...) 20472: { 20472: std::_Destroy(this->_M_impl._M_start, 20472: iterator(*__cur_node, __cur_node), 20472: _M_get_Tp_allocator()); 20472: throw; 20472: } 20472: } 20472: 20472: 20472: template 20472: 20472: template 20472: void 20472: deque<_Tp, _Alloc>:: 20472: _M_push_back_aux(_Args&&... __args) 20472: 20472: 20472: 20472: 20472: 20472: { 20472: if (size() == max_size()) 20472: __throw_length_error( 20472: ("cannot create std::deque larger than max_size()")); 20472: 20472: _M_reserve_map_at_back(); 20472: *(this->_M_impl._M_finish._M_node + 1) = this->_M_allocate_node(); 20472: try 20472: { 20472: 20472: _Alloc_traits::construct(this->_M_impl, 20472: this->_M_impl._M_finish._M_cur, 20472: std::forward<_Args>(__args)...); 20472: 20472: 20472: 20472: this->_M_impl._M_finish._M_set_node(this->_M_impl._M_finish._M_node 20472: + 1); 20472: this->_M_impl._M_finish._M_cur = this->_M_impl._M_finish._M_first; 20472: } 20472: catch(...) 20472: { 20472: _M_deallocate_node(*(this->_M_impl._M_finish._M_node + 1)); 20472: throw; 20472: } 20472: } 20472: 20472: 20472: template 20472: 20472: template 20472: void 20472: deque<_Tp, _Alloc>:: 20472: _M_push_front_aux(_Args&&... __args) 20472: 20472: 20472: 20472: 20472: 20472: { 20472: if (size() == max_size()) 20472: __throw_length_error( 20472: ("cannot create std::deque larger than max_size()")); 20472: 20472: _M_reserve_map_at_front(); 20472: *(this->_M_impl._M_start._M_node - 1) = this->_M_allocate_node(); 20472: try 20472: { 20472: this->_M_impl._M_start._M_set_node(this->_M_impl._M_start._M_node 20472: - 1); 20472: this->_M_impl._M_start._M_cur = this->_M_impl._M_start._M_last - 1; 20472: 20472: _Alloc_traits::construct(this->_M_impl, 20472: this->_M_impl._M_start._M_cur, 20472: std::forward<_Args>(__args)...); 20472: 20472: 20472: 20472: } 20472: catch(...) 20472: { 20472: ++this->_M_impl._M_start; 20472: _M_deallocate_node(*(this->_M_impl._M_start._M_node - 1)); 20472: throw; 20472: } 20472: } 20472: 20472: 20472: template 20472: void deque<_Tp, _Alloc>:: 20472: _M_pop_back_aux() 20472: { 20472: _M_deallocate_node(this->_M_impl._M_finish._M_first); 20472: this->_M_impl._M_finish._M_set_node(this->_M_impl._M_finish._M_node - 1); 20472: this->_M_impl._M_finish._M_cur = this->_M_impl._M_finish._M_last - 1; 20472: _Alloc_traits::destroy(_M_get_Tp_allocator(), 20472: this->_M_impl._M_finish._M_cur); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: void deque<_Tp, _Alloc>:: 20472: _M_pop_front_aux() 20472: { 20472: _Alloc_traits::destroy(_M_get_Tp_allocator(), 20472: this->_M_impl._M_start._M_cur); 20472: _M_deallocate_node(this->_M_impl._M_start._M_first); 20472: this->_M_impl._M_start._M_set_node(this->_M_impl._M_start._M_node + 1); 20472: this->_M_impl._M_start._M_cur = this->_M_impl._M_start._M_first; 20472: } 20472: 20472: template 20472: template 20472: void 20472: deque<_Tp, _Alloc>:: 20472: _M_range_insert_aux(iterator __pos, 20472: _InputIterator __first, _InputIterator __last, 20472: std::input_iterator_tag) 20472: { std::copy(__first, __last, std::inserter(*this, __pos)); } 20472: 20472: template 20472: template 20472: void 20472: deque<_Tp, _Alloc>:: 20472: _M_range_insert_aux(iterator __pos, 20472: _ForwardIterator __first, _ForwardIterator __last, 20472: std::forward_iterator_tag) 20472: { 20472: const size_type __n = std::distance(__first, __last); 20472: if (__pos._M_cur == this->_M_impl._M_start._M_cur) 20472: { 20472: iterator __new_start = _M_reserve_elements_at_front(__n); 20472: try 20472: { 20472: std::__uninitialized_copy_a(__first, __last, __new_start, 20472: _M_get_Tp_allocator()); 20472: this->_M_impl._M_start = __new_start; 20472: } 20472: catch(...) 20472: { 20472: _M_destroy_nodes(__new_start._M_node, 20472: this->_M_impl._M_start._M_node); 20472: throw; 20472: } 20472: } 20472: else if (__pos._M_cur == this->_M_impl._M_finish._M_cur) 20472: { 20472: iterator __new_finish = _M_reserve_elements_at_back(__n); 20472: try 20472: { 20472: std::__uninitialized_copy_a(__first, __last, 20472: this->_M_impl._M_finish, 20472: _M_get_Tp_allocator()); 20472: this->_M_impl._M_finish = __new_finish; 20472: } 20472: catch(...) 20472: { 20472: _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, 20472: __new_finish._M_node + 1); 20472: throw; 20472: } 20472: } 20472: else 20472: _M_insert_aux(__pos, __first, __last, __n); 20472: } 20472: 20472: template 20472: 20472: template 20472: typename deque<_Tp, _Alloc>::iterator 20472: deque<_Tp, _Alloc>:: 20472: _M_insert_aux(iterator __pos, _Args&&... __args) 20472: { 20472: value_type __x_copy(std::forward<_Args>(__args)...); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: difference_type __index = __pos - this->_M_impl._M_start; 20472: if (static_cast(__index) < size() / 2) 20472: { 20472: push_front(std::move(front())); 20472: iterator __front1 = this->_M_impl._M_start; 20472: ++__front1; 20472: iterator __front2 = __front1; 20472: ++__front2; 20472: __pos = this->_M_impl._M_start + __index; 20472: iterator __pos1 = __pos; 20472: ++__pos1; 20472: std::move(__front2, __pos1, __front1); 20472: } 20472: else 20472: { 20472: push_back(std::move(back())); 20472: iterator __back1 = this->_M_impl._M_finish; 20472: --__back1; 20472: iterator __back2 = __back1; 20472: --__back2; 20472: __pos = this->_M_impl._M_start + __index; 20472: std::move_backward(__pos, __back2, __back1); 20472: } 20472: *__pos = std::move(__x_copy); 20472: return __pos; 20472: } 20472: 20472: template 20472: void 20472: deque<_Tp, _Alloc>:: 20472: _M_insert_aux(iterator __pos, size_type __n, const value_type& __x) 20472: { 20472: const difference_type __elems_before = __pos - this->_M_impl._M_start; 20472: const size_type __length = this->size(); 20472: value_type __x_copy = __x; 20472: if (__elems_before < difference_type(__length / 2)) 20472: { 20472: iterator __new_start = _M_reserve_elements_at_front(__n); 20472: iterator __old_start = this->_M_impl._M_start; 20472: __pos = this->_M_impl._M_start + __elems_before; 20472: try 20472: { 20472: if (__elems_before >= difference_type(__n)) 20472: { 20472: iterator __start_n = (this->_M_impl._M_start 20472: + difference_type(__n)); 20472: std::__uninitialized_move_a(this->_M_impl._M_start, 20472: __start_n, __new_start, 20472: _M_get_Tp_allocator()); 20472: this->_M_impl._M_start = __new_start; 20472: std::move(__start_n, __pos, __old_start); 20472: std::fill(__pos - difference_type(__n), __pos, __x_copy); 20472: } 20472: else 20472: { 20472: std::__uninitialized_move_fill(this->_M_impl._M_start, 20472: __pos, __new_start, 20472: this->_M_impl._M_start, 20472: __x_copy, 20472: _M_get_Tp_allocator()); 20472: this->_M_impl._M_start = __new_start; 20472: std::fill(__old_start, __pos, __x_copy); 20472: } 20472: } 20472: catch(...) 20472: { 20472: _M_destroy_nodes(__new_start._M_node, 20472: this->_M_impl._M_start._M_node); 20472: throw; 20472: } 20472: } 20472: else 20472: { 20472: iterator __new_finish = _M_reserve_elements_at_back(__n); 20472: iterator __old_finish = this->_M_impl._M_finish; 20472: const difference_type __elems_after = 20472: difference_type(__length) - __elems_before; 20472: __pos = this->_M_impl._M_finish - __elems_after; 20472: try 20472: { 20472: if (__elems_after > difference_type(__n)) 20472: { 20472: iterator __finish_n = (this->_M_impl._M_finish 20472: - difference_type(__n)); 20472: std::__uninitialized_move_a(__finish_n, 20472: this->_M_impl._M_finish, 20472: this->_M_impl._M_finish, 20472: _M_get_Tp_allocator()); 20472: this->_M_impl._M_finish = __new_finish; 20472: std::move_backward(__pos, __finish_n, __old_finish); 20472: std::fill(__pos, __pos + difference_type(__n), __x_copy); 20472: } 20472: else 20472: { 20472: std::__uninitialized_fill_move(this->_M_impl._M_finish, 20472: __pos + difference_type(__n), 20472: __x_copy, __pos, 20472: this->_M_impl._M_finish, 20472: _M_get_Tp_allocator()); 20472: this->_M_impl._M_finish = __new_finish; 20472: std::fill(__pos, __old_finish, __x_copy); 20472: } 20472: } 20472: catch(...) 20472: { 20472: _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, 20472: __new_finish._M_node + 1); 20472: throw; 20472: } 20472: } 20472: } 20472: 20472: template 20472: template 20472: void 20472: deque<_Tp, _Alloc>:: 20472: _M_insert_aux(iterator __pos, 20472: _ForwardIterator __first, _ForwardIterator __last, 20472: size_type __n) 20472: { 20472: const difference_type __elemsbefore = __pos - this->_M_impl._M_start; 20472: const size_type __length = size(); 20472: if (static_cast(__elemsbefore) < __length / 2) 20472: { 20472: iterator __new_start = _M_reserve_elements_at_front(__n); 20472: iterator __old_start = this->_M_impl._M_start; 20472: __pos = this->_M_impl._M_start + __elemsbefore; 20472: try 20472: { 20472: if (__elemsbefore >= difference_type(__n)) 20472: { 20472: iterator __start_n = (this->_M_impl._M_start 20472: + difference_type(__n)); 20472: std::__uninitialized_move_a(this->_M_impl._M_start, 20472: __start_n, __new_start, 20472: _M_get_Tp_allocator()); 20472: this->_M_impl._M_start = __new_start; 20472: std::move(__start_n, __pos, __old_start); 20472: std::copy(__first, __last, __pos - difference_type(__n)); 20472: } 20472: else 20472: { 20472: _ForwardIterator __mid = __first; 20472: std::advance(__mid, difference_type(__n) - __elemsbefore); 20472: std::__uninitialized_move_copy(this->_M_impl._M_start, 20472: __pos, __first, __mid, 20472: __new_start, 20472: _M_get_Tp_allocator()); 20472: this->_M_impl._M_start = __new_start; 20472: std::copy(__mid, __last, __old_start); 20472: } 20472: } 20472: catch(...) 20472: { 20472: _M_destroy_nodes(__new_start._M_node, 20472: this->_M_impl._M_start._M_node); 20472: throw; 20472: } 20472: } 20472: else 20472: { 20472: iterator __new_finish = _M_reserve_elements_at_back(__n); 20472: iterator __old_finish = this->_M_impl._M_finish; 20472: const difference_type __elemsafter = 20472: difference_type(__length) - __elemsbefore; 20472: __pos = this->_M_impl._M_finish - __elemsafter; 20472: try 20472: { 20472: if (__elemsafter > difference_type(__n)) 20472: { 20472: iterator __finish_n = (this->_M_impl._M_finish 20472: - difference_type(__n)); 20472: std::__uninitialized_move_a(__finish_n, 20472: this->_M_impl._M_finish, 20472: this->_M_impl._M_finish, 20472: _M_get_Tp_allocator()); 20472: this->_M_impl._M_finish = __new_finish; 20472: std::move_backward(__pos, __finish_n, __old_finish); 20472: std::copy(__first, __last, __pos); 20472: } 20472: else 20472: { 20472: _ForwardIterator __mid = __first; 20472: std::advance(__mid, __elemsafter); 20472: std::__uninitialized_copy_move(__mid, __last, __pos, 20472: this->_M_impl._M_finish, 20472: this->_M_impl._M_finish, 20472: _M_get_Tp_allocator()); 20472: this->_M_impl._M_finish = __new_finish; 20472: std::copy(__first, __mid, __pos); 20472: } 20472: } 20472: catch(...) 20472: { 20472: _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, 20472: __new_finish._M_node + 1); 20472: throw; 20472: } 20472: } 20472: } 20472: 20472: template 20472: void 20472: deque<_Tp, _Alloc>:: 20472: _M_destroy_data_aux(iterator __first, iterator __last) 20472: { 20472: for (_Map_pointer __node = __first._M_node + 1; 20472: __node < __last._M_node; ++__node) 20472: std::_Destroy(*__node, *__node + _S_buffer_size(), 20472: _M_get_Tp_allocator()); 20472: 20472: if (__first._M_node != __last._M_node) 20472: { 20472: std::_Destroy(__first._M_cur, __first._M_last, 20472: _M_get_Tp_allocator()); 20472: std::_Destroy(__last._M_first, __last._M_cur, 20472: _M_get_Tp_allocator()); 20472: } 20472: else 20472: std::_Destroy(__first._M_cur, __last._M_cur, 20472: _M_get_Tp_allocator()); 20472: } 20472: 20472: template 20472: void 20472: deque<_Tp, _Alloc>:: 20472: _M_new_elements_at_front(size_type __new_elems) 20472: { 20472: if (this->max_size() - this->size() < __new_elems) 20472: __throw_length_error(("deque::_M_new_elements_at_front")); 20472: 20472: const size_type __new_nodes = ((__new_elems + _S_buffer_size() - 1) 20472: / _S_buffer_size()); 20472: _M_reserve_map_at_front(__new_nodes); 20472: size_type __i; 20472: try 20472: { 20472: for (__i = 1; __i <= __new_nodes; ++__i) 20472: *(this->_M_impl._M_start._M_node - __i) = this->_M_allocate_node(); 20472: } 20472: catch(...) 20472: { 20472: for (size_type __j = 1; __j < __i; ++__j) 20472: _M_deallocate_node(*(this->_M_impl._M_start._M_node - __j)); 20472: throw; 20472: } 20472: } 20472: 20472: template 20472: void 20472: deque<_Tp, _Alloc>:: 20472: _M_new_elements_at_back(size_type __new_elems) 20472: { 20472: if (this->max_size() - this->size() < __new_elems) 20472: __throw_length_error(("deque::_M_new_elements_at_back")); 20472: 20472: const size_type __new_nodes = ((__new_elems + _S_buffer_size() - 1) 20472: / _S_buffer_size()); 20472: _M_reserve_map_at_back(__new_nodes); 20472: size_type __i; 20472: try 20472: { 20472: for (__i = 1; __i <= __new_nodes; ++__i) 20472: *(this->_M_impl._M_finish._M_node + __i) = this->_M_allocate_node(); 20472: } 20472: catch(...) 20472: { 20472: for (size_type __j = 1; __j < __i; ++__j) 20472: _M_deallocate_node(*(this->_M_impl._M_finish._M_node + __j)); 20472: throw; 20472: } 20472: } 20472: 20472: template 20472: void 20472: deque<_Tp, _Alloc>:: 20472: _M_reallocate_map(size_type __nodes_to_add, bool __add_at_front) 20472: { 20472: const size_type __old_num_nodes 20472: = this->_M_impl._M_finish._M_node - this->_M_impl._M_start._M_node + 1; 20472: const size_type __new_num_nodes = __old_num_nodes + __nodes_to_add; 20472: 20472: _Map_pointer __new_nstart; 20472: if (this->_M_impl._M_map_size > 2 * __new_num_nodes) 20472: { 20472: __new_nstart = this->_M_impl._M_map + (this->_M_impl._M_map_size 20472: - __new_num_nodes) / 2 20472: + (__add_at_front ? __nodes_to_add : 0); 20472: if (__new_nstart < this->_M_impl._M_start._M_node) 20472: std::copy(this->_M_impl._M_start._M_node, 20472: this->_M_impl._M_finish._M_node + 1, 20472: __new_nstart); 20472: else 20472: std::copy_backward(this->_M_impl._M_start._M_node, 20472: this->_M_impl._M_finish._M_node + 1, 20472: __new_nstart + __old_num_nodes); 20472: } 20472: else 20472: { 20472: size_type __new_map_size = this->_M_impl._M_map_size 20472: + std::max(this->_M_impl._M_map_size, 20472: __nodes_to_add) + 2; 20472: 20472: _Map_pointer __new_map = this->_M_allocate_map(__new_map_size); 20472: __new_nstart = __new_map + (__new_map_size - __new_num_nodes) / 2 20472: + (__add_at_front ? __nodes_to_add : 0); 20472: std::copy(this->_M_impl._M_start._M_node, 20472: this->_M_impl._M_finish._M_node + 1, 20472: __new_nstart); 20472: _M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size); 20472: 20472: this->_M_impl._M_map = __new_map; 20472: this->_M_impl._M_map_size = __new_map_size; 20472: } 20472: 20472: this->_M_impl._M_start._M_set_node(__new_nstart); 20472: this->_M_impl._M_finish._M_set_node(__new_nstart + __old_num_nodes - 1); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: template 20472: void 20472: __fill_a1(const std::_Deque_iterator<_Tp, _Tp&, _Tp*>& __first, 20472: const std::_Deque_iterator<_Tp, _Tp&, _Tp*>& __last, 20472: const _VTp& __value) 20472: { 20472: typedef std::_Deque_iterator<_Tp, _Tp&, _Tp*> _Iter; 20472: if (__first._M_node != __last._M_node) 20472: { 20472: std::__fill_a1(__first._M_cur, __first._M_last, __value); 20472: 20472: for (typename _Iter::_Map_pointer __node = __first._M_node + 1; 20472: __node < __last._M_node; ++__node) 20472: std::__fill_a1(*__node, *__node + _Iter::_S_buffer_size(), __value); 20472: 20472: std::__fill_a1(__last._M_first, __last._M_cur, __value); 20472: } 20472: else 20472: std::__fill_a1(__first._M_cur, __last._M_cur, __value); 20472: } 20472: 20472: template 20472: _OI 20472: __copy_move_dit(std::_Deque_iterator<_Tp, _Ref, _Ptr> __first, 20472: std::_Deque_iterator<_Tp, _Ref, _Ptr> __last, 20472: _OI __result) 20472: { 20472: typedef std::_Deque_iterator<_Tp, _Ref, _Ptr> _Iter; 20472: if (__first._M_node != __last._M_node) 20472: { 20472: __result 20472: = std::__copy_move_a1<_IsMove>(__first._M_cur, __first._M_last, 20472: __result); 20472: 20472: for (typename _Iter::_Map_pointer __node = __first._M_node + 1; 20472: __node != __last._M_node; ++__node) 20472: __result 20472: = std::__copy_move_a1<_IsMove>(*__node, 20472: *__node + _Iter::_S_buffer_size(), 20472: __result); 20472: 20472: return std::__copy_move_a1<_IsMove>(__last._M_first, __last._M_cur, 20472: __result); 20472: } 20472: 20472: return std::__copy_move_a1<_IsMove>(__first._M_cur, __last._M_cur, 20472: __result); 20472: } 20472: 20472: template 20472: _OI 20472: __copy_move_a1(std::_Deque_iterator<_Tp, _Ref, _Ptr> __first, 20472: std::_Deque_iterator<_Tp, _Ref, _Ptr> __last, 20472: _OI __result) 20472: { return __copy_move_dit<_IsMove>(__first, __last, __result); } 20472: 20472: template 20472: std::_Deque_iterator<_OTp, _OTp&, _OTp*> 20472: __copy_move_a1(std::_Deque_iterator<_ITp, _IRef, _IPtr> __first, 20472: std::_Deque_iterator<_ITp, _IRef, _IPtr> __last, 20472: std::_Deque_iterator<_OTp, _OTp&, _OTp*> __result) 20472: { return __copy_move_dit<_IsMove>(__first, __last, __result); } 20472: 20472: template 20472: typename __gnu_cxx::__enable_if< 20472: __is_random_access_iter<_II>::__value, 20472: std::_Deque_iterator<_Tp, _Tp&, _Tp*> >::__type 20472: __copy_move_a1(_II __first, _II __last, 20472: std::_Deque_iterator<_Tp, _Tp&, _Tp*> __result) 20472: { 20472: typedef std::_Deque_iterator<_Tp, _Tp&, _Tp*> _Iter; 20472: typedef typename _Iter::difference_type difference_type; 20472: 20472: difference_type __len = __last - __first; 20472: while (__len > 0) 20472: { 20472: const difference_type __clen 20472: = std::min(__len, __result._M_last - __result._M_cur); 20472: std::__copy_move_a1<_IsMove>(__first, __first + __clen, 20472: __result._M_cur); 20472: 20472: __first += __clen; 20472: __result += __clen; 20472: __len -= __clen; 20472: } 20472: 20472: return __result; 20472: } 20472: 20472: template 20472: _OI 20472: __copy_move_backward_dit( 20472: std::_Deque_iterator<_Tp, _Ref, _Ptr> __first, 20472: std::_Deque_iterator<_Tp, _Ref, _Ptr> __last, 20472: _OI __result) 20472: { 20472: typedef std::_Deque_iterator<_Tp, _Ref, _Ptr> _Iter; 20472: if (__first._M_node != __last._M_node) 20472: { 20472: __result = std::__copy_move_backward_a1<_IsMove>( 20472: __last._M_first, __last._M_cur, __result); 20472: 20472: for (typename _Iter::_Map_pointer __node = __last._M_node - 1; 20472: __node != __first._M_node; --__node) 20472: __result = std::__copy_move_backward_a1<_IsMove>( 20472: *__node, *__node + _Iter::_S_buffer_size(), __result); 20472: 20472: return std::__copy_move_backward_a1<_IsMove>( 20472: __first._M_cur, __first._M_last, __result); 20472: } 20472: 20472: return std::__copy_move_backward_a1<_IsMove>( 20472: __first._M_cur, __last._M_cur, __result); 20472: } 20472: 20472: template 20472: _OI 20472: __copy_move_backward_a1( 20472: std::_Deque_iterator<_Tp, _Ref, _Ptr> __first, 20472: std::_Deque_iterator<_Tp, _Ref, _Ptr> __last, 20472: _OI __result) 20472: { return __copy_move_backward_dit<_IsMove>(__first, __last, __result); } 20472: 20472: template 20472: std::_Deque_iterator<_OTp, _OTp&, _OTp*> 20472: __copy_move_backward_a1( 20472: std::_Deque_iterator<_ITp, _IRef, _IPtr> __first, 20472: std::_Deque_iterator<_ITp, _IRef, _IPtr> __last, 20472: std::_Deque_iterator<_OTp, _OTp&, _OTp*> __result) 20472: { return __copy_move_backward_dit<_IsMove>(__first, __last, __result); } 20472: 20472: template 20472: typename __gnu_cxx::__enable_if< 20472: __is_random_access_iter<_II>::__value, 20472: std::_Deque_iterator<_Tp, _Tp&, _Tp*> >::__type 20472: __copy_move_backward_a1(_II __first, _II __last, 20472: std::_Deque_iterator<_Tp, _Tp&, _Tp*> __result) 20472: { 20472: typedef std::_Deque_iterator<_Tp, _Tp&, _Tp*> _Iter; 20472: typedef typename _Iter::difference_type difference_type; 20472: 20472: difference_type __len = __last - __first; 20472: while (__len > 0) 20472: { 20472: difference_type __rlen = __result._M_cur - __result._M_first; 20472: _Tp* __rend = __result._M_cur; 20472: if (!__rlen) 20472: { 20472: __rlen = _Iter::_S_buffer_size(); 20472: __rend = *(__result._M_node - 1) + __rlen; 20472: } 20472: 20472: const difference_type __clen = std::min(__len, __rlen); 20472: std::__copy_move_backward_a1<_IsMove>(__last - __clen, __last, __rend); 20472: 20472: __last -= __clen; 20472: __result -= __clen; 20472: __len -= __clen; 20472: } 20472: 20472: return __result; 20472: } 20472: 20472: template 20472: bool 20472: __equal_dit( 20472: const std::_Deque_iterator<_Tp, _Ref, _Ptr>& __first1, 20472: const std::_Deque_iterator<_Tp, _Ref, _Ptr>& __last1, 20472: _II __first2) 20472: { 20472: typedef std::_Deque_iterator<_Tp, _Ref, _Ptr> _Iter; 20472: if (__first1._M_node != __last1._M_node) 20472: { 20472: if (!std::__equal_aux1(__first1._M_cur, __first1._M_last, __first2)) 20472: return false; 20472: 20472: __first2 += __first1._M_last - __first1._M_cur; 20472: for (typename _Iter::_Map_pointer __node = __first1._M_node + 1; 20472: __node != __last1._M_node; 20472: __first2 += _Iter::_S_buffer_size(), ++__node) 20472: if (!std::__equal_aux1(*__node, *__node + _Iter::_S_buffer_size(), 20472: __first2)) 20472: return false; 20472: 20472: return std::__equal_aux1(__last1._M_first, __last1._M_cur, __first2); 20472: } 20472: 20472: return std::__equal_aux1(__first1._M_cur, __last1._M_cur, __first2); 20472: } 20472: 20472: template 20472: typename __gnu_cxx::__enable_if< 20472: __is_random_access_iter<_II>::__value, bool>::__type 20472: __equal_aux1(std::_Deque_iterator<_Tp, _Ref, _Ptr> __first1, 20472: std::_Deque_iterator<_Tp, _Ref, _Ptr> __last1, 20472: _II __first2) 20472: { return std::__equal_dit(__first1, __last1, __first2); } 20472: 20472: template 20472: bool 20472: __equal_aux1(std::_Deque_iterator<_Tp1, _Ref1, _Ptr1> __first1, 20472: std::_Deque_iterator<_Tp1, _Ref1, _Ptr1> __last1, 20472: std::_Deque_iterator<_Tp2, _Ref2, _Ptr2> __first2) 20472: { return std::__equal_dit(__first1, __last1, __first2); } 20472: 20472: template 20472: typename __gnu_cxx::__enable_if< 20472: __is_random_access_iter<_II>::__value, bool>::__type 20472: __equal_aux1(_II __first1, _II __last1, 20472: std::_Deque_iterator<_Tp, _Ref, _Ptr> __first2) 20472: { 20472: typedef std::_Deque_iterator<_Tp, _Ref, _Ptr> _Iter; 20472: typedef typename _Iter::difference_type difference_type; 20472: 20472: difference_type __len = __last1 - __first1; 20472: while (__len > 0) 20472: { 20472: const difference_type __clen 20472: = std::min(__len, __first2._M_last - __first2._M_cur); 20472: if (!std::__equal_aux1(__first1, __first1 + __clen, __first2._M_cur)) 20472: return false; 20472: 20472: __first1 += __clen; 20472: __len -= __clen; 20472: __first2 += __clen; 20472: } 20472: 20472: return true; 20472: } 20472: 20472: 20472: } 20472: # 70 "/usr/include/c++/10/deque" 2 3 20472: # 13 "./db/memtable.h" 2 20472: # 1 "/usr/include/c++/10/functional" 1 3 20472: # 46 "/usr/include/c++/10/functional" 3 20472: 20472: # 47 "/usr/include/c++/10/functional" 3 20472: 20472: 20472: # 1 "/usr/include/c++/10/bits/stl_function.h" 1 3 20472: # 63 "/usr/include/c++/10/bits/stl_function.h" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: # 104 "/usr/include/c++/10/bits/stl_function.h" 3 20472: template 20472: struct unary_function 20472: { 20472: 20472: typedef _Arg argument_type; 20472: 20472: 20472: typedef _Result result_type; 20472: }; 20472: 20472: 20472: 20472: 20472: template 20472: struct binary_function 20472: { 20472: 20472: typedef _Arg1 first_argument_type; 20472: 20472: 20472: typedef _Arg2 second_argument_type; 20472: 20472: 20472: typedef _Result result_type; 20472: }; 20472: # 166 "/usr/include/c++/10/bits/stl_function.h" 3 20472: template 20472: struct plus : public binary_function<_Tp, _Tp, _Tp> 20472: { 20472: 20472: _Tp 20472: operator()(const _Tp& __x, const _Tp& __y) const 20472: { return __x + __y; } 20472: }; 20472: 20472: 20472: template 20472: struct minus : public binary_function<_Tp, _Tp, _Tp> 20472: { 20472: 20472: _Tp 20472: operator()(const _Tp& __x, const _Tp& __y) const 20472: { return __x - __y; } 20472: }; 20472: 20472: 20472: template 20472: struct multiplies : public binary_function<_Tp, _Tp, _Tp> 20472: { 20472: 20472: _Tp 20472: operator()(const _Tp& __x, const _Tp& __y) const 20472: { return __x * __y; } 20472: }; 20472: 20472: 20472: template 20472: struct divides : public binary_function<_Tp, _Tp, _Tp> 20472: { 20472: 20472: _Tp 20472: operator()(const _Tp& __x, const _Tp& __y) const 20472: { return __x / __y; } 20472: }; 20472: 20472: 20472: template 20472: struct modulus : public binary_function<_Tp, _Tp, _Tp> 20472: { 20472: 20472: _Tp 20472: operator()(const _Tp& __x, const _Tp& __y) const 20472: { return __x % __y; } 20472: }; 20472: 20472: 20472: template 20472: struct negate : public unary_function<_Tp, _Tp> 20472: { 20472: 20472: _Tp 20472: operator()(const _Tp& __x) const 20472: { return -__x; } 20472: }; 20472: # 350 "/usr/include/c++/10/bits/stl_function.h" 3 20472: template 20472: struct equal_to : public binary_function<_Tp, _Tp, bool> 20472: { 20472: 20472: bool 20472: operator()(const _Tp& __x, const _Tp& __y) const 20472: { return __x == __y; } 20472: }; 20472: 20472: 20472: template 20472: struct not_equal_to : public binary_function<_Tp, _Tp, bool> 20472: { 20472: 20472: bool 20472: operator()(const _Tp& __x, const _Tp& __y) const 20472: { return __x != __y; } 20472: }; 20472: 20472: 20472: template 20472: struct greater : public binary_function<_Tp, _Tp, bool> 20472: { 20472: 20472: bool 20472: operator()(const _Tp& __x, const _Tp& __y) const 20472: { return __x > __y; } 20472: }; 20472: 20472: 20472: template 20472: struct less : public binary_function<_Tp, _Tp, bool> 20472: { 20472: 20472: bool 20472: operator()(const _Tp& __x, const _Tp& __y) const 20472: { return __x < __y; } 20472: }; 20472: 20472: 20472: template 20472: struct greater_equal : public binary_function<_Tp, _Tp, bool> 20472: { 20472: 20472: bool 20472: operator()(const _Tp& __x, const _Tp& __y) const 20472: { return __x >= __y; } 20472: }; 20472: 20472: 20472: template 20472: struct less_equal : public binary_function<_Tp, _Tp, bool> 20472: { 20472: 20472: bool 20472: operator()(const _Tp& __x, const _Tp& __y) const 20472: { return __x <= __y; } 20472: }; 20472: 20472: 20472: template 20472: struct greater<_Tp*> : public binary_function<_Tp*, _Tp*, bool> 20472: { 20472: bool 20472: operator()(_Tp* __x, _Tp* __y) const noexcept 20472: { 20472: # 424 "/usr/include/c++/10/bits/stl_function.h" 3 20472: return (unsigned int)__x > (unsigned int)__y; 20472: } 20472: }; 20472: 20472: 20472: template 20472: struct less<_Tp*> : public binary_function<_Tp*, _Tp*, bool> 20472: { 20472: bool 20472: operator()(_Tp* __x, _Tp* __y) const noexcept 20472: { 20472: # 443 "/usr/include/c++/10/bits/stl_function.h" 3 20472: return (unsigned int)__x < (unsigned int)__y; 20472: } 20472: }; 20472: 20472: 20472: template 20472: struct greater_equal<_Tp*> : public binary_function<_Tp*, _Tp*, bool> 20472: { 20472: bool 20472: operator()(_Tp* __x, _Tp* __y) const noexcept 20472: { 20472: # 462 "/usr/include/c++/10/bits/stl_function.h" 3 20472: return (unsigned int)__x >= (unsigned int)__y; 20472: } 20472: }; 20472: 20472: 20472: template 20472: struct less_equal<_Tp*> : public binary_function<_Tp*, _Tp*, bool> 20472: { 20472: bool 20472: operator()(_Tp* __x, _Tp* __y) const noexcept 20472: { 20472: # 481 "/usr/include/c++/10/bits/stl_function.h" 3 20472: return (unsigned int)__x <= (unsigned int)__y; 20472: } 20472: }; 20472: # 785 "/usr/include/c++/10/bits/stl_function.h" 3 20472: template 20472: struct logical_and : public binary_function<_Tp, _Tp, bool> 20472: { 20472: 20472: bool 20472: operator()(const _Tp& __x, const _Tp& __y) const 20472: { return __x && __y; } 20472: }; 20472: 20472: 20472: template 20472: struct logical_or : public binary_function<_Tp, _Tp, bool> 20472: { 20472: 20472: bool 20472: operator()(const _Tp& __x, const _Tp& __y) const 20472: { return __x || __y; } 20472: }; 20472: 20472: 20472: template 20472: struct logical_not : public unary_function<_Tp, bool> 20472: { 20472: 20472: bool 20472: operator()(const _Tp& __x) const 20472: { return !__x; } 20472: }; 20472: # 878 "/usr/include/c++/10/bits/stl_function.h" 3 20472: template 20472: struct bit_and : public binary_function<_Tp, _Tp, _Tp> 20472: { 20472: 20472: _Tp 20472: operator()(const _Tp& __x, const _Tp& __y) const 20472: { return __x & __y; } 20472: }; 20472: 20472: template 20472: struct bit_or : public binary_function<_Tp, _Tp, _Tp> 20472: { 20472: 20472: _Tp 20472: operator()(const _Tp& __x, const _Tp& __y) const 20472: { return __x | __y; } 20472: }; 20472: 20472: template 20472: struct bit_xor : public binary_function<_Tp, _Tp, _Tp> 20472: { 20472: 20472: _Tp 20472: operator()(const _Tp& __x, const _Tp& __y) const 20472: { return __x ^ __y; } 20472: }; 20472: 20472: template 20472: struct bit_not : public unary_function<_Tp, _Tp> 20472: { 20472: 20472: _Tp 20472: operator()(const _Tp& __x) const 20472: { return ~__x; } 20472: }; 20472: # 1002 "/usr/include/c++/10/bits/stl_function.h" 3 20472: template 20472: class unary_negate 20472: : public unary_function 20472: { 20472: protected: 20472: _Predicate _M_pred; 20472: 20472: public: 20472: 20472: explicit 20472: unary_negate(const _Predicate& __x) : _M_pred(__x) { } 20472: 20472: 20472: bool 20472: operator()(const typename _Predicate::argument_type& __x) const 20472: { return !_M_pred(__x); } 20472: }; 20472: 20472: 20472: template 20472: 20472: inline unary_negate<_Predicate> 20472: not1(const _Predicate& __pred) 20472: { return unary_negate<_Predicate>(__pred); } 20472: 20472: 20472: template 20472: class binary_negate 20472: : public binary_function 20472: { 20472: protected: 20472: _Predicate _M_pred; 20472: 20472: public: 20472: 20472: explicit 20472: binary_negate(const _Predicate& __x) : _M_pred(__x) { } 20472: 20472: 20472: bool 20472: operator()(const typename _Predicate::first_argument_type& __x, 20472: const typename _Predicate::second_argument_type& __y) const 20472: { return !_M_pred(__x, __y); } 20472: }; 20472: 20472: 20472: template 20472: 20472: inline binary_negate<_Predicate> 20472: not2(const _Predicate& __pred) 20472: { return binary_negate<_Predicate>(__pred); } 20472: # 1079 "/usr/include/c++/10/bits/stl_function.h" 3 20472: template 20472: class pointer_to_unary_function : public unary_function<_Arg, _Result> 20472: { 20472: protected: 20472: _Result (*_M_ptr)(_Arg); 20472: 20472: public: 20472: pointer_to_unary_function() { } 20472: 20472: explicit 20472: pointer_to_unary_function(_Result (*__x)(_Arg)) 20472: : _M_ptr(__x) { } 20472: 20472: _Result 20472: operator()(_Arg __x) const 20472: { return _M_ptr(__x); } 20472: }; 20472: 20472: 20472: template 20472: inline pointer_to_unary_function<_Arg, _Result> 20472: ptr_fun(_Result (*__x)(_Arg)) 20472: { return pointer_to_unary_function<_Arg, _Result>(__x); } 20472: 20472: 20472: template 20472: class pointer_to_binary_function 20472: : public binary_function<_Arg1, _Arg2, _Result> 20472: { 20472: protected: 20472: _Result (*_M_ptr)(_Arg1, _Arg2); 20472: 20472: public: 20472: pointer_to_binary_function() { } 20472: 20472: explicit 20472: pointer_to_binary_function(_Result (*__x)(_Arg1, _Arg2)) 20472: : _M_ptr(__x) { } 20472: 20472: _Result 20472: operator()(_Arg1 __x, _Arg2 __y) const 20472: { return _M_ptr(__x, __y); } 20472: }; 20472: 20472: 20472: template 20472: inline pointer_to_binary_function<_Arg1, _Arg2, _Result> 20472: ptr_fun(_Result (*__x)(_Arg1, _Arg2)) 20472: { return pointer_to_binary_function<_Arg1, _Arg2, _Result>(__x); } 20472: 20472: 20472: template 20472: struct _Identity 20472: : public unary_function<_Tp, _Tp> 20472: { 20472: _Tp& 20472: operator()(_Tp& __x) const 20472: { return __x; } 20472: 20472: const _Tp& 20472: operator()(const _Tp& __x) const 20472: { return __x; } 20472: }; 20472: 20472: 20472: template struct _Identity : _Identity<_Tp> { }; 20472: 20472: template 20472: struct _Select1st 20472: : public unary_function<_Pair, typename _Pair::first_type> 20472: { 20472: typename _Pair::first_type& 20472: operator()(_Pair& __x) const 20472: { return __x.first; } 20472: 20472: const typename _Pair::first_type& 20472: operator()(const _Pair& __x) const 20472: { return __x.first; } 20472: 20472: 20472: template 20472: typename _Pair2::first_type& 20472: operator()(_Pair2& __x) const 20472: { return __x.first; } 20472: 20472: template 20472: const typename _Pair2::first_type& 20472: operator()(const _Pair2& __x) const 20472: { return __x.first; } 20472: 20472: }; 20472: 20472: template 20472: struct _Select2nd 20472: : public unary_function<_Pair, typename _Pair::second_type> 20472: { 20472: typename _Pair::second_type& 20472: operator()(_Pair& __x) const 20472: { return __x.second; } 20472: 20472: const typename _Pair::second_type& 20472: operator()(const _Pair& __x) const 20472: { return __x.second; } 20472: }; 20472: # 1202 "/usr/include/c++/10/bits/stl_function.h" 3 20472: template 20472: class mem_fun_t : public unary_function<_Tp*, _Ret> 20472: { 20472: public: 20472: explicit 20472: mem_fun_t(_Ret (_Tp::*__pf)()) 20472: : _M_f(__pf) { } 20472: 20472: _Ret 20472: operator()(_Tp* __p) const 20472: { return (__p->*_M_f)(); } 20472: 20472: private: 20472: _Ret (_Tp::*_M_f)(); 20472: }; 20472: 20472: 20472: 20472: template 20472: class const_mem_fun_t : public unary_function 20472: { 20472: public: 20472: explicit 20472: const_mem_fun_t(_Ret (_Tp::*__pf)() const) 20472: : _M_f(__pf) { } 20472: 20472: _Ret 20472: operator()(const _Tp* __p) const 20472: { return (__p->*_M_f)(); } 20472: 20472: private: 20472: _Ret (_Tp::*_M_f)() const; 20472: }; 20472: 20472: 20472: 20472: template 20472: class mem_fun_ref_t : public unary_function<_Tp, _Ret> 20472: { 20472: public: 20472: explicit 20472: mem_fun_ref_t(_Ret (_Tp::*__pf)()) 20472: : _M_f(__pf) { } 20472: 20472: _Ret 20472: operator()(_Tp& __r) const 20472: { return (__r.*_M_f)(); } 20472: 20472: private: 20472: _Ret (_Tp::*_M_f)(); 20472: }; 20472: 20472: 20472: 20472: template 20472: class const_mem_fun_ref_t : public unary_function<_Tp, _Ret> 20472: { 20472: public: 20472: explicit 20472: const_mem_fun_ref_t(_Ret (_Tp::*__pf)() const) 20472: : _M_f(__pf) { } 20472: 20472: _Ret 20472: operator()(const _Tp& __r) const 20472: { return (__r.*_M_f)(); } 20472: 20472: private: 20472: _Ret (_Tp::*_M_f)() const; 20472: }; 20472: 20472: 20472: 20472: template 20472: class mem_fun1_t : public binary_function<_Tp*, _Arg, _Ret> 20472: { 20472: public: 20472: explicit 20472: mem_fun1_t(_Ret (_Tp::*__pf)(_Arg)) 20472: : _M_f(__pf) { } 20472: 20472: _Ret 20472: operator()(_Tp* __p, _Arg __x) const 20472: { return (__p->*_M_f)(__x); } 20472: 20472: private: 20472: _Ret (_Tp::*_M_f)(_Arg); 20472: }; 20472: 20472: 20472: 20472: template 20472: class const_mem_fun1_t : public binary_function 20472: { 20472: public: 20472: explicit 20472: const_mem_fun1_t(_Ret (_Tp::*__pf)(_Arg) const) 20472: : _M_f(__pf) { } 20472: 20472: _Ret 20472: operator()(const _Tp* __p, _Arg __x) const 20472: { return (__p->*_M_f)(__x); } 20472: 20472: private: 20472: _Ret (_Tp::*_M_f)(_Arg) const; 20472: }; 20472: 20472: 20472: 20472: template 20472: class mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret> 20472: { 20472: public: 20472: explicit 20472: mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg)) 20472: : _M_f(__pf) { } 20472: 20472: _Ret 20472: operator()(_Tp& __r, _Arg __x) const 20472: { return (__r.*_M_f)(__x); } 20472: 20472: private: 20472: _Ret (_Tp::*_M_f)(_Arg); 20472: }; 20472: 20472: 20472: 20472: template 20472: class const_mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret> 20472: { 20472: public: 20472: explicit 20472: const_mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg) const) 20472: : _M_f(__pf) { } 20472: 20472: _Ret 20472: operator()(const _Tp& __r, _Arg __x) const 20472: { return (__r.*_M_f)(__x); } 20472: 20472: private: 20472: _Ret (_Tp::*_M_f)(_Arg) const; 20472: }; 20472: 20472: 20472: 20472: template 20472: inline mem_fun_t<_Ret, _Tp> 20472: mem_fun(_Ret (_Tp::*__f)()) 20472: { return mem_fun_t<_Ret, _Tp>(__f); } 20472: 20472: template 20472: inline const_mem_fun_t<_Ret, _Tp> 20472: mem_fun(_Ret (_Tp::*__f)() const) 20472: { return const_mem_fun_t<_Ret, _Tp>(__f); } 20472: 20472: template 20472: inline mem_fun_ref_t<_Ret, _Tp> 20472: mem_fun_ref(_Ret (_Tp::*__f)()) 20472: { return mem_fun_ref_t<_Ret, _Tp>(__f); } 20472: 20472: template 20472: inline const_mem_fun_ref_t<_Ret, _Tp> 20472: mem_fun_ref(_Ret (_Tp::*__f)() const) 20472: { return const_mem_fun_ref_t<_Ret, _Tp>(__f); } 20472: 20472: template 20472: inline mem_fun1_t<_Ret, _Tp, _Arg> 20472: mem_fun(_Ret (_Tp::*__f)(_Arg)) 20472: { return mem_fun1_t<_Ret, _Tp, _Arg>(__f); } 20472: 20472: template 20472: inline const_mem_fun1_t<_Ret, _Tp, _Arg> 20472: mem_fun(_Ret (_Tp::*__f)(_Arg) const) 20472: { return const_mem_fun1_t<_Ret, _Tp, _Arg>(__f); } 20472: 20472: template 20472: inline mem_fun1_ref_t<_Ret, _Tp, _Arg> 20472: mem_fun_ref(_Ret (_Tp::*__f)(_Arg)) 20472: { return mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); } 20472: 20472: template 20472: inline const_mem_fun1_ref_t<_Ret, _Tp, _Arg> 20472: mem_fun_ref(_Ret (_Tp::*__f)(_Arg) const) 20472: { return const_mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); } 20472: 20472: 20472: 20472: 20472: } 20472: 20472: 20472: # 1 "/usr/include/c++/10/backward/binders.h" 1 3 20472: # 60 "/usr/include/c++/10/backward/binders.h" 3 20472: #pragma GCC diagnostic push 20472: #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: # 107 "/usr/include/c++/10/backward/binders.h" 3 20472: template 20472: class binder1st 20472: : public unary_function 20472: { 20472: protected: 20472: _Operation op; 20472: typename _Operation::first_argument_type value; 20472: 20472: public: 20472: binder1st(const _Operation& __x, 20472: const typename _Operation::first_argument_type& __y) 20472: : op(__x), value(__y) { } 20472: 20472: typename _Operation::result_type 20472: operator()(const typename _Operation::second_argument_type& __x) const 20472: { return op(value, __x); } 20472: 20472: 20472: 20472: typename _Operation::result_type 20472: operator()(typename _Operation::second_argument_type& __x) const 20472: { return op(value, __x); } 20472: } __attribute__ ((__deprecated__)); 20472: 20472: 20472: template 20472: inline binder1st<_Operation> 20472: bind1st(const _Operation& __fn, const _Tp& __x) 20472: { 20472: typedef typename _Operation::first_argument_type _Arg1_type; 20472: return binder1st<_Operation>(__fn, _Arg1_type(__x)); 20472: } 20472: 20472: 20472: template 20472: class binder2nd 20472: : public unary_function 20472: { 20472: protected: 20472: _Operation op; 20472: typename _Operation::second_argument_type value; 20472: 20472: public: 20472: binder2nd(const _Operation& __x, 20472: const typename _Operation::second_argument_type& __y) 20472: : op(__x), value(__y) { } 20472: 20472: typename _Operation::result_type 20472: operator()(const typename _Operation::first_argument_type& __x) const 20472: { return op(__x, value); } 20472: 20472: 20472: 20472: typename _Operation::result_type 20472: operator()(typename _Operation::first_argument_type& __x) const 20472: { return op(__x, value); } 20472: } __attribute__ ((__deprecated__)); 20472: 20472: 20472: template 20472: inline binder2nd<_Operation> 20472: bind2nd(const _Operation& __fn, const _Tp& __x) 20472: { 20472: typedef typename _Operation::second_argument_type _Arg2_type; 20472: return binder2nd<_Operation>(__fn, _Arg2_type(__x)); 20472: } 20472: 20472: 20472: 20472: } 20472: 20472: #pragma GCC diagnostic pop 20472: # 1393 "/usr/include/c++/10/bits/stl_function.h" 2 3 20472: # 50 "/usr/include/c++/10/functional" 2 3 20472: 20472: 20472: 20472: 20472: # 1 "/usr/include/c++/10/tuple" 1 3 20472: # 32 "/usr/include/c++/10/tuple" 3 20472: 20472: # 33 "/usr/include/c++/10/tuple" 3 20472: 20472: 20472: 20472: 20472: 20472: # 1 "/usr/include/c++/10/utility" 1 3 20472: # 58 "/usr/include/c++/10/utility" 3 20472: 20472: # 59 "/usr/include/c++/10/utility" 3 20472: # 69 "/usr/include/c++/10/utility" 3 20472: # 1 "/usr/include/c++/10/bits/stl_relops.h" 1 3 20472: # 67 "/usr/include/c++/10/bits/stl_relops.h" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: namespace rel_ops 20472: { 20472: # 85 "/usr/include/c++/10/bits/stl_relops.h" 3 20472: template 20472: inline bool 20472: operator!=(const _Tp& __x, const _Tp& __y) 20472: { return !(__x == __y); } 20472: # 98 "/usr/include/c++/10/bits/stl_relops.h" 3 20472: template 20472: inline bool 20472: operator>(const _Tp& __x, const _Tp& __y) 20472: { return __y < __x; } 20472: # 111 "/usr/include/c++/10/bits/stl_relops.h" 3 20472: template 20472: inline bool 20472: operator<=(const _Tp& __x, const _Tp& __y) 20472: { return !(__y < __x); } 20472: # 124 "/usr/include/c++/10/bits/stl_relops.h" 3 20472: template 20472: inline bool 20472: operator>=(const _Tp& __x, const _Tp& __y) 20472: { return !(__x < __y); } 20472: } 20472: 20472: 20472: } 20472: # 70 "/usr/include/c++/10/utility" 2 3 20472: # 82 "/usr/include/c++/10/utility" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: template 20472: struct tuple_size; 20472: 20472: 20472: 20472: 20472: 20472: template::type, 20472: typename = typename enable_if::value>::type, 20472: size_t = tuple_size<_Tp>::value> 20472: using __enable_if_has_tuple_size = _Tp; 20472: 20472: template 20472: struct tuple_size> 20472: : public tuple_size<_Tp> { }; 20472: 20472: template 20472: struct tuple_size> 20472: : public tuple_size<_Tp> { }; 20472: 20472: template 20472: struct tuple_size> 20472: : public tuple_size<_Tp> { }; 20472: 20472: 20472: template 20472: struct tuple_element; 20472: 20472: 20472: template 20472: using __tuple_element_t = typename tuple_element<__i, _Tp>::type; 20472: 20472: template 20472: struct tuple_element<__i, const _Tp> 20472: { 20472: typedef typename add_const<__tuple_element_t<__i, _Tp>>::type type; 20472: }; 20472: 20472: template 20472: struct tuple_element<__i, volatile _Tp> 20472: { 20472: typedef typename add_volatile<__tuple_element_t<__i, _Tp>>::type type; 20472: }; 20472: 20472: template 20472: struct tuple_element<__i, const volatile _Tp> 20472: { 20472: typedef typename add_cv<__tuple_element_t<__i, _Tp>>::type type; 20472: }; 20472: # 151 "/usr/include/c++/10/utility" 3 20472: template 20472: struct __is_tuple_like_impl> : true_type 20472: { }; 20472: 20472: 20472: template 20472: struct tuple_size> 20472: : public integral_constant { }; 20472: 20472: 20472: template 20472: struct tuple_element<0, std::pair<_Tp1, _Tp2>> 20472: { typedef _Tp1 type; }; 20472: 20472: 20472: template 20472: struct tuple_element<1, std::pair<_Tp1, _Tp2>> 20472: { typedef _Tp2 type; }; 20472: 20472: template 20472: struct __pair_get; 20472: 20472: template<> 20472: struct __pair_get<0> 20472: { 20472: template 20472: static constexpr _Tp1& 20472: __get(std::pair<_Tp1, _Tp2>& __pair) noexcept 20472: { return __pair.first; } 20472: 20472: template 20472: static constexpr _Tp1&& 20472: __move_get(std::pair<_Tp1, _Tp2>&& __pair) noexcept 20472: { return std::forward<_Tp1>(__pair.first); } 20472: 20472: template 20472: static constexpr const _Tp1& 20472: __const_get(const std::pair<_Tp1, _Tp2>& __pair) noexcept 20472: { return __pair.first; } 20472: 20472: template 20472: static constexpr const _Tp1&& 20472: __const_move_get(const std::pair<_Tp1, _Tp2>&& __pair) noexcept 20472: { return std::forward(__pair.first); } 20472: }; 20472: 20472: template<> 20472: struct __pair_get<1> 20472: { 20472: template 20472: static constexpr _Tp2& 20472: __get(std::pair<_Tp1, _Tp2>& __pair) noexcept 20472: { return __pair.second; } 20472: 20472: template 20472: static constexpr _Tp2&& 20472: __move_get(std::pair<_Tp1, _Tp2>&& __pair) noexcept 20472: { return std::forward<_Tp2>(__pair.second); } 20472: 20472: template 20472: static constexpr const _Tp2& 20472: __const_get(const std::pair<_Tp1, _Tp2>& __pair) noexcept 20472: { return __pair.second; } 20472: 20472: template 20472: static constexpr const _Tp2&& 20472: __const_move_get(const std::pair<_Tp1, _Tp2>&& __pair) noexcept 20472: { return std::forward(__pair.second); } 20472: }; 20472: 20472: template 20472: constexpr typename tuple_element<_Int, std::pair<_Tp1, _Tp2>>::type& 20472: get(std::pair<_Tp1, _Tp2>& __in) noexcept 20472: { return __pair_get<_Int>::__get(__in); } 20472: 20472: template 20472: constexpr typename tuple_element<_Int, std::pair<_Tp1, _Tp2>>::type&& 20472: get(std::pair<_Tp1, _Tp2>&& __in) noexcept 20472: { return __pair_get<_Int>::__move_get(std::move(__in)); } 20472: 20472: template 20472: constexpr const typename tuple_element<_Int, std::pair<_Tp1, _Tp2>>::type& 20472: get(const std::pair<_Tp1, _Tp2>& __in) noexcept 20472: { return __pair_get<_Int>::__const_get(__in); } 20472: 20472: template 20472: constexpr const typename tuple_element<_Int, std::pair<_Tp1, _Tp2>>::type&& 20472: get(const std::pair<_Tp1, _Tp2>&& __in) noexcept 20472: { return __pair_get<_Int>::__const_move_get(std::move(__in)); } 20472: # 298 "/usr/include/c++/10/utility" 3 20472: template struct _Index_tuple { }; 20472: # 307 "/usr/include/c++/10/utility" 3 20472: template 20472: struct _Build_index_tuple 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: using __type = _Index_tuple<__integer_pack(_Num)...>; 20472: 20472: }; 20472: # 473 "/usr/include/c++/10/utility" 3 20472: 20472: } 20472: # 39 "/usr/include/c++/10/tuple" 2 3 20472: # 1 "/usr/include/c++/10/array" 1 3 20472: # 32 "/usr/include/c++/10/array" 3 20472: 20472: # 33 "/usr/include/c++/10/array" 3 20472: # 43 "/usr/include/c++/10/array" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: template 20472: struct __array_traits 20472: { 20472: typedef _Tp _Type[_Nm]; 20472: typedef __is_swappable<_Tp> _Is_swappable; 20472: typedef __is_nothrow_swappable<_Tp> _Is_nothrow_swappable; 20472: 20472: static constexpr _Tp& 20472: _S_ref(const _Type& __t, std::size_t __n) noexcept 20472: { return const_cast<_Tp&>(__t[__n]); } 20472: 20472: static constexpr _Tp* 20472: _S_ptr(const _Type& __t) noexcept 20472: { return const_cast<_Tp*>(__t); } 20472: }; 20472: 20472: template 20472: struct __array_traits<_Tp, 0> 20472: { 20472: struct _Type { }; 20472: typedef true_type _Is_swappable; 20472: typedef true_type _Is_nothrow_swappable; 20472: 20472: static constexpr _Tp& 20472: _S_ref(const _Type&, std::size_t) noexcept 20472: { return *static_cast<_Tp*>(nullptr); } 20472: 20472: static constexpr _Tp* 20472: _S_ptr(const _Type&) noexcept 20472: { return nullptr; } 20472: }; 20472: # 93 "/usr/include/c++/10/array" 3 20472: template 20472: struct array 20472: { 20472: typedef _Tp value_type; 20472: typedef value_type* pointer; 20472: typedef const value_type* const_pointer; 20472: typedef value_type& reference; 20472: typedef const value_type& const_reference; 20472: typedef value_type* iterator; 20472: typedef const value_type* const_iterator; 20472: typedef std::size_t size_type; 20472: typedef std::ptrdiff_t difference_type; 20472: typedef std::reverse_iterator reverse_iterator; 20472: typedef std::reverse_iterator const_reverse_iterator; 20472: 20472: 20472: typedef std::__array_traits<_Tp, _Nm> _AT_Type; 20472: typename _AT_Type::_Type _M_elems; 20472: 20472: 20472: 20472: 20472: void 20472: fill(const value_type& __u) 20472: { std::fill_n(begin(), size(), __u); } 20472: 20472: void 20472: swap(array& __other) 20472: noexcept(_AT_Type::_Is_nothrow_swappable::value) 20472: { std::swap_ranges(begin(), end(), __other.begin()); } 20472: 20472: 20472: iterator 20472: begin() noexcept 20472: { return iterator(data()); } 20472: 20472: const_iterator 20472: begin() const noexcept 20472: { return const_iterator(data()); } 20472: 20472: iterator 20472: end() noexcept 20472: { return iterator(data() + _Nm); } 20472: 20472: const_iterator 20472: end() const noexcept 20472: { return const_iterator(data() + _Nm); } 20472: 20472: reverse_iterator 20472: rbegin() noexcept 20472: { return reverse_iterator(end()); } 20472: 20472: const_reverse_iterator 20472: rbegin() const noexcept 20472: { return const_reverse_iterator(end()); } 20472: 20472: reverse_iterator 20472: rend() noexcept 20472: { return reverse_iterator(begin()); } 20472: 20472: const_reverse_iterator 20472: rend() const noexcept 20472: { return const_reverse_iterator(begin()); } 20472: 20472: const_iterator 20472: cbegin() const noexcept 20472: { return const_iterator(data()); } 20472: 20472: const_iterator 20472: cend() const noexcept 20472: { return const_iterator(data() + _Nm); } 20472: 20472: const_reverse_iterator 20472: crbegin() const noexcept 20472: { return const_reverse_iterator(end()); } 20472: 20472: const_reverse_iterator 20472: crend() const noexcept 20472: { return const_reverse_iterator(begin()); } 20472: 20472: 20472: constexpr size_type 20472: size() const noexcept { return _Nm; } 20472: 20472: constexpr size_type 20472: max_size() const noexcept { return _Nm; } 20472: 20472: constexpr bool 20472: empty() const noexcept { return size() == 0; } 20472: 20472: 20472: reference 20472: operator[](size_type __n) noexcept 20472: { return _AT_Type::_S_ref(_M_elems, __n); } 20472: 20472: constexpr const_reference 20472: operator[](size_type __n) const noexcept 20472: { return _AT_Type::_S_ref(_M_elems, __n); } 20472: 20472: reference 20472: at(size_type __n) 20472: { 20472: if (__n >= _Nm) 20472: std::__throw_out_of_range_fmt(("array::at: __n (which is %zu) " ">= _Nm (which is %zu)") 20472: , 20472: __n, _Nm); 20472: return _AT_Type::_S_ref(_M_elems, __n); 20472: } 20472: 20472: constexpr const_reference 20472: at(size_type __n) const 20472: { 20472: 20472: 20472: return __n < _Nm ? _AT_Type::_S_ref(_M_elems, __n) 20472: : (std::__throw_out_of_range_fmt(("array::at: __n (which is %zu) " ">= _Nm (which is %zu)") 20472: , 20472: __n, _Nm), 20472: _AT_Type::_S_ref(_M_elems, 0)); 20472: } 20472: 20472: reference 20472: front() noexcept 20472: { return *begin(); } 20472: 20472: constexpr const_reference 20472: front() const noexcept 20472: { return _AT_Type::_S_ref(_M_elems, 0); } 20472: 20472: reference 20472: back() noexcept 20472: { return _Nm ? *(end() - 1) : *end(); } 20472: 20472: constexpr const_reference 20472: back() const noexcept 20472: { 20472: return _Nm ? _AT_Type::_S_ref(_M_elems, _Nm - 1) 20472: : _AT_Type::_S_ref(_M_elems, 0); 20472: } 20472: 20472: pointer 20472: data() noexcept 20472: { return _AT_Type::_S_ptr(_M_elems); } 20472: 20472: const_pointer 20472: data() const noexcept 20472: { return _AT_Type::_S_ptr(_M_elems); } 20472: }; 20472: # 250 "/usr/include/c++/10/array" 3 20472: template 20472: 20472: inline bool 20472: operator==(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two) 20472: { return std::equal(__one.begin(), __one.end(), __two.begin()); } 20472: # 279 "/usr/include/c++/10/array" 3 20472: template 20472: 20472: inline bool 20472: operator!=(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two) 20472: { return !(__one == __two); } 20472: 20472: template 20472: 20472: inline bool 20472: operator<(const array<_Tp, _Nm>& __a, const array<_Tp, _Nm>& __b) 20472: { 20472: return std::lexicographical_compare(__a.begin(), __a.end(), 20472: __b.begin(), __b.end()); 20472: } 20472: 20472: template 20472: 20472: inline bool 20472: operator>(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two) 20472: { return __two < __one; } 20472: 20472: template 20472: 20472: inline bool 20472: operator<=(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two) 20472: { return !(__one > __two); } 20472: 20472: template 20472: 20472: inline bool 20472: operator>=(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two) 20472: { return !(__one < __two); } 20472: 20472: 20472: 20472: template 20472: 20472: inline 20472: 20472: 20472: 20472: 20472: 20472: 20472: void 20472: 20472: swap(array<_Tp, _Nm>& __one, array<_Tp, _Nm>& __two) 20472: noexcept(noexcept(__one.swap(__two))) 20472: { __one.swap(__two); } 20472: # 336 "/usr/include/c++/10/array" 3 20472: template 20472: constexpr _Tp& 20472: get(array<_Tp, _Nm>& __arr) noexcept 20472: { 20472: static_assert(_Int < _Nm, "array index is within bounds"); 20472: return std::__array_traits<_Tp, _Nm>:: 20472: _S_ref(__arr._M_elems, _Int); 20472: } 20472: 20472: template 20472: constexpr _Tp&& 20472: get(array<_Tp, _Nm>&& __arr) noexcept 20472: { 20472: static_assert(_Int < _Nm, "array index is within bounds"); 20472: return std::move(std::get<_Int>(__arr)); 20472: } 20472: 20472: template 20472: constexpr const _Tp& 20472: get(const array<_Tp, _Nm>& __arr) noexcept 20472: { 20472: static_assert(_Int < _Nm, "array index is within bounds"); 20472: return std::__array_traits<_Tp, _Nm>:: 20472: _S_ref(__arr._M_elems, _Int); 20472: } 20472: 20472: template 20472: constexpr const _Tp&& 20472: get(const array<_Tp, _Nm>&& __arr) noexcept 20472: { 20472: static_assert(_Int < _Nm, "array index is within bounds"); 20472: return std::move(std::get<_Int>(__arr)); 20472: } 20472: # 408 "/usr/include/c++/10/array" 3 20472: 20472: } 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct tuple_size; 20472: 20472: 20472: template 20472: struct tuple_size> 20472: : public integral_constant { }; 20472: 20472: 20472: template 20472: struct tuple_element; 20472: 20472: 20472: template 20472: struct tuple_element<_Int, std::array<_Tp, _Nm>> 20472: { 20472: static_assert(_Int < _Nm, "index is out of bounds"); 20472: typedef _Tp type; 20472: }; 20472: 20472: template 20472: struct __is_tuple_like_impl> : true_type 20472: { }; 20472: 20472: 20472: } 20472: # 40 "/usr/include/c++/10/tuple" 2 3 20472: # 1 "/usr/include/c++/10/bits/uses_allocator.h" 1 3 20472: # 35 "/usr/include/c++/10/bits/uses_allocator.h" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: struct __erased_type { }; 20472: 20472: 20472: 20472: 20472: template 20472: using __is_erased_or_convertible 20472: = __or_, is_same<_Tp, __erased_type>>; 20472: 20472: 20472: struct allocator_arg_t { explicit allocator_arg_t() = default; }; 20472: 20472: constexpr allocator_arg_t allocator_arg = 20472: allocator_arg_t(); 20472: 20472: template> 20472: struct __uses_allocator_helper 20472: : false_type { }; 20472: 20472: template 20472: struct __uses_allocator_helper<_Tp, _Alloc, 20472: __void_t> 20472: : __is_erased_or_convertible<_Alloc, typename _Tp::allocator_type>::type 20472: { }; 20472: 20472: 20472: template 20472: struct uses_allocator 20472: : __uses_allocator_helper<_Tp, _Alloc>::type 20472: { }; 20472: 20472: struct __uses_alloc_base { }; 20472: 20472: struct __uses_alloc0 : __uses_alloc_base 20472: { 20472: struct _Sink { void operator=(const void*) { } } _M_a; 20472: }; 20472: 20472: template 20472: struct __uses_alloc1 : __uses_alloc_base { const _Alloc* _M_a; }; 20472: 20472: template 20472: struct __uses_alloc2 : __uses_alloc_base { const _Alloc* _M_a; }; 20472: 20472: template 20472: struct __uses_alloc; 20472: 20472: template 20472: struct __uses_alloc 20472: : conditional< 20472: is_constructible<_Tp, allocator_arg_t, const _Alloc&, _Args...>::value, 20472: __uses_alloc1<_Alloc>, 20472: __uses_alloc2<_Alloc>>::type 20472: { 20472: 20472: 20472: static_assert(__or_< 20472: is_constructible<_Tp, allocator_arg_t, const _Alloc&, _Args...>, 20472: is_constructible<_Tp, _Args..., const _Alloc&>>::value, 20472: "construction with an allocator must be possible" 20472: " if uses_allocator is true"); 20472: }; 20472: 20472: template 20472: struct __uses_alloc 20472: : __uses_alloc0 { }; 20472: 20472: template 20472: using __uses_alloc_t = 20472: __uses_alloc::value, _Tp, _Alloc, _Args...>; 20472: 20472: template 20472: 20472: inline __uses_alloc_t<_Tp, _Alloc, _Args...> 20472: __use_alloc(const _Alloc& __a) 20472: { 20472: __uses_alloc_t<_Tp, _Alloc, _Args...> __ret; 20472: __ret._M_a = std::__addressof(__a); 20472: return __ret; 20472: } 20472: 20472: template 20472: void 20472: __use_alloc(const _Alloc&&) = delete; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template class _Predicate, 20472: typename _Tp, typename _Alloc, typename... _Args> 20472: struct __is_uses_allocator_predicate 20472: : conditional::value, 20472: __or_<_Predicate<_Tp, allocator_arg_t, _Alloc, _Args...>, 20472: _Predicate<_Tp, _Args..., _Alloc>>, 20472: _Predicate<_Tp, _Args...>>::type { }; 20472: 20472: template 20472: struct __is_uses_allocator_constructible 20472: : __is_uses_allocator_predicate 20472: { }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct __is_nothrow_uses_allocator_constructible 20472: : __is_uses_allocator_predicate 20472: { }; 20472: # 164 "/usr/include/c++/10/bits/uses_allocator.h" 3 20472: template 20472: void __uses_allocator_construct_impl(__uses_alloc0 __a, _Tp* __ptr, 20472: _Args&&... __args) 20472: { ::new ((void*)__ptr) _Tp(std::forward<_Args>(__args)...); } 20472: 20472: template 20472: void __uses_allocator_construct_impl(__uses_alloc1<_Alloc> __a, _Tp* __ptr, 20472: _Args&&... __args) 20472: { 20472: ::new ((void*)__ptr) _Tp(allocator_arg, *__a._M_a, 20472: std::forward<_Args>(__args)...); 20472: } 20472: 20472: template 20472: void __uses_allocator_construct_impl(__uses_alloc2<_Alloc> __a, _Tp* __ptr, 20472: _Args&&... __args) 20472: { ::new ((void*)__ptr) _Tp(std::forward<_Args>(__args)..., *__a._M_a); } 20472: 20472: template 20472: void __uses_allocator_construct(const _Alloc& __a, _Tp* __ptr, 20472: _Args&&... __args) 20472: { 20472: std::__uses_allocator_construct_impl( 20472: std::__use_alloc<_Tp, _Alloc, _Args...>(__a), __ptr, 20472: std::forward<_Args>(__args)...); 20472: } 20472: 20472: 20472: } 20472: # 41 "/usr/include/c++/10/tuple" 2 3 20472: # 1 "/usr/include/c++/10/bits/invoke.h" 1 3 20472: # 33 "/usr/include/c++/10/bits/invoke.h" 3 20472: 20472: # 34 "/usr/include/c++/10/bits/invoke.h" 3 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: # 52 "/usr/include/c++/10/bits/invoke.h" 3 20472: template::type> 20472: constexpr _Up&& 20472: __invfwd(typename remove_reference<_Tp>::type& __t) noexcept 20472: { return static_cast<_Up&&>(__t); } 20472: 20472: template 20472: constexpr _Res 20472: __invoke_impl(__invoke_other, _Fn&& __f, _Args&&... __args) 20472: { return std::forward<_Fn>(__f)(std::forward<_Args>(__args)...); } 20472: 20472: template 20472: constexpr _Res 20472: __invoke_impl(__invoke_memfun_ref, _MemFun&& __f, _Tp&& __t, 20472: _Args&&... __args) 20472: { return (__invfwd<_Tp>(__t).*__f)(std::forward<_Args>(__args)...); } 20472: 20472: template 20472: constexpr _Res 20472: __invoke_impl(__invoke_memfun_deref, _MemFun&& __f, _Tp&& __t, 20472: _Args&&... __args) 20472: { 20472: return ((*std::forward<_Tp>(__t)).*__f)(std::forward<_Args>(__args)...); 20472: } 20472: 20472: template 20472: constexpr _Res 20472: __invoke_impl(__invoke_memobj_ref, _MemPtr&& __f, _Tp&& __t) 20472: { return __invfwd<_Tp>(__t).*__f; } 20472: 20472: template 20472: constexpr _Res 20472: __invoke_impl(__invoke_memobj_deref, _MemPtr&& __f, _Tp&& __t) 20472: { return (*std::forward<_Tp>(__t)).*__f; } 20472: 20472: 20472: template 20472: constexpr typename __invoke_result<_Callable, _Args...>::type 20472: __invoke(_Callable&& __fn, _Args&&... __args) 20472: noexcept(__is_nothrow_invocable<_Callable, _Args...>::value) 20472: { 20472: using __result = __invoke_result<_Callable, _Args...>; 20472: using __type = typename __result::type; 20472: using __tag = typename __result::__invoke_type; 20472: return std::__invoke_impl<__type>(__tag{}, std::forward<_Callable>(__fn), 20472: std::forward<_Args>(__args)...); 20472: } 20472: # 118 "/usr/include/c++/10/bits/invoke.h" 3 20472: template 20472: using __can_invoke_as_void = __enable_if_t< 20472: __and_, __is_invocable<_Callable, _Args...>>::value, 20472: _Res 20472: >; 20472: 20472: template 20472: using __can_invoke_as_nonvoid = __enable_if_t< 20472: __and_<__not_>, 20472: is_convertible::type, 20472: _Res> 20472: >::value, 20472: _Res 20472: >; 20472: 20472: 20472: template 20472: constexpr __can_invoke_as_nonvoid<_Res, _Callable, _Args...> 20472: __invoke_r(_Callable&& __fn, _Args&&... __args) 20472: { 20472: using __result = __invoke_result<_Callable, _Args...>; 20472: using __type = typename __result::type; 20472: using __tag = typename __result::__invoke_type; 20472: return std::__invoke_impl<__type>(__tag{}, std::forward<_Callable>(__fn), 20472: std::forward<_Args>(__args)...); 20472: } 20472: 20472: 20472: template 20472: __can_invoke_as_void<_Res, _Callable, _Args...> 20472: __invoke_r(_Callable&& __fn, _Args&&... __args) 20472: { 20472: using __result = __invoke_result<_Callable, _Args...>; 20472: using __type = typename __result::type; 20472: using __tag = typename __result::__invoke_type; 20472: std::__invoke_impl<__type>(__tag{}, std::forward<_Callable>(__fn), 20472: std::forward<_Args>(__args)...); 20472: } 20472: 20472: 20472: 20472: } 20472: # 42 "/usr/include/c++/10/tuple" 2 3 20472: 20472: 20472: 20472: 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: class tuple; 20472: 20472: template 20472: struct __is_empty_non_tuple : is_empty<_Tp> { }; 20472: 20472: 20472: template 20472: struct __is_empty_non_tuple> : false_type { }; 20472: 20472: 20472: template 20472: using __empty_not_final 20472: = typename conditional<__is_final(_Tp), false_type, 20472: __is_empty_non_tuple<_Tp>>::type; 20472: 20472: template::value> 20472: struct _Head_base; 20472: 20472: template 20472: struct _Head_base<_Idx, _Head, true> 20472: : public _Head 20472: { 20472: constexpr _Head_base() 20472: : _Head() { } 20472: 20472: constexpr _Head_base(const _Head& __h) 20472: : _Head(__h) { } 20472: 20472: constexpr _Head_base(const _Head_base&) = default; 20472: constexpr _Head_base(_Head_base&&) = default; 20472: 20472: template 20472: constexpr _Head_base(_UHead&& __h) 20472: : _Head(std::forward<_UHead>(__h)) { } 20472: 20472: _Head_base(allocator_arg_t, __uses_alloc0) 20472: : _Head() { } 20472: 20472: template 20472: _Head_base(allocator_arg_t, __uses_alloc1<_Alloc> __a) 20472: : _Head(allocator_arg, *__a._M_a) { } 20472: 20472: template 20472: _Head_base(allocator_arg_t, __uses_alloc2<_Alloc> __a) 20472: : _Head(*__a._M_a) { } 20472: 20472: template 20472: _Head_base(__uses_alloc0, _UHead&& __uhead) 20472: : _Head(std::forward<_UHead>(__uhead)) { } 20472: 20472: template 20472: _Head_base(__uses_alloc1<_Alloc> __a, _UHead&& __uhead) 20472: : _Head(allocator_arg, *__a._M_a, std::forward<_UHead>(__uhead)) { } 20472: 20472: template 20472: _Head_base(__uses_alloc2<_Alloc> __a, _UHead&& __uhead) 20472: : _Head(std::forward<_UHead>(__uhead), *__a._M_a) { } 20472: 20472: static constexpr _Head& 20472: _M_head(_Head_base& __b) noexcept { return __b; } 20472: 20472: static constexpr const _Head& 20472: _M_head(const _Head_base& __b) noexcept { return __b; } 20472: }; 20472: 20472: template 20472: struct _Head_base<_Idx, _Head, false> 20472: { 20472: constexpr _Head_base() 20472: : _M_head_impl() { } 20472: 20472: constexpr _Head_base(const _Head& __h) 20472: : _M_head_impl(__h) { } 20472: 20472: constexpr _Head_base(const _Head_base&) = default; 20472: constexpr _Head_base(_Head_base&&) = default; 20472: 20472: template 20472: constexpr _Head_base(_UHead&& __h) 20472: : _M_head_impl(std::forward<_UHead>(__h)) { } 20472: 20472: 20472: _Head_base(allocator_arg_t, __uses_alloc0) 20472: : _M_head_impl() { } 20472: 20472: template 20472: _Head_base(allocator_arg_t, __uses_alloc1<_Alloc> __a) 20472: : _M_head_impl(allocator_arg, *__a._M_a) { } 20472: 20472: template 20472: _Head_base(allocator_arg_t, __uses_alloc2<_Alloc> __a) 20472: : _M_head_impl(*__a._M_a) { } 20472: 20472: template 20472: 20472: _Head_base(__uses_alloc0, _UHead&& __uhead) 20472: : _M_head_impl(std::forward<_UHead>(__uhead)) { } 20472: 20472: template 20472: _Head_base(__uses_alloc1<_Alloc> __a, _UHead&& __uhead) 20472: : _M_head_impl(allocator_arg, *__a._M_a, std::forward<_UHead>(__uhead)) 20472: { } 20472: 20472: template 20472: _Head_base(__uses_alloc2<_Alloc> __a, _UHead&& __uhead) 20472: : _M_head_impl(std::forward<_UHead>(__uhead), *__a._M_a) { } 20472: 20472: static constexpr _Head& 20472: _M_head(_Head_base& __b) noexcept { return __b._M_head_impl; } 20472: 20472: static constexpr const _Head& 20472: _M_head(const _Head_base& __b) noexcept { return __b._M_head_impl; } 20472: 20472: _Head _M_head_impl; 20472: }; 20472: # 182 "/usr/include/c++/10/tuple" 3 20472: template 20472: struct _Tuple_impl; 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct _Tuple_impl<_Idx, _Head, _Tail...> 20472: : public _Tuple_impl<_Idx + 1, _Tail...>, 20472: private _Head_base<_Idx, _Head> 20472: { 20472: template friend class _Tuple_impl; 20472: 20472: typedef _Tuple_impl<_Idx + 1, _Tail...> _Inherited; 20472: typedef _Head_base<_Idx, _Head> _Base; 20472: 20472: static constexpr _Head& 20472: _M_head(_Tuple_impl& __t) noexcept { return _Base::_M_head(__t); } 20472: 20472: static constexpr const _Head& 20472: _M_head(const _Tuple_impl& __t) noexcept { return _Base::_M_head(__t); } 20472: 20472: static constexpr _Inherited& 20472: _M_tail(_Tuple_impl& __t) noexcept { return __t; } 20472: 20472: static constexpr const _Inherited& 20472: _M_tail(const _Tuple_impl& __t) noexcept { return __t; } 20472: 20472: constexpr _Tuple_impl() 20472: : _Inherited(), _Base() { } 20472: 20472: explicit 20472: constexpr _Tuple_impl(const _Head& __head, const _Tail&... __tail) 20472: : _Inherited(__tail...), _Base(__head) { } 20472: 20472: template::type> 20472: explicit 20472: constexpr _Tuple_impl(_UHead&& __head, _UTail&&... __tail) 20472: : _Inherited(std::forward<_UTail>(__tail)...), 20472: _Base(std::forward<_UHead>(__head)) { } 20472: 20472: constexpr _Tuple_impl(const _Tuple_impl&) = default; 20472: 20472: 20472: 20472: _Tuple_impl& operator=(const _Tuple_impl&) = delete; 20472: 20472: constexpr 20472: _Tuple_impl(_Tuple_impl&& __in) 20472: noexcept(__and_, 20472: is_nothrow_move_constructible<_Inherited>>::value) 20472: : _Inherited(std::move(_M_tail(__in))), 20472: _Base(std::forward<_Head>(_M_head(__in))) { } 20472: 20472: template 20472: constexpr _Tuple_impl(const _Tuple_impl<_Idx, _UElements...>& __in) 20472: : _Inherited(_Tuple_impl<_Idx, _UElements...>::_M_tail(__in)), 20472: _Base(_Tuple_impl<_Idx, _UElements...>::_M_head(__in)) { } 20472: 20472: template 20472: constexpr _Tuple_impl(_Tuple_impl<_Idx, _UHead, _UTails...>&& __in) 20472: : _Inherited(std::move 20472: (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_tail(__in))), 20472: _Base(std::forward<_UHead> 20472: (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_head(__in))) { } 20472: 20472: template 20472: 20472: _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a) 20472: : _Inherited(__tag, __a), 20472: _Base(__tag, __use_alloc<_Head>(__a)) { } 20472: 20472: template 20472: _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, 20472: const _Head& __head, const _Tail&... __tail) 20472: : _Inherited(__tag, __a, __tail...), 20472: _Base(__use_alloc<_Head, _Alloc, _Head>(__a), __head) { } 20472: 20472: template::type> 20472: 20472: _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, 20472: _UHead&& __head, _UTail&&... __tail) 20472: : _Inherited(__tag, __a, std::forward<_UTail>(__tail)...), 20472: _Base(__use_alloc<_Head, _Alloc, _UHead>(__a), 20472: std::forward<_UHead>(__head)) { } 20472: 20472: template 20472: 20472: _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, 20472: const _Tuple_impl& __in) 20472: : _Inherited(__tag, __a, _M_tail(__in)), 20472: _Base(__use_alloc<_Head, _Alloc, _Head>(__a), _M_head(__in)) { } 20472: 20472: template 20472: 20472: _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, 20472: _Tuple_impl&& __in) 20472: : _Inherited(__tag, __a, std::move(_M_tail(__in))), 20472: _Base(__use_alloc<_Head, _Alloc, _Head>(__a), 20472: std::forward<_Head>(_M_head(__in))) { } 20472: 20472: template 20472: 20472: _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, 20472: const _Tuple_impl<_Idx, _UHead, _UTails...>& __in) 20472: : _Inherited(__tag, __a, 20472: _Tuple_impl<_Idx, _UHead, _UTails...>::_M_tail(__in)), 20472: _Base(__use_alloc<_Head, _Alloc, const _UHead&>(__a), 20472: _Tuple_impl<_Idx, _UHead, _UTails...>::_M_head(__in)) { } 20472: 20472: template 20472: 20472: _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, 20472: _Tuple_impl<_Idx, _UHead, _UTails...>&& __in) 20472: : _Inherited(__tag, __a, std::move 20472: (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_tail(__in))), 20472: _Base(__use_alloc<_Head, _Alloc, _UHead>(__a), 20472: std::forward<_UHead> 20472: (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_head(__in))) { } 20472: 20472: template 20472: 20472: void 20472: _M_assign(const _Tuple_impl<_Idx, _UElements...>& __in) 20472: { 20472: _M_head(*this) = _Tuple_impl<_Idx, _UElements...>::_M_head(__in); 20472: _M_tail(*this)._M_assign( 20472: _Tuple_impl<_Idx, _UElements...>::_M_tail(__in)); 20472: } 20472: 20472: template 20472: 20472: void 20472: _M_assign(_Tuple_impl<_Idx, _UHead, _UTails...>&& __in) 20472: { 20472: _M_head(*this) = std::forward<_UHead> 20472: (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_head(__in)); 20472: _M_tail(*this)._M_assign( 20472: std::move(_Tuple_impl<_Idx, _UHead, _UTails...>::_M_tail(__in))); 20472: } 20472: 20472: protected: 20472: 20472: void 20472: _M_swap(_Tuple_impl& __in) 20472: { 20472: using std::swap; 20472: swap(_M_head(*this), _M_head(__in)); 20472: _Inherited::_M_swap(_M_tail(__in)); 20472: } 20472: }; 20472: 20472: 20472: template 20472: struct _Tuple_impl<_Idx, _Head> 20472: : private _Head_base<_Idx, _Head> 20472: { 20472: template friend class _Tuple_impl; 20472: 20472: typedef _Head_base<_Idx, _Head> _Base; 20472: 20472: static constexpr _Head& 20472: _M_head(_Tuple_impl& __t) noexcept { return _Base::_M_head(__t); } 20472: 20472: static constexpr const _Head& 20472: _M_head(const _Tuple_impl& __t) noexcept { return _Base::_M_head(__t); } 20472: 20472: constexpr _Tuple_impl() 20472: : _Base() { } 20472: 20472: explicit 20472: constexpr _Tuple_impl(const _Head& __head) 20472: : _Base(__head) { } 20472: 20472: template 20472: explicit 20472: constexpr _Tuple_impl(_UHead&& __head) 20472: : _Base(std::forward<_UHead>(__head)) { } 20472: 20472: constexpr _Tuple_impl(const _Tuple_impl&) = default; 20472: 20472: 20472: 20472: _Tuple_impl& operator=(const _Tuple_impl&) = delete; 20472: 20472: constexpr 20472: _Tuple_impl(_Tuple_impl&& __in) 20472: noexcept(is_nothrow_move_constructible<_Head>::value) 20472: : _Base(std::forward<_Head>(_M_head(__in))) { } 20472: 20472: template 20472: constexpr _Tuple_impl(const _Tuple_impl<_Idx, _UHead>& __in) 20472: : _Base(_Tuple_impl<_Idx, _UHead>::_M_head(__in)) { } 20472: 20472: template 20472: constexpr _Tuple_impl(_Tuple_impl<_Idx, _UHead>&& __in) 20472: : _Base(std::forward<_UHead>(_Tuple_impl<_Idx, _UHead>::_M_head(__in))) 20472: { } 20472: 20472: template 20472: 20472: _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a) 20472: : _Base(__tag, __use_alloc<_Head>(__a)) { } 20472: 20472: template 20472: _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, 20472: const _Head& __head) 20472: : _Base(__use_alloc<_Head, _Alloc, _Head>(__a), __head) { } 20472: 20472: template 20472: 20472: _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, 20472: _UHead&& __head) 20472: : _Base(__use_alloc<_Head, _Alloc, _UHead>(__a), 20472: std::forward<_UHead>(__head)) { } 20472: 20472: template 20472: 20472: _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, 20472: const _Tuple_impl& __in) 20472: : _Base(__use_alloc<_Head, _Alloc, _Head>(__a), _M_head(__in)) { } 20472: 20472: template 20472: 20472: _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, 20472: _Tuple_impl&& __in) 20472: : _Base(__use_alloc<_Head, _Alloc, _Head>(__a), 20472: std::forward<_Head>(_M_head(__in))) { } 20472: 20472: template 20472: 20472: _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, 20472: const _Tuple_impl<_Idx, _UHead>& __in) 20472: : _Base(__use_alloc<_Head, _Alloc, const _UHead&>(__a), 20472: _Tuple_impl<_Idx, _UHead>::_M_head(__in)) { } 20472: 20472: template 20472: 20472: _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, 20472: _Tuple_impl<_Idx, _UHead>&& __in) 20472: : _Base(__use_alloc<_Head, _Alloc, _UHead>(__a), 20472: std::forward<_UHead>(_Tuple_impl<_Idx, _UHead>::_M_head(__in))) 20472: { } 20472: 20472: template 20472: 20472: void 20472: _M_assign(const _Tuple_impl<_Idx, _UHead>& __in) 20472: { 20472: _M_head(*this) = _Tuple_impl<_Idx, _UHead>::_M_head(__in); 20472: } 20472: 20472: template 20472: 20472: void 20472: _M_assign(_Tuple_impl<_Idx, _UHead>&& __in) 20472: { 20472: _M_head(*this) 20472: = std::forward<_UHead>(_Tuple_impl<_Idx, _UHead>::_M_head(__in)); 20472: } 20472: 20472: protected: 20472: 20472: void 20472: _M_swap(_Tuple_impl& __in) 20472: { 20472: using std::swap; 20472: swap(_M_head(*this), _M_head(__in)); 20472: } 20472: }; 20472: 20472: 20472: 20472: template 20472: struct _TupleConstraints 20472: { 20472: 20472: 20472: 20472: template 20472: static constexpr bool __is_implicitly_constructible() 20472: { 20472: return __and_..., 20472: is_convertible<_UTypes, _Types>... 20472: >::value; 20472: } 20472: 20472: 20472: 20472: 20472: template 20472: static constexpr bool __is_explicitly_constructible() 20472: { 20472: return __and_..., 20472: __not_<__and_...>> 20472: >::value; 20472: } 20472: 20472: static constexpr bool __is_implicitly_default_constructible() 20472: { 20472: return __and_... 20472: >::value; 20472: } 20472: 20472: static constexpr bool __is_explicitly_default_constructible() 20472: { 20472: return __and_..., 20472: __not_<__and_< 20472: std::__is_implicitly_default_constructible<_Types>...> 20472: >>::value; 20472: } 20472: }; 20472: 20472: 20472: 20472: template 20472: struct _TupleConstraints 20472: { 20472: template 20472: static constexpr bool __is_implicitly_constructible() 20472: { return false; } 20472: 20472: template 20472: static constexpr bool __is_explicitly_constructible() 20472: { return false; } 20472: }; 20472: 20472: 20472: template 20472: class tuple : public _Tuple_impl<0, _Elements...> 20472: { 20472: typedef _Tuple_impl<0, _Elements...> _Inherited; 20472: 20472: template 20472: using _TCC = _TupleConstraints<_Cond, _Elements...>; 20472: 20472: 20472: template 20472: using _ImplicitDefaultCtor = __enable_if_t< 20472: _TCC<_Dummy>::__is_implicitly_default_constructible(), 20472: bool>; 20472: 20472: 20472: template 20472: using _ExplicitDefaultCtor = __enable_if_t< 20472: _TCC<_Dummy>::__is_explicitly_default_constructible(), 20472: bool>; 20472: 20472: 20472: template 20472: using _ImplicitCtor = __enable_if_t< 20472: _TCC<_Cond>::template __is_implicitly_constructible<_Args...>(), 20472: bool>; 20472: 20472: 20472: template 20472: using _ExplicitCtor = __enable_if_t< 20472: _TCC<_Cond>::template __is_explicitly_constructible<_Args...>(), 20472: bool>; 20472: 20472: template 20472: static constexpr 20472: __enable_if_t 20472: __assignable() 20472: { return __and_...>::value; } 20472: 20472: 20472: template 20472: static constexpr bool __nothrow_assignable() 20472: { 20472: return 20472: __and_...>::value; 20472: } 20472: 20472: 20472: template 20472: static constexpr bool __nothrow_constructible() 20472: { 20472: return 20472: __and_...>::value; 20472: } 20472: 20472: 20472: template 20472: static constexpr bool __valid_args() 20472: { 20472: return sizeof...(_Elements) == 1 20472: && !is_same>::value; 20472: } 20472: 20472: 20472: template 20472: static constexpr bool __valid_args() 20472: { return (sizeof...(_Tail) + 2) == sizeof...(_Elements); } 20472: # 591 "/usr/include/c++/10/tuple" 3 20472: template> 20472: struct _UseOtherCtor 20472: : false_type 20472: { }; 20472: 20472: 20472: template 20472: struct _UseOtherCtor<_Tuple, tuple<_Tp>, tuple<_Up>> 20472: : __or_, is_constructible<_Tp, _Tuple>> 20472: { }; 20472: 20472: 20472: template 20472: struct _UseOtherCtor<_Tuple, tuple<_Tp>, tuple<_Tp>> 20472: : true_type 20472: { }; 20472: 20472: 20472: 20472: 20472: template 20472: static constexpr bool __use_other_ctor() 20472: { return _UseOtherCtor<_Tuple>::value; } 20472: 20472: public: 20472: template::value> = true> 20472: constexpr 20472: tuple() 20472: noexcept(__and_...>::value) 20472: : _Inherited() { } 20472: 20472: template::value> = false> 20472: explicit constexpr 20472: tuple() 20472: noexcept(__and_...>::value) 20472: : _Inherited() { } 20472: 20472: template= 1), 20472: _ImplicitCtor<_NotEmpty, const _Elements&...> = true> 20472: constexpr 20472: tuple(const _Elements&... __elements) 20472: noexcept(__nothrow_constructible()) 20472: : _Inherited(__elements...) { } 20472: 20472: template= 1), 20472: _ExplicitCtor<_NotEmpty, const _Elements&...> = false> 20472: explicit constexpr 20472: tuple(const _Elements&... __elements) 20472: noexcept(__nothrow_constructible()) 20472: : _Inherited(__elements...) { } 20472: 20472: template(), 20472: _ImplicitCtor<_Valid, _UElements...> = true> 20472: constexpr 20472: tuple(_UElements&&... __elements) 20472: noexcept(__nothrow_constructible<_UElements...>()) 20472: : _Inherited(std::forward<_UElements>(__elements)...) { } 20472: 20472: template(), 20472: _ExplicitCtor<_Valid, _UElements...> = false> 20472: explicit constexpr 20472: tuple(_UElements&&... __elements) 20472: noexcept(__nothrow_constructible<_UElements...>()) 20472: : _Inherited(std::forward<_UElements>(__elements)...) { } 20472: 20472: constexpr tuple(const tuple&) = default; 20472: 20472: constexpr tuple(tuple&&) = default; 20472: 20472: template&>(), 20472: _ImplicitCtor<_Valid, const _UElements&...> = true> 20472: constexpr 20472: tuple(const tuple<_UElements...>& __in) 20472: noexcept(__nothrow_constructible()) 20472: : _Inherited(static_cast&>(__in)) 20472: { } 20472: 20472: template&>(), 20472: _ExplicitCtor<_Valid, const _UElements&...> = false> 20472: explicit constexpr 20472: tuple(const tuple<_UElements...>& __in) 20472: noexcept(__nothrow_constructible()) 20472: : _Inherited(static_cast&>(__in)) 20472: { } 20472: 20472: template&&>(), 20472: _ImplicitCtor<_Valid, _UElements...> = true> 20472: constexpr 20472: tuple(tuple<_UElements...>&& __in) 20472: noexcept(__nothrow_constructible<_UElements...>()) 20472: : _Inherited(static_cast<_Tuple_impl<0, _UElements...>&&>(__in)) { } 20472: 20472: template&&>(), 20472: _ExplicitCtor<_Valid, _UElements...> = false> 20472: explicit constexpr 20472: tuple(tuple<_UElements...>&& __in) 20472: noexcept(__nothrow_constructible<_UElements...>()) 20472: : _Inherited(static_cast<_Tuple_impl<0, _UElements...>&&>(__in)) { } 20472: 20472: 20472: 20472: template::value> = true> 20472: 20472: tuple(allocator_arg_t __tag, const _Alloc& __a) 20472: : _Inherited(__tag, __a) { } 20472: 20472: template= 1), 20472: _ImplicitCtor<_NotEmpty, const _Elements&...> = true> 20472: 20472: tuple(allocator_arg_t __tag, const _Alloc& __a, 20472: const _Elements&... __elements) 20472: : _Inherited(__tag, __a, __elements...) { } 20472: 20472: template= 1), 20472: _ExplicitCtor<_NotEmpty, const _Elements&...> = false> 20472: 20472: explicit 20472: tuple(allocator_arg_t __tag, const _Alloc& __a, 20472: const _Elements&... __elements) 20472: : _Inherited(__tag, __a, __elements...) { } 20472: 20472: template(), 20472: _ImplicitCtor<_Valid, _UElements...> = true> 20472: 20472: tuple(allocator_arg_t __tag, const _Alloc& __a, 20472: _UElements&&... __elements) 20472: : _Inherited(__tag, __a, std::forward<_UElements>(__elements)...) 20472: { } 20472: 20472: template(), 20472: _ExplicitCtor<_Valid, _UElements...> = false> 20472: 20472: explicit 20472: tuple(allocator_arg_t __tag, const _Alloc& __a, 20472: _UElements&&... __elements) 20472: : _Inherited(__tag, __a, std::forward<_UElements>(__elements)...) 20472: { } 20472: 20472: template 20472: 20472: tuple(allocator_arg_t __tag, const _Alloc& __a, const tuple& __in) 20472: : _Inherited(__tag, __a, static_cast(__in)) { } 20472: 20472: template 20472: 20472: tuple(allocator_arg_t __tag, const _Alloc& __a, tuple&& __in) 20472: : _Inherited(__tag, __a, static_cast<_Inherited&&>(__in)) { } 20472: 20472: template&>(), 20472: _ImplicitCtor<_Valid, const _UElements&...> = true> 20472: 20472: tuple(allocator_arg_t __tag, const _Alloc& __a, 20472: const tuple<_UElements...>& __in) 20472: : _Inherited(__tag, __a, 20472: static_cast&>(__in)) 20472: { } 20472: 20472: template&>(), 20472: _ExplicitCtor<_Valid, const _UElements&...> = false> 20472: 20472: explicit 20472: tuple(allocator_arg_t __tag, const _Alloc& __a, 20472: const tuple<_UElements...>& __in) 20472: : _Inherited(__tag, __a, 20472: static_cast&>(__in)) 20472: { } 20472: 20472: template&&>(), 20472: _ImplicitCtor<_Valid, _UElements...> = true> 20472: 20472: tuple(allocator_arg_t __tag, const _Alloc& __a, 20472: tuple<_UElements...>&& __in) 20472: : _Inherited(__tag, __a, 20472: static_cast<_Tuple_impl<0, _UElements...>&&>(__in)) 20472: { } 20472: 20472: template&&>(), 20472: _ExplicitCtor<_Valid, _UElements...> = false> 20472: 20472: explicit 20472: tuple(allocator_arg_t __tag, const _Alloc& __a, 20472: tuple<_UElements...>&& __in) 20472: : _Inherited(__tag, __a, 20472: static_cast<_Tuple_impl<0, _UElements...>&&>(__in)) 20472: { } 20472: 20472: 20472: 20472: 20472: tuple& 20472: operator=(typename conditional<__assignable(), 20472: const tuple&, 20472: const __nonesuch&>::type __in) 20472: noexcept(__nothrow_assignable()) 20472: { 20472: this->_M_assign(__in); 20472: return *this; 20472: } 20472: 20472: 20472: tuple& 20472: operator=(typename conditional<__assignable<_Elements...>(), 20472: tuple&&, 20472: __nonesuch&&>::type __in) 20472: noexcept(__nothrow_assignable<_Elements...>()) 20472: { 20472: this->_M_assign(std::move(__in)); 20472: return *this; 20472: } 20472: 20472: template 20472: 20472: __enable_if_t<__assignable(), tuple&> 20472: operator=(const tuple<_UElements...>& __in) 20472: noexcept(__nothrow_assignable()) 20472: { 20472: this->_M_assign(__in); 20472: return *this; 20472: } 20472: 20472: template 20472: 20472: __enable_if_t<__assignable<_UElements...>(), tuple&> 20472: operator=(tuple<_UElements...>&& __in) 20472: noexcept(__nothrow_assignable<_UElements...>()) 20472: { 20472: this->_M_assign(std::move(__in)); 20472: return *this; 20472: } 20472: 20472: 20472: 20472: void 20472: swap(tuple& __in) 20472: noexcept(__and_<__is_nothrow_swappable<_Elements>...>::value) 20472: { _Inherited::_M_swap(__in); } 20472: }; 20472: # 867 "/usr/include/c++/10/tuple" 3 20472: template<> 20472: class tuple<> 20472: { 20472: public: 20472: void swap(tuple&) noexcept { } 20472: 20472: 20472: tuple() = default; 20472: 20472: template 20472: 20472: tuple(allocator_arg_t, const _Alloc&) noexcept { } 20472: template 20472: 20472: tuple(allocator_arg_t, const _Alloc&, const tuple&) noexcept { } 20472: }; 20472: 20472: 20472: 20472: template 20472: class tuple<_T1, _T2> : public _Tuple_impl<0, _T1, _T2> 20472: { 20472: typedef _Tuple_impl<0, _T1, _T2> _Inherited; 20472: 20472: 20472: template 20472: using _ImplicitDefaultCtor = __enable_if_t< 20472: _TupleConstraints<_Dummy, _U1, _U2>:: 20472: __is_implicitly_default_constructible(), 20472: bool>; 20472: 20472: 20472: template 20472: using _ExplicitDefaultCtor = __enable_if_t< 20472: _TupleConstraints<_Dummy, _U1, _U2>:: 20472: __is_explicitly_default_constructible(), 20472: bool>; 20472: 20472: template 20472: using _TCC = _TupleConstraints<_Dummy, _T1, _T2>; 20472: 20472: 20472: template 20472: using _ImplicitCtor = __enable_if_t< 20472: _TCC<_Cond>::template __is_implicitly_constructible<_U1, _U2>(), 20472: bool>; 20472: 20472: 20472: template 20472: using _ExplicitCtor = __enable_if_t< 20472: _TCC<_Cond>::template __is_explicitly_constructible<_U1, _U2>(), 20472: bool>; 20472: 20472: template 20472: static constexpr bool __assignable() 20472: { 20472: return __and_, 20472: is_assignable<_T2&, _U2>>::value; 20472: } 20472: 20472: template 20472: static constexpr bool __nothrow_assignable() 20472: { 20472: return __and_, 20472: is_nothrow_assignable<_T2&, _U2>>::value; 20472: } 20472: 20472: template 20472: static constexpr bool __nothrow_constructible() 20472: { 20472: return __and_, 20472: is_nothrow_constructible<_T2, _U2>>::value; 20472: } 20472: 20472: static constexpr bool __nothrow_default_constructible() 20472: { 20472: return __and_, 20472: is_nothrow_default_constructible<_T2>>::value; 20472: } 20472: 20472: template 20472: static constexpr bool __is_alloc_arg() 20472: { return is_same<__remove_cvref_t<_U1>, allocator_arg_t>::value; } 20472: 20472: public: 20472: template = true> 20472: constexpr 20472: tuple() 20472: noexcept(__nothrow_default_constructible()) 20472: : _Inherited() { } 20472: 20472: template = false> 20472: explicit constexpr 20472: tuple() 20472: noexcept(__nothrow_default_constructible()) 20472: : _Inherited() { } 20472: 20472: template = true> 20472: constexpr 20472: tuple(const _T1& __a1, const _T2& __a2) 20472: noexcept(__nothrow_constructible()) 20472: : _Inherited(__a1, __a2) { } 20472: 20472: template = false> 20472: explicit constexpr 20472: tuple(const _T1& __a1, const _T2& __a2) 20472: noexcept(__nothrow_constructible()) 20472: : _Inherited(__a1, __a2) { } 20472: 20472: template(), _U1, _U2> = true> 20472: constexpr 20472: tuple(_U1&& __a1, _U2&& __a2) 20472: noexcept(__nothrow_constructible<_U1, _U2>()) 20472: : _Inherited(std::forward<_U1>(__a1), std::forward<_U2>(__a2)) { } 20472: 20472: template(), _U1, _U2> = false> 20472: explicit constexpr 20472: tuple(_U1&& __a1, _U2&& __a2) 20472: noexcept(__nothrow_constructible<_U1, _U2>()) 20472: : _Inherited(std::forward<_U1>(__a1), std::forward<_U2>(__a2)) { } 20472: 20472: constexpr tuple(const tuple&) = default; 20472: 20472: constexpr tuple(tuple&&) = default; 20472: 20472: template = true> 20472: constexpr 20472: tuple(const tuple<_U1, _U2>& __in) 20472: noexcept(__nothrow_constructible()) 20472: : _Inherited(static_cast&>(__in)) { } 20472: 20472: template = false> 20472: explicit constexpr 20472: tuple(const tuple<_U1, _U2>& __in) 20472: noexcept(__nothrow_constructible()) 20472: : _Inherited(static_cast&>(__in)) { } 20472: 20472: template = true> 20472: constexpr 20472: tuple(tuple<_U1, _U2>&& __in) 20472: noexcept(__nothrow_constructible<_U1, _U2>()) 20472: : _Inherited(static_cast<_Tuple_impl<0, _U1, _U2>&&>(__in)) { } 20472: 20472: template = false> 20472: explicit constexpr 20472: tuple(tuple<_U1, _U2>&& __in) 20472: noexcept(__nothrow_constructible<_U1, _U2>()) 20472: : _Inherited(static_cast<_Tuple_impl<0, _U1, _U2>&&>(__in)) { } 20472: 20472: template = true> 20472: constexpr 20472: tuple(const pair<_U1, _U2>& __in) 20472: noexcept(__nothrow_constructible()) 20472: : _Inherited(__in.first, __in.second) { } 20472: 20472: template = false> 20472: explicit constexpr 20472: tuple(const pair<_U1, _U2>& __in) 20472: noexcept(__nothrow_constructible()) 20472: : _Inherited(__in.first, __in.second) { } 20472: 20472: template = true> 20472: constexpr 20472: tuple(pair<_U1, _U2>&& __in) 20472: noexcept(__nothrow_constructible<_U1, _U2>()) 20472: : _Inherited(std::forward<_U1>(__in.first), 20472: std::forward<_U2>(__in.second)) { } 20472: 20472: template = false> 20472: explicit constexpr 20472: tuple(pair<_U1, _U2>&& __in) 20472: noexcept(__nothrow_constructible<_U1, _U2>()) 20472: : _Inherited(std::forward<_U1>(__in.first), 20472: std::forward<_U2>(__in.second)) { } 20472: 20472: 20472: 20472: template::value, _T1, _T2> = true> 20472: 20472: tuple(allocator_arg_t __tag, const _Alloc& __a) 20472: : _Inherited(__tag, __a) { } 20472: 20472: template = true> 20472: 20472: tuple(allocator_arg_t __tag, const _Alloc& __a, 20472: const _T1& __a1, const _T2& __a2) 20472: : _Inherited(__tag, __a, __a1, __a2) { } 20472: 20472: template = false> 20472: explicit 20472: 20472: tuple(allocator_arg_t __tag, const _Alloc& __a, 20472: const _T1& __a1, const _T2& __a2) 20472: : _Inherited(__tag, __a, __a1, __a2) { } 20472: 20472: template = true> 20472: 20472: tuple(allocator_arg_t __tag, const _Alloc& __a, _U1&& __a1, _U2&& __a2) 20472: : _Inherited(__tag, __a, std::forward<_U1>(__a1), 20472: std::forward<_U2>(__a2)) { } 20472: 20472: template = false> 20472: explicit 20472: 20472: tuple(allocator_arg_t __tag, const _Alloc& __a, 20472: _U1&& __a1, _U2&& __a2) 20472: : _Inherited(__tag, __a, std::forward<_U1>(__a1), 20472: std::forward<_U2>(__a2)) { } 20472: 20472: template 20472: 20472: tuple(allocator_arg_t __tag, const _Alloc& __a, const tuple& __in) 20472: : _Inherited(__tag, __a, static_cast(__in)) { } 20472: 20472: template 20472: 20472: tuple(allocator_arg_t __tag, const _Alloc& __a, tuple&& __in) 20472: : _Inherited(__tag, __a, static_cast<_Inherited&&>(__in)) { } 20472: 20472: template = true> 20472: 20472: tuple(allocator_arg_t __tag, const _Alloc& __a, 20472: const tuple<_U1, _U2>& __in) 20472: : _Inherited(__tag, __a, 20472: static_cast&>(__in)) 20472: { } 20472: 20472: template = false> 20472: explicit 20472: 20472: tuple(allocator_arg_t __tag, const _Alloc& __a, 20472: const tuple<_U1, _U2>& __in) 20472: : _Inherited(__tag, __a, 20472: static_cast&>(__in)) 20472: { } 20472: 20472: template = true> 20472: 20472: tuple(allocator_arg_t __tag, const _Alloc& __a, tuple<_U1, _U2>&& __in) 20472: : _Inherited(__tag, __a, static_cast<_Tuple_impl<0, _U1, _U2>&&>(__in)) 20472: { } 20472: 20472: template = false> 20472: explicit 20472: 20472: tuple(allocator_arg_t __tag, const _Alloc& __a, tuple<_U1, _U2>&& __in) 20472: : _Inherited(__tag, __a, static_cast<_Tuple_impl<0, _U1, _U2>&&>(__in)) 20472: { } 20472: 20472: template = true> 20472: 20472: tuple(allocator_arg_t __tag, const _Alloc& __a, 20472: const pair<_U1, _U2>& __in) 20472: : _Inherited(__tag, __a, __in.first, __in.second) { } 20472: 20472: template = false> 20472: explicit 20472: 20472: tuple(allocator_arg_t __tag, const _Alloc& __a, 20472: const pair<_U1, _U2>& __in) 20472: : _Inherited(__tag, __a, __in.first, __in.second) { } 20472: 20472: template = true> 20472: 20472: tuple(allocator_arg_t __tag, const _Alloc& __a, pair<_U1, _U2>&& __in) 20472: : _Inherited(__tag, __a, std::forward<_U1>(__in.first), 20472: std::forward<_U2>(__in.second)) { } 20472: 20472: template = false> 20472: explicit 20472: 20472: tuple(allocator_arg_t __tag, const _Alloc& __a, pair<_U1, _U2>&& __in) 20472: : _Inherited(__tag, __a, std::forward<_U1>(__in.first), 20472: std::forward<_U2>(__in.second)) { } 20472: 20472: 20472: 20472: 20472: tuple& 20472: operator=(typename conditional<__assignable(), 20472: const tuple&, 20472: const __nonesuch&>::type __in) 20472: noexcept(__nothrow_assignable()) 20472: { 20472: this->_M_assign(__in); 20472: return *this; 20472: } 20472: 20472: 20472: tuple& 20472: operator=(typename conditional<__assignable<_T1, _T2>(), 20472: tuple&&, 20472: __nonesuch&&>::type __in) 20472: noexcept(__nothrow_assignable<_T1, _T2>()) 20472: { 20472: this->_M_assign(std::move(__in)); 20472: return *this; 20472: } 20472: 20472: template 20472: 20472: __enable_if_t<__assignable(), tuple&> 20472: operator=(const tuple<_U1, _U2>& __in) 20472: noexcept(__nothrow_assignable()) 20472: { 20472: this->_M_assign(__in); 20472: return *this; 20472: } 20472: 20472: template 20472: 20472: __enable_if_t<__assignable<_U1, _U2>(), tuple&> 20472: operator=(tuple<_U1, _U2>&& __in) 20472: noexcept(__nothrow_assignable<_U1, _U2>()) 20472: { 20472: this->_M_assign(std::move(__in)); 20472: return *this; 20472: } 20472: 20472: template 20472: 20472: __enable_if_t<__assignable(), tuple&> 20472: operator=(const pair<_U1, _U2>& __in) 20472: noexcept(__nothrow_assignable()) 20472: { 20472: this->_M_head(*this) = __in.first; 20472: this->_M_tail(*this)._M_head(*this) = __in.second; 20472: return *this; 20472: } 20472: 20472: template 20472: 20472: __enable_if_t<__assignable<_U1, _U2>(), tuple&> 20472: operator=(pair<_U1, _U2>&& __in) 20472: noexcept(__nothrow_assignable<_U1, _U2>()) 20472: { 20472: this->_M_head(*this) = std::forward<_U1>(__in.first); 20472: this->_M_tail(*this)._M_head(*this) = std::forward<_U2>(__in.second); 20472: return *this; 20472: } 20472: 20472: 20472: void 20472: swap(tuple& __in) 20472: noexcept(__and_<__is_nothrow_swappable<_T1>, 20472: __is_nothrow_swappable<_T2>>::value) 20472: { _Inherited::_M_swap(__in); } 20472: }; 20472: 20472: 20472: 20472: template 20472: struct tuple_size> 20472: : public integral_constant { }; 20472: # 1258 "/usr/include/c++/10/tuple" 3 20472: template 20472: struct tuple_element<__i, tuple<_Head, _Tail...> > 20472: : tuple_element<__i - 1, tuple<_Tail...> > { }; 20472: 20472: 20472: 20472: 20472: template 20472: struct tuple_element<0, tuple<_Head, _Tail...> > 20472: { 20472: typedef _Head type; 20472: }; 20472: 20472: 20472: 20472: 20472: template 20472: struct tuple_element<__i, tuple<>> 20472: { 20472: static_assert(__i < tuple_size>::value, 20472: "tuple index is in range"); 20472: }; 20472: 20472: template 20472: constexpr _Head& 20472: __get_helper(_Tuple_impl<__i, _Head, _Tail...>& __t) noexcept 20472: { return _Tuple_impl<__i, _Head, _Tail...>::_M_head(__t); } 20472: 20472: template 20472: constexpr const _Head& 20472: __get_helper(const _Tuple_impl<__i, _Head, _Tail...>& __t) noexcept 20472: { return _Tuple_impl<__i, _Head, _Tail...>::_M_head(__t); } 20472: 20472: 20472: template 20472: constexpr __tuple_element_t<__i, tuple<_Elements...>>& 20472: get(tuple<_Elements...>& __t) noexcept 20472: { return std::__get_helper<__i>(__t); } 20472: 20472: 20472: template 20472: constexpr const __tuple_element_t<__i, tuple<_Elements...>>& 20472: get(const tuple<_Elements...>& __t) noexcept 20472: { return std::__get_helper<__i>(__t); } 20472: 20472: 20472: template 20472: constexpr __tuple_element_t<__i, tuple<_Elements...>>&& 20472: get(tuple<_Elements...>&& __t) noexcept 20472: { 20472: typedef __tuple_element_t<__i, tuple<_Elements...>> __element_type; 20472: return std::forward<__element_type&&>(std::get<__i>(__t)); 20472: } 20472: 20472: 20472: template 20472: constexpr const __tuple_element_t<__i, tuple<_Elements...>>&& 20472: get(const tuple<_Elements...>&& __t) noexcept 20472: { 20472: typedef __tuple_element_t<__i, tuple<_Elements...>> __element_type; 20472: return std::forward(std::get<__i>(__t)); 20472: } 20472: # 1362 "/usr/include/c++/10/tuple" 3 20472: template 20472: struct __tuple_compare 20472: { 20472: static constexpr bool 20472: __eq(const _Tp& __t, const _Up& __u) 20472: { 20472: return bool(std::get<__i>(__t) == std::get<__i>(__u)) 20472: && __tuple_compare<_Tp, _Up, __i + 1, __size>::__eq(__t, __u); 20472: } 20472: 20472: static constexpr bool 20472: __less(const _Tp& __t, const _Up& __u) 20472: { 20472: return bool(std::get<__i>(__t) < std::get<__i>(__u)) 20472: || (!bool(std::get<__i>(__u) < std::get<__i>(__t)) 20472: && __tuple_compare<_Tp, _Up, __i + 1, __size>::__less(__t, __u)); 20472: } 20472: }; 20472: 20472: template 20472: struct __tuple_compare<_Tp, _Up, __size, __size> 20472: { 20472: static constexpr bool 20472: __eq(const _Tp&, const _Up&) { return true; } 20472: 20472: static constexpr bool 20472: __less(const _Tp&, const _Up&) { return false; } 20472: }; 20472: 20472: template 20472: constexpr bool 20472: operator==(const tuple<_TElements...>& __t, 20472: const tuple<_UElements...>& __u) 20472: { 20472: static_assert(sizeof...(_TElements) == sizeof...(_UElements), 20472: "tuple objects can only be compared if they have equal sizes."); 20472: using __compare = __tuple_compare, 20472: tuple<_UElements...>, 20472: 0, sizeof...(_TElements)>; 20472: return __compare::__eq(__t, __u); 20472: } 20472: # 1433 "/usr/include/c++/10/tuple" 3 20472: template 20472: constexpr bool 20472: operator<(const tuple<_TElements...>& __t, 20472: const tuple<_UElements...>& __u) 20472: { 20472: static_assert(sizeof...(_TElements) == sizeof...(_UElements), 20472: "tuple objects can only be compared if they have equal sizes."); 20472: using __compare = __tuple_compare, 20472: tuple<_UElements...>, 20472: 0, sizeof...(_TElements)>; 20472: return __compare::__less(__t, __u); 20472: } 20472: 20472: template 20472: constexpr bool 20472: operator!=(const tuple<_TElements...>& __t, 20472: const tuple<_UElements...>& __u) 20472: { return !(__t == __u); } 20472: 20472: template 20472: constexpr bool 20472: operator>(const tuple<_TElements...>& __t, 20472: const tuple<_UElements...>& __u) 20472: { return __u < __t; } 20472: 20472: template 20472: constexpr bool 20472: operator<=(const tuple<_TElements...>& __t, 20472: const tuple<_UElements...>& __u) 20472: { return !(__u < __t); } 20472: 20472: template 20472: constexpr bool 20472: operator>=(const tuple<_TElements...>& __t, 20472: const tuple<_UElements...>& __u) 20472: { return !(__t < __u); } 20472: 20472: 20472: 20472: template 20472: constexpr tuple::__type...> 20472: make_tuple(_Elements&&... __args) 20472: { 20472: typedef tuple::__type...> 20472: __result_type; 20472: return __result_type(std::forward<_Elements>(__args)...); 20472: } 20472: 20472: 20472: 20472: 20472: template 20472: constexpr tuple<_Elements&&...> 20472: forward_as_tuple(_Elements&&... __args) noexcept 20472: { return tuple<_Elements&&...>(std::forward<_Elements>(__args)...); } 20472: 20472: template 20472: struct __make_tuple_impl; 20472: 20472: template 20472: struct __make_tuple_impl<_Idx, tuple<_Tp...>, _Tuple, _Nm> 20472: : __make_tuple_impl<_Idx + 1, 20472: tuple<_Tp..., __tuple_element_t<_Idx, _Tuple>>, 20472: _Tuple, _Nm> 20472: { }; 20472: 20472: template 20472: struct __make_tuple_impl<_Nm, tuple<_Tp...>, _Tuple, _Nm> 20472: { 20472: typedef tuple<_Tp...> __type; 20472: }; 20472: 20472: template 20472: struct __do_make_tuple 20472: : __make_tuple_impl<0, tuple<>, _Tuple, std::tuple_size<_Tuple>::value> 20472: { }; 20472: 20472: 20472: template 20472: struct __make_tuple 20472: : public __do_make_tuple<__remove_cvref_t<_Tuple>> 20472: { }; 20472: 20472: 20472: template 20472: struct __combine_tuples; 20472: 20472: template<> 20472: struct __combine_tuples<> 20472: { 20472: typedef tuple<> __type; 20472: }; 20472: 20472: template 20472: struct __combine_tuples> 20472: { 20472: typedef tuple<_Ts...> __type; 20472: }; 20472: 20472: template 20472: struct __combine_tuples, tuple<_T2s...>, _Rem...> 20472: { 20472: typedef typename __combine_tuples, 20472: _Rem...>::__type __type; 20472: }; 20472: 20472: 20472: template 20472: struct __tuple_cat_result 20472: { 20472: typedef typename __combine_tuples 20472: ::__type...>::__type __type; 20472: }; 20472: 20472: 20472: 20472: template 20472: struct __make_1st_indices; 20472: 20472: template<> 20472: struct __make_1st_indices<> 20472: { 20472: typedef std::_Index_tuple<> __type; 20472: }; 20472: 20472: template 20472: struct __make_1st_indices<_Tp, _Tpls...> 20472: { 20472: typedef typename std::_Build_index_tuple::type>::value>::__type __type; 20472: }; 20472: 20472: 20472: 20472: 20472: template 20472: struct __tuple_concater; 20472: 20472: template 20472: struct __tuple_concater<_Ret, std::_Index_tuple<_Is...>, _Tp, _Tpls...> 20472: { 20472: template 20472: static constexpr _Ret 20472: _S_do(_Tp&& __tp, _Tpls&&... __tps, _Us&&... __us) 20472: { 20472: typedef typename __make_1st_indices<_Tpls...>::__type __idx; 20472: typedef __tuple_concater<_Ret, __idx, _Tpls...> __next; 20472: return __next::_S_do(std::forward<_Tpls>(__tps)..., 20472: std::forward<_Us>(__us)..., 20472: std::get<_Is>(std::forward<_Tp>(__tp))...); 20472: } 20472: }; 20472: 20472: template 20472: struct __tuple_concater<_Ret, std::_Index_tuple<>> 20472: { 20472: template 20472: static constexpr _Ret 20472: _S_do(_Us&&... __us) 20472: { 20472: return _Ret(std::forward<_Us>(__us)...); 20472: } 20472: }; 20472: 20472: 20472: template...>::value>::type> 20472: constexpr auto 20472: tuple_cat(_Tpls&&... __tpls) 20472: -> typename __tuple_cat_result<_Tpls...>::__type 20472: { 20472: typedef typename __tuple_cat_result<_Tpls...>::__type __ret; 20472: typedef typename __make_1st_indices<_Tpls...>::__type __idx; 20472: typedef __tuple_concater<__ret, __idx, _Tpls...> __concater; 20472: return __concater::_S_do(std::forward<_Tpls>(__tpls)...); 20472: } 20472: 20472: 20472: 20472: 20472: template 20472: constexpr tuple<_Elements&...> 20472: tie(_Elements&... __args) noexcept 20472: { return tuple<_Elements&...>(__args...); } 20472: 20472: 20472: template 20472: 20472: inline 20472: 20472: 20472: 20472: 20472: 20472: void 20472: 20472: swap(tuple<_Elements...>& __x, tuple<_Elements...>& __y) 20472: noexcept(noexcept(__x.swap(__y))) 20472: { __x.swap(__y); } 20472: # 1644 "/usr/include/c++/10/tuple" 3 20472: struct _Swallow_assign 20472: { 20472: template 20472: const _Swallow_assign& 20472: operator=(const _Tp&) const 20472: { return *this; } 20472: }; 20472: 20472: 20472: 20472: constexpr _Swallow_assign ignore{}; 20472: 20472: 20472: template 20472: struct uses_allocator, _Alloc> : true_type { }; 20472: # 1669 "/usr/include/c++/10/tuple" 3 20472: template 20472: template 20472: 20472: inline 20472: pair<_T1, _T2>:: 20472: pair(piecewise_construct_t, 20472: tuple<_Args1...> __first, tuple<_Args2...> __second) 20472: : pair(__first, __second, 20472: typename _Build_index_tuple::__type(), 20472: typename _Build_index_tuple::__type()) 20472: { } 20472: 20472: template 20472: template 20472: inline 20472: pair<_T1, _T2>:: 20472: pair(tuple<_Args1...>& __tuple1, tuple<_Args2...>& __tuple2, 20472: _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>) 20472: : first(std::forward<_Args1>(std::get<_Indexes1>(__tuple1))...), 20472: second(std::forward<_Args2>(std::get<_Indexes2>(__tuple2))...) 20472: { } 20472: # 1759 "/usr/include/c++/10/tuple" 3 20472: 20472: } 20472: # 55 "/usr/include/c++/10/functional" 2 3 20472: 20472: # 1 "/usr/include/c++/10/bits/functional_hash.h" 1 3 20472: # 33 "/usr/include/c++/10/bits/functional_hash.h" 3 20472: 20472: # 34 "/usr/include/c++/10/bits/functional_hash.h" 3 20472: 20472: 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: # 49 "/usr/include/c++/10/bits/functional_hash.h" 3 20472: template 20472: struct __hash_base 20472: { 20472: typedef _Result result_type ; 20472: typedef _Arg argument_type ; 20472: }; 20472: 20472: 20472: template 20472: struct hash; 20472: 20472: template 20472: struct __poison_hash 20472: { 20472: static constexpr bool __enable_hash_call = false; 20472: private: 20472: 20472: __poison_hash(__poison_hash&&); 20472: ~__poison_hash(); 20472: }; 20472: 20472: template 20472: struct __poison_hash<_Tp, __void_t()(declval<_Tp>()))>> 20472: { 20472: static constexpr bool __enable_hash_call = true; 20472: }; 20472: 20472: 20472: template::value> 20472: struct __hash_enum 20472: { 20472: private: 20472: 20472: __hash_enum(__hash_enum&&); 20472: ~__hash_enum(); 20472: }; 20472: 20472: 20472: template 20472: struct __hash_enum<_Tp, true> : public __hash_base 20472: { 20472: size_t 20472: operator()(_Tp __val) const noexcept 20472: { 20472: using __type = typename underlying_type<_Tp>::type; 20472: return hash<__type>{}(static_cast<__type>(__val)); 20472: } 20472: }; 20472: 20472: 20472: 20472: template 20472: struct hash : __hash_enum<_Tp> 20472: { }; 20472: 20472: 20472: template 20472: struct hash<_Tp*> : public __hash_base 20472: { 20472: size_t 20472: operator()(_Tp* __p) const noexcept 20472: { return reinterpret_cast(__p); } 20472: }; 20472: # 124 "/usr/include/c++/10/bits/functional_hash.h" 3 20472: template<> struct hash : public __hash_base { size_t operator()(bool __val) const noexcept { return static_cast(__val); } }; 20472: 20472: 20472: template<> struct hash : public __hash_base { size_t operator()(char __val) const noexcept { return static_cast(__val); } }; 20472: 20472: 20472: template<> struct hash : public __hash_base { size_t operator()(signed char __val) const noexcept { return static_cast(__val); } }; 20472: 20472: 20472: template<> struct hash : public __hash_base { size_t operator()(unsigned char __val) const noexcept { return static_cast(__val); } }; 20472: 20472: 20472: template<> struct hash : public __hash_base { size_t operator()(wchar_t __val) const noexcept { return static_cast(__val); } }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template<> struct hash : public __hash_base { size_t operator()(char16_t __val) const noexcept { return static_cast(__val); } }; 20472: 20472: 20472: template<> struct hash : public __hash_base { size_t operator()(char32_t __val) const noexcept { return static_cast(__val); } }; 20472: 20472: 20472: template<> struct hash : public __hash_base { size_t operator()(short __val) const noexcept { return static_cast(__val); } }; 20472: 20472: 20472: template<> struct hash : public __hash_base { size_t operator()(int __val) const noexcept { return static_cast(__val); } }; 20472: 20472: 20472: template<> struct hash : public __hash_base { size_t operator()(long __val) const noexcept { return static_cast(__val); } }; 20472: 20472: 20472: template<> struct hash : public __hash_base { size_t operator()(long long __val) const noexcept { return static_cast(__val); } }; 20472: 20472: 20472: template<> struct hash : public __hash_base { size_t operator()(unsigned short __val) const noexcept { return static_cast(__val); } }; 20472: 20472: 20472: template<> struct hash : public __hash_base { size_t operator()(unsigned int __val) const noexcept { return static_cast(__val); } }; 20472: 20472: 20472: template<> struct hash : public __hash_base { size_t operator()(unsigned long __val) const noexcept { return static_cast(__val); } }; 20472: 20472: 20472: template<> struct hash : public __hash_base { size_t operator()(unsigned long long __val) const noexcept { return static_cast(__val); } }; 20472: # 192 "/usr/include/c++/10/bits/functional_hash.h" 3 20472: struct _Hash_impl 20472: { 20472: static size_t 20472: hash(const void* __ptr, size_t __clength, 20472: size_t __seed = static_cast(0xc70f6907UL)) 20472: { return _Hash_bytes(__ptr, __clength, __seed); } 20472: 20472: template 20472: static size_t 20472: hash(const _Tp& __val) 20472: { return hash(&__val, sizeof(__val)); } 20472: 20472: template 20472: static size_t 20472: __hash_combine(const _Tp& __val, size_t __hash) 20472: { return hash(&__val, sizeof(__val), __hash); } 20472: }; 20472: 20472: 20472: struct _Fnv_hash_impl 20472: { 20472: static size_t 20472: hash(const void* __ptr, size_t __clength, 20472: size_t __seed = static_cast(2166136261UL)) 20472: { return _Fnv_hash_bytes(__ptr, __clength, __seed); } 20472: 20472: template 20472: static size_t 20472: hash(const _Tp& __val) 20472: { return hash(&__val, sizeof(__val)); } 20472: 20472: template 20472: static size_t 20472: __hash_combine(const _Tp& __val, size_t __hash) 20472: { return hash(&__val, sizeof(__val), __hash); } 20472: }; 20472: 20472: 20472: template<> 20472: struct hash : public __hash_base 20472: { 20472: size_t 20472: operator()(float __val) const noexcept 20472: { 20472: 20472: return __val != 0.0f ? std::_Hash_impl::hash(__val) : 0; 20472: } 20472: }; 20472: 20472: 20472: template<> 20472: struct hash : public __hash_base 20472: { 20472: size_t 20472: operator()(double __val) const noexcept 20472: { 20472: 20472: return __val != 0.0 ? std::_Hash_impl::hash(__val) : 0; 20472: } 20472: }; 20472: 20472: 20472: template<> 20472: struct hash 20472: : public __hash_base 20472: { 20472: __attribute__ ((__pure__)) size_t 20472: operator()(long double __val) const noexcept; 20472: }; 20472: # 278 "/usr/include/c++/10/bits/functional_hash.h" 3 20472: template 20472: struct __is_fast_hash : public std::true_type 20472: { }; 20472: 20472: template<> 20472: struct __is_fast_hash> : public std::false_type 20472: { }; 20472: 20472: 20472: } 20472: # 57 "/usr/include/c++/10/functional" 2 3 20472: 20472: # 1 "/usr/include/c++/10/bits/refwrap.h" 1 3 20472: # 33 "/usr/include/c++/10/bits/refwrap.h" 3 20472: 20472: # 34 "/usr/include/c++/10/bits/refwrap.h" 3 20472: # 43 "/usr/include/c++/10/bits/refwrap.h" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: # 54 "/usr/include/c++/10/bits/refwrap.h" 3 20472: template 20472: struct _Maybe_unary_or_binary_function { }; 20472: 20472: 20472: template 20472: struct _Maybe_unary_or_binary_function<_Res, _T1> 20472: : std::unary_function<_T1, _Res> { }; 20472: 20472: 20472: template 20472: struct _Maybe_unary_or_binary_function<_Res, _T1, _T2> 20472: : std::binary_function<_T1, _T2, _Res> { }; 20472: 20472: template 20472: struct _Mem_fn_traits; 20472: 20472: template 20472: struct _Mem_fn_traits_base 20472: { 20472: using __result_type = _Res; 20472: using __maybe_type 20472: = _Maybe_unary_or_binary_function<_Res, _Class*, _ArgTypes...>; 20472: using __arity = integral_constant; 20472: }; 20472: # 99 "/usr/include/c++/10/bits/refwrap.h" 3 20472: 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; }; 20472: 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; }; 20472: 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; }; 20472: # 113 "/usr/include/c++/10/bits/refwrap.h" 3 20472: template> 20472: struct _Maybe_get_result_type 20472: { }; 20472: 20472: template 20472: struct _Maybe_get_result_type<_Functor, 20472: __void_t> 20472: { typedef typename _Functor::result_type result_type; }; 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct _Weak_result_type_impl 20472: : _Maybe_get_result_type<_Functor> 20472: { }; 20472: 20472: 20472: template 20472: struct _Weak_result_type_impl<_Res(_ArgTypes...) > 20472: { typedef _Res result_type; }; 20472: 20472: 20472: template 20472: struct _Weak_result_type_impl<_Res(_ArgTypes......) > 20472: { typedef _Res result_type; }; 20472: 20472: 20472: template 20472: struct _Weak_result_type_impl<_Res(*)(_ArgTypes...) > 20472: { typedef _Res result_type; }; 20472: 20472: 20472: template 20472: struct 20472: _Weak_result_type_impl<_Res(*)(_ArgTypes......) > 20472: { typedef _Res result_type; }; 20472: 20472: 20472: template::value> 20472: struct _Weak_result_type_memfun 20472: : _Weak_result_type_impl<_Functor> 20472: { }; 20472: 20472: 20472: template 20472: struct _Weak_result_type_memfun<_MemFunPtr, true> 20472: { 20472: using result_type = typename _Mem_fn_traits<_MemFunPtr>::__result_type; 20472: }; 20472: 20472: 20472: template 20472: struct _Weak_result_type_memfun<_Func _Class::*, false> 20472: { }; 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct _Weak_result_type 20472: : _Weak_result_type_memfun::type> 20472: { }; 20472: 20472: 20472: 20472: template> 20472: struct _Refwrap_base_arg1 20472: { }; 20472: 20472: 20472: template 20472: struct _Refwrap_base_arg1<_Tp, 20472: __void_t> 20472: { 20472: typedef typename _Tp::argument_type argument_type; 20472: }; 20472: 20472: 20472: template> 20472: struct _Refwrap_base_arg2 20472: { }; 20472: 20472: 20472: template 20472: struct _Refwrap_base_arg2<_Tp, 20472: __void_t> 20472: { 20472: typedef typename _Tp::first_argument_type first_argument_type; 20472: typedef typename _Tp::second_argument_type second_argument_type; 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct _Reference_wrapper_base 20472: : _Weak_result_type<_Tp>, _Refwrap_base_arg1<_Tp>, _Refwrap_base_arg2<_Tp> 20472: { }; 20472: 20472: 20472: template 20472: struct _Reference_wrapper_base<_Res(_T1) > 20472: : unary_function<_T1, _Res> 20472: { }; 20472: 20472: template 20472: struct _Reference_wrapper_base<_Res(_T1) const> 20472: : unary_function<_T1, _Res> 20472: { }; 20472: 20472: template 20472: struct _Reference_wrapper_base<_Res(_T1) volatile> 20472: : unary_function<_T1, _Res> 20472: { }; 20472: 20472: template 20472: struct _Reference_wrapper_base<_Res(_T1) const volatile> 20472: : unary_function<_T1, _Res> 20472: { }; 20472: 20472: 20472: template 20472: struct _Reference_wrapper_base<_Res(_T1, _T2) > 20472: : binary_function<_T1, _T2, _Res> 20472: { }; 20472: 20472: template 20472: struct _Reference_wrapper_base<_Res(_T1, _T2) const> 20472: : binary_function<_T1, _T2, _Res> 20472: { }; 20472: 20472: template 20472: struct _Reference_wrapper_base<_Res(_T1, _T2) volatile> 20472: : binary_function<_T1, _T2, _Res> 20472: { }; 20472: 20472: template 20472: struct _Reference_wrapper_base<_Res(_T1, _T2) const volatile> 20472: : binary_function<_T1, _T2, _Res> 20472: { }; 20472: 20472: 20472: template 20472: struct _Reference_wrapper_base<_Res(*)(_T1) > 20472: : unary_function<_T1, _Res> 20472: { }; 20472: 20472: 20472: template 20472: struct _Reference_wrapper_base<_Res(*)(_T1, _T2) > 20472: : binary_function<_T1, _T2, _Res> 20472: { }; 20472: 20472: template::value> 20472: struct _Reference_wrapper_base_memfun 20472: : _Reference_wrapper_base<_Tp> 20472: { }; 20472: 20472: template 20472: struct _Reference_wrapper_base_memfun<_MemFunPtr, true> 20472: : _Mem_fn_traits<_MemFunPtr>::__maybe_type 20472: { 20472: using result_type = typename _Mem_fn_traits<_MemFunPtr>::__result_type; 20472: }; 20472: # 293 "/usr/include/c++/10/bits/refwrap.h" 3 20472: template 20472: class reference_wrapper 20472: 20472: 20472: 20472: : public _Reference_wrapper_base_memfun::type> 20472: 20472: { 20472: _Tp* _M_data; 20472: 20472: 20472: static _Tp* _S_fun(_Tp& __r) noexcept { return std::__addressof(__r); } 20472: 20472: static void _S_fun(_Tp&&) = delete; 20472: 20472: template> 20472: using __not_same 20472: = typename enable_if::value>::type; 20472: 20472: public: 20472: typedef _Tp type; 20472: 20472: 20472: 20472: 20472: template, typename 20472: = decltype(reference_wrapper::_S_fun(std::declval<_Up>()))> 20472: 20472: reference_wrapper(_Up&& __uref) 20472: noexcept(noexcept(reference_wrapper::_S_fun(std::declval<_Up>()))) 20472: : _M_data(reference_wrapper::_S_fun(std::forward<_Up>(__uref))) 20472: { } 20472: 20472: reference_wrapper(const reference_wrapper&) = default; 20472: 20472: reference_wrapper& 20472: operator=(const reference_wrapper&) = default; 20472: 20472: 20472: operator _Tp&() const noexcept 20472: { return this->get(); } 20472: 20472: 20472: _Tp& 20472: get() const noexcept 20472: { return *_M_data; } 20472: 20472: template 20472: 20472: typename result_of<_Tp&(_Args&&...)>::type 20472: operator()(_Args&&... __args) const 20472: { 20472: 20472: 20472: 20472: 20472: return std::__invoke(get(), std::forward<_Args>(__args)...); 20472: } 20472: }; 20472: # 361 "/usr/include/c++/10/bits/refwrap.h" 3 20472: template 20472: 20472: inline reference_wrapper<_Tp> 20472: ref(_Tp& __t) noexcept 20472: { return reference_wrapper<_Tp>(__t); } 20472: 20472: 20472: template 20472: 20472: inline reference_wrapper 20472: cref(const _Tp& __t) noexcept 20472: { return reference_wrapper(__t); } 20472: 20472: template 20472: void ref(const _Tp&&) = delete; 20472: 20472: template 20472: void cref(const _Tp&&) = delete; 20472: 20472: 20472: template 20472: 20472: inline reference_wrapper<_Tp> 20472: ref(reference_wrapper<_Tp> __t) noexcept 20472: { return __t; } 20472: 20472: 20472: template 20472: 20472: inline reference_wrapper 20472: cref(reference_wrapper<_Tp> __t) noexcept 20472: { return { __t.get() }; } 20472: 20472: 20472: 20472: 20472: } 20472: # 59 "/usr/include/c++/10/functional" 2 3 20472: # 1 "/usr/include/c++/10/bits/std_function.h" 1 3 20472: # 33 "/usr/include/c++/10/bits/std_function.h" 3 20472: 20472: # 34 "/usr/include/c++/10/bits/std_function.h" 3 20472: # 47 "/usr/include/c++/10/bits/std_function.h" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: class bad_function_call : public std::exception 20472: { 20472: public: 20472: virtual ~bad_function_call() noexcept; 20472: 20472: const char* what() const noexcept; 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct __is_location_invariant 20472: : is_trivially_copyable<_Tp>::type 20472: { }; 20472: 20472: class _Undefined_class; 20472: 20472: union _Nocopy_types 20472: { 20472: void* _M_object; 20472: const void* _M_const_object; 20472: void (*_M_function_pointer)(); 20472: void (_Undefined_class::*_M_member_pointer)(); 20472: }; 20472: 20472: union [[gnu::may_alias]] _Any_data 20472: { 20472: void* _M_access() { return &_M_pod_data[0]; } 20472: const void* _M_access() const { return &_M_pod_data[0]; } 20472: 20472: template 20472: _Tp& 20472: _M_access() 20472: { return *static_cast<_Tp*>(_M_access()); } 20472: 20472: template 20472: const _Tp& 20472: _M_access() const 20472: { return *static_cast(_M_access()); } 20472: 20472: _Nocopy_types _M_unused; 20472: char _M_pod_data[sizeof(_Nocopy_types)]; 20472: }; 20472: 20472: enum _Manager_operation 20472: { 20472: __get_type_info, 20472: __get_functor_ptr, 20472: __clone_functor, 20472: __destroy_functor 20472: }; 20472: 20472: template 20472: class function; 20472: 20472: 20472: class _Function_base 20472: { 20472: public: 20472: static const size_t _M_max_size = sizeof(_Nocopy_types); 20472: static const size_t _M_max_align = __alignof__(_Nocopy_types); 20472: 20472: template 20472: class _Base_manager 20472: { 20472: protected: 20472: static const bool __stored_locally = 20472: (__is_location_invariant<_Functor>::value 20472: && sizeof(_Functor) <= _M_max_size 20472: && __alignof__(_Functor) <= _M_max_align 20472: && (_M_max_align % __alignof__(_Functor) == 0)); 20472: 20472: typedef integral_constant _Local_storage; 20472: 20472: 20472: static _Functor* 20472: _M_get_pointer(const _Any_data& __source) 20472: { 20472: if (__stored_locally) 20472: { 20472: const _Functor& __f = __source._M_access<_Functor>(); 20472: return const_cast<_Functor*>(std::__addressof(__f)); 20472: } 20472: else 20472: return __source._M_access<_Functor*>(); 20472: } 20472: 20472: 20472: 20472: static void 20472: _M_clone(_Any_data& __dest, const _Any_data& __source, true_type) 20472: { 20472: ::new (__dest._M_access()) _Functor(__source._M_access<_Functor>()); 20472: } 20472: 20472: 20472: 20472: static void 20472: _M_clone(_Any_data& __dest, const _Any_data& __source, false_type) 20472: { 20472: __dest._M_access<_Functor*>() = 20472: new _Functor(*__source._M_access()); 20472: } 20472: 20472: 20472: 20472: static void 20472: _M_destroy(_Any_data& __victim, true_type) 20472: { 20472: __victim._M_access<_Functor>().~_Functor(); 20472: } 20472: 20472: 20472: static void 20472: _M_destroy(_Any_data& __victim, false_type) 20472: { 20472: delete __victim._M_access<_Functor*>(); 20472: } 20472: 20472: public: 20472: static bool 20472: _M_manager(_Any_data& __dest, const _Any_data& __source, 20472: _Manager_operation __op) 20472: { 20472: switch (__op) 20472: { 20472: 20472: case __get_type_info: 20472: __dest._M_access() = &typeid(_Functor); 20472: break; 20472: 20472: case __get_functor_ptr: 20472: __dest._M_access<_Functor*>() = _M_get_pointer(__source); 20472: break; 20472: 20472: case __clone_functor: 20472: _M_clone(__dest, __source, _Local_storage()); 20472: break; 20472: 20472: case __destroy_functor: 20472: _M_destroy(__dest, _Local_storage()); 20472: break; 20472: } 20472: return false; 20472: } 20472: 20472: static void 20472: _M_init_functor(_Any_data& __functor, _Functor&& __f) 20472: { _M_init_functor(__functor, std::move(__f), _Local_storage()); } 20472: 20472: template 20472: static bool 20472: _M_not_empty_function(const function<_Signature>& __f) 20472: { return static_cast(__f); } 20472: 20472: template 20472: static bool 20472: _M_not_empty_function(_Tp* __fp) 20472: { return __fp != nullptr; } 20472: 20472: template 20472: static bool 20472: _M_not_empty_function(_Tp _Class::* __mp) 20472: { return __mp != nullptr; } 20472: 20472: template 20472: static bool 20472: _M_not_empty_function(const _Tp&) 20472: { return true; } 20472: 20472: private: 20472: static void 20472: _M_init_functor(_Any_data& __functor, _Functor&& __f, true_type) 20472: { ::new (__functor._M_access()) _Functor(std::move(__f)); } 20472: 20472: static void 20472: _M_init_functor(_Any_data& __functor, _Functor&& __f, false_type) 20472: { __functor._M_access<_Functor*>() = new _Functor(std::move(__f)); } 20472: }; 20472: 20472: _Function_base() : _M_manager(nullptr) { } 20472: 20472: ~_Function_base() 20472: { 20472: if (_M_manager) 20472: _M_manager(_M_functor, _M_functor, __destroy_functor); 20472: } 20472: 20472: bool _M_empty() const { return !_M_manager; } 20472: 20472: typedef bool (*_Manager_type)(_Any_data&, const _Any_data&, 20472: _Manager_operation); 20472: 20472: _Any_data _M_functor; 20472: _Manager_type _M_manager; 20472: }; 20472: 20472: template 20472: class _Function_handler; 20472: 20472: template 20472: class _Function_handler<_Res(_ArgTypes...), _Functor> 20472: : public _Function_base::_Base_manager<_Functor> 20472: { 20472: typedef _Function_base::_Base_manager<_Functor> _Base; 20472: 20472: public: 20472: static bool 20472: _M_manager(_Any_data& __dest, const _Any_data& __source, 20472: _Manager_operation __op) 20472: { 20472: switch (__op) 20472: { 20472: 20472: case __get_type_info: 20472: __dest._M_access() = &typeid(_Functor); 20472: break; 20472: 20472: case __get_functor_ptr: 20472: __dest._M_access<_Functor*>() = _Base::_M_get_pointer(__source); 20472: break; 20472: 20472: default: 20472: _Base::_M_manager(__dest, __source, __op); 20472: } 20472: return false; 20472: } 20472: 20472: static _Res 20472: _M_invoke(const _Any_data& __functor, _ArgTypes&&... __args) 20472: { 20472: return std::__invoke_r<_Res>(*_Base::_M_get_pointer(__functor), 20472: std::forward<_ArgTypes>(__args)...); 20472: } 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: class function<_Res(_ArgTypes...)> 20472: : public _Maybe_unary_or_binary_function<_Res, _ArgTypes...>, 20472: private _Function_base 20472: { 20472: template> 20472: struct _Callable 20472: : __is_invocable_impl<_Res2, _Res>::type 20472: { }; 20472: 20472: 20472: 20472: template 20472: struct _Callable : false_type { }; 20472: 20472: template 20472: using _Requires = typename enable_if<_Cond::value, _Tp>::type; 20472: 20472: public: 20472: typedef _Res result_type; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: function() noexcept 20472: : _Function_base() { } 20472: 20472: 20472: 20472: 20472: 20472: function(nullptr_t) noexcept 20472: : _Function_base() { } 20472: # 348 "/usr/include/c++/10/bits/std_function.h" 3 20472: function(const function& __x); 20472: # 357 "/usr/include/c++/10/bits/std_function.h" 3 20472: function(function&& __x) noexcept : _Function_base() 20472: { 20472: __x.swap(*this); 20472: } 20472: # 378 "/usr/include/c++/10/bits/std_function.h" 3 20472: template>, void>, 20472: typename = _Requires<_Callable<_Functor>, void>> 20472: function(_Functor); 20472: # 395 "/usr/include/c++/10/bits/std_function.h" 3 20472: function& 20472: operator=(const function& __x) 20472: { 20472: function(__x).swap(*this); 20472: return *this; 20472: } 20472: # 413 "/usr/include/c++/10/bits/std_function.h" 3 20472: function& 20472: operator=(function&& __x) noexcept 20472: { 20472: function(std::move(__x)).swap(*this); 20472: return *this; 20472: } 20472: # 427 "/usr/include/c++/10/bits/std_function.h" 3 20472: function& 20472: operator=(nullptr_t) noexcept 20472: { 20472: if (_M_manager) 20472: { 20472: _M_manager(_M_functor, _M_functor, __destroy_functor); 20472: _M_manager = nullptr; 20472: _M_invoker = nullptr; 20472: } 20472: return *this; 20472: } 20472: # 455 "/usr/include/c++/10/bits/std_function.h" 3 20472: template 20472: _Requires<_Callable::type>, function&> 20472: operator=(_Functor&& __f) 20472: { 20472: function(std::forward<_Functor>(__f)).swap(*this); 20472: return *this; 20472: } 20472: 20472: 20472: template 20472: function& 20472: operator=(reference_wrapper<_Functor> __f) noexcept 20472: { 20472: function(__f).swap(*this); 20472: return *this; 20472: } 20472: # 481 "/usr/include/c++/10/bits/std_function.h" 3 20472: void swap(function& __x) noexcept 20472: { 20472: std::swap(_M_functor, __x._M_functor); 20472: std::swap(_M_manager, __x._M_manager); 20472: std::swap(_M_invoker, __x._M_invoker); 20472: } 20472: # 498 "/usr/include/c++/10/bits/std_function.h" 3 20472: explicit operator bool() const noexcept 20472: { return !_M_empty(); } 20472: # 511 "/usr/include/c++/10/bits/std_function.h" 3 20472: _Res operator()(_ArgTypes... __args) const; 20472: # 524 "/usr/include/c++/10/bits/std_function.h" 3 20472: const type_info& target_type() const noexcept; 20472: # 537 "/usr/include/c++/10/bits/std_function.h" 3 20472: template _Functor* target() noexcept; 20472: 20472: template const _Functor* target() const noexcept; 20472: 20472: 20472: 20472: private: 20472: using _Invoker_type = _Res (*)(const _Any_data&, _ArgTypes&&...); 20472: _Invoker_type _M_invoker; 20472: }; 20472: # 586 "/usr/include/c++/10/bits/std_function.h" 3 20472: template 20472: function<_Res(_ArgTypes...)>:: 20472: function(const function& __x) 20472: : _Function_base() 20472: { 20472: if (static_cast(__x)) 20472: { 20472: __x._M_manager(_M_functor, __x._M_functor, __clone_functor); 20472: _M_invoker = __x._M_invoker; 20472: _M_manager = __x._M_manager; 20472: } 20472: } 20472: 20472: template 20472: template 20472: function<_Res(_ArgTypes...)>:: 20472: function(_Functor __f) 20472: : _Function_base() 20472: { 20472: typedef _Function_handler<_Res(_ArgTypes...), _Functor> _My_handler; 20472: 20472: if (_My_handler::_M_not_empty_function(__f)) 20472: { 20472: _My_handler::_M_init_functor(_M_functor, std::move(__f)); 20472: _M_invoker = &_My_handler::_M_invoke; 20472: _M_manager = &_My_handler::_M_manager; 20472: } 20472: } 20472: 20472: template 20472: _Res 20472: function<_Res(_ArgTypes...)>:: 20472: operator()(_ArgTypes... __args) const 20472: { 20472: if (_M_empty()) 20472: __throw_bad_function_call(); 20472: return _M_invoker(_M_functor, std::forward<_ArgTypes>(__args)...); 20472: } 20472: 20472: 20472: template 20472: const type_info& 20472: function<_Res(_ArgTypes...)>:: 20472: target_type() const noexcept 20472: { 20472: if (_M_manager) 20472: { 20472: _Any_data __typeinfo_result; 20472: _M_manager(__typeinfo_result, _M_functor, __get_type_info); 20472: return *__typeinfo_result._M_access(); 20472: } 20472: else 20472: return typeid(void); 20472: } 20472: 20472: template 20472: template 20472: _Functor* 20472: function<_Res(_ArgTypes...)>:: 20472: target() noexcept 20472: { 20472: const function* __const_this = this; 20472: const _Functor* __func = __const_this->template target<_Functor>(); 20472: return const_cast<_Functor*>(__func); 20472: } 20472: 20472: template 20472: template 20472: const _Functor* 20472: function<_Res(_ArgTypes...)>:: 20472: target() const noexcept 20472: { 20472: if (typeid(_Functor) == target_type() && _M_manager) 20472: { 20472: _Any_data __ptr; 20472: _M_manager(__ptr, _M_functor, __get_functor_ptr); 20472: return __ptr._M_access(); 20472: } 20472: else 20472: return nullptr; 20472: } 20472: # 678 "/usr/include/c++/10/bits/std_function.h" 3 20472: template 20472: inline bool 20472: operator==(const function<_Res(_Args...)>& __f, nullptr_t) noexcept 20472: { return !static_cast(__f); } 20472: 20472: 20472: 20472: template 20472: inline bool 20472: operator==(nullptr_t, const function<_Res(_Args...)>& __f) noexcept 20472: { return !static_cast(__f); } 20472: # 697 "/usr/include/c++/10/bits/std_function.h" 3 20472: template 20472: inline bool 20472: operator!=(const function<_Res(_Args...)>& __f, nullptr_t) noexcept 20472: { return static_cast(__f); } 20472: 20472: 20472: template 20472: inline bool 20472: operator!=(nullptr_t, const function<_Res(_Args...)>& __f) noexcept 20472: { return static_cast(__f); } 20472: # 718 "/usr/include/c++/10/bits/std_function.h" 3 20472: template 20472: inline void 20472: swap(function<_Res(_Args...)>& __x, function<_Res(_Args...)>& __y) noexcept 20472: { __x.swap(__y); } 20472: # 737 "/usr/include/c++/10/bits/std_function.h" 3 20472: 20472: } 20472: # 60 "/usr/include/c++/10/functional" 2 3 20472: # 72 "/usr/include/c++/10/functional" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: # 93 "/usr/include/c++/10/functional" 3 20472: template::value> 20472: class _Mem_fn_base 20472: : public _Mem_fn_traits<_MemFunPtr>::__maybe_type 20472: { 20472: using _Traits = _Mem_fn_traits<_MemFunPtr>; 20472: 20472: using _Arity = typename _Traits::__arity; 20472: using _Varargs = typename _Traits::__vararg; 20472: 20472: template 20472: friend struct _Bind_check_arity; 20472: 20472: _MemFunPtr _M_pmf; 20472: 20472: public: 20472: 20472: using result_type = typename _Traits::__result_type; 20472: 20472: explicit constexpr 20472: _Mem_fn_base(_MemFunPtr __pmf) noexcept : _M_pmf(__pmf) { } 20472: 20472: template 20472: 20472: auto 20472: operator()(_Args&&... __args) const 20472: noexcept(noexcept( 20472: std::__invoke(_M_pmf, std::forward<_Args>(__args)...))) 20472: -> decltype(std::__invoke(_M_pmf, std::forward<_Args>(__args)...)) 20472: { return std::__invoke(_M_pmf, std::forward<_Args>(__args)...); } 20472: }; 20472: 20472: 20472: template 20472: class _Mem_fn_base<_MemObjPtr, false> 20472: { 20472: using _Arity = integral_constant; 20472: using _Varargs = false_type; 20472: 20472: template 20472: friend struct _Bind_check_arity; 20472: 20472: _MemObjPtr _M_pm; 20472: 20472: public: 20472: explicit constexpr 20472: _Mem_fn_base(_MemObjPtr __pm) noexcept : _M_pm(__pm) { } 20472: 20472: template 20472: 20472: auto 20472: operator()(_Tp&& __obj) const 20472: noexcept(noexcept(std::__invoke(_M_pm, std::forward<_Tp>(__obj)))) 20472: -> decltype(std::__invoke(_M_pm, std::forward<_Tp>(__obj))) 20472: { return std::__invoke(_M_pm, std::forward<_Tp>(__obj)); } 20472: }; 20472: 20472: template 20472: struct _Mem_fn; 20472: 20472: template 20472: struct _Mem_fn<_Res _Class::*> 20472: : _Mem_fn_base<_Res _Class::*> 20472: { 20472: using _Mem_fn_base<_Res _Class::*>::_Mem_fn_base; 20472: }; 20472: # 167 "/usr/include/c++/10/functional" 3 20472: template 20472: 20472: inline _Mem_fn<_Tp _Class::*> 20472: mem_fn(_Tp _Class::* __pm) noexcept 20472: { 20472: return _Mem_fn<_Tp _Class::*>(__pm); 20472: } 20472: # 183 "/usr/include/c++/10/functional" 3 20472: template 20472: struct is_bind_expression 20472: : public false_type { }; 20472: # 194 "/usr/include/c++/10/functional" 3 20472: template 20472: struct is_placeholder 20472: : public integral_constant 20472: { }; 20472: # 209 "/usr/include/c++/10/functional" 3 20472: template struct _Placeholder { }; 20472: 20472: 20472: 20472: 20472: 20472: namespace placeholders 20472: { 20472: 20472: 20472: 20472: 20472: extern const _Placeholder<1> _1; 20472: extern const _Placeholder<2> _2; 20472: extern const _Placeholder<3> _3; 20472: extern const _Placeholder<4> _4; 20472: extern const _Placeholder<5> _5; 20472: extern const _Placeholder<6> _6; 20472: extern const _Placeholder<7> _7; 20472: extern const _Placeholder<8> _8; 20472: extern const _Placeholder<9> _9; 20472: extern const _Placeholder<10> _10; 20472: extern const _Placeholder<11> _11; 20472: extern const _Placeholder<12> _12; 20472: extern const _Placeholder<13> _13; 20472: extern const _Placeholder<14> _14; 20472: extern const _Placeholder<15> _15; 20472: extern const _Placeholder<16> _16; 20472: extern const _Placeholder<17> _17; 20472: extern const _Placeholder<18> _18; 20472: extern const _Placeholder<19> _19; 20472: extern const _Placeholder<20> _20; 20472: extern const _Placeholder<21> _21; 20472: extern const _Placeholder<22> _22; 20472: extern const _Placeholder<23> _23; 20472: extern const _Placeholder<24> _24; 20472: extern const _Placeholder<25> _25; 20472: extern const _Placeholder<26> _26; 20472: extern const _Placeholder<27> _27; 20472: extern const _Placeholder<28> _28; 20472: extern const _Placeholder<29> _29; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct is_placeholder<_Placeholder<_Num> > 20472: : public integral_constant 20472: { }; 20472: 20472: template 20472: struct is_placeholder > 20472: : public integral_constant 20472: { }; 20472: 20472: 20472: 20472: template 20472: using _Safe_tuple_element_t 20472: = typename enable_if<(__i < tuple_size<_Tuple>::value), 20472: tuple_element<__i, _Tuple>>::type::type; 20472: # 285 "/usr/include/c++/10/functional" 3 20472: template::value, 20472: bool _IsPlaceholder = (is_placeholder<_Arg>::value > 0)> 20472: class _Mu; 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: class _Mu, false, false> 20472: { 20472: public: 20472: 20472: 20472: 20472: 20472: template 20472: 20472: _Tp& 20472: operator()(_CVRef& __arg, _Tuple&) const volatile 20472: { return __arg.get(); } 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: class _Mu<_Arg, true, false> 20472: { 20472: public: 20472: template 20472: 20472: auto 20472: operator()(_CVArg& __arg, 20472: tuple<_Args...>& __tuple) const volatile 20472: -> decltype(__arg(declval<_Args>()...)) 20472: { 20472: 20472: typedef typename _Build_index_tuple::__type 20472: _Indexes; 20472: return this->__call(__arg, __tuple, _Indexes()); 20472: } 20472: 20472: private: 20472: 20472: 20472: template 20472: 20472: auto 20472: __call(_CVArg& __arg, tuple<_Args...>& __tuple, 20472: const _Index_tuple<_Indexes...>&) const volatile 20472: -> decltype(__arg(declval<_Args>()...)) 20472: { 20472: return __arg(std::get<_Indexes>(std::move(__tuple))...); 20472: } 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: class _Mu<_Arg, false, true> 20472: { 20472: public: 20472: template 20472: 20472: _Safe_tuple_element_t<(is_placeholder<_Arg>::value - 1), _Tuple>&& 20472: operator()(const volatile _Arg&, _Tuple& __tuple) const volatile 20472: { 20472: return 20472: ::std::get<(is_placeholder<_Arg>::value - 1)>(std::move(__tuple)); 20472: } 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: class _Mu<_Arg, false, false> 20472: { 20472: public: 20472: template 20472: 20472: _CVArg&& 20472: operator()(_CVArg&& __arg, _Tuple&) const volatile 20472: { return std::forward<_CVArg>(__arg); } 20472: }; 20472: 20472: 20472: template 20472: inline auto 20472: __volget(volatile tuple<_Tp...>& __tuple) 20472: -> __tuple_element_t<_Ind, tuple<_Tp...>> volatile& 20472: { return std::get<_Ind>(const_cast&>(__tuple)); } 20472: 20472: 20472: template 20472: inline auto 20472: __volget(const volatile tuple<_Tp...>& __tuple) 20472: -> __tuple_element_t<_Ind, tuple<_Tp...>> const volatile& 20472: { return std::get<_Ind>(const_cast&>(__tuple)); } 20472: 20472: 20472: template 20472: struct _Bind; 20472: 20472: template 20472: class _Bind<_Functor(_Bound_args...)> 20472: : public _Weak_result_type<_Functor> 20472: { 20472: typedef typename _Build_index_tuple::__type 20472: _Bound_indexes; 20472: 20472: _Functor _M_f; 20472: tuple<_Bound_args...> _M_bound_args; 20472: 20472: 20472: template 20472: 20472: _Result 20472: __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) 20472: { 20472: return std::__invoke(_M_f, 20472: _Mu<_Bound_args>()(std::get<_Indexes>(_M_bound_args), __args)... 20472: ); 20472: } 20472: 20472: 20472: template 20472: 20472: _Result 20472: __call_c(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) const 20472: { 20472: return std::__invoke(_M_f, 20472: _Mu<_Bound_args>()(std::get<_Indexes>(_M_bound_args), __args)... 20472: ); 20472: } 20472: 20472: 20472: template 20472: _Result 20472: __call_v(tuple<_Args...>&& __args, 20472: _Index_tuple<_Indexes...>) volatile 20472: { 20472: return std::__invoke(_M_f, 20472: _Mu<_Bound_args>()(__volget<_Indexes>(_M_bound_args), __args)... 20472: ); 20472: } 20472: 20472: 20472: template 20472: _Result 20472: __call_c_v(tuple<_Args...>&& __args, 20472: _Index_tuple<_Indexes...>) const volatile 20472: { 20472: return std::__invoke(_M_f, 20472: _Mu<_Bound_args>()(__volget<_Indexes>(_M_bound_args), __args)... 20472: ); 20472: } 20472: 20472: template 20472: using _Mu_type = decltype( 20472: _Mu::type>()( 20472: std::declval<_BoundArg&>(), std::declval<_CallArgs&>()) ); 20472: 20472: template 20472: using _Res_type_impl 20472: = typename result_of< _Fn&(_Mu_type<_BArgs, _CallArgs>&&...) >::type; 20472: 20472: template 20472: using _Res_type = _Res_type_impl<_Functor, _CallArgs, _Bound_args...>; 20472: 20472: template 20472: using __dependent = typename 20472: enable_if::value+1), _Functor>::type; 20472: 20472: template class __cv_quals> 20472: using _Res_type_cv = _Res_type_impl< 20472: typename __cv_quals<__dependent<_CallArgs>>::type, 20472: _CallArgs, 20472: typename __cv_quals<_Bound_args>::type...>; 20472: 20472: public: 20472: template 20472: explicit 20472: _Bind(const _Functor& __f, _Args&&... __args) 20472: : _M_f(__f), _M_bound_args(std::forward<_Args>(__args)...) 20472: { } 20472: 20472: template 20472: explicit 20472: _Bind(_Functor&& __f, _Args&&... __args) 20472: : _M_f(std::move(__f)), _M_bound_args(std::forward<_Args>(__args)...) 20472: { } 20472: 20472: _Bind(const _Bind&) = default; 20472: _Bind(_Bind&&) = default; 20472: 20472: 20472: template>> 20472: 20472: _Result 20472: operator()(_Args&&... __args) 20472: { 20472: return this->__call<_Result>( 20472: std::forward_as_tuple(std::forward<_Args>(__args)...), 20472: _Bound_indexes()); 20472: } 20472: 20472: 20472: template, add_const>> 20472: 20472: _Result 20472: operator()(_Args&&... __args) const 20472: { 20472: return this->__call_c<_Result>( 20472: std::forward_as_tuple(std::forward<_Args>(__args)...), 20472: _Bound_indexes()); 20472: } 20472: # 523 "/usr/include/c++/10/functional" 3 20472: template, add_volatile>> 20472: 20472: _Result 20472: operator()(_Args&&... __args) volatile 20472: { 20472: return this->__call_v<_Result>( 20472: std::forward_as_tuple(std::forward<_Args>(__args)...), 20472: _Bound_indexes()); 20472: } 20472: 20472: 20472: template, add_cv>> 20472: 20472: _Result 20472: operator()(_Args&&... __args) const volatile 20472: { 20472: return this->__call_c_v<_Result>( 20472: std::forward_as_tuple(std::forward<_Args>(__args)...), 20472: _Bound_indexes()); 20472: } 20472: }; 20472: 20472: 20472: template 20472: struct _Bind_result; 20472: 20472: template 20472: class _Bind_result<_Result, _Functor(_Bound_args...)> 20472: { 20472: typedef typename _Build_index_tuple::__type 20472: _Bound_indexes; 20472: 20472: _Functor _M_f; 20472: tuple<_Bound_args...> _M_bound_args; 20472: 20472: 20472: template 20472: 20472: _Res 20472: __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) 20472: { 20472: return std::__invoke_r<_Res>(_M_f, _Mu<_Bound_args>() 20472: (std::get<_Indexes>(_M_bound_args), __args)...); 20472: } 20472: 20472: 20472: template 20472: 20472: _Res 20472: __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) const 20472: { 20472: return std::__invoke_r<_Res>(_M_f, _Mu<_Bound_args>() 20472: (std::get<_Indexes>(_M_bound_args), __args)...); 20472: } 20472: 20472: 20472: template 20472: 20472: _Res 20472: __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) volatile 20472: { 20472: return std::__invoke_r<_Res>(_M_f, _Mu<_Bound_args>() 20472: (__volget<_Indexes>(_M_bound_args), __args)...); 20472: } 20472: 20472: 20472: template 20472: 20472: _Res 20472: __call(tuple<_Args...>&& __args, 20472: _Index_tuple<_Indexes...>) const volatile 20472: { 20472: return std::__invoke_r<_Res>(_M_f, _Mu<_Bound_args>() 20472: (__volget<_Indexes>(_M_bound_args), __args)...); 20472: } 20472: 20472: public: 20472: typedef _Result result_type; 20472: 20472: template 20472: explicit 20472: _Bind_result(const _Functor& __f, _Args&&... __args) 20472: : _M_f(__f), _M_bound_args(std::forward<_Args>(__args)...) 20472: { } 20472: 20472: template 20472: explicit 20472: _Bind_result(_Functor&& __f, _Args&&... __args) 20472: : _M_f(std::move(__f)), _M_bound_args(std::forward<_Args>(__args)...) 20472: { } 20472: 20472: _Bind_result(const _Bind_result&) = default; 20472: _Bind_result(_Bind_result&&) = default; 20472: 20472: 20472: template 20472: 20472: result_type 20472: operator()(_Args&&... __args) 20472: { 20472: return this->__call<_Result>( 20472: std::forward_as_tuple(std::forward<_Args>(__args)...), 20472: _Bound_indexes()); 20472: } 20472: 20472: 20472: template 20472: 20472: result_type 20472: operator()(_Args&&... __args) const 20472: { 20472: return this->__call<_Result>( 20472: std::forward_as_tuple(std::forward<_Args>(__args)...), 20472: _Bound_indexes()); 20472: } 20472: 20472: 20472: template 20472: 20472: result_type 20472: operator()(_Args&&... __args) volatile 20472: { 20472: return this->__call<_Result>( 20472: std::forward_as_tuple(std::forward<_Args>(__args)...), 20472: _Bound_indexes()); 20472: } 20472: 20472: 20472: template 20472: 20472: result_type 20472: operator()(_Args&&... __args) const volatile 20472: { 20472: return this->__call<_Result>( 20472: std::forward_as_tuple(std::forward<_Args>(__args)...), 20472: _Bound_indexes()); 20472: } 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct is_bind_expression<_Bind<_Signature> > 20472: : public true_type { }; 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct is_bind_expression > 20472: : public true_type { }; 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct is_bind_expression > 20472: : public true_type { }; 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct is_bind_expression> 20472: : public true_type { }; 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct is_bind_expression<_Bind_result<_Result, _Signature>> 20472: : public true_type { }; 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct is_bind_expression> 20472: : public true_type { }; 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct is_bind_expression> 20472: : public true_type { }; 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct is_bind_expression> 20472: : public true_type { }; 20472: 20472: template 20472: struct _Bind_check_arity { }; 20472: 20472: template 20472: struct _Bind_check_arity<_Ret (*)(_Args...), _BoundArgs...> 20472: { 20472: static_assert(sizeof...(_BoundArgs) == sizeof...(_Args), 20472: "Wrong number of arguments for function"); 20472: }; 20472: 20472: template 20472: struct _Bind_check_arity<_Ret (*)(_Args......), _BoundArgs...> 20472: { 20472: static_assert(sizeof...(_BoundArgs) >= sizeof...(_Args), 20472: "Wrong number of arguments for function"); 20472: }; 20472: 20472: template 20472: struct _Bind_check_arity<_Tp _Class::*, _BoundArgs...> 20472: { 20472: using _Arity = typename _Mem_fn<_Tp _Class::*>::_Arity; 20472: using _Varargs = typename _Mem_fn<_Tp _Class::*>::_Varargs; 20472: static_assert(_Varargs::value 20472: ? sizeof...(_BoundArgs) >= _Arity::value + 1 20472: : sizeof...(_BoundArgs) == _Arity::value + 1, 20472: "Wrong number of arguments for pointer-to-member"); 20472: }; 20472: 20472: 20472: 20472: 20472: template::type> 20472: using __is_socketlike = __or_, is_enum<_Tp2>>; 20472: 20472: template 20472: struct _Bind_helper 20472: : _Bind_check_arity::type, _BoundArgs...> 20472: { 20472: typedef typename decay<_Func>::type __func_type; 20472: typedef _Bind<__func_type(typename decay<_BoundArgs>::type...)> type; 20472: }; 20472: 20472: 20472: 20472: 20472: template 20472: struct _Bind_helper 20472: { }; 20472: 20472: 20472: 20472: 20472: 20472: template 20472: inline typename 20472: _Bind_helper<__is_socketlike<_Func>::value, _Func, _BoundArgs...>::type 20472: bind(_Func&& __f, _BoundArgs&&... __args) 20472: { 20472: typedef _Bind_helper __helper_type; 20472: return typename __helper_type::type(std::forward<_Func>(__f), 20472: std::forward<_BoundArgs>(__args)...); 20472: } 20472: 20472: template 20472: struct _Bindres_helper 20472: : _Bind_check_arity::type, _BoundArgs...> 20472: { 20472: typedef typename decay<_Func>::type __functor_type; 20472: typedef _Bind_result<_Result, 20472: __functor_type(typename decay<_BoundArgs>::type...)> 20472: type; 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: template 20472: inline 20472: typename _Bindres_helper<_Result, _Func, _BoundArgs...>::type 20472: bind(_Func&& __f, _BoundArgs&&... __args) 20472: { 20472: typedef _Bindres_helper<_Result, _Func, _BoundArgs...> __helper_type; 20472: return typename __helper_type::type(std::forward<_Func>(__f), 20472: std::forward<_BoundArgs>(__args)...); 20472: } 20472: # 1275 "/usr/include/c++/10/functional" 3 20472: 20472: } 20472: # 14 "./db/memtable.h" 2 20472: # 1 "/usr/include/c++/10/memory" 1 3 20472: # 47 "/usr/include/c++/10/memory" 3 20472: 20472: # 48 "/usr/include/c++/10/memory" 3 20472: # 67 "/usr/include/c++/10/memory" 3 20472: # 1 "/usr/include/c++/10/bits/stl_tempbuf.h" 1 3 20472: # 62 "/usr/include/c++/10/bits/stl_tempbuf.h" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: namespace __detail 20472: { 20472: template 20472: inline void 20472: __return_temporary_buffer(_Tp* __p, 20472: size_t __len __attribute__((__unused__))) 20472: { 20472: 20472: 20472: 20472: ::operator delete(__p); 20472: 20472: } 20472: } 20472: # 98 "/usr/include/c++/10/bits/stl_tempbuf.h" 3 20472: template 20472: pair<_Tp*, ptrdiff_t> 20472: get_temporary_buffer(ptrdiff_t __len) noexcept 20472: { 20472: const ptrdiff_t __max = 20472: __gnu_cxx::__numeric_traits::__max / sizeof(_Tp); 20472: if (__len > __max) 20472: __len = __max; 20472: 20472: while (__len > 0) 20472: { 20472: _Tp* __tmp = static_cast<_Tp*>(::operator new(__len * sizeof(_Tp), 20472: std::nothrow)); 20472: if (__tmp != 0) 20472: return std::pair<_Tp*, ptrdiff_t>(__tmp, __len); 20472: __len /= 2; 20472: } 20472: return std::pair<_Tp*, ptrdiff_t>(static_cast<_Tp*>(0), 0); 20472: } 20472: # 125 "/usr/include/c++/10/bits/stl_tempbuf.h" 3 20472: template 20472: inline void 20472: return_temporary_buffer(_Tp* __p) 20472: { ::operator delete(__p); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: class _Temporary_buffer 20472: { 20472: 20472: 20472: 20472: public: 20472: typedef _Tp value_type; 20472: typedef value_type* pointer; 20472: typedef pointer iterator; 20472: typedef ptrdiff_t size_type; 20472: 20472: protected: 20472: size_type _M_original_len; 20472: size_type _M_len; 20472: pointer _M_buffer; 20472: 20472: public: 20472: 20472: size_type 20472: size() const 20472: { return _M_len; } 20472: 20472: 20472: size_type 20472: requested_size() const 20472: { return _M_original_len; } 20472: 20472: 20472: iterator 20472: begin() 20472: { return _M_buffer; } 20472: 20472: 20472: iterator 20472: end() 20472: { return _M_buffer + _M_len; } 20472: 20472: 20472: 20472: 20472: 20472: _Temporary_buffer(_ForwardIterator __seed, size_type __original_len); 20472: 20472: ~_Temporary_buffer() 20472: { 20472: std::_Destroy(_M_buffer, _M_buffer + _M_len); 20472: std::__detail::__return_temporary_buffer(_M_buffer, _M_len); 20472: } 20472: 20472: private: 20472: 20472: _Temporary_buffer(const _Temporary_buffer&); 20472: 20472: void 20472: operator=(const _Temporary_buffer&); 20472: }; 20472: 20472: 20472: template 20472: struct __uninitialized_construct_buf_dispatch 20472: { 20472: template 20472: static void 20472: __ucr(_Pointer __first, _Pointer __last, 20472: _ForwardIterator __seed) 20472: { 20472: if (__first == __last) 20472: return; 20472: 20472: _Pointer __cur = __first; 20472: try 20472: { 20472: std::_Construct(std::__addressof(*__first), 20472: std::move(*__seed)); 20472: _Pointer __prev = __cur; 20472: ++__cur; 20472: for(; __cur != __last; ++__cur, ++__prev) 20472: std::_Construct(std::__addressof(*__cur), 20472: std::move(*__prev)); 20472: *__seed = std::move(*__prev); 20472: } 20472: catch(...) 20472: { 20472: std::_Destroy(__first, __cur); 20472: throw; 20472: } 20472: } 20472: }; 20472: 20472: template<> 20472: struct __uninitialized_construct_buf_dispatch 20472: { 20472: template 20472: static void 20472: __ucr(_Pointer, _Pointer, _ForwardIterator) { } 20472: }; 20472: # 243 "/usr/include/c++/10/bits/stl_tempbuf.h" 3 20472: template 20472: inline void 20472: __uninitialized_construct_buf(_Pointer __first, _Pointer __last, 20472: _ForwardIterator __seed) 20472: { 20472: typedef typename std::iterator_traits<_Pointer>::value_type 20472: _ValueType; 20472: 20472: std::__uninitialized_construct_buf_dispatch< 20472: __has_trivial_constructor(_ValueType)>:: 20472: __ucr(__first, __last, __seed); 20472: } 20472: 20472: template 20472: _Temporary_buffer<_ForwardIterator, _Tp>:: 20472: _Temporary_buffer(_ForwardIterator __seed, size_type __original_len) 20472: : _M_original_len(__original_len), _M_len(0), _M_buffer(0) 20472: { 20472: std::pair __p( 20472: std::get_temporary_buffer(_M_original_len)); 20472: 20472: if (__p.first) 20472: { 20472: try 20472: { 20472: std::__uninitialized_construct_buf(__p.first, __p.first + __p.second, 20472: __seed); 20472: _M_buffer = __p.first; 20472: _M_len = __p.second; 20472: } 20472: catch(...) 20472: { 20472: std::__detail::__return_temporary_buffer(__p.first, __p.second); 20472: throw; 20472: } 20472: } 20472: } 20472: 20472: 20472: } 20472: # 68 "/usr/include/c++/10/memory" 2 3 20472: # 1 "/usr/include/c++/10/bits/stl_raw_storage_iter.h" 1 3 20472: # 59 "/usr/include/c++/10/bits/stl_raw_storage_iter.h" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: class raw_storage_iterator 20472: : public iterator 20472: { 20472: protected: 20472: _OutputIterator _M_iter; 20472: 20472: public: 20472: explicit 20472: raw_storage_iterator(_OutputIterator __x) 20472: : _M_iter(__x) {} 20472: 20472: raw_storage_iterator& 20472: operator*() { return *this; } 20472: 20472: raw_storage_iterator& 20472: operator=(const _Tp& __element) 20472: { 20472: std::_Construct(std::__addressof(*_M_iter), __element); 20472: return *this; 20472: } 20472: 20472: 20472: 20472: 20472: raw_storage_iterator& 20472: operator=(_Tp&& __element) 20472: { 20472: std::_Construct(std::__addressof(*_M_iter), std::move(__element)); 20472: return *this; 20472: } 20472: 20472: 20472: raw_storage_iterator& 20472: operator++() 20472: { 20472: ++_M_iter; 20472: return *this; 20472: } 20472: 20472: raw_storage_iterator 20472: operator++(int) 20472: { 20472: raw_storage_iterator __tmp = *this; 20472: ++_M_iter; 20472: return __tmp; 20472: } 20472: 20472: 20472: 20472: _OutputIterator base() const { return _M_iter; } 20472: }; 20472: 20472: 20472: } 20472: # 69 "/usr/include/c++/10/memory" 2 3 20472: # 1 "/usr/include/c++/10/bits/ranges_uninitialized.h" 1 3 20472: # 70 "/usr/include/c++/10/memory" 2 3 20472: 20472: 20472: 20472: 20472: # 1 "/usr/include/c++/10/iosfwd" 1 3 20472: # 36 "/usr/include/c++/10/iosfwd" 3 20472: 20472: # 37 "/usr/include/c++/10/iosfwd" 3 20472: 20472: 20472: # 1 "/usr/include/c++/10/bits/stringfwd.h" 1 3 20472: # 37 "/usr/include/c++/10/bits/stringfwd.h" 3 20472: 20472: # 38 "/usr/include/c++/10/bits/stringfwd.h" 3 20472: 20472: 20472: 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct char_traits; 20472: 20472: template<> struct char_traits; 20472: 20472: 20472: template<> struct char_traits; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template<> struct char_traits; 20472: template<> struct char_traits; 20472: 20472: 20472: namespace __cxx11 { 20472: 20472: template, 20472: typename _Alloc = allocator<_CharT> > 20472: class basic_string; 20472: 20472: } 20472: 20472: 20472: typedef basic_string string; 20472: 20472: 20472: 20472: typedef basic_string wstring; 20472: # 93 "/usr/include/c++/10/bits/stringfwd.h" 3 20472: typedef basic_string u16string; 20472: 20472: 20472: typedef basic_string u32string; 20472: 20472: 20472: 20472: 20472: 20472: } 20472: # 40 "/usr/include/c++/10/iosfwd" 2 3 20472: # 1 "/usr/include/c++/10/bits/postypes.h" 1 3 20472: # 38 "/usr/include/c++/10/bits/postypes.h" 3 20472: 20472: # 39 "/usr/include/c++/10/bits/postypes.h" 3 20472: 20472: # 1 "/usr/include/c++/10/cwchar" 1 3 20472: # 39 "/usr/include/c++/10/cwchar" 3 20472: 20472: # 40 "/usr/include/c++/10/cwchar" 3 20472: 20472: 20472: 20472: 20472: # 1 "/usr/include/wchar.h" 1 3 4 20472: # 27 "/usr/include/wchar.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/libc-header-start.h" 1 3 4 20472: # 28 "/usr/include/wchar.h" 2 3 4 20472: 20472: 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/floatn.h" 1 3 4 20472: # 52 "/usr/include/arm-linux-gnueabihf/bits/floatn.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/floatn-common.h" 1 3 4 20472: # 24 "/usr/include/arm-linux-gnueabihf/bits/floatn-common.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/long-double.h" 1 3 4 20472: # 25 "/usr/include/arm-linux-gnueabihf/bits/floatn-common.h" 2 3 4 20472: # 214 "/usr/include/arm-linux-gnueabihf/bits/floatn-common.h" 3 4 20472: typedef float _Float32; 20472: # 238 "/usr/include/arm-linux-gnueabihf/bits/floatn-common.h" 3 4 20472: typedef long double _Float64; 20472: # 268 "/usr/include/arm-linux-gnueabihf/bits/floatn-common.h" 3 4 20472: typedef double _Float32x; 20472: # 53 "/usr/include/arm-linux-gnueabihf/bits/floatn.h" 2 3 4 20472: # 31 "/usr/include/wchar.h" 2 3 4 20472: 20472: 20472: 20472: 20472: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/10/include/stddef.h" 1 3 4 20472: # 36 "/usr/include/wchar.h" 2 3 4 20472: 20472: 20472: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/10/include/stdarg.h" 1 3 4 20472: # 40 "/usr/lib/gcc/arm-linux-gnueabihf/10/include/stdarg.h" 3 4 20472: typedef __builtin_va_list __gnuc_va_list; 20472: # 39 "/usr/include/wchar.h" 2 3 4 20472: 20472: 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/types/wint_t.h" 1 3 4 20472: # 20 "/usr/include/arm-linux-gnueabihf/bits/types/wint_t.h" 3 4 20472: typedef unsigned int wint_t; 20472: # 42 "/usr/include/wchar.h" 2 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/types/mbstate_t.h" 1 3 4 20472: 20472: 20472: 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/types/__mbstate_t.h" 1 3 4 20472: # 13 "/usr/include/arm-linux-gnueabihf/bits/types/__mbstate_t.h" 3 4 20472: typedef struct 20472: { 20472: int __count; 20472: union 20472: { 20472: unsigned int __wch; 20472: char __wchb[4]; 20472: } __value; 20472: } __mbstate_t; 20472: # 5 "/usr/include/arm-linux-gnueabihf/bits/types/mbstate_t.h" 2 3 4 20472: 20472: typedef __mbstate_t mbstate_t; 20472: # 43 "/usr/include/wchar.h" 2 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/types/__FILE.h" 1 3 4 20472: 20472: 20472: 20472: struct _IO_FILE; 20472: typedef struct _IO_FILE __FILE; 20472: # 44 "/usr/include/wchar.h" 2 3 4 20472: 20472: 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/types/FILE.h" 1 3 4 20472: 20472: 20472: 20472: struct _IO_FILE; 20472: 20472: 20472: typedef struct _IO_FILE FILE; 20472: # 47 "/usr/include/wchar.h" 2 3 4 20472: 20472: 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/types/locale_t.h" 1 3 4 20472: # 22 "/usr/include/arm-linux-gnueabihf/bits/types/locale_t.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/types/__locale_t.h" 1 3 4 20472: # 28 "/usr/include/arm-linux-gnueabihf/bits/types/__locale_t.h" 3 4 20472: struct __locale_struct 20472: { 20472: 20472: struct __locale_data *__locales[13]; 20472: 20472: 20472: const unsigned short int *__ctype_b; 20472: const int *__ctype_tolower; 20472: const int *__ctype_toupper; 20472: 20472: 20472: const char *__names[13]; 20472: }; 20472: 20472: typedef struct __locale_struct *__locale_t; 20472: # 23 "/usr/include/arm-linux-gnueabihf/bits/types/locale_t.h" 2 3 4 20472: 20472: typedef __locale_t locale_t; 20472: # 50 "/usr/include/wchar.h" 2 3 4 20472: # 79 "/usr/include/wchar.h" 3 4 20472: extern "C" { 20472: 20472: 20472: 20472: struct tm; 20472: 20472: 20472: 20472: extern wchar_t *wcscpy (wchar_t *__restrict __dest, 20472: const wchar_t *__restrict __src) 20472: throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: extern wchar_t *wcsncpy (wchar_t *__restrict __dest, 20472: const wchar_t *__restrict __src, size_t __n) 20472: throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: extern wchar_t *wcscat (wchar_t *__restrict __dest, 20472: const wchar_t *__restrict __src) 20472: throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: extern wchar_t *wcsncat (wchar_t *__restrict __dest, 20472: const wchar_t *__restrict __src, size_t __n) 20472: throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: extern int wcscmp (const wchar_t *__s1, const wchar_t *__s2) 20472: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: extern int wcsncmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) 20472: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: 20472: extern int wcscasecmp (const wchar_t *__s1, const wchar_t *__s2) throw (); 20472: 20472: 20472: extern int wcsncasecmp (const wchar_t *__s1, const wchar_t *__s2, 20472: size_t __n) throw (); 20472: 20472: 20472: 20472: extern int wcscasecmp_l (const wchar_t *__s1, const wchar_t *__s2, 20472: locale_t __loc) throw (); 20472: 20472: extern int wcsncasecmp_l (const wchar_t *__s1, const wchar_t *__s2, 20472: size_t __n, locale_t __loc) throw (); 20472: 20472: 20472: 20472: 20472: extern int wcscoll (const wchar_t *__s1, const wchar_t *__s2) throw (); 20472: 20472: 20472: 20472: extern size_t wcsxfrm (wchar_t *__restrict __s1, 20472: const wchar_t *__restrict __s2, size_t __n) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int wcscoll_l (const wchar_t *__s1, const wchar_t *__s2, 20472: locale_t __loc) throw (); 20472: 20472: 20472: 20472: 20472: extern size_t wcsxfrm_l (wchar_t *__s1, const wchar_t *__s2, 20472: size_t __n, locale_t __loc) throw (); 20472: 20472: 20472: extern wchar_t *wcsdup (const wchar_t *__s) throw () __attribute__ ((__malloc__)); 20472: 20472: 20472: 20472: 20472: extern "C++" wchar_t *wcschr (wchar_t *__wcs, wchar_t __wc) 20472: throw () __asm ("wcschr") __attribute__ ((__pure__)); 20472: extern "C++" const wchar_t *wcschr (const wchar_t *__wcs, wchar_t __wc) 20472: throw () __asm ("wcschr") __attribute__ ((__pure__)); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern "C++" wchar_t *wcsrchr (wchar_t *__wcs, wchar_t __wc) 20472: throw () __asm ("wcsrchr") __attribute__ ((__pure__)); 20472: extern "C++" const wchar_t *wcsrchr (const wchar_t *__wcs, wchar_t __wc) 20472: throw () __asm ("wcsrchr") __attribute__ ((__pure__)); 20472: # 181 "/usr/include/wchar.h" 3 4 20472: extern wchar_t *wcschrnul (const wchar_t *__s, wchar_t __wc) 20472: throw () __attribute__ ((__pure__)); 20472: 20472: 20472: 20472: 20472: extern size_t wcscspn (const wchar_t *__wcs, const wchar_t *__reject) 20472: throw () __attribute__ ((__pure__)); 20472: 20472: 20472: extern size_t wcsspn (const wchar_t *__wcs, const wchar_t *__accept) 20472: throw () __attribute__ ((__pure__)); 20472: 20472: 20472: extern "C++" wchar_t *wcspbrk (wchar_t *__wcs, const wchar_t *__accept) 20472: throw () __asm ("wcspbrk") __attribute__ ((__pure__)); 20472: extern "C++" const wchar_t *wcspbrk (const wchar_t *__wcs, 20472: const wchar_t *__accept) 20472: throw () __asm ("wcspbrk") __attribute__ ((__pure__)); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern "C++" wchar_t *wcsstr (wchar_t *__haystack, const wchar_t *__needle) 20472: throw () __asm ("wcsstr") __attribute__ ((__pure__)); 20472: extern "C++" const wchar_t *wcsstr (const wchar_t *__haystack, 20472: const wchar_t *__needle) 20472: throw () __asm ("wcsstr") __attribute__ ((__pure__)); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern wchar_t *wcstok (wchar_t *__restrict __s, 20472: const wchar_t *__restrict __delim, 20472: wchar_t **__restrict __ptr) throw (); 20472: 20472: 20472: extern size_t wcslen (const wchar_t *__s) throw () __attribute__ ((__pure__)); 20472: 20472: 20472: 20472: 20472: extern "C++" wchar_t *wcswcs (wchar_t *__haystack, const wchar_t *__needle) 20472: throw () __asm ("wcswcs") __attribute__ ((__pure__)); 20472: extern "C++" const wchar_t *wcswcs (const wchar_t *__haystack, 20472: const wchar_t *__needle) 20472: throw () __asm ("wcswcs") __attribute__ ((__pure__)); 20472: # 240 "/usr/include/wchar.h" 3 4 20472: extern size_t wcsnlen (const wchar_t *__s, size_t __maxlen) 20472: throw () __attribute__ ((__pure__)); 20472: 20472: 20472: 20472: 20472: 20472: extern "C++" wchar_t *wmemchr (wchar_t *__s, wchar_t __c, size_t __n) 20472: throw () __asm ("wmemchr") __attribute__ ((__pure__)); 20472: extern "C++" const wchar_t *wmemchr (const wchar_t *__s, wchar_t __c, 20472: size_t __n) 20472: throw () __asm ("wmemchr") __attribute__ ((__pure__)); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int wmemcmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) 20472: throw () __attribute__ ((__pure__)); 20472: 20472: 20472: extern wchar_t *wmemcpy (wchar_t *__restrict __s1, 20472: const wchar_t *__restrict __s2, size_t __n) throw (); 20472: 20472: 20472: 20472: extern wchar_t *wmemmove (wchar_t *__s1, const wchar_t *__s2, size_t __n) 20472: throw (); 20472: 20472: 20472: extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) throw (); 20472: 20472: 20472: 20472: 20472: extern wchar_t *wmempcpy (wchar_t *__restrict __s1, 20472: const wchar_t *__restrict __s2, size_t __n) 20472: throw (); 20472: 20472: 20472: 20472: 20472: 20472: extern wint_t btowc (int __c) throw (); 20472: 20472: 20472: 20472: extern int wctob (wint_t __c) throw (); 20472: 20472: 20472: 20472: extern int mbsinit (const mbstate_t *__ps) throw () __attribute__ ((__pure__)); 20472: 20472: 20472: 20472: extern size_t mbrtowc (wchar_t *__restrict __pwc, 20472: const char *__restrict __s, size_t __n, 20472: mbstate_t *__restrict __p) throw (); 20472: 20472: 20472: extern size_t wcrtomb (char *__restrict __s, wchar_t __wc, 20472: mbstate_t *__restrict __ps) throw (); 20472: 20472: 20472: extern size_t __mbrlen (const char *__restrict __s, size_t __n, 20472: mbstate_t *__restrict __ps) throw (); 20472: extern size_t mbrlen (const char *__restrict __s, size_t __n, 20472: mbstate_t *__restrict __ps) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern wint_t __btowc_alias (int __c) __asm ("btowc"); 20472: extern __inline __attribute__ ((__gnu_inline__)) wint_t 20472: __attribute__ ((__leaf__)) btowc (int __c) throw () 20472: { return (__builtin_constant_p (__c) && __c >= '\0' && __c <= '\x7f' 20472: ? (wint_t) __c : __btowc_alias (__c)); } 20472: 20472: extern int __wctob_alias (wint_t __c) __asm ("wctob"); 20472: extern __inline __attribute__ ((__gnu_inline__)) int 20472: __attribute__ ((__leaf__)) wctob (wint_t __wc) throw () 20472: { return (__builtin_constant_p (__wc) && __wc >= L'\0' && __wc <= L'\x7f' 20472: ? (int) __wc : __wctob_alias (__wc)); } 20472: 20472: extern __inline __attribute__ ((__gnu_inline__)) size_t 20472: __attribute__ ((__leaf__)) mbrlen (const char *__restrict __s, size_t __n, mbstate_t *__restrict __ps) throw () 20472: 20472: { return (__ps != __null 20472: ? mbrtowc (__null, __s, __n, __ps) : __mbrlen (__s, __n, __null)); } 20472: 20472: 20472: 20472: 20472: extern size_t mbsrtowcs (wchar_t *__restrict __dst, 20472: const char **__restrict __src, size_t __len, 20472: mbstate_t *__restrict __ps) throw (); 20472: 20472: 20472: 20472: extern size_t wcsrtombs (char *__restrict __dst, 20472: const wchar_t **__restrict __src, size_t __len, 20472: mbstate_t *__restrict __ps) throw (); 20472: 20472: 20472: 20472: 20472: 20472: extern size_t mbsnrtowcs (wchar_t *__restrict __dst, 20472: const char **__restrict __src, size_t __nmc, 20472: size_t __len, mbstate_t *__restrict __ps) throw (); 20472: 20472: 20472: 20472: extern size_t wcsnrtombs (char *__restrict __dst, 20472: const wchar_t **__restrict __src, 20472: size_t __nwc, size_t __len, 20472: mbstate_t *__restrict __ps) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int wcwidth (wchar_t __c) throw (); 20472: 20472: 20472: 20472: extern int wcswidth (const wchar_t *__s, size_t __n) throw (); 20472: 20472: 20472: 20472: 20472: 20472: extern double wcstod (const wchar_t *__restrict __nptr, 20472: wchar_t **__restrict __endptr) throw (); 20472: 20472: 20472: 20472: extern float wcstof (const wchar_t *__restrict __nptr, 20472: wchar_t **__restrict __endptr) throw (); 20472: extern long double wcstold (const wchar_t *__restrict __nptr, 20472: wchar_t **__restrict __endptr) throw (); 20472: # 396 "/usr/include/wchar.h" 3 4 20472: extern _Float32 wcstof32 (const wchar_t *__restrict __nptr, 20472: wchar_t **__restrict __endptr) throw (); 20472: 20472: 20472: 20472: extern _Float64 wcstof64 (const wchar_t *__restrict __nptr, 20472: wchar_t **__restrict __endptr) throw (); 20472: # 411 "/usr/include/wchar.h" 3 4 20472: extern _Float32x wcstof32x (const wchar_t *__restrict __nptr, 20472: wchar_t **__restrict __endptr) throw (); 20472: # 428 "/usr/include/wchar.h" 3 4 20472: extern long int wcstol (const wchar_t *__restrict __nptr, 20472: wchar_t **__restrict __endptr, int __base) throw (); 20472: 20472: 20472: 20472: extern unsigned long int wcstoul (const wchar_t *__restrict __nptr, 20472: wchar_t **__restrict __endptr, int __base) 20472: throw (); 20472: 20472: 20472: 20472: 20472: __extension__ 20472: extern long long int wcstoll (const wchar_t *__restrict __nptr, 20472: wchar_t **__restrict __endptr, int __base) 20472: throw (); 20472: 20472: 20472: 20472: __extension__ 20472: extern unsigned long long int wcstoull (const wchar_t *__restrict __nptr, 20472: wchar_t **__restrict __endptr, 20472: int __base) throw (); 20472: 20472: 20472: 20472: 20472: 20472: __extension__ 20472: extern long long int wcstoq (const wchar_t *__restrict __nptr, 20472: wchar_t **__restrict __endptr, int __base) 20472: throw (); 20472: 20472: 20472: 20472: __extension__ 20472: extern unsigned long long int wcstouq (const wchar_t *__restrict __nptr, 20472: wchar_t **__restrict __endptr, 20472: int __base) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern long int wcstol_l (const wchar_t *__restrict __nptr, 20472: wchar_t **__restrict __endptr, int __base, 20472: locale_t __loc) throw (); 20472: 20472: extern unsigned long int wcstoul_l (const wchar_t *__restrict __nptr, 20472: wchar_t **__restrict __endptr, 20472: int __base, locale_t __loc) throw (); 20472: 20472: __extension__ 20472: extern long long int wcstoll_l (const wchar_t *__restrict __nptr, 20472: wchar_t **__restrict __endptr, 20472: int __base, locale_t __loc) throw (); 20472: 20472: __extension__ 20472: extern unsigned long long int wcstoull_l (const wchar_t *__restrict __nptr, 20472: wchar_t **__restrict __endptr, 20472: int __base, locale_t __loc) 20472: throw (); 20472: 20472: extern double wcstod_l (const wchar_t *__restrict __nptr, 20472: wchar_t **__restrict __endptr, locale_t __loc) 20472: throw (); 20472: 20472: extern float wcstof_l (const wchar_t *__restrict __nptr, 20472: wchar_t **__restrict __endptr, locale_t __loc) 20472: throw (); 20472: 20472: extern long double wcstold_l (const wchar_t *__restrict __nptr, 20472: wchar_t **__restrict __endptr, 20472: locale_t __loc) throw (); 20472: # 511 "/usr/include/wchar.h" 3 4 20472: extern _Float32 wcstof32_l (const wchar_t *__restrict __nptr, 20472: wchar_t **__restrict __endptr, 20472: locale_t __loc) throw (); 20472: 20472: 20472: 20472: extern _Float64 wcstof64_l (const wchar_t *__restrict __nptr, 20472: wchar_t **__restrict __endptr, 20472: locale_t __loc) throw (); 20472: # 529 "/usr/include/wchar.h" 3 4 20472: extern _Float32x wcstof32x_l (const wchar_t *__restrict __nptr, 20472: wchar_t **__restrict __endptr, 20472: locale_t __loc) throw (); 20472: # 551 "/usr/include/wchar.h" 3 4 20472: extern wchar_t *wcpcpy (wchar_t *__restrict __dest, 20472: const wchar_t *__restrict __src) throw (); 20472: 20472: 20472: 20472: extern wchar_t *wcpncpy (wchar_t *__restrict __dest, 20472: const wchar_t *__restrict __src, size_t __n) 20472: throw (); 20472: # 567 "/usr/include/wchar.h" 3 4 20472: extern __FILE *open_wmemstream (wchar_t **__bufloc, size_t *__sizeloc) throw (); 20472: 20472: 20472: 20472: 20472: 20472: extern int fwide (__FILE *__fp, int __mode) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int fwprintf (__FILE *__restrict __stream, 20472: const wchar_t *__restrict __format, ...) 20472: ; 20472: 20472: 20472: 20472: 20472: extern int wprintf (const wchar_t *__restrict __format, ...) 20472: ; 20472: 20472: extern int swprintf (wchar_t *__restrict __s, size_t __n, 20472: const wchar_t *__restrict __format, ...) 20472: throw () ; 20472: 20472: 20472: 20472: 20472: 20472: extern int vfwprintf (__FILE *__restrict __s, 20472: const wchar_t *__restrict __format, 20472: __gnuc_va_list __arg) 20472: ; 20472: 20472: 20472: 20472: 20472: extern int vwprintf (const wchar_t *__restrict __format, 20472: __gnuc_va_list __arg) 20472: ; 20472: 20472: 20472: extern int vswprintf (wchar_t *__restrict __s, size_t __n, 20472: const wchar_t *__restrict __format, 20472: __gnuc_va_list __arg) 20472: throw () ; 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int fwscanf (__FILE *__restrict __stream, 20472: const wchar_t *__restrict __format, ...) 20472: ; 20472: 20472: 20472: 20472: 20472: extern int wscanf (const wchar_t *__restrict __format, ...) 20472: ; 20472: 20472: extern int swscanf (const wchar_t *__restrict __s, 20472: const wchar_t *__restrict __format, ...) 20472: throw () ; 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int fwscanf (__FILE *__restrict __stream, const wchar_t *__restrict __format, ...) __asm__ ("" "__isoc99_fwscanf") 20472: 20472: 20472: ; 20472: extern int wscanf (const wchar_t *__restrict __format, ...) __asm__ ("" "__isoc99_wscanf") 20472: 20472: ; 20472: extern int swscanf (const wchar_t *__restrict __s, const wchar_t *__restrict __format, ...) throw () __asm__ ("" "__isoc99_swscanf") 20472: 20472: 20472: ; 20472: # 671 "/usr/include/wchar.h" 3 4 20472: extern int vfwscanf (__FILE *__restrict __s, 20472: const wchar_t *__restrict __format, 20472: __gnuc_va_list __arg) 20472: ; 20472: 20472: 20472: 20472: 20472: extern int vwscanf (const wchar_t *__restrict __format, 20472: __gnuc_va_list __arg) 20472: ; 20472: 20472: extern int vswscanf (const wchar_t *__restrict __s, 20472: const wchar_t *__restrict __format, 20472: __gnuc_va_list __arg) 20472: throw () ; 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int vfwscanf (__FILE *__restrict __s, const wchar_t *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vfwscanf") 20472: 20472: 20472: ; 20472: extern int vwscanf (const wchar_t *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vwscanf") 20472: 20472: ; 20472: extern int vswscanf (const wchar_t *__restrict __s, const wchar_t *__restrict __format, __gnuc_va_list __arg) throw () __asm__ ("" "__isoc99_vswscanf") 20472: 20472: 20472: ; 20472: # 726 "/usr/include/wchar.h" 3 4 20472: extern wint_t fgetwc (__FILE *__stream); 20472: extern wint_t getwc (__FILE *__stream); 20472: 20472: 20472: 20472: 20472: 20472: extern wint_t getwchar (void); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern wint_t fputwc (wchar_t __wc, __FILE *__stream); 20472: extern wint_t putwc (wchar_t __wc, __FILE *__stream); 20472: 20472: 20472: 20472: 20472: 20472: extern wint_t putwchar (wchar_t __wc); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern wchar_t *fgetws (wchar_t *__restrict __ws, int __n, 20472: __FILE *__restrict __stream); 20472: 20472: 20472: 20472: 20472: 20472: extern int fputws (const wchar_t *__restrict __ws, 20472: __FILE *__restrict __stream); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern wint_t ungetwc (wint_t __wc, __FILE *__stream); 20472: # 781 "/usr/include/wchar.h" 3 4 20472: extern wint_t getwc_unlocked (__FILE *__stream); 20472: extern wint_t getwchar_unlocked (void); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern wint_t fgetwc_unlocked (__FILE *__stream); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern wint_t fputwc_unlocked (wchar_t __wc, __FILE *__stream); 20472: # 807 "/usr/include/wchar.h" 3 4 20472: extern wint_t putwc_unlocked (wchar_t __wc, __FILE *__stream); 20472: extern wint_t putwchar_unlocked (wchar_t __wc); 20472: # 817 "/usr/include/wchar.h" 3 4 20472: extern wchar_t *fgetws_unlocked (wchar_t *__restrict __ws, int __n, 20472: __FILE *__restrict __stream); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int fputws_unlocked (const wchar_t *__restrict __ws, 20472: __FILE *__restrict __stream); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern size_t wcsftime (wchar_t *__restrict __s, size_t __maxsize, 20472: const wchar_t *__restrict __format, 20472: const struct tm *__restrict __tp) throw (); 20472: 20472: 20472: 20472: 20472: extern size_t wcsftime_l (wchar_t *__restrict __s, size_t __maxsize, 20472: const wchar_t *__restrict __format, 20472: const struct tm *__restrict __tp, 20472: locale_t __loc) throw (); 20472: # 856 "/usr/include/wchar.h" 3 4 20472: } 20472: # 45 "/usr/include/c++/10/cwchar" 2 3 20472: # 62 "/usr/include/c++/10/cwchar" 3 20472: namespace std 20472: { 20472: using ::mbstate_t; 20472: } 20472: # 135 "/usr/include/c++/10/cwchar" 3 20472: extern "C++" 20472: { 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: using ::wint_t; 20472: 20472: using ::btowc; 20472: using ::fgetwc; 20472: using ::fgetws; 20472: using ::fputwc; 20472: using ::fputws; 20472: using ::fwide; 20472: using ::fwprintf; 20472: using ::fwscanf; 20472: using ::getwc; 20472: using ::getwchar; 20472: using ::mbrlen; 20472: using ::mbrtowc; 20472: using ::mbsinit; 20472: using ::mbsrtowcs; 20472: using ::putwc; 20472: using ::putwchar; 20472: 20472: using ::swprintf; 20472: 20472: using ::swscanf; 20472: using ::ungetwc; 20472: using ::vfwprintf; 20472: 20472: using ::vfwscanf; 20472: 20472: 20472: using ::vswprintf; 20472: 20472: 20472: using ::vswscanf; 20472: 20472: using ::vwprintf; 20472: 20472: using ::vwscanf; 20472: 20472: using ::wcrtomb; 20472: using ::wcscat; 20472: using ::wcscmp; 20472: using ::wcscoll; 20472: using ::wcscpy; 20472: using ::wcscspn; 20472: using ::wcsftime; 20472: using ::wcslen; 20472: using ::wcsncat; 20472: using ::wcsncmp; 20472: using ::wcsncpy; 20472: using ::wcsrtombs; 20472: using ::wcsspn; 20472: using ::wcstod; 20472: 20472: using ::wcstof; 20472: 20472: using ::wcstok; 20472: using ::wcstol; 20472: using ::wcstoul; 20472: using ::wcsxfrm; 20472: using ::wctob; 20472: using ::wmemcmp; 20472: using ::wmemcpy; 20472: using ::wmemmove; 20472: using ::wmemset; 20472: using ::wprintf; 20472: using ::wscanf; 20472: using ::wcschr; 20472: using ::wcspbrk; 20472: using ::wcsrchr; 20472: using ::wcsstr; 20472: using ::wmemchr; 20472: # 234 "/usr/include/c++/10/cwchar" 3 20472: 20472: } 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: namespace __gnu_cxx 20472: { 20472: 20472: 20472: 20472: 20472: 20472: using ::wcstold; 20472: # 260 "/usr/include/c++/10/cwchar" 3 20472: using ::wcstoll; 20472: using ::wcstoull; 20472: 20472: } 20472: 20472: namespace std 20472: { 20472: using ::__gnu_cxx::wcstold; 20472: using ::__gnu_cxx::wcstoll; 20472: using ::__gnu_cxx::wcstoull; 20472: } 20472: # 280 "/usr/include/c++/10/cwchar" 3 20472: namespace std 20472: { 20472: 20472: using std::wcstof; 20472: 20472: 20472: using std::vfwscanf; 20472: 20472: 20472: using std::vswscanf; 20472: 20472: 20472: using std::vwscanf; 20472: 20472: 20472: 20472: using std::wcstold; 20472: using std::wcstoll; 20472: using std::wcstoull; 20472: 20472: } 20472: # 41 "/usr/include/c++/10/bits/postypes.h" 2 3 20472: # 68 "/usr/include/c++/10/bits/postypes.h" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: # 90 "/usr/include/c++/10/bits/postypes.h" 3 20472: typedef long long streamoff; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: typedef ptrdiff_t streamsize; 20472: # 111 "/usr/include/c++/10/bits/postypes.h" 3 20472: template 20472: class fpos 20472: { 20472: private: 20472: streamoff _M_off; 20472: _StateT _M_state; 20472: 20472: public: 20472: 20472: 20472: 20472: 20472: fpos() 20472: : _M_off(0), _M_state() { } 20472: # 133 "/usr/include/c++/10/bits/postypes.h" 3 20472: fpos(streamoff __off) 20472: : _M_off(__off), _M_state() { } 20472: 20472: 20472: fpos(const fpos&) = default; 20472: fpos& operator=(const fpos&) = default; 20472: ~fpos() = default; 20472: 20472: 20472: 20472: operator streamoff() const { return _M_off; } 20472: 20472: 20472: void 20472: state(_StateT __st) 20472: { _M_state = __st; } 20472: 20472: 20472: _StateT 20472: state() const 20472: { return _M_state; } 20472: 20472: 20472: 20472: 20472: 20472: fpos& 20472: operator+=(streamoff __off) 20472: { 20472: _M_off += __off; 20472: return *this; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: fpos& 20472: operator-=(streamoff __off) 20472: { 20472: _M_off -= __off; 20472: return *this; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: fpos 20472: operator+(streamoff __off) const 20472: { 20472: fpos __pos(*this); 20472: __pos += __off; 20472: return __pos; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: fpos 20472: operator-(streamoff __off) const 20472: { 20472: fpos __pos(*this); 20472: __pos -= __off; 20472: return __pos; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: streamoff 20472: operator-(const fpos& __other) const 20472: { return _M_off - __other._M_off; } 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: inline bool 20472: operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) 20472: { return streamoff(__lhs) == streamoff(__rhs); } 20472: 20472: template 20472: inline bool 20472: operator!=(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) 20472: { return streamoff(__lhs) != streamoff(__rhs); } 20472: 20472: 20472: 20472: 20472: 20472: typedef fpos streampos; 20472: 20472: typedef fpos wstreampos; 20472: # 245 "/usr/include/c++/10/bits/postypes.h" 3 20472: typedef fpos u16streampos; 20472: 20472: typedef fpos u32streampos; 20472: 20472: 20472: 20472: } 20472: # 41 "/usr/include/c++/10/iosfwd" 2 3 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: # 74 "/usr/include/c++/10/iosfwd" 3 20472: class ios_base; 20472: 20472: template > 20472: class basic_ios; 20472: 20472: template > 20472: class basic_streambuf; 20472: 20472: template > 20472: class basic_istream; 20472: 20472: template > 20472: class basic_ostream; 20472: 20472: template > 20472: class basic_iostream; 20472: 20472: 20472: namespace __cxx11 { 20472: 20472: template, 20472: typename _Alloc = allocator<_CharT> > 20472: class basic_stringbuf; 20472: 20472: template, 20472: typename _Alloc = allocator<_CharT> > 20472: class basic_istringstream; 20472: 20472: template, 20472: typename _Alloc = allocator<_CharT> > 20472: class basic_ostringstream; 20472: 20472: template, 20472: typename _Alloc = allocator<_CharT> > 20472: class basic_stringstream; 20472: 20472: } 20472: 20472: template > 20472: class basic_filebuf; 20472: 20472: template > 20472: class basic_ifstream; 20472: 20472: template > 20472: class basic_ofstream; 20472: 20472: template > 20472: class basic_fstream; 20472: 20472: template > 20472: class istreambuf_iterator; 20472: 20472: template > 20472: class ostreambuf_iterator; 20472: 20472: 20472: 20472: typedef basic_ios ios; 20472: 20472: 20472: typedef basic_streambuf streambuf; 20472: 20472: 20472: typedef basic_istream istream; 20472: 20472: 20472: typedef basic_ostream ostream; 20472: 20472: 20472: typedef basic_iostream iostream; 20472: 20472: 20472: typedef basic_stringbuf stringbuf; 20472: 20472: 20472: typedef basic_istringstream istringstream; 20472: 20472: 20472: typedef basic_ostringstream ostringstream; 20472: 20472: 20472: typedef basic_stringstream stringstream; 20472: 20472: 20472: typedef basic_filebuf filebuf; 20472: 20472: 20472: typedef basic_ifstream ifstream; 20472: 20472: 20472: typedef basic_ofstream ofstream; 20472: 20472: 20472: typedef basic_fstream fstream; 20472: 20472: 20472: 20472: typedef basic_ios wios; 20472: 20472: 20472: typedef basic_streambuf wstreambuf; 20472: 20472: 20472: typedef basic_istream wistream; 20472: 20472: 20472: typedef basic_ostream wostream; 20472: 20472: 20472: typedef basic_iostream wiostream; 20472: 20472: 20472: typedef basic_stringbuf wstringbuf; 20472: 20472: 20472: typedef basic_istringstream wistringstream; 20472: 20472: 20472: typedef basic_ostringstream wostringstream; 20472: 20472: 20472: typedef basic_stringstream wstringstream; 20472: 20472: 20472: typedef basic_filebuf wfilebuf; 20472: 20472: 20472: typedef basic_ifstream wifstream; 20472: 20472: 20472: typedef basic_ofstream wofstream; 20472: 20472: 20472: typedef basic_fstream wfstream; 20472: 20472: 20472: 20472: 20472: } 20472: # 75 "/usr/include/c++/10/memory" 2 3 20472: # 1 "/usr/include/c++/10/ext/atomicity.h" 1 3 20472: # 32 "/usr/include/c++/10/ext/atomicity.h" 3 20472: 20472: # 33 "/usr/include/c++/10/ext/atomicity.h" 3 20472: 20472: 20472: # 1 "/usr/include/arm-linux-gnueabihf/c++/10/bits/gthr.h" 1 3 20472: # 30 "/usr/include/arm-linux-gnueabihf/c++/10/bits/gthr.h" 3 20472: #pragma GCC visibility push(default) 20472: # 148 "/usr/include/arm-linux-gnueabihf/c++/10/bits/gthr.h" 3 20472: # 1 "/usr/include/arm-linux-gnueabihf/c++/10/bits/gthr-default.h" 1 3 20472: # 35 "/usr/include/arm-linux-gnueabihf/c++/10/bits/gthr-default.h" 3 20472: # 1 "/usr/include/pthread.h" 1 3 4 20472: # 22 "/usr/include/pthread.h" 3 4 20472: # 1 "/usr/include/sched.h" 1 3 4 20472: # 29 "/usr/include/sched.h" 3 4 20472: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/10/include/stddef.h" 1 3 4 20472: # 30 "/usr/include/sched.h" 2 3 4 20472: 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/types/time_t.h" 1 3 4 20472: 20472: 20472: 20472: 20472: 20472: 20472: typedef __time_t time_t; 20472: # 32 "/usr/include/sched.h" 2 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/types/struct_timespec.h" 1 3 4 20472: 20472: 20472: 20472: 20472: 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/endian.h" 1 3 4 20472: # 35 "/usr/include/arm-linux-gnueabihf/bits/endian.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/endianness.h" 1 3 4 20472: # 36 "/usr/include/arm-linux-gnueabihf/bits/endian.h" 2 3 4 20472: # 7 "/usr/include/arm-linux-gnueabihf/bits/types/struct_timespec.h" 2 3 4 20472: 20472: 20472: 20472: struct timespec 20472: { 20472: __time_t tv_sec; 20472: 20472: 20472: 20472: __syscall_slong_t tv_nsec; 20472: # 26 "/usr/include/arm-linux-gnueabihf/bits/types/struct_timespec.h" 3 4 20472: }; 20472: # 33 "/usr/include/sched.h" 2 3 4 20472: 20472: 20472: 20472: 20472: 20472: typedef __pid_t pid_t; 20472: 20472: 20472: 20472: 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/sched.h" 1 3 4 20472: # 76 "/usr/include/arm-linux-gnueabihf/bits/sched.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/types/struct_sched_param.h" 1 3 4 20472: # 23 "/usr/include/arm-linux-gnueabihf/bits/types/struct_sched_param.h" 3 4 20472: struct sched_param 20472: { 20472: int sched_priority; 20472: }; 20472: # 77 "/usr/include/arm-linux-gnueabihf/bits/sched.h" 2 3 4 20472: 20472: extern "C" { 20472: 20472: 20472: 20472: extern int clone (int (*__fn) (void *__arg), void *__child_stack, 20472: int __flags, void *__arg, ...) throw (); 20472: 20472: 20472: extern int unshare (int __flags) throw (); 20472: 20472: 20472: extern int sched_getcpu (void) throw (); 20472: 20472: 20472: extern int getcpu (unsigned int *, unsigned int *) throw (); 20472: 20472: 20472: extern int setns (int __fd, int __nstype) throw (); 20472: 20472: 20472: } 20472: # 44 "/usr/include/sched.h" 2 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/cpu-set.h" 1 3 4 20472: # 32 "/usr/include/arm-linux-gnueabihf/bits/cpu-set.h" 3 4 20472: typedef unsigned long int __cpu_mask; 20472: 20472: 20472: 20472: 20472: 20472: 20472: typedef struct 20472: { 20472: __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))]; 20472: } cpu_set_t; 20472: # 115 "/usr/include/arm-linux-gnueabihf/bits/cpu-set.h" 3 4 20472: extern "C" { 20472: 20472: extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp) 20472: throw (); 20472: extern cpu_set_t *__sched_cpualloc (size_t __count) throw () ; 20472: extern void __sched_cpufree (cpu_set_t *__set) throw (); 20472: 20472: } 20472: # 45 "/usr/include/sched.h" 2 3 4 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern "C" { 20472: 20472: 20472: extern int sched_setparam (__pid_t __pid, const struct sched_param *__param) 20472: throw (); 20472: 20472: 20472: extern int sched_getparam (__pid_t __pid, struct sched_param *__param) throw (); 20472: 20472: 20472: extern int sched_setscheduler (__pid_t __pid, int __policy, 20472: const struct sched_param *__param) throw (); 20472: 20472: 20472: extern int sched_getscheduler (__pid_t __pid) throw (); 20472: 20472: 20472: extern int sched_yield (void) throw (); 20472: 20472: 20472: extern int sched_get_priority_max (int __algorithm) throw (); 20472: 20472: 20472: extern int sched_get_priority_min (int __algorithm) throw (); 20472: 20472: 20472: extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) throw (); 20472: # 121 "/usr/include/sched.h" 3 4 20472: extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize, 20472: const cpu_set_t *__cpuset) throw (); 20472: 20472: 20472: extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize, 20472: cpu_set_t *__cpuset) throw (); 20472: 20472: 20472: } 20472: # 23 "/usr/include/pthread.h" 2 3 4 20472: # 1 "/usr/include/time.h" 1 3 4 20472: # 29 "/usr/include/time.h" 3 4 20472: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/10/include/stddef.h" 1 3 4 20472: # 30 "/usr/include/time.h" 2 3 4 20472: 20472: 20472: 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/time.h" 1 3 4 20472: # 73 "/usr/include/arm-linux-gnueabihf/bits/time.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/timex.h" 1 3 4 20472: # 22 "/usr/include/arm-linux-gnueabihf/bits/timex.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/types/struct_timeval.h" 1 3 4 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: struct timeval 20472: { 20472: __time_t tv_sec; 20472: __suseconds_t tv_usec; 20472: }; 20472: # 23 "/usr/include/arm-linux-gnueabihf/bits/timex.h" 2 3 4 20472: 20472: 20472: 20472: struct timex 20472: { 20472: unsigned int modes; 20472: __syscall_slong_t offset; 20472: __syscall_slong_t freq; 20472: __syscall_slong_t maxerror; 20472: __syscall_slong_t esterror; 20472: int status; 20472: __syscall_slong_t constant; 20472: __syscall_slong_t precision; 20472: __syscall_slong_t tolerance; 20472: struct timeval time; 20472: __syscall_slong_t tick; 20472: __syscall_slong_t ppsfreq; 20472: __syscall_slong_t jitter; 20472: int shift; 20472: __syscall_slong_t stabil; 20472: __syscall_slong_t jitcnt; 20472: __syscall_slong_t calcnt; 20472: __syscall_slong_t errcnt; 20472: __syscall_slong_t stbcnt; 20472: 20472: int tai; 20472: 20472: 20472: int :32; int :32; int :32; int :32; 20472: int :32; int :32; int :32; int :32; 20472: int :32; int :32; int :32; 20472: }; 20472: # 74 "/usr/include/arm-linux-gnueabihf/bits/time.h" 2 3 4 20472: 20472: extern "C" { 20472: 20472: 20472: extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) throw (); 20472: 20472: } 20472: # 34 "/usr/include/time.h" 2 3 4 20472: 20472: 20472: 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/types/clock_t.h" 1 3 4 20472: 20472: 20472: 20472: 20472: 20472: 20472: typedef __clock_t clock_t; 20472: # 38 "/usr/include/time.h" 2 3 4 20472: 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/types/struct_tm.h" 1 3 4 20472: 20472: 20472: 20472: 20472: 20472: 20472: struct tm 20472: { 20472: int tm_sec; 20472: int tm_min; 20472: int tm_hour; 20472: int tm_mday; 20472: int tm_mon; 20472: int tm_year; 20472: int tm_wday; 20472: int tm_yday; 20472: int tm_isdst; 20472: 20472: 20472: long int tm_gmtoff; 20472: const char *tm_zone; 20472: 20472: 20472: 20472: 20472: }; 20472: # 40 "/usr/include/time.h" 2 3 4 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/types/clockid_t.h" 1 3 4 20472: 20472: 20472: 20472: 20472: 20472: 20472: typedef __clockid_t clockid_t; 20472: # 47 "/usr/include/time.h" 2 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/types/timer_t.h" 1 3 4 20472: 20472: 20472: 20472: 20472: 20472: 20472: typedef __timer_t timer_t; 20472: # 48 "/usr/include/time.h" 2 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/types/struct_itimerspec.h" 1 3 4 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: struct itimerspec 20472: { 20472: struct timespec it_interval; 20472: struct timespec it_value; 20472: }; 20472: # 49 "/usr/include/time.h" 2 3 4 20472: struct sigevent; 20472: # 68 "/usr/include/time.h" 3 4 20472: extern "C" { 20472: 20472: 20472: 20472: extern clock_t clock (void) throw (); 20472: 20472: 20472: extern time_t time (time_t *__timer) throw (); 20472: 20472: 20472: extern double difftime (time_t __time1, time_t __time0) 20472: throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern time_t mktime (struct tm *__tp) throw (); 20472: 20472: 20472: 20472: 20472: 20472: extern size_t strftime (char *__restrict __s, size_t __maxsize, 20472: const char *__restrict __format, 20472: const struct tm *__restrict __tp) throw (); 20472: 20472: 20472: 20472: 20472: extern char *strptime (const char *__restrict __s, 20472: const char *__restrict __fmt, struct tm *__tp) 20472: throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern size_t strftime_l (char *__restrict __s, size_t __maxsize, 20472: const char *__restrict __format, 20472: const struct tm *__restrict __tp, 20472: locale_t __loc) throw (); 20472: 20472: 20472: 20472: extern char *strptime_l (const char *__restrict __s, 20472: const char *__restrict __fmt, struct tm *__tp, 20472: locale_t __loc) throw (); 20472: 20472: 20472: 20472: 20472: 20472: extern struct tm *gmtime (const time_t *__timer) throw (); 20472: 20472: 20472: 20472: extern struct tm *localtime (const time_t *__timer) throw (); 20472: 20472: 20472: 20472: 20472: extern struct tm *gmtime_r (const time_t *__restrict __timer, 20472: struct tm *__restrict __tp) throw (); 20472: 20472: 20472: 20472: extern struct tm *localtime_r (const time_t *__restrict __timer, 20472: struct tm *__restrict __tp) throw (); 20472: 20472: 20472: 20472: 20472: extern char *asctime (const struct tm *__tp) throw (); 20472: 20472: 20472: extern char *ctime (const time_t *__timer) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern char *asctime_r (const struct tm *__restrict __tp, 20472: char *__restrict __buf) throw (); 20472: 20472: 20472: extern char *ctime_r (const time_t *__restrict __timer, 20472: char *__restrict __buf) throw (); 20472: 20472: 20472: 20472: 20472: extern char *__tzname[2]; 20472: extern int __daylight; 20472: extern long int __timezone; 20472: 20472: 20472: 20472: 20472: extern char *tzname[2]; 20472: 20472: 20472: 20472: extern void tzset (void) throw (); 20472: 20472: 20472: 20472: extern int daylight; 20472: extern long int timezone; 20472: # 190 "/usr/include/time.h" 3 4 20472: extern time_t timegm (struct tm *__tp) throw (); 20472: 20472: 20472: extern time_t timelocal (struct tm *__tp) throw (); 20472: 20472: 20472: extern int dysize (int __year) throw () __attribute__ ((__const__)); 20472: # 205 "/usr/include/time.h" 3 4 20472: extern int nanosleep (const struct timespec *__requested_time, 20472: struct timespec *__remaining); 20472: 20472: 20472: 20472: extern int clock_getres (clockid_t __clock_id, struct timespec *__res) throw (); 20472: 20472: 20472: extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) throw (); 20472: 20472: 20472: extern int clock_settime (clockid_t __clock_id, const struct timespec *__tp) 20472: throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int clock_nanosleep (clockid_t __clock_id, int __flags, 20472: const struct timespec *__req, 20472: struct timespec *__rem); 20472: 20472: 20472: extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) throw (); 20472: 20472: 20472: 20472: 20472: extern int timer_create (clockid_t __clock_id, 20472: struct sigevent *__restrict __evp, 20472: timer_t *__restrict __timerid) throw (); 20472: 20472: 20472: extern int timer_delete (timer_t __timerid) throw (); 20472: 20472: 20472: extern int timer_settime (timer_t __timerid, int __flags, 20472: const struct itimerspec *__restrict __value, 20472: struct itimerspec *__restrict __ovalue) throw (); 20472: 20472: 20472: extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) 20472: throw (); 20472: 20472: 20472: extern int timer_getoverrun (timer_t __timerid) throw (); 20472: 20472: 20472: 20472: 20472: 20472: extern int timespec_get (struct timespec *__ts, int __base) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: # 274 "/usr/include/time.h" 3 4 20472: extern int getdate_err; 20472: # 283 "/usr/include/time.h" 3 4 20472: extern struct tm *getdate (const char *__string); 20472: # 297 "/usr/include/time.h" 3 4 20472: extern int getdate_r (const char *__restrict __string, 20472: struct tm *__restrict __resbufp); 20472: 20472: 20472: } 20472: # 24 "/usr/include/pthread.h" 2 3 4 20472: 20472: 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/pthreadtypes.h" 1 3 4 20472: # 23 "/usr/include/arm-linux-gnueabihf/bits/pthreadtypes.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/thread-shared-types.h" 1 3 4 20472: # 44 "/usr/include/arm-linux-gnueabihf/bits/thread-shared-types.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/pthreadtypes-arch.h" 1 3 4 20472: # 23 "/usr/include/arm-linux-gnueabihf/bits/pthreadtypes-arch.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/wordsize.h" 1 3 4 20472: # 24 "/usr/include/arm-linux-gnueabihf/bits/pthreadtypes-arch.h" 2 3 4 20472: # 45 "/usr/include/arm-linux-gnueabihf/bits/thread-shared-types.h" 2 3 4 20472: 20472: 20472: 20472: 20472: typedef struct __pthread_internal_list 20472: { 20472: struct __pthread_internal_list *__prev; 20472: struct __pthread_internal_list *__next; 20472: } __pthread_list_t; 20472: 20472: typedef struct __pthread_internal_slist 20472: { 20472: struct __pthread_internal_slist *__next; 20472: } __pthread_slist_t; 20472: # 74 "/usr/include/arm-linux-gnueabihf/bits/thread-shared-types.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/struct_mutex.h" 1 3 4 20472: # 27 "/usr/include/arm-linux-gnueabihf/bits/struct_mutex.h" 3 4 20472: struct __pthread_mutex_s 20472: { 20472: int __lock ; 20472: unsigned int __count; 20472: int __owner; 20472: # 58 "/usr/include/arm-linux-gnueabihf/bits/struct_mutex.h" 3 4 20472: int __kind; 20472: 20472: unsigned int __nusers; 20472: 20472: 20472: 20472: 20472: 20472: 20472: __extension__ union 20472: { 20472: int __spins; 20472: __pthread_slist_t __list; 20472: }; 20472: 20472: 20472: }; 20472: # 75 "/usr/include/arm-linux-gnueabihf/bits/thread-shared-types.h" 2 3 4 20472: # 87 "/usr/include/arm-linux-gnueabihf/bits/thread-shared-types.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/struct_rwlock.h" 1 3 4 20472: # 29 "/usr/include/arm-linux-gnueabihf/bits/struct_rwlock.h" 3 4 20472: struct __pthread_rwlock_arch_t 20472: { 20472: unsigned int __readers; 20472: unsigned int __writers; 20472: unsigned int __wrphase_futex; 20472: unsigned int __writers_futex; 20472: unsigned int __pad3; 20472: unsigned int __pad4; 20472: # 45 "/usr/include/arm-linux-gnueabihf/bits/struct_rwlock.h" 3 4 20472: unsigned char __flags; 20472: unsigned char __shared; 20472: unsigned char __pad1; 20472: unsigned char __pad2; 20472: 20472: int __cur_writer; 20472: }; 20472: # 88 "/usr/include/arm-linux-gnueabihf/bits/thread-shared-types.h" 2 3 4 20472: 20472: 20472: 20472: 20472: struct __pthread_cond_s 20472: { 20472: __extension__ union 20472: { 20472: __extension__ unsigned long long int __wseq; 20472: struct 20472: { 20472: unsigned int __low; 20472: unsigned int __high; 20472: } __wseq32; 20472: }; 20472: __extension__ union 20472: { 20472: __extension__ unsigned long long int __g1_start; 20472: struct 20472: { 20472: unsigned int __low; 20472: unsigned int __high; 20472: } __g1_start32; 20472: }; 20472: unsigned int __g_refs[2] ; 20472: unsigned int __g_size[2]; 20472: unsigned int __g1_orig_size; 20472: unsigned int __wrefs; 20472: unsigned int __g_signals[2]; 20472: }; 20472: # 24 "/usr/include/arm-linux-gnueabihf/bits/pthreadtypes.h" 2 3 4 20472: 20472: 20472: 20472: typedef unsigned long int pthread_t; 20472: 20472: 20472: 20472: 20472: typedef union 20472: { 20472: char __size[4]; 20472: int __align; 20472: } pthread_mutexattr_t; 20472: 20472: 20472: 20472: 20472: typedef union 20472: { 20472: char __size[4]; 20472: int __align; 20472: } pthread_condattr_t; 20472: 20472: 20472: 20472: typedef unsigned int pthread_key_t; 20472: 20472: 20472: 20472: typedef int pthread_once_t; 20472: 20472: 20472: union pthread_attr_t 20472: { 20472: char __size[36]; 20472: long int __align; 20472: }; 20472: 20472: typedef union pthread_attr_t pthread_attr_t; 20472: 20472: 20472: 20472: 20472: typedef union 20472: { 20472: struct __pthread_mutex_s __data; 20472: char __size[24]; 20472: long int __align; 20472: } pthread_mutex_t; 20472: 20472: 20472: typedef union 20472: { 20472: struct __pthread_cond_s __data; 20472: char __size[48]; 20472: __extension__ long long int __align; 20472: } pthread_cond_t; 20472: 20472: 20472: 20472: 20472: 20472: typedef union 20472: { 20472: struct __pthread_rwlock_arch_t __data; 20472: char __size[32]; 20472: long int __align; 20472: } pthread_rwlock_t; 20472: 20472: typedef union 20472: { 20472: char __size[8]; 20472: long int __align; 20472: } pthread_rwlockattr_t; 20472: 20472: 20472: 20472: 20472: 20472: typedef volatile int pthread_spinlock_t; 20472: 20472: 20472: 20472: 20472: typedef union 20472: { 20472: char __size[20]; 20472: long int __align; 20472: } pthread_barrier_t; 20472: 20472: typedef union 20472: { 20472: char __size[4]; 20472: int __align; 20472: } pthread_barrierattr_t; 20472: # 27 "/usr/include/pthread.h" 2 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/setjmp.h" 1 3 4 20472: # 33 "/usr/include/arm-linux-gnueabihf/bits/setjmp.h" 3 4 20472: typedef int __jmp_buf[64] __attribute__((__aligned__ (8))); 20472: # 28 "/usr/include/pthread.h" 2 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/wordsize.h" 1 3 4 20472: # 29 "/usr/include/pthread.h" 2 3 4 20472: 20472: 20472: 20472: 20472: enum 20472: { 20472: PTHREAD_CREATE_JOINABLE, 20472: 20472: PTHREAD_CREATE_DETACHED 20472: 20472: }; 20472: 20472: 20472: 20472: enum 20472: { 20472: PTHREAD_MUTEX_TIMED_NP, 20472: PTHREAD_MUTEX_RECURSIVE_NP, 20472: PTHREAD_MUTEX_ERRORCHECK_NP, 20472: PTHREAD_MUTEX_ADAPTIVE_NP 20472: 20472: , 20472: PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP, 20472: PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP, 20472: PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP, 20472: PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL 20472: 20472: 20472: 20472: , PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_TIMED_NP 20472: 20472: }; 20472: 20472: 20472: 20472: 20472: enum 20472: { 20472: PTHREAD_MUTEX_STALLED, 20472: PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED, 20472: PTHREAD_MUTEX_ROBUST, 20472: PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: enum 20472: { 20472: PTHREAD_PRIO_NONE, 20472: PTHREAD_PRIO_INHERIT, 20472: PTHREAD_PRIO_PROTECT 20472: }; 20472: # 100 "/usr/include/pthread.h" 3 4 20472: enum 20472: { 20472: PTHREAD_RWLOCK_PREFER_READER_NP, 20472: PTHREAD_RWLOCK_PREFER_WRITER_NP, 20472: PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, 20472: PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP 20472: }; 20472: # 120 "/usr/include/pthread.h" 3 4 20472: enum 20472: { 20472: PTHREAD_INHERIT_SCHED, 20472: 20472: PTHREAD_EXPLICIT_SCHED 20472: 20472: }; 20472: 20472: 20472: 20472: enum 20472: { 20472: PTHREAD_SCOPE_SYSTEM, 20472: 20472: PTHREAD_SCOPE_PROCESS 20472: 20472: }; 20472: 20472: 20472: 20472: enum 20472: { 20472: PTHREAD_PROCESS_PRIVATE, 20472: 20472: PTHREAD_PROCESS_SHARED 20472: 20472: }; 20472: # 155 "/usr/include/pthread.h" 3 4 20472: struct _pthread_cleanup_buffer 20472: { 20472: void (*__routine) (void *); 20472: void *__arg; 20472: int __canceltype; 20472: struct _pthread_cleanup_buffer *__prev; 20472: }; 20472: 20472: 20472: enum 20472: { 20472: PTHREAD_CANCEL_ENABLE, 20472: 20472: PTHREAD_CANCEL_DISABLE 20472: 20472: }; 20472: enum 20472: { 20472: PTHREAD_CANCEL_DEFERRED, 20472: 20472: PTHREAD_CANCEL_ASYNCHRONOUS 20472: 20472: }; 20472: # 193 "/usr/include/pthread.h" 3 4 20472: extern "C" { 20472: 20472: 20472: 20472: 20472: extern int pthread_create (pthread_t *__restrict __newthread, 20472: const pthread_attr_t *__restrict __attr, 20472: void *(*__start_routine) (void *), 20472: void *__restrict __arg) throw () __attribute__ ((__nonnull__ (1, 3))); 20472: 20472: 20472: 20472: 20472: 20472: extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__)); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int pthread_join (pthread_t __th, void **__thread_return); 20472: 20472: 20472: 20472: 20472: extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return, 20472: const struct timespec *__abstime); 20472: # 238 "/usr/include/pthread.h" 3 4 20472: extern int pthread_clockjoin_np (pthread_t __th, void **__thread_return, 20472: clockid_t __clockid, 20472: const struct timespec *__abstime); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int pthread_detach (pthread_t __th) throw (); 20472: 20472: 20472: 20472: extern pthread_t pthread_self (void) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) 20472: throw () __attribute__ ((__const__)); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int pthread_attr_init (pthread_attr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: extern int pthread_attr_destroy (pthread_attr_t *__attr) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: extern int pthread_attr_getdetachstate (const pthread_attr_t *__attr, 20472: int *__detachstate) 20472: throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: extern int pthread_attr_setdetachstate (pthread_attr_t *__attr, 20472: int __detachstate) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: 20472: extern int pthread_attr_getguardsize (const pthread_attr_t *__attr, 20472: size_t *__guardsize) 20472: throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: extern int pthread_attr_setguardsize (pthread_attr_t *__attr, 20472: size_t __guardsize) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: 20472: extern int pthread_attr_getschedparam (const pthread_attr_t *__restrict __attr, 20472: struct sched_param *__restrict __param) 20472: throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr, 20472: const struct sched_param *__restrict 20472: __param) throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: extern int pthread_attr_getschedpolicy (const pthread_attr_t *__restrict 20472: __attr, int *__restrict __policy) 20472: throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: extern int pthread_attr_getinheritsched (const pthread_attr_t *__restrict 20472: __attr, int *__restrict __inherit) 20472: throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: extern int pthread_attr_setinheritsched (pthread_attr_t *__attr, 20472: int __inherit) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: 20472: extern int pthread_attr_getscope (const pthread_attr_t *__restrict __attr, 20472: int *__restrict __scope) 20472: throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: extern int pthread_attr_getstackaddr (const pthread_attr_t *__restrict 20472: __attr, void **__restrict __stackaddr) 20472: throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__deprecated__)); 20472: 20472: 20472: 20472: 20472: 20472: extern int pthread_attr_setstackaddr (pthread_attr_t *__attr, 20472: void *__stackaddr) 20472: throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)); 20472: 20472: 20472: extern int pthread_attr_getstacksize (const pthread_attr_t *__restrict 20472: __attr, size_t *__restrict __stacksize) 20472: throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: 20472: 20472: extern int pthread_attr_setstacksize (pthread_attr_t *__attr, 20472: size_t __stacksize) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: 20472: extern int pthread_attr_getstack (const pthread_attr_t *__restrict __attr, 20472: void **__restrict __stackaddr, 20472: size_t *__restrict __stacksize) 20472: throw () __attribute__ ((__nonnull__ (1, 2, 3))); 20472: 20472: 20472: 20472: 20472: extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, 20472: size_t __stacksize) throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: 20472: 20472: 20472: extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr, 20472: size_t __cpusetsize, 20472: const cpu_set_t *__cpuset) 20472: throw () __attribute__ ((__nonnull__ (1, 3))); 20472: 20472: 20472: 20472: extern int pthread_attr_getaffinity_np (const pthread_attr_t *__attr, 20472: size_t __cpusetsize, 20472: cpu_set_t *__cpuset) 20472: throw () __attribute__ ((__nonnull__ (1, 3))); 20472: 20472: 20472: extern int pthread_getattr_default_np (pthread_attr_t *__attr) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: 20472: extern int pthread_setattr_default_np (const pthread_attr_t *__attr) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: 20472: 20472: extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) 20472: throw () __attribute__ ((__nonnull__ (2))); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int pthread_setschedparam (pthread_t __target_thread, int __policy, 20472: const struct sched_param *__param) 20472: throw () __attribute__ ((__nonnull__ (3))); 20472: 20472: 20472: extern int pthread_getschedparam (pthread_t __target_thread, 20472: int *__restrict __policy, 20472: struct sched_param *__restrict __param) 20472: throw () __attribute__ ((__nonnull__ (2, 3))); 20472: 20472: 20472: extern int pthread_setschedprio (pthread_t __target_thread, int __prio) 20472: throw (); 20472: 20472: 20472: 20472: 20472: extern int pthread_getname_np (pthread_t __target_thread, char *__buf, 20472: size_t __buflen) 20472: throw () __attribute__ ((__nonnull__ (2))); 20472: 20472: 20472: extern int pthread_setname_np (pthread_t __target_thread, const char *__name) 20472: throw () __attribute__ ((__nonnull__ (2))); 20472: 20472: 20472: 20472: 20472: 20472: extern int pthread_getconcurrency (void) throw (); 20472: 20472: 20472: extern int pthread_setconcurrency (int __level) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int pthread_yield (void) throw (); 20472: 20472: 20472: 20472: 20472: extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize, 20472: const cpu_set_t *__cpuset) 20472: throw () __attribute__ ((__nonnull__ (3))); 20472: 20472: 20472: extern int pthread_getaffinity_np (pthread_t __th, size_t __cpusetsize, 20472: cpu_set_t *__cpuset) 20472: throw () __attribute__ ((__nonnull__ (3))); 20472: # 470 "/usr/include/pthread.h" 3 4 20472: extern int pthread_once (pthread_once_t *__once_control, 20472: void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2))); 20472: # 482 "/usr/include/pthread.h" 3 4 20472: extern int pthread_setcancelstate (int __state, int *__oldstate); 20472: 20472: 20472: 20472: extern int pthread_setcanceltype (int __type, int *__oldtype); 20472: 20472: 20472: extern int pthread_cancel (pthread_t __th); 20472: 20472: 20472: 20472: 20472: extern void pthread_testcancel (void); 20472: 20472: 20472: 20472: 20472: typedef struct 20472: { 20472: struct 20472: { 20472: __jmp_buf __cancel_jmp_buf; 20472: int __mask_was_saved; 20472: } __cancel_jmp_buf[1]; 20472: void *__pad[4]; 20472: } __pthread_unwind_buf_t __attribute__ ((__aligned__)); 20472: # 516 "/usr/include/pthread.h" 3 4 20472: struct __pthread_cleanup_frame 20472: { 20472: void (*__cancel_routine) (void *); 20472: void *__cancel_arg; 20472: int __do_it; 20472: int __cancel_type; 20472: }; 20472: 20472: 20472: 20472: 20472: class __pthread_cleanup_class 20472: { 20472: void (*__cancel_routine) (void *); 20472: void *__cancel_arg; 20472: int __do_it; 20472: int __cancel_type; 20472: 20472: public: 20472: __pthread_cleanup_class (void (*__fct) (void *), void *__arg) 20472: : __cancel_routine (__fct), __cancel_arg (__arg), __do_it (1) { } 20472: ~__pthread_cleanup_class () { if (__do_it) __cancel_routine (__cancel_arg); } 20472: void __setdoit (int __newval) { __do_it = __newval; } 20472: void __defer () { pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED, 20472: &__cancel_type); } 20472: void __restore () const { pthread_setcanceltype (__cancel_type, 0); } 20472: }; 20472: # 718 "/usr/include/pthread.h" 3 4 20472: struct __jmp_buf_tag; 20472: extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) throw (); 20472: 20472: 20472: 20472: 20472: 20472: extern int pthread_mutex_init (pthread_mutex_t *__mutex, 20472: const pthread_mutexattr_t *__mutexattr) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: extern int pthread_mutex_trylock (pthread_mutex_t *__mutex) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: extern int pthread_mutex_lock (pthread_mutex_t *__mutex) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: 20472: extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex, 20472: const struct timespec *__restrict 20472: __abstime) throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: 20472: extern int pthread_mutex_clocklock (pthread_mutex_t *__restrict __mutex, 20472: clockid_t __clockid, 20472: const struct timespec *__restrict 20472: __abstime) throw () __attribute__ ((__nonnull__ (1, 3))); 20472: 20472: 20472: 20472: extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: 20472: extern int pthread_mutex_getprioceiling (const pthread_mutex_t * 20472: __restrict __mutex, 20472: int *__restrict __prioceiling) 20472: throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: 20472: extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex, 20472: int __prioceiling, 20472: int *__restrict __old_ceiling) 20472: throw () __attribute__ ((__nonnull__ (1, 3))); 20472: 20472: 20472: 20472: 20472: extern int pthread_mutex_consistent (pthread_mutex_t *__mutex) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: # 789 "/usr/include/pthread.h" 3 4 20472: extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: extern int pthread_mutexattr_getpshared (const pthread_mutexattr_t * 20472: __restrict __attr, 20472: int *__restrict __pshared) 20472: throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr, 20472: int __pshared) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: 20472: extern int pthread_mutexattr_gettype (const pthread_mutexattr_t *__restrict 20472: __attr, int *__restrict __kind) 20472: throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: 20472: 20472: extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: 20472: extern int pthread_mutexattr_getprotocol (const pthread_mutexattr_t * 20472: __restrict __attr, 20472: int *__restrict __protocol) 20472: throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: 20472: extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr, 20472: int __protocol) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: extern int pthread_mutexattr_getprioceiling (const pthread_mutexattr_t * 20472: __restrict __attr, 20472: int *__restrict __prioceiling) 20472: throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr, 20472: int __prioceiling) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: 20472: extern int pthread_mutexattr_getrobust (const pthread_mutexattr_t *__attr, 20472: int *__robustness) 20472: throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: extern int pthread_mutexattr_getrobust_np (const pthread_mutexattr_t *__attr, 20472: int *__robustness) 20472: throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: 20472: extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr, 20472: int __robustness) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr, 20472: int __robustness) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: # 871 "/usr/include/pthread.h" 3 4 20472: extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock, 20472: const pthread_rwlockattr_t *__restrict 20472: __attr) throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: 20472: extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock, 20472: const struct timespec *__restrict 20472: __abstime) throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: 20472: extern int pthread_rwlock_clockrdlock (pthread_rwlock_t *__restrict __rwlock, 20472: clockid_t __clockid, 20472: const struct timespec *__restrict 20472: __abstime) throw () __attribute__ ((__nonnull__ (1, 3))); 20472: 20472: 20472: 20472: extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: 20472: extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock, 20472: const struct timespec *__restrict 20472: __abstime) throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: 20472: extern int pthread_rwlock_clockwrlock (pthread_rwlock_t *__restrict __rwlock, 20472: clockid_t __clockid, 20472: const struct timespec *__restrict 20472: __abstime) throw () __attribute__ ((__nonnull__ (1, 3))); 20472: 20472: 20472: 20472: extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: 20472: 20472: 20472: extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: extern int pthread_rwlockattr_getpshared (const pthread_rwlockattr_t * 20472: __restrict __attr, 20472: int *__restrict __pshared) 20472: throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr, 20472: int __pshared) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: extern int pthread_rwlockattr_getkind_np (const pthread_rwlockattr_t * 20472: __restrict __attr, 20472: int *__restrict __pref) 20472: throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr, 20472: int __pref) throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int pthread_cond_init (pthread_cond_t *__restrict __cond, 20472: const pthread_condattr_t *__restrict __cond_attr) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: extern int pthread_cond_destroy (pthread_cond_t *__cond) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: extern int pthread_cond_signal (pthread_cond_t *__cond) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: extern int pthread_cond_broadcast (pthread_cond_t *__cond) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int pthread_cond_wait (pthread_cond_t *__restrict __cond, 20472: pthread_mutex_t *__restrict __mutex) 20472: __attribute__ ((__nonnull__ (1, 2))); 20472: # 997 "/usr/include/pthread.h" 3 4 20472: extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond, 20472: pthread_mutex_t *__restrict __mutex, 20472: const struct timespec *__restrict __abstime) 20472: __attribute__ ((__nonnull__ (1, 2, 3))); 20472: # 1010 "/usr/include/pthread.h" 3 4 20472: extern int pthread_cond_clockwait (pthread_cond_t *__restrict __cond, 20472: pthread_mutex_t *__restrict __mutex, 20472: __clockid_t __clock_id, 20472: const struct timespec *__restrict __abstime) 20472: __attribute__ ((__nonnull__ (1, 2, 4))); 20472: 20472: 20472: 20472: 20472: 20472: extern int pthread_condattr_init (pthread_condattr_t *__attr) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: extern int pthread_condattr_destroy (pthread_condattr_t *__attr) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: extern int pthread_condattr_getpshared (const pthread_condattr_t * 20472: __restrict __attr, 20472: int *__restrict __pshared) 20472: throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: extern int pthread_condattr_setpshared (pthread_condattr_t *__attr, 20472: int __pshared) throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: 20472: extern int pthread_condattr_getclock (const pthread_condattr_t * 20472: __restrict __attr, 20472: __clockid_t *__restrict __clock_id) 20472: throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: extern int pthread_condattr_setclock (pthread_condattr_t *__attr, 20472: __clockid_t __clock_id) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: # 1056 "/usr/include/pthread.h" 3 4 20472: extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: extern int pthread_spin_destroy (pthread_spinlock_t *__lock) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: extern int pthread_spin_lock (pthread_spinlock_t *__lock) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: extern int pthread_spin_trylock (pthread_spinlock_t *__lock) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: extern int pthread_spin_unlock (pthread_spinlock_t *__lock) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier, 20472: const pthread_barrierattr_t *__restrict 20472: __attr, unsigned int __count) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: extern int pthread_barrier_wait (pthread_barrier_t *__barrier) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: 20472: extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: extern int pthread_barrierattr_getpshared (const pthread_barrierattr_t * 20472: __restrict __attr, 20472: int *__restrict __pshared) 20472: throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr, 20472: int __pshared) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: # 1123 "/usr/include/pthread.h" 3 4 20472: extern int pthread_key_create (pthread_key_t *__key, 20472: void (*__destr_function) (void *)) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: extern int pthread_key_delete (pthread_key_t __key) throw (); 20472: 20472: 20472: extern void *pthread_getspecific (pthread_key_t __key) throw (); 20472: 20472: 20472: extern int pthread_setspecific (pthread_key_t __key, 20472: const void *__pointer) throw () ; 20472: 20472: 20472: 20472: 20472: extern int pthread_getcpuclockid (pthread_t __thread_id, 20472: __clockid_t *__clock_id) 20472: throw () __attribute__ ((__nonnull__ (2))); 20472: # 1157 "/usr/include/pthread.h" 3 4 20472: extern int pthread_atfork (void (*__prepare) (void), 20472: void (*__parent) (void), 20472: void (*__child) (void)) throw (); 20472: 20472: 20472: 20472: 20472: extern __inline __attribute__ ((__gnu_inline__)) int 20472: __attribute__ ((__leaf__)) pthread_equal (pthread_t __thread1, pthread_t __thread2) throw () 20472: { 20472: return __thread1 == __thread2; 20472: } 20472: 20472: 20472: } 20472: # 36 "/usr/include/arm-linux-gnueabihf/c++/10/bits/gthr-default.h" 2 3 20472: # 47 "/usr/include/arm-linux-gnueabihf/c++/10/bits/gthr-default.h" 3 20472: typedef pthread_t __gthread_t; 20472: typedef pthread_key_t __gthread_key_t; 20472: typedef pthread_once_t __gthread_once_t; 20472: typedef pthread_mutex_t __gthread_mutex_t; 20472: typedef pthread_mutex_t __gthread_recursive_mutex_t; 20472: typedef pthread_cond_t __gthread_cond_t; 20472: typedef struct timespec __gthread_time_t; 20472: # 102 "/usr/include/arm-linux-gnueabihf/c++/10/bits/gthr-default.h" 3 20472: static __typeof(pthread_once) __gthrw_pthread_once __attribute__ ((__weakref__("pthread_once"), __copy__ (pthread_once))); 20472: static __typeof(pthread_getspecific) __gthrw_pthread_getspecific __attribute__ ((__weakref__("pthread_getspecific"), __copy__ (pthread_getspecific))); 20472: static __typeof(pthread_setspecific) __gthrw_pthread_setspecific __attribute__ ((__weakref__("pthread_setspecific"), __copy__ (pthread_setspecific))); 20472: 20472: static __typeof(pthread_create) __gthrw_pthread_create __attribute__ ((__weakref__("pthread_create"), __copy__ (pthread_create))); 20472: static __typeof(pthread_join) __gthrw_pthread_join __attribute__ ((__weakref__("pthread_join"), __copy__ (pthread_join))); 20472: static __typeof(pthread_equal) __gthrw_pthread_equal __attribute__ ((__weakref__("pthread_equal"), __copy__ (pthread_equal))); 20472: static __typeof(pthread_self) __gthrw_pthread_self __attribute__ ((__weakref__("pthread_self"), __copy__ (pthread_self))); 20472: static __typeof(pthread_detach) __gthrw_pthread_detach __attribute__ ((__weakref__("pthread_detach"), __copy__ (pthread_detach))); 20472: 20472: static __typeof(pthread_cancel) __gthrw_pthread_cancel __attribute__ ((__weakref__("pthread_cancel"), __copy__ (pthread_cancel))); 20472: 20472: static __typeof(sched_yield) __gthrw_sched_yield __attribute__ ((__weakref__("sched_yield"), __copy__ (sched_yield))); 20472: 20472: static __typeof(pthread_mutex_lock) __gthrw_pthread_mutex_lock __attribute__ ((__weakref__("pthread_mutex_lock"), __copy__ (pthread_mutex_lock))); 20472: static __typeof(pthread_mutex_trylock) __gthrw_pthread_mutex_trylock __attribute__ ((__weakref__("pthread_mutex_trylock"), __copy__ (pthread_mutex_trylock))); 20472: 20472: static __typeof(pthread_mutex_timedlock) __gthrw_pthread_mutex_timedlock __attribute__ ((__weakref__("pthread_mutex_timedlock"), __copy__ (pthread_mutex_timedlock))); 20472: 20472: static __typeof(pthread_mutex_unlock) __gthrw_pthread_mutex_unlock __attribute__ ((__weakref__("pthread_mutex_unlock"), __copy__ (pthread_mutex_unlock))); 20472: static __typeof(pthread_mutex_init) __gthrw_pthread_mutex_init __attribute__ ((__weakref__("pthread_mutex_init"), __copy__ (pthread_mutex_init))); 20472: static __typeof(pthread_mutex_destroy) __gthrw_pthread_mutex_destroy __attribute__ ((__weakref__("pthread_mutex_destroy"), __copy__ (pthread_mutex_destroy))); 20472: 20472: static __typeof(pthread_cond_init) __gthrw_pthread_cond_init __attribute__ ((__weakref__("pthread_cond_init"), __copy__ (pthread_cond_init))); 20472: static __typeof(pthread_cond_broadcast) __gthrw_pthread_cond_broadcast __attribute__ ((__weakref__("pthread_cond_broadcast"), __copy__ (pthread_cond_broadcast))); 20472: static __typeof(pthread_cond_signal) __gthrw_pthread_cond_signal __attribute__ ((__weakref__("pthread_cond_signal"), __copy__ (pthread_cond_signal))); 20472: static __typeof(pthread_cond_wait) __gthrw_pthread_cond_wait __attribute__ ((__weakref__("pthread_cond_wait"), __copy__ (pthread_cond_wait))); 20472: static __typeof(pthread_cond_timedwait) __gthrw_pthread_cond_timedwait __attribute__ ((__weakref__("pthread_cond_timedwait"), __copy__ (pthread_cond_timedwait))); 20472: static __typeof(pthread_cond_destroy) __gthrw_pthread_cond_destroy __attribute__ ((__weakref__("pthread_cond_destroy"), __copy__ (pthread_cond_destroy))); 20472: 20472: static __typeof(pthread_key_create) __gthrw_pthread_key_create __attribute__ ((__weakref__("pthread_key_create"), __copy__ (pthread_key_create))); 20472: static __typeof(pthread_key_delete) __gthrw_pthread_key_delete __attribute__ ((__weakref__("pthread_key_delete"), __copy__ (pthread_key_delete))); 20472: static __typeof(pthread_mutexattr_init) __gthrw_pthread_mutexattr_init __attribute__ ((__weakref__("pthread_mutexattr_init"), __copy__ (pthread_mutexattr_init))); 20472: static __typeof(pthread_mutexattr_settype) __gthrw_pthread_mutexattr_settype __attribute__ ((__weakref__("pthread_mutexattr_settype"), __copy__ (pthread_mutexattr_settype))); 20472: static __typeof(pthread_mutexattr_destroy) __gthrw_pthread_mutexattr_destroy __attribute__ ((__weakref__("pthread_mutexattr_destroy"), __copy__ (pthread_mutexattr_destroy))); 20472: # 237 "/usr/include/arm-linux-gnueabihf/c++/10/bits/gthr-default.h" 3 20472: static __typeof(pthread_key_create) __gthrw___pthread_key_create __attribute__ ((__weakref__("__pthread_key_create"), __copy__ (pthread_key_create))); 20472: # 247 "/usr/include/arm-linux-gnueabihf/c++/10/bits/gthr-default.h" 3 20472: static inline int 20472: __gthread_active_p (void) 20472: { 20472: static void *const __gthread_active_ptr 20472: = __extension__ (void *) &__gthrw___pthread_key_create; 20472: return __gthread_active_ptr != 0; 20472: } 20472: # 659 "/usr/include/arm-linux-gnueabihf/c++/10/bits/gthr-default.h" 3 20472: static inline int 20472: __gthread_create (__gthread_t *__threadid, void *(*__func) (void*), 20472: void *__args) 20472: { 20472: return __gthrw_pthread_create (__threadid, __null, __func, __args); 20472: } 20472: 20472: static inline int 20472: __gthread_join (__gthread_t __threadid, void **__value_ptr) 20472: { 20472: return __gthrw_pthread_join (__threadid, __value_ptr); 20472: } 20472: 20472: static inline int 20472: __gthread_detach (__gthread_t __threadid) 20472: { 20472: return __gthrw_pthread_detach (__threadid); 20472: } 20472: 20472: static inline int 20472: __gthread_equal (__gthread_t __t1, __gthread_t __t2) 20472: { 20472: return __gthrw_pthread_equal (__t1, __t2); 20472: } 20472: 20472: static inline __gthread_t 20472: __gthread_self (void) 20472: { 20472: return __gthrw_pthread_self (); 20472: } 20472: 20472: static inline int 20472: __gthread_yield (void) 20472: { 20472: return __gthrw_sched_yield (); 20472: } 20472: 20472: static inline int 20472: __gthread_once (__gthread_once_t *__once, void (*__func) (void)) 20472: { 20472: if (__gthread_active_p ()) 20472: return __gthrw_pthread_once (__once, __func); 20472: else 20472: return -1; 20472: } 20472: 20472: static inline int 20472: __gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *)) 20472: { 20472: return __gthrw_pthread_key_create (__key, __dtor); 20472: } 20472: 20472: static inline int 20472: __gthread_key_delete (__gthread_key_t __key) 20472: { 20472: return __gthrw_pthread_key_delete (__key); 20472: } 20472: 20472: static inline void * 20472: __gthread_getspecific (__gthread_key_t __key) 20472: { 20472: return __gthrw_pthread_getspecific (__key); 20472: } 20472: 20472: static inline int 20472: __gthread_setspecific (__gthread_key_t __key, const void *__ptr) 20472: { 20472: return __gthrw_pthread_setspecific (__key, __ptr); 20472: } 20472: 20472: static inline void 20472: __gthread_mutex_init_function (__gthread_mutex_t *__mutex) 20472: { 20472: if (__gthread_active_p ()) 20472: __gthrw_pthread_mutex_init (__mutex, __null); 20472: } 20472: 20472: static inline int 20472: __gthread_mutex_destroy (__gthread_mutex_t *__mutex) 20472: { 20472: if (__gthread_active_p ()) 20472: return __gthrw_pthread_mutex_destroy (__mutex); 20472: else 20472: return 0; 20472: } 20472: 20472: static inline int 20472: __gthread_mutex_lock (__gthread_mutex_t *__mutex) 20472: { 20472: if (__gthread_active_p ()) 20472: return __gthrw_pthread_mutex_lock (__mutex); 20472: else 20472: return 0; 20472: } 20472: 20472: static inline int 20472: __gthread_mutex_trylock (__gthread_mutex_t *__mutex) 20472: { 20472: if (__gthread_active_p ()) 20472: return __gthrw_pthread_mutex_trylock (__mutex); 20472: else 20472: return 0; 20472: } 20472: 20472: 20472: static inline int 20472: __gthread_mutex_timedlock (__gthread_mutex_t *__mutex, 20472: const __gthread_time_t *__abs_timeout) 20472: { 20472: if (__gthread_active_p ()) 20472: return __gthrw_pthread_mutex_timedlock (__mutex, __abs_timeout); 20472: else 20472: return 0; 20472: } 20472: 20472: 20472: static inline int 20472: __gthread_mutex_unlock (__gthread_mutex_t *__mutex) 20472: { 20472: if (__gthread_active_p ()) 20472: return __gthrw_pthread_mutex_unlock (__mutex); 20472: else 20472: return 0; 20472: } 20472: # 808 "/usr/include/arm-linux-gnueabihf/c++/10/bits/gthr-default.h" 3 20472: static inline int 20472: __gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex) 20472: { 20472: return __gthread_mutex_lock (__mutex); 20472: } 20472: 20472: static inline int 20472: __gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex) 20472: { 20472: return __gthread_mutex_trylock (__mutex); 20472: } 20472: 20472: 20472: static inline int 20472: __gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *__mutex, 20472: const __gthread_time_t *__abs_timeout) 20472: { 20472: return __gthread_mutex_timedlock (__mutex, __abs_timeout); 20472: } 20472: 20472: 20472: static inline int 20472: __gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex) 20472: { 20472: return __gthread_mutex_unlock (__mutex); 20472: } 20472: 20472: static inline int 20472: __gthread_recursive_mutex_destroy (__gthread_recursive_mutex_t *__mutex) 20472: { 20472: return __gthread_mutex_destroy (__mutex); 20472: } 20472: # 850 "/usr/include/arm-linux-gnueabihf/c++/10/bits/gthr-default.h" 3 20472: static inline int 20472: __gthread_cond_broadcast (__gthread_cond_t *__cond) 20472: { 20472: return __gthrw_pthread_cond_broadcast (__cond); 20472: } 20472: 20472: static inline int 20472: __gthread_cond_signal (__gthread_cond_t *__cond) 20472: { 20472: return __gthrw_pthread_cond_signal (__cond); 20472: } 20472: 20472: static inline int 20472: __gthread_cond_wait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex) 20472: { 20472: return __gthrw_pthread_cond_wait (__cond, __mutex); 20472: } 20472: 20472: static inline int 20472: __gthread_cond_timedwait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex, 20472: const __gthread_time_t *__abs_timeout) 20472: { 20472: return __gthrw_pthread_cond_timedwait (__cond, __mutex, __abs_timeout); 20472: } 20472: 20472: static inline int 20472: __gthread_cond_wait_recursive (__gthread_cond_t *__cond, 20472: __gthread_recursive_mutex_t *__mutex) 20472: { 20472: return __gthread_cond_wait (__cond, __mutex); 20472: } 20472: 20472: static inline int 20472: __gthread_cond_destroy (__gthread_cond_t* __cond) 20472: { 20472: return __gthrw_pthread_cond_destroy (__cond); 20472: } 20472: # 149 "/usr/include/arm-linux-gnueabihf/c++/10/bits/gthr.h" 2 3 20472: 20472: 20472: #pragma GCC visibility pop 20472: # 36 "/usr/include/c++/10/ext/atomicity.h" 2 3 20472: # 1 "/usr/include/arm-linux-gnueabihf/c++/10/bits/atomic_word.h" 1 3 20472: # 32 "/usr/include/arm-linux-gnueabihf/c++/10/bits/atomic_word.h" 3 20472: typedef int _Atomic_word; 20472: # 37 "/usr/include/c++/10/ext/atomicity.h" 2 3 20472: 20472: namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: inline _Atomic_word 20472: __attribute__((__always_inline__)) 20472: __exchange_and_add(volatile _Atomic_word* __mem, int __val) 20472: { return __atomic_fetch_add(__mem, __val, 4); } 20472: 20472: inline void 20472: __attribute__((__always_inline__)) 20472: __atomic_add(volatile _Atomic_word* __mem, int __val) 20472: { __atomic_fetch_add(__mem, __val, 4); } 20472: # 64 "/usr/include/c++/10/ext/atomicity.h" 3 20472: inline _Atomic_word 20472: __attribute__((__always_inline__)) 20472: __exchange_and_add_single(_Atomic_word* __mem, int __val) 20472: { 20472: _Atomic_word __result = *__mem; 20472: *__mem += __val; 20472: return __result; 20472: } 20472: 20472: inline void 20472: __attribute__((__always_inline__)) 20472: __atomic_add_single(_Atomic_word* __mem, int __val) 20472: { *__mem += __val; } 20472: 20472: inline _Atomic_word 20472: __attribute__ ((__always_inline__)) 20472: __exchange_and_add_dispatch(_Atomic_word* __mem, int __val) 20472: { 20472: 20472: if (__gthread_active_p()) 20472: return __exchange_and_add(__mem, __val); 20472: 20472: return __exchange_and_add_single(__mem, __val); 20472: } 20472: 20472: inline void 20472: __attribute__ ((__always_inline__)) 20472: __atomic_add_dispatch(_Atomic_word* __mem, int __val) 20472: { 20472: 20472: if (__gthread_active_p()) 20472: { 20472: __atomic_add(__mem, __val); 20472: return; 20472: } 20472: 20472: __atomic_add_single(__mem, __val); 20472: } 20472: 20472: 20472: } 20472: # 76 "/usr/include/c++/10/memory" 2 3 20472: # 1 "/usr/include/c++/10/ext/concurrence.h" 1 3 20472: # 32 "/usr/include/c++/10/ext/concurrence.h" 3 20472: 20472: # 33 "/usr/include/c++/10/ext/concurrence.h" 3 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: enum _Lock_policy { _S_single, _S_mutex, _S_atomic }; 20472: 20472: 20472: 20472: static const _Lock_policy __default_lock_policy = 20472: 20472: 20472: 20472: _S_atomic; 20472: 20472: 20472: 20472: 20472: 20472: 20472: class __concurrence_lock_error : public std::exception 20472: { 20472: public: 20472: virtual char const* 20472: what() const throw() 20472: { return "__gnu_cxx::__concurrence_lock_error"; } 20472: }; 20472: 20472: class __concurrence_unlock_error : public std::exception 20472: { 20472: public: 20472: virtual char const* 20472: what() const throw() 20472: { return "__gnu_cxx::__concurrence_unlock_error"; } 20472: }; 20472: 20472: class __concurrence_broadcast_error : public std::exception 20472: { 20472: public: 20472: virtual char const* 20472: what() const throw() 20472: { return "__gnu_cxx::__concurrence_broadcast_error"; } 20472: }; 20472: 20472: class __concurrence_wait_error : public std::exception 20472: { 20472: public: 20472: virtual char const* 20472: what() const throw() 20472: { return "__gnu_cxx::__concurrence_wait_error"; } 20472: }; 20472: 20472: 20472: inline void 20472: __throw_concurrence_lock_error() 20472: { (throw (__concurrence_lock_error())); } 20472: 20472: inline void 20472: __throw_concurrence_unlock_error() 20472: { (throw (__concurrence_unlock_error())); } 20472: 20472: 20472: inline void 20472: __throw_concurrence_broadcast_error() 20472: { (throw (__concurrence_broadcast_error())); } 20472: 20472: inline void 20472: __throw_concurrence_wait_error() 20472: { (throw (__concurrence_wait_error())); } 20472: 20472: 20472: class __mutex 20472: { 20472: private: 20472: 20472: __gthread_mutex_t _M_mutex = { { 0, 0, 0, PTHREAD_MUTEX_TIMED_NP, 0, { 0 } } }; 20472: 20472: 20472: 20472: 20472: __mutex(const __mutex&); 20472: __mutex& operator=(const __mutex&); 20472: 20472: public: 20472: __mutex() 20472: { 20472: 20472: 20472: 20472: 20472: } 20472: # 144 "/usr/include/c++/10/ext/concurrence.h" 3 20472: void lock() 20472: { 20472: 20472: if (__gthread_active_p()) 20472: { 20472: if (__gthread_mutex_lock(&_M_mutex) != 0) 20472: __throw_concurrence_lock_error(); 20472: } 20472: 20472: } 20472: 20472: void unlock() 20472: { 20472: 20472: if (__gthread_active_p()) 20472: { 20472: if (__gthread_mutex_unlock(&_M_mutex) != 0) 20472: __throw_concurrence_unlock_error(); 20472: } 20472: 20472: } 20472: 20472: __gthread_mutex_t* gthread_mutex(void) 20472: { return &_M_mutex; } 20472: }; 20472: 20472: class __recursive_mutex 20472: { 20472: private: 20472: 20472: __gthread_recursive_mutex_t _M_mutex = { { 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, 0, { 0 } } }; 20472: 20472: 20472: 20472: 20472: __recursive_mutex(const __recursive_mutex&); 20472: __recursive_mutex& operator=(const __recursive_mutex&); 20472: 20472: public: 20472: __recursive_mutex() 20472: { 20472: 20472: 20472: 20472: 20472: } 20472: # 199 "/usr/include/c++/10/ext/concurrence.h" 3 20472: void lock() 20472: { 20472: 20472: if (__gthread_active_p()) 20472: { 20472: if (__gthread_recursive_mutex_lock(&_M_mutex) != 0) 20472: __throw_concurrence_lock_error(); 20472: } 20472: 20472: } 20472: 20472: void unlock() 20472: { 20472: 20472: if (__gthread_active_p()) 20472: { 20472: if (__gthread_recursive_mutex_unlock(&_M_mutex) != 0) 20472: __throw_concurrence_unlock_error(); 20472: } 20472: 20472: } 20472: 20472: __gthread_recursive_mutex_t* gthread_recursive_mutex(void) 20472: { return &_M_mutex; } 20472: }; 20472: 20472: 20472: 20472: 20472: class __scoped_lock 20472: { 20472: public: 20472: typedef __mutex __mutex_type; 20472: 20472: private: 20472: __mutex_type& _M_device; 20472: 20472: __scoped_lock(const __scoped_lock&); 20472: __scoped_lock& operator=(const __scoped_lock&); 20472: 20472: public: 20472: explicit __scoped_lock(__mutex_type& __name) : _M_device(__name) 20472: { _M_device.lock(); } 20472: 20472: ~__scoped_lock() throw() 20472: { _M_device.unlock(); } 20472: }; 20472: 20472: 20472: class __cond 20472: { 20472: private: 20472: 20472: __gthread_cond_t _M_cond = { { {0}, {0}, {0, 0}, {0, 0}, 0, 0, {0, 0} } }; 20472: 20472: 20472: 20472: 20472: __cond(const __cond&); 20472: __cond& operator=(const __cond&); 20472: 20472: public: 20472: __cond() 20472: { 20472: 20472: 20472: 20472: 20472: } 20472: # 277 "/usr/include/c++/10/ext/concurrence.h" 3 20472: void broadcast() 20472: { 20472: 20472: if (__gthread_active_p()) 20472: { 20472: if (__gthread_cond_broadcast(&_M_cond) != 0) 20472: __throw_concurrence_broadcast_error(); 20472: } 20472: 20472: } 20472: 20472: void wait(__mutex *mutex) 20472: { 20472: 20472: { 20472: if (__gthread_cond_wait(&_M_cond, mutex->gthread_mutex()) != 0) 20472: __throw_concurrence_wait_error(); 20472: } 20472: 20472: } 20472: 20472: void wait_recursive(__recursive_mutex *mutex) 20472: { 20472: 20472: { 20472: if (__gthread_cond_wait_recursive(&_M_cond, 20472: mutex->gthread_recursive_mutex()) 20472: != 0) 20472: __throw_concurrence_wait_error(); 20472: } 20472: 20472: } 20472: }; 20472: 20472: 20472: 20472: } 20472: # 77 "/usr/include/c++/10/memory" 2 3 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "/usr/include/c++/10/bits/unique_ptr.h" 1 3 20472: # 45 "/usr/include/c++/10/bits/unique_ptr.h" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: #pragma GCC diagnostic push 20472: #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 20472: template class auto_ptr; 20472: #pragma GCC diagnostic pop 20472: 20472: 20472: 20472: template 20472: struct default_delete 20472: { 20472: 20472: constexpr default_delete() noexcept = default; 20472: 20472: 20472: 20472: 20472: 20472: 20472: template>> 20472: default_delete(const default_delete<_Up>&) noexcept { } 20472: 20472: 20472: void 20472: operator()(_Tp* __ptr) const 20472: { 20472: static_assert(!is_void<_Tp>::value, 20472: "can't delete pointer to incomplete type"); 20472: static_assert(sizeof(_Tp)>0, 20472: "can't delete pointer to incomplete type"); 20472: delete __ptr; 20472: } 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct default_delete<_Tp[]> 20472: { 20472: public: 20472: 20472: constexpr default_delete() noexcept = default; 20472: # 109 "/usr/include/c++/10/bits/unique_ptr.h" 3 20472: template>> 20472: default_delete(const default_delete<_Up[]>&) noexcept { } 20472: 20472: 20472: template 20472: typename enable_if::value>::type 20472: operator()(_Up* __ptr) const 20472: { 20472: static_assert(sizeof(_Tp)>0, 20472: "can't delete pointer to incomplete type"); 20472: delete [] __ptr; 20472: } 20472: }; 20472: 20472: 20472: 20472: 20472: template 20472: class __uniq_ptr_impl 20472: { 20472: template 20472: struct _Ptr 20472: { 20472: using type = _Up*; 20472: }; 20472: 20472: template 20472: struct 20472: _Ptr<_Up, _Ep, __void_t::type::pointer>> 20472: { 20472: using type = typename remove_reference<_Ep>::type::pointer; 20472: }; 20472: 20472: public: 20472: using _DeleterConstraint = enable_if< 20472: __and_<__not_>, 20472: is_default_constructible<_Dp>>::value>; 20472: 20472: using pointer = typename _Ptr<_Tp, _Dp>::type; 20472: 20472: static_assert( !is_rvalue_reference<_Dp>::value, 20472: "unique_ptr's deleter type must be a function object type" 20472: " or an lvalue reference type" ); 20472: 20472: __uniq_ptr_impl() = default; 20472: __uniq_ptr_impl(pointer __p) : _M_t() { _M_ptr() = __p; } 20472: 20472: template 20472: __uniq_ptr_impl(pointer __p, _Del&& __d) 20472: : _M_t(__p, std::forward<_Del>(__d)) { } 20472: 20472: __uniq_ptr_impl(__uniq_ptr_impl&& __u) noexcept 20472: : _M_t(std::move(__u._M_t)) 20472: { __u._M_ptr() = nullptr; } 20472: 20472: __uniq_ptr_impl& operator=(__uniq_ptr_impl&& __u) noexcept 20472: { 20472: reset(__u.release()); 20472: _M_deleter() = std::forward<_Dp>(__u._M_deleter()); 20472: return *this; 20472: } 20472: 20472: pointer& _M_ptr() { return std::get<0>(_M_t); } 20472: pointer _M_ptr() const { return std::get<0>(_M_t); } 20472: _Dp& _M_deleter() { return std::get<1>(_M_t); } 20472: const _Dp& _M_deleter() const { return std::get<1>(_M_t); } 20472: 20472: void reset(pointer __p) noexcept 20472: { 20472: const pointer __old_p = _M_ptr(); 20472: _M_ptr() = __p; 20472: if (__old_p) 20472: _M_deleter()(__old_p); 20472: } 20472: 20472: pointer release() noexcept 20472: { 20472: pointer __p = _M_ptr(); 20472: _M_ptr() = nullptr; 20472: return __p; 20472: } 20472: 20472: void 20472: swap(__uniq_ptr_impl& __rhs) noexcept 20472: { 20472: using std::swap; 20472: swap(this->_M_ptr(), __rhs._M_ptr()); 20472: swap(this->_M_deleter(), __rhs._M_deleter()); 20472: } 20472: 20472: private: 20472: tuple _M_t; 20472: }; 20472: 20472: 20472: template ::value, 20472: bool = is_move_assignable<_Dp>::value> 20472: struct __uniq_ptr_data : __uniq_ptr_impl<_Tp, _Dp> 20472: { 20472: using __uniq_ptr_impl<_Tp, _Dp>::__uniq_ptr_impl; 20472: __uniq_ptr_data(__uniq_ptr_data&&) = default; 20472: __uniq_ptr_data& operator=(__uniq_ptr_data&&) = default; 20472: }; 20472: 20472: template 20472: struct __uniq_ptr_data<_Tp, _Dp, true, false> : __uniq_ptr_impl<_Tp, _Dp> 20472: { 20472: using __uniq_ptr_impl<_Tp, _Dp>::__uniq_ptr_impl; 20472: __uniq_ptr_data(__uniq_ptr_data&&) = default; 20472: __uniq_ptr_data& operator=(__uniq_ptr_data&&) = delete; 20472: }; 20472: 20472: template 20472: struct __uniq_ptr_data<_Tp, _Dp, false, true> : __uniq_ptr_impl<_Tp, _Dp> 20472: { 20472: using __uniq_ptr_impl<_Tp, _Dp>::__uniq_ptr_impl; 20472: __uniq_ptr_data(__uniq_ptr_data&&) = delete; 20472: __uniq_ptr_data& operator=(__uniq_ptr_data&&) = default; 20472: }; 20472: 20472: template 20472: struct __uniq_ptr_data<_Tp, _Dp, false, false> : __uniq_ptr_impl<_Tp, _Dp> 20472: { 20472: using __uniq_ptr_impl<_Tp, _Dp>::__uniq_ptr_impl; 20472: __uniq_ptr_data(__uniq_ptr_data&&) = delete; 20472: __uniq_ptr_data& operator=(__uniq_ptr_data&&) = delete; 20472: }; 20472: 20472: 20472: 20472: template > 20472: class unique_ptr 20472: { 20472: template 20472: using _DeleterConstraint = 20472: typename __uniq_ptr_impl<_Tp, _Up>::_DeleterConstraint::type; 20472: 20472: __uniq_ptr_data<_Tp, _Dp> _M_t; 20472: 20472: public: 20472: using pointer = typename __uniq_ptr_impl<_Tp, _Dp>::pointer; 20472: using element_type = _Tp; 20472: using deleter_type = _Dp; 20472: 20472: private: 20472: 20472: 20472: template 20472: using __safe_conversion_up = __and_< 20472: is_convertible::pointer, pointer>, 20472: __not_> 20472: >; 20472: 20472: public: 20472: 20472: 20472: 20472: template> 20472: constexpr unique_ptr() noexcept 20472: : _M_t() 20472: { } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template> 20472: explicit 20472: unique_ptr(pointer __p) noexcept 20472: : _M_t(__p) 20472: { } 20472: # 292 "/usr/include/c++/10/bits/unique_ptr.h" 3 20472: template>> 20472: unique_ptr(pointer __p, const deleter_type& __d) noexcept 20472: : _M_t(__p, __d) { } 20472: # 304 "/usr/include/c++/10/bits/unique_ptr.h" 3 20472: template>> 20472: unique_ptr(pointer __p, 20472: __enable_if_t::value, 20472: _Del&&> __d) noexcept 20472: : _M_t(__p, std::move(__d)) 20472: { } 20472: 20472: template::type> 20472: unique_ptr(pointer, 20472: __enable_if_t::value, 20472: _DelUnref&&>) = delete; 20472: 20472: 20472: template> 20472: constexpr unique_ptr(nullptr_t) noexcept 20472: : _M_t() 20472: { } 20472: 20472: 20472: 20472: 20472: unique_ptr(unique_ptr&&) = default; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template, 20472: typename conditional::value, 20472: is_same<_Ep, _Dp>, 20472: is_convertible<_Ep, _Dp>>::type>> 20472: unique_ptr(unique_ptr<_Up, _Ep>&& __u) noexcept 20472: : _M_t(__u.release(), std::forward<_Ep>(__u.get_deleter())) 20472: { } 20472: 20472: 20472: #pragma GCC diagnostic push 20472: #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 20472: 20472: template, is_same<_Dp, default_delete<_Tp>>>> 20472: unique_ptr(auto_ptr<_Up>&& __u) noexcept; 20472: #pragma GCC diagnostic pop 20472: 20472: 20472: 20472: ~unique_ptr() noexcept 20472: { 20472: static_assert(__is_invocable::value, 20472: "unique_ptr's deleter must be invocable with a pointer"); 20472: auto& __ptr = _M_t._M_ptr(); 20472: if (__ptr != nullptr) 20472: get_deleter()(std::move(__ptr)); 20472: __ptr = pointer(); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: unique_ptr& operator=(unique_ptr&&) = default; 20472: # 380 "/usr/include/c++/10/bits/unique_ptr.h" 3 20472: template 20472: typename enable_if< __and_< 20472: __safe_conversion_up<_Up, _Ep>, 20472: is_assignable 20472: >::value, 20472: unique_ptr&>::type 20472: operator=(unique_ptr<_Up, _Ep>&& __u) noexcept 20472: { 20472: reset(__u.release()); 20472: get_deleter() = std::forward<_Ep>(__u.get_deleter()); 20472: return *this; 20472: } 20472: 20472: 20472: unique_ptr& 20472: operator=(nullptr_t) noexcept 20472: { 20472: reset(); 20472: return *this; 20472: } 20472: 20472: 20472: 20472: 20472: typename add_lvalue_reference::type 20472: operator*() const 20472: { 20472: ; 20472: return *get(); 20472: } 20472: 20472: 20472: pointer 20472: operator->() const noexcept 20472: { 20472: ; 20472: return get(); 20472: } 20472: 20472: 20472: pointer 20472: get() const noexcept 20472: { return _M_t._M_ptr(); } 20472: 20472: 20472: deleter_type& 20472: get_deleter() noexcept 20472: { return _M_t._M_deleter(); } 20472: 20472: 20472: const deleter_type& 20472: get_deleter() const noexcept 20472: { return _M_t._M_deleter(); } 20472: 20472: 20472: explicit operator bool() const noexcept 20472: { return get() == pointer() ? false : true; } 20472: 20472: 20472: 20472: 20472: pointer 20472: release() noexcept 20472: { return _M_t.release(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: void 20472: reset(pointer __p = pointer()) noexcept 20472: { 20472: static_assert(__is_invocable::value, 20472: "unique_ptr's deleter must be invocable with a pointer"); 20472: _M_t.reset(std::move(__p)); 20472: } 20472: 20472: 20472: void 20472: swap(unique_ptr& __u) noexcept 20472: { 20472: static_assert(__is_swappable<_Dp>::value, "deleter must be swappable"); 20472: _M_t.swap(__u._M_t); 20472: } 20472: 20472: 20472: unique_ptr(const unique_ptr&) = delete; 20472: unique_ptr& operator=(const unique_ptr&) = delete; 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: template 20472: class unique_ptr<_Tp[], _Dp> 20472: { 20472: template 20472: using _DeleterConstraint = 20472: typename __uniq_ptr_impl<_Tp, _Up>::_DeleterConstraint::type; 20472: 20472: __uniq_ptr_data<_Tp, _Dp> _M_t; 20472: 20472: template 20472: using __remove_cv = typename remove_cv<_Up>::type; 20472: 20472: 20472: template 20472: using __is_derived_Tp 20472: = __and_< is_base_of<_Tp, _Up>, 20472: __not_, __remove_cv<_Up>>> >; 20472: 20472: public: 20472: using pointer = typename __uniq_ptr_impl<_Tp, _Dp>::pointer; 20472: using element_type = _Tp; 20472: using deleter_type = _Dp; 20472: 20472: 20472: 20472: template, 20472: typename _UP_pointer = typename _UPtr::pointer, 20472: typename _UP_element_type = typename _UPtr::element_type> 20472: using __safe_conversion_up = __and_< 20472: is_array<_Up>, 20472: is_same, 20472: is_same<_UP_pointer, _UP_element_type*>, 20472: is_convertible<_UP_element_type(*)[], element_type(*)[]> 20472: >; 20472: 20472: 20472: template 20472: using __safe_conversion_raw = __and_< 20472: __or_<__or_, 20472: is_same<_Up, nullptr_t>>, 20472: __and_, 20472: is_same, 20472: is_convertible< 20472: typename remove_pointer<_Up>::type(*)[], 20472: element_type(*)[]> 20472: > 20472: > 20472: >; 20472: 20472: 20472: 20472: 20472: template> 20472: constexpr unique_ptr() noexcept 20472: : _M_t() 20472: { } 20472: # 541 "/usr/include/c++/10/bits/unique_ptr.h" 3 20472: template, 20472: typename = typename enable_if< 20472: __safe_conversion_raw<_Up>::value, bool>::type> 20472: explicit 20472: unique_ptr(_Up __p) noexcept 20472: : _M_t(__p) 20472: { } 20472: # 559 "/usr/include/c++/10/bits/unique_ptr.h" 3 20472: template, 20472: is_copy_constructible<_Del>>> 20472: unique_ptr(_Up __p, const deleter_type& __d) noexcept 20472: : _M_t(__p, __d) { } 20472: # 573 "/usr/include/c++/10/bits/unique_ptr.h" 3 20472: template, 20472: is_move_constructible<_Del>>> 20472: unique_ptr(_Up __p, 20472: __enable_if_t::value, 20472: _Del&&> __d) noexcept 20472: : _M_t(std::move(__p), std::move(__d)) 20472: { } 20472: 20472: template::type, 20472: typename = _Require<__safe_conversion_raw<_Up>>> 20472: unique_ptr(_Up, 20472: __enable_if_t::value, 20472: _DelUnref&&>) = delete; 20472: 20472: 20472: unique_ptr(unique_ptr&&) = default; 20472: 20472: 20472: template> 20472: constexpr unique_ptr(nullptr_t) noexcept 20472: : _M_t() 20472: { } 20472: 20472: template, 20472: typename conditional::value, 20472: is_same<_Ep, _Dp>, 20472: is_convertible<_Ep, _Dp>>::type>> 20472: unique_ptr(unique_ptr<_Up, _Ep>&& __u) noexcept 20472: : _M_t(__u.release(), std::forward<_Ep>(__u.get_deleter())) 20472: { } 20472: 20472: 20472: ~unique_ptr() 20472: { 20472: auto& __ptr = _M_t._M_ptr(); 20472: if (__ptr != nullptr) 20472: get_deleter()(__ptr); 20472: __ptr = pointer(); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: unique_ptr& 20472: operator=(unique_ptr&&) = default; 20472: # 632 "/usr/include/c++/10/bits/unique_ptr.h" 3 20472: template 20472: typename 20472: enable_if<__and_<__safe_conversion_up<_Up, _Ep>, 20472: is_assignable 20472: >::value, 20472: unique_ptr&>::type 20472: operator=(unique_ptr<_Up, _Ep>&& __u) noexcept 20472: { 20472: reset(__u.release()); 20472: get_deleter() = std::forward<_Ep>(__u.get_deleter()); 20472: return *this; 20472: } 20472: 20472: 20472: unique_ptr& 20472: operator=(nullptr_t) noexcept 20472: { 20472: reset(); 20472: return *this; 20472: } 20472: 20472: 20472: 20472: 20472: typename std::add_lvalue_reference::type 20472: operator[](size_t __i) const 20472: { 20472: ; 20472: return get()[__i]; 20472: } 20472: 20472: 20472: pointer 20472: get() const noexcept 20472: { return _M_t._M_ptr(); } 20472: 20472: 20472: deleter_type& 20472: get_deleter() noexcept 20472: { return _M_t._M_deleter(); } 20472: 20472: 20472: const deleter_type& 20472: get_deleter() const noexcept 20472: { return _M_t._M_deleter(); } 20472: 20472: 20472: explicit operator bool() const noexcept 20472: { return get() == pointer() ? false : true; } 20472: 20472: 20472: 20472: 20472: pointer 20472: release() noexcept 20472: { return _M_t.release(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template , 20472: __and_, 20472: is_pointer<_Up>, 20472: is_convertible< 20472: typename remove_pointer<_Up>::type(*)[], 20472: element_type(*)[] 20472: > 20472: > 20472: > 20472: >> 20472: void 20472: reset(_Up __p) noexcept 20472: { _M_t.reset(std::move(__p)); } 20472: 20472: void reset(nullptr_t = nullptr) noexcept 20472: { reset(pointer()); } 20472: 20472: 20472: void 20472: swap(unique_ptr& __u) noexcept 20472: { 20472: static_assert(__is_swappable<_Dp>::value, "deleter must be swappable"); 20472: _M_t.swap(__u._M_t); 20472: } 20472: 20472: 20472: unique_ptr(const unique_ptr&) = delete; 20472: unique_ptr& operator=(const unique_ptr&) = delete; 20472: }; 20472: 20472: 20472: 20472: 20472: template 20472: inline 20472: 20472: 20472: 20472: 20472: void 20472: 20472: swap(unique_ptr<_Tp, _Dp>& __x, 20472: unique_ptr<_Tp, _Dp>& __y) noexcept 20472: { __x.swap(__y); } 20472: # 750 "/usr/include/c++/10/bits/unique_ptr.h" 3 20472: template 20472: inline bool 20472: operator==(const unique_ptr<_Tp, _Dp>& __x, 20472: const unique_ptr<_Up, _Ep>& __y) 20472: { return __x.get() == __y.get(); } 20472: 20472: 20472: template 20472: inline bool 20472: operator==(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) noexcept 20472: { return !__x; } 20472: 20472: 20472: 20472: template 20472: inline bool 20472: operator==(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) noexcept 20472: { return !__x; } 20472: 20472: 20472: template 20472: inline bool 20472: operator!=(const unique_ptr<_Tp, _Dp>& __x, 20472: const unique_ptr<_Up, _Ep>& __y) 20472: { return __x.get() != __y.get(); } 20472: 20472: 20472: template 20472: inline bool 20472: operator!=(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) noexcept 20472: { return (bool)__x; } 20472: 20472: 20472: template 20472: inline bool 20472: operator!=(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) noexcept 20472: { return (bool)__x; } 20472: 20472: 20472: 20472: template 20472: inline bool 20472: operator<(const unique_ptr<_Tp, _Dp>& __x, 20472: const unique_ptr<_Up, _Ep>& __y) 20472: { 20472: typedef typename 20472: std::common_type::pointer, 20472: typename unique_ptr<_Up, _Ep>::pointer>::type _CT; 20472: return std::less<_CT>()(__x.get(), __y.get()); 20472: } 20472: 20472: 20472: template 20472: inline bool 20472: operator<(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) 20472: { 20472: return std::less::pointer>()(__x.get(), 20472: nullptr); 20472: } 20472: 20472: 20472: template 20472: inline bool 20472: operator<(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) 20472: { 20472: return std::less::pointer>()(nullptr, 20472: __x.get()); 20472: } 20472: 20472: 20472: template 20472: inline bool 20472: operator<=(const unique_ptr<_Tp, _Dp>& __x, 20472: const unique_ptr<_Up, _Ep>& __y) 20472: { return !(__y < __x); } 20472: 20472: 20472: template 20472: inline bool 20472: operator<=(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) 20472: { return !(nullptr < __x); } 20472: 20472: 20472: template 20472: inline bool 20472: operator<=(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) 20472: { return !(__x < nullptr); } 20472: 20472: 20472: template 20472: inline bool 20472: operator>(const unique_ptr<_Tp, _Dp>& __x, 20472: const unique_ptr<_Up, _Ep>& __y) 20472: { return (__y < __x); } 20472: 20472: 20472: template 20472: inline bool 20472: operator>(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) 20472: { 20472: return std::less::pointer>()(nullptr, 20472: __x.get()); 20472: } 20472: 20472: 20472: template 20472: inline bool 20472: operator>(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) 20472: { 20472: return std::less::pointer>()(__x.get(), 20472: nullptr); 20472: } 20472: 20472: 20472: template 20472: inline bool 20472: operator>=(const unique_ptr<_Tp, _Dp>& __x, 20472: const unique_ptr<_Up, _Ep>& __y) 20472: { return !(__x < __y); } 20472: 20472: 20472: template 20472: inline bool 20472: operator>=(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) 20472: { return !(__x < nullptr); } 20472: 20472: 20472: template 20472: inline bool 20472: operator>=(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) 20472: { return !(nullptr < __x); } 20472: # 912 "/usr/include/c++/10/bits/unique_ptr.h" 3 20472: template::__enable_hash_call> 20472: struct __uniq_ptr_hash 20472: 20472: : private __poison_hash<_Ptr> 20472: 20472: { 20472: size_t 20472: operator()(const _Up& __u) const 20472: noexcept(noexcept(std::declval>()(std::declval<_Ptr>()))) 20472: { return hash<_Ptr>()(__u.get()); } 20472: }; 20472: 20472: template 20472: struct __uniq_ptr_hash<_Up, _Ptr, false> 20472: : private __poison_hash<_Ptr> 20472: { }; 20472: 20472: 20472: 20472: template 20472: struct hash> 20472: : public __hash_base>, 20472: public __uniq_ptr_hash> 20472: { }; 20472: # 1008 "/usr/include/c++/10/bits/unique_ptr.h" 3 20472: 20472: } 20472: # 84 "/usr/include/c++/10/memory" 2 3 20472: # 1 "/usr/include/c++/10/bits/shared_ptr.h" 1 3 20472: # 52 "/usr/include/c++/10/bits/shared_ptr.h" 3 20472: # 1 "/usr/include/c++/10/bits/shared_ptr_base.h" 1 3 20472: # 53 "/usr/include/c++/10/bits/shared_ptr_base.h" 3 20472: # 1 "/usr/include/c++/10/bits/allocated_ptr.h" 1 3 20472: # 40 "/usr/include/c++/10/bits/allocated_ptr.h" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: template 20472: struct __allocated_ptr 20472: { 20472: using pointer = typename allocator_traits<_Alloc>::pointer; 20472: using value_type = typename allocator_traits<_Alloc>::value_type; 20472: 20472: 20472: __allocated_ptr(_Alloc& __a, pointer __ptr) noexcept 20472: : _M_alloc(std::__addressof(__a)), _M_ptr(__ptr) 20472: { } 20472: 20472: 20472: template>> 20472: __allocated_ptr(_Alloc& __a, _Ptr __ptr) 20472: : _M_alloc(std::__addressof(__a)), 20472: _M_ptr(pointer_traits::pointer_to(*__ptr)) 20472: { } 20472: 20472: 20472: __allocated_ptr(__allocated_ptr&& __gd) noexcept 20472: : _M_alloc(__gd._M_alloc), _M_ptr(__gd._M_ptr) 20472: { __gd._M_ptr = nullptr; } 20472: 20472: 20472: ~__allocated_ptr() 20472: { 20472: if (_M_ptr != nullptr) 20472: std::allocator_traits<_Alloc>::deallocate(*_M_alloc, _M_ptr, 1); 20472: } 20472: 20472: 20472: __allocated_ptr& 20472: operator=(std::nullptr_t) noexcept 20472: { 20472: _M_ptr = nullptr; 20472: return *this; 20472: } 20472: 20472: 20472: value_type* get() { return std::__to_address(_M_ptr); } 20472: 20472: private: 20472: _Alloc* _M_alloc; 20472: pointer _M_ptr; 20472: }; 20472: 20472: 20472: template 20472: __allocated_ptr<_Alloc> 20472: __allocate_guarded(_Alloc& __a) 20472: { 20472: return { __a, std::allocator_traits<_Alloc>::allocate(__a, 1) }; 20472: } 20472: 20472: 20472: } 20472: # 54 "/usr/include/c++/10/bits/shared_ptr_base.h" 2 3 20472: 20472: 20472: # 1 "/usr/include/c++/10/ext/aligned_buffer.h" 1 3 20472: # 32 "/usr/include/c++/10/ext/aligned_buffer.h" 3 20472: 20472: # 33 "/usr/include/c++/10/ext/aligned_buffer.h" 3 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: namespace __gnu_cxx 20472: { 20472: 20472: 20472: 20472: 20472: template 20472: struct __aligned_membuf 20472: { 20472: 20472: 20472: 20472: 20472: 20472: struct _Tp2 { _Tp _M_t; }; 20472: 20472: alignas(__alignof__(_Tp2::_M_t)) unsigned char _M_storage[sizeof(_Tp)]; 20472: 20472: __aligned_membuf() = default; 20472: 20472: 20472: __aligned_membuf(std::nullptr_t) { } 20472: 20472: void* 20472: _M_addr() noexcept 20472: { return static_cast(&_M_storage); } 20472: 20472: const void* 20472: _M_addr() const noexcept 20472: { return static_cast(&_M_storage); } 20472: 20472: _Tp* 20472: _M_ptr() noexcept 20472: { return static_cast<_Tp*>(_M_addr()); } 20472: 20472: const _Tp* 20472: _M_ptr() const noexcept 20472: { return static_cast(_M_addr()); } 20472: }; 20472: # 89 "/usr/include/c++/10/ext/aligned_buffer.h" 3 20472: template 20472: struct __aligned_buffer 20472: : std::aligned_storage 20472: { 20472: typename 20472: std::aligned_storage::type _M_storage; 20472: 20472: __aligned_buffer() = default; 20472: 20472: 20472: __aligned_buffer(std::nullptr_t) { } 20472: 20472: void* 20472: _M_addr() noexcept 20472: { 20472: return static_cast(&_M_storage); 20472: } 20472: 20472: const void* 20472: _M_addr() const noexcept 20472: { 20472: return static_cast(&_M_storage); 20472: } 20472: 20472: _Tp* 20472: _M_ptr() noexcept 20472: { return static_cast<_Tp*>(_M_addr()); } 20472: 20472: const _Tp* 20472: _M_ptr() const noexcept 20472: { return static_cast(_M_addr()); } 20472: }; 20472: 20472: 20472: } 20472: # 57 "/usr/include/c++/10/bits/shared_ptr_base.h" 2 3 20472: 20472: 20472: 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: #pragma GCC diagnostic push 20472: #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 20472: template class auto_ptr; 20472: #pragma GCC diagnostic pop 20472: 20472: 20472: 20472: 20472: 20472: 20472: class bad_weak_ptr : public std::exception 20472: { 20472: public: 20472: virtual char const* what() const noexcept; 20472: 20472: virtual ~bad_weak_ptr() noexcept; 20472: }; 20472: 20472: 20472: inline void 20472: __throw_bad_weak_ptr() 20472: { (throw (bad_weak_ptr())); } 20472: 20472: using __gnu_cxx::_Lock_policy; 20472: using __gnu_cxx::__default_lock_policy; 20472: using __gnu_cxx::_S_single; 20472: using __gnu_cxx::_S_mutex; 20472: using __gnu_cxx::_S_atomic; 20472: 20472: 20472: template<_Lock_policy _Lp> 20472: class _Mutex_base 20472: { 20472: protected: 20472: 20472: enum { _S_need_barriers = 0 }; 20472: }; 20472: 20472: template<> 20472: class _Mutex_base<_S_mutex> 20472: : public __gnu_cxx::__mutex 20472: { 20472: protected: 20472: 20472: 20472: 20472: enum { _S_need_barriers = 1 }; 20472: }; 20472: 20472: template<_Lock_policy _Lp = __default_lock_policy> 20472: class _Sp_counted_base 20472: : public _Mutex_base<_Lp> 20472: { 20472: public: 20472: _Sp_counted_base() noexcept 20472: : _M_use_count(1), _M_weak_count(1) { } 20472: 20472: virtual 20472: ~_Sp_counted_base() noexcept 20472: { } 20472: 20472: 20472: 20472: virtual void 20472: _M_dispose() noexcept = 0; 20472: 20472: 20472: virtual void 20472: _M_destroy() noexcept 20472: { delete this; } 20472: 20472: virtual void* 20472: _M_get_deleter(const std::type_info&) noexcept = 0; 20472: 20472: void 20472: _M_add_ref_copy() 20472: { __gnu_cxx::__atomic_add_dispatch(&_M_use_count, 1); } 20472: 20472: void 20472: _M_add_ref_lock(); 20472: 20472: bool 20472: _M_add_ref_lock_nothrow(); 20472: 20472: void 20472: _M_release() noexcept 20472: { 20472: 20472: ; 20472: if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, -1) == 1) 20472: { 20472: ; 20472: _M_dispose(); 20472: 20472: 20472: 20472: 20472: if (_Mutex_base<_Lp>::_S_need_barriers) 20472: { 20472: __atomic_thread_fence (4); 20472: } 20472: 20472: 20472: ; 20472: if (__gnu_cxx::__exchange_and_add_dispatch(&_M_weak_count, 20472: -1) == 1) 20472: { 20472: ; 20472: _M_destroy(); 20472: } 20472: } 20472: } 20472: 20472: void 20472: _M_weak_add_ref() noexcept 20472: { __gnu_cxx::__atomic_add_dispatch(&_M_weak_count, 1); } 20472: 20472: void 20472: _M_weak_release() noexcept 20472: { 20472: 20472: ; 20472: if (__gnu_cxx::__exchange_and_add_dispatch(&_M_weak_count, -1) == 1) 20472: { 20472: ; 20472: if (_Mutex_base<_Lp>::_S_need_barriers) 20472: { 20472: 20472: 20472: __atomic_thread_fence (4); 20472: } 20472: _M_destroy(); 20472: } 20472: } 20472: 20472: long 20472: _M_get_use_count() const noexcept 20472: { 20472: 20472: 20472: return __atomic_load_n(&_M_use_count, 0); 20472: } 20472: 20472: private: 20472: _Sp_counted_base(_Sp_counted_base const&) = delete; 20472: _Sp_counted_base& operator=(_Sp_counted_base const&) = delete; 20472: 20472: _Atomic_word _M_use_count; 20472: _Atomic_word _M_weak_count; 20472: }; 20472: 20472: template<> 20472: inline void 20472: _Sp_counted_base<_S_single>:: 20472: _M_add_ref_lock() 20472: { 20472: if (_M_use_count == 0) 20472: __throw_bad_weak_ptr(); 20472: ++_M_use_count; 20472: } 20472: 20472: template<> 20472: inline void 20472: _Sp_counted_base<_S_mutex>:: 20472: _M_add_ref_lock() 20472: { 20472: __gnu_cxx::__scoped_lock sentry(*this); 20472: if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, 1) == 0) 20472: { 20472: _M_use_count = 0; 20472: __throw_bad_weak_ptr(); 20472: } 20472: } 20472: 20472: template<> 20472: inline void 20472: _Sp_counted_base<_S_atomic>:: 20472: _M_add_ref_lock() 20472: { 20472: 20472: _Atomic_word __count = _M_get_use_count(); 20472: do 20472: { 20472: if (__count == 0) 20472: __throw_bad_weak_ptr(); 20472: 20472: 20472: } 20472: while (!__atomic_compare_exchange_n(&_M_use_count, &__count, __count + 1, 20472: true, 4, 20472: 0)); 20472: } 20472: 20472: template<> 20472: inline bool 20472: _Sp_counted_base<_S_single>:: 20472: _M_add_ref_lock_nothrow() 20472: { 20472: if (_M_use_count == 0) 20472: return false; 20472: ++_M_use_count; 20472: return true; 20472: } 20472: 20472: template<> 20472: inline bool 20472: _Sp_counted_base<_S_mutex>:: 20472: _M_add_ref_lock_nothrow() 20472: { 20472: __gnu_cxx::__scoped_lock sentry(*this); 20472: if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, 1) == 0) 20472: { 20472: _M_use_count = 0; 20472: return false; 20472: } 20472: return true; 20472: } 20472: 20472: template<> 20472: inline bool 20472: _Sp_counted_base<_S_atomic>:: 20472: _M_add_ref_lock_nothrow() 20472: { 20472: 20472: _Atomic_word __count = _M_get_use_count(); 20472: do 20472: { 20472: if (__count == 0) 20472: return false; 20472: 20472: 20472: } 20472: while (!__atomic_compare_exchange_n(&_M_use_count, &__count, __count + 1, 20472: true, 4, 20472: 0)); 20472: return true; 20472: } 20472: 20472: template<> 20472: inline void 20472: _Sp_counted_base<_S_single>::_M_add_ref_copy() 20472: { ++_M_use_count; } 20472: 20472: template<> 20472: inline void 20472: _Sp_counted_base<_S_single>::_M_release() noexcept 20472: { 20472: if (--_M_use_count == 0) 20472: { 20472: _M_dispose(); 20472: if (--_M_weak_count == 0) 20472: _M_destroy(); 20472: } 20472: } 20472: 20472: template<> 20472: inline void 20472: _Sp_counted_base<_S_single>::_M_weak_add_ref() noexcept 20472: { ++_M_weak_count; } 20472: 20472: template<> 20472: inline void 20472: _Sp_counted_base<_S_single>::_M_weak_release() noexcept 20472: { 20472: if (--_M_weak_count == 0) 20472: _M_destroy(); 20472: } 20472: 20472: template<> 20472: inline long 20472: _Sp_counted_base<_S_single>::_M_get_use_count() const noexcept 20472: { return _M_use_count; } 20472: 20472: 20472: 20472: template 20472: class __shared_ptr; 20472: 20472: template 20472: class __weak_ptr; 20472: 20472: template 20472: class __enable_shared_from_this; 20472: 20472: template 20472: class shared_ptr; 20472: 20472: template 20472: class weak_ptr; 20472: 20472: template 20472: struct owner_less; 20472: 20472: template 20472: class enable_shared_from_this; 20472: 20472: template<_Lock_policy _Lp = __default_lock_policy> 20472: class __weak_count; 20472: 20472: template<_Lock_policy _Lp = __default_lock_policy> 20472: class __shared_count; 20472: 20472: 20472: 20472: template 20472: class _Sp_counted_ptr final : public _Sp_counted_base<_Lp> 20472: { 20472: public: 20472: explicit 20472: _Sp_counted_ptr(_Ptr __p) noexcept 20472: : _M_ptr(__p) { } 20472: 20472: virtual void 20472: _M_dispose() noexcept 20472: { delete _M_ptr; } 20472: 20472: virtual void 20472: _M_destroy() noexcept 20472: { delete this; } 20472: 20472: virtual void* 20472: _M_get_deleter(const std::type_info&) noexcept 20472: { return nullptr; } 20472: 20472: _Sp_counted_ptr(const _Sp_counted_ptr&) = delete; 20472: _Sp_counted_ptr& operator=(const _Sp_counted_ptr&) = delete; 20472: 20472: private: 20472: _Ptr _M_ptr; 20472: }; 20472: 20472: template<> 20472: inline void 20472: _Sp_counted_ptr::_M_dispose() noexcept { } 20472: 20472: template<> 20472: inline void 20472: _Sp_counted_ptr::_M_dispose() noexcept { } 20472: 20472: template<> 20472: inline void 20472: _Sp_counted_ptr::_M_dispose() noexcept { } 20472: 20472: template 20472: struct _Sp_ebo_helper; 20472: 20472: 20472: template 20472: struct _Sp_ebo_helper<_Nm, _Tp, true> : private _Tp 20472: { 20472: explicit _Sp_ebo_helper(const _Tp& __tp) : _Tp(__tp) { } 20472: explicit _Sp_ebo_helper(_Tp&& __tp) : _Tp(std::move(__tp)) { } 20472: 20472: static _Tp& 20472: _S_get(_Sp_ebo_helper& __eboh) { return static_cast<_Tp&>(__eboh); } 20472: }; 20472: 20472: 20472: template 20472: struct _Sp_ebo_helper<_Nm, _Tp, false> 20472: { 20472: explicit _Sp_ebo_helper(const _Tp& __tp) : _M_tp(__tp) { } 20472: explicit _Sp_ebo_helper(_Tp&& __tp) : _M_tp(std::move(__tp)) { } 20472: 20472: static _Tp& 20472: _S_get(_Sp_ebo_helper& __eboh) 20472: { return __eboh._M_tp; } 20472: 20472: private: 20472: _Tp _M_tp; 20472: }; 20472: 20472: 20472: template 20472: class _Sp_counted_deleter final : public _Sp_counted_base<_Lp> 20472: { 20472: class _Impl : _Sp_ebo_helper<0, _Deleter>, _Sp_ebo_helper<1, _Alloc> 20472: { 20472: typedef _Sp_ebo_helper<0, _Deleter> _Del_base; 20472: typedef _Sp_ebo_helper<1, _Alloc> _Alloc_base; 20472: 20472: public: 20472: _Impl(_Ptr __p, _Deleter __d, const _Alloc& __a) noexcept 20472: : _M_ptr(__p), _Del_base(std::move(__d)), _Alloc_base(__a) 20472: { } 20472: 20472: _Deleter& _M_del() noexcept { return _Del_base::_S_get(*this); } 20472: _Alloc& _M_alloc() noexcept { return _Alloc_base::_S_get(*this); } 20472: 20472: _Ptr _M_ptr; 20472: }; 20472: 20472: public: 20472: using __allocator_type = __alloc_rebind<_Alloc, _Sp_counted_deleter>; 20472: 20472: 20472: _Sp_counted_deleter(_Ptr __p, _Deleter __d) noexcept 20472: : _M_impl(__p, std::move(__d), _Alloc()) { } 20472: 20472: 20472: _Sp_counted_deleter(_Ptr __p, _Deleter __d, const _Alloc& __a) noexcept 20472: : _M_impl(__p, std::move(__d), __a) { } 20472: 20472: ~_Sp_counted_deleter() noexcept { } 20472: 20472: virtual void 20472: _M_dispose() noexcept 20472: { _M_impl._M_del()(_M_impl._M_ptr); } 20472: 20472: virtual void 20472: _M_destroy() noexcept 20472: { 20472: __allocator_type __a(_M_impl._M_alloc()); 20472: __allocated_ptr<__allocator_type> __guard_ptr{ __a, this }; 20472: this->~_Sp_counted_deleter(); 20472: } 20472: 20472: virtual void* 20472: _M_get_deleter(const std::type_info& __ti) noexcept 20472: { 20472: 20472: 20472: 20472: return __ti == typeid(_Deleter) 20472: ? std::__addressof(_M_impl._M_del()) 20472: : nullptr; 20472: 20472: 20472: 20472: } 20472: 20472: private: 20472: _Impl _M_impl; 20472: }; 20472: 20472: 20472: 20472: struct _Sp_make_shared_tag 20472: { 20472: private: 20472: template 20472: friend class _Sp_counted_ptr_inplace; 20472: 20472: static const type_info& 20472: _S_ti() noexcept __attribute__ ((__visibility__ ("default"))) 20472: { 20472: alignas(type_info) static constexpr char __tag[sizeof(type_info)] = { }; 20472: return reinterpret_cast(__tag); 20472: } 20472: 20472: static bool _S_eq(const type_info&) noexcept; 20472: }; 20472: 20472: template 20472: struct _Sp_alloc_shared_tag 20472: { 20472: const _Alloc& _M_a; 20472: }; 20472: 20472: template 20472: class _Sp_counted_ptr_inplace final : public _Sp_counted_base<_Lp> 20472: { 20472: class _Impl : _Sp_ebo_helper<0, _Alloc> 20472: { 20472: typedef _Sp_ebo_helper<0, _Alloc> _A_base; 20472: 20472: public: 20472: explicit _Impl(_Alloc __a) noexcept : _A_base(__a) { } 20472: 20472: _Alloc& _M_alloc() noexcept { return _A_base::_S_get(*this); } 20472: 20472: __gnu_cxx::__aligned_buffer<_Tp> _M_storage; 20472: }; 20472: 20472: public: 20472: using __allocator_type = __alloc_rebind<_Alloc, _Sp_counted_ptr_inplace>; 20472: 20472: 20472: template 20472: _Sp_counted_ptr_inplace(_Alloc __a, _Args&&... __args) 20472: : _M_impl(__a) 20472: { 20472: 20472: 20472: allocator_traits<_Alloc>::construct(__a, _M_ptr(), 20472: std::forward<_Args>(__args)...); 20472: } 20472: 20472: ~_Sp_counted_ptr_inplace() noexcept { } 20472: 20472: virtual void 20472: _M_dispose() noexcept 20472: { 20472: allocator_traits<_Alloc>::destroy(_M_impl._M_alloc(), _M_ptr()); 20472: } 20472: 20472: 20472: virtual void 20472: _M_destroy() noexcept 20472: { 20472: __allocator_type __a(_M_impl._M_alloc()); 20472: __allocated_ptr<__allocator_type> __guard_ptr{ __a, this }; 20472: this->~_Sp_counted_ptr_inplace(); 20472: } 20472: 20472: private: 20472: friend class __shared_count<_Lp>; 20472: 20472: 20472: 20472: virtual void* 20472: _M_get_deleter(const std::type_info& __ti) noexcept override 20472: { 20472: auto __ptr = const_cast::type*>(_M_ptr()); 20472: 20472: 20472: 20472: 20472: if (&__ti == &_Sp_make_shared_tag::_S_ti() 20472: || 20472: 20472: __ti == typeid(_Sp_make_shared_tag) 20472: 20472: 20472: 20472: ) 20472: return __ptr; 20472: return nullptr; 20472: } 20472: 20472: _Tp* _M_ptr() noexcept { return _M_impl._M_storage._M_ptr(); } 20472: 20472: _Impl _M_impl; 20472: }; 20472: 20472: 20472: struct __sp_array_delete 20472: { 20472: template 20472: void operator()(_Yp* __p) const { delete[] __p; } 20472: }; 20472: 20472: template<_Lock_policy _Lp> 20472: class __shared_count 20472: { 20472: template 20472: struct __not_alloc_shared_tag { using type = void; }; 20472: 20472: template 20472: struct __not_alloc_shared_tag<_Sp_alloc_shared_tag<_Tp>> { }; 20472: 20472: public: 20472: constexpr __shared_count() noexcept : _M_pi(0) 20472: { } 20472: 20472: template 20472: explicit 20472: __shared_count(_Ptr __p) : _M_pi(0) 20472: { 20472: try 20472: { 20472: _M_pi = new _Sp_counted_ptr<_Ptr, _Lp>(__p); 20472: } 20472: catch(...) 20472: { 20472: delete __p; 20472: throw; 20472: } 20472: } 20472: 20472: template 20472: __shared_count(_Ptr __p, false_type) 20472: : __shared_count(__p) 20472: { } 20472: 20472: template 20472: __shared_count(_Ptr __p, true_type) 20472: : __shared_count(__p, __sp_array_delete{}, allocator()) 20472: { } 20472: 20472: template::type> 20472: __shared_count(_Ptr __p, _Deleter __d) 20472: : __shared_count(__p, std::move(__d), allocator()) 20472: { } 20472: 20472: template::type> 20472: __shared_count(_Ptr __p, _Deleter __d, _Alloc __a) : _M_pi(0) 20472: { 20472: typedef _Sp_counted_deleter<_Ptr, _Deleter, _Alloc, _Lp> _Sp_cd_type; 20472: try 20472: { 20472: typename _Sp_cd_type::__allocator_type __a2(__a); 20472: auto __guard = std::__allocate_guarded(__a2); 20472: _Sp_cd_type* __mem = __guard.get(); 20472: ::new (__mem) _Sp_cd_type(__p, std::move(__d), std::move(__a)); 20472: _M_pi = __mem; 20472: __guard = nullptr; 20472: } 20472: catch(...) 20472: { 20472: __d(__p); 20472: throw; 20472: } 20472: } 20472: 20472: template 20472: __shared_count(_Tp*& __p, _Sp_alloc_shared_tag<_Alloc> __a, 20472: _Args&&... __args) 20472: { 20472: typedef _Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp> _Sp_cp_type; 20472: typename _Sp_cp_type::__allocator_type __a2(__a._M_a); 20472: auto __guard = std::__allocate_guarded(__a2); 20472: _Sp_cp_type* __mem = __guard.get(); 20472: auto __pi = ::new (__mem) 20472: _Sp_cp_type(__a._M_a, std::forward<_Args>(__args)...); 20472: __guard = nullptr; 20472: _M_pi = __pi; 20472: __p = __pi->_M_ptr(); 20472: } 20472: 20472: 20472: #pragma GCC diagnostic push 20472: #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 20472: 20472: template 20472: explicit 20472: __shared_count(std::auto_ptr<_Tp>&& __r); 20472: #pragma GCC diagnostic pop 20472: 20472: 20472: 20472: template 20472: explicit 20472: __shared_count(std::unique_ptr<_Tp, _Del>&& __r) : _M_pi(0) 20472: { 20472: 20472: 20472: if (__r.get() == nullptr) 20472: return; 20472: 20472: using _Ptr = typename unique_ptr<_Tp, _Del>::pointer; 20472: using _Del2 = typename conditional::value, 20472: reference_wrapper::type>, 20472: _Del>::type; 20472: using _Sp_cd_type 20472: = _Sp_counted_deleter<_Ptr, _Del2, allocator, _Lp>; 20472: using _Alloc = allocator<_Sp_cd_type>; 20472: using _Alloc_traits = allocator_traits<_Alloc>; 20472: _Alloc __a; 20472: _Sp_cd_type* __mem = _Alloc_traits::allocate(__a, 1); 20472: _Alloc_traits::construct(__a, __mem, __r.release(), 20472: __r.get_deleter()); 20472: _M_pi = __mem; 20472: } 20472: 20472: 20472: explicit __shared_count(const __weak_count<_Lp>& __r); 20472: 20472: 20472: explicit __shared_count(const __weak_count<_Lp>& __r, std::nothrow_t); 20472: 20472: ~__shared_count() noexcept 20472: { 20472: if (_M_pi != nullptr) 20472: _M_pi->_M_release(); 20472: } 20472: 20472: __shared_count(const __shared_count& __r) noexcept 20472: : _M_pi(__r._M_pi) 20472: { 20472: if (_M_pi != 0) 20472: _M_pi->_M_add_ref_copy(); 20472: } 20472: 20472: __shared_count& 20472: operator=(const __shared_count& __r) noexcept 20472: { 20472: _Sp_counted_base<_Lp>* __tmp = __r._M_pi; 20472: if (__tmp != _M_pi) 20472: { 20472: if (__tmp != 0) 20472: __tmp->_M_add_ref_copy(); 20472: if (_M_pi != 0) 20472: _M_pi->_M_release(); 20472: _M_pi = __tmp; 20472: } 20472: return *this; 20472: } 20472: 20472: void 20472: _M_swap(__shared_count& __r) noexcept 20472: { 20472: _Sp_counted_base<_Lp>* __tmp = __r._M_pi; 20472: __r._M_pi = _M_pi; 20472: _M_pi = __tmp; 20472: } 20472: 20472: long 20472: _M_get_use_count() const noexcept 20472: { return _M_pi != 0 ? _M_pi->_M_get_use_count() : 0; } 20472: 20472: bool 20472: _M_unique() const noexcept 20472: { return this->_M_get_use_count() == 1; } 20472: 20472: void* 20472: _M_get_deleter(const std::type_info& __ti) const noexcept 20472: { return _M_pi ? _M_pi->_M_get_deleter(__ti) : nullptr; } 20472: 20472: bool 20472: _M_less(const __shared_count& __rhs) const noexcept 20472: { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); } 20472: 20472: bool 20472: _M_less(const __weak_count<_Lp>& __rhs) const noexcept 20472: { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); } 20472: 20472: 20472: friend inline bool 20472: operator==(const __shared_count& __a, const __shared_count& __b) noexcept 20472: { return __a._M_pi == __b._M_pi; } 20472: 20472: private: 20472: friend class __weak_count<_Lp>; 20472: 20472: _Sp_counted_base<_Lp>* _M_pi; 20472: }; 20472: 20472: 20472: template<_Lock_policy _Lp> 20472: class __weak_count 20472: { 20472: public: 20472: constexpr __weak_count() noexcept : _M_pi(nullptr) 20472: { } 20472: 20472: __weak_count(const __shared_count<_Lp>& __r) noexcept 20472: : _M_pi(__r._M_pi) 20472: { 20472: if (_M_pi != nullptr) 20472: _M_pi->_M_weak_add_ref(); 20472: } 20472: 20472: __weak_count(const __weak_count& __r) noexcept 20472: : _M_pi(__r._M_pi) 20472: { 20472: if (_M_pi != nullptr) 20472: _M_pi->_M_weak_add_ref(); 20472: } 20472: 20472: __weak_count(__weak_count&& __r) noexcept 20472: : _M_pi(__r._M_pi) 20472: { __r._M_pi = nullptr; } 20472: 20472: ~__weak_count() noexcept 20472: { 20472: if (_M_pi != nullptr) 20472: _M_pi->_M_weak_release(); 20472: } 20472: 20472: __weak_count& 20472: operator=(const __shared_count<_Lp>& __r) noexcept 20472: { 20472: _Sp_counted_base<_Lp>* __tmp = __r._M_pi; 20472: if (__tmp != nullptr) 20472: __tmp->_M_weak_add_ref(); 20472: if (_M_pi != nullptr) 20472: _M_pi->_M_weak_release(); 20472: _M_pi = __tmp; 20472: return *this; 20472: } 20472: 20472: __weak_count& 20472: operator=(const __weak_count& __r) noexcept 20472: { 20472: _Sp_counted_base<_Lp>* __tmp = __r._M_pi; 20472: if (__tmp != nullptr) 20472: __tmp->_M_weak_add_ref(); 20472: if (_M_pi != nullptr) 20472: _M_pi->_M_weak_release(); 20472: _M_pi = __tmp; 20472: return *this; 20472: } 20472: 20472: __weak_count& 20472: operator=(__weak_count&& __r) noexcept 20472: { 20472: if (_M_pi != nullptr) 20472: _M_pi->_M_weak_release(); 20472: _M_pi = __r._M_pi; 20472: __r._M_pi = nullptr; 20472: return *this; 20472: } 20472: 20472: void 20472: _M_swap(__weak_count& __r) noexcept 20472: { 20472: _Sp_counted_base<_Lp>* __tmp = __r._M_pi; 20472: __r._M_pi = _M_pi; 20472: _M_pi = __tmp; 20472: } 20472: 20472: long 20472: _M_get_use_count() const noexcept 20472: { return _M_pi != nullptr ? _M_pi->_M_get_use_count() : 0; } 20472: 20472: bool 20472: _M_less(const __weak_count& __rhs) const noexcept 20472: { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); } 20472: 20472: bool 20472: _M_less(const __shared_count<_Lp>& __rhs) const noexcept 20472: { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); } 20472: 20472: 20472: friend inline bool 20472: operator==(const __weak_count& __a, const __weak_count& __b) noexcept 20472: { return __a._M_pi == __b._M_pi; } 20472: 20472: private: 20472: friend class __shared_count<_Lp>; 20472: 20472: _Sp_counted_base<_Lp>* _M_pi; 20472: }; 20472: 20472: 20472: template<_Lock_policy _Lp> 20472: inline 20472: __shared_count<_Lp>::__shared_count(const __weak_count<_Lp>& __r) 20472: : _M_pi(__r._M_pi) 20472: { 20472: if (_M_pi != nullptr) 20472: _M_pi->_M_add_ref_lock(); 20472: else 20472: __throw_bad_weak_ptr(); 20472: } 20472: 20472: 20472: template<_Lock_policy _Lp> 20472: inline 20472: __shared_count<_Lp>:: 20472: __shared_count(const __weak_count<_Lp>& __r, std::nothrow_t) 20472: : _M_pi(__r._M_pi) 20472: { 20472: if (_M_pi != nullptr) 20472: if (!_M_pi->_M_add_ref_lock_nothrow()) 20472: _M_pi = nullptr; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct __sp_compatible_with 20472: : false_type 20472: { }; 20472: 20472: template 20472: struct __sp_compatible_with<_Yp*, _Tp*> 20472: : is_convertible<_Yp*, _Tp*>::type 20472: { }; 20472: 20472: template 20472: struct __sp_compatible_with<_Up(*)[_Nm], _Up(*)[]> 20472: : true_type 20472: { }; 20472: 20472: template 20472: struct __sp_compatible_with<_Up(*)[_Nm], const _Up(*)[]> 20472: : true_type 20472: { }; 20472: 20472: template 20472: struct __sp_compatible_with<_Up(*)[_Nm], volatile _Up(*)[]> 20472: : true_type 20472: { }; 20472: 20472: template 20472: struct __sp_compatible_with<_Up(*)[_Nm], const volatile _Up(*)[]> 20472: : true_type 20472: { }; 20472: 20472: 20472: template 20472: struct __sp_is_constructible_arrN 20472: : false_type 20472: { }; 20472: 20472: template 20472: struct __sp_is_constructible_arrN<_Up, _Nm, _Yp, __void_t<_Yp[_Nm]>> 20472: : is_convertible<_Yp(*)[_Nm], _Up(*)[_Nm]>::type 20472: { }; 20472: 20472: 20472: template 20472: struct __sp_is_constructible_arr 20472: : false_type 20472: { }; 20472: 20472: template 20472: struct __sp_is_constructible_arr<_Up, _Yp, __void_t<_Yp[]>> 20472: : is_convertible<_Yp(*)[], _Up(*)[]>::type 20472: { }; 20472: 20472: 20472: template 20472: struct __sp_is_constructible; 20472: 20472: 20472: template 20472: struct __sp_is_constructible<_Up[_Nm], _Yp> 20472: : __sp_is_constructible_arrN<_Up, _Nm, _Yp>::type 20472: { }; 20472: 20472: 20472: template 20472: struct __sp_is_constructible<_Up[], _Yp> 20472: : __sp_is_constructible_arr<_Up, _Yp>::type 20472: { }; 20472: 20472: 20472: template 20472: struct __sp_is_constructible 20472: : is_convertible<_Yp*, _Tp*>::type 20472: { }; 20472: 20472: 20472: 20472: template::value, bool = is_void<_Tp>::value> 20472: class __shared_ptr_access 20472: { 20472: public: 20472: using element_type = _Tp; 20472: 20472: element_type& 20472: operator*() const noexcept 20472: { 20472: ; 20472: return *_M_get(); 20472: } 20472: 20472: element_type* 20472: operator->() const noexcept 20472: { 20472: ; 20472: return _M_get(); 20472: } 20472: 20472: private: 20472: element_type* 20472: _M_get() const noexcept 20472: { return static_cast*>(this)->get(); } 20472: }; 20472: 20472: 20472: template 20472: class __shared_ptr_access<_Tp, _Lp, false, true> 20472: { 20472: public: 20472: using element_type = _Tp; 20472: 20472: element_type* 20472: operator->() const noexcept 20472: { 20472: auto __ptr = static_cast*>(this)->get(); 20472: ; 20472: return __ptr; 20472: } 20472: }; 20472: 20472: 20472: template 20472: class __shared_ptr_access<_Tp, _Lp, true, false> 20472: { 20472: public: 20472: using element_type = typename remove_extent<_Tp>::type; 20472: 20472: 20472: [[__deprecated__("shared_ptr::operator* is absent from C++17")]] 20472: element_type& 20472: operator*() const noexcept 20472: { 20472: ; 20472: return *_M_get(); 20472: } 20472: 20472: [[__deprecated__("shared_ptr::operator-> is absent from C++17")]] 20472: element_type* 20472: operator->() const noexcept 20472: { 20472: ; 20472: return _M_get(); 20472: } 20472: 20472: 20472: element_type& 20472: operator[](ptrdiff_t __i) const 20472: { 20472: ; 20472: ; 20472: return _M_get()[__i]; 20472: } 20472: 20472: private: 20472: element_type* 20472: _M_get() const noexcept 20472: { return static_cast*>(this)->get(); } 20472: }; 20472: 20472: template 20472: class __shared_ptr 20472: : public __shared_ptr_access<_Tp, _Lp> 20472: { 20472: public: 20472: using element_type = typename remove_extent<_Tp>::type; 20472: 20472: private: 20472: 20472: template 20472: using _SafeConv 20472: = typename enable_if<__sp_is_constructible<_Tp, _Yp>::value>::type; 20472: 20472: 20472: template 20472: using _Compatible = typename 20472: enable_if<__sp_compatible_with<_Yp*, _Tp*>::value, _Res>::type; 20472: 20472: 20472: template 20472: using _Assignable = _Compatible<_Yp, __shared_ptr&>; 20472: 20472: 20472: template::pointer> 20472: using _UniqCompatible = typename enable_if<__and_< 20472: __sp_compatible_with<_Yp*, _Tp*>, is_convertible<_Ptr, element_type*> 20472: >::value, _Res>::type; 20472: 20472: 20472: template 20472: using _UniqAssignable = _UniqCompatible<_Yp, _Del, __shared_ptr&>; 20472: 20472: public: 20472: 20472: 20472: 20472: 20472: 20472: constexpr __shared_ptr() noexcept 20472: : _M_ptr(0), _M_refcount() 20472: { } 20472: 20472: template> 20472: explicit 20472: __shared_ptr(_Yp* __p) 20472: : _M_ptr(__p), _M_refcount(__p, typename is_array<_Tp>::type()) 20472: { 20472: static_assert( !is_void<_Yp>::value, "incomplete type" ); 20472: static_assert( sizeof(_Yp) > 0, "incomplete type" ); 20472: _M_enable_shared_from_this_with(__p); 20472: } 20472: 20472: template> 20472: __shared_ptr(_Yp* __p, _Deleter __d) 20472: : _M_ptr(__p), _M_refcount(__p, std::move(__d)) 20472: { 20472: static_assert(__is_invocable<_Deleter&, _Yp*&>::value, 20472: "deleter expression d(p) is well-formed"); 20472: _M_enable_shared_from_this_with(__p); 20472: } 20472: 20472: template> 20472: __shared_ptr(_Yp* __p, _Deleter __d, _Alloc __a) 20472: : _M_ptr(__p), _M_refcount(__p, std::move(__d), std::move(__a)) 20472: { 20472: static_assert(__is_invocable<_Deleter&, _Yp*&>::value, 20472: "deleter expression d(p) is well-formed"); 20472: _M_enable_shared_from_this_with(__p); 20472: } 20472: 20472: template 20472: __shared_ptr(nullptr_t __p, _Deleter __d) 20472: : _M_ptr(0), _M_refcount(__p, std::move(__d)) 20472: { } 20472: 20472: template 20472: __shared_ptr(nullptr_t __p, _Deleter __d, _Alloc __a) 20472: : _M_ptr(0), _M_refcount(__p, std::move(__d), std::move(__a)) 20472: { } 20472: 20472: 20472: template 20472: __shared_ptr(const __shared_ptr<_Yp, _Lp>& __r, 20472: element_type* __p) noexcept 20472: : _M_ptr(__p), _M_refcount(__r._M_refcount) 20472: { } 20472: 20472: 20472: template 20472: __shared_ptr(__shared_ptr<_Yp, _Lp>&& __r, 20472: element_type* __p) noexcept 20472: : _M_ptr(__p), _M_refcount() 20472: { 20472: _M_refcount._M_swap(__r._M_refcount); 20472: __r._M_ptr = 0; 20472: } 20472: 20472: __shared_ptr(const __shared_ptr&) noexcept = default; 20472: __shared_ptr& operator=(const __shared_ptr&) noexcept = default; 20472: ~__shared_ptr() = default; 20472: 20472: template> 20472: __shared_ptr(const __shared_ptr<_Yp, _Lp>& __r) noexcept 20472: : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) 20472: { } 20472: 20472: __shared_ptr(__shared_ptr&& __r) noexcept 20472: : _M_ptr(__r._M_ptr), _M_refcount() 20472: { 20472: _M_refcount._M_swap(__r._M_refcount); 20472: __r._M_ptr = 0; 20472: } 20472: 20472: template> 20472: __shared_ptr(__shared_ptr<_Yp, _Lp>&& __r) noexcept 20472: : _M_ptr(__r._M_ptr), _M_refcount() 20472: { 20472: _M_refcount._M_swap(__r._M_refcount); 20472: __r._M_ptr = 0; 20472: } 20472: 20472: template> 20472: explicit __shared_ptr(const __weak_ptr<_Yp, _Lp>& __r) 20472: : _M_refcount(__r._M_refcount) 20472: { 20472: 20472: 20472: _M_ptr = __r._M_ptr; 20472: } 20472: 20472: 20472: template> 20472: __shared_ptr(unique_ptr<_Yp, _Del>&& __r) 20472: : _M_ptr(__r.get()), _M_refcount() 20472: { 20472: auto __raw = __to_address(__r.get()); 20472: _M_refcount = __shared_count<_Lp>(std::move(__r)); 20472: _M_enable_shared_from_this_with(__raw); 20472: } 20472: 20472: 20472: protected: 20472: 20472: template>, is_array<_Tp1>, 20472: is_convertible::pointer, _Tp*> 20472: >::value, bool>::type = true> 20472: __shared_ptr(unique_ptr<_Tp1, _Del>&& __r, __sp_array_delete) 20472: : _M_ptr(__r.get()), _M_refcount() 20472: { 20472: auto __raw = __to_address(__r.get()); 20472: _M_refcount = __shared_count<_Lp>(std::move(__r)); 20472: _M_enable_shared_from_this_with(__raw); 20472: } 20472: public: 20472: 20472: 20472: 20472: #pragma GCC diagnostic push 20472: #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 20472: 20472: template> 20472: __shared_ptr(auto_ptr<_Yp>&& __r); 20472: #pragma GCC diagnostic pop 20472: 20472: 20472: constexpr __shared_ptr(nullptr_t) noexcept : __shared_ptr() { } 20472: 20472: template 20472: _Assignable<_Yp> 20472: operator=(const __shared_ptr<_Yp, _Lp>& __r) noexcept 20472: { 20472: _M_ptr = __r._M_ptr; 20472: _M_refcount = __r._M_refcount; 20472: return *this; 20472: } 20472: 20472: 20472: #pragma GCC diagnostic push 20472: #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 20472: template 20472: _Assignable<_Yp> 20472: operator=(auto_ptr<_Yp>&& __r) 20472: { 20472: __shared_ptr(std::move(__r)).swap(*this); 20472: return *this; 20472: } 20472: #pragma GCC diagnostic pop 20472: 20472: 20472: __shared_ptr& 20472: operator=(__shared_ptr&& __r) noexcept 20472: { 20472: __shared_ptr(std::move(__r)).swap(*this); 20472: return *this; 20472: } 20472: 20472: template 20472: _Assignable<_Yp> 20472: operator=(__shared_ptr<_Yp, _Lp>&& __r) noexcept 20472: { 20472: __shared_ptr(std::move(__r)).swap(*this); 20472: return *this; 20472: } 20472: 20472: template 20472: _UniqAssignable<_Yp, _Del> 20472: operator=(unique_ptr<_Yp, _Del>&& __r) 20472: { 20472: __shared_ptr(std::move(__r)).swap(*this); 20472: return *this; 20472: } 20472: 20472: void 20472: reset() noexcept 20472: { __shared_ptr().swap(*this); } 20472: 20472: template 20472: _SafeConv<_Yp> 20472: reset(_Yp* __p) 20472: { 20472: 20472: ; 20472: __shared_ptr(__p).swap(*this); 20472: } 20472: 20472: template 20472: _SafeConv<_Yp> 20472: reset(_Yp* __p, _Deleter __d) 20472: { __shared_ptr(__p, std::move(__d)).swap(*this); } 20472: 20472: template 20472: _SafeConv<_Yp> 20472: reset(_Yp* __p, _Deleter __d, _Alloc __a) 20472: { __shared_ptr(__p, std::move(__d), std::move(__a)).swap(*this); } 20472: 20472: 20472: element_type* 20472: get() const noexcept 20472: { return _M_ptr; } 20472: 20472: 20472: explicit operator bool() const 20472: { return _M_ptr == 0 ? false : true; } 20472: 20472: 20472: bool 20472: unique() const noexcept 20472: { return _M_refcount._M_unique(); } 20472: 20472: 20472: long 20472: use_count() const noexcept 20472: { return _M_refcount._M_get_use_count(); } 20472: 20472: 20472: void 20472: swap(__shared_ptr<_Tp, _Lp>& __other) noexcept 20472: { 20472: std::swap(_M_ptr, __other._M_ptr); 20472: _M_refcount._M_swap(__other._M_refcount); 20472: } 20472: # 1356 "/usr/include/c++/10/bits/shared_ptr_base.h" 3 20472: template 20472: bool 20472: owner_before(__shared_ptr<_Tp1, _Lp> const& __rhs) const noexcept 20472: { return _M_refcount._M_less(__rhs._M_refcount); } 20472: 20472: template 20472: bool 20472: owner_before(__weak_ptr<_Tp1, _Lp> const& __rhs) const noexcept 20472: { return _M_refcount._M_less(__rhs._M_refcount); } 20472: 20472: 20472: protected: 20472: 20472: template 20472: __shared_ptr(_Sp_alloc_shared_tag<_Alloc> __tag, _Args&&... __args) 20472: : _M_ptr(), _M_refcount(_M_ptr, __tag, std::forward<_Args>(__args)...) 20472: { _M_enable_shared_from_this_with(_M_ptr); } 20472: 20472: template 20472: friend __shared_ptr<_Tp1, _Lp1> 20472: __allocate_shared(const _Alloc& __a, _Args&&... __args); 20472: 20472: 20472: 20472: __shared_ptr(const __weak_ptr<_Tp, _Lp>& __r, std::nothrow_t) 20472: : _M_refcount(__r._M_refcount, std::nothrow) 20472: { 20472: _M_ptr = _M_refcount._M_get_use_count() ? __r._M_ptr : nullptr; 20472: } 20472: 20472: friend class __weak_ptr<_Tp, _Lp>; 20472: 20472: private: 20472: 20472: template 20472: using __esft_base_t = decltype(__enable_shared_from_this_base( 20472: std::declval&>(), 20472: std::declval<_Yp*>())); 20472: 20472: 20472: template 20472: struct __has_esft_base 20472: : false_type { }; 20472: 20472: template 20472: struct __has_esft_base<_Yp, __void_t<__esft_base_t<_Yp>>> 20472: : __not_> { }; 20472: 20472: template::type> 20472: typename enable_if<__has_esft_base<_Yp2>::value>::type 20472: _M_enable_shared_from_this_with(_Yp* __p) noexcept 20472: { 20472: if (auto __base = __enable_shared_from_this_base(_M_refcount, __p)) 20472: __base->_M_weak_assign(const_cast<_Yp2*>(__p), _M_refcount); 20472: } 20472: 20472: template::type> 20472: typename enable_if::value>::type 20472: _M_enable_shared_from_this_with(_Yp*) noexcept 20472: { } 20472: 20472: void* 20472: _M_get_deleter(const std::type_info& __ti) const noexcept 20472: { return _M_refcount._M_get_deleter(__ti); } 20472: 20472: template friend class __shared_ptr; 20472: template friend class __weak_ptr; 20472: 20472: template 20472: friend _Del* get_deleter(const __shared_ptr<_Tp1, _Lp1>&) noexcept; 20472: 20472: template 20472: friend _Del* get_deleter(const shared_ptr<_Tp1>&) noexcept; 20472: 20472: element_type* _M_ptr; 20472: __shared_count<_Lp> _M_refcount; 20472: }; 20472: 20472: 20472: 20472: template 20472: inline bool 20472: operator==(const __shared_ptr<_Tp1, _Lp>& __a, 20472: const __shared_ptr<_Tp2, _Lp>& __b) noexcept 20472: { return __a.get() == __b.get(); } 20472: 20472: template 20472: inline bool 20472: operator==(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept 20472: { return !__a; } 20472: # 1463 "/usr/include/c++/10/bits/shared_ptr_base.h" 3 20472: template 20472: inline bool 20472: operator==(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept 20472: { return !__a; } 20472: 20472: template 20472: inline bool 20472: operator!=(const __shared_ptr<_Tp1, _Lp>& __a, 20472: const __shared_ptr<_Tp2, _Lp>& __b) noexcept 20472: { return __a.get() != __b.get(); } 20472: 20472: template 20472: inline bool 20472: operator!=(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept 20472: { return (bool)__a; } 20472: 20472: template 20472: inline bool 20472: operator!=(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept 20472: { return (bool)__a; } 20472: 20472: template 20472: inline bool 20472: operator<(const __shared_ptr<_Tp, _Lp>& __a, 20472: const __shared_ptr<_Up, _Lp>& __b) noexcept 20472: { 20472: using _Tp_elt = typename __shared_ptr<_Tp, _Lp>::element_type; 20472: using _Up_elt = typename __shared_ptr<_Up, _Lp>::element_type; 20472: using _Vp = typename common_type<_Tp_elt*, _Up_elt*>::type; 20472: return less<_Vp>()(__a.get(), __b.get()); 20472: } 20472: 20472: template 20472: inline bool 20472: operator<(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept 20472: { 20472: using _Tp_elt = typename __shared_ptr<_Tp, _Lp>::element_type; 20472: return less<_Tp_elt*>()(__a.get(), nullptr); 20472: } 20472: 20472: template 20472: inline bool 20472: operator<(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept 20472: { 20472: using _Tp_elt = typename __shared_ptr<_Tp, _Lp>::element_type; 20472: return less<_Tp_elt*>()(nullptr, __a.get()); 20472: } 20472: 20472: template 20472: inline bool 20472: operator<=(const __shared_ptr<_Tp1, _Lp>& __a, 20472: const __shared_ptr<_Tp2, _Lp>& __b) noexcept 20472: { return !(__b < __a); } 20472: 20472: template 20472: inline bool 20472: operator<=(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept 20472: { return !(nullptr < __a); } 20472: 20472: template 20472: inline bool 20472: operator<=(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept 20472: { return !(__a < nullptr); } 20472: 20472: template 20472: inline bool 20472: operator>(const __shared_ptr<_Tp1, _Lp>& __a, 20472: const __shared_ptr<_Tp2, _Lp>& __b) noexcept 20472: { return (__b < __a); } 20472: 20472: template 20472: inline bool 20472: operator>(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept 20472: { return nullptr < __a; } 20472: 20472: template 20472: inline bool 20472: operator>(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept 20472: { return __a < nullptr; } 20472: 20472: template 20472: inline bool 20472: operator>=(const __shared_ptr<_Tp1, _Lp>& __a, 20472: const __shared_ptr<_Tp2, _Lp>& __b) noexcept 20472: { return !(__a < __b); } 20472: 20472: template 20472: inline bool 20472: operator>=(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept 20472: { return !(__a < nullptr); } 20472: 20472: template 20472: inline bool 20472: operator>=(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept 20472: { return !(nullptr < __a); } 20472: 20472: 20472: 20472: template 20472: inline void 20472: swap(__shared_ptr<_Tp, _Lp>& __a, __shared_ptr<_Tp, _Lp>& __b) noexcept 20472: { __a.swap(__b); } 20472: # 1573 "/usr/include/c++/10/bits/shared_ptr_base.h" 3 20472: template 20472: inline __shared_ptr<_Tp, _Lp> 20472: static_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r) noexcept 20472: { 20472: using _Sp = __shared_ptr<_Tp, _Lp>; 20472: return _Sp(__r, static_cast(__r.get())); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: inline __shared_ptr<_Tp, _Lp> 20472: const_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r) noexcept 20472: { 20472: using _Sp = __shared_ptr<_Tp, _Lp>; 20472: return _Sp(__r, const_cast(__r.get())); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: inline __shared_ptr<_Tp, _Lp> 20472: dynamic_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r) noexcept 20472: { 20472: using _Sp = __shared_ptr<_Tp, _Lp>; 20472: if (auto* __p = dynamic_cast(__r.get())) 20472: return _Sp(__r, __p); 20472: return _Sp(); 20472: } 20472: # 1619 "/usr/include/c++/10/bits/shared_ptr_base.h" 3 20472: template 20472: class __weak_ptr 20472: { 20472: template 20472: using _Compatible = typename 20472: enable_if<__sp_compatible_with<_Yp*, _Tp*>::value, _Res>::type; 20472: 20472: 20472: template 20472: using _Assignable = _Compatible<_Yp, __weak_ptr&>; 20472: 20472: public: 20472: using element_type = typename remove_extent<_Tp>::type; 20472: 20472: constexpr __weak_ptr() noexcept 20472: : _M_ptr(nullptr), _M_refcount() 20472: { } 20472: 20472: __weak_ptr(const __weak_ptr&) noexcept = default; 20472: 20472: ~__weak_ptr() = default; 20472: # 1655 "/usr/include/c++/10/bits/shared_ptr_base.h" 3 20472: template> 20472: __weak_ptr(const __weak_ptr<_Yp, _Lp>& __r) noexcept 20472: : _M_refcount(__r._M_refcount) 20472: { _M_ptr = __r.lock().get(); } 20472: 20472: template> 20472: __weak_ptr(const __shared_ptr<_Yp, _Lp>& __r) noexcept 20472: : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) 20472: { } 20472: 20472: __weak_ptr(__weak_ptr&& __r) noexcept 20472: : _M_ptr(__r._M_ptr), _M_refcount(std::move(__r._M_refcount)) 20472: { __r._M_ptr = nullptr; } 20472: 20472: template> 20472: __weak_ptr(__weak_ptr<_Yp, _Lp>&& __r) noexcept 20472: : _M_ptr(__r.lock().get()), _M_refcount(std::move(__r._M_refcount)) 20472: { __r._M_ptr = nullptr; } 20472: 20472: __weak_ptr& 20472: operator=(const __weak_ptr& __r) noexcept = default; 20472: 20472: template 20472: _Assignable<_Yp> 20472: operator=(const __weak_ptr<_Yp, _Lp>& __r) noexcept 20472: { 20472: _M_ptr = __r.lock().get(); 20472: _M_refcount = __r._M_refcount; 20472: return *this; 20472: } 20472: 20472: template 20472: _Assignable<_Yp> 20472: operator=(const __shared_ptr<_Yp, _Lp>& __r) noexcept 20472: { 20472: _M_ptr = __r._M_ptr; 20472: _M_refcount = __r._M_refcount; 20472: return *this; 20472: } 20472: 20472: __weak_ptr& 20472: operator=(__weak_ptr&& __r) noexcept 20472: { 20472: _M_ptr = __r._M_ptr; 20472: _M_refcount = std::move(__r._M_refcount); 20472: __r._M_ptr = nullptr; 20472: return *this; 20472: } 20472: 20472: template 20472: _Assignable<_Yp> 20472: operator=(__weak_ptr<_Yp, _Lp>&& __r) noexcept 20472: { 20472: _M_ptr = __r.lock().get(); 20472: _M_refcount = std::move(__r._M_refcount); 20472: __r._M_ptr = nullptr; 20472: return *this; 20472: } 20472: 20472: __shared_ptr<_Tp, _Lp> 20472: lock() const noexcept 20472: { return __shared_ptr(*this, std::nothrow); } 20472: 20472: long 20472: use_count() const noexcept 20472: { return _M_refcount._M_get_use_count(); } 20472: 20472: bool 20472: expired() const noexcept 20472: { return _M_refcount._M_get_use_count() == 0; } 20472: 20472: template 20472: bool 20472: owner_before(const __shared_ptr<_Tp1, _Lp>& __rhs) const noexcept 20472: { return _M_refcount._M_less(__rhs._M_refcount); } 20472: 20472: template 20472: bool 20472: owner_before(const __weak_ptr<_Tp1, _Lp>& __rhs) const noexcept 20472: { return _M_refcount._M_less(__rhs._M_refcount); } 20472: 20472: void 20472: reset() noexcept 20472: { __weak_ptr().swap(*this); } 20472: 20472: void 20472: swap(__weak_ptr& __s) noexcept 20472: { 20472: std::swap(_M_ptr, __s._M_ptr); 20472: _M_refcount._M_swap(__s._M_refcount); 20472: } 20472: 20472: private: 20472: 20472: void 20472: _M_assign(_Tp* __ptr, const __shared_count<_Lp>& __refcount) noexcept 20472: { 20472: if (use_count() == 0) 20472: { 20472: _M_ptr = __ptr; 20472: _M_refcount = __refcount; 20472: } 20472: } 20472: 20472: template friend class __shared_ptr; 20472: template friend class __weak_ptr; 20472: friend class __enable_shared_from_this<_Tp, _Lp>; 20472: friend class enable_shared_from_this<_Tp>; 20472: 20472: element_type* _M_ptr; 20472: __weak_count<_Lp> _M_refcount; 20472: }; 20472: 20472: 20472: template 20472: inline void 20472: swap(__weak_ptr<_Tp, _Lp>& __a, __weak_ptr<_Tp, _Lp>& __b) noexcept 20472: { __a.swap(__b); } 20472: 20472: template 20472: struct _Sp_owner_less : public binary_function<_Tp, _Tp, bool> 20472: { 20472: bool 20472: operator()(const _Tp& __lhs, const _Tp& __rhs) const noexcept 20472: { return __lhs.owner_before(__rhs); } 20472: 20472: bool 20472: operator()(const _Tp& __lhs, const _Tp1& __rhs) const noexcept 20472: { return __lhs.owner_before(__rhs); } 20472: 20472: bool 20472: operator()(const _Tp1& __lhs, const _Tp& __rhs) const noexcept 20472: { return __lhs.owner_before(__rhs); } 20472: }; 20472: 20472: template<> 20472: struct _Sp_owner_less 20472: { 20472: template 20472: auto 20472: operator()(const _Tp& __lhs, const _Up& __rhs) const noexcept 20472: -> decltype(__lhs.owner_before(__rhs)) 20472: { return __lhs.owner_before(__rhs); } 20472: 20472: using is_transparent = void; 20472: }; 20472: 20472: template 20472: struct owner_less<__shared_ptr<_Tp, _Lp>> 20472: : public _Sp_owner_less<__shared_ptr<_Tp, _Lp>, __weak_ptr<_Tp, _Lp>> 20472: { }; 20472: 20472: template 20472: struct owner_less<__weak_ptr<_Tp, _Lp>> 20472: : public _Sp_owner_less<__weak_ptr<_Tp, _Lp>, __shared_ptr<_Tp, _Lp>> 20472: { }; 20472: 20472: 20472: template 20472: class __enable_shared_from_this 20472: { 20472: protected: 20472: constexpr __enable_shared_from_this() noexcept { } 20472: 20472: __enable_shared_from_this(const __enable_shared_from_this&) noexcept { } 20472: 20472: __enable_shared_from_this& 20472: operator=(const __enable_shared_from_this&) noexcept 20472: { return *this; } 20472: 20472: ~__enable_shared_from_this() { } 20472: 20472: public: 20472: __shared_ptr<_Tp, _Lp> 20472: shared_from_this() 20472: { return __shared_ptr<_Tp, _Lp>(this->_M_weak_this); } 20472: 20472: __shared_ptr 20472: shared_from_this() const 20472: { return __shared_ptr(this->_M_weak_this); } 20472: # 1846 "/usr/include/c++/10/bits/shared_ptr_base.h" 3 20472: private: 20472: template 20472: void 20472: _M_weak_assign(_Tp1* __p, const __shared_count<_Lp>& __n) const noexcept 20472: { _M_weak_this._M_assign(__p, __n); } 20472: 20472: friend const __enable_shared_from_this* 20472: __enable_shared_from_this_base(const __shared_count<_Lp>&, 20472: const __enable_shared_from_this* __p) 20472: { return __p; } 20472: 20472: template 20472: friend class __shared_ptr; 20472: 20472: mutable __weak_ptr<_Tp, _Lp> _M_weak_this; 20472: }; 20472: 20472: template 20472: inline __shared_ptr<_Tp, _Lp> 20472: __allocate_shared(const _Alloc& __a, _Args&&... __args) 20472: { 20472: return __shared_ptr<_Tp, _Lp>(_Sp_alloc_shared_tag<_Alloc>{__a}, 20472: std::forward<_Args>(__args)...); 20472: } 20472: 20472: template 20472: inline __shared_ptr<_Tp, _Lp> 20472: __make_shared(_Args&&... __args) 20472: { 20472: typedef typename std::remove_const<_Tp>::type _Tp_nc; 20472: return std::__allocate_shared<_Tp, _Lp>(std::allocator<_Tp_nc>(), 20472: std::forward<_Args>(__args)...); 20472: } 20472: 20472: 20472: template 20472: struct hash<__shared_ptr<_Tp, _Lp>> 20472: : public __hash_base> 20472: { 20472: size_t 20472: operator()(const __shared_ptr<_Tp, _Lp>& __s) const noexcept 20472: { 20472: return hash::element_type*>()( 20472: __s.get()); 20472: } 20472: }; 20472: 20472: 20472: } 20472: # 53 "/usr/include/c++/10/bits/shared_ptr.h" 2 3 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: # 67 "/usr/include/c++/10/bits/shared_ptr.h" 3 20472: template 20472: inline std::basic_ostream<_Ch, _Tr>& 20472: operator<<(std::basic_ostream<_Ch, _Tr>& __os, 20472: const __shared_ptr<_Tp, _Lp>& __p) 20472: { 20472: __os << __p.get(); 20472: return __os; 20472: } 20472: 20472: template 20472: inline _Del* 20472: get_deleter(const __shared_ptr<_Tp, _Lp>& __p) noexcept 20472: { 20472: 20472: return static_cast<_Del*>(__p._M_get_deleter(typeid(_Del))); 20472: 20472: 20472: 20472: } 20472: 20472: 20472: 20472: 20472: 20472: template 20472: inline _Del* 20472: get_deleter(const shared_ptr<_Tp>& __p) noexcept 20472: { 20472: 20472: return static_cast<_Del*>(__p._M_get_deleter(typeid(_Del))); 20472: 20472: 20472: 20472: } 20472: # 120 "/usr/include/c++/10/bits/shared_ptr.h" 3 20472: template 20472: class shared_ptr : public __shared_ptr<_Tp> 20472: { 20472: template 20472: using _Constructible = typename enable_if< 20472: is_constructible<__shared_ptr<_Tp>, _Args...>::value 20472: >::type; 20472: 20472: template 20472: using _Assignable = typename enable_if< 20472: is_assignable<__shared_ptr<_Tp>&, _Arg>::value, shared_ptr& 20472: >::type; 20472: 20472: public: 20472: 20472: 20472: using element_type = typename __shared_ptr<_Tp>::element_type; 20472: # 147 "/usr/include/c++/10/bits/shared_ptr.h" 3 20472: constexpr shared_ptr() noexcept : __shared_ptr<_Tp>() { } 20472: 20472: shared_ptr(const shared_ptr&) noexcept = default; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template> 20472: explicit 20472: shared_ptr(_Yp* __p) : __shared_ptr<_Tp>(__p) { } 20472: # 174 "/usr/include/c++/10/bits/shared_ptr.h" 3 20472: template> 20472: shared_ptr(_Yp* __p, _Deleter __d) 20472: : __shared_ptr<_Tp>(__p, std::move(__d)) { } 20472: # 192 "/usr/include/c++/10/bits/shared_ptr.h" 3 20472: template 20472: shared_ptr(nullptr_t __p, _Deleter __d) 20472: : __shared_ptr<_Tp>(__p, std::move(__d)) { } 20472: # 211 "/usr/include/c++/10/bits/shared_ptr.h" 3 20472: template> 20472: shared_ptr(_Yp* __p, _Deleter __d, _Alloc __a) 20472: : __shared_ptr<_Tp>(__p, std::move(__d), std::move(__a)) { } 20472: # 231 "/usr/include/c++/10/bits/shared_ptr.h" 3 20472: template 20472: shared_ptr(nullptr_t __p, _Deleter __d, _Alloc __a) 20472: : __shared_ptr<_Tp>(__p, std::move(__d), std::move(__a)) { } 20472: # 255 "/usr/include/c++/10/bits/shared_ptr.h" 3 20472: template 20472: shared_ptr(const shared_ptr<_Yp>& __r, element_type* __p) noexcept 20472: : __shared_ptr<_Tp>(__r, __p) { } 20472: # 293 "/usr/include/c++/10/bits/shared_ptr.h" 3 20472: template&>> 20472: shared_ptr(const shared_ptr<_Yp>& __r) noexcept 20472: : __shared_ptr<_Tp>(__r) { } 20472: 20472: 20472: 20472: 20472: 20472: 20472: shared_ptr(shared_ptr&& __r) noexcept 20472: : __shared_ptr<_Tp>(std::move(__r)) { } 20472: 20472: 20472: 20472: 20472: 20472: 20472: template>> 20472: shared_ptr(shared_ptr<_Yp>&& __r) noexcept 20472: : __shared_ptr<_Tp>(std::move(__r)) { } 20472: # 323 "/usr/include/c++/10/bits/shared_ptr.h" 3 20472: template&>> 20472: explicit shared_ptr(const weak_ptr<_Yp>& __r) 20472: : __shared_ptr<_Tp>(__r) { } 20472: 20472: 20472: #pragma GCC diagnostic push 20472: #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 20472: template>> 20472: shared_ptr(auto_ptr<_Yp>&& __r); 20472: #pragma GCC diagnostic pop 20472: 20472: 20472: 20472: 20472: template>> 20472: shared_ptr(unique_ptr<_Yp, _Del>&& __r) 20472: : __shared_ptr<_Tp>(std::move(__r)) { } 20472: 20472: 20472: 20472: 20472: 20472: template, __sp_array_delete>* = 0> 20472: shared_ptr(unique_ptr<_Yp, _Del>&& __r) 20472: : __shared_ptr<_Tp>(std::move(__r), __sp_array_delete()) { } 20472: 20472: 20472: 20472: 20472: 20472: 20472: constexpr shared_ptr(nullptr_t) noexcept : shared_ptr() { } 20472: 20472: shared_ptr& operator=(const shared_ptr&) noexcept = default; 20472: 20472: template 20472: _Assignable&> 20472: operator=(const shared_ptr<_Yp>& __r) noexcept 20472: { 20472: this->__shared_ptr<_Tp>::operator=(__r); 20472: return *this; 20472: } 20472: 20472: 20472: #pragma GCC diagnostic push 20472: #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 20472: template 20472: _Assignable> 20472: operator=(auto_ptr<_Yp>&& __r) 20472: { 20472: this->__shared_ptr<_Tp>::operator=(std::move(__r)); 20472: return *this; 20472: } 20472: #pragma GCC diagnostic pop 20472: 20472: 20472: shared_ptr& 20472: operator=(shared_ptr&& __r) noexcept 20472: { 20472: this->__shared_ptr<_Tp>::operator=(std::move(__r)); 20472: return *this; 20472: } 20472: 20472: template 20472: _Assignable> 20472: operator=(shared_ptr<_Yp>&& __r) noexcept 20472: { 20472: this->__shared_ptr<_Tp>::operator=(std::move(__r)); 20472: return *this; 20472: } 20472: 20472: template 20472: _Assignable> 20472: operator=(unique_ptr<_Yp, _Del>&& __r) 20472: { 20472: this->__shared_ptr<_Tp>::operator=(std::move(__r)); 20472: return *this; 20472: } 20472: 20472: private: 20472: 20472: template 20472: shared_ptr(_Sp_alloc_shared_tag<_Alloc> __tag, _Args&&... __args) 20472: : __shared_ptr<_Tp>(__tag, std::forward<_Args>(__args)...) 20472: { } 20472: 20472: template 20472: friend shared_ptr<_Yp> 20472: allocate_shared(const _Alloc& __a, _Args&&... __args); 20472: 20472: 20472: shared_ptr(const weak_ptr<_Tp>& __r, std::nothrow_t) 20472: : __shared_ptr<_Tp>(__r, std::nothrow) { } 20472: 20472: friend class weak_ptr<_Tp>; 20472: }; 20472: # 434 "/usr/include/c++/10/bits/shared_ptr.h" 3 20472: template 20472: inline bool 20472: operator==(const shared_ptr<_Tp>& __a, const shared_ptr<_Up>& __b) noexcept 20472: { return __a.get() == __b.get(); } 20472: 20472: 20472: template 20472: inline bool 20472: operator==(const shared_ptr<_Tp>& __a, nullptr_t) noexcept 20472: { return !__a; } 20472: # 461 "/usr/include/c++/10/bits/shared_ptr.h" 3 20472: template 20472: inline bool 20472: operator==(nullptr_t, const shared_ptr<_Tp>& __a) noexcept 20472: { return !__a; } 20472: 20472: 20472: template 20472: inline bool 20472: operator!=(const shared_ptr<_Tp>& __a, const shared_ptr<_Up>& __b) noexcept 20472: { return __a.get() != __b.get(); } 20472: 20472: 20472: template 20472: inline bool 20472: operator!=(const shared_ptr<_Tp>& __a, nullptr_t) noexcept 20472: { return (bool)__a; } 20472: 20472: 20472: template 20472: inline bool 20472: operator!=(nullptr_t, const shared_ptr<_Tp>& __a) noexcept 20472: { return (bool)__a; } 20472: 20472: 20472: template 20472: inline bool 20472: operator<(const shared_ptr<_Tp>& __a, const shared_ptr<_Up>& __b) noexcept 20472: { 20472: using _Tp_elt = typename shared_ptr<_Tp>::element_type; 20472: using _Up_elt = typename shared_ptr<_Up>::element_type; 20472: using _Vp = typename common_type<_Tp_elt*, _Up_elt*>::type; 20472: return less<_Vp>()(__a.get(), __b.get()); 20472: } 20472: 20472: 20472: template 20472: inline bool 20472: operator<(const shared_ptr<_Tp>& __a, nullptr_t) noexcept 20472: { 20472: using _Tp_elt = typename shared_ptr<_Tp>::element_type; 20472: return less<_Tp_elt*>()(__a.get(), nullptr); 20472: } 20472: 20472: 20472: template 20472: inline bool 20472: operator<(nullptr_t, const shared_ptr<_Tp>& __a) noexcept 20472: { 20472: using _Tp_elt = typename shared_ptr<_Tp>::element_type; 20472: return less<_Tp_elt*>()(nullptr, __a.get()); 20472: } 20472: 20472: 20472: template 20472: inline bool 20472: operator<=(const shared_ptr<_Tp>& __a, const shared_ptr<_Up>& __b) noexcept 20472: { return !(__b < __a); } 20472: 20472: 20472: template 20472: inline bool 20472: operator<=(const shared_ptr<_Tp>& __a, nullptr_t) noexcept 20472: { return !(nullptr < __a); } 20472: 20472: 20472: template 20472: inline bool 20472: operator<=(nullptr_t, const shared_ptr<_Tp>& __a) noexcept 20472: { return !(__a < nullptr); } 20472: 20472: 20472: template 20472: inline bool 20472: operator>(const shared_ptr<_Tp>& __a, const shared_ptr<_Up>& __b) noexcept 20472: { return (__b < __a); } 20472: 20472: 20472: template 20472: inline bool 20472: operator>(const shared_ptr<_Tp>& __a, nullptr_t) noexcept 20472: { return nullptr < __a; } 20472: 20472: 20472: template 20472: inline bool 20472: operator>(nullptr_t, const shared_ptr<_Tp>& __a) noexcept 20472: { return __a < nullptr; } 20472: 20472: 20472: template 20472: inline bool 20472: operator>=(const shared_ptr<_Tp>& __a, const shared_ptr<_Up>& __b) noexcept 20472: { return !(__a < __b); } 20472: 20472: 20472: template 20472: inline bool 20472: operator>=(const shared_ptr<_Tp>& __a, nullptr_t) noexcept 20472: { return !(__a < nullptr); } 20472: 20472: 20472: template 20472: inline bool 20472: operator>=(nullptr_t, const shared_ptr<_Tp>& __a) noexcept 20472: { return !(nullptr < __a); } 20472: 20472: 20472: 20472: 20472: 20472: template 20472: inline void 20472: swap(shared_ptr<_Tp>& __a, shared_ptr<_Tp>& __b) noexcept 20472: { __a.swap(__b); } 20472: 20472: 20472: 20472: 20472: template 20472: inline shared_ptr<_Tp> 20472: static_pointer_cast(const shared_ptr<_Up>& __r) noexcept 20472: { 20472: using _Sp = shared_ptr<_Tp>; 20472: return _Sp(__r, static_cast(__r.get())); 20472: } 20472: 20472: 20472: template 20472: inline shared_ptr<_Tp> 20472: const_pointer_cast(const shared_ptr<_Up>& __r) noexcept 20472: { 20472: using _Sp = shared_ptr<_Tp>; 20472: return _Sp(__r, const_cast(__r.get())); 20472: } 20472: 20472: 20472: template 20472: inline shared_ptr<_Tp> 20472: dynamic_pointer_cast(const shared_ptr<_Up>& __r) noexcept 20472: { 20472: using _Sp = shared_ptr<_Tp>; 20472: if (auto* __p = dynamic_cast(__r.get())) 20472: return _Sp(__r, __p); 20472: return _Sp(); 20472: } 20472: # 684 "/usr/include/c++/10/bits/shared_ptr.h" 3 20472: template 20472: class weak_ptr : public __weak_ptr<_Tp> 20472: { 20472: template 20472: using _Constructible = typename enable_if< 20472: is_constructible<__weak_ptr<_Tp>, _Arg>::value 20472: >::type; 20472: 20472: template 20472: using _Assignable = typename enable_if< 20472: is_assignable<__weak_ptr<_Tp>&, _Arg>::value, weak_ptr& 20472: >::type; 20472: 20472: public: 20472: constexpr weak_ptr() noexcept = default; 20472: 20472: template&>> 20472: weak_ptr(const shared_ptr<_Yp>& __r) noexcept 20472: : __weak_ptr<_Tp>(__r) { } 20472: 20472: weak_ptr(const weak_ptr&) noexcept = default; 20472: 20472: template&>> 20472: weak_ptr(const weak_ptr<_Yp>& __r) noexcept 20472: : __weak_ptr<_Tp>(__r) { } 20472: 20472: weak_ptr(weak_ptr&&) noexcept = default; 20472: 20472: template>> 20472: weak_ptr(weak_ptr<_Yp>&& __r) noexcept 20472: : __weak_ptr<_Tp>(std::move(__r)) { } 20472: 20472: weak_ptr& 20472: operator=(const weak_ptr& __r) noexcept = default; 20472: 20472: template 20472: _Assignable&> 20472: operator=(const weak_ptr<_Yp>& __r) noexcept 20472: { 20472: this->__weak_ptr<_Tp>::operator=(__r); 20472: return *this; 20472: } 20472: 20472: template 20472: _Assignable&> 20472: operator=(const shared_ptr<_Yp>& __r) noexcept 20472: { 20472: this->__weak_ptr<_Tp>::operator=(__r); 20472: return *this; 20472: } 20472: 20472: weak_ptr& 20472: operator=(weak_ptr&& __r) noexcept = default; 20472: 20472: template 20472: _Assignable> 20472: operator=(weak_ptr<_Yp>&& __r) noexcept 20472: { 20472: this->__weak_ptr<_Tp>::operator=(std::move(__r)); 20472: return *this; 20472: } 20472: 20472: shared_ptr<_Tp> 20472: lock() const noexcept 20472: { return shared_ptr<_Tp>(*this, std::nothrow); } 20472: }; 20472: # 760 "/usr/include/c++/10/bits/shared_ptr.h" 3 20472: template 20472: inline void 20472: swap(weak_ptr<_Tp>& __a, weak_ptr<_Tp>& __b) noexcept 20472: { __a.swap(__b); } 20472: 20472: 20472: 20472: template 20472: struct owner_less; 20472: 20472: 20472: template<> 20472: struct owner_less : _Sp_owner_less 20472: { }; 20472: 20472: 20472: template 20472: struct owner_less> 20472: : public _Sp_owner_less, weak_ptr<_Tp>> 20472: { }; 20472: 20472: 20472: template 20472: struct owner_less> 20472: : public _Sp_owner_less, shared_ptr<_Tp>> 20472: { }; 20472: 20472: 20472: 20472: 20472: template 20472: class enable_shared_from_this 20472: { 20472: protected: 20472: constexpr enable_shared_from_this() noexcept { } 20472: 20472: enable_shared_from_this(const enable_shared_from_this&) noexcept { } 20472: 20472: enable_shared_from_this& 20472: operator=(const enable_shared_from_this&) noexcept 20472: { return *this; } 20472: 20472: ~enable_shared_from_this() { } 20472: 20472: public: 20472: shared_ptr<_Tp> 20472: shared_from_this() 20472: { return shared_ptr<_Tp>(this->_M_weak_this); } 20472: 20472: shared_ptr 20472: shared_from_this() const 20472: { return shared_ptr(this->_M_weak_this); } 20472: # 824 "/usr/include/c++/10/bits/shared_ptr.h" 3 20472: private: 20472: template 20472: void 20472: _M_weak_assign(_Tp1* __p, const __shared_count<>& __n) const noexcept 20472: { _M_weak_this._M_assign(__p, __n); } 20472: 20472: 20472: friend const enable_shared_from_this* 20472: __enable_shared_from_this_base(const __shared_count<>&, 20472: const enable_shared_from_this* __p) 20472: { return __p; } 20472: 20472: template 20472: friend class __shared_ptr; 20472: 20472: mutable weak_ptr<_Tp> _M_weak_this; 20472: }; 20472: # 855 "/usr/include/c++/10/bits/shared_ptr.h" 3 20472: template 20472: inline shared_ptr<_Tp> 20472: allocate_shared(const _Alloc& __a, _Args&&... __args) 20472: { 20472: return shared_ptr<_Tp>(_Sp_alloc_shared_tag<_Alloc>{__a}, 20472: std::forward<_Args>(__args)...); 20472: } 20472: # 870 "/usr/include/c++/10/bits/shared_ptr.h" 3 20472: template 20472: inline shared_ptr<_Tp> 20472: make_shared(_Args&&... __args) 20472: { 20472: typedef typename std::remove_cv<_Tp>::type _Tp_nc; 20472: return std::allocate_shared<_Tp>(std::allocator<_Tp_nc>(), 20472: std::forward<_Args>(__args)...); 20472: } 20472: 20472: 20472: template 20472: struct hash> 20472: : public __hash_base> 20472: { 20472: size_t 20472: operator()(const shared_ptr<_Tp>& __s) const noexcept 20472: { 20472: return std::hash::element_type*>()(__s.get()); 20472: } 20472: }; 20472: # 915 "/usr/include/c++/10/bits/shared_ptr.h" 3 20472: 20472: } 20472: # 85 "/usr/include/c++/10/memory" 2 3 20472: # 1 "/usr/include/c++/10/bits/shared_ptr_atomic.h" 1 3 20472: # 35 "/usr/include/c++/10/bits/shared_ptr_atomic.h" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: # 47 "/usr/include/c++/10/bits/shared_ptr_atomic.h" 3 20472: struct _Sp_locker 20472: { 20472: _Sp_locker(const _Sp_locker&) = delete; 20472: _Sp_locker& operator=(const _Sp_locker&) = delete; 20472: 20472: 20472: explicit 20472: _Sp_locker(const void*) noexcept; 20472: _Sp_locker(const void*, const void*) noexcept; 20472: ~_Sp_locker(); 20472: 20472: private: 20472: unsigned char _M_key1; 20472: unsigned char _M_key2; 20472: 20472: 20472: 20472: }; 20472: # 74 "/usr/include/c++/10/bits/shared_ptr_atomic.h" 3 20472: template 20472: inline bool 20472: atomic_is_lock_free(const __shared_ptr<_Tp, _Lp>* __p) 20472: { 20472: 20472: return __gthread_active_p() == 0; 20472: 20472: 20472: 20472: } 20472: 20472: template 20472: inline bool 20472: atomic_is_lock_free(const shared_ptr<_Tp>* __p) 20472: { return std::atomic_is_lock_free<_Tp, __default_lock_policy>(__p); } 20472: # 101 "/usr/include/c++/10/bits/shared_ptr_atomic.h" 3 20472: template 20472: inline shared_ptr<_Tp> 20472: atomic_load_explicit(const shared_ptr<_Tp>* __p, memory_order) 20472: { 20472: _Sp_locker __lock{__p}; 20472: return *__p; 20472: } 20472: 20472: template 20472: inline shared_ptr<_Tp> 20472: atomic_load(const shared_ptr<_Tp>* __p) 20472: { return std::atomic_load_explicit(__p, memory_order_seq_cst); } 20472: 20472: template 20472: inline __shared_ptr<_Tp, _Lp> 20472: atomic_load_explicit(const __shared_ptr<_Tp, _Lp>* __p, memory_order) 20472: { 20472: _Sp_locker __lock{__p}; 20472: return *__p; 20472: } 20472: 20472: template 20472: inline __shared_ptr<_Tp, _Lp> 20472: atomic_load(const __shared_ptr<_Tp, _Lp>* __p) 20472: { return std::atomic_load_explicit(__p, memory_order_seq_cst); } 20472: # 137 "/usr/include/c++/10/bits/shared_ptr_atomic.h" 3 20472: template 20472: inline void 20472: atomic_store_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r, 20472: memory_order) 20472: { 20472: _Sp_locker __lock{__p}; 20472: __p->swap(__r); 20472: } 20472: 20472: template 20472: inline void 20472: atomic_store(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r) 20472: { std::atomic_store_explicit(__p, std::move(__r), memory_order_seq_cst); } 20472: 20472: template 20472: inline void 20472: atomic_store_explicit(__shared_ptr<_Tp, _Lp>* __p, 20472: __shared_ptr<_Tp, _Lp> __r, 20472: memory_order) 20472: { 20472: _Sp_locker __lock{__p}; 20472: __p->swap(__r); 20472: } 20472: 20472: template 20472: inline void 20472: atomic_store(__shared_ptr<_Tp, _Lp>* __p, __shared_ptr<_Tp, _Lp> __r) 20472: { std::atomic_store_explicit(__p, std::move(__r), memory_order_seq_cst); } 20472: # 174 "/usr/include/c++/10/bits/shared_ptr_atomic.h" 3 20472: template 20472: inline shared_ptr<_Tp> 20472: atomic_exchange_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r, 20472: memory_order) 20472: { 20472: _Sp_locker __lock{__p}; 20472: __p->swap(__r); 20472: return __r; 20472: } 20472: 20472: template 20472: inline shared_ptr<_Tp> 20472: atomic_exchange(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r) 20472: { 20472: return std::atomic_exchange_explicit(__p, std::move(__r), 20472: memory_order_seq_cst); 20472: } 20472: 20472: template 20472: inline __shared_ptr<_Tp, _Lp> 20472: atomic_exchange_explicit(__shared_ptr<_Tp, _Lp>* __p, 20472: __shared_ptr<_Tp, _Lp> __r, 20472: memory_order) 20472: { 20472: _Sp_locker __lock{__p}; 20472: __p->swap(__r); 20472: return __r; 20472: } 20472: 20472: template 20472: inline __shared_ptr<_Tp, _Lp> 20472: atomic_exchange(__shared_ptr<_Tp, _Lp>* __p, __shared_ptr<_Tp, _Lp> __r) 20472: { 20472: return std::atomic_exchange_explicit(__p, std::move(__r), 20472: memory_order_seq_cst); 20472: } 20472: # 223 "/usr/include/c++/10/bits/shared_ptr_atomic.h" 3 20472: template 20472: bool 20472: atomic_compare_exchange_strong_explicit(shared_ptr<_Tp>* __p, 20472: shared_ptr<_Tp>* __v, 20472: shared_ptr<_Tp> __w, 20472: memory_order, 20472: memory_order) 20472: { 20472: shared_ptr<_Tp> __x; 20472: _Sp_locker __lock{__p, __v}; 20472: owner_less> __less; 20472: if (*__p == *__v && !__less(*__p, *__v) && !__less(*__v, *__p)) 20472: { 20472: __x = std::move(*__p); 20472: *__p = std::move(__w); 20472: return true; 20472: } 20472: __x = std::move(*__v); 20472: *__v = *__p; 20472: return false; 20472: } 20472: 20472: template 20472: inline bool 20472: atomic_compare_exchange_strong(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v, 20472: shared_ptr<_Tp> __w) 20472: { 20472: return std::atomic_compare_exchange_strong_explicit(__p, __v, 20472: std::move(__w), memory_order_seq_cst, memory_order_seq_cst); 20472: } 20472: 20472: template 20472: inline bool 20472: atomic_compare_exchange_weak_explicit(shared_ptr<_Tp>* __p, 20472: shared_ptr<_Tp>* __v, 20472: shared_ptr<_Tp> __w, 20472: memory_order __success, 20472: memory_order __failure) 20472: { 20472: return std::atomic_compare_exchange_strong_explicit(__p, __v, 20472: std::move(__w), __success, __failure); 20472: } 20472: 20472: template 20472: inline bool 20472: atomic_compare_exchange_weak(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v, 20472: shared_ptr<_Tp> __w) 20472: { 20472: return std::atomic_compare_exchange_weak_explicit(__p, __v, 20472: std::move(__w), memory_order_seq_cst, memory_order_seq_cst); 20472: } 20472: 20472: template 20472: bool 20472: atomic_compare_exchange_strong_explicit(__shared_ptr<_Tp, _Lp>* __p, 20472: __shared_ptr<_Tp, _Lp>* __v, 20472: __shared_ptr<_Tp, _Lp> __w, 20472: memory_order, 20472: memory_order) 20472: { 20472: __shared_ptr<_Tp, _Lp> __x; 20472: _Sp_locker __lock{__p, __v}; 20472: owner_less<__shared_ptr<_Tp, _Lp>> __less; 20472: if (*__p == *__v && !__less(*__p, *__v) && !__less(*__v, *__p)) 20472: { 20472: __x = std::move(*__p); 20472: *__p = std::move(__w); 20472: return true; 20472: } 20472: __x = std::move(*__v); 20472: *__v = *__p; 20472: return false; 20472: } 20472: 20472: template 20472: inline bool 20472: atomic_compare_exchange_strong(__shared_ptr<_Tp, _Lp>* __p, 20472: __shared_ptr<_Tp, _Lp>* __v, 20472: __shared_ptr<_Tp, _Lp> __w) 20472: { 20472: return std::atomic_compare_exchange_strong_explicit(__p, __v, 20472: std::move(__w), memory_order_seq_cst, memory_order_seq_cst); 20472: } 20472: 20472: template 20472: inline bool 20472: atomic_compare_exchange_weak_explicit(__shared_ptr<_Tp, _Lp>* __p, 20472: __shared_ptr<_Tp, _Lp>* __v, 20472: __shared_ptr<_Tp, _Lp> __w, 20472: memory_order __success, 20472: memory_order __failure) 20472: { 20472: return std::atomic_compare_exchange_strong_explicit(__p, __v, 20472: std::move(__w), __success, __failure); 20472: } 20472: 20472: template 20472: inline bool 20472: atomic_compare_exchange_weak(__shared_ptr<_Tp, _Lp>* __p, 20472: __shared_ptr<_Tp, _Lp>* __v, 20472: __shared_ptr<_Tp, _Lp> __w) 20472: { 20472: return std::atomic_compare_exchange_weak_explicit(__p, __v, 20472: std::move(__w), memory_order_seq_cst, memory_order_seq_cst); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: } 20472: # 86 "/usr/include/c++/10/memory" 2 3 20472: 20472: # 1 "/usr/include/c++/10/backward/auto_ptr.h" 1 3 20472: # 36 "/usr/include/c++/10/backward/auto_ptr.h" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: # 47 "/usr/include/c++/10/backward/auto_ptr.h" 3 20472: template 20472: struct auto_ptr_ref 20472: { 20472: _Tp1* _M_ptr; 20472: 20472: explicit 20472: auto_ptr_ref(_Tp1* __p): _M_ptr(__p) { } 20472: } __attribute__ ((__deprecated__)); 20472: 20472: #pragma GCC diagnostic push 20472: #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 20472: # 88 "/usr/include/c++/10/backward/auto_ptr.h" 3 20472: template 20472: class auto_ptr 20472: { 20472: private: 20472: _Tp* _M_ptr; 20472: 20472: public: 20472: 20472: typedef _Tp element_type; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: explicit 20472: auto_ptr(element_type* __p = 0) throw() : _M_ptr(__p) { } 20472: # 114 "/usr/include/c++/10/backward/auto_ptr.h" 3 20472: auto_ptr(auto_ptr& __a) throw() : _M_ptr(__a.release()) { } 20472: # 126 "/usr/include/c++/10/backward/auto_ptr.h" 3 20472: template 20472: auto_ptr(auto_ptr<_Tp1>& __a) throw() : _M_ptr(__a.release()) { } 20472: # 137 "/usr/include/c++/10/backward/auto_ptr.h" 3 20472: auto_ptr& 20472: operator=(auto_ptr& __a) throw() 20472: { 20472: reset(__a.release()); 20472: return *this; 20472: } 20472: # 154 "/usr/include/c++/10/backward/auto_ptr.h" 3 20472: template 20472: auto_ptr& 20472: operator=(auto_ptr<_Tp1>& __a) throw() 20472: { 20472: reset(__a.release()); 20472: return *this; 20472: } 20472: # 172 "/usr/include/c++/10/backward/auto_ptr.h" 3 20472: ~auto_ptr() { delete _M_ptr; } 20472: # 182 "/usr/include/c++/10/backward/auto_ptr.h" 3 20472: element_type& 20472: operator*() const throw() 20472: { 20472: ; 20472: return *_M_ptr; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: element_type* 20472: operator->() const throw() 20472: { 20472: ; 20472: return _M_ptr; 20472: } 20472: # 212 "/usr/include/c++/10/backward/auto_ptr.h" 3 20472: element_type* 20472: get() const throw() { return _M_ptr; } 20472: # 226 "/usr/include/c++/10/backward/auto_ptr.h" 3 20472: element_type* 20472: release() throw() 20472: { 20472: element_type* __tmp = _M_ptr; 20472: _M_ptr = 0; 20472: return __tmp; 20472: } 20472: # 241 "/usr/include/c++/10/backward/auto_ptr.h" 3 20472: void 20472: reset(element_type* __p = 0) throw() 20472: { 20472: if (__p != _M_ptr) 20472: { 20472: delete _M_ptr; 20472: _M_ptr = __p; 20472: } 20472: } 20472: # 266 "/usr/include/c++/10/backward/auto_ptr.h" 3 20472: auto_ptr(auto_ptr_ref __ref) throw() 20472: : _M_ptr(__ref._M_ptr) { } 20472: 20472: auto_ptr& 20472: operator=(auto_ptr_ref __ref) throw() 20472: { 20472: if (__ref._M_ptr != this->get()) 20472: { 20472: delete _M_ptr; 20472: _M_ptr = __ref._M_ptr; 20472: } 20472: return *this; 20472: } 20472: 20472: template 20472: operator auto_ptr_ref<_Tp1>() throw() 20472: { return auto_ptr_ref<_Tp1>(this->release()); } 20472: 20472: template 20472: operator auto_ptr<_Tp1>() throw() 20472: { return auto_ptr<_Tp1>(this->release()); } 20472: } __attribute__ ((__deprecated__)); 20472: 20472: 20472: 20472: template<> 20472: class auto_ptr 20472: { 20472: public: 20472: typedef void element_type; 20472: } __attribute__ ((__deprecated__)); 20472: 20472: 20472: template<_Lock_policy _Lp> 20472: template 20472: inline 20472: __shared_count<_Lp>::__shared_count(std::auto_ptr<_Tp>&& __r) 20472: : _M_pi(new _Sp_counted_ptr<_Tp*, _Lp>(__r.get())) 20472: { __r.release(); } 20472: 20472: template 20472: template 20472: inline 20472: __shared_ptr<_Tp, _Lp>::__shared_ptr(std::auto_ptr<_Tp1>&& __r) 20472: : _M_ptr(__r.get()), _M_refcount() 20472: { 20472: 20472: static_assert( sizeof(_Tp1) > 0, "incomplete type" ); 20472: _Tp1* __tmp = __r.get(); 20472: _M_refcount = __shared_count<_Lp>(std::move(__r)); 20472: _M_enable_shared_from_this_with(__tmp); 20472: } 20472: 20472: template 20472: template 20472: inline 20472: shared_ptr<_Tp>::shared_ptr(std::auto_ptr<_Tp1>&& __r) 20472: : __shared_ptr<_Tp>(std::move(__r)) { } 20472: 20472: template 20472: template 20472: inline 20472: unique_ptr<_Tp, _Dp>::unique_ptr(auto_ptr<_Up>&& __u) noexcept 20472: : _M_t(__u.release(), deleter_type()) { } 20472: 20472: 20472: #pragma GCC diagnostic pop 20472: 20472: 20472: } 20472: # 88 "/usr/include/c++/10/memory" 2 3 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "/usr/include/c++/10/cstdint" 1 3 20472: # 32 "/usr/include/c++/10/cstdint" 3 20472: 20472: # 33 "/usr/include/c++/10/cstdint" 3 20472: # 44 "/usr/include/c++/10/cstdint" 3 20472: namespace std 20472: { 20472: 20472: using ::int8_t; 20472: using ::int16_t; 20472: using ::int32_t; 20472: using ::int64_t; 20472: 20472: using ::int_fast8_t; 20472: using ::int_fast16_t; 20472: using ::int_fast32_t; 20472: using ::int_fast64_t; 20472: 20472: using ::int_least8_t; 20472: using ::int_least16_t; 20472: using ::int_least32_t; 20472: using ::int_least64_t; 20472: 20472: using ::intmax_t; 20472: using ::intptr_t; 20472: 20472: using ::uint8_t; 20472: using ::uint16_t; 20472: using ::uint32_t; 20472: using ::uint64_t; 20472: 20472: using ::uint_fast8_t; 20472: using ::uint_fast16_t; 20472: using ::uint_fast32_t; 20472: using ::uint_fast64_t; 20472: 20472: using ::uint_least8_t; 20472: using ::uint_least16_t; 20472: using ::uint_least32_t; 20472: using ::uint_least64_t; 20472: 20472: using ::uintmax_t; 20472: using ::uintptr_t; 20472: 20472: 20472: 20472: 20472: 20472: } 20472: # 95 "/usr/include/c++/10/memory" 2 3 20472: 20472: 20472: 20472: 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: # 122 "/usr/include/c++/10/memory" 3 20472: inline void* 20472: align(size_t __align, size_t __size, void*& __ptr, size_t& __space) noexcept 20472: { 20472: 20472: const auto __intptr = reinterpret_cast(__ptr); 20472: 20472: 20472: 20472: 20472: 20472: 20472: const auto __aligned = (__intptr - 1u + __align) & -__align; 20472: const auto __diff = __aligned - __intptr; 20472: if ((__size + __diff) > __space) 20472: return nullptr; 20472: else 20472: { 20472: __space -= __diff; 20472: return __ptr = reinterpret_cast(__aligned); 20472: } 20472: } 20472: # 158 "/usr/include/c++/10/memory" 3 20472: enum class pointer_safety { relaxed, preferred, strict }; 20472: 20472: 20472: inline void 20472: declare_reachable(void*) { } 20472: 20472: 20472: template 20472: inline _Tp* 20472: undeclare_reachable(_Tp* __p) { return __p; } 20472: 20472: 20472: inline void 20472: declare_no_pointers(char*, size_t) { } 20472: 20472: 20472: inline void 20472: undeclare_no_pointers(char*, size_t) { } 20472: 20472: 20472: inline pointer_safety 20472: get_pointer_safety() noexcept { return pointer_safety::relaxed; } 20472: # 411 "/usr/include/c++/10/memory" 3 20472: 20472: } 20472: # 15 "./db/memtable.h" 2 20472: # 1 "/usr/include/c++/10/string" 1 3 20472: # 36 "/usr/include/c++/10/string" 3 20472: 20472: # 37 "/usr/include/c++/10/string" 3 20472: 20472: 20472: 20472: # 1 "/usr/include/c++/10/bits/char_traits.h" 1 3 20472: # 37 "/usr/include/c++/10/bits/char_traits.h" 3 20472: 20472: # 38 "/usr/include/c++/10/bits/char_traits.h" 3 20472: 20472: 20472: 20472: # 1 "/usr/include/c++/10/cwchar" 1 3 20472: # 39 "/usr/include/c++/10/cwchar" 3 20472: 20472: # 40 "/usr/include/c++/10/cwchar" 3 20472: # 42 "/usr/include/c++/10/bits/char_traits.h" 2 3 20472: # 50 "/usr/include/c++/10/bits/char_traits.h" 3 20472: namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: # 64 "/usr/include/c++/10/bits/char_traits.h" 3 20472: template 20472: struct _Char_types 20472: { 20472: typedef unsigned long int_type; 20472: typedef std::streampos pos_type; 20472: typedef std::streamoff off_type; 20472: typedef std::mbstate_t state_type; 20472: }; 20472: # 89 "/usr/include/c++/10/bits/char_traits.h" 3 20472: template 20472: struct char_traits 20472: { 20472: typedef _CharT char_type; 20472: typedef typename _Char_types<_CharT>::int_type int_type; 20472: typedef typename _Char_types<_CharT>::pos_type pos_type; 20472: typedef typename _Char_types<_CharT>::off_type off_type; 20472: typedef typename _Char_types<_CharT>::state_type state_type; 20472: 20472: 20472: 20472: 20472: static void 20472: assign(char_type& __c1, const char_type& __c2) 20472: { __c1 = __c2; } 20472: 20472: static constexpr bool 20472: eq(const char_type& __c1, const char_type& __c2) 20472: { return __c1 == __c2; } 20472: 20472: static constexpr bool 20472: lt(const char_type& __c1, const char_type& __c2) 20472: { return __c1 < __c2; } 20472: 20472: static int 20472: compare(const char_type* __s1, const char_type* __s2, std::size_t __n); 20472: 20472: static std::size_t 20472: length(const char_type* __s); 20472: 20472: static const char_type* 20472: find(const char_type* __s, std::size_t __n, const char_type& __a); 20472: 20472: static char_type* 20472: move(char_type* __s1, const char_type* __s2, std::size_t __n); 20472: 20472: static char_type* 20472: copy(char_type* __s1, const char_type* __s2, std::size_t __n); 20472: 20472: static char_type* 20472: assign(char_type* __s, std::size_t __n, char_type __a); 20472: 20472: static constexpr char_type 20472: to_char_type(const int_type& __c) 20472: { return static_cast(__c); } 20472: 20472: static constexpr int_type 20472: to_int_type(const char_type& __c) 20472: { return static_cast(__c); } 20472: 20472: static constexpr bool 20472: eq_int_type(const int_type& __c1, const int_type& __c2) 20472: { return __c1 == __c2; } 20472: 20472: static constexpr int_type 20472: eof() 20472: { return static_cast(-1); } 20472: 20472: static constexpr int_type 20472: not_eof(const int_type& __c) 20472: { return !eq_int_type(__c, eof()) ? __c : to_int_type(char_type()); } 20472: }; 20472: 20472: template 20472: int 20472: char_traits<_CharT>:: 20472: compare(const char_type* __s1, const char_type* __s2, std::size_t __n) 20472: { 20472: for (std::size_t __i = 0; __i < __n; ++__i) 20472: if (lt(__s1[__i], __s2[__i])) 20472: return -1; 20472: else if (lt(__s2[__i], __s1[__i])) 20472: return 1; 20472: return 0; 20472: } 20472: 20472: template 20472: std::size_t 20472: char_traits<_CharT>:: 20472: length(const char_type* __p) 20472: { 20472: std::size_t __i = 0; 20472: while (!eq(__p[__i], char_type())) 20472: ++__i; 20472: return __i; 20472: } 20472: 20472: template 20472: const typename char_traits<_CharT>::char_type* 20472: char_traits<_CharT>:: 20472: find(const char_type* __s, std::size_t __n, const char_type& __a) 20472: { 20472: for (std::size_t __i = 0; __i < __n; ++__i) 20472: if (eq(__s[__i], __a)) 20472: return __s + __i; 20472: return 0; 20472: } 20472: 20472: template 20472: 20472: typename char_traits<_CharT>::char_type* 20472: char_traits<_CharT>:: 20472: move(char_type* __s1, const char_type* __s2, std::size_t __n) 20472: { 20472: if (__n == 0) 20472: return __s1; 20472: # 205 "/usr/include/c++/10/bits/char_traits.h" 3 20472: return static_cast<_CharT*>(__builtin_memmove(__s1, __s2, 20472: __n * sizeof(char_type))); 20472: } 20472: 20472: template 20472: 20472: typename char_traits<_CharT>::char_type* 20472: char_traits<_CharT>:: 20472: copy(char_type* __s1, const char_type* __s2, std::size_t __n) 20472: { 20472: 20472: std::copy(__s2, __s2 + __n, __s1); 20472: return __s1; 20472: } 20472: 20472: template 20472: 20472: typename char_traits<_CharT>::char_type* 20472: char_traits<_CharT>:: 20472: assign(char_type* __s, std::size_t __n, char_type __a) 20472: { 20472: 20472: std::fill_n(__s, __n, __a); 20472: return __s; 20472: } 20472: 20472: 20472: } 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: # 309 "/usr/include/c++/10/bits/char_traits.h" 3 20472: template 20472: struct char_traits : public __gnu_cxx::char_traits<_CharT> 20472: { }; 20472: 20472: 20472: 20472: template<> 20472: struct char_traits 20472: { 20472: typedef char char_type; 20472: typedef int int_type; 20472: typedef streampos pos_type; 20472: typedef streamoff off_type; 20472: typedef mbstate_t state_type; 20472: 20472: 20472: 20472: 20472: static void 20472: assign(char_type& __c1, const char_type& __c2) noexcept 20472: { __c1 = __c2; } 20472: 20472: static constexpr bool 20472: eq(const char_type& __c1, const char_type& __c2) noexcept 20472: { return __c1 == __c2; } 20472: 20472: static constexpr bool 20472: lt(const char_type& __c1, const char_type& __c2) noexcept 20472: { 20472: 20472: return (static_cast(__c1) 20472: < static_cast(__c2)); 20472: } 20472: 20472: static int 20472: compare(const char_type* __s1, const char_type* __s2, size_t __n) 20472: { 20472: if (__n == 0) 20472: return 0; 20472: 20472: 20472: 20472: 20472: 20472: 20472: return __builtin_memcmp(__s1, __s2, __n); 20472: } 20472: 20472: static size_t 20472: length(const char_type* __s) 20472: { 20472: 20472: 20472: 20472: 20472: return __builtin_strlen(__s); 20472: } 20472: 20472: static const char_type* 20472: find(const char_type* __s, size_t __n, const char_type& __a) 20472: { 20472: if (__n == 0) 20472: return 0; 20472: 20472: 20472: 20472: 20472: 20472: 20472: return static_cast(__builtin_memchr(__s, __a, __n)); 20472: } 20472: 20472: static char_type* 20472: move(char_type* __s1, const char_type* __s2, size_t __n) 20472: { 20472: if (__n == 0) 20472: return __s1; 20472: 20472: 20472: 20472: 20472: return static_cast(__builtin_memmove(__s1, __s2, __n)); 20472: } 20472: 20472: static char_type* 20472: copy(char_type* __s1, const char_type* __s2, size_t __n) 20472: { 20472: if (__n == 0) 20472: return __s1; 20472: 20472: 20472: 20472: 20472: return static_cast(__builtin_memcpy(__s1, __s2, __n)); 20472: } 20472: 20472: static char_type* 20472: assign(char_type* __s, size_t __n, char_type __a) 20472: { 20472: if (__n == 0) 20472: return __s; 20472: 20472: 20472: 20472: 20472: return static_cast(__builtin_memset(__s, __a, __n)); 20472: } 20472: 20472: static constexpr char_type 20472: to_char_type(const int_type& __c) noexcept 20472: { return static_cast(__c); } 20472: 20472: 20472: 20472: static constexpr int_type 20472: to_int_type(const char_type& __c) noexcept 20472: { return static_cast(static_cast(__c)); } 20472: 20472: static constexpr bool 20472: eq_int_type(const int_type& __c1, const int_type& __c2) noexcept 20472: { return __c1 == __c2; } 20472: 20472: static constexpr int_type 20472: eof() noexcept 20472: { return static_cast(-1); } 20472: 20472: static constexpr int_type 20472: not_eof(const int_type& __c) noexcept 20472: { return (__c == eof()) ? 0 : __c; } 20472: }; 20472: 20472: 20472: 20472: 20472: template<> 20472: struct char_traits 20472: { 20472: typedef wchar_t char_type; 20472: typedef wint_t int_type; 20472: typedef streamoff off_type; 20472: typedef wstreampos pos_type; 20472: typedef mbstate_t state_type; 20472: 20472: 20472: 20472: 20472: static void 20472: assign(char_type& __c1, const char_type& __c2) noexcept 20472: { __c1 = __c2; } 20472: 20472: static constexpr bool 20472: eq(const char_type& __c1, const char_type& __c2) noexcept 20472: { return __c1 == __c2; } 20472: 20472: static constexpr bool 20472: lt(const char_type& __c1, const char_type& __c2) noexcept 20472: { return __c1 < __c2; } 20472: 20472: static int 20472: compare(const char_type* __s1, const char_type* __s2, size_t __n) 20472: { 20472: if (__n == 0) 20472: return 0; 20472: 20472: 20472: 20472: 20472: 20472: 20472: return wmemcmp(__s1, __s2, __n); 20472: } 20472: 20472: static size_t 20472: length(const char_type* __s) 20472: { 20472: 20472: 20472: 20472: 20472: return wcslen(__s); 20472: } 20472: 20472: static const char_type* 20472: find(const char_type* __s, size_t __n, const char_type& __a) 20472: { 20472: if (__n == 0) 20472: return 0; 20472: 20472: 20472: 20472: 20472: 20472: 20472: return wmemchr(__s, __a, __n); 20472: } 20472: 20472: static char_type* 20472: move(char_type* __s1, const char_type* __s2, size_t __n) 20472: { 20472: if (__n == 0) 20472: return __s1; 20472: 20472: 20472: 20472: 20472: return wmemmove(__s1, __s2, __n); 20472: } 20472: 20472: static char_type* 20472: copy(char_type* __s1, const char_type* __s2, size_t __n) 20472: { 20472: if (__n == 0) 20472: return __s1; 20472: 20472: 20472: 20472: 20472: return wmemcpy(__s1, __s2, __n); 20472: } 20472: 20472: static char_type* 20472: assign(char_type* __s, size_t __n, char_type __a) 20472: { 20472: if (__n == 0) 20472: return __s; 20472: 20472: 20472: 20472: 20472: return wmemset(__s, __a, __n); 20472: } 20472: 20472: static constexpr char_type 20472: to_char_type(const int_type& __c) noexcept 20472: { return char_type(__c); } 20472: 20472: static constexpr int_type 20472: to_int_type(const char_type& __c) noexcept 20472: { return int_type(__c); } 20472: 20472: static constexpr bool 20472: eq_int_type(const int_type& __c1, const int_type& __c2) noexcept 20472: { return __c1 == __c2; } 20472: 20472: static constexpr int_type 20472: eof() noexcept 20472: { return static_cast((0xffffffffu)); } 20472: 20472: static constexpr int_type 20472: not_eof(const int_type& __c) noexcept 20472: { return eq_int_type(__c, eof()) ? 0 : __c; } 20472: }; 20472: # 687 "/usr/include/c++/10/bits/char_traits.h" 3 20472: 20472: } 20472: 20472: 20472: 20472: 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: template<> 20472: struct char_traits 20472: { 20472: typedef char16_t char_type; 20472: 20472: typedef uint_least16_t int_type; 20472: 20472: 20472: 20472: 20472: 20472: typedef streamoff off_type; 20472: typedef u16streampos pos_type; 20472: typedef mbstate_t state_type; 20472: 20472: 20472: 20472: 20472: static void 20472: assign(char_type& __c1, const char_type& __c2) noexcept 20472: { __c1 = __c2; } 20472: 20472: static constexpr bool 20472: eq(const char_type& __c1, const char_type& __c2) noexcept 20472: { return __c1 == __c2; } 20472: 20472: static constexpr bool 20472: lt(const char_type& __c1, const char_type& __c2) noexcept 20472: { return __c1 < __c2; } 20472: 20472: static int 20472: compare(const char_type* __s1, const char_type* __s2, size_t __n) 20472: { 20472: for (size_t __i = 0; __i < __n; ++__i) 20472: if (lt(__s1[__i], __s2[__i])) 20472: return -1; 20472: else if (lt(__s2[__i], __s1[__i])) 20472: return 1; 20472: return 0; 20472: } 20472: 20472: static size_t 20472: length(const char_type* __s) 20472: { 20472: size_t __i = 0; 20472: while (!eq(__s[__i], char_type())) 20472: ++__i; 20472: return __i; 20472: } 20472: 20472: static const char_type* 20472: find(const char_type* __s, size_t __n, const char_type& __a) 20472: { 20472: for (size_t __i = 0; __i < __n; ++__i) 20472: if (eq(__s[__i], __a)) 20472: return __s + __i; 20472: return 0; 20472: } 20472: 20472: static char_type* 20472: move(char_type* __s1, const char_type* __s2, size_t __n) 20472: { 20472: if (__n == 0) 20472: return __s1; 20472: 20472: 20472: 20472: 20472: return (static_cast 20472: (__builtin_memmove(__s1, __s2, __n * sizeof(char_type)))); 20472: } 20472: 20472: static char_type* 20472: copy(char_type* __s1, const char_type* __s2, size_t __n) 20472: { 20472: if (__n == 0) 20472: return __s1; 20472: 20472: 20472: 20472: 20472: return (static_cast 20472: (__builtin_memcpy(__s1, __s2, __n * sizeof(char_type)))); 20472: } 20472: 20472: static char_type* 20472: assign(char_type* __s, size_t __n, char_type __a) 20472: { 20472: for (size_t __i = 0; __i < __n; ++__i) 20472: assign(__s[__i], __a); 20472: return __s; 20472: } 20472: 20472: static constexpr char_type 20472: to_char_type(const int_type& __c) noexcept 20472: { return char_type(__c); } 20472: 20472: static constexpr int_type 20472: to_int_type(const char_type& __c) noexcept 20472: { return __c == eof() ? int_type(0xfffd) : int_type(__c); } 20472: 20472: static constexpr bool 20472: eq_int_type(const int_type& __c1, const int_type& __c2) noexcept 20472: { return __c1 == __c2; } 20472: 20472: static constexpr int_type 20472: eof() noexcept 20472: { return static_cast(-1); } 20472: 20472: static constexpr int_type 20472: not_eof(const int_type& __c) noexcept 20472: { return eq_int_type(__c, eof()) ? 0 : __c; } 20472: }; 20472: 20472: template<> 20472: struct char_traits 20472: { 20472: typedef char32_t char_type; 20472: 20472: typedef uint_least32_t int_type; 20472: 20472: 20472: 20472: 20472: 20472: typedef streamoff off_type; 20472: typedef u32streampos pos_type; 20472: typedef mbstate_t state_type; 20472: 20472: 20472: 20472: 20472: static void 20472: assign(char_type& __c1, const char_type& __c2) noexcept 20472: { __c1 = __c2; } 20472: 20472: static constexpr bool 20472: eq(const char_type& __c1, const char_type& __c2) noexcept 20472: { return __c1 == __c2; } 20472: 20472: static constexpr bool 20472: lt(const char_type& __c1, const char_type& __c2) noexcept 20472: { return __c1 < __c2; } 20472: 20472: static int 20472: compare(const char_type* __s1, const char_type* __s2, size_t __n) 20472: { 20472: for (size_t __i = 0; __i < __n; ++__i) 20472: if (lt(__s1[__i], __s2[__i])) 20472: return -1; 20472: else if (lt(__s2[__i], __s1[__i])) 20472: return 1; 20472: return 0; 20472: } 20472: 20472: static size_t 20472: length(const char_type* __s) 20472: { 20472: size_t __i = 0; 20472: while (!eq(__s[__i], char_type())) 20472: ++__i; 20472: return __i; 20472: } 20472: 20472: static const char_type* 20472: find(const char_type* __s, size_t __n, const char_type& __a) 20472: { 20472: for (size_t __i = 0; __i < __n; ++__i) 20472: if (eq(__s[__i], __a)) 20472: return __s + __i; 20472: return 0; 20472: } 20472: 20472: static char_type* 20472: move(char_type* __s1, const char_type* __s2, size_t __n) 20472: { 20472: if (__n == 0) 20472: return __s1; 20472: 20472: 20472: 20472: 20472: return (static_cast 20472: (__builtin_memmove(__s1, __s2, __n * sizeof(char_type)))); 20472: } 20472: 20472: static char_type* 20472: copy(char_type* __s1, const char_type* __s2, size_t __n) 20472: { 20472: if (__n == 0) 20472: return __s1; 20472: 20472: 20472: 20472: 20472: return (static_cast 20472: (__builtin_memcpy(__s1, __s2, __n * sizeof(char_type)))); 20472: } 20472: 20472: static char_type* 20472: assign(char_type* __s, size_t __n, char_type __a) 20472: { 20472: for (size_t __i = 0; __i < __n; ++__i) 20472: assign(__s[__i], __a); 20472: return __s; 20472: } 20472: 20472: static constexpr char_type 20472: to_char_type(const int_type& __c) noexcept 20472: { return char_type(__c); } 20472: 20472: static constexpr int_type 20472: to_int_type(const char_type& __c) noexcept 20472: { return int_type(__c); } 20472: 20472: static constexpr bool 20472: eq_int_type(const int_type& __c1, const int_type& __c2) noexcept 20472: { return __c1 == __c2; } 20472: 20472: static constexpr int_type 20472: eof() noexcept 20472: { return static_cast(-1); } 20472: 20472: static constexpr int_type 20472: not_eof(const int_type& __c) noexcept 20472: { return eq_int_type(__c, eof()) ? 0 : __c; } 20472: }; 20472: # 945 "/usr/include/c++/10/bits/char_traits.h" 3 20472: 20472: } 20472: # 41 "/usr/include/c++/10/string" 2 3 20472: 20472: 20472: # 1 "/usr/include/c++/10/bits/localefwd.h" 1 3 20472: # 37 "/usr/include/c++/10/bits/localefwd.h" 3 20472: 20472: # 38 "/usr/include/c++/10/bits/localefwd.h" 3 20472: 20472: 20472: # 1 "/usr/include/arm-linux-gnueabihf/c++/10/bits/c++locale.h" 1 3 20472: # 39 "/usr/include/arm-linux-gnueabihf/c++/10/bits/c++locale.h" 3 20472: 20472: # 40 "/usr/include/arm-linux-gnueabihf/c++/10/bits/c++locale.h" 3 20472: 20472: # 1 "/usr/include/c++/10/clocale" 1 3 20472: # 39 "/usr/include/c++/10/clocale" 3 20472: 20472: # 40 "/usr/include/c++/10/clocale" 3 20472: 20472: 20472: # 1 "/usr/include/locale.h" 1 3 4 20472: # 28 "/usr/include/locale.h" 3 4 20472: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/10/include/stddef.h" 1 3 4 20472: # 29 "/usr/include/locale.h" 2 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/locale.h" 1 3 4 20472: # 30 "/usr/include/locale.h" 2 3 4 20472: 20472: extern "C" { 20472: # 51 "/usr/include/locale.h" 3 4 20472: struct lconv 20472: { 20472: 20472: 20472: char *decimal_point; 20472: char *thousands_sep; 20472: 20472: 20472: 20472: 20472: 20472: char *grouping; 20472: 20472: 20472: 20472: 20472: 20472: char *int_curr_symbol; 20472: char *currency_symbol; 20472: char *mon_decimal_point; 20472: char *mon_thousands_sep; 20472: char *mon_grouping; 20472: char *positive_sign; 20472: char *negative_sign; 20472: char int_frac_digits; 20472: char frac_digits; 20472: 20472: char p_cs_precedes; 20472: 20472: char p_sep_by_space; 20472: 20472: char n_cs_precedes; 20472: 20472: char n_sep_by_space; 20472: 20472: 20472: 20472: 20472: 20472: 20472: char p_sign_posn; 20472: char n_sign_posn; 20472: 20472: 20472: char int_p_cs_precedes; 20472: 20472: char int_p_sep_by_space; 20472: 20472: char int_n_cs_precedes; 20472: 20472: char int_n_sep_by_space; 20472: 20472: 20472: 20472: 20472: 20472: 20472: char int_p_sign_posn; 20472: char int_n_sign_posn; 20472: # 118 "/usr/include/locale.h" 3 4 20472: }; 20472: 20472: 20472: 20472: extern char *setlocale (int __category, const char *__locale) throw (); 20472: 20472: 20472: extern struct lconv *localeconv (void) throw (); 20472: # 141 "/usr/include/locale.h" 3 4 20472: extern locale_t newlocale (int __category_mask, const char *__locale, 20472: locale_t __base) throw (); 20472: # 176 "/usr/include/locale.h" 3 4 20472: extern locale_t duplocale (locale_t __dataset) throw (); 20472: 20472: 20472: 20472: extern void freelocale (locale_t __dataset) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern locale_t uselocale (locale_t __dataset) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: } 20472: # 43 "/usr/include/c++/10/clocale" 2 3 20472: # 51 "/usr/include/c++/10/clocale" 3 20472: namespace std 20472: { 20472: using ::lconv; 20472: using ::setlocale; 20472: using ::localeconv; 20472: } 20472: # 42 "/usr/include/arm-linux-gnueabihf/c++/10/bits/c++locale.h" 2 3 20472: 20472: 20472: 20472: 20472: 20472: 20472: namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: extern "C" __typeof(uselocale) __uselocale; 20472: 20472: 20472: } 20472: 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: typedef __locale_t __c_locale; 20472: 20472: 20472: 20472: 20472: 20472: inline int 20472: __convert_from_v(const __c_locale& __cloc __attribute__ ((__unused__)), 20472: char* __out, 20472: const int __size __attribute__ ((__unused__)), 20472: const char* __fmt, ...) 20472: { 20472: 20472: __c_locale __old = __gnu_cxx::__uselocale(__cloc); 20472: # 88 "/usr/include/arm-linux-gnueabihf/c++/10/bits/c++locale.h" 3 20472: __builtin_va_list __args; 20472: __builtin_va_start(__args, __fmt); 20472: 20472: 20472: const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args); 20472: 20472: 20472: 20472: 20472: __builtin_va_end(__args); 20472: 20472: 20472: __gnu_cxx::__uselocale(__old); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: return __ret; 20472: } 20472: 20472: 20472: } 20472: # 41 "/usr/include/c++/10/bits/localefwd.h" 2 3 20472: 20472: # 1 "/usr/include/c++/10/cctype" 1 3 20472: # 39 "/usr/include/c++/10/cctype" 3 20472: 20472: # 40 "/usr/include/c++/10/cctype" 3 20472: 20472: 20472: # 1 "/usr/include/ctype.h" 1 3 4 20472: # 28 "/usr/include/ctype.h" 3 4 20472: extern "C" { 20472: # 46 "/usr/include/ctype.h" 3 4 20472: enum 20472: { 20472: _ISupper = ((0) < 8 ? ((1 << (0)) << 8) : ((1 << (0)) >> 8)), 20472: _ISlower = ((1) < 8 ? ((1 << (1)) << 8) : ((1 << (1)) >> 8)), 20472: _ISalpha = ((2) < 8 ? ((1 << (2)) << 8) : ((1 << (2)) >> 8)), 20472: _ISdigit = ((3) < 8 ? ((1 << (3)) << 8) : ((1 << (3)) >> 8)), 20472: _ISxdigit = ((4) < 8 ? ((1 << (4)) << 8) : ((1 << (4)) >> 8)), 20472: _ISspace = ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)), 20472: _ISprint = ((6) < 8 ? ((1 << (6)) << 8) : ((1 << (6)) >> 8)), 20472: _ISgraph = ((7) < 8 ? ((1 << (7)) << 8) : ((1 << (7)) >> 8)), 20472: _ISblank = ((8) < 8 ? ((1 << (8)) << 8) : ((1 << (8)) >> 8)), 20472: _IScntrl = ((9) < 8 ? ((1 << (9)) << 8) : ((1 << (9)) >> 8)), 20472: _ISpunct = ((10) < 8 ? ((1 << (10)) << 8) : ((1 << (10)) >> 8)), 20472: _ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8)) 20472: }; 20472: # 79 "/usr/include/ctype.h" 3 4 20472: extern const unsigned short int **__ctype_b_loc (void) 20472: throw () __attribute__ ((__const__)); 20472: extern const __int32_t **__ctype_tolower_loc (void) 20472: throw () __attribute__ ((__const__)); 20472: extern const __int32_t **__ctype_toupper_loc (void) 20472: throw () __attribute__ ((__const__)); 20472: # 108 "/usr/include/ctype.h" 3 4 20472: extern int isalnum (int) throw (); 20472: extern int isalpha (int) throw (); 20472: extern int iscntrl (int) throw (); 20472: extern int isdigit (int) throw (); 20472: extern int islower (int) throw (); 20472: extern int isgraph (int) throw (); 20472: extern int isprint (int) throw (); 20472: extern int ispunct (int) throw (); 20472: extern int isspace (int) throw (); 20472: extern int isupper (int) throw (); 20472: extern int isxdigit (int) throw (); 20472: 20472: 20472: 20472: extern int tolower (int __c) throw (); 20472: 20472: 20472: extern int toupper (int __c) throw (); 20472: 20472: 20472: 20472: 20472: extern int isblank (int) throw (); 20472: 20472: 20472: 20472: 20472: extern int isctype (int __c, int __mask) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int isascii (int __c) throw (); 20472: 20472: 20472: 20472: extern int toascii (int __c) throw (); 20472: 20472: 20472: 20472: extern int _toupper (int) throw (); 20472: extern int _tolower (int) throw (); 20472: # 251 "/usr/include/ctype.h" 3 4 20472: extern int isalnum_l (int, locale_t) throw (); 20472: extern int isalpha_l (int, locale_t) throw (); 20472: extern int iscntrl_l (int, locale_t) throw (); 20472: extern int isdigit_l (int, locale_t) throw (); 20472: extern int islower_l (int, locale_t) throw (); 20472: extern int isgraph_l (int, locale_t) throw (); 20472: extern int isprint_l (int, locale_t) throw (); 20472: extern int ispunct_l (int, locale_t) throw (); 20472: extern int isspace_l (int, locale_t) throw (); 20472: extern int isupper_l (int, locale_t) throw (); 20472: extern int isxdigit_l (int, locale_t) throw (); 20472: 20472: extern int isblank_l (int, locale_t) throw (); 20472: 20472: 20472: 20472: extern int __tolower_l (int __c, locale_t __l) throw (); 20472: extern int tolower_l (int __c, locale_t __l) throw (); 20472: 20472: 20472: extern int __toupper_l (int __c, locale_t __l) throw (); 20472: extern int toupper_l (int __c, locale_t __l) throw (); 20472: # 327 "/usr/include/ctype.h" 3 4 20472: } 20472: # 43 "/usr/include/c++/10/cctype" 2 3 20472: # 62 "/usr/include/c++/10/cctype" 3 20472: namespace std 20472: { 20472: using ::isalnum; 20472: using ::isalpha; 20472: using ::iscntrl; 20472: using ::isdigit; 20472: using ::isgraph; 20472: using ::islower; 20472: using ::isprint; 20472: using ::ispunct; 20472: using ::isspace; 20472: using ::isupper; 20472: using ::isxdigit; 20472: using ::tolower; 20472: using ::toupper; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: namespace std 20472: { 20472: using ::isblank; 20472: } 20472: # 43 "/usr/include/c++/10/bits/localefwd.h" 2 3 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: # 55 "/usr/include/c++/10/bits/localefwd.h" 3 20472: class locale; 20472: 20472: template 20472: bool 20472: has_facet(const locale&) throw(); 20472: 20472: template 20472: const _Facet& 20472: use_facet(const locale&); 20472: 20472: 20472: template 20472: bool 20472: isspace(_CharT, const locale&); 20472: 20472: template 20472: bool 20472: isprint(_CharT, const locale&); 20472: 20472: template 20472: bool 20472: iscntrl(_CharT, const locale&); 20472: 20472: template 20472: bool 20472: isupper(_CharT, const locale&); 20472: 20472: template 20472: bool 20472: islower(_CharT, const locale&); 20472: 20472: template 20472: bool 20472: isalpha(_CharT, const locale&); 20472: 20472: template 20472: bool 20472: isdigit(_CharT, const locale&); 20472: 20472: template 20472: bool 20472: ispunct(_CharT, const locale&); 20472: 20472: template 20472: bool 20472: isxdigit(_CharT, const locale&); 20472: 20472: template 20472: bool 20472: isalnum(_CharT, const locale&); 20472: 20472: template 20472: bool 20472: isgraph(_CharT, const locale&); 20472: 20472: 20472: template 20472: bool 20472: isblank(_CharT, const locale&); 20472: 20472: 20472: template 20472: _CharT 20472: toupper(_CharT, const locale&); 20472: 20472: template 20472: _CharT 20472: tolower(_CharT, const locale&); 20472: 20472: 20472: class ctype_base; 20472: template 20472: class ctype; 20472: template<> class ctype; 20472: 20472: template<> class ctype; 20472: 20472: template 20472: class ctype_byname; 20472: 20472: 20472: class codecvt_base; 20472: template 20472: class codecvt; 20472: template<> class codecvt; 20472: 20472: template<> class codecvt; 20472: 20472: 20472: template<> class codecvt; 20472: template<> class codecvt; 20472: 20472: 20472: 20472: 20472: 20472: template 20472: class codecvt_byname; 20472: 20472: 20472: 20472: template > 20472: class num_get; 20472: template > 20472: class num_put; 20472: 20472: namespace __cxx11 { 20472: template class numpunct; 20472: template class numpunct_byname; 20472: } 20472: 20472: namespace __cxx11 { 20472: 20472: template 20472: class collate; 20472: template 20472: class collate_byname; 20472: } 20472: 20472: 20472: class time_base; 20472: namespace __cxx11 { 20472: template > 20472: class time_get; 20472: template > 20472: class time_get_byname; 20472: } 20472: template > 20472: class time_put; 20472: template > 20472: class time_put_byname; 20472: 20472: 20472: class money_base; 20472: namespace __cxx11 { 20472: template > 20472: class money_get; 20472: template > 20472: class money_put; 20472: } 20472: namespace __cxx11 { 20472: template 20472: class moneypunct; 20472: template 20472: class moneypunct_byname; 20472: } 20472: 20472: 20472: class messages_base; 20472: namespace __cxx11 { 20472: template 20472: class messages; 20472: template 20472: class messages_byname; 20472: } 20472: 20472: 20472: } 20472: # 44 "/usr/include/c++/10/string" 2 3 20472: # 1 "/usr/include/c++/10/bits/ostream_insert.h" 1 3 20472: # 33 "/usr/include/c++/10/bits/ostream_insert.h" 3 20472: 20472: # 34 "/usr/include/c++/10/bits/ostream_insert.h" 3 20472: 20472: 20472: # 1 "/usr/include/c++/10/bits/cxxabi_forced.h" 1 3 20472: # 34 "/usr/include/c++/10/bits/cxxabi_forced.h" 3 20472: 20472: # 35 "/usr/include/c++/10/bits/cxxabi_forced.h" 3 20472: 20472: #pragma GCC visibility push(default) 20472: 20472: 20472: namespace __cxxabiv1 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: class __forced_unwind 20472: { 20472: virtual ~__forced_unwind() throw(); 20472: 20472: 20472: virtual void __pure_dummy() = 0; 20472: }; 20472: } 20472: 20472: 20472: #pragma GCC visibility pop 20472: # 37 "/usr/include/c++/10/bits/ostream_insert.h" 2 3 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: template 20472: inline void 20472: __ostream_write(basic_ostream<_CharT, _Traits>& __out, 20472: const _CharT* __s, streamsize __n) 20472: { 20472: typedef basic_ostream<_CharT, _Traits> __ostream_type; 20472: typedef typename __ostream_type::ios_base __ios_base; 20472: 20472: const streamsize __put = __out.rdbuf()->sputn(__s, __n); 20472: if (__put != __n) 20472: __out.setstate(__ios_base::badbit); 20472: } 20472: 20472: template 20472: inline void 20472: __ostream_fill(basic_ostream<_CharT, _Traits>& __out, streamsize __n) 20472: { 20472: typedef basic_ostream<_CharT, _Traits> __ostream_type; 20472: typedef typename __ostream_type::ios_base __ios_base; 20472: 20472: const _CharT __c = __out.fill(); 20472: for (; __n > 0; --__n) 20472: { 20472: const typename _Traits::int_type __put = __out.rdbuf()->sputc(__c); 20472: if (_Traits::eq_int_type(__put, _Traits::eof())) 20472: { 20472: __out.setstate(__ios_base::badbit); 20472: break; 20472: } 20472: } 20472: } 20472: 20472: template 20472: basic_ostream<_CharT, _Traits>& 20472: __ostream_insert(basic_ostream<_CharT, _Traits>& __out, 20472: const _CharT* __s, streamsize __n) 20472: { 20472: typedef basic_ostream<_CharT, _Traits> __ostream_type; 20472: typedef typename __ostream_type::ios_base __ios_base; 20472: 20472: typename __ostream_type::sentry __cerb(__out); 20472: if (__cerb) 20472: { 20472: try 20472: { 20472: const streamsize __w = __out.width(); 20472: if (__w > __n) 20472: { 20472: const bool __left = ((__out.flags() 20472: & __ios_base::adjustfield) 20472: == __ios_base::left); 20472: if (!__left) 20472: __ostream_fill(__out, __w - __n); 20472: if (__out.good()) 20472: __ostream_write(__out, __s, __n); 20472: if (__left && __out.good()) 20472: __ostream_fill(__out, __w - __n); 20472: } 20472: else 20472: __ostream_write(__out, __s, __n); 20472: __out.width(0); 20472: } 20472: catch(__cxxabiv1::__forced_unwind&) 20472: { 20472: __out._M_setstate(__ios_base::badbit); 20472: throw; 20472: } 20472: catch(...) 20472: { __out._M_setstate(__ios_base::badbit); } 20472: } 20472: return __out; 20472: } 20472: 20472: 20472: 20472: 20472: extern template ostream& __ostream_insert(ostream&, const char*, streamsize); 20472: 20472: 20472: extern template wostream& __ostream_insert(wostream&, const wchar_t*, 20472: streamsize); 20472: 20472: 20472: 20472: 20472: } 20472: # 45 "/usr/include/c++/10/string" 2 3 20472: # 55 "/usr/include/c++/10/string" 3 20472: # 1 "/usr/include/c++/10/bits/basic_string.h" 1 3 20472: # 37 "/usr/include/c++/10/bits/basic_string.h" 3 20472: 20472: # 38 "/usr/include/c++/10/bits/basic_string.h" 3 20472: # 52 "/usr/include/c++/10/bits/basic_string.h" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: namespace __cxx11 { 20472: # 76 "/usr/include/c++/10/bits/basic_string.h" 3 20472: template 20472: class basic_string 20472: { 20472: typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template 20472: rebind<_CharT>::other _Char_alloc_type; 20472: typedef __gnu_cxx::__alloc_traits<_Char_alloc_type> _Alloc_traits; 20472: 20472: 20472: public: 20472: typedef _Traits traits_type; 20472: typedef typename _Traits::char_type value_type; 20472: typedef _Char_alloc_type allocator_type; 20472: typedef typename _Alloc_traits::size_type size_type; 20472: typedef typename _Alloc_traits::difference_type difference_type; 20472: typedef typename _Alloc_traits::reference reference; 20472: typedef typename _Alloc_traits::const_reference const_reference; 20472: typedef typename _Alloc_traits::pointer pointer; 20472: typedef typename _Alloc_traits::const_pointer const_pointer; 20472: typedef __gnu_cxx::__normal_iterator iterator; 20472: typedef __gnu_cxx::__normal_iterator 20472: const_iterator; 20472: typedef std::reverse_iterator const_reverse_iterator; 20472: typedef std::reverse_iterator reverse_iterator; 20472: 20472: 20472: static const size_type npos = static_cast(-1); 20472: 20472: protected: 20472: 20472: 20472: 20472: 20472: typedef const_iterator __const_iterator; 20472: 20472: 20472: private: 20472: # 150 "/usr/include/c++/10/bits/basic_string.h" 3 20472: struct _Alloc_hider : allocator_type 20472: { 20472: 20472: 20472: 20472: 20472: _Alloc_hider(pointer __dat, const _Alloc& __a) 20472: : allocator_type(__a), _M_p(__dat) { } 20472: 20472: _Alloc_hider(pointer __dat, _Alloc&& __a = _Alloc()) 20472: : allocator_type(std::move(__a)), _M_p(__dat) { } 20472: 20472: 20472: pointer _M_p; 20472: }; 20472: 20472: _Alloc_hider _M_dataplus; 20472: size_type _M_string_length; 20472: 20472: enum { _S_local_capacity = 15 / sizeof(_CharT) }; 20472: 20472: union 20472: { 20472: _CharT _M_local_buf[_S_local_capacity + 1]; 20472: size_type _M_allocated_capacity; 20472: }; 20472: 20472: void 20472: _M_data(pointer __p) 20472: { _M_dataplus._M_p = __p; } 20472: 20472: void 20472: _M_length(size_type __length) 20472: { _M_string_length = __length; } 20472: 20472: pointer 20472: _M_data() const 20472: { return _M_dataplus._M_p; } 20472: 20472: pointer 20472: _M_local_data() 20472: { 20472: 20472: return std::pointer_traits::pointer_to(*_M_local_buf); 20472: 20472: 20472: 20472: } 20472: 20472: const_pointer 20472: _M_local_data() const 20472: { 20472: 20472: return std::pointer_traits::pointer_to(*_M_local_buf); 20472: 20472: 20472: 20472: } 20472: 20472: void 20472: _M_capacity(size_type __capacity) 20472: { _M_allocated_capacity = __capacity; } 20472: 20472: void 20472: _M_set_length(size_type __n) 20472: { 20472: _M_length(__n); 20472: traits_type::assign(_M_data()[__n], _CharT()); 20472: } 20472: 20472: bool 20472: _M_is_local() const 20472: { return _M_data() == _M_local_data(); } 20472: 20472: 20472: pointer 20472: _M_create(size_type&, size_type); 20472: 20472: void 20472: _M_dispose() 20472: { 20472: if (!_M_is_local()) 20472: _M_destroy(_M_allocated_capacity); 20472: } 20472: 20472: void 20472: _M_destroy(size_type __size) throw() 20472: { _Alloc_traits::deallocate(_M_get_allocator(), _M_data(), __size + 1); } 20472: 20472: 20472: 20472: template 20472: void 20472: _M_construct_aux(_InIterator __beg, _InIterator __end, 20472: std::__false_type) 20472: { 20472: typedef typename iterator_traits<_InIterator>::iterator_category _Tag; 20472: _M_construct(__beg, __end, _Tag()); 20472: } 20472: 20472: 20472: 20472: template 20472: void 20472: _M_construct_aux(_Integer __beg, _Integer __end, std::__true_type) 20472: { _M_construct_aux_2(static_cast(__beg), __end); } 20472: 20472: void 20472: _M_construct_aux_2(size_type __req, _CharT __c) 20472: { _M_construct(__req, __c); } 20472: 20472: template 20472: void 20472: _M_construct(_InIterator __beg, _InIterator __end) 20472: { 20472: typedef typename std::__is_integer<_InIterator>::__type _Integral; 20472: _M_construct_aux(__beg, __end, _Integral()); 20472: } 20472: 20472: 20472: template 20472: void 20472: _M_construct(_InIterator __beg, _InIterator __end, 20472: std::input_iterator_tag); 20472: 20472: 20472: 20472: template 20472: void 20472: _M_construct(_FwdIterator __beg, _FwdIterator __end, 20472: std::forward_iterator_tag); 20472: 20472: void 20472: _M_construct(size_type __req, _CharT __c); 20472: 20472: allocator_type& 20472: _M_get_allocator() 20472: { return _M_dataplus; } 20472: 20472: const allocator_type& 20472: _M_get_allocator() const 20472: { return _M_dataplus; } 20472: 20472: private: 20472: # 309 "/usr/include/c++/10/bits/basic_string.h" 3 20472: size_type 20472: _M_check(size_type __pos, const char* __s) const 20472: { 20472: if (__pos > this->size()) 20472: __throw_out_of_range_fmt(("%s: __pos (which is %zu) > " "this->size() (which is %zu)") 20472: , 20472: __s, __pos, this->size()); 20472: return __pos; 20472: } 20472: 20472: void 20472: _M_check_length(size_type __n1, size_type __n2, const char* __s) const 20472: { 20472: if (this->max_size() - (this->size() - __n1) < __n2) 20472: __throw_length_error((__s)); 20472: } 20472: 20472: 20472: 20472: size_type 20472: _M_limit(size_type __pos, size_type __off) const noexcept 20472: { 20472: const bool __testoff = __off < this->size() - __pos; 20472: return __testoff ? __off : this->size() - __pos; 20472: } 20472: 20472: 20472: bool 20472: _M_disjunct(const _CharT* __s) const noexcept 20472: { 20472: return (less()(__s, _M_data()) 20472: || less()(_M_data() + this->size(), __s)); 20472: } 20472: 20472: 20472: 20472: static void 20472: _S_copy(_CharT* __d, const _CharT* __s, size_type __n) 20472: { 20472: if (__n == 1) 20472: traits_type::assign(*__d, *__s); 20472: else 20472: traits_type::copy(__d, __s, __n); 20472: } 20472: 20472: static void 20472: _S_move(_CharT* __d, const _CharT* __s, size_type __n) 20472: { 20472: if (__n == 1) 20472: traits_type::assign(*__d, *__s); 20472: else 20472: traits_type::move(__d, __s, __n); 20472: } 20472: 20472: static void 20472: _S_assign(_CharT* __d, size_type __n, _CharT __c) 20472: { 20472: if (__n == 1) 20472: traits_type::assign(*__d, __c); 20472: else 20472: traits_type::assign(__d, __n, __c); 20472: } 20472: 20472: 20472: 20472: template 20472: static void 20472: _S_copy_chars(_CharT* __p, _Iterator __k1, _Iterator __k2) 20472: { 20472: for (; __k1 != __k2; ++__k1, (void)++__p) 20472: traits_type::assign(*__p, *__k1); 20472: } 20472: 20472: static void 20472: _S_copy_chars(_CharT* __p, iterator __k1, iterator __k2) noexcept 20472: { _S_copy_chars(__p, __k1.base(), __k2.base()); } 20472: 20472: static void 20472: _S_copy_chars(_CharT* __p, const_iterator __k1, const_iterator __k2) 20472: noexcept 20472: { _S_copy_chars(__p, __k1.base(), __k2.base()); } 20472: 20472: static void 20472: _S_copy_chars(_CharT* __p, _CharT* __k1, _CharT* __k2) noexcept 20472: { _S_copy(__p, __k1, __k2 - __k1); } 20472: 20472: static void 20472: _S_copy_chars(_CharT* __p, const _CharT* __k1, const _CharT* __k2) 20472: noexcept 20472: { _S_copy(__p, __k1, __k2 - __k1); } 20472: 20472: static int 20472: _S_compare(size_type __n1, size_type __n2) noexcept 20472: { 20472: const difference_type __d = difference_type(__n1 - __n2); 20472: 20472: if (__d > __gnu_cxx::__numeric_traits::__max) 20472: return __gnu_cxx::__numeric_traits::__max; 20472: else if (__d < __gnu_cxx::__numeric_traits::__min) 20472: return __gnu_cxx::__numeric_traits::__min; 20472: else 20472: return int(__d); 20472: } 20472: 20472: void 20472: _M_assign(const basic_string&); 20472: 20472: void 20472: _M_mutate(size_type __pos, size_type __len1, const _CharT* __s, 20472: size_type __len2); 20472: 20472: void 20472: _M_erase(size_type __pos, size_type __n); 20472: 20472: public: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: basic_string() 20472: noexcept(is_nothrow_default_constructible<_Alloc>::value) 20472: : _M_dataplus(_M_local_data()) 20472: { _M_set_length(0); } 20472: 20472: 20472: 20472: 20472: explicit 20472: basic_string(const _Alloc& __a) noexcept 20472: : _M_dataplus(_M_local_data(), __a) 20472: { _M_set_length(0); } 20472: 20472: 20472: 20472: 20472: 20472: basic_string(const basic_string& __str) 20472: : _M_dataplus(_M_local_data(), 20472: _Alloc_traits::_S_select_on_copy(__str._M_get_allocator())) 20472: { _M_construct(__str._M_data(), __str._M_data() + __str.length()); } 20472: # 461 "/usr/include/c++/10/bits/basic_string.h" 3 20472: basic_string(const basic_string& __str, size_type __pos, 20472: const _Alloc& __a = _Alloc()) 20472: : _M_dataplus(_M_local_data(), __a) 20472: { 20472: const _CharT* __start = __str._M_data() 20472: + __str._M_check(__pos, "basic_string::basic_string"); 20472: _M_construct(__start, __start + __str._M_limit(__pos, npos)); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: basic_string(const basic_string& __str, size_type __pos, 20472: size_type __n) 20472: : _M_dataplus(_M_local_data()) 20472: { 20472: const _CharT* __start = __str._M_data() 20472: + __str._M_check(__pos, "basic_string::basic_string"); 20472: _M_construct(__start, __start + __str._M_limit(__pos, __n)); 20472: } 20472: # 492 "/usr/include/c++/10/bits/basic_string.h" 3 20472: basic_string(const basic_string& __str, size_type __pos, 20472: size_type __n, const _Alloc& __a) 20472: : _M_dataplus(_M_local_data(), __a) 20472: { 20472: const _CharT* __start 20472: = __str._M_data() + __str._M_check(__pos, "string::string"); 20472: _M_construct(__start, __start + __str._M_limit(__pos, __n)); 20472: } 20472: # 510 "/usr/include/c++/10/bits/basic_string.h" 3 20472: basic_string(const _CharT* __s, size_type __n, 20472: const _Alloc& __a = _Alloc()) 20472: : _M_dataplus(_M_local_data(), __a) 20472: { _M_construct(__s, __s + __n); } 20472: # 525 "/usr/include/c++/10/bits/basic_string.h" 3 20472: basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()) 20472: : _M_dataplus(_M_local_data(), __a) 20472: { _M_construct(__s, __s ? __s + traits_type::length(__s) : __s+npos); } 20472: # 540 "/usr/include/c++/10/bits/basic_string.h" 3 20472: basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc()) 20472: : _M_dataplus(_M_local_data(), __a) 20472: { _M_construct(__n, __c); } 20472: # 552 "/usr/include/c++/10/bits/basic_string.h" 3 20472: basic_string(basic_string&& __str) noexcept 20472: : _M_dataplus(_M_local_data(), std::move(__str._M_get_allocator())) 20472: { 20472: if (__str._M_is_local()) 20472: { 20472: traits_type::copy(_M_local_buf, __str._M_local_buf, 20472: _S_local_capacity + 1); 20472: } 20472: else 20472: { 20472: _M_data(__str._M_data()); 20472: _M_capacity(__str._M_allocated_capacity); 20472: } 20472: 20472: 20472: 20472: 20472: _M_length(__str.length()); 20472: __str._M_data(__str._M_local_data()); 20472: __str._M_set_length(0); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc()) 20472: : _M_dataplus(_M_local_data(), __a) 20472: { _M_construct(__l.begin(), __l.end()); } 20472: 20472: basic_string(const basic_string& __str, const _Alloc& __a) 20472: : _M_dataplus(_M_local_data(), __a) 20472: { _M_construct(__str.begin(), __str.end()); } 20472: 20472: basic_string(basic_string&& __str, const _Alloc& __a) 20472: noexcept(_Alloc_traits::_S_always_equal()) 20472: : _M_dataplus(_M_local_data(), __a) 20472: { 20472: if (__str._M_is_local()) 20472: { 20472: traits_type::copy(_M_local_buf, __str._M_local_buf, 20472: _S_local_capacity + 1); 20472: _M_length(__str.length()); 20472: __str._M_set_length(0); 20472: } 20472: else if (_Alloc_traits::_S_always_equal() 20472: || __str.get_allocator() == __a) 20472: { 20472: _M_data(__str._M_data()); 20472: _M_length(__str.length()); 20472: _M_capacity(__str._M_allocated_capacity); 20472: __str._M_data(__str._M_local_buf); 20472: __str._M_set_length(0); 20472: } 20472: else 20472: _M_construct(__str.begin(), __str.end()); 20472: } 20472: # 620 "/usr/include/c++/10/bits/basic_string.h" 3 20472: template> 20472: 20472: 20472: 20472: basic_string(_InputIterator __beg, _InputIterator __end, 20472: const _Alloc& __a = _Alloc()) 20472: : _M_dataplus(_M_local_data(), __a) 20472: { _M_construct(__beg, __end); } 20472: # 657 "/usr/include/c++/10/bits/basic_string.h" 3 20472: ~basic_string() 20472: { _M_dispose(); } 20472: 20472: 20472: 20472: 20472: 20472: basic_string& 20472: operator=(const basic_string& __str) 20472: { 20472: return this->assign(__str); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: basic_string& 20472: operator=(const _CharT* __s) 20472: { return this->assign(__s); } 20472: # 685 "/usr/include/c++/10/bits/basic_string.h" 3 20472: basic_string& 20472: operator=(_CharT __c) 20472: { 20472: this->assign(1, __c); 20472: return *this; 20472: } 20472: # 702 "/usr/include/c++/10/bits/basic_string.h" 3 20472: basic_string& 20472: operator=(basic_string&& __str) 20472: noexcept(_Alloc_traits::_S_nothrow_move()) 20472: { 20472: if (!_M_is_local() && _Alloc_traits::_S_propagate_on_move_assign() 20472: && !_Alloc_traits::_S_always_equal() 20472: && _M_get_allocator() != __str._M_get_allocator()) 20472: { 20472: 20472: _M_destroy(_M_allocated_capacity); 20472: _M_data(_M_local_data()); 20472: _M_set_length(0); 20472: } 20472: 20472: std::__alloc_on_move(_M_get_allocator(), __str._M_get_allocator()); 20472: 20472: if (__str._M_is_local()) 20472: { 20472: 20472: if (__str.size()) 20472: this->_S_copy(_M_data(), __str._M_data(), __str.size()); 20472: _M_set_length(__str.size()); 20472: } 20472: else if (_Alloc_traits::_S_propagate_on_move_assign() 20472: || _Alloc_traits::_S_always_equal() 20472: || _M_get_allocator() == __str._M_get_allocator()) 20472: { 20472: 20472: pointer __data = nullptr; 20472: size_type __capacity; 20472: if (!_M_is_local()) 20472: { 20472: if (_Alloc_traits::_S_always_equal()) 20472: { 20472: 20472: __data = _M_data(); 20472: __capacity = _M_allocated_capacity; 20472: } 20472: else 20472: _M_destroy(_M_allocated_capacity); 20472: } 20472: 20472: _M_data(__str._M_data()); 20472: _M_length(__str.length()); 20472: _M_capacity(__str._M_allocated_capacity); 20472: if (__data) 20472: { 20472: __str._M_data(__data); 20472: __str._M_capacity(__capacity); 20472: } 20472: else 20472: __str._M_data(__str._M_local_buf); 20472: } 20472: else 20472: assign(__str); 20472: __str.clear(); 20472: return *this; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: basic_string& 20472: operator=(initializer_list<_CharT> __l) 20472: { 20472: this->assign(__l.begin(), __l.size()); 20472: return *this; 20472: } 20472: # 796 "/usr/include/c++/10/bits/basic_string.h" 3 20472: iterator 20472: begin() noexcept 20472: { return iterator(_M_data()); } 20472: 20472: 20472: 20472: 20472: 20472: const_iterator 20472: begin() const noexcept 20472: { return const_iterator(_M_data()); } 20472: 20472: 20472: 20472: 20472: 20472: iterator 20472: end() noexcept 20472: { return iterator(_M_data() + this->size()); } 20472: 20472: 20472: 20472: 20472: 20472: const_iterator 20472: end() const noexcept 20472: { return const_iterator(_M_data() + this->size()); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: reverse_iterator 20472: rbegin() noexcept 20472: { return reverse_iterator(this->end()); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: const_reverse_iterator 20472: rbegin() const noexcept 20472: { return const_reverse_iterator(this->end()); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: reverse_iterator 20472: rend() noexcept 20472: { return reverse_iterator(this->begin()); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: const_reverse_iterator 20472: rend() const noexcept 20472: { return const_reverse_iterator(this->begin()); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: const_iterator 20472: cbegin() const noexcept 20472: { return const_iterator(this->_M_data()); } 20472: 20472: 20472: 20472: 20472: 20472: const_iterator 20472: cend() const noexcept 20472: { return const_iterator(this->_M_data() + this->size()); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: const_reverse_iterator 20472: crbegin() const noexcept 20472: { return const_reverse_iterator(this->end()); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: const_reverse_iterator 20472: crend() const noexcept 20472: { return const_reverse_iterator(this->begin()); } 20472: 20472: 20472: public: 20472: 20472: 20472: 20472: size_type 20472: size() const noexcept 20472: { return _M_string_length; } 20472: 20472: 20472: 20472: size_type 20472: length() const noexcept 20472: { return _M_string_length; } 20472: 20472: 20472: size_type 20472: max_size() const noexcept 20472: { return (_Alloc_traits::max_size(_M_get_allocator()) - 1) / 2; } 20472: # 925 "/usr/include/c++/10/bits/basic_string.h" 3 20472: void 20472: resize(size_type __n, _CharT __c); 20472: # 938 "/usr/include/c++/10/bits/basic_string.h" 3 20472: void 20472: resize(size_type __n) 20472: { this->resize(__n, _CharT()); } 20472: 20472: 20472: 20472: void 20472: shrink_to_fit() noexcept 20472: { 20472: 20472: if (capacity() > size()) 20472: { 20472: try 20472: { reserve(0); } 20472: catch(...) 20472: { } 20472: } 20472: 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: size_type 20472: capacity() const noexcept 20472: { 20472: return _M_is_local() ? size_type(_S_local_capacity) 20472: : _M_allocated_capacity; 20472: } 20472: # 987 "/usr/include/c++/10/bits/basic_string.h" 3 20472: void 20472: reserve(size_type __res_arg = 0); 20472: 20472: 20472: 20472: 20472: void 20472: clear() noexcept 20472: { _M_set_length(0); } 20472: 20472: 20472: 20472: 20472: 20472: bool 20472: empty() const noexcept 20472: { return this->size() == 0; } 20472: # 1016 "/usr/include/c++/10/bits/basic_string.h" 3 20472: const_reference 20472: operator[] (size_type __pos) const noexcept 20472: { 20472: ; 20472: return _M_data()[__pos]; 20472: } 20472: # 1033 "/usr/include/c++/10/bits/basic_string.h" 3 20472: reference 20472: operator[](size_type __pos) 20472: { 20472: 20472: 20472: ; 20472: 20472: ; 20472: return _M_data()[__pos]; 20472: } 20472: # 1054 "/usr/include/c++/10/bits/basic_string.h" 3 20472: const_reference 20472: at(size_type __n) const 20472: { 20472: if (__n >= this->size()) 20472: __throw_out_of_range_fmt(("basic_string::at: __n " "(which is %zu) >= this->size() " "(which is %zu)") 20472: 20472: , 20472: __n, this->size()); 20472: return _M_data()[__n]; 20472: } 20472: # 1075 "/usr/include/c++/10/bits/basic_string.h" 3 20472: reference 20472: at(size_type __n) 20472: { 20472: if (__n >= size()) 20472: __throw_out_of_range_fmt(("basic_string::at: __n " "(which is %zu) >= this->size() " "(which is %zu)") 20472: 20472: , 20472: __n, this->size()); 20472: return _M_data()[__n]; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: reference 20472: front() noexcept 20472: { 20472: ; 20472: return operator[](0); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: const_reference 20472: front() const noexcept 20472: { 20472: ; 20472: return operator[](0); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: reference 20472: back() noexcept 20472: { 20472: ; 20472: return operator[](this->size() - 1); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: const_reference 20472: back() const noexcept 20472: { 20472: ; 20472: return operator[](this->size() - 1); 20472: } 20472: # 1138 "/usr/include/c++/10/bits/basic_string.h" 3 20472: basic_string& 20472: operator+=(const basic_string& __str) 20472: { return this->append(__str); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: basic_string& 20472: operator+=(const _CharT* __s) 20472: { return this->append(__s); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: basic_string& 20472: operator+=(_CharT __c) 20472: { 20472: this->push_back(__c); 20472: return *this; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: basic_string& 20472: operator+=(initializer_list<_CharT> __l) 20472: { return this->append(__l.begin(), __l.size()); } 20472: # 1191 "/usr/include/c++/10/bits/basic_string.h" 3 20472: basic_string& 20472: append(const basic_string& __str) 20472: { return _M_append(__str._M_data(), __str.size()); } 20472: # 1208 "/usr/include/c++/10/bits/basic_string.h" 3 20472: basic_string& 20472: append(const basic_string& __str, size_type __pos, size_type __n = npos) 20472: { return _M_append(__str._M_data() 20472: + __str._M_check(__pos, "basic_string::append"), 20472: __str._M_limit(__pos, __n)); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: basic_string& 20472: append(const _CharT* __s, size_type __n) 20472: { 20472: ; 20472: _M_check_length(size_type(0), __n, "basic_string::append"); 20472: return _M_append(__s, __n); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: basic_string& 20472: append(const _CharT* __s) 20472: { 20472: ; 20472: const size_type __n = traits_type::length(__s); 20472: _M_check_length(size_type(0), __n, "basic_string::append"); 20472: return _M_append(__s, __n); 20472: } 20472: # 1250 "/usr/include/c++/10/bits/basic_string.h" 3 20472: basic_string& 20472: append(size_type __n, _CharT __c) 20472: { return _M_replace_aux(this->size(), size_type(0), __n, __c); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: basic_string& 20472: append(initializer_list<_CharT> __l) 20472: { return this->append(__l.begin(), __l.size()); } 20472: # 1274 "/usr/include/c++/10/bits/basic_string.h" 3 20472: template> 20472: 20472: 20472: 20472: basic_string& 20472: append(_InputIterator __first, _InputIterator __last) 20472: { return this->replace(end(), end(), __first, __last); } 20472: # 1319 "/usr/include/c++/10/bits/basic_string.h" 3 20472: void 20472: push_back(_CharT __c) 20472: { 20472: const size_type __size = this->size(); 20472: if (__size + 1 > this->capacity()) 20472: this->_M_mutate(__size, size_type(0), 0, size_type(1)); 20472: traits_type::assign(this->_M_data()[__size], __c); 20472: this->_M_set_length(__size + 1); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: basic_string& 20472: assign(const basic_string& __str) 20472: { 20472: 20472: if (_Alloc_traits::_S_propagate_on_copy_assign()) 20472: { 20472: if (!_Alloc_traits::_S_always_equal() && !_M_is_local() 20472: && _M_get_allocator() != __str._M_get_allocator()) 20472: { 20472: 20472: 20472: if (__str.size() <= _S_local_capacity) 20472: { 20472: _M_destroy(_M_allocated_capacity); 20472: _M_data(_M_local_data()); 20472: _M_set_length(0); 20472: } 20472: else 20472: { 20472: const auto __len = __str.size(); 20472: auto __alloc = __str._M_get_allocator(); 20472: 20472: auto __ptr = _Alloc_traits::allocate(__alloc, __len + 1); 20472: _M_destroy(_M_allocated_capacity); 20472: _M_data(__ptr); 20472: _M_capacity(__len); 20472: _M_set_length(__len); 20472: } 20472: } 20472: std::__alloc_on_copy(_M_get_allocator(), __str._M_get_allocator()); 20472: } 20472: 20472: this->_M_assign(__str); 20472: return *this; 20472: } 20472: # 1379 "/usr/include/c++/10/bits/basic_string.h" 3 20472: basic_string& 20472: assign(basic_string&& __str) 20472: noexcept(_Alloc_traits::_S_nothrow_move()) 20472: { 20472: 20472: 20472: return *this = std::move(__str); 20472: } 20472: # 1402 "/usr/include/c++/10/bits/basic_string.h" 3 20472: basic_string& 20472: assign(const basic_string& __str, size_type __pos, size_type __n = npos) 20472: { return _M_replace(size_type(0), this->size(), __str._M_data() 20472: + __str._M_check(__pos, "basic_string::assign"), 20472: __str._M_limit(__pos, __n)); } 20472: # 1418 "/usr/include/c++/10/bits/basic_string.h" 3 20472: basic_string& 20472: assign(const _CharT* __s, size_type __n) 20472: { 20472: ; 20472: return _M_replace(size_type(0), this->size(), __s, __n); 20472: } 20472: # 1434 "/usr/include/c++/10/bits/basic_string.h" 3 20472: basic_string& 20472: assign(const _CharT* __s) 20472: { 20472: ; 20472: return _M_replace(size_type(0), this->size(), __s, 20472: traits_type::length(__s)); 20472: } 20472: # 1451 "/usr/include/c++/10/bits/basic_string.h" 3 20472: basic_string& 20472: assign(size_type __n, _CharT __c) 20472: { return _M_replace_aux(size_type(0), this->size(), __n, __c); } 20472: # 1464 "/usr/include/c++/10/bits/basic_string.h" 3 20472: template> 20472: 20472: 20472: 20472: basic_string& 20472: assign(_InputIterator __first, _InputIterator __last) 20472: { return this->replace(begin(), end(), __first, __last); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: basic_string& 20472: assign(initializer_list<_CharT> __l) 20472: { return this->assign(__l.begin(), __l.size()); } 20472: # 1533 "/usr/include/c++/10/bits/basic_string.h" 3 20472: iterator 20472: insert(const_iterator __p, size_type __n, _CharT __c) 20472: { 20472: ; 20472: const size_type __pos = __p - begin(); 20472: this->replace(__p, __p, __n, __c); 20472: return iterator(this->_M_data() + __pos); 20472: } 20472: # 1575 "/usr/include/c++/10/bits/basic_string.h" 3 20472: template> 20472: iterator 20472: insert(const_iterator __p, _InputIterator __beg, _InputIterator __end) 20472: { 20472: ; 20472: const size_type __pos = __p - begin(); 20472: this->replace(__p, __p, __beg, __end); 20472: return iterator(this->_M_data() + __pos); 20472: } 20472: # 1611 "/usr/include/c++/10/bits/basic_string.h" 3 20472: iterator 20472: insert(const_iterator __p, initializer_list<_CharT> __l) 20472: { return this->insert(__p, __l.begin(), __l.end()); } 20472: # 1638 "/usr/include/c++/10/bits/basic_string.h" 3 20472: basic_string& 20472: insert(size_type __pos1, const basic_string& __str) 20472: { return this->replace(__pos1, size_type(0), 20472: __str._M_data(), __str.size()); } 20472: # 1661 "/usr/include/c++/10/bits/basic_string.h" 3 20472: basic_string& 20472: insert(size_type __pos1, const basic_string& __str, 20472: size_type __pos2, size_type __n = npos) 20472: { return this->replace(__pos1, size_type(0), __str._M_data() 20472: + __str._M_check(__pos2, "basic_string::insert"), 20472: __str._M_limit(__pos2, __n)); } 20472: # 1684 "/usr/include/c++/10/bits/basic_string.h" 3 20472: basic_string& 20472: insert(size_type __pos, const _CharT* __s, size_type __n) 20472: { return this->replace(__pos, size_type(0), __s, __n); } 20472: # 1703 "/usr/include/c++/10/bits/basic_string.h" 3 20472: basic_string& 20472: insert(size_type __pos, const _CharT* __s) 20472: { 20472: ; 20472: return this->replace(__pos, size_type(0), __s, 20472: traits_type::length(__s)); 20472: } 20472: # 1727 "/usr/include/c++/10/bits/basic_string.h" 3 20472: basic_string& 20472: insert(size_type __pos, size_type __n, _CharT __c) 20472: { return _M_replace_aux(_M_check(__pos, "basic_string::insert"), 20472: size_type(0), __n, __c); } 20472: # 1745 "/usr/include/c++/10/bits/basic_string.h" 3 20472: iterator 20472: insert(__const_iterator __p, _CharT __c) 20472: { 20472: ; 20472: const size_type __pos = __p - begin(); 20472: _M_replace_aux(__pos, size_type(0), size_type(1), __c); 20472: return iterator(_M_data() + __pos); 20472: } 20472: # 1805 "/usr/include/c++/10/bits/basic_string.h" 3 20472: basic_string& 20472: erase(size_type __pos = 0, size_type __n = npos) 20472: { 20472: _M_check(__pos, "basic_string::erase"); 20472: if (__n == npos) 20472: this->_M_set_length(__pos); 20472: else if (__n != 0) 20472: this->_M_erase(__pos, _M_limit(__pos, __n)); 20472: return *this; 20472: } 20472: # 1824 "/usr/include/c++/10/bits/basic_string.h" 3 20472: iterator 20472: erase(__const_iterator __position) 20472: { 20472: 20472: ; 20472: const size_type __pos = __position - begin(); 20472: this->_M_erase(__pos, size_type(1)); 20472: return iterator(_M_data() + __pos); 20472: } 20472: # 1843 "/usr/include/c++/10/bits/basic_string.h" 3 20472: iterator 20472: erase(__const_iterator __first, __const_iterator __last) 20472: { 20472: 20472: ; 20472: const size_type __pos = __first - begin(); 20472: if (__last == end()) 20472: this->_M_set_length(__pos); 20472: else 20472: this->_M_erase(__pos, __last - __first); 20472: return iterator(this->_M_data() + __pos); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: void 20472: pop_back() noexcept 20472: { 20472: ; 20472: _M_erase(size() - 1, 1); 20472: } 20472: # 1887 "/usr/include/c++/10/bits/basic_string.h" 3 20472: basic_string& 20472: replace(size_type __pos, size_type __n, const basic_string& __str) 20472: { return this->replace(__pos, __n, __str._M_data(), __str.size()); } 20472: # 1909 "/usr/include/c++/10/bits/basic_string.h" 3 20472: basic_string& 20472: replace(size_type __pos1, size_type __n1, const basic_string& __str, 20472: size_type __pos2, size_type __n2 = npos) 20472: { return this->replace(__pos1, __n1, __str._M_data() 20472: + __str._M_check(__pos2, "basic_string::replace"), 20472: __str._M_limit(__pos2, __n2)); } 20472: # 1934 "/usr/include/c++/10/bits/basic_string.h" 3 20472: basic_string& 20472: replace(size_type __pos, size_type __n1, const _CharT* __s, 20472: size_type __n2) 20472: { 20472: ; 20472: return _M_replace(_M_check(__pos, "basic_string::replace"), 20472: _M_limit(__pos, __n1), __s, __n2); 20472: } 20472: # 1959 "/usr/include/c++/10/bits/basic_string.h" 3 20472: basic_string& 20472: replace(size_type __pos, size_type __n1, const _CharT* __s) 20472: { 20472: ; 20472: return this->replace(__pos, __n1, __s, traits_type::length(__s)); 20472: } 20472: # 1983 "/usr/include/c++/10/bits/basic_string.h" 3 20472: basic_string& 20472: replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c) 20472: { return _M_replace_aux(_M_check(__pos, "basic_string::replace"), 20472: _M_limit(__pos, __n1), __n2, __c); } 20472: # 2001 "/usr/include/c++/10/bits/basic_string.h" 3 20472: basic_string& 20472: replace(__const_iterator __i1, __const_iterator __i2, 20472: const basic_string& __str) 20472: { return this->replace(__i1, __i2, __str._M_data(), __str.size()); } 20472: # 2021 "/usr/include/c++/10/bits/basic_string.h" 3 20472: basic_string& 20472: replace(__const_iterator __i1, __const_iterator __i2, 20472: const _CharT* __s, size_type __n) 20472: { 20472: 20472: ; 20472: return this->replace(__i1 - begin(), __i2 - __i1, __s, __n); 20472: } 20472: # 2043 "/usr/include/c++/10/bits/basic_string.h" 3 20472: basic_string& 20472: replace(__const_iterator __i1, __const_iterator __i2, const _CharT* __s) 20472: { 20472: ; 20472: return this->replace(__i1, __i2, __s, traits_type::length(__s)); 20472: } 20472: # 2064 "/usr/include/c++/10/bits/basic_string.h" 3 20472: basic_string& 20472: replace(__const_iterator __i1, __const_iterator __i2, size_type __n, 20472: _CharT __c) 20472: { 20472: 20472: ; 20472: return _M_replace_aux(__i1 - begin(), __i2 - __i1, __n, __c); 20472: } 20472: # 2089 "/usr/include/c++/10/bits/basic_string.h" 3 20472: template> 20472: basic_string& 20472: replace(const_iterator __i1, const_iterator __i2, 20472: _InputIterator __k1, _InputIterator __k2) 20472: { 20472: 20472: ; 20472: ; 20472: return this->_M_replace_dispatch(__i1, __i2, __k1, __k2, 20472: std::__false_type()); 20472: } 20472: # 2121 "/usr/include/c++/10/bits/basic_string.h" 3 20472: basic_string& 20472: replace(__const_iterator __i1, __const_iterator __i2, 20472: _CharT* __k1, _CharT* __k2) 20472: { 20472: 20472: ; 20472: ; 20472: return this->replace(__i1 - begin(), __i2 - __i1, 20472: __k1, __k2 - __k1); 20472: } 20472: 20472: basic_string& 20472: replace(__const_iterator __i1, __const_iterator __i2, 20472: const _CharT* __k1, const _CharT* __k2) 20472: { 20472: 20472: ; 20472: ; 20472: return this->replace(__i1 - begin(), __i2 - __i1, 20472: __k1, __k2 - __k1); 20472: } 20472: 20472: basic_string& 20472: replace(__const_iterator __i1, __const_iterator __i2, 20472: iterator __k1, iterator __k2) 20472: { 20472: 20472: ; 20472: ; 20472: return this->replace(__i1 - begin(), __i2 - __i1, 20472: __k1.base(), __k2 - __k1); 20472: } 20472: 20472: basic_string& 20472: replace(__const_iterator __i1, __const_iterator __i2, 20472: const_iterator __k1, const_iterator __k2) 20472: { 20472: 20472: ; 20472: ; 20472: return this->replace(__i1 - begin(), __i2 - __i1, 20472: __k1.base(), __k2 - __k1); 20472: } 20472: # 2180 "/usr/include/c++/10/bits/basic_string.h" 3 20472: basic_string& replace(const_iterator __i1, const_iterator __i2, 20472: initializer_list<_CharT> __l) 20472: { return this->replace(__i1, __i2, __l.begin(), __l.size()); } 20472: # 2240 "/usr/include/c++/10/bits/basic_string.h" 3 20472: private: 20472: template 20472: basic_string& 20472: _M_replace_dispatch(const_iterator __i1, const_iterator __i2, 20472: _Integer __n, _Integer __val, __true_type) 20472: { return _M_replace_aux(__i1 - begin(), __i2 - __i1, __n, __val); } 20472: 20472: template 20472: basic_string& 20472: _M_replace_dispatch(const_iterator __i1, const_iterator __i2, 20472: _InputIterator __k1, _InputIterator __k2, 20472: __false_type); 20472: 20472: basic_string& 20472: _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2, 20472: _CharT __c); 20472: 20472: basic_string& 20472: _M_replace(size_type __pos, size_type __len1, const _CharT* __s, 20472: const size_type __len2); 20472: 20472: basic_string& 20472: _M_append(const _CharT* __s, size_type __n); 20472: 20472: public: 20472: # 2278 "/usr/include/c++/10/bits/basic_string.h" 3 20472: size_type 20472: copy(_CharT* __s, size_type __n, size_type __pos = 0) const; 20472: # 2288 "/usr/include/c++/10/bits/basic_string.h" 3 20472: void 20472: swap(basic_string& __s) noexcept; 20472: # 2298 "/usr/include/c++/10/bits/basic_string.h" 3 20472: const _CharT* 20472: c_str() const noexcept 20472: { return _M_data(); } 20472: # 2310 "/usr/include/c++/10/bits/basic_string.h" 3 20472: const _CharT* 20472: data() const noexcept 20472: { return _M_data(); } 20472: # 2329 "/usr/include/c++/10/bits/basic_string.h" 3 20472: allocator_type 20472: get_allocator() const noexcept 20472: { return _M_get_allocator(); } 20472: # 2345 "/usr/include/c++/10/bits/basic_string.h" 3 20472: size_type 20472: find(const _CharT* __s, size_type __pos, size_type __n) const 20472: noexcept; 20472: # 2359 "/usr/include/c++/10/bits/basic_string.h" 3 20472: size_type 20472: find(const basic_string& __str, size_type __pos = 0) const 20472: noexcept 20472: { return this->find(__str.data(), __pos, __str.size()); } 20472: # 2391 "/usr/include/c++/10/bits/basic_string.h" 3 20472: size_type 20472: find(const _CharT* __s, size_type __pos = 0) const noexcept 20472: { 20472: ; 20472: return this->find(__s, __pos, traits_type::length(__s)); 20472: } 20472: # 2408 "/usr/include/c++/10/bits/basic_string.h" 3 20472: size_type 20472: find(_CharT __c, size_type __pos = 0) const noexcept; 20472: # 2421 "/usr/include/c++/10/bits/basic_string.h" 3 20472: size_type 20472: rfind(const basic_string& __str, size_type __pos = npos) const 20472: noexcept 20472: { return this->rfind(__str.data(), __pos, __str.size()); } 20472: # 2455 "/usr/include/c++/10/bits/basic_string.h" 3 20472: size_type 20472: rfind(const _CharT* __s, size_type __pos, size_type __n) const 20472: noexcept; 20472: # 2469 "/usr/include/c++/10/bits/basic_string.h" 3 20472: size_type 20472: rfind(const _CharT* __s, size_type __pos = npos) const 20472: { 20472: ; 20472: return this->rfind(__s, __pos, traits_type::length(__s)); 20472: } 20472: # 2486 "/usr/include/c++/10/bits/basic_string.h" 3 20472: size_type 20472: rfind(_CharT __c, size_type __pos = npos) const noexcept; 20472: # 2500 "/usr/include/c++/10/bits/basic_string.h" 3 20472: size_type 20472: find_first_of(const basic_string& __str, size_type __pos = 0) const 20472: noexcept 20472: { return this->find_first_of(__str.data(), __pos, __str.size()); } 20472: # 2535 "/usr/include/c++/10/bits/basic_string.h" 3 20472: size_type 20472: find_first_of(const _CharT* __s, size_type __pos, size_type __n) const 20472: noexcept; 20472: # 2549 "/usr/include/c++/10/bits/basic_string.h" 3 20472: size_type 20472: find_first_of(const _CharT* __s, size_type __pos = 0) const 20472: noexcept 20472: { 20472: ; 20472: return this->find_first_of(__s, __pos, traits_type::length(__s)); 20472: } 20472: # 2569 "/usr/include/c++/10/bits/basic_string.h" 3 20472: size_type 20472: find_first_of(_CharT __c, size_type __pos = 0) const noexcept 20472: { return this->find(__c, __pos); } 20472: # 2584 "/usr/include/c++/10/bits/basic_string.h" 3 20472: size_type 20472: find_last_of(const basic_string& __str, size_type __pos = npos) const 20472: noexcept 20472: { return this->find_last_of(__str.data(), __pos, __str.size()); } 20472: # 2619 "/usr/include/c++/10/bits/basic_string.h" 3 20472: size_type 20472: find_last_of(const _CharT* __s, size_type __pos, size_type __n) const 20472: noexcept; 20472: # 2633 "/usr/include/c++/10/bits/basic_string.h" 3 20472: size_type 20472: find_last_of(const _CharT* __s, size_type __pos = npos) const 20472: noexcept 20472: { 20472: ; 20472: return this->find_last_of(__s, __pos, traits_type::length(__s)); 20472: } 20472: # 2653 "/usr/include/c++/10/bits/basic_string.h" 3 20472: size_type 20472: find_last_of(_CharT __c, size_type __pos = npos) const noexcept 20472: { return this->rfind(__c, __pos); } 20472: # 2667 "/usr/include/c++/10/bits/basic_string.h" 3 20472: size_type 20472: find_first_not_of(const basic_string& __str, size_type __pos = 0) const 20472: noexcept 20472: { return this->find_first_not_of(__str.data(), __pos, __str.size()); } 20472: # 2702 "/usr/include/c++/10/bits/basic_string.h" 3 20472: size_type 20472: find_first_not_of(const _CharT* __s, size_type __pos, 20472: size_type __n) const noexcept; 20472: # 2716 "/usr/include/c++/10/bits/basic_string.h" 3 20472: size_type 20472: find_first_not_of(const _CharT* __s, size_type __pos = 0) const 20472: noexcept 20472: { 20472: ; 20472: return this->find_first_not_of(__s, __pos, traits_type::length(__s)); 20472: } 20472: # 2734 "/usr/include/c++/10/bits/basic_string.h" 3 20472: size_type 20472: find_first_not_of(_CharT __c, size_type __pos = 0) const 20472: noexcept; 20472: # 2749 "/usr/include/c++/10/bits/basic_string.h" 3 20472: size_type 20472: find_last_not_of(const basic_string& __str, size_type __pos = npos) const 20472: noexcept 20472: { return this->find_last_not_of(__str.data(), __pos, __str.size()); } 20472: # 2784 "/usr/include/c++/10/bits/basic_string.h" 3 20472: size_type 20472: find_last_not_of(const _CharT* __s, size_type __pos, 20472: size_type __n) const noexcept; 20472: # 2798 "/usr/include/c++/10/bits/basic_string.h" 3 20472: size_type 20472: find_last_not_of(const _CharT* __s, size_type __pos = npos) const 20472: noexcept 20472: { 20472: ; 20472: return this->find_last_not_of(__s, __pos, traits_type::length(__s)); 20472: } 20472: # 2816 "/usr/include/c++/10/bits/basic_string.h" 3 20472: size_type 20472: find_last_not_of(_CharT __c, size_type __pos = npos) const 20472: noexcept; 20472: # 2832 "/usr/include/c++/10/bits/basic_string.h" 3 20472: basic_string 20472: substr(size_type __pos = 0, size_type __n = npos) const 20472: { return basic_string(*this, 20472: _M_check(__pos, "basic_string::substr"), __n); } 20472: # 2851 "/usr/include/c++/10/bits/basic_string.h" 3 20472: int 20472: compare(const basic_string& __str) const 20472: { 20472: const size_type __size = this->size(); 20472: const size_type __osize = __str.size(); 20472: const size_type __len = std::min(__size, __osize); 20472: 20472: int __r = traits_type::compare(_M_data(), __str.data(), __len); 20472: if (!__r) 20472: __r = _S_compare(__size, __osize); 20472: return __r; 20472: } 20472: # 2944 "/usr/include/c++/10/bits/basic_string.h" 3 20472: int 20472: compare(size_type __pos, size_type __n, const basic_string& __str) const; 20472: # 2970 "/usr/include/c++/10/bits/basic_string.h" 3 20472: int 20472: compare(size_type __pos1, size_type __n1, const basic_string& __str, 20472: size_type __pos2, size_type __n2 = npos) const; 20472: # 2988 "/usr/include/c++/10/bits/basic_string.h" 3 20472: int 20472: compare(const _CharT* __s) const noexcept; 20472: # 3012 "/usr/include/c++/10/bits/basic_string.h" 3 20472: int 20472: compare(size_type __pos, size_type __n1, const _CharT* __s) const; 20472: # 3039 "/usr/include/c++/10/bits/basic_string.h" 3 20472: int 20472: compare(size_type __pos, size_type __n1, const _CharT* __s, 20472: size_type __n2) const; 20472: # 3070 "/usr/include/c++/10/bits/basic_string.h" 3 20472: template friend class basic_stringbuf; 20472: }; 20472: } 20472: # 6030 "/usr/include/c++/10/bits/basic_string.h" 3 20472: template 20472: basic_string<_CharT, _Traits, _Alloc> 20472: operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, 20472: const basic_string<_CharT, _Traits, _Alloc>& __rhs) 20472: { 20472: basic_string<_CharT, _Traits, _Alloc> __str(__lhs); 20472: __str.append(__rhs); 20472: return __str; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: basic_string<_CharT,_Traits,_Alloc> 20472: operator+(const _CharT* __lhs, 20472: const basic_string<_CharT,_Traits,_Alloc>& __rhs); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: basic_string<_CharT,_Traits,_Alloc> 20472: operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: inline basic_string<_CharT, _Traits, _Alloc> 20472: operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, 20472: const _CharT* __rhs) 20472: { 20472: basic_string<_CharT, _Traits, _Alloc> __str(__lhs); 20472: __str.append(__rhs); 20472: return __str; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: inline basic_string<_CharT, _Traits, _Alloc> 20472: operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs) 20472: { 20472: typedef basic_string<_CharT, _Traits, _Alloc> __string_type; 20472: typedef typename __string_type::size_type __size_type; 20472: __string_type __str(__lhs); 20472: __str.append(__size_type(1), __rhs); 20472: return __str; 20472: } 20472: 20472: 20472: template 20472: inline basic_string<_CharT, _Traits, _Alloc> 20472: operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, 20472: const basic_string<_CharT, _Traits, _Alloc>& __rhs) 20472: { return std::move(__lhs.append(__rhs)); } 20472: 20472: template 20472: inline basic_string<_CharT, _Traits, _Alloc> 20472: operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, 20472: basic_string<_CharT, _Traits, _Alloc>&& __rhs) 20472: { return std::move(__rhs.insert(0, __lhs)); } 20472: 20472: template 20472: inline basic_string<_CharT, _Traits, _Alloc> 20472: operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, 20472: basic_string<_CharT, _Traits, _Alloc>&& __rhs) 20472: { 20472: 20472: using _Alloc_traits = allocator_traits<_Alloc>; 20472: bool __use_rhs = false; 20472: if (typename _Alloc_traits::is_always_equal{}) 20472: __use_rhs = true; 20472: else if (__lhs.get_allocator() == __rhs.get_allocator()) 20472: __use_rhs = true; 20472: if (__use_rhs) 20472: 20472: { 20472: const auto __size = __lhs.size() + __rhs.size(); 20472: if (__size > __lhs.capacity() && __size <= __rhs.capacity()) 20472: return std::move(__rhs.insert(0, __lhs)); 20472: } 20472: return std::move(__lhs.append(__rhs)); 20472: } 20472: 20472: template 20472: inline basic_string<_CharT, _Traits, _Alloc> 20472: operator+(const _CharT* __lhs, 20472: basic_string<_CharT, _Traits, _Alloc>&& __rhs) 20472: { return std::move(__rhs.insert(0, __lhs)); } 20472: 20472: template 20472: inline basic_string<_CharT, _Traits, _Alloc> 20472: operator+(_CharT __lhs, 20472: basic_string<_CharT, _Traits, _Alloc>&& __rhs) 20472: { return std::move(__rhs.insert(0, 1, __lhs)); } 20472: 20472: template 20472: inline basic_string<_CharT, _Traits, _Alloc> 20472: operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, 20472: const _CharT* __rhs) 20472: { return std::move(__lhs.append(__rhs)); } 20472: 20472: template 20472: inline basic_string<_CharT, _Traits, _Alloc> 20472: operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, 20472: _CharT __rhs) 20472: { return std::move(__lhs.append(1, __rhs)); } 20472: # 6161 "/usr/include/c++/10/bits/basic_string.h" 3 20472: template 20472: inline bool 20472: operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, 20472: const basic_string<_CharT, _Traits, _Alloc>& __rhs) 20472: noexcept 20472: { return __lhs.compare(__rhs) == 0; } 20472: 20472: template 20472: inline 20472: typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, bool>::__type 20472: operator==(const basic_string<_CharT>& __lhs, 20472: const basic_string<_CharT>& __rhs) noexcept 20472: { return (__lhs.size() == __rhs.size() 20472: && !std::char_traits<_CharT>::compare(__lhs.data(), __rhs.data(), 20472: __lhs.size())); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: inline bool 20472: operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, 20472: const _CharT* __rhs) 20472: { return __lhs.compare(__rhs) == 0; } 20472: # 6224 "/usr/include/c++/10/bits/basic_string.h" 3 20472: template 20472: inline bool 20472: operator==(const _CharT* __lhs, 20472: const basic_string<_CharT, _Traits, _Alloc>& __rhs) 20472: { return __rhs.compare(__lhs) == 0; } 20472: # 6237 "/usr/include/c++/10/bits/basic_string.h" 3 20472: template 20472: inline bool 20472: operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, 20472: const basic_string<_CharT, _Traits, _Alloc>& __rhs) 20472: noexcept 20472: { return !(__lhs == __rhs); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: inline bool 20472: operator!=(const _CharT* __lhs, 20472: const basic_string<_CharT, _Traits, _Alloc>& __rhs) 20472: { return !(__lhs == __rhs); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: inline bool 20472: operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, 20472: const _CharT* __rhs) 20472: { return !(__lhs == __rhs); } 20472: # 6275 "/usr/include/c++/10/bits/basic_string.h" 3 20472: template 20472: inline bool 20472: operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, 20472: const basic_string<_CharT, _Traits, _Alloc>& __rhs) 20472: noexcept 20472: { return __lhs.compare(__rhs) < 0; } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: inline bool 20472: operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, 20472: const _CharT* __rhs) 20472: { return __lhs.compare(__rhs) < 0; } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: inline bool 20472: operator<(const _CharT* __lhs, 20472: const basic_string<_CharT, _Traits, _Alloc>& __rhs) 20472: { return __rhs.compare(__lhs) > 0; } 20472: # 6313 "/usr/include/c++/10/bits/basic_string.h" 3 20472: template 20472: inline bool 20472: operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, 20472: const basic_string<_CharT, _Traits, _Alloc>& __rhs) 20472: noexcept 20472: { return __lhs.compare(__rhs) > 0; } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: inline bool 20472: operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, 20472: const _CharT* __rhs) 20472: { return __lhs.compare(__rhs) > 0; } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: inline bool 20472: operator>(const _CharT* __lhs, 20472: const basic_string<_CharT, _Traits, _Alloc>& __rhs) 20472: { return __rhs.compare(__lhs) < 0; } 20472: # 6351 "/usr/include/c++/10/bits/basic_string.h" 3 20472: template 20472: inline bool 20472: operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, 20472: const basic_string<_CharT, _Traits, _Alloc>& __rhs) 20472: noexcept 20472: { return __lhs.compare(__rhs) <= 0; } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: inline bool 20472: operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, 20472: const _CharT* __rhs) 20472: { return __lhs.compare(__rhs) <= 0; } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: inline bool 20472: operator<=(const _CharT* __lhs, 20472: const basic_string<_CharT, _Traits, _Alloc>& __rhs) 20472: { return __rhs.compare(__lhs) >= 0; } 20472: # 6389 "/usr/include/c++/10/bits/basic_string.h" 3 20472: template 20472: inline bool 20472: operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, 20472: const basic_string<_CharT, _Traits, _Alloc>& __rhs) 20472: noexcept 20472: { return __lhs.compare(__rhs) >= 0; } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: inline bool 20472: operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, 20472: const _CharT* __rhs) 20472: { return __lhs.compare(__rhs) >= 0; } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: inline bool 20472: operator>=(const _CharT* __lhs, 20472: const basic_string<_CharT, _Traits, _Alloc>& __rhs) 20472: { return __rhs.compare(__lhs) <= 0; } 20472: # 6428 "/usr/include/c++/10/bits/basic_string.h" 3 20472: template 20472: inline void 20472: swap(basic_string<_CharT, _Traits, _Alloc>& __lhs, 20472: basic_string<_CharT, _Traits, _Alloc>& __rhs) 20472: noexcept(noexcept(__lhs.swap(__rhs))) 20472: { __lhs.swap(__rhs); } 20472: # 6448 "/usr/include/c++/10/bits/basic_string.h" 3 20472: template 20472: basic_istream<_CharT, _Traits>& 20472: operator>>(basic_istream<_CharT, _Traits>& __is, 20472: basic_string<_CharT, _Traits, _Alloc>& __str); 20472: 20472: template<> 20472: basic_istream& 20472: operator>>(basic_istream& __is, basic_string& __str); 20472: # 6466 "/usr/include/c++/10/bits/basic_string.h" 3 20472: template 20472: inline basic_ostream<_CharT, _Traits>& 20472: operator<<(basic_ostream<_CharT, _Traits>& __os, 20472: const basic_string<_CharT, _Traits, _Alloc>& __str) 20472: { 20472: 20472: 20472: return __ostream_insert(__os, __str.data(), __str.size()); 20472: } 20472: # 6489 "/usr/include/c++/10/bits/basic_string.h" 3 20472: template 20472: basic_istream<_CharT, _Traits>& 20472: getline(basic_istream<_CharT, _Traits>& __is, 20472: basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim); 20472: # 6506 "/usr/include/c++/10/bits/basic_string.h" 3 20472: template 20472: inline basic_istream<_CharT, _Traits>& 20472: getline(basic_istream<_CharT, _Traits>& __is, 20472: basic_string<_CharT, _Traits, _Alloc>& __str) 20472: { return std::getline(__is, __str, __is.widen('\n')); } 20472: 20472: 20472: 20472: template 20472: inline basic_istream<_CharT, _Traits>& 20472: getline(basic_istream<_CharT, _Traits>&& __is, 20472: basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim) 20472: { return std::getline(__is, __str, __delim); } 20472: 20472: 20472: template 20472: inline basic_istream<_CharT, _Traits>& 20472: getline(basic_istream<_CharT, _Traits>&& __is, 20472: basic_string<_CharT, _Traits, _Alloc>& __str) 20472: { return std::getline(__is, __str); } 20472: 20472: 20472: template<> 20472: basic_istream& 20472: getline(basic_istream& __in, basic_string& __str, 20472: char __delim); 20472: 20472: 20472: template<> 20472: basic_istream& 20472: getline(basic_istream& __in, basic_string& __str, 20472: wchar_t __delim); 20472: 20472: 20472: 20472: } 20472: 20472: 20472: 20472: # 1 "/usr/include/c++/10/ext/string_conversions.h" 1 3 20472: # 32 "/usr/include/c++/10/ext/string_conversions.h" 3 20472: 20472: # 33 "/usr/include/c++/10/ext/string_conversions.h" 3 20472: # 41 "/usr/include/c++/10/ext/string_conversions.h" 3 20472: # 1 "/usr/include/c++/10/cstdlib" 1 3 20472: # 39 "/usr/include/c++/10/cstdlib" 3 20472: 20472: # 40 "/usr/include/c++/10/cstdlib" 3 20472: # 75 "/usr/include/c++/10/cstdlib" 3 20472: # 1 "/usr/include/stdlib.h" 1 3 4 20472: # 25 "/usr/include/stdlib.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/libc-header-start.h" 1 3 4 20472: # 26 "/usr/include/stdlib.h" 2 3 4 20472: 20472: 20472: 20472: 20472: 20472: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/10/include/stddef.h" 1 3 4 20472: # 32 "/usr/include/stdlib.h" 2 3 4 20472: 20472: extern "C" { 20472: 20472: 20472: 20472: 20472: 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/waitflags.h" 1 3 4 20472: # 52 "/usr/include/arm-linux-gnueabihf/bits/waitflags.h" 3 4 20472: typedef enum 20472: { 20472: P_ALL, 20472: P_PID, 20472: P_PGID 20472: } idtype_t; 20472: # 40 "/usr/include/stdlib.h" 2 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/waitstatus.h" 1 3 4 20472: # 41 "/usr/include/stdlib.h" 2 3 4 20472: # 55 "/usr/include/stdlib.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/floatn.h" 1 3 4 20472: # 56 "/usr/include/stdlib.h" 2 3 4 20472: 20472: 20472: typedef struct 20472: { 20472: int quot; 20472: int rem; 20472: } div_t; 20472: 20472: 20472: 20472: typedef struct 20472: { 20472: long int quot; 20472: long int rem; 20472: } ldiv_t; 20472: 20472: 20472: 20472: 20472: 20472: __extension__ typedef struct 20472: { 20472: long long int quot; 20472: long long int rem; 20472: } lldiv_t; 20472: # 97 "/usr/include/stdlib.h" 3 4 20472: extern size_t __ctype_get_mb_cur_max (void) throw () ; 20472: 20472: 20472: 20472: extern double atof (const char *__nptr) 20472: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; 20472: 20472: extern int atoi (const char *__nptr) 20472: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; 20472: 20472: extern long int atol (const char *__nptr) 20472: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; 20472: 20472: 20472: 20472: __extension__ extern long long int atoll (const char *__nptr) 20472: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; 20472: 20472: 20472: 20472: extern double strtod (const char *__restrict __nptr, 20472: char **__restrict __endptr) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: 20472: extern float strtof (const char *__restrict __nptr, 20472: char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: extern long double strtold (const char *__restrict __nptr, 20472: char **__restrict __endptr) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: # 140 "/usr/include/stdlib.h" 3 4 20472: extern _Float32 strtof32 (const char *__restrict __nptr, 20472: char **__restrict __endptr) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: 20472: extern _Float64 strtof64 (const char *__restrict __nptr, 20472: char **__restrict __endptr) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: # 158 "/usr/include/stdlib.h" 3 4 20472: extern _Float32x strtof32x (const char *__restrict __nptr, 20472: char **__restrict __endptr) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: # 176 "/usr/include/stdlib.h" 3 4 20472: extern long int strtol (const char *__restrict __nptr, 20472: char **__restrict __endptr, int __base) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: extern unsigned long int strtoul (const char *__restrict __nptr, 20472: char **__restrict __endptr, int __base) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: 20472: __extension__ 20472: extern long long int strtoq (const char *__restrict __nptr, 20472: char **__restrict __endptr, int __base) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: __extension__ 20472: extern unsigned long long int strtouq (const char *__restrict __nptr, 20472: char **__restrict __endptr, int __base) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: 20472: 20472: __extension__ 20472: extern long long int strtoll (const char *__restrict __nptr, 20472: char **__restrict __endptr, int __base) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: __extension__ 20472: extern unsigned long long int strtoull (const char *__restrict __nptr, 20472: char **__restrict __endptr, int __base) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: 20472: 20472: extern int strfromd (char *__dest, size_t __size, const char *__format, 20472: double __f) 20472: throw () __attribute__ ((__nonnull__ (3))); 20472: 20472: extern int strfromf (char *__dest, size_t __size, const char *__format, 20472: float __f) 20472: throw () __attribute__ ((__nonnull__ (3))); 20472: 20472: extern int strfroml (char *__dest, size_t __size, const char *__format, 20472: long double __f) 20472: throw () __attribute__ ((__nonnull__ (3))); 20472: # 232 "/usr/include/stdlib.h" 3 4 20472: extern int strfromf32 (char *__dest, size_t __size, const char * __format, 20472: _Float32 __f) 20472: throw () __attribute__ ((__nonnull__ (3))); 20472: 20472: 20472: 20472: extern int strfromf64 (char *__dest, size_t __size, const char * __format, 20472: _Float64 __f) 20472: throw () __attribute__ ((__nonnull__ (3))); 20472: # 250 "/usr/include/stdlib.h" 3 4 20472: extern int strfromf32x (char *__dest, size_t __size, const char * __format, 20472: _Float32x __f) 20472: throw () __attribute__ ((__nonnull__ (3))); 20472: # 274 "/usr/include/stdlib.h" 3 4 20472: extern long int strtol_l (const char *__restrict __nptr, 20472: char **__restrict __endptr, int __base, 20472: locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))); 20472: 20472: extern unsigned long int strtoul_l (const char *__restrict __nptr, 20472: char **__restrict __endptr, 20472: int __base, locale_t __loc) 20472: throw () __attribute__ ((__nonnull__ (1, 4))); 20472: 20472: __extension__ 20472: extern long long int strtoll_l (const char *__restrict __nptr, 20472: char **__restrict __endptr, int __base, 20472: locale_t __loc) 20472: throw () __attribute__ ((__nonnull__ (1, 4))); 20472: 20472: __extension__ 20472: extern unsigned long long int strtoull_l (const char *__restrict __nptr, 20472: char **__restrict __endptr, 20472: int __base, locale_t __loc) 20472: throw () __attribute__ ((__nonnull__ (1, 4))); 20472: 20472: extern double strtod_l (const char *__restrict __nptr, 20472: char **__restrict __endptr, locale_t __loc) 20472: throw () __attribute__ ((__nonnull__ (1, 3))); 20472: 20472: extern float strtof_l (const char *__restrict __nptr, 20472: char **__restrict __endptr, locale_t __loc) 20472: throw () __attribute__ ((__nonnull__ (1, 3))); 20472: 20472: extern long double strtold_l (const char *__restrict __nptr, 20472: char **__restrict __endptr, 20472: locale_t __loc) 20472: throw () __attribute__ ((__nonnull__ (1, 3))); 20472: # 316 "/usr/include/stdlib.h" 3 4 20472: extern _Float32 strtof32_l (const char *__restrict __nptr, 20472: char **__restrict __endptr, 20472: locale_t __loc) 20472: throw () __attribute__ ((__nonnull__ (1, 3))); 20472: 20472: 20472: 20472: extern _Float64 strtof64_l (const char *__restrict __nptr, 20472: char **__restrict __endptr, 20472: locale_t __loc) 20472: throw () __attribute__ ((__nonnull__ (1, 3))); 20472: # 337 "/usr/include/stdlib.h" 3 4 20472: extern _Float32x strtof32x_l (const char *__restrict __nptr, 20472: char **__restrict __endptr, 20472: locale_t __loc) 20472: throw () __attribute__ ((__nonnull__ (1, 3))); 20472: # 360 "/usr/include/stdlib.h" 3 4 20472: extern __inline __attribute__ ((__gnu_inline__)) int 20472: __attribute__ ((__leaf__)) atoi (const char *__nptr) throw () 20472: { 20472: return (int) strtol (__nptr, (char **) __null, 10); 20472: } 20472: extern __inline __attribute__ ((__gnu_inline__)) long int 20472: __attribute__ ((__leaf__)) atol (const char *__nptr) throw () 20472: { 20472: return strtol (__nptr, (char **) __null, 10); 20472: } 20472: 20472: 20472: __extension__ extern __inline __attribute__ ((__gnu_inline__)) long long int 20472: __attribute__ ((__leaf__)) atoll (const char *__nptr) throw () 20472: { 20472: return strtoll (__nptr, (char **) __null, 10); 20472: } 20472: # 385 "/usr/include/stdlib.h" 3 4 20472: extern char *l64a (long int __n) throw () ; 20472: 20472: 20472: extern long int a64l (const char *__s) 20472: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; 20472: 20472: 20472: 20472: 20472: # 1 "/usr/include/arm-linux-gnueabihf/sys/types.h" 1 3 4 20472: # 27 "/usr/include/arm-linux-gnueabihf/sys/types.h" 3 4 20472: extern "C" { 20472: 20472: 20472: 20472: 20472: 20472: typedef __u_char u_char; 20472: typedef __u_short u_short; 20472: typedef __u_int u_int; 20472: typedef __u_long u_long; 20472: typedef __quad_t quad_t; 20472: typedef __u_quad_t u_quad_t; 20472: typedef __fsid_t fsid_t; 20472: 20472: 20472: typedef __loff_t loff_t; 20472: 20472: 20472: 20472: 20472: typedef __ino_t ino_t; 20472: 20472: 20472: 20472: 20472: 20472: 20472: typedef __ino64_t ino64_t; 20472: 20472: 20472: 20472: 20472: typedef __dev_t dev_t; 20472: 20472: 20472: 20472: 20472: typedef __gid_t gid_t; 20472: 20472: 20472: 20472: 20472: typedef __mode_t mode_t; 20472: 20472: 20472: 20472: 20472: typedef __nlink_t nlink_t; 20472: 20472: 20472: 20472: 20472: typedef __uid_t uid_t; 20472: 20472: 20472: 20472: 20472: 20472: typedef __off_t off_t; 20472: 20472: 20472: 20472: 20472: 20472: 20472: typedef __off64_t off64_t; 20472: # 103 "/usr/include/arm-linux-gnueabihf/sys/types.h" 3 4 20472: typedef __id_t id_t; 20472: 20472: 20472: 20472: 20472: typedef __ssize_t ssize_t; 20472: 20472: 20472: 20472: 20472: 20472: typedef __daddr_t daddr_t; 20472: typedef __caddr_t caddr_t; 20472: 20472: 20472: 20472: 20472: 20472: typedef __key_t key_t; 20472: # 134 "/usr/include/arm-linux-gnueabihf/sys/types.h" 3 4 20472: typedef __useconds_t useconds_t; 20472: 20472: 20472: 20472: typedef __suseconds_t suseconds_t; 20472: 20472: 20472: 20472: 20472: 20472: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/10/include/stddef.h" 1 3 4 20472: # 145 "/usr/include/arm-linux-gnueabihf/sys/types.h" 2 3 4 20472: 20472: 20472: 20472: typedef unsigned long int ulong; 20472: typedef unsigned short int ushort; 20472: typedef unsigned int uint; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: typedef __uint8_t u_int8_t; 20472: typedef __uint16_t u_int16_t; 20472: typedef __uint32_t u_int32_t; 20472: typedef __uint64_t u_int64_t; 20472: 20472: 20472: typedef int register_t __attribute__ ((__mode__ (__word__))); 20472: # 176 "/usr/include/arm-linux-gnueabihf/sys/types.h" 3 4 20472: # 1 "/usr/include/endian.h" 1 3 4 20472: # 35 "/usr/include/endian.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/byteswap.h" 1 3 4 20472: # 33 "/usr/include/arm-linux-gnueabihf/bits/byteswap.h" 3 4 20472: static __inline __uint16_t 20472: __bswap_16 (__uint16_t __bsx) 20472: { 20472: 20472: return __builtin_bswap16 (__bsx); 20472: 20472: 20472: 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: static __inline __uint32_t 20472: __bswap_32 (__uint32_t __bsx) 20472: { 20472: 20472: return __builtin_bswap32 (__bsx); 20472: 20472: 20472: 20472: } 20472: # 69 "/usr/include/arm-linux-gnueabihf/bits/byteswap.h" 3 4 20472: __extension__ static __inline __uint64_t 20472: __bswap_64 (__uint64_t __bsx) 20472: { 20472: 20472: return __builtin_bswap64 (__bsx); 20472: 20472: 20472: 20472: } 20472: # 36 "/usr/include/endian.h" 2 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/uintn-identity.h" 1 3 4 20472: # 32 "/usr/include/arm-linux-gnueabihf/bits/uintn-identity.h" 3 4 20472: static __inline __uint16_t 20472: __uint16_identity (__uint16_t __x) 20472: { 20472: return __x; 20472: } 20472: 20472: static __inline __uint32_t 20472: __uint32_identity (__uint32_t __x) 20472: { 20472: return __x; 20472: } 20472: 20472: static __inline __uint64_t 20472: __uint64_identity (__uint64_t __x) 20472: { 20472: return __x; 20472: } 20472: # 37 "/usr/include/endian.h" 2 3 4 20472: # 177 "/usr/include/arm-linux-gnueabihf/sys/types.h" 2 3 4 20472: 20472: 20472: # 1 "/usr/include/arm-linux-gnueabihf/sys/select.h" 1 3 4 20472: # 30 "/usr/include/arm-linux-gnueabihf/sys/select.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/select.h" 1 3 4 20472: # 31 "/usr/include/arm-linux-gnueabihf/sys/select.h" 2 3 4 20472: 20472: 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/types/sigset_t.h" 1 3 4 20472: 20472: 20472: 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/types/__sigset_t.h" 1 3 4 20472: 20472: 20472: 20472: 20472: typedef struct 20472: { 20472: unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; 20472: } __sigset_t; 20472: # 5 "/usr/include/arm-linux-gnueabihf/bits/types/sigset_t.h" 2 3 4 20472: 20472: 20472: typedef __sigset_t sigset_t; 20472: # 34 "/usr/include/arm-linux-gnueabihf/sys/select.h" 2 3 4 20472: # 49 "/usr/include/arm-linux-gnueabihf/sys/select.h" 3 4 20472: typedef long int __fd_mask; 20472: # 59 "/usr/include/arm-linux-gnueabihf/sys/select.h" 3 4 20472: typedef struct 20472: { 20472: 20472: 20472: 20472: __fd_mask fds_bits[1024 / (8 * (int) sizeof (__fd_mask))]; 20472: 20472: 20472: 20472: 20472: 20472: } fd_set; 20472: 20472: 20472: 20472: 20472: 20472: 20472: typedef __fd_mask fd_mask; 20472: # 91 "/usr/include/arm-linux-gnueabihf/sys/select.h" 3 4 20472: extern "C" { 20472: # 101 "/usr/include/arm-linux-gnueabihf/sys/select.h" 3 4 20472: extern int select (int __nfds, fd_set *__restrict __readfds, 20472: fd_set *__restrict __writefds, 20472: fd_set *__restrict __exceptfds, 20472: struct timeval *__restrict __timeout); 20472: # 113 "/usr/include/arm-linux-gnueabihf/sys/select.h" 3 4 20472: extern int pselect (int __nfds, fd_set *__restrict __readfds, 20472: fd_set *__restrict __writefds, 20472: fd_set *__restrict __exceptfds, 20472: const struct timespec *__restrict __timeout, 20472: const __sigset_t *__restrict __sigmask); 20472: # 126 "/usr/include/arm-linux-gnueabihf/sys/select.h" 3 4 20472: } 20472: # 180 "/usr/include/arm-linux-gnueabihf/sys/types.h" 2 3 4 20472: 20472: 20472: 20472: 20472: 20472: typedef __blksize_t blksize_t; 20472: 20472: 20472: 20472: 20472: 20472: 20472: typedef __blkcnt_t blkcnt_t; 20472: 20472: 20472: 20472: typedef __fsblkcnt_t fsblkcnt_t; 20472: 20472: 20472: 20472: typedef __fsfilcnt_t fsfilcnt_t; 20472: # 219 "/usr/include/arm-linux-gnueabihf/sys/types.h" 3 4 20472: typedef __blkcnt64_t blkcnt64_t; 20472: typedef __fsblkcnt64_t fsblkcnt64_t; 20472: typedef __fsfilcnt64_t fsfilcnt64_t; 20472: # 230 "/usr/include/arm-linux-gnueabihf/sys/types.h" 3 4 20472: } 20472: # 395 "/usr/include/stdlib.h" 2 3 4 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern long int random (void) throw (); 20472: 20472: 20472: extern void srandom (unsigned int __seed) throw (); 20472: 20472: 20472: 20472: 20472: 20472: extern char *initstate (unsigned int __seed, char *__statebuf, 20472: size_t __statelen) throw () __attribute__ ((__nonnull__ (2))); 20472: 20472: 20472: 20472: extern char *setstate (char *__statebuf) throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: struct random_data 20472: { 20472: int32_t *fptr; 20472: int32_t *rptr; 20472: int32_t *state; 20472: int rand_type; 20472: int rand_deg; 20472: int rand_sep; 20472: int32_t *end_ptr; 20472: }; 20472: 20472: extern int random_r (struct random_data *__restrict __buf, 20472: int32_t *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: extern int srandom_r (unsigned int __seed, struct random_data *__buf) 20472: throw () __attribute__ ((__nonnull__ (2))); 20472: 20472: extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, 20472: size_t __statelen, 20472: struct random_data *__restrict __buf) 20472: throw () __attribute__ ((__nonnull__ (2, 4))); 20472: 20472: extern int setstate_r (char *__restrict __statebuf, 20472: struct random_data *__restrict __buf) 20472: throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: 20472: 20472: 20472: extern int rand (void) throw (); 20472: 20472: extern void srand (unsigned int __seed) throw (); 20472: 20472: 20472: 20472: extern int rand_r (unsigned int *__seed) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern double drand48 (void) throw (); 20472: extern double erand48 (unsigned short int __xsubi[3]) throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: extern long int lrand48 (void) throw (); 20472: extern long int nrand48 (unsigned short int __xsubi[3]) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: extern long int mrand48 (void) throw (); 20472: extern long int jrand48 (unsigned short int __xsubi[3]) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: extern void srand48 (long int __seedval) throw (); 20472: extern unsigned short int *seed48 (unsigned short int __seed16v[3]) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: extern void lcong48 (unsigned short int __param[7]) throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: 20472: 20472: 20472: struct drand48_data 20472: { 20472: unsigned short int __x[3]; 20472: unsigned short int __old_x[3]; 20472: unsigned short int __c; 20472: unsigned short int __init; 20472: __extension__ unsigned long long int __a; 20472: 20472: }; 20472: 20472: 20472: extern int drand48_r (struct drand48_data *__restrict __buffer, 20472: double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); 20472: extern int erand48_r (unsigned short int __xsubi[3], 20472: struct drand48_data *__restrict __buffer, 20472: double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: extern int lrand48_r (struct drand48_data *__restrict __buffer, 20472: long int *__restrict __result) 20472: throw () __attribute__ ((__nonnull__ (1, 2))); 20472: extern int nrand48_r (unsigned short int __xsubi[3], 20472: struct drand48_data *__restrict __buffer, 20472: long int *__restrict __result) 20472: throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: extern int mrand48_r (struct drand48_data *__restrict __buffer, 20472: long int *__restrict __result) 20472: throw () __attribute__ ((__nonnull__ (1, 2))); 20472: extern int jrand48_r (unsigned short int __xsubi[3], 20472: struct drand48_data *__restrict __buffer, 20472: long int *__restrict __result) 20472: throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: extern int srand48_r (long int __seedval, struct drand48_data *__buffer) 20472: throw () __attribute__ ((__nonnull__ (2))); 20472: 20472: extern int seed48_r (unsigned short int __seed16v[3], 20472: struct drand48_data *__buffer) throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: extern int lcong48_r (unsigned short int __param[7], 20472: struct drand48_data *__buffer) 20472: throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: 20472: 20472: extern void *malloc (size_t __size) throw () __attribute__ ((__malloc__)) 20472: __attribute__ ((__alloc_size__ (1))) ; 20472: 20472: extern void *calloc (size_t __nmemb, size_t __size) 20472: throw () __attribute__ ((__malloc__)) __attribute__ ((__alloc_size__ (1, 2))) ; 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern void *realloc (void *__ptr, size_t __size) 20472: throw () __attribute__ ((__warn_unused_result__)) __attribute__ ((__alloc_size__ (2))); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size) 20472: throw () __attribute__ ((__warn_unused_result__)) 20472: __attribute__ ((__alloc_size__ (2, 3))); 20472: 20472: 20472: 20472: extern void free (void *__ptr) throw (); 20472: 20472: 20472: # 1 "/usr/include/alloca.h" 1 3 4 20472: # 24 "/usr/include/alloca.h" 3 4 20472: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/10/include/stddef.h" 1 3 4 20472: # 25 "/usr/include/alloca.h" 2 3 4 20472: 20472: extern "C" { 20472: 20472: 20472: 20472: 20472: 20472: extern void *alloca (size_t __size) throw (); 20472: 20472: 20472: 20472: 20472: 20472: } 20472: # 569 "/usr/include/stdlib.h" 2 3 4 20472: 20472: 20472: 20472: 20472: 20472: extern void *valloc (size_t __size) throw () __attribute__ ((__malloc__)) 20472: __attribute__ ((__alloc_size__ (1))) ; 20472: 20472: 20472: 20472: 20472: extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) 20472: throw () __attribute__ ((__nonnull__ (1))) ; 20472: 20472: 20472: 20472: 20472: extern void *aligned_alloc (size_t __alignment, size_t __size) 20472: throw () __attribute__ ((__malloc__)) __attribute__ ((__alloc_size__ (2))) ; 20472: 20472: 20472: 20472: extern void abort (void) throw () __attribute__ ((__noreturn__)); 20472: 20472: 20472: 20472: extern int atexit (void (*__func) (void)) throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: 20472: 20472: extern "C++" int at_quick_exit (void (*__func) (void)) 20472: throw () __asm ("at_quick_exit") __attribute__ ((__nonnull__ (1))); 20472: # 610 "/usr/include/stdlib.h" 3 4 20472: extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: 20472: 20472: 20472: extern void exit (int __status) throw () __attribute__ ((__noreturn__)); 20472: 20472: 20472: 20472: 20472: 20472: extern void quick_exit (int __status) throw () __attribute__ ((__noreturn__)); 20472: 20472: 20472: 20472: 20472: 20472: extern void _Exit (int __status) throw () __attribute__ ((__noreturn__)); 20472: 20472: 20472: 20472: 20472: extern char *getenv (const char *__name) throw () __attribute__ ((__nonnull__ (1))) ; 20472: 20472: 20472: 20472: 20472: extern char *secure_getenv (const char *__name) 20472: throw () __attribute__ ((__nonnull__ (1))) ; 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int putenv (char *__string) throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: 20472: 20472: 20472: extern int setenv (const char *__name, const char *__value, int __replace) 20472: throw () __attribute__ ((__nonnull__ (2))); 20472: 20472: 20472: extern int unsetenv (const char *__name) throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int clearenv (void) throw (); 20472: # 675 "/usr/include/stdlib.h" 3 4 20472: extern char *mktemp (char *__template) throw () __attribute__ ((__nonnull__ (1))); 20472: # 688 "/usr/include/stdlib.h" 3 4 20472: extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) ; 20472: # 698 "/usr/include/stdlib.h" 3 4 20472: extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) ; 20472: # 710 "/usr/include/stdlib.h" 3 4 20472: extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) ; 20472: # 720 "/usr/include/stdlib.h" 3 4 20472: extern int mkstemps64 (char *__template, int __suffixlen) 20472: __attribute__ ((__nonnull__ (1))) ; 20472: # 731 "/usr/include/stdlib.h" 3 4 20472: extern char *mkdtemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) ; 20472: # 742 "/usr/include/stdlib.h" 3 4 20472: extern int mkostemp (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) ; 20472: # 752 "/usr/include/stdlib.h" 3 4 20472: extern int mkostemp64 (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) ; 20472: # 762 "/usr/include/stdlib.h" 3 4 20472: extern int mkostemps (char *__template, int __suffixlen, int __flags) 20472: __attribute__ ((__nonnull__ (1))) ; 20472: # 774 "/usr/include/stdlib.h" 3 4 20472: extern int mkostemps64 (char *__template, int __suffixlen, int __flags) 20472: __attribute__ ((__nonnull__ (1))) ; 20472: # 784 "/usr/include/stdlib.h" 3 4 20472: extern int system (const char *__command) ; 20472: 20472: 20472: 20472: 20472: 20472: extern char *canonicalize_file_name (const char *__name) 20472: throw () __attribute__ ((__nonnull__ (1))) ; 20472: # 800 "/usr/include/stdlib.h" 3 4 20472: extern char *realpath (const char *__restrict __name, 20472: char *__restrict __resolved) throw () ; 20472: 20472: 20472: 20472: 20472: 20472: 20472: typedef int (*__compar_fn_t) (const void *, const void *); 20472: 20472: 20472: typedef __compar_fn_t comparison_fn_t; 20472: 20472: 20472: 20472: typedef int (*__compar_d_fn_t) (const void *, const void *, void *); 20472: 20472: 20472: 20472: 20472: extern void *bsearch (const void *__key, const void *__base, 20472: size_t __nmemb, size_t __size, __compar_fn_t __compar) 20472: __attribute__ ((__nonnull__ (1, 2, 5))) ; 20472: 20472: 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/stdlib-bsearch.h" 1 3 4 20472: # 19 "/usr/include/arm-linux-gnueabihf/bits/stdlib-bsearch.h" 3 4 20472: extern __inline __attribute__ ((__gnu_inline__)) void * 20472: bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size, 20472: __compar_fn_t __compar) 20472: { 20472: size_t __l, __u, __idx; 20472: const void *__p; 20472: int __comparison; 20472: 20472: __l = 0; 20472: __u = __nmemb; 20472: while (__l < __u) 20472: { 20472: __idx = (__l + __u) / 2; 20472: __p = (void *) (((const char *) __base) + (__idx * __size)); 20472: __comparison = (*__compar) (__key, __p); 20472: if (__comparison < 0) 20472: __u = __idx; 20472: else if (__comparison > 0) 20472: __l = __idx + 1; 20472: else 20472: return (void *) __p; 20472: } 20472: 20472: return __null; 20472: } 20472: # 826 "/usr/include/stdlib.h" 2 3 4 20472: 20472: 20472: 20472: 20472: extern void qsort (void *__base, size_t __nmemb, size_t __size, 20472: __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4))); 20472: 20472: extern void qsort_r (void *__base, size_t __nmemb, size_t __size, 20472: __compar_d_fn_t __compar, void *__arg) 20472: __attribute__ ((__nonnull__ (1, 4))); 20472: 20472: 20472: 20472: 20472: extern int abs (int __x) throw () __attribute__ ((__const__)) ; 20472: extern long int labs (long int __x) throw () __attribute__ ((__const__)) ; 20472: 20472: 20472: __extension__ extern long long int llabs (long long int __x) 20472: throw () __attribute__ ((__const__)) ; 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern div_t div (int __numer, int __denom) 20472: throw () __attribute__ ((__const__)) ; 20472: extern ldiv_t ldiv (long int __numer, long int __denom) 20472: throw () __attribute__ ((__const__)) ; 20472: 20472: 20472: __extension__ extern lldiv_t lldiv (long long int __numer, 20472: long long int __denom) 20472: throw () __attribute__ ((__const__)) ; 20472: # 872 "/usr/include/stdlib.h" 3 4 20472: extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, 20472: int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ; 20472: 20472: 20472: 20472: 20472: extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, 20472: int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ; 20472: 20472: 20472: 20472: 20472: extern char *gcvt (double __value, int __ndigit, char *__buf) 20472: throw () __attribute__ ((__nonnull__ (3))) ; 20472: 20472: 20472: 20472: 20472: extern char *qecvt (long double __value, int __ndigit, 20472: int *__restrict __decpt, int *__restrict __sign) 20472: throw () __attribute__ ((__nonnull__ (3, 4))) ; 20472: extern char *qfcvt (long double __value, int __ndigit, 20472: int *__restrict __decpt, int *__restrict __sign) 20472: throw () __attribute__ ((__nonnull__ (3, 4))) ; 20472: extern char *qgcvt (long double __value, int __ndigit, char *__buf) 20472: throw () __attribute__ ((__nonnull__ (3))) ; 20472: 20472: 20472: 20472: 20472: extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, 20472: int *__restrict __sign, char *__restrict __buf, 20472: size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); 20472: extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, 20472: int *__restrict __sign, char *__restrict __buf, 20472: size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); 20472: 20472: extern int qecvt_r (long double __value, int __ndigit, 20472: int *__restrict __decpt, int *__restrict __sign, 20472: char *__restrict __buf, size_t __len) 20472: throw () __attribute__ ((__nonnull__ (3, 4, 5))); 20472: extern int qfcvt_r (long double __value, int __ndigit, 20472: int *__restrict __decpt, int *__restrict __sign, 20472: char *__restrict __buf, size_t __len) 20472: throw () __attribute__ ((__nonnull__ (3, 4, 5))); 20472: 20472: 20472: 20472: 20472: 20472: extern int mblen (const char *__s, size_t __n) throw (); 20472: 20472: 20472: extern int mbtowc (wchar_t *__restrict __pwc, 20472: const char *__restrict __s, size_t __n) throw (); 20472: 20472: 20472: extern int wctomb (char *__s, wchar_t __wchar) throw (); 20472: 20472: 20472: 20472: extern size_t mbstowcs (wchar_t *__restrict __pwcs, 20472: const char *__restrict __s, size_t __n) throw (); 20472: 20472: extern size_t wcstombs (char *__restrict __s, 20472: const wchar_t *__restrict __pwcs, size_t __n) 20472: throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int rpmatch (const char *__response) throw () __attribute__ ((__nonnull__ (1))) ; 20472: # 957 "/usr/include/stdlib.h" 3 4 20472: extern int getsubopt (char **__restrict __optionp, 20472: char *const *__restrict __tokens, 20472: char **__restrict __valuep) 20472: throw () __attribute__ ((__nonnull__ (1, 2, 3))) ; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int posix_openpt (int __oflag) ; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int grantpt (int __fd) throw (); 20472: 20472: 20472: 20472: extern int unlockpt (int __fd) throw (); 20472: 20472: 20472: 20472: 20472: extern char *ptsname (int __fd) throw () ; 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int ptsname_r (int __fd, char *__buf, size_t __buflen) 20472: throw () __attribute__ ((__nonnull__ (2))); 20472: 20472: 20472: extern int getpt (void); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int getloadavg (double __loadavg[], int __nelem) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: # 1013 "/usr/include/stdlib.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/stdlib-float.h" 1 3 4 20472: # 24 "/usr/include/arm-linux-gnueabihf/bits/stdlib-float.h" 3 4 20472: extern __inline __attribute__ ((__gnu_inline__)) double 20472: __attribute__ ((__leaf__)) atof (const char *__nptr) throw () 20472: { 20472: return strtod (__nptr, (char **) __null); 20472: } 20472: # 1014 "/usr/include/stdlib.h" 2 3 4 20472: # 1023 "/usr/include/stdlib.h" 3 4 20472: } 20472: # 76 "/usr/include/c++/10/cstdlib" 2 3 20472: 20472: # 1 "/usr/include/c++/10/bits/std_abs.h" 1 3 20472: # 33 "/usr/include/c++/10/bits/std_abs.h" 3 20472: 20472: # 34 "/usr/include/c++/10/bits/std_abs.h" 3 20472: # 46 "/usr/include/c++/10/bits/std_abs.h" 3 20472: extern "C++" 20472: { 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: using ::abs; 20472: 20472: 20472: inline long 20472: abs(long __i) { return __builtin_labs(__i); } 20472: 20472: 20472: 20472: inline long long 20472: abs(long long __x) { return __builtin_llabs (__x); } 20472: # 70 "/usr/include/c++/10/bits/std_abs.h" 3 20472: inline constexpr double 20472: abs(double __x) 20472: { return __builtin_fabs(__x); } 20472: 20472: inline constexpr float 20472: abs(float __x) 20472: { return __builtin_fabsf(__x); } 20472: 20472: inline constexpr long double 20472: abs(long double __x) 20472: { return __builtin_fabsl(__x); } 20472: # 107 "/usr/include/c++/10/bits/std_abs.h" 3 20472: 20472: } 20472: } 20472: # 78 "/usr/include/c++/10/cstdlib" 2 3 20472: # 121 "/usr/include/c++/10/cstdlib" 3 20472: extern "C++" 20472: { 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: using ::div_t; 20472: using ::ldiv_t; 20472: 20472: using ::abort; 20472: 20472: 20472: 20472: using ::atexit; 20472: 20472: 20472: using ::at_quick_exit; 20472: 20472: 20472: using ::atof; 20472: using ::atoi; 20472: using ::atol; 20472: using ::bsearch; 20472: using ::calloc; 20472: using ::div; 20472: using ::exit; 20472: using ::free; 20472: using ::getenv; 20472: using ::labs; 20472: using ::ldiv; 20472: using ::malloc; 20472: 20472: using ::mblen; 20472: using ::mbstowcs; 20472: using ::mbtowc; 20472: 20472: using ::qsort; 20472: 20472: 20472: using ::quick_exit; 20472: 20472: 20472: using ::rand; 20472: using ::realloc; 20472: using ::srand; 20472: using ::strtod; 20472: using ::strtol; 20472: using ::strtoul; 20472: using ::system; 20472: 20472: using ::wcstombs; 20472: using ::wctomb; 20472: 20472: 20472: 20472: inline ldiv_t 20472: div(long __i, long __j) { return ldiv(__i, __j); } 20472: 20472: 20472: 20472: 20472: } 20472: # 195 "/usr/include/c++/10/cstdlib" 3 20472: namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: using ::lldiv_t; 20472: 20472: 20472: 20472: 20472: 20472: using ::_Exit; 20472: 20472: 20472: 20472: using ::llabs; 20472: 20472: inline lldiv_t 20472: div(long long __n, long long __d) 20472: { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; } 20472: 20472: using ::lldiv; 20472: # 227 "/usr/include/c++/10/cstdlib" 3 20472: using ::atoll; 20472: using ::strtoll; 20472: using ::strtoull; 20472: 20472: using ::strtof; 20472: using ::strtold; 20472: 20472: 20472: } 20472: 20472: namespace std 20472: { 20472: 20472: using ::__gnu_cxx::lldiv_t; 20472: 20472: using ::__gnu_cxx::_Exit; 20472: 20472: using ::__gnu_cxx::llabs; 20472: using ::__gnu_cxx::div; 20472: using ::__gnu_cxx::lldiv; 20472: 20472: using ::__gnu_cxx::atoll; 20472: using ::__gnu_cxx::strtof; 20472: using ::__gnu_cxx::strtoll; 20472: using ::__gnu_cxx::strtoull; 20472: using ::__gnu_cxx::strtold; 20472: } 20472: 20472: 20472: 20472: } 20472: # 42 "/usr/include/c++/10/ext/string_conversions.h" 2 3 20472: # 1 "/usr/include/c++/10/cwchar" 1 3 20472: # 39 "/usr/include/c++/10/cwchar" 3 20472: 20472: # 40 "/usr/include/c++/10/cwchar" 3 20472: # 43 "/usr/include/c++/10/ext/string_conversions.h" 2 3 20472: # 1 "/usr/include/c++/10/cstdio" 1 3 20472: # 39 "/usr/include/c++/10/cstdio" 3 20472: 20472: # 40 "/usr/include/c++/10/cstdio" 3 20472: 20472: 20472: # 1 "/usr/include/stdio.h" 1 3 4 20472: # 27 "/usr/include/stdio.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/libc-header-start.h" 1 3 4 20472: # 28 "/usr/include/stdio.h" 2 3 4 20472: 20472: extern "C" { 20472: 20472: 20472: 20472: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/10/include/stddef.h" 1 3 4 20472: # 34 "/usr/include/stdio.h" 2 3 4 20472: 20472: 20472: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/10/include/stdarg.h" 1 3 4 20472: # 37 "/usr/include/stdio.h" 2 3 4 20472: 20472: 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/types/__fpos_t.h" 1 3 4 20472: # 10 "/usr/include/arm-linux-gnueabihf/bits/types/__fpos_t.h" 3 4 20472: typedef struct _G_fpos_t 20472: { 20472: __off_t __pos; 20472: __mbstate_t __state; 20472: } __fpos_t; 20472: # 40 "/usr/include/stdio.h" 2 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/types/__fpos64_t.h" 1 3 4 20472: # 10 "/usr/include/arm-linux-gnueabihf/bits/types/__fpos64_t.h" 3 4 20472: typedef struct _G_fpos64_t 20472: { 20472: __off64_t __pos; 20472: __mbstate_t __state; 20472: } __fpos64_t; 20472: # 41 "/usr/include/stdio.h" 2 3 4 20472: 20472: 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/types/struct_FILE.h" 1 3 4 20472: # 35 "/usr/include/arm-linux-gnueabihf/bits/types/struct_FILE.h" 3 4 20472: struct _IO_FILE; 20472: struct _IO_marker; 20472: struct _IO_codecvt; 20472: struct _IO_wide_data; 20472: 20472: 20472: 20472: 20472: typedef void _IO_lock_t; 20472: 20472: 20472: 20472: 20472: 20472: struct _IO_FILE 20472: { 20472: int _flags; 20472: 20472: 20472: char *_IO_read_ptr; 20472: char *_IO_read_end; 20472: char *_IO_read_base; 20472: char *_IO_write_base; 20472: char *_IO_write_ptr; 20472: char *_IO_write_end; 20472: char *_IO_buf_base; 20472: char *_IO_buf_end; 20472: 20472: 20472: char *_IO_save_base; 20472: char *_IO_backup_base; 20472: char *_IO_save_end; 20472: 20472: struct _IO_marker *_markers; 20472: 20472: struct _IO_FILE *_chain; 20472: 20472: int _fileno; 20472: int _flags2; 20472: __off_t _old_offset; 20472: 20472: 20472: unsigned short _cur_column; 20472: signed char _vtable_offset; 20472: char _shortbuf[1]; 20472: 20472: _IO_lock_t *_lock; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: __off64_t _offset; 20472: 20472: struct _IO_codecvt *_codecvt; 20472: struct _IO_wide_data *_wide_data; 20472: struct _IO_FILE *_freeres_list; 20472: void *_freeres_buf; 20472: size_t __pad5; 20472: int _mode; 20472: 20472: char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; 20472: }; 20472: # 44 "/usr/include/stdio.h" 2 3 4 20472: 20472: 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/types/cookie_io_functions_t.h" 1 3 4 20472: # 27 "/usr/include/arm-linux-gnueabihf/bits/types/cookie_io_functions_t.h" 3 4 20472: typedef __ssize_t cookie_read_function_t (void *__cookie, char *__buf, 20472: size_t __nbytes); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: typedef __ssize_t cookie_write_function_t (void *__cookie, const char *__buf, 20472: size_t __nbytes); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: typedef int cookie_seek_function_t (void *__cookie, __off64_t *__pos, int __w); 20472: 20472: 20472: typedef int cookie_close_function_t (void *__cookie); 20472: 20472: 20472: 20472: 20472: 20472: 20472: typedef struct _IO_cookie_io_functions_t 20472: { 20472: cookie_read_function_t *read; 20472: cookie_write_function_t *write; 20472: cookie_seek_function_t *seek; 20472: cookie_close_function_t *close; 20472: } cookie_io_functions_t; 20472: # 47 "/usr/include/stdio.h" 2 3 4 20472: 20472: 20472: 20472: 20472: 20472: typedef __gnuc_va_list va_list; 20472: # 84 "/usr/include/stdio.h" 3 4 20472: typedef __fpos_t fpos_t; 20472: 20472: 20472: 20472: 20472: typedef __fpos64_t fpos64_t; 20472: # 133 "/usr/include/stdio.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/stdio_lim.h" 1 3 4 20472: # 134 "/usr/include/stdio.h" 2 3 4 20472: 20472: 20472: 20472: extern FILE *stdin; 20472: extern FILE *stdout; 20472: extern FILE *stderr; 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int remove (const char *__filename) throw (); 20472: 20472: extern int rename (const char *__old, const char *__new) throw (); 20472: 20472: 20472: 20472: extern int renameat (int __oldfd, const char *__old, int __newfd, 20472: const char *__new) throw (); 20472: # 164 "/usr/include/stdio.h" 3 4 20472: extern int renameat2 (int __oldfd, const char *__old, int __newfd, 20472: const char *__new, unsigned int __flags) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern FILE *tmpfile (void) ; 20472: # 183 "/usr/include/stdio.h" 3 4 20472: extern FILE *tmpfile64 (void) ; 20472: 20472: 20472: 20472: extern char *tmpnam (char *__s) throw () ; 20472: 20472: 20472: 20472: 20472: extern char *tmpnam_r (char *__s) throw () ; 20472: # 204 "/usr/include/stdio.h" 3 4 20472: extern char *tempnam (const char *__dir, const char *__pfx) 20472: throw () __attribute__ ((__malloc__)) ; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int fclose (FILE *__stream); 20472: 20472: 20472: 20472: 20472: extern int fflush (FILE *__stream); 20472: # 227 "/usr/include/stdio.h" 3 4 20472: extern int fflush_unlocked (FILE *__stream); 20472: # 237 "/usr/include/stdio.h" 3 4 20472: extern int fcloseall (void); 20472: # 246 "/usr/include/stdio.h" 3 4 20472: extern FILE *fopen (const char *__restrict __filename, 20472: const char *__restrict __modes) ; 20472: 20472: 20472: 20472: 20472: extern FILE *freopen (const char *__restrict __filename, 20472: const char *__restrict __modes, 20472: FILE *__restrict __stream) ; 20472: # 270 "/usr/include/stdio.h" 3 4 20472: extern FILE *fopen64 (const char *__restrict __filename, 20472: const char *__restrict __modes) ; 20472: extern FILE *freopen64 (const char *__restrict __filename, 20472: const char *__restrict __modes, 20472: FILE *__restrict __stream) ; 20472: 20472: 20472: 20472: 20472: extern FILE *fdopen (int __fd, const char *__modes) throw () ; 20472: 20472: 20472: 20472: 20472: 20472: extern FILE *fopencookie (void *__restrict __magic_cookie, 20472: const char *__restrict __modes, 20472: cookie_io_functions_t __io_funcs) throw () ; 20472: 20472: 20472: 20472: 20472: extern FILE *fmemopen (void *__s, size_t __len, const char *__modes) 20472: throw () ; 20472: 20472: 20472: 20472: 20472: extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) throw () ; 20472: 20472: 20472: 20472: 20472: 20472: extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) throw (); 20472: 20472: 20472: 20472: extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, 20472: int __modes, size_t __n) throw (); 20472: 20472: 20472: 20472: 20472: extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, 20472: size_t __size) throw (); 20472: 20472: 20472: extern void setlinebuf (FILE *__stream) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int fprintf (FILE *__restrict __stream, 20472: const char *__restrict __format, ...); 20472: 20472: 20472: 20472: 20472: extern int printf (const char *__restrict __format, ...); 20472: 20472: extern int sprintf (char *__restrict __s, 20472: const char *__restrict __format, ...) throw (); 20472: 20472: 20472: 20472: 20472: 20472: extern int vfprintf (FILE *__restrict __s, const char *__restrict __format, 20472: __gnuc_va_list __arg); 20472: 20472: 20472: 20472: 20472: extern int vprintf (const char *__restrict __format, __gnuc_va_list __arg); 20472: 20472: extern int vsprintf (char *__restrict __s, const char *__restrict __format, 20472: __gnuc_va_list __arg) throw (); 20472: 20472: 20472: 20472: extern int snprintf (char *__restrict __s, size_t __maxlen, 20472: const char *__restrict __format, ...) 20472: throw () __attribute__ ((__format__ (__printf__, 3, 4))); 20472: 20472: extern int vsnprintf (char *__restrict __s, size_t __maxlen, 20472: const char *__restrict __format, __gnuc_va_list __arg) 20472: throw () __attribute__ ((__format__ (__printf__, 3, 0))); 20472: 20472: 20472: 20472: 20472: 20472: extern int vasprintf (char **__restrict __ptr, const char *__restrict __f, 20472: __gnuc_va_list __arg) 20472: throw () __attribute__ ((__format__ (__printf__, 2, 0))) ; 20472: extern int __asprintf (char **__restrict __ptr, 20472: const char *__restrict __fmt, ...) 20472: throw () __attribute__ ((__format__ (__printf__, 2, 3))) ; 20472: extern int asprintf (char **__restrict __ptr, 20472: const char *__restrict __fmt, ...) 20472: throw () __attribute__ ((__format__ (__printf__, 2, 3))) ; 20472: 20472: 20472: 20472: 20472: extern int vdprintf (int __fd, const char *__restrict __fmt, 20472: __gnuc_va_list __arg) 20472: __attribute__ ((__format__ (__printf__, 2, 0))); 20472: extern int dprintf (int __fd, const char *__restrict __fmt, ...) 20472: __attribute__ ((__format__ (__printf__, 2, 3))); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int fscanf (FILE *__restrict __stream, 20472: const char *__restrict __format, ...) ; 20472: 20472: 20472: 20472: 20472: extern int scanf (const char *__restrict __format, ...) ; 20472: 20472: extern int sscanf (const char *__restrict __s, 20472: const char *__restrict __format, ...) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int fscanf (FILE *__restrict __stream, const char *__restrict __format, ...) __asm__ ("" "__isoc99_fscanf") 20472: 20472: ; 20472: extern int scanf (const char *__restrict __format, ...) __asm__ ("" "__isoc99_scanf") 20472: ; 20472: extern int sscanf (const char *__restrict __s, const char *__restrict __format, ...) throw () __asm__ ("" "__isoc99_sscanf") 20472: 20472: ; 20472: # 432 "/usr/include/stdio.h" 3 4 20472: extern int vfscanf (FILE *__restrict __s, const char *__restrict __format, 20472: __gnuc_va_list __arg) 20472: __attribute__ ((__format__ (__scanf__, 2, 0))) ; 20472: 20472: 20472: 20472: 20472: 20472: extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg) 20472: __attribute__ ((__format__ (__scanf__, 1, 0))) ; 20472: 20472: 20472: extern int vsscanf (const char *__restrict __s, 20472: const char *__restrict __format, __gnuc_va_list __arg) 20472: throw () __attribute__ ((__format__ (__scanf__, 2, 0))); 20472: 20472: 20472: 20472: 20472: extern int vfscanf (FILE *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vfscanf") 20472: 20472: 20472: 20472: __attribute__ ((__format__ (__scanf__, 2, 0))) ; 20472: extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vscanf") 20472: 20472: __attribute__ ((__format__ (__scanf__, 1, 0))) ; 20472: extern int vsscanf (const char *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) throw () __asm__ ("" "__isoc99_vsscanf") 20472: 20472: 20472: 20472: __attribute__ ((__format__ (__scanf__, 2, 0))); 20472: # 485 "/usr/include/stdio.h" 3 4 20472: extern int fgetc (FILE *__stream); 20472: extern int getc (FILE *__stream); 20472: 20472: 20472: 20472: 20472: 20472: extern int getchar (void); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int getc_unlocked (FILE *__stream); 20472: extern int getchar_unlocked (void); 20472: # 510 "/usr/include/stdio.h" 3 4 20472: extern int fgetc_unlocked (FILE *__stream); 20472: # 521 "/usr/include/stdio.h" 3 4 20472: extern int fputc (int __c, FILE *__stream); 20472: extern int putc (int __c, FILE *__stream); 20472: 20472: 20472: 20472: 20472: 20472: extern int putchar (int __c); 20472: # 537 "/usr/include/stdio.h" 3 4 20472: extern int fputc_unlocked (int __c, FILE *__stream); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int putc_unlocked (int __c, FILE *__stream); 20472: extern int putchar_unlocked (int __c); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int getw (FILE *__stream); 20472: 20472: 20472: extern int putw (int __w, FILE *__stream); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) 20472: ; 20472: # 577 "/usr/include/stdio.h" 3 4 20472: extern char *gets (char *__s) __attribute__ ((__deprecated__)); 20472: # 587 "/usr/include/stdio.h" 3 4 20472: extern char *fgets_unlocked (char *__restrict __s, int __n, 20472: FILE *__restrict __stream) ; 20472: # 603 "/usr/include/stdio.h" 3 4 20472: extern __ssize_t __getdelim (char **__restrict __lineptr, 20472: size_t *__restrict __n, int __delimiter, 20472: FILE *__restrict __stream) ; 20472: extern __ssize_t getdelim (char **__restrict __lineptr, 20472: size_t *__restrict __n, int __delimiter, 20472: FILE *__restrict __stream) ; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern __ssize_t getline (char **__restrict __lineptr, 20472: size_t *__restrict __n, 20472: FILE *__restrict __stream) ; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int fputs (const char *__restrict __s, FILE *__restrict __stream); 20472: 20472: 20472: 20472: 20472: 20472: extern int puts (const char *__s); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int ungetc (int __c, FILE *__stream); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern size_t fread (void *__restrict __ptr, size_t __size, 20472: size_t __n, FILE *__restrict __stream) ; 20472: 20472: 20472: 20472: 20472: extern size_t fwrite (const void *__restrict __ptr, size_t __size, 20472: size_t __n, FILE *__restrict __s); 20472: # 662 "/usr/include/stdio.h" 3 4 20472: extern int fputs_unlocked (const char *__restrict __s, 20472: FILE *__restrict __stream); 20472: # 673 "/usr/include/stdio.h" 3 4 20472: extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, 20472: size_t __n, FILE *__restrict __stream) ; 20472: extern size_t fwrite_unlocked (const void *__restrict __ptr, size_t __size, 20472: size_t __n, FILE *__restrict __stream); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int fseek (FILE *__stream, long int __off, int __whence); 20472: 20472: 20472: 20472: 20472: extern long int ftell (FILE *__stream) ; 20472: 20472: 20472: 20472: 20472: extern void rewind (FILE *__stream); 20472: # 707 "/usr/include/stdio.h" 3 4 20472: extern int fseeko (FILE *__stream, __off_t __off, int __whence); 20472: 20472: 20472: 20472: 20472: extern __off_t ftello (FILE *__stream) ; 20472: # 731 "/usr/include/stdio.h" 3 4 20472: extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos); 20472: 20472: 20472: 20472: 20472: extern int fsetpos (FILE *__stream, const fpos_t *__pos); 20472: # 750 "/usr/include/stdio.h" 3 4 20472: extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence); 20472: extern __off64_t ftello64 (FILE *__stream) ; 20472: extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos); 20472: extern int fsetpos64 (FILE *__stream, const fpos64_t *__pos); 20472: 20472: 20472: 20472: extern void clearerr (FILE *__stream) throw (); 20472: 20472: extern int feof (FILE *__stream) throw () ; 20472: 20472: extern int ferror (FILE *__stream) throw () ; 20472: 20472: 20472: 20472: extern void clearerr_unlocked (FILE *__stream) throw (); 20472: extern int feof_unlocked (FILE *__stream) throw () ; 20472: extern int ferror_unlocked (FILE *__stream) throw () ; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern void perror (const char *__s); 20472: 20472: 20472: 20472: 20472: 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/sys_errlist.h" 1 3 4 20472: # 26 "/usr/include/arm-linux-gnueabihf/bits/sys_errlist.h" 3 4 20472: extern int sys_nerr; 20472: extern const char *const sys_errlist[]; 20472: 20472: 20472: extern int _sys_nerr; 20472: extern const char *const _sys_errlist[]; 20472: # 782 "/usr/include/stdio.h" 2 3 4 20472: 20472: 20472: 20472: 20472: extern int fileno (FILE *__stream) throw () ; 20472: 20472: 20472: 20472: 20472: extern int fileno_unlocked (FILE *__stream) throw () ; 20472: # 800 "/usr/include/stdio.h" 3 4 20472: extern FILE *popen (const char *__command, const char *__modes) ; 20472: 20472: 20472: 20472: 20472: 20472: extern int pclose (FILE *__stream); 20472: 20472: 20472: 20472: 20472: 20472: extern char *ctermid (char *__s) throw (); 20472: 20472: 20472: 20472: 20472: 20472: extern char *cuserid (char *__s); 20472: 20472: 20472: 20472: 20472: struct obstack; 20472: 20472: 20472: extern int obstack_printf (struct obstack *__restrict __obstack, 20472: const char *__restrict __format, ...) 20472: throw () __attribute__ ((__format__ (__printf__, 2, 3))); 20472: extern int obstack_vprintf (struct obstack *__restrict __obstack, 20472: const char *__restrict __format, 20472: __gnuc_va_list __args) 20472: throw () __attribute__ ((__format__ (__printf__, 2, 0))); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern void flockfile (FILE *__stream) throw (); 20472: 20472: 20472: 20472: extern int ftrylockfile (FILE *__stream) throw () ; 20472: 20472: 20472: extern void funlockfile (FILE *__stream) throw (); 20472: # 858 "/usr/include/stdio.h" 3 4 20472: extern int __uflow (FILE *); 20472: extern int __overflow (FILE *, int); 20472: 20472: 20472: 20472: 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/stdio.h" 1 3 4 20472: # 38 "/usr/include/arm-linux-gnueabihf/bits/stdio.h" 3 4 20472: extern __inline __attribute__ ((__gnu_inline__)) int 20472: vprintf (const char *__restrict __fmt, __gnuc_va_list __arg) 20472: { 20472: return vfprintf (stdout, __fmt, __arg); 20472: } 20472: 20472: 20472: 20472: extern __inline __attribute__ ((__gnu_inline__)) int 20472: getchar (void) 20472: { 20472: return getc (stdin); 20472: } 20472: 20472: 20472: 20472: 20472: extern __inline __attribute__ ((__gnu_inline__)) int 20472: fgetc_unlocked (FILE *__fp) 20472: { 20472: return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: extern __inline __attribute__ ((__gnu_inline__)) int 20472: getc_unlocked (FILE *__fp) 20472: { 20472: return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); 20472: } 20472: 20472: 20472: extern __inline __attribute__ ((__gnu_inline__)) int 20472: getchar_unlocked (void) 20472: { 20472: return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++); 20472: } 20472: 20472: 20472: 20472: 20472: extern __inline __attribute__ ((__gnu_inline__)) int 20472: putchar (int __c) 20472: { 20472: return putc (__c, stdout); 20472: } 20472: 20472: 20472: 20472: 20472: extern __inline __attribute__ ((__gnu_inline__)) int 20472: fputc_unlocked (int __c, FILE *__stream) 20472: { 20472: return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: extern __inline __attribute__ ((__gnu_inline__)) int 20472: putc_unlocked (int __c, FILE *__stream) 20472: { 20472: return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); 20472: } 20472: 20472: 20472: extern __inline __attribute__ ((__gnu_inline__)) int 20472: putchar_unlocked (int __c) 20472: { 20472: return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c))); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: extern __inline __attribute__ ((__gnu_inline__)) __ssize_t 20472: getline (char **__lineptr, size_t *__n, FILE *__stream) 20472: { 20472: return __getdelim (__lineptr, __n, '\n', __stream); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: extern __inline __attribute__ ((__gnu_inline__)) int 20472: __attribute__ ((__leaf__)) feof_unlocked (FILE *__stream) throw () 20472: { 20472: return (((__stream)->_flags & 0x0010) != 0); 20472: } 20472: 20472: 20472: extern __inline __attribute__ ((__gnu_inline__)) int 20472: __attribute__ ((__leaf__)) ferror_unlocked (FILE *__stream) throw () 20472: { 20472: return (((__stream)->_flags & 0x0020) != 0); 20472: } 20472: # 865 "/usr/include/stdio.h" 2 3 4 20472: # 873 "/usr/include/stdio.h" 3 4 20472: } 20472: # 43 "/usr/include/c++/10/cstdio" 2 3 20472: # 96 "/usr/include/c++/10/cstdio" 3 20472: namespace std 20472: { 20472: using ::FILE; 20472: using ::fpos_t; 20472: 20472: using ::clearerr; 20472: using ::fclose; 20472: using ::feof; 20472: using ::ferror; 20472: using ::fflush; 20472: using ::fgetc; 20472: using ::fgetpos; 20472: using ::fgets; 20472: using ::fopen; 20472: using ::fprintf; 20472: using ::fputc; 20472: using ::fputs; 20472: using ::fread; 20472: using ::freopen; 20472: using ::fscanf; 20472: using ::fseek; 20472: using ::fsetpos; 20472: using ::ftell; 20472: using ::fwrite; 20472: using ::getc; 20472: using ::getchar; 20472: 20472: 20472: using ::gets; 20472: 20472: using ::perror; 20472: using ::printf; 20472: using ::putc; 20472: using ::putchar; 20472: using ::puts; 20472: using ::remove; 20472: using ::rename; 20472: using ::rewind; 20472: using ::scanf; 20472: using ::setbuf; 20472: using ::setvbuf; 20472: using ::sprintf; 20472: using ::sscanf; 20472: using ::tmpfile; 20472: 20472: using ::tmpnam; 20472: 20472: using ::ungetc; 20472: using ::vfprintf; 20472: using ::vprintf; 20472: using ::vsprintf; 20472: } 20472: # 157 "/usr/include/c++/10/cstdio" 3 20472: namespace __gnu_cxx 20472: { 20472: # 175 "/usr/include/c++/10/cstdio" 3 20472: using ::snprintf; 20472: using ::vfscanf; 20472: using ::vscanf; 20472: using ::vsnprintf; 20472: using ::vsscanf; 20472: 20472: } 20472: 20472: namespace std 20472: { 20472: using ::__gnu_cxx::snprintf; 20472: using ::__gnu_cxx::vfscanf; 20472: using ::__gnu_cxx::vscanf; 20472: using ::__gnu_cxx::vsnprintf; 20472: using ::__gnu_cxx::vsscanf; 20472: } 20472: # 44 "/usr/include/c++/10/ext/string_conversions.h" 2 3 20472: # 1 "/usr/include/c++/10/cerrno" 1 3 20472: # 39 "/usr/include/c++/10/cerrno" 3 20472: 20472: # 40 "/usr/include/c++/10/cerrno" 3 20472: 20472: 20472: # 1 "/usr/include/errno.h" 1 3 4 20472: # 28 "/usr/include/errno.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/errno.h" 1 3 4 20472: # 26 "/usr/include/arm-linux-gnueabihf/bits/errno.h" 3 4 20472: # 1 "/usr/include/linux/errno.h" 1 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/asm/errno.h" 1 3 4 20472: # 1 "/usr/include/asm-generic/errno.h" 1 3 4 20472: 20472: 20472: 20472: 20472: # 1 "/usr/include/asm-generic/errno-base.h" 1 3 4 20472: # 6 "/usr/include/asm-generic/errno.h" 2 3 4 20472: # 2 "/usr/include/arm-linux-gnueabihf/asm/errno.h" 2 3 4 20472: # 2 "/usr/include/linux/errno.h" 2 3 4 20472: # 27 "/usr/include/arm-linux-gnueabihf/bits/errno.h" 2 3 4 20472: # 29 "/usr/include/errno.h" 2 3 4 20472: 20472: 20472: 20472: 20472: 20472: extern "C" { 20472: 20472: 20472: extern int *__errno_location (void) throw () __attribute__ ((__const__)); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern char *program_invocation_name; 20472: extern char *program_invocation_short_name; 20472: 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/types/error_t.h" 1 3 4 20472: # 22 "/usr/include/arm-linux-gnueabihf/bits/types/error_t.h" 3 4 20472: typedef int error_t; 20472: # 49 "/usr/include/errno.h" 2 3 4 20472: 20472: 20472: 20472: } 20472: # 43 "/usr/include/c++/10/cerrno" 2 3 20472: # 45 "/usr/include/c++/10/ext/string_conversions.h" 2 3 20472: 20472: namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: template 20472: _Ret 20472: __stoa(_TRet (*__convf) (const _CharT*, _CharT**, _Base...), 20472: const char* __name, const _CharT* __str, std::size_t* __idx, 20472: _Base... __base) 20472: { 20472: _Ret __ret; 20472: 20472: _CharT* __endptr; 20472: 20472: struct _Save_errno { 20472: _Save_errno() : _M_errno((*__errno_location ())) { (*__errno_location ()) = 0; } 20472: ~_Save_errno() { if ((*__errno_location ()) == 0) (*__errno_location ()) = _M_errno; } 20472: int _M_errno; 20472: } const __save_errno; 20472: 20472: struct _Range_chk { 20472: static bool 20472: _S_chk(_TRet, std::false_type) { return false; } 20472: 20472: static bool 20472: _S_chk(_TRet __val, std::true_type) 20472: { 20472: return __val < _TRet(__numeric_traits::__min) 20472: || __val > _TRet(__numeric_traits::__max); 20472: } 20472: }; 20472: 20472: const _TRet __tmp = __convf(__str, &__endptr, __base...); 20472: 20472: if (__endptr == __str) 20472: std::__throw_invalid_argument(__name); 20472: else if ((*__errno_location ()) == 34 20472: || _Range_chk::_S_chk(__tmp, std::is_same<_Ret, int>{})) 20472: std::__throw_out_of_range(__name); 20472: else 20472: __ret = __tmp; 20472: 20472: if (__idx) 20472: *__idx = __endptr - __str; 20472: 20472: return __ret; 20472: } 20472: 20472: 20472: template 20472: _String 20472: __to_xstring(int (*__convf) (_CharT*, std::size_t, const _CharT*, 20472: __builtin_va_list), std::size_t __n, 20472: const _CharT* __fmt, ...) 20472: { 20472: 20472: 20472: _CharT* __s = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) 20472: * __n)); 20472: 20472: __builtin_va_list __args; 20472: __builtin_va_start(__args, __fmt); 20472: 20472: const int __len = __convf(__s, __n, __fmt, __args); 20472: 20472: __builtin_va_end(__args); 20472: 20472: return _String(__s, __s + __len); 20472: } 20472: 20472: 20472: } 20472: # 6546 "/usr/include/c++/10/bits/basic_string.h" 2 3 20472: # 1 "/usr/include/c++/10/bits/charconv.h" 1 3 20472: # 33 "/usr/include/c++/10/bits/charconv.h" 3 20472: 20472: # 34 "/usr/include/c++/10/bits/charconv.h" 3 20472: 20472: 20472: 20472: 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: namespace __detail 20472: { 20472: 20472: template 20472: unsigned 20472: __to_chars_len(_Tp __value, int __base = 10) noexcept 20472: { 20472: static_assert(is_integral<_Tp>::value, "implementation bug"); 20472: static_assert(is_unsigned<_Tp>::value, "implementation bug"); 20472: 20472: unsigned __n = 1; 20472: const unsigned __b2 = __base * __base; 20472: const unsigned __b3 = __b2 * __base; 20472: const unsigned long __b4 = __b3 * __base; 20472: for (;;) 20472: { 20472: if (__value < (unsigned)__base) return __n; 20472: if (__value < __b2) return __n + 1; 20472: if (__value < __b3) return __n + 2; 20472: if (__value < __b4) return __n + 3; 20472: __value /= __b4; 20472: __n += 4; 20472: } 20472: } 20472: 20472: 20472: 20472: 20472: template 20472: void 20472: __to_chars_10_impl(char* __first, unsigned __len, _Tp __val) noexcept 20472: { 20472: static_assert(is_integral<_Tp>::value, "implementation bug"); 20472: static_assert(is_unsigned<_Tp>::value, "implementation bug"); 20472: 20472: static constexpr char __digits[201] = 20472: "0001020304050607080910111213141516171819" 20472: "2021222324252627282930313233343536373839" 20472: "4041424344454647484950515253545556575859" 20472: "6061626364656667686970717273747576777879" 20472: "8081828384858687888990919293949596979899"; 20472: unsigned __pos = __len - 1; 20472: while (__val >= 100) 20472: { 20472: auto const __num = (__val % 100) * 2; 20472: __val /= 100; 20472: __first[__pos] = __digits[__num + 1]; 20472: __first[__pos - 1] = __digits[__num]; 20472: __pos -= 2; 20472: } 20472: if (__val >= 10) 20472: { 20472: auto const __num = __val * 2; 20472: __first[1] = __digits[__num + 1]; 20472: __first[0] = __digits[__num]; 20472: } 20472: else 20472: __first[0] = '0' + __val; 20472: } 20472: 20472: } 20472: 20472: } 20472: # 6547 "/usr/include/c++/10/bits/basic_string.h" 2 3 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: namespace __cxx11 { 20472: 20472: 20472: 20472: inline int 20472: stoi(const string& __str, size_t* __idx = 0, int __base = 10) 20472: { return __gnu_cxx::__stoa(&std::strtol, "stoi", __str.c_str(), 20472: __idx, __base); } 20472: 20472: inline long 20472: stol(const string& __str, size_t* __idx = 0, int __base = 10) 20472: { return __gnu_cxx::__stoa(&std::strtol, "stol", __str.c_str(), 20472: __idx, __base); } 20472: 20472: inline unsigned long 20472: stoul(const string& __str, size_t* __idx = 0, int __base = 10) 20472: { return __gnu_cxx::__stoa(&std::strtoul, "stoul", __str.c_str(), 20472: __idx, __base); } 20472: 20472: inline long long 20472: stoll(const string& __str, size_t* __idx = 0, int __base = 10) 20472: { return __gnu_cxx::__stoa(&std::strtoll, "stoll", __str.c_str(), 20472: __idx, __base); } 20472: 20472: inline unsigned long long 20472: stoull(const string& __str, size_t* __idx = 0, int __base = 10) 20472: { return __gnu_cxx::__stoa(&std::strtoull, "stoull", __str.c_str(), 20472: __idx, __base); } 20472: 20472: 20472: inline float 20472: stof(const string& __str, size_t* __idx = 0) 20472: { return __gnu_cxx::__stoa(&std::strtof, "stof", __str.c_str(), __idx); } 20472: 20472: inline double 20472: stod(const string& __str, size_t* __idx = 0) 20472: { return __gnu_cxx::__stoa(&std::strtod, "stod", __str.c_str(), __idx); } 20472: 20472: inline long double 20472: stold(const string& __str, size_t* __idx = 0) 20472: { return __gnu_cxx::__stoa(&std::strtold, "stold", __str.c_str(), __idx); } 20472: 20472: 20472: 20472: 20472: inline string 20472: to_string(int __val) 20472: { 20472: const bool __neg = __val < 0; 20472: const unsigned __uval = __neg ? (unsigned)~__val + 1u : __val; 20472: const auto __len = __detail::__to_chars_len(__uval); 20472: string __str(__neg + __len, '-'); 20472: __detail::__to_chars_10_impl(&__str[__neg], __len, __uval); 20472: return __str; 20472: } 20472: 20472: inline string 20472: to_string(unsigned __val) 20472: { 20472: string __str(__detail::__to_chars_len(__val), '\0'); 20472: __detail::__to_chars_10_impl(&__str[0], __str.size(), __val); 20472: return __str; 20472: } 20472: 20472: inline string 20472: to_string(long __val) 20472: { 20472: const bool __neg = __val < 0; 20472: const unsigned long __uval = __neg ? (unsigned long)~__val + 1ul : __val; 20472: const auto __len = __detail::__to_chars_len(__uval); 20472: string __str(__neg + __len, '-'); 20472: __detail::__to_chars_10_impl(&__str[__neg], __len, __uval); 20472: return __str; 20472: } 20472: 20472: inline string 20472: to_string(unsigned long __val) 20472: { 20472: string __str(__detail::__to_chars_len(__val), '\0'); 20472: __detail::__to_chars_10_impl(&__str[0], __str.size(), __val); 20472: return __str; 20472: } 20472: 20472: inline string 20472: to_string(long long __val) 20472: { 20472: const bool __neg = __val < 0; 20472: const unsigned long long __uval 20472: = __neg ? (unsigned long long)~__val + 1ull : __val; 20472: const auto __len = __detail::__to_chars_len(__uval); 20472: string __str(__neg + __len, '-'); 20472: __detail::__to_chars_10_impl(&__str[__neg], __len, __uval); 20472: return __str; 20472: } 20472: 20472: inline string 20472: to_string(unsigned long long __val) 20472: { 20472: string __str(__detail::__to_chars_len(__val), '\0'); 20472: __detail::__to_chars_10_impl(&__str[0], __str.size(), __val); 20472: return __str; 20472: } 20472: 20472: 20472: 20472: 20472: inline string 20472: to_string(float __val) 20472: { 20472: const int __n = 20472: __gnu_cxx::__numeric_traits::__max_exponent10 + 20; 20472: return __gnu_cxx::__to_xstring(&std::vsnprintf, __n, 20472: "%f", __val); 20472: } 20472: 20472: inline string 20472: to_string(double __val) 20472: { 20472: const int __n = 20472: __gnu_cxx::__numeric_traits::__max_exponent10 + 20; 20472: return __gnu_cxx::__to_xstring(&std::vsnprintf, __n, 20472: "%f", __val); 20472: } 20472: 20472: inline string 20472: to_string(long double __val) 20472: { 20472: const int __n = 20472: __gnu_cxx::__numeric_traits::__max_exponent10 + 20; 20472: return __gnu_cxx::__to_xstring(&std::vsnprintf, __n, 20472: "%Lf", __val); 20472: } 20472: 20472: 20472: 20472: inline int 20472: stoi(const wstring& __str, size_t* __idx = 0, int __base = 10) 20472: { return __gnu_cxx::__stoa(&std::wcstol, "stoi", __str.c_str(), 20472: __idx, __base); } 20472: 20472: inline long 20472: stol(const wstring& __str, size_t* __idx = 0, int __base = 10) 20472: { return __gnu_cxx::__stoa(&std::wcstol, "stol", __str.c_str(), 20472: __idx, __base); } 20472: 20472: inline unsigned long 20472: stoul(const wstring& __str, size_t* __idx = 0, int __base = 10) 20472: { return __gnu_cxx::__stoa(&std::wcstoul, "stoul", __str.c_str(), 20472: __idx, __base); } 20472: 20472: inline long long 20472: stoll(const wstring& __str, size_t* __idx = 0, int __base = 10) 20472: { return __gnu_cxx::__stoa(&std::wcstoll, "stoll", __str.c_str(), 20472: __idx, __base); } 20472: 20472: inline unsigned long long 20472: stoull(const wstring& __str, size_t* __idx = 0, int __base = 10) 20472: { return __gnu_cxx::__stoa(&std::wcstoull, "stoull", __str.c_str(), 20472: __idx, __base); } 20472: 20472: 20472: inline float 20472: stof(const wstring& __str, size_t* __idx = 0) 20472: { return __gnu_cxx::__stoa(&std::wcstof, "stof", __str.c_str(), __idx); } 20472: 20472: inline double 20472: stod(const wstring& __str, size_t* __idx = 0) 20472: { return __gnu_cxx::__stoa(&std::wcstod, "stod", __str.c_str(), __idx); } 20472: 20472: inline long double 20472: stold(const wstring& __str, size_t* __idx = 0) 20472: { return __gnu_cxx::__stoa(&std::wcstold, "stold", __str.c_str(), __idx); } 20472: 20472: 20472: 20472: inline wstring 20472: to_wstring(int __val) 20472: { return __gnu_cxx::__to_xstring(&std::vswprintf, 4 * sizeof(int), 20472: L"%d", __val); } 20472: 20472: inline wstring 20472: to_wstring(unsigned __val) 20472: { return __gnu_cxx::__to_xstring(&std::vswprintf, 20472: 4 * sizeof(unsigned), 20472: L"%u", __val); } 20472: 20472: inline wstring 20472: to_wstring(long __val) 20472: { return __gnu_cxx::__to_xstring(&std::vswprintf, 4 * sizeof(long), 20472: L"%ld", __val); } 20472: 20472: inline wstring 20472: to_wstring(unsigned long __val) 20472: { return __gnu_cxx::__to_xstring(&std::vswprintf, 20472: 4 * sizeof(unsigned long), 20472: L"%lu", __val); } 20472: 20472: inline wstring 20472: to_wstring(long long __val) 20472: { return __gnu_cxx::__to_xstring(&std::vswprintf, 20472: 4 * sizeof(long long), 20472: L"%lld", __val); } 20472: 20472: inline wstring 20472: to_wstring(unsigned long long __val) 20472: { return __gnu_cxx::__to_xstring(&std::vswprintf, 20472: 4 * sizeof(unsigned long long), 20472: L"%llu", __val); } 20472: 20472: inline wstring 20472: to_wstring(float __val) 20472: { 20472: const int __n = 20472: __gnu_cxx::__numeric_traits::__max_exponent10 + 20; 20472: return __gnu_cxx::__to_xstring(&std::vswprintf, __n, 20472: L"%f", __val); 20472: } 20472: 20472: inline wstring 20472: to_wstring(double __val) 20472: { 20472: const int __n = 20472: __gnu_cxx::__numeric_traits::__max_exponent10 + 20; 20472: return __gnu_cxx::__to_xstring(&std::vswprintf, __n, 20472: L"%f", __val); 20472: } 20472: 20472: inline wstring 20472: to_wstring(long double __val) 20472: { 20472: const int __n = 20472: __gnu_cxx::__numeric_traits::__max_exponent10 + 20; 20472: return __gnu_cxx::__to_xstring(&std::vswprintf, __n, 20472: L"%Lf", __val); 20472: } 20472: 20472: 20472: 20472: } 20472: 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: template<> 20472: struct hash 20472: : public __hash_base 20472: { 20472: size_t 20472: operator()(const string& __s) const noexcept 20472: { return std::_Hash_impl::hash(__s.data(), __s.length()); } 20472: }; 20472: 20472: template<> 20472: struct __is_fast_hash> : std::false_type 20472: { }; 20472: 20472: 20472: 20472: template<> 20472: struct hash 20472: : public __hash_base 20472: { 20472: size_t 20472: operator()(const wstring& __s) const noexcept 20472: { return std::_Hash_impl::hash(__s.data(), 20472: __s.length() * sizeof(wchar_t)); } 20472: }; 20472: 20472: template<> 20472: struct __is_fast_hash> : std::false_type 20472: { }; 20472: # 6856 "/usr/include/c++/10/bits/basic_string.h" 3 20472: template<> 20472: struct hash 20472: : public __hash_base 20472: { 20472: size_t 20472: operator()(const u16string& __s) const noexcept 20472: { return std::_Hash_impl::hash(__s.data(), 20472: __s.length() * sizeof(char16_t)); } 20472: }; 20472: 20472: template<> 20472: struct __is_fast_hash> : std::false_type 20472: { }; 20472: 20472: 20472: template<> 20472: struct hash 20472: : public __hash_base 20472: { 20472: size_t 20472: operator()(const u32string& __s) const noexcept 20472: { return std::_Hash_impl::hash(__s.data(), 20472: __s.length() * sizeof(char32_t)); } 20472: }; 20472: 20472: template<> 20472: struct __is_fast_hash> : std::false_type 20472: { }; 20472: # 6946 "/usr/include/c++/10/bits/basic_string.h" 3 20472: 20472: } 20472: # 56 "/usr/include/c++/10/string" 2 3 20472: # 1 "/usr/include/c++/10/bits/basic_string.tcc" 1 3 20472: # 42 "/usr/include/c++/10/bits/basic_string.tcc" 3 20472: 20472: # 43 "/usr/include/c++/10/bits/basic_string.tcc" 3 20472: 20472: 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: 20472: template 20472: const typename basic_string<_CharT, _Traits, _Alloc>::size_type 20472: basic_string<_CharT, _Traits, _Alloc>::npos; 20472: 20472: template 20472: void 20472: basic_string<_CharT, _Traits, _Alloc>:: 20472: swap(basic_string& __s) noexcept 20472: { 20472: if (this == &__s) 20472: return; 20472: 20472: _Alloc_traits::_S_on_swap(_M_get_allocator(), __s._M_get_allocator()); 20472: 20472: if (_M_is_local()) 20472: if (__s._M_is_local()) 20472: { 20472: if (length() && __s.length()) 20472: { 20472: _CharT __tmp_data[_S_local_capacity + 1]; 20472: traits_type::copy(__tmp_data, __s._M_local_buf, 20472: _S_local_capacity + 1); 20472: traits_type::copy(__s._M_local_buf, _M_local_buf, 20472: _S_local_capacity + 1); 20472: traits_type::copy(_M_local_buf, __tmp_data, 20472: _S_local_capacity + 1); 20472: } 20472: else if (__s.length()) 20472: { 20472: traits_type::copy(_M_local_buf, __s._M_local_buf, 20472: _S_local_capacity + 1); 20472: _M_length(__s.length()); 20472: __s._M_set_length(0); 20472: return; 20472: } 20472: else if (length()) 20472: { 20472: traits_type::copy(__s._M_local_buf, _M_local_buf, 20472: _S_local_capacity + 1); 20472: __s._M_length(length()); 20472: _M_set_length(0); 20472: return; 20472: } 20472: } 20472: else 20472: { 20472: const size_type __tmp_capacity = __s._M_allocated_capacity; 20472: traits_type::copy(__s._M_local_buf, _M_local_buf, 20472: _S_local_capacity + 1); 20472: _M_data(__s._M_data()); 20472: __s._M_data(__s._M_local_buf); 20472: _M_capacity(__tmp_capacity); 20472: } 20472: else 20472: { 20472: const size_type __tmp_capacity = _M_allocated_capacity; 20472: if (__s._M_is_local()) 20472: { 20472: traits_type::copy(_M_local_buf, __s._M_local_buf, 20472: _S_local_capacity + 1); 20472: __s._M_data(_M_data()); 20472: _M_data(_M_local_buf); 20472: } 20472: else 20472: { 20472: pointer __tmp_ptr = _M_data(); 20472: _M_data(__s._M_data()); 20472: __s._M_data(__tmp_ptr); 20472: _M_capacity(__s._M_allocated_capacity); 20472: } 20472: __s._M_capacity(__tmp_capacity); 20472: } 20472: 20472: const size_type __tmp_length = length(); 20472: _M_length(__s.length()); 20472: __s._M_length(__tmp_length); 20472: } 20472: 20472: template 20472: typename basic_string<_CharT, _Traits, _Alloc>::pointer 20472: basic_string<_CharT, _Traits, _Alloc>:: 20472: _M_create(size_type& __capacity, size_type __old_capacity) 20472: { 20472: 20472: 20472: if (__capacity > max_size()) 20472: std::__throw_length_error(("basic_string::_M_create")); 20472: 20472: 20472: 20472: 20472: if (__capacity > __old_capacity && __capacity < 2 * __old_capacity) 20472: { 20472: __capacity = 2 * __old_capacity; 20472: 20472: if (__capacity > max_size()) 20472: __capacity = max_size(); 20472: } 20472: 20472: 20472: 20472: return _Alloc_traits::allocate(_M_get_allocator(), __capacity + 1); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: template 20472: template 20472: void 20472: basic_string<_CharT, _Traits, _Alloc>:: 20472: _M_construct(_InIterator __beg, _InIterator __end, 20472: std::input_iterator_tag) 20472: { 20472: size_type __len = 0; 20472: size_type __capacity = size_type(_S_local_capacity); 20472: 20472: while (__beg != __end && __len < __capacity) 20472: { 20472: _M_data()[__len++] = *__beg; 20472: ++__beg; 20472: } 20472: 20472: try 20472: { 20472: while (__beg != __end) 20472: { 20472: if (__len == __capacity) 20472: { 20472: 20472: __capacity = __len + 1; 20472: pointer __another = _M_create(__capacity, __len); 20472: this->_S_copy(__another, _M_data(), __len); 20472: _M_dispose(); 20472: _M_data(__another); 20472: _M_capacity(__capacity); 20472: } 20472: _M_data()[__len++] = *__beg; 20472: ++__beg; 20472: } 20472: } 20472: catch(...) 20472: { 20472: _M_dispose(); 20472: throw; 20472: } 20472: 20472: _M_set_length(__len); 20472: } 20472: 20472: template 20472: template 20472: void 20472: basic_string<_CharT, _Traits, _Alloc>:: 20472: _M_construct(_InIterator __beg, _InIterator __end, 20472: std::forward_iterator_tag) 20472: { 20472: 20472: if (__gnu_cxx::__is_null_pointer(__beg) && __beg != __end) 20472: std::__throw_logic_error(("basic_string::" "_M_construct null not valid") 20472: ); 20472: 20472: size_type __dnew = static_cast(std::distance(__beg, __end)); 20472: 20472: if (__dnew > size_type(_S_local_capacity)) 20472: { 20472: _M_data(_M_create(__dnew, size_type(0))); 20472: _M_capacity(__dnew); 20472: } 20472: 20472: 20472: try 20472: { this->_S_copy_chars(_M_data(), __beg, __end); } 20472: catch(...) 20472: { 20472: _M_dispose(); 20472: throw; 20472: } 20472: 20472: _M_set_length(__dnew); 20472: } 20472: 20472: template 20472: void 20472: basic_string<_CharT, _Traits, _Alloc>:: 20472: _M_construct(size_type __n, _CharT __c) 20472: { 20472: if (__n > size_type(_S_local_capacity)) 20472: { 20472: _M_data(_M_create(__n, size_type(0))); 20472: _M_capacity(__n); 20472: } 20472: 20472: if (__n) 20472: this->_S_assign(_M_data(), __n, __c); 20472: 20472: _M_set_length(__n); 20472: } 20472: 20472: template 20472: void 20472: basic_string<_CharT, _Traits, _Alloc>:: 20472: _M_assign(const basic_string& __str) 20472: { 20472: if (this != &__str) 20472: { 20472: const size_type __rsize = __str.length(); 20472: const size_type __capacity = capacity(); 20472: 20472: if (__rsize > __capacity) 20472: { 20472: size_type __new_capacity = __rsize; 20472: pointer __tmp = _M_create(__new_capacity, __capacity); 20472: _M_dispose(); 20472: _M_data(__tmp); 20472: _M_capacity(__new_capacity); 20472: } 20472: 20472: if (__rsize) 20472: this->_S_copy(_M_data(), __str._M_data(), __rsize); 20472: 20472: _M_set_length(__rsize); 20472: } 20472: } 20472: 20472: template 20472: void 20472: basic_string<_CharT, _Traits, _Alloc>:: 20472: reserve(size_type __res) 20472: { 20472: 20472: if (__res < length()) 20472: __res = length(); 20472: 20472: const size_type __capacity = capacity(); 20472: if (__res != __capacity) 20472: { 20472: if (__res > __capacity 20472: || __res > size_type(_S_local_capacity)) 20472: { 20472: pointer __tmp = _M_create(__res, __capacity); 20472: this->_S_copy(__tmp, _M_data(), length() + 1); 20472: _M_dispose(); 20472: _M_data(__tmp); 20472: _M_capacity(__res); 20472: } 20472: else if (!_M_is_local()) 20472: { 20472: this->_S_copy(_M_local_data(), _M_data(), length() + 1); 20472: _M_destroy(__capacity); 20472: _M_data(_M_local_data()); 20472: } 20472: } 20472: } 20472: 20472: template 20472: void 20472: basic_string<_CharT, _Traits, _Alloc>:: 20472: _M_mutate(size_type __pos, size_type __len1, const _CharT* __s, 20472: size_type __len2) 20472: { 20472: const size_type __how_much = length() - __pos - __len1; 20472: 20472: size_type __new_capacity = length() + __len2 - __len1; 20472: pointer __r = _M_create(__new_capacity, capacity()); 20472: 20472: if (__pos) 20472: this->_S_copy(__r, _M_data(), __pos); 20472: if (__s && __len2) 20472: this->_S_copy(__r + __pos, __s, __len2); 20472: if (__how_much) 20472: this->_S_copy(__r + __pos + __len2, 20472: _M_data() + __pos + __len1, __how_much); 20472: 20472: _M_dispose(); 20472: _M_data(__r); 20472: _M_capacity(__new_capacity); 20472: } 20472: 20472: template 20472: void 20472: basic_string<_CharT, _Traits, _Alloc>:: 20472: _M_erase(size_type __pos, size_type __n) 20472: { 20472: const size_type __how_much = length() - __pos - __n; 20472: 20472: if (__how_much && __n) 20472: this->_S_move(_M_data() + __pos, _M_data() + __pos + __n, __how_much); 20472: 20472: _M_set_length(length() - __n); 20472: } 20472: 20472: template 20472: void 20472: basic_string<_CharT, _Traits, _Alloc>:: 20472: resize(size_type __n, _CharT __c) 20472: { 20472: const size_type __size = this->size(); 20472: if (__size < __n) 20472: this->append(__n - __size, __c); 20472: else if (__n < __size) 20472: this->_M_set_length(__n); 20472: } 20472: 20472: template 20472: basic_string<_CharT, _Traits, _Alloc>& 20472: basic_string<_CharT, _Traits, _Alloc>:: 20472: _M_append(const _CharT* __s, size_type __n) 20472: { 20472: const size_type __len = __n + this->size(); 20472: 20472: if (__len <= this->capacity()) 20472: { 20472: if (__n) 20472: this->_S_copy(this->_M_data() + this->size(), __s, __n); 20472: } 20472: else 20472: this->_M_mutate(this->size(), size_type(0), __s, __n); 20472: 20472: this->_M_set_length(__len); 20472: return *this; 20472: } 20472: 20472: template 20472: template 20472: basic_string<_CharT, _Traits, _Alloc>& 20472: basic_string<_CharT, _Traits, _Alloc>:: 20472: _M_replace_dispatch(const_iterator __i1, const_iterator __i2, 20472: _InputIterator __k1, _InputIterator __k2, 20472: std::__false_type) 20472: { 20472: 20472: 20472: const basic_string __s(__k1, __k2, this->get_allocator()); 20472: const size_type __n1 = __i2 - __i1; 20472: return _M_replace(__i1 - begin(), __n1, __s._M_data(), 20472: __s.size()); 20472: } 20472: 20472: template 20472: basic_string<_CharT, _Traits, _Alloc>& 20472: basic_string<_CharT, _Traits, _Alloc>:: 20472: _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2, 20472: _CharT __c) 20472: { 20472: _M_check_length(__n1, __n2, "basic_string::_M_replace_aux"); 20472: 20472: const size_type __old_size = this->size(); 20472: const size_type __new_size = __old_size + __n2 - __n1; 20472: 20472: if (__new_size <= this->capacity()) 20472: { 20472: pointer __p = this->_M_data() + __pos1; 20472: 20472: const size_type __how_much = __old_size - __pos1 - __n1; 20472: if (__how_much && __n1 != __n2) 20472: this->_S_move(__p + __n2, __p + __n1, __how_much); 20472: } 20472: else 20472: this->_M_mutate(__pos1, __n1, 0, __n2); 20472: 20472: if (__n2) 20472: this->_S_assign(this->_M_data() + __pos1, __n2, __c); 20472: 20472: this->_M_set_length(__new_size); 20472: return *this; 20472: } 20472: 20472: template 20472: basic_string<_CharT, _Traits, _Alloc>& 20472: basic_string<_CharT, _Traits, _Alloc>:: 20472: _M_replace(size_type __pos, size_type __len1, const _CharT* __s, 20472: const size_type __len2) 20472: { 20472: _M_check_length(__len1, __len2, "basic_string::_M_replace"); 20472: 20472: const size_type __old_size = this->size(); 20472: const size_type __new_size = __old_size + __len2 - __len1; 20472: 20472: if (__new_size <= this->capacity()) 20472: { 20472: pointer __p = this->_M_data() + __pos; 20472: 20472: const size_type __how_much = __old_size - __pos - __len1; 20472: if (_M_disjunct(__s)) 20472: { 20472: if (__how_much && __len1 != __len2) 20472: this->_S_move(__p + __len2, __p + __len1, __how_much); 20472: if (__len2) 20472: this->_S_copy(__p, __s, __len2); 20472: } 20472: else 20472: { 20472: 20472: if (__len2 && __len2 <= __len1) 20472: this->_S_move(__p, __s, __len2); 20472: if (__how_much && __len1 != __len2) 20472: this->_S_move(__p + __len2, __p + __len1, __how_much); 20472: if (__len2 > __len1) 20472: { 20472: if (__s + __len2 <= __p + __len1) 20472: this->_S_move(__p, __s, __len2); 20472: else if (__s >= __p + __len1) 20472: this->_S_copy(__p, __s + __len2 - __len1, __len2); 20472: else 20472: { 20472: const size_type __nleft = (__p + __len1) - __s; 20472: this->_S_move(__p, __s, __nleft); 20472: this->_S_copy(__p + __nleft, __p + __len2, 20472: __len2 - __nleft); 20472: } 20472: } 20472: } 20472: } 20472: else 20472: this->_M_mutate(__pos, __len1, __s, __len2); 20472: 20472: this->_M_set_length(__new_size); 20472: return *this; 20472: } 20472: 20472: template 20472: typename basic_string<_CharT, _Traits, _Alloc>::size_type 20472: basic_string<_CharT, _Traits, _Alloc>:: 20472: copy(_CharT* __s, size_type __n, size_type __pos) const 20472: { 20472: _M_check(__pos, "basic_string::copy"); 20472: __n = _M_limit(__pos, __n); 20472: ; 20472: if (__n) 20472: _S_copy(__s, _M_data() + __pos, __n); 20472: 20472: return __n; 20472: } 20472: # 1150 "/usr/include/c++/10/bits/basic_string.tcc" 3 20472: template 20472: basic_string<_CharT, _Traits, _Alloc> 20472: operator+(const _CharT* __lhs, 20472: const basic_string<_CharT, _Traits, _Alloc>& __rhs) 20472: { 20472: ; 20472: typedef basic_string<_CharT, _Traits, _Alloc> __string_type; 20472: typedef typename __string_type::size_type __size_type; 20472: typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template 20472: rebind<_CharT>::other _Char_alloc_type; 20472: typedef __gnu_cxx::__alloc_traits<_Char_alloc_type> _Alloc_traits; 20472: const __size_type __len = _Traits::length(__lhs); 20472: __string_type __str(_Alloc_traits::_S_select_on_copy( 20472: __rhs.get_allocator())); 20472: __str.reserve(__len + __rhs.size()); 20472: __str.append(__lhs, __len); 20472: __str.append(__rhs); 20472: return __str; 20472: } 20472: 20472: template 20472: basic_string<_CharT, _Traits, _Alloc> 20472: operator+(_CharT __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) 20472: { 20472: typedef basic_string<_CharT, _Traits, _Alloc> __string_type; 20472: typedef typename __string_type::size_type __size_type; 20472: typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template 20472: rebind<_CharT>::other _Char_alloc_type; 20472: typedef __gnu_cxx::__alloc_traits<_Char_alloc_type> _Alloc_traits; 20472: __string_type __str(_Alloc_traits::_S_select_on_copy( 20472: __rhs.get_allocator())); 20472: const __size_type __len = __rhs.size(); 20472: __str.reserve(__len + 1); 20472: __str.append(__size_type(1), __lhs); 20472: __str.append(__rhs); 20472: return __str; 20472: } 20472: 20472: template 20472: typename basic_string<_CharT, _Traits, _Alloc>::size_type 20472: basic_string<_CharT, _Traits, _Alloc>:: 20472: find(const _CharT* __s, size_type __pos, size_type __n) const 20472: noexcept 20472: { 20472: ; 20472: const size_type __size = this->size(); 20472: 20472: if (__n == 0) 20472: return __pos <= __size ? __pos : npos; 20472: if (__pos >= __size) 20472: return npos; 20472: 20472: const _CharT __elem0 = __s[0]; 20472: const _CharT* const __data = data(); 20472: const _CharT* __first = __data + __pos; 20472: const _CharT* const __last = __data + __size; 20472: size_type __len = __size - __pos; 20472: 20472: while (__len >= __n) 20472: { 20472: 20472: __first = traits_type::find(__first, __len - __n + 1, __elem0); 20472: if (!__first) 20472: return npos; 20472: 20472: 20472: 20472: if (traits_type::compare(__first, __s, __n) == 0) 20472: return __first - __data; 20472: __len = __last - ++__first; 20472: } 20472: return npos; 20472: } 20472: 20472: template 20472: typename basic_string<_CharT, _Traits, _Alloc>::size_type 20472: basic_string<_CharT, _Traits, _Alloc>:: 20472: find(_CharT __c, size_type __pos) const noexcept 20472: { 20472: size_type __ret = npos; 20472: const size_type __size = this->size(); 20472: if (__pos < __size) 20472: { 20472: const _CharT* __data = _M_data(); 20472: const size_type __n = __size - __pos; 20472: const _CharT* __p = traits_type::find(__data + __pos, __n, __c); 20472: if (__p) 20472: __ret = __p - __data; 20472: } 20472: return __ret; 20472: } 20472: 20472: template 20472: typename basic_string<_CharT, _Traits, _Alloc>::size_type 20472: basic_string<_CharT, _Traits, _Alloc>:: 20472: rfind(const _CharT* __s, size_type __pos, size_type __n) const 20472: noexcept 20472: { 20472: ; 20472: const size_type __size = this->size(); 20472: if (__n <= __size) 20472: { 20472: __pos = std::min(size_type(__size - __n), __pos); 20472: const _CharT* __data = _M_data(); 20472: do 20472: { 20472: if (traits_type::compare(__data + __pos, __s, __n) == 0) 20472: return __pos; 20472: } 20472: while (__pos-- > 0); 20472: } 20472: return npos; 20472: } 20472: 20472: template 20472: typename basic_string<_CharT, _Traits, _Alloc>::size_type 20472: basic_string<_CharT, _Traits, _Alloc>:: 20472: rfind(_CharT __c, size_type __pos) const noexcept 20472: { 20472: size_type __size = this->size(); 20472: if (__size) 20472: { 20472: if (--__size > __pos) 20472: __size = __pos; 20472: for (++__size; __size-- > 0; ) 20472: if (traits_type::eq(_M_data()[__size], __c)) 20472: return __size; 20472: } 20472: return npos; 20472: } 20472: 20472: template 20472: typename basic_string<_CharT, _Traits, _Alloc>::size_type 20472: basic_string<_CharT, _Traits, _Alloc>:: 20472: find_first_of(const _CharT* __s, size_type __pos, size_type __n) const 20472: noexcept 20472: { 20472: ; 20472: for (; __n && __pos < this->size(); ++__pos) 20472: { 20472: const _CharT* __p = traits_type::find(__s, __n, _M_data()[__pos]); 20472: if (__p) 20472: return __pos; 20472: } 20472: return npos; 20472: } 20472: 20472: template 20472: typename basic_string<_CharT, _Traits, _Alloc>::size_type 20472: basic_string<_CharT, _Traits, _Alloc>:: 20472: find_last_of(const _CharT* __s, size_type __pos, size_type __n) const 20472: noexcept 20472: { 20472: ; 20472: size_type __size = this->size(); 20472: if (__size && __n) 20472: { 20472: if (--__size > __pos) 20472: __size = __pos; 20472: do 20472: { 20472: if (traits_type::find(__s, __n, _M_data()[__size])) 20472: return __size; 20472: } 20472: while (__size-- != 0); 20472: } 20472: return npos; 20472: } 20472: 20472: template 20472: typename basic_string<_CharT, _Traits, _Alloc>::size_type 20472: basic_string<_CharT, _Traits, _Alloc>:: 20472: find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const 20472: noexcept 20472: { 20472: ; 20472: for (; __pos < this->size(); ++__pos) 20472: if (!traits_type::find(__s, __n, _M_data()[__pos])) 20472: return __pos; 20472: return npos; 20472: } 20472: 20472: template 20472: typename basic_string<_CharT, _Traits, _Alloc>::size_type 20472: basic_string<_CharT, _Traits, _Alloc>:: 20472: find_first_not_of(_CharT __c, size_type __pos) const noexcept 20472: { 20472: for (; __pos < this->size(); ++__pos) 20472: if (!traits_type::eq(_M_data()[__pos], __c)) 20472: return __pos; 20472: return npos; 20472: } 20472: 20472: template 20472: typename basic_string<_CharT, _Traits, _Alloc>::size_type 20472: basic_string<_CharT, _Traits, _Alloc>:: 20472: find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const 20472: noexcept 20472: { 20472: ; 20472: size_type __size = this->size(); 20472: if (__size) 20472: { 20472: if (--__size > __pos) 20472: __size = __pos; 20472: do 20472: { 20472: if (!traits_type::find(__s, __n, _M_data()[__size])) 20472: return __size; 20472: } 20472: while (__size--); 20472: } 20472: return npos; 20472: } 20472: 20472: template 20472: typename basic_string<_CharT, _Traits, _Alloc>::size_type 20472: basic_string<_CharT, _Traits, _Alloc>:: 20472: find_last_not_of(_CharT __c, size_type __pos) const noexcept 20472: { 20472: size_type __size = this->size(); 20472: if (__size) 20472: { 20472: if (--__size > __pos) 20472: __size = __pos; 20472: do 20472: { 20472: if (!traits_type::eq(_M_data()[__size], __c)) 20472: return __size; 20472: } 20472: while (__size--); 20472: } 20472: return npos; 20472: } 20472: 20472: template 20472: int 20472: basic_string<_CharT, _Traits, _Alloc>:: 20472: compare(size_type __pos, size_type __n, const basic_string& __str) const 20472: { 20472: _M_check(__pos, "basic_string::compare"); 20472: __n = _M_limit(__pos, __n); 20472: const size_type __osize = __str.size(); 20472: const size_type __len = std::min(__n, __osize); 20472: int __r = traits_type::compare(_M_data() + __pos, __str.data(), __len); 20472: if (!__r) 20472: __r = _S_compare(__n, __osize); 20472: return __r; 20472: } 20472: 20472: template 20472: int 20472: basic_string<_CharT, _Traits, _Alloc>:: 20472: compare(size_type __pos1, size_type __n1, const basic_string& __str, 20472: size_type __pos2, size_type __n2) const 20472: { 20472: _M_check(__pos1, "basic_string::compare"); 20472: __str._M_check(__pos2, "basic_string::compare"); 20472: __n1 = _M_limit(__pos1, __n1); 20472: __n2 = __str._M_limit(__pos2, __n2); 20472: const size_type __len = std::min(__n1, __n2); 20472: int __r = traits_type::compare(_M_data() + __pos1, 20472: __str.data() + __pos2, __len); 20472: if (!__r) 20472: __r = _S_compare(__n1, __n2); 20472: return __r; 20472: } 20472: 20472: template 20472: int 20472: basic_string<_CharT, _Traits, _Alloc>:: 20472: compare(const _CharT* __s) const noexcept 20472: { 20472: ; 20472: const size_type __size = this->size(); 20472: const size_type __osize = traits_type::length(__s); 20472: const size_type __len = std::min(__size, __osize); 20472: int __r = traits_type::compare(_M_data(), __s, __len); 20472: if (!__r) 20472: __r = _S_compare(__size, __osize); 20472: return __r; 20472: } 20472: 20472: template 20472: int 20472: basic_string <_CharT, _Traits, _Alloc>:: 20472: compare(size_type __pos, size_type __n1, const _CharT* __s) const 20472: { 20472: ; 20472: _M_check(__pos, "basic_string::compare"); 20472: __n1 = _M_limit(__pos, __n1); 20472: const size_type __osize = traits_type::length(__s); 20472: const size_type __len = std::min(__n1, __osize); 20472: int __r = traits_type::compare(_M_data() + __pos, __s, __len); 20472: if (!__r) 20472: __r = _S_compare(__n1, __osize); 20472: return __r; 20472: } 20472: 20472: template 20472: int 20472: basic_string <_CharT, _Traits, _Alloc>:: 20472: compare(size_type __pos, size_type __n1, const _CharT* __s, 20472: size_type __n2) const 20472: { 20472: ; 20472: _M_check(__pos, "basic_string::compare"); 20472: __n1 = _M_limit(__pos, __n1); 20472: const size_type __len = std::min(__n1, __n2); 20472: int __r = traits_type::compare(_M_data() + __pos, __s, __len); 20472: if (!__r) 20472: __r = _S_compare(__n1, __n2); 20472: return __r; 20472: } 20472: 20472: 20472: template 20472: basic_istream<_CharT, _Traits>& 20472: operator>>(basic_istream<_CharT, _Traits>& __in, 20472: basic_string<_CharT, _Traits, _Alloc>& __str) 20472: { 20472: typedef basic_istream<_CharT, _Traits> __istream_type; 20472: typedef basic_string<_CharT, _Traits, _Alloc> __string_type; 20472: typedef typename __istream_type::ios_base __ios_base; 20472: typedef typename __istream_type::int_type __int_type; 20472: typedef typename __string_type::size_type __size_type; 20472: typedef ctype<_CharT> __ctype_type; 20472: typedef typename __ctype_type::ctype_base __ctype_base; 20472: 20472: __size_type __extracted = 0; 20472: typename __ios_base::iostate __err = __ios_base::goodbit; 20472: typename __istream_type::sentry __cerb(__in, false); 20472: if (__cerb) 20472: { 20472: try 20472: { 20472: 20472: __str.erase(); 20472: _CharT __buf[128]; 20472: __size_type __len = 0; 20472: const streamsize __w = __in.width(); 20472: const __size_type __n = __w > 0 ? static_cast<__size_type>(__w) 20472: : __str.max_size(); 20472: const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); 20472: const __int_type __eof = _Traits::eof(); 20472: __int_type __c = __in.rdbuf()->sgetc(); 20472: 20472: while (__extracted < __n 20472: && !_Traits::eq_int_type(__c, __eof) 20472: && !__ct.is(__ctype_base::space, 20472: _Traits::to_char_type(__c))) 20472: { 20472: if (__len == sizeof(__buf) / sizeof(_CharT)) 20472: { 20472: __str.append(__buf, sizeof(__buf) / sizeof(_CharT)); 20472: __len = 0; 20472: } 20472: __buf[__len++] = _Traits::to_char_type(__c); 20472: ++__extracted; 20472: __c = __in.rdbuf()->snextc(); 20472: } 20472: __str.append(__buf, __len); 20472: 20472: if (_Traits::eq_int_type(__c, __eof)) 20472: __err |= __ios_base::eofbit; 20472: __in.width(0); 20472: } 20472: catch(__cxxabiv1::__forced_unwind&) 20472: { 20472: __in._M_setstate(__ios_base::badbit); 20472: throw; 20472: } 20472: catch(...) 20472: { 20472: 20472: 20472: 20472: __in._M_setstate(__ios_base::badbit); 20472: } 20472: } 20472: 20472: if (!__extracted) 20472: __err |= __ios_base::failbit; 20472: if (__err) 20472: __in.setstate(__err); 20472: return __in; 20472: } 20472: 20472: template 20472: basic_istream<_CharT, _Traits>& 20472: getline(basic_istream<_CharT, _Traits>& __in, 20472: basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim) 20472: { 20472: typedef basic_istream<_CharT, _Traits> __istream_type; 20472: typedef basic_string<_CharT, _Traits, _Alloc> __string_type; 20472: typedef typename __istream_type::ios_base __ios_base; 20472: typedef typename __istream_type::int_type __int_type; 20472: typedef typename __string_type::size_type __size_type; 20472: 20472: __size_type __extracted = 0; 20472: const __size_type __n = __str.max_size(); 20472: typename __ios_base::iostate __err = __ios_base::goodbit; 20472: typename __istream_type::sentry __cerb(__in, true); 20472: if (__cerb) 20472: { 20472: try 20472: { 20472: __str.erase(); 20472: const __int_type __idelim = _Traits::to_int_type(__delim); 20472: const __int_type __eof = _Traits::eof(); 20472: __int_type __c = __in.rdbuf()->sgetc(); 20472: 20472: while (__extracted < __n 20472: && !_Traits::eq_int_type(__c, __eof) 20472: && !_Traits::eq_int_type(__c, __idelim)) 20472: { 20472: __str += _Traits::to_char_type(__c); 20472: ++__extracted; 20472: __c = __in.rdbuf()->snextc(); 20472: } 20472: 20472: if (_Traits::eq_int_type(__c, __eof)) 20472: __err |= __ios_base::eofbit; 20472: else if (_Traits::eq_int_type(__c, __idelim)) 20472: { 20472: ++__extracted; 20472: __in.rdbuf()->sbumpc(); 20472: } 20472: else 20472: __err |= __ios_base::failbit; 20472: } 20472: catch(__cxxabiv1::__forced_unwind&) 20472: { 20472: __in._M_setstate(__ios_base::badbit); 20472: throw; 20472: } 20472: catch(...) 20472: { 20472: 20472: 20472: 20472: __in._M_setstate(__ios_base::badbit); 20472: } 20472: } 20472: if (!__extracted) 20472: __err |= __ios_base::failbit; 20472: if (__err) 20472: __in.setstate(__err); 20472: return __in; 20472: } 20472: # 1610 "/usr/include/c++/10/bits/basic_string.tcc" 3 20472: extern template class basic_string; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern template 20472: basic_istream& 20472: operator>>(basic_istream&, string&); 20472: extern template 20472: basic_ostream& 20472: operator<<(basic_ostream&, const string&); 20472: extern template 20472: basic_istream& 20472: getline(basic_istream&, string&, char); 20472: extern template 20472: basic_istream& 20472: getline(basic_istream&, string&); 20472: 20472: 20472: 20472: extern template class basic_string; 20472: 20472: 20472: 20472: 20472: 20472: extern template 20472: basic_istream& 20472: operator>>(basic_istream&, wstring&); 20472: extern template 20472: basic_ostream& 20472: operator<<(basic_ostream&, const wstring&); 20472: extern template 20472: basic_istream& 20472: getline(basic_istream&, wstring&, wchar_t); 20472: extern template 20472: basic_istream& 20472: getline(basic_istream&, wstring&); 20472: 20472: 20472: 20472: 20472: } 20472: # 57 "/usr/include/c++/10/string" 2 3 20472: # 16 "./db/memtable.h" 2 20472: # 1 "/usr/include/c++/10/unordered_map" 1 3 20472: # 32 "/usr/include/c++/10/unordered_map" 3 20472: 20472: # 33 "/usr/include/c++/10/unordered_map" 3 20472: # 46 "/usr/include/c++/10/unordered_map" 3 20472: # 1 "/usr/include/c++/10/bits/hashtable.h" 1 3 20472: # 33 "/usr/include/c++/10/bits/hashtable.h" 3 20472: 20472: # 34 "/usr/include/c++/10/bits/hashtable.h" 3 20472: 20472: # 1 "/usr/include/c++/10/bits/hashtable_policy.h" 1 3 20472: # 35 "/usr/include/c++/10/bits/hashtable_policy.h" 3 20472: # 1 "/usr/include/c++/10/limits" 1 3 20472: # 40 "/usr/include/c++/10/limits" 3 20472: 20472: # 41 "/usr/include/c++/10/limits" 3 20472: # 158 "/usr/include/c++/10/limits" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: enum float_round_style 20472: { 20472: round_indeterminate = -1, 20472: round_toward_zero = 0, 20472: round_to_nearest = 1, 20472: round_toward_infinity = 2, 20472: round_toward_neg_infinity = 3 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: enum float_denorm_style 20472: { 20472: 20472: denorm_indeterminate = -1, 20472: 20472: denorm_absent = 0, 20472: 20472: denorm_present = 1 20472: }; 20472: # 202 "/usr/include/c++/10/limits" 3 20472: struct __numeric_limits_base 20472: { 20472: 20472: 20472: static constexpr bool is_specialized = false; 20472: 20472: 20472: 20472: 20472: static constexpr int digits = 0; 20472: 20472: 20472: static constexpr int digits10 = 0; 20472: 20472: 20472: 20472: 20472: static constexpr int max_digits10 = 0; 20472: 20472: 20472: 20472: static constexpr bool is_signed = false; 20472: 20472: 20472: static constexpr bool is_integer = false; 20472: 20472: 20472: 20472: 20472: static constexpr bool is_exact = false; 20472: 20472: 20472: 20472: static constexpr int radix = 0; 20472: 20472: 20472: 20472: static constexpr int min_exponent = 0; 20472: 20472: 20472: 20472: static constexpr int min_exponent10 = 0; 20472: 20472: 20472: 20472: 20472: static constexpr int max_exponent = 0; 20472: 20472: 20472: 20472: static constexpr int max_exponent10 = 0; 20472: 20472: 20472: static constexpr bool has_infinity = false; 20472: 20472: 20472: 20472: static constexpr bool has_quiet_NaN = false; 20472: 20472: 20472: 20472: static constexpr bool has_signaling_NaN = false; 20472: 20472: 20472: static constexpr float_denorm_style has_denorm = denorm_absent; 20472: 20472: 20472: 20472: static constexpr bool has_denorm_loss = false; 20472: 20472: 20472: 20472: static constexpr bool is_iec559 = false; 20472: 20472: 20472: 20472: 20472: static constexpr bool is_bounded = false; 20472: # 288 "/usr/include/c++/10/limits" 3 20472: static constexpr bool is_modulo = false; 20472: 20472: 20472: static constexpr bool traps = false; 20472: 20472: 20472: static constexpr bool tinyness_before = false; 20472: 20472: 20472: 20472: 20472: static constexpr float_round_style round_style = 20472: round_toward_zero; 20472: }; 20472: # 311 "/usr/include/c++/10/limits" 3 20472: template 20472: struct numeric_limits : public __numeric_limits_base 20472: { 20472: 20472: 20472: static constexpr _Tp 20472: min() noexcept { return _Tp(); } 20472: 20472: 20472: static constexpr _Tp 20472: max() noexcept { return _Tp(); } 20472: 20472: 20472: 20472: 20472: static constexpr _Tp 20472: lowest() noexcept { return _Tp(); } 20472: 20472: 20472: 20472: 20472: static constexpr _Tp 20472: epsilon() noexcept { return _Tp(); } 20472: 20472: 20472: static constexpr _Tp 20472: round_error() noexcept { return _Tp(); } 20472: 20472: 20472: static constexpr _Tp 20472: infinity() noexcept { return _Tp(); } 20472: 20472: 20472: 20472: static constexpr _Tp 20472: quiet_NaN() noexcept { return _Tp(); } 20472: 20472: 20472: 20472: static constexpr _Tp 20472: signaling_NaN() noexcept { return _Tp(); } 20472: 20472: 20472: 20472: 20472: static constexpr _Tp 20472: denorm_min() noexcept { return _Tp(); } 20472: }; 20472: 20472: 20472: 20472: 20472: template 20472: struct numeric_limits 20472: : public numeric_limits<_Tp> { }; 20472: 20472: template 20472: struct numeric_limits 20472: : public numeric_limits<_Tp> { }; 20472: 20472: template 20472: struct numeric_limits 20472: : public numeric_limits<_Tp> { }; 20472: # 383 "/usr/include/c++/10/limits" 3 20472: template<> 20472: struct numeric_limits 20472: { 20472: static constexpr bool is_specialized = true; 20472: 20472: static constexpr bool 20472: min() noexcept { return false; } 20472: 20472: static constexpr bool 20472: max() noexcept { return true; } 20472: 20472: 20472: static constexpr bool 20472: lowest() noexcept { return min(); } 20472: 20472: static constexpr int digits = 1; 20472: static constexpr int digits10 = 0; 20472: 20472: static constexpr int max_digits10 = 0; 20472: 20472: static constexpr bool is_signed = false; 20472: static constexpr bool is_integer = true; 20472: static constexpr bool is_exact = true; 20472: static constexpr int radix = 2; 20472: 20472: static constexpr bool 20472: epsilon() noexcept { return false; } 20472: 20472: static constexpr bool 20472: round_error() noexcept { return false; } 20472: 20472: static constexpr int min_exponent = 0; 20472: static constexpr int min_exponent10 = 0; 20472: static constexpr int max_exponent = 0; 20472: static constexpr int max_exponent10 = 0; 20472: 20472: static constexpr bool has_infinity = false; 20472: static constexpr bool has_quiet_NaN = false; 20472: static constexpr bool has_signaling_NaN = false; 20472: static constexpr float_denorm_style has_denorm 20472: = denorm_absent; 20472: static constexpr bool has_denorm_loss = false; 20472: 20472: static constexpr bool 20472: infinity() noexcept { return false; } 20472: 20472: static constexpr bool 20472: quiet_NaN() noexcept { return false; } 20472: 20472: static constexpr bool 20472: signaling_NaN() noexcept { return false; } 20472: 20472: static constexpr bool 20472: denorm_min() noexcept { return false; } 20472: 20472: static constexpr bool is_iec559 = false; 20472: static constexpr bool is_bounded = true; 20472: static constexpr bool is_modulo = false; 20472: 20472: 20472: 20472: 20472: static constexpr bool traps = false; 20472: static constexpr bool tinyness_before = false; 20472: static constexpr float_round_style round_style 20472: = round_toward_zero; 20472: }; 20472: 20472: 20472: template<> 20472: struct numeric_limits 20472: { 20472: static constexpr bool is_specialized = true; 20472: 20472: static constexpr char 20472: 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); } 20472: 20472: static constexpr char 20472: max() noexcept { return (((char)(-1) < 0) ? (((((char)1 << ((sizeof(char) * 8 - ((char)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char)0); } 20472: 20472: 20472: static constexpr char 20472: lowest() noexcept { return min(); } 20472: 20472: 20472: static constexpr int digits = (sizeof(char) * 8 - ((char)(-1) < 0)); 20472: static constexpr int digits10 = ((sizeof(char) * 8 - ((char)(-1) < 0)) * 643L / 2136); 20472: 20472: static constexpr int max_digits10 = 0; 20472: 20472: static constexpr bool is_signed = ((char)(-1) < 0); 20472: static constexpr bool is_integer = true; 20472: static constexpr bool is_exact = true; 20472: static constexpr int radix = 2; 20472: 20472: static constexpr char 20472: epsilon() noexcept { return 0; } 20472: 20472: static constexpr char 20472: round_error() noexcept { return 0; } 20472: 20472: static constexpr int min_exponent = 0; 20472: static constexpr int min_exponent10 = 0; 20472: static constexpr int max_exponent = 0; 20472: static constexpr int max_exponent10 = 0; 20472: 20472: static constexpr bool has_infinity = false; 20472: static constexpr bool has_quiet_NaN = false; 20472: static constexpr bool has_signaling_NaN = false; 20472: static constexpr float_denorm_style has_denorm 20472: = denorm_absent; 20472: static constexpr bool has_denorm_loss = false; 20472: 20472: static constexpr 20472: char infinity() noexcept { return char(); } 20472: 20472: static constexpr char 20472: quiet_NaN() noexcept { return char(); } 20472: 20472: static constexpr char 20472: signaling_NaN() noexcept { return char(); } 20472: 20472: static constexpr char 20472: denorm_min() noexcept { return static_cast(0); } 20472: 20472: static constexpr bool is_iec559 = false; 20472: static constexpr bool is_bounded = true; 20472: static constexpr bool is_modulo = !is_signed; 20472: 20472: static constexpr bool traps = false; 20472: static constexpr bool tinyness_before = false; 20472: static constexpr float_round_style round_style 20472: = round_toward_zero; 20472: }; 20472: 20472: 20472: template<> 20472: struct numeric_limits 20472: { 20472: static constexpr bool is_specialized = true; 20472: 20472: static constexpr signed char 20472: min() noexcept { return -0x7f - 1; } 20472: 20472: static constexpr signed char 20472: max() noexcept { return 0x7f; } 20472: 20472: 20472: static constexpr signed char 20472: lowest() noexcept { return min(); } 20472: 20472: 20472: static constexpr int digits = (sizeof(signed char) * 8 - ((signed char)(-1) < 0)); 20472: static constexpr int digits10 20472: = ((sizeof(signed char) * 8 - ((signed char)(-1) < 0)) * 643L / 2136); 20472: 20472: static constexpr int max_digits10 = 0; 20472: 20472: static constexpr bool is_signed = true; 20472: static constexpr bool is_integer = true; 20472: static constexpr bool is_exact = true; 20472: static constexpr int radix = 2; 20472: 20472: static constexpr signed char 20472: epsilon() noexcept { return 0; } 20472: 20472: static constexpr signed char 20472: round_error() noexcept { return 0; } 20472: 20472: static constexpr int min_exponent = 0; 20472: static constexpr int min_exponent10 = 0; 20472: static constexpr int max_exponent = 0; 20472: static constexpr int max_exponent10 = 0; 20472: 20472: static constexpr bool has_infinity = false; 20472: static constexpr bool has_quiet_NaN = false; 20472: static constexpr bool has_signaling_NaN = false; 20472: static constexpr float_denorm_style has_denorm 20472: = denorm_absent; 20472: static constexpr bool has_denorm_loss = false; 20472: 20472: static constexpr signed char 20472: infinity() noexcept { return static_cast(0); } 20472: 20472: static constexpr signed char 20472: quiet_NaN() noexcept { return static_cast(0); } 20472: 20472: static constexpr signed char 20472: signaling_NaN() noexcept 20472: { return static_cast(0); } 20472: 20472: static constexpr signed char 20472: denorm_min() noexcept 20472: { return static_cast(0); } 20472: 20472: static constexpr bool is_iec559 = false; 20472: static constexpr bool is_bounded = true; 20472: static constexpr bool is_modulo = false; 20472: 20472: static constexpr bool traps = false; 20472: static constexpr bool tinyness_before = false; 20472: static constexpr float_round_style round_style 20472: = round_toward_zero; 20472: }; 20472: 20472: 20472: template<> 20472: struct numeric_limits 20472: { 20472: static constexpr bool is_specialized = true; 20472: 20472: static constexpr unsigned char 20472: min() noexcept { return 0; } 20472: 20472: static constexpr unsigned char 20472: max() noexcept { return 0x7f * 2U + 1; } 20472: 20472: 20472: static constexpr unsigned char 20472: lowest() noexcept { return min(); } 20472: 20472: 20472: static constexpr int digits 20472: = (sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0)); 20472: static constexpr int digits10 20472: = ((sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0)) * 643L / 2136); 20472: 20472: static constexpr int max_digits10 = 0; 20472: 20472: static constexpr bool is_signed = false; 20472: static constexpr bool is_integer = true; 20472: static constexpr bool is_exact = true; 20472: static constexpr int radix = 2; 20472: 20472: static constexpr unsigned char 20472: epsilon() noexcept { return 0; } 20472: 20472: static constexpr unsigned char 20472: round_error() noexcept { return 0; } 20472: 20472: static constexpr int min_exponent = 0; 20472: static constexpr int min_exponent10 = 0; 20472: static constexpr int max_exponent = 0; 20472: static constexpr int max_exponent10 = 0; 20472: 20472: static constexpr bool has_infinity = false; 20472: static constexpr bool has_quiet_NaN = false; 20472: static constexpr bool has_signaling_NaN = false; 20472: static constexpr float_denorm_style has_denorm 20472: = denorm_absent; 20472: static constexpr bool has_denorm_loss = false; 20472: 20472: static constexpr unsigned char 20472: infinity() noexcept 20472: { return static_cast(0); } 20472: 20472: static constexpr unsigned char 20472: quiet_NaN() noexcept 20472: { return static_cast(0); } 20472: 20472: static constexpr unsigned char 20472: signaling_NaN() noexcept 20472: { return static_cast(0); } 20472: 20472: static constexpr unsigned char 20472: denorm_min() noexcept 20472: { return static_cast(0); } 20472: 20472: static constexpr bool is_iec559 = false; 20472: static constexpr bool is_bounded = true; 20472: static constexpr bool is_modulo = true; 20472: 20472: static constexpr bool traps = false; 20472: static constexpr bool tinyness_before = false; 20472: static constexpr float_round_style round_style 20472: = round_toward_zero; 20472: }; 20472: 20472: 20472: template<> 20472: struct numeric_limits 20472: { 20472: static constexpr bool is_specialized = true; 20472: 20472: static constexpr wchar_t 20472: 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); } 20472: 20472: static constexpr wchar_t 20472: 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); } 20472: 20472: 20472: static constexpr wchar_t 20472: lowest() noexcept { return min(); } 20472: 20472: 20472: static constexpr int digits = (sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)); 20472: static constexpr int digits10 20472: = ((sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) * 643L / 2136); 20472: 20472: static constexpr int max_digits10 = 0; 20472: 20472: static constexpr bool is_signed = ((wchar_t)(-1) < 0); 20472: static constexpr bool is_integer = true; 20472: static constexpr bool is_exact = true; 20472: static constexpr int radix = 2; 20472: 20472: static constexpr wchar_t 20472: epsilon() noexcept { return 0; } 20472: 20472: static constexpr wchar_t 20472: round_error() noexcept { return 0; } 20472: 20472: static constexpr int min_exponent = 0; 20472: static constexpr int min_exponent10 = 0; 20472: static constexpr int max_exponent = 0; 20472: static constexpr int max_exponent10 = 0; 20472: 20472: static constexpr bool has_infinity = false; 20472: static constexpr bool has_quiet_NaN = false; 20472: static constexpr bool has_signaling_NaN = false; 20472: static constexpr float_denorm_style has_denorm 20472: = denorm_absent; 20472: static constexpr bool has_denorm_loss = false; 20472: 20472: static constexpr wchar_t 20472: infinity() noexcept { return wchar_t(); } 20472: 20472: static constexpr wchar_t 20472: quiet_NaN() noexcept { return wchar_t(); } 20472: 20472: static constexpr wchar_t 20472: signaling_NaN() noexcept { return wchar_t(); } 20472: 20472: static constexpr wchar_t 20472: denorm_min() noexcept { return wchar_t(); } 20472: 20472: static constexpr bool is_iec559 = false; 20472: static constexpr bool is_bounded = true; 20472: static constexpr bool is_modulo = !is_signed; 20472: 20472: static constexpr bool traps = false; 20472: static constexpr bool tinyness_before = false; 20472: static constexpr float_round_style round_style 20472: = round_toward_zero; 20472: }; 20472: # 796 "/usr/include/c++/10/limits" 3 20472: template<> 20472: struct numeric_limits 20472: { 20472: static constexpr bool is_specialized = true; 20472: 20472: static constexpr char16_t 20472: 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); } 20472: 20472: static constexpr char16_t 20472: 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); } 20472: 20472: static constexpr char16_t 20472: lowest() noexcept { return min(); } 20472: 20472: static constexpr int digits = (sizeof(char16_t) * 8 - ((char16_t)(-1) < 0)); 20472: static constexpr int digits10 = ((sizeof(char16_t) * 8 - ((char16_t)(-1) < 0)) * 643L / 2136); 20472: static constexpr int max_digits10 = 0; 20472: static constexpr bool is_signed = ((char16_t)(-1) < 0); 20472: static constexpr bool is_integer = true; 20472: static constexpr bool is_exact = true; 20472: static constexpr int radix = 2; 20472: 20472: static constexpr char16_t 20472: epsilon() noexcept { return 0; } 20472: 20472: static constexpr char16_t 20472: round_error() noexcept { return 0; } 20472: 20472: static constexpr int min_exponent = 0; 20472: static constexpr int min_exponent10 = 0; 20472: static constexpr int max_exponent = 0; 20472: static constexpr int max_exponent10 = 0; 20472: 20472: static constexpr bool has_infinity = false; 20472: static constexpr bool has_quiet_NaN = false; 20472: static constexpr bool has_signaling_NaN = false; 20472: static constexpr float_denorm_style has_denorm = denorm_absent; 20472: static constexpr bool has_denorm_loss = false; 20472: 20472: static constexpr char16_t 20472: infinity() noexcept { return char16_t(); } 20472: 20472: static constexpr char16_t 20472: quiet_NaN() noexcept { return char16_t(); } 20472: 20472: static constexpr char16_t 20472: signaling_NaN() noexcept { return char16_t(); } 20472: 20472: static constexpr char16_t 20472: denorm_min() noexcept { return char16_t(); } 20472: 20472: static constexpr bool is_iec559 = false; 20472: static constexpr bool is_bounded = true; 20472: static constexpr bool is_modulo = !is_signed; 20472: 20472: static constexpr bool traps = false; 20472: static constexpr bool tinyness_before = false; 20472: static constexpr float_round_style round_style = round_toward_zero; 20472: }; 20472: 20472: 20472: template<> 20472: struct numeric_limits 20472: { 20472: static constexpr bool is_specialized = true; 20472: 20472: static constexpr char32_t 20472: 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); } 20472: 20472: static constexpr char32_t 20472: 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); } 20472: 20472: static constexpr char32_t 20472: lowest() noexcept { return min(); } 20472: 20472: static constexpr int digits = (sizeof(char32_t) * 8 - ((char32_t)(-1) < 0)); 20472: static constexpr int digits10 = ((sizeof(char32_t) * 8 - ((char32_t)(-1) < 0)) * 643L / 2136); 20472: static constexpr int max_digits10 = 0; 20472: static constexpr bool is_signed = ((char32_t)(-1) < 0); 20472: static constexpr bool is_integer = true; 20472: static constexpr bool is_exact = true; 20472: static constexpr int radix = 2; 20472: 20472: static constexpr char32_t 20472: epsilon() noexcept { return 0; } 20472: 20472: static constexpr char32_t 20472: round_error() noexcept { return 0; } 20472: 20472: static constexpr int min_exponent = 0; 20472: static constexpr int min_exponent10 = 0; 20472: static constexpr int max_exponent = 0; 20472: static constexpr int max_exponent10 = 0; 20472: 20472: static constexpr bool has_infinity = false; 20472: static constexpr bool has_quiet_NaN = false; 20472: static constexpr bool has_signaling_NaN = false; 20472: static constexpr float_denorm_style has_denorm = denorm_absent; 20472: static constexpr bool has_denorm_loss = false; 20472: 20472: static constexpr char32_t 20472: infinity() noexcept { return char32_t(); } 20472: 20472: static constexpr char32_t 20472: quiet_NaN() noexcept { return char32_t(); } 20472: 20472: static constexpr char32_t 20472: signaling_NaN() noexcept { return char32_t(); } 20472: 20472: static constexpr char32_t 20472: denorm_min() noexcept { return char32_t(); } 20472: 20472: static constexpr bool is_iec559 = false; 20472: static constexpr bool is_bounded = true; 20472: static constexpr bool is_modulo = !is_signed; 20472: 20472: static constexpr bool traps = false; 20472: static constexpr bool tinyness_before = false; 20472: static constexpr float_round_style round_style = round_toward_zero; 20472: }; 20472: 20472: 20472: 20472: template<> 20472: struct numeric_limits 20472: { 20472: static constexpr bool is_specialized = true; 20472: 20472: static constexpr short 20472: min() noexcept { return -0x7fff - 1; } 20472: 20472: static constexpr short 20472: max() noexcept { return 0x7fff; } 20472: 20472: 20472: static constexpr short 20472: lowest() noexcept { return min(); } 20472: 20472: 20472: static constexpr int digits = (sizeof(short) * 8 - ((short)(-1) < 0)); 20472: static constexpr int digits10 = ((sizeof(short) * 8 - ((short)(-1) < 0)) * 643L / 2136); 20472: 20472: static constexpr int max_digits10 = 0; 20472: 20472: static constexpr bool is_signed = true; 20472: static constexpr bool is_integer = true; 20472: static constexpr bool is_exact = true; 20472: static constexpr int radix = 2; 20472: 20472: static constexpr short 20472: epsilon() noexcept { return 0; } 20472: 20472: static constexpr short 20472: round_error() noexcept { return 0; } 20472: 20472: static constexpr int min_exponent = 0; 20472: static constexpr int min_exponent10 = 0; 20472: static constexpr int max_exponent = 0; 20472: static constexpr int max_exponent10 = 0; 20472: 20472: static constexpr bool has_infinity = false; 20472: static constexpr bool has_quiet_NaN = false; 20472: static constexpr bool has_signaling_NaN = false; 20472: static constexpr float_denorm_style has_denorm 20472: = denorm_absent; 20472: static constexpr bool has_denorm_loss = false; 20472: 20472: static constexpr short 20472: infinity() noexcept { return short(); } 20472: 20472: static constexpr short 20472: quiet_NaN() noexcept { return short(); } 20472: 20472: static constexpr short 20472: signaling_NaN() noexcept { return short(); } 20472: 20472: static constexpr short 20472: denorm_min() noexcept { return short(); } 20472: 20472: static constexpr bool is_iec559 = false; 20472: static constexpr bool is_bounded = true; 20472: static constexpr bool is_modulo = false; 20472: 20472: static constexpr bool traps = false; 20472: static constexpr bool tinyness_before = false; 20472: static constexpr float_round_style round_style 20472: = round_toward_zero; 20472: }; 20472: 20472: 20472: template<> 20472: struct numeric_limits 20472: { 20472: static constexpr bool is_specialized = true; 20472: 20472: static constexpr unsigned short 20472: min() noexcept { return 0; } 20472: 20472: static constexpr unsigned short 20472: max() noexcept { return 0x7fff * 2U + 1; } 20472: 20472: 20472: static constexpr unsigned short 20472: lowest() noexcept { return min(); } 20472: 20472: 20472: static constexpr int digits 20472: = (sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0)); 20472: static constexpr int digits10 20472: = ((sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0)) * 643L / 2136); 20472: 20472: static constexpr int max_digits10 = 0; 20472: 20472: static constexpr bool is_signed = false; 20472: static constexpr bool is_integer = true; 20472: static constexpr bool is_exact = true; 20472: static constexpr int radix = 2; 20472: 20472: static constexpr unsigned short 20472: epsilon() noexcept { return 0; } 20472: 20472: static constexpr unsigned short 20472: round_error() noexcept { return 0; } 20472: 20472: static constexpr int min_exponent = 0; 20472: static constexpr int min_exponent10 = 0; 20472: static constexpr int max_exponent = 0; 20472: static constexpr int max_exponent10 = 0; 20472: 20472: static constexpr bool has_infinity = false; 20472: static constexpr bool has_quiet_NaN = false; 20472: static constexpr bool has_signaling_NaN = false; 20472: static constexpr float_denorm_style has_denorm 20472: = denorm_absent; 20472: static constexpr bool has_denorm_loss = false; 20472: 20472: static constexpr unsigned short 20472: infinity() noexcept 20472: { return static_cast(0); } 20472: 20472: static constexpr unsigned short 20472: quiet_NaN() noexcept 20472: { return static_cast(0); } 20472: 20472: static constexpr unsigned short 20472: signaling_NaN() noexcept 20472: { return static_cast(0); } 20472: 20472: static constexpr unsigned short 20472: denorm_min() noexcept 20472: { return static_cast(0); } 20472: 20472: static constexpr bool is_iec559 = false; 20472: static constexpr bool is_bounded = true; 20472: static constexpr bool is_modulo = true; 20472: 20472: static constexpr bool traps = false; 20472: static constexpr bool tinyness_before = false; 20472: static constexpr float_round_style round_style 20472: = round_toward_zero; 20472: }; 20472: 20472: 20472: template<> 20472: struct numeric_limits 20472: { 20472: static constexpr bool is_specialized = true; 20472: 20472: static constexpr int 20472: min() noexcept { return -0x7fffffff - 1; } 20472: 20472: static constexpr int 20472: max() noexcept { return 0x7fffffff; } 20472: 20472: 20472: static constexpr int 20472: lowest() noexcept { return min(); } 20472: 20472: 20472: static constexpr int digits = (sizeof(int) * 8 - ((int)(-1) < 0)); 20472: static constexpr int digits10 = ((sizeof(int) * 8 - ((int)(-1) < 0)) * 643L / 2136); 20472: 20472: static constexpr int max_digits10 = 0; 20472: 20472: static constexpr bool is_signed = true; 20472: static constexpr bool is_integer = true; 20472: static constexpr bool is_exact = true; 20472: static constexpr int radix = 2; 20472: 20472: static constexpr int 20472: epsilon() noexcept { return 0; } 20472: 20472: static constexpr int 20472: round_error() noexcept { return 0; } 20472: 20472: static constexpr int min_exponent = 0; 20472: static constexpr int min_exponent10 = 0; 20472: static constexpr int max_exponent = 0; 20472: static constexpr int max_exponent10 = 0; 20472: 20472: static constexpr bool has_infinity = false; 20472: static constexpr bool has_quiet_NaN = false; 20472: static constexpr bool has_signaling_NaN = false; 20472: static constexpr float_denorm_style has_denorm 20472: = denorm_absent; 20472: static constexpr bool has_denorm_loss = false; 20472: 20472: static constexpr int 20472: infinity() noexcept { return static_cast(0); } 20472: 20472: static constexpr int 20472: quiet_NaN() noexcept { return static_cast(0); } 20472: 20472: static constexpr int 20472: signaling_NaN() noexcept { return static_cast(0); } 20472: 20472: static constexpr int 20472: denorm_min() noexcept { return static_cast(0); } 20472: 20472: static constexpr bool is_iec559 = false; 20472: static constexpr bool is_bounded = true; 20472: static constexpr bool is_modulo = false; 20472: 20472: static constexpr bool traps = false; 20472: static constexpr bool tinyness_before = false; 20472: static constexpr float_round_style round_style 20472: = round_toward_zero; 20472: }; 20472: 20472: 20472: template<> 20472: struct numeric_limits 20472: { 20472: static constexpr bool is_specialized = true; 20472: 20472: static constexpr unsigned int 20472: min() noexcept { return 0; } 20472: 20472: static constexpr unsigned int 20472: max() noexcept { return 0x7fffffff * 2U + 1; } 20472: 20472: 20472: static constexpr unsigned int 20472: lowest() noexcept { return min(); } 20472: 20472: 20472: static constexpr int digits 20472: = (sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0)); 20472: static constexpr int digits10 20472: = ((sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0)) * 643L / 2136); 20472: 20472: static constexpr int max_digits10 = 0; 20472: 20472: static constexpr bool is_signed = false; 20472: static constexpr bool is_integer = true; 20472: static constexpr bool is_exact = true; 20472: static constexpr int radix = 2; 20472: 20472: static constexpr unsigned int 20472: epsilon() noexcept { return 0; } 20472: 20472: static constexpr unsigned int 20472: round_error() noexcept { return 0; } 20472: 20472: static constexpr int min_exponent = 0; 20472: static constexpr int min_exponent10 = 0; 20472: static constexpr int max_exponent = 0; 20472: static constexpr int max_exponent10 = 0; 20472: 20472: static constexpr bool has_infinity = false; 20472: static constexpr bool has_quiet_NaN = false; 20472: static constexpr bool has_signaling_NaN = false; 20472: static constexpr float_denorm_style has_denorm 20472: = denorm_absent; 20472: static constexpr bool has_denorm_loss = false; 20472: 20472: static constexpr unsigned int 20472: infinity() noexcept { return static_cast(0); } 20472: 20472: static constexpr unsigned int 20472: quiet_NaN() noexcept 20472: { return static_cast(0); } 20472: 20472: static constexpr unsigned int 20472: signaling_NaN() noexcept 20472: { return static_cast(0); } 20472: 20472: static constexpr unsigned int 20472: denorm_min() noexcept 20472: { return static_cast(0); } 20472: 20472: static constexpr bool is_iec559 = false; 20472: static constexpr bool is_bounded = true; 20472: static constexpr bool is_modulo = true; 20472: 20472: static constexpr bool traps = false; 20472: static constexpr bool tinyness_before = false; 20472: static constexpr float_round_style round_style 20472: = round_toward_zero; 20472: }; 20472: 20472: 20472: template<> 20472: struct numeric_limits 20472: { 20472: static constexpr bool is_specialized = true; 20472: 20472: static constexpr long 20472: min() noexcept { return -0x7fffffffL - 1; } 20472: 20472: static constexpr long 20472: max() noexcept { return 0x7fffffffL; } 20472: 20472: 20472: static constexpr long 20472: lowest() noexcept { return min(); } 20472: 20472: 20472: static constexpr int digits = (sizeof(long) * 8 - ((long)(-1) < 0)); 20472: static constexpr int digits10 = ((sizeof(long) * 8 - ((long)(-1) < 0)) * 643L / 2136); 20472: 20472: static constexpr int max_digits10 = 0; 20472: 20472: static constexpr bool is_signed = true; 20472: static constexpr bool is_integer = true; 20472: static constexpr bool is_exact = true; 20472: static constexpr int radix = 2; 20472: 20472: static constexpr long 20472: epsilon() noexcept { return 0; } 20472: 20472: static constexpr long 20472: round_error() noexcept { return 0; } 20472: 20472: static constexpr int min_exponent = 0; 20472: static constexpr int min_exponent10 = 0; 20472: static constexpr int max_exponent = 0; 20472: static constexpr int max_exponent10 = 0; 20472: 20472: static constexpr bool has_infinity = false; 20472: static constexpr bool has_quiet_NaN = false; 20472: static constexpr bool has_signaling_NaN = false; 20472: static constexpr float_denorm_style has_denorm 20472: = denorm_absent; 20472: static constexpr bool has_denorm_loss = false; 20472: 20472: static constexpr long 20472: infinity() noexcept { return static_cast(0); } 20472: 20472: static constexpr long 20472: quiet_NaN() noexcept { return static_cast(0); } 20472: 20472: static constexpr long 20472: signaling_NaN() noexcept { return static_cast(0); } 20472: 20472: static constexpr long 20472: denorm_min() noexcept { return static_cast(0); } 20472: 20472: static constexpr bool is_iec559 = false; 20472: static constexpr bool is_bounded = true; 20472: static constexpr bool is_modulo = false; 20472: 20472: static constexpr bool traps = false; 20472: static constexpr bool tinyness_before = false; 20472: static constexpr float_round_style round_style 20472: = round_toward_zero; 20472: }; 20472: 20472: 20472: template<> 20472: struct numeric_limits 20472: { 20472: static constexpr bool is_specialized = true; 20472: 20472: static constexpr unsigned long 20472: min() noexcept { return 0; } 20472: 20472: static constexpr unsigned long 20472: max() noexcept { return 0x7fffffffL * 2UL + 1; } 20472: 20472: 20472: static constexpr unsigned long 20472: lowest() noexcept { return min(); } 20472: 20472: 20472: static constexpr int digits 20472: = (sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0)); 20472: static constexpr int digits10 20472: = ((sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0)) * 643L / 2136); 20472: 20472: static constexpr int max_digits10 = 0; 20472: 20472: static constexpr bool is_signed = false; 20472: static constexpr bool is_integer = true; 20472: static constexpr bool is_exact = true; 20472: static constexpr int radix = 2; 20472: 20472: static constexpr unsigned long 20472: epsilon() noexcept { return 0; } 20472: 20472: static constexpr unsigned long 20472: round_error() noexcept { return 0; } 20472: 20472: static constexpr int min_exponent = 0; 20472: static constexpr int min_exponent10 = 0; 20472: static constexpr int max_exponent = 0; 20472: static constexpr int max_exponent10 = 0; 20472: 20472: static constexpr bool has_infinity = false; 20472: static constexpr bool has_quiet_NaN = false; 20472: static constexpr bool has_signaling_NaN = false; 20472: static constexpr float_denorm_style has_denorm 20472: = denorm_absent; 20472: static constexpr bool has_denorm_loss = false; 20472: 20472: static constexpr unsigned long 20472: infinity() noexcept 20472: { return static_cast(0); } 20472: 20472: static constexpr unsigned long 20472: quiet_NaN() noexcept 20472: { return static_cast(0); } 20472: 20472: static constexpr unsigned long 20472: signaling_NaN() noexcept 20472: { return static_cast(0); } 20472: 20472: static constexpr unsigned long 20472: denorm_min() noexcept 20472: { return static_cast(0); } 20472: 20472: static constexpr bool is_iec559 = false; 20472: static constexpr bool is_bounded = true; 20472: static constexpr bool is_modulo = true; 20472: 20472: static constexpr bool traps = false; 20472: static constexpr bool tinyness_before = false; 20472: static constexpr float_round_style round_style 20472: = round_toward_zero; 20472: }; 20472: 20472: 20472: template<> 20472: struct numeric_limits 20472: { 20472: static constexpr bool is_specialized = true; 20472: 20472: static constexpr long long 20472: min() noexcept { return -0x7fffffffffffffffLL - 1; } 20472: 20472: static constexpr long long 20472: max() noexcept { return 0x7fffffffffffffffLL; } 20472: 20472: 20472: static constexpr long long 20472: lowest() noexcept { return min(); } 20472: 20472: 20472: static constexpr int digits 20472: = (sizeof(long long) * 8 - ((long long)(-1) < 0)); 20472: static constexpr int digits10 20472: = ((sizeof(long long) * 8 - ((long long)(-1) < 0)) * 643L / 2136); 20472: 20472: static constexpr int max_digits10 = 0; 20472: 20472: static constexpr bool is_signed = true; 20472: static constexpr bool is_integer = true; 20472: static constexpr bool is_exact = true; 20472: static constexpr int radix = 2; 20472: 20472: static constexpr long long 20472: epsilon() noexcept { return 0; } 20472: 20472: static constexpr long long 20472: round_error() noexcept { return 0; } 20472: 20472: static constexpr int min_exponent = 0; 20472: static constexpr int min_exponent10 = 0; 20472: static constexpr int max_exponent = 0; 20472: static constexpr int max_exponent10 = 0; 20472: 20472: static constexpr bool has_infinity = false; 20472: static constexpr bool has_quiet_NaN = false; 20472: static constexpr bool has_signaling_NaN = false; 20472: static constexpr float_denorm_style has_denorm 20472: = denorm_absent; 20472: static constexpr bool has_denorm_loss = false; 20472: 20472: static constexpr long long 20472: infinity() noexcept { return static_cast(0); } 20472: 20472: static constexpr long long 20472: quiet_NaN() noexcept { return static_cast(0); } 20472: 20472: static constexpr long long 20472: signaling_NaN() noexcept 20472: { return static_cast(0); } 20472: 20472: static constexpr long long 20472: denorm_min() noexcept { return static_cast(0); } 20472: 20472: static constexpr bool is_iec559 = false; 20472: static constexpr bool is_bounded = true; 20472: static constexpr bool is_modulo = false; 20472: 20472: static constexpr bool traps = false; 20472: static constexpr bool tinyness_before = false; 20472: static constexpr float_round_style round_style 20472: = round_toward_zero; 20472: }; 20472: 20472: 20472: template<> 20472: struct numeric_limits 20472: { 20472: static constexpr bool is_specialized = true; 20472: 20472: static constexpr unsigned long long 20472: min() noexcept { return 0; } 20472: 20472: static constexpr unsigned long long 20472: max() noexcept { return 0x7fffffffffffffffLL * 2ULL + 1; } 20472: 20472: 20472: static constexpr unsigned long long 20472: lowest() noexcept { return min(); } 20472: 20472: 20472: static constexpr int digits 20472: = (sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0)); 20472: static constexpr int digits10 20472: = ((sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0)) * 643L / 2136); 20472: 20472: static constexpr int max_digits10 = 0; 20472: 20472: static constexpr bool is_signed = false; 20472: static constexpr bool is_integer = true; 20472: static constexpr bool is_exact = true; 20472: static constexpr int radix = 2; 20472: 20472: static constexpr unsigned long long 20472: epsilon() noexcept { return 0; } 20472: 20472: static constexpr unsigned long long 20472: round_error() noexcept { return 0; } 20472: 20472: static constexpr int min_exponent = 0; 20472: static constexpr int min_exponent10 = 0; 20472: static constexpr int max_exponent = 0; 20472: static constexpr int max_exponent10 = 0; 20472: 20472: static constexpr bool has_infinity = false; 20472: static constexpr bool has_quiet_NaN = false; 20472: static constexpr bool has_signaling_NaN = false; 20472: static constexpr float_denorm_style has_denorm 20472: = denorm_absent; 20472: static constexpr bool has_denorm_loss = false; 20472: 20472: static constexpr unsigned long long 20472: infinity() noexcept 20472: { return static_cast(0); } 20472: 20472: static constexpr unsigned long long 20472: quiet_NaN() noexcept 20472: { return static_cast(0); } 20472: 20472: static constexpr unsigned long long 20472: signaling_NaN() noexcept 20472: { return static_cast(0); } 20472: 20472: static constexpr unsigned long long 20472: denorm_min() noexcept 20472: { return static_cast(0); } 20472: 20472: static constexpr bool is_iec559 = false; 20472: static constexpr bool is_bounded = true; 20472: static constexpr bool is_modulo = true; 20472: 20472: static constexpr bool traps = false; 20472: static constexpr bool tinyness_before = false; 20472: static constexpr float_round_style round_style 20472: = round_toward_zero; 20472: }; 20472: # 1663 "/usr/include/c++/10/limits" 3 20472: template<> 20472: struct numeric_limits 20472: { 20472: static constexpr bool is_specialized = true; 20472: 20472: static constexpr float 20472: min() noexcept { return 1.1754943508222875e-38F; } 20472: 20472: static constexpr float 20472: max() noexcept { return 3.4028234663852886e+38F; } 20472: 20472: 20472: static constexpr float 20472: lowest() noexcept { return -3.4028234663852886e+38F; } 20472: 20472: 20472: static constexpr int digits = 24; 20472: static constexpr int digits10 = 6; 20472: 20472: static constexpr int max_digits10 20472: = (2 + (24) * 643L / 2136); 20472: 20472: static constexpr bool is_signed = true; 20472: static constexpr bool is_integer = false; 20472: static constexpr bool is_exact = false; 20472: static constexpr int radix = 2; 20472: 20472: static constexpr float 20472: epsilon() noexcept { return 1.1920928955078125e-7F; } 20472: 20472: static constexpr float 20472: round_error() noexcept { return 0.5F; } 20472: 20472: static constexpr int min_exponent = (-125); 20472: static constexpr int min_exponent10 = (-37); 20472: static constexpr int max_exponent = 128; 20472: static constexpr int max_exponent10 = 38; 20472: 20472: static constexpr bool has_infinity = 1; 20472: static constexpr bool has_quiet_NaN = 1; 20472: static constexpr bool has_signaling_NaN = has_quiet_NaN; 20472: static constexpr float_denorm_style has_denorm 20472: = bool(1) ? denorm_present : denorm_absent; 20472: static constexpr bool has_denorm_loss 20472: = false; 20472: 20472: static constexpr float 20472: infinity() noexcept { return __builtin_huge_valf(); } 20472: 20472: static constexpr float 20472: quiet_NaN() noexcept { return __builtin_nanf(""); } 20472: 20472: static constexpr float 20472: signaling_NaN() noexcept { return __builtin_nansf(""); } 20472: 20472: static constexpr float 20472: denorm_min() noexcept { return 1.4012984643248171e-45F; } 20472: 20472: static constexpr bool is_iec559 20472: = has_infinity && has_quiet_NaN && has_denorm == denorm_present; 20472: static constexpr bool is_bounded = true; 20472: static constexpr bool is_modulo = false; 20472: 20472: static constexpr bool traps = false; 20472: static constexpr bool tinyness_before 20472: = false; 20472: static constexpr float_round_style round_style 20472: = round_to_nearest; 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: template<> 20472: struct numeric_limits 20472: { 20472: static constexpr bool is_specialized = true; 20472: 20472: static constexpr double 20472: min() noexcept { return double(2.2250738585072014e-308L); } 20472: 20472: static constexpr double 20472: max() noexcept { return double(1.7976931348623157e+308L); } 20472: 20472: 20472: static constexpr double 20472: lowest() noexcept { return -double(1.7976931348623157e+308L); } 20472: 20472: 20472: static constexpr int digits = 53; 20472: static constexpr int digits10 = 15; 20472: 20472: static constexpr int max_digits10 20472: = (2 + (53) * 643L / 2136); 20472: 20472: static constexpr bool is_signed = true; 20472: static constexpr bool is_integer = false; 20472: static constexpr bool is_exact = false; 20472: static constexpr int radix = 2; 20472: 20472: static constexpr double 20472: epsilon() noexcept { return double(2.2204460492503131e-16L); } 20472: 20472: static constexpr double 20472: round_error() noexcept { return 0.5; } 20472: 20472: static constexpr int min_exponent = (-1021); 20472: static constexpr int min_exponent10 = (-307); 20472: static constexpr int max_exponent = 1024; 20472: static constexpr int max_exponent10 = 308; 20472: 20472: static constexpr bool has_infinity = 1; 20472: static constexpr bool has_quiet_NaN = 1; 20472: static constexpr bool has_signaling_NaN = has_quiet_NaN; 20472: static constexpr float_denorm_style has_denorm 20472: = bool(1) ? denorm_present : denorm_absent; 20472: static constexpr bool has_denorm_loss 20472: = false; 20472: 20472: static constexpr double 20472: infinity() noexcept { return __builtin_huge_val(); } 20472: 20472: static constexpr double 20472: quiet_NaN() noexcept { return __builtin_nan(""); } 20472: 20472: static constexpr double 20472: signaling_NaN() noexcept { return __builtin_nans(""); } 20472: 20472: static constexpr double 20472: denorm_min() noexcept { return double(4.9406564584124654e-324L); } 20472: 20472: static constexpr bool is_iec559 20472: = has_infinity && has_quiet_NaN && has_denorm == denorm_present; 20472: static constexpr bool is_bounded = true; 20472: static constexpr bool is_modulo = false; 20472: 20472: static constexpr bool traps = false; 20472: static constexpr bool tinyness_before 20472: = false; 20472: static constexpr float_round_style round_style 20472: = round_to_nearest; 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: template<> 20472: struct numeric_limits 20472: { 20472: static constexpr bool is_specialized = true; 20472: 20472: static constexpr long double 20472: min() noexcept { return 2.2250738585072014e-308L; } 20472: 20472: static constexpr long double 20472: max() noexcept { return 1.7976931348623157e+308L; } 20472: 20472: 20472: static constexpr long double 20472: lowest() noexcept { return -1.7976931348623157e+308L; } 20472: 20472: 20472: static constexpr int digits = 53; 20472: static constexpr int digits10 = 15; 20472: 20472: static constexpr int max_digits10 20472: = (2 + (53) * 643L / 2136); 20472: 20472: static constexpr bool is_signed = true; 20472: static constexpr bool is_integer = false; 20472: static constexpr bool is_exact = false; 20472: static constexpr int radix = 2; 20472: 20472: static constexpr long double 20472: epsilon() noexcept { return 2.2204460492503131e-16L; } 20472: 20472: static constexpr long double 20472: round_error() noexcept { return 0.5L; } 20472: 20472: static constexpr int min_exponent = (-1021); 20472: static constexpr int min_exponent10 = (-307); 20472: static constexpr int max_exponent = 1024; 20472: static constexpr int max_exponent10 = 308; 20472: 20472: static constexpr bool has_infinity = 1; 20472: static constexpr bool has_quiet_NaN = 1; 20472: static constexpr bool has_signaling_NaN = has_quiet_NaN; 20472: static constexpr float_denorm_style has_denorm 20472: = bool(1) ? denorm_present : denorm_absent; 20472: static constexpr bool has_denorm_loss 20472: = false; 20472: 20472: static constexpr long double 20472: infinity() noexcept { return __builtin_huge_vall(); } 20472: 20472: static constexpr long double 20472: quiet_NaN() noexcept { return __builtin_nanl(""); } 20472: 20472: static constexpr long double 20472: signaling_NaN() noexcept { return __builtin_nansl(""); } 20472: 20472: static constexpr long double 20472: denorm_min() noexcept { return 4.9406564584124654e-324L; } 20472: 20472: static constexpr bool is_iec559 20472: = has_infinity && has_quiet_NaN && has_denorm == denorm_present; 20472: static constexpr bool is_bounded = true; 20472: static constexpr bool is_modulo = false; 20472: 20472: static constexpr bool traps = false; 20472: static constexpr bool tinyness_before = 20472: false; 20472: static constexpr float_round_style round_style = 20472: round_to_nearest; 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: } 20472: # 36 "/usr/include/c++/10/bits/hashtable_policy.h" 2 3 20472: 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: template 20472: class _Hashtable; 20472: 20472: namespace __detail 20472: { 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct _Hashtable_base; 20472: 20472: 20472: 20472: template 20472: inline typename std::iterator_traits<_Iterator>::difference_type 20472: __distance_fw(_Iterator __first, _Iterator __last, 20472: std::input_iterator_tag) 20472: { return __first != __last ? 1 : 0; } 20472: 20472: template 20472: inline typename std::iterator_traits<_Iterator>::difference_type 20472: __distance_fw(_Iterator __first, _Iterator __last, 20472: std::forward_iterator_tag) 20472: { return std::distance(__first, __last); } 20472: 20472: template 20472: inline typename std::iterator_traits<_Iterator>::difference_type 20472: __distance_fw(_Iterator __first, _Iterator __last) 20472: { return __distance_fw(__first, __last, 20472: std::__iterator_category(__first)); } 20472: 20472: struct _Identity 20472: { 20472: template 20472: _Tp&& 20472: operator()(_Tp&& __x) const 20472: { return std::forward<_Tp>(__x); } 20472: }; 20472: 20472: struct _Select1st 20472: { 20472: template 20472: auto 20472: operator()(_Tp&& __x) const 20472: -> decltype(std::get<0>(std::forward<_Tp>(__x))) 20472: { return std::get<0>(std::forward<_Tp>(__x)); } 20472: }; 20472: 20472: template 20472: struct _Hashtable_alloc; 20472: 20472: 20472: 20472: template 20472: struct _ReuseOrAllocNode 20472: { 20472: private: 20472: using __node_alloc_type = _NodeAlloc; 20472: using __hashtable_alloc = _Hashtable_alloc<__node_alloc_type>; 20472: using __node_alloc_traits = 20472: typename __hashtable_alloc::__node_alloc_traits; 20472: using __node_type = typename __hashtable_alloc::__node_type; 20472: 20472: public: 20472: _ReuseOrAllocNode(__node_type* __nodes, __hashtable_alloc& __h) 20472: : _M_nodes(__nodes), _M_h(__h) { } 20472: _ReuseOrAllocNode(const _ReuseOrAllocNode&) = delete; 20472: 20472: ~_ReuseOrAllocNode() 20472: { _M_h._M_deallocate_nodes(_M_nodes); } 20472: 20472: template 20472: __node_type* 20472: operator()(_Arg&& __arg) const 20472: { 20472: if (_M_nodes) 20472: { 20472: __node_type* __node = _M_nodes; 20472: _M_nodes = _M_nodes->_M_next(); 20472: __node->_M_nxt = nullptr; 20472: auto& __a = _M_h._M_node_allocator(); 20472: __node_alloc_traits::destroy(__a, __node->_M_valptr()); 20472: try 20472: { 20472: __node_alloc_traits::construct(__a, __node->_M_valptr(), 20472: std::forward<_Arg>(__arg)); 20472: } 20472: catch(...) 20472: { 20472: _M_h._M_deallocate_node_ptr(__node); 20472: throw; 20472: } 20472: return __node; 20472: } 20472: return _M_h._M_allocate_node(std::forward<_Arg>(__arg)); 20472: } 20472: 20472: private: 20472: mutable __node_type* _M_nodes; 20472: __hashtable_alloc& _M_h; 20472: }; 20472: 20472: 20472: 20472: template 20472: struct _AllocNode 20472: { 20472: private: 20472: using __hashtable_alloc = _Hashtable_alloc<_NodeAlloc>; 20472: using __node_type = typename __hashtable_alloc::__node_type; 20472: 20472: public: 20472: _AllocNode(__hashtable_alloc& __h) 20472: : _M_h(__h) { } 20472: 20472: template 20472: __node_type* 20472: operator()(_Arg&& __arg) const 20472: { return _M_h._M_allocate_node(std::forward<_Arg>(__arg)); } 20472: 20472: private: 20472: __hashtable_alloc& _M_h; 20472: }; 20472: # 198 "/usr/include/c++/10/bits/hashtable_policy.h" 3 20472: template 20472: struct _Hashtable_traits 20472: { 20472: using __hash_cached = __bool_constant<_Cache_hash_code>; 20472: using __constant_iterators = __bool_constant<_Constant_iterators>; 20472: using __unique_keys = __bool_constant<_Unique_keys>; 20472: }; 20472: # 214 "/usr/include/c++/10/bits/hashtable_policy.h" 3 20472: struct _Hash_node_base 20472: { 20472: _Hash_node_base* _M_nxt; 20472: 20472: _Hash_node_base() noexcept : _M_nxt() { } 20472: 20472: _Hash_node_base(_Hash_node_base* __next) noexcept : _M_nxt(__next) { } 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct _Hash_node_value_base : _Hash_node_base 20472: { 20472: typedef _Value value_type; 20472: 20472: __gnu_cxx::__aligned_buffer<_Value> _M_storage; 20472: 20472: _Value* 20472: _M_valptr() noexcept 20472: { return _M_storage._M_ptr(); } 20472: 20472: const _Value* 20472: _M_valptr() const noexcept 20472: { return _M_storage._M_ptr(); } 20472: 20472: _Value& 20472: _M_v() noexcept 20472: { return *_M_valptr(); } 20472: 20472: const _Value& 20472: _M_v() const noexcept 20472: { return *_M_valptr(); } 20472: }; 20472: 20472: 20472: 20472: 20472: template 20472: struct _Hash_node; 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct _Hash_node<_Value, true> : _Hash_node_value_base<_Value> 20472: { 20472: std::size_t _M_hash_code; 20472: 20472: _Hash_node* 20472: _M_next() const noexcept 20472: { return static_cast<_Hash_node*>(this->_M_nxt); } 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct _Hash_node<_Value, false> : _Hash_node_value_base<_Value> 20472: { 20472: _Hash_node* 20472: _M_next() const noexcept 20472: { return static_cast<_Hash_node*>(this->_M_nxt); } 20472: }; 20472: 20472: 20472: template 20472: struct _Node_iterator_base 20472: { 20472: using __node_type = _Hash_node<_Value, _Cache_hash_code>; 20472: 20472: __node_type* _M_cur; 20472: 20472: _Node_iterator_base(__node_type* __p) noexcept 20472: : _M_cur(__p) { } 20472: 20472: void 20472: _M_incr() noexcept 20472: { _M_cur = _M_cur->_M_next(); } 20472: }; 20472: 20472: template 20472: inline bool 20472: operator==(const _Node_iterator_base<_Value, _Cache_hash_code>& __x, 20472: const _Node_iterator_base<_Value, _Cache_hash_code >& __y) 20472: noexcept 20472: { return __x._M_cur == __y._M_cur; } 20472: 20472: template 20472: inline bool 20472: operator!=(const _Node_iterator_base<_Value, _Cache_hash_code>& __x, 20472: const _Node_iterator_base<_Value, _Cache_hash_code>& __y) 20472: noexcept 20472: { return __x._M_cur != __y._M_cur; } 20472: 20472: 20472: template 20472: struct _Node_iterator 20472: : public _Node_iterator_base<_Value, __cache> 20472: { 20472: private: 20472: using __base_type = _Node_iterator_base<_Value, __cache>; 20472: using __node_type = typename __base_type::__node_type; 20472: 20472: public: 20472: typedef _Value value_type; 20472: typedef std::ptrdiff_t difference_type; 20472: typedef std::forward_iterator_tag iterator_category; 20472: 20472: using pointer = typename std::conditional<__constant_iterators, 20472: const _Value*, _Value*>::type; 20472: 20472: using reference = typename std::conditional<__constant_iterators, 20472: const _Value&, _Value&>::type; 20472: 20472: _Node_iterator() noexcept 20472: : __base_type(0) { } 20472: 20472: explicit 20472: _Node_iterator(__node_type* __p) noexcept 20472: : __base_type(__p) { } 20472: 20472: reference 20472: operator*() const noexcept 20472: { return this->_M_cur->_M_v(); } 20472: 20472: pointer 20472: operator->() const noexcept 20472: { return this->_M_cur->_M_valptr(); } 20472: 20472: _Node_iterator& 20472: operator++() noexcept 20472: { 20472: this->_M_incr(); 20472: return *this; 20472: } 20472: 20472: _Node_iterator 20472: operator++(int) noexcept 20472: { 20472: _Node_iterator __tmp(*this); 20472: this->_M_incr(); 20472: return __tmp; 20472: } 20472: }; 20472: 20472: 20472: template 20472: struct _Node_const_iterator 20472: : public _Node_iterator_base<_Value, __cache> 20472: { 20472: private: 20472: using __base_type = _Node_iterator_base<_Value, __cache>; 20472: using __node_type = typename __base_type::__node_type; 20472: 20472: public: 20472: typedef _Value value_type; 20472: typedef std::ptrdiff_t difference_type; 20472: typedef std::forward_iterator_tag iterator_category; 20472: 20472: typedef const _Value* pointer; 20472: typedef const _Value& reference; 20472: 20472: _Node_const_iterator() noexcept 20472: : __base_type(0) { } 20472: 20472: explicit 20472: _Node_const_iterator(__node_type* __p) noexcept 20472: : __base_type(__p) { } 20472: 20472: _Node_const_iterator(const _Node_iterator<_Value, __constant_iterators, 20472: __cache>& __x) noexcept 20472: : __base_type(__x._M_cur) { } 20472: 20472: reference 20472: operator*() const noexcept 20472: { return this->_M_cur->_M_v(); } 20472: 20472: pointer 20472: operator->() const noexcept 20472: { return this->_M_cur->_M_valptr(); } 20472: 20472: _Node_const_iterator& 20472: operator++() noexcept 20472: { 20472: this->_M_incr(); 20472: return *this; 20472: } 20472: 20472: _Node_const_iterator 20472: operator++(int) noexcept 20472: { 20472: _Node_const_iterator __tmp(*this); 20472: this->_M_incr(); 20472: return __tmp; 20472: } 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: struct _Mod_range_hashing 20472: { 20472: typedef std::size_t first_argument_type; 20472: typedef std::size_t second_argument_type; 20472: typedef std::size_t result_type; 20472: 20472: result_type 20472: operator()(first_argument_type __num, 20472: second_argument_type __den) const noexcept 20472: { return __num % __den; } 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: struct _Default_ranged_hash { }; 20472: 20472: 20472: 20472: struct _Prime_rehash_policy 20472: { 20472: using __has_load_factor = true_type; 20472: 20472: _Prime_rehash_policy(float __z = 1.0) noexcept 20472: : _M_max_load_factor(__z), _M_next_resize(0) { } 20472: 20472: float 20472: max_load_factor() const noexcept 20472: { return _M_max_load_factor; } 20472: 20472: 20472: std::size_t 20472: _M_next_bkt(std::size_t __n) const; 20472: 20472: 20472: std::size_t 20472: _M_bkt_for_elements(std::size_t __n) const 20472: { return __builtin_ceill(__n / (long double)_M_max_load_factor); } 20472: 20472: 20472: 20472: 20472: 20472: std::pair 20472: _M_need_rehash(std::size_t __n_bkt, std::size_t __n_elt, 20472: std::size_t __n_ins) const; 20472: 20472: typedef std::size_t _State; 20472: 20472: _State 20472: _M_state() const 20472: { return _M_next_resize; } 20472: 20472: void 20472: _M_reset() noexcept 20472: { _M_next_resize = 0; } 20472: 20472: void 20472: _M_reset(_State __state) 20472: { _M_next_resize = __state; } 20472: 20472: static const std::size_t _S_growth_factor = 2; 20472: 20472: float _M_max_load_factor; 20472: mutable std::size_t _M_next_resize; 20472: }; 20472: 20472: 20472: struct _Mask_range_hashing 20472: { 20472: typedef std::size_t first_argument_type; 20472: typedef std::size_t second_argument_type; 20472: typedef std::size_t result_type; 20472: 20472: result_type 20472: operator()(first_argument_type __num, 20472: second_argument_type __den) const noexcept 20472: { return __num & (__den - 1); } 20472: }; 20472: 20472: 20472: inline std::size_t 20472: __clp2(std::size_t __n) noexcept 20472: { 20472: 20472: if (__n < 2) 20472: return __n; 20472: const unsigned __lz = sizeof(size_t) > sizeof(long) 20472: ? __builtin_clzll(__n - 1ull) 20472: : __builtin_clzl(__n - 1ul); 20472: 20472: return (size_t(1) << (numeric_limits::digits - __lz - 1)) << 1; 20472: } 20472: 20472: 20472: 20472: struct _Power2_rehash_policy 20472: { 20472: using __has_load_factor = true_type; 20472: 20472: _Power2_rehash_policy(float __z = 1.0) noexcept 20472: : _M_max_load_factor(__z), _M_next_resize(0) { } 20472: 20472: float 20472: max_load_factor() const noexcept 20472: { return _M_max_load_factor; } 20472: 20472: 20472: 20472: std::size_t 20472: _M_next_bkt(std::size_t __n) noexcept 20472: { 20472: if (__n == 0) 20472: 20472: 20472: 20472: return 1; 20472: 20472: const auto __max_width = std::min(sizeof(size_t), 8); 20472: const auto __max_bkt = size_t(1) << (__max_width * 8 - 1); 20472: std::size_t __res = __clp2(__n); 20472: 20472: if (__res == 0) 20472: __res = __max_bkt; 20472: else if (__res == 1) 20472: 20472: 20472: 20472: __res = 2; 20472: 20472: if (__res == __max_bkt) 20472: 20472: 20472: 20472: _M_next_resize = numeric_limits::max(); 20472: else 20472: _M_next_resize 20472: = __builtin_floorl(__res * (long double)_M_max_load_factor); 20472: 20472: return __res; 20472: } 20472: 20472: 20472: std::size_t 20472: _M_bkt_for_elements(std::size_t __n) const noexcept 20472: { return __builtin_ceill(__n / (long double)_M_max_load_factor); } 20472: 20472: 20472: 20472: 20472: 20472: std::pair 20472: _M_need_rehash(std::size_t __n_bkt, std::size_t __n_elt, 20472: std::size_t __n_ins) noexcept 20472: { 20472: if (__n_elt + __n_ins > _M_next_resize) 20472: { 20472: 20472: 20472: 20472: long double __min_bkts 20472: = std::max(__n_elt + __n_ins, _M_next_resize ? 0 : 11) 20472: / (long double)_M_max_load_factor; 20472: if (__min_bkts >= __n_bkt) 20472: return { true, 20472: _M_next_bkt(std::max(__builtin_floorl(__min_bkts) + 1, 20472: __n_bkt * _S_growth_factor)) }; 20472: 20472: _M_next_resize 20472: = __builtin_floorl(__n_bkt * (long double)_M_max_load_factor); 20472: return { false, 0 }; 20472: } 20472: else 20472: return { false, 0 }; 20472: } 20472: 20472: typedef std::size_t _State; 20472: 20472: _State 20472: _M_state() const noexcept 20472: { return _M_next_resize; } 20472: 20472: void 20472: _M_reset() noexcept 20472: { _M_next_resize = 0; } 20472: 20472: void 20472: _M_reset(_State __state) noexcept 20472: { _M_next_resize = __state; } 20472: 20472: static const std::size_t _S_growth_factor = 2; 20472: 20472: float _M_max_load_factor; 20472: std::size_t _M_next_resize; 20472: }; 20472: # 640 "/usr/include/c++/10/bits/hashtable_policy.h" 3 20472: template 20472: struct _Map_base { }; 20472: 20472: 20472: template 20472: struct _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits, false> 20472: { 20472: using mapped_type = typename std::tuple_element<1, _Pair>::type; 20472: }; 20472: 20472: 20472: template 20472: struct _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits, true> 20472: { 20472: private: 20472: using __hashtable_base = __detail::_Hashtable_base<_Key, _Pair, 20472: _Select1st, 20472: _Equal, _H1, _H2, _Hash, 20472: _Traits>; 20472: 20472: using __hashtable = _Hashtable<_Key, _Pair, _Alloc, 20472: _Select1st, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits>; 20472: 20472: using __hash_code = typename __hashtable_base::__hash_code; 20472: using __node_type = typename __hashtable_base::__node_type; 20472: 20472: public: 20472: using key_type = typename __hashtable_base::key_type; 20472: using iterator = typename __hashtable_base::iterator; 20472: using mapped_type = typename std::tuple_element<1, _Pair>::type; 20472: 20472: mapped_type& 20472: operator[](const key_type& __k); 20472: 20472: mapped_type& 20472: operator[](key_type&& __k); 20472: 20472: 20472: 20472: mapped_type& 20472: at(const key_type& __k); 20472: 20472: const mapped_type& 20472: at(const key_type& __k) const; 20472: }; 20472: 20472: template 20472: auto 20472: _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits, true>:: 20472: operator[](const key_type& __k) 20472: -> mapped_type& 20472: { 20472: __hashtable* __h = static_cast<__hashtable*>(this); 20472: __hash_code __code = __h->_M_hash_code(__k); 20472: std::size_t __bkt = __h->_M_bucket_index(__k, __code); 20472: if (__node_type* __node = __h->_M_find_node(__bkt, __k, __code)) 20472: return __node->_M_v().second; 20472: 20472: typename __hashtable::_Scoped_node __node { 20472: __h, 20472: std::piecewise_construct, 20472: std::tuple(__k), 20472: std::tuple<>() 20472: }; 20472: auto __pos 20472: = __h->_M_insert_unique_node(__k, __bkt, __code, __node._M_node); 20472: __node._M_node = nullptr; 20472: return __pos->second; 20472: } 20472: 20472: template 20472: auto 20472: _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits, true>:: 20472: operator[](key_type&& __k) 20472: -> mapped_type& 20472: { 20472: __hashtable* __h = static_cast<__hashtable*>(this); 20472: __hash_code __code = __h->_M_hash_code(__k); 20472: std::size_t __bkt = __h->_M_bucket_index(__k, __code); 20472: if (__node_type* __node = __h->_M_find_node(__bkt, __k, __code)) 20472: return __node->_M_v().second; 20472: 20472: typename __hashtable::_Scoped_node __node { 20472: __h, 20472: std::piecewise_construct, 20472: std::forward_as_tuple(std::move(__k)), 20472: std::tuple<>() 20472: }; 20472: auto __pos 20472: = __h->_M_insert_unique_node(__k, __bkt, __code, __node._M_node); 20472: __node._M_node = nullptr; 20472: return __pos->second; 20472: } 20472: 20472: template 20472: auto 20472: _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits, true>:: 20472: at(const key_type& __k) 20472: -> mapped_type& 20472: { 20472: __hashtable* __h = static_cast<__hashtable*>(this); 20472: __hash_code __code = __h->_M_hash_code(__k); 20472: std::size_t __bkt = __h->_M_bucket_index(__k, __code); 20472: __node_type* __p = __h->_M_find_node(__bkt, __k, __code); 20472: 20472: if (!__p) 20472: __throw_out_of_range(("_Map_base::at")); 20472: return __p->_M_v().second; 20472: } 20472: 20472: template 20472: auto 20472: _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits, true>:: 20472: at(const key_type& __k) const 20472: -> const mapped_type& 20472: { 20472: const __hashtable* __h = static_cast(this); 20472: __hash_code __code = __h->_M_hash_code(__k); 20472: std::size_t __bkt = __h->_M_bucket_index(__k, __code); 20472: __node_type* __p = __h->_M_find_node(__bkt, __k, __code); 20472: 20472: if (!__p) 20472: __throw_out_of_range(("_Map_base::at")); 20472: return __p->_M_v().second; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct _Insert_base 20472: { 20472: protected: 20472: using __hashtable = _Hashtable<_Key, _Value, _Alloc, _ExtractKey, 20472: _Equal, _H1, _H2, _Hash, 20472: _RehashPolicy, _Traits>; 20472: 20472: using __hashtable_base = _Hashtable_base<_Key, _Value, _ExtractKey, 20472: _Equal, _H1, _H2, _Hash, 20472: _Traits>; 20472: 20472: using value_type = typename __hashtable_base::value_type; 20472: using iterator = typename __hashtable_base::iterator; 20472: using const_iterator = typename __hashtable_base::const_iterator; 20472: using size_type = typename __hashtable_base::size_type; 20472: 20472: using __unique_keys = typename __hashtable_base::__unique_keys; 20472: using __ireturn_type = typename __hashtable_base::__ireturn_type; 20472: using __node_type = _Hash_node<_Value, _Traits::__hash_cached::value>; 20472: using __node_alloc_type = __alloc_rebind<_Alloc, __node_type>; 20472: using __node_gen_type = _AllocNode<__node_alloc_type>; 20472: 20472: __hashtable& 20472: _M_conjure_hashtable() 20472: { return *(static_cast<__hashtable*>(this)); } 20472: 20472: template 20472: void 20472: _M_insert_range(_InputIterator __first, _InputIterator __last, 20472: const _NodeGetter&, true_type); 20472: 20472: template 20472: void 20472: _M_insert_range(_InputIterator __first, _InputIterator __last, 20472: const _NodeGetter&, false_type); 20472: 20472: public: 20472: __ireturn_type 20472: insert(const value_type& __v) 20472: { 20472: __hashtable& __h = _M_conjure_hashtable(); 20472: __node_gen_type __node_gen(__h); 20472: return __h._M_insert(__v, __node_gen, __unique_keys()); 20472: } 20472: 20472: iterator 20472: insert(const_iterator __hint, const value_type& __v) 20472: { 20472: __hashtable& __h = _M_conjure_hashtable(); 20472: __node_gen_type __node_gen(__h); 20472: return __h._M_insert(__hint, __v, __node_gen, __unique_keys()); 20472: } 20472: 20472: void 20472: insert(initializer_list __l) 20472: { this->insert(__l.begin(), __l.end()); } 20472: 20472: template 20472: void 20472: insert(_InputIterator __first, _InputIterator __last) 20472: { 20472: __hashtable& __h = _M_conjure_hashtable(); 20472: __node_gen_type __node_gen(__h); 20472: return _M_insert_range(__first, __last, __node_gen, __unique_keys()); 20472: } 20472: }; 20472: 20472: template 20472: template 20472: void 20472: _Insert_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, 20472: _RehashPolicy, _Traits>:: 20472: _M_insert_range(_InputIterator __first, _InputIterator __last, 20472: const _NodeGetter& __node_gen, true_type) 20472: { 20472: size_type __n_elt = __detail::__distance_fw(__first, __last); 20472: if (__n_elt == 0) 20472: return; 20472: 20472: __hashtable& __h = _M_conjure_hashtable(); 20472: for (; __first != __last; ++__first) 20472: { 20472: if (__h._M_insert(*__first, __node_gen, __unique_keys(), 20472: __n_elt).second) 20472: __n_elt = 1; 20472: else if (__n_elt != 1) 20472: --__n_elt; 20472: } 20472: } 20472: 20472: template 20472: template 20472: void 20472: _Insert_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, 20472: _RehashPolicy, _Traits>:: 20472: _M_insert_range(_InputIterator __first, _InputIterator __last, 20472: const _NodeGetter& __node_gen, false_type) 20472: { 20472: using __rehash_type = typename __hashtable::__rehash_type; 20472: using __rehash_state = typename __hashtable::__rehash_state; 20472: using pair_type = std::pair; 20472: 20472: size_type __n_elt = __detail::__distance_fw(__first, __last); 20472: if (__n_elt == 0) 20472: return; 20472: 20472: __hashtable& __h = _M_conjure_hashtable(); 20472: __rehash_type& __rehash = __h._M_rehash_policy; 20472: const __rehash_state& __saved_state = __rehash._M_state(); 20472: pair_type __do_rehash = __rehash._M_need_rehash(__h._M_bucket_count, 20472: __h._M_element_count, 20472: __n_elt); 20472: 20472: if (__do_rehash.first) 20472: __h._M_rehash(__do_rehash.second, __saved_state); 20472: 20472: for (; __first != __last; ++__first) 20472: __h._M_insert(*__first, __node_gen, __unique_keys()); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct _Insert; 20472: 20472: 20472: template 20472: struct _Insert<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, 20472: _RehashPolicy, _Traits, true> 20472: : public _Insert_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits> 20472: { 20472: using __base_type = _Insert_base<_Key, _Value, _Alloc, _ExtractKey, 20472: _Equal, _H1, _H2, _Hash, 20472: _RehashPolicy, _Traits>; 20472: 20472: using __hashtable_base = _Hashtable_base<_Key, _Value, _ExtractKey, 20472: _Equal, _H1, _H2, _Hash, 20472: _Traits>; 20472: 20472: using value_type = typename __base_type::value_type; 20472: using iterator = typename __base_type::iterator; 20472: using const_iterator = typename __base_type::const_iterator; 20472: 20472: using __unique_keys = typename __base_type::__unique_keys; 20472: using __ireturn_type = typename __hashtable_base::__ireturn_type; 20472: using __hashtable = typename __base_type::__hashtable; 20472: using __node_gen_type = typename __base_type::__node_gen_type; 20472: 20472: using __base_type::insert; 20472: 20472: __ireturn_type 20472: insert(value_type&& __v) 20472: { 20472: __hashtable& __h = this->_M_conjure_hashtable(); 20472: __node_gen_type __node_gen(__h); 20472: return __h._M_insert(std::move(__v), __node_gen, __unique_keys()); 20472: } 20472: 20472: iterator 20472: insert(const_iterator __hint, value_type&& __v) 20472: { 20472: __hashtable& __h = this->_M_conjure_hashtable(); 20472: __node_gen_type __node_gen(__h); 20472: return __h._M_insert(__hint, std::move(__v), __node_gen, 20472: __unique_keys()); 20472: } 20472: }; 20472: 20472: 20472: template 20472: struct _Insert<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, 20472: _RehashPolicy, _Traits, false> 20472: : public _Insert_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits> 20472: { 20472: using __base_type = _Insert_base<_Key, _Value, _Alloc, _ExtractKey, 20472: _Equal, _H1, _H2, _Hash, 20472: _RehashPolicy, _Traits>; 20472: using value_type = typename __base_type::value_type; 20472: using iterator = typename __base_type::iterator; 20472: using const_iterator = typename __base_type::const_iterator; 20472: 20472: using __unique_keys = typename __base_type::__unique_keys; 20472: using __hashtable = typename __base_type::__hashtable; 20472: using __ireturn_type = typename __base_type::__ireturn_type; 20472: 20472: using __base_type::insert; 20472: 20472: template 20472: using __is_cons = std::is_constructible; 20472: 20472: template 20472: using _IFcons = std::enable_if<__is_cons<_Pair>::value>; 20472: 20472: template 20472: using _IFconsp = typename _IFcons<_Pair>::type; 20472: 20472: template> 20472: __ireturn_type 20472: insert(_Pair&& __v) 20472: { 20472: __hashtable& __h = this->_M_conjure_hashtable(); 20472: return __h._M_emplace(__unique_keys(), std::forward<_Pair>(__v)); 20472: } 20472: 20472: template> 20472: iterator 20472: insert(const_iterator __hint, _Pair&& __v) 20472: { 20472: __hashtable& __h = this->_M_conjure_hashtable(); 20472: return __h._M_emplace(__hint, __unique_keys(), 20472: std::forward<_Pair>(__v)); 20472: } 20472: }; 20472: 20472: template 20472: using __has_load_factor = typename _Policy::__has_load_factor; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template> 20472: struct _Rehash_base; 20472: 20472: 20472: template 20472: struct _Rehash_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits, 20472: false_type> 20472: { 20472: }; 20472: 20472: 20472: template 20472: struct _Rehash_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits, 20472: true_type> 20472: { 20472: using __hashtable = _Hashtable<_Key, _Value, _Alloc, _ExtractKey, 20472: _Equal, _H1, _H2, _Hash, 20472: _RehashPolicy, _Traits>; 20472: 20472: float 20472: max_load_factor() const noexcept 20472: { 20472: const __hashtable* __this = static_cast(this); 20472: return __this->__rehash_policy().max_load_factor(); 20472: } 20472: 20472: void 20472: max_load_factor(float __z) 20472: { 20472: __hashtable* __this = static_cast<__hashtable*>(this); 20472: __this->__rehash_policy(_RehashPolicy(__z)); 20472: } 20472: 20472: void 20472: reserve(std::size_t __n) 20472: { 20472: __hashtable* __this = static_cast<__hashtable*>(this); 20472: __this->rehash(__this->__rehash_policy()._M_bkt_for_elements(__n)); 20472: } 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct _Hashtable_ebo_helper; 20472: 20472: 20472: template 20472: struct _Hashtable_ebo_helper<_Nm, _Tp, true> 20472: : private _Tp 20472: { 20472: _Hashtable_ebo_helper() = default; 20472: 20472: template 20472: _Hashtable_ebo_helper(_OtherTp&& __tp) 20472: : _Tp(std::forward<_OtherTp>(__tp)) 20472: { } 20472: 20472: const _Tp& _M_cget() const { return static_cast(*this); } 20472: _Tp& _M_get() { return static_cast<_Tp&>(*this); } 20472: }; 20472: 20472: 20472: template 20472: struct _Hashtable_ebo_helper<_Nm, _Tp, false> 20472: { 20472: _Hashtable_ebo_helper() = default; 20472: 20472: template 20472: _Hashtable_ebo_helper(_OtherTp&& __tp) 20472: : _M_tp(std::forward<_OtherTp>(__tp)) 20472: { } 20472: 20472: const _Tp& _M_cget() const { return _M_tp; } 20472: _Tp& _M_get() { return _M_tp; } 20472: 20472: private: 20472: _Tp _M_tp; 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct _Local_iterator_base; 20472: # 1172 "/usr/include/c++/10/bits/hashtable_policy.h" 3 20472: template 20472: struct _Hash_code_base; 20472: 20472: 20472: 20472: template 20472: struct _Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, false> 20472: : private _Hashtable_ebo_helper<0, _ExtractKey>, 20472: private _Hashtable_ebo_helper<1, _Hash> 20472: { 20472: private: 20472: using __ebo_extract_key = _Hashtable_ebo_helper<0, _ExtractKey>; 20472: using __ebo_hash = _Hashtable_ebo_helper<1, _Hash>; 20472: 20472: protected: 20472: typedef void* __hash_code; 20472: typedef _Hash_node<_Value, false> __node_type; 20472: 20472: 20472: 20472: _Hash_code_base() = default; 20472: 20472: _Hash_code_base(const _ExtractKey& __ex, const _H1&, const _H2&, 20472: const _Hash& __h) 20472: : __ebo_extract_key(__ex), __ebo_hash(__h) { } 20472: 20472: __hash_code 20472: _M_hash_code(const _Key& __key) const 20472: { return 0; } 20472: 20472: std::size_t 20472: _M_bucket_index(const _Key& __k, __hash_code, 20472: std::size_t __bkt_count) const 20472: { return _M_ranged_hash()(__k, __bkt_count); } 20472: 20472: std::size_t 20472: _M_bucket_index(const __node_type* __p, std::size_t __bkt_count) const 20472: noexcept( noexcept(declval()(declval(), 20472: (std::size_t)0)) ) 20472: { return _M_ranged_hash()(_M_extract()(__p->_M_v()), __bkt_count); } 20472: 20472: void 20472: _M_store_code(__node_type*, __hash_code) const 20472: { } 20472: 20472: void 20472: _M_copy_code(__node_type*, const __node_type*) const 20472: { } 20472: 20472: void 20472: _M_swap(_Hash_code_base& __x) 20472: { 20472: std::swap(__ebo_extract_key::_M_get(), 20472: __x.__ebo_extract_key::_M_get()); 20472: std::swap(__ebo_hash::_M_get(), __x.__ebo_hash::_M_get()); 20472: } 20472: 20472: const _ExtractKey& 20472: _M_extract() const { return __ebo_extract_key::_M_cget(); } 20472: 20472: const _Hash& 20472: _M_ranged_hash() const { return __ebo_hash::_M_cget(); } 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct _Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, true>; 20472: 20472: 20472: 20472: 20472: template 20472: struct _Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, 20472: _Default_ranged_hash, false> 20472: : private _Hashtable_ebo_helper<0, _ExtractKey>, 20472: private _Hashtable_ebo_helper<1, _H1>, 20472: private _Hashtable_ebo_helper<2, _H2> 20472: { 20472: private: 20472: using __ebo_extract_key = _Hashtable_ebo_helper<0, _ExtractKey>; 20472: using __ebo_h1 = _Hashtable_ebo_helper<1, _H1>; 20472: using __ebo_h2 = _Hashtable_ebo_helper<2, _H2>; 20472: 20472: 20472: friend struct _Local_iterator_base<_Key, _Value, _ExtractKey, _H1, _H2, 20472: _Default_ranged_hash, false>; 20472: 20472: public: 20472: typedef _H1 hasher; 20472: 20472: hasher 20472: hash_function() const 20472: { return _M_h1(); } 20472: 20472: protected: 20472: typedef std::size_t __hash_code; 20472: typedef _Hash_node<_Value, false> __node_type; 20472: 20472: 20472: 20472: _Hash_code_base() = default; 20472: 20472: _Hash_code_base(const _ExtractKey& __ex, 20472: const _H1& __h1, const _H2& __h2, 20472: const _Default_ranged_hash&) 20472: : __ebo_extract_key(__ex), __ebo_h1(__h1), __ebo_h2(__h2) { } 20472: 20472: __hash_code 20472: _M_hash_code(const _Key& __k) const 20472: { 20472: static_assert(__is_invocable{}, 20472: "hash function must be invocable with an argument of key type"); 20472: return _M_h1()(__k); 20472: } 20472: 20472: std::size_t 20472: _M_bucket_index(const _Key&, __hash_code __c, 20472: std::size_t __bkt_count) const 20472: { return _M_h2()(__c, __bkt_count); } 20472: 20472: std::size_t 20472: _M_bucket_index(const __node_type* __p, std::size_t __bkt_count) const 20472: noexcept( noexcept(declval()(declval())) 20472: && noexcept(declval()((__hash_code)0, 20472: (std::size_t)0)) ) 20472: { return _M_h2()(_M_h1()(_M_extract()(__p->_M_v())), __bkt_count); } 20472: 20472: void 20472: _M_store_code(__node_type*, __hash_code) const 20472: { } 20472: 20472: void 20472: _M_copy_code(__node_type*, const __node_type*) const 20472: { } 20472: 20472: void 20472: _M_swap(_Hash_code_base& __x) 20472: { 20472: std::swap(__ebo_extract_key::_M_get(), 20472: __x.__ebo_extract_key::_M_get()); 20472: std::swap(__ebo_h1::_M_get(), __x.__ebo_h1::_M_get()); 20472: std::swap(__ebo_h2::_M_get(), __x.__ebo_h2::_M_get()); 20472: } 20472: 20472: const _ExtractKey& 20472: _M_extract() const { return __ebo_extract_key::_M_cget(); } 20472: 20472: const _H1& 20472: _M_h1() const { return __ebo_h1::_M_cget(); } 20472: 20472: const _H2& 20472: _M_h2() const { return __ebo_h2::_M_cget(); } 20472: }; 20472: 20472: 20472: 20472: 20472: template 20472: struct _Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, 20472: _Default_ranged_hash, true> 20472: : private _Hashtable_ebo_helper<0, _ExtractKey>, 20472: private _Hashtable_ebo_helper<1, _H1>, 20472: private _Hashtable_ebo_helper<2, _H2> 20472: { 20472: private: 20472: 20472: friend struct _Local_iterator_base<_Key, _Value, _ExtractKey, _H1, _H2, 20472: _Default_ranged_hash, true>; 20472: 20472: using __ebo_extract_key = _Hashtable_ebo_helper<0, _ExtractKey>; 20472: using __ebo_h1 = _Hashtable_ebo_helper<1, _H1>; 20472: using __ebo_h2 = _Hashtable_ebo_helper<2, _H2>; 20472: 20472: public: 20472: typedef _H1 hasher; 20472: 20472: hasher 20472: hash_function() const 20472: { return _M_h1(); } 20472: 20472: protected: 20472: typedef std::size_t __hash_code; 20472: typedef _Hash_node<_Value, true> __node_type; 20472: 20472: 20472: _Hash_code_base() = default; 20472: _Hash_code_base(const _ExtractKey& __ex, 20472: const _H1& __h1, const _H2& __h2, 20472: const _Default_ranged_hash&) 20472: : __ebo_extract_key(__ex), __ebo_h1(__h1), __ebo_h2(__h2) { } 20472: 20472: __hash_code 20472: _M_hash_code(const _Key& __k) const 20472: { 20472: static_assert(__is_invocable{}, 20472: "hash function must be invocable with an argument of key type"); 20472: return _M_h1()(__k); 20472: } 20472: 20472: std::size_t 20472: _M_bucket_index(const _Key&, __hash_code __c, 20472: std::size_t __bkt_count) const 20472: { return _M_h2()(__c, __bkt_count); } 20472: 20472: std::size_t 20472: _M_bucket_index(const __node_type* __p, std::size_t __bkt_count) const 20472: noexcept( noexcept(declval()((__hash_code)0, 20472: (std::size_t)0)) ) 20472: { return _M_h2()(__p->_M_hash_code, __bkt_count); } 20472: 20472: void 20472: _M_store_code(__node_type* __n, __hash_code __c) const 20472: { __n->_M_hash_code = __c; } 20472: 20472: void 20472: _M_copy_code(__node_type* __to, const __node_type* __from) const 20472: { __to->_M_hash_code = __from->_M_hash_code; } 20472: 20472: void 20472: _M_swap(_Hash_code_base& __x) 20472: { 20472: std::swap(__ebo_extract_key::_M_get(), 20472: __x.__ebo_extract_key::_M_get()); 20472: std::swap(__ebo_h1::_M_get(), __x.__ebo_h1::_M_get()); 20472: std::swap(__ebo_h2::_M_get(), __x.__ebo_h2::_M_get()); 20472: } 20472: 20472: const _ExtractKey& 20472: _M_extract() const { return __ebo_extract_key::_M_cget(); } 20472: 20472: const _H1& 20472: _M_h1() const { return __ebo_h1::_M_cget(); } 20472: 20472: const _H2& 20472: _M_h2() const { return __ebo_h2::_M_cget(); } 20472: }; 20472: 20472: 20472: template 20472: struct _Local_iterator_base<_Key, _Value, _ExtractKey, 20472: _H1, _H2, _Hash, true> 20472: : private _Hashtable_ebo_helper<0, _H2> 20472: { 20472: protected: 20472: using __base_type = _Hashtable_ebo_helper<0, _H2>; 20472: using __hash_code_base = _Hash_code_base<_Key, _Value, _ExtractKey, 20472: _H1, _H2, _Hash, true>; 20472: 20472: _Local_iterator_base() = default; 20472: _Local_iterator_base(const __hash_code_base& __base, 20472: _Hash_node<_Value, true>* __p, 20472: std::size_t __bkt, std::size_t __bkt_count) 20472: : __base_type(__base._M_h2()), 20472: _M_cur(__p), _M_bucket(__bkt), _M_bucket_count(__bkt_count) { } 20472: 20472: void 20472: _M_incr() 20472: { 20472: _M_cur = _M_cur->_M_next(); 20472: if (_M_cur) 20472: { 20472: std::size_t __bkt 20472: = __base_type::_M_get()(_M_cur->_M_hash_code, 20472: _M_bucket_count); 20472: if (__bkt != _M_bucket) 20472: _M_cur = nullptr; 20472: } 20472: } 20472: 20472: _Hash_node<_Value, true>* _M_cur; 20472: std::size_t _M_bucket; 20472: std::size_t _M_bucket_count; 20472: 20472: public: 20472: const void* 20472: _M_curr() const { return _M_cur; } 20472: 20472: std::size_t 20472: _M_get_bucket() const { return _M_bucket; } 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: template::value> 20472: struct _Hash_code_storage 20472: { 20472: __gnu_cxx::__aligned_buffer<_Tp> _M_storage; 20472: 20472: _Tp* 20472: _M_h() { return _M_storage._M_ptr(); } 20472: 20472: const _Tp* 20472: _M_h() const { return _M_storage._M_ptr(); } 20472: }; 20472: 20472: 20472: template 20472: struct _Hash_code_storage<_Tp, true> 20472: { 20472: static_assert( std::is_empty<_Tp>::value, "Type must be empty" ); 20472: 20472: 20472: 20472: _Tp* 20472: _M_h() { return reinterpret_cast<_Tp*>(this); } 20472: 20472: const _Tp* 20472: _M_h() const { return reinterpret_cast(this); } 20472: }; 20472: 20472: template 20472: using __hash_code_for_local_iter 20472: = _Hash_code_storage<_Hash_code_base<_Key, _Value, _ExtractKey, 20472: _H1, _H2, _Hash, false>>; 20472: 20472: 20472: template 20472: struct _Local_iterator_base<_Key, _Value, _ExtractKey, 20472: _H1, _H2, _Hash, false> 20472: : __hash_code_for_local_iter<_Key, _Value, _ExtractKey, _H1, _H2, _Hash> 20472: { 20472: protected: 20472: using __hash_code_base = _Hash_code_base<_Key, _Value, _ExtractKey, 20472: _H1, _H2, _Hash, false>; 20472: 20472: _Local_iterator_base() : _M_bucket_count(-1) { } 20472: 20472: _Local_iterator_base(const __hash_code_base& __base, 20472: _Hash_node<_Value, false>* __p, 20472: std::size_t __bkt, std::size_t __bkt_count) 20472: : _M_cur(__p), _M_bucket(__bkt), _M_bucket_count(__bkt_count) 20472: { _M_init(__base); } 20472: 20472: ~_Local_iterator_base() 20472: { 20472: if (_M_bucket_count != -1) 20472: _M_destroy(); 20472: } 20472: 20472: _Local_iterator_base(const _Local_iterator_base& __iter) 20472: : _M_cur(__iter._M_cur), _M_bucket(__iter._M_bucket), 20472: _M_bucket_count(__iter._M_bucket_count) 20472: { 20472: if (_M_bucket_count != -1) 20472: _M_init(*__iter._M_h()); 20472: } 20472: 20472: _Local_iterator_base& 20472: operator=(const _Local_iterator_base& __iter) 20472: { 20472: if (_M_bucket_count != -1) 20472: _M_destroy(); 20472: _M_cur = __iter._M_cur; 20472: _M_bucket = __iter._M_bucket; 20472: _M_bucket_count = __iter._M_bucket_count; 20472: if (_M_bucket_count != -1) 20472: _M_init(*__iter._M_h()); 20472: return *this; 20472: } 20472: 20472: void 20472: _M_incr() 20472: { 20472: _M_cur = _M_cur->_M_next(); 20472: if (_M_cur) 20472: { 20472: std::size_t __bkt = this->_M_h()->_M_bucket_index(_M_cur, 20472: _M_bucket_count); 20472: if (__bkt != _M_bucket) 20472: _M_cur = nullptr; 20472: } 20472: } 20472: 20472: _Hash_node<_Value, false>* _M_cur; 20472: std::size_t _M_bucket; 20472: std::size_t _M_bucket_count; 20472: 20472: void 20472: _M_init(const __hash_code_base& __base) 20472: { ::new(this->_M_h()) __hash_code_base(__base); } 20472: 20472: void 20472: _M_destroy() { this->_M_h()->~__hash_code_base(); } 20472: 20472: public: 20472: const void* 20472: _M_curr() const { return _M_cur; } 20472: 20472: std::size_t 20472: _M_get_bucket() const { return _M_bucket; } 20472: }; 20472: 20472: template 20472: inline bool 20472: operator==(const _Local_iterator_base<_Key, _Value, _ExtractKey, 20472: _H1, _H2, _Hash, __cache>& __x, 20472: const _Local_iterator_base<_Key, _Value, _ExtractKey, 20472: _H1, _H2, _Hash, __cache>& __y) 20472: { return __x._M_curr() == __y._M_curr(); } 20472: 20472: template 20472: inline bool 20472: operator!=(const _Local_iterator_base<_Key, _Value, _ExtractKey, 20472: _H1, _H2, _Hash, __cache>& __x, 20472: const _Local_iterator_base<_Key, _Value, _ExtractKey, 20472: _H1, _H2, _Hash, __cache>& __y) 20472: { return __x._M_curr() != __y._M_curr(); } 20472: 20472: 20472: template 20472: struct _Local_iterator 20472: : public _Local_iterator_base<_Key, _Value, _ExtractKey, 20472: _H1, _H2, _Hash, __cache> 20472: { 20472: private: 20472: using __base_type = _Local_iterator_base<_Key, _Value, _ExtractKey, 20472: _H1, _H2, _Hash, __cache>; 20472: using __hash_code_base = typename __base_type::__hash_code_base; 20472: public: 20472: typedef _Value value_type; 20472: typedef typename std::conditional<__constant_iterators, 20472: const _Value*, _Value*>::type 20472: pointer; 20472: typedef typename std::conditional<__constant_iterators, 20472: const _Value&, _Value&>::type 20472: reference; 20472: typedef std::ptrdiff_t difference_type; 20472: typedef std::forward_iterator_tag iterator_category; 20472: 20472: _Local_iterator() = default; 20472: 20472: _Local_iterator(const __hash_code_base& __base, 20472: _Hash_node<_Value, __cache>* __n, 20472: std::size_t __bkt, std::size_t __bkt_count) 20472: : __base_type(__base, __n, __bkt, __bkt_count) 20472: { } 20472: 20472: reference 20472: operator*() const 20472: { return this->_M_cur->_M_v(); } 20472: 20472: pointer 20472: operator->() const 20472: { return this->_M_cur->_M_valptr(); } 20472: 20472: _Local_iterator& 20472: operator++() 20472: { 20472: this->_M_incr(); 20472: return *this; 20472: } 20472: 20472: _Local_iterator 20472: operator++(int) 20472: { 20472: _Local_iterator __tmp(*this); 20472: this->_M_incr(); 20472: return __tmp; 20472: } 20472: }; 20472: 20472: 20472: template 20472: struct _Local_const_iterator 20472: : public _Local_iterator_base<_Key, _Value, _ExtractKey, 20472: _H1, _H2, _Hash, __cache> 20472: { 20472: private: 20472: using __base_type = _Local_iterator_base<_Key, _Value, _ExtractKey, 20472: _H1, _H2, _Hash, __cache>; 20472: using __hash_code_base = typename __base_type::__hash_code_base; 20472: 20472: public: 20472: typedef _Value value_type; 20472: typedef const _Value* pointer; 20472: typedef const _Value& reference; 20472: typedef std::ptrdiff_t difference_type; 20472: typedef std::forward_iterator_tag iterator_category; 20472: 20472: _Local_const_iterator() = default; 20472: 20472: _Local_const_iterator(const __hash_code_base& __base, 20472: _Hash_node<_Value, __cache>* __n, 20472: std::size_t __bkt, std::size_t __bkt_count) 20472: : __base_type(__base, __n, __bkt, __bkt_count) 20472: { } 20472: 20472: _Local_const_iterator(const _Local_iterator<_Key, _Value, _ExtractKey, 20472: _H1, _H2, _Hash, 20472: __constant_iterators, 20472: __cache>& __x) 20472: : __base_type(__x) 20472: { } 20472: 20472: reference 20472: operator*() const 20472: { return this->_M_cur->_M_v(); } 20472: 20472: pointer 20472: operator->() const 20472: { return this->_M_cur->_M_valptr(); } 20472: 20472: _Local_const_iterator& 20472: operator++() 20472: { 20472: this->_M_incr(); 20472: return *this; 20472: } 20472: 20472: _Local_const_iterator 20472: operator++(int) 20472: { 20472: _Local_const_iterator __tmp(*this); 20472: this->_M_incr(); 20472: return __tmp; 20472: } 20472: }; 20472: # 1722 "/usr/include/c++/10/bits/hashtable_policy.h" 3 20472: template 20472: struct _Hashtable_base 20472: : public _Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, 20472: _Traits::__hash_cached::value>, 20472: private _Hashtable_ebo_helper<0, _Equal> 20472: { 20472: public: 20472: typedef _Key key_type; 20472: typedef _Value value_type; 20472: typedef _Equal key_equal; 20472: typedef std::size_t size_type; 20472: typedef std::ptrdiff_t difference_type; 20472: 20472: using __traits_type = _Traits; 20472: using __hash_cached = typename __traits_type::__hash_cached; 20472: using __constant_iterators = typename __traits_type::__constant_iterators; 20472: using __unique_keys = typename __traits_type::__unique_keys; 20472: 20472: using __hash_code_base = _Hash_code_base<_Key, _Value, _ExtractKey, 20472: _H1, _H2, _Hash, 20472: __hash_cached::value>; 20472: 20472: using __hash_code = typename __hash_code_base::__hash_code; 20472: using __node_type = typename __hash_code_base::__node_type; 20472: 20472: using iterator = __detail::_Node_iterator; 20472: 20472: using const_iterator = __detail::_Node_const_iterator; 20472: 20472: using local_iterator = __detail::_Local_iterator; 20472: 20472: using const_local_iterator = __detail::_Local_const_iterator; 20472: 20472: using __ireturn_type = typename std::conditional<__unique_keys::value, 20472: std::pair, 20472: iterator>::type; 20472: private: 20472: using _EqualEBO = _Hashtable_ebo_helper<0, _Equal>; 20472: 20472: template 20472: struct _Equal_hash_code 20472: { 20472: static bool 20472: _S_equals(__hash_code, const _NodeT&) 20472: { return true; } 20472: }; 20472: 20472: template 20472: struct _Equal_hash_code<_Hash_node<_Ptr2, true>> 20472: { 20472: static bool 20472: _S_equals(__hash_code __c, const _Hash_node<_Ptr2, true>& __n) 20472: { return __c == __n._M_hash_code; } 20472: }; 20472: 20472: protected: 20472: _Hashtable_base() = default; 20472: _Hashtable_base(const _ExtractKey& __ex, const _H1& __h1, const _H2& __h2, 20472: const _Hash& __hash, const _Equal& __eq) 20472: : __hash_code_base(__ex, __h1, __h2, __hash), _EqualEBO(__eq) 20472: { } 20472: 20472: bool 20472: _M_equals(const _Key& __k, __hash_code __c, __node_type* __n) const 20472: { 20472: static_assert(__is_invocable{}, 20472: "key equality predicate must be invocable with two arguments of " 20472: "key type"); 20472: return _Equal_hash_code<__node_type>::_S_equals(__c, *__n) 20472: && _M_eq()(__k, this->_M_extract()(__n->_M_v())); 20472: } 20472: 20472: void 20472: _M_swap(_Hashtable_base& __x) 20472: { 20472: __hash_code_base::_M_swap(__x); 20472: std::swap(_EqualEBO::_M_get(), __x._EqualEBO::_M_get()); 20472: } 20472: 20472: const _Equal& 20472: _M_eq() const { return _EqualEBO::_M_cget(); } 20472: }; 20472: # 1826 "/usr/include/c++/10/bits/hashtable_policy.h" 3 20472: template 20472: struct _Equality; 20472: 20472: 20472: template 20472: struct _Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits, true> 20472: { 20472: using __hashtable = _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits>; 20472: 20472: bool 20472: _M_equal(const __hashtable&) const; 20472: }; 20472: 20472: template 20472: bool 20472: _Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits, true>:: 20472: _M_equal(const __hashtable& __other) const 20472: { 20472: using __node_base = typename __hashtable::__node_base; 20472: using __node_type = typename __hashtable::__node_type; 20472: const __hashtable* __this = static_cast(this); 20472: if (__this->size() != __other.size()) 20472: return false; 20472: 20472: for (auto __itx = __this->begin(); __itx != __this->end(); ++__itx) 20472: { 20472: std::size_t __ybkt = __other._M_bucket_index(__itx._M_cur); 20472: __node_base* __prev_n = __other._M_buckets[__ybkt]; 20472: if (!__prev_n) 20472: return false; 20472: 20472: for (__node_type* __n = static_cast<__node_type*>(__prev_n->_M_nxt);; 20472: __n = __n->_M_next()) 20472: { 20472: if (__n->_M_v() == *__itx) 20472: break; 20472: 20472: if (!__n->_M_nxt 20472: || __other._M_bucket_index(__n->_M_next()) != __ybkt) 20472: return false; 20472: } 20472: } 20472: 20472: return true; 20472: } 20472: 20472: 20472: template 20472: struct _Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits, false> 20472: { 20472: using __hashtable = _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits>; 20472: 20472: bool 20472: _M_equal(const __hashtable&) const; 20472: }; 20472: 20472: template 20472: bool 20472: _Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits, false>:: 20472: _M_equal(const __hashtable& __other) const 20472: { 20472: using __node_base = typename __hashtable::__node_base; 20472: using __node_type = typename __hashtable::__node_type; 20472: const __hashtable* __this = static_cast(this); 20472: if (__this->size() != __other.size()) 20472: return false; 20472: 20472: for (auto __itx = __this->begin(); __itx != __this->end();) 20472: { 20472: std::size_t __x_count = 1; 20472: auto __itx_end = __itx; 20472: for (++__itx_end; __itx_end != __this->end() 20472: && __this->key_eq()(_ExtractKey()(*__itx), 20472: _ExtractKey()(*__itx_end)); 20472: ++__itx_end) 20472: ++__x_count; 20472: 20472: std::size_t __ybkt = __other._M_bucket_index(__itx._M_cur); 20472: __node_base* __y_prev_n = __other._M_buckets[__ybkt]; 20472: if (!__y_prev_n) 20472: return false; 20472: 20472: __node_type* __y_n = static_cast<__node_type*>(__y_prev_n->_M_nxt); 20472: for (;; __y_n = __y_n->_M_next()) 20472: { 20472: if (__this->key_eq()(_ExtractKey()(__y_n->_M_v()), 20472: _ExtractKey()(*__itx))) 20472: break; 20472: 20472: if (!__y_n->_M_nxt 20472: || __other._M_bucket_index(__y_n->_M_next()) != __ybkt) 20472: return false; 20472: } 20472: 20472: typename __hashtable::const_iterator __ity(__y_n); 20472: for (auto __ity_end = __ity; __ity_end != __other.end(); ++__ity_end) 20472: if (--__x_count == 0) 20472: break; 20472: 20472: if (__x_count != 0) 20472: return false; 20472: 20472: if (!std::is_permutation(__itx, __itx_end, __ity)) 20472: return false; 20472: 20472: __itx = __itx_end; 20472: } 20472: return true; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct _Hashtable_alloc : private _Hashtable_ebo_helper<0, _NodeAlloc> 20472: { 20472: private: 20472: using __ebo_node_alloc = _Hashtable_ebo_helper<0, _NodeAlloc>; 20472: public: 20472: using __node_type = typename _NodeAlloc::value_type; 20472: using __node_alloc_type = _NodeAlloc; 20472: 20472: using __node_alloc_traits = __gnu_cxx::__alloc_traits<__node_alloc_type>; 20472: 20472: using __value_alloc_traits = typename __node_alloc_traits::template 20472: rebind_traits; 20472: 20472: using __node_base = __detail::_Hash_node_base; 20472: using __bucket_type = __node_base*; 20472: using __bucket_alloc_type = 20472: __alloc_rebind<__node_alloc_type, __bucket_type>; 20472: using __bucket_alloc_traits = std::allocator_traits<__bucket_alloc_type>; 20472: 20472: _Hashtable_alloc() = default; 20472: _Hashtable_alloc(const _Hashtable_alloc&) = default; 20472: _Hashtable_alloc(_Hashtable_alloc&&) = default; 20472: 20472: template 20472: _Hashtable_alloc(_Alloc&& __a) 20472: : __ebo_node_alloc(std::forward<_Alloc>(__a)) 20472: { } 20472: 20472: __node_alloc_type& 20472: _M_node_allocator() 20472: { return __ebo_node_alloc::_M_get(); } 20472: 20472: const __node_alloc_type& 20472: _M_node_allocator() const 20472: { return __ebo_node_alloc::_M_cget(); } 20472: 20472: 20472: template 20472: __node_type* 20472: _M_allocate_node(_Args&&... __args); 20472: 20472: 20472: void 20472: _M_deallocate_node(__node_type* __n); 20472: 20472: 20472: void 20472: _M_deallocate_node_ptr(__node_type* __n); 20472: 20472: 20472: 20472: void 20472: _M_deallocate_nodes(__node_type* __n); 20472: 20472: __bucket_type* 20472: _M_allocate_buckets(std::size_t __bkt_count); 20472: 20472: void 20472: _M_deallocate_buckets(__bucket_type*, std::size_t __bkt_count); 20472: }; 20472: 20472: 20472: 20472: template 20472: template 20472: auto 20472: _Hashtable_alloc<_NodeAlloc>::_M_allocate_node(_Args&&... __args) 20472: -> __node_type* 20472: { 20472: auto __nptr = __node_alloc_traits::allocate(_M_node_allocator(), 1); 20472: __node_type* __n = std::__to_address(__nptr); 20472: try 20472: { 20472: ::new ((void*)__n) __node_type; 20472: __node_alloc_traits::construct(_M_node_allocator(), 20472: __n->_M_valptr(), 20472: std::forward<_Args>(__args)...); 20472: return __n; 20472: } 20472: catch(...) 20472: { 20472: __node_alloc_traits::deallocate(_M_node_allocator(), __nptr, 1); 20472: throw; 20472: } 20472: } 20472: 20472: template 20472: void 20472: _Hashtable_alloc<_NodeAlloc>::_M_deallocate_node(__node_type* __n) 20472: { 20472: __node_alloc_traits::destroy(_M_node_allocator(), __n->_M_valptr()); 20472: _M_deallocate_node_ptr(__n); 20472: } 20472: 20472: template 20472: void 20472: _Hashtable_alloc<_NodeAlloc>::_M_deallocate_node_ptr(__node_type* __n) 20472: { 20472: typedef typename __node_alloc_traits::pointer _Ptr; 20472: auto __ptr = std::pointer_traits<_Ptr>::pointer_to(*__n); 20472: __n->~__node_type(); 20472: __node_alloc_traits::deallocate(_M_node_allocator(), __ptr, 1); 20472: } 20472: 20472: template 20472: void 20472: _Hashtable_alloc<_NodeAlloc>::_M_deallocate_nodes(__node_type* __n) 20472: { 20472: while (__n) 20472: { 20472: __node_type* __tmp = __n; 20472: __n = __n->_M_next(); 20472: _M_deallocate_node(__tmp); 20472: } 20472: } 20472: 20472: template 20472: typename _Hashtable_alloc<_NodeAlloc>::__bucket_type* 20472: _Hashtable_alloc<_NodeAlloc>::_M_allocate_buckets(std::size_t __bkt_count) 20472: { 20472: __bucket_alloc_type __alloc(_M_node_allocator()); 20472: 20472: auto __ptr = __bucket_alloc_traits::allocate(__alloc, __bkt_count); 20472: __bucket_type* __p = std::__to_address(__ptr); 20472: __builtin_memset(__p, 0, __bkt_count * sizeof(__bucket_type)); 20472: return __p; 20472: } 20472: 20472: template 20472: void 20472: _Hashtable_alloc<_NodeAlloc>::_M_deallocate_buckets(__bucket_type* __bkts, 20472: std::size_t __bkt_count) 20472: { 20472: typedef typename __bucket_alloc_traits::pointer _Ptr; 20472: auto __ptr = std::pointer_traits<_Ptr>::pointer_to(*__bkts); 20472: __bucket_alloc_type __alloc(_M_node_allocator()); 20472: __bucket_alloc_traits::deallocate(__alloc, __ptr, __bkt_count); 20472: } 20472: 20472: 20472: } 20472: 20472: } 20472: # 36 "/usr/include/c++/10/bits/hashtable.h" 2 3 20472: 20472: 20472: 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: template 20472: using __cache_default 20472: = __not_<__and_< 20472: __is_fast_hash<_Hash>, 20472: 20472: __is_nothrow_invocable>>; 20472: # 169 "/usr/include/c++/10/bits/hashtable.h" 3 20472: template 20472: class _Hashtable 20472: : public __detail::_Hashtable_base<_Key, _Value, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _Traits>, 20472: public __detail::_Map_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits>, 20472: public __detail::_Insert<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits>, 20472: public __detail::_Rehash_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits>, 20472: public __detail::_Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits>, 20472: private __detail::_Hashtable_alloc< 20472: __alloc_rebind<_Alloc, 20472: __detail::_Hash_node<_Value, 20472: _Traits::__hash_cached::value>>> 20472: { 20472: static_assert(is_same::type, _Value>::value, 20472: "unordered container must have a non-const, non-volatile value_type"); 20472: 20472: static_assert(is_same{}, 20472: "unordered container must have the same value_type as its allocator"); 20472: 20472: 20472: using __traits_type = _Traits; 20472: using __hash_cached = typename __traits_type::__hash_cached; 20472: using __node_type = __detail::_Hash_node<_Value, __hash_cached::value>; 20472: using __node_alloc_type = __alloc_rebind<_Alloc, __node_type>; 20472: 20472: using __hashtable_alloc = __detail::_Hashtable_alloc<__node_alloc_type>; 20472: 20472: using __value_alloc_traits = 20472: typename __hashtable_alloc::__value_alloc_traits; 20472: using __node_alloc_traits = 20472: typename __hashtable_alloc::__node_alloc_traits; 20472: using __node_base = typename __hashtable_alloc::__node_base; 20472: using __bucket_type = typename __hashtable_alloc::__bucket_type; 20472: 20472: public: 20472: typedef _Key key_type; 20472: typedef _Value value_type; 20472: typedef _Alloc allocator_type; 20472: typedef _Equal key_equal; 20472: 20472: 20472: 20472: typedef typename __value_alloc_traits::pointer pointer; 20472: typedef typename __value_alloc_traits::const_pointer const_pointer; 20472: typedef value_type& reference; 20472: typedef const value_type& const_reference; 20472: 20472: private: 20472: using __rehash_type = _RehashPolicy; 20472: using __rehash_state = typename __rehash_type::_State; 20472: 20472: using __constant_iterators = typename __traits_type::__constant_iterators; 20472: using __unique_keys = typename __traits_type::__unique_keys; 20472: 20472: using __key_extract = typename std::conditional< 20472: __constant_iterators::value, 20472: __detail::_Identity, 20472: __detail::_Select1st>::type; 20472: 20472: using __hashtable_base = __detail:: 20472: _Hashtable_base<_Key, _Value, _ExtractKey, 20472: _Equal, _H1, _H2, _Hash, _Traits>; 20472: 20472: using __hash_code_base = typename __hashtable_base::__hash_code_base; 20472: using __hash_code = typename __hashtable_base::__hash_code; 20472: using __ireturn_type = typename __hashtable_base::__ireturn_type; 20472: 20472: using __map_base = __detail::_Map_base<_Key, _Value, _Alloc, _ExtractKey, 20472: _Equal, _H1, _H2, _Hash, 20472: _RehashPolicy, _Traits>; 20472: 20472: using __rehash_base = __detail::_Rehash_base<_Key, _Value, _Alloc, 20472: _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, 20472: _RehashPolicy, _Traits>; 20472: 20472: using __eq_base = __detail::_Equality<_Key, _Value, _Alloc, _ExtractKey, 20472: _Equal, _H1, _H2, _Hash, 20472: _RehashPolicy, _Traits>; 20472: 20472: using __reuse_or_alloc_node_gen_t = 20472: __detail::_ReuseOrAllocNode<__node_alloc_type>; 20472: using __alloc_node_gen_t = 20472: __detail::_AllocNode<__node_alloc_type>; 20472: 20472: 20472: struct _Scoped_node 20472: { 20472: 20472: _Scoped_node(__node_type* __n, __hashtable_alloc* __h) 20472: : _M_h(__h), _M_node(__n) { } 20472: 20472: 20472: template 20472: _Scoped_node(__hashtable_alloc* __h, _Args&&... __args) 20472: : _M_h(__h), 20472: _M_node(__h->_M_allocate_node(std::forward<_Args>(__args)...)) 20472: { } 20472: 20472: 20472: ~_Scoped_node() { if (_M_node) _M_h->_M_deallocate_node(_M_node); }; 20472: 20472: _Scoped_node(const _Scoped_node&) = delete; 20472: _Scoped_node& operator=(const _Scoped_node&) = delete; 20472: 20472: __hashtable_alloc* _M_h; 20472: __node_type* _M_node; 20472: }; 20472: 20472: template 20472: static constexpr 20472: typename conditional::value, 20472: const value_type&, value_type&&>::type 20472: __fwd_value_for(value_type& __val) noexcept 20472: { return std::move(__val); } 20472: 20472: 20472: template 20472: using __if_hash_cached = __or_<__not_<__hash_cached>, _Cond>; 20472: 20472: template 20472: using __if_hash_not_cached = __or_<__hash_cached, _Cond>; 20472: 20472: 20472: 20472: 20472: 20472: struct __hash_code_base_access : __hash_code_base 20472: { using __hash_code_base::_M_bucket_index; }; 20472: 20472: 20472: 20472: static_assert(noexcept(declval() 20472: ._M_bucket_index((const __node_type*)nullptr, 20472: (std::size_t)0)), 20472: "Cache the hash code or qualify your functors involved" 20472: " in hash code and bucket index computation with noexcept"); 20472: 20472: 20472: 20472: static_assert(__if_hash_cached>::value, 20472: "Functor used to map hash code to bucket index" 20472: " must be default constructible"); 20472: 20472: template 20472: friend struct __detail::_Map_base; 20472: 20472: template 20472: friend struct __detail::_Insert_base; 20472: 20472: template 20472: friend struct __detail::_Insert; 20472: 20472: template 20472: friend struct __detail::_Equality; 20472: 20472: public: 20472: using size_type = typename __hashtable_base::size_type; 20472: using difference_type = typename __hashtable_base::difference_type; 20472: 20472: using iterator = typename __hashtable_base::iterator; 20472: using const_iterator = typename __hashtable_base::const_iterator; 20472: 20472: using local_iterator = typename __hashtable_base::local_iterator; 20472: using const_local_iterator = typename __hashtable_base:: 20472: const_local_iterator; 20472: 20472: 20472: 20472: 20472: 20472: 20472: private: 20472: __bucket_type* _M_buckets = &_M_single_bucket; 20472: size_type _M_bucket_count = 1; 20472: __node_base _M_before_begin; 20472: size_type _M_element_count = 0; 20472: _RehashPolicy _M_rehash_policy; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: __bucket_type _M_single_bucket = nullptr; 20472: 20472: bool 20472: _M_uses_single_bucket(__bucket_type* __bkts) const 20472: { return __builtin_expect(__bkts == &_M_single_bucket, false); } 20472: 20472: bool 20472: _M_uses_single_bucket() const 20472: { return _M_uses_single_bucket(_M_buckets); } 20472: 20472: __hashtable_alloc& 20472: _M_base_alloc() { return *this; } 20472: 20472: __bucket_type* 20472: _M_allocate_buckets(size_type __bkt_count) 20472: { 20472: if (__builtin_expect(__bkt_count == 1, false)) 20472: { 20472: _M_single_bucket = nullptr; 20472: return &_M_single_bucket; 20472: } 20472: 20472: return __hashtable_alloc::_M_allocate_buckets(__bkt_count); 20472: } 20472: 20472: void 20472: _M_deallocate_buckets(__bucket_type* __bkts, size_type __bkt_count) 20472: { 20472: if (_M_uses_single_bucket(__bkts)) 20472: return; 20472: 20472: __hashtable_alloc::_M_deallocate_buckets(__bkts, __bkt_count); 20472: } 20472: 20472: void 20472: _M_deallocate_buckets() 20472: { _M_deallocate_buckets(_M_buckets, _M_bucket_count); } 20472: 20472: 20472: 20472: __node_type* 20472: _M_bucket_begin(size_type __bkt) const; 20472: 20472: __node_type* 20472: _M_begin() const 20472: { return static_cast<__node_type*>(_M_before_begin._M_nxt); } 20472: 20472: 20472: 20472: template 20472: void 20472: _M_assign_elements(_Ht&&); 20472: 20472: template 20472: void 20472: _M_assign(_Ht&&, const _NodeGenerator&); 20472: 20472: void 20472: _M_move_assign(_Hashtable&&, true_type); 20472: 20472: void 20472: _M_move_assign(_Hashtable&&, false_type); 20472: 20472: void 20472: _M_reset() noexcept; 20472: 20472: _Hashtable(const _H1& __h1, const _H2& __h2, const _Hash& __h, 20472: const _Equal& __eq, const _ExtractKey& __exk, 20472: const allocator_type& __a) 20472: : __hashtable_base(__exk, __h1, __h2, __h, __eq), 20472: __hashtable_alloc(__node_alloc_type(__a)) 20472: { } 20472: 20472: public: 20472: 20472: _Hashtable() = default; 20472: _Hashtable(size_type __bkt_count_hint, 20472: const _H1&, const _H2&, const _Hash&, 20472: const _Equal&, const _ExtractKey&, 20472: const allocator_type&); 20472: 20472: template 20472: _Hashtable(_InputIterator __first, _InputIterator __last, 20472: size_type __bkt_count_hint, 20472: const _H1&, const _H2&, const _Hash&, 20472: const _Equal&, const _ExtractKey&, 20472: const allocator_type&); 20472: 20472: _Hashtable(const _Hashtable&); 20472: 20472: _Hashtable(_Hashtable&&) noexcept; 20472: 20472: _Hashtable(const _Hashtable&, const allocator_type&); 20472: 20472: _Hashtable(_Hashtable&&, const allocator_type&); 20472: 20472: 20472: explicit 20472: _Hashtable(const allocator_type& __a) 20472: : __hashtable_alloc(__node_alloc_type(__a)) 20472: { } 20472: 20472: explicit 20472: _Hashtable(size_type __bkt_count_hint, 20472: const _H1& __hf = _H1(), 20472: const key_equal& __eql = key_equal(), 20472: const allocator_type& __a = allocator_type()) 20472: : _Hashtable(__bkt_count_hint, __hf, _H2(), _Hash(), __eql, 20472: __key_extract(), __a) 20472: { } 20472: 20472: template 20472: _Hashtable(_InputIterator __f, _InputIterator __l, 20472: size_type __bkt_count_hint = 0, 20472: const _H1& __hf = _H1(), 20472: const key_equal& __eql = key_equal(), 20472: const allocator_type& __a = allocator_type()) 20472: : _Hashtable(__f, __l, __bkt_count_hint, __hf, _H2(), _Hash(), __eql, 20472: __key_extract(), __a) 20472: { } 20472: 20472: _Hashtable(initializer_list __l, 20472: size_type __bkt_count_hint = 0, 20472: const _H1& __hf = _H1(), 20472: const key_equal& __eql = key_equal(), 20472: const allocator_type& __a = allocator_type()) 20472: : _Hashtable(__l.begin(), __l.end(), __bkt_count_hint, 20472: __hf, _H2(), _Hash(), __eql, 20472: __key_extract(), __a) 20472: { } 20472: 20472: _Hashtable& 20472: operator=(const _Hashtable& __ht); 20472: 20472: _Hashtable& 20472: operator=(_Hashtable&& __ht) 20472: noexcept(__node_alloc_traits::_S_nothrow_move() 20472: && is_nothrow_move_assignable<_H1>::value 20472: && is_nothrow_move_assignable<_Equal>::value) 20472: { 20472: constexpr bool __move_storage = 20472: __node_alloc_traits::_S_propagate_on_move_assign() 20472: || __node_alloc_traits::_S_always_equal(); 20472: _M_move_assign(std::move(__ht), __bool_constant<__move_storage>()); 20472: return *this; 20472: } 20472: 20472: _Hashtable& 20472: operator=(initializer_list __l) 20472: { 20472: __reuse_or_alloc_node_gen_t __roan(_M_begin(), *this); 20472: _M_before_begin._M_nxt = nullptr; 20472: clear(); 20472: this->_M_insert_range(__l.begin(), __l.end(), __roan, __unique_keys()); 20472: return *this; 20472: } 20472: 20472: ~_Hashtable() noexcept; 20472: 20472: void 20472: swap(_Hashtable&) 20472: noexcept(__and_<__is_nothrow_swappable<_H1>, 20472: __is_nothrow_swappable<_Equal>>::value); 20472: 20472: 20472: iterator 20472: begin() noexcept 20472: { return iterator(_M_begin()); } 20472: 20472: const_iterator 20472: begin() const noexcept 20472: { return const_iterator(_M_begin()); } 20472: 20472: iterator 20472: end() noexcept 20472: { return iterator(nullptr); } 20472: 20472: const_iterator 20472: end() const noexcept 20472: { return const_iterator(nullptr); } 20472: 20472: const_iterator 20472: cbegin() const noexcept 20472: { return const_iterator(_M_begin()); } 20472: 20472: const_iterator 20472: cend() const noexcept 20472: { return const_iterator(nullptr); } 20472: 20472: size_type 20472: size() const noexcept 20472: { return _M_element_count; } 20472: 20472: bool 20472: empty() const noexcept 20472: { return size() == 0; } 20472: 20472: allocator_type 20472: get_allocator() const noexcept 20472: { return allocator_type(this->_M_node_allocator()); } 20472: 20472: size_type 20472: max_size() const noexcept 20472: { return __node_alloc_traits::max_size(this->_M_node_allocator()); } 20472: 20472: 20472: key_equal 20472: key_eq() const 20472: { return this->_M_eq(); } 20472: 20472: 20472: 20472: 20472: size_type 20472: bucket_count() const noexcept 20472: { return _M_bucket_count; } 20472: 20472: size_type 20472: max_bucket_count() const noexcept 20472: { return max_size(); } 20472: 20472: size_type 20472: bucket_size(size_type __bkt) const 20472: { return std::distance(begin(__bkt), end(__bkt)); } 20472: 20472: size_type 20472: bucket(const key_type& __k) const 20472: { return _M_bucket_index(__k, this->_M_hash_code(__k)); } 20472: 20472: local_iterator 20472: begin(size_type __bkt) 20472: { 20472: return local_iterator(*this, _M_bucket_begin(__bkt), 20472: __bkt, _M_bucket_count); 20472: } 20472: 20472: local_iterator 20472: end(size_type __bkt) 20472: { return local_iterator(*this, nullptr, __bkt, _M_bucket_count); } 20472: 20472: const_local_iterator 20472: begin(size_type __bkt) const 20472: { 20472: return const_local_iterator(*this, _M_bucket_begin(__bkt), 20472: __bkt, _M_bucket_count); 20472: } 20472: 20472: const_local_iterator 20472: end(size_type __bkt) const 20472: { return const_local_iterator(*this, nullptr, __bkt, _M_bucket_count); } 20472: 20472: 20472: const_local_iterator 20472: cbegin(size_type __bkt) const 20472: { 20472: return const_local_iterator(*this, _M_bucket_begin(__bkt), 20472: __bkt, _M_bucket_count); 20472: } 20472: 20472: const_local_iterator 20472: cend(size_type __bkt) const 20472: { return const_local_iterator(*this, nullptr, __bkt, _M_bucket_count); } 20472: 20472: float 20472: load_factor() const noexcept 20472: { 20472: return static_cast(size()) / static_cast(bucket_count()); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: const _RehashPolicy& 20472: __rehash_policy() const 20472: { return _M_rehash_policy; } 20472: 20472: void 20472: __rehash_policy(const _RehashPolicy& __pol) 20472: { _M_rehash_policy = __pol; } 20472: 20472: 20472: iterator 20472: find(const key_type& __k); 20472: 20472: const_iterator 20472: find(const key_type& __k) const; 20472: 20472: size_type 20472: count(const key_type& __k) const; 20472: 20472: std::pair 20472: equal_range(const key_type& __k); 20472: 20472: std::pair 20472: equal_range(const key_type& __k) const; 20472: 20472: protected: 20472: 20472: size_type 20472: _M_bucket_index(__node_type* __n) const noexcept 20472: { return __hash_code_base::_M_bucket_index(__n, _M_bucket_count); } 20472: 20472: size_type 20472: _M_bucket_index(const key_type& __k, __hash_code __c) const 20472: { return __hash_code_base::_M_bucket_index(__k, __c, _M_bucket_count); } 20472: 20472: 20472: 20472: __node_base* 20472: _M_find_before_node(size_type, const key_type&, __hash_code) const; 20472: 20472: __node_type* 20472: _M_find_node(size_type __bkt, const key_type& __key, 20472: __hash_code __c) const 20472: { 20472: __node_base* __before_n = _M_find_before_node(__bkt, __key, __c); 20472: if (__before_n) 20472: return static_cast<__node_type*>(__before_n->_M_nxt); 20472: return nullptr; 20472: } 20472: 20472: 20472: void 20472: _M_insert_bucket_begin(size_type, __node_type*); 20472: 20472: 20472: void 20472: _M_remove_bucket_begin(size_type __bkt, __node_type* __next_n, 20472: size_type __next_bkt); 20472: 20472: 20472: __node_base* 20472: _M_get_previous_node(size_type __bkt, __node_base* __n); 20472: 20472: 20472: 20472: 20472: iterator 20472: _M_insert_unique_node(const key_type& __k, size_type __bkt, 20472: __hash_code __code, __node_type* __n, 20472: size_type __n_elt = 1); 20472: 20472: 20472: 20472: iterator 20472: _M_insert_multi_node(__node_type* __hint, const key_type& __k, 20472: __hash_code __code, __node_type* __n); 20472: 20472: template 20472: std::pair 20472: _M_emplace(true_type, _Args&&... __args); 20472: 20472: template 20472: iterator 20472: _M_emplace(false_type __uk, _Args&&... __args) 20472: { return _M_emplace(cend(), __uk, std::forward<_Args>(__args)...); } 20472: 20472: 20472: template 20472: iterator 20472: _M_emplace(const_iterator, true_type __uk, _Args&&... __args) 20472: { return _M_emplace(__uk, std::forward<_Args>(__args)...).first; } 20472: 20472: template 20472: iterator 20472: _M_emplace(const_iterator, false_type, _Args&&... __args); 20472: 20472: template 20472: std::pair 20472: _M_insert(_Arg&&, const _NodeGenerator&, true_type, size_type = 1); 20472: 20472: template 20472: iterator 20472: _M_insert(_Arg&& __arg, const _NodeGenerator& __node_gen, 20472: false_type __uk) 20472: { 20472: return _M_insert(cend(), std::forward<_Arg>(__arg), __node_gen, 20472: __uk); 20472: } 20472: 20472: 20472: template 20472: iterator 20472: _M_insert(const_iterator, _Arg&& __arg, 20472: const _NodeGenerator& __node_gen, true_type __uk) 20472: { 20472: return 20472: _M_insert(std::forward<_Arg>(__arg), __node_gen, __uk).first; 20472: } 20472: 20472: 20472: template 20472: iterator 20472: _M_insert(const_iterator, _Arg&&, 20472: const _NodeGenerator&, false_type); 20472: 20472: size_type 20472: _M_erase(true_type, const key_type&); 20472: 20472: size_type 20472: _M_erase(false_type, const key_type&); 20472: 20472: iterator 20472: _M_erase(size_type __bkt, __node_base* __prev_n, __node_type* __n); 20472: 20472: public: 20472: 20472: template 20472: __ireturn_type 20472: emplace(_Args&&... __args) 20472: { return _M_emplace(__unique_keys(), std::forward<_Args>(__args)...); } 20472: 20472: template 20472: iterator 20472: emplace_hint(const_iterator __hint, _Args&&... __args) 20472: { 20472: return _M_emplace(__hint, __unique_keys(), 20472: std::forward<_Args>(__args)...); 20472: } 20472: 20472: 20472: 20472: 20472: iterator 20472: erase(const_iterator); 20472: 20472: 20472: iterator 20472: erase(iterator __it) 20472: { return erase(const_iterator(__it)); } 20472: 20472: size_type 20472: erase(const key_type& __k) 20472: { return _M_erase(__unique_keys(), __k); } 20472: 20472: iterator 20472: erase(const_iterator, const_iterator); 20472: 20472: void 20472: clear() noexcept; 20472: 20472: 20472: 20472: void rehash(size_type __bkt_count); 20472: # 962 "/usr/include/c++/10/bits/hashtable.h" 3 20472: private: 20472: 20472: void _M_rehash_aux(size_type __bkt_count, true_type); 20472: 20472: 20472: void _M_rehash_aux(size_type __bkt_count, false_type); 20472: 20472: 20472: 20472: void _M_rehash(size_type __bkt_count, const __rehash_state& __state); 20472: }; 20472: 20472: 20472: 20472: template 20472: auto 20472: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 20472: _M_bucket_begin(size_type __bkt) const 20472: -> __node_type* 20472: { 20472: __node_base* __n = _M_buckets[__bkt]; 20472: return __n ? static_cast<__node_type*>(__n->_M_nxt) : nullptr; 20472: } 20472: 20472: template 20472: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 20472: _Hashtable(size_type __bkt_count_hint, 20472: const _H1& __h1, const _H2& __h2, const _Hash& __h, 20472: const _Equal& __eq, const _ExtractKey& __exk, 20472: const allocator_type& __a) 20472: : _Hashtable(__h1, __h2, __h, __eq, __exk, __a) 20472: { 20472: auto __bkt_count = _M_rehash_policy._M_next_bkt(__bkt_count_hint); 20472: if (__bkt_count > _M_bucket_count) 20472: { 20472: _M_buckets = _M_allocate_buckets(__bkt_count); 20472: _M_bucket_count = __bkt_count; 20472: } 20472: } 20472: 20472: template 20472: template 20472: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 20472: _Hashtable(_InputIterator __f, _InputIterator __l, 20472: size_type __bkt_count_hint, 20472: const _H1& __h1, const _H2& __h2, const _Hash& __h, 20472: const _Equal& __eq, const _ExtractKey& __exk, 20472: const allocator_type& __a) 20472: : _Hashtable(__h1, __h2, __h, __eq, __exk, __a) 20472: { 20472: auto __nb_elems = __detail::__distance_fw(__f, __l); 20472: auto __bkt_count = 20472: _M_rehash_policy._M_next_bkt( 20472: std::max(_M_rehash_policy._M_bkt_for_elements(__nb_elems), 20472: __bkt_count_hint)); 20472: 20472: if (__bkt_count > _M_bucket_count) 20472: { 20472: _M_buckets = _M_allocate_buckets(__bkt_count); 20472: _M_bucket_count = __bkt_count; 20472: } 20472: 20472: for (; __f != __l; ++__f) 20472: this->insert(*__f); 20472: } 20472: 20472: template 20472: auto 20472: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 20472: operator=(const _Hashtable& __ht) 20472: -> _Hashtable& 20472: { 20472: if (&__ht == this) 20472: return *this; 20472: 20472: if (__node_alloc_traits::_S_propagate_on_copy_assign()) 20472: { 20472: auto& __this_alloc = this->_M_node_allocator(); 20472: auto& __that_alloc = __ht._M_node_allocator(); 20472: if (!__node_alloc_traits::_S_always_equal() 20472: && __this_alloc != __that_alloc) 20472: { 20472: 20472: this->_M_deallocate_nodes(_M_begin()); 20472: _M_before_begin._M_nxt = nullptr; 20472: _M_deallocate_buckets(); 20472: _M_buckets = nullptr; 20472: std::__alloc_on_copy(__this_alloc, __that_alloc); 20472: __hashtable_base::operator=(__ht); 20472: _M_bucket_count = __ht._M_bucket_count; 20472: _M_element_count = __ht._M_element_count; 20472: _M_rehash_policy = __ht._M_rehash_policy; 20472: __alloc_node_gen_t __alloc_node_gen(*this); 20472: try 20472: { 20472: _M_assign(__ht, __alloc_node_gen); 20472: } 20472: catch(...) 20472: { 20472: 20472: 20472: _M_reset(); 20472: throw; 20472: } 20472: return *this; 20472: } 20472: std::__alloc_on_copy(__this_alloc, __that_alloc); 20472: } 20472: 20472: 20472: _M_assign_elements(__ht); 20472: return *this; 20472: } 20472: 20472: template 20472: template 20472: void 20472: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 20472: _M_assign_elements(_Ht&& __ht) 20472: { 20472: __bucket_type* __former_buckets = nullptr; 20472: std::size_t __former_bucket_count = _M_bucket_count; 20472: const __rehash_state& __former_state = _M_rehash_policy._M_state(); 20472: 20472: if (_M_bucket_count != __ht._M_bucket_count) 20472: { 20472: __former_buckets = _M_buckets; 20472: _M_buckets = _M_allocate_buckets(__ht._M_bucket_count); 20472: _M_bucket_count = __ht._M_bucket_count; 20472: } 20472: else 20472: __builtin_memset(_M_buckets, 0, 20472: _M_bucket_count * sizeof(__bucket_type)); 20472: 20472: try 20472: { 20472: __hashtable_base::operator=(std::forward<_Ht>(__ht)); 20472: _M_element_count = __ht._M_element_count; 20472: _M_rehash_policy = __ht._M_rehash_policy; 20472: __reuse_or_alloc_node_gen_t __roan(_M_begin(), *this); 20472: _M_before_begin._M_nxt = nullptr; 20472: _M_assign(std::forward<_Ht>(__ht), __roan); 20472: if (__former_buckets) 20472: _M_deallocate_buckets(__former_buckets, __former_bucket_count); 20472: } 20472: catch(...) 20472: { 20472: if (__former_buckets) 20472: { 20472: 20472: _M_deallocate_buckets(); 20472: _M_rehash_policy._M_reset(__former_state); 20472: _M_buckets = __former_buckets; 20472: _M_bucket_count = __former_bucket_count; 20472: } 20472: __builtin_memset(_M_buckets, 0, 20472: _M_bucket_count * sizeof(__bucket_type)); 20472: throw; 20472: } 20472: } 20472: 20472: template 20472: template 20472: void 20472: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 20472: _M_assign(_Ht&& __ht, const _NodeGenerator& __node_gen) 20472: { 20472: __bucket_type* __buckets = nullptr; 20472: if (!_M_buckets) 20472: _M_buckets = __buckets = _M_allocate_buckets(_M_bucket_count); 20472: 20472: try 20472: { 20472: if (!__ht._M_before_begin._M_nxt) 20472: return; 20472: 20472: 20472: 20472: __node_type* __ht_n = __ht._M_begin(); 20472: __node_type* __this_n 20472: = __node_gen(__fwd_value_for<_Ht>(__ht_n->_M_v())); 20472: this->_M_copy_code(__this_n, __ht_n); 20472: _M_before_begin._M_nxt = __this_n; 20472: _M_buckets[_M_bucket_index(__this_n)] = &_M_before_begin; 20472: 20472: 20472: __node_base* __prev_n = __this_n; 20472: for (__ht_n = __ht_n->_M_next(); __ht_n; __ht_n = __ht_n->_M_next()) 20472: { 20472: __this_n = __node_gen(__fwd_value_for<_Ht>(__ht_n->_M_v())); 20472: __prev_n->_M_nxt = __this_n; 20472: this->_M_copy_code(__this_n, __ht_n); 20472: size_type __bkt = _M_bucket_index(__this_n); 20472: if (!_M_buckets[__bkt]) 20472: _M_buckets[__bkt] = __prev_n; 20472: __prev_n = __this_n; 20472: } 20472: } 20472: catch(...) 20472: { 20472: clear(); 20472: if (__buckets) 20472: _M_deallocate_buckets(); 20472: throw; 20472: } 20472: } 20472: 20472: template 20472: void 20472: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 20472: _M_reset() noexcept 20472: { 20472: _M_rehash_policy._M_reset(); 20472: _M_bucket_count = 1; 20472: _M_single_bucket = nullptr; 20472: _M_buckets = &_M_single_bucket; 20472: _M_before_begin._M_nxt = nullptr; 20472: _M_element_count = 0; 20472: } 20472: 20472: template 20472: void 20472: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 20472: _M_move_assign(_Hashtable&& __ht, true_type) 20472: { 20472: this->_M_deallocate_nodes(_M_begin()); 20472: _M_deallocate_buckets(); 20472: __hashtable_base::operator=(std::move(__ht)); 20472: _M_rehash_policy = __ht._M_rehash_policy; 20472: if (!__ht._M_uses_single_bucket()) 20472: _M_buckets = __ht._M_buckets; 20472: else 20472: { 20472: _M_buckets = &_M_single_bucket; 20472: _M_single_bucket = __ht._M_single_bucket; 20472: } 20472: _M_bucket_count = __ht._M_bucket_count; 20472: _M_before_begin._M_nxt = __ht._M_before_begin._M_nxt; 20472: _M_element_count = __ht._M_element_count; 20472: std::__alloc_on_move(this->_M_node_allocator(), __ht._M_node_allocator()); 20472: 20472: 20472: 20472: if (_M_begin()) 20472: _M_buckets[_M_bucket_index(_M_begin())] = &_M_before_begin; 20472: __ht._M_reset(); 20472: } 20472: 20472: template 20472: void 20472: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 20472: _M_move_assign(_Hashtable&& __ht, false_type) 20472: { 20472: if (__ht._M_node_allocator() == this->_M_node_allocator()) 20472: _M_move_assign(std::move(__ht), true_type()); 20472: else 20472: { 20472: 20472: _M_assign_elements(std::move(__ht)); 20472: __ht.clear(); 20472: } 20472: } 20472: 20472: template 20472: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 20472: _Hashtable(const _Hashtable& __ht) 20472: : __hashtable_base(__ht), 20472: __map_base(__ht), 20472: __rehash_base(__ht), 20472: __hashtable_alloc( 20472: __node_alloc_traits::_S_select_on_copy(__ht._M_node_allocator())), 20472: _M_buckets(nullptr), 20472: _M_bucket_count(__ht._M_bucket_count), 20472: _M_element_count(__ht._M_element_count), 20472: _M_rehash_policy(__ht._M_rehash_policy) 20472: { 20472: __alloc_node_gen_t __alloc_node_gen(*this); 20472: _M_assign(__ht, __alloc_node_gen); 20472: } 20472: 20472: template 20472: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 20472: _Hashtable(_Hashtable&& __ht) noexcept 20472: : __hashtable_base(__ht), 20472: __map_base(__ht), 20472: __rehash_base(__ht), 20472: __hashtable_alloc(std::move(__ht._M_base_alloc())), 20472: _M_buckets(__ht._M_buckets), 20472: _M_bucket_count(__ht._M_bucket_count), 20472: _M_before_begin(__ht._M_before_begin._M_nxt), 20472: _M_element_count(__ht._M_element_count), 20472: _M_rehash_policy(__ht._M_rehash_policy) 20472: { 20472: 20472: if (__ht._M_uses_single_bucket()) 20472: { 20472: _M_buckets = &_M_single_bucket; 20472: _M_single_bucket = __ht._M_single_bucket; 20472: } 20472: 20472: 20472: 20472: if (_M_begin()) 20472: _M_buckets[_M_bucket_index(_M_begin())] = &_M_before_begin; 20472: 20472: __ht._M_reset(); 20472: } 20472: 20472: template 20472: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 20472: _Hashtable(const _Hashtable& __ht, const allocator_type& __a) 20472: : __hashtable_base(__ht), 20472: __map_base(__ht), 20472: __rehash_base(__ht), 20472: __hashtable_alloc(__node_alloc_type(__a)), 20472: _M_buckets(), 20472: _M_bucket_count(__ht._M_bucket_count), 20472: _M_element_count(__ht._M_element_count), 20472: _M_rehash_policy(__ht._M_rehash_policy) 20472: { 20472: __alloc_node_gen_t __alloc_node_gen(*this); 20472: _M_assign(__ht, __alloc_node_gen); 20472: } 20472: 20472: template 20472: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 20472: _Hashtable(_Hashtable&& __ht, const allocator_type& __a) 20472: : __hashtable_base(__ht), 20472: __map_base(__ht), 20472: __rehash_base(__ht), 20472: __hashtable_alloc(__node_alloc_type(__a)), 20472: _M_buckets(nullptr), 20472: _M_bucket_count(__ht._M_bucket_count), 20472: _M_element_count(__ht._M_element_count), 20472: _M_rehash_policy(__ht._M_rehash_policy) 20472: { 20472: if (__ht._M_node_allocator() == this->_M_node_allocator()) 20472: { 20472: if (__ht._M_uses_single_bucket()) 20472: { 20472: _M_buckets = &_M_single_bucket; 20472: _M_single_bucket = __ht._M_single_bucket; 20472: } 20472: else 20472: _M_buckets = __ht._M_buckets; 20472: 20472: _M_before_begin._M_nxt = __ht._M_before_begin._M_nxt; 20472: 20472: 20472: if (_M_begin()) 20472: _M_buckets[_M_bucket_index(_M_begin())] = &_M_before_begin; 20472: __ht._M_reset(); 20472: } 20472: else 20472: { 20472: __alloc_node_gen_t __alloc_gen(*this); 20472: 20472: using _Fwd_Ht = typename 20472: conditional<__move_if_noexcept_cond::value, 20472: const _Hashtable&, _Hashtable&&>::type; 20472: _M_assign(std::forward<_Fwd_Ht>(__ht), __alloc_gen); 20472: __ht.clear(); 20472: } 20472: } 20472: 20472: template 20472: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 20472: ~_Hashtable() noexcept 20472: { 20472: clear(); 20472: _M_deallocate_buckets(); 20472: } 20472: 20472: template 20472: void 20472: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 20472: swap(_Hashtable& __x) 20472: noexcept(__and_<__is_nothrow_swappable<_H1>, 20472: __is_nothrow_swappable<_Equal>>::value) 20472: { 20472: 20472: 20472: 20472: this->_M_swap(__x); 20472: 20472: std::__alloc_on_swap(this->_M_node_allocator(), __x._M_node_allocator()); 20472: std::swap(_M_rehash_policy, __x._M_rehash_policy); 20472: 20472: 20472: if (this->_M_uses_single_bucket()) 20472: { 20472: if (!__x._M_uses_single_bucket()) 20472: { 20472: _M_buckets = __x._M_buckets; 20472: __x._M_buckets = &__x._M_single_bucket; 20472: } 20472: } 20472: else if (__x._M_uses_single_bucket()) 20472: { 20472: __x._M_buckets = _M_buckets; 20472: _M_buckets = &_M_single_bucket; 20472: } 20472: else 20472: std::swap(_M_buckets, __x._M_buckets); 20472: 20472: std::swap(_M_bucket_count, __x._M_bucket_count); 20472: std::swap(_M_before_begin._M_nxt, __x._M_before_begin._M_nxt); 20472: std::swap(_M_element_count, __x._M_element_count); 20472: std::swap(_M_single_bucket, __x._M_single_bucket); 20472: 20472: 20472: 20472: if (_M_begin()) 20472: _M_buckets[_M_bucket_index(_M_begin())] = &_M_before_begin; 20472: 20472: if (__x._M_begin()) 20472: __x._M_buckets[__x._M_bucket_index(__x._M_begin())] 20472: = &__x._M_before_begin; 20472: } 20472: 20472: template 20472: auto 20472: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 20472: find(const key_type& __k) 20472: -> iterator 20472: { 20472: __hash_code __code = this->_M_hash_code(__k); 20472: std::size_t __bkt = _M_bucket_index(__k, __code); 20472: __node_type* __p = _M_find_node(__bkt, __k, __code); 20472: return __p ? iterator(__p) : end(); 20472: } 20472: 20472: template 20472: auto 20472: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 20472: find(const key_type& __k) const 20472: -> const_iterator 20472: { 20472: __hash_code __code = this->_M_hash_code(__k); 20472: std::size_t __bkt = _M_bucket_index(__k, __code); 20472: __node_type* __p = _M_find_node(__bkt, __k, __code); 20472: return __p ? const_iterator(__p) : end(); 20472: } 20472: 20472: template 20472: auto 20472: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 20472: count(const key_type& __k) const 20472: -> size_type 20472: { 20472: __hash_code __code = this->_M_hash_code(__k); 20472: std::size_t __bkt = _M_bucket_index(__k, __code); 20472: __node_type* __p = _M_bucket_begin(__bkt); 20472: if (!__p) 20472: return 0; 20472: 20472: std::size_t __result = 0; 20472: for (;; __p = __p->_M_next()) 20472: { 20472: if (this->_M_equals(__k, __code, __p)) 20472: ++__result; 20472: else if (__result) 20472: 20472: 20472: 20472: break; 20472: if (!__p->_M_nxt || _M_bucket_index(__p->_M_next()) != __bkt) 20472: break; 20472: } 20472: return __result; 20472: } 20472: 20472: template 20472: auto 20472: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 20472: equal_range(const key_type& __k) 20472: -> pair 20472: { 20472: __hash_code __code = this->_M_hash_code(__k); 20472: std::size_t __bkt = _M_bucket_index(__k, __code); 20472: __node_type* __p = _M_find_node(__bkt, __k, __code); 20472: 20472: if (__p) 20472: { 20472: __node_type* __p1 = __p->_M_next(); 20472: while (__p1 && _M_bucket_index(__p1) == __bkt 20472: && this->_M_equals(__k, __code, __p1)) 20472: __p1 = __p1->_M_next(); 20472: 20472: return std::make_pair(iterator(__p), iterator(__p1)); 20472: } 20472: else 20472: return std::make_pair(end(), end()); 20472: } 20472: 20472: template 20472: auto 20472: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 20472: equal_range(const key_type& __k) const 20472: -> pair 20472: { 20472: __hash_code __code = this->_M_hash_code(__k); 20472: std::size_t __bkt = _M_bucket_index(__k, __code); 20472: __node_type* __p = _M_find_node(__bkt, __k, __code); 20472: 20472: if (__p) 20472: { 20472: __node_type* __p1 = __p->_M_next(); 20472: while (__p1 && _M_bucket_index(__p1) == __bkt 20472: && this->_M_equals(__k, __code, __p1)) 20472: __p1 = __p1->_M_next(); 20472: 20472: return std::make_pair(const_iterator(__p), const_iterator(__p1)); 20472: } 20472: else 20472: return std::make_pair(end(), end()); 20472: } 20472: 20472: 20472: 20472: template 20472: auto 20472: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 20472: _M_find_before_node(size_type __bkt, const key_type& __k, 20472: __hash_code __code) const 20472: -> __node_base* 20472: { 20472: __node_base* __prev_p = _M_buckets[__bkt]; 20472: if (!__prev_p) 20472: return nullptr; 20472: 20472: for (__node_type* __p = static_cast<__node_type*>(__prev_p->_M_nxt);; 20472: __p = __p->_M_next()) 20472: { 20472: if (this->_M_equals(__k, __code, __p)) 20472: return __prev_p; 20472: 20472: if (!__p->_M_nxt || _M_bucket_index(__p->_M_next()) != __bkt) 20472: break; 20472: __prev_p = __p; 20472: } 20472: return nullptr; 20472: } 20472: 20472: template 20472: void 20472: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 20472: _M_insert_bucket_begin(size_type __bkt, __node_type* __node) 20472: { 20472: if (_M_buckets[__bkt]) 20472: { 20472: 20472: 20472: __node->_M_nxt = _M_buckets[__bkt]->_M_nxt; 20472: _M_buckets[__bkt]->_M_nxt = __node; 20472: } 20472: else 20472: { 20472: 20472: 20472: 20472: __node->_M_nxt = _M_before_begin._M_nxt; 20472: _M_before_begin._M_nxt = __node; 20472: if (__node->_M_nxt) 20472: 20472: 20472: _M_buckets[_M_bucket_index(__node->_M_next())] = __node; 20472: _M_buckets[__bkt] = &_M_before_begin; 20472: } 20472: } 20472: 20472: template 20472: void 20472: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 20472: _M_remove_bucket_begin(size_type __bkt, __node_type* __next, 20472: size_type __next_bkt) 20472: { 20472: if (!__next || __next_bkt != __bkt) 20472: { 20472: 20472: 20472: if (__next) 20472: _M_buckets[__next_bkt] = _M_buckets[__bkt]; 20472: 20472: 20472: if (&_M_before_begin == _M_buckets[__bkt]) 20472: _M_before_begin._M_nxt = __next; 20472: _M_buckets[__bkt] = nullptr; 20472: } 20472: } 20472: 20472: template 20472: auto 20472: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 20472: _M_get_previous_node(size_type __bkt, __node_base* __n) 20472: -> __node_base* 20472: { 20472: __node_base* __prev_n = _M_buckets[__bkt]; 20472: while (__prev_n->_M_nxt != __n) 20472: __prev_n = __prev_n->_M_nxt; 20472: return __prev_n; 20472: } 20472: 20472: template 20472: template 20472: auto 20472: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 20472: _M_emplace(true_type, _Args&&... __args) 20472: -> pair 20472: { 20472: 20472: _Scoped_node __node { this, std::forward<_Args>(__args)... }; 20472: const key_type& __k = this->_M_extract()(__node._M_node->_M_v()); 20472: __hash_code __code = this->_M_hash_code(__k); 20472: size_type __bkt = _M_bucket_index(__k, __code); 20472: if (__node_type* __p = _M_find_node(__bkt, __k, __code)) 20472: 20472: return std::make_pair(iterator(__p), false); 20472: 20472: 20472: auto __pos = _M_insert_unique_node(__k, __bkt, __code, __node._M_node); 20472: __node._M_node = nullptr; 20472: return { __pos, true }; 20472: } 20472: 20472: template 20472: template 20472: auto 20472: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 20472: _M_emplace(const_iterator __hint, false_type, _Args&&... __args) 20472: -> iterator 20472: { 20472: 20472: _Scoped_node __node { this, std::forward<_Args>(__args)... }; 20472: const key_type& __k = this->_M_extract()(__node._M_node->_M_v()); 20472: 20472: __hash_code __code = this->_M_hash_code(__k); 20472: auto __pos 20472: = _M_insert_multi_node(__hint._M_cur, __k, __code, __node._M_node); 20472: __node._M_node = nullptr; 20472: return __pos; 20472: } 20472: 20472: template 20472: auto 20472: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 20472: _M_insert_unique_node(const key_type& __k, size_type __bkt, 20472: __hash_code __code, __node_type* __node, 20472: size_type __n_elt) 20472: -> iterator 20472: { 20472: const __rehash_state& __saved_state = _M_rehash_policy._M_state(); 20472: std::pair __do_rehash 20472: = _M_rehash_policy._M_need_rehash(_M_bucket_count, _M_element_count, 20472: __n_elt); 20472: 20472: if (__do_rehash.first) 20472: { 20472: _M_rehash(__do_rehash.second, __saved_state); 20472: __bkt = _M_bucket_index(__k, __code); 20472: } 20472: 20472: this->_M_store_code(__node, __code); 20472: 20472: 20472: _M_insert_bucket_begin(__bkt, __node); 20472: ++_M_element_count; 20472: return iterator(__node); 20472: } 20472: 20472: template 20472: auto 20472: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 20472: _M_insert_multi_node(__node_type* __hint, const key_type& __k, 20472: __hash_code __code, __node_type* __node) 20472: -> iterator 20472: { 20472: const __rehash_state& __saved_state = _M_rehash_policy._M_state(); 20472: std::pair __do_rehash 20472: = _M_rehash_policy._M_need_rehash(_M_bucket_count, _M_element_count, 1); 20472: 20472: if (__do_rehash.first) 20472: _M_rehash(__do_rehash.second, __saved_state); 20472: 20472: this->_M_store_code(__node, __code); 20472: size_type __bkt = _M_bucket_index(__k, __code); 20472: 20472: 20472: 20472: __node_base* __prev 20472: = __builtin_expect(__hint != nullptr, false) 20472: && this->_M_equals(__k, __code, __hint) 20472: ? __hint 20472: : _M_find_before_node(__bkt, __k, __code); 20472: if (__prev) 20472: { 20472: 20472: __node->_M_nxt = __prev->_M_nxt; 20472: __prev->_M_nxt = __node; 20472: if (__builtin_expect(__prev == __hint, false)) 20472: 20472: 20472: if (__node->_M_nxt 20472: && !this->_M_equals(__k, __code, __node->_M_next())) 20472: { 20472: size_type __next_bkt = _M_bucket_index(__node->_M_next()); 20472: if (__next_bkt != __bkt) 20472: _M_buckets[__next_bkt] = __node; 20472: } 20472: } 20472: else 20472: 20472: 20472: 20472: _M_insert_bucket_begin(__bkt, __node); 20472: ++_M_element_count; 20472: return iterator(__node); 20472: } 20472: 20472: 20472: template 20472: template 20472: auto 20472: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 20472: _M_insert(_Arg&& __v, const _NodeGenerator& __node_gen, true_type, 20472: size_type __n_elt) 20472: -> pair 20472: { 20472: const key_type& __k = this->_M_extract()(__v); 20472: __hash_code __code = this->_M_hash_code(__k); 20472: size_type __bkt = _M_bucket_index(__k, __code); 20472: 20472: if (__node_type* __node = _M_find_node(__bkt, __k, __code)) 20472: return { iterator(__node), false }; 20472: 20472: _Scoped_node __node{ __node_gen(std::forward<_Arg>(__v)), this }; 20472: auto __pos 20472: = _M_insert_unique_node(__k, __bkt, __code, __node._M_node, __n_elt); 20472: __node._M_node = nullptr; 20472: return { __pos, true }; 20472: } 20472: 20472: 20472: template 20472: template 20472: auto 20472: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 20472: _M_insert(const_iterator __hint, _Arg&& __v, 20472: const _NodeGenerator& __node_gen, false_type) 20472: -> iterator 20472: { 20472: 20472: 20472: __hash_code __code = this->_M_hash_code(this->_M_extract()(__v)); 20472: 20472: 20472: _Scoped_node __node{ __node_gen(std::forward<_Arg>(__v)), this }; 20472: const key_type& __k = this->_M_extract()(__node._M_node->_M_v()); 20472: auto __pos 20472: = _M_insert_multi_node(__hint._M_cur, __k, __code, __node._M_node); 20472: __node._M_node = nullptr; 20472: return __pos; 20472: } 20472: 20472: template 20472: auto 20472: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 20472: erase(const_iterator __it) 20472: -> iterator 20472: { 20472: __node_type* __n = __it._M_cur; 20472: std::size_t __bkt = _M_bucket_index(__n); 20472: 20472: 20472: 20472: 20472: __node_base* __prev_n = _M_get_previous_node(__bkt, __n); 20472: return _M_erase(__bkt, __prev_n, __n); 20472: } 20472: 20472: template 20472: auto 20472: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 20472: _M_erase(size_type __bkt, __node_base* __prev_n, __node_type* __n) 20472: -> iterator 20472: { 20472: if (__prev_n == _M_buckets[__bkt]) 20472: _M_remove_bucket_begin(__bkt, __n->_M_next(), 20472: __n->_M_nxt ? _M_bucket_index(__n->_M_next()) : 0); 20472: else if (__n->_M_nxt) 20472: { 20472: size_type __next_bkt = _M_bucket_index(__n->_M_next()); 20472: if (__next_bkt != __bkt) 20472: _M_buckets[__next_bkt] = __prev_n; 20472: } 20472: 20472: __prev_n->_M_nxt = __n->_M_nxt; 20472: iterator __result(__n->_M_next()); 20472: this->_M_deallocate_node(__n); 20472: --_M_element_count; 20472: 20472: return __result; 20472: } 20472: 20472: template 20472: auto 20472: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 20472: _M_erase(true_type, const key_type& __k) 20472: -> size_type 20472: { 20472: __hash_code __code = this->_M_hash_code(__k); 20472: std::size_t __bkt = _M_bucket_index(__k, __code); 20472: 20472: 20472: __node_base* __prev_n = _M_find_before_node(__bkt, __k, __code); 20472: if (!__prev_n) 20472: return 0; 20472: 20472: 20472: __node_type* __n = static_cast<__node_type*>(__prev_n->_M_nxt); 20472: _M_erase(__bkt, __prev_n, __n); 20472: return 1; 20472: } 20472: 20472: template 20472: auto 20472: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 20472: _M_erase(false_type, const key_type& __k) 20472: -> size_type 20472: { 20472: __hash_code __code = this->_M_hash_code(__k); 20472: std::size_t __bkt = _M_bucket_index(__k, __code); 20472: 20472: 20472: __node_base* __prev_n = _M_find_before_node(__bkt, __k, __code); 20472: if (!__prev_n) 20472: return 0; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: __node_type* __n = static_cast<__node_type*>(__prev_n->_M_nxt); 20472: __node_type* __n_last = __n; 20472: std::size_t __n_last_bkt = __bkt; 20472: do 20472: { 20472: __n_last = __n_last->_M_next(); 20472: if (!__n_last) 20472: break; 20472: __n_last_bkt = _M_bucket_index(__n_last); 20472: } 20472: while (__n_last_bkt == __bkt && this->_M_equals(__k, __code, __n_last)); 20472: 20472: 20472: size_type __result = 0; 20472: do 20472: { 20472: __node_type* __p = __n->_M_next(); 20472: this->_M_deallocate_node(__n); 20472: __n = __p; 20472: ++__result; 20472: --_M_element_count; 20472: } 20472: while (__n != __n_last); 20472: 20472: if (__prev_n == _M_buckets[__bkt]) 20472: _M_remove_bucket_begin(__bkt, __n_last, __n_last_bkt); 20472: else if (__n_last && __n_last_bkt != __bkt) 20472: _M_buckets[__n_last_bkt] = __prev_n; 20472: __prev_n->_M_nxt = __n_last; 20472: return __result; 20472: } 20472: 20472: template 20472: auto 20472: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 20472: erase(const_iterator __first, const_iterator __last) 20472: -> iterator 20472: { 20472: __node_type* __n = __first._M_cur; 20472: __node_type* __last_n = __last._M_cur; 20472: if (__n == __last_n) 20472: return iterator(__n); 20472: 20472: std::size_t __bkt = _M_bucket_index(__n); 20472: 20472: __node_base* __prev_n = _M_get_previous_node(__bkt, __n); 20472: bool __is_bucket_begin = __n == _M_bucket_begin(__bkt); 20472: std::size_t __n_bkt = __bkt; 20472: for (;;) 20472: { 20472: do 20472: { 20472: __node_type* __tmp = __n; 20472: __n = __n->_M_next(); 20472: this->_M_deallocate_node(__tmp); 20472: --_M_element_count; 20472: if (!__n) 20472: break; 20472: __n_bkt = _M_bucket_index(__n); 20472: } 20472: while (__n != __last_n && __n_bkt == __bkt); 20472: if (__is_bucket_begin) 20472: _M_remove_bucket_begin(__bkt, __n, __n_bkt); 20472: if (__n == __last_n) 20472: break; 20472: __is_bucket_begin = true; 20472: __bkt = __n_bkt; 20472: } 20472: 20472: if (__n && (__n_bkt != __bkt || __is_bucket_begin)) 20472: _M_buckets[__n_bkt] = __prev_n; 20472: __prev_n->_M_nxt = __n; 20472: return iterator(__n); 20472: } 20472: 20472: template 20472: void 20472: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 20472: clear() noexcept 20472: { 20472: this->_M_deallocate_nodes(_M_begin()); 20472: __builtin_memset(_M_buckets, 0, _M_bucket_count * sizeof(__bucket_type)); 20472: _M_element_count = 0; 20472: _M_before_begin._M_nxt = nullptr; 20472: } 20472: 20472: template 20472: void 20472: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 20472: rehash(size_type __bkt_count) 20472: { 20472: const __rehash_state& __saved_state = _M_rehash_policy._M_state(); 20472: __bkt_count 20472: = std::max(_M_rehash_policy._M_bkt_for_elements(_M_element_count + 1), 20472: __bkt_count); 20472: __bkt_count = _M_rehash_policy._M_next_bkt(__bkt_count); 20472: 20472: if (__bkt_count != _M_bucket_count) 20472: _M_rehash(__bkt_count, __saved_state); 20472: else 20472: 20472: 20472: _M_rehash_policy._M_reset(__saved_state); 20472: } 20472: 20472: template 20472: void 20472: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 20472: _M_rehash(size_type __bkt_count, const __rehash_state& __state) 20472: { 20472: try 20472: { 20472: _M_rehash_aux(__bkt_count, __unique_keys()); 20472: } 20472: catch(...) 20472: { 20472: 20472: 20472: _M_rehash_policy._M_reset(__state); 20472: throw; 20472: } 20472: } 20472: 20472: 20472: template 20472: void 20472: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 20472: _M_rehash_aux(size_type __bkt_count, true_type) 20472: { 20472: __bucket_type* __new_buckets = _M_allocate_buckets(__bkt_count); 20472: __node_type* __p = _M_begin(); 20472: _M_before_begin._M_nxt = nullptr; 20472: std::size_t __bbegin_bkt = 0; 20472: while (__p) 20472: { 20472: __node_type* __next = __p->_M_next(); 20472: std::size_t __bkt 20472: = __hash_code_base::_M_bucket_index(__p, __bkt_count); 20472: if (!__new_buckets[__bkt]) 20472: { 20472: __p->_M_nxt = _M_before_begin._M_nxt; 20472: _M_before_begin._M_nxt = __p; 20472: __new_buckets[__bkt] = &_M_before_begin; 20472: if (__p->_M_nxt) 20472: __new_buckets[__bbegin_bkt] = __p; 20472: __bbegin_bkt = __bkt; 20472: } 20472: else 20472: { 20472: __p->_M_nxt = __new_buckets[__bkt]->_M_nxt; 20472: __new_buckets[__bkt]->_M_nxt = __p; 20472: } 20472: __p = __next; 20472: } 20472: 20472: _M_deallocate_buckets(); 20472: _M_bucket_count = __bkt_count; 20472: _M_buckets = __new_buckets; 20472: } 20472: 20472: 20472: 20472: template 20472: void 20472: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 20472: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 20472: _M_rehash_aux(size_type __bkt_count, false_type) 20472: { 20472: __bucket_type* __new_buckets = _M_allocate_buckets(__bkt_count); 20472: 20472: __node_type* __p = _M_begin(); 20472: _M_before_begin._M_nxt = nullptr; 20472: std::size_t __bbegin_bkt = 0; 20472: std::size_t __prev_bkt = 0; 20472: __node_type* __prev_p = nullptr; 20472: bool __check_bucket = false; 20472: 20472: while (__p) 20472: { 20472: __node_type* __next = __p->_M_next(); 20472: std::size_t __bkt 20472: = __hash_code_base::_M_bucket_index(__p, __bkt_count); 20472: 20472: if (__prev_p && __prev_bkt == __bkt) 20472: { 20472: 20472: 20472: 20472: __p->_M_nxt = __prev_p->_M_nxt; 20472: __prev_p->_M_nxt = __p; 20472: 20472: 20472: 20472: 20472: 20472: 20472: __check_bucket = true; 20472: } 20472: else 20472: { 20472: if (__check_bucket) 20472: { 20472: 20472: 20472: if (__prev_p->_M_nxt) 20472: { 20472: std::size_t __next_bkt 20472: = __hash_code_base::_M_bucket_index(__prev_p->_M_next(), 20472: __bkt_count); 20472: if (__next_bkt != __prev_bkt) 20472: __new_buckets[__next_bkt] = __prev_p; 20472: } 20472: __check_bucket = false; 20472: } 20472: 20472: if (!__new_buckets[__bkt]) 20472: { 20472: __p->_M_nxt = _M_before_begin._M_nxt; 20472: _M_before_begin._M_nxt = __p; 20472: __new_buckets[__bkt] = &_M_before_begin; 20472: if (__p->_M_nxt) 20472: __new_buckets[__bbegin_bkt] = __p; 20472: __bbegin_bkt = __bkt; 20472: } 20472: else 20472: { 20472: __p->_M_nxt = __new_buckets[__bkt]->_M_nxt; 20472: __new_buckets[__bkt]->_M_nxt = __p; 20472: } 20472: } 20472: __prev_p = __p; 20472: __prev_bkt = __bkt; 20472: __p = __next; 20472: } 20472: 20472: if (__check_bucket && __prev_p->_M_nxt) 20472: { 20472: std::size_t __next_bkt 20472: = __hash_code_base::_M_bucket_index(__prev_p->_M_next(), 20472: __bkt_count); 20472: if (__next_bkt != __prev_bkt) 20472: __new_buckets[__next_bkt] = __prev_p; 20472: } 20472: 20472: _M_deallocate_buckets(); 20472: _M_bucket_count = __bkt_count; 20472: _M_buckets = __new_buckets; 20472: } 20472: # 2225 "/usr/include/c++/10/bits/hashtable.h" 3 20472: 20472: } 20472: # 47 "/usr/include/c++/10/unordered_map" 2 3 20472: # 1 "/usr/include/c++/10/bits/unordered_map.h" 1 3 20472: # 33 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: 20472: template 20472: using __umap_traits = __detail::_Hashtable_traits<_Cache, false, true>; 20472: 20472: template, 20472: typename _Pred = std::equal_to<_Key>, 20472: typename _Alloc = std::allocator >, 20472: typename _Tr = __umap_traits<__cache_default<_Key, _Hash>::value>> 20472: using __umap_hashtable = _Hashtable<_Key, std::pair, 20472: _Alloc, __detail::_Select1st, 20472: _Pred, _Hash, 20472: __detail::_Mod_range_hashing, 20472: __detail::_Default_ranged_hash, 20472: __detail::_Prime_rehash_policy, _Tr>; 20472: 20472: 20472: template 20472: using __ummap_traits = __detail::_Hashtable_traits<_Cache, false, false>; 20472: 20472: template, 20472: typename _Pred = std::equal_to<_Key>, 20472: typename _Alloc = std::allocator >, 20472: typename _Tr = __ummap_traits<__cache_default<_Key, _Hash>::value>> 20472: using __ummap_hashtable = _Hashtable<_Key, std::pair, 20472: _Alloc, __detail::_Select1st, 20472: _Pred, _Hash, 20472: __detail::_Mod_range_hashing, 20472: __detail::_Default_ranged_hash, 20472: __detail::_Prime_rehash_policy, _Tr>; 20472: 20472: template 20472: class unordered_multimap; 20472: # 98 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: template, 20472: typename _Pred = equal_to<_Key>, 20472: typename _Alloc = allocator>> 20472: class unordered_map 20472: { 20472: typedef __umap_hashtable<_Key, _Tp, _Hash, _Pred, _Alloc> _Hashtable; 20472: _Hashtable _M_h; 20472: 20472: public: 20472: 20472: 20472: 20472: typedef typename _Hashtable::key_type key_type; 20472: typedef typename _Hashtable::value_type value_type; 20472: typedef typename _Hashtable::mapped_type mapped_type; 20472: typedef typename _Hashtable::hasher hasher; 20472: typedef typename _Hashtable::key_equal key_equal; 20472: typedef typename _Hashtable::allocator_type allocator_type; 20472: 20472: 20472: 20472: 20472: typedef typename _Hashtable::pointer pointer; 20472: typedef typename _Hashtable::const_pointer const_pointer; 20472: typedef typename _Hashtable::reference reference; 20472: typedef typename _Hashtable::const_reference const_reference; 20472: typedef typename _Hashtable::iterator iterator; 20472: typedef typename _Hashtable::const_iterator const_iterator; 20472: typedef typename _Hashtable::local_iterator local_iterator; 20472: typedef typename _Hashtable::const_local_iterator const_local_iterator; 20472: typedef typename _Hashtable::size_type size_type; 20472: typedef typename _Hashtable::difference_type difference_type; 20472: # 141 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: unordered_map() = default; 20472: # 150 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: explicit 20472: unordered_map(size_type __n, 20472: const hasher& __hf = hasher(), 20472: const key_equal& __eql = key_equal(), 20472: const allocator_type& __a = allocator_type()) 20472: : _M_h(__n, __hf, __eql, __a) 20472: { } 20472: # 171 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: template 20472: unordered_map(_InputIterator __first, _InputIterator __last, 20472: size_type __n = 0, 20472: const hasher& __hf = hasher(), 20472: const key_equal& __eql = key_equal(), 20472: const allocator_type& __a = allocator_type()) 20472: : _M_h(__first, __last, __n, __hf, __eql, __a) 20472: { } 20472: 20472: 20472: unordered_map(const unordered_map&) = default; 20472: 20472: 20472: unordered_map(unordered_map&&) = default; 20472: 20472: 20472: 20472: 20472: 20472: explicit 20472: unordered_map(const allocator_type& __a) 20472: : _M_h(__a) 20472: { } 20472: 20472: 20472: 20472: 20472: 20472: 20472: unordered_map(const unordered_map& __umap, 20472: const allocator_type& __a) 20472: : _M_h(__umap._M_h, __a) 20472: { } 20472: 20472: 20472: 20472: 20472: 20472: 20472: unordered_map(unordered_map&& __umap, 20472: const allocator_type& __a) 20472: : _M_h(std::move(__umap._M_h), __a) 20472: { } 20472: # 226 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: unordered_map(initializer_list __l, 20472: size_type __n = 0, 20472: const hasher& __hf = hasher(), 20472: const key_equal& __eql = key_equal(), 20472: const allocator_type& __a = allocator_type()) 20472: : _M_h(__l, __n, __hf, __eql, __a) 20472: { } 20472: 20472: unordered_map(size_type __n, const allocator_type& __a) 20472: : unordered_map(__n, hasher(), key_equal(), __a) 20472: { } 20472: 20472: unordered_map(size_type __n, const hasher& __hf, 20472: const allocator_type& __a) 20472: : unordered_map(__n, __hf, key_equal(), __a) 20472: { } 20472: 20472: template 20472: unordered_map(_InputIterator __first, _InputIterator __last, 20472: size_type __n, 20472: const allocator_type& __a) 20472: : unordered_map(__first, __last, __n, hasher(), key_equal(), __a) 20472: { } 20472: 20472: template 20472: unordered_map(_InputIterator __first, _InputIterator __last, 20472: size_type __n, const hasher& __hf, 20472: const allocator_type& __a) 20472: : unordered_map(__first, __last, __n, __hf, key_equal(), __a) 20472: { } 20472: 20472: unordered_map(initializer_list __l, 20472: size_type __n, 20472: const allocator_type& __a) 20472: : unordered_map(__l, __n, hasher(), key_equal(), __a) 20472: { } 20472: 20472: unordered_map(initializer_list __l, 20472: size_type __n, const hasher& __hf, 20472: const allocator_type& __a) 20472: : unordered_map(__l, __n, __hf, key_equal(), __a) 20472: { } 20472: 20472: 20472: unordered_map& 20472: operator=(const unordered_map&) = default; 20472: 20472: 20472: unordered_map& 20472: operator=(unordered_map&&) = default; 20472: # 288 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: unordered_map& 20472: operator=(initializer_list __l) 20472: { 20472: _M_h = __l; 20472: return *this; 20472: } 20472: 20472: 20472: allocator_type 20472: get_allocator() const noexcept 20472: { return _M_h.get_allocator(); } 20472: 20472: 20472: 20472: 20472: bool 20472: empty() const noexcept 20472: { return _M_h.empty(); } 20472: 20472: 20472: size_type 20472: size() const noexcept 20472: { return _M_h.size(); } 20472: 20472: 20472: size_type 20472: max_size() const noexcept 20472: { return _M_h.max_size(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: iterator 20472: begin() noexcept 20472: { return _M_h.begin(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: const_iterator 20472: begin() const noexcept 20472: { return _M_h.begin(); } 20472: 20472: const_iterator 20472: cbegin() const noexcept 20472: { return _M_h.begin(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: iterator 20472: end() noexcept 20472: { return _M_h.end(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: const_iterator 20472: end() const noexcept 20472: { return _M_h.end(); } 20472: 20472: const_iterator 20472: cend() const noexcept 20472: { return _M_h.end(); } 20472: # 385 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: template 20472: std::pair 20472: emplace(_Args&&... __args) 20472: { return _M_h.emplace(std::forward<_Args>(__args)...); } 20472: # 416 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: template 20472: iterator 20472: emplace_hint(const_iterator __pos, _Args&&... __args) 20472: { return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); } 20472: # 578 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: std::pair 20472: insert(const value_type& __x) 20472: { return _M_h.insert(__x); } 20472: 20472: 20472: 20472: std::pair 20472: insert(value_type&& __x) 20472: { return _M_h.insert(std::move(__x)); } 20472: 20472: template 20472: __enable_if_t::value, 20472: pair> 20472: insert(_Pair&& __x) 20472: { return _M_h.emplace(std::forward<_Pair>(__x)); } 20472: # 617 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: iterator 20472: insert(const_iterator __hint, const value_type& __x) 20472: { return _M_h.insert(__hint, __x); } 20472: 20472: 20472: 20472: iterator 20472: insert(const_iterator __hint, value_type&& __x) 20472: { return _M_h.insert(__hint, std::move(__x)); } 20472: 20472: template 20472: __enable_if_t::value, iterator> 20472: insert(const_iterator __hint, _Pair&& __x) 20472: { return _M_h.emplace_hint(__hint, std::forward<_Pair>(__x)); } 20472: # 642 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: template 20472: void 20472: insert(_InputIterator __first, _InputIterator __last) 20472: { _M_h.insert(__first, __last); } 20472: # 654 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: void 20472: insert(initializer_list __l) 20472: { _M_h.insert(__l); } 20472: # 790 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: iterator 20472: erase(const_iterator __position) 20472: { return _M_h.erase(__position); } 20472: 20472: 20472: iterator 20472: erase(iterator __position) 20472: { return _M_h.erase(__position); } 20472: # 812 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: size_type 20472: erase(const key_type& __x) 20472: { return _M_h.erase(__x); } 20472: # 830 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: iterator 20472: erase(const_iterator __first, const_iterator __last) 20472: { return _M_h.erase(__first, __last); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: void 20472: clear() noexcept 20472: { _M_h.clear(); } 20472: # 854 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: void 20472: swap(unordered_map& __x) 20472: noexcept( noexcept(_M_h.swap(__x._M_h)) ) 20472: { _M_h.swap(__x._M_h); } 20472: # 894 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: hasher 20472: hash_function() const 20472: { return _M_h.hash_function(); } 20472: 20472: 20472: 20472: key_equal 20472: key_eq() const 20472: { return _M_h.key_eq(); } 20472: # 918 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: iterator 20472: find(const key_type& __x) 20472: { return _M_h.find(__x); } 20472: 20472: const_iterator 20472: find(const key_type& __x) const 20472: { return _M_h.find(__x); } 20472: # 936 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: size_type 20472: count(const key_type& __x) const 20472: { return _M_h.count(__x); } 20472: # 960 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: std::pair 20472: equal_range(const key_type& __x) 20472: { return _M_h.equal_range(__x); } 20472: 20472: std::pair 20472: equal_range(const key_type& __x) const 20472: { return _M_h.equal_range(__x); } 20472: # 982 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: mapped_type& 20472: operator[](const key_type& __k) 20472: { return _M_h[__k]; } 20472: 20472: mapped_type& 20472: operator[](key_type&& __k) 20472: { return _M_h[std::move(__k)]; } 20472: # 999 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: mapped_type& 20472: at(const key_type& __k) 20472: { return _M_h.at(__k); } 20472: 20472: const mapped_type& 20472: at(const key_type& __k) const 20472: { return _M_h.at(__k); } 20472: 20472: 20472: 20472: 20472: 20472: size_type 20472: bucket_count() const noexcept 20472: { return _M_h.bucket_count(); } 20472: 20472: 20472: size_type 20472: max_bucket_count() const noexcept 20472: { return _M_h.max_bucket_count(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: size_type 20472: bucket_size(size_type __n) const 20472: { return _M_h.bucket_size(__n); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: size_type 20472: bucket(const key_type& __key) const 20472: { return _M_h.bucket(__key); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: local_iterator 20472: begin(size_type __n) 20472: { return _M_h.begin(__n); } 20472: # 1055 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: const_local_iterator 20472: begin(size_type __n) const 20472: { return _M_h.begin(__n); } 20472: 20472: const_local_iterator 20472: cbegin(size_type __n) const 20472: { return _M_h.cbegin(__n); } 20472: # 1070 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: local_iterator 20472: end(size_type __n) 20472: { return _M_h.end(__n); } 20472: # 1081 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: const_local_iterator 20472: end(size_type __n) const 20472: { return _M_h.end(__n); } 20472: 20472: const_local_iterator 20472: cend(size_type __n) const 20472: { return _M_h.cend(__n); } 20472: 20472: 20472: 20472: 20472: 20472: float 20472: load_factor() const noexcept 20472: { return _M_h.load_factor(); } 20472: 20472: 20472: 20472: float 20472: max_load_factor() const noexcept 20472: { return _M_h.max_load_factor(); } 20472: 20472: 20472: 20472: 20472: 20472: void 20472: max_load_factor(float __z) 20472: { _M_h.max_load_factor(__z); } 20472: # 1118 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: void 20472: rehash(size_type __n) 20472: { _M_h.rehash(__n); } 20472: # 1129 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: void 20472: reserve(size_type __n) 20472: { _M_h.reserve(__n); } 20472: 20472: template 20472: friend bool 20472: operator==(const unordered_map<_Key1, _Tp1, _Hash1, _Pred1, _Alloc1>&, 20472: const unordered_map<_Key1, _Tp1, _Hash1, _Pred1, _Alloc1>&); 20472: }; 20472: # 1245 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: template, 20472: typename _Pred = equal_to<_Key>, 20472: typename _Alloc = allocator>> 20472: class unordered_multimap 20472: { 20472: typedef __ummap_hashtable<_Key, _Tp, _Hash, _Pred, _Alloc> _Hashtable; 20472: _Hashtable _M_h; 20472: 20472: public: 20472: 20472: 20472: 20472: typedef typename _Hashtable::key_type key_type; 20472: typedef typename _Hashtable::value_type value_type; 20472: typedef typename _Hashtable::mapped_type mapped_type; 20472: typedef typename _Hashtable::hasher hasher; 20472: typedef typename _Hashtable::key_equal key_equal; 20472: typedef typename _Hashtable::allocator_type allocator_type; 20472: 20472: 20472: 20472: 20472: typedef typename _Hashtable::pointer pointer; 20472: typedef typename _Hashtable::const_pointer const_pointer; 20472: typedef typename _Hashtable::reference reference; 20472: typedef typename _Hashtable::const_reference const_reference; 20472: typedef typename _Hashtable::iterator iterator; 20472: typedef typename _Hashtable::const_iterator const_iterator; 20472: typedef typename _Hashtable::local_iterator local_iterator; 20472: typedef typename _Hashtable::const_local_iterator const_local_iterator; 20472: typedef typename _Hashtable::size_type size_type; 20472: typedef typename _Hashtable::difference_type difference_type; 20472: # 1287 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: unordered_multimap() = default; 20472: # 1296 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: explicit 20472: unordered_multimap(size_type __n, 20472: const hasher& __hf = hasher(), 20472: const key_equal& __eql = key_equal(), 20472: const allocator_type& __a = allocator_type()) 20472: : _M_h(__n, __hf, __eql, __a) 20472: { } 20472: # 1317 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: template 20472: unordered_multimap(_InputIterator __first, _InputIterator __last, 20472: size_type __n = 0, 20472: const hasher& __hf = hasher(), 20472: const key_equal& __eql = key_equal(), 20472: const allocator_type& __a = allocator_type()) 20472: : _M_h(__first, __last, __n, __hf, __eql, __a) 20472: { } 20472: 20472: 20472: unordered_multimap(const unordered_multimap&) = default; 20472: 20472: 20472: unordered_multimap(unordered_multimap&&) = default; 20472: 20472: 20472: 20472: 20472: 20472: explicit 20472: unordered_multimap(const allocator_type& __a) 20472: : _M_h(__a) 20472: { } 20472: 20472: 20472: 20472: 20472: 20472: 20472: unordered_multimap(const unordered_multimap& __ummap, 20472: const allocator_type& __a) 20472: : _M_h(__ummap._M_h, __a) 20472: { } 20472: 20472: 20472: 20472: 20472: 20472: 20472: unordered_multimap(unordered_multimap&& __ummap, 20472: const allocator_type& __a) 20472: : _M_h(std::move(__ummap._M_h), __a) 20472: { } 20472: # 1372 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: unordered_multimap(initializer_list __l, 20472: size_type __n = 0, 20472: const hasher& __hf = hasher(), 20472: const key_equal& __eql = key_equal(), 20472: const allocator_type& __a = allocator_type()) 20472: : _M_h(__l, __n, __hf, __eql, __a) 20472: { } 20472: 20472: unordered_multimap(size_type __n, const allocator_type& __a) 20472: : unordered_multimap(__n, hasher(), key_equal(), __a) 20472: { } 20472: 20472: unordered_multimap(size_type __n, const hasher& __hf, 20472: const allocator_type& __a) 20472: : unordered_multimap(__n, __hf, key_equal(), __a) 20472: { } 20472: 20472: template 20472: unordered_multimap(_InputIterator __first, _InputIterator __last, 20472: size_type __n, 20472: const allocator_type& __a) 20472: : unordered_multimap(__first, __last, __n, hasher(), key_equal(), __a) 20472: { } 20472: 20472: template 20472: unordered_multimap(_InputIterator __first, _InputIterator __last, 20472: size_type __n, const hasher& __hf, 20472: const allocator_type& __a) 20472: : unordered_multimap(__first, __last, __n, __hf, key_equal(), __a) 20472: { } 20472: 20472: unordered_multimap(initializer_list __l, 20472: size_type __n, 20472: const allocator_type& __a) 20472: : unordered_multimap(__l, __n, hasher(), key_equal(), __a) 20472: { } 20472: 20472: unordered_multimap(initializer_list __l, 20472: size_type __n, const hasher& __hf, 20472: const allocator_type& __a) 20472: : unordered_multimap(__l, __n, __hf, key_equal(), __a) 20472: { } 20472: 20472: 20472: unordered_multimap& 20472: operator=(const unordered_multimap&) = default; 20472: 20472: 20472: unordered_multimap& 20472: operator=(unordered_multimap&&) = default; 20472: # 1434 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: unordered_multimap& 20472: operator=(initializer_list __l) 20472: { 20472: _M_h = __l; 20472: return *this; 20472: } 20472: 20472: 20472: allocator_type 20472: get_allocator() const noexcept 20472: { return _M_h.get_allocator(); } 20472: 20472: 20472: 20472: 20472: bool 20472: empty() const noexcept 20472: { return _M_h.empty(); } 20472: 20472: 20472: size_type 20472: size() const noexcept 20472: { return _M_h.size(); } 20472: 20472: 20472: size_type 20472: max_size() const noexcept 20472: { return _M_h.max_size(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: iterator 20472: begin() noexcept 20472: { return _M_h.begin(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: const_iterator 20472: begin() const noexcept 20472: { return _M_h.begin(); } 20472: 20472: const_iterator 20472: cbegin() const noexcept 20472: { return _M_h.begin(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: iterator 20472: end() noexcept 20472: { return _M_h.end(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: const_iterator 20472: end() const noexcept 20472: { return _M_h.end(); } 20472: 20472: const_iterator 20472: cend() const noexcept 20472: { return _M_h.end(); } 20472: # 1526 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: template 20472: iterator 20472: emplace(_Args&&... __args) 20472: { return _M_h.emplace(std::forward<_Args>(__args)...); } 20472: # 1553 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: template 20472: iterator 20472: emplace_hint(const_iterator __pos, _Args&&... __args) 20472: { return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); } 20472: # 1568 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: iterator 20472: insert(const value_type& __x) 20472: { return _M_h.insert(__x); } 20472: 20472: iterator 20472: insert(value_type&& __x) 20472: { return _M_h.insert(std::move(__x)); } 20472: 20472: template 20472: __enable_if_t::value, iterator> 20472: insert(_Pair&& __x) 20472: { return _M_h.emplace(std::forward<_Pair>(__x)); } 20472: # 1602 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: iterator 20472: insert(const_iterator __hint, const value_type& __x) 20472: { return _M_h.insert(__hint, __x); } 20472: 20472: 20472: 20472: iterator 20472: insert(const_iterator __hint, value_type&& __x) 20472: { return _M_h.insert(__hint, std::move(__x)); } 20472: 20472: template 20472: __enable_if_t::value, iterator> 20472: insert(const_iterator __hint, _Pair&& __x) 20472: { return _M_h.emplace_hint(__hint, std::forward<_Pair>(__x)); } 20472: # 1627 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: template 20472: void 20472: insert(_InputIterator __first, _InputIterator __last) 20472: { _M_h.insert(__first, __last); } 20472: # 1640 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: void 20472: insert(initializer_list __l) 20472: { _M_h.insert(__l); } 20472: # 1683 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: iterator 20472: erase(const_iterator __position) 20472: { return _M_h.erase(__position); } 20472: 20472: 20472: iterator 20472: erase(iterator __position) 20472: { return _M_h.erase(__position); } 20472: # 1704 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: size_type 20472: erase(const key_type& __x) 20472: { return _M_h.erase(__x); } 20472: # 1723 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: iterator 20472: erase(const_iterator __first, const_iterator __last) 20472: { return _M_h.erase(__first, __last); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: void 20472: clear() noexcept 20472: { _M_h.clear(); } 20472: # 1747 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: void 20472: swap(unordered_multimap& __x) 20472: noexcept( noexcept(_M_h.swap(__x._M_h)) ) 20472: { _M_h.swap(__x._M_h); } 20472: # 1789 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: hasher 20472: hash_function() const 20472: { return _M_h.hash_function(); } 20472: 20472: 20472: 20472: key_equal 20472: key_eq() const 20472: { return _M_h.key_eq(); } 20472: # 1813 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: iterator 20472: find(const key_type& __x) 20472: { return _M_h.find(__x); } 20472: 20472: const_iterator 20472: find(const key_type& __x) const 20472: { return _M_h.find(__x); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: size_type 20472: count(const key_type& __x) const 20472: { return _M_h.count(__x); } 20472: # 1849 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: std::pair 20472: equal_range(const key_type& __x) 20472: { return _M_h.equal_range(__x); } 20472: 20472: std::pair 20472: equal_range(const key_type& __x) const 20472: { return _M_h.equal_range(__x); } 20472: 20472: 20472: 20472: 20472: 20472: size_type 20472: bucket_count() const noexcept 20472: { return _M_h.bucket_count(); } 20472: 20472: 20472: size_type 20472: max_bucket_count() const noexcept 20472: { return _M_h.max_bucket_count(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: size_type 20472: bucket_size(size_type __n) const 20472: { return _M_h.bucket_size(__n); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: size_type 20472: bucket(const key_type& __key) const 20472: { return _M_h.bucket(__key); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: local_iterator 20472: begin(size_type __n) 20472: { return _M_h.begin(__n); } 20472: # 1905 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: const_local_iterator 20472: begin(size_type __n) const 20472: { return _M_h.begin(__n); } 20472: 20472: const_local_iterator 20472: cbegin(size_type __n) const 20472: { return _M_h.cbegin(__n); } 20472: # 1920 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: local_iterator 20472: end(size_type __n) 20472: { return _M_h.end(__n); } 20472: # 1931 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: const_local_iterator 20472: end(size_type __n) const 20472: { return _M_h.end(__n); } 20472: 20472: const_local_iterator 20472: cend(size_type __n) const 20472: { return _M_h.cend(__n); } 20472: 20472: 20472: 20472: 20472: 20472: float 20472: load_factor() const noexcept 20472: { return _M_h.load_factor(); } 20472: 20472: 20472: 20472: float 20472: max_load_factor() const noexcept 20472: { return _M_h.max_load_factor(); } 20472: 20472: 20472: 20472: 20472: 20472: void 20472: max_load_factor(float __z) 20472: { _M_h.max_load_factor(__z); } 20472: # 1968 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: void 20472: rehash(size_type __n) 20472: { _M_h.rehash(__n); } 20472: # 1979 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: void 20472: reserve(size_type __n) 20472: { _M_h.reserve(__n); } 20472: 20472: template 20472: friend bool 20472: operator==(const unordered_multimap<_Key1, _Tp1, 20472: _Hash1, _Pred1, _Alloc1>&, 20472: const unordered_multimap<_Key1, _Tp1, 20472: _Hash1, _Pred1, _Alloc1>&); 20472: }; 20472: # 2074 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: template 20472: inline void 20472: swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, 20472: unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) 20472: noexcept(noexcept(__x.swap(__y))) 20472: { __x.swap(__y); } 20472: 20472: template 20472: inline void 20472: swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, 20472: unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) 20472: noexcept(noexcept(__x.swap(__y))) 20472: { __x.swap(__y); } 20472: 20472: template 20472: inline bool 20472: operator==(const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, 20472: const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) 20472: { return __x._M_h._M_equal(__y._M_h); } 20472: 20472: 20472: template 20472: inline bool 20472: operator!=(const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, 20472: const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) 20472: { return !(__x == __y); } 20472: 20472: 20472: template 20472: inline bool 20472: operator==(const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, 20472: const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) 20472: { return __x._M_h._M_equal(__y._M_h); } 20472: 20472: 20472: template 20472: inline bool 20472: operator!=(const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, 20472: const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) 20472: { return !(__x == __y); } 20472: 20472: 20472: 20472: # 2168 "/usr/include/c++/10/bits/unordered_map.h" 3 20472: 20472: } 20472: # 48 "/usr/include/c++/10/unordered_map" 2 3 20472: 20472: # 1 "/usr/include/c++/10/bits/erase_if.h" 1 3 20472: # 33 "/usr/include/c++/10/bits/erase_if.h" 3 20472: 20472: # 34 "/usr/include/c++/10/bits/erase_if.h" 3 20472: # 50 "/usr/include/c++/10/unordered_map" 2 3 20472: # 17 "./db/memtable.h" 2 20472: # 1 "/usr/include/c++/10/vector" 1 3 20472: # 58 "/usr/include/c++/10/vector" 3 20472: 20472: # 59 "/usr/include/c++/10/vector" 3 20472: # 67 "/usr/include/c++/10/vector" 3 20472: # 1 "/usr/include/c++/10/bits/stl_vector.h" 1 3 20472: # 77 "/usr/include/c++/10/bits/stl_vector.h" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: 20472: template 20472: struct _Vector_base 20472: { 20472: typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template 20472: rebind<_Tp>::other _Tp_alloc_type; 20472: typedef typename __gnu_cxx::__alloc_traits<_Tp_alloc_type>::pointer 20472: pointer; 20472: 20472: struct _Vector_impl_data 20472: { 20472: pointer _M_start; 20472: pointer _M_finish; 20472: pointer _M_end_of_storage; 20472: 20472: _Vector_impl_data() noexcept 20472: : _M_start(), _M_finish(), _M_end_of_storage() 20472: { } 20472: 20472: 20472: _Vector_impl_data(_Vector_impl_data&& __x) noexcept 20472: : _M_start(__x._M_start), _M_finish(__x._M_finish), 20472: _M_end_of_storage(__x._M_end_of_storage) 20472: { __x._M_start = __x._M_finish = __x._M_end_of_storage = pointer(); } 20472: 20472: 20472: void 20472: _M_copy_data(_Vector_impl_data const& __x) noexcept 20472: { 20472: _M_start = __x._M_start; 20472: _M_finish = __x._M_finish; 20472: _M_end_of_storage = __x._M_end_of_storage; 20472: } 20472: 20472: void 20472: _M_swap_data(_Vector_impl_data& __x) noexcept 20472: { 20472: 20472: 20472: _Vector_impl_data __tmp; 20472: __tmp._M_copy_data(*this); 20472: _M_copy_data(__x); 20472: __x._M_copy_data(__tmp); 20472: } 20472: }; 20472: 20472: struct _Vector_impl 20472: : public _Tp_alloc_type, public _Vector_impl_data 20472: { 20472: _Vector_impl() noexcept(is_nothrow_default_constructible<_Tp_alloc_type>::value) 20472: 20472: : _Tp_alloc_type() 20472: { } 20472: 20472: _Vector_impl(_Tp_alloc_type const& __a) noexcept 20472: : _Tp_alloc_type(__a) 20472: { } 20472: 20472: 20472: 20472: 20472: _Vector_impl(_Vector_impl&& __x) noexcept 20472: : _Tp_alloc_type(std::move(__x)), _Vector_impl_data(std::move(__x)) 20472: { } 20472: 20472: _Vector_impl(_Tp_alloc_type&& __a) noexcept 20472: : _Tp_alloc_type(std::move(__a)) 20472: { } 20472: 20472: _Vector_impl(_Tp_alloc_type&& __a, _Vector_impl&& __rv) noexcept 20472: : _Tp_alloc_type(std::move(__a)), _Vector_impl_data(std::move(__rv)) 20472: { } 20472: # 270 "/usr/include/c++/10/bits/stl_vector.h" 3 20472: }; 20472: 20472: public: 20472: typedef _Alloc allocator_type; 20472: 20472: _Tp_alloc_type& 20472: _M_get_Tp_allocator() noexcept 20472: { return this->_M_impl; } 20472: 20472: const _Tp_alloc_type& 20472: _M_get_Tp_allocator() const noexcept 20472: { return this->_M_impl; } 20472: 20472: allocator_type 20472: get_allocator() const noexcept 20472: { return allocator_type(_M_get_Tp_allocator()); } 20472: 20472: 20472: _Vector_base() = default; 20472: 20472: 20472: 20472: 20472: _Vector_base(const allocator_type& __a) noexcept 20472: : _M_impl(__a) { } 20472: 20472: 20472: 20472: _Vector_base(size_t __n) 20472: : _M_impl() 20472: { _M_create_storage(__n); } 20472: 20472: 20472: _Vector_base(size_t __n, const allocator_type& __a) 20472: : _M_impl(__a) 20472: { _M_create_storage(__n); } 20472: 20472: 20472: _Vector_base(_Vector_base&&) = default; 20472: 20472: 20472: 20472: _Vector_base(_Tp_alloc_type&& __a) noexcept 20472: : _M_impl(std::move(__a)) { } 20472: 20472: _Vector_base(_Vector_base&& __x, const allocator_type& __a) 20472: : _M_impl(__a) 20472: { 20472: if (__x.get_allocator() == __a) 20472: this->_M_impl._M_swap_data(__x._M_impl); 20472: else 20472: { 20472: size_t __n = __x._M_impl._M_finish - __x._M_impl._M_start; 20472: _M_create_storage(__n); 20472: } 20472: } 20472: 20472: 20472: _Vector_base(const allocator_type& __a, _Vector_base&& __x) 20472: : _M_impl(_Tp_alloc_type(__a), std::move(__x._M_impl)) 20472: { } 20472: 20472: 20472: ~_Vector_base() noexcept 20472: { 20472: _M_deallocate(_M_impl._M_start, 20472: _M_impl._M_end_of_storage - _M_impl._M_start); 20472: } 20472: 20472: public: 20472: _Vector_impl _M_impl; 20472: 20472: pointer 20472: _M_allocate(size_t __n) 20472: { 20472: typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Tr; 20472: return __n != 0 ? _Tr::allocate(_M_impl, __n) : pointer(); 20472: } 20472: 20472: void 20472: _M_deallocate(pointer __p, size_t __n) 20472: { 20472: typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Tr; 20472: if (__p) 20472: _Tr::deallocate(_M_impl, __p, __n); 20472: } 20472: 20472: protected: 20472: void 20472: _M_create_storage(size_t __n) 20472: { 20472: this->_M_impl._M_start = this->_M_allocate(__n); 20472: this->_M_impl._M_finish = this->_M_impl._M_start; 20472: this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; 20472: } 20472: }; 20472: # 388 "/usr/include/c++/10/bits/stl_vector.h" 3 20472: template > 20472: class vector : protected _Vector_base<_Tp, _Alloc> 20472: { 20472: # 401 "/usr/include/c++/10/bits/stl_vector.h" 3 20472: static_assert(is_same::type, _Tp>::value, 20472: "std::vector must have a non-const, non-volatile value_type"); 20472: 20472: static_assert(is_same::value, 20472: "std::vector must have the same value_type as its allocator"); 20472: 20472: 20472: 20472: typedef _Vector_base<_Tp, _Alloc> _Base; 20472: typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; 20472: typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Alloc_traits; 20472: 20472: public: 20472: typedef _Tp value_type; 20472: typedef typename _Base::pointer pointer; 20472: typedef typename _Alloc_traits::const_pointer const_pointer; 20472: typedef typename _Alloc_traits::reference reference; 20472: typedef typename _Alloc_traits::const_reference const_reference; 20472: typedef __gnu_cxx::__normal_iterator iterator; 20472: typedef __gnu_cxx::__normal_iterator 20472: const_iterator; 20472: typedef std::reverse_iterator const_reverse_iterator; 20472: typedef std::reverse_iterator reverse_iterator; 20472: typedef size_t size_type; 20472: typedef ptrdiff_t difference_type; 20472: typedef _Alloc allocator_type; 20472: 20472: private: 20472: 20472: static constexpr bool 20472: _S_nothrow_relocate(true_type) 20472: { 20472: return noexcept(std::__relocate_a(std::declval(), 20472: std::declval(), 20472: std::declval(), 20472: std::declval<_Tp_alloc_type&>())); 20472: } 20472: 20472: static constexpr bool 20472: _S_nothrow_relocate(false_type) 20472: { return false; } 20472: 20472: static constexpr bool 20472: _S_use_relocate() 20472: { 20472: 20472: 20472: 20472: return _S_nothrow_relocate(__is_move_insertable<_Tp_alloc_type>{}); 20472: } 20472: 20472: static pointer 20472: _S_do_relocate(pointer __first, pointer __last, pointer __result, 20472: _Tp_alloc_type& __alloc, true_type) noexcept 20472: { 20472: return std::__relocate_a(__first, __last, __result, __alloc); 20472: } 20472: 20472: static pointer 20472: _S_do_relocate(pointer, pointer, pointer __result, 20472: _Tp_alloc_type&, false_type) noexcept 20472: { return __result; } 20472: 20472: static pointer 20472: _S_relocate(pointer __first, pointer __last, pointer __result, 20472: _Tp_alloc_type& __alloc) noexcept 20472: { 20472: using __do_it = __bool_constant<_S_use_relocate()>; 20472: return _S_do_relocate(__first, __last, __result, __alloc, __do_it{}); 20472: } 20472: 20472: 20472: protected: 20472: using _Base::_M_allocate; 20472: using _Base::_M_deallocate; 20472: using _Base::_M_impl; 20472: using _Base::_M_get_Tp_allocator; 20472: 20472: public: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: vector() = default; 20472: # 496 "/usr/include/c++/10/bits/stl_vector.h" 3 20472: explicit 20472: vector(const allocator_type& __a) noexcept 20472: : _Base(__a) { } 20472: # 509 "/usr/include/c++/10/bits/stl_vector.h" 3 20472: explicit 20472: vector(size_type __n, const allocator_type& __a = allocator_type()) 20472: : _Base(_S_check_init_len(__n, __a), __a) 20472: { _M_default_initialize(__n); } 20472: # 522 "/usr/include/c++/10/bits/stl_vector.h" 3 20472: vector(size_type __n, const value_type& __value, 20472: const allocator_type& __a = allocator_type()) 20472: : _Base(_S_check_init_len(__n, __a), __a) 20472: { _M_fill_initialize(__n, __value); } 20472: # 553 "/usr/include/c++/10/bits/stl_vector.h" 3 20472: vector(const vector& __x) 20472: : _Base(__x.size(), 20472: _Alloc_traits::_S_select_on_copy(__x._M_get_Tp_allocator())) 20472: { 20472: this->_M_impl._M_finish = 20472: std::__uninitialized_copy_a(__x.begin(), __x.end(), 20472: this->_M_impl._M_start, 20472: _M_get_Tp_allocator()); 20472: } 20472: # 572 "/usr/include/c++/10/bits/stl_vector.h" 3 20472: vector(vector&&) noexcept = default; 20472: 20472: 20472: vector(const vector& __x, const allocator_type& __a) 20472: : _Base(__x.size(), __a) 20472: { 20472: this->_M_impl._M_finish = 20472: std::__uninitialized_copy_a(__x.begin(), __x.end(), 20472: this->_M_impl._M_start, 20472: _M_get_Tp_allocator()); 20472: } 20472: 20472: private: 20472: vector(vector&& __rv, const allocator_type& __m, true_type) noexcept 20472: : _Base(__m, std::move(__rv)) 20472: { } 20472: 20472: vector(vector&& __rv, const allocator_type& __m, false_type) 20472: : _Base(__m) 20472: { 20472: if (__rv.get_allocator() == __m) 20472: this->_M_impl._M_swap_data(__rv._M_impl); 20472: else if (!__rv.empty()) 20472: { 20472: this->_M_create_storage(__rv.size()); 20472: this->_M_impl._M_finish = 20472: std::__uninitialized_move_a(__rv.begin(), __rv.end(), 20472: this->_M_impl._M_start, 20472: _M_get_Tp_allocator()); 20472: __rv.clear(); 20472: } 20472: } 20472: 20472: public: 20472: 20472: vector(vector&& __rv, const allocator_type& __m) 20472: noexcept( noexcept( 20472: vector(std::declval(), std::declval(), 20472: std::declval())) ) 20472: : vector(std::move(__rv), __m, typename _Alloc_traits::is_always_equal{}) 20472: { } 20472: # 625 "/usr/include/c++/10/bits/stl_vector.h" 3 20472: vector(initializer_list __l, 20472: const allocator_type& __a = allocator_type()) 20472: : _Base(__a) 20472: { 20472: _M_range_initialize(__l.begin(), __l.end(), 20472: random_access_iterator_tag()); 20472: } 20472: # 651 "/usr/include/c++/10/bits/stl_vector.h" 3 20472: template> 20472: vector(_InputIterator __first, _InputIterator __last, 20472: const allocator_type& __a = allocator_type()) 20472: : _Base(__a) 20472: { 20472: _M_range_initialize(__first, __last, 20472: std::__iterator_category(__first)); 20472: } 20472: # 678 "/usr/include/c++/10/bits/stl_vector.h" 3 20472: ~vector() noexcept 20472: { 20472: std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, 20472: _M_get_Tp_allocator()); 20472: ; 20472: } 20472: # 694 "/usr/include/c++/10/bits/stl_vector.h" 3 20472: vector& 20472: operator=(const vector& __x); 20472: # 708 "/usr/include/c++/10/bits/stl_vector.h" 3 20472: vector& 20472: operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move()) 20472: { 20472: constexpr bool __move_storage = 20472: _Alloc_traits::_S_propagate_on_move_assign() 20472: || _Alloc_traits::_S_always_equal(); 20472: _M_move_assign(std::move(__x), __bool_constant<__move_storage>()); 20472: return *this; 20472: } 20472: # 729 "/usr/include/c++/10/bits/stl_vector.h" 3 20472: vector& 20472: operator=(initializer_list __l) 20472: { 20472: this->_M_assign_aux(__l.begin(), __l.end(), 20472: random_access_iterator_tag()); 20472: return *this; 20472: } 20472: # 748 "/usr/include/c++/10/bits/stl_vector.h" 3 20472: void 20472: assign(size_type __n, const value_type& __val) 20472: { _M_fill_assign(__n, __val); } 20472: # 765 "/usr/include/c++/10/bits/stl_vector.h" 3 20472: template> 20472: void 20472: assign(_InputIterator __first, _InputIterator __last) 20472: { _M_assign_dispatch(__first, __last, __false_type()); } 20472: # 793 "/usr/include/c++/10/bits/stl_vector.h" 3 20472: void 20472: assign(initializer_list __l) 20472: { 20472: this->_M_assign_aux(__l.begin(), __l.end(), 20472: random_access_iterator_tag()); 20472: } 20472: 20472: 20472: 20472: using _Base::get_allocator; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: iterator 20472: begin() noexcept 20472: { return iterator(this->_M_impl._M_start); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: const_iterator 20472: begin() const noexcept 20472: { return const_iterator(this->_M_impl._M_start); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: iterator 20472: end() noexcept 20472: { return iterator(this->_M_impl._M_finish); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: const_iterator 20472: end() const noexcept 20472: { return const_iterator(this->_M_impl._M_finish); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: reverse_iterator 20472: rbegin() noexcept 20472: { return reverse_iterator(end()); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: const_reverse_iterator 20472: rbegin() const noexcept 20472: { return const_reverse_iterator(end()); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: reverse_iterator 20472: rend() noexcept 20472: { return reverse_iterator(begin()); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: const_reverse_iterator 20472: rend() const noexcept 20472: { return const_reverse_iterator(begin()); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: const_iterator 20472: cbegin() const noexcept 20472: { return const_iterator(this->_M_impl._M_start); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: const_iterator 20472: cend() const noexcept 20472: { return const_iterator(this->_M_impl._M_finish); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: const_reverse_iterator 20472: crbegin() const noexcept 20472: { return const_reverse_iterator(end()); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: const_reverse_iterator 20472: crend() const noexcept 20472: { return const_reverse_iterator(begin()); } 20472: 20472: 20472: 20472: 20472: size_type 20472: size() const noexcept 20472: { return size_type(this->_M_impl._M_finish - this->_M_impl._M_start); } 20472: 20472: 20472: size_type 20472: max_size() const noexcept 20472: { return _S_max_size(_M_get_Tp_allocator()); } 20472: # 936 "/usr/include/c++/10/bits/stl_vector.h" 3 20472: void 20472: resize(size_type __new_size) 20472: { 20472: if (__new_size > size()) 20472: _M_default_append(__new_size - size()); 20472: else if (__new_size < size()) 20472: _M_erase_at_end(this->_M_impl._M_start + __new_size); 20472: } 20472: # 956 "/usr/include/c++/10/bits/stl_vector.h" 3 20472: void 20472: resize(size_type __new_size, const value_type& __x) 20472: { 20472: if (__new_size > size()) 20472: _M_fill_insert(end(), __new_size - size(), __x); 20472: else if (__new_size < size()) 20472: _M_erase_at_end(this->_M_impl._M_start + __new_size); 20472: } 20472: # 988 "/usr/include/c++/10/bits/stl_vector.h" 3 20472: void 20472: shrink_to_fit() 20472: { _M_shrink_to_fit(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: size_type 20472: capacity() const noexcept 20472: { return size_type(this->_M_impl._M_end_of_storage 20472: - this->_M_impl._M_start); } 20472: 20472: 20472: 20472: 20472: 20472: bool 20472: empty() const noexcept 20472: { return begin() == end(); } 20472: # 1027 "/usr/include/c++/10/bits/stl_vector.h" 3 20472: void 20472: reserve(size_type __n); 20472: # 1042 "/usr/include/c++/10/bits/stl_vector.h" 3 20472: reference 20472: operator[](size_type __n) noexcept 20472: { 20472: ; 20472: return *(this->_M_impl._M_start + __n); 20472: } 20472: # 1060 "/usr/include/c++/10/bits/stl_vector.h" 3 20472: const_reference 20472: operator[](size_type __n) const noexcept 20472: { 20472: ; 20472: return *(this->_M_impl._M_start + __n); 20472: } 20472: 20472: protected: 20472: 20472: void 20472: _M_range_check(size_type __n) const 20472: { 20472: if (__n >= this->size()) 20472: __throw_out_of_range_fmt(("vector::_M_range_check: __n " "(which is %zu) >= this->size() " "(which is %zu)") 20472: 20472: , 20472: __n, this->size()); 20472: } 20472: 20472: public: 20472: # 1091 "/usr/include/c++/10/bits/stl_vector.h" 3 20472: reference 20472: at(size_type __n) 20472: { 20472: _M_range_check(__n); 20472: return (*this)[__n]; 20472: } 20472: # 1109 "/usr/include/c++/10/bits/stl_vector.h" 3 20472: const_reference 20472: at(size_type __n) const 20472: { 20472: _M_range_check(__n); 20472: return (*this)[__n]; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: reference 20472: front() noexcept 20472: { 20472: ; 20472: return *begin(); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: const_reference 20472: front() const noexcept 20472: { 20472: ; 20472: return *begin(); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: reference 20472: back() noexcept 20472: { 20472: ; 20472: return *(end() - 1); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: const_reference 20472: back() const noexcept 20472: { 20472: ; 20472: return *(end() - 1); 20472: } 20472: # 1167 "/usr/include/c++/10/bits/stl_vector.h" 3 20472: _Tp* 20472: data() noexcept 20472: { return _M_data_ptr(this->_M_impl._M_start); } 20472: 20472: const _Tp* 20472: data() const noexcept 20472: { return _M_data_ptr(this->_M_impl._M_start); } 20472: # 1186 "/usr/include/c++/10/bits/stl_vector.h" 3 20472: void 20472: push_back(const value_type& __x) 20472: { 20472: if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) 20472: { 20472: ; 20472: _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, 20472: __x); 20472: ++this->_M_impl._M_finish; 20472: ; 20472: } 20472: else 20472: _M_realloc_insert(end(), __x); 20472: } 20472: 20472: 20472: void 20472: push_back(value_type&& __x) 20472: { emplace_back(std::move(__x)); } 20472: 20472: template 20472: 20472: 20472: 20472: void 20472: 20472: emplace_back(_Args&&... __args); 20472: # 1224 "/usr/include/c++/10/bits/stl_vector.h" 3 20472: void 20472: pop_back() noexcept 20472: { 20472: ; 20472: --this->_M_impl._M_finish; 20472: _Alloc_traits::destroy(this->_M_impl, this->_M_impl._M_finish); 20472: ; 20472: } 20472: # 1246 "/usr/include/c++/10/bits/stl_vector.h" 3 20472: template 20472: iterator 20472: emplace(const_iterator __position, _Args&&... __args) 20472: { return _M_emplace_aux(__position, std::forward<_Args>(__args)...); } 20472: # 1262 "/usr/include/c++/10/bits/stl_vector.h" 3 20472: iterator 20472: insert(const_iterator __position, const value_type& __x); 20472: # 1292 "/usr/include/c++/10/bits/stl_vector.h" 3 20472: iterator 20472: insert(const_iterator __position, value_type&& __x) 20472: { return _M_insert_rval(__position, std::move(__x)); } 20472: # 1309 "/usr/include/c++/10/bits/stl_vector.h" 3 20472: iterator 20472: insert(const_iterator __position, initializer_list __l) 20472: { 20472: auto __offset = __position - cbegin(); 20472: _M_range_insert(begin() + __offset, __l.begin(), __l.end(), 20472: std::random_access_iterator_tag()); 20472: return begin() + __offset; 20472: } 20472: # 1334 "/usr/include/c++/10/bits/stl_vector.h" 3 20472: iterator 20472: insert(const_iterator __position, size_type __n, const value_type& __x) 20472: { 20472: difference_type __offset = __position - cbegin(); 20472: _M_fill_insert(begin() + __offset, __n, __x); 20472: return begin() + __offset; 20472: } 20472: # 1376 "/usr/include/c++/10/bits/stl_vector.h" 3 20472: template> 20472: iterator 20472: insert(const_iterator __position, _InputIterator __first, 20472: _InputIterator __last) 20472: { 20472: difference_type __offset = __position - cbegin(); 20472: _M_insert_dispatch(begin() + __offset, 20472: __first, __last, __false_type()); 20472: return begin() + __offset; 20472: } 20472: # 1428 "/usr/include/c++/10/bits/stl_vector.h" 3 20472: iterator 20472: 20472: erase(const_iterator __position) 20472: { return _M_erase(begin() + (__position - cbegin())); } 20472: # 1455 "/usr/include/c++/10/bits/stl_vector.h" 3 20472: iterator 20472: 20472: erase(const_iterator __first, const_iterator __last) 20472: { 20472: const auto __beg = begin(); 20472: const auto __cbeg = cbegin(); 20472: return _M_erase(__beg + (__first - __cbeg), __beg + (__last - __cbeg)); 20472: } 20472: # 1479 "/usr/include/c++/10/bits/stl_vector.h" 3 20472: void 20472: swap(vector& __x) noexcept 20472: { 20472: 20472: 20472: ; 20472: 20472: this->_M_impl._M_swap_data(__x._M_impl); 20472: _Alloc_traits::_S_on_swap(_M_get_Tp_allocator(), 20472: __x._M_get_Tp_allocator()); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: void 20472: clear() noexcept 20472: { _M_erase_at_end(this->_M_impl._M_start); } 20472: 20472: protected: 20472: 20472: 20472: 20472: 20472: template 20472: pointer 20472: _M_allocate_and_copy(size_type __n, 20472: _ForwardIterator __first, _ForwardIterator __last) 20472: { 20472: pointer __result = this->_M_allocate(__n); 20472: try 20472: { 20472: std::__uninitialized_copy_a(__first, __last, __result, 20472: _M_get_Tp_allocator()); 20472: return __result; 20472: } 20472: catch(...) 20472: { 20472: _M_deallocate(__result, __n); 20472: throw; 20472: } 20472: } 20472: # 1556 "/usr/include/c++/10/bits/stl_vector.h" 3 20472: template 20472: void 20472: _M_range_initialize(_InputIterator __first, _InputIterator __last, 20472: std::input_iterator_tag) 20472: { 20472: try { 20472: for (; __first != __last; ++__first) 20472: 20472: emplace_back(*__first); 20472: 20472: 20472: 20472: } catch(...) { 20472: clear(); 20472: throw; 20472: } 20472: } 20472: 20472: 20472: template 20472: void 20472: _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last, 20472: std::forward_iterator_tag) 20472: { 20472: const size_type __n = std::distance(__first, __last); 20472: this->_M_impl._M_start 20472: = this->_M_allocate(_S_check_init_len(__n, _M_get_Tp_allocator())); 20472: this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; 20472: this->_M_impl._M_finish = 20472: std::__uninitialized_copy_a(__first, __last, 20472: this->_M_impl._M_start, 20472: _M_get_Tp_allocator()); 20472: } 20472: 20472: 20472: 20472: void 20472: _M_fill_initialize(size_type __n, const value_type& __value) 20472: { 20472: this->_M_impl._M_finish = 20472: std::__uninitialized_fill_n_a(this->_M_impl._M_start, __n, __value, 20472: _M_get_Tp_allocator()); 20472: } 20472: 20472: 20472: 20472: void 20472: _M_default_initialize(size_type __n) 20472: { 20472: this->_M_impl._M_finish = 20472: std::__uninitialized_default_n_a(this->_M_impl._M_start, __n, 20472: _M_get_Tp_allocator()); 20472: } 20472: # 1618 "/usr/include/c++/10/bits/stl_vector.h" 3 20472: template 20472: void 20472: _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) 20472: { _M_fill_assign(__n, __val); } 20472: 20472: 20472: template 20472: void 20472: _M_assign_dispatch(_InputIterator __first, _InputIterator __last, 20472: __false_type) 20472: { _M_assign_aux(__first, __last, std::__iterator_category(__first)); } 20472: 20472: 20472: template 20472: void 20472: _M_assign_aux(_InputIterator __first, _InputIterator __last, 20472: std::input_iterator_tag); 20472: 20472: 20472: template 20472: void 20472: _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, 20472: std::forward_iterator_tag); 20472: 20472: 20472: 20472: void 20472: _M_fill_assign(size_type __n, const value_type& __val); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: void 20472: _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __val, 20472: __true_type) 20472: { _M_fill_insert(__pos, __n, __val); } 20472: 20472: 20472: template 20472: void 20472: _M_insert_dispatch(iterator __pos, _InputIterator __first, 20472: _InputIterator __last, __false_type) 20472: { 20472: _M_range_insert(__pos, __first, __last, 20472: std::__iterator_category(__first)); 20472: } 20472: 20472: 20472: template 20472: void 20472: _M_range_insert(iterator __pos, _InputIterator __first, 20472: _InputIterator __last, std::input_iterator_tag); 20472: 20472: 20472: template 20472: void 20472: _M_range_insert(iterator __pos, _ForwardIterator __first, 20472: _ForwardIterator __last, std::forward_iterator_tag); 20472: 20472: 20472: 20472: void 20472: _M_fill_insert(iterator __pos, size_type __n, const value_type& __x); 20472: 20472: 20472: 20472: void 20472: _M_default_append(size_type __n); 20472: 20472: bool 20472: _M_shrink_to_fit(); 20472: # 1705 "/usr/include/c++/10/bits/stl_vector.h" 3 20472: struct _Temporary_value 20472: { 20472: template 20472: explicit 20472: _Temporary_value(vector* __vec, _Args&&... __args) : _M_this(__vec) 20472: { 20472: _Alloc_traits::construct(_M_this->_M_impl, _M_ptr(), 20472: std::forward<_Args>(__args)...); 20472: } 20472: 20472: ~_Temporary_value() 20472: { _Alloc_traits::destroy(_M_this->_M_impl, _M_ptr()); } 20472: 20472: value_type& 20472: _M_val() { return *_M_ptr(); } 20472: 20472: private: 20472: _Tp* 20472: _M_ptr() { return reinterpret_cast<_Tp*>(&__buf); } 20472: 20472: vector* _M_this; 20472: typename aligned_storage::type __buf; 20472: }; 20472: 20472: 20472: 20472: template 20472: void 20472: _M_insert_aux(iterator __position, _Arg&& __arg); 20472: 20472: template 20472: void 20472: _M_realloc_insert(iterator __position, _Args&&... __args); 20472: 20472: 20472: iterator 20472: _M_insert_rval(const_iterator __position, value_type&& __v); 20472: 20472: 20472: template 20472: iterator 20472: _M_emplace_aux(const_iterator __position, _Args&&... __args); 20472: 20472: 20472: iterator 20472: _M_emplace_aux(const_iterator __position, value_type&& __v) 20472: { return _M_insert_rval(__position, std::move(__v)); } 20472: 20472: 20472: 20472: size_type 20472: _M_check_len(size_type __n, const char* __s) const 20472: { 20472: if (max_size() - size() < __n) 20472: __throw_length_error((__s)); 20472: 20472: const size_type __len = size() + (std::max)(size(), __n); 20472: return (__len < size() || __len > max_size()) ? max_size() : __len; 20472: } 20472: 20472: 20472: static size_type 20472: _S_check_init_len(size_type __n, const allocator_type& __a) 20472: { 20472: if (__n > _S_max_size(_Tp_alloc_type(__a))) 20472: __throw_length_error( 20472: ("cannot create std::vector larger than max_size()")); 20472: return __n; 20472: } 20472: 20472: static size_type 20472: _S_max_size(const _Tp_alloc_type& __a) noexcept 20472: { 20472: 20472: 20472: 20472: const size_t __diffmax 20472: = __gnu_cxx::__numeric_traits::__max / sizeof(_Tp); 20472: const size_t __allocmax = _Alloc_traits::max_size(__a); 20472: return (std::min)(__diffmax, __allocmax); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: void 20472: _M_erase_at_end(pointer __pos) noexcept 20472: { 20472: if (size_type __n = this->_M_impl._M_finish - __pos) 20472: { 20472: std::_Destroy(__pos, this->_M_impl._M_finish, 20472: _M_get_Tp_allocator()); 20472: this->_M_impl._M_finish = __pos; 20472: ; 20472: } 20472: } 20472: 20472: iterator 20472: _M_erase(iterator __position); 20472: 20472: iterator 20472: _M_erase(iterator __first, iterator __last); 20472: 20472: 20472: private: 20472: 20472: 20472: 20472: void 20472: _M_move_assign(vector&& __x, true_type) noexcept 20472: { 20472: vector __tmp(get_allocator()); 20472: this->_M_impl._M_swap_data(__x._M_impl); 20472: __tmp._M_impl._M_swap_data(__x._M_impl); 20472: std::__alloc_on_move(_M_get_Tp_allocator(), __x._M_get_Tp_allocator()); 20472: } 20472: 20472: 20472: 20472: void 20472: _M_move_assign(vector&& __x, false_type) 20472: { 20472: if (__x._M_get_Tp_allocator() == this->_M_get_Tp_allocator()) 20472: _M_move_assign(std::move(__x), true_type()); 20472: else 20472: { 20472: 20472: 20472: this->_M_assign_aux(std::make_move_iterator(__x.begin()), 20472: std::make_move_iterator(__x.end()), 20472: std::random_access_iterator_tag()); 20472: __x.clear(); 20472: } 20472: } 20472: 20472: 20472: template 20472: _Up* 20472: _M_data_ptr(_Up* __ptr) const noexcept 20472: { return __ptr; } 20472: 20472: 20472: template 20472: typename std::pointer_traits<_Ptr>::element_type* 20472: _M_data_ptr(_Ptr __ptr) const 20472: { return empty() ? nullptr : std::__to_address(__ptr); } 20472: # 1868 "/usr/include/c++/10/bits/stl_vector.h" 3 20472: }; 20472: # 1890 "/usr/include/c++/10/bits/stl_vector.h" 3 20472: template 20472: inline bool 20472: operator==(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) 20472: { return (__x.size() == __y.size() 20472: && std::equal(__x.begin(), __x.end(), __y.begin())); } 20472: # 1928 "/usr/include/c++/10/bits/stl_vector.h" 3 20472: template 20472: inline bool 20472: operator<(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) 20472: { return std::lexicographical_compare(__x.begin(), __x.end(), 20472: __y.begin(), __y.end()); } 20472: 20472: 20472: template 20472: inline bool 20472: operator!=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) 20472: { return !(__x == __y); } 20472: 20472: 20472: template 20472: inline bool 20472: operator>(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) 20472: { return __y < __x; } 20472: 20472: 20472: template 20472: inline bool 20472: operator<=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) 20472: { return !(__y < __x); } 20472: 20472: 20472: template 20472: inline bool 20472: operator>=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) 20472: { return !(__x < __y); } 20472: 20472: 20472: 20472: template 20472: inline void 20472: swap(vector<_Tp, _Alloc>& __x, vector<_Tp, _Alloc>& __y) 20472: noexcept(noexcept(__x.swap(__y))) 20472: { __x.swap(__y); } 20472: 20472: 20472: # 1982 "/usr/include/c++/10/bits/stl_vector.h" 3 20472: 20472: } 20472: # 68 "/usr/include/c++/10/vector" 2 3 20472: # 1 "/usr/include/c++/10/bits/stl_bvector.h" 1 3 20472: # 64 "/usr/include/c++/10/bits/stl_bvector.h" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: typedef unsigned long _Bit_type; 20472: enum { _S_word_bit = int(8 * sizeof(_Bit_type)) }; 20472: 20472: struct _Bit_reference 20472: { 20472: _Bit_type * _M_p; 20472: _Bit_type _M_mask; 20472: 20472: _Bit_reference(_Bit_type * __x, _Bit_type __y) 20472: : _M_p(__x), _M_mask(__y) { } 20472: 20472: _Bit_reference() noexcept : _M_p(0), _M_mask(0) { } 20472: 20472: 20472: _Bit_reference(const _Bit_reference&) = default; 20472: 20472: 20472: operator bool() const noexcept 20472: { return !!(*_M_p & _M_mask); } 20472: 20472: _Bit_reference& 20472: operator=(bool __x) noexcept 20472: { 20472: if (__x) 20472: *_M_p |= _M_mask; 20472: else 20472: *_M_p &= ~_M_mask; 20472: return *this; 20472: } 20472: 20472: _Bit_reference& 20472: operator=(const _Bit_reference& __x) noexcept 20472: { return *this = bool(__x); } 20472: 20472: bool 20472: operator==(const _Bit_reference& __x) const 20472: { return bool(*this) == bool(__x); } 20472: 20472: bool 20472: operator<(const _Bit_reference& __x) const 20472: { return !bool(*this) && bool(__x); } 20472: 20472: void 20472: flip() noexcept 20472: { *_M_p ^= _M_mask; } 20472: }; 20472: 20472: 20472: inline void 20472: swap(_Bit_reference __x, _Bit_reference __y) noexcept 20472: { 20472: bool __tmp = __x; 20472: __x = __y; 20472: __y = __tmp; 20472: } 20472: 20472: inline void 20472: swap(_Bit_reference __x, bool& __y) noexcept 20472: { 20472: bool __tmp = __x; 20472: __x = __y; 20472: __y = __tmp; 20472: } 20472: 20472: inline void 20472: swap(bool& __x, _Bit_reference __y) noexcept 20472: { 20472: bool __tmp = __x; 20472: __x = __y; 20472: __y = __tmp; 20472: } 20472: 20472: 20472: struct _Bit_iterator_base 20472: : public std::iterator 20472: { 20472: _Bit_type * _M_p; 20472: unsigned int _M_offset; 20472: 20472: _Bit_iterator_base(_Bit_type * __x, unsigned int __y) 20472: : _M_p(__x), _M_offset(__y) { } 20472: 20472: void 20472: _M_bump_up() 20472: { 20472: if (_M_offset++ == int(_S_word_bit) - 1) 20472: { 20472: _M_offset = 0; 20472: ++_M_p; 20472: } 20472: } 20472: 20472: void 20472: _M_bump_down() 20472: { 20472: if (_M_offset-- == 0) 20472: { 20472: _M_offset = int(_S_word_bit) - 1; 20472: --_M_p; 20472: } 20472: } 20472: 20472: void 20472: _M_incr(ptrdiff_t __i) 20472: { 20472: difference_type __n = __i + _M_offset; 20472: _M_p += __n / int(_S_word_bit); 20472: __n = __n % int(_S_word_bit); 20472: if (__n < 0) 20472: { 20472: __n += int(_S_word_bit); 20472: --_M_p; 20472: } 20472: _M_offset = static_cast(__n); 20472: } 20472: 20472: friend bool 20472: operator==(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) 20472: { return __x._M_p == __y._M_p && __x._M_offset == __y._M_offset; } 20472: # 199 "/usr/include/c++/10/bits/stl_bvector.h" 3 20472: friend bool 20472: operator<(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) 20472: { 20472: return __x._M_p < __y._M_p 20472: || (__x._M_p == __y._M_p && __x._M_offset < __y._M_offset); 20472: } 20472: 20472: friend bool 20472: operator!=(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) 20472: { return !(__x == __y); } 20472: 20472: friend bool 20472: operator>(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) 20472: { return __y < __x; } 20472: 20472: friend bool 20472: operator<=(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) 20472: { return !(__y < __x); } 20472: 20472: friend bool 20472: operator>=(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) 20472: { return !(__x < __y); } 20472: 20472: 20472: friend ptrdiff_t 20472: operator-(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) 20472: { 20472: return (int(_S_word_bit) * (__x._M_p - __y._M_p) 20472: + __x._M_offset - __y._M_offset); 20472: } 20472: }; 20472: 20472: struct _Bit_iterator : public _Bit_iterator_base 20472: { 20472: typedef _Bit_reference reference; 20472: 20472: 20472: 20472: typedef _Bit_reference* pointer; 20472: 20472: typedef _Bit_iterator iterator; 20472: 20472: _Bit_iterator() : _Bit_iterator_base(0, 0) { } 20472: 20472: _Bit_iterator(_Bit_type * __x, unsigned int __y) 20472: : _Bit_iterator_base(__x, __y) { } 20472: 20472: iterator 20472: _M_const_cast() const 20472: { return *this; } 20472: 20472: reference 20472: operator*() const 20472: { return reference(_M_p, 1UL << _M_offset); } 20472: 20472: iterator& 20472: operator++() 20472: { 20472: _M_bump_up(); 20472: return *this; 20472: } 20472: 20472: iterator 20472: operator++(int) 20472: { 20472: iterator __tmp = *this; 20472: _M_bump_up(); 20472: return __tmp; 20472: } 20472: 20472: iterator& 20472: operator--() 20472: { 20472: _M_bump_down(); 20472: return *this; 20472: } 20472: 20472: iterator 20472: operator--(int) 20472: { 20472: iterator __tmp = *this; 20472: _M_bump_down(); 20472: return __tmp; 20472: } 20472: 20472: iterator& 20472: operator+=(difference_type __i) 20472: { 20472: _M_incr(__i); 20472: return *this; 20472: } 20472: 20472: iterator& 20472: operator-=(difference_type __i) 20472: { 20472: *this += -__i; 20472: return *this; 20472: } 20472: 20472: reference 20472: operator[](difference_type __i) const 20472: { return *(*this + __i); } 20472: 20472: friend iterator 20472: operator+(const iterator& __x, difference_type __n) 20472: { 20472: iterator __tmp = __x; 20472: __tmp += __n; 20472: return __tmp; 20472: } 20472: 20472: friend iterator 20472: operator+(difference_type __n, const iterator& __x) 20472: { return __x + __n; } 20472: 20472: friend iterator 20472: operator-(const iterator& __x, difference_type __n) 20472: { 20472: iterator __tmp = __x; 20472: __tmp -= __n; 20472: return __tmp; 20472: } 20472: }; 20472: 20472: struct _Bit_const_iterator : public _Bit_iterator_base 20472: { 20472: typedef bool reference; 20472: typedef bool const_reference; 20472: 20472: 20472: 20472: typedef const bool* pointer; 20472: 20472: typedef _Bit_const_iterator const_iterator; 20472: 20472: _Bit_const_iterator() : _Bit_iterator_base(0, 0) { } 20472: 20472: _Bit_const_iterator(_Bit_type * __x, unsigned int __y) 20472: : _Bit_iterator_base(__x, __y) { } 20472: 20472: _Bit_const_iterator(const _Bit_iterator& __x) 20472: : _Bit_iterator_base(__x._M_p, __x._M_offset) { } 20472: 20472: _Bit_iterator 20472: _M_const_cast() const 20472: { return _Bit_iterator(_M_p, _M_offset); } 20472: 20472: const_reference 20472: operator*() const 20472: { return _Bit_reference(_M_p, 1UL << _M_offset); } 20472: 20472: const_iterator& 20472: operator++() 20472: { 20472: _M_bump_up(); 20472: return *this; 20472: } 20472: 20472: const_iterator 20472: operator++(int) 20472: { 20472: const_iterator __tmp = *this; 20472: _M_bump_up(); 20472: return __tmp; 20472: } 20472: 20472: const_iterator& 20472: operator--() 20472: { 20472: _M_bump_down(); 20472: return *this; 20472: } 20472: 20472: const_iterator 20472: operator--(int) 20472: { 20472: const_iterator __tmp = *this; 20472: _M_bump_down(); 20472: return __tmp; 20472: } 20472: 20472: const_iterator& 20472: operator+=(difference_type __i) 20472: { 20472: _M_incr(__i); 20472: return *this; 20472: } 20472: 20472: const_iterator& 20472: operator-=(difference_type __i) 20472: { 20472: *this += -__i; 20472: return *this; 20472: } 20472: 20472: const_reference 20472: operator[](difference_type __i) const 20472: { return *(*this + __i); } 20472: 20472: friend const_iterator 20472: operator+(const const_iterator& __x, difference_type __n) 20472: { 20472: const_iterator __tmp = __x; 20472: __tmp += __n; 20472: return __tmp; 20472: } 20472: 20472: friend const_iterator 20472: operator-(const const_iterator& __x, difference_type __n) 20472: { 20472: const_iterator __tmp = __x; 20472: __tmp -= __n; 20472: return __tmp; 20472: } 20472: 20472: friend const_iterator 20472: operator+(difference_type __n, const const_iterator& __x) 20472: { return __x + __n; } 20472: }; 20472: 20472: inline void 20472: __fill_bvector(_Bit_type * __v, 20472: unsigned int __first, unsigned int __last, bool __x) 20472: { 20472: const _Bit_type __fmask = ~0ul << __first; 20472: const _Bit_type __lmask = ~0ul >> (_S_word_bit - __last); 20472: const _Bit_type __mask = __fmask & __lmask; 20472: 20472: if (__x) 20472: *__v |= __mask; 20472: else 20472: *__v &= ~__mask; 20472: } 20472: 20472: inline void 20472: fill(_Bit_iterator __first, _Bit_iterator __last, const bool& __x) 20472: { 20472: if (__first._M_p != __last._M_p) 20472: { 20472: _Bit_type* __first_p = __first._M_p; 20472: if (__first._M_offset != 0) 20472: __fill_bvector(__first_p++, __first._M_offset, _S_word_bit, __x); 20472: 20472: __builtin_memset(__first_p, __x ? ~0 : 0, 20472: (__last._M_p - __first_p) * sizeof(_Bit_type)); 20472: 20472: if (__last._M_offset != 0) 20472: __fill_bvector(__last._M_p, 0, __last._M_offset, __x); 20472: } 20472: else if (__first._M_offset != __last._M_offset) 20472: __fill_bvector(__first._M_p, __first._M_offset, __last._M_offset, __x); 20472: } 20472: 20472: template 20472: struct _Bvector_base 20472: { 20472: typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template 20472: rebind<_Bit_type>::other _Bit_alloc_type; 20472: typedef typename __gnu_cxx::__alloc_traits<_Bit_alloc_type> 20472: _Bit_alloc_traits; 20472: typedef typename _Bit_alloc_traits::pointer _Bit_pointer; 20472: 20472: struct _Bvector_impl_data 20472: { 20472: _Bit_iterator _M_start; 20472: _Bit_iterator _M_finish; 20472: _Bit_pointer _M_end_of_storage; 20472: 20472: _Bvector_impl_data() noexcept 20472: : _M_start(), _M_finish(), _M_end_of_storage() 20472: { } 20472: 20472: 20472: _Bvector_impl_data(_Bvector_impl_data&& __x) noexcept 20472: : _M_start(__x._M_start), _M_finish(__x._M_finish) 20472: , _M_end_of_storage(__x._M_end_of_storage) 20472: { __x._M_reset(); } 20472: 20472: void 20472: _M_move_data(_Bvector_impl_data&& __x) noexcept 20472: { 20472: this->_M_start = __x._M_start; 20472: this->_M_finish = __x._M_finish; 20472: this->_M_end_of_storage = __x._M_end_of_storage; 20472: __x._M_reset(); 20472: } 20472: 20472: 20472: void 20472: _M_reset() noexcept 20472: { 20472: _M_start = _M_finish = _Bit_iterator(); 20472: _M_end_of_storage = _Bit_pointer(); 20472: } 20472: }; 20472: 20472: struct _Bvector_impl 20472: : public _Bit_alloc_type, public _Bvector_impl_data 20472: { 20472: public: 20472: _Bvector_impl() noexcept(is_nothrow_default_constructible<_Bit_alloc_type>::value) 20472: 20472: : _Bit_alloc_type() 20472: { } 20472: 20472: _Bvector_impl(const _Bit_alloc_type& __a) noexcept 20472: : _Bit_alloc_type(__a) 20472: { } 20472: 20472: 20472: _Bvector_impl(_Bvector_impl&&) = default; 20472: 20472: 20472: _Bit_type* 20472: _M_end_addr() const noexcept 20472: { 20472: if (this->_M_end_of_storage) 20472: return std::__addressof(this->_M_end_of_storage[-1]) + 1; 20472: return 0; 20472: } 20472: }; 20472: 20472: public: 20472: typedef _Alloc allocator_type; 20472: 20472: _Bit_alloc_type& 20472: _M_get_Bit_allocator() noexcept 20472: { return this->_M_impl; } 20472: 20472: const _Bit_alloc_type& 20472: _M_get_Bit_allocator() const noexcept 20472: { return this->_M_impl; } 20472: 20472: allocator_type 20472: get_allocator() const noexcept 20472: { return allocator_type(_M_get_Bit_allocator()); } 20472: 20472: 20472: _Bvector_base() = default; 20472: 20472: 20472: 20472: 20472: _Bvector_base(const allocator_type& __a) 20472: : _M_impl(__a) { } 20472: 20472: 20472: _Bvector_base(_Bvector_base&&) = default; 20472: 20472: 20472: ~_Bvector_base() 20472: { this->_M_deallocate(); } 20472: 20472: protected: 20472: _Bvector_impl _M_impl; 20472: 20472: _Bit_pointer 20472: _M_allocate(size_t __n) 20472: { return _Bit_alloc_traits::allocate(_M_impl, _S_nword(__n)); } 20472: 20472: void 20472: _M_deallocate() 20472: { 20472: if (_M_impl._M_start._M_p) 20472: { 20472: const size_t __n = _M_impl._M_end_addr() - _M_impl._M_start._M_p; 20472: _Bit_alloc_traits::deallocate(_M_impl, 20472: _M_impl._M_end_of_storage - __n, 20472: __n); 20472: _M_impl._M_reset(); 20472: } 20472: } 20472: 20472: 20472: void 20472: _M_move_data(_Bvector_base&& __x) noexcept 20472: { _M_impl._M_move_data(std::move(__x._M_impl)); } 20472: 20472: 20472: static size_t 20472: _S_nword(size_t __n) 20472: { return (__n + int(_S_word_bit) - 1) / int(_S_word_bit); } 20472: }; 20472: 20472: 20472: 20472: } 20472: 20472: 20472: 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: # 614 "/usr/include/c++/10/bits/stl_bvector.h" 3 20472: template 20472: class vector : protected _Bvector_base<_Alloc> 20472: { 20472: typedef _Bvector_base<_Alloc> _Base; 20472: typedef typename _Base::_Bit_pointer _Bit_pointer; 20472: typedef typename _Base::_Bit_alloc_traits _Bit_alloc_traits; 20472: 20472: 20472: friend struct std::hash; 20472: 20472: 20472: public: 20472: typedef bool value_type; 20472: typedef size_t size_type; 20472: typedef ptrdiff_t difference_type; 20472: typedef _Bit_reference reference; 20472: typedef bool const_reference; 20472: typedef _Bit_reference* pointer; 20472: typedef const bool* const_pointer; 20472: typedef _Bit_iterator iterator; 20472: typedef _Bit_const_iterator const_iterator; 20472: typedef std::reverse_iterator const_reverse_iterator; 20472: typedef std::reverse_iterator reverse_iterator; 20472: typedef _Alloc allocator_type; 20472: 20472: allocator_type 20472: get_allocator() const 20472: { return _Base::get_allocator(); } 20472: 20472: protected: 20472: using _Base::_M_allocate; 20472: using _Base::_M_deallocate; 20472: using _Base::_S_nword; 20472: using _Base::_M_get_Bit_allocator; 20472: 20472: public: 20472: 20472: vector() = default; 20472: 20472: 20472: 20472: 20472: explicit 20472: vector(const allocator_type& __a) 20472: : _Base(__a) { } 20472: 20472: 20472: explicit 20472: vector(size_type __n, const allocator_type& __a = allocator_type()) 20472: : vector(__n, false, __a) 20472: { } 20472: 20472: vector(size_type __n, const bool& __value, 20472: const allocator_type& __a = allocator_type()) 20472: 20472: 20472: 20472: 20472: 20472: : _Base(__a) 20472: { 20472: _M_initialize(__n); 20472: _M_initialize_value(__value); 20472: } 20472: 20472: vector(const vector& __x) 20472: : _Base(_Bit_alloc_traits::_S_select_on_copy(__x._M_get_Bit_allocator())) 20472: { 20472: _M_initialize(__x.size()); 20472: _M_copy_aligned(__x.begin(), __x.end(), this->_M_impl._M_start); 20472: } 20472: 20472: 20472: vector(vector&&) = default; 20472: 20472: vector(vector&& __x, const allocator_type& __a) 20472: noexcept(_Bit_alloc_traits::_S_always_equal()) 20472: : _Base(__a) 20472: { 20472: if (__x.get_allocator() == __a) 20472: this->_M_move_data(std::move(__x)); 20472: else 20472: { 20472: _M_initialize(__x.size()); 20472: _M_copy_aligned(__x.begin(), __x.end(), begin()); 20472: __x.clear(); 20472: } 20472: } 20472: 20472: vector(const vector& __x, const allocator_type& __a) 20472: : _Base(__a) 20472: { 20472: _M_initialize(__x.size()); 20472: _M_copy_aligned(__x.begin(), __x.end(), this->_M_impl._M_start); 20472: } 20472: 20472: vector(initializer_list __l, 20472: const allocator_type& __a = allocator_type()) 20472: : _Base(__a) 20472: { 20472: _M_initialize_range(__l.begin(), __l.end(), 20472: random_access_iterator_tag()); 20472: } 20472: 20472: 20472: 20472: template> 20472: vector(_InputIterator __first, _InputIterator __last, 20472: const allocator_type& __a = allocator_type()) 20472: : _Base(__a) 20472: { _M_initialize_dispatch(__first, __last, __false_type()); } 20472: # 737 "/usr/include/c++/10/bits/stl_bvector.h" 3 20472: ~vector() noexcept { } 20472: 20472: vector& 20472: operator=(const vector& __x) 20472: { 20472: if (&__x == this) 20472: return *this; 20472: 20472: if (_Bit_alloc_traits::_S_propagate_on_copy_assign()) 20472: { 20472: if (this->_M_get_Bit_allocator() != __x._M_get_Bit_allocator()) 20472: { 20472: this->_M_deallocate(); 20472: std::__alloc_on_copy(_M_get_Bit_allocator(), 20472: __x._M_get_Bit_allocator()); 20472: _M_initialize(__x.size()); 20472: } 20472: else 20472: std::__alloc_on_copy(_M_get_Bit_allocator(), 20472: __x._M_get_Bit_allocator()); 20472: } 20472: 20472: if (__x.size() > capacity()) 20472: { 20472: this->_M_deallocate(); 20472: _M_initialize(__x.size()); 20472: } 20472: this->_M_impl._M_finish = _M_copy_aligned(__x.begin(), __x.end(), 20472: begin()); 20472: return *this; 20472: } 20472: 20472: 20472: vector& 20472: operator=(vector&& __x) noexcept(_Bit_alloc_traits::_S_nothrow_move()) 20472: { 20472: if (_Bit_alloc_traits::_S_propagate_on_move_assign() 20472: || this->_M_get_Bit_allocator() == __x._M_get_Bit_allocator()) 20472: { 20472: this->_M_deallocate(); 20472: this->_M_move_data(std::move(__x)); 20472: std::__alloc_on_move(_M_get_Bit_allocator(), 20472: __x._M_get_Bit_allocator()); 20472: } 20472: else 20472: { 20472: if (__x.size() > capacity()) 20472: { 20472: this->_M_deallocate(); 20472: _M_initialize(__x.size()); 20472: } 20472: this->_M_impl._M_finish = _M_copy_aligned(__x.begin(), __x.end(), 20472: begin()); 20472: __x.clear(); 20472: } 20472: return *this; 20472: } 20472: 20472: vector& 20472: operator=(initializer_list __l) 20472: { 20472: this->assign (__l.begin(), __l.end()); 20472: return *this; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: void 20472: assign(size_type __n, const bool& __x) 20472: { _M_fill_assign(__n, __x); } 20472: 20472: 20472: template> 20472: void 20472: assign(_InputIterator __first, _InputIterator __last) 20472: { _M_assign_aux(__first, __last, std::__iterator_category(__first)); } 20472: # 828 "/usr/include/c++/10/bits/stl_bvector.h" 3 20472: void 20472: assign(initializer_list __l) 20472: { _M_assign_aux(__l.begin(), __l.end(), random_access_iterator_tag()); } 20472: 20472: 20472: iterator 20472: begin() noexcept 20472: { return iterator(this->_M_impl._M_start._M_p, 0); } 20472: 20472: const_iterator 20472: begin() const noexcept 20472: { return const_iterator(this->_M_impl._M_start._M_p, 0); } 20472: 20472: iterator 20472: end() noexcept 20472: { return this->_M_impl._M_finish; } 20472: 20472: const_iterator 20472: end() const noexcept 20472: { return this->_M_impl._M_finish; } 20472: 20472: reverse_iterator 20472: rbegin() noexcept 20472: { return reverse_iterator(end()); } 20472: 20472: const_reverse_iterator 20472: rbegin() const noexcept 20472: { return const_reverse_iterator(end()); } 20472: 20472: reverse_iterator 20472: rend() noexcept 20472: { return reverse_iterator(begin()); } 20472: 20472: const_reverse_iterator 20472: rend() const noexcept 20472: { return const_reverse_iterator(begin()); } 20472: 20472: 20472: const_iterator 20472: cbegin() const noexcept 20472: { return const_iterator(this->_M_impl._M_start._M_p, 0); } 20472: 20472: const_iterator 20472: cend() const noexcept 20472: { return this->_M_impl._M_finish; } 20472: 20472: const_reverse_iterator 20472: crbegin() const noexcept 20472: { return const_reverse_iterator(end()); } 20472: 20472: const_reverse_iterator 20472: crend() const noexcept 20472: { return const_reverse_iterator(begin()); } 20472: 20472: 20472: size_type 20472: size() const noexcept 20472: { return size_type(end() - begin()); } 20472: 20472: size_type 20472: max_size() const noexcept 20472: { 20472: const size_type __isize = 20472: __gnu_cxx::__numeric_traits::__max 20472: - int(_S_word_bit) + 1; 20472: const size_type __asize 20472: = _Bit_alloc_traits::max_size(_M_get_Bit_allocator()); 20472: return (__asize <= __isize / int(_S_word_bit) 20472: ? __asize * int(_S_word_bit) : __isize); 20472: } 20472: 20472: size_type 20472: capacity() const noexcept 20472: { return size_type(const_iterator(this->_M_impl._M_end_addr(), 0) 20472: - begin()); } 20472: 20472: bool 20472: empty() const noexcept 20472: { return begin() == end(); } 20472: 20472: reference 20472: operator[](size_type __n) 20472: { 20472: return *iterator(this->_M_impl._M_start._M_p 20472: + __n / int(_S_word_bit), __n % int(_S_word_bit)); 20472: } 20472: 20472: const_reference 20472: operator[](size_type __n) const 20472: { 20472: return *const_iterator(this->_M_impl._M_start._M_p 20472: + __n / int(_S_word_bit), __n % int(_S_word_bit)); 20472: } 20472: 20472: protected: 20472: void 20472: _M_range_check(size_type __n) const 20472: { 20472: if (__n >= this->size()) 20472: __throw_out_of_range_fmt(("vector::_M_range_check: __n " "(which is %zu) >= this->size() " "(which is %zu)") 20472: 20472: , 20472: __n, this->size()); 20472: } 20472: 20472: public: 20472: reference 20472: at(size_type __n) 20472: { _M_range_check(__n); return (*this)[__n]; } 20472: 20472: const_reference 20472: at(size_type __n) const 20472: { _M_range_check(__n); return (*this)[__n]; } 20472: 20472: void 20472: reserve(size_type __n) 20472: { 20472: if (__n > max_size()) 20472: __throw_length_error(("vector::reserve")); 20472: if (capacity() < __n) 20472: _M_reallocate(__n); 20472: } 20472: 20472: reference 20472: front() 20472: { return *begin(); } 20472: 20472: const_reference 20472: front() const 20472: { return *begin(); } 20472: 20472: reference 20472: back() 20472: { return *(end() - 1); } 20472: 20472: const_reference 20472: back() const 20472: { return *(end() - 1); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: void 20472: data() noexcept { } 20472: 20472: void 20472: push_back(bool __x) 20472: { 20472: if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_addr()) 20472: *this->_M_impl._M_finish++ = __x; 20472: else 20472: _M_insert_aux(end(), __x); 20472: } 20472: 20472: void 20472: swap(vector& __x) noexcept 20472: { 20472: std::swap(this->_M_impl._M_start, __x._M_impl._M_start); 20472: std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish); 20472: std::swap(this->_M_impl._M_end_of_storage, 20472: __x._M_impl._M_end_of_storage); 20472: _Bit_alloc_traits::_S_on_swap(_M_get_Bit_allocator(), 20472: __x._M_get_Bit_allocator()); 20472: } 20472: 20472: 20472: static void 20472: swap(reference __x, reference __y) noexcept 20472: { 20472: bool __tmp = __x; 20472: __x = __y; 20472: __y = __tmp; 20472: } 20472: 20472: iterator 20472: 20472: insert(const_iterator __position, const bool& __x = bool()) 20472: 20472: 20472: 20472: { 20472: const difference_type __n = __position - begin(); 20472: if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_addr() 20472: && __position == end()) 20472: *this->_M_impl._M_finish++ = __x; 20472: else 20472: _M_insert_aux(__position._M_const_cast(), __x); 20472: return begin() + __n; 20472: } 20472: 20472: 20472: template> 20472: iterator 20472: insert(const_iterator __position, 20472: _InputIterator __first, _InputIterator __last) 20472: { 20472: difference_type __offset = __position - cbegin(); 20472: _M_insert_dispatch(__position._M_const_cast(), 20472: __first, __last, __false_type()); 20472: return begin() + __offset; 20472: } 20472: # 1044 "/usr/include/c++/10/bits/stl_bvector.h" 3 20472: iterator 20472: insert(const_iterator __position, size_type __n, const bool& __x) 20472: { 20472: difference_type __offset = __position - cbegin(); 20472: _M_fill_insert(__position._M_const_cast(), __n, __x); 20472: return begin() + __offset; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: iterator 20472: insert(const_iterator __p, initializer_list __l) 20472: { return this->insert(__p, __l.begin(), __l.end()); } 20472: 20472: 20472: void 20472: pop_back() 20472: { --this->_M_impl._M_finish; } 20472: 20472: iterator 20472: 20472: erase(const_iterator __position) 20472: 20472: 20472: 20472: { return _M_erase(__position._M_const_cast()); } 20472: 20472: iterator 20472: 20472: erase(const_iterator __first, const_iterator __last) 20472: 20472: 20472: 20472: { return _M_erase(__first._M_const_cast(), __last._M_const_cast()); } 20472: 20472: void 20472: resize(size_type __new_size, bool __x = bool()) 20472: { 20472: if (__new_size < size()) 20472: _M_erase_at_end(begin() + difference_type(__new_size)); 20472: else 20472: insert(end(), __new_size - size(), __x); 20472: } 20472: 20472: 20472: void 20472: shrink_to_fit() 20472: { _M_shrink_to_fit(); } 20472: 20472: 20472: void 20472: flip() noexcept 20472: { 20472: _Bit_type * const __end = this->_M_impl._M_end_addr(); 20472: for (_Bit_type * __p = this->_M_impl._M_start._M_p; __p != __end; ++__p) 20472: *__p = ~*__p; 20472: } 20472: 20472: void 20472: clear() noexcept 20472: { _M_erase_at_end(begin()); } 20472: 20472: 20472: template 20472: 20472: 20472: 20472: void 20472: 20472: emplace_back(_Args&&... __args) 20472: { 20472: push_back(bool(__args...)); 20472: 20472: 20472: 20472: } 20472: 20472: template 20472: iterator 20472: emplace(const_iterator __pos, _Args&&... __args) 20472: { return insert(__pos, bool(__args...)); } 20472: 20472: 20472: protected: 20472: 20472: iterator 20472: _M_copy_aligned(const_iterator __first, const_iterator __last, 20472: iterator __result) 20472: { 20472: _Bit_type* __q = std::copy(__first._M_p, __last._M_p, __result._M_p); 20472: return std::copy(const_iterator(__last._M_p, 0), __last, 20472: iterator(__q, 0)); 20472: } 20472: 20472: void 20472: _M_initialize(size_type __n) 20472: { 20472: if (__n) 20472: { 20472: _Bit_pointer __q = this->_M_allocate(__n); 20472: this->_M_impl._M_end_of_storage = __q + _S_nword(__n); 20472: this->_M_impl._M_start = iterator(std::__addressof(*__q), 0); 20472: } 20472: else 20472: { 20472: this->_M_impl._M_end_of_storage = _Bit_pointer(); 20472: this->_M_impl._M_start = iterator(0, 0); 20472: } 20472: this->_M_impl._M_finish = this->_M_impl._M_start + difference_type(__n); 20472: 20472: } 20472: 20472: void 20472: _M_initialize_value(bool __x) 20472: { 20472: if (_Bit_type* __p = this->_M_impl._M_start._M_p) 20472: __builtin_memset(__p, __x ? ~0 : 0, 20472: (this->_M_impl._M_end_addr() - __p) 20472: * sizeof(_Bit_type)); 20472: } 20472: 20472: void 20472: _M_reallocate(size_type __n); 20472: 20472: 20472: bool 20472: _M_shrink_to_fit(); 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: void 20472: _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type) 20472: { 20472: _M_initialize(static_cast(__n)); 20472: _M_initialize_value(__x); 20472: } 20472: 20472: template 20472: void 20472: _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, 20472: __false_type) 20472: { _M_initialize_range(__first, __last, 20472: std::__iterator_category(__first)); } 20472: 20472: template 20472: void 20472: _M_initialize_range(_InputIterator __first, _InputIterator __last, 20472: std::input_iterator_tag) 20472: { 20472: for (; __first != __last; ++__first) 20472: push_back(*__first); 20472: } 20472: 20472: template 20472: void 20472: _M_initialize_range(_ForwardIterator __first, _ForwardIterator __last, 20472: std::forward_iterator_tag) 20472: { 20472: const size_type __n = std::distance(__first, __last); 20472: _M_initialize(__n); 20472: std::copy(__first, __last, this->_M_impl._M_start); 20472: } 20472: # 1230 "/usr/include/c++/10/bits/stl_bvector.h" 3 20472: void 20472: _M_fill_assign(size_t __n, bool __x) 20472: { 20472: if (__n > size()) 20472: { 20472: _M_initialize_value(__x); 20472: insert(end(), __n - size(), __x); 20472: } 20472: else 20472: { 20472: _M_erase_at_end(begin() + __n); 20472: _M_initialize_value(__x); 20472: } 20472: } 20472: 20472: template 20472: void 20472: _M_assign_aux(_InputIterator __first, _InputIterator __last, 20472: std::input_iterator_tag) 20472: { 20472: iterator __cur = begin(); 20472: for (; __first != __last && __cur != end(); ++__cur, (void)++__first) 20472: *__cur = *__first; 20472: if (__first == __last) 20472: _M_erase_at_end(__cur); 20472: else 20472: insert(end(), __first, __last); 20472: } 20472: 20472: template 20472: void 20472: _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, 20472: std::forward_iterator_tag) 20472: { 20472: const size_type __len = std::distance(__first, __last); 20472: if (__len < size()) 20472: _M_erase_at_end(std::copy(__first, __last, begin())); 20472: else 20472: { 20472: _ForwardIterator __mid = __first; 20472: std::advance(__mid, size()); 20472: std::copy(__first, __mid, begin()); 20472: insert(end(), __mid, __last); 20472: } 20472: } 20472: 20472: 20472: 20472: 20472: 20472: template 20472: void 20472: _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x, 20472: __true_type) 20472: { _M_fill_insert(__pos, __n, __x); } 20472: 20472: template 20472: void 20472: _M_insert_dispatch(iterator __pos, 20472: _InputIterator __first, _InputIterator __last, 20472: __false_type) 20472: { _M_insert_range(__pos, __first, __last, 20472: std::__iterator_category(__first)); } 20472: 20472: void 20472: _M_fill_insert(iterator __position, size_type __n, bool __x); 20472: 20472: template 20472: void 20472: _M_insert_range(iterator __pos, _InputIterator __first, 20472: _InputIterator __last, std::input_iterator_tag) 20472: { 20472: for (; __first != __last; ++__first) 20472: { 20472: __pos = insert(__pos, *__first); 20472: ++__pos; 20472: } 20472: } 20472: 20472: template 20472: void 20472: _M_insert_range(iterator __position, _ForwardIterator __first, 20472: _ForwardIterator __last, std::forward_iterator_tag); 20472: 20472: void 20472: _M_insert_aux(iterator __position, bool __x); 20472: 20472: size_type 20472: _M_check_len(size_type __n, const char* __s) const 20472: { 20472: if (max_size() - size() < __n) 20472: __throw_length_error((__s)); 20472: 20472: const size_type __len = size() + std::max(size(), __n); 20472: return (__len < size() || __len > max_size()) ? max_size() : __len; 20472: } 20472: 20472: void 20472: _M_erase_at_end(iterator __pos) 20472: { this->_M_impl._M_finish = __pos; } 20472: 20472: iterator 20472: _M_erase(iterator __pos); 20472: 20472: iterator 20472: _M_erase(iterator __first, iterator __last); 20472: }; 20472: 20472: 20472: 20472: } 20472: 20472: 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: 20472: template 20472: struct hash> 20472: : public __hash_base> 20472: { 20472: size_t 20472: operator()(const std::vector&) const noexcept; 20472: }; 20472: 20472: 20472: } 20472: # 69 "/usr/include/c++/10/vector" 2 3 20472: 20472: 20472: 20472: # 1 "/usr/include/c++/10/bits/vector.tcc" 1 3 20472: # 59 "/usr/include/c++/10/bits/vector.tcc" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: template 20472: void 20472: vector<_Tp, _Alloc>:: 20472: reserve(size_type __n) 20472: { 20472: if (__n > this->max_size()) 20472: __throw_length_error(("vector::reserve")); 20472: if (this->capacity() < __n) 20472: { 20472: const size_type __old_size = size(); 20472: pointer __tmp; 20472: 20472: if (_S_use_relocate()) 20472: { 20472: __tmp = this->_M_allocate(__n); 20472: _S_relocate(this->_M_impl._M_start, this->_M_impl._M_finish, 20472: __tmp, _M_get_Tp_allocator()); 20472: } 20472: else 20472: 20472: { 20472: __tmp = _M_allocate_and_copy(__n, 20472: std::__make_move_if_noexcept_iterator(this->_M_impl._M_start), 20472: std::__make_move_if_noexcept_iterator(this->_M_impl._M_finish)); 20472: std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, 20472: _M_get_Tp_allocator()); 20472: } 20472: ; 20472: _M_deallocate(this->_M_impl._M_start, 20472: this->_M_impl._M_end_of_storage 20472: - this->_M_impl._M_start); 20472: this->_M_impl._M_start = __tmp; 20472: this->_M_impl._M_finish = __tmp + __old_size; 20472: this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; 20472: } 20472: } 20472: 20472: 20472: template 20472: template 20472: 20472: 20472: 20472: void 20472: 20472: vector<_Tp, _Alloc>:: 20472: emplace_back(_Args&&... __args) 20472: { 20472: if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) 20472: { 20472: ; 20472: _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, 20472: std::forward<_Args>(__args)...); 20472: ++this->_M_impl._M_finish; 20472: ; 20472: } 20472: else 20472: _M_realloc_insert(end(), std::forward<_Args>(__args)...); 20472: 20472: 20472: 20472: } 20472: 20472: 20472: template 20472: typename vector<_Tp, _Alloc>::iterator 20472: vector<_Tp, _Alloc>:: 20472: 20472: insert(const_iterator __position, const value_type& __x) 20472: 20472: 20472: 20472: { 20472: const size_type __n = __position - begin(); 20472: if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) 20472: if (__position == end()) 20472: { 20472: ; 20472: _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, 20472: __x); 20472: ++this->_M_impl._M_finish; 20472: ; 20472: } 20472: else 20472: { 20472: 20472: const auto __pos = begin() + (__position - cbegin()); 20472: 20472: 20472: _Temporary_value __x_copy(this, __x); 20472: _M_insert_aux(__pos, std::move(__x_copy._M_val())); 20472: 20472: 20472: 20472: } 20472: else 20472: 20472: _M_realloc_insert(begin() + (__position - cbegin()), __x); 20472: 20472: 20472: 20472: 20472: return iterator(this->_M_impl._M_start + __n); 20472: } 20472: 20472: template 20472: typename vector<_Tp, _Alloc>::iterator 20472: vector<_Tp, _Alloc>:: 20472: _M_erase(iterator __position) 20472: { 20472: if (__position + 1 != end()) 20472: std::move(__position + 1, end(), __position); 20472: --this->_M_impl._M_finish; 20472: _Alloc_traits::destroy(this->_M_impl, this->_M_impl._M_finish); 20472: ; 20472: return __position; 20472: } 20472: 20472: template 20472: typename vector<_Tp, _Alloc>::iterator 20472: vector<_Tp, _Alloc>:: 20472: _M_erase(iterator __first, iterator __last) 20472: { 20472: if (__first != __last) 20472: { 20472: if (__last != end()) 20472: std::move(__last, end(), __first); 20472: _M_erase_at_end(__first.base() + (end() - __last)); 20472: } 20472: return __first; 20472: } 20472: 20472: template 20472: vector<_Tp, _Alloc>& 20472: vector<_Tp, _Alloc>:: 20472: operator=(const vector<_Tp, _Alloc>& __x) 20472: { 20472: if (&__x != this) 20472: { 20472: ; 20472: 20472: if (_Alloc_traits::_S_propagate_on_copy_assign()) 20472: { 20472: if (!_Alloc_traits::_S_always_equal() 20472: && _M_get_Tp_allocator() != __x._M_get_Tp_allocator()) 20472: { 20472: 20472: this->clear(); 20472: _M_deallocate(this->_M_impl._M_start, 20472: this->_M_impl._M_end_of_storage 20472: - this->_M_impl._M_start); 20472: this->_M_impl._M_start = nullptr; 20472: this->_M_impl._M_finish = nullptr; 20472: this->_M_impl._M_end_of_storage = nullptr; 20472: } 20472: std::__alloc_on_copy(_M_get_Tp_allocator(), 20472: __x._M_get_Tp_allocator()); 20472: } 20472: 20472: const size_type __xlen = __x.size(); 20472: if (__xlen > capacity()) 20472: { 20472: pointer __tmp = _M_allocate_and_copy(__xlen, __x.begin(), 20472: __x.end()); 20472: std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, 20472: _M_get_Tp_allocator()); 20472: _M_deallocate(this->_M_impl._M_start, 20472: this->_M_impl._M_end_of_storage 20472: - this->_M_impl._M_start); 20472: this->_M_impl._M_start = __tmp; 20472: this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __xlen; 20472: } 20472: else if (size() >= __xlen) 20472: { 20472: std::_Destroy(std::copy(__x.begin(), __x.end(), begin()), 20472: end(), _M_get_Tp_allocator()); 20472: } 20472: else 20472: { 20472: std::copy(__x._M_impl._M_start, __x._M_impl._M_start + size(), 20472: this->_M_impl._M_start); 20472: std::__uninitialized_copy_a(__x._M_impl._M_start + size(), 20472: __x._M_impl._M_finish, 20472: this->_M_impl._M_finish, 20472: _M_get_Tp_allocator()); 20472: } 20472: this->_M_impl._M_finish = this->_M_impl._M_start + __xlen; 20472: } 20472: return *this; 20472: } 20472: 20472: template 20472: void 20472: vector<_Tp, _Alloc>:: 20472: _M_fill_assign(size_t __n, const value_type& __val) 20472: { 20472: if (__n > capacity()) 20472: { 20472: vector __tmp(__n, __val, _M_get_Tp_allocator()); 20472: __tmp._M_impl._M_swap_data(this->_M_impl); 20472: } 20472: else if (__n > size()) 20472: { 20472: std::fill(begin(), end(), __val); 20472: const size_type __add = __n - size(); 20472: ; 20472: this->_M_impl._M_finish = 20472: std::__uninitialized_fill_n_a(this->_M_impl._M_finish, 20472: __add, __val, _M_get_Tp_allocator()); 20472: ; 20472: } 20472: else 20472: _M_erase_at_end(std::fill_n(this->_M_impl._M_start, __n, __val)); 20472: } 20472: 20472: template 20472: template 20472: void 20472: vector<_Tp, _Alloc>:: 20472: _M_assign_aux(_InputIterator __first, _InputIterator __last, 20472: std::input_iterator_tag) 20472: { 20472: pointer __cur(this->_M_impl._M_start); 20472: for (; __first != __last && __cur != this->_M_impl._M_finish; 20472: ++__cur, (void)++__first) 20472: *__cur = *__first; 20472: if (__first == __last) 20472: _M_erase_at_end(__cur); 20472: else 20472: _M_range_insert(end(), __first, __last, 20472: std::__iterator_category(__first)); 20472: } 20472: 20472: template 20472: template 20472: void 20472: vector<_Tp, _Alloc>:: 20472: _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, 20472: std::forward_iterator_tag) 20472: { 20472: const size_type __len = std::distance(__first, __last); 20472: 20472: if (__len > capacity()) 20472: { 20472: _S_check_init_len(__len, _M_get_Tp_allocator()); 20472: pointer __tmp(_M_allocate_and_copy(__len, __first, __last)); 20472: std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, 20472: _M_get_Tp_allocator()); 20472: ; 20472: _M_deallocate(this->_M_impl._M_start, 20472: this->_M_impl._M_end_of_storage 20472: - this->_M_impl._M_start); 20472: this->_M_impl._M_start = __tmp; 20472: this->_M_impl._M_finish = this->_M_impl._M_start + __len; 20472: this->_M_impl._M_end_of_storage = this->_M_impl._M_finish; 20472: } 20472: else if (size() >= __len) 20472: _M_erase_at_end(std::copy(__first, __last, this->_M_impl._M_start)); 20472: else 20472: { 20472: _ForwardIterator __mid = __first; 20472: std::advance(__mid, size()); 20472: std::copy(__first, __mid, this->_M_impl._M_start); 20472: const size_type __attribute__((__unused__)) __n = __len - size(); 20472: ; 20472: this->_M_impl._M_finish = 20472: std::__uninitialized_copy_a(__mid, __last, 20472: this->_M_impl._M_finish, 20472: _M_get_Tp_allocator()); 20472: ; 20472: } 20472: } 20472: 20472: 20472: template 20472: auto 20472: vector<_Tp, _Alloc>:: 20472: _M_insert_rval(const_iterator __position, value_type&& __v) -> iterator 20472: { 20472: const auto __n = __position - cbegin(); 20472: if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) 20472: if (__position == cend()) 20472: { 20472: ; 20472: _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, 20472: std::move(__v)); 20472: ++this->_M_impl._M_finish; 20472: ; 20472: } 20472: else 20472: _M_insert_aux(begin() + __n, std::move(__v)); 20472: else 20472: _M_realloc_insert(begin() + __n, std::move(__v)); 20472: 20472: return iterator(this->_M_impl._M_start + __n); 20472: } 20472: 20472: template 20472: template 20472: auto 20472: vector<_Tp, _Alloc>:: 20472: _M_emplace_aux(const_iterator __position, _Args&&... __args) 20472: -> iterator 20472: { 20472: const auto __n = __position - cbegin(); 20472: if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) 20472: if (__position == cend()) 20472: { 20472: ; 20472: _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, 20472: std::forward<_Args>(__args)...); 20472: ++this->_M_impl._M_finish; 20472: ; 20472: } 20472: else 20472: { 20472: 20472: 20472: 20472: _Temporary_value __tmp(this, std::forward<_Args>(__args)...); 20472: _M_insert_aux(begin() + __n, std::move(__tmp._M_val())); 20472: } 20472: else 20472: _M_realloc_insert(begin() + __n, std::forward<_Args>(__args)...); 20472: 20472: return iterator(this->_M_impl._M_start + __n); 20472: } 20472: 20472: template 20472: template 20472: void 20472: vector<_Tp, _Alloc>:: 20472: _M_insert_aux(iterator __position, _Arg&& __arg) 20472: 20472: 20472: 20472: 20472: 20472: 20472: { 20472: ; 20472: _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, 20472: std::move(*(this->_M_impl._M_finish - 1))); 20472: ++this->_M_impl._M_finish; 20472: ; 20472: 20472: 20472: 20472: std::move_backward(__position.base(), this->_M_impl._M_finish - 2, this->_M_impl._M_finish - 1) 20472: 20472: ; 20472: 20472: 20472: 20472: *__position = std::forward<_Arg>(__arg); 20472: 20472: } 20472: 20472: 20472: template 20472: template 20472: void 20472: vector<_Tp, _Alloc>:: 20472: _M_realloc_insert(iterator __position, _Args&&... __args) 20472: 20472: 20472: 20472: 20472: 20472: 20472: { 20472: const size_type __len = 20472: _M_check_len(size_type(1), "vector::_M_realloc_insert"); 20472: pointer __old_start = this->_M_impl._M_start; 20472: pointer __old_finish = this->_M_impl._M_finish; 20472: const size_type __elems_before = __position - begin(); 20472: pointer __new_start(this->_M_allocate(__len)); 20472: pointer __new_finish(__new_start); 20472: try 20472: { 20472: 20472: 20472: 20472: 20472: 20472: _Alloc_traits::construct(this->_M_impl, 20472: __new_start + __elems_before, 20472: 20472: std::forward<_Args>(__args)...); 20472: 20472: 20472: 20472: __new_finish = pointer(); 20472: 20472: 20472: if (_S_use_relocate()) 20472: { 20472: __new_finish = _S_relocate(__old_start, __position.base(), 20472: __new_start, _M_get_Tp_allocator()); 20472: 20472: ++__new_finish; 20472: 20472: __new_finish = _S_relocate(__position.base(), __old_finish, 20472: __new_finish, _M_get_Tp_allocator()); 20472: } 20472: else 20472: 20472: { 20472: __new_finish 20472: = std::__uninitialized_move_if_noexcept_a 20472: (__old_start, __position.base(), 20472: __new_start, _M_get_Tp_allocator()); 20472: 20472: ++__new_finish; 20472: 20472: __new_finish 20472: = std::__uninitialized_move_if_noexcept_a 20472: (__position.base(), __old_finish, 20472: __new_finish, _M_get_Tp_allocator()); 20472: } 20472: } 20472: catch(...) 20472: { 20472: if (!__new_finish) 20472: _Alloc_traits::destroy(this->_M_impl, 20472: __new_start + __elems_before); 20472: else 20472: std::_Destroy(__new_start, __new_finish, _M_get_Tp_allocator()); 20472: _M_deallocate(__new_start, __len); 20472: throw; 20472: } 20472: 20472: if (!_S_use_relocate()) 20472: 20472: std::_Destroy(__old_start, __old_finish, _M_get_Tp_allocator()); 20472: ; 20472: _M_deallocate(__old_start, 20472: this->_M_impl._M_end_of_storage - __old_start); 20472: this->_M_impl._M_start = __new_start; 20472: this->_M_impl._M_finish = __new_finish; 20472: this->_M_impl._M_end_of_storage = __new_start + __len; 20472: } 20472: 20472: template 20472: void 20472: vector<_Tp, _Alloc>:: 20472: _M_fill_insert(iterator __position, size_type __n, const value_type& __x) 20472: { 20472: if (__n != 0) 20472: { 20472: if (size_type(this->_M_impl._M_end_of_storage 20472: - this->_M_impl._M_finish) >= __n) 20472: { 20472: 20472: 20472: 20472: _Temporary_value __tmp(this, __x); 20472: value_type& __x_copy = __tmp._M_val(); 20472: 20472: const size_type __elems_after = end() - __position; 20472: pointer __old_finish(this->_M_impl._M_finish); 20472: if (__elems_after > __n) 20472: { 20472: ; 20472: std::__uninitialized_move_a(this->_M_impl._M_finish - __n, 20472: this->_M_impl._M_finish, 20472: this->_M_impl._M_finish, 20472: _M_get_Tp_allocator()); 20472: this->_M_impl._M_finish += __n; 20472: ; 20472: std::move_backward(__position.base(), __old_finish - __n, __old_finish) 20472: ; 20472: std::fill(__position.base(), __position.base() + __n, 20472: __x_copy); 20472: } 20472: else 20472: { 20472: ; 20472: this->_M_impl._M_finish = 20472: std::__uninitialized_fill_n_a(this->_M_impl._M_finish, 20472: __n - __elems_after, 20472: __x_copy, 20472: _M_get_Tp_allocator()); 20472: ; 20472: std::__uninitialized_move_a(__position.base(), __old_finish, 20472: this->_M_impl._M_finish, 20472: _M_get_Tp_allocator()); 20472: this->_M_impl._M_finish += __elems_after; 20472: ; 20472: std::fill(__position.base(), __old_finish, __x_copy); 20472: } 20472: } 20472: else 20472: { 20472: const size_type __len = 20472: _M_check_len(__n, "vector::_M_fill_insert"); 20472: const size_type __elems_before = __position - begin(); 20472: pointer __new_start(this->_M_allocate(__len)); 20472: pointer __new_finish(__new_start); 20472: try 20472: { 20472: 20472: std::__uninitialized_fill_n_a(__new_start + __elems_before, 20472: __n, __x, 20472: _M_get_Tp_allocator()); 20472: __new_finish = pointer(); 20472: 20472: __new_finish 20472: = std::__uninitialized_move_if_noexcept_a 20472: (this->_M_impl._M_start, __position.base(), 20472: __new_start, _M_get_Tp_allocator()); 20472: 20472: __new_finish += __n; 20472: 20472: __new_finish 20472: = std::__uninitialized_move_if_noexcept_a 20472: (__position.base(), this->_M_impl._M_finish, 20472: __new_finish, _M_get_Tp_allocator()); 20472: } 20472: catch(...) 20472: { 20472: if (!__new_finish) 20472: std::_Destroy(__new_start + __elems_before, 20472: __new_start + __elems_before + __n, 20472: _M_get_Tp_allocator()); 20472: else 20472: std::_Destroy(__new_start, __new_finish, 20472: _M_get_Tp_allocator()); 20472: _M_deallocate(__new_start, __len); 20472: throw; 20472: } 20472: std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, 20472: _M_get_Tp_allocator()); 20472: ; 20472: _M_deallocate(this->_M_impl._M_start, 20472: this->_M_impl._M_end_of_storage 20472: - this->_M_impl._M_start); 20472: this->_M_impl._M_start = __new_start; 20472: this->_M_impl._M_finish = __new_finish; 20472: this->_M_impl._M_end_of_storage = __new_start + __len; 20472: } 20472: } 20472: } 20472: 20472: 20472: template 20472: void 20472: vector<_Tp, _Alloc>:: 20472: _M_default_append(size_type __n) 20472: { 20472: if (__n != 0) 20472: { 20472: const size_type __size = size(); 20472: size_type __navail = size_type(this->_M_impl._M_end_of_storage 20472: - this->_M_impl._M_finish); 20472: 20472: if (__size > max_size() || __navail > max_size() - __size) 20472: __builtin_unreachable(); 20472: 20472: if (__navail >= __n) 20472: { 20472: ; 20472: this->_M_impl._M_finish = 20472: std::__uninitialized_default_n_a(this->_M_impl._M_finish, 20472: __n, _M_get_Tp_allocator()); 20472: ; 20472: } 20472: else 20472: { 20472: const size_type __len = 20472: _M_check_len(__n, "vector::_M_default_append"); 20472: pointer __new_start(this->_M_allocate(__len)); 20472: if (_S_use_relocate()) 20472: { 20472: try 20472: { 20472: std::__uninitialized_default_n_a(__new_start + __size, 20472: __n, _M_get_Tp_allocator()); 20472: } 20472: catch(...) 20472: { 20472: _M_deallocate(__new_start, __len); 20472: throw; 20472: } 20472: _S_relocate(this->_M_impl._M_start, this->_M_impl._M_finish, 20472: __new_start, _M_get_Tp_allocator()); 20472: } 20472: else 20472: { 20472: pointer __destroy_from = pointer(); 20472: try 20472: { 20472: std::__uninitialized_default_n_a(__new_start + __size, 20472: __n, _M_get_Tp_allocator()); 20472: __destroy_from = __new_start + __size; 20472: std::__uninitialized_move_if_noexcept_a( 20472: this->_M_impl._M_start, this->_M_impl._M_finish, 20472: __new_start, _M_get_Tp_allocator()); 20472: } 20472: catch(...) 20472: { 20472: if (__destroy_from) 20472: std::_Destroy(__destroy_from, __destroy_from + __n, 20472: _M_get_Tp_allocator()); 20472: _M_deallocate(__new_start, __len); 20472: throw; 20472: } 20472: std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, 20472: _M_get_Tp_allocator()); 20472: } 20472: ; 20472: _M_deallocate(this->_M_impl._M_start, 20472: this->_M_impl._M_end_of_storage 20472: - this->_M_impl._M_start); 20472: this->_M_impl._M_start = __new_start; 20472: this->_M_impl._M_finish = __new_start + __size + __n; 20472: this->_M_impl._M_end_of_storage = __new_start + __len; 20472: } 20472: } 20472: } 20472: 20472: template 20472: bool 20472: vector<_Tp, _Alloc>:: 20472: _M_shrink_to_fit() 20472: { 20472: if (capacity() == size()) 20472: return false; 20472: ; 20472: return std::__shrink_to_fit_aux::_S_do_it(*this); 20472: } 20472: 20472: 20472: template 20472: template 20472: void 20472: vector<_Tp, _Alloc>:: 20472: _M_range_insert(iterator __pos, _InputIterator __first, 20472: _InputIterator __last, std::input_iterator_tag) 20472: { 20472: if (__pos == end()) 20472: { 20472: for (; __first != __last; ++__first) 20472: insert(end(), *__first); 20472: } 20472: else if (__first != __last) 20472: { 20472: vector __tmp(__first, __last, _M_get_Tp_allocator()); 20472: insert(__pos, 20472: std::make_move_iterator(__tmp.begin()), 20472: std::make_move_iterator(__tmp.end())); 20472: } 20472: } 20472: 20472: template 20472: template 20472: void 20472: vector<_Tp, _Alloc>:: 20472: _M_range_insert(iterator __position, _ForwardIterator __first, 20472: _ForwardIterator __last, std::forward_iterator_tag) 20472: { 20472: if (__first != __last) 20472: { 20472: const size_type __n = std::distance(__first, __last); 20472: if (size_type(this->_M_impl._M_end_of_storage 20472: - this->_M_impl._M_finish) >= __n) 20472: { 20472: const size_type __elems_after = end() - __position; 20472: pointer __old_finish(this->_M_impl._M_finish); 20472: if (__elems_after > __n) 20472: { 20472: ; 20472: std::__uninitialized_move_a(this->_M_impl._M_finish - __n, 20472: this->_M_impl._M_finish, 20472: this->_M_impl._M_finish, 20472: _M_get_Tp_allocator()); 20472: this->_M_impl._M_finish += __n; 20472: ; 20472: std::move_backward(__position.base(), __old_finish - __n, __old_finish) 20472: ; 20472: std::copy(__first, __last, __position); 20472: } 20472: else 20472: { 20472: _ForwardIterator __mid = __first; 20472: std::advance(__mid, __elems_after); 20472: ; 20472: std::__uninitialized_copy_a(__mid, __last, 20472: this->_M_impl._M_finish, 20472: _M_get_Tp_allocator()); 20472: this->_M_impl._M_finish += __n - __elems_after; 20472: ; 20472: std::__uninitialized_move_a(__position.base(), 20472: __old_finish, 20472: this->_M_impl._M_finish, 20472: _M_get_Tp_allocator()); 20472: this->_M_impl._M_finish += __elems_after; 20472: ; 20472: std::copy(__first, __mid, __position); 20472: } 20472: } 20472: else 20472: { 20472: const size_type __len = 20472: _M_check_len(__n, "vector::_M_range_insert"); 20472: pointer __new_start(this->_M_allocate(__len)); 20472: pointer __new_finish(__new_start); 20472: try 20472: { 20472: __new_finish 20472: = std::__uninitialized_move_if_noexcept_a 20472: (this->_M_impl._M_start, __position.base(), 20472: __new_start, _M_get_Tp_allocator()); 20472: __new_finish 20472: = std::__uninitialized_copy_a(__first, __last, 20472: __new_finish, 20472: _M_get_Tp_allocator()); 20472: __new_finish 20472: = std::__uninitialized_move_if_noexcept_a 20472: (__position.base(), this->_M_impl._M_finish, 20472: __new_finish, _M_get_Tp_allocator()); 20472: } 20472: catch(...) 20472: { 20472: std::_Destroy(__new_start, __new_finish, 20472: _M_get_Tp_allocator()); 20472: _M_deallocate(__new_start, __len); 20472: throw; 20472: } 20472: std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, 20472: _M_get_Tp_allocator()); 20472: ; 20472: _M_deallocate(this->_M_impl._M_start, 20472: this->_M_impl._M_end_of_storage 20472: - this->_M_impl._M_start); 20472: this->_M_impl._M_start = __new_start; 20472: this->_M_impl._M_finish = __new_finish; 20472: this->_M_impl._M_end_of_storage = __new_start + __len; 20472: } 20472: } 20472: } 20472: 20472: 20472: 20472: template 20472: void 20472: vector:: 20472: _M_reallocate(size_type __n) 20472: { 20472: _Bit_pointer __q = this->_M_allocate(__n); 20472: iterator __start(std::__addressof(*__q), 0); 20472: iterator __finish(_M_copy_aligned(begin(), end(), __start)); 20472: this->_M_deallocate(); 20472: this->_M_impl._M_start = __start; 20472: this->_M_impl._M_finish = __finish; 20472: this->_M_impl._M_end_of_storage = __q + _S_nword(__n); 20472: } 20472: 20472: template 20472: void 20472: vector:: 20472: _M_fill_insert(iterator __position, size_type __n, bool __x) 20472: { 20472: if (__n == 0) 20472: return; 20472: if (capacity() - size() >= __n) 20472: { 20472: std::copy_backward(__position, end(), 20472: this->_M_impl._M_finish + difference_type(__n)); 20472: std::fill(__position, __position + difference_type(__n), __x); 20472: this->_M_impl._M_finish += difference_type(__n); 20472: } 20472: else 20472: { 20472: const size_type __len = 20472: _M_check_len(__n, "vector::_M_fill_insert"); 20472: _Bit_pointer __q = this->_M_allocate(__len); 20472: iterator __start(std::__addressof(*__q), 0); 20472: iterator __i = _M_copy_aligned(begin(), __position, __start); 20472: std::fill(__i, __i + difference_type(__n), __x); 20472: iterator __finish = std::copy(__position, end(), 20472: __i + difference_type(__n)); 20472: this->_M_deallocate(); 20472: this->_M_impl._M_end_of_storage = __q + _S_nword(__len); 20472: this->_M_impl._M_start = __start; 20472: this->_M_impl._M_finish = __finish; 20472: } 20472: } 20472: 20472: template 20472: template 20472: void 20472: vector:: 20472: _M_insert_range(iterator __position, _ForwardIterator __first, 20472: _ForwardIterator __last, std::forward_iterator_tag) 20472: { 20472: if (__first != __last) 20472: { 20472: size_type __n = std::distance(__first, __last); 20472: if (capacity() - size() >= __n) 20472: { 20472: std::copy_backward(__position, end(), 20472: this->_M_impl._M_finish 20472: + difference_type(__n)); 20472: std::copy(__first, __last, __position); 20472: this->_M_impl._M_finish += difference_type(__n); 20472: } 20472: else 20472: { 20472: const size_type __len = 20472: _M_check_len(__n, "vector::_M_insert_range"); 20472: _Bit_pointer __q = this->_M_allocate(__len); 20472: iterator __start(std::__addressof(*__q), 0); 20472: iterator __i = _M_copy_aligned(begin(), __position, __start); 20472: __i = std::copy(__first, __last, __i); 20472: iterator __finish = std::copy(__position, end(), __i); 20472: this->_M_deallocate(); 20472: this->_M_impl._M_end_of_storage = __q + _S_nword(__len); 20472: this->_M_impl._M_start = __start; 20472: this->_M_impl._M_finish = __finish; 20472: } 20472: } 20472: } 20472: 20472: template 20472: void 20472: vector:: 20472: _M_insert_aux(iterator __position, bool __x) 20472: { 20472: if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_addr()) 20472: { 20472: std::copy_backward(__position, this->_M_impl._M_finish, 20472: this->_M_impl._M_finish + 1); 20472: *__position = __x; 20472: ++this->_M_impl._M_finish; 20472: } 20472: else 20472: { 20472: const size_type __len = 20472: _M_check_len(size_type(1), "vector::_M_insert_aux"); 20472: _Bit_pointer __q = this->_M_allocate(__len); 20472: iterator __start(std::__addressof(*__q), 0); 20472: iterator __i = _M_copy_aligned(begin(), __position, __start); 20472: *__i++ = __x; 20472: iterator __finish = std::copy(__position, end(), __i); 20472: this->_M_deallocate(); 20472: this->_M_impl._M_end_of_storage = __q + _S_nword(__len); 20472: this->_M_impl._M_start = __start; 20472: this->_M_impl._M_finish = __finish; 20472: } 20472: } 20472: 20472: template 20472: typename vector::iterator 20472: vector:: 20472: _M_erase(iterator __position) 20472: { 20472: if (__position + 1 != end()) 20472: std::copy(__position + 1, end(), __position); 20472: --this->_M_impl._M_finish; 20472: return __position; 20472: } 20472: 20472: template 20472: typename vector::iterator 20472: vector:: 20472: _M_erase(iterator __first, iterator __last) 20472: { 20472: if (__first != __last) 20472: _M_erase_at_end(std::copy(__last, end(), __first)); 20472: return __first; 20472: } 20472: 20472: 20472: template 20472: bool 20472: vector:: 20472: _M_shrink_to_fit() 20472: { 20472: if (capacity() - size() < int(_S_word_bit)) 20472: return false; 20472: try 20472: { 20472: _M_reallocate(size()); 20472: return true; 20472: } 20472: catch(...) 20472: { return false; } 20472: } 20472: 20472: 20472: 20472: 20472: } 20472: 20472: 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: template 20472: size_t 20472: hash>:: 20472: operator()(const std::vector& __b) const noexcept 20472: { 20472: size_t __hash = 0; 20472: using std::_S_word_bit; 20472: using std::_Bit_type; 20472: 20472: const size_t __words = __b.size() / _S_word_bit; 20472: if (__words) 20472: { 20472: const size_t __clength = __words * sizeof(_Bit_type); 20472: __hash = std::_Hash_impl::hash(__b._M_impl._M_start._M_p, __clength); 20472: } 20472: 20472: const size_t __extrabits = __b.size() % _S_word_bit; 20472: if (__extrabits) 20472: { 20472: _Bit_type __hiword = *__b._M_impl._M_finish._M_p; 20472: __hiword &= ~((~static_cast<_Bit_type>(0)) << __extrabits); 20472: 20472: const size_t __clength 20472: = (__extrabits + 8 - 1) / 8; 20472: if (__words) 20472: __hash = std::_Hash_impl::hash(&__hiword, __clength, __hash); 20472: else 20472: __hash = std::_Hash_impl::hash(&__hiword, __clength); 20472: } 20472: 20472: return __hash; 20472: } 20472: 20472: 20472: } 20472: # 73 "/usr/include/c++/10/vector" 2 3 20472: # 18 "./db/memtable.h" 2 20472: # 1 "./db/dbformat.h" 1 20472: # 10 "./db/dbformat.h" 20472: 20472: 20472: 20472: 20472: 20472: # 1 "./db/lookup_key.h" 1 20472: # 10 "./db/lookup_key.h" 20472: 20472: 20472: 20472: # 1 "./include/rocksdb/db.h" 1 20472: # 9 "./include/rocksdb/db.h" 20472: 20472: 20472: 20472: 20472: # 1 "/usr/include/c++/10/map" 1 3 20472: # 58 "/usr/include/c++/10/map" 3 20472: 20472: # 59 "/usr/include/c++/10/map" 3 20472: 20472: # 1 "/usr/include/c++/10/bits/stl_tree.h" 1 3 20472: # 61 "/usr/include/c++/10/bits/stl_tree.h" 3 20472: 20472: # 62 "/usr/include/c++/10/bits/stl_tree.h" 3 20472: # 75 "/usr/include/c++/10/bits/stl_tree.h" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: # 99 "/usr/include/c++/10/bits/stl_tree.h" 3 20472: enum _Rb_tree_color { _S_red = false, _S_black = true }; 20472: 20472: struct _Rb_tree_node_base 20472: { 20472: typedef _Rb_tree_node_base* _Base_ptr; 20472: typedef const _Rb_tree_node_base* _Const_Base_ptr; 20472: 20472: _Rb_tree_color _M_color; 20472: _Base_ptr _M_parent; 20472: _Base_ptr _M_left; 20472: _Base_ptr _M_right; 20472: 20472: static _Base_ptr 20472: _S_minimum(_Base_ptr __x) noexcept 20472: { 20472: while (__x->_M_left != 0) __x = __x->_M_left; 20472: return __x; 20472: } 20472: 20472: static _Const_Base_ptr 20472: _S_minimum(_Const_Base_ptr __x) noexcept 20472: { 20472: while (__x->_M_left != 0) __x = __x->_M_left; 20472: return __x; 20472: } 20472: 20472: static _Base_ptr 20472: _S_maximum(_Base_ptr __x) noexcept 20472: { 20472: while (__x->_M_right != 0) __x = __x->_M_right; 20472: return __x; 20472: } 20472: 20472: static _Const_Base_ptr 20472: _S_maximum(_Const_Base_ptr __x) noexcept 20472: { 20472: while (__x->_M_right != 0) __x = __x->_M_right; 20472: return __x; 20472: } 20472: }; 20472: 20472: 20472: template 20472: struct _Rb_tree_key_compare 20472: { 20472: _Key_compare _M_key_compare; 20472: 20472: _Rb_tree_key_compare() 20472: noexcept(is_nothrow_default_constructible<_Key_compare>::value) 20472: 20472: : _M_key_compare() 20472: { } 20472: 20472: _Rb_tree_key_compare(const _Key_compare& __comp) 20472: : _M_key_compare(__comp) 20472: { } 20472: 20472: 20472: 20472: _Rb_tree_key_compare(const _Rb_tree_key_compare&) = default; 20472: 20472: _Rb_tree_key_compare(_Rb_tree_key_compare&& __x) 20472: noexcept(is_nothrow_copy_constructible<_Key_compare>::value) 20472: : _M_key_compare(__x._M_key_compare) 20472: { } 20472: 20472: }; 20472: 20472: 20472: struct _Rb_tree_header 20472: { 20472: _Rb_tree_node_base _M_header; 20472: size_t _M_node_count; 20472: 20472: _Rb_tree_header() noexcept 20472: { 20472: _M_header._M_color = _S_red; 20472: _M_reset(); 20472: } 20472: 20472: 20472: _Rb_tree_header(_Rb_tree_header&& __x) noexcept 20472: { 20472: if (__x._M_header._M_parent != nullptr) 20472: _M_move_data(__x); 20472: else 20472: { 20472: _M_header._M_color = _S_red; 20472: _M_reset(); 20472: } 20472: } 20472: 20472: 20472: void 20472: _M_move_data(_Rb_tree_header& __from) 20472: { 20472: _M_header._M_color = __from._M_header._M_color; 20472: _M_header._M_parent = __from._M_header._M_parent; 20472: _M_header._M_left = __from._M_header._M_left; 20472: _M_header._M_right = __from._M_header._M_right; 20472: _M_header._M_parent->_M_parent = &_M_header; 20472: _M_node_count = __from._M_node_count; 20472: 20472: __from._M_reset(); 20472: } 20472: 20472: void 20472: _M_reset() 20472: { 20472: _M_header._M_parent = 0; 20472: _M_header._M_left = &_M_header; 20472: _M_header._M_right = &_M_header; 20472: _M_node_count = 0; 20472: } 20472: }; 20472: 20472: template 20472: struct _Rb_tree_node : public _Rb_tree_node_base 20472: { 20472: typedef _Rb_tree_node<_Val>* _Link_type; 20472: # 231 "/usr/include/c++/10/bits/stl_tree.h" 3 20472: __gnu_cxx::__aligned_membuf<_Val> _M_storage; 20472: 20472: _Val* 20472: _M_valptr() 20472: { return _M_storage._M_ptr(); } 20472: 20472: const _Val* 20472: _M_valptr() const 20472: { return _M_storage._M_ptr(); } 20472: 20472: }; 20472: 20472: __attribute__ ((__pure__)) _Rb_tree_node_base* 20472: _Rb_tree_increment(_Rb_tree_node_base* __x) throw (); 20472: 20472: __attribute__ ((__pure__)) const _Rb_tree_node_base* 20472: _Rb_tree_increment(const _Rb_tree_node_base* __x) throw (); 20472: 20472: __attribute__ ((__pure__)) _Rb_tree_node_base* 20472: _Rb_tree_decrement(_Rb_tree_node_base* __x) throw (); 20472: 20472: __attribute__ ((__pure__)) const _Rb_tree_node_base* 20472: _Rb_tree_decrement(const _Rb_tree_node_base* __x) throw (); 20472: 20472: template 20472: struct _Rb_tree_iterator 20472: { 20472: typedef _Tp value_type; 20472: typedef _Tp& reference; 20472: typedef _Tp* pointer; 20472: 20472: typedef bidirectional_iterator_tag iterator_category; 20472: typedef ptrdiff_t difference_type; 20472: 20472: typedef _Rb_tree_iterator<_Tp> _Self; 20472: typedef _Rb_tree_node_base::_Base_ptr _Base_ptr; 20472: typedef _Rb_tree_node<_Tp>* _Link_type; 20472: 20472: _Rb_tree_iterator() noexcept 20472: : _M_node() { } 20472: 20472: explicit 20472: _Rb_tree_iterator(_Base_ptr __x) noexcept 20472: : _M_node(__x) { } 20472: 20472: reference 20472: operator*() const noexcept 20472: { return *static_cast<_Link_type>(_M_node)->_M_valptr(); } 20472: 20472: pointer 20472: operator->() const noexcept 20472: { return static_cast<_Link_type> (_M_node)->_M_valptr(); } 20472: 20472: _Self& 20472: operator++() noexcept 20472: { 20472: _M_node = _Rb_tree_increment(_M_node); 20472: return *this; 20472: } 20472: 20472: _Self 20472: operator++(int) noexcept 20472: { 20472: _Self __tmp = *this; 20472: _M_node = _Rb_tree_increment(_M_node); 20472: return __tmp; 20472: } 20472: 20472: _Self& 20472: operator--() noexcept 20472: { 20472: _M_node = _Rb_tree_decrement(_M_node); 20472: return *this; 20472: } 20472: 20472: _Self 20472: operator--(int) noexcept 20472: { 20472: _Self __tmp = *this; 20472: _M_node = _Rb_tree_decrement(_M_node); 20472: return __tmp; 20472: } 20472: 20472: friend bool 20472: operator==(const _Self& __x, const _Self& __y) noexcept 20472: { return __x._M_node == __y._M_node; } 20472: 20472: 20472: friend bool 20472: operator!=(const _Self& __x, const _Self& __y) noexcept 20472: { return __x._M_node != __y._M_node; } 20472: 20472: 20472: _Base_ptr _M_node; 20472: }; 20472: 20472: template 20472: struct _Rb_tree_const_iterator 20472: { 20472: typedef _Tp value_type; 20472: typedef const _Tp& reference; 20472: typedef const _Tp* pointer; 20472: 20472: typedef _Rb_tree_iterator<_Tp> iterator; 20472: 20472: typedef bidirectional_iterator_tag iterator_category; 20472: typedef ptrdiff_t difference_type; 20472: 20472: typedef _Rb_tree_const_iterator<_Tp> _Self; 20472: typedef _Rb_tree_node_base::_Const_Base_ptr _Base_ptr; 20472: typedef const _Rb_tree_node<_Tp>* _Link_type; 20472: 20472: _Rb_tree_const_iterator() noexcept 20472: : _M_node() { } 20472: 20472: explicit 20472: _Rb_tree_const_iterator(_Base_ptr __x) noexcept 20472: : _M_node(__x) { } 20472: 20472: _Rb_tree_const_iterator(const iterator& __it) noexcept 20472: : _M_node(__it._M_node) { } 20472: 20472: iterator 20472: _M_const_cast() const noexcept 20472: { return iterator(const_cast(_M_node)); } 20472: 20472: reference 20472: operator*() const noexcept 20472: { return *static_cast<_Link_type>(_M_node)->_M_valptr(); } 20472: 20472: pointer 20472: operator->() const noexcept 20472: { return static_cast<_Link_type>(_M_node)->_M_valptr(); } 20472: 20472: _Self& 20472: operator++() noexcept 20472: { 20472: _M_node = _Rb_tree_increment(_M_node); 20472: return *this; 20472: } 20472: 20472: _Self 20472: operator++(int) noexcept 20472: { 20472: _Self __tmp = *this; 20472: _M_node = _Rb_tree_increment(_M_node); 20472: return __tmp; 20472: } 20472: 20472: _Self& 20472: operator--() noexcept 20472: { 20472: _M_node = _Rb_tree_decrement(_M_node); 20472: return *this; 20472: } 20472: 20472: _Self 20472: operator--(int) noexcept 20472: { 20472: _Self __tmp = *this; 20472: _M_node = _Rb_tree_decrement(_M_node); 20472: return __tmp; 20472: } 20472: 20472: friend bool 20472: operator==(const _Self& __x, const _Self& __y) noexcept 20472: { return __x._M_node == __y._M_node; } 20472: 20472: 20472: friend bool 20472: operator!=(const _Self& __x, const _Self& __y) noexcept 20472: { return __x._M_node != __y._M_node; } 20472: 20472: 20472: _Base_ptr _M_node; 20472: }; 20472: 20472: void 20472: _Rb_tree_insert_and_rebalance(const bool __insert_left, 20472: _Rb_tree_node_base* __x, 20472: _Rb_tree_node_base* __p, 20472: _Rb_tree_node_base& __header) throw (); 20472: 20472: _Rb_tree_node_base* 20472: _Rb_tree_rebalance_for_erase(_Rb_tree_node_base* const __z, 20472: _Rb_tree_node_base& __header) throw (); 20472: # 438 "/usr/include/c++/10/bits/stl_tree.h" 3 20472: template > 20472: class _Rb_tree 20472: { 20472: typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template 20472: rebind<_Rb_tree_node<_Val> >::other _Node_allocator; 20472: 20472: typedef __gnu_cxx::__alloc_traits<_Node_allocator> _Alloc_traits; 20472: 20472: protected: 20472: typedef _Rb_tree_node_base* _Base_ptr; 20472: typedef const _Rb_tree_node_base* _Const_Base_ptr; 20472: typedef _Rb_tree_node<_Val>* _Link_type; 20472: typedef const _Rb_tree_node<_Val>* _Const_Link_type; 20472: 20472: private: 20472: 20472: 20472: struct _Reuse_or_alloc_node 20472: { 20472: _Reuse_or_alloc_node(_Rb_tree& __t) 20472: : _M_root(__t._M_root()), _M_nodes(__t._M_rightmost()), _M_t(__t) 20472: { 20472: if (_M_root) 20472: { 20472: _M_root->_M_parent = 0; 20472: 20472: if (_M_nodes->_M_left) 20472: _M_nodes = _M_nodes->_M_left; 20472: } 20472: else 20472: _M_nodes = 0; 20472: } 20472: 20472: 20472: _Reuse_or_alloc_node(const _Reuse_or_alloc_node&) = delete; 20472: 20472: 20472: ~_Reuse_or_alloc_node() 20472: { _M_t._M_erase(static_cast<_Link_type>(_M_root)); } 20472: 20472: template 20472: _Link_type 20472: 20472: 20472: 20472: operator()(_Arg&& __arg) 20472: 20472: { 20472: _Link_type __node = static_cast<_Link_type>(_M_extract()); 20472: if (__node) 20472: { 20472: _M_t._M_destroy_node(__node); 20472: _M_t._M_construct_node(__node, std::forward<_Arg>(__arg)); 20472: return __node; 20472: } 20472: 20472: return _M_t._M_create_node(std::forward<_Arg>(__arg)); 20472: } 20472: 20472: private: 20472: _Base_ptr 20472: _M_extract() 20472: { 20472: if (!_M_nodes) 20472: return _M_nodes; 20472: 20472: _Base_ptr __node = _M_nodes; 20472: _M_nodes = _M_nodes->_M_parent; 20472: if (_M_nodes) 20472: { 20472: if (_M_nodes->_M_right == __node) 20472: { 20472: _M_nodes->_M_right = 0; 20472: 20472: if (_M_nodes->_M_left) 20472: { 20472: _M_nodes = _M_nodes->_M_left; 20472: 20472: while (_M_nodes->_M_right) 20472: _M_nodes = _M_nodes->_M_right; 20472: 20472: if (_M_nodes->_M_left) 20472: _M_nodes = _M_nodes->_M_left; 20472: } 20472: } 20472: else 20472: _M_nodes->_M_left = 0; 20472: } 20472: else 20472: _M_root = 0; 20472: 20472: return __node; 20472: } 20472: 20472: _Base_ptr _M_root; 20472: _Base_ptr _M_nodes; 20472: _Rb_tree& _M_t; 20472: }; 20472: 20472: 20472: 20472: struct _Alloc_node 20472: { 20472: _Alloc_node(_Rb_tree& __t) 20472: : _M_t(__t) { } 20472: 20472: template 20472: _Link_type 20472: 20472: 20472: 20472: operator()(_Arg&& __arg) const 20472: 20472: { return _M_t._M_create_node(std::forward<_Arg>(__arg)); } 20472: 20472: private: 20472: _Rb_tree& _M_t; 20472: }; 20472: 20472: public: 20472: typedef _Key key_type; 20472: typedef _Val value_type; 20472: typedef value_type* pointer; 20472: typedef const value_type* const_pointer; 20472: typedef value_type& reference; 20472: typedef const value_type& const_reference; 20472: typedef size_t size_type; 20472: typedef ptrdiff_t difference_type; 20472: typedef _Alloc allocator_type; 20472: 20472: _Node_allocator& 20472: _M_get_Node_allocator() noexcept 20472: { return this->_M_impl; } 20472: 20472: const _Node_allocator& 20472: _M_get_Node_allocator() const noexcept 20472: { return this->_M_impl; } 20472: 20472: allocator_type 20472: get_allocator() const noexcept 20472: { return allocator_type(_M_get_Node_allocator()); } 20472: 20472: protected: 20472: _Link_type 20472: _M_get_node() 20472: { return _Alloc_traits::allocate(_M_get_Node_allocator(), 1); } 20472: 20472: void 20472: _M_put_node(_Link_type __p) noexcept 20472: { _Alloc_traits::deallocate(_M_get_Node_allocator(), __p, 1); } 20472: # 611 "/usr/include/c++/10/bits/stl_tree.h" 3 20472: template 20472: void 20472: _M_construct_node(_Link_type __node, _Args&&... __args) 20472: { 20472: try 20472: { 20472: ::new(__node) _Rb_tree_node<_Val>; 20472: _Alloc_traits::construct(_M_get_Node_allocator(), 20472: __node->_M_valptr(), 20472: std::forward<_Args>(__args)...); 20472: } 20472: catch(...) 20472: { 20472: __node->~_Rb_tree_node<_Val>(); 20472: _M_put_node(__node); 20472: throw; 20472: } 20472: } 20472: 20472: template 20472: _Link_type 20472: _M_create_node(_Args&&... __args) 20472: { 20472: _Link_type __tmp = _M_get_node(); 20472: _M_construct_node(__tmp, std::forward<_Args>(__args)...); 20472: return __tmp; 20472: } 20472: 20472: 20472: void 20472: _M_destroy_node(_Link_type __p) noexcept 20472: { 20472: 20472: 20472: 20472: _Alloc_traits::destroy(_M_get_Node_allocator(), __p->_M_valptr()); 20472: __p->~_Rb_tree_node<_Val>(); 20472: 20472: } 20472: 20472: void 20472: _M_drop_node(_Link_type __p) noexcept 20472: { 20472: _M_destroy_node(__p); 20472: _M_put_node(__p); 20472: } 20472: 20472: template 20472: _Link_type 20472: _M_clone_node(_Const_Link_type __x, _NodeGen& __node_gen) 20472: { 20472: _Link_type __tmp = __node_gen(*__x->_M_valptr()); 20472: __tmp->_M_color = __x->_M_color; 20472: __tmp->_M_left = 0; 20472: __tmp->_M_right = 0; 20472: return __tmp; 20472: } 20472: 20472: protected: 20472: 20472: 20472: 20472: 20472: template 20472: 20472: struct _Rb_tree_impl 20472: : public _Node_allocator 20472: , public _Rb_tree_key_compare<_Key_compare> 20472: , public _Rb_tree_header 20472: { 20472: typedef _Rb_tree_key_compare<_Key_compare> _Base_key_compare; 20472: 20472: _Rb_tree_impl() 20472: noexcept(is_nothrow_default_constructible<_Node_allocator>::value && is_nothrow_default_constructible<_Base_key_compare>::value) 20472: 20472: 20472: : _Node_allocator() 20472: { } 20472: 20472: _Rb_tree_impl(const _Rb_tree_impl& __x) 20472: : _Node_allocator(_Alloc_traits::_S_select_on_copy(__x)) 20472: , _Base_key_compare(__x._M_key_compare) 20472: { } 20472: 20472: 20472: 20472: 20472: 20472: 20472: _Rb_tree_impl(_Rb_tree_impl&&) = default; 20472: 20472: explicit 20472: _Rb_tree_impl(_Node_allocator&& __a) 20472: : _Node_allocator(std::move(__a)) 20472: { } 20472: 20472: _Rb_tree_impl(_Rb_tree_impl&& __x, _Node_allocator&& __a) 20472: : _Node_allocator(std::move(__a)), 20472: _Base_key_compare(std::move(__x)), 20472: _Rb_tree_header(std::move(__x)) 20472: { } 20472: 20472: _Rb_tree_impl(const _Key_compare& __comp, _Node_allocator&& __a) 20472: : _Node_allocator(std::move(__a)), _Base_key_compare(__comp) 20472: { } 20472: 20472: }; 20472: 20472: _Rb_tree_impl<_Compare> _M_impl; 20472: 20472: protected: 20472: _Base_ptr& 20472: _M_root() noexcept 20472: { return this->_M_impl._M_header._M_parent; } 20472: 20472: _Const_Base_ptr 20472: _M_root() const noexcept 20472: { return this->_M_impl._M_header._M_parent; } 20472: 20472: _Base_ptr& 20472: _M_leftmost() noexcept 20472: { return this->_M_impl._M_header._M_left; } 20472: 20472: _Const_Base_ptr 20472: _M_leftmost() const noexcept 20472: { return this->_M_impl._M_header._M_left; } 20472: 20472: _Base_ptr& 20472: _M_rightmost() noexcept 20472: { return this->_M_impl._M_header._M_right; } 20472: 20472: _Const_Base_ptr 20472: _M_rightmost() const noexcept 20472: { return this->_M_impl._M_header._M_right; } 20472: 20472: _Link_type 20472: _M_begin() noexcept 20472: { return static_cast<_Link_type>(this->_M_impl._M_header._M_parent); } 20472: 20472: _Const_Link_type 20472: _M_begin() const noexcept 20472: { 20472: return static_cast<_Const_Link_type> 20472: (this->_M_impl._M_header._M_parent); 20472: } 20472: 20472: _Base_ptr 20472: _M_end() noexcept 20472: { return &this->_M_impl._M_header; } 20472: 20472: _Const_Base_ptr 20472: _M_end() const noexcept 20472: { return &this->_M_impl._M_header; } 20472: 20472: static const _Key& 20472: _S_key(_Const_Link_type __x) 20472: { 20472: 20472: 20472: 20472: static_assert(__is_invocable<_Compare&, const _Key&, const _Key&>{}, 20472: "comparison object must be invocable " 20472: "with two arguments of key type"); 20472: # 785 "/usr/include/c++/10/bits/stl_tree.h" 3 20472: return _KeyOfValue()(*__x->_M_valptr()); 20472: } 20472: 20472: static _Link_type 20472: _S_left(_Base_ptr __x) noexcept 20472: { return static_cast<_Link_type>(__x->_M_left); } 20472: 20472: static _Const_Link_type 20472: _S_left(_Const_Base_ptr __x) noexcept 20472: { return static_cast<_Const_Link_type>(__x->_M_left); } 20472: 20472: static _Link_type 20472: _S_right(_Base_ptr __x) noexcept 20472: { return static_cast<_Link_type>(__x->_M_right); } 20472: 20472: static _Const_Link_type 20472: _S_right(_Const_Base_ptr __x) noexcept 20472: { return static_cast<_Const_Link_type>(__x->_M_right); } 20472: 20472: static const _Key& 20472: _S_key(_Const_Base_ptr __x) 20472: { return _S_key(static_cast<_Const_Link_type>(__x)); } 20472: 20472: static _Base_ptr 20472: _S_minimum(_Base_ptr __x) noexcept 20472: { return _Rb_tree_node_base::_S_minimum(__x); } 20472: 20472: static _Const_Base_ptr 20472: _S_minimum(_Const_Base_ptr __x) noexcept 20472: { return _Rb_tree_node_base::_S_minimum(__x); } 20472: 20472: static _Base_ptr 20472: _S_maximum(_Base_ptr __x) noexcept 20472: { return _Rb_tree_node_base::_S_maximum(__x); } 20472: 20472: static _Const_Base_ptr 20472: _S_maximum(_Const_Base_ptr __x) noexcept 20472: { return _Rb_tree_node_base::_S_maximum(__x); } 20472: 20472: public: 20472: typedef _Rb_tree_iterator iterator; 20472: typedef _Rb_tree_const_iterator const_iterator; 20472: 20472: typedef std::reverse_iterator reverse_iterator; 20472: typedef std::reverse_iterator const_reverse_iterator; 20472: # 838 "/usr/include/c++/10/bits/stl_tree.h" 3 20472: pair<_Base_ptr, _Base_ptr> 20472: _M_get_insert_unique_pos(const key_type& __k); 20472: 20472: pair<_Base_ptr, _Base_ptr> 20472: _M_get_insert_equal_pos(const key_type& __k); 20472: 20472: pair<_Base_ptr, _Base_ptr> 20472: _M_get_insert_hint_unique_pos(const_iterator __pos, 20472: const key_type& __k); 20472: 20472: pair<_Base_ptr, _Base_ptr> 20472: _M_get_insert_hint_equal_pos(const_iterator __pos, 20472: const key_type& __k); 20472: 20472: private: 20472: 20472: template 20472: iterator 20472: _M_insert_(_Base_ptr __x, _Base_ptr __y, _Arg&& __v, _NodeGen&); 20472: 20472: iterator 20472: _M_insert_node(_Base_ptr __x, _Base_ptr __y, _Link_type __z); 20472: 20472: template 20472: iterator 20472: _M_insert_lower(_Base_ptr __y, _Arg&& __v); 20472: 20472: template 20472: iterator 20472: _M_insert_equal_lower(_Arg&& __x); 20472: 20472: iterator 20472: _M_insert_lower_node(_Base_ptr __p, _Link_type __z); 20472: 20472: iterator 20472: _M_insert_equal_lower_node(_Link_type __z); 20472: # 889 "/usr/include/c++/10/bits/stl_tree.h" 3 20472: template 20472: _Link_type 20472: _M_copy(_Const_Link_type __x, _Base_ptr __p, _NodeGen&); 20472: 20472: template 20472: _Link_type 20472: _M_copy(const _Rb_tree& __x, _NodeGen& __gen) 20472: { 20472: _Link_type __root = _M_copy(__x._M_begin(), _M_end(), __gen); 20472: _M_leftmost() = _S_minimum(__root); 20472: _M_rightmost() = _S_maximum(__root); 20472: _M_impl._M_node_count = __x._M_impl._M_node_count; 20472: return __root; 20472: } 20472: 20472: _Link_type 20472: _M_copy(const _Rb_tree& __x) 20472: { 20472: _Alloc_node __an(*this); 20472: return _M_copy(__x, __an); 20472: } 20472: 20472: void 20472: _M_erase(_Link_type __x); 20472: 20472: iterator 20472: _M_lower_bound(_Link_type __x, _Base_ptr __y, 20472: const _Key& __k); 20472: 20472: const_iterator 20472: _M_lower_bound(_Const_Link_type __x, _Const_Base_ptr __y, 20472: const _Key& __k) const; 20472: 20472: iterator 20472: _M_upper_bound(_Link_type __x, _Base_ptr __y, 20472: const _Key& __k); 20472: 20472: const_iterator 20472: _M_upper_bound(_Const_Link_type __x, _Const_Base_ptr __y, 20472: const _Key& __k) const; 20472: 20472: public: 20472: 20472: 20472: 20472: 20472: _Rb_tree() = default; 20472: 20472: 20472: _Rb_tree(const _Compare& __comp, 20472: const allocator_type& __a = allocator_type()) 20472: : _M_impl(__comp, _Node_allocator(__a)) { } 20472: 20472: _Rb_tree(const _Rb_tree& __x) 20472: : _M_impl(__x._M_impl) 20472: { 20472: if (__x._M_root() != 0) 20472: _M_root() = _M_copy(__x); 20472: } 20472: 20472: 20472: _Rb_tree(const allocator_type& __a) 20472: : _M_impl(_Node_allocator(__a)) 20472: { } 20472: 20472: _Rb_tree(const _Rb_tree& __x, const allocator_type& __a) 20472: : _M_impl(__x._M_impl._M_key_compare, _Node_allocator(__a)) 20472: { 20472: if (__x._M_root() != nullptr) 20472: _M_root() = _M_copy(__x); 20472: } 20472: 20472: _Rb_tree(_Rb_tree&&) = default; 20472: 20472: _Rb_tree(_Rb_tree&& __x, const allocator_type& __a) 20472: : _Rb_tree(std::move(__x), _Node_allocator(__a)) 20472: { } 20472: 20472: private: 20472: _Rb_tree(_Rb_tree&& __x, _Node_allocator&& __a, true_type) 20472: noexcept(is_nothrow_default_constructible<_Compare>::value) 20472: : _M_impl(std::move(__x._M_impl), std::move(__a)) 20472: { } 20472: 20472: _Rb_tree(_Rb_tree&& __x, _Node_allocator&& __a, false_type) 20472: : _M_impl(__x._M_impl._M_key_compare, std::move(__a)) 20472: { 20472: if (__x._M_root() != nullptr) 20472: _M_move_data(__x, false_type{}); 20472: } 20472: 20472: public: 20472: _Rb_tree(_Rb_tree&& __x, _Node_allocator&& __a) 20472: noexcept( noexcept( 20472: _Rb_tree(std::declval<_Rb_tree&&>(), std::declval<_Node_allocator&&>(), 20472: std::declval())) ) 20472: : _Rb_tree(std::move(__x), std::move(__a), 20472: typename _Alloc_traits::is_always_equal{}) 20472: { } 20472: 20472: 20472: ~_Rb_tree() noexcept 20472: { _M_erase(_M_begin()); } 20472: 20472: _Rb_tree& 20472: operator=(const _Rb_tree& __x); 20472: 20472: 20472: _Compare 20472: key_comp() const 20472: { return _M_impl._M_key_compare; } 20472: 20472: iterator 20472: begin() noexcept 20472: { return iterator(this->_M_impl._M_header._M_left); } 20472: 20472: const_iterator 20472: begin() const noexcept 20472: { return const_iterator(this->_M_impl._M_header._M_left); } 20472: 20472: iterator 20472: end() noexcept 20472: { return iterator(&this->_M_impl._M_header); } 20472: 20472: const_iterator 20472: end() const noexcept 20472: { return const_iterator(&this->_M_impl._M_header); } 20472: 20472: reverse_iterator 20472: rbegin() noexcept 20472: { return reverse_iterator(end()); } 20472: 20472: const_reverse_iterator 20472: rbegin() const noexcept 20472: { return const_reverse_iterator(end()); } 20472: 20472: reverse_iterator 20472: rend() noexcept 20472: { return reverse_iterator(begin()); } 20472: 20472: const_reverse_iterator 20472: rend() const noexcept 20472: { return const_reverse_iterator(begin()); } 20472: 20472: bool 20472: empty() const noexcept 20472: { return _M_impl._M_node_count == 0; } 20472: 20472: size_type 20472: size() const noexcept 20472: { return _M_impl._M_node_count; } 20472: 20472: size_type 20472: max_size() const noexcept 20472: { return _Alloc_traits::max_size(_M_get_Node_allocator()); } 20472: 20472: void 20472: swap(_Rb_tree& __t) 20472: noexcept(__is_nothrow_swappable<_Compare>::value); 20472: 20472: 20472: 20472: template 20472: pair 20472: _M_insert_unique(_Arg&& __x); 20472: 20472: template 20472: iterator 20472: _M_insert_equal(_Arg&& __x); 20472: 20472: template 20472: iterator 20472: _M_insert_unique_(const_iterator __pos, _Arg&& __x, _NodeGen&); 20472: 20472: template 20472: iterator 20472: _M_insert_unique_(const_iterator __pos, _Arg&& __x) 20472: { 20472: _Alloc_node __an(*this); 20472: return _M_insert_unique_(__pos, std::forward<_Arg>(__x), __an); 20472: } 20472: 20472: template 20472: iterator 20472: _M_insert_equal_(const_iterator __pos, _Arg&& __x, _NodeGen&); 20472: 20472: template 20472: iterator 20472: _M_insert_equal_(const_iterator __pos, _Arg&& __x) 20472: { 20472: _Alloc_node __an(*this); 20472: return _M_insert_equal_(__pos, std::forward<_Arg>(__x), __an); 20472: } 20472: 20472: template 20472: pair 20472: _M_emplace_unique(_Args&&... __args); 20472: 20472: template 20472: iterator 20472: _M_emplace_equal(_Args&&... __args); 20472: 20472: template 20472: iterator 20472: _M_emplace_hint_unique(const_iterator __pos, _Args&&... __args); 20472: 20472: template 20472: iterator 20472: _M_emplace_hint_equal(const_iterator __pos, _Args&&... __args); 20472: 20472: template 20472: using __same_value_type 20472: = is_same::value_type>; 20472: 20472: template 20472: __enable_if_t<__same_value_type<_InputIterator>::value> 20472: _M_insert_range_unique(_InputIterator __first, _InputIterator __last) 20472: { 20472: _Alloc_node __an(*this); 20472: for (; __first != __last; ++__first) 20472: _M_insert_unique_(end(), *__first, __an); 20472: } 20472: 20472: template 20472: __enable_if_t::value> 20472: _M_insert_range_unique(_InputIterator __first, _InputIterator __last) 20472: { 20472: for (; __first != __last; ++__first) 20472: _M_emplace_unique(*__first); 20472: } 20472: 20472: template 20472: __enable_if_t<__same_value_type<_InputIterator>::value> 20472: _M_insert_range_equal(_InputIterator __first, _InputIterator __last) 20472: { 20472: _Alloc_node __an(*this); 20472: for (; __first != __last; ++__first) 20472: _M_insert_equal_(end(), *__first, __an); 20472: } 20472: 20472: template 20472: __enable_if_t::value> 20472: _M_insert_range_equal(_InputIterator __first, _InputIterator __last) 20472: { 20472: _Alloc_node __an(*this); 20472: for (; __first != __last; ++__first) 20472: _M_emplace_equal(*__first); 20472: } 20472: # 1186 "/usr/include/c++/10/bits/stl_tree.h" 3 20472: private: 20472: void 20472: _M_erase_aux(const_iterator __position); 20472: 20472: void 20472: _M_erase_aux(const_iterator __first, const_iterator __last); 20472: 20472: public: 20472: 20472: 20472: 20472: __attribute ((__abi_tag__ ("cxx11"))) 20472: iterator 20472: erase(const_iterator __position) 20472: { 20472: ; 20472: const_iterator __result = __position; 20472: ++__result; 20472: _M_erase_aux(__position); 20472: return __result._M_const_cast(); 20472: } 20472: 20472: 20472: __attribute ((__abi_tag__ ("cxx11"))) 20472: iterator 20472: erase(iterator __position) 20472: { 20472: ; 20472: iterator __result = __position; 20472: ++__result; 20472: _M_erase_aux(__position); 20472: return __result; 20472: } 20472: # 1235 "/usr/include/c++/10/bits/stl_tree.h" 3 20472: size_type 20472: erase(const key_type& __x); 20472: 20472: 20472: 20472: 20472: __attribute ((__abi_tag__ ("cxx11"))) 20472: iterator 20472: erase(const_iterator __first, const_iterator __last) 20472: { 20472: _M_erase_aux(__first, __last); 20472: return __last._M_const_cast(); 20472: } 20472: # 1258 "/usr/include/c++/10/bits/stl_tree.h" 3 20472: void 20472: clear() noexcept 20472: { 20472: _M_erase(_M_begin()); 20472: _M_impl._M_reset(); 20472: } 20472: 20472: 20472: iterator 20472: find(const key_type& __k); 20472: 20472: const_iterator 20472: find(const key_type& __k) const; 20472: 20472: size_type 20472: count(const key_type& __k) const; 20472: 20472: iterator 20472: lower_bound(const key_type& __k) 20472: { return _M_lower_bound(_M_begin(), _M_end(), __k); } 20472: 20472: const_iterator 20472: lower_bound(const key_type& __k) const 20472: { return _M_lower_bound(_M_begin(), _M_end(), __k); } 20472: 20472: iterator 20472: upper_bound(const key_type& __k) 20472: { return _M_upper_bound(_M_begin(), _M_end(), __k); } 20472: 20472: const_iterator 20472: upper_bound(const key_type& __k) const 20472: { return _M_upper_bound(_M_begin(), _M_end(), __k); } 20472: 20472: pair 20472: equal_range(const key_type& __k); 20472: 20472: pair 20472: equal_range(const key_type& __k) const; 20472: # 1406 "/usr/include/c++/10/bits/stl_tree.h" 3 20472: bool 20472: __rb_verify() const; 20472: 20472: 20472: _Rb_tree& 20472: operator=(_Rb_tree&&) 20472: noexcept(_Alloc_traits::_S_nothrow_move() 20472: && is_nothrow_move_assignable<_Compare>::value); 20472: 20472: template 20472: void 20472: _M_assign_unique(_Iterator, _Iterator); 20472: 20472: template 20472: void 20472: _M_assign_equal(_Iterator, _Iterator); 20472: 20472: private: 20472: 20472: void 20472: _M_move_data(_Rb_tree& __x, true_type) 20472: { _M_impl._M_move_data(__x._M_impl); } 20472: 20472: 20472: 20472: void 20472: _M_move_data(_Rb_tree&, false_type); 20472: 20472: 20472: void 20472: _M_move_assign(_Rb_tree&, true_type); 20472: 20472: 20472: 20472: void 20472: _M_move_assign(_Rb_tree&, false_type); 20472: # 1610 "/usr/include/c++/10/bits/stl_tree.h" 3 20472: friend bool 20472: operator==(const _Rb_tree& __x, const _Rb_tree& __y) 20472: { 20472: return __x.size() == __y.size() 20472: && std::equal(__x.begin(), __x.end(), __y.begin()); 20472: } 20472: # 1627 "/usr/include/c++/10/bits/stl_tree.h" 3 20472: friend bool 20472: operator<(const _Rb_tree& __x, const _Rb_tree& __y) 20472: { 20472: return std::lexicographical_compare(__x.begin(), __x.end(), 20472: __y.begin(), __y.end()); 20472: } 20472: 20472: friend bool __attribute__ ((__deprecated__)) 20472: operator!=(const _Rb_tree& __x, const _Rb_tree& __y) 20472: { return !(__x == __y); } 20472: 20472: friend bool __attribute__ ((__deprecated__)) 20472: operator>(const _Rb_tree& __x, const _Rb_tree& __y) 20472: { return __y < __x; } 20472: 20472: friend bool __attribute__ ((__deprecated__)) 20472: operator<=(const _Rb_tree& __x, const _Rb_tree& __y) 20472: { return !(__y < __x); } 20472: 20472: friend bool __attribute__ ((__deprecated__)) 20472: operator>=(const _Rb_tree& __x, const _Rb_tree& __y) 20472: { return !(__x < __y); } 20472: 20472: }; 20472: 20472: template 20472: inline void 20472: swap(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, 20472: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) 20472: { __x.swap(__y); } 20472: 20472: 20472: template 20472: void 20472: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 20472: _M_move_data(_Rb_tree& __x, false_type) 20472: { 20472: if (_M_get_Node_allocator() == __x._M_get_Node_allocator()) 20472: _M_move_data(__x, true_type()); 20472: else 20472: { 20472: _Alloc_node __an(*this); 20472: auto __lbd = 20472: [&__an](const value_type& __cval) 20472: { 20472: auto& __val = const_cast(__cval); 20472: return __an(std::move_if_noexcept(__val)); 20472: }; 20472: _M_root() = _M_copy(__x, __lbd); 20472: } 20472: } 20472: 20472: template 20472: inline void 20472: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 20472: _M_move_assign(_Rb_tree& __x, true_type) 20472: { 20472: clear(); 20472: if (__x._M_root() != nullptr) 20472: _M_move_data(__x, true_type()); 20472: std::__alloc_on_move(_M_get_Node_allocator(), 20472: __x._M_get_Node_allocator()); 20472: } 20472: 20472: template 20472: void 20472: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 20472: _M_move_assign(_Rb_tree& __x, false_type) 20472: { 20472: if (_M_get_Node_allocator() == __x._M_get_Node_allocator()) 20472: return _M_move_assign(__x, true_type{}); 20472: 20472: 20472: 20472: _Reuse_or_alloc_node __roan(*this); 20472: _M_impl._M_reset(); 20472: if (__x._M_root() != nullptr) 20472: { 20472: auto __lbd = 20472: [&__roan](const value_type& __cval) 20472: { 20472: auto& __val = const_cast(__cval); 20472: return __roan(std::move(__val)); 20472: }; 20472: _M_root() = _M_copy(__x, __lbd); 20472: __x.clear(); 20472: } 20472: } 20472: 20472: template 20472: inline _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& 20472: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 20472: operator=(_Rb_tree&& __x) 20472: noexcept(_Alloc_traits::_S_nothrow_move() 20472: && is_nothrow_move_assignable<_Compare>::value) 20472: { 20472: _M_impl._M_key_compare = std::move(__x._M_impl._M_key_compare); 20472: _M_move_assign(__x, __bool_constant<_Alloc_traits::_S_nothrow_move()>()); 20472: return *this; 20472: } 20472: 20472: template 20472: template 20472: void 20472: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 20472: _M_assign_unique(_Iterator __first, _Iterator __last) 20472: { 20472: _Reuse_or_alloc_node __roan(*this); 20472: _M_impl._M_reset(); 20472: for (; __first != __last; ++__first) 20472: _M_insert_unique_(end(), *__first, __roan); 20472: } 20472: 20472: template 20472: template 20472: void 20472: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 20472: _M_assign_equal(_Iterator __first, _Iterator __last) 20472: { 20472: _Reuse_or_alloc_node __roan(*this); 20472: _M_impl._M_reset(); 20472: for (; __first != __last; ++__first) 20472: _M_insert_equal_(end(), *__first, __roan); 20472: } 20472: 20472: 20472: template 20472: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& 20472: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 20472: operator=(const _Rb_tree& __x) 20472: { 20472: if (this != &__x) 20472: { 20472: 20472: 20472: if (_Alloc_traits::_S_propagate_on_copy_assign()) 20472: { 20472: auto& __this_alloc = this->_M_get_Node_allocator(); 20472: auto& __that_alloc = __x._M_get_Node_allocator(); 20472: if (!_Alloc_traits::_S_always_equal() 20472: && __this_alloc != __that_alloc) 20472: { 20472: 20472: 20472: clear(); 20472: std::__alloc_on_copy(__this_alloc, __that_alloc); 20472: } 20472: } 20472: 20472: 20472: _Reuse_or_alloc_node __roan(*this); 20472: _M_impl._M_reset(); 20472: _M_impl._M_key_compare = __x._M_impl._M_key_compare; 20472: if (__x._M_root() != 0) 20472: _M_root() = _M_copy(__x, __roan); 20472: } 20472: 20472: return *this; 20472: } 20472: 20472: template 20472: 20472: template 20472: 20472: 20472: 20472: typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator 20472: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 20472: _M_insert_(_Base_ptr __x, _Base_ptr __p, 20472: 20472: _Arg&& __v, 20472: 20472: 20472: 20472: _NodeGen& __node_gen) 20472: { 20472: bool __insert_left = (__x != 0 || __p == _M_end() 20472: || _M_impl._M_key_compare(_KeyOfValue()(__v), 20472: _S_key(__p))); 20472: 20472: _Link_type __z = __node_gen(std::forward<_Arg>(__v)); 20472: 20472: _Rb_tree_insert_and_rebalance(__insert_left, __z, __p, 20472: this->_M_impl._M_header); 20472: ++_M_impl._M_node_count; 20472: return iterator(__z); 20472: } 20472: 20472: template 20472: 20472: template 20472: 20472: typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator 20472: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 20472: 20472: _M_insert_lower(_Base_ptr __p, _Arg&& __v) 20472: 20472: 20472: 20472: { 20472: bool __insert_left = (__p == _M_end() 20472: || !_M_impl._M_key_compare(_S_key(__p), 20472: _KeyOfValue()(__v))); 20472: 20472: _Link_type __z = _M_create_node(std::forward<_Arg>(__v)); 20472: 20472: _Rb_tree_insert_and_rebalance(__insert_left, __z, __p, 20472: this->_M_impl._M_header); 20472: ++_M_impl._M_node_count; 20472: return iterator(__z); 20472: } 20472: 20472: template 20472: 20472: template 20472: 20472: typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator 20472: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 20472: 20472: _M_insert_equal_lower(_Arg&& __v) 20472: 20472: 20472: 20472: { 20472: _Link_type __x = _M_begin(); 20472: _Base_ptr __y = _M_end(); 20472: while (__x != 0) 20472: { 20472: __y = __x; 20472: __x = !_M_impl._M_key_compare(_S_key(__x), _KeyOfValue()(__v)) ? 20472: _S_left(__x) : _S_right(__x); 20472: } 20472: return _M_insert_lower(__y, std::forward<_Arg>(__v)); 20472: } 20472: 20472: template 20472: template 20472: typename _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>::_Link_type 20472: _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>:: 20472: _M_copy(_Const_Link_type __x, _Base_ptr __p, _NodeGen& __node_gen) 20472: { 20472: 20472: _Link_type __top = _M_clone_node(__x, __node_gen); 20472: __top->_M_parent = __p; 20472: 20472: try 20472: { 20472: if (__x->_M_right) 20472: __top->_M_right = _M_copy(_S_right(__x), __top, __node_gen); 20472: __p = __top; 20472: __x = _S_left(__x); 20472: 20472: while (__x != 0) 20472: { 20472: _Link_type __y = _M_clone_node(__x, __node_gen); 20472: __p->_M_left = __y; 20472: __y->_M_parent = __p; 20472: if (__x->_M_right) 20472: __y->_M_right = _M_copy(_S_right(__x), __y, __node_gen); 20472: __p = __y; 20472: __x = _S_left(__x); 20472: } 20472: } 20472: catch(...) 20472: { 20472: _M_erase(__top); 20472: throw; 20472: } 20472: return __top; 20472: } 20472: 20472: template 20472: void 20472: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 20472: _M_erase(_Link_type __x) 20472: { 20472: 20472: while (__x != 0) 20472: { 20472: _M_erase(_S_right(__x)); 20472: _Link_type __y = _S_left(__x); 20472: _M_drop_node(__x); 20472: __x = __y; 20472: } 20472: } 20472: 20472: template 20472: typename _Rb_tree<_Key, _Val, _KeyOfValue, 20472: _Compare, _Alloc>::iterator 20472: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 20472: _M_lower_bound(_Link_type __x, _Base_ptr __y, 20472: const _Key& __k) 20472: { 20472: while (__x != 0) 20472: if (!_M_impl._M_key_compare(_S_key(__x), __k)) 20472: __y = __x, __x = _S_left(__x); 20472: else 20472: __x = _S_right(__x); 20472: return iterator(__y); 20472: } 20472: 20472: template 20472: typename _Rb_tree<_Key, _Val, _KeyOfValue, 20472: _Compare, _Alloc>::const_iterator 20472: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 20472: _M_lower_bound(_Const_Link_type __x, _Const_Base_ptr __y, 20472: const _Key& __k) const 20472: { 20472: while (__x != 0) 20472: if (!_M_impl._M_key_compare(_S_key(__x), __k)) 20472: __y = __x, __x = _S_left(__x); 20472: else 20472: __x = _S_right(__x); 20472: return const_iterator(__y); 20472: } 20472: 20472: template 20472: typename _Rb_tree<_Key, _Val, _KeyOfValue, 20472: _Compare, _Alloc>::iterator 20472: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 20472: _M_upper_bound(_Link_type __x, _Base_ptr __y, 20472: const _Key& __k) 20472: { 20472: while (__x != 0) 20472: if (_M_impl._M_key_compare(__k, _S_key(__x))) 20472: __y = __x, __x = _S_left(__x); 20472: else 20472: __x = _S_right(__x); 20472: return iterator(__y); 20472: } 20472: 20472: template 20472: typename _Rb_tree<_Key, _Val, _KeyOfValue, 20472: _Compare, _Alloc>::const_iterator 20472: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 20472: _M_upper_bound(_Const_Link_type __x, _Const_Base_ptr __y, 20472: const _Key& __k) const 20472: { 20472: while (__x != 0) 20472: if (_M_impl._M_key_compare(__k, _S_key(__x))) 20472: __y = __x, __x = _S_left(__x); 20472: else 20472: __x = _S_right(__x); 20472: return const_iterator(__y); 20472: } 20472: 20472: template 20472: pair::iterator, 20472: typename _Rb_tree<_Key, _Val, _KeyOfValue, 20472: _Compare, _Alloc>::iterator> 20472: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 20472: equal_range(const _Key& __k) 20472: { 20472: _Link_type __x = _M_begin(); 20472: _Base_ptr __y = _M_end(); 20472: while (__x != 0) 20472: { 20472: if (_M_impl._M_key_compare(_S_key(__x), __k)) 20472: __x = _S_right(__x); 20472: else if (_M_impl._M_key_compare(__k, _S_key(__x))) 20472: __y = __x, __x = _S_left(__x); 20472: else 20472: { 20472: _Link_type __xu(__x); 20472: _Base_ptr __yu(__y); 20472: __y = __x, __x = _S_left(__x); 20472: __xu = _S_right(__xu); 20472: return pair(_M_lower_bound(__x, __y, __k), 20472: _M_upper_bound(__xu, __yu, __k)); 20472: } 20472: } 20472: return pair(iterator(__y), 20472: iterator(__y)); 20472: } 20472: 20472: template 20472: pair::const_iterator, 20472: typename _Rb_tree<_Key, _Val, _KeyOfValue, 20472: _Compare, _Alloc>::const_iterator> 20472: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 20472: equal_range(const _Key& __k) const 20472: { 20472: _Const_Link_type __x = _M_begin(); 20472: _Const_Base_ptr __y = _M_end(); 20472: while (__x != 0) 20472: { 20472: if (_M_impl._M_key_compare(_S_key(__x), __k)) 20472: __x = _S_right(__x); 20472: else if (_M_impl._M_key_compare(__k, _S_key(__x))) 20472: __y = __x, __x = _S_left(__x); 20472: else 20472: { 20472: _Const_Link_type __xu(__x); 20472: _Const_Base_ptr __yu(__y); 20472: __y = __x, __x = _S_left(__x); 20472: __xu = _S_right(__xu); 20472: return pair(_M_lower_bound(__x, __y, __k), 20472: _M_upper_bound(__xu, __yu, __k)); 20472: } 20472: } 20472: return pair(const_iterator(__y), 20472: const_iterator(__y)); 20472: } 20472: 20472: template 20472: void 20472: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 20472: swap(_Rb_tree& __t) 20472: noexcept(__is_nothrow_swappable<_Compare>::value) 20472: { 20472: if (_M_root() == 0) 20472: { 20472: if (__t._M_root() != 0) 20472: _M_impl._M_move_data(__t._M_impl); 20472: } 20472: else if (__t._M_root() == 0) 20472: __t._M_impl._M_move_data(_M_impl); 20472: else 20472: { 20472: std::swap(_M_root(),__t._M_root()); 20472: std::swap(_M_leftmost(),__t._M_leftmost()); 20472: std::swap(_M_rightmost(),__t._M_rightmost()); 20472: 20472: _M_root()->_M_parent = _M_end(); 20472: __t._M_root()->_M_parent = __t._M_end(); 20472: std::swap(this->_M_impl._M_node_count, __t._M_impl._M_node_count); 20472: } 20472: 20472: std::swap(this->_M_impl._M_key_compare, __t._M_impl._M_key_compare); 20472: 20472: _Alloc_traits::_S_on_swap(_M_get_Node_allocator(), 20472: __t._M_get_Node_allocator()); 20472: } 20472: 20472: template 20472: pair::_Base_ptr, 20472: typename _Rb_tree<_Key, _Val, _KeyOfValue, 20472: _Compare, _Alloc>::_Base_ptr> 20472: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 20472: _M_get_insert_unique_pos(const key_type& __k) 20472: { 20472: typedef pair<_Base_ptr, _Base_ptr> _Res; 20472: _Link_type __x = _M_begin(); 20472: _Base_ptr __y = _M_end(); 20472: bool __comp = true; 20472: while (__x != 0) 20472: { 20472: __y = __x; 20472: __comp = _M_impl._M_key_compare(__k, _S_key(__x)); 20472: __x = __comp ? _S_left(__x) : _S_right(__x); 20472: } 20472: iterator __j = iterator(__y); 20472: if (__comp) 20472: { 20472: if (__j == begin()) 20472: return _Res(__x, __y); 20472: else 20472: --__j; 20472: } 20472: if (_M_impl._M_key_compare(_S_key(__j._M_node), __k)) 20472: return _Res(__x, __y); 20472: return _Res(__j._M_node, 0); 20472: } 20472: 20472: template 20472: pair::_Base_ptr, 20472: typename _Rb_tree<_Key, _Val, _KeyOfValue, 20472: _Compare, _Alloc>::_Base_ptr> 20472: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 20472: _M_get_insert_equal_pos(const key_type& __k) 20472: { 20472: typedef pair<_Base_ptr, _Base_ptr> _Res; 20472: _Link_type __x = _M_begin(); 20472: _Base_ptr __y = _M_end(); 20472: while (__x != 0) 20472: { 20472: __y = __x; 20472: __x = _M_impl._M_key_compare(__k, _S_key(__x)) ? 20472: _S_left(__x) : _S_right(__x); 20472: } 20472: return _Res(__x, __y); 20472: } 20472: 20472: template 20472: 20472: template 20472: 20472: pair::iterator, bool> 20472: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 20472: 20472: _M_insert_unique(_Arg&& __v) 20472: 20472: 20472: 20472: { 20472: typedef pair _Res; 20472: pair<_Base_ptr, _Base_ptr> __res 20472: = _M_get_insert_unique_pos(_KeyOfValue()(__v)); 20472: 20472: if (__res.second) 20472: { 20472: _Alloc_node __an(*this); 20472: return _Res(_M_insert_(__res.first, __res.second, 20472: std::forward<_Arg>(__v), __an), 20472: true); 20472: } 20472: 20472: return _Res(iterator(__res.first), false); 20472: } 20472: 20472: template 20472: 20472: template 20472: 20472: typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator 20472: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 20472: 20472: _M_insert_equal(_Arg&& __v) 20472: 20472: 20472: 20472: { 20472: pair<_Base_ptr, _Base_ptr> __res 20472: = _M_get_insert_equal_pos(_KeyOfValue()(__v)); 20472: _Alloc_node __an(*this); 20472: return _M_insert_(__res.first, __res.second, 20472: std::forward<_Arg>(__v), __an); 20472: } 20472: 20472: template 20472: pair::_Base_ptr, 20472: typename _Rb_tree<_Key, _Val, _KeyOfValue, 20472: _Compare, _Alloc>::_Base_ptr> 20472: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 20472: _M_get_insert_hint_unique_pos(const_iterator __position, 20472: const key_type& __k) 20472: { 20472: iterator __pos = __position._M_const_cast(); 20472: typedef pair<_Base_ptr, _Base_ptr> _Res; 20472: 20472: 20472: if (__pos._M_node == _M_end()) 20472: { 20472: if (size() > 0 20472: && _M_impl._M_key_compare(_S_key(_M_rightmost()), __k)) 20472: return _Res(0, _M_rightmost()); 20472: else 20472: return _M_get_insert_unique_pos(__k); 20472: } 20472: else if (_M_impl._M_key_compare(__k, _S_key(__pos._M_node))) 20472: { 20472: 20472: iterator __before = __pos; 20472: if (__pos._M_node == _M_leftmost()) 20472: return _Res(_M_leftmost(), _M_leftmost()); 20472: else if (_M_impl._M_key_compare(_S_key((--__before)._M_node), __k)) 20472: { 20472: if (_S_right(__before._M_node) == 0) 20472: return _Res(0, __before._M_node); 20472: else 20472: return _Res(__pos._M_node, __pos._M_node); 20472: } 20472: else 20472: return _M_get_insert_unique_pos(__k); 20472: } 20472: else if (_M_impl._M_key_compare(_S_key(__pos._M_node), __k)) 20472: { 20472: 20472: iterator __after = __pos; 20472: if (__pos._M_node == _M_rightmost()) 20472: return _Res(0, _M_rightmost()); 20472: else if (_M_impl._M_key_compare(__k, _S_key((++__after)._M_node))) 20472: { 20472: if (_S_right(__pos._M_node) == 0) 20472: return _Res(0, __pos._M_node); 20472: else 20472: return _Res(__after._M_node, __after._M_node); 20472: } 20472: else 20472: return _M_get_insert_unique_pos(__k); 20472: } 20472: else 20472: 20472: return _Res(__pos._M_node, 0); 20472: } 20472: 20472: template 20472: 20472: template 20472: 20472: 20472: 20472: typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator 20472: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 20472: _M_insert_unique_(const_iterator __position, 20472: 20472: _Arg&& __v, 20472: 20472: 20472: 20472: _NodeGen& __node_gen) 20472: { 20472: pair<_Base_ptr, _Base_ptr> __res 20472: = _M_get_insert_hint_unique_pos(__position, _KeyOfValue()(__v)); 20472: 20472: if (__res.second) 20472: return _M_insert_(__res.first, __res.second, 20472: std::forward<_Arg>(__v), 20472: __node_gen); 20472: return iterator(__res.first); 20472: } 20472: 20472: template 20472: pair::_Base_ptr, 20472: typename _Rb_tree<_Key, _Val, _KeyOfValue, 20472: _Compare, _Alloc>::_Base_ptr> 20472: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 20472: _M_get_insert_hint_equal_pos(const_iterator __position, const key_type& __k) 20472: { 20472: iterator __pos = __position._M_const_cast(); 20472: typedef pair<_Base_ptr, _Base_ptr> _Res; 20472: 20472: 20472: if (__pos._M_node == _M_end()) 20472: { 20472: if (size() > 0 20472: && !_M_impl._M_key_compare(__k, _S_key(_M_rightmost()))) 20472: return _Res(0, _M_rightmost()); 20472: else 20472: return _M_get_insert_equal_pos(__k); 20472: } 20472: else if (!_M_impl._M_key_compare(_S_key(__pos._M_node), __k)) 20472: { 20472: 20472: iterator __before = __pos; 20472: if (__pos._M_node == _M_leftmost()) 20472: return _Res(_M_leftmost(), _M_leftmost()); 20472: else if (!_M_impl._M_key_compare(__k, _S_key((--__before)._M_node))) 20472: { 20472: if (_S_right(__before._M_node) == 0) 20472: return _Res(0, __before._M_node); 20472: else 20472: return _Res(__pos._M_node, __pos._M_node); 20472: } 20472: else 20472: return _M_get_insert_equal_pos(__k); 20472: } 20472: else 20472: { 20472: 20472: iterator __after = __pos; 20472: if (__pos._M_node == _M_rightmost()) 20472: return _Res(0, _M_rightmost()); 20472: else if (!_M_impl._M_key_compare(_S_key((++__after)._M_node), __k)) 20472: { 20472: if (_S_right(__pos._M_node) == 0) 20472: return _Res(0, __pos._M_node); 20472: else 20472: return _Res(__after._M_node, __after._M_node); 20472: } 20472: else 20472: return _Res(0, 0); 20472: } 20472: } 20472: 20472: template 20472: 20472: template 20472: 20472: 20472: 20472: typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator 20472: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 20472: _M_insert_equal_(const_iterator __position, 20472: 20472: _Arg&& __v, 20472: 20472: 20472: 20472: _NodeGen& __node_gen) 20472: { 20472: pair<_Base_ptr, _Base_ptr> __res 20472: = _M_get_insert_hint_equal_pos(__position, _KeyOfValue()(__v)); 20472: 20472: if (__res.second) 20472: return _M_insert_(__res.first, __res.second, 20472: std::forward<_Arg>(__v), 20472: __node_gen); 20472: 20472: return _M_insert_equal_lower(std::forward<_Arg>(__v)); 20472: } 20472: 20472: 20472: template 20472: typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator 20472: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 20472: _M_insert_node(_Base_ptr __x, _Base_ptr __p, _Link_type __z) 20472: { 20472: bool __insert_left = (__x != 0 || __p == _M_end() 20472: || _M_impl._M_key_compare(_S_key(__z), 20472: _S_key(__p))); 20472: 20472: _Rb_tree_insert_and_rebalance(__insert_left, __z, __p, 20472: this->_M_impl._M_header); 20472: ++_M_impl._M_node_count; 20472: return iterator(__z); 20472: } 20472: 20472: template 20472: typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator 20472: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 20472: _M_insert_lower_node(_Base_ptr __p, _Link_type __z) 20472: { 20472: bool __insert_left = (__p == _M_end() 20472: || !_M_impl._M_key_compare(_S_key(__p), 20472: _S_key(__z))); 20472: 20472: _Rb_tree_insert_and_rebalance(__insert_left, __z, __p, 20472: this->_M_impl._M_header); 20472: ++_M_impl._M_node_count; 20472: return iterator(__z); 20472: } 20472: 20472: template 20472: typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator 20472: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 20472: _M_insert_equal_lower_node(_Link_type __z) 20472: { 20472: _Link_type __x = _M_begin(); 20472: _Base_ptr __y = _M_end(); 20472: while (__x != 0) 20472: { 20472: __y = __x; 20472: __x = !_M_impl._M_key_compare(_S_key(__x), _S_key(__z)) ? 20472: _S_left(__x) : _S_right(__x); 20472: } 20472: return _M_insert_lower_node(__y, __z); 20472: } 20472: 20472: template 20472: template 20472: pair::iterator, bool> 20472: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 20472: _M_emplace_unique(_Args&&... __args) 20472: { 20472: _Link_type __z = _M_create_node(std::forward<_Args>(__args)...); 20472: 20472: try 20472: { 20472: typedef pair _Res; 20472: auto __res = _M_get_insert_unique_pos(_S_key(__z)); 20472: if (__res.second) 20472: return _Res(_M_insert_node(__res.first, __res.second, __z), true); 20472: 20472: _M_drop_node(__z); 20472: return _Res(iterator(__res.first), false); 20472: } 20472: catch(...) 20472: { 20472: _M_drop_node(__z); 20472: throw; 20472: } 20472: } 20472: 20472: template 20472: template 20472: typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator 20472: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 20472: _M_emplace_equal(_Args&&... __args) 20472: { 20472: _Link_type __z = _M_create_node(std::forward<_Args>(__args)...); 20472: 20472: try 20472: { 20472: auto __res = _M_get_insert_equal_pos(_S_key(__z)); 20472: return _M_insert_node(__res.first, __res.second, __z); 20472: } 20472: catch(...) 20472: { 20472: _M_drop_node(__z); 20472: throw; 20472: } 20472: } 20472: 20472: template 20472: template 20472: typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator 20472: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 20472: _M_emplace_hint_unique(const_iterator __pos, _Args&&... __args) 20472: { 20472: _Link_type __z = _M_create_node(std::forward<_Args>(__args)...); 20472: 20472: try 20472: { 20472: auto __res = _M_get_insert_hint_unique_pos(__pos, _S_key(__z)); 20472: 20472: if (__res.second) 20472: return _M_insert_node(__res.first, __res.second, __z); 20472: 20472: _M_drop_node(__z); 20472: return iterator(__res.first); 20472: } 20472: catch(...) 20472: { 20472: _M_drop_node(__z); 20472: throw; 20472: } 20472: } 20472: 20472: template 20472: template 20472: typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator 20472: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 20472: _M_emplace_hint_equal(const_iterator __pos, _Args&&... __args) 20472: { 20472: _Link_type __z = _M_create_node(std::forward<_Args>(__args)...); 20472: 20472: try 20472: { 20472: auto __res = _M_get_insert_hint_equal_pos(__pos, _S_key(__z)); 20472: 20472: if (__res.second) 20472: return _M_insert_node(__res.first, __res.second, __z); 20472: 20472: return _M_insert_equal_lower_node(__z); 20472: } 20472: catch(...) 20472: { 20472: _M_drop_node(__z); 20472: throw; 20472: } 20472: } 20472: 20472: 20472: 20472: template 20472: void 20472: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 20472: _M_erase_aux(const_iterator __position) 20472: { 20472: _Link_type __y = 20472: static_cast<_Link_type>(_Rb_tree_rebalance_for_erase 20472: (const_cast<_Base_ptr>(__position._M_node), 20472: this->_M_impl._M_header)); 20472: _M_drop_node(__y); 20472: --_M_impl._M_node_count; 20472: } 20472: 20472: template 20472: void 20472: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 20472: _M_erase_aux(const_iterator __first, const_iterator __last) 20472: { 20472: if (__first == begin() && __last == end()) 20472: clear(); 20472: else 20472: while (__first != __last) 20472: _M_erase_aux(__first++); 20472: } 20472: 20472: template 20472: typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::size_type 20472: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 20472: erase(const _Key& __x) 20472: { 20472: pair __p = equal_range(__x); 20472: const size_type __old_size = size(); 20472: _M_erase_aux(__p.first, __p.second); 20472: return __old_size - size(); 20472: } 20472: 20472: template 20472: typename _Rb_tree<_Key, _Val, _KeyOfValue, 20472: _Compare, _Alloc>::iterator 20472: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 20472: find(const _Key& __k) 20472: { 20472: iterator __j = _M_lower_bound(_M_begin(), _M_end(), __k); 20472: return (__j == end() 20472: || _M_impl._M_key_compare(__k, 20472: _S_key(__j._M_node))) ? end() : __j; 20472: } 20472: 20472: template 20472: typename _Rb_tree<_Key, _Val, _KeyOfValue, 20472: _Compare, _Alloc>::const_iterator 20472: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 20472: find(const _Key& __k) const 20472: { 20472: const_iterator __j = _M_lower_bound(_M_begin(), _M_end(), __k); 20472: return (__j == end() 20472: || _M_impl._M_key_compare(__k, 20472: _S_key(__j._M_node))) ? end() : __j; 20472: } 20472: 20472: template 20472: typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::size_type 20472: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 20472: count(const _Key& __k) const 20472: { 20472: pair __p = equal_range(__k); 20472: const size_type __n = std::distance(__p.first, __p.second); 20472: return __n; 20472: } 20472: 20472: __attribute__ ((__pure__)) unsigned int 20472: _Rb_tree_black_count(const _Rb_tree_node_base* __node, 20472: const _Rb_tree_node_base* __root) throw (); 20472: 20472: template 20472: bool 20472: _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::__rb_verify() const 20472: { 20472: if (_M_impl._M_node_count == 0 || begin() == end()) 20472: return _M_impl._M_node_count == 0 && begin() == end() 20472: && this->_M_impl._M_header._M_left == _M_end() 20472: && this->_M_impl._M_header._M_right == _M_end(); 20472: 20472: unsigned int __len = _Rb_tree_black_count(_M_leftmost(), _M_root()); 20472: for (const_iterator __it = begin(); __it != end(); ++__it) 20472: { 20472: _Const_Link_type __x = static_cast<_Const_Link_type>(__it._M_node); 20472: _Const_Link_type __L = _S_left(__x); 20472: _Const_Link_type __R = _S_right(__x); 20472: 20472: if (__x->_M_color == _S_red) 20472: if ((__L && __L->_M_color == _S_red) 20472: || (__R && __R->_M_color == _S_red)) 20472: return false; 20472: 20472: if (__L && _M_impl._M_key_compare(_S_key(__x), _S_key(__L))) 20472: return false; 20472: if (__R && _M_impl._M_key_compare(_S_key(__R), _S_key(__x))) 20472: return false; 20472: 20472: if (!__L && !__R && _Rb_tree_black_count(__x, _M_root()) != __len) 20472: return false; 20472: } 20472: 20472: if (_M_leftmost() != _Rb_tree_node_base::_S_minimum(_M_root())) 20472: return false; 20472: if (_M_rightmost() != _Rb_tree_node_base::_S_maximum(_M_root())) 20472: return false; 20472: return true; 20472: } 20472: # 2641 "/usr/include/c++/10/bits/stl_tree.h" 3 20472: 20472: } 20472: # 61 "/usr/include/c++/10/map" 2 3 20472: # 1 "/usr/include/c++/10/bits/stl_map.h" 1 3 20472: # 66 "/usr/include/c++/10/bits/stl_map.h" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: template 20472: class multimap; 20472: # 98 "/usr/include/c++/10/bits/stl_map.h" 3 20472: template , 20472: typename _Alloc = std::allocator > > 20472: class map 20472: { 20472: public: 20472: typedef _Key key_type; 20472: typedef _Tp mapped_type; 20472: typedef std::pair value_type; 20472: typedef _Compare key_compare; 20472: typedef _Alloc allocator_type; 20472: 20472: private: 20472: # 123 "/usr/include/c++/10/bits/stl_map.h" 3 20472: static_assert(is_same::value, 20472: "std::map must have the same value_type as its allocator"); 20472: 20472: 20472: 20472: public: 20472: class value_compare 20472: : public std::binary_function 20472: { 20472: friend class map<_Key, _Tp, _Compare, _Alloc>; 20472: protected: 20472: _Compare comp; 20472: 20472: value_compare(_Compare __c) 20472: : comp(__c) { } 20472: 20472: public: 20472: bool operator()(const value_type& __x, const value_type& __y) const 20472: { return comp(__x.first, __y.first); } 20472: }; 20472: 20472: private: 20472: 20472: typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template 20472: rebind::other _Pair_alloc_type; 20472: 20472: typedef _Rb_tree, 20472: key_compare, _Pair_alloc_type> _Rep_type; 20472: 20472: 20472: _Rep_type _M_t; 20472: 20472: typedef __gnu_cxx::__alloc_traits<_Pair_alloc_type> _Alloc_traits; 20472: 20472: public: 20472: 20472: 20472: typedef typename _Alloc_traits::pointer pointer; 20472: typedef typename _Alloc_traits::const_pointer const_pointer; 20472: typedef typename _Alloc_traits::reference reference; 20472: typedef typename _Alloc_traits::const_reference const_reference; 20472: typedef typename _Rep_type::iterator iterator; 20472: typedef typename _Rep_type::const_iterator const_iterator; 20472: typedef typename _Rep_type::size_type size_type; 20472: typedef typename _Rep_type::difference_type difference_type; 20472: typedef typename _Rep_type::reverse_iterator reverse_iterator; 20472: typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; 20472: # 185 "/usr/include/c++/10/bits/stl_map.h" 3 20472: map() = default; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: explicit 20472: map(const _Compare& __comp, 20472: const allocator_type& __a = allocator_type()) 20472: : _M_t(__comp, _Pair_alloc_type(__a)) { } 20472: # 207 "/usr/include/c++/10/bits/stl_map.h" 3 20472: map(const map&) = default; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: map(map&&) = default; 20472: # 228 "/usr/include/c++/10/bits/stl_map.h" 3 20472: map(initializer_list __l, 20472: const _Compare& __comp = _Compare(), 20472: const allocator_type& __a = allocator_type()) 20472: : _M_t(__comp, _Pair_alloc_type(__a)) 20472: { _M_t._M_insert_range_unique(__l.begin(), __l.end()); } 20472: 20472: 20472: explicit 20472: map(const allocator_type& __a) 20472: : _M_t(_Pair_alloc_type(__a)) { } 20472: 20472: 20472: map(const map& __m, const allocator_type& __a) 20472: : _M_t(__m._M_t, _Pair_alloc_type(__a)) { } 20472: 20472: 20472: map(map&& __m, const allocator_type& __a) 20472: noexcept(is_nothrow_copy_constructible<_Compare>::value 20472: && _Alloc_traits::_S_always_equal()) 20472: : _M_t(std::move(__m._M_t), _Pair_alloc_type(__a)) { } 20472: 20472: 20472: map(initializer_list __l, const allocator_type& __a) 20472: : _M_t(_Pair_alloc_type(__a)) 20472: { _M_t._M_insert_range_unique(__l.begin(), __l.end()); } 20472: 20472: 20472: template 20472: map(_InputIterator __first, _InputIterator __last, 20472: const allocator_type& __a) 20472: : _M_t(_Pair_alloc_type(__a)) 20472: { _M_t._M_insert_range_unique(__first, __last); } 20472: # 272 "/usr/include/c++/10/bits/stl_map.h" 3 20472: template 20472: map(_InputIterator __first, _InputIterator __last) 20472: : _M_t() 20472: { _M_t._M_insert_range_unique(__first, __last); } 20472: # 289 "/usr/include/c++/10/bits/stl_map.h" 3 20472: template 20472: map(_InputIterator __first, _InputIterator __last, 20472: const _Compare& __comp, 20472: const allocator_type& __a = allocator_type()) 20472: : _M_t(__comp, _Pair_alloc_type(__a)) 20472: { _M_t._M_insert_range_unique(__first, __last); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: ~map() = default; 20472: # 318 "/usr/include/c++/10/bits/stl_map.h" 3 20472: map& 20472: operator=(const map&) = default; 20472: 20472: 20472: map& 20472: operator=(map&&) = default; 20472: # 336 "/usr/include/c++/10/bits/stl_map.h" 3 20472: map& 20472: operator=(initializer_list __l) 20472: { 20472: _M_t._M_assign_unique(__l.begin(), __l.end()); 20472: return *this; 20472: } 20472: 20472: 20472: 20472: allocator_type 20472: get_allocator() const noexcept 20472: { return allocator_type(_M_t.get_allocator()); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: iterator 20472: begin() noexcept 20472: { return _M_t.begin(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: const_iterator 20472: begin() const noexcept 20472: { return _M_t.begin(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: iterator 20472: end() noexcept 20472: { return _M_t.end(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: const_iterator 20472: end() const noexcept 20472: { return _M_t.end(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: reverse_iterator 20472: rbegin() noexcept 20472: { return _M_t.rbegin(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: const_reverse_iterator 20472: rbegin() const noexcept 20472: { return _M_t.rbegin(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: reverse_iterator 20472: rend() noexcept 20472: { return _M_t.rend(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: const_reverse_iterator 20472: rend() const noexcept 20472: { return _M_t.rend(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: const_iterator 20472: cbegin() const noexcept 20472: { return _M_t.begin(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: const_iterator 20472: cend() const noexcept 20472: { return _M_t.end(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: const_reverse_iterator 20472: crbegin() const noexcept 20472: { return _M_t.rbegin(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: const_reverse_iterator 20472: crend() const noexcept 20472: { return _M_t.rend(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: bool 20472: empty() const noexcept 20472: { return _M_t.empty(); } 20472: 20472: 20472: size_type 20472: size() const noexcept 20472: { return _M_t.size(); } 20472: 20472: 20472: size_type 20472: max_size() const noexcept 20472: { return _M_t.max_size(); } 20472: # 491 "/usr/include/c++/10/bits/stl_map.h" 3 20472: mapped_type& 20472: operator[](const key_type& __k) 20472: { 20472: 20472: 20472: 20472: iterator __i = lower_bound(__k); 20472: 20472: if (__i == end() || key_comp()(__k, (*__i).first)) 20472: 20472: __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct, 20472: std::tuple(__k), 20472: std::tuple<>()); 20472: 20472: 20472: 20472: return (*__i).second; 20472: } 20472: 20472: 20472: mapped_type& 20472: operator[](key_type&& __k) 20472: { 20472: 20472: 20472: 20472: iterator __i = lower_bound(__k); 20472: 20472: if (__i == end() || key_comp()(__k, (*__i).first)) 20472: __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct, 20472: std::forward_as_tuple(std::move(__k)), 20472: std::tuple<>()); 20472: return (*__i).second; 20472: } 20472: # 536 "/usr/include/c++/10/bits/stl_map.h" 3 20472: mapped_type& 20472: at(const key_type& __k) 20472: { 20472: iterator __i = lower_bound(__k); 20472: if (__i == end() || key_comp()(__k, (*__i).first)) 20472: __throw_out_of_range(("map::at")); 20472: return (*__i).second; 20472: } 20472: 20472: const mapped_type& 20472: at(const key_type& __k) const 20472: { 20472: const_iterator __i = lower_bound(__k); 20472: if (__i == end() || key_comp()(__k, (*__i).first)) 20472: __throw_out_of_range(("map::at")); 20472: return (*__i).second; 20472: } 20472: # 574 "/usr/include/c++/10/bits/stl_map.h" 3 20472: template 20472: std::pair 20472: emplace(_Args&&... __args) 20472: { return _M_t._M_emplace_unique(std::forward<_Args>(__args)...); } 20472: # 604 "/usr/include/c++/10/bits/stl_map.h" 3 20472: template 20472: iterator 20472: emplace_hint(const_iterator __pos, _Args&&... __args) 20472: { 20472: return _M_t._M_emplace_hint_unique(__pos, 20472: std::forward<_Args>(__args)...); 20472: } 20472: # 802 "/usr/include/c++/10/bits/stl_map.h" 3 20472: std::pair 20472: insert(const value_type& __x) 20472: { return _M_t._M_insert_unique(__x); } 20472: 20472: 20472: 20472: 20472: std::pair 20472: insert(value_type&& __x) 20472: { return _M_t._M_insert_unique(std::move(__x)); } 20472: 20472: template 20472: __enable_if_t::value, 20472: pair> 20472: insert(_Pair&& __x) 20472: { return _M_t._M_emplace_unique(std::forward<_Pair>(__x)); } 20472: # 829 "/usr/include/c++/10/bits/stl_map.h" 3 20472: void 20472: insert(std::initializer_list __list) 20472: { insert(__list.begin(), __list.end()); } 20472: # 858 "/usr/include/c++/10/bits/stl_map.h" 3 20472: iterator 20472: 20472: insert(const_iterator __position, const value_type& __x) 20472: 20472: 20472: 20472: { return _M_t._M_insert_unique_(__position, __x); } 20472: 20472: 20472: 20472: 20472: iterator 20472: insert(const_iterator __position, value_type&& __x) 20472: { return _M_t._M_insert_unique_(__position, std::move(__x)); } 20472: 20472: template 20472: __enable_if_t::value, iterator> 20472: insert(const_iterator __position, _Pair&& __x) 20472: { 20472: return _M_t._M_emplace_hint_unique(__position, 20472: std::forward<_Pair>(__x)); 20472: } 20472: # 891 "/usr/include/c++/10/bits/stl_map.h" 3 20472: template 20472: void 20472: insert(_InputIterator __first, _InputIterator __last) 20472: { _M_t._M_insert_range_unique(__first, __last); } 20472: # 1030 "/usr/include/c++/10/bits/stl_map.h" 3 20472: iterator 20472: erase(const_iterator __position) 20472: { return _M_t.erase(__position); } 20472: 20472: 20472: __attribute ((__abi_tag__ ("cxx11"))) 20472: iterator 20472: erase(iterator __position) 20472: { return _M_t.erase(__position); } 20472: # 1067 "/usr/include/c++/10/bits/stl_map.h" 3 20472: size_type 20472: erase(const key_type& __x) 20472: { return _M_t.erase(__x); } 20472: # 1087 "/usr/include/c++/10/bits/stl_map.h" 3 20472: iterator 20472: erase(const_iterator __first, const_iterator __last) 20472: { return _M_t.erase(__first, __last); } 20472: # 1121 "/usr/include/c++/10/bits/stl_map.h" 3 20472: void 20472: swap(map& __x) 20472: noexcept(__is_nothrow_swappable<_Compare>::value) 20472: { _M_t.swap(__x._M_t); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: void 20472: clear() noexcept 20472: { _M_t.clear(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: key_compare 20472: key_comp() const 20472: { return _M_t.key_comp(); } 20472: 20472: 20472: 20472: 20472: 20472: value_compare 20472: value_comp() const 20472: { return value_compare(_M_t.key_comp()); } 20472: # 1168 "/usr/include/c++/10/bits/stl_map.h" 3 20472: iterator 20472: find(const key_type& __x) 20472: { return _M_t.find(__x); } 20472: # 1193 "/usr/include/c++/10/bits/stl_map.h" 3 20472: const_iterator 20472: find(const key_type& __x) const 20472: { return _M_t.find(__x); } 20472: # 1214 "/usr/include/c++/10/bits/stl_map.h" 3 20472: size_type 20472: count(const key_type& __x) const 20472: { return _M_t.find(__x) == _M_t.end() ? 0 : 1; } 20472: # 1257 "/usr/include/c++/10/bits/stl_map.h" 3 20472: iterator 20472: lower_bound(const key_type& __x) 20472: { return _M_t.lower_bound(__x); } 20472: # 1282 "/usr/include/c++/10/bits/stl_map.h" 3 20472: const_iterator 20472: lower_bound(const key_type& __x) const 20472: { return _M_t.lower_bound(__x); } 20472: # 1302 "/usr/include/c++/10/bits/stl_map.h" 3 20472: iterator 20472: upper_bound(const key_type& __x) 20472: { return _M_t.upper_bound(__x); } 20472: # 1322 "/usr/include/c++/10/bits/stl_map.h" 3 20472: const_iterator 20472: upper_bound(const key_type& __x) const 20472: { return _M_t.upper_bound(__x); } 20472: # 1351 "/usr/include/c++/10/bits/stl_map.h" 3 20472: std::pair 20472: equal_range(const key_type& __x) 20472: { return _M_t.equal_range(__x); } 20472: # 1380 "/usr/include/c++/10/bits/stl_map.h" 3 20472: std::pair 20472: equal_range(const key_type& __x) const 20472: { return _M_t.equal_range(__x); } 20472: # 1397 "/usr/include/c++/10/bits/stl_map.h" 3 20472: template 20472: friend bool 20472: operator==(const map<_K1, _T1, _C1, _A1>&, 20472: const map<_K1, _T1, _C1, _A1>&); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: friend bool 20472: operator<(const map<_K1, _T1, _C1, _A1>&, 20472: const map<_K1, _T1, _C1, _A1>&); 20472: 20472: }; 20472: # 1461 "/usr/include/c++/10/bits/stl_map.h" 3 20472: template 20472: inline bool 20472: operator==(const map<_Key, _Tp, _Compare, _Alloc>& __x, 20472: const map<_Key, _Tp, _Compare, _Alloc>& __y) 20472: { return __x._M_t == __y._M_t; } 20472: # 1499 "/usr/include/c++/10/bits/stl_map.h" 3 20472: template 20472: inline bool 20472: operator<(const map<_Key, _Tp, _Compare, _Alloc>& __x, 20472: const map<_Key, _Tp, _Compare, _Alloc>& __y) 20472: { return __x._M_t < __y._M_t; } 20472: 20472: 20472: template 20472: inline bool 20472: operator!=(const map<_Key, _Tp, _Compare, _Alloc>& __x, 20472: const map<_Key, _Tp, _Compare, _Alloc>& __y) 20472: { return !(__x == __y); } 20472: 20472: 20472: template 20472: inline bool 20472: operator>(const map<_Key, _Tp, _Compare, _Alloc>& __x, 20472: const map<_Key, _Tp, _Compare, _Alloc>& __y) 20472: { return __y < __x; } 20472: 20472: 20472: template 20472: inline bool 20472: operator<=(const map<_Key, _Tp, _Compare, _Alloc>& __x, 20472: const map<_Key, _Tp, _Compare, _Alloc>& __y) 20472: { return !(__y < __x); } 20472: 20472: 20472: template 20472: inline bool 20472: operator>=(const map<_Key, _Tp, _Compare, _Alloc>& __x, 20472: const map<_Key, _Tp, _Compare, _Alloc>& __y) 20472: { return !(__x < __y); } 20472: 20472: 20472: 20472: template 20472: inline void 20472: swap(map<_Key, _Tp, _Compare, _Alloc>& __x, 20472: map<_Key, _Tp, _Compare, _Alloc>& __y) 20472: noexcept(noexcept(__x.swap(__y))) 20472: { __x.swap(__y); } 20472: 20472: 20472: # 1565 "/usr/include/c++/10/bits/stl_map.h" 3 20472: 20472: } 20472: # 62 "/usr/include/c++/10/map" 2 3 20472: # 1 "/usr/include/c++/10/bits/stl_multimap.h" 1 3 20472: # 64 "/usr/include/c++/10/bits/stl_multimap.h" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: template 20472: class map; 20472: # 96 "/usr/include/c++/10/bits/stl_multimap.h" 3 20472: template , 20472: typename _Alloc = std::allocator > > 20472: class multimap 20472: { 20472: public: 20472: typedef _Key key_type; 20472: typedef _Tp mapped_type; 20472: typedef std::pair value_type; 20472: typedef _Compare key_compare; 20472: typedef _Alloc allocator_type; 20472: 20472: private: 20472: # 122 "/usr/include/c++/10/bits/stl_multimap.h" 3 20472: static_assert(is_same::value, 20472: "std::multimap must have the same value_type as its allocator"); 20472: 20472: 20472: 20472: public: 20472: class value_compare 20472: : public std::binary_function 20472: { 20472: friend class multimap<_Key, _Tp, _Compare, _Alloc>; 20472: protected: 20472: _Compare comp; 20472: 20472: value_compare(_Compare __c) 20472: : comp(__c) { } 20472: 20472: public: 20472: bool operator()(const value_type& __x, const value_type& __y) const 20472: { return comp(__x.first, __y.first); } 20472: }; 20472: 20472: private: 20472: 20472: typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template 20472: rebind::other _Pair_alloc_type; 20472: 20472: typedef _Rb_tree, 20472: key_compare, _Pair_alloc_type> _Rep_type; 20472: 20472: _Rep_type _M_t; 20472: 20472: typedef __gnu_cxx::__alloc_traits<_Pair_alloc_type> _Alloc_traits; 20472: 20472: public: 20472: 20472: 20472: typedef typename _Alloc_traits::pointer pointer; 20472: typedef typename _Alloc_traits::const_pointer const_pointer; 20472: typedef typename _Alloc_traits::reference reference; 20472: typedef typename _Alloc_traits::const_reference const_reference; 20472: typedef typename _Rep_type::iterator iterator; 20472: typedef typename _Rep_type::const_iterator const_iterator; 20472: typedef typename _Rep_type::size_type size_type; 20472: typedef typename _Rep_type::difference_type difference_type; 20472: typedef typename _Rep_type::reverse_iterator reverse_iterator; 20472: typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; 20472: # 182 "/usr/include/c++/10/bits/stl_multimap.h" 3 20472: multimap() = default; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: explicit 20472: multimap(const _Compare& __comp, 20472: const allocator_type& __a = allocator_type()) 20472: : _M_t(__comp, _Pair_alloc_type(__a)) { } 20472: # 204 "/usr/include/c++/10/bits/stl_multimap.h" 3 20472: multimap(const multimap&) = default; 20472: # 213 "/usr/include/c++/10/bits/stl_multimap.h" 3 20472: multimap(multimap&&) = default; 20472: # 225 "/usr/include/c++/10/bits/stl_multimap.h" 3 20472: multimap(initializer_list __l, 20472: const _Compare& __comp = _Compare(), 20472: const allocator_type& __a = allocator_type()) 20472: : _M_t(__comp, _Pair_alloc_type(__a)) 20472: { _M_t._M_insert_range_equal(__l.begin(), __l.end()); } 20472: 20472: 20472: explicit 20472: multimap(const allocator_type& __a) 20472: : _M_t(_Pair_alloc_type(__a)) { } 20472: 20472: 20472: multimap(const multimap& __m, const allocator_type& __a) 20472: : _M_t(__m._M_t, _Pair_alloc_type(__a)) { } 20472: 20472: 20472: multimap(multimap&& __m, const allocator_type& __a) 20472: noexcept(is_nothrow_copy_constructible<_Compare>::value 20472: && _Alloc_traits::_S_always_equal()) 20472: : _M_t(std::move(__m._M_t), _Pair_alloc_type(__a)) { } 20472: 20472: 20472: multimap(initializer_list __l, const allocator_type& __a) 20472: : _M_t(_Pair_alloc_type(__a)) 20472: { _M_t._M_insert_range_equal(__l.begin(), __l.end()); } 20472: 20472: 20472: template 20472: multimap(_InputIterator __first, _InputIterator __last, 20472: const allocator_type& __a) 20472: : _M_t(_Pair_alloc_type(__a)) 20472: { _M_t._M_insert_range_equal(__first, __last); } 20472: # 268 "/usr/include/c++/10/bits/stl_multimap.h" 3 20472: template 20472: multimap(_InputIterator __first, _InputIterator __last) 20472: : _M_t() 20472: { _M_t._M_insert_range_equal(__first, __last); } 20472: # 284 "/usr/include/c++/10/bits/stl_multimap.h" 3 20472: template 20472: multimap(_InputIterator __first, _InputIterator __last, 20472: const _Compare& __comp, 20472: const allocator_type& __a = allocator_type()) 20472: : _M_t(__comp, _Pair_alloc_type(__a)) 20472: { _M_t._M_insert_range_equal(__first, __last); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: ~multimap() = default; 20472: # 313 "/usr/include/c++/10/bits/stl_multimap.h" 3 20472: multimap& 20472: operator=(const multimap&) = default; 20472: 20472: 20472: multimap& 20472: operator=(multimap&&) = default; 20472: # 331 "/usr/include/c++/10/bits/stl_multimap.h" 3 20472: multimap& 20472: operator=(initializer_list __l) 20472: { 20472: _M_t._M_assign_equal(__l.begin(), __l.end()); 20472: return *this; 20472: } 20472: 20472: 20472: 20472: allocator_type 20472: get_allocator() const noexcept 20472: { return allocator_type(_M_t.get_allocator()); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: iterator 20472: begin() noexcept 20472: { return _M_t.begin(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: const_iterator 20472: begin() const noexcept 20472: { return _M_t.begin(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: iterator 20472: end() noexcept 20472: { return _M_t.end(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: const_iterator 20472: end() const noexcept 20472: { return _M_t.end(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: reverse_iterator 20472: rbegin() noexcept 20472: { return _M_t.rbegin(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: const_reverse_iterator 20472: rbegin() const noexcept 20472: { return _M_t.rbegin(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: reverse_iterator 20472: rend() noexcept 20472: { return _M_t.rend(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: const_reverse_iterator 20472: rend() const noexcept 20472: { return _M_t.rend(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: const_iterator 20472: cbegin() const noexcept 20472: { return _M_t.begin(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: const_iterator 20472: cend() const noexcept 20472: { return _M_t.end(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: const_reverse_iterator 20472: crbegin() const noexcept 20472: { return _M_t.rbegin(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: const_reverse_iterator 20472: crend() const noexcept 20472: { return _M_t.rend(); } 20472: 20472: 20472: 20472: 20472: bool 20472: empty() const noexcept 20472: { return _M_t.empty(); } 20472: 20472: 20472: size_type 20472: size() const noexcept 20472: { return _M_t.size(); } 20472: 20472: 20472: size_type 20472: max_size() const noexcept 20472: { return _M_t.max_size(); } 20472: # 489 "/usr/include/c++/10/bits/stl_multimap.h" 3 20472: template 20472: iterator 20472: emplace(_Args&&... __args) 20472: { return _M_t._M_emplace_equal(std::forward<_Args>(__args)...); } 20472: # 516 "/usr/include/c++/10/bits/stl_multimap.h" 3 20472: template 20472: iterator 20472: emplace_hint(const_iterator __pos, _Args&&... __args) 20472: { 20472: return _M_t._M_emplace_hint_equal(__pos, 20472: std::forward<_Args>(__args)...); 20472: } 20472: # 538 "/usr/include/c++/10/bits/stl_multimap.h" 3 20472: iterator 20472: insert(const value_type& __x) 20472: { return _M_t._M_insert_equal(__x); } 20472: 20472: 20472: 20472: 20472: iterator 20472: insert(value_type&& __x) 20472: { return _M_t._M_insert_equal(std::move(__x)); } 20472: 20472: template 20472: __enable_if_t::value, iterator> 20472: insert(_Pair&& __x) 20472: { return _M_t._M_emplace_equal(std::forward<_Pair>(__x)); } 20472: # 577 "/usr/include/c++/10/bits/stl_multimap.h" 3 20472: iterator 20472: 20472: insert(const_iterator __position, const value_type& __x) 20472: 20472: 20472: 20472: { return _M_t._M_insert_equal_(__position, __x); } 20472: 20472: 20472: 20472: 20472: iterator 20472: insert(const_iterator __position, value_type&& __x) 20472: { return _M_t._M_insert_equal_(__position, std::move(__x)); } 20472: 20472: template 20472: __enable_if_t::value, iterator> 20472: insert(const_iterator __position, _Pair&& __x) 20472: { 20472: return _M_t._M_emplace_hint_equal(__position, 20472: std::forward<_Pair>(__x)); 20472: } 20472: # 611 "/usr/include/c++/10/bits/stl_multimap.h" 3 20472: template 20472: void 20472: insert(_InputIterator __first, _InputIterator __last) 20472: { _M_t._M_insert_range_equal(__first, __last); } 20472: # 624 "/usr/include/c++/10/bits/stl_multimap.h" 3 20472: void 20472: insert(initializer_list __l) 20472: { this->insert(__l.begin(), __l.end()); } 20472: # 701 "/usr/include/c++/10/bits/stl_multimap.h" 3 20472: iterator 20472: erase(const_iterator __position) 20472: { return _M_t.erase(__position); } 20472: 20472: 20472: __attribute ((__abi_tag__ ("cxx11"))) 20472: iterator 20472: erase(iterator __position) 20472: { return _M_t.erase(__position); } 20472: # 738 "/usr/include/c++/10/bits/stl_multimap.h" 3 20472: size_type 20472: erase(const key_type& __x) 20472: { return _M_t.erase(__x); } 20472: # 759 "/usr/include/c++/10/bits/stl_multimap.h" 3 20472: iterator 20472: erase(const_iterator __first, const_iterator __last) 20472: { return _M_t.erase(__first, __last); } 20472: # 796 "/usr/include/c++/10/bits/stl_multimap.h" 3 20472: void 20472: swap(multimap& __x) 20472: noexcept(__is_nothrow_swappable<_Compare>::value) 20472: { _M_t.swap(__x._M_t); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: void 20472: clear() noexcept 20472: { _M_t.clear(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: key_compare 20472: key_comp() const 20472: { return _M_t.key_comp(); } 20472: 20472: 20472: 20472: 20472: 20472: value_compare 20472: value_comp() const 20472: { return value_compare(_M_t.key_comp()); } 20472: # 842 "/usr/include/c++/10/bits/stl_multimap.h" 3 20472: iterator 20472: find(const key_type& __x) 20472: { return _M_t.find(__x); } 20472: # 866 "/usr/include/c++/10/bits/stl_multimap.h" 3 20472: const_iterator 20472: find(const key_type& __x) const 20472: { return _M_t.find(__x); } 20472: # 884 "/usr/include/c++/10/bits/stl_multimap.h" 3 20472: size_type 20472: count(const key_type& __x) const 20472: { return _M_t.count(__x); } 20472: # 927 "/usr/include/c++/10/bits/stl_multimap.h" 3 20472: iterator 20472: lower_bound(const key_type& __x) 20472: { return _M_t.lower_bound(__x); } 20472: # 952 "/usr/include/c++/10/bits/stl_multimap.h" 3 20472: const_iterator 20472: lower_bound(const key_type& __x) const 20472: { return _M_t.lower_bound(__x); } 20472: # 972 "/usr/include/c++/10/bits/stl_multimap.h" 3 20472: iterator 20472: upper_bound(const key_type& __x) 20472: { return _M_t.upper_bound(__x); } 20472: # 992 "/usr/include/c++/10/bits/stl_multimap.h" 3 20472: const_iterator 20472: upper_bound(const key_type& __x) const 20472: { return _M_t.upper_bound(__x); } 20472: # 1019 "/usr/include/c++/10/bits/stl_multimap.h" 3 20472: std::pair 20472: equal_range(const key_type& __x) 20472: { return _M_t.equal_range(__x); } 20472: # 1046 "/usr/include/c++/10/bits/stl_multimap.h" 3 20472: std::pair 20472: equal_range(const key_type& __x) const 20472: { return _M_t.equal_range(__x); } 20472: # 1063 "/usr/include/c++/10/bits/stl_multimap.h" 3 20472: template 20472: friend bool 20472: operator==(const multimap<_K1, _T1, _C1, _A1>&, 20472: const multimap<_K1, _T1, _C1, _A1>&); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: friend bool 20472: operator<(const multimap<_K1, _T1, _C1, _A1>&, 20472: const multimap<_K1, _T1, _C1, _A1>&); 20472: 20472: }; 20472: # 1126 "/usr/include/c++/10/bits/stl_multimap.h" 3 20472: template 20472: inline bool 20472: operator==(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, 20472: const multimap<_Key, _Tp, _Compare, _Alloc>& __y) 20472: { return __x._M_t == __y._M_t; } 20472: # 1164 "/usr/include/c++/10/bits/stl_multimap.h" 3 20472: template 20472: inline bool 20472: operator<(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, 20472: const multimap<_Key, _Tp, _Compare, _Alloc>& __y) 20472: { return __x._M_t < __y._M_t; } 20472: 20472: 20472: template 20472: inline bool 20472: operator!=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, 20472: const multimap<_Key, _Tp, _Compare, _Alloc>& __y) 20472: { return !(__x == __y); } 20472: 20472: 20472: template 20472: inline bool 20472: operator>(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, 20472: const multimap<_Key, _Tp, _Compare, _Alloc>& __y) 20472: { return __y < __x; } 20472: 20472: 20472: template 20472: inline bool 20472: operator<=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, 20472: const multimap<_Key, _Tp, _Compare, _Alloc>& __y) 20472: { return !(__y < __x); } 20472: 20472: 20472: template 20472: inline bool 20472: operator>=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, 20472: const multimap<_Key, _Tp, _Compare, _Alloc>& __y) 20472: { return !(__x < __y); } 20472: 20472: 20472: 20472: template 20472: inline void 20472: swap(multimap<_Key, _Tp, _Compare, _Alloc>& __x, 20472: multimap<_Key, _Tp, _Compare, _Alloc>& __y) 20472: noexcept(noexcept(__x.swap(__y))) 20472: { __x.swap(__y); } 20472: 20472: 20472: # 1230 "/usr/include/c++/10/bits/stl_multimap.h" 3 20472: 20472: } 20472: # 63 "/usr/include/c++/10/map" 2 3 20472: # 14 "./include/rocksdb/db.h" 2 20472: 20472: 20472: 20472: 20472: # 1 "./include/rocksdb/iterator.h" 1 20472: # 19 "./include/rocksdb/iterator.h" 20472: 20472: 20472: 20472: # 1 "./include/rocksdb/cleanable.h" 1 20472: # 9 "./include/rocksdb/cleanable.h" 20472: 20472: 20472: # 1 "./include/rocksdb/rocksdb_namespace.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 12 "./include/rocksdb/cleanable.h" 2 20472: 20472: 20472: # 13 "./include/rocksdb/cleanable.h" 20472: namespace rocksdb { 20472: 20472: class Cleanable { 20472: public: 20472: Cleanable(); 20472: 20472: Cleanable(Cleanable&) = delete; 20472: Cleanable& operator=(Cleanable&) = delete; 20472: 20472: ~Cleanable(); 20472: 20472: 20472: Cleanable(Cleanable&&); 20472: Cleanable& operator=(Cleanable&&); 20472: 20472: 20472: 20472: 20472: 20472: 20472: typedef void (*CleanupFunction)(void* arg1, void* arg2); 20472: void RegisterCleanup(CleanupFunction function, void* arg1, void* arg2); 20472: void DelegateCleanupsTo(Cleanable* other); 20472: 20472: inline void Reset() { 20472: DoCleanup(); 20472: cleanup_.function = nullptr; 20472: cleanup_.next = nullptr; 20472: } 20472: 20472: protected: 20472: struct Cleanup { 20472: CleanupFunction function; 20472: void* arg1; 20472: void* arg2; 20472: Cleanup* next; 20472: }; 20472: Cleanup cleanup_; 20472: 20472: void RegisterCleanup(Cleanup* c); 20472: 20472: private: 20472: 20472: 20472: 20472: inline void DoCleanup() { 20472: if (cleanup_.function != nullptr) { 20472: (*cleanup_.function)(cleanup_.arg1, cleanup_.arg2); 20472: for (Cleanup* c = cleanup_.next; c != nullptr;) { 20472: (*c->function)(c->arg1, c->arg2); 20472: Cleanup* next = c->next; 20472: delete c; 20472: c = next; 20472: } 20472: } 20472: } 20472: }; 20472: 20472: } 20472: # 23 "./include/rocksdb/iterator.h" 2 20472: # 1 "./include/rocksdb/slice.h" 1 20472: # 19 "./include/rocksdb/slice.h" 20472: 20472: 20472: # 1 "/usr/include/assert.h" 1 3 4 20472: # 66 "/usr/include/assert.h" 3 4 20472: 20472: # 66 "/usr/include/assert.h" 3 4 20472: extern "C" { 20472: 20472: 20472: extern void __assert_fail (const char *__assertion, const char *__file, 20472: unsigned int __line, const char *__function) 20472: throw () __attribute__ ((__noreturn__)); 20472: 20472: 20472: extern void __assert_perror_fail (int __errnum, const char *__file, 20472: unsigned int __line, const char *__function) 20472: throw () __attribute__ ((__noreturn__)); 20472: 20472: 20472: 20472: 20472: extern void __assert (const char *__assertion, const char *__file, int __line) 20472: throw () __attribute__ ((__noreturn__)); 20472: 20472: 20472: } 20472: # 22 "./include/rocksdb/slice.h" 2 20472: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/10/include/stddef.h" 1 3 4 20472: # 23 "./include/rocksdb/slice.h" 2 20472: # 1 "/usr/include/string.h" 1 3 4 20472: # 26 "/usr/include/string.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/libc-header-start.h" 1 3 4 20472: # 27 "/usr/include/string.h" 2 3 4 20472: 20472: extern "C" { 20472: 20472: 20472: 20472: 20472: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/10/include/stddef.h" 1 3 4 20472: # 34 "/usr/include/string.h" 2 3 4 20472: # 43 "/usr/include/string.h" 3 4 20472: extern void *memcpy (void *__restrict __dest, const void *__restrict __src, 20472: size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: extern void *memmove (void *__dest, const void *__src, size_t __n) 20472: throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: 20472: 20472: 20472: extern void *memccpy (void *__restrict __dest, const void *__restrict __src, 20472: int __c, size_t __n) 20472: throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: 20472: 20472: extern void *memset (void *__s, int __c, size_t __n) throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: extern int memcmp (const void *__s1, const void *__s2, size_t __n) 20472: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: 20472: extern "C++" 20472: { 20472: extern void *memchr (void *__s, int __c, size_t __n) 20472: throw () __asm ("memchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 20472: extern const void *memchr (const void *__s, int __c, size_t __n) 20472: throw () __asm ("memchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) void * 20472: memchr (void *__s, int __c, size_t __n) throw () 20472: { 20472: return __builtin_memchr (__s, __c, __n); 20472: } 20472: 20472: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) const void * 20472: memchr (const void *__s, int __c, size_t __n) throw () 20472: { 20472: return __builtin_memchr (__s, __c, __n); 20472: } 20472: 20472: } 20472: # 99 "/usr/include/string.h" 3 4 20472: extern "C++" void *rawmemchr (void *__s, int __c) 20472: throw () __asm ("rawmemchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 20472: extern "C++" const void *rawmemchr (const void *__s, int __c) 20472: throw () __asm ("rawmemchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern "C++" void *memrchr (void *__s, int __c, size_t __n) 20472: throw () __asm ("memrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 20472: extern "C++" const void *memrchr (const void *__s, int __c, size_t __n) 20472: throw () __asm ("memrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 20472: # 122 "/usr/include/string.h" 3 4 20472: extern char *strcpy (char *__restrict __dest, const char *__restrict __src) 20472: throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: extern char *strncpy (char *__restrict __dest, 20472: const char *__restrict __src, size_t __n) 20472: throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: extern char *strcat (char *__restrict __dest, const char *__restrict __src) 20472: throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: extern char *strncat (char *__restrict __dest, const char *__restrict __src, 20472: size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: extern int strcmp (const char *__s1, const char *__s2) 20472: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: extern int strncmp (const char *__s1, const char *__s2, size_t __n) 20472: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: extern int strcoll (const char *__s1, const char *__s2) 20472: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: extern size_t strxfrm (char *__restrict __dest, 20472: const char *__restrict __src, size_t __n) 20472: throw () __attribute__ ((__nonnull__ (2))); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int strcoll_l (const char *__s1, const char *__s2, locale_t __l) 20472: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); 20472: 20472: 20472: extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n, 20472: locale_t __l) throw () __attribute__ ((__nonnull__ (2, 4))); 20472: 20472: 20472: 20472: 20472: 20472: extern char *strdup (const char *__s) 20472: throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern char *strndup (const char *__string, size_t __n) 20472: throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); 20472: # 204 "/usr/include/string.h" 3 4 20472: extern "C++" 20472: { 20472: extern char *strchr (char *__s, int __c) 20472: throw () __asm ("strchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 20472: extern const char *strchr (const char *__s, int __c) 20472: throw () __asm ("strchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) char * 20472: strchr (char *__s, int __c) throw () 20472: { 20472: return __builtin_strchr (__s, __c); 20472: } 20472: 20472: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) const char * 20472: strchr (const char *__s, int __c) throw () 20472: { 20472: return __builtin_strchr (__s, __c); 20472: } 20472: 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern "C++" 20472: { 20472: extern char *strrchr (char *__s, int __c) 20472: throw () __asm ("strrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 20472: extern const char *strrchr (const char *__s, int __c) 20472: throw () __asm ("strrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) char * 20472: strrchr (char *__s, int __c) throw () 20472: { 20472: return __builtin_strrchr (__s, __c); 20472: } 20472: 20472: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) const char * 20472: strrchr (const char *__s, int __c) throw () 20472: { 20472: return __builtin_strrchr (__s, __c); 20472: } 20472: 20472: } 20472: # 261 "/usr/include/string.h" 3 4 20472: extern "C++" char *strchrnul (char *__s, int __c) 20472: throw () __asm ("strchrnul") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 20472: extern "C++" const char *strchrnul (const char *__s, int __c) 20472: throw () __asm ("strchrnul") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 20472: # 273 "/usr/include/string.h" 3 4 20472: extern size_t strcspn (const char *__s, const char *__reject) 20472: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: extern size_t strspn (const char *__s, const char *__accept) 20472: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: extern "C++" 20472: { 20472: extern char *strpbrk (char *__s, const char *__accept) 20472: throw () __asm ("strpbrk") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 20472: extern const char *strpbrk (const char *__s, const char *__accept) 20472: throw () __asm ("strpbrk") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) char * 20472: strpbrk (char *__s, const char *__accept) throw () 20472: { 20472: return __builtin_strpbrk (__s, __accept); 20472: } 20472: 20472: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) const char * 20472: strpbrk (const char *__s, const char *__accept) throw () 20472: { 20472: return __builtin_strpbrk (__s, __accept); 20472: } 20472: 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern "C++" 20472: { 20472: extern char *strstr (char *__haystack, const char *__needle) 20472: throw () __asm ("strstr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 20472: extern const char *strstr (const char *__haystack, const char *__needle) 20472: throw () __asm ("strstr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) char * 20472: strstr (char *__haystack, const char *__needle) throw () 20472: { 20472: return __builtin_strstr (__haystack, __needle); 20472: } 20472: 20472: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) const char * 20472: strstr (const char *__haystack, const char *__needle) throw () 20472: { 20472: return __builtin_strstr (__haystack, __needle); 20472: } 20472: 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern char *strtok (char *__restrict __s, const char *__restrict __delim) 20472: throw () __attribute__ ((__nonnull__ (2))); 20472: 20472: 20472: 20472: extern char *__strtok_r (char *__restrict __s, 20472: const char *__restrict __delim, 20472: char **__restrict __save_ptr) 20472: throw () __attribute__ ((__nonnull__ (2, 3))); 20472: 20472: extern char *strtok_r (char *__restrict __s, const char *__restrict __delim, 20472: char **__restrict __save_ptr) 20472: throw () __attribute__ ((__nonnull__ (2, 3))); 20472: 20472: 20472: 20472: 20472: 20472: extern "C++" char *strcasestr (char *__haystack, const char *__needle) 20472: throw () __asm ("strcasestr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 20472: extern "C++" const char *strcasestr (const char *__haystack, 20472: const char *__needle) 20472: throw () __asm ("strcasestr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 20472: # 369 "/usr/include/string.h" 3 4 20472: extern void *memmem (const void *__haystack, size_t __haystacklen, 20472: const void *__needle, size_t __needlelen) 20472: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3))); 20472: 20472: 20472: 20472: extern void *__mempcpy (void *__restrict __dest, 20472: const void *__restrict __src, size_t __n) 20472: throw () __attribute__ ((__nonnull__ (1, 2))); 20472: extern void *mempcpy (void *__restrict __dest, 20472: const void *__restrict __src, size_t __n) 20472: throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: 20472: 20472: extern size_t strlen (const char *__s) 20472: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: 20472: 20472: extern size_t strnlen (const char *__string, size_t __maxlen) 20472: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: 20472: 20472: extern char *strerror (int __errnum) throw (); 20472: # 421 "/usr/include/string.h" 3 4 20472: extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) 20472: throw () __attribute__ ((__nonnull__ (2))) ; 20472: 20472: 20472: 20472: 20472: 20472: extern char *strerror_l (int __errnum, locale_t __l) throw (); 20472: 20472: 20472: 20472: # 1 "/usr/include/strings.h" 1 3 4 20472: # 23 "/usr/include/strings.h" 3 4 20472: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/10/include/stddef.h" 1 3 4 20472: # 24 "/usr/include/strings.h" 2 3 4 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern "C" { 20472: 20472: 20472: 20472: extern int bcmp (const void *__s1, const void *__s2, size_t __n) 20472: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: extern void bcopy (const void *__src, void *__dest, size_t __n) 20472: throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: extern void bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: 20472: extern "C++" 20472: { 20472: extern char *index (char *__s, int __c) 20472: throw () __asm ("index") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 20472: extern const char *index (const char *__s, int __c) 20472: throw () __asm ("index") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) char * 20472: index (char *__s, int __c) throw () 20472: { 20472: return __builtin_index (__s, __c); 20472: } 20472: 20472: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) const char * 20472: index (const char *__s, int __c) throw () 20472: { 20472: return __builtin_index (__s, __c); 20472: } 20472: 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern "C++" 20472: { 20472: extern char *rindex (char *__s, int __c) 20472: throw () __asm ("rindex") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 20472: extern const char *rindex (const char *__s, int __c) 20472: throw () __asm ("rindex") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) char * 20472: rindex (char *__s, int __c) throw () 20472: { 20472: return __builtin_rindex (__s, __c); 20472: } 20472: 20472: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) const char * 20472: rindex (const char *__s, int __c) throw () 20472: { 20472: return __builtin_rindex (__s, __c); 20472: } 20472: 20472: } 20472: # 104 "/usr/include/strings.h" 3 4 20472: extern int ffs (int __i) throw () __attribute__ ((__const__)); 20472: 20472: 20472: 20472: 20472: 20472: extern int ffsl (long int __l) throw () __attribute__ ((__const__)); 20472: __extension__ extern int ffsll (long long int __ll) 20472: throw () __attribute__ ((__const__)); 20472: 20472: 20472: 20472: extern int strcasecmp (const char *__s1, const char *__s2) 20472: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: extern int strncasecmp (const char *__s1, const char *__s2, size_t __n) 20472: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int strcasecmp_l (const char *__s1, const char *__s2, locale_t __loc) 20472: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); 20472: 20472: 20472: 20472: extern int strncasecmp_l (const char *__s1, const char *__s2, 20472: size_t __n, locale_t __loc) 20472: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4))); 20472: 20472: 20472: } 20472: # 433 "/usr/include/string.h" 2 3 4 20472: 20472: 20472: 20472: extern void explicit_bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: 20472: extern char *strsep (char **__restrict __stringp, 20472: const char *__restrict __delim) 20472: throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: 20472: 20472: extern char *strsignal (int __sig) throw (); 20472: 20472: 20472: extern char *__stpcpy (char *__restrict __dest, const char *__restrict __src) 20472: throw () __attribute__ ((__nonnull__ (1, 2))); 20472: extern char *stpcpy (char *__restrict __dest, const char *__restrict __src) 20472: throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: 20472: extern char *__stpncpy (char *__restrict __dest, 20472: const char *__restrict __src, size_t __n) 20472: throw () __attribute__ ((__nonnull__ (1, 2))); 20472: extern char *stpncpy (char *__restrict __dest, 20472: const char *__restrict __src, size_t __n) 20472: throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: 20472: 20472: extern int strverscmp (const char *__s1, const char *__s2) 20472: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: extern char *strfry (char *__string) throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: extern void *memfrob (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern "C++" char *basename (char *__filename) 20472: throw () __asm ("basename") __attribute__ ((__nonnull__ (1))); 20472: extern "C++" const char *basename (const char *__filename) 20472: throw () __asm ("basename") __attribute__ ((__nonnull__ (1))); 20472: # 499 "/usr/include/string.h" 3 4 20472: } 20472: # 24 "./include/rocksdb/slice.h" 2 20472: # 1 "/usr/include/c++/10/cstdio" 1 3 20472: # 39 "/usr/include/c++/10/cstdio" 3 20472: 20472: # 40 "/usr/include/c++/10/cstdio" 3 20472: # 25 "./include/rocksdb/slice.h" 2 20472: # 33 "./include/rocksdb/slice.h" 20472: 20472: # 33 "./include/rocksdb/slice.h" 20472: namespace rocksdb { 20472: 20472: class Slice { 20472: public: 20472: 20472: Slice() : data_(""), size_(0) {} 20472: 20472: 20472: Slice(const char* d, size_t n) : data_(d), size_(n) {} 20472: 20472: 20472: 20472: Slice(const std::string& s) : data_(s.data()), size_(s.size()) {} 20472: # 55 "./include/rocksdb/slice.h" 20472: Slice(const char* s) : data_(s) { size_ = (s == nullptr) ? 0 : strlen(s); } 20472: 20472: 20472: 20472: Slice(const struct SliceParts& parts, std::string* buf); 20472: 20472: 20472: const char* data() const { return data_; } 20472: 20472: 20472: size_t size() const { return size_; } 20472: 20472: 20472: bool empty() const { return size_ == 0; } 20472: 20472: 20472: 20472: char operator[](size_t n) const { 20472: 20472: # 73 "./include/rocksdb/slice.h" 3 4 20472: (static_cast ( 20472: # 73 "./include/rocksdb/slice.h" 20472: n < size() 20472: # 73 "./include/rocksdb/slice.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 73 "./include/rocksdb/slice.h" 20472: "n < size()" 20472: # 73 "./include/rocksdb/slice.h" 3 4 20472: , "./include/rocksdb/slice.h", 73, __extension__ __PRETTY_FUNCTION__)) 20472: # 73 "./include/rocksdb/slice.h" 20472: ; 20472: return data_[n]; 20472: } 20472: 20472: 20472: void clear() { 20472: data_ = ""; 20472: size_ = 0; 20472: } 20472: 20472: 20472: void remove_prefix(size_t n) { 20472: 20472: # 85 "./include/rocksdb/slice.h" 3 4 20472: (static_cast ( 20472: # 85 "./include/rocksdb/slice.h" 20472: n <= size() 20472: # 85 "./include/rocksdb/slice.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 85 "./include/rocksdb/slice.h" 20472: "n <= size()" 20472: # 85 "./include/rocksdb/slice.h" 3 4 20472: , "./include/rocksdb/slice.h", 85, __extension__ __PRETTY_FUNCTION__)) 20472: # 85 "./include/rocksdb/slice.h" 20472: ; 20472: data_ += n; 20472: size_ -= n; 20472: } 20472: 20472: void remove_suffix(size_t n) { 20472: 20472: # 91 "./include/rocksdb/slice.h" 3 4 20472: (static_cast ( 20472: # 91 "./include/rocksdb/slice.h" 20472: n <= size() 20472: # 91 "./include/rocksdb/slice.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 91 "./include/rocksdb/slice.h" 20472: "n <= size()" 20472: # 91 "./include/rocksdb/slice.h" 3 4 20472: , "./include/rocksdb/slice.h", 91, __extension__ __PRETTY_FUNCTION__)) 20472: # 91 "./include/rocksdb/slice.h" 20472: ; 20472: size_ -= n; 20472: } 20472: 20472: 20472: 20472: std::string ToString(bool hex = false) const; 20472: # 111 "./include/rocksdb/slice.h" 20472: bool DecodeHex(std::string* result) const; 20472: 20472: 20472: 20472: 20472: 20472: int compare(const Slice& b) const; 20472: 20472: 20472: bool starts_with(const Slice& x) const { 20472: return ((size_ >= x.size_) && (memcmp(data_, x.data_, x.size_) == 0)); 20472: } 20472: 20472: bool ends_with(const Slice& x) const { 20472: return ((size_ >= x.size_) && 20472: (memcmp(data_ + size_ - x.size_, x.data_, x.size_) == 0)); 20472: } 20472: 20472: 20472: size_t difference_offset(const Slice& b) const; 20472: 20472: 20472: const char* data_; 20472: size_t size_; 20472: 20472: 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: class PinnableSlice : public Slice, public Cleanable { 20472: public: 20472: PinnableSlice() { buf_ = &self_space_; } 20472: explicit PinnableSlice(std::string* buf) { buf_ = buf; } 20472: 20472: PinnableSlice(PinnableSlice&& other); 20472: PinnableSlice& operator=(PinnableSlice&& other); 20472: 20472: 20472: PinnableSlice(PinnableSlice&) = delete; 20472: PinnableSlice& operator=(PinnableSlice&) = delete; 20472: 20472: inline void PinSlice(const Slice& s, CleanupFunction f, void* arg1, 20472: void* arg2) { 20472: 20472: # 159 "./include/rocksdb/slice.h" 3 4 20472: (static_cast ( 20472: # 159 "./include/rocksdb/slice.h" 20472: !pinned_ 20472: # 159 "./include/rocksdb/slice.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 159 "./include/rocksdb/slice.h" 20472: "!pinned_" 20472: # 159 "./include/rocksdb/slice.h" 3 4 20472: , "./include/rocksdb/slice.h", 159, __extension__ __PRETTY_FUNCTION__)) 20472: # 159 "./include/rocksdb/slice.h" 20472: ; 20472: pinned_ = true; 20472: data_ = s.data(); 20472: size_ = s.size(); 20472: RegisterCleanup(f, arg1, arg2); 20472: 20472: # 164 "./include/rocksdb/slice.h" 3 4 20472: (static_cast ( 20472: # 164 "./include/rocksdb/slice.h" 20472: pinned_ 20472: # 164 "./include/rocksdb/slice.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 164 "./include/rocksdb/slice.h" 20472: "pinned_" 20472: # 164 "./include/rocksdb/slice.h" 3 4 20472: , "./include/rocksdb/slice.h", 164, __extension__ __PRETTY_FUNCTION__)) 20472: # 164 "./include/rocksdb/slice.h" 20472: ; 20472: } 20472: 20472: inline void PinSlice(const Slice& s, Cleanable* cleanable) { 20472: 20472: # 168 "./include/rocksdb/slice.h" 3 4 20472: (static_cast ( 20472: # 168 "./include/rocksdb/slice.h" 20472: !pinned_ 20472: # 168 "./include/rocksdb/slice.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 168 "./include/rocksdb/slice.h" 20472: "!pinned_" 20472: # 168 "./include/rocksdb/slice.h" 3 4 20472: , "./include/rocksdb/slice.h", 168, __extension__ __PRETTY_FUNCTION__)) 20472: # 168 "./include/rocksdb/slice.h" 20472: ; 20472: pinned_ = true; 20472: data_ = s.data(); 20472: size_ = s.size(); 20472: cleanable->DelegateCleanupsTo(this); 20472: 20472: # 173 "./include/rocksdb/slice.h" 3 4 20472: (static_cast ( 20472: # 173 "./include/rocksdb/slice.h" 20472: pinned_ 20472: # 173 "./include/rocksdb/slice.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 173 "./include/rocksdb/slice.h" 20472: "pinned_" 20472: # 173 "./include/rocksdb/slice.h" 3 4 20472: , "./include/rocksdb/slice.h", 173, __extension__ __PRETTY_FUNCTION__)) 20472: # 173 "./include/rocksdb/slice.h" 20472: ; 20472: } 20472: 20472: inline void PinSelf(const Slice& slice) { 20472: 20472: # 177 "./include/rocksdb/slice.h" 3 4 20472: (static_cast ( 20472: # 177 "./include/rocksdb/slice.h" 20472: !pinned_ 20472: # 177 "./include/rocksdb/slice.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 177 "./include/rocksdb/slice.h" 20472: "!pinned_" 20472: # 177 "./include/rocksdb/slice.h" 3 4 20472: , "./include/rocksdb/slice.h", 177, __extension__ __PRETTY_FUNCTION__)) 20472: # 177 "./include/rocksdb/slice.h" 20472: ; 20472: buf_->assign(slice.data(), slice.size()); 20472: data_ = buf_->data(); 20472: size_ = buf_->size(); 20472: 20472: # 181 "./include/rocksdb/slice.h" 3 4 20472: (static_cast ( 20472: # 181 "./include/rocksdb/slice.h" 20472: !pinned_ 20472: # 181 "./include/rocksdb/slice.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 181 "./include/rocksdb/slice.h" 20472: "!pinned_" 20472: # 181 "./include/rocksdb/slice.h" 3 4 20472: , "./include/rocksdb/slice.h", 181, __extension__ __PRETTY_FUNCTION__)) 20472: # 181 "./include/rocksdb/slice.h" 20472: ; 20472: } 20472: 20472: inline void PinSelf() { 20472: 20472: # 185 "./include/rocksdb/slice.h" 3 4 20472: (static_cast ( 20472: # 185 "./include/rocksdb/slice.h" 20472: !pinned_ 20472: # 185 "./include/rocksdb/slice.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 185 "./include/rocksdb/slice.h" 20472: "!pinned_" 20472: # 185 "./include/rocksdb/slice.h" 3 4 20472: , "./include/rocksdb/slice.h", 185, __extension__ __PRETTY_FUNCTION__)) 20472: # 185 "./include/rocksdb/slice.h" 20472: ; 20472: data_ = buf_->data(); 20472: size_ = buf_->size(); 20472: 20472: # 188 "./include/rocksdb/slice.h" 3 4 20472: (static_cast ( 20472: # 188 "./include/rocksdb/slice.h" 20472: !pinned_ 20472: # 188 "./include/rocksdb/slice.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 188 "./include/rocksdb/slice.h" 20472: "!pinned_" 20472: # 188 "./include/rocksdb/slice.h" 3 4 20472: , "./include/rocksdb/slice.h", 188, __extension__ __PRETTY_FUNCTION__)) 20472: # 188 "./include/rocksdb/slice.h" 20472: ; 20472: } 20472: 20472: void remove_suffix(size_t n) { 20472: 20472: # 192 "./include/rocksdb/slice.h" 3 4 20472: (static_cast ( 20472: # 192 "./include/rocksdb/slice.h" 20472: n <= size() 20472: # 192 "./include/rocksdb/slice.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 192 "./include/rocksdb/slice.h" 20472: "n <= size()" 20472: # 192 "./include/rocksdb/slice.h" 3 4 20472: , "./include/rocksdb/slice.h", 192, __extension__ __PRETTY_FUNCTION__)) 20472: # 192 "./include/rocksdb/slice.h" 20472: ; 20472: if (pinned_) { 20472: size_ -= n; 20472: } else { 20472: buf_->erase(size() - n, n); 20472: PinSelf(); 20472: } 20472: } 20472: 20472: void remove_prefix(size_t n) { 20472: 20472: # 202 "./include/rocksdb/slice.h" 3 4 20472: (static_cast ( 20472: # 202 "./include/rocksdb/slice.h" 20472: n <= size() 20472: # 202 "./include/rocksdb/slice.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 202 "./include/rocksdb/slice.h" 20472: "n <= size()" 20472: # 202 "./include/rocksdb/slice.h" 3 4 20472: , "./include/rocksdb/slice.h", 202, __extension__ __PRETTY_FUNCTION__)) 20472: # 202 "./include/rocksdb/slice.h" 20472: ; 20472: if (pinned_) { 20472: data_ += n; 20472: size_ -= n; 20472: } else { 20472: buf_->erase(0, n); 20472: PinSelf(); 20472: } 20472: } 20472: 20472: void Reset() { 20472: Cleanable::Reset(); 20472: pinned_ = false; 20472: size_ = 0; 20472: } 20472: 20472: inline std::string* GetSelf() { return buf_; } 20472: 20472: inline bool IsPinned() const { return pinned_; } 20472: 20472: private: 20472: friend class PinnableSlice4Test; 20472: std::string self_space_; 20472: std::string* buf_; 20472: bool pinned_ = false; 20472: }; 20472: 20472: 20472: 20472: struct SliceParts { 20472: SliceParts(const Slice* _parts, int _num_parts) 20472: : parts(_parts), num_parts(_num_parts) {} 20472: SliceParts() : parts(nullptr), num_parts(0) {} 20472: 20472: const Slice* parts; 20472: int num_parts; 20472: }; 20472: 20472: inline bool operator==(const Slice& x, const Slice& y) { 20472: return ((x.size() == y.size()) && 20472: (memcmp(x.data(), y.data(), x.size()) == 0)); 20472: } 20472: 20472: inline bool operator!=(const Slice& x, const Slice& y) { return !(x == y); } 20472: 20472: inline int Slice::compare(const Slice& b) const { 20472: 20472: # 248 "./include/rocksdb/slice.h" 3 4 20472: (static_cast ( 20472: # 248 "./include/rocksdb/slice.h" 20472: data_ != nullptr && b.data_ != nullptr 20472: # 248 "./include/rocksdb/slice.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 248 "./include/rocksdb/slice.h" 20472: "data_ != nullptr && b.data_ != nullptr" 20472: # 248 "./include/rocksdb/slice.h" 3 4 20472: , "./include/rocksdb/slice.h", 248, __extension__ __PRETTY_FUNCTION__)) 20472: # 248 "./include/rocksdb/slice.h" 20472: ; 20472: const size_t min_len = (size_ < b.size_) ? size_ : b.size_; 20472: int r = memcmp(data_, b.data_, min_len); 20472: if (r == 0) { 20472: if (size_ < b.size_) 20472: r = -1; 20472: else if (size_ > b.size_) 20472: r = +1; 20472: } 20472: return r; 20472: } 20472: 20472: inline size_t Slice::difference_offset(const Slice& b) const { 20472: size_t off = 0; 20472: const size_t len = (size_ < b.size_) ? size_ : b.size_; 20472: for (; off < len; off++) { 20472: if (data_[off] != b.data_[off]) break; 20472: } 20472: return off; 20472: } 20472: 20472: } 20472: # 24 "./include/rocksdb/iterator.h" 2 20472: # 1 "./include/rocksdb/status.h" 1 20472: # 17 "./include/rocksdb/status.h" 20472: 20472: # 32 "./include/rocksdb/status.h" 20472: namespace rocksdb { 20472: 20472: class Status { 20472: public: 20472: 20472: Status() : code_(kOk), subcode_(kNone), sev_(kNoError), state_(nullptr) {} 20472: ~Status() { 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: delete[] state_; 20472: } 20472: 20472: 20472: Status(const Status& s); 20472: Status& operator=(const Status& s); 20472: Status(Status&& s) 20472: 20472: noexcept 20472: 20472: ; 20472: Status& operator=(Status&& s) 20472: 20472: noexcept 20472: 20472: ; 20472: bool operator==(const Status& rhs) const; 20472: bool operator!=(const Status& rhs) const; 20472: 20472: 20472: 20472: 20472: void PermitUncheckedError() const { 20472: 20472: 20472: 20472: } 20472: 20472: enum Code : unsigned char { 20472: kOk = 0, 20472: kNotFound = 1, 20472: kCorruption = 2, 20472: kNotSupported = 3, 20472: kInvalidArgument = 4, 20472: kIOError = 5, 20472: kMergeInProgress = 6, 20472: kIncomplete = 7, 20472: kShutdownInProgress = 8, 20472: kTimedOut = 9, 20472: kAborted = 10, 20472: kBusy = 11, 20472: kExpired = 12, 20472: kTryAgain = 13, 20472: kCompactionTooLarge = 14, 20472: kColumnFamilyDropped = 15, 20472: kMaxCode 20472: }; 20472: 20472: Code code() const { 20472: 20472: 20472: 20472: return code_; 20472: } 20472: 20472: enum SubCode : unsigned char { 20472: kNone = 0, 20472: kMutexTimeout = 1, 20472: kLockTimeout = 2, 20472: kLockLimit = 3, 20472: kNoSpace = 4, 20472: kDeadlock = 5, 20472: kStaleFile = 6, 20472: kMemoryLimit = 7, 20472: kSpaceLimit = 8, 20472: kPathNotFound = 9, 20472: KMergeOperandsInsufficientCapacity = 10, 20472: kManualCompactionPaused = 11, 20472: kOverwritten = 12, 20472: kTxnNotPrepared = 13, 20472: kMaxSubCode 20472: }; 20472: 20472: SubCode subcode() const { 20472: 20472: 20472: 20472: return subcode_; 20472: } 20472: 20472: enum Severity : unsigned char { 20472: kNoError = 0, 20472: kSoftError = 1, 20472: kHardError = 2, 20472: kFatalError = 3, 20472: kUnrecoverableError = 4, 20472: kMaxSeverity 20472: }; 20472: 20472: Status(const Status& s, Severity sev); 20472: Severity severity() const { 20472: 20472: 20472: 20472: return sev_; 20472: } 20472: 20472: 20472: const char* getState() const { 20472: 20472: 20472: 20472: return state_; 20472: } 20472: 20472: 20472: static Status OK() { return Status(); } 20472: 20472: 20472: 20472: 20472: 20472: static Status OkOverwritten() { return Status(kOk, kOverwritten); } 20472: 20472: 20472: static Status NotFound(const Slice& msg, const Slice& msg2 = Slice()) { 20472: return Status(kNotFound, msg, msg2); 20472: } 20472: 20472: static Status NotFound(SubCode msg = kNone) { return Status(kNotFound, msg); } 20472: 20472: static Status Corruption(const Slice& msg, const Slice& msg2 = Slice()) { 20472: return Status(kCorruption, msg, msg2); 20472: } 20472: static Status Corruption(SubCode msg = kNone) { 20472: return Status(kCorruption, msg); 20472: } 20472: 20472: static Status NotSupported(const Slice& msg, const Slice& msg2 = Slice()) { 20472: return Status(kNotSupported, msg, msg2); 20472: } 20472: static Status NotSupported(SubCode msg = kNone) { 20472: return Status(kNotSupported, msg); 20472: } 20472: 20472: static Status InvalidArgument(const Slice& msg, const Slice& msg2 = Slice()) { 20472: return Status(kInvalidArgument, msg, msg2); 20472: } 20472: static Status InvalidArgument(SubCode msg = kNone) { 20472: return Status(kInvalidArgument, msg); 20472: } 20472: 20472: static Status IOError(const Slice& msg, const Slice& msg2 = Slice()) { 20472: return Status(kIOError, msg, msg2); 20472: } 20472: static Status IOError(SubCode msg = kNone) { return Status(kIOError, msg); } 20472: 20472: static Status MergeInProgress(const Slice& msg, const Slice& msg2 = Slice()) { 20472: return Status(kMergeInProgress, msg, msg2); 20472: } 20472: static Status MergeInProgress(SubCode msg = kNone) { 20472: return Status(kMergeInProgress, msg); 20472: } 20472: 20472: static Status Incomplete(const Slice& msg, const Slice& msg2 = Slice()) { 20472: return Status(kIncomplete, msg, msg2); 20472: } 20472: static Status Incomplete(SubCode msg = kNone) { 20472: return Status(kIncomplete, msg); 20472: } 20472: 20472: static Status ShutdownInProgress(SubCode msg = kNone) { 20472: return Status(kShutdownInProgress, msg); 20472: } 20472: static Status ShutdownInProgress(const Slice& msg, 20472: const Slice& msg2 = Slice()) { 20472: return Status(kShutdownInProgress, msg, msg2); 20472: } 20472: static Status Aborted(SubCode msg = kNone) { return Status(kAborted, msg); } 20472: static Status Aborted(const Slice& msg, const Slice& msg2 = Slice()) { 20472: return Status(kAborted, msg, msg2); 20472: } 20472: 20472: static Status Busy(SubCode msg = kNone) { return Status(kBusy, msg); } 20472: static Status Busy(const Slice& msg, const Slice& msg2 = Slice()) { 20472: return Status(kBusy, msg, msg2); 20472: } 20472: 20472: static Status TimedOut(SubCode msg = kNone) { return Status(kTimedOut, msg); } 20472: static Status TimedOut(const Slice& msg, const Slice& msg2 = Slice()) { 20472: return Status(kTimedOut, msg, msg2); 20472: } 20472: 20472: static Status Expired(SubCode msg = kNone) { return Status(kExpired, msg); } 20472: static Status Expired(const Slice& msg, const Slice& msg2 = Slice()) { 20472: return Status(kExpired, msg, msg2); 20472: } 20472: 20472: static Status TryAgain(SubCode msg = kNone) { return Status(kTryAgain, msg); } 20472: static Status TryAgain(const Slice& msg, const Slice& msg2 = Slice()) { 20472: return Status(kTryAgain, msg, msg2); 20472: } 20472: 20472: static Status CompactionTooLarge(SubCode msg = kNone) { 20472: return Status(kCompactionTooLarge, msg); 20472: } 20472: static Status CompactionTooLarge(const Slice& msg, 20472: const Slice& msg2 = Slice()) { 20472: return Status(kCompactionTooLarge, msg, msg2); 20472: } 20472: 20472: static Status ColumnFamilyDropped(SubCode msg = kNone) { 20472: return Status(kColumnFamilyDropped, msg); 20472: } 20472: 20472: static Status ColumnFamilyDropped(const Slice& msg, 20472: const Slice& msg2 = Slice()) { 20472: return Status(kColumnFamilyDropped, msg, msg2); 20472: } 20472: 20472: static Status NoSpace() { return Status(kIOError, kNoSpace); } 20472: static Status NoSpace(const Slice& msg, const Slice& msg2 = Slice()) { 20472: return Status(kIOError, kNoSpace, msg, msg2); 20472: } 20472: 20472: static Status MemoryLimit() { return Status(kAborted, kMemoryLimit); } 20472: static Status MemoryLimit(const Slice& msg, const Slice& msg2 = Slice()) { 20472: return Status(kAborted, kMemoryLimit, msg, msg2); 20472: } 20472: 20472: static Status SpaceLimit() { return Status(kIOError, kSpaceLimit); } 20472: static Status SpaceLimit(const Slice& msg, const Slice& msg2 = Slice()) { 20472: return Status(kIOError, kSpaceLimit, msg, msg2); 20472: } 20472: 20472: static Status PathNotFound() { return Status(kIOError, kPathNotFound); } 20472: static Status PathNotFound(const Slice& msg, const Slice& msg2 = Slice()) { 20472: return Status(kIOError, kPathNotFound, msg, msg2); 20472: } 20472: 20472: static Status TxnNotPrepared() { 20472: return Status(kInvalidArgument, kTxnNotPrepared); 20472: } 20472: static Status TxnNotPrepared(const Slice& msg, const Slice& msg2 = Slice()) { 20472: return Status(kInvalidArgument, kTxnNotPrepared, msg, msg2); 20472: } 20472: 20472: 20472: bool ok() const { 20472: 20472: 20472: 20472: return code() == kOk; 20472: } 20472: 20472: 20472: 20472: bool IsOkOverwritten() const { 20472: 20472: 20472: 20472: return code() == kOk && subcode() == kOverwritten; 20472: } 20472: 20472: 20472: bool IsNotFound() const { 20472: 20472: 20472: 20472: return code() == kNotFound; 20472: } 20472: 20472: 20472: bool IsCorruption() const { 20472: 20472: 20472: 20472: return code() == kCorruption; 20472: } 20472: 20472: 20472: bool IsNotSupported() const { 20472: 20472: 20472: 20472: return code() == kNotSupported; 20472: } 20472: 20472: 20472: bool IsInvalidArgument() const { 20472: 20472: 20472: 20472: return code() == kInvalidArgument; 20472: } 20472: 20472: 20472: bool IsIOError() const { 20472: 20472: 20472: 20472: return code() == kIOError; 20472: } 20472: 20472: 20472: bool IsMergeInProgress() const { 20472: 20472: 20472: 20472: return code() == kMergeInProgress; 20472: } 20472: 20472: 20472: bool IsIncomplete() const { 20472: 20472: 20472: 20472: return code() == kIncomplete; 20472: } 20472: 20472: 20472: bool IsShutdownInProgress() const { 20472: 20472: 20472: 20472: return code() == kShutdownInProgress; 20472: } 20472: 20472: bool IsTimedOut() const { 20472: 20472: 20472: 20472: return code() == kTimedOut; 20472: } 20472: 20472: bool IsAborted() const { 20472: 20472: 20472: 20472: return code() == kAborted; 20472: } 20472: 20472: bool IsLockLimit() const { 20472: 20472: 20472: 20472: return code() == kAborted && subcode() == kLockLimit; 20472: } 20472: 20472: 20472: 20472: bool IsBusy() const { 20472: 20472: 20472: 20472: return code() == kBusy; 20472: } 20472: 20472: bool IsDeadlock() const { 20472: 20472: 20472: 20472: return code() == kBusy && subcode() == kDeadlock; 20472: } 20472: 20472: 20472: bool IsExpired() const { 20472: 20472: 20472: 20472: return code() == kExpired; 20472: } 20472: 20472: 20472: 20472: 20472: bool IsTryAgain() const { 20472: 20472: 20472: 20472: return code() == kTryAgain; 20472: } 20472: 20472: 20472: bool IsCompactionTooLarge() const { 20472: 20472: 20472: 20472: return code() == kCompactionTooLarge; 20472: } 20472: 20472: 20472: bool IsColumnFamilyDropped() const { 20472: 20472: 20472: 20472: return code() == kColumnFamilyDropped; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: bool IsNoSpace() const { 20472: 20472: 20472: 20472: return (code() == kIOError) && (subcode() == kNoSpace); 20472: } 20472: 20472: 20472: 20472: 20472: bool IsMemoryLimit() const { 20472: 20472: 20472: 20472: return (code() == kAborted) && (subcode() == kMemoryLimit); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: bool IsPathNotFound() const { 20472: 20472: 20472: 20472: return (code() == kIOError) && (subcode() == kPathNotFound); 20472: } 20472: 20472: 20472: 20472: bool IsManualCompactionPaused() const { 20472: 20472: 20472: 20472: return (code() == kIncomplete) && (subcode() == kManualCompactionPaused); 20472: } 20472: 20472: 20472: bool IsTxnNotPrepared() const { 20472: 20472: 20472: 20472: return (code() == kInvalidArgument) && (subcode() == kTxnNotPrepared); 20472: } 20472: 20472: 20472: 20472: std::string ToString() const; 20472: 20472: protected: 20472: 20472: 20472: 20472: 20472: 20472: Code code_; 20472: SubCode subcode_; 20472: Severity sev_; 20472: const char* state_; 20472: 20472: 20472: 20472: 20472: explicit Status(Code _code, SubCode _subcode = kNone) 20472: : code_(_code), subcode_(_subcode), sev_(kNoError), state_(nullptr) {} 20472: 20472: Status(Code _code, SubCode _subcode, const Slice& msg, const Slice& msg2); 20472: Status(Code _code, const Slice& msg, const Slice& msg2) 20472: : Status(_code, kNone, msg, msg2) {} 20472: 20472: static const char* CopyState(const char* s); 20472: }; 20472: 20472: inline Status::Status(const Status& s) 20472: : code_(s.code_), subcode_(s.subcode_), sev_(s.sev_) { 20472: 20472: 20472: 20472: state_ = (s.state_ == nullptr) ? nullptr : CopyState(s.state_); 20472: } 20472: inline Status::Status(const Status& s, Severity sev) 20472: : code_(s.code_), subcode_(s.subcode_), sev_(sev) { 20472: 20472: 20472: 20472: state_ = (s.state_ == nullptr) ? nullptr : CopyState(s.state_); 20472: } 20472: inline Status& Status::operator=(const Status& s) { 20472: if (this != &s) { 20472: 20472: 20472: 20472: 20472: code_ = s.code_; 20472: subcode_ = s.subcode_; 20472: sev_ = s.sev_; 20472: delete[] state_; 20472: state_ = (s.state_ == nullptr) ? nullptr : CopyState(s.state_); 20472: } 20472: return *this; 20472: } 20472: 20472: inline Status::Status(Status&& s) 20472: 20472: noexcept 20472: 20472: : Status() { 20472: 20472: 20472: 20472: *this = std::move(s); 20472: } 20472: 20472: inline Status& Status::operator=(Status&& s) 20472: 20472: noexcept 20472: 20472: { 20472: if (this != &s) { 20472: 20472: 20472: 20472: 20472: code_ = std::move(s.code_); 20472: s.code_ = kOk; 20472: subcode_ = std::move(s.subcode_); 20472: s.subcode_ = kNone; 20472: sev_ = std::move(s.sev_); 20472: s.sev_ = kNoError; 20472: delete[] state_; 20472: state_ = nullptr; 20472: std::swap(state_, s.state_); 20472: } 20472: return *this; 20472: } 20472: 20472: inline bool Status::operator==(const Status& rhs) const { 20472: 20472: 20472: 20472: 20472: return (code_ == rhs.code_); 20472: } 20472: 20472: inline bool Status::operator!=(const Status& rhs) const { 20472: 20472: 20472: 20472: 20472: return !(*this == rhs); 20472: } 20472: 20472: } 20472: # 25 "./include/rocksdb/iterator.h" 2 20472: 20472: namespace rocksdb { 20472: 20472: class Iterator : public Cleanable { 20472: public: 20472: Iterator() {} 20472: 20472: Iterator(const Iterator&) = delete; 20472: void operator=(const Iterator&) = delete; 20472: 20472: virtual ~Iterator() {} 20472: 20472: 20472: 20472: 20472: virtual bool Valid() const = 0; 20472: 20472: 20472: 20472: virtual void SeekToFirst() = 0; 20472: 20472: 20472: 20472: 20472: virtual void SeekToLast() = 0; 20472: # 58 "./include/rocksdb/iterator.h" 20472: virtual void Seek(const Slice& target) = 0; 20472: 20472: 20472: 20472: 20472: 20472: virtual void SeekForPrev(const Slice& target) = 0; 20472: 20472: 20472: 20472: 20472: virtual void Next() = 0; 20472: 20472: 20472: 20472: 20472: 20472: virtual void Prev() = 0; 20472: 20472: 20472: 20472: 20472: 20472: virtual Slice key() const = 0; 20472: 20472: 20472: 20472: 20472: 20472: virtual Slice value() const = 0; 20472: 20472: 20472: 20472: 20472: virtual Status status() const = 0; 20472: 20472: 20472: 20472: 20472: virtual Status Refresh() { 20472: return Status::NotSupported("Refresh() is not supported"); 20472: } 20472: # 114 "./include/rocksdb/iterator.h" 20472: virtual Status GetProperty(std::string prop_name, std::string* prop); 20472: 20472: virtual Slice timestamp() const { 20472: 20472: # 117 "./include/rocksdb/iterator.h" 3 4 20472: (static_cast ( 20472: # 117 "./include/rocksdb/iterator.h" 20472: false 20472: # 117 "./include/rocksdb/iterator.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 117 "./include/rocksdb/iterator.h" 20472: "false" 20472: # 117 "./include/rocksdb/iterator.h" 3 4 20472: , "./include/rocksdb/iterator.h", 117, __extension__ __PRETTY_FUNCTION__)) 20472: # 117 "./include/rocksdb/iterator.h" 20472: ; 20472: return Slice(); 20472: } 20472: }; 20472: 20472: 20472: extern Iterator* NewEmptyIterator(); 20472: 20472: 20472: extern Iterator* NewErrorIterator(const Status& status); 20472: 20472: } 20472: # 19 "./include/rocksdb/db.h" 2 20472: # 1 "./include/rocksdb/listener.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "/usr/include/c++/10/chrono" 1 3 20472: # 33 "/usr/include/c++/10/chrono" 3 20472: 20472: # 34 "/usr/include/c++/10/chrono" 3 20472: 20472: 20472: 20472: 20472: 20472: # 1 "/usr/include/c++/10/ratio" 1 3 20472: # 33 "/usr/include/c++/10/ratio" 3 20472: 20472: # 34 "/usr/include/c++/10/ratio" 3 20472: # 42 "/usr/include/c++/10/ratio" 3 20472: 20472: # 42 "/usr/include/c++/10/ratio" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: # 56 "/usr/include/c++/10/ratio" 3 20472: template 20472: struct __static_sign 20472: : integral_constant 20472: { }; 20472: 20472: template 20472: struct __static_abs 20472: : integral_constant::value> 20472: { }; 20472: 20472: template 20472: struct __static_gcd 20472: : __static_gcd<_Qn, (_Pn % _Qn)> 20472: { }; 20472: 20472: template 20472: struct __static_gcd<_Pn, 0> 20472: : integral_constant::value> 20472: { }; 20472: 20472: template 20472: struct __static_gcd<0, _Qn> 20472: : integral_constant::value> 20472: { }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct __safe_multiply 20472: { 20472: private: 20472: static const uintmax_t __c = uintmax_t(1) << (sizeof(intmax_t) * 4); 20472: 20472: static const uintmax_t __a0 = __static_abs<_Pn>::value % __c; 20472: static const uintmax_t __a1 = __static_abs<_Pn>::value / __c; 20472: static const uintmax_t __b0 = __static_abs<_Qn>::value % __c; 20472: static const uintmax_t __b1 = __static_abs<_Qn>::value / __c; 20472: 20472: static_assert(__a1 == 0 || __b1 == 0, 20472: "overflow in multiplication"); 20472: static_assert(__a0 * __b1 + __b0 * __a1 < (__c >> 1), 20472: "overflow in multiplication"); 20472: static_assert(__b0 * __a0 <= 0x7fffffffffffffffLL, 20472: "overflow in multiplication"); 20472: static_assert((__a0 * __b1 + __b0 * __a1) * __c 20472: <= 0x7fffffffffffffffLL - __b0 * __a0, 20472: "overflow in multiplication"); 20472: 20472: public: 20472: static const intmax_t value = _Pn * _Qn; 20472: }; 20472: 20472: 20472: 20472: template 20472: struct __big_less 20472: : integral_constant 20472: { }; 20472: 20472: template 20472: struct __big_add 20472: { 20472: static constexpr uintmax_t __lo = __lo1 + __lo2; 20472: static constexpr uintmax_t __hi = (__hi1 + __hi2 + 20472: (__lo1 + __lo2 < __lo1)); 20472: }; 20472: 20472: 20472: template 20472: struct __big_sub 20472: { 20472: static_assert(!__big_less<__hi1, __lo1, __hi2, __lo2>::value, 20472: "Internal library error"); 20472: static constexpr uintmax_t __lo = __lo1 - __lo2; 20472: static constexpr uintmax_t __hi = (__hi1 - __hi2 - 20472: (__lo1 < __lo2)); 20472: }; 20472: 20472: 20472: template 20472: struct __big_mul 20472: { 20472: private: 20472: static constexpr uintmax_t __c = uintmax_t(1) << (sizeof(intmax_t) * 4); 20472: static constexpr uintmax_t __x0 = __x % __c; 20472: static constexpr uintmax_t __x1 = __x / __c; 20472: static constexpr uintmax_t __y0 = __y % __c; 20472: static constexpr uintmax_t __y1 = __y / __c; 20472: static constexpr uintmax_t __x0y0 = __x0 * __y0; 20472: static constexpr uintmax_t __x0y1 = __x0 * __y1; 20472: static constexpr uintmax_t __x1y0 = __x1 * __y0; 20472: static constexpr uintmax_t __x1y1 = __x1 * __y1; 20472: static constexpr uintmax_t __mix = __x0y1 + __x1y0; 20472: static constexpr uintmax_t __mix_lo = __mix * __c; 20472: static constexpr uintmax_t __mix_hi 20472: = __mix / __c + ((__mix < __x0y1) ? __c : 0); 20472: typedef __big_add<__mix_hi, __mix_lo, __x1y1, __x0y0> _Res; 20472: public: 20472: static constexpr uintmax_t __hi = _Res::__hi; 20472: static constexpr uintmax_t __lo = _Res::__lo; 20472: }; 20472: 20472: 20472: 20472: template 20472: struct __big_div_impl 20472: { 20472: private: 20472: static_assert(__d >= (uintmax_t(1) << (sizeof(intmax_t) * 8 - 1)), 20472: "Internal library error"); 20472: static_assert(__n1 < __d, "Internal library error"); 20472: static constexpr uintmax_t __c = uintmax_t(1) << (sizeof(intmax_t) * 4); 20472: static constexpr uintmax_t __d1 = __d / __c; 20472: static constexpr uintmax_t __d0 = __d % __c; 20472: 20472: static constexpr uintmax_t __q1x = __n1 / __d1; 20472: static constexpr uintmax_t __r1x = __n1 % __d1; 20472: static constexpr uintmax_t __m = __q1x * __d0; 20472: static constexpr uintmax_t __r1y = __r1x * __c + __n0 / __c; 20472: static constexpr uintmax_t __r1z = __r1y + __d; 20472: static constexpr uintmax_t __r1 20472: = ((__r1y < __m) ? ((__r1z >= __d) && (__r1z < __m)) 20472: ? (__r1z + __d) : __r1z : __r1y) - __m; 20472: static constexpr uintmax_t __q1 20472: = __q1x - ((__r1y < __m) 20472: ? ((__r1z >= __d) && (__r1z < __m)) ? 2 : 1 : 0); 20472: static constexpr uintmax_t __q0x = __r1 / __d1; 20472: static constexpr uintmax_t __r0x = __r1 % __d1; 20472: static constexpr uintmax_t __n = __q0x * __d0; 20472: static constexpr uintmax_t __r0y = __r0x * __c + __n0 % __c; 20472: static constexpr uintmax_t __r0z = __r0y + __d; 20472: static constexpr uintmax_t __r0 20472: = ((__r0y < __n) ? ((__r0z >= __d) && (__r0z < __n)) 20472: ? (__r0z + __d) : __r0z : __r0y) - __n; 20472: static constexpr uintmax_t __q0 20472: = __q0x - ((__r0y < __n) ? ((__r0z >= __d) 20472: && (__r0z < __n)) ? 2 : 1 : 0); 20472: 20472: public: 20472: static constexpr uintmax_t __quot = __q1 * __c + __q0; 20472: static constexpr uintmax_t __rem = __r0; 20472: 20472: private: 20472: typedef __big_mul<__quot, __d> _Prod; 20472: typedef __big_add<_Prod::__hi, _Prod::__lo, 0, __rem> _Sum; 20472: static_assert(_Sum::__hi == __n1 && _Sum::__lo == __n0, 20472: "Internal library error"); 20472: }; 20472: 20472: template 20472: struct __big_div 20472: { 20472: private: 20472: static_assert(__d != 0, "Internal library error"); 20472: static_assert(sizeof (uintmax_t) == sizeof (unsigned long long), 20472: "This library calls __builtin_clzll on uintmax_t, which " 20472: "is unsafe on your platform. Please complain to " 20472: "http://gcc.gnu.org/bugzilla/"); 20472: static constexpr int __shift = __builtin_clzll(__d); 20472: static constexpr int __coshift_ = sizeof(uintmax_t) * 8 - __shift; 20472: static constexpr int __coshift = (__shift != 0) ? __coshift_ : 0; 20472: static constexpr uintmax_t __c1 = uintmax_t(1) << __shift; 20472: static constexpr uintmax_t __c2 = uintmax_t(1) << __coshift; 20472: static constexpr uintmax_t __new_d = __d * __c1; 20472: static constexpr uintmax_t __new_n0 = __n0 * __c1; 20472: static constexpr uintmax_t __n1_shifted = (__n1 % __d) * __c1; 20472: static constexpr uintmax_t __n0_top = (__shift != 0) ? (__n0 / __c2) : 0; 20472: static constexpr uintmax_t __new_n1 = __n1_shifted + __n0_top; 20472: typedef __big_div_impl<__new_n1, __new_n0, __new_d> _Res; 20472: 20472: public: 20472: static constexpr uintmax_t __quot_hi = __n1 / __d; 20472: static constexpr uintmax_t __quot_lo = _Res::__quot; 20472: static constexpr uintmax_t __rem = _Res::__rem / __c1; 20472: 20472: private: 20472: typedef __big_mul<__quot_lo, __d> _P0; 20472: typedef __big_mul<__quot_hi, __d> _P1; 20472: typedef __big_add<_P0::__hi, _P0::__lo, _P1::__lo, __rem> _Sum; 20472: 20472: static_assert(_P1::__hi == 0, "Internal library error"); 20472: static_assert(_Sum::__hi >= _P0::__hi, "Internal library error"); 20472: 20472: static_assert(_Sum::__hi == __n1 && _Sum::__lo == __n0, 20472: "Internal library error"); 20472: static_assert(__rem < __d, "Internal library error"); 20472: }; 20472: # 265 "/usr/include/c++/10/ratio" 3 20472: template 20472: struct ratio 20472: { 20472: static_assert(_Den != 0, "denominator cannot be zero"); 20472: static_assert(_Num >= -0x7fffffffffffffffLL && _Den >= -0x7fffffffffffffffLL, 20472: "out of range"); 20472: 20472: 20472: static constexpr intmax_t num = 20472: _Num * __static_sign<_Den>::value / __static_gcd<_Num, _Den>::value; 20472: 20472: static constexpr intmax_t den = 20472: __static_abs<_Den>::value / __static_gcd<_Num, _Den>::value; 20472: 20472: typedef ratio type; 20472: }; 20472: 20472: template 20472: constexpr intmax_t ratio<_Num, _Den>::num; 20472: 20472: template 20472: constexpr intmax_t ratio<_Num, _Den>::den; 20472: 20472: 20472: 20472: template 20472: struct __ratio_multiply 20472: { 20472: private: 20472: static const intmax_t __gcd1 = 20472: __static_gcd<_R1::num, _R2::den>::value; 20472: static const intmax_t __gcd2 = 20472: __static_gcd<_R2::num, _R1::den>::value; 20472: 20472: public: 20472: typedef ratio< 20472: __safe_multiply<(_R1::num / __gcd1), 20472: (_R2::num / __gcd2)>::value, 20472: __safe_multiply<(_R1::den / __gcd2), 20472: (_R2::den / __gcd1)>::value> type; 20472: 20472: static constexpr intmax_t num = type::num; 20472: static constexpr intmax_t den = type::den; 20472: }; 20472: 20472: template 20472: constexpr intmax_t __ratio_multiply<_R1, _R2>::num; 20472: 20472: template 20472: constexpr intmax_t __ratio_multiply<_R1, _R2>::den; 20472: 20472: 20472: 20472: 20472: template 20472: using ratio_multiply = typename __ratio_multiply<_R1, _R2>::type; 20472: 20472: 20472: 20472: template 20472: struct __ratio_divide 20472: { 20472: static_assert(_R2::num != 0, "division by 0"); 20472: 20472: typedef typename __ratio_multiply< 20472: _R1, 20472: ratio<_R2::den, _R2::num>>::type type; 20472: 20472: static constexpr intmax_t num = type::num; 20472: static constexpr intmax_t den = type::den; 20472: }; 20472: 20472: template 20472: constexpr intmax_t __ratio_divide<_R1, _R2>::num; 20472: 20472: template 20472: constexpr intmax_t __ratio_divide<_R1, _R2>::den; 20472: 20472: 20472: 20472: 20472: template 20472: using ratio_divide = typename __ratio_divide<_R1, _R2>::type; 20472: 20472: 20472: template 20472: struct ratio_equal 20472: : integral_constant 20472: { }; 20472: 20472: 20472: template 20472: struct ratio_not_equal 20472: : integral_constant::value> 20472: { }; 20472: 20472: 20472: 20472: 20472: template, 20472: typename _Right = __big_mul<_R2::num,_R1::den> > 20472: struct __ratio_less_impl_1 20472: : integral_constant::value> 20472: { }; 20472: 20472: template::value 20472: != __static_sign<_R2::num>::value)), 20472: bool = (__static_sign<_R1::num>::value == -1 20472: && __static_sign<_R2::num>::value == -1)> 20472: struct __ratio_less_impl 20472: : __ratio_less_impl_1<_R1, _R2>::type 20472: { }; 20472: 20472: template 20472: struct __ratio_less_impl<_R1, _R2, true, false> 20472: : integral_constant 20472: { }; 20472: 20472: template 20472: struct __ratio_less_impl<_R1, _R2, false, true> 20472: : __ratio_less_impl_1, 20472: ratio<-_R1::num, _R1::den> >::type 20472: { }; 20472: 20472: 20472: 20472: 20472: template 20472: struct ratio_less 20472: : __ratio_less_impl<_R1, _R2>::type 20472: { }; 20472: 20472: 20472: template 20472: struct ratio_less_equal 20472: : integral_constant::value> 20472: { }; 20472: 20472: 20472: template 20472: struct ratio_greater 20472: : integral_constant::value> 20472: { }; 20472: 20472: 20472: template 20472: struct ratio_greater_equal 20472: : integral_constant::value> 20472: { }; 20472: # 438 "/usr/include/c++/10/ratio" 3 20472: template= 0), 20472: bool = (_R2::num >= 0), 20472: bool = ratio_less::value, _R1::den>, 20472: ratio<__static_abs<_R2::num>::value, _R2::den> >::value> 20472: struct __ratio_add_impl 20472: { 20472: private: 20472: typedef typename __ratio_add_impl< 20472: ratio<-_R1::num, _R1::den>, 20472: ratio<-_R2::num, _R2::den> >::type __t; 20472: public: 20472: typedef ratio<-__t::num, __t::den> type; 20472: }; 20472: 20472: 20472: template 20472: struct __ratio_add_impl<_R1, _R2, true, true, __b> 20472: { 20472: private: 20472: static constexpr uintmax_t __g = __static_gcd<_R1::den, _R2::den>::value; 20472: static constexpr uintmax_t __d2 = _R2::den / __g; 20472: typedef __big_mul<_R1::den, __d2> __d; 20472: typedef __big_mul<_R1::num, _R2::den / __g> __x; 20472: typedef __big_mul<_R2::num, _R1::den / __g> __y; 20472: typedef __big_add<__x::__hi, __x::__lo, __y::__hi, __y::__lo> __n; 20472: static_assert(__n::__hi >= __x::__hi, "Internal library error"); 20472: typedef __big_div<__n::__hi, __n::__lo, __g> __ng; 20472: static constexpr uintmax_t __g2 = __static_gcd<__ng::__rem, __g>::value; 20472: typedef __big_div<__n::__hi, __n::__lo, __g2> __n_final; 20472: static_assert(__n_final::__rem == 0, "Internal library error"); 20472: static_assert(__n_final::__quot_hi == 0 && 20472: __n_final::__quot_lo <= 0x7fffffffffffffffLL, "overflow in addition"); 20472: typedef __big_mul<_R1::den / __g2, __d2> __d_final; 20472: static_assert(__d_final::__hi == 0 && 20472: __d_final::__lo <= 0x7fffffffffffffffLL, "overflow in addition"); 20472: public: 20472: typedef ratio<__n_final::__quot_lo, __d_final::__lo> type; 20472: }; 20472: 20472: template 20472: struct __ratio_add_impl<_R1, _R2, false, true, true> 20472: : __ratio_add_impl<_R2, _R1> 20472: { }; 20472: 20472: 20472: template 20472: struct __ratio_add_impl<_R1, _R2, true, false, false> 20472: { 20472: private: 20472: static constexpr uintmax_t __g = __static_gcd<_R1::den, _R2::den>::value; 20472: static constexpr uintmax_t __d2 = _R2::den / __g; 20472: typedef __big_mul<_R1::den, __d2> __d; 20472: typedef __big_mul<_R1::num, _R2::den / __g> __x; 20472: typedef __big_mul<-_R2::num, _R1::den / __g> __y; 20472: typedef __big_sub<__x::__hi, __x::__lo, __y::__hi, __y::__lo> __n; 20472: typedef __big_div<__n::__hi, __n::__lo, __g> __ng; 20472: static constexpr uintmax_t __g2 = __static_gcd<__ng::__rem, __g>::value; 20472: typedef __big_div<__n::__hi, __n::__lo, __g2> __n_final; 20472: static_assert(__n_final::__rem == 0, "Internal library error"); 20472: static_assert(__n_final::__quot_hi == 0 && 20472: __n_final::__quot_lo <= 0x7fffffffffffffffLL, "overflow in addition"); 20472: typedef __big_mul<_R1::den / __g2, __d2> __d_final; 20472: static_assert(__d_final::__hi == 0 && 20472: __d_final::__lo <= 0x7fffffffffffffffLL, "overflow in addition"); 20472: public: 20472: typedef ratio<__n_final::__quot_lo, __d_final::__lo> type; 20472: }; 20472: 20472: template 20472: struct __ratio_add 20472: { 20472: typedef typename __ratio_add_impl<_R1, _R2>::type type; 20472: static constexpr intmax_t num = type::num; 20472: static constexpr intmax_t den = type::den; 20472: }; 20472: 20472: template 20472: constexpr intmax_t __ratio_add<_R1, _R2>::num; 20472: 20472: template 20472: constexpr intmax_t __ratio_add<_R1, _R2>::den; 20472: 20472: 20472: 20472: 20472: template 20472: using ratio_add = typename __ratio_add<_R1, _R2>::type; 20472: 20472: 20472: 20472: template 20472: struct __ratio_subtract 20472: { 20472: typedef typename __ratio_add< 20472: _R1, 20472: ratio<-_R2::num, _R2::den>>::type type; 20472: 20472: static constexpr intmax_t num = type::num; 20472: static constexpr intmax_t den = type::den; 20472: }; 20472: 20472: template 20472: constexpr intmax_t __ratio_subtract<_R1, _R2>::num; 20472: 20472: template 20472: constexpr intmax_t __ratio_subtract<_R1, _R2>::den; 20472: 20472: 20472: 20472: 20472: template 20472: using ratio_subtract = typename __ratio_subtract<_R1, _R2>::type; 20472: 20472: 20472: typedef ratio<1, 1000000000000000000> atto; 20472: typedef ratio<1, 1000000000000000> femto; 20472: typedef ratio<1, 1000000000000> pico; 20472: typedef ratio<1, 1000000000> nano; 20472: typedef ratio<1, 1000000> micro; 20472: typedef ratio<1, 1000> milli; 20472: typedef ratio<1, 100> centi; 20472: typedef ratio<1, 10> deci; 20472: typedef ratio< 10, 1> deca; 20472: typedef ratio< 100, 1> hecto; 20472: typedef ratio< 1000, 1> kilo; 20472: typedef ratio< 1000000, 1> mega; 20472: typedef ratio< 1000000000, 1> giga; 20472: typedef ratio< 1000000000000, 1> tera; 20472: typedef ratio< 1000000000000000, 1> peta; 20472: typedef ratio< 1000000000000000000, 1> exa; 20472: 20472: 20472: 20472: } 20472: # 40 "/usr/include/c++/10/chrono" 2 3 20472: 20472: 20472: # 1 "/usr/include/c++/10/ctime" 1 3 20472: # 39 "/usr/include/c++/10/ctime" 3 20472: 20472: # 40 "/usr/include/c++/10/ctime" 3 20472: # 58 "/usr/include/c++/10/ctime" 3 20472: namespace std 20472: { 20472: using ::clock_t; 20472: using ::time_t; 20472: using ::tm; 20472: 20472: using ::clock; 20472: using ::difftime; 20472: using ::mktime; 20472: using ::time; 20472: using ::asctime; 20472: using ::ctime; 20472: using ::gmtime; 20472: using ::localtime; 20472: using ::strftime; 20472: } 20472: # 43 "/usr/include/c++/10/chrono" 2 3 20472: # 1 "/usr/include/c++/10/bits/parse_numbers.h" 1 3 20472: # 33 "/usr/include/c++/10/bits/parse_numbers.h" 3 20472: 20472: # 34 "/usr/include/c++/10/bits/parse_numbers.h" 3 20472: # 44 "/usr/include/c++/10/chrono" 2 3 20472: 20472: 20472: 20472: 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: # 68 "/usr/include/c++/10/chrono" 3 20472: namespace chrono 20472: { 20472: template> 20472: struct duration; 20472: 20472: template 20472: struct time_point; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct __duration_common_type 20472: { }; 20472: 20472: template 20472: struct __duration_common_type<_CT, _Period1, _Period2, 20472: __void_t> 20472: { 20472: private: 20472: using __gcd_num = __static_gcd<_Period1::num, _Period2::num>; 20472: using __gcd_den = __static_gcd<_Period1::den, _Period2::den>; 20472: using __cr = typename _CT::type; 20472: using __r = ratio<__gcd_num::value, 20472: (_Period1::den / __gcd_den::value) * _Period2::den>; 20472: 20472: public: 20472: using type = chrono::duration<__cr, __r>; 20472: }; 20472: 20472: template 20472: struct __duration_common_type<__failure_type, _Period1, _Period2> 20472: { typedef __failure_type type; }; 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct common_type, 20472: chrono::duration<_Rep2, _Period2>> 20472: : __duration_common_type, _Period1, _Period2> 20472: { }; 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct __timepoint_common_type 20472: { }; 20472: 20472: template 20472: struct __timepoint_common_type<_CT, _Clock, __void_t> 20472: { 20472: using type = chrono::time_point<_Clock, typename _CT::type>; 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct common_type, 20472: chrono::time_point<_Clock, _Duration2>> 20472: : __timepoint_common_type, _Clock> 20472: { }; 20472: 20472: 20472: 20472: namespace chrono 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct __duration_cast_impl 20472: { 20472: template 20472: static constexpr _ToDur 20472: __cast(const duration<_Rep, _Period>& __d) 20472: { 20472: typedef typename _ToDur::rep __to_rep; 20472: return _ToDur(static_cast<__to_rep>(static_cast<_CR>(__d.count()) 20472: * static_cast<_CR>(_CF::num) 20472: / static_cast<_CR>(_CF::den))); 20472: } 20472: }; 20472: 20472: template 20472: struct __duration_cast_impl<_ToDur, _CF, _CR, true, true> 20472: { 20472: template 20472: static constexpr _ToDur 20472: __cast(const duration<_Rep, _Period>& __d) 20472: { 20472: typedef typename _ToDur::rep __to_rep; 20472: return _ToDur(static_cast<__to_rep>(__d.count())); 20472: } 20472: }; 20472: 20472: template 20472: struct __duration_cast_impl<_ToDur, _CF, _CR, true, false> 20472: { 20472: template 20472: static constexpr _ToDur 20472: __cast(const duration<_Rep, _Period>& __d) 20472: { 20472: typedef typename _ToDur::rep __to_rep; 20472: return _ToDur(static_cast<__to_rep>( 20472: static_cast<_CR>(__d.count()) / static_cast<_CR>(_CF::den))); 20472: } 20472: }; 20472: 20472: template 20472: struct __duration_cast_impl<_ToDur, _CF, _CR, false, true> 20472: { 20472: template 20472: static constexpr _ToDur 20472: __cast(const duration<_Rep, _Period>& __d) 20472: { 20472: typedef typename _ToDur::rep __to_rep; 20472: return _ToDur(static_cast<__to_rep>( 20472: static_cast<_CR>(__d.count()) * static_cast<_CR>(_CF::num))); 20472: } 20472: }; 20472: 20472: template 20472: struct __is_duration 20472: : std::false_type 20472: { }; 20472: 20472: template 20472: struct __is_duration> 20472: : std::true_type 20472: { }; 20472: 20472: template 20472: using __enable_if_is_duration 20472: = typename enable_if<__is_duration<_Tp>::value, _Tp>::type; 20472: 20472: template 20472: using __disable_if_is_duration 20472: = typename enable_if::value, _Tp>::type; 20472: 20472: 20472: 20472: 20472: template 20472: constexpr __enable_if_is_duration<_ToDur> 20472: duration_cast(const duration<_Rep, _Period>& __d) 20472: { 20472: typedef typename _ToDur::period __to_period; 20472: typedef typename _ToDur::rep __to_rep; 20472: typedef ratio_divide<_Period, __to_period> __cf; 20472: typedef typename common_type<__to_rep, _Rep, intmax_t>::type 20472: __cr; 20472: typedef __duration_cast_impl<_ToDur, __cf, __cr, 20472: __cf::num == 1, __cf::den == 1> __dc; 20472: return __dc::__cast(__d); 20472: } 20472: 20472: 20472: template 20472: struct treat_as_floating_point 20472: : is_floating_point<_Rep> 20472: { }; 20472: # 359 "/usr/include/c++/10/chrono" 3 20472: template 20472: struct duration_values 20472: { 20472: static constexpr _Rep 20472: zero() noexcept 20472: { return _Rep(0); } 20472: 20472: static constexpr _Rep 20472: max() noexcept 20472: { return numeric_limits<_Rep>::max(); } 20472: 20472: static constexpr _Rep 20472: min() noexcept 20472: { return numeric_limits<_Rep>::lowest(); } 20472: }; 20472: 20472: 20472: 20472: template 20472: struct __is_ratio 20472: : std::false_type 20472: { }; 20472: 20472: template 20472: struct __is_ratio> 20472: : std::true_type 20472: { }; 20472: 20472: 20472: 20472: 20472: template 20472: struct duration 20472: { 20472: private: 20472: template 20472: using __is_float = treat_as_floating_point<_Rep2>; 20472: 20472: 20472: template 20472: using __is_harmonic 20472: = __bool_constant::den == 1>; 20472: 20472: public: 20472: 20472: typedef _Rep rep; 20472: typedef _Period period; 20472: 20472: static_assert(!__is_duration<_Rep>::value, "rep cannot be a duration"); 20472: static_assert(__is_ratio<_Period>::value, 20472: "period must be a specialization of ratio"); 20472: static_assert(_Period::num > 0, "period must be positive"); 20472: 20472: 20472: constexpr duration() = default; 20472: 20472: duration(const duration&) = default; 20472: 20472: 20472: 20472: template, 20472: __or_<__is_float, __not_<__is_float<_Rep2>>>>> 20472: constexpr explicit duration(const _Rep2& __rep) 20472: : __r(static_cast(__rep)) { } 20472: 20472: template, 20472: __and_<__is_harmonic<_Period2>, 20472: __not_<__is_float<_Rep2>>>>>> 20472: constexpr duration(const duration<_Rep2, _Period2>& __d) 20472: : __r(duration_cast(__d).count()) { } 20472: 20472: ~duration() = default; 20472: duration& operator=(const duration&) = default; 20472: 20472: 20472: constexpr rep 20472: count() const 20472: { return __r; } 20472: 20472: 20472: constexpr duration 20472: operator+() const 20472: { return *this; } 20472: 20472: constexpr duration 20472: operator-() const 20472: { return duration(-__r); } 20472: 20472: duration& 20472: operator++() 20472: { 20472: ++__r; 20472: return *this; 20472: } 20472: 20472: duration 20472: operator++(int) 20472: { return duration(__r++); } 20472: 20472: duration& 20472: operator--() 20472: { 20472: --__r; 20472: return *this; 20472: } 20472: 20472: duration 20472: operator--(int) 20472: { return duration(__r--); } 20472: 20472: duration& 20472: operator+=(const duration& __d) 20472: { 20472: __r += __d.count(); 20472: return *this; 20472: } 20472: 20472: duration& 20472: operator-=(const duration& __d) 20472: { 20472: __r -= __d.count(); 20472: return *this; 20472: } 20472: 20472: duration& 20472: operator*=(const rep& __rhs) 20472: { 20472: __r *= __rhs; 20472: return *this; 20472: } 20472: 20472: duration& 20472: operator/=(const rep& __rhs) 20472: { 20472: __r /= __rhs; 20472: return *this; 20472: } 20472: 20472: 20472: template 20472: 20472: typename enable_if::value, 20472: duration&>::type 20472: operator%=(const rep& __rhs) 20472: { 20472: __r %= __rhs; 20472: return *this; 20472: } 20472: 20472: template 20472: 20472: typename enable_if::value, 20472: duration&>::type 20472: operator%=(const duration& __d) 20472: { 20472: __r %= __d.count(); 20472: return *this; 20472: } 20472: 20472: 20472: static constexpr duration 20472: zero() noexcept 20472: { return duration(duration_values::zero()); } 20472: 20472: static constexpr duration 20472: min() noexcept 20472: { return duration(duration_values::min()); } 20472: 20472: static constexpr duration 20472: max() noexcept 20472: { return duration(duration_values::max()); } 20472: 20472: private: 20472: rep __r; 20472: }; 20472: 20472: 20472: 20472: 20472: template 20472: constexpr typename common_type, 20472: duration<_Rep2, _Period2>>::type 20472: operator+(const duration<_Rep1, _Period1>& __lhs, 20472: const duration<_Rep2, _Period2>& __rhs) 20472: { 20472: typedef duration<_Rep1, _Period1> __dur1; 20472: typedef duration<_Rep2, _Period2> __dur2; 20472: typedef typename common_type<__dur1,__dur2>::type __cd; 20472: return __cd(__cd(__lhs).count() + __cd(__rhs).count()); 20472: } 20472: 20472: 20472: template 20472: constexpr typename common_type, 20472: duration<_Rep2, _Period2>>::type 20472: operator-(const duration<_Rep1, _Period1>& __lhs, 20472: const duration<_Rep2, _Period2>& __rhs) 20472: { 20472: typedef duration<_Rep1, _Period1> __dur1; 20472: typedef duration<_Rep2, _Period2> __dur2; 20472: typedef typename common_type<__dur1,__dur2>::type __cd; 20472: return __cd(__cd(__lhs).count() - __cd(__rhs).count()); 20472: } 20472: # 575 "/usr/include/c++/10/chrono" 3 20472: template::type> 20472: using __common_rep_t = typename 20472: enable_if::value, _CRep>::type; 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: constexpr duration<__common_rep_t<_Rep1, _Rep2>, _Period> 20472: operator*(const duration<_Rep1, _Period>& __d, const _Rep2& __s) 20472: { 20472: typedef duration::type, _Period> 20472: __cd; 20472: return __cd(__cd(__d).count() * __s); 20472: } 20472: 20472: 20472: template 20472: constexpr duration<__common_rep_t<_Rep2, _Rep1>, _Period> 20472: operator*(const _Rep1& __s, const duration<_Rep2, _Period>& __d) 20472: { return __d * __s; } 20472: 20472: template 20472: constexpr 20472: duration<__common_rep_t<_Rep1, __disable_if_is_duration<_Rep2>>, _Period> 20472: operator/(const duration<_Rep1, _Period>& __d, const _Rep2& __s) 20472: { 20472: typedef duration::type, _Period> 20472: __cd; 20472: return __cd(__cd(__d).count() / __s); 20472: } 20472: 20472: template 20472: constexpr typename common_type<_Rep1, _Rep2>::type 20472: operator/(const duration<_Rep1, _Period1>& __lhs, 20472: const duration<_Rep2, _Period2>& __rhs) 20472: { 20472: typedef duration<_Rep1, _Period1> __dur1; 20472: typedef duration<_Rep2, _Period2> __dur2; 20472: typedef typename common_type<__dur1,__dur2>::type __cd; 20472: return __cd(__lhs).count() / __cd(__rhs).count(); 20472: } 20472: 20472: 20472: template 20472: constexpr 20472: duration<__common_rep_t<_Rep1, __disable_if_is_duration<_Rep2>>, _Period> 20472: operator%(const duration<_Rep1, _Period>& __d, const _Rep2& __s) 20472: { 20472: typedef duration::type, _Period> 20472: __cd; 20472: return __cd(__cd(__d).count() % __s); 20472: } 20472: 20472: template 20472: constexpr typename common_type, 20472: duration<_Rep2, _Period2>>::type 20472: operator%(const duration<_Rep1, _Period1>& __lhs, 20472: const duration<_Rep2, _Period2>& __rhs) 20472: { 20472: typedef duration<_Rep1, _Period1> __dur1; 20472: typedef duration<_Rep2, _Period2> __dur2; 20472: typedef typename common_type<__dur1,__dur2>::type __cd; 20472: return __cd(__cd(__lhs).count() % __cd(__rhs).count()); 20472: } 20472: 20472: 20472: 20472: template 20472: constexpr bool 20472: operator==(const duration<_Rep1, _Period1>& __lhs, 20472: const duration<_Rep2, _Period2>& __rhs) 20472: { 20472: typedef duration<_Rep1, _Period1> __dur1; 20472: typedef duration<_Rep2, _Period2> __dur2; 20472: typedef typename common_type<__dur1,__dur2>::type __ct; 20472: return __ct(__lhs).count() == __ct(__rhs).count(); 20472: } 20472: 20472: template 20472: constexpr bool 20472: operator<(const duration<_Rep1, _Period1>& __lhs, 20472: const duration<_Rep2, _Period2>& __rhs) 20472: { 20472: typedef duration<_Rep1, _Period1> __dur1; 20472: typedef duration<_Rep2, _Period2> __dur2; 20472: typedef typename common_type<__dur1,__dur2>::type __ct; 20472: return __ct(__lhs).count() < __ct(__rhs).count(); 20472: } 20472: # 685 "/usr/include/c++/10/chrono" 3 20472: template 20472: constexpr bool 20472: operator!=(const duration<_Rep1, _Period1>& __lhs, 20472: const duration<_Rep2, _Period2>& __rhs) 20472: { return !(__lhs == __rhs); } 20472: 20472: 20472: template 20472: constexpr bool 20472: operator<=(const duration<_Rep1, _Period1>& __lhs, 20472: const duration<_Rep2, _Period2>& __rhs) 20472: { return !(__rhs < __lhs); } 20472: 20472: template 20472: constexpr bool 20472: operator>(const duration<_Rep1, _Period1>& __lhs, 20472: const duration<_Rep2, _Period2>& __rhs) 20472: { return __rhs < __lhs; } 20472: 20472: template 20472: constexpr bool 20472: operator>=(const duration<_Rep1, _Period1>& __lhs, 20472: const duration<_Rep2, _Period2>& __rhs) 20472: { return !(__lhs < __rhs); } 20472: # 727 "/usr/include/c++/10/chrono" 3 20472: using nanoseconds = duration; 20472: 20472: 20472: using microseconds = duration; 20472: 20472: 20472: using milliseconds = duration; 20472: 20472: 20472: using seconds = duration; 20472: 20472: 20472: using minutes = duration>; 20472: 20472: 20472: using hours = duration>; 20472: # 761 "/usr/include/c++/10/chrono" 3 20472: template 20472: struct time_point 20472: { 20472: static_assert(__is_duration<_Dur>::value, 20472: "duration must be a specialization of std::chrono::duration"); 20472: 20472: typedef _Clock clock; 20472: typedef _Dur duration; 20472: typedef typename duration::rep rep; 20472: typedef typename duration::period period; 20472: 20472: constexpr time_point() : __d(duration::zero()) 20472: { } 20472: 20472: constexpr explicit time_point(const duration& __dur) 20472: : __d(__dur) 20472: { } 20472: 20472: 20472: template>> 20472: constexpr time_point(const time_point& __t) 20472: : __d(__t.time_since_epoch()) 20472: { } 20472: 20472: 20472: constexpr duration 20472: time_since_epoch() const 20472: { return __d; } 20472: 20472: 20472: time_point& 20472: operator+=(const duration& __dur) 20472: { 20472: __d += __dur; 20472: return *this; 20472: } 20472: 20472: time_point& 20472: operator-=(const duration& __dur) 20472: { 20472: __d -= __dur; 20472: return *this; 20472: } 20472: 20472: 20472: static constexpr time_point 20472: min() noexcept 20472: { return time_point(duration::min()); } 20472: 20472: static constexpr time_point 20472: max() noexcept 20472: { return time_point(duration::max()); } 20472: 20472: private: 20472: duration __d; 20472: }; 20472: 20472: 20472: template 20472: constexpr typename enable_if<__is_duration<_ToDur>::value, 20472: time_point<_Clock, _ToDur>>::type 20472: time_point_cast(const time_point<_Clock, _Dur>& __t) 20472: { 20472: typedef time_point<_Clock, _ToDur> __time_point; 20472: return __time_point(duration_cast<_ToDur>(__t.time_since_epoch())); 20472: } 20472: # 863 "/usr/include/c++/10/chrono" 3 20472: template 20472: constexpr time_point<_Clock, 20472: typename common_type<_Dur1, duration<_Rep2, _Period2>>::type> 20472: operator+(const time_point<_Clock, _Dur1>& __lhs, 20472: const duration<_Rep2, _Period2>& __rhs) 20472: { 20472: typedef duration<_Rep2, _Period2> __dur2; 20472: typedef typename common_type<_Dur1,__dur2>::type __ct; 20472: typedef time_point<_Clock, __ct> __time_point; 20472: return __time_point(__lhs.time_since_epoch() + __rhs); 20472: } 20472: 20472: 20472: template 20472: constexpr time_point<_Clock, 20472: typename common_type, _Dur2>::type> 20472: operator+(const duration<_Rep1, _Period1>& __lhs, 20472: const time_point<_Clock, _Dur2>& __rhs) 20472: { 20472: typedef duration<_Rep1, _Period1> __dur1; 20472: typedef typename common_type<__dur1,_Dur2>::type __ct; 20472: typedef time_point<_Clock, __ct> __time_point; 20472: return __time_point(__rhs.time_since_epoch() + __lhs); 20472: } 20472: 20472: 20472: template 20472: constexpr time_point<_Clock, 20472: typename common_type<_Dur1, duration<_Rep2, _Period2>>::type> 20472: operator-(const time_point<_Clock, _Dur1>& __lhs, 20472: const duration<_Rep2, _Period2>& __rhs) 20472: { 20472: typedef duration<_Rep2, _Period2> __dur2; 20472: typedef typename common_type<_Dur1,__dur2>::type __ct; 20472: typedef time_point<_Clock, __ct> __time_point; 20472: return __time_point(__lhs.time_since_epoch() -__rhs); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: constexpr typename common_type<_Dur1, _Dur2>::type 20472: operator-(const time_point<_Clock, _Dur1>& __lhs, 20472: const time_point<_Clock, _Dur2>& __rhs) 20472: { return __lhs.time_since_epoch() - __rhs.time_since_epoch(); } 20472: 20472: template 20472: constexpr bool 20472: operator==(const time_point<_Clock, _Dur1>& __lhs, 20472: const time_point<_Clock, _Dur2>& __rhs) 20472: { return __lhs.time_since_epoch() == __rhs.time_since_epoch(); } 20472: # 929 "/usr/include/c++/10/chrono" 3 20472: template 20472: constexpr bool 20472: operator!=(const time_point<_Clock, _Dur1>& __lhs, 20472: const time_point<_Clock, _Dur2>& __rhs) 20472: { return !(__lhs == __rhs); } 20472: 20472: 20472: template 20472: constexpr bool 20472: operator<(const time_point<_Clock, _Dur1>& __lhs, 20472: const time_point<_Clock, _Dur2>& __rhs) 20472: { return __lhs.time_since_epoch() < __rhs.time_since_epoch(); } 20472: 20472: template 20472: constexpr bool 20472: operator<=(const time_point<_Clock, _Dur1>& __lhs, 20472: const time_point<_Clock, _Dur2>& __rhs) 20472: { return !(__rhs < __lhs); } 20472: 20472: template 20472: constexpr bool 20472: operator>(const time_point<_Clock, _Dur1>& __lhs, 20472: const time_point<_Clock, _Dur2>& __rhs) 20472: { return __rhs < __lhs; } 20472: 20472: template 20472: constexpr bool 20472: operator>=(const time_point<_Clock, _Dur1>& __lhs, 20472: const time_point<_Clock, _Dur2>& __rhs) 20472: { return !(__lhs < __rhs); } 20472: # 980 "/usr/include/c++/10/chrono" 3 20472: inline namespace _V2 { 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: struct system_clock 20472: { 20472: typedef chrono::nanoseconds duration; 20472: typedef duration::rep rep; 20472: typedef duration::period period; 20472: typedef chrono::time_point time_point; 20472: 20472: static_assert(system_clock::duration::min() 20472: < system_clock::duration::zero(), 20472: "a clock's minimum duration cannot be less than its epoch"); 20472: 20472: static constexpr bool is_steady = false; 20472: 20472: static time_point 20472: now() noexcept; 20472: 20472: 20472: static std::time_t 20472: to_time_t(const time_point& __t) noexcept 20472: { 20472: return std::time_t(duration_cast 20472: (__t.time_since_epoch()).count()); 20472: } 20472: 20472: static time_point 20472: from_time_t(std::time_t __t) noexcept 20472: { 20472: typedef chrono::time_point __from; 20472: return time_point_cast 20472: (__from(chrono::seconds(__t))); 20472: } 20472: }; 20472: # 1028 "/usr/include/c++/10/chrono" 3 20472: struct steady_clock 20472: { 20472: typedef chrono::nanoseconds duration; 20472: typedef duration::rep rep; 20472: typedef duration::period period; 20472: typedef chrono::time_point time_point; 20472: 20472: static constexpr bool is_steady = true; 20472: 20472: static time_point 20472: now() noexcept; 20472: }; 20472: # 1050 "/usr/include/c++/10/chrono" 3 20472: using high_resolution_clock = system_clock; 20472: 20472: } 20472: # 1081 "/usr/include/c++/10/chrono" 3 20472: } 20472: # 1266 "/usr/include/c++/10/chrono" 3 20472: 20472: } 20472: # 10 "./include/rocksdb/listener.h" 2 20472: 20472: 20472: 20472: 20472: # 1 "./include/rocksdb/compaction_job_stats.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/10/include/stddef.h" 1 3 4 20472: # 8 "./include/rocksdb/compaction_job_stats.h" 2 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 13 "./include/rocksdb/compaction_job_stats.h" 20472: namespace rocksdb { 20472: struct CompactionJobStats { 20472: CompactionJobStats() { Reset(); } 20472: void Reset(); 20472: 20472: void Add(const CompactionJobStats& stats); 20472: 20472: 20472: uint64_t elapsed_micros; 20472: 20472: 20472: uint64_t cpu_micros; 20472: 20472: 20472: uint64_t num_input_records; 20472: 20472: size_t num_input_files; 20472: 20472: size_t num_input_files_at_output_level; 20472: 20472: 20472: uint64_t num_output_records; 20472: 20472: size_t num_output_files; 20472: 20472: 20472: bool is_manual_compaction; 20472: 20472: 20472: uint64_t total_input_bytes; 20472: 20472: uint64_t total_output_bytes; 20472: 20472: 20472: 20472: 20472: uint64_t num_records_replaced; 20472: 20472: 20472: uint64_t total_input_raw_key_bytes; 20472: 20472: uint64_t total_input_raw_value_bytes; 20472: 20472: 20472: 20472: uint64_t num_input_deletion_records; 20472: 20472: 20472: 20472: uint64_t num_expired_deletion_records; 20472: 20472: 20472: 20472: uint64_t num_corrupt_keys; 20472: 20472: 20472: 20472: 20472: 20472: uint64_t file_write_nanos; 20472: 20472: 20472: uint64_t file_range_sync_nanos; 20472: 20472: 20472: uint64_t file_fsync_nanos; 20472: 20472: 20472: uint64_t file_prepare_write_nanos; 20472: 20472: 20472: 20472: static const size_t kMaxPrefixLength = 8; 20472: 20472: std::string smallest_output_key_prefix; 20472: std::string largest_output_key_prefix; 20472: 20472: 20472: uint64_t num_single_del_fallthru; 20472: 20472: 20472: uint64_t num_single_del_mismatch; 20472: }; 20472: } 20472: # 15 "./include/rocksdb/listener.h" 2 20472: 20472: # 1 "./include/rocksdb/table_properties.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "./include/rocksdb/types.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: namespace rocksdb { 20472: 20472: 20472: 20472: 20472: typedef uint64_t SequenceNumber; 20472: 20472: const SequenceNumber kMinUnCommittedSeq = 1; 20472: 20472: 20472: enum EntryType { 20472: kEntryPut, 20472: kEntryDelete, 20472: kEntrySingleDelete, 20472: kEntryMerge, 20472: kEntryRangeDeletion, 20472: kEntryBlobIndex, 20472: kEntryOther, 20472: }; 20472: 20472: 20472: struct FullKey { 20472: Slice user_key; 20472: SequenceNumber sequence; 20472: EntryType type; 20472: 20472: FullKey() : sequence(0) {} 20472: FullKey(const Slice& u, const SequenceNumber& seq, EntryType t) 20472: : user_key(u), sequence(seq), type(t) {} 20472: std::string DebugString(bool hex = false) const; 20472: 20472: void clear() { 20472: user_key.clear(); 20472: sequence = 0; 20472: type = EntryType::kEntryPut; 20472: } 20472: }; 20472: 20472: 20472: 20472: 20472: bool ParseFullKey(const Slice& internal_key, FullKey* result); 20472: 20472: } 20472: # 12 "./include/rocksdb/table_properties.h" 2 20472: 20472: namespace rocksdb { 20472: # 29 "./include/rocksdb/table_properties.h" 20472: typedef std::map UserCollectedProperties; 20472: 20472: 20472: struct TablePropertiesNames { 20472: static const std::string kDataSize; 20472: static const std::string kIndexSize; 20472: static const std::string kIndexPartitions; 20472: static const std::string kTopLevelIndexSize; 20472: static const std::string kIndexKeyIsUserKey; 20472: static const std::string kIndexValueIsDeltaEncoded; 20472: static const std::string kFilterSize; 20472: static const std::string kRawKeySize; 20472: static const std::string kRawValueSize; 20472: static const std::string kNumDataBlocks; 20472: static const std::string kNumEntries; 20472: static const std::string kDeletedKeys; 20472: static const std::string kMergeOperands; 20472: static const std::string kNumRangeDeletions; 20472: static const std::string kFormatVersion; 20472: static const std::string kFixedKeyLen; 20472: static const std::string kFilterPolicy; 20472: static const std::string kColumnFamilyName; 20472: static const std::string kColumnFamilyId; 20472: static const std::string kComparator; 20472: static const std::string kMergeOperator; 20472: static const std::string kPrefixExtractorName; 20472: static const std::string kPropertyCollectors; 20472: static const std::string kCompression; 20472: static const std::string kCompressionOptions; 20472: static const std::string kCreationTime; 20472: static const std::string kOldestKeyTime; 20472: static const std::string kFileCreationTime; 20472: }; 20472: 20472: extern const std::string kPropertiesBlock; 20472: extern const std::string kCompressionDictBlock; 20472: extern const std::string kRangeDelBlock; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: class TablePropertiesCollector { 20472: public: 20472: virtual ~TablePropertiesCollector() {} 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual Status Add(const Slice& , const Slice& ) { 20472: return Status::InvalidArgument( 20472: "TablePropertiesCollector::Add() deprecated."); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: virtual Status AddUserKey(const Slice& key, const Slice& value, 20472: EntryType , SequenceNumber , 20472: uint64_t ) { 20472: 20472: return Add(key, value); 20472: } 20472: 20472: 20472: virtual void BlockAdd(uint64_t , 20472: uint64_t , 20472: uint64_t ) { 20472: 20472: return; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: virtual Status Finish(UserCollectedProperties* properties) = 0; 20472: 20472: 20472: 20472: virtual UserCollectedProperties GetReadableProperties() const = 0; 20472: 20472: 20472: virtual const char* Name() const = 0; 20472: 20472: 20472: virtual bool NeedCompact() const { return false; } 20472: }; 20472: 20472: 20472: 20472: class TablePropertiesCollectorFactory { 20472: public: 20472: struct Context { 20472: uint32_t column_family_id; 20472: static const uint32_t kUnknownColumnFamily; 20472: }; 20472: 20472: virtual ~TablePropertiesCollectorFactory() {} 20472: 20472: virtual TablePropertiesCollector* CreateTablePropertiesCollector( 20472: TablePropertiesCollectorFactory::Context context) = 0; 20472: 20472: 20472: virtual const char* Name() const = 0; 20472: 20472: 20472: 20472: 20472: virtual std::string ToString() const { return Name(); } 20472: }; 20472: 20472: 20472: 20472: struct TableProperties { 20472: public: 20472: 20472: uint64_t data_size = 0; 20472: 20472: uint64_t index_size = 0; 20472: 20472: uint64_t index_partitions = 0; 20472: 20472: uint64_t top_level_index_size = 0; 20472: 20472: 20472: uint64_t index_key_is_user_key = 0; 20472: 20472: uint64_t index_value_is_delta_encoded = 0; 20472: 20472: uint64_t filter_size = 0; 20472: 20472: uint64_t raw_key_size = 0; 20472: 20472: uint64_t raw_value_size = 0; 20472: 20472: uint64_t num_data_blocks = 0; 20472: 20472: uint64_t num_entries = 0; 20472: 20472: uint64_t num_deletions = 0; 20472: 20472: uint64_t num_merge_operands = 0; 20472: 20472: uint64_t num_range_deletions = 0; 20472: 20472: uint64_t format_version = 0; 20472: 20472: uint64_t fixed_key_len = 0; 20472: 20472: 20472: uint64_t column_family_id = rocksdb:: 20472: TablePropertiesCollectorFactory::Context::kUnknownColumnFamily; 20472: 20472: 20472: 20472: uint64_t creation_time = 0; 20472: 20472: uint64_t oldest_key_time = 0; 20472: 20472: uint64_t file_creation_time = 0; 20472: 20472: 20472: 20472: std::string column_family_name; 20472: 20472: 20472: 20472: std::string filter_policy_name; 20472: 20472: 20472: std::string comparator_name; 20472: 20472: 20472: 20472: std::string merge_operator_name; 20472: 20472: 20472: 20472: std::string prefix_extractor_name; 20472: 20472: 20472: 20472: 20472: std::string property_collectors_names; 20472: 20472: 20472: std::string compression_name; 20472: 20472: 20472: std::string compression_options; 20472: 20472: 20472: UserCollectedProperties user_collected_properties; 20472: UserCollectedProperties readable_properties; 20472: 20472: 20472: std::map properties_offsets; 20472: 20472: 20472: 20472: std::string ToString(const std::string& prop_delim = "; ", 20472: const std::string& kv_delim = "=") const; 20472: 20472: 20472: 20472: void Add(const TableProperties& tp); 20472: }; 20472: # 251 "./include/rocksdb/table_properties.h" 20472: extern uint64_t GetDeletedKeys(const UserCollectedProperties& props); 20472: extern uint64_t GetMergeOperands(const UserCollectedProperties& props, 20472: bool* property_present); 20472: 20472: } 20472: # 17 "./include/rocksdb/listener.h" 2 20472: 20472: namespace rocksdb { 20472: 20472: typedef std::unordered_map> 20472: TablePropertiesCollection; 20472: 20472: class DB; 20472: class ColumnFamilyHandle; 20472: class Status; 20472: struct CompactionJobStats; 20472: enum CompressionType : unsigned char; 20472: 20472: enum class TableFileCreationReason { 20472: kFlush, 20472: kCompaction, 20472: kRecovery, 20472: kMisc, 20472: }; 20472: 20472: struct TableFileCreationBriefInfo { 20472: 20472: std::string db_name; 20472: 20472: std::string cf_name; 20472: 20472: std::string file_path; 20472: 20472: 20472: int job_id; 20472: 20472: TableFileCreationReason reason; 20472: }; 20472: 20472: struct TableFileCreationInfo : public TableFileCreationBriefInfo { 20472: TableFileCreationInfo() = default; 20472: explicit TableFileCreationInfo(TableProperties&& prop) 20472: : table_properties(prop) {} 20472: 20472: uint64_t file_size; 20472: 20472: TableProperties table_properties; 20472: 20472: Status status; 20472: }; 20472: 20472: enum class CompactionReason : int { 20472: kUnknown = 0, 20472: 20472: kLevelL0FilesNum, 20472: 20472: kLevelMaxLevelSize, 20472: 20472: kUniversalSizeAmplification, 20472: 20472: kUniversalSizeRatio, 20472: 20472: kUniversalSortedRunNum, 20472: 20472: kFIFOMaxSize, 20472: 20472: kFIFOReduceNumFiles, 20472: 20472: kFIFOTtl, 20472: 20472: kManualCompaction, 20472: 20472: kFilesMarkedForCompaction, 20472: 20472: 20472: kBottommostFiles, 20472: 20472: kTtl, 20472: 20472: 20472: kFlush, 20472: 20472: kExternalSstIngestion, 20472: 20472: kPeriodicCompaction, 20472: 20472: kNumOfReasons, 20472: }; 20472: 20472: enum class FlushReason : int { 20472: kOthers = 0x00, 20472: kGetLiveFiles = 0x01, 20472: kShutDown = 0x02, 20472: kExternalFileIngestion = 0x03, 20472: kManualCompaction = 0x04, 20472: kWriteBufferManager = 0x05, 20472: kWriteBufferFull = 0x06, 20472: kTest = 0x07, 20472: kDeleteFiles = 0x08, 20472: kAutoCompaction = 0x09, 20472: kManualFlush = 0x0a, 20472: kErrorRecovery = 0xb, 20472: }; 20472: 20472: enum class BackgroundErrorReason { 20472: kFlush, 20472: kCompaction, 20472: kWriteCallback, 20472: kMemTable, 20472: kManifestWrite, 20472: }; 20472: 20472: enum class WriteStallCondition { 20472: kNormal, 20472: kDelayed, 20472: kStopped, 20472: }; 20472: 20472: struct WriteStallInfo { 20472: 20472: std::string cf_name; 20472: 20472: struct { 20472: WriteStallCondition cur; 20472: WriteStallCondition prev; 20472: } condition; 20472: }; 20472: 20472: 20472: 20472: struct TableFileDeletionInfo { 20472: 20472: std::string db_name; 20472: 20472: std::string file_path; 20472: 20472: int job_id; 20472: 20472: Status status; 20472: }; 20472: 20472: struct FileOperationInfo { 20472: using TimePoint = std::chrono::time_point; 20472: 20472: const std::string& path; 20472: uint64_t offset; 20472: size_t length; 20472: const TimePoint& start_timestamp; 20472: const TimePoint& finish_timestamp; 20472: Status status; 20472: FileOperationInfo(const std::string& _path, const TimePoint& start, 20472: const TimePoint& finish) 20472: : path(_path), start_timestamp(start), finish_timestamp(finish) {} 20472: }; 20472: 20472: struct FlushJobInfo { 20472: 20472: uint32_t cf_id; 20472: 20472: std::string cf_name; 20472: 20472: std::string file_path; 20472: 20472: uint64_t file_number; 20472: 20472: uint64_t oldest_blob_file_number; 20472: 20472: uint64_t thread_id; 20472: 20472: int job_id; 20472: 20472: 20472: 20472: 20472: bool triggered_writes_slowdown; 20472: 20472: 20472: 20472: 20472: bool triggered_writes_stop; 20472: 20472: SequenceNumber smallest_seqno; 20472: 20472: SequenceNumber largest_seqno; 20472: 20472: TableProperties table_properties; 20472: 20472: FlushReason flush_reason; 20472: }; 20472: 20472: struct CompactionFileInfo { 20472: 20472: int level; 20472: 20472: 20472: uint64_t file_number; 20472: 20472: 20472: uint64_t oldest_blob_file_number; 20472: }; 20472: 20472: struct CompactionJobInfo { 20472: 20472: uint32_t cf_id; 20472: 20472: std::string cf_name; 20472: 20472: Status status; 20472: 20472: uint64_t thread_id; 20472: 20472: int job_id; 20472: 20472: int base_input_level; 20472: 20472: int output_level; 20472: # 236 "./include/rocksdb/listener.h" 20472: std::vector input_files; 20472: 20472: 20472: std::vector input_file_infos; 20472: 20472: 20472: std::vector output_files; 20472: 20472: 20472: std::vector output_file_infos; 20472: 20472: 20472: 20472: TablePropertiesCollection table_properties; 20472: 20472: 20472: CompactionReason compaction_reason; 20472: 20472: 20472: CompressionType compression; 20472: 20472: 20472: 20472: CompactionJobStats stats; 20472: }; 20472: 20472: struct MemTableInfo { 20472: 20472: std::string cf_name; 20472: 20472: 20472: SequenceNumber first_seqno; 20472: 20472: 20472: 20472: 20472: SequenceNumber earliest_seqno; 20472: 20472: uint64_t num_entries; 20472: 20472: uint64_t num_deletes; 20472: }; 20472: 20472: struct ExternalFileIngestionInfo { 20472: 20472: std::string cf_name; 20472: 20472: std::string external_file_path; 20472: 20472: std::string internal_file_path; 20472: 20472: SequenceNumber global_seqno; 20472: 20472: TableProperties table_properties; 20472: }; 20472: # 314 "./include/rocksdb/listener.h" 20472: class EventListener { 20472: public: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual void OnFlushCompleted(DB* , 20472: const FlushJobInfo& ) {} 20472: # 333 "./include/rocksdb/listener.h" 20472: virtual void OnFlushBegin(DB* , 20472: const FlushJobInfo& ) {} 20472: # 347 "./include/rocksdb/listener.h" 20472: virtual void OnTableFileDeleted(const TableFileDeletionInfo& ) {} 20472: # 356 "./include/rocksdb/listener.h" 20472: virtual void OnCompactionBegin(DB* , const CompactionJobInfo& ) {} 20472: # 371 "./include/rocksdb/listener.h" 20472: virtual void OnCompactionCompleted(DB* , 20472: const CompactionJobInfo& ) {} 20472: # 389 "./include/rocksdb/listener.h" 20472: virtual void OnTableFileCreated(const TableFileCreationInfo& ) {} 20472: # 398 "./include/rocksdb/listener.h" 20472: virtual void OnTableFileCreationStarted( 20472: const TableFileCreationBriefInfo& ) {} 20472: # 411 "./include/rocksdb/listener.h" 20472: virtual void OnMemTableSealed(const MemTableInfo& ) {} 20472: # 421 "./include/rocksdb/listener.h" 20472: virtual void OnColumnFamilyHandleDeletionStarted( 20472: ColumnFamilyHandle* ) {} 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual void OnExternalFileIngested( 20472: DB* , const ExternalFileIngestionInfo& ) {} 20472: # 444 "./include/rocksdb/listener.h" 20472: virtual void OnBackgroundError(BackgroundErrorReason , 20472: Status* ) {} 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual void OnStallConditionsChanged(const WriteStallInfo& ) {} 20472: 20472: 20472: 20472: virtual void OnFileReadFinish(const FileOperationInfo& ) {} 20472: 20472: 20472: 20472: virtual void OnFileWriteFinish(const FileOperationInfo& ) {} 20472: 20472: 20472: 20472: virtual bool ShouldBeNotifiedOnFileIO() { return false; } 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual void OnErrorRecoveryBegin(BackgroundErrorReason , 20472: Status , 20472: bool* ) {} 20472: 20472: 20472: 20472: 20472: 20472: virtual void OnErrorRecoveryCompleted(Status ) {} 20472: 20472: virtual ~EventListener() {} 20472: }; 20472: # 492 "./include/rocksdb/listener.h" 20472: } 20472: # 20 "./include/rocksdb/db.h" 2 20472: # 1 "./include/rocksdb/metadata.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 16 "./include/rocksdb/metadata.h" 20472: namespace rocksdb { 20472: struct ColumnFamilyMetaData; 20472: struct LevelMetaData; 20472: struct SstFileMetaData; 20472: 20472: 20472: struct ColumnFamilyMetaData { 20472: ColumnFamilyMetaData() : size(0), file_count(0), name("") {} 20472: ColumnFamilyMetaData(const std::string& _name, uint64_t _size, 20472: const std::vector&& _levels) 20472: : size(_size), name(_name), levels(_levels) {} 20472: 20472: 20472: 20472: uint64_t size; 20472: 20472: size_t file_count; 20472: 20472: std::string name; 20472: 20472: std::vector levels; 20472: }; 20472: 20472: 20472: struct LevelMetaData { 20472: LevelMetaData(int _level, uint64_t _size, 20472: const std::vector&& _files) 20472: : level(_level), size(_size), files(_files) {} 20472: 20472: 20472: const int level; 20472: 20472: 20472: const uint64_t size; 20472: 20472: const std::vector files; 20472: }; 20472: 20472: 20472: struct SstFileMetaData { 20472: SstFileMetaData() 20472: : size(0), 20472: file_number(0), 20472: smallest_seqno(0), 20472: largest_seqno(0), 20472: num_reads_sampled(0), 20472: being_compacted(false), 20472: num_entries(0), 20472: num_deletions(0), 20472: oldest_blob_file_number(0) {} 20472: 20472: SstFileMetaData(const std::string& _file_name, uint64_t _file_number, 20472: const std::string& _path, size_t _size, 20472: SequenceNumber _smallest_seqno, SequenceNumber _largest_seqno, 20472: const std::string& _smallestkey, 20472: const std::string& _largestkey, uint64_t _num_reads_sampled, 20472: bool _being_compacted, uint64_t _oldest_blob_file_number, 20472: uint64_t _oldest_ancester_time, uint64_t _file_creation_time, 20472: std::string& _file_checksum, 20472: std::string& _file_checksum_func_name) 20472: : size(_size), 20472: name(_file_name), 20472: file_number(_file_number), 20472: db_path(_path), 20472: smallest_seqno(_smallest_seqno), 20472: largest_seqno(_largest_seqno), 20472: smallestkey(_smallestkey), 20472: largestkey(_largestkey), 20472: num_reads_sampled(_num_reads_sampled), 20472: being_compacted(_being_compacted), 20472: num_entries(0), 20472: num_deletions(0), 20472: oldest_blob_file_number(_oldest_blob_file_number), 20472: oldest_ancester_time(_oldest_ancester_time), 20472: file_creation_time(_file_creation_time), 20472: file_checksum(_file_checksum), 20472: file_checksum_func_name(_file_checksum_func_name) {} 20472: 20472: 20472: size_t size; 20472: 20472: std::string name; 20472: 20472: uint64_t file_number; 20472: 20472: std::string db_path; 20472: 20472: SequenceNumber smallest_seqno; 20472: SequenceNumber largest_seqno; 20472: std::string smallestkey; 20472: std::string largestkey; 20472: uint64_t num_reads_sampled; 20472: bool being_compacted; 20472: 20472: uint64_t num_entries; 20472: uint64_t num_deletions; 20472: 20472: uint64_t oldest_blob_file_number; 20472: 20472: 20472: 20472: 20472: 20472: 20472: uint64_t oldest_ancester_time; 20472: 20472: 20472: uint64_t file_creation_time; 20472: 20472: 20472: 20472: 20472: 20472: std::string file_checksum; 20472: 20472: 20472: 20472: 20472: 20472: std::string file_checksum_func_name; 20472: }; 20472: 20472: 20472: struct LiveFileMetaData : SstFileMetaData { 20472: std::string column_family_name; 20472: int level; 20472: LiveFileMetaData() : column_family_name(), level(0) {} 20472: }; 20472: 20472: 20472: 20472: struct ExportImportFilesMetaData { 20472: std::string db_comparator_name; 20472: std::vector files; 20472: }; 20472: } 20472: # 21 "./include/rocksdb/db.h" 2 20472: # 1 "./include/rocksdb/options.h" 1 20472: # 9 "./include/rocksdb/options.h" 20472: 20472: 20472: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/10/include/stddef.h" 1 3 4 20472: # 12 "./include/rocksdb/options.h" 2 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "./include/rocksdb/advanced_options.h" 1 20472: # 9 "./include/rocksdb/advanced_options.h" 20472: 20472: 20472: 20472: 20472: # 1 "./include/rocksdb/memtablerep.h" 1 20472: # 36 "./include/rocksdb/memtablerep.h" 20472: 20472: 20472: 20472: 20472: # 1 "/usr/include/c++/10/stdlib.h" 1 3 20472: # 36 "/usr/include/c++/10/stdlib.h" 3 20472: # 1 "/usr/include/c++/10/cstdlib" 1 3 20472: # 39 "/usr/include/c++/10/cstdlib" 3 20472: 20472: # 40 "/usr/include/c++/10/cstdlib" 3 20472: # 37 "/usr/include/c++/10/stdlib.h" 2 3 20472: 20472: 20472: # 38 "/usr/include/c++/10/stdlib.h" 3 20472: using std::abort; 20472: using std::atexit; 20472: using std::exit; 20472: 20472: 20472: using std::at_quick_exit; 20472: 20472: 20472: using std::quick_exit; 20472: 20472: 20472: 20472: 20472: using std::div_t; 20472: using std::ldiv_t; 20472: 20472: using std::abs; 20472: using std::atof; 20472: using std::atoi; 20472: using std::atol; 20472: using std::bsearch; 20472: using std::calloc; 20472: using std::div; 20472: using std::free; 20472: using std::getenv; 20472: using std::labs; 20472: using std::ldiv; 20472: using std::malloc; 20472: 20472: using std::mblen; 20472: using std::mbstowcs; 20472: using std::mbtowc; 20472: 20472: using std::qsort; 20472: using std::rand; 20472: using std::realloc; 20472: using std::srand; 20472: using std::strtod; 20472: using std::strtol; 20472: using std::strtoul; 20472: using std::system; 20472: 20472: using std::wcstombs; 20472: using std::wctomb; 20472: # 41 "./include/rocksdb/memtablerep.h" 2 20472: 20472: # 1 "/usr/include/c++/10/stdexcept" 1 3 20472: # 36 "/usr/include/c++/10/stdexcept" 3 20472: 20472: # 37 "/usr/include/c++/10/stdexcept" 3 20472: 20472: 20472: 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: struct __cow_string 20472: { 20472: union { 20472: const char* _M_p; 20472: char _M_bytes[sizeof(const char*)]; 20472: }; 20472: 20472: __cow_string(); 20472: __cow_string(const std::string&); 20472: __cow_string(const char*, size_t); 20472: __cow_string(const __cow_string&) noexcept; 20472: __cow_string& operator=(const __cow_string&) noexcept; 20472: ~__cow_string(); 20472: 20472: __cow_string(__cow_string&&) noexcept; 20472: __cow_string& operator=(__cow_string&&) noexcept; 20472: 20472: }; 20472: 20472: typedef basic_string __sso_string; 20472: # 113 "/usr/include/c++/10/stdexcept" 3 20472: class logic_error : public exception 20472: { 20472: __cow_string _M_msg; 20472: 20472: public: 20472: 20472: explicit 20472: logic_error(const string& __arg) ; 20472: 20472: 20472: explicit 20472: logic_error(const char*) ; 20472: 20472: logic_error(logic_error&&) noexcept; 20472: logic_error& operator=(logic_error&&) noexcept; 20472: 20472: 20472: 20472: logic_error(const logic_error&) noexcept; 20472: logic_error& operator=(const logic_error&) noexcept; 20472: 20472: 20472: 20472: 20472: 20472: virtual ~logic_error() noexcept; 20472: 20472: 20472: 20472: virtual const char* 20472: what() const noexcept; 20472: 20472: 20472: 20472: 20472: 20472: }; 20472: 20472: 20472: 20472: class domain_error : public logic_error 20472: { 20472: public: 20472: explicit domain_error(const string& __arg) ; 20472: 20472: explicit domain_error(const char*) ; 20472: domain_error(const domain_error&) = default; 20472: domain_error& operator=(const domain_error&) = default; 20472: domain_error(domain_error&&) = default; 20472: domain_error& operator=(domain_error&&) = default; 20472: 20472: virtual ~domain_error() noexcept; 20472: }; 20472: 20472: 20472: class invalid_argument : public logic_error 20472: { 20472: public: 20472: explicit invalid_argument(const string& __arg) ; 20472: 20472: explicit invalid_argument(const char*) ; 20472: invalid_argument(const invalid_argument&) = default; 20472: invalid_argument& operator=(const invalid_argument&) = default; 20472: invalid_argument(invalid_argument&&) = default; 20472: invalid_argument& operator=(invalid_argument&&) = default; 20472: 20472: virtual ~invalid_argument() noexcept; 20472: }; 20472: 20472: 20472: 20472: class length_error : public logic_error 20472: { 20472: public: 20472: explicit length_error(const string& __arg) ; 20472: 20472: explicit length_error(const char*) ; 20472: length_error(const length_error&) = default; 20472: length_error& operator=(const length_error&) = default; 20472: length_error(length_error&&) = default; 20472: length_error& operator=(length_error&&) = default; 20472: 20472: virtual ~length_error() noexcept; 20472: }; 20472: 20472: 20472: 20472: class out_of_range : public logic_error 20472: { 20472: public: 20472: explicit out_of_range(const string& __arg) ; 20472: 20472: explicit out_of_range(const char*) ; 20472: out_of_range(const out_of_range&) = default; 20472: out_of_range& operator=(const out_of_range&) = default; 20472: out_of_range(out_of_range&&) = default; 20472: out_of_range& operator=(out_of_range&&) = default; 20472: 20472: virtual ~out_of_range() noexcept; 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: class runtime_error : public exception 20472: { 20472: __cow_string _M_msg; 20472: 20472: public: 20472: 20472: explicit 20472: runtime_error(const string& __arg) ; 20472: 20472: 20472: explicit 20472: runtime_error(const char*) ; 20472: 20472: runtime_error(runtime_error&&) noexcept; 20472: runtime_error& operator=(runtime_error&&) noexcept; 20472: 20472: 20472: 20472: runtime_error(const runtime_error&) noexcept; 20472: runtime_error& operator=(const runtime_error&) noexcept; 20472: 20472: 20472: 20472: 20472: 20472: virtual ~runtime_error() noexcept; 20472: 20472: 20472: 20472: virtual const char* 20472: what() const noexcept; 20472: 20472: 20472: 20472: 20472: 20472: }; 20472: 20472: 20472: class range_error : public runtime_error 20472: { 20472: public: 20472: explicit range_error(const string& __arg) ; 20472: 20472: explicit range_error(const char*) ; 20472: range_error(const range_error&) = default; 20472: range_error& operator=(const range_error&) = default; 20472: range_error(range_error&&) = default; 20472: range_error& operator=(range_error&&) = default; 20472: 20472: virtual ~range_error() noexcept; 20472: }; 20472: 20472: 20472: class overflow_error : public runtime_error 20472: { 20472: public: 20472: explicit overflow_error(const string& __arg) ; 20472: 20472: explicit overflow_error(const char*) ; 20472: overflow_error(const overflow_error&) = default; 20472: overflow_error& operator=(const overflow_error&) = default; 20472: overflow_error(overflow_error&&) = default; 20472: overflow_error& operator=(overflow_error&&) = default; 20472: 20472: virtual ~overflow_error() noexcept; 20472: }; 20472: 20472: 20472: class underflow_error : public runtime_error 20472: { 20472: public: 20472: explicit underflow_error(const string& __arg) ; 20472: 20472: explicit underflow_error(const char*) ; 20472: underflow_error(const underflow_error&) = default; 20472: underflow_error& operator=(const underflow_error&) = default; 20472: underflow_error(underflow_error&&) = default; 20472: underflow_error& operator=(underflow_error&&) = default; 20472: 20472: virtual ~underflow_error() noexcept; 20472: }; 20472: 20472: 20472: 20472: 20472: } 20472: # 43 "./include/rocksdb/memtablerep.h" 2 20472: 20472: 20472: # 44 "./include/rocksdb/memtablerep.h" 20472: namespace rocksdb { 20472: 20472: class Arena; 20472: class Allocator; 20472: class LookupKey; 20472: class SliceTransform; 20472: class Logger; 20472: 20472: typedef void* KeyHandle; 20472: 20472: extern Slice GetLengthPrefixedSlice(const char* data); 20472: 20472: class MemTableRep { 20472: public: 20472: 20472: 20472: class KeyComparator { 20472: public: 20472: typedef rocksdb::Slice DecodedType; 20472: 20472: virtual DecodedType decode_key(const char* key) const { 20472: 20472: 20472: return GetLengthPrefixedSlice(key); 20472: } 20472: 20472: 20472: 20472: virtual int operator()(const char* prefix_len_key1, 20472: const char* prefix_len_key2) const = 0; 20472: 20472: virtual int operator()(const char* prefix_len_key, 20472: const Slice& key) const = 0; 20472: 20472: virtual ~KeyComparator() {} 20472: }; 20472: 20472: explicit MemTableRep(Allocator* allocator) : allocator_(allocator) {} 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual KeyHandle Allocate(const size_t len, char** buf); 20472: 20472: 20472: 20472: 20472: 20472: virtual void Insert(KeyHandle handle) = 0; 20472: 20472: 20472: 20472: 20472: virtual bool InsertKey(KeyHandle handle) { 20472: Insert(handle); 20472: return true; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual void InsertWithHint(KeyHandle handle, void** ) { 20472: 20472: Insert(handle); 20472: } 20472: 20472: 20472: 20472: 20472: virtual bool InsertKeyWithHint(KeyHandle handle, void** hint) { 20472: InsertWithHint(handle, hint); 20472: return true; 20472: } 20472: # 132 "./include/rocksdb/memtablerep.h" 20472: virtual void InsertWithHintConcurrently(KeyHandle handle, void** ) { 20472: 20472: InsertConcurrently(handle); 20472: } 20472: 20472: 20472: 20472: 20472: virtual bool InsertKeyWithHintConcurrently(KeyHandle handle, void** hint) { 20472: InsertWithHintConcurrently(handle, hint); 20472: return true; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual void InsertConcurrently(KeyHandle handle); 20472: 20472: 20472: 20472: 20472: virtual bool InsertKeyConcurrently(KeyHandle handle) { 20472: InsertConcurrently(handle); 20472: return true; 20472: } 20472: 20472: 20472: virtual bool Contains(const char* key) const = 0; 20472: 20472: 20472: 20472: 20472: 20472: virtual void MarkReadOnly() {} 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual void MarkFlushed() {} 20472: # 189 "./include/rocksdb/memtablerep.h" 20472: virtual void Get(const LookupKey& k, void* callback_args, 20472: bool (*callback_func)(void* arg, const char* entry)); 20472: 20472: virtual uint64_t ApproximateNumEntries(const Slice& , 20472: const Slice& ) { 20472: return 0; 20472: } 20472: 20472: 20472: 20472: virtual size_t ApproximateMemoryUsage() = 0; 20472: 20472: virtual ~MemTableRep() {} 20472: 20472: 20472: class Iterator { 20472: public: 20472: 20472: 20472: 20472: virtual ~Iterator() {} 20472: 20472: 20472: virtual bool Valid() const = 0; 20472: 20472: 20472: 20472: virtual const char* key() const = 0; 20472: 20472: 20472: 20472: virtual void Next() = 0; 20472: 20472: 20472: 20472: virtual void Prev() = 0; 20472: 20472: 20472: virtual void Seek(const Slice& internal_key, const char* memtable_key) = 0; 20472: 20472: 20472: virtual void SeekForPrev(const Slice& internal_key, 20472: const char* memtable_key) = 0; 20472: 20472: 20472: 20472: virtual void SeekToFirst() = 0; 20472: 20472: 20472: 20472: virtual void SeekToLast() = 0; 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual Iterator* GetIterator(Arena* arena = nullptr) = 0; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual Iterator* GetDynamicPrefixIterator(Arena* arena = nullptr) { 20472: return GetIterator(arena); 20472: } 20472: 20472: 20472: 20472: virtual bool IsMergeOperatorSupported() const { return true; } 20472: 20472: 20472: 20472: virtual bool IsSnapshotSupported() const { return true; } 20472: 20472: protected: 20472: 20472: 20472: virtual Slice UserKey(const char* key) const; 20472: 20472: Allocator* allocator_; 20472: }; 20472: 20472: 20472: 20472: class MemTableRepFactory { 20472: public: 20472: virtual ~MemTableRepFactory() {} 20472: 20472: virtual MemTableRep* CreateMemTableRep(const MemTableRep::KeyComparator&, 20472: Allocator*, const SliceTransform*, 20472: Logger* logger) = 0; 20472: virtual MemTableRep* CreateMemTableRep( 20472: const MemTableRep::KeyComparator& key_cmp, Allocator* allocator, 20472: const SliceTransform* slice_transform, Logger* logger, 20472: uint32_t ) { 20472: return CreateMemTableRep(key_cmp, allocator, slice_transform, logger); 20472: } 20472: 20472: virtual const char* Name() const = 0; 20472: 20472: 20472: 20472: virtual bool IsInsertConcurrentlySupported() const { return false; } 20472: 20472: 20472: 20472: 20472: 20472: virtual bool CanHandleDuplicatedKey() const { return false; } 20472: }; 20472: # 311 "./include/rocksdb/memtablerep.h" 20472: class SkipListFactory : public MemTableRepFactory { 20472: public: 20472: explicit SkipListFactory(size_t lookahead = 0) : lookahead_(lookahead) {} 20472: 20472: using MemTableRepFactory::CreateMemTableRep; 20472: virtual MemTableRep* CreateMemTableRep(const MemTableRep::KeyComparator&, 20472: Allocator*, const SliceTransform*, 20472: Logger* logger) override; 20472: virtual const char* Name() const override { return "SkipListFactory"; } 20472: 20472: bool IsInsertConcurrentlySupported() const override { return true; } 20472: 20472: bool CanHandleDuplicatedKey() const override { return true; } 20472: 20472: private: 20472: const size_t lookahead_; 20472: }; 20472: # 338 "./include/rocksdb/memtablerep.h" 20472: class VectorRepFactory : public MemTableRepFactory { 20472: const size_t count_; 20472: 20472: public: 20472: explicit VectorRepFactory(size_t count = 0) : count_(count) {} 20472: 20472: using MemTableRepFactory::CreateMemTableRep; 20472: virtual MemTableRep* CreateMemTableRep(const MemTableRep::KeyComparator&, 20472: Allocator*, const SliceTransform*, 20472: Logger* logger) override; 20472: 20472: virtual const char* Name() const override { return "VectorRepFactory"; } 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern MemTableRepFactory* NewHashSkipListRepFactory( 20472: size_t bucket_count = 1000000, int32_t skiplist_height = 4, 20472: int32_t skiplist_branching_factor = 4); 20472: # 378 "./include/rocksdb/memtablerep.h" 20472: extern MemTableRepFactory* NewHashLinkListRepFactory( 20472: size_t bucket_count = 50000, size_t huge_page_tlb_size = 0, 20472: int bucket_entries_logging_threshold = 4096, 20472: bool if_log_bucket_dist_when_flash = true, 20472: uint32_t threshold_use_skiplist = 256); 20472: 20472: 20472: } 20472: # 14 "./include/rocksdb/advanced_options.h" 2 20472: # 1 "./include/rocksdb/universal_compaction.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "/usr/include/c++/10/climits" 1 3 20472: # 39 "/usr/include/c++/10/climits" 3 20472: 20472: # 40 "/usr/include/c++/10/climits" 3 20472: 20472: 20472: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/10/include/limits.h" 1 3 4 20472: # 34 "/usr/lib/gcc/arm-linux-gnueabihf/10/include/limits.h" 3 4 20472: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/10/include/syslimits.h" 1 3 4 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/10/include/limits.h" 1 3 4 20472: # 195 "/usr/lib/gcc/arm-linux-gnueabihf/10/include/limits.h" 3 4 20472: # 1 "/usr/include/limits.h" 1 3 4 20472: # 26 "/usr/include/limits.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/libc-header-start.h" 1 3 4 20472: # 27 "/usr/include/limits.h" 2 3 4 20472: # 183 "/usr/include/limits.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/posix1_lim.h" 1 3 4 20472: # 27 "/usr/include/arm-linux-gnueabihf/bits/posix1_lim.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/wordsize.h" 1 3 4 20472: # 28 "/usr/include/arm-linux-gnueabihf/bits/posix1_lim.h" 2 3 4 20472: # 161 "/usr/include/arm-linux-gnueabihf/bits/posix1_lim.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/local_lim.h" 1 3 4 20472: # 38 "/usr/include/arm-linux-gnueabihf/bits/local_lim.h" 3 4 20472: # 1 "/usr/include/linux/limits.h" 1 3 4 20472: # 39 "/usr/include/arm-linux-gnueabihf/bits/local_lim.h" 2 3 4 20472: # 162 "/usr/include/arm-linux-gnueabihf/bits/posix1_lim.h" 2 3 4 20472: # 184 "/usr/include/limits.h" 2 3 4 20472: 20472: 20472: 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/posix2_lim.h" 1 3 4 20472: # 188 "/usr/include/limits.h" 2 3 4 20472: 20472: 20472: 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/xopen_lim.h" 1 3 4 20472: # 64 "/usr/include/arm-linux-gnueabihf/bits/xopen_lim.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/uio_lim.h" 1 3 4 20472: # 65 "/usr/include/arm-linux-gnueabihf/bits/xopen_lim.h" 2 3 4 20472: # 192 "/usr/include/limits.h" 2 3 4 20472: # 196 "/usr/lib/gcc/arm-linux-gnueabihf/10/include/limits.h" 2 3 4 20472: # 8 "/usr/lib/gcc/arm-linux-gnueabihf/10/include/syslimits.h" 2 3 4 20472: # 35 "/usr/lib/gcc/arm-linux-gnueabihf/10/include/limits.h" 2 3 4 20472: # 43 "/usr/include/c++/10/climits" 2 3 20472: # 10 "./include/rocksdb/universal_compaction.h" 2 20472: 20472: 20472: namespace rocksdb { 20472: 20472: 20472: 20472: 20472: 20472: enum CompactionStopStyle { 20472: kCompactionStopStyleSimilarSize, 20472: kCompactionStopStyleTotalSize 20472: }; 20472: 20472: class CompactionOptionsUniversal { 20472: public: 20472: 20472: 20472: 20472: unsigned int size_ratio; 20472: 20472: 20472: unsigned int min_merge_width; 20472: 20472: 20472: unsigned int max_merge_width; 20472: # 46 "./include/rocksdb/universal_compaction.h" 20472: unsigned int max_size_amplification_percent; 20472: # 64 "./include/rocksdb/universal_compaction.h" 20472: int compression_size_percent; 20472: 20472: 20472: 20472: CompactionStopStyle stop_style; 20472: 20472: 20472: 20472: 20472: bool allow_trivial_move; 20472: 20472: 20472: CompactionOptionsUniversal() 20472: : size_ratio(1), 20472: min_merge_width(2), 20472: max_merge_width( 20472: # 79 "./include/rocksdb/universal_compaction.h" 3 4 20472: (0x7fffffff * 2U + 1U) 20472: # 79 "./include/rocksdb/universal_compaction.h" 20472: ), 20472: max_size_amplification_percent(200), 20472: compression_size_percent(-1), 20472: stop_style(kCompactionStopStyleTotalSize), 20472: allow_trivial_move(false) {} 20472: }; 20472: 20472: } 20472: # 15 "./include/rocksdb/advanced_options.h" 2 20472: 20472: namespace rocksdb { 20472: 20472: class Slice; 20472: class SliceTransform; 20472: enum CompressionType : unsigned char; 20472: class TablePropertiesCollectorFactory; 20472: class TableFactory; 20472: struct Options; 20472: 20472: enum CompactionStyle : char { 20472: 20472: kCompactionStyleLevel = 0x0, 20472: 20472: 20472: kCompactionStyleUniversal = 0x1, 20472: 20472: 20472: kCompactionStyleFIFO = 0x2, 20472: 20472: 20472: 20472: kCompactionStyleNone = 0x3, 20472: }; 20472: 20472: 20472: 20472: 20472: enum CompactionPri : char { 20472: 20472: kByCompensatedSize = 0x0, 20472: 20472: 20472: kOldestLargestSeqFirst = 0x1, 20472: 20472: 20472: 20472: kOldestSmallestSeqFirst = 0x2, 20472: 20472: 20472: 20472: kMinOverlappingRatio = 0x3, 20472: }; 20472: 20472: struct CompactionOptionsFIFO { 20472: 20472: 20472: 20472: uint64_t max_table_files_size; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: bool allow_compaction = false; 20472: 20472: CompactionOptionsFIFO() : max_table_files_size(1 * 1024 * 1024 * 1024) {} 20472: CompactionOptionsFIFO(uint64_t _max_table_files_size, bool _allow_compaction) 20472: : max_table_files_size(_max_table_files_size), 20472: allow_compaction(_allow_compaction) {} 20472: }; 20472: 20472: 20472: struct CompressionOptions { 20472: 20472: 20472: 20472: 20472: 20472: 20472: const static int kDefaultCompressionLevel = 32767; 20472: 20472: int window_bits; 20472: int level; 20472: int strategy; 20472: # 109 "./include/rocksdb/advanced_options.h" 20472: uint32_t max_dict_bytes; 20472: # 118 "./include/rocksdb/advanced_options.h" 20472: uint32_t zstd_max_train_bytes; 20472: # 133 "./include/rocksdb/advanced_options.h" 20472: uint32_t parallel_threads; 20472: # 144 "./include/rocksdb/advanced_options.h" 20472: bool enabled; 20472: 20472: CompressionOptions() 20472: : window_bits(-14), 20472: level(kDefaultCompressionLevel), 20472: strategy(0), 20472: max_dict_bytes(0), 20472: zstd_max_train_bytes(0), 20472: parallel_threads(1), 20472: enabled(false) {} 20472: CompressionOptions(int wbits, int _lev, int _strategy, int _max_dict_bytes, 20472: int _zstd_max_train_bytes, int _parallel_threads, 20472: bool _enabled) 20472: : window_bits(wbits), 20472: level(_lev), 20472: strategy(_strategy), 20472: max_dict_bytes(_max_dict_bytes), 20472: zstd_max_train_bytes(_zstd_max_train_bytes), 20472: parallel_threads(_parallel_threads), 20472: enabled(_enabled) {} 20472: }; 20472: 20472: enum UpdateStatus { 20472: UPDATE_FAILED = 0, 20472: UPDATED_INPLACE = 1, 20472: UPDATED = 2, 20472: }; 20472: 20472: struct AdvancedColumnFamilyOptions { 20472: # 184 "./include/rocksdb/advanced_options.h" 20472: int max_write_buffer_number = 2; 20472: # 193 "./include/rocksdb/advanced_options.h" 20472: int min_write_buffer_number_to_merge = 1; 20472: # 202 "./include/rocksdb/advanced_options.h" 20472: int max_write_buffer_number_to_maintain = 0; 20472: # 234 "./include/rocksdb/advanced_options.h" 20472: int64_t max_write_buffer_size_to_maintain = 0; 20472: # 247 "./include/rocksdb/advanced_options.h" 20472: bool inplace_update_support = false; 20472: 20472: 20472: 20472: 20472: 20472: size_t inplace_update_num_locks = 10000; 20472: # 292 "./include/rocksdb/advanced_options.h" 20472: UpdateStatus (*inplace_callback)(char* existing_value, 20472: uint32_t* existing_value_size, 20472: Slice delta_value, 20472: std::string* merged_value) = nullptr; 20472: # 305 "./include/rocksdb/advanced_options.h" 20472: double memtable_prefix_bloom_size_ratio = 0.0; 20472: # 314 "./include/rocksdb/advanced_options.h" 20472: bool memtable_whole_key_filtering = false; 20472: # 326 "./include/rocksdb/advanced_options.h" 20472: size_t memtable_huge_page_size = 0; 20472: # 347 "./include/rocksdb/advanced_options.h" 20472: std::shared_ptr 20472: memtable_insert_with_hint_prefix_extractor = nullptr; 20472: 20472: 20472: 20472: 20472: 20472: 20472: uint32_t bloom_locality = 0; 20472: # 372 "./include/rocksdb/advanced_options.h" 20472: size_t arena_block_size = 0; 20472: # 395 "./include/rocksdb/advanced_options.h" 20472: std::vector compression_per_level; 20472: 20472: 20472: int num_levels = 7; 20472: # 407 "./include/rocksdb/advanced_options.h" 20472: int level0_slowdown_writes_trigger = 20; 20472: 20472: 20472: 20472: 20472: 20472: 20472: int level0_stop_writes_trigger = 36; 20472: # 428 "./include/rocksdb/advanced_options.h" 20472: uint64_t target_file_size_base = 64 * 1048576; 20472: 20472: 20472: 20472: 20472: 20472: int target_file_size_multiplier = 1; 20472: # 515 "./include/rocksdb/advanced_options.h" 20472: bool level_compaction_dynamic_level_bytes = false; 20472: 20472: 20472: 20472: 20472: double max_bytes_for_level_multiplier = 10; 20472: # 529 "./include/rocksdb/advanced_options.h" 20472: std::vector max_bytes_for_level_multiplier_additional = 20472: std::vector(num_levels, 1); 20472: # 539 "./include/rocksdb/advanced_options.h" 20472: uint64_t max_compaction_bytes = 0; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: uint64_t soft_pending_compaction_bytes_limit = 64 * 1073741824ull; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: uint64_t hard_pending_compaction_bytes_limit = 256 * 1073741824ull; 20472: 20472: 20472: CompactionStyle compaction_style = kCompactionStyleLevel; 20472: 20472: 20472: 20472: 20472: CompactionPri compaction_pri = kMinOverlappingRatio; 20472: 20472: 20472: 20472: 20472: 20472: 20472: CompactionOptionsUniversal compaction_options_universal; 20472: 20472: 20472: 20472: 20472: 20472: 20472: CompactionOptionsFIFO compaction_options_fifo; 20472: # 587 "./include/rocksdb/advanced_options.h" 20472: uint64_t max_sequential_skip_in_iterations = 8; 20472: 20472: 20472: 20472: 20472: std::shared_ptr memtable_factory = 20472: std::shared_ptr(new SkipListFactory); 20472: # 612 "./include/rocksdb/advanced_options.h" 20472: typedef std::vector> 20472: TablePropertiesCollectorFactories; 20472: TablePropertiesCollectorFactories table_properties_collector_factories; 20472: # 627 "./include/rocksdb/advanced_options.h" 20472: size_t max_successive_merges = 0; 20472: # 643 "./include/rocksdb/advanced_options.h" 20472: bool optimize_filters_for_hits = false; 20472: 20472: 20472: 20472: 20472: 20472: 20472: bool paranoid_file_checks = false; 20472: 20472: 20472: 20472: 20472: 20472: bool force_consistency_checks = false; 20472: 20472: 20472: 20472: 20472: 20472: 20472: bool report_bg_io_stats = false; 20472: # 681 "./include/rocksdb/advanced_options.h" 20472: uint64_t ttl = 0xfffffffffffffffe; 20472: # 710 "./include/rocksdb/advanced_options.h" 20472: uint64_t periodic_compaction_seconds = 0xfffffffffffffffe; 20472: 20472: 20472: 20472: 20472: 20472: uint64_t sample_for_compression = 0; 20472: 20472: 20472: AdvancedColumnFamilyOptions(); 20472: 20472: explicit AdvancedColumnFamilyOptions(const Options& options); 20472: 20472: 20472: 20472: 20472: 20472: int max_mem_compaction_level; 20472: # 736 "./include/rocksdb/advanced_options.h" 20472: double soft_rate_limit = 0.0; 20472: 20472: 20472: double hard_rate_limit = 0.0; 20472: 20472: 20472: unsigned int rate_limit_delay_max_milliseconds = 100; 20472: 20472: 20472: 20472: bool purge_redundant_kvs_while_flush = true; 20472: }; 20472: 20472: } 20472: # 20 "./include/rocksdb/options.h" 2 20472: # 1 "./include/rocksdb/comparator.h" 1 20472: # 9 "./include/rocksdb/comparator.h" 20472: 20472: 20472: 20472: 20472: 20472: 20472: namespace rocksdb { 20472: 20472: class Slice; 20472: 20472: 20472: 20472: 20472: 20472: class Comparator { 20472: public: 20472: Comparator() : timestamp_size_(0) {} 20472: 20472: Comparator(size_t ts_sz) : timestamp_size_(ts_sz) {} 20472: 20472: Comparator(const Comparator& orig) : timestamp_size_(orig.timestamp_size_) {} 20472: 20472: Comparator& operator=(const Comparator& rhs) { 20472: if (this != &rhs) { 20472: timestamp_size_ = rhs.timestamp_size_; 20472: } 20472: return *this; 20472: } 20472: 20472: virtual ~Comparator() {} 20472: 20472: static const char* Type() { return "Comparator"; } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual int Compare(const Slice& a, const Slice& b) const = 0; 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual bool Equal(const Slice& a, const Slice& b) const { 20472: return Compare(a, b) == 0; 20472: } 20472: # 69 "./include/rocksdb/comparator.h" 20472: virtual const char* Name() const = 0; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual void FindShortestSeparator(std::string* start, 20472: const Slice& limit) const = 0; 20472: 20472: 20472: 20472: 20472: virtual void FindShortSuccessor(std::string* key) const = 0; 20472: 20472: 20472: 20472: virtual const Comparator* GetRootComparator() const { return this; } 20472: 20472: 20472: virtual bool IsSameLengthImmediateSuccessor(const Slice& , 20472: const Slice& ) const { 20472: return false; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: virtual bool CanKeysWithDifferentByteContentsBeEqual() const { return true; } 20472: 20472: inline size_t timestamp_size() const { return timestamp_size_; } 20472: 20472: int CompareWithoutTimestamp(const Slice& a, const Slice& b) const { 20472: return CompareWithoutTimestamp(a, true, b, true); 20472: } 20472: # 114 "./include/rocksdb/comparator.h" 20472: virtual int CompareTimestamp(const Slice& , 20472: const Slice& ) const { 20472: return 0; 20472: } 20472: 20472: virtual int CompareWithoutTimestamp(const Slice& a, bool , 20472: const Slice& b, bool ) const { 20472: return Compare(a, b); 20472: } 20472: 20472: private: 20472: size_t timestamp_size_; 20472: }; 20472: 20472: 20472: 20472: 20472: extern const Comparator* BytewiseComparator(); 20472: 20472: 20472: 20472: extern const Comparator* ReverseBytewiseComparator(); 20472: 20472: } 20472: # 21 "./include/rocksdb/options.h" 2 20472: # 1 "./include/rocksdb/env.h" 1 20472: # 17 "./include/rocksdb/env.h" 20472: 20472: 20472: 20472: # 1 "/usr/include/c++/10/cstdarg" 1 3 20472: # 39 "/usr/include/c++/10/cstdarg" 3 20472: 20472: # 40 "/usr/include/c++/10/cstdarg" 3 20472: 20472: 20472: 20472: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/10/include/stdarg.h" 1 3 4 20472: # 44 "/usr/include/c++/10/cstdarg" 2 3 20472: # 53 "/usr/include/c++/10/cstdarg" 3 20472: 20472: # 53 "/usr/include/c++/10/cstdarg" 3 20472: namespace std 20472: { 20472: using ::va_list; 20472: } 20472: # 21 "./include/rocksdb/env.h" 2 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "./include/rocksdb/thread_status.h" 1 20472: # 14 "./include/rocksdb/thread_status.h" 20472: 20472: 20472: 20472: # 1 "/usr/include/c++/10/cstddef" 1 3 20472: # 42 "/usr/include/c++/10/cstddef" 3 20472: 20472: # 43 "/usr/include/c++/10/cstddef" 3 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/10/include/stddef.h" 1 3 4 20472: # 51 "/usr/include/c++/10/cstddef" 2 3 20472: 20472: extern "C++" 20472: { 20472: 20472: namespace std 20472: { 20472: 20472: using ::max_align_t; 20472: } 20472: # 179 "/usr/include/c++/10/cstddef" 3 20472: } 20472: # 18 "./include/rocksdb/thread_status.h" 2 20472: # 28 "./include/rocksdb/thread_status.h" 20472: 20472: # 28 "./include/rocksdb/thread_status.h" 20472: namespace rocksdb { 20472: 20472: 20472: 20472: 20472: template 20472: struct constexpr_max { 20472: static const int result = (A > B) ? A : B; 20472: }; 20472: 20472: 20472: 20472: 20472: struct ThreadStatus { 20472: 20472: enum ThreadType : int { 20472: HIGH_PRIORITY = 0, 20472: LOW_PRIORITY, 20472: USER, 20472: BOTTOM_PRIORITY, 20472: NUM_THREAD_TYPES 20472: }; 20472: 20472: 20472: 20472: 20472: enum OperationType : int { 20472: OP_UNKNOWN = 0, 20472: OP_COMPACTION, 20472: OP_FLUSH, 20472: NUM_OP_TYPES 20472: }; 20472: 20472: enum OperationStage : int { 20472: STAGE_UNKNOWN = 0, 20472: STAGE_FLUSH_RUN, 20472: STAGE_FLUSH_WRITE_L0, 20472: STAGE_COMPACTION_PREPARE, 20472: STAGE_COMPACTION_RUN, 20472: STAGE_COMPACTION_PROCESS_KV, 20472: STAGE_COMPACTION_INSTALL, 20472: STAGE_COMPACTION_SYNC_FILE, 20472: STAGE_PICK_MEMTABLES_TO_FLUSH, 20472: STAGE_MEMTABLE_ROLLBACK, 20472: STAGE_MEMTABLE_INSTALL_FLUSH_RESULTS, 20472: NUM_OP_STAGES 20472: }; 20472: 20472: enum CompactionPropertyType : int { 20472: COMPACTION_JOB_ID = 0, 20472: COMPACTION_INPUT_OUTPUT_LEVEL, 20472: COMPACTION_PROP_FLAGS, 20472: COMPACTION_TOTAL_INPUT_BYTES, 20472: COMPACTION_BYTES_READ, 20472: COMPACTION_BYTES_WRITTEN, 20472: NUM_COMPACTION_PROPERTIES 20472: }; 20472: 20472: enum FlushPropertyType : int { 20472: FLUSH_JOB_ID = 0, 20472: FLUSH_BYTES_MEMTABLES, 20472: FLUSH_BYTES_WRITTEN, 20472: NUM_FLUSH_PROPERTIES 20472: }; 20472: 20472: 20472: 20472: static const int kNumOperationProperties = 20472: constexpr_max::result; 20472: 20472: 20472: 20472: 20472: enum StateType : int { 20472: STATE_UNKNOWN = 0, 20472: STATE_MUTEX_WAIT = 1, 20472: NUM_STATE_TYPES 20472: }; 20472: 20472: ThreadStatus(const uint64_t _id, const ThreadType _thread_type, 20472: const std::string& _db_name, const std::string& _cf_name, 20472: const OperationType _operation_type, 20472: const uint64_t _op_elapsed_micros, 20472: const OperationStage _operation_stage, 20472: const uint64_t _op_props[], const StateType _state_type) 20472: : thread_id(_id), 20472: thread_type(_thread_type), 20472: db_name(_db_name), 20472: cf_name(_cf_name), 20472: operation_type(_operation_type), 20472: op_elapsed_micros(_op_elapsed_micros), 20472: operation_stage(_operation_stage), 20472: state_type(_state_type) { 20472: for (int i = 0; i < kNumOperationProperties; ++i) { 20472: op_properties[i] = _op_props[i]; 20472: } 20472: } 20472: 20472: 20472: const uint64_t thread_id; 20472: 20472: 20472: 20472: const ThreadType thread_type; 20472: 20472: 20472: 20472: 20472: const std::string db_name; 20472: 20472: 20472: 20472: 20472: const std::string cf_name; 20472: 20472: 20472: const OperationType operation_type; 20472: 20472: 20472: const uint64_t op_elapsed_micros; 20472: 20472: 20472: 20472: const OperationStage operation_stage; 20472: 20472: 20472: 20472: 20472: uint64_t op_properties[kNumOperationProperties]; 20472: 20472: 20472: const StateType state_type; 20472: 20472: 20472: 20472: 20472: static std::string GetThreadTypeName(ThreadType thread_type); 20472: 20472: 20472: static const std::string& GetOperationName(OperationType op_type); 20472: 20472: static const std::string MicrosToString(uint64_t op_elapsed_time); 20472: 20472: 20472: static const std::string& GetOperationStageName(OperationStage stage); 20472: 20472: 20472: 20472: static const std::string& GetOperationPropertyName(OperationType op_type, 20472: int i); 20472: 20472: 20472: 20472: static std::map InterpretOperationProperties( 20472: OperationType op_type, const uint64_t* op_properties); 20472: 20472: 20472: static const std::string& GetStateName(StateType state_type); 20472: }; 20472: 20472: } 20472: # 28 "./include/rocksdb/env.h" 2 20472: # 42 "./include/rocksdb/env.h" 20472: namespace rocksdb { 20472: 20472: class DynamicLibrary; 20472: class FileLock; 20472: class Logger; 20472: class RandomAccessFile; 20472: class SequentialFile; 20472: class Slice; 20472: class WritableFile; 20472: class RandomRWFile; 20472: class MemoryMappedFileBuffer; 20472: class Directory; 20472: struct DBOptions; 20472: struct ImmutableDBOptions; 20472: struct MutableDBOptions; 20472: class RateLimiter; 20472: class ThreadStatusUpdater; 20472: struct ThreadStatus; 20472: class FileSystem; 20472: 20472: const size_t kDefaultPageSize = 4 * 1024; 20472: 20472: 20472: struct EnvOptions { 20472: 20472: EnvOptions(); 20472: 20472: 20472: explicit EnvOptions(const DBOptions& options); 20472: 20472: 20472: bool use_mmap_reads = false; 20472: 20472: 20472: bool use_mmap_writes = true; 20472: 20472: 20472: bool use_direct_reads = false; 20472: 20472: 20472: bool use_direct_writes = false; 20472: 20472: 20472: bool allow_fallocate = true; 20472: 20472: 20472: bool set_fd_cloexec = true; 20472: 20472: 20472: 20472: 20472: 20472: uint64_t bytes_per_sync = 0; 20472: # 111 "./include/rocksdb/env.h" 20472: bool strict_bytes_per_sync = false; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: bool fallocate_with_keep_size = true; 20472: 20472: 20472: size_t compaction_readahead_size = 0; 20472: 20472: 20472: size_t random_access_max_buffer_size = 0; 20472: 20472: 20472: size_t writable_file_max_buffer_size = 1024 * 1024; 20472: 20472: 20472: RateLimiter* rate_limiter = nullptr; 20472: }; 20472: 20472: class Env { 20472: public: 20472: struct FileAttributes { 20472: 20472: std::string name; 20472: 20472: 20472: uint64_t size_bytes; 20472: }; 20472: 20472: Env(); 20472: 20472: Env(std::shared_ptr fs); 20472: 20472: Env(const Env&) = delete; 20472: void operator=(const Env&) = delete; 20472: 20472: virtual ~Env(); 20472: 20472: static const char* Type() { return "Environment"; } 20472: 20472: 20472: static Status LoadEnv(const std::string& value, Env** result); 20472: 20472: 20472: static Status LoadEnv(const std::string& value, Env** result, 20472: std::shared_ptr* guard); 20472: 20472: 20472: 20472: 20472: 20472: 20472: static Env* Default(); 20472: 20472: 20472: virtual Status RegisterDbPaths(const std::vector& ) { 20472: return Status::OK(); 20472: } 20472: 20472: virtual Status UnregisterDbPaths(const std::vector& ) { 20472: return Status::OK(); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual Status NewSequentialFile(const std::string& fname, 20472: std::unique_ptr* result, 20472: const EnvOptions& options) = 0; 20472: # 195 "./include/rocksdb/env.h" 20472: virtual Status NewRandomAccessFile(const std::string& fname, 20472: std::unique_ptr* result, 20472: const EnvOptions& options) = 0; 20472: 20472: 20472: enum WriteLifeTimeHint { 20472: WLTH_NOT_SET = 0, 20472: WLTH_NONE, 20472: WLTH_SHORT, 20472: WLTH_MEDIUM, 20472: WLTH_LONG, 20472: WLTH_EXTREME, 20472: }; 20472: # 216 "./include/rocksdb/env.h" 20472: virtual Status NewWritableFile(const std::string& fname, 20472: std::unique_ptr* result, 20472: const EnvOptions& options) = 0; 20472: # 227 "./include/rocksdb/env.h" 20472: virtual Status ReopenWritableFile(const std::string& , 20472: std::unique_ptr* , 20472: const EnvOptions& ) { 20472: return Status::NotSupported("Env::ReopenWritableFile() not supported."); 20472: } 20472: 20472: 20472: virtual Status ReuseWritableFile(const std::string& fname, 20472: const std::string& old_fname, 20472: std::unique_ptr* result, 20472: const EnvOptions& options); 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual Status NewRandomRWFile(const std::string& , 20472: std::unique_ptr* , 20472: const EnvOptions& ) { 20472: return Status::NotSupported("RandomRWFile is not implemented in this Env"); 20472: } 20472: 20472: 20472: 20472: 20472: virtual Status NewMemoryMappedFileBuffer( 20472: const std::string& , 20472: std::unique_ptr* ) { 20472: return Status::NotSupported( 20472: "MemoryMappedFileBuffer is not implemented in this Env"); 20472: } 20472: # 267 "./include/rocksdb/env.h" 20472: virtual Status NewDirectory(const std::string& name, 20472: std::unique_ptr* result) = 0; 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual Status FileExists(const std::string& fname) = 0; 20472: # 284 "./include/rocksdb/env.h" 20472: virtual Status GetChildren(const std::string& dir, 20472: std::vector* result) = 0; 20472: # 297 "./include/rocksdb/env.h" 20472: virtual Status GetChildrenFileAttributes(const std::string& dir, 20472: std::vector* result); 20472: 20472: 20472: virtual Status DeleteFile(const std::string& fname) = 0; 20472: 20472: 20472: virtual Status Truncate(const std::string& , size_t ) { 20472: return Status::NotSupported("Truncate is not supported for this Env"); 20472: } 20472: 20472: 20472: virtual Status CreateDir(const std::string& dirname) = 0; 20472: 20472: 20472: 20472: virtual Status CreateDirIfMissing(const std::string& dirname) = 0; 20472: 20472: 20472: 20472: 20472: virtual Status DeleteDir(const std::string& dirname) = 0; 20472: 20472: 20472: virtual Status GetFileSize(const std::string& fname, uint64_t* file_size) = 0; 20472: 20472: 20472: virtual Status GetFileModificationTime(const std::string& fname, 20472: uint64_t* file_mtime) = 0; 20472: 20472: virtual Status RenameFile(const std::string& src, 20472: const std::string& target) = 0; 20472: 20472: 20472: virtual Status LinkFile(const std::string& , 20472: const std::string& ) { 20472: return Status::NotSupported("LinkFile is not supported for this Env"); 20472: } 20472: 20472: virtual Status NumFileLinks(const std::string& , 20472: uint64_t* ) { 20472: return Status::NotSupported( 20472: "Getting number of file links is not supported for this Env"); 20472: } 20472: 20472: virtual Status AreFilesSame(const std::string& , 20472: const std::string& , bool* ) { 20472: return Status::NotSupported("AreFilesSame is not supported for this Env"); 20472: } 20472: # 361 "./include/rocksdb/env.h" 20472: virtual Status LockFile(const std::string& fname, FileLock** lock) = 0; 20472: 20472: 20472: 20472: 20472: virtual Status UnlockFile(FileLock* lock) = 0; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual Status LoadLibrary(const std::string& , 20472: const std::string& , 20472: std::shared_ptr* ) { 20472: return Status::NotSupported("LoadLibrary is not implemented in this Env"); 20472: } 20472: 20472: 20472: enum Priority { BOTTOM, LOW, HIGH, USER, TOTAL }; 20472: 20472: static std::string PriorityToString(Priority priority); 20472: 20472: 20472: enum IOPriority { IO_LOW = 0, IO_HIGH = 1, IO_TOTAL = 2 }; 20472: # 398 "./include/rocksdb/env.h" 20472: virtual void Schedule(void (*function)(void* arg), void* arg, 20472: Priority pri = LOW, void* tag = nullptr, 20472: void (*unschedFunction)(void* arg) = nullptr) = 0; 20472: 20472: 20472: 20472: virtual int UnSchedule(void* , Priority ) { return 0; } 20472: 20472: 20472: 20472: virtual void StartThread(void (*function)(void* arg), void* arg) = 0; 20472: 20472: 20472: virtual void WaitForJoin() {} 20472: 20472: 20472: virtual unsigned int GetThreadPoolQueueLen(Priority = LOW) const { 20472: return 0; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: virtual Status GetTestDirectory(std::string* path) = 0; 20472: 20472: 20472: 20472: 20472: virtual Status NewLogger(const std::string& fname, 20472: std::shared_ptr* result); 20472: 20472: 20472: 20472: 20472: virtual uint64_t NowMicros() = 0; 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual uint64_t NowNanos() { return NowMicros() * 1000; } 20472: 20472: 20472: virtual uint64_t NowCPUNanos() { return 0; } 20472: 20472: 20472: virtual void SleepForMicroseconds(int micros) = 0; 20472: 20472: 20472: virtual Status GetHostName(char* name, uint64_t len) = 0; 20472: 20472: 20472: 20472: virtual Status GetCurrentTime(int64_t* unix_time) = 0; 20472: 20472: 20472: virtual Status GetAbsolutePath(const std::string& db_path, 20472: std::string* output_path) = 0; 20472: 20472: 20472: 20472: 20472: virtual void SetBackgroundThreads(int number, Priority pri = LOW) = 0; 20472: virtual int GetBackgroundThreads(Priority pri = LOW) = 0; 20472: 20472: virtual Status SetAllowNonOwnerAccess(bool ) { 20472: return Status::NotSupported("Env::SetAllowNonOwnerAccess() not supported."); 20472: } 20472: 20472: 20472: 20472: 20472: virtual void IncBackgroundThreadsIfNeeded(int number, Priority pri) = 0; 20472: 20472: 20472: virtual void LowerThreadPoolIOPriority(Priority = LOW) {} 20472: 20472: 20472: virtual void LowerThreadPoolCPUPriority(Priority = LOW) {} 20472: 20472: 20472: virtual std::string TimeToString(uint64_t time) = 0; 20472: 20472: 20472: virtual std::string GenerateUniqueId(); 20472: 20472: 20472: 20472: virtual EnvOptions OptimizeForLogRead(const EnvOptions& env_options) const; 20472: 20472: 20472: 20472: 20472: virtual EnvOptions OptimizeForManifestRead( 20472: const EnvOptions& env_options) const; 20472: 20472: 20472: 20472: 20472: virtual EnvOptions OptimizeForLogWrite(const EnvOptions& env_options, 20472: const DBOptions& db_options) const; 20472: 20472: 20472: 20472: virtual EnvOptions OptimizeForManifestWrite( 20472: const EnvOptions& env_options) const; 20472: 20472: 20472: 20472: 20472: virtual EnvOptions OptimizeForCompactionTableWrite( 20472: const EnvOptions& env_options, 20472: const ImmutableDBOptions& immutable_ops) const; 20472: 20472: 20472: 20472: 20472: virtual EnvOptions OptimizeForCompactionTableRead( 20472: const EnvOptions& env_options, 20472: const ImmutableDBOptions& db_options) const; 20472: 20472: 20472: virtual Status GetThreadList(std::vector* ) { 20472: return Status::NotSupported("Env::GetThreadList() not supported."); 20472: } 20472: 20472: 20472: 20472: 20472: virtual ThreadStatusUpdater* GetThreadStatusUpdater() const { 20472: return thread_status_updater_; 20472: } 20472: 20472: 20472: virtual uint64_t GetThreadID() const; 20472: 20472: 20472: 20472: 20472: 20472: virtual Status GetFreeSpace(const std::string& , 20472: uint64_t* ) { 20472: return Status::NotSupported("Env::GetFreeSpace() not supported."); 20472: } 20472: 20472: 20472: virtual Status IsDirectory(const std::string& , bool* ) { 20472: return Status::NotSupported("Env::IsDirectory() not supported."); 20472: } 20472: 20472: virtual void SanitizeEnvOptions(EnvOptions* ) const {} 20472: 20472: 20472: 20472: const std::shared_ptr& GetFileSystem() const; 20472: 20472: 20472: 20472: protected: 20472: 20472: 20472: ThreadStatusUpdater* thread_status_updater_; 20472: 20472: 20472: std::shared_ptr file_system_; 20472: }; 20472: 20472: 20472: 20472: 20472: ThreadStatusUpdater* CreateThreadStatusUpdater(); 20472: 20472: 20472: class SequentialFile { 20472: public: 20472: SequentialFile() {} 20472: virtual ~SequentialFile(); 20472: # 586 "./include/rocksdb/env.h" 20472: virtual Status Read(size_t n, Slice* result, char* scratch) = 0; 20472: # 595 "./include/rocksdb/env.h" 20472: virtual Status Skip(uint64_t n) = 0; 20472: 20472: 20472: 20472: virtual bool use_direct_io() const { return false; } 20472: 20472: 20472: 20472: virtual size_t GetRequiredBufferAlignment() const { return kDefaultPageSize; } 20472: 20472: 20472: 20472: 20472: virtual Status InvalidateCache(size_t , size_t ) { 20472: return Status::NotSupported( 20472: "SequentialFile::InvalidateCache not supported."); 20472: } 20472: 20472: 20472: 20472: virtual Status PositionedRead(uint64_t , size_t , 20472: Slice* , char* ) { 20472: return Status::NotSupported( 20472: "SequentialFile::PositionedRead() not supported."); 20472: } 20472: 20472: 20472: 20472: }; 20472: 20472: 20472: struct ReadRequest { 20472: 20472: uint64_t offset; 20472: 20472: 20472: size_t len; 20472: 20472: 20472: 20472: char* scratch; 20472: 20472: 20472: 20472: Slice result; 20472: 20472: 20472: Status status; 20472: }; 20472: 20472: 20472: class RandomAccessFile { 20472: public: 20472: RandomAccessFile() {} 20472: virtual ~RandomAccessFile(); 20472: # 661 "./include/rocksdb/env.h" 20472: virtual Status Read(uint64_t offset, size_t n, Slice* result, 20472: char* scratch) const = 0; 20472: 20472: 20472: virtual Status Prefetch(uint64_t , size_t ) { 20472: return Status::OK(); 20472: } 20472: # 676 "./include/rocksdb/env.h" 20472: virtual Status MultiRead(ReadRequest* reqs, size_t num_reqs) { 20472: 20472: # 677 "./include/rocksdb/env.h" 3 4 20472: (static_cast ( 20472: # 677 "./include/rocksdb/env.h" 20472: reqs != nullptr 20472: # 677 "./include/rocksdb/env.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 677 "./include/rocksdb/env.h" 20472: "reqs != nullptr" 20472: # 677 "./include/rocksdb/env.h" 3 4 20472: , "./include/rocksdb/env.h", 677, __extension__ __PRETTY_FUNCTION__)) 20472: # 677 "./include/rocksdb/env.h" 20472: ; 20472: for (size_t i = 0; i < num_reqs; ++i) { 20472: ReadRequest& req = reqs[i]; 20472: req.status = Read(req.offset, req.len, &req.result, req.scratch); 20472: } 20472: return Status::OK(); 20472: } 20472: # 700 "./include/rocksdb/env.h" 20472: virtual size_t GetUniqueId(char* , size_t ) const { 20472: return 0; 20472: 20472: } 20472: 20472: enum AccessPattern { NORMAL, RANDOM, SEQUENTIAL, WILLNEED, DONTNEED }; 20472: 20472: virtual void Hint(AccessPattern ) {} 20472: 20472: 20472: 20472: virtual bool use_direct_io() const { return false; } 20472: 20472: 20472: 20472: virtual size_t GetRequiredBufferAlignment() const { return kDefaultPageSize; } 20472: 20472: 20472: 20472: 20472: virtual Status InvalidateCache(size_t , size_t ) { 20472: return Status::NotSupported( 20472: "RandomAccessFile::InvalidateCache not supported."); 20472: } 20472: 20472: 20472: 20472: }; 20472: 20472: 20472: 20472: 20472: class WritableFile { 20472: public: 20472: WritableFile() 20472: : last_preallocated_block_(0), 20472: preallocation_block_size_(0), 20472: io_priority_(Env::IO_TOTAL), 20472: write_hint_(Env::WLTH_NOT_SET), 20472: strict_bytes_per_sync_(false) {} 20472: 20472: explicit WritableFile(const EnvOptions& options) 20472: : last_preallocated_block_(0), 20472: preallocation_block_size_(0), 20472: io_priority_(Env::IO_TOTAL), 20472: write_hint_(Env::WLTH_NOT_SET), 20472: strict_bytes_per_sync_(options.strict_bytes_per_sync) {} 20472: 20472: WritableFile(const WritableFile&) = delete; 20472: void operator=(const WritableFile&) = delete; 20472: 20472: virtual ~WritableFile(); 20472: 20472: 20472: 20472: 20472: virtual Status Append(const Slice& data) = 0; 20472: # 778 "./include/rocksdb/env.h" 20472: virtual Status PositionedAppend(const Slice& , 20472: uint64_t ) { 20472: return Status::NotSupported( 20472: "WritableFile::PositionedAppend() not supported."); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: virtual Status Truncate(uint64_t ) { return Status::OK(); } 20472: virtual Status Close() = 0; 20472: virtual Status Flush() = 0; 20472: virtual Status Sync() = 0; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual Status Fsync() { return Sync(); } 20472: 20472: 20472: 20472: virtual bool IsSyncThreadSafe() const { return false; } 20472: 20472: 20472: 20472: virtual bool use_direct_io() const { return false; } 20472: 20472: 20472: 20472: virtual size_t GetRequiredBufferAlignment() const { return kDefaultPageSize; } 20472: 20472: 20472: 20472: 20472: virtual void SetIOPriority(Env::IOPriority pri) { io_priority_ = pri; } 20472: 20472: virtual Env::IOPriority GetIOPriority() { return io_priority_; } 20472: 20472: virtual void SetWriteLifeTimeHint(Env::WriteLifeTimeHint hint) { 20472: write_hint_ = hint; 20472: } 20472: 20472: virtual Env::WriteLifeTimeHint GetWriteLifeTimeHint() { return write_hint_; } 20472: 20472: 20472: 20472: virtual uint64_t GetFileSize() { return 0; } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual void SetPreallocationBlockSize(size_t size) { 20472: preallocation_block_size_ = size; 20472: } 20472: 20472: virtual void GetPreallocationStatus(size_t* block_size, 20472: size_t* last_allocated_block) { 20472: *last_allocated_block = last_preallocated_block_; 20472: *block_size = preallocation_block_size_; 20472: } 20472: 20472: 20472: virtual size_t GetUniqueId(char* , size_t ) const { 20472: return 0; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: virtual Status InvalidateCache(size_t , size_t ) { 20472: return Status::NotSupported("WritableFile::InvalidateCache not supported."); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual Status RangeSync(uint64_t , uint64_t ) { 20472: if (strict_bytes_per_sync_) { 20472: return Sync(); 20472: } 20472: return Status::OK(); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual void PrepareWrite(size_t offset, size_t len) { 20472: if (preallocation_block_size_ == 0) { 20472: return; 20472: } 20472: 20472: 20472: 20472: const auto block_size = preallocation_block_size_; 20472: size_t new_last_preallocated_block = 20472: (offset + len + block_size - 1) / block_size; 20472: if (new_last_preallocated_block > last_preallocated_block_) { 20472: size_t num_spanned_blocks = 20472: new_last_preallocated_block - last_preallocated_block_; 20472: Allocate(block_size * last_preallocated_block_, 20472: block_size * num_spanned_blocks); 20472: last_preallocated_block_ = new_last_preallocated_block; 20472: } 20472: } 20472: 20472: 20472: virtual Status Allocate(uint64_t , uint64_t ) { 20472: return Status::OK(); 20472: } 20472: 20472: 20472: 20472: 20472: protected: 20472: size_t preallocation_block_size() { return preallocation_block_size_; } 20472: 20472: private: 20472: size_t last_preallocated_block_; 20472: size_t preallocation_block_size_; 20472: 20472: protected: 20472: Env::IOPriority io_priority_; 20472: Env::WriteLifeTimeHint write_hint_; 20472: const bool strict_bytes_per_sync_; 20472: }; 20472: 20472: 20472: class RandomRWFile { 20472: public: 20472: RandomRWFile() {} 20472: 20472: RandomRWFile(const RandomRWFile&) = delete; 20472: RandomRWFile& operator=(const RandomRWFile&) = delete; 20472: 20472: virtual ~RandomRWFile() {} 20472: 20472: 20472: 20472: virtual bool use_direct_io() const { return false; } 20472: 20472: 20472: 20472: virtual size_t GetRequiredBufferAlignment() const { return kDefaultPageSize; } 20472: 20472: 20472: 20472: virtual Status Write(uint64_t offset, const Slice& data) = 0; 20472: 20472: 20472: 20472: 20472: virtual Status Read(uint64_t offset, size_t n, Slice* result, 20472: char* scratch) const = 0; 20472: 20472: virtual Status Flush() = 0; 20472: 20472: virtual Status Sync() = 0; 20472: 20472: virtual Status Fsync() { return Sync(); } 20472: 20472: virtual Status Close() = 0; 20472: 20472: 20472: 20472: }; 20472: 20472: 20472: 20472: class MemoryMappedFileBuffer { 20472: public: 20472: MemoryMappedFileBuffer(void* _base, size_t _length) 20472: : base_(_base), length_(_length) {} 20472: 20472: virtual ~MemoryMappedFileBuffer() = 0; 20472: 20472: 20472: 20472: MemoryMappedFileBuffer(const MemoryMappedFileBuffer&) = delete; 20472: MemoryMappedFileBuffer& operator=(const MemoryMappedFileBuffer&) = delete; 20472: 20472: void* GetBase() const { return base_; } 20472: size_t GetLen() const { return length_; } 20472: 20472: protected: 20472: void* base_; 20472: const size_t length_; 20472: }; 20472: 20472: 20472: 20472: class Directory { 20472: public: 20472: virtual ~Directory() {} 20472: 20472: virtual Status Fsync() = 0; 20472: 20472: virtual size_t GetUniqueId(char* , size_t ) const { 20472: return 0; 20472: } 20472: 20472: 20472: 20472: }; 20472: 20472: enum InfoLogLevel : unsigned char { 20472: DEBUG_LEVEL = 0, 20472: INFO_LEVEL, 20472: WARN_LEVEL, 20472: ERROR_LEVEL, 20472: FATAL_LEVEL, 20472: HEADER_LEVEL, 20472: NUM_INFO_LOG_LEVELS, 20472: }; 20472: 20472: 20472: class Logger { 20472: public: 20472: size_t kDoNotSupportGetLogFileSize = (std::numeric_limits::max)(); 20472: 20472: explicit Logger(const InfoLogLevel log_level = InfoLogLevel::INFO_LEVEL) 20472: : closed_(false), log_level_(log_level) {} 20472: 20472: Logger(const Logger&) = delete; 20472: void operator=(const Logger&) = delete; 20472: 20472: virtual ~Logger(); 20472: 20472: 20472: 20472: 20472: virtual Status Close(); 20472: 20472: 20472: 20472: 20472: virtual void LogHeader(const char* format, va_list ap) { 20472: 20472: 20472: Logv(format, ap); 20472: } 20472: 20472: 20472: virtual void Logv(const char* format, va_list ap) = 0; 20472: 20472: 20472: 20472: 20472: 20472: virtual void Logv(const InfoLogLevel log_level, const char* format, 20472: va_list ap); 20472: 20472: virtual size_t GetLogFileSize() const { return kDoNotSupportGetLogFileSize; } 20472: 20472: virtual void Flush() {} 20472: virtual InfoLogLevel GetInfoLogLevel() const { return log_level_; } 20472: virtual void SetInfoLogLevel(const InfoLogLevel log_level) { 20472: log_level_ = log_level; 20472: } 20472: 20472: 20472: 20472: protected: 20472: virtual Status CloseImpl(); 20472: bool closed_; 20472: 20472: private: 20472: InfoLogLevel log_level_; 20472: }; 20472: 20472: 20472: class FileLock { 20472: public: 20472: FileLock() {} 20472: virtual ~FileLock(); 20472: 20472: private: 20472: 20472: FileLock(const FileLock&) = delete; 20472: void operator=(const FileLock&) = delete; 20472: }; 20472: 20472: class DynamicLibrary { 20472: public: 20472: virtual ~DynamicLibrary() {} 20472: 20472: 20472: virtual const char* Name() const = 0; 20472: 20472: 20472: 20472: template 20472: Status LoadFunction(const std::string& sym_name, std::function* function) { 20472: 20472: # 1083 "./include/rocksdb/env.h" 3 4 20472: (static_cast ( 20472: # 1083 "./include/rocksdb/env.h" 20472: nullptr != function 20472: # 1083 "./include/rocksdb/env.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 1083 "./include/rocksdb/env.h" 20472: "nullptr != function" 20472: # 1083 "./include/rocksdb/env.h" 3 4 20472: , "./include/rocksdb/env.h", 1083, __extension__ __PRETTY_FUNCTION__)) 20472: # 1083 "./include/rocksdb/env.h" 20472: ; 20472: void* ptr = nullptr; 20472: Status s = LoadSymbol(sym_name, &ptr); 20472: *function = reinterpret_cast(ptr); 20472: return s; 20472: } 20472: 20472: virtual Status LoadSymbol(const std::string& sym_name, void** func) = 0; 20472: }; 20472: 20472: extern void LogFlush(const std::shared_ptr& info_log); 20472: 20472: extern void Log(const InfoLogLevel log_level, 20472: const std::shared_ptr& info_log, const char* format, 20472: ...) __attribute__((__format__(__printf__, 3, 4))); 20472: 20472: 20472: extern void Header(const std::shared_ptr& info_log, const char* format, 20472: ...) __attribute__((__format__(__printf__, 2, 3))); 20472: extern void Debug(const std::shared_ptr& info_log, const char* format, 20472: ...) __attribute__((__format__(__printf__, 2, 3))); 20472: extern void Info(const std::shared_ptr& info_log, const char* format, 20472: ...) __attribute__((__format__(__printf__, 2, 3))); 20472: extern void Warn(const std::shared_ptr& info_log, const char* format, 20472: ...) __attribute__((__format__(__printf__, 2, 3))); 20472: extern void Error(const std::shared_ptr& info_log, const char* format, 20472: ...) __attribute__((__format__(__printf__, 2, 3))); 20472: extern void Fatal(const std::shared_ptr& info_log, const char* format, 20472: ...) __attribute__((__format__(__printf__, 2, 3))); 20472: 20472: 20472: 20472: extern void Log(const std::shared_ptr& info_log, const char* format, 20472: ...) __attribute__((__format__(__printf__, 2, 3))); 20472: 20472: extern void LogFlush(Logger* info_log); 20472: 20472: extern void Log(const InfoLogLevel log_level, Logger* info_log, 20472: const char* format, ...) __attribute__((__format__(__printf__, 3, 4))); 20472: 20472: 20472: extern void Log(Logger* info_log, const char* format, ...) 20472: __attribute__((__format__(__printf__, 2, 3))); 20472: 20472: 20472: extern void Header(Logger* info_log, const char* format, ...) 20472: __attribute__((__format__(__printf__, 2, 3))); 20472: extern void Debug(Logger* info_log, const char* format, ...) 20472: __attribute__((__format__(__printf__, 2, 3))); 20472: extern void Info(Logger* info_log, const char* format, ...) 20472: __attribute__((__format__(__printf__, 2, 3))); 20472: extern void Warn(Logger* info_log, const char* format, ...) 20472: __attribute__((__format__(__printf__, 2, 3))); 20472: extern void Error(Logger* info_log, const char* format, ...) 20472: __attribute__((__format__(__printf__, 2, 3))); 20472: extern void Fatal(Logger* info_log, const char* format, ...) 20472: __attribute__((__format__(__printf__, 2, 3))); 20472: 20472: 20472: extern Status WriteStringToFile(Env* env, const Slice& data, 20472: const std::string& fname, 20472: bool should_sync = false); 20472: 20472: 20472: extern Status ReadFileToString(Env* env, const std::string& fname, 20472: std::string* data); 20472: # 1178 "./include/rocksdb/env.h" 20472: class EnvWrapper : public Env { 20472: public: 20472: 20472: explicit EnvWrapper(Env* t) : target_(t) {} 20472: ~EnvWrapper() override; 20472: 20472: 20472: Env* target() const { return target_; } 20472: 20472: 20472: Status RegisterDbPaths(const std::vector& paths) override { 20472: return target_->RegisterDbPaths(paths); 20472: } 20472: 20472: Status UnregisterDbPaths(const std::vector& paths) override { 20472: return target_->UnregisterDbPaths(paths); 20472: } 20472: 20472: Status NewSequentialFile(const std::string& f, 20472: std::unique_ptr* r, 20472: const EnvOptions& options) override { 20472: return target_->NewSequentialFile(f, r, options); 20472: } 20472: Status NewRandomAccessFile(const std::string& f, 20472: std::unique_ptr* r, 20472: const EnvOptions& options) override { 20472: return target_->NewRandomAccessFile(f, r, options); 20472: } 20472: Status NewWritableFile(const std::string& f, std::unique_ptr* r, 20472: const EnvOptions& options) override { 20472: return target_->NewWritableFile(f, r, options); 20472: } 20472: Status ReopenWritableFile(const std::string& fname, 20472: std::unique_ptr* result, 20472: const EnvOptions& options) override { 20472: return target_->ReopenWritableFile(fname, result, options); 20472: } 20472: Status ReuseWritableFile(const std::string& fname, 20472: const std::string& old_fname, 20472: std::unique_ptr* r, 20472: const EnvOptions& options) override { 20472: return target_->ReuseWritableFile(fname, old_fname, r, options); 20472: } 20472: Status NewRandomRWFile(const std::string& fname, 20472: std::unique_ptr* result, 20472: const EnvOptions& options) override { 20472: return target_->NewRandomRWFile(fname, result, options); 20472: } 20472: Status NewMemoryMappedFileBuffer( 20472: const std::string& fname, 20472: std::unique_ptr* result) override { 20472: return target_->NewMemoryMappedFileBuffer(fname, result); 20472: } 20472: Status NewDirectory(const std::string& name, 20472: std::unique_ptr* result) override { 20472: return target_->NewDirectory(name, result); 20472: } 20472: Status FileExists(const std::string& f) override { 20472: return target_->FileExists(f); 20472: } 20472: Status GetChildren(const std::string& dir, 20472: std::vector* r) override { 20472: return target_->GetChildren(dir, r); 20472: } 20472: Status GetChildrenFileAttributes( 20472: const std::string& dir, std::vector* result) override { 20472: return target_->GetChildrenFileAttributes(dir, result); 20472: } 20472: Status DeleteFile(const std::string& f) override { 20472: return target_->DeleteFile(f); 20472: } 20472: Status Truncate(const std::string& fname, size_t size) override { 20472: return target_->Truncate(fname, size); 20472: } 20472: Status CreateDir(const std::string& d) override { 20472: return target_->CreateDir(d); 20472: } 20472: Status CreateDirIfMissing(const std::string& d) override { 20472: return target_->CreateDirIfMissing(d); 20472: } 20472: Status DeleteDir(const std::string& d) override { 20472: return target_->DeleteDir(d); 20472: } 20472: Status GetFileSize(const std::string& f, uint64_t* s) override { 20472: return target_->GetFileSize(f, s); 20472: } 20472: 20472: Status GetFileModificationTime(const std::string& fname, 20472: uint64_t* file_mtime) override { 20472: return target_->GetFileModificationTime(fname, file_mtime); 20472: } 20472: 20472: Status RenameFile(const std::string& s, const std::string& t) override { 20472: return target_->RenameFile(s, t); 20472: } 20472: 20472: Status LinkFile(const std::string& s, const std::string& t) override { 20472: return target_->LinkFile(s, t); 20472: } 20472: 20472: Status NumFileLinks(const std::string& fname, uint64_t* count) override { 20472: return target_->NumFileLinks(fname, count); 20472: } 20472: 20472: Status AreFilesSame(const std::string& first, const std::string& second, 20472: bool* res) override { 20472: return target_->AreFilesSame(first, second, res); 20472: } 20472: 20472: Status LockFile(const std::string& f, FileLock** l) override { 20472: return target_->LockFile(f, l); 20472: } 20472: 20472: Status UnlockFile(FileLock* l) override { return target_->UnlockFile(l); } 20472: 20472: Status IsDirectory(const std::string& path, bool* is_dir) override { 20472: return target_->IsDirectory(path, is_dir); 20472: } 20472: 20472: Status LoadLibrary(const std::string& lib_name, 20472: const std::string& search_path, 20472: std::shared_ptr* result) override { 20472: return target_->LoadLibrary(lib_name, search_path, result); 20472: } 20472: 20472: void Schedule(void (*f)(void* arg), void* a, Priority pri, 20472: void* tag = nullptr, void (*u)(void* arg) = nullptr) override { 20472: return target_->Schedule(f, a, pri, tag, u); 20472: } 20472: 20472: int UnSchedule(void* tag, Priority pri) override { 20472: return target_->UnSchedule(tag, pri); 20472: } 20472: 20472: void StartThread(void (*f)(void*), void* a) override { 20472: return target_->StartThread(f, a); 20472: } 20472: void WaitForJoin() override { return target_->WaitForJoin(); } 20472: unsigned int GetThreadPoolQueueLen(Priority pri = LOW) const override { 20472: return target_->GetThreadPoolQueueLen(pri); 20472: } 20472: Status GetTestDirectory(std::string* path) override { 20472: return target_->GetTestDirectory(path); 20472: } 20472: Status NewLogger(const std::string& fname, 20472: std::shared_ptr* result) override { 20472: return target_->NewLogger(fname, result); 20472: } 20472: uint64_t NowMicros() override { return target_->NowMicros(); } 20472: uint64_t NowNanos() override { return target_->NowNanos(); } 20472: uint64_t NowCPUNanos() override { return target_->NowCPUNanos(); } 20472: 20472: void SleepForMicroseconds(int micros) override { 20472: target_->SleepForMicroseconds(micros); 20472: } 20472: Status GetHostName(char* name, uint64_t len) override { 20472: return target_->GetHostName(name, len); 20472: } 20472: Status GetCurrentTime(int64_t* unix_time) override { 20472: return target_->GetCurrentTime(unix_time); 20472: } 20472: Status GetAbsolutePath(const std::string& db_path, 20472: std::string* output_path) override { 20472: return target_->GetAbsolutePath(db_path, output_path); 20472: } 20472: void SetBackgroundThreads(int num, Priority pri) override { 20472: return target_->SetBackgroundThreads(num, pri); 20472: } 20472: int GetBackgroundThreads(Priority pri) override { 20472: return target_->GetBackgroundThreads(pri); 20472: } 20472: 20472: Status SetAllowNonOwnerAccess(bool allow_non_owner_access) override { 20472: return target_->SetAllowNonOwnerAccess(allow_non_owner_access); 20472: } 20472: 20472: void IncBackgroundThreadsIfNeeded(int num, Priority pri) override { 20472: return target_->IncBackgroundThreadsIfNeeded(num, pri); 20472: } 20472: 20472: void LowerThreadPoolIOPriority(Priority pool = LOW) override { 20472: target_->LowerThreadPoolIOPriority(pool); 20472: } 20472: 20472: void LowerThreadPoolCPUPriority(Priority pool = LOW) override { 20472: target_->LowerThreadPoolCPUPriority(pool); 20472: } 20472: 20472: std::string TimeToString(uint64_t time) override { 20472: return target_->TimeToString(time); 20472: } 20472: 20472: Status GetThreadList(std::vector* thread_list) override { 20472: return target_->GetThreadList(thread_list); 20472: } 20472: 20472: ThreadStatusUpdater* GetThreadStatusUpdater() const override { 20472: return target_->GetThreadStatusUpdater(); 20472: } 20472: 20472: uint64_t GetThreadID() const override { return target_->GetThreadID(); } 20472: 20472: std::string GenerateUniqueId() override { 20472: return target_->GenerateUniqueId(); 20472: } 20472: 20472: EnvOptions OptimizeForLogRead(const EnvOptions& env_options) const override { 20472: return target_->OptimizeForLogRead(env_options); 20472: } 20472: EnvOptions OptimizeForManifestRead( 20472: const EnvOptions& env_options) const override { 20472: return target_->OptimizeForManifestRead(env_options); 20472: } 20472: EnvOptions OptimizeForLogWrite(const EnvOptions& env_options, 20472: const DBOptions& db_options) const override { 20472: return target_->OptimizeForLogWrite(env_options, db_options); 20472: } 20472: EnvOptions OptimizeForManifestWrite( 20472: const EnvOptions& env_options) const override { 20472: return target_->OptimizeForManifestWrite(env_options); 20472: } 20472: EnvOptions OptimizeForCompactionTableWrite( 20472: const EnvOptions& env_options, 20472: const ImmutableDBOptions& immutable_ops) const override { 20472: return target_->OptimizeForCompactionTableWrite(env_options, immutable_ops); 20472: } 20472: EnvOptions OptimizeForCompactionTableRead( 20472: const EnvOptions& env_options, 20472: const ImmutableDBOptions& db_options) const override { 20472: return target_->OptimizeForCompactionTableRead(env_options, db_options); 20472: } 20472: Status GetFreeSpace(const std::string& path, uint64_t* diskfree) override { 20472: return target_->GetFreeSpace(path, diskfree); 20472: } 20472: void SanitizeEnvOptions(EnvOptions* env_opts) const override { 20472: target_->SanitizeEnvOptions(env_opts); 20472: } 20472: 20472: private: 20472: Env* target_; 20472: }; 20472: 20472: class SequentialFileWrapper : public SequentialFile { 20472: public: 20472: explicit SequentialFileWrapper(SequentialFile* target) : target_(target) {} 20472: 20472: Status Read(size_t n, Slice* result, char* scratch) override { 20472: return target_->Read(n, result, scratch); 20472: } 20472: Status Skip(uint64_t n) override { return target_->Skip(n); } 20472: bool use_direct_io() const override { return target_->use_direct_io(); } 20472: size_t GetRequiredBufferAlignment() const override { 20472: return target_->GetRequiredBufferAlignment(); 20472: } 20472: Status InvalidateCache(size_t offset, size_t length) override { 20472: return target_->InvalidateCache(offset, length); 20472: } 20472: Status PositionedRead(uint64_t offset, size_t n, Slice* result, 20472: char* scratch) override { 20472: return target_->PositionedRead(offset, n, result, scratch); 20472: } 20472: 20472: private: 20472: SequentialFile* target_; 20472: }; 20472: 20472: class RandomAccessFileWrapper : public RandomAccessFile { 20472: public: 20472: explicit RandomAccessFileWrapper(RandomAccessFile* target) 20472: : target_(target) {} 20472: 20472: Status Read(uint64_t offset, size_t n, Slice* result, 20472: char* scratch) const override { 20472: return target_->Read(offset, n, result, scratch); 20472: } 20472: Status MultiRead(ReadRequest* reqs, size_t num_reqs) override { 20472: return target_->MultiRead(reqs, num_reqs); 20472: } 20472: Status Prefetch(uint64_t offset, size_t n) override { 20472: return target_->Prefetch(offset, n); 20472: } 20472: size_t GetUniqueId(char* id, size_t max_size) const override { 20472: return target_->GetUniqueId(id, max_size); 20472: } 20472: void Hint(AccessPattern pattern) override { target_->Hint(pattern); } 20472: bool use_direct_io() const override { return target_->use_direct_io(); } 20472: size_t GetRequiredBufferAlignment() const override { 20472: return target_->GetRequiredBufferAlignment(); 20472: } 20472: Status InvalidateCache(size_t offset, size_t length) override { 20472: return target_->InvalidateCache(offset, length); 20472: } 20472: 20472: private: 20472: RandomAccessFile* target_; 20472: }; 20472: 20472: class WritableFileWrapper : public WritableFile { 20472: public: 20472: explicit WritableFileWrapper(WritableFile* t) : target_(t) {} 20472: 20472: Status Append(const Slice& data) override { return target_->Append(data); } 20472: Status PositionedAppend(const Slice& data, uint64_t offset) override { 20472: return target_->PositionedAppend(data, offset); 20472: } 20472: Status Truncate(uint64_t size) override { return target_->Truncate(size); } 20472: Status Close() override { return target_->Close(); } 20472: Status Flush() override { return target_->Flush(); } 20472: Status Sync() override { return target_->Sync(); } 20472: Status Fsync() override { return target_->Fsync(); } 20472: bool IsSyncThreadSafe() const override { return target_->IsSyncThreadSafe(); } 20472: 20472: bool use_direct_io() const override { return target_->use_direct_io(); } 20472: 20472: size_t GetRequiredBufferAlignment() const override { 20472: return target_->GetRequiredBufferAlignment(); 20472: } 20472: 20472: void SetIOPriority(Env::IOPriority pri) override { 20472: target_->SetIOPriority(pri); 20472: } 20472: 20472: Env::IOPriority GetIOPriority() override { return target_->GetIOPriority(); } 20472: 20472: void SetWriteLifeTimeHint(Env::WriteLifeTimeHint hint) override { 20472: target_->SetWriteLifeTimeHint(hint); 20472: } 20472: 20472: Env::WriteLifeTimeHint GetWriteLifeTimeHint() override { 20472: return target_->GetWriteLifeTimeHint(); 20472: } 20472: 20472: uint64_t GetFileSize() override { return target_->GetFileSize(); } 20472: 20472: void SetPreallocationBlockSize(size_t size) override { 20472: target_->SetPreallocationBlockSize(size); 20472: } 20472: 20472: void GetPreallocationStatus(size_t* block_size, 20472: size_t* last_allocated_block) override { 20472: target_->GetPreallocationStatus(block_size, last_allocated_block); 20472: } 20472: 20472: size_t GetUniqueId(char* id, size_t max_size) const override { 20472: return target_->GetUniqueId(id, max_size); 20472: } 20472: 20472: Status InvalidateCache(size_t offset, size_t length) override { 20472: return target_->InvalidateCache(offset, length); 20472: } 20472: 20472: Status RangeSync(uint64_t offset, uint64_t nbytes) override { 20472: return target_->RangeSync(offset, nbytes); 20472: } 20472: 20472: void PrepareWrite(size_t offset, size_t len) override { 20472: target_->PrepareWrite(offset, len); 20472: } 20472: 20472: Status Allocate(uint64_t offset, uint64_t len) override { 20472: return target_->Allocate(offset, len); 20472: } 20472: 20472: private: 20472: WritableFile* target_; 20472: }; 20472: 20472: class RandomRWFileWrapper : public RandomRWFile { 20472: public: 20472: explicit RandomRWFileWrapper(RandomRWFile* target) : target_(target) {} 20472: 20472: bool use_direct_io() const override { return target_->use_direct_io(); } 20472: size_t GetRequiredBufferAlignment() const override { 20472: return target_->GetRequiredBufferAlignment(); 20472: } 20472: Status Write(uint64_t offset, const Slice& data) override { 20472: return target_->Write(offset, data); 20472: } 20472: Status Read(uint64_t offset, size_t n, Slice* result, 20472: char* scratch) const override { 20472: return target_->Read(offset, n, result, scratch); 20472: } 20472: Status Flush() override { return target_->Flush(); } 20472: Status Sync() override { return target_->Sync(); } 20472: Status Fsync() override { return target_->Fsync(); } 20472: Status Close() override { return target_->Close(); } 20472: 20472: private: 20472: RandomRWFile* target_; 20472: }; 20472: 20472: class DirectoryWrapper : public Directory { 20472: public: 20472: explicit DirectoryWrapper(Directory* target) : target_(target) {} 20472: 20472: Status Fsync() override { return target_->Fsync(); } 20472: size_t GetUniqueId(char* id, size_t max_size) const override { 20472: return target_->GetUniqueId(id, max_size); 20472: } 20472: 20472: private: 20472: Directory* target_; 20472: }; 20472: 20472: class LoggerWrapper : public Logger { 20472: public: 20472: explicit LoggerWrapper(Logger* target) : target_(target) {} 20472: 20472: Status Close() override { return target_->Close(); } 20472: void LogHeader(const char* format, va_list ap) override { 20472: return target_->LogHeader(format, ap); 20472: } 20472: void Logv(const char* format, va_list ap) override { 20472: return target_->Logv(format, ap); 20472: } 20472: void Logv(const InfoLogLevel log_level, const char* format, 20472: va_list ap) override { 20472: return target_->Logv(log_level, format, ap); 20472: } 20472: size_t GetLogFileSize() const override { return target_->GetLogFileSize(); } 20472: void Flush() override { return target_->Flush(); } 20472: InfoLogLevel GetInfoLogLevel() const override { 20472: return target_->GetInfoLogLevel(); 20472: } 20472: void SetInfoLogLevel(const InfoLogLevel log_level) override { 20472: return target_->SetInfoLogLevel(log_level); 20472: } 20472: 20472: private: 20472: Logger* target_; 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: Env* NewMemEnv(Env* base_env); 20472: 20472: 20472: 20472: Status NewHdfsEnv(Env** hdfs_env, const std::string& fsname); 20472: 20472: 20472: 20472: 20472: Env* NewTimedEnv(Env* base_env); 20472: 20472: 20472: 20472: 20472: Status NewEnvLogger(const std::string& fname, Env* env, 20472: std::shared_ptr* result); 20472: 20472: std::unique_ptr NewCompositeEnv(std::shared_ptr fs); 20472: 20472: } 20472: # 22 "./include/rocksdb/options.h" 2 20472: # 1 "./include/rocksdb/file_checksum.h" 1 20472: # 9 "./include/rocksdb/file_checksum.h" 20472: 20472: 20472: # 1 "/usr/include/c++/10/cassert" 1 3 20472: # 41 "/usr/include/c++/10/cassert" 3 20472: 20472: # 42 "/usr/include/c++/10/cassert" 3 20472: 20472: 20472: # 1 "/usr/include/assert.h" 1 3 4 20472: # 45 "/usr/include/c++/10/cassert" 2 3 20472: # 12 "./include/rocksdb/file_checksum.h" 2 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: namespace rocksdb { 20472: 20472: 20472: constexpr char kUnknownFileChecksum[] = ""; 20472: 20472: constexpr char kUnknownFileChecksumFuncName[] = "Unknown"; 20472: 20472: struct FileChecksumGenContext { 20472: std::string file_name; 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: class FileChecksumGenerator { 20472: public: 20472: virtual ~FileChecksumGenerator() {} 20472: 20472: 20472: 20472: 20472: virtual void Update(const char* data, size_t n) = 0; 20472: 20472: 20472: virtual void Finalize() = 0; 20472: 20472: 20472: 20472: virtual std::string GetChecksum() const = 0; 20472: 20472: 20472: virtual const char* Name() const = 0; 20472: }; 20472: 20472: 20472: class FileChecksumGenFactory { 20472: public: 20472: virtual ~FileChecksumGenFactory() {} 20472: 20472: 20472: virtual std::unique_ptr CreateFileChecksumGenerator( 20472: const FileChecksumGenContext& context) = 0; 20472: 20472: 20472: virtual const char* Name() const = 0; 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: class FileChecksumList { 20472: public: 20472: virtual ~FileChecksumList() {} 20472: 20472: 20472: virtual void reset() = 0; 20472: 20472: 20472: virtual size_t size() const = 0; 20472: 20472: 20472: 20472: 20472: virtual Status GetAllFileChecksums( 20472: std::vector* file_numbers, std::vector* checksums, 20472: std::vector* checksum_func_names) = 0; 20472: 20472: 20472: 20472: virtual Status SearchOneFileChecksum(uint64_t file_number, 20472: std::string* checksum, 20472: std::string* checksum_func_name) = 0; 20472: 20472: 20472: virtual Status InsertOneFileChecksum( 20472: uint64_t file_number, const std::string& checksum, 20472: const std::string& checksum_func_name) = 0; 20472: 20472: 20472: virtual Status RemoveOneFileChecksum(uint64_t file_number) = 0; 20472: }; 20472: 20472: 20472: extern FileChecksumList* NewFileChecksumList(); 20472: # 117 "./include/rocksdb/file_checksum.h" 20472: extern std::shared_ptr 20472: GetFileChecksumGenCrc32cFactory(); 20472: 20472: } 20472: # 23 "./include/rocksdb/options.h" 2 20472: 20472: 20472: # 1 "./include/rocksdb/version.h" 1 20472: 20472: 20472: 20472: 20472: 20472: # 26 "./include/rocksdb/options.h" 2 20472: # 1 "./include/rocksdb/write_buffer_manager.h" 1 20472: # 13 "./include/rocksdb/write_buffer_manager.h" 20472: 20472: 20472: 20472: 20472: # 1 "./include/rocksdb/cache.h" 1 20472: # 23 "./include/rocksdb/cache.h" 20472: 20472: 20472: 20472: 20472: 20472: # 1 "./include/rocksdb/memory_allocator.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: namespace rocksdb { 20472: 20472: 20472: 20472: 20472: 20472: class MemoryAllocator { 20472: public: 20472: virtual ~MemoryAllocator() = default; 20472: 20472: 20472: virtual const char* Name() const = 0; 20472: 20472: 20472: virtual void* Allocate(size_t size) = 0; 20472: 20472: 20472: virtual void Deallocate(void* p) = 0; 20472: 20472: 20472: 20472: virtual size_t UsableSize(void* , size_t allocation_size) const { 20472: 20472: return allocation_size; 20472: } 20472: }; 20472: 20472: struct JemallocAllocatorOptions { 20472: 20472: 20472: 20472: 20472: 20472: bool limit_tcache_size = false; 20472: 20472: 20472: 20472: size_t tcache_size_lower_bound = 1024; 20472: 20472: 20472: 20472: size_t tcache_size_upper_bound = 16 * 1024; 20472: }; 20472: # 73 "./include/rocksdb/memory_allocator.h" 20472: extern Status NewJemallocNodumpAllocator( 20472: JemallocAllocatorOptions& options, 20472: std::shared_ptr* memory_allocator); 20472: 20472: } 20472: # 29 "./include/rocksdb/cache.h" 2 20472: 20472: # 1 "./include/rocksdb/statistics.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 18 "./include/rocksdb/statistics.h" 20472: namespace rocksdb { 20472: # 28 "./include/rocksdb/statistics.h" 20472: enum Tickers : uint32_t { 20472: 20472: 20472: 20472: 20472: BLOCK_CACHE_MISS = 0, 20472: 20472: 20472: 20472: 20472: BLOCK_CACHE_HIT, 20472: 20472: BLOCK_CACHE_ADD, 20472: 20472: BLOCK_CACHE_ADD_FAILURES, 20472: 20472: BLOCK_CACHE_INDEX_MISS, 20472: 20472: BLOCK_CACHE_INDEX_HIT, 20472: 20472: BLOCK_CACHE_INDEX_ADD, 20472: 20472: BLOCK_CACHE_INDEX_BYTES_INSERT, 20472: 20472: BLOCK_CACHE_INDEX_BYTES_EVICT, 20472: 20472: BLOCK_CACHE_FILTER_MISS, 20472: 20472: BLOCK_CACHE_FILTER_HIT, 20472: 20472: BLOCK_CACHE_FILTER_ADD, 20472: 20472: BLOCK_CACHE_FILTER_BYTES_INSERT, 20472: 20472: BLOCK_CACHE_FILTER_BYTES_EVICT, 20472: 20472: BLOCK_CACHE_DATA_MISS, 20472: 20472: BLOCK_CACHE_DATA_HIT, 20472: 20472: BLOCK_CACHE_DATA_ADD, 20472: 20472: BLOCK_CACHE_DATA_BYTES_INSERT, 20472: 20472: BLOCK_CACHE_BYTES_READ, 20472: 20472: BLOCK_CACHE_BYTES_WRITE, 20472: 20472: 20472: BLOOM_FILTER_USEFUL, 20472: 20472: BLOOM_FILTER_FULL_POSITIVE, 20472: 20472: 20472: BLOOM_FILTER_FULL_TRUE_POSITIVE, 20472: 20472: BLOOM_FILTER_MICROS, 20472: 20472: 20472: PERSISTENT_CACHE_HIT, 20472: 20472: PERSISTENT_CACHE_MISS, 20472: 20472: 20472: SIM_BLOCK_CACHE_HIT, 20472: 20472: SIM_BLOCK_CACHE_MISS, 20472: 20472: 20472: MEMTABLE_HIT, 20472: 20472: MEMTABLE_MISS, 20472: 20472: 20472: GET_HIT_L0, 20472: 20472: GET_HIT_L1, 20472: 20472: GET_HIT_L2_AND_UP, 20472: 20472: 20472: 20472: 20472: 20472: COMPACTION_KEY_DROP_NEWER_ENTRY, 20472: 20472: COMPACTION_KEY_DROP_OBSOLETE, 20472: COMPACTION_KEY_DROP_RANGE_DEL, 20472: COMPACTION_KEY_DROP_USER, 20472: COMPACTION_RANGE_DEL_DROP_OBSOLETE, 20472: 20472: COMPACTION_OPTIMIZED_DEL_DROP_OBSOLETE, 20472: 20472: COMPACTION_CANCELLED, 20472: 20472: 20472: NUMBER_KEYS_WRITTEN, 20472: 20472: NUMBER_KEYS_READ, 20472: 20472: NUMBER_KEYS_UPDATED, 20472: 20472: 20472: BYTES_WRITTEN, 20472: 20472: 20472: 20472: 20472: BYTES_READ, 20472: 20472: NUMBER_DB_SEEK, 20472: NUMBER_DB_NEXT, 20472: NUMBER_DB_PREV, 20472: 20472: NUMBER_DB_SEEK_FOUND, 20472: NUMBER_DB_NEXT_FOUND, 20472: NUMBER_DB_PREV_FOUND, 20472: 20472: 20472: ITER_BYTES_READ, 20472: NO_FILE_CLOSES, 20472: NO_FILE_OPENS, 20472: NO_FILE_ERRORS, 20472: 20472: STALL_L0_SLOWDOWN_MICROS, 20472: 20472: STALL_MEMTABLE_COMPACTION_MICROS, 20472: 20472: STALL_L0_NUM_FILES_MICROS, 20472: 20472: STALL_MICROS, 20472: 20472: 20472: DB_MUTEX_WAIT_MICROS, 20472: RATE_LIMIT_DELAY_MILLIS, 20472: 20472: NO_ITERATORS, 20472: 20472: 20472: NUMBER_MULTIGET_CALLS, 20472: NUMBER_MULTIGET_KEYS_READ, 20472: NUMBER_MULTIGET_BYTES_READ, 20472: 20472: 20472: 20472: NUMBER_FILTERED_DELETES, 20472: NUMBER_MERGE_FAILURES, 20472: 20472: 20472: 20472: 20472: BLOOM_FILTER_PREFIX_CHECKED, 20472: BLOOM_FILTER_PREFIX_USEFUL, 20472: 20472: 20472: 20472: NUMBER_OF_RESEEKS_IN_ITERATION, 20472: 20472: 20472: 20472: GET_UPDATES_SINCE_CALLS, 20472: BLOCK_CACHE_COMPRESSED_MISS, 20472: BLOCK_CACHE_COMPRESSED_HIT, 20472: 20472: BLOCK_CACHE_COMPRESSED_ADD, 20472: 20472: BLOCK_CACHE_COMPRESSED_ADD_FAILURES, 20472: WAL_FILE_SYNCED, 20472: WAL_FILE_BYTES, 20472: 20472: 20472: 20472: WRITE_DONE_BY_SELF, 20472: WRITE_DONE_BY_OTHER, 20472: WRITE_TIMEDOUT, 20472: WRITE_WITH_WAL, 20472: COMPACT_READ_BYTES, 20472: COMPACT_WRITE_BYTES, 20472: FLUSH_WRITE_BYTES, 20472: 20472: 20472: 20472: NUMBER_DIRECT_LOAD_TABLE_PROPERTIES, 20472: NUMBER_SUPERVERSION_ACQUIRES, 20472: NUMBER_SUPERVERSION_RELEASES, 20472: NUMBER_SUPERVERSION_CLEANUPS, 20472: 20472: 20472: NUMBER_BLOCK_COMPRESSED, 20472: NUMBER_BLOCK_DECOMPRESSED, 20472: 20472: NUMBER_BLOCK_NOT_COMPRESSED, 20472: MERGE_OPERATION_TOTAL_TIME, 20472: FILTER_OPERATION_TOTAL_TIME, 20472: 20472: 20472: ROW_CACHE_HIT, 20472: ROW_CACHE_MISS, 20472: 20472: 20472: 20472: 20472: 20472: 20472: READ_AMP_ESTIMATE_USEFUL_BYTES, 20472: READ_AMP_TOTAL_READ_BYTES, 20472: 20472: 20472: NUMBER_RATE_LIMITER_DRAINS, 20472: 20472: 20472: NUMBER_ITER_SKIP, 20472: 20472: 20472: 20472: BLOB_DB_NUM_PUT, 20472: 20472: BLOB_DB_NUM_WRITE, 20472: 20472: BLOB_DB_NUM_GET, 20472: 20472: BLOB_DB_NUM_MULTIGET, 20472: 20472: BLOB_DB_NUM_SEEK, 20472: 20472: BLOB_DB_NUM_NEXT, 20472: 20472: BLOB_DB_NUM_PREV, 20472: 20472: BLOB_DB_NUM_KEYS_WRITTEN, 20472: 20472: BLOB_DB_NUM_KEYS_READ, 20472: 20472: BLOB_DB_BYTES_WRITTEN, 20472: 20472: BLOB_DB_BYTES_READ, 20472: 20472: BLOB_DB_WRITE_INLINED, 20472: 20472: BLOB_DB_WRITE_INLINED_TTL, 20472: 20472: BLOB_DB_WRITE_BLOB, 20472: 20472: BLOB_DB_WRITE_BLOB_TTL, 20472: 20472: BLOB_DB_BLOB_FILE_BYTES_WRITTEN, 20472: 20472: BLOB_DB_BLOB_FILE_BYTES_READ, 20472: 20472: BLOB_DB_BLOB_FILE_SYNCED, 20472: 20472: 20472: BLOB_DB_BLOB_INDEX_EXPIRED_COUNT, 20472: 20472: 20472: BLOB_DB_BLOB_INDEX_EXPIRED_SIZE, 20472: 20472: 20472: BLOB_DB_BLOB_INDEX_EVICTED_COUNT, 20472: 20472: 20472: BLOB_DB_BLOB_INDEX_EVICTED_SIZE, 20472: 20472: BLOB_DB_GC_NUM_FILES, 20472: 20472: BLOB_DB_GC_NUM_NEW_FILES, 20472: 20472: BLOB_DB_GC_FAILURES, 20472: 20472: 20472: BLOB_DB_GC_NUM_KEYS_OVERWRITTEN, 20472: 20472: 20472: BLOB_DB_GC_NUM_KEYS_EXPIRED, 20472: 20472: BLOB_DB_GC_NUM_KEYS_RELOCATED, 20472: 20472: 20472: BLOB_DB_GC_BYTES_OVERWRITTEN, 20472: 20472: 20472: BLOB_DB_GC_BYTES_EXPIRED, 20472: 20472: BLOB_DB_GC_BYTES_RELOCATED, 20472: 20472: BLOB_DB_FIFO_NUM_FILES_EVICTED, 20472: 20472: BLOB_DB_FIFO_NUM_KEYS_EVICTED, 20472: 20472: BLOB_DB_FIFO_BYTES_EVICTED, 20472: 20472: 20472: 20472: 20472: TXN_PREPARE_MUTEX_OVERHEAD, 20472: 20472: TXN_OLD_COMMIT_MAP_MUTEX_OVERHEAD, 20472: 20472: TXN_DUPLICATE_KEY_OVERHEAD, 20472: 20472: TXN_SNAPSHOT_MUTEX_OVERHEAD, 20472: 20472: TXN_GET_TRY_AGAIN, 20472: 20472: 20472: 20472: 20472: NUMBER_MULTIGET_KEYS_FOUND, 20472: 20472: NO_ITERATOR_CREATED, 20472: NO_ITERATOR_DELETED, 20472: 20472: BLOCK_CACHE_COMPRESSION_DICT_MISS, 20472: BLOCK_CACHE_COMPRESSION_DICT_HIT, 20472: BLOCK_CACHE_COMPRESSION_DICT_ADD, 20472: BLOCK_CACHE_COMPRESSION_DICT_BYTES_INSERT, 20472: BLOCK_CACHE_COMPRESSION_DICT_BYTES_EVICT, 20472: 20472: 20472: 20472: BLOCK_CACHE_ADD_REDUNDANT, 20472: 20472: 20472: BLOCK_CACHE_INDEX_ADD_REDUNDANT, 20472: 20472: 20472: BLOCK_CACHE_FILTER_ADD_REDUNDANT, 20472: 20472: 20472: BLOCK_CACHE_DATA_ADD_REDUNDANT, 20472: 20472: 20472: 20472: BLOCK_CACHE_COMPRESSION_DICT_ADD_REDUNDANT, 20472: 20472: 20472: 20472: FILES_MARKED_TRASH, 20472: 20472: FILES_DELETED_IMMEDIATELY, 20472: 20472: TICKER_ENUM_MAX 20472: }; 20472: 20472: 20472: 20472: extern const std::vector> TickersNameMap; 20472: # 384 "./include/rocksdb/statistics.h" 20472: enum Histograms : uint32_t { 20472: DB_GET = 0, 20472: DB_WRITE, 20472: COMPACTION_TIME, 20472: COMPACTION_CPU_TIME, 20472: SUBCOMPACTION_SETUP_TIME, 20472: TABLE_SYNC_MICROS, 20472: COMPACTION_OUTFILE_SYNC_MICROS, 20472: WAL_FILE_SYNC_MICROS, 20472: MANIFEST_FILE_SYNC_MICROS, 20472: 20472: TABLE_OPEN_IO_MICROS, 20472: DB_MULTIGET, 20472: READ_BLOCK_COMPACTION_MICROS, 20472: READ_BLOCK_GET_MICROS, 20472: WRITE_RAW_BLOCK_MICROS, 20472: STALL_L0_SLOWDOWN_COUNT, 20472: STALL_MEMTABLE_COMPACTION_COUNT, 20472: STALL_L0_NUM_FILES_COUNT, 20472: HARD_RATE_LIMIT_DELAY_COUNT, 20472: SOFT_RATE_LIMIT_DELAY_COUNT, 20472: NUM_FILES_IN_SINGLE_COMPACTION, 20472: DB_SEEK, 20472: WRITE_STALL, 20472: SST_READ_MICROS, 20472: 20472: NUM_SUBCOMPACTIONS_SCHEDULED, 20472: 20472: BYTES_PER_READ, 20472: BYTES_PER_WRITE, 20472: BYTES_PER_MULTIGET, 20472: 20472: 20472: 20472: BYTES_COMPRESSED, 20472: BYTES_DECOMPRESSED, 20472: COMPRESSION_TIMES_NANOS, 20472: DECOMPRESSION_TIMES_NANOS, 20472: 20472: 20472: READ_NUM_MERGE_OPERANDS, 20472: 20472: 20472: 20472: BLOB_DB_KEY_SIZE, 20472: 20472: BLOB_DB_VALUE_SIZE, 20472: 20472: BLOB_DB_WRITE_MICROS, 20472: 20472: BLOB_DB_GET_MICROS, 20472: 20472: BLOB_DB_MULTIGET_MICROS, 20472: 20472: BLOB_DB_SEEK_MICROS, 20472: 20472: BLOB_DB_NEXT_MICROS, 20472: 20472: BLOB_DB_PREV_MICROS, 20472: 20472: BLOB_DB_BLOB_FILE_WRITE_MICROS, 20472: 20472: BLOB_DB_BLOB_FILE_READ_MICROS, 20472: 20472: BLOB_DB_BLOB_FILE_SYNC_MICROS, 20472: 20472: BLOB_DB_GC_MICROS, 20472: 20472: BLOB_DB_COMPRESSION_MICROS, 20472: 20472: BLOB_DB_DECOMPRESSION_MICROS, 20472: 20472: FLUSH_TIME, 20472: SST_BATCH_SIZE, 20472: 20472: HISTOGRAM_ENUM_MAX, 20472: }; 20472: 20472: extern const std::vector> HistogramsNameMap; 20472: 20472: struct HistogramData { 20472: double median; 20472: double percentile95; 20472: double percentile99; 20472: double average; 20472: double standard_deviation; 20472: 20472: 20472: double max = 0.0; 20472: uint64_t count = 0; 20472: uint64_t sum = 0; 20472: double min = 0.0; 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: enum StatsLevel : uint8_t { 20472: 20472: kExceptHistogramOrTimers, 20472: 20472: kExceptTimers, 20472: 20472: 20472: kExceptDetailedTimers, 20472: 20472: 20472: kExceptTimeForMutex, 20472: 20472: 20472: 20472: kAll, 20472: }; 20472: # 508 "./include/rocksdb/statistics.h" 20472: class Statistics { 20472: public: 20472: virtual ~Statistics() {} 20472: static const char* Type() { return "Statistics"; } 20472: virtual uint64_t getTickerCount(uint32_t tickerType) const = 0; 20472: virtual void histogramData(uint32_t type, 20472: HistogramData* const data) const = 0; 20472: virtual std::string getHistogramString(uint32_t ) const { return ""; } 20472: virtual void recordTick(uint32_t tickerType, uint64_t count = 0) = 0; 20472: virtual void setTickerCount(uint32_t tickerType, uint64_t count) = 0; 20472: virtual uint64_t getAndResetTickerCount(uint32_t tickerType) = 0; 20472: virtual void reportTimeToHistogram(uint32_t histogramType, uint64_t time) { 20472: if (get_stats_level() <= StatsLevel::kExceptTimers) { 20472: return; 20472: } 20472: recordInHistogram(histogramType, time); 20472: } 20472: 20472: 20472: 20472: virtual void measureTime(uint32_t , uint64_t ) { 20472: 20472: 20472: # 530 "./include/rocksdb/statistics.h" 3 4 20472: (static_cast ( 20472: # 530 "./include/rocksdb/statistics.h" 20472: false 20472: # 530 "./include/rocksdb/statistics.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 530 "./include/rocksdb/statistics.h" 20472: "false" 20472: # 530 "./include/rocksdb/statistics.h" 3 4 20472: , "./include/rocksdb/statistics.h", 530, __extension__ __PRETTY_FUNCTION__)) 20472: # 530 "./include/rocksdb/statistics.h" 20472: ; 20472: } 20472: virtual void recordInHistogram(uint32_t histogramType, uint64_t time) { 20472: 20472: 20472: 20472: 20472: measureTime(histogramType, time); 20472: } 20472: 20472: 20472: virtual Status Reset() { return Status::NotSupported("Not implemented"); } 20472: 20472: 20472: virtual std::string ToString() const { 20472: 20472: return std::string("ToString(): not implemented"); 20472: } 20472: 20472: virtual bool getTickerMap(std::map*) const { 20472: 20472: return false; 20472: } 20472: 20472: 20472: virtual bool HistEnabledForType(uint32_t type) const { 20472: return type < HISTOGRAM_ENUM_MAX; 20472: } 20472: void set_stats_level(StatsLevel sl) { 20472: stats_level_.store(sl, std::memory_order_relaxed); 20472: } 20472: StatsLevel get_stats_level() const { 20472: return stats_level_.load(std::memory_order_relaxed); 20472: } 20472: 20472: private: 20472: std::atomic stats_level_{kExceptDetailedTimers}; 20472: }; 20472: 20472: 20472: std::shared_ptr CreateDBStatistics(); 20472: 20472: } 20472: # 31 "./include/rocksdb/cache.h" 2 20472: 20472: 20472: namespace rocksdb { 20472: 20472: class Cache; 20472: struct ConfigOptions; 20472: 20472: extern const bool kDefaultToAdaptiveMutex; 20472: 20472: enum CacheMetadataChargePolicy { 20472: kDontChargeCacheMetadata, 20472: kFullChargeCacheMetadata 20472: }; 20472: const CacheMetadataChargePolicy kDefaultCacheMetadataChargePolicy = 20472: kFullChargeCacheMetadata; 20472: 20472: struct LRUCacheOptions { 20472: 20472: size_t capacity = 0; 20472: 20472: 20472: 20472: 20472: int num_shard_bits = -1; 20472: 20472: 20472: 20472: bool strict_capacity_limit = false; 20472: # 70 "./include/rocksdb/cache.h" 20472: double high_pri_pool_ratio = 0.5; 20472: # 79 "./include/rocksdb/cache.h" 20472: std::shared_ptr memory_allocator; 20472: 20472: 20472: 20472: 20472: 20472: bool use_adaptive_mutex = kDefaultToAdaptiveMutex; 20472: 20472: CacheMetadataChargePolicy metadata_charge_policy = 20472: kDefaultCacheMetadataChargePolicy; 20472: 20472: LRUCacheOptions() {} 20472: LRUCacheOptions(size_t _capacity, int _num_shard_bits, 20472: bool _strict_capacity_limit, double _high_pri_pool_ratio, 20472: std::shared_ptr _memory_allocator = nullptr, 20472: bool _use_adaptive_mutex = kDefaultToAdaptiveMutex, 20472: CacheMetadataChargePolicy _metadata_charge_policy = 20472: kDefaultCacheMetadataChargePolicy) 20472: : capacity(_capacity), 20472: num_shard_bits(_num_shard_bits), 20472: strict_capacity_limit(_strict_capacity_limit), 20472: high_pri_pool_ratio(_high_pri_pool_ratio), 20472: memory_allocator(std::move(_memory_allocator)), 20472: use_adaptive_mutex(_use_adaptive_mutex), 20472: metadata_charge_policy(_metadata_charge_policy) {} 20472: }; 20472: # 114 "./include/rocksdb/cache.h" 20472: extern std::shared_ptr NewLRUCache( 20472: size_t capacity, int num_shard_bits = -1, 20472: bool strict_capacity_limit = false, double high_pri_pool_ratio = 0.5, 20472: std::shared_ptr memory_allocator = nullptr, 20472: bool use_adaptive_mutex = kDefaultToAdaptiveMutex, 20472: CacheMetadataChargePolicy metadata_charge_policy = 20472: kDefaultCacheMetadataChargePolicy); 20472: 20472: extern std::shared_ptr NewLRUCache(const LRUCacheOptions& cache_opts); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern std::shared_ptr NewClockCache( 20472: size_t capacity, int num_shard_bits = -1, 20472: bool strict_capacity_limit = false, 20472: CacheMetadataChargePolicy metadata_charge_policy = 20472: kDefaultCacheMetadataChargePolicy); 20472: class Cache { 20472: public: 20472: 20472: 20472: enum class Priority { HIGH, LOW }; 20472: 20472: Cache(std::shared_ptr allocator = nullptr) 20472: : memory_allocator_(std::move(allocator)) {} 20472: 20472: Cache(const Cache&) = delete; 20472: Cache& operator=(const Cache&) = delete; 20472: # 157 "./include/rocksdb/cache.h" 20472: static Status CreateFromString(const ConfigOptions& config_options, 20472: const std::string& value, 20472: std::shared_ptr* result); 20472: 20472: 20472: 20472: 20472: 20472: virtual ~Cache() {} 20472: 20472: 20472: struct Handle {}; 20472: 20472: 20472: virtual const char* Name() const = 0; 20472: # 188 "./include/rocksdb/cache.h" 20472: virtual Status Insert(const Slice& key, void* value, size_t charge, 20472: void (*deleter)(const Slice& key, void* value), 20472: Handle** handle = nullptr, 20472: Priority priority = Priority::LOW) = 0; 20472: # 200 "./include/rocksdb/cache.h" 20472: virtual Handle* Lookup(const Slice& key, Statistics* stats = nullptr) = 0; 20472: 20472: 20472: 20472: 20472: 20472: virtual bool Ref(Handle* handle) = 0; 20472: # 220 "./include/rocksdb/cache.h" 20472: virtual bool Release(Handle* handle, bool force_erase = false) = 0; 20472: 20472: 20472: 20472: 20472: 20472: virtual void* Value(Handle* handle) = 0; 20472: 20472: 20472: 20472: 20472: virtual void Erase(const Slice& key) = 0; 20472: 20472: 20472: 20472: 20472: virtual uint64_t NewId() = 0; 20472: 20472: 20472: 20472: 20472: 20472: virtual void SetCapacity(size_t capacity) = 0; 20472: 20472: 20472: 20472: virtual void SetStrictCapacityLimit(bool strict_capacity_limit) = 0; 20472: 20472: 20472: 20472: virtual bool HasStrictCapacityLimit() const = 0; 20472: 20472: 20472: virtual size_t GetCapacity() const = 0; 20472: 20472: 20472: virtual size_t GetUsage() const = 0; 20472: 20472: 20472: virtual size_t GetUsage(Handle* handle) const = 0; 20472: 20472: 20472: virtual size_t GetPinnedUsage() const = 0; 20472: 20472: 20472: virtual size_t GetCharge(Handle* handle) const = 0; 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual void DisownData(){ 20472: 20472: } 20472: 20472: 20472: 20472: 20472: virtual void ApplyToAllCacheEntries(void (*callback)(void*, size_t), 20472: bool thread_safe) = 0; 20472: 20472: 20472: 20472: virtual void EraseUnRefEntries() = 0; 20472: 20472: virtual std::string GetPrintableOptions() const { return ""; } 20472: 20472: MemoryAllocator* memory_allocator() const { return memory_allocator_.get(); } 20472: 20472: private: 20472: std::shared_ptr memory_allocator_; 20472: }; 20472: 20472: } 20472: # 18 "./include/rocksdb/write_buffer_manager.h" 2 20472: 20472: namespace rocksdb { 20472: 20472: class WriteBufferManager { 20472: public: 20472: 20472: 20472: 20472: 20472: explicit WriteBufferManager(size_t _buffer_size, 20472: std::shared_ptr cache = {}); 20472: 20472: WriteBufferManager(const WriteBufferManager&) = delete; 20472: WriteBufferManager& operator=(const WriteBufferManager&) = delete; 20472: 20472: ~WriteBufferManager(); 20472: 20472: bool enabled() const { return buffer_size_ != 0; } 20472: 20472: bool cost_to_cache() const { return cache_rep_ != nullptr; } 20472: 20472: 20472: size_t memory_usage() const { 20472: return memory_used_.load(std::memory_order_relaxed); 20472: } 20472: size_t mutable_memtable_memory_usage() const { 20472: return memory_active_.load(std::memory_order_relaxed); 20472: } 20472: size_t buffer_size() const { return buffer_size_; } 20472: 20472: 20472: bool ShouldFlush() const { 20472: if (enabled()) { 20472: if (mutable_memtable_memory_usage() > mutable_limit_) { 20472: return true; 20472: } 20472: if (memory_usage() >= buffer_size_ && 20472: mutable_memtable_memory_usage() >= buffer_size_ / 2) { 20472: 20472: 20472: 20472: return true; 20472: } 20472: } 20472: return false; 20472: } 20472: 20472: void ReserveMem(size_t mem) { 20472: if (cache_rep_ != nullptr) { 20472: ReserveMemWithCache(mem); 20472: } else if (enabled()) { 20472: memory_used_.fetch_add(mem, std::memory_order_relaxed); 20472: } 20472: if (enabled()) { 20472: memory_active_.fetch_add(mem, std::memory_order_relaxed); 20472: } 20472: } 20472: 20472: 20472: void ScheduleFreeMem(size_t mem) { 20472: if (enabled()) { 20472: memory_active_.fetch_sub(mem, std::memory_order_relaxed); 20472: } 20472: } 20472: void FreeMem(size_t mem) { 20472: if (cache_rep_ != nullptr) { 20472: FreeMemWithCache(mem); 20472: } else if (enabled()) { 20472: memory_used_.fetch_sub(mem, std::memory_order_relaxed); 20472: } 20472: } 20472: 20472: private: 20472: const size_t buffer_size_; 20472: const size_t mutable_limit_; 20472: std::atomic memory_used_; 20472: 20472: std::atomic memory_active_; 20472: struct CacheRep; 20472: std::unique_ptr cache_rep_; 20472: 20472: void ReserveMemWithCache(size_t mem); 20472: void FreeMemWithCache(size_t mem); 20472: }; 20472: } 20472: # 27 "./include/rocksdb/options.h" 2 20472: 20472: 20472: 20472: 20472: 20472: namespace rocksdb { 20472: 20472: class Cache; 20472: class CompactionFilter; 20472: class CompactionFilterFactory; 20472: class Comparator; 20472: class ConcurrentTaskLimiter; 20472: class Env; 20472: enum InfoLogLevel : unsigned char; 20472: class SstFileManager; 20472: class FilterPolicy; 20472: class Logger; 20472: class MergeOperator; 20472: class Snapshot; 20472: class MemTableRepFactory; 20472: class RateLimiter; 20472: class Slice; 20472: class Statistics; 20472: class InternalKeyComparator; 20472: class WalFilter; 20472: class FileSystem; 20472: 20472: enum class CpuPriority { 20472: kIdle = 0, 20472: kLow = 1, 20472: kNormal = 2, 20472: kHigh = 3, 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: enum CompressionType : unsigned char { 20472: 20472: 20472: kNoCompression = 0x0, 20472: kSnappyCompression = 0x1, 20472: kZlibCompression = 0x2, 20472: kBZip2Compression = 0x3, 20472: kLZ4Compression = 0x4, 20472: kLZ4HCCompression = 0x5, 20472: kXpressCompression = 0x6, 20472: kZSTD = 0x7, 20472: 20472: 20472: 20472: 20472: 20472: 20472: kZSTDNotFinalCompression = 0x40, 20472: 20472: 20472: kDisableCompressionOption = 0xff, 20472: }; 20472: 20472: struct Options; 20472: struct DbPath; 20472: 20472: struct ColumnFamilyOptions : public AdvancedColumnFamilyOptions { 20472: 20472: 20472: ColumnFamilyOptions* OldDefaults(int rocksdb_major_version = 4, 20472: int rocksdb_minor_version = 6); 20472: 20472: 20472: 20472: 20472: 20472: ColumnFamilyOptions* OptimizeForSmallDb( 20472: std::shared_ptr* cache = nullptr); 20472: 20472: 20472: 20472: 20472: 20472: ColumnFamilyOptions* OptimizeForPointLookup(uint64_t block_cache_size_mb); 20472: # 126 "./include/rocksdb/options.h" 20472: ColumnFamilyOptions* OptimizeLevelStyleCompaction( 20472: uint64_t memtable_memory_budget = 512 * 1024 * 1024); 20472: ColumnFamilyOptions* OptimizeUniversalStyleCompaction( 20472: uint64_t memtable_memory_budget = 512 * 1024 * 1024); 20472: # 140 "./include/rocksdb/options.h" 20472: const Comparator* comparator = BytewiseComparator(); 20472: # 152 "./include/rocksdb/options.h" 20472: std::shared_ptr merge_operator = nullptr; 20472: # 169 "./include/rocksdb/options.h" 20472: const CompactionFilter* compaction_filter = nullptr; 20472: # 179 "./include/rocksdb/options.h" 20472: std::shared_ptr compaction_filter_factory = nullptr; 20472: # 200 "./include/rocksdb/options.h" 20472: size_t write_buffer_size = 64 << 20; 20472: # 227 "./include/rocksdb/options.h" 20472: CompressionType compression; 20472: 20472: 20472: 20472: 20472: 20472: CompressionType bottommost_compression = kDisableCompressionOption; 20472: 20472: 20472: 20472: 20472: CompressionOptions bottommost_compression_opts; 20472: 20472: 20472: CompressionOptions compression_opts; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: int level0_file_num_compaction_trigger = 4; 20472: # 265 "./include/rocksdb/options.h" 20472: std::shared_ptr prefix_extractor = nullptr; 20472: # 279 "./include/rocksdb/options.h" 20472: uint64_t max_bytes_for_level_base = 256 * 1048576; 20472: 20472: 20472: uint64_t snap_refresh_nanos = 0; 20472: 20472: 20472: 20472: 20472: 20472: bool disable_auto_compactions = false; 20472: 20472: 20472: 20472: 20472: 20472: std::shared_ptr table_factory; 20472: # 308 "./include/rocksdb/options.h" 20472: std::vector cf_paths; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: std::shared_ptr compaction_thread_limiter = nullptr; 20472: 20472: 20472: ColumnFamilyOptions(); 20472: 20472: explicit ColumnFamilyOptions(const Options& options); 20472: 20472: void Dump(Logger* log) const; 20472: }; 20472: 20472: enum class WALRecoveryMode : char { 20472: 20472: 20472: 20472: kTolerateCorruptedTailRecords = 0x00, 20472: 20472: 20472: 20472: 20472: kAbsoluteConsistency = 0x01, 20472: 20472: 20472: 20472: 20472: kPointInTimeRecovery = 0x02, 20472: 20472: 20472: 20472: 20472: 20472: kSkipAnyCorruptedRecords = 0x03, 20472: }; 20472: 20472: struct DbPath { 20472: std::string path; 20472: uint64_t target_size; 20472: 20472: DbPath() : target_size(0) {} 20472: DbPath(const std::string& p, uint64_t t) : path(p), target_size(t) {} 20472: }; 20472: 20472: struct DBOptions { 20472: 20472: DBOptions* OldDefaults(int rocksdb_major_version = 4, 20472: int rocksdb_minor_version = 6); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: DBOptions* OptimizeForSmallDb(std::shared_ptr* cache = nullptr); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: DBOptions* IncreaseParallelism(int total_threads = 16); 20472: 20472: 20472: 20472: 20472: bool create_if_missing = false; 20472: 20472: 20472: 20472: bool create_missing_column_families = false; 20472: 20472: 20472: 20472: bool error_if_exists = false; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: bool paranoid_checks = true; 20472: 20472: 20472: 20472: 20472: 20472: 20472: Env* env = Env::Default(); 20472: 20472: 20472: 20472: 20472: 20472: std::shared_ptr rate_limiter = nullptr; 20472: # 426 "./include/rocksdb/options.h" 20472: std::shared_ptr sst_file_manager = nullptr; 20472: 20472: 20472: 20472: 20472: 20472: std::shared_ptr info_log = nullptr; 20472: 20472: 20472: 20472: 20472: InfoLogLevel info_log_level = DEBUG_LEVEL; 20472: # 449 "./include/rocksdb/options.h" 20472: int max_open_files = -1; 20472: 20472: 20472: 20472: 20472: int max_file_opening_threads = 16; 20472: # 467 "./include/rocksdb/options.h" 20472: uint64_t max_total_wal_size = 0; 20472: 20472: 20472: std::shared_ptr statistics = nullptr; 20472: # 480 "./include/rocksdb/options.h" 20472: bool use_fsync = false; 20472: # 506 "./include/rocksdb/options.h" 20472: std::vector db_paths; 20472: 20472: 20472: 20472: 20472: 20472: 20472: std::string db_log_dir = ""; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: std::string wal_dir = ""; 20472: # 531 "./include/rocksdb/options.h" 20472: uint64_t delete_obsolete_files_period_micros = 6ULL * 60 * 60 * 1000000; 20472: 20472: 20472: 20472: 20472: 20472: 20472: int max_background_jobs = 2; 20472: 20472: 20472: 20472: 20472: 20472: int base_background_compactions = -1; 20472: # 562 "./include/rocksdb/options.h" 20472: int max_background_compactions = -1; 20472: 20472: 20472: 20472: 20472: 20472: uint32_t max_subcompactions = 1; 20472: # 590 "./include/rocksdb/options.h" 20472: int max_background_flushes = -1; 20472: 20472: 20472: 20472: 20472: 20472: 20472: size_t max_log_file_size = 0; 20472: 20472: 20472: 20472: 20472: 20472: 20472: size_t log_file_time_to_roll = 0; 20472: 20472: 20472: 20472: size_t keep_log_file_num = 1000; 20472: # 618 "./include/rocksdb/options.h" 20472: size_t recycle_log_file_num = 0; 20472: 20472: 20472: 20472: 20472: 20472: uint64_t max_manifest_file_size = 1024 * 1024 * 1024; 20472: 20472: 20472: int table_cache_numshardbits = 6; 20472: # 644 "./include/rocksdb/options.h" 20472: uint64_t WAL_ttl_seconds = 0; 20472: uint64_t WAL_size_limit_MB = 0; 20472: 20472: 20472: 20472: 20472: 20472: size_t manifest_preallocation_size = 4 * 1024 * 1024; 20472: 20472: 20472: bool allow_mmap_reads = false; 20472: 20472: 20472: 20472: 20472: bool allow_mmap_writes = false; 20472: # 673 "./include/rocksdb/options.h" 20472: bool use_direct_reads = false; 20472: 20472: 20472: 20472: 20472: bool use_direct_io_for_flush_and_compaction = false; 20472: 20472: 20472: bool allow_fallocate = true; 20472: 20472: 20472: bool is_fd_close_on_exec = true; 20472: 20472: 20472: bool skip_log_error_on_recovery = false; 20472: 20472: 20472: 20472: 20472: 20472: 20472: unsigned int stats_dump_period_sec = 600; 20472: 20472: 20472: 20472: unsigned int stats_persist_period_sec = 600; 20472: # 710 "./include/rocksdb/options.h" 20472: bool persist_stats_to_disk = false; 20472: 20472: 20472: 20472: 20472: size_t stats_history_buffer_size = 1024 * 1024; 20472: 20472: 20472: 20472: 20472: bool advise_random_on_open = true; 20472: # 732 "./include/rocksdb/options.h" 20472: size_t db_write_buffer_size = 0; 20472: # 748 "./include/rocksdb/options.h" 20472: std::shared_ptr write_buffer_manager = nullptr; 20472: 20472: 20472: 20472: 20472: enum AccessHint { NONE, NORMAL, SEQUENTIAL, WILLNEED }; 20472: AccessHint access_hint_on_compaction_start = NORMAL; 20472: # 768 "./include/rocksdb/options.h" 20472: bool new_table_reader_for_compaction_inputs = false; 20472: # 780 "./include/rocksdb/options.h" 20472: size_t compaction_readahead_size = 0; 20472: # 797 "./include/rocksdb/options.h" 20472: size_t random_access_max_buffer_size = 1024 * 1024; 20472: # 808 "./include/rocksdb/options.h" 20472: size_t writable_file_max_buffer_size = 1024 * 1024; 20472: 20472: 20472: 20472: 20472: 20472: 20472: bool use_adaptive_mutex = false; 20472: 20472: 20472: DBOptions(); 20472: 20472: explicit DBOptions(const Options& options); 20472: 20472: void Dump(Logger* log) const; 20472: # 840 "./include/rocksdb/options.h" 20472: uint64_t bytes_per_sync = 0; 20472: 20472: 20472: 20472: 20472: 20472: 20472: uint64_t wal_bytes_per_sync = 0; 20472: # 868 "./include/rocksdb/options.h" 20472: bool strict_bytes_per_sync = false; 20472: 20472: 20472: 20472: std::vector> listeners; 20472: 20472: 20472: 20472: 20472: 20472: bool enable_thread_tracking = false; 20472: # 896 "./include/rocksdb/options.h" 20472: uint64_t delayed_write_rate = 0; 20472: # 911 "./include/rocksdb/options.h" 20472: bool enable_pipelined_write = false; 20472: # 937 "./include/rocksdb/options.h" 20472: bool unordered_write = false; 20472: # 947 "./include/rocksdb/options.h" 20472: bool allow_concurrent_memtable_write = true; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: bool enable_write_thread_adaptive_yield = true; 20472: 20472: 20472: 20472: 20472: 20472: 20472: uint64_t max_write_batch_group_size_bytes = 1 << 20; 20472: # 971 "./include/rocksdb/options.h" 20472: uint64_t write_thread_max_yield_usec = 100; 20472: # 981 "./include/rocksdb/options.h" 20472: uint64_t write_thread_slow_yield_usec = 3; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: bool skip_stats_update_on_db_open = false; 20472: # 999 "./include/rocksdb/options.h" 20472: bool skip_checking_sst_file_sizes_on_db_open = false; 20472: 20472: 20472: 20472: WALRecoveryMode wal_recovery_mode = WALRecoveryMode::kPointInTimeRecovery; 20472: 20472: 20472: 20472: bool allow_2pc = false; 20472: 20472: 20472: 20472: 20472: std::shared_ptr row_cache = nullptr; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: WalFilter* wal_filter = nullptr; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: bool fail_if_options_file_error = false; 20472: 20472: 20472: 20472: 20472: bool dump_malloc_stats = false; 20472: # 1042 "./include/rocksdb/options.h" 20472: bool avoid_flush_during_recovery = false; 20472: # 1051 "./include/rocksdb/options.h" 20472: bool avoid_flush_during_shutdown = false; 20472: # 1063 "./include/rocksdb/options.h" 20472: bool allow_ingest_behind = false; 20472: # 1075 "./include/rocksdb/options.h" 20472: bool preserve_deletes = false; 20472: 20472: 20472: 20472: 20472: 20472: 20472: bool two_write_queues = false; 20472: 20472: 20472: 20472: 20472: bool manual_wal_flush = false; 20472: # 1101 "./include/rocksdb/options.h" 20472: bool atomic_flush = false; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: bool avoid_unnecessary_blocking_io = false; 20472: # 1120 "./include/rocksdb/options.h" 20472: bool write_dbid_to_manifest = false; 20472: 20472: 20472: 20472: 20472: 20472: 20472: size_t log_readahead_size = 0; 20472: # 1136 "./include/rocksdb/options.h" 20472: std::shared_ptr file_checksum_gen_factory = nullptr; 20472: # 1146 "./include/rocksdb/options.h" 20472: bool best_efforts_recovery = false; 20472: }; 20472: 20472: 20472: struct Options : public DBOptions, public ColumnFamilyOptions { 20472: 20472: Options() : DBOptions(), ColumnFamilyOptions() {} 20472: 20472: Options(const DBOptions& db_options, 20472: const ColumnFamilyOptions& column_family_options) 20472: : DBOptions(db_options), ColumnFamilyOptions(column_family_options) {} 20472: 20472: 20472: Options* OldDefaults(int rocksdb_major_version = 4, 20472: int rocksdb_minor_version = 6); 20472: 20472: void Dump(Logger* log) const; 20472: 20472: void DumpCFOptions(Logger* log) const; 20472: # 1176 "./include/rocksdb/options.h" 20472: Options* PrepareForBulkLoad(); 20472: 20472: 20472: 20472: Options* OptimizeForSmallDb(); 20472: }; 20472: # 1190 "./include/rocksdb/options.h" 20472: enum ReadTier { 20472: kReadAllTier = 0x0, 20472: kBlockCacheTier = 0x1, 20472: kPersistedTier = 0x2, 20472: 20472: 20472: 20472: kMemtableTier = 0x3 20472: }; 20472: 20472: 20472: struct ReadOptions { 20472: 20472: 20472: 20472: 20472: 20472: const Snapshot* snapshot; 20472: # 1219 "./include/rocksdb/options.h" 20472: const Slice* iterate_lower_bound; 20472: # 1229 "./include/rocksdb/options.h" 20472: const Slice* iterate_upper_bound; 20472: # 1240 "./include/rocksdb/options.h" 20472: size_t readahead_size; 20472: 20472: 20472: 20472: 20472: 20472: uint64_t max_skippable_internal_keys; 20472: 20472: 20472: 20472: 20472: 20472: ReadTier read_tier; 20472: 20472: 20472: 20472: 20472: bool verify_checksums; 20472: 20472: 20472: 20472: 20472: 20472: 20472: bool fill_cache; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: bool tailing; 20472: 20472: 20472: 20472: bool managed; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: bool total_order_seek; 20472: 20472: 20472: 20472: 20472: 20472: 20472: bool auto_prefix_mode; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: bool prefix_same_as_start; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: bool pin_data; 20472: 20472: 20472: 20472: 20472: 20472: bool background_purge_on_iterator_cleanup; 20472: 20472: 20472: 20472: 20472: 20472: bool ignore_range_deletions; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: std::function table_filter; 20472: 20472: 20472: 20472: 20472: 20472: 20472: SequenceNumber iter_start_seqnum; 20472: # 1346 "./include/rocksdb/options.h" 20472: const Slice* timestamp; 20472: const Slice* iter_start_ts; 20472: # 1357 "./include/rocksdb/options.h" 20472: std::chrono::microseconds deadline; 20472: 20472: 20472: 20472: 20472: 20472: 20472: uint64_t value_size_soft_limit; 20472: 20472: ReadOptions(); 20472: ReadOptions(bool cksum, bool cache); 20472: }; 20472: 20472: 20472: struct WriteOptions { 20472: # 1388 "./include/rocksdb/options.h" 20472: bool sync; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: bool disableWAL; 20472: 20472: 20472: 20472: 20472: 20472: bool ignore_missing_column_families; 20472: 20472: 20472: 20472: 20472: bool no_slowdown; 20472: # 1416 "./include/rocksdb/options.h" 20472: bool low_pri; 20472: # 1425 "./include/rocksdb/options.h" 20472: bool memtable_insert_hint_per_batch; 20472: # 1436 "./include/rocksdb/options.h" 20472: const Slice* timestamp; 20472: 20472: WriteOptions() 20472: : sync(false), 20472: disableWAL(false), 20472: ignore_missing_column_families(false), 20472: no_slowdown(false), 20472: low_pri(false), 20472: memtable_insert_hint_per_batch(false), 20472: timestamp(nullptr) {} 20472: }; 20472: 20472: 20472: struct FlushOptions { 20472: 20472: 20472: bool wait; 20472: 20472: 20472: 20472: 20472: 20472: bool allow_write_stall; 20472: FlushOptions() : wait(true), allow_write_stall(false) {} 20472: }; 20472: 20472: 20472: extern Status CreateLoggerFromOptions(const std::string& dbname, 20472: const DBOptions& options, 20472: std::shared_ptr* logger); 20472: 20472: 20472: struct CompactionOptions { 20472: 20472: 20472: 20472: 20472: 20472: CompressionType compression; 20472: 20472: 20472: uint64_t output_file_size_limit; 20472: 20472: uint32_t max_subcompactions; 20472: 20472: CompactionOptions() 20472: : compression(kSnappyCompression), 20472: output_file_size_limit(std::numeric_limits::max()), 20472: max_subcompactions(0) {} 20472: }; 20472: 20472: 20472: 20472: enum class BottommostLevelCompaction { 20472: 20472: kSkip, 20472: 20472: 20472: kIfHaveCompactionFilter, 20472: 20472: kForce, 20472: 20472: 20472: kForceOptimized, 20472: }; 20472: 20472: 20472: struct CompactRangeOptions { 20472: 20472: 20472: bool exclusive_manual_compaction = true; 20472: 20472: 20472: bool change_level = false; 20472: 20472: 20472: int target_level = -1; 20472: 20472: 20472: uint32_t target_path_id = 0; 20472: 20472: 20472: BottommostLevelCompaction bottommost_level_compaction = 20472: BottommostLevelCompaction::kIfHaveCompactionFilter; 20472: 20472: 20472: bool allow_write_stall = false; 20472: 20472: uint32_t max_subcompactions = 0; 20472: }; 20472: 20472: 20472: struct IngestExternalFileOptions { 20472: 20472: bool move_files = false; 20472: 20472: bool failed_move_fall_back_to_copy = true; 20472: 20472: 20472: bool snapshot_consistency = true; 20472: 20472: 20472: bool allow_global_seqno = true; 20472: 20472: 20472: bool allow_blocking_flush = true; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: bool ingest_behind = false; 20472: # 1561 "./include/rocksdb/options.h" 20472: bool write_global_seqno = true; 20472: 20472: 20472: 20472: 20472: bool verify_checksums_before_ingest = false; 20472: 20472: 20472: 20472: 20472: 20472: 20472: size_t verify_checksums_readahead_size = 0; 20472: # 1593 "./include/rocksdb/options.h" 20472: bool verify_file_checksum = true; 20472: }; 20472: 20472: enum TraceFilterType : uint64_t { 20472: 20472: kTraceFilterNone = 0x0, 20472: 20472: kTraceFilterGet = 0x1 << 0, 20472: 20472: kTraceFilterWrite = 0x1 << 1 20472: }; 20472: 20472: 20472: struct TraceOptions { 20472: 20472: 20472: uint64_t max_trace_file_size = uint64_t{64} * 1024 * 1024 * 1024; 20472: 20472: 20472: uint64_t sampling_frequency = 1; 20472: 20472: uint64_t filter = kTraceFilterNone; 20472: }; 20472: 20472: 20472: struct ImportColumnFamilyOptions { 20472: 20472: bool move_files = false; 20472: }; 20472: 20472: 20472: struct SizeApproximationOptions { 20472: 20472: 20472: bool include_memtabtles = false; 20472: 20472: 20472: bool include_files = true; 20472: # 1640 "./include/rocksdb/options.h" 20472: double files_size_error_margin = -1.0; 20472: }; 20472: 20472: } 20472: # 22 "./include/rocksdb/db.h" 2 20472: # 1 "./include/rocksdb/snapshot.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: namespace rocksdb { 20472: 20472: class DB; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: class Snapshot { 20472: public: 20472: 20472: virtual SequenceNumber GetSequenceNumber() const = 0; 20472: 20472: protected: 20472: virtual ~Snapshot(); 20472: }; 20472: 20472: 20472: 20472: 20472: class ManagedSnapshot { 20472: public: 20472: explicit ManagedSnapshot(DB* db); 20472: 20472: 20472: ManagedSnapshot(DB* db, const Snapshot* _snapshot); 20472: 20472: ~ManagedSnapshot(); 20472: 20472: const Snapshot* snapshot(); 20472: 20472: private: 20472: DB* db_; 20472: const Snapshot* snapshot_; 20472: }; 20472: 20472: } 20472: # 23 "./include/rocksdb/db.h" 2 20472: # 1 "./include/rocksdb/sst_file_writer.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 24 "./include/rocksdb/sst_file_writer.h" 20472: namespace rocksdb { 20472: 20472: class Comparator; 20472: 20472: 20472: 20472: struct ExternalSstFileInfo { 20472: ExternalSstFileInfo() 20472: : file_path(""), 20472: smallest_key(""), 20472: largest_key(""), 20472: smallest_range_del_key(""), 20472: largest_range_del_key(""), 20472: file_checksum(""), 20472: file_checksum_func_name(""), 20472: sequence_number(0), 20472: file_size(0), 20472: num_entries(0), 20472: num_range_del_entries(0), 20472: version(0) {} 20472: 20472: ExternalSstFileInfo(const std::string& _file_path, 20472: const std::string& _smallest_key, 20472: const std::string& _largest_key, 20472: SequenceNumber _sequence_number, uint64_t _file_size, 20472: int32_t _num_entries, int32_t _version) 20472: : file_path(_file_path), 20472: smallest_key(_smallest_key), 20472: largest_key(_largest_key), 20472: smallest_range_del_key(""), 20472: largest_range_del_key(""), 20472: file_checksum(""), 20472: file_checksum_func_name(""), 20472: sequence_number(_sequence_number), 20472: file_size(_file_size), 20472: num_entries(_num_entries), 20472: num_range_del_entries(0), 20472: version(_version) {} 20472: 20472: std::string file_path; 20472: std::string smallest_key; 20472: std::string largest_key; 20472: std::string 20472: smallest_range_del_key; 20472: std::string largest_range_del_key; 20472: std::string file_checksum; 20472: std::string file_checksum_func_name; 20472: SequenceNumber sequence_number; 20472: uint64_t file_size; 20472: uint64_t num_entries; 20472: uint64_t num_range_del_entries; 20472: int32_t version; 20472: }; 20472: 20472: 20472: 20472: class SstFileWriter { 20472: public: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: SstFileWriter(const EnvOptions& env_options, const Options& options, 20472: ColumnFamilyHandle* column_family = nullptr, 20472: bool invalidate_page_cache = true, 20472: Env::IOPriority io_priority = Env::IOPriority::IO_TOTAL, 20472: bool skip_filters = false) 20472: : SstFileWriter(env_options, options, options.comparator, column_family, 20472: invalidate_page_cache, io_priority, skip_filters) {} 20472: 20472: 20472: SstFileWriter(const EnvOptions& env_options, const Options& options, 20472: const Comparator* user_comparator, 20472: ColumnFamilyHandle* column_family = nullptr, 20472: bool invalidate_page_cache = true, 20472: Env::IOPriority io_priority = Env::IOPriority::IO_TOTAL, 20472: bool skip_filters = false); 20472: 20472: ~SstFileWriter(); 20472: 20472: 20472: Status Open(const std::string& file_path); 20472: 20472: 20472: 20472: __attribute__((__deprecated__)) Status Add(const Slice& user_key, const Slice& value); 20472: 20472: 20472: 20472: Status Put(const Slice& user_key, const Slice& value); 20472: 20472: 20472: 20472: Status Merge(const Slice& user_key, const Slice& value); 20472: 20472: 20472: 20472: Status Delete(const Slice& user_key); 20472: 20472: 20472: Status DeleteRange(const Slice& begin_key, const Slice& end_key); 20472: 20472: 20472: 20472: 20472: 20472: Status Finish(ExternalSstFileInfo* file_info = nullptr); 20472: 20472: 20472: uint64_t FileSize(); 20472: 20472: private: 20472: void InvalidatePageCache(bool closing); 20472: struct Rep; 20472: std::unique_ptr rep_; 20472: }; 20472: } 20472: # 24 "./include/rocksdb/db.h" 2 20472: 20472: # 1 "./include/rocksdb/transaction_log.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "./include/rocksdb/write_batch.h" 1 20472: # 25 "./include/rocksdb/write_batch.h" 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "./include/rocksdb/write_batch_base.h" 1 20472: # 9 "./include/rocksdb/write_batch_base.h" 20472: 20472: 20472: 20472: 20472: 20472: 20472: namespace rocksdb { 20472: 20472: class Slice; 20472: class Status; 20472: class ColumnFamilyHandle; 20472: class WriteBatch; 20472: struct SliceParts; 20472: 20472: 20472: 20472: 20472: class WriteBatchBase { 20472: public: 20472: virtual ~WriteBatchBase() {} 20472: 20472: 20472: virtual Status Put(ColumnFamilyHandle* column_family, const Slice& key, 20472: const Slice& value) = 0; 20472: virtual Status Put(const Slice& key, const Slice& value) = 0; 20472: 20472: 20472: 20472: 20472: virtual Status Put(ColumnFamilyHandle* column_family, const SliceParts& key, 20472: const SliceParts& value); 20472: virtual Status Put(const SliceParts& key, const SliceParts& value); 20472: 20472: 20472: 20472: virtual Status Merge(ColumnFamilyHandle* column_family, const Slice& key, 20472: const Slice& value) = 0; 20472: virtual Status Merge(const Slice& key, const Slice& value) = 0; 20472: 20472: 20472: virtual Status Merge(ColumnFamilyHandle* column_family, const SliceParts& key, 20472: const SliceParts& value); 20472: virtual Status Merge(const SliceParts& key, const SliceParts& value); 20472: 20472: 20472: virtual Status Delete(ColumnFamilyHandle* column_family, 20472: const Slice& key) = 0; 20472: virtual Status Delete(const Slice& key) = 0; 20472: 20472: 20472: virtual Status Delete(ColumnFamilyHandle* column_family, 20472: const SliceParts& key); 20472: virtual Status Delete(const SliceParts& key); 20472: 20472: 20472: 20472: virtual Status SingleDelete(ColumnFamilyHandle* column_family, 20472: const Slice& key) = 0; 20472: virtual Status SingleDelete(const Slice& key) = 0; 20472: 20472: 20472: virtual Status SingleDelete(ColumnFamilyHandle* column_family, 20472: const SliceParts& key); 20472: virtual Status SingleDelete(const SliceParts& key); 20472: 20472: 20472: 20472: virtual Status DeleteRange(ColumnFamilyHandle* column_family, 20472: const Slice& begin_key, const Slice& end_key) = 0; 20472: virtual Status DeleteRange(const Slice& begin_key, const Slice& end_key) = 0; 20472: 20472: 20472: virtual Status DeleteRange(ColumnFamilyHandle* column_family, 20472: const SliceParts& begin_key, 20472: const SliceParts& end_key); 20472: virtual Status DeleteRange(const SliceParts& begin_key, 20472: const SliceParts& end_key); 20472: # 97 "./include/rocksdb/write_batch_base.h" 20472: virtual Status PutLogData(const Slice& blob) = 0; 20472: 20472: 20472: virtual void Clear() = 0; 20472: 20472: 20472: 20472: 20472: virtual WriteBatch* GetWriteBatch() = 0; 20472: 20472: 20472: 20472: virtual void SetSavePoint() = 0; 20472: 20472: 20472: 20472: 20472: 20472: virtual Status RollbackToSavePoint() = 0; 20472: 20472: 20472: 20472: 20472: 20472: virtual Status PopSavePoint() = 0; 20472: 20472: 20472: virtual void SetMaxBytes(size_t max_bytes) = 0; 20472: }; 20472: 20472: } 20472: # 34 "./include/rocksdb/write_batch.h" 2 20472: 20472: namespace rocksdb { 20472: 20472: class Slice; 20472: class ColumnFamilyHandle; 20472: struct SavePoints; 20472: struct SliceParts; 20472: 20472: struct SavePoint { 20472: size_t size; 20472: int count; 20472: uint32_t content_flags; 20472: 20472: SavePoint() : size(0), count(0), content_flags(0) {} 20472: 20472: SavePoint(size_t _size, int _count, uint32_t _flags) 20472: : size(_size), count(_count), content_flags(_flags) {} 20472: 20472: void clear() { 20472: size = 0; 20472: count = 0; 20472: content_flags = 0; 20472: } 20472: 20472: bool is_cleared() const { return (size | count | content_flags) == 0; } 20472: }; 20472: 20472: class WriteBatch : public WriteBatchBase { 20472: public: 20472: explicit WriteBatch(size_t reserved_bytes = 0, size_t max_bytes = 0); 20472: explicit WriteBatch(size_t reserved_bytes, size_t max_bytes, size_t ts_sz); 20472: ~WriteBatch() override; 20472: 20472: using WriteBatchBase::Put; 20472: 20472: Status Put(ColumnFamilyHandle* column_family, const Slice& key, 20472: const Slice& value) override; 20472: Status Put(const Slice& key, const Slice& value) override { 20472: return Put(nullptr, key, value); 20472: } 20472: 20472: 20472: 20472: 20472: Status Put(ColumnFamilyHandle* column_family, const SliceParts& key, 20472: const SliceParts& value) override; 20472: Status Put(const SliceParts& key, const SliceParts& value) override { 20472: return Put(nullptr, key, value); 20472: } 20472: 20472: using WriteBatchBase::Delete; 20472: 20472: Status Delete(ColumnFamilyHandle* column_family, const Slice& key) override; 20472: Status Delete(const Slice& key) override { return Delete(nullptr, key); } 20472: 20472: 20472: Status Delete(ColumnFamilyHandle* column_family, 20472: const SliceParts& key) override; 20472: Status Delete(const SliceParts& key) override { return Delete(nullptr, key); } 20472: 20472: using WriteBatchBase::SingleDelete; 20472: 20472: Status SingleDelete(ColumnFamilyHandle* column_family, 20472: const Slice& key) override; 20472: Status SingleDelete(const Slice& key) override { 20472: return SingleDelete(nullptr, key); 20472: } 20472: 20472: 20472: Status SingleDelete(ColumnFamilyHandle* column_family, 20472: const SliceParts& key) override; 20472: Status SingleDelete(const SliceParts& key) override { 20472: return SingleDelete(nullptr, key); 20472: } 20472: 20472: using WriteBatchBase::DeleteRange; 20472: 20472: Status DeleteRange(ColumnFamilyHandle* column_family, const Slice& begin_key, 20472: const Slice& end_key) override; 20472: Status DeleteRange(const Slice& begin_key, const Slice& end_key) override { 20472: return DeleteRange(nullptr, begin_key, end_key); 20472: } 20472: 20472: 20472: Status DeleteRange(ColumnFamilyHandle* column_family, 20472: const SliceParts& begin_key, 20472: const SliceParts& end_key) override; 20472: Status DeleteRange(const SliceParts& begin_key, 20472: const SliceParts& end_key) override { 20472: return DeleteRange(nullptr, begin_key, end_key); 20472: } 20472: 20472: using WriteBatchBase::Merge; 20472: 20472: 20472: Status Merge(ColumnFamilyHandle* column_family, const Slice& key, 20472: const Slice& value) override; 20472: Status Merge(const Slice& key, const Slice& value) override { 20472: return Merge(nullptr, key, value); 20472: } 20472: 20472: 20472: Status Merge(ColumnFamilyHandle* column_family, const SliceParts& key, 20472: const SliceParts& value) override; 20472: Status Merge(const SliceParts& key, const SliceParts& value) override { 20472: return Merge(nullptr, key, value); 20472: } 20472: 20472: using WriteBatchBase::PutLogData; 20472: # 153 "./include/rocksdb/write_batch.h" 20472: Status PutLogData(const Slice& blob) override; 20472: 20472: using WriteBatchBase::Clear; 20472: 20472: void Clear() override; 20472: 20472: 20472: 20472: void SetSavePoint() override; 20472: 20472: 20472: 20472: 20472: 20472: 20472: Status RollbackToSavePoint() override; 20472: 20472: 20472: 20472: 20472: 20472: Status PopSavePoint() override; 20472: 20472: 20472: class Handler { 20472: public: 20472: virtual ~Handler(); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual Status PutCF(uint32_t column_family_id, const Slice& key, 20472: const Slice& value) { 20472: if (column_family_id == 0) { 20472: 20472: 20472: 20472: Put(key, value); 20472: return Status::OK(); 20472: } 20472: return Status::InvalidArgument( 20472: "non-default column family and PutCF not implemented"); 20472: } 20472: virtual void Put(const Slice& , const Slice& ) {} 20472: 20472: virtual Status DeleteCF(uint32_t column_family_id, const Slice& key) { 20472: if (column_family_id == 0) { 20472: Delete(key); 20472: return Status::OK(); 20472: } 20472: return Status::InvalidArgument( 20472: "non-default column family and DeleteCF not implemented"); 20472: } 20472: virtual void Delete(const Slice& ) {} 20472: 20472: virtual Status SingleDeleteCF(uint32_t column_family_id, const Slice& key) { 20472: if (column_family_id == 0) { 20472: SingleDelete(key); 20472: return Status::OK(); 20472: } 20472: return Status::InvalidArgument( 20472: "non-default column family and SingleDeleteCF not implemented"); 20472: } 20472: virtual void SingleDelete(const Slice& ) {} 20472: 20472: virtual Status DeleteRangeCF(uint32_t , 20472: const Slice& , 20472: const Slice& ) { 20472: return Status::InvalidArgument("DeleteRangeCF not implemented"); 20472: } 20472: 20472: virtual Status MergeCF(uint32_t column_family_id, const Slice& key, 20472: const Slice& value) { 20472: if (column_family_id == 0) { 20472: Merge(key, value); 20472: return Status::OK(); 20472: } 20472: return Status::InvalidArgument( 20472: "non-default column family and MergeCF not implemented"); 20472: } 20472: virtual void Merge(const Slice& , const Slice& ) {} 20472: 20472: virtual Status PutBlobIndexCF(uint32_t , 20472: const Slice& , 20472: const Slice& ) { 20472: return Status::InvalidArgument("PutBlobIndexCF not implemented"); 20472: } 20472: 20472: 20472: virtual void LogData(const Slice& blob); 20472: 20472: virtual Status MarkBeginPrepare(bool = false) { 20472: return Status::InvalidArgument("MarkBeginPrepare() handler not defined."); 20472: } 20472: 20472: virtual Status MarkEndPrepare(const Slice& ) { 20472: return Status::InvalidArgument("MarkEndPrepare() handler not defined."); 20472: } 20472: 20472: virtual Status MarkNoop(bool ) { 20472: return Status::InvalidArgument("MarkNoop() handler not defined."); 20472: } 20472: 20472: virtual Status MarkRollback(const Slice& ) { 20472: return Status::InvalidArgument( 20472: "MarkRollbackPrepare() handler not defined."); 20472: } 20472: 20472: virtual Status MarkCommit(const Slice& ) { 20472: return Status::InvalidArgument("MarkCommit() handler not defined."); 20472: } 20472: 20472: 20472: 20472: 20472: virtual bool Continue(); 20472: 20472: protected: 20472: friend class WriteBatchInternal; 20472: virtual bool WriteAfterCommit() const { return true; } 20472: virtual bool WriteBeforePrepare() const { return false; } 20472: }; 20472: Status Iterate(Handler* handler) const; 20472: 20472: 20472: const std::string& Data() const { return rep_; } 20472: 20472: 20472: size_t GetDataSize() const { return rep_.size(); } 20472: 20472: 20472: uint32_t Count() const; 20472: 20472: 20472: bool HasPut() const; 20472: 20472: 20472: bool HasDelete() const; 20472: 20472: 20472: bool HasSingleDelete() const; 20472: 20472: 20472: bool HasDeleteRange() const; 20472: 20472: 20472: bool HasMerge() const; 20472: 20472: 20472: bool HasBeginPrepare() const; 20472: 20472: 20472: bool HasEndPrepare() const; 20472: 20472: 20472: bool HasCommit() const; 20472: 20472: 20472: bool HasRollback() const; 20472: 20472: 20472: Status AssignTimestamp(const Slice& ts); 20472: 20472: 20472: Status AssignTimestamps(const std::vector& ts_list); 20472: 20472: using WriteBatchBase::GetWriteBatch; 20472: WriteBatch* GetWriteBatch() override { return this; } 20472: 20472: 20472: explicit WriteBatch(const std::string& rep); 20472: explicit WriteBatch(std::string&& rep); 20472: 20472: WriteBatch(const WriteBatch& src); 20472: WriteBatch(WriteBatch&& src) noexcept; 20472: WriteBatch& operator=(const WriteBatch& src); 20472: WriteBatch& operator=(WriteBatch&& src); 20472: 20472: 20472: 20472: void MarkWalTerminationPoint(); 20472: const SavePoint& GetWalTerminationPoint() const { return wal_term_point_; } 20472: 20472: void SetMaxBytes(size_t max_bytes) override { max_bytes_ = max_bytes; } 20472: 20472: private: 20472: friend class WriteBatchInternal; 20472: friend class LocalSavePoint; 20472: 20472: 20472: 20472: friend class WriteBatchWithIndex; 20472: std::unique_ptr save_points_; 20472: 20472: 20472: 20472: 20472: SavePoint wal_term_point_; 20472: 20472: 20472: mutable std::atomic content_flags_; 20472: 20472: 20472: uint32_t ComputeContentFlags() const; 20472: 20472: 20472: size_t max_bytes_; 20472: 20472: 20472: 20472: 20472: 20472: bool is_latest_persistent_state_ = false; 20472: 20472: protected: 20472: std::string rep_; 20472: const size_t timestamp_size_; 20472: 20472: 20472: }; 20472: 20472: } 20472: # 13 "./include/rocksdb/transaction_log.h" 2 20472: 20472: namespace rocksdb { 20472: 20472: class LogFile; 20472: typedef std::vector> VectorLogPtr; 20472: 20472: enum WalFileType { 20472: 20472: 20472: 20472: 20472: 20472: 20472: kArchivedLogFile = 0, 20472: 20472: 20472: kAliveLogFile = 1 20472: }; 20472: 20472: class LogFile { 20472: public: 20472: LogFile() {} 20472: virtual ~LogFile() {} 20472: 20472: 20472: 20472: 20472: virtual std::string PathName() const = 0; 20472: 20472: 20472: 20472: virtual uint64_t LogNumber() const = 0; 20472: 20472: 20472: virtual WalFileType Type() const = 0; 20472: 20472: 20472: virtual SequenceNumber StartSequence() const = 0; 20472: 20472: 20472: virtual uint64_t SizeFileBytes() const = 0; 20472: }; 20472: 20472: struct BatchResult { 20472: SequenceNumber sequence = 0; 20472: std::unique_ptr writeBatchPtr; 20472: 20472: 20472: 20472: 20472: BatchResult() {} 20472: 20472: ~BatchResult() {} 20472: 20472: BatchResult(const BatchResult&) = delete; 20472: 20472: BatchResult& operator=(const BatchResult&) = delete; 20472: 20472: BatchResult(BatchResult&& bResult) 20472: : sequence(std::move(bResult.sequence)), 20472: writeBatchPtr(std::move(bResult.writeBatchPtr)) {} 20472: 20472: BatchResult& operator=(BatchResult&& bResult) { 20472: sequence = std::move(bResult.sequence); 20472: writeBatchPtr = std::move(bResult.writeBatchPtr); 20472: return *this; 20472: } 20472: }; 20472: 20472: 20472: 20472: 20472: class TransactionLogIterator { 20472: public: 20472: TransactionLogIterator() {} 20472: virtual ~TransactionLogIterator() {} 20472: 20472: 20472: 20472: 20472: virtual bool Valid() = 0; 20472: 20472: 20472: 20472: virtual void Next() = 0; 20472: 20472: 20472: 20472: virtual Status status() = 0; 20472: 20472: 20472: 20472: 20472: virtual BatchResult GetBatch() = 0; 20472: 20472: 20472: struct ReadOptions { 20472: 20472: 20472: 20472: bool verify_checksums_; 20472: 20472: ReadOptions() : verify_checksums_(true) {} 20472: 20472: explicit ReadOptions(bool verify_checksums) 20472: : verify_checksums_(verify_checksums) {} 20472: }; 20472: }; 20472: } 20472: # 26 "./include/rocksdb/db.h" 2 20472: # 40 "./include/rocksdb/db.h" 20472: namespace rocksdb { 20472: 20472: struct Options; 20472: struct DBOptions; 20472: struct ColumnFamilyOptions; 20472: struct ReadOptions; 20472: struct WriteOptions; 20472: struct FlushOptions; 20472: struct CompactionOptions; 20472: struct CompactRangeOptions; 20472: struct TableProperties; 20472: struct ExternalSstFileInfo; 20472: class WriteBatch; 20472: class Env; 20472: class EventListener; 20472: class StatsHistoryIterator; 20472: class TraceWriter; 20472: 20472: 20472: 20472: class FileSystem; 20472: 20472: extern const std::string kDefaultColumnFamilyName; 20472: extern const std::string kPersistentStatsColumnFamilyName; 20472: struct ColumnFamilyDescriptor { 20472: std::string name; 20472: ColumnFamilyOptions options; 20472: ColumnFamilyDescriptor() 20472: : name(kDefaultColumnFamilyName), options(ColumnFamilyOptions()) {} 20472: ColumnFamilyDescriptor(const std::string& _name, 20472: const ColumnFamilyOptions& _options) 20472: : name(_name), options(_options) {} 20472: }; 20472: 20472: class ColumnFamilyHandle { 20472: public: 20472: virtual ~ColumnFamilyHandle() {} 20472: 20472: virtual const std::string& GetName() const = 0; 20472: 20472: virtual uint32_t GetID() const = 0; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual Status GetDescriptor(ColumnFamilyDescriptor* desc) = 0; 20472: 20472: 20472: virtual const Comparator* GetComparator() const = 0; 20472: }; 20472: 20472: static const int kMajorVersion = 6; 20472: static const int kMinorVersion = 11; 20472: 20472: 20472: struct Range { 20472: Slice start; 20472: Slice limit; 20472: 20472: Range() {} 20472: Range(const Slice& s, const Slice& l) : start(s), limit(l) {} 20472: }; 20472: 20472: struct RangePtr { 20472: const Slice* start; 20472: const Slice* limit; 20472: 20472: RangePtr() : start(nullptr), limit(nullptr) {} 20472: RangePtr(const Slice* s, const Slice* l) : start(s), limit(l) {} 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: struct IngestExternalFileArg { 20472: ColumnFamilyHandle* column_family = nullptr; 20472: std::vector external_files; 20472: IngestExternalFileOptions options; 20472: std::vector files_checksums; 20472: std::vector files_checksum_func_names; 20472: }; 20472: 20472: struct GetMergeOperandsOptions { 20472: int expected_max_number_of_operands = 0; 20472: }; 20472: 20472: 20472: 20472: 20472: typedef std::unordered_map> 20472: TablePropertiesCollection; 20472: 20472: 20472: 20472: 20472: 20472: 20472: class DB { 20472: public: 20472: 20472: 20472: 20472: 20472: 20472: static Status Open(const Options& options, const std::string& name, 20472: DB** dbptr); 20472: # 158 "./include/rocksdb/db.h" 20472: static Status OpenForReadOnly(const Options& options, const std::string& name, 20472: DB** dbptr, 20472: bool error_if_log_file_exist = false); 20472: # 170 "./include/rocksdb/db.h" 20472: static Status OpenForReadOnly( 20472: const DBOptions& db_options, const std::string& name, 20472: const std::vector& column_families, 20472: std::vector* handles, DB** dbptr, 20472: bool error_if_log_file_exist = false); 20472: # 198 "./include/rocksdb/db.h" 20472: static Status OpenAsSecondary(const Options& options, const std::string& name, 20472: const std::string& secondary_path, DB** dbptr); 20472: # 218 "./include/rocksdb/db.h" 20472: static Status OpenAsSecondary( 20472: const DBOptions& db_options, const std::string& name, 20472: const std::string& secondary_path, 20472: const std::vector& column_families, 20472: std::vector* handles, DB** dbptr); 20472: # 238 "./include/rocksdb/db.h" 20472: static Status Open(const DBOptions& db_options, const std::string& name, 20472: const std::vector& column_families, 20472: std::vector* handles, DB** dbptr); 20472: 20472: virtual Status Resume() { return Status::NotSupported(); } 20472: # 256 "./include/rocksdb/db.h" 20472: virtual Status Close() { return Status::NotSupported(); } 20472: 20472: 20472: 20472: 20472: 20472: static Status ListColumnFamilies(const DBOptions& db_options, 20472: const std::string& name, 20472: std::vector* column_families); 20472: 20472: 20472: DB() {} 20472: 20472: DB(const DB&) = delete; 20472: void operator=(const DB&) = delete; 20472: 20472: virtual ~DB(); 20472: 20472: 20472: 20472: virtual Status CreateColumnFamily(const ColumnFamilyOptions& options, 20472: const std::string& column_family_name, 20472: ColumnFamilyHandle** handle); 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual Status CreateColumnFamilies( 20472: const ColumnFamilyOptions& options, 20472: const std::vector& column_family_names, 20472: std::vector* handles); 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual Status CreateColumnFamilies( 20472: const std::vector& column_families, 20472: std::vector* handles); 20472: 20472: 20472: 20472: 20472: virtual Status DropColumnFamily(ColumnFamilyHandle* column_family); 20472: 20472: 20472: 20472: 20472: 20472: virtual Status DropColumnFamilies( 20472: const std::vector& column_families); 20472: 20472: 20472: 20472: 20472: 20472: virtual Status DestroyColumnFamilyHandle(ColumnFamilyHandle* column_family); 20472: 20472: 20472: 20472: 20472: 20472: virtual Status Put(const WriteOptions& options, 20472: ColumnFamilyHandle* column_family, const Slice& key, 20472: const Slice& value) = 0; 20472: virtual Status Put(const WriteOptions& options, const Slice& key, 20472: const Slice& value) { 20472: return Put(options, DefaultColumnFamily(), key, value); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: virtual Status Delete(const WriteOptions& options, 20472: ColumnFamilyHandle* column_family, 20472: const Slice& key) = 0; 20472: virtual Status Delete(const WriteOptions& options, const Slice& key) { 20472: return Delete(options, DefaultColumnFamily(), key); 20472: } 20472: # 356 "./include/rocksdb/db.h" 20472: virtual Status SingleDelete(const WriteOptions& options, 20472: ColumnFamilyHandle* column_family, 20472: const Slice& key) = 0; 20472: virtual Status SingleDelete(const WriteOptions& options, const Slice& key) { 20472: return SingleDelete(options, DefaultColumnFamily(), key); 20472: } 20472: # 377 "./include/rocksdb/db.h" 20472: virtual Status DeleteRange(const WriteOptions& options, 20472: ColumnFamilyHandle* column_family, 20472: const Slice& begin_key, const Slice& end_key); 20472: 20472: 20472: 20472: 20472: 20472: virtual Status Merge(const WriteOptions& options, 20472: ColumnFamilyHandle* column_family, const Slice& key, 20472: const Slice& value) = 0; 20472: virtual Status Merge(const WriteOptions& options, const Slice& key, 20472: const Slice& value) { 20472: return Merge(options, DefaultColumnFamily(), key, value); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual Status Write(const WriteOptions& options, WriteBatch* updates) = 0; 20472: # 410 "./include/rocksdb/db.h" 20472: virtual inline Status Get(const ReadOptions& options, 20472: ColumnFamilyHandle* column_family, const Slice& key, 20472: std::string* value) { 20472: 20472: # 413 "./include/rocksdb/db.h" 3 4 20472: (static_cast ( 20472: # 413 "./include/rocksdb/db.h" 20472: value != nullptr 20472: # 413 "./include/rocksdb/db.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 413 "./include/rocksdb/db.h" 20472: "value != nullptr" 20472: # 413 "./include/rocksdb/db.h" 3 4 20472: , "./include/rocksdb/db.h", 413, __extension__ __PRETTY_FUNCTION__)) 20472: # 413 "./include/rocksdb/db.h" 20472: ; 20472: PinnableSlice pinnable_val(value); 20472: 20472: # 415 "./include/rocksdb/db.h" 3 4 20472: (static_cast ( 20472: # 415 "./include/rocksdb/db.h" 20472: !pinnable_val.IsPinned() 20472: # 415 "./include/rocksdb/db.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 415 "./include/rocksdb/db.h" 20472: "!pinnable_val.IsPinned()" 20472: # 415 "./include/rocksdb/db.h" 3 4 20472: , "./include/rocksdb/db.h", 415, __extension__ __PRETTY_FUNCTION__)) 20472: # 415 "./include/rocksdb/db.h" 20472: ; 20472: auto s = Get(options, column_family, key, &pinnable_val); 20472: if (s.ok() && pinnable_val.IsPinned()) { 20472: value->assign(pinnable_val.data(), pinnable_val.size()); 20472: } 20472: return s; 20472: } 20472: virtual Status Get(const ReadOptions& options, 20472: ColumnFamilyHandle* column_family, const Slice& key, 20472: PinnableSlice* value) = 0; 20472: virtual Status Get(const ReadOptions& options, const Slice& key, 20472: std::string* value) { 20472: return Get(options, DefaultColumnFamily(), key, value); 20472: } 20472: 20472: 20472: 20472: virtual inline Status Get(const ReadOptions& options, 20472: ColumnFamilyHandle* column_family, const Slice& key, 20472: std::string* value, std::string* timestamp) { 20472: 20472: # 435 "./include/rocksdb/db.h" 3 4 20472: (static_cast ( 20472: # 435 "./include/rocksdb/db.h" 20472: value != nullptr 20472: # 435 "./include/rocksdb/db.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 435 "./include/rocksdb/db.h" 20472: "value != nullptr" 20472: # 435 "./include/rocksdb/db.h" 3 4 20472: , "./include/rocksdb/db.h", 435, __extension__ __PRETTY_FUNCTION__)) 20472: # 435 "./include/rocksdb/db.h" 20472: ; 20472: PinnableSlice pinnable_val(value); 20472: 20472: # 437 "./include/rocksdb/db.h" 3 4 20472: (static_cast ( 20472: # 437 "./include/rocksdb/db.h" 20472: !pinnable_val.IsPinned() 20472: # 437 "./include/rocksdb/db.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 437 "./include/rocksdb/db.h" 20472: "!pinnable_val.IsPinned()" 20472: # 437 "./include/rocksdb/db.h" 3 4 20472: , "./include/rocksdb/db.h", 437, __extension__ __PRETTY_FUNCTION__)) 20472: # 437 "./include/rocksdb/db.h" 20472: ; 20472: auto s = Get(options, column_family, key, &pinnable_val, timestamp); 20472: if (s.ok() && pinnable_val.IsPinned()) { 20472: value->assign(pinnable_val.data(), pinnable_val.size()); 20472: } 20472: return s; 20472: } 20472: virtual Status Get(const ReadOptions& , 20472: ColumnFamilyHandle* , 20472: const Slice& , PinnableSlice* , 20472: std::string* ) { 20472: return Status::NotSupported( 20472: "Get() that returns timestamp is not implemented."); 20472: } 20472: virtual Status Get(const ReadOptions& options, const Slice& key, 20472: std::string* value, std::string* timestamp) { 20472: return Get(options, DefaultColumnFamily(), key, value, timestamp); 20472: } 20472: # 466 "./include/rocksdb/db.h" 20472: virtual Status GetMergeOperands( 20472: const ReadOptions& options, ColumnFamilyHandle* column_family, 20472: const Slice& key, PinnableSlice* merge_operands, 20472: GetMergeOperandsOptions* get_merge_operands_options, 20472: int* number_of_operands) = 0; 20472: # 487 "./include/rocksdb/db.h" 20472: virtual std::vector MultiGet( 20472: const ReadOptions& options, 20472: const std::vector& column_family, 20472: const std::vector& keys, std::vector* values) = 0; 20472: virtual std::vector MultiGet(const ReadOptions& options, 20472: const std::vector& keys, 20472: std::vector* values) { 20472: return MultiGet( 20472: options, 20472: std::vector(keys.size(), DefaultColumnFamily()), 20472: keys, values); 20472: } 20472: 20472: virtual std::vector MultiGet( 20472: const ReadOptions& , 20472: const std::vector& , 20472: const std::vector& keys, std::vector* , 20472: std::vector* ) { 20472: return std::vector( 20472: keys.size(), Status::NotSupported( 20472: "MultiGet() returning timestamps not implemented.")); 20472: } 20472: virtual std::vector MultiGet(const ReadOptions& options, 20472: const std::vector& keys, 20472: std::vector* values, 20472: std::vector* timestamps) { 20472: return MultiGet( 20472: options, 20472: std::vector(keys.size(), DefaultColumnFamily()), 20472: keys, values, timestamps); 20472: } 20472: # 538 "./include/rocksdb/db.h" 20472: virtual void MultiGet(const ReadOptions& options, 20472: ColumnFamilyHandle* column_family, 20472: const size_t num_keys, const Slice* keys, 20472: PinnableSlice* values, Status* statuses, 20472: const bool = false) { 20472: std::vector cf; 20472: std::vector user_keys; 20472: std::vector status; 20472: std::vector vals; 20472: 20472: for (size_t i = 0; i < num_keys; ++i) { 20472: cf.emplace_back(column_family); 20472: user_keys.emplace_back(keys[i]); 20472: } 20472: status = MultiGet(options, cf, user_keys, &vals); 20472: std::copy(status.begin(), status.end(), statuses); 20472: for (auto& value : vals) { 20472: values->PinSelf(value); 20472: values++; 20472: } 20472: } 20472: 20472: virtual void MultiGet(const ReadOptions& options, 20472: ColumnFamilyHandle* column_family, 20472: const size_t num_keys, const Slice* keys, 20472: PinnableSlice* values, std::string* timestamps, 20472: Status* statuses, const bool = false) { 20472: std::vector cf; 20472: std::vector user_keys; 20472: std::vector status; 20472: std::vector vals; 20472: std::vector tss; 20472: 20472: for (size_t i = 0; i < num_keys; ++i) { 20472: cf.emplace_back(column_family); 20472: user_keys.emplace_back(keys[i]); 20472: } 20472: status = MultiGet(options, cf, user_keys, &vals, &tss); 20472: std::copy(status.begin(), status.end(), statuses); 20472: std::copy(tss.begin(), tss.end(), timestamps); 20472: for (auto& value : vals) { 20472: values->PinSelf(value); 20472: values++; 20472: } 20472: } 20472: # 603 "./include/rocksdb/db.h" 20472: virtual void MultiGet(const ReadOptions& options, const size_t num_keys, 20472: ColumnFamilyHandle** column_families, const Slice* keys, 20472: PinnableSlice* values, Status* statuses, 20472: const bool = false) { 20472: std::vector cf; 20472: std::vector user_keys; 20472: std::vector status; 20472: std::vector vals; 20472: 20472: for (size_t i = 0; i < num_keys; ++i) { 20472: cf.emplace_back(column_families[i]); 20472: user_keys.emplace_back(keys[i]); 20472: } 20472: status = MultiGet(options, cf, user_keys, &vals); 20472: std::copy(status.begin(), status.end(), statuses); 20472: for (auto& value : vals) { 20472: values->PinSelf(value); 20472: values++; 20472: } 20472: } 20472: virtual void MultiGet(const ReadOptions& options, const size_t num_keys, 20472: ColumnFamilyHandle** column_families, const Slice* keys, 20472: PinnableSlice* values, std::string* timestamps, 20472: Status* statuses, const bool = false) { 20472: std::vector cf; 20472: std::vector user_keys; 20472: std::vector status; 20472: std::vector vals; 20472: std::vector tss; 20472: 20472: for (size_t i = 0; i < num_keys; ++i) { 20472: cf.emplace_back(column_families[i]); 20472: user_keys.emplace_back(keys[i]); 20472: } 20472: status = MultiGet(options, cf, user_keys, &vals, &tss); 20472: std::copy(status.begin(), status.end(), statuses); 20472: std::copy(tss.begin(), tss.end(), timestamps); 20472: for (auto& value : vals) { 20472: values->PinSelf(value); 20472: values++; 20472: } 20472: } 20472: # 653 "./include/rocksdb/db.h" 20472: virtual bool KeyMayExist(const ReadOptions& , 20472: ColumnFamilyHandle* , 20472: const Slice& , std::string* , 20472: std::string* , 20472: bool* value_found = nullptr) { 20472: if (value_found != nullptr) { 20472: *value_found = false; 20472: } 20472: return true; 20472: } 20472: 20472: virtual bool KeyMayExist(const ReadOptions& options, 20472: ColumnFamilyHandle* column_family, const Slice& key, 20472: std::string* value, bool* value_found = nullptr) { 20472: return KeyMayExist(options, column_family, key, value, 20472: nullptr, value_found); 20472: } 20472: 20472: virtual bool KeyMayExist(const ReadOptions& options, const Slice& key, 20472: std::string* value, bool* value_found = nullptr) { 20472: return KeyMayExist(options, DefaultColumnFamily(), key, value, value_found); 20472: } 20472: 20472: virtual bool KeyMayExist(const ReadOptions& options, const Slice& key, 20472: std::string* value, std::string* timestamp, 20472: bool* value_found = nullptr) { 20472: return KeyMayExist(options, DefaultColumnFamily(), key, value, timestamp, 20472: value_found); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual Iterator* NewIterator(const ReadOptions& options, 20472: ColumnFamilyHandle* column_family) = 0; 20472: virtual Iterator* NewIterator(const ReadOptions& options) { 20472: return NewIterator(options, DefaultColumnFamily()); 20472: } 20472: 20472: 20472: 20472: virtual Status NewIterators( 20472: const ReadOptions& options, 20472: const std::vector& column_families, 20472: std::vector* iterators) = 0; 20472: # 709 "./include/rocksdb/db.h" 20472: virtual const Snapshot* GetSnapshot() = 0; 20472: 20472: 20472: 20472: virtual void ReleaseSnapshot(const Snapshot* snapshot) = 0; 20472: 20472: 20472: 20472: 20472: 20472: 20472: struct Properties { 20472: 20472: 20472: 20472: static const std::string kNumFilesAtLevelPrefix; 20472: 20472: 20472: 20472: 20472: 20472: 20472: static const std::string kCompressionRatioAtLevelPrefix; 20472: 20472: 20472: 20472: static const std::string kStats; 20472: 20472: 20472: 20472: static const std::string kSSTables; 20472: 20472: 20472: 20472: 20472: static const std::string kCFStats; 20472: # 754 "./include/rocksdb/db.h" 20472: static const std::string kCFStatsNoFileHistogram; 20472: 20472: 20472: 20472: static const std::string kCFFileHistogram; 20472: 20472: 20472: 20472: 20472: static const std::string kDBStats; 20472: 20472: 20472: 20472: static const std::string kLevelStats; 20472: 20472: 20472: 20472: static const std::string kNumImmutableMemTable; 20472: 20472: 20472: 20472: static const std::string kNumImmutableMemTableFlushed; 20472: 20472: 20472: 20472: static const std::string kMemTableFlushPending; 20472: 20472: 20472: 20472: static const std::string kNumRunningFlushes; 20472: 20472: 20472: 20472: static const std::string kCompactionPending; 20472: 20472: 20472: 20472: static const std::string kNumRunningCompactions; 20472: 20472: 20472: 20472: static const std::string kBackgroundErrors; 20472: 20472: 20472: 20472: static const std::string kCurSizeActiveMemTable; 20472: 20472: 20472: 20472: static const std::string kCurSizeAllMemTables; 20472: 20472: 20472: 20472: static const std::string kSizeAllMemTables; 20472: 20472: 20472: 20472: static const std::string kNumEntriesActiveMemTable; 20472: 20472: 20472: 20472: static const std::string kNumEntriesImmMemTables; 20472: 20472: 20472: 20472: static const std::string kNumDeletesActiveMemTable; 20472: 20472: 20472: 20472: static const std::string kNumDeletesImmMemTables; 20472: 20472: 20472: 20472: static const std::string kEstimateNumKeys; 20472: 20472: 20472: 20472: 20472: static const std::string kEstimateTableReadersMem; 20472: 20472: 20472: 20472: static const std::string kIsFileDeletionsEnabled; 20472: 20472: 20472: 20472: static const std::string kNumSnapshots; 20472: 20472: 20472: 20472: static const std::string kOldestSnapshotTime; 20472: 20472: 20472: 20472: static const std::string kOldestSnapshotSequence; 20472: 20472: 20472: 20472: 20472: 20472: static const std::string kNumLiveVersions; 20472: 20472: 20472: 20472: 20472: 20472: static const std::string kCurrentSuperVersionNumber; 20472: 20472: 20472: 20472: static const std::string kEstimateLiveDataSize; 20472: 20472: 20472: 20472: static const std::string kMinLogNumberToKeep; 20472: 20472: 20472: 20472: 20472: static const std::string kMinObsoleteSstNumberToKeep; 20472: 20472: 20472: 20472: 20472: static const std::string kTotalSstFilesSize; 20472: 20472: 20472: 20472: static const std::string kLiveSstFilesSize; 20472: 20472: 20472: 20472: static const std::string kBaseLevel; 20472: 20472: 20472: 20472: 20472: 20472: static const std::string kEstimatePendingCompactionBytes; 20472: 20472: 20472: 20472: static const std::string kAggregatedTableProperties; 20472: 20472: 20472: 20472: 20472: static const std::string kAggregatedTablePropertiesAtLevel; 20472: 20472: 20472: 20472: static const std::string kActualDelayedWriteRate; 20472: 20472: 20472: static const std::string kIsWriteStopped; 20472: 20472: 20472: 20472: 20472: 20472: static const std::string kEstimateOldestKeyTime; 20472: 20472: 20472: static const std::string kBlockCacheCapacity; 20472: 20472: 20472: 20472: static const std::string kBlockCacheUsage; 20472: 20472: 20472: 20472: static const std::string kBlockCachePinnedUsage; 20472: 20472: 20472: 20472: static const std::string kOptionsStatistics; 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual bool GetProperty(ColumnFamilyHandle* column_family, 20472: const Slice& property, std::string* value) = 0; 20472: virtual bool GetProperty(const Slice& property, std::string* value) { 20472: return GetProperty(DefaultColumnFamily(), property, value); 20472: } 20472: virtual bool GetMapProperty(ColumnFamilyHandle* column_family, 20472: const Slice& property, 20472: std::map* value) = 0; 20472: virtual bool GetMapProperty(const Slice& property, 20472: std::map* value) { 20472: return GetMapProperty(DefaultColumnFamily(), property, value); 20472: } 20472: # 986 "./include/rocksdb/db.h" 20472: virtual bool GetIntProperty(ColumnFamilyHandle* column_family, 20472: const Slice& property, uint64_t* value) = 0; 20472: virtual bool GetIntProperty(const Slice& property, uint64_t* value) { 20472: return GetIntProperty(DefaultColumnFamily(), property, value); 20472: } 20472: 20472: 20472: 20472: 20472: virtual Status ResetStats() { 20472: return Status::NotSupported("Not implemented"); 20472: } 20472: 20472: 20472: 20472: virtual bool GetAggregatedIntProperty(const Slice& property, 20472: uint64_t* value) = 0; 20472: 20472: 20472: 20472: enum SizeApproximationFlags : uint8_t { 20472: NONE = 0, 20472: INCLUDE_MEMTABLES = 1 << 0, 20472: INCLUDE_FILES = 1 << 1 20472: }; 20472: # 1019 "./include/rocksdb/db.h" 20472: virtual Status GetApproximateSizes(const SizeApproximationOptions& options, 20472: ColumnFamilyHandle* column_family, 20472: const Range* ranges, int n, 20472: uint64_t* sizes) = 0; 20472: 20472: 20472: 20472: 20472: virtual void GetApproximateSizes(ColumnFamilyHandle* column_family, 20472: const Range* ranges, int n, uint64_t* sizes, 20472: uint8_t include_flags = INCLUDE_FILES) { 20472: SizeApproximationOptions options; 20472: options.include_memtabtles = 20472: (include_flags & SizeApproximationFlags::INCLUDE_MEMTABLES) != 0; 20472: options.include_files = 20472: (include_flags & SizeApproximationFlags::INCLUDE_FILES) != 0; 20472: GetApproximateSizes(options, column_family, ranges, n, sizes); 20472: } 20472: virtual void GetApproximateSizes(const Range* ranges, int n, uint64_t* sizes, 20472: uint8_t include_flags = INCLUDE_FILES) { 20472: GetApproximateSizes(DefaultColumnFamily(), ranges, n, sizes, include_flags); 20472: } 20472: 20472: 20472: 20472: virtual void GetApproximateMemTableStats(ColumnFamilyHandle* column_family, 20472: const Range& range, 20472: uint64_t* const count, 20472: uint64_t* const size) = 0; 20472: virtual void GetApproximateMemTableStats(const Range& range, 20472: uint64_t* const count, 20472: uint64_t* const size) { 20472: GetApproximateMemTableStats(DefaultColumnFamily(), range, count, size); 20472: } 20472: 20472: 20472: __attribute__((__deprecated__)) virtual void GetApproximateSizes( 20472: const Range* range, int n, uint64_t* sizes, bool include_memtable) { 20472: uint8_t include_flags = SizeApproximationFlags::INCLUDE_FILES; 20472: if (include_memtable) { 20472: include_flags |= SizeApproximationFlags::INCLUDE_MEMTABLES; 20472: } 20472: GetApproximateSizes(DefaultColumnFamily(), range, n, sizes, include_flags); 20472: } 20472: __attribute__((__deprecated__)) virtual void GetApproximateSizes( 20472: ColumnFamilyHandle* column_family, const Range* range, int n, 20472: uint64_t* sizes, bool include_memtable) { 20472: uint8_t include_flags = SizeApproximationFlags::INCLUDE_FILES; 20472: if (include_memtable) { 20472: include_flags |= SizeApproximationFlags::INCLUDE_MEMTABLES; 20472: } 20472: GetApproximateSizes(column_family, range, n, sizes, include_flags); 20472: } 20472: # 1090 "./include/rocksdb/db.h" 20472: virtual Status CompactRange(const CompactRangeOptions& options, 20472: ColumnFamilyHandle* column_family, 20472: const Slice* begin, const Slice* end) = 0; 20472: virtual Status CompactRange(const CompactRangeOptions& options, 20472: const Slice* begin, const Slice* end) { 20472: return CompactRange(options, DefaultColumnFamily(), begin, end); 20472: } 20472: 20472: __attribute__((__deprecated__)) virtual Status CompactRange( 20472: ColumnFamilyHandle* column_family, const Slice* begin, const Slice* end, 20472: bool change_level = false, int target_level = -1, 20472: uint32_t target_path_id = 0) { 20472: CompactRangeOptions options; 20472: options.change_level = change_level; 20472: options.target_level = target_level; 20472: options.target_path_id = target_path_id; 20472: return CompactRange(options, column_family, begin, end); 20472: } 20472: 20472: __attribute__((__deprecated__)) virtual Status CompactRange( 20472: const Slice* begin, const Slice* end, bool change_level = false, 20472: int target_level = -1, uint32_t target_path_id = 0) { 20472: CompactRangeOptions options; 20472: options.change_level = change_level; 20472: options.target_level = target_level; 20472: options.target_path_id = target_path_id; 20472: return CompactRange(options, DefaultColumnFamily(), begin, end); 20472: } 20472: 20472: virtual Status SetOptions( 20472: ColumnFamilyHandle* , 20472: const std::unordered_map& ) { 20472: return Status::NotSupported("Not implemented"); 20472: } 20472: virtual Status SetOptions( 20472: const std::unordered_map& new_options) { 20472: return SetOptions(DefaultColumnFamily(), new_options); 20472: } 20472: 20472: virtual Status SetDBOptions( 20472: const std::unordered_map& new_options) = 0; 20472: # 1139 "./include/rocksdb/db.h" 20472: virtual Status CompactFiles( 20472: const CompactionOptions& compact_options, 20472: ColumnFamilyHandle* column_family, 20472: const std::vector& input_file_names, const int output_level, 20472: const int output_path_id = -1, 20472: std::vector* const output_file_names = nullptr, 20472: CompactionJobInfo* compaction_job_info = nullptr) = 0; 20472: 20472: virtual Status CompactFiles( 20472: const CompactionOptions& compact_options, 20472: const std::vector& input_file_names, const int output_level, 20472: const int output_path_id = -1, 20472: std::vector* const output_file_names = nullptr, 20472: CompactionJobInfo* compaction_job_info = nullptr) { 20472: return CompactFiles(compact_options, DefaultColumnFamily(), 20472: input_file_names, output_level, output_path_id, 20472: output_file_names, compaction_job_info); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: virtual Status PauseBackgroundWork() = 0; 20472: virtual Status ContinueBackgroundWork() = 0; 20472: # 1174 "./include/rocksdb/db.h" 20472: virtual Status EnableAutoCompaction( 20472: const std::vector& column_family_handles) = 0; 20472: 20472: virtual void DisableManualCompaction() = 0; 20472: virtual void EnableManualCompaction() = 0; 20472: 20472: 20472: virtual int NumberLevels(ColumnFamilyHandle* column_family) = 0; 20472: virtual int NumberLevels() { return NumberLevels(DefaultColumnFamily()); } 20472: 20472: 20472: 20472: virtual int MaxMemCompactionLevel(ColumnFamilyHandle* column_family) = 0; 20472: virtual int MaxMemCompactionLevel() { 20472: return MaxMemCompactionLevel(DefaultColumnFamily()); 20472: } 20472: 20472: 20472: virtual int Level0StopWriteTrigger(ColumnFamilyHandle* column_family) = 0; 20472: virtual int Level0StopWriteTrigger() { 20472: return Level0StopWriteTrigger(DefaultColumnFamily()); 20472: } 20472: 20472: 20472: 20472: virtual const std::string& GetName() const = 0; 20472: 20472: 20472: virtual Env* GetEnv() const = 0; 20472: 20472: virtual FileSystem* GetFileSystem() const; 20472: 20472: 20472: 20472: 20472: 20472: virtual Options GetOptions(ColumnFamilyHandle* column_family) const = 0; 20472: virtual Options GetOptions() const { 20472: return GetOptions(DefaultColumnFamily()); 20472: } 20472: 20472: virtual DBOptions GetDBOptions() const = 0; 20472: 20472: 20472: 20472: 20472: virtual Status Flush(const FlushOptions& options, 20472: ColumnFamilyHandle* column_family) = 0; 20472: virtual Status Flush(const FlushOptions& options) { 20472: return Flush(options, DefaultColumnFamily()); 20472: } 20472: # 1233 "./include/rocksdb/db.h" 20472: virtual Status Flush( 20472: const FlushOptions& options, 20472: const std::vector& column_families) = 0; 20472: 20472: 20472: 20472: virtual Status FlushWAL(bool ) { 20472: return Status::NotSupported("FlushWAL not implemented"); 20472: } 20472: 20472: 20472: 20472: 20472: virtual Status SyncWAL() = 0; 20472: 20472: 20472: virtual Status LockWAL() { 20472: return Status::NotSupported("LockWAL not implemented"); 20472: } 20472: 20472: 20472: virtual Status UnlockWAL() { 20472: return Status::NotSupported("UnlockWAL not implemented"); 20472: } 20472: 20472: 20472: virtual SequenceNumber GetLatestSequenceNumber() const = 0; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual bool SetPreserveDeletesSequenceNumber(SequenceNumber seqnum) = 0; 20472: 20472: 20472: 20472: 20472: virtual Status DisableFileDeletions() = 0; 20472: # 1283 "./include/rocksdb/db.h" 20472: virtual Status EnableFileDeletions(bool force = true) = 0; 20472: # 1302 "./include/rocksdb/db.h" 20472: virtual Status GetLiveFiles(std::vector&, 20472: uint64_t* manifest_file_size, 20472: bool flush_memtable = true) = 0; 20472: 20472: 20472: virtual Status GetSortedWalFiles(VectorLogPtr& files) = 0; 20472: # 1316 "./include/rocksdb/db.h" 20472: virtual Status GetCurrentWalFile( 20472: std::unique_ptr* current_log_file) = 0; 20472: # 1329 "./include/rocksdb/db.h" 20472: virtual Status GetCreationTimeOfOldestFile(uint64_t* creation_time) = 0; 20472: # 1340 "./include/rocksdb/db.h" 20472: virtual Status GetUpdatesSince( 20472: SequenceNumber seq_number, std::unique_ptr* iter, 20472: const TransactionLogIterator::ReadOptions& read_options = 20472: TransactionLogIterator::ReadOptions()) = 0; 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual Status DeleteFile(std::string name) = 0; 20472: 20472: 20472: 20472: virtual void GetLiveFilesMetaData( 20472: std::vector* ) {} 20472: 20472: 20472: virtual void GetColumnFamilyMetaData(ColumnFamilyHandle* , 20472: ColumnFamilyMetaData* ) {} 20472: 20472: 20472: void GetColumnFamilyMetaData(ColumnFamilyMetaData* metadata) { 20472: GetColumnFamilyMetaData(DefaultColumnFamily(), metadata); 20472: } 20472: # 1383 "./include/rocksdb/db.h" 20472: virtual Status IngestExternalFile( 20472: ColumnFamilyHandle* column_family, 20472: const std::vector& external_files, 20472: const IngestExternalFileOptions& options) = 0; 20472: 20472: virtual Status IngestExternalFile( 20472: const std::vector& external_files, 20472: const IngestExternalFileOptions& options) { 20472: return IngestExternalFile(DefaultColumnFamily(), external_files, options); 20472: } 20472: # 1409 "./include/rocksdb/db.h" 20472: virtual Status IngestExternalFiles( 20472: const std::vector& args) = 0; 20472: # 1427 "./include/rocksdb/db.h" 20472: virtual Status CreateColumnFamilyWithImport( 20472: const ColumnFamilyOptions& options, const std::string& column_family_name, 20472: const ImportColumnFamilyOptions& import_options, 20472: const ExportImportFilesMetaData& metadata, 20472: ColumnFamilyHandle** handle) = 0; 20472: 20472: virtual Status VerifyChecksum(const ReadOptions& read_options) = 0; 20472: 20472: virtual Status VerifyChecksum() { return VerifyChecksum(ReadOptions()); } 20472: 20472: 20472: __attribute__((__deprecated__)) virtual Status AddFile( 20472: ColumnFamilyHandle* column_family, 20472: const std::vector& file_path_list, bool move_file = false, 20472: bool skip_snapshot_check = false) { 20472: IngestExternalFileOptions ifo; 20472: ifo.move_files = move_file; 20472: ifo.snapshot_consistency = !skip_snapshot_check; 20472: ifo.allow_global_seqno = false; 20472: ifo.allow_blocking_flush = false; 20472: return IngestExternalFile(column_family, file_path_list, ifo); 20472: } 20472: 20472: __attribute__((__deprecated__)) virtual Status AddFile( 20472: const std::vector& file_path_list, bool move_file = false, 20472: bool skip_snapshot_check = false) { 20472: IngestExternalFileOptions ifo; 20472: ifo.move_files = move_file; 20472: ifo.snapshot_consistency = !skip_snapshot_check; 20472: ifo.allow_global_seqno = false; 20472: ifo.allow_blocking_flush = false; 20472: return IngestExternalFile(DefaultColumnFamily(), file_path_list, ifo); 20472: } 20472: 20472: 20472: __attribute__((__deprecated__)) virtual Status AddFile( 20472: ColumnFamilyHandle* column_family, const std::string& file_path, 20472: bool move_file = false, bool skip_snapshot_check = false) { 20472: IngestExternalFileOptions ifo; 20472: ifo.move_files = move_file; 20472: ifo.snapshot_consistency = !skip_snapshot_check; 20472: ifo.allow_global_seqno = false; 20472: ifo.allow_blocking_flush = false; 20472: return IngestExternalFile(column_family, {file_path}, ifo); 20472: } 20472: 20472: __attribute__((__deprecated__)) virtual Status AddFile( 20472: const std::string& file_path, bool move_file = false, 20472: bool skip_snapshot_check = false) { 20472: IngestExternalFileOptions ifo; 20472: ifo.move_files = move_file; 20472: ifo.snapshot_consistency = !skip_snapshot_check; 20472: ifo.allow_global_seqno = false; 20472: ifo.allow_blocking_flush = false; 20472: return IngestExternalFile(DefaultColumnFamily(), {file_path}, ifo); 20472: } 20472: 20472: 20472: __attribute__((__deprecated__)) virtual Status AddFile( 20472: ColumnFamilyHandle* column_family, 20472: const std::vector& file_info_list, 20472: bool move_file = false, bool skip_snapshot_check = false) { 20472: std::vector external_files; 20472: for (const ExternalSstFileInfo& file_info : file_info_list) { 20472: external_files.push_back(file_info.file_path); 20472: } 20472: IngestExternalFileOptions ifo; 20472: ifo.move_files = move_file; 20472: ifo.snapshot_consistency = !skip_snapshot_check; 20472: ifo.allow_global_seqno = false; 20472: ifo.allow_blocking_flush = false; 20472: return IngestExternalFile(column_family, external_files, ifo); 20472: } 20472: 20472: __attribute__((__deprecated__)) virtual Status AddFile( 20472: const std::vector& file_info_list, 20472: bool move_file = false, bool skip_snapshot_check = false) { 20472: std::vector external_files; 20472: for (const ExternalSstFileInfo& file_info : file_info_list) { 20472: external_files.push_back(file_info.file_path); 20472: } 20472: IngestExternalFileOptions ifo; 20472: ifo.move_files = move_file; 20472: ifo.snapshot_consistency = !skip_snapshot_check; 20472: ifo.allow_global_seqno = false; 20472: ifo.allow_blocking_flush = false; 20472: return IngestExternalFile(DefaultColumnFamily(), external_files, ifo); 20472: } 20472: 20472: __attribute__((__deprecated__)) virtual Status AddFile( 20472: ColumnFamilyHandle* column_family, const ExternalSstFileInfo* file_info, 20472: bool move_file = false, bool skip_snapshot_check = false) { 20472: IngestExternalFileOptions ifo; 20472: ifo.move_files = move_file; 20472: ifo.snapshot_consistency = !skip_snapshot_check; 20472: ifo.allow_global_seqno = false; 20472: ifo.allow_blocking_flush = false; 20472: return IngestExternalFile(column_family, {file_info->file_path}, ifo); 20472: } 20472: 20472: __attribute__((__deprecated__)) virtual Status AddFile( 20472: const ExternalSstFileInfo* file_info, bool move_file = false, 20472: bool skip_snapshot_check = false) { 20472: IngestExternalFileOptions ifo; 20472: ifo.move_files = move_file; 20472: ifo.snapshot_consistency = !skip_snapshot_check; 20472: ifo.allow_global_seqno = false; 20472: ifo.allow_blocking_flush = false; 20472: return IngestExternalFile(DefaultColumnFamily(), {file_info->file_path}, 20472: ifo); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual Status GetDbIdentity(std::string& identity) const = 0; 20472: 20472: 20472: virtual ColumnFamilyHandle* DefaultColumnFamily() const = 0; 20472: 20472: 20472: virtual Status GetPropertiesOfAllTables(ColumnFamilyHandle* column_family, 20472: TablePropertiesCollection* props) = 0; 20472: virtual Status GetPropertiesOfAllTables(TablePropertiesCollection* props) { 20472: return GetPropertiesOfAllTables(DefaultColumnFamily(), props); 20472: } 20472: virtual Status GetPropertiesOfTablesInRange( 20472: ColumnFamilyHandle* column_family, const Range* range, std::size_t n, 20472: TablePropertiesCollection* props) = 0; 20472: 20472: virtual Status SuggestCompactRange(ColumnFamilyHandle* , 20472: const Slice* , 20472: const Slice* ) { 20472: return Status::NotSupported("SuggestCompactRange() is not implemented."); 20472: } 20472: 20472: virtual Status PromoteL0(ColumnFamilyHandle* , 20472: int ) { 20472: return Status::NotSupported("PromoteL0() is not implemented."); 20472: } 20472: 20472: 20472: virtual Status StartTrace(const TraceOptions& , 20472: std::unique_ptr&& ) { 20472: return Status::NotSupported("StartTrace() is not implemented."); 20472: } 20472: 20472: virtual Status EndTrace() { 20472: return Status::NotSupported("EndTrace() is not implemented."); 20472: } 20472: 20472: 20472: virtual Status StartBlockCacheTrace( 20472: const TraceOptions& , 20472: std::unique_ptr&& ) { 20472: return Status::NotSupported("StartBlockCacheTrace() is not implemented."); 20472: } 20472: 20472: virtual Status EndBlockCacheTrace() { 20472: return Status::NotSupported("EndBlockCacheTrace() is not implemented."); 20472: } 20472: 20472: 20472: 20472: virtual DB* GetRootDB() { return this; } 20472: 20472: 20472: 20472: 20472: virtual Status GetStatsHistory( 20472: uint64_t , uint64_t , 20472: std::unique_ptr* ) { 20472: return Status::NotSupported("GetStatsHistory() is not implemented."); 20472: } 20472: # 1616 "./include/rocksdb/db.h" 20472: virtual Status TryCatchUpWithPrimary() { 20472: return Status::NotSupported("Supported only by secondary instance"); 20472: } 20472: 20472: }; 20472: 20472: 20472: 20472: Status DestroyDB(const std::string& name, const Options& options, 20472: const std::vector& column_families = 20472: std::vector()); 20472: # 1638 "./include/rocksdb/db.h" 20472: Status RepairDB(const std::string& dbname, const DBOptions& db_options, 20472: const std::vector& column_families); 20472: 20472: 20472: 20472: Status RepairDB(const std::string& dbname, const DBOptions& db_options, 20472: const std::vector& column_families, 20472: const ColumnFamilyOptions& unknown_cf_opts); 20472: 20472: 20472: 20472: Status RepairDB(const std::string& dbname, const Options& options); 20472: 20472: 20472: 20472: } 20472: # 14 "./db/lookup_key.h" 2 20472: 20472: 20472: 20472: namespace rocksdb { 20472: 20472: 20472: class LookupKey { 20472: public: 20472: 20472: 20472: LookupKey(const Slice& _user_key, SequenceNumber sequence, 20472: const Slice* ts = nullptr); 20472: 20472: ~LookupKey(); 20472: 20472: 20472: Slice memtable_key() const { 20472: return Slice(start_, static_cast(end_ - start_)); 20472: } 20472: 20472: 20472: Slice internal_key() const { 20472: return Slice(kstart_, static_cast(end_ - kstart_)); 20472: } 20472: 20472: 20472: Slice user_key() const { 20472: return Slice(kstart_, static_cast(end_ - kstart_ - 8)); 20472: } 20472: 20472: private: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: const char* start_; 20472: const char* kstart_; 20472: const char* end_; 20472: char space_[200]; 20472: 20472: 20472: LookupKey(const LookupKey&); 20472: void operator=(const LookupKey&); 20472: }; 20472: 20472: inline LookupKey::~LookupKey() { 20472: if (start_ != space_) delete[] start_; 20472: } 20472: 20472: } 20472: # 16 "./db/dbformat.h" 2 20472: # 1 "./db/merge_context.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "/usr/include/c++/10/algorithm" 1 3 20472: # 58 "/usr/include/c++/10/algorithm" 3 20472: 20472: # 59 "/usr/include/c++/10/algorithm" 3 20472: 20472: 20472: 20472: # 1 "/usr/include/c++/10/bits/stl_algo.h" 1 3 20472: # 59 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: # 1 "/usr/include/c++/10/cstdlib" 1 3 20472: # 39 "/usr/include/c++/10/cstdlib" 3 20472: 20472: # 40 "/usr/include/c++/10/cstdlib" 3 20472: # 60 "/usr/include/c++/10/bits/stl_algo.h" 2 3 20472: # 1 "/usr/include/c++/10/bits/algorithmfwd.h" 1 3 20472: # 33 "/usr/include/c++/10/bits/algorithmfwd.h" 3 20472: 20472: # 34 "/usr/include/c++/10/bits/algorithmfwd.h" 3 20472: # 42 "/usr/include/c++/10/bits/algorithmfwd.h" 3 20472: 20472: # 42 "/usr/include/c++/10/bits/algorithmfwd.h" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: # 199 "/usr/include/c++/10/bits/algorithmfwd.h" 3 20472: template 20472: 20472: bool 20472: all_of(_IIter, _IIter, _Predicate); 20472: 20472: template 20472: 20472: bool 20472: any_of(_IIter, _IIter, _Predicate); 20472: 20472: 20472: template 20472: 20472: bool 20472: binary_search(_FIter, _FIter, const _Tp&); 20472: 20472: template 20472: 20472: bool 20472: binary_search(_FIter, _FIter, const _Tp&, _Compare); 20472: # 232 "/usr/include/c++/10/bits/algorithmfwd.h" 3 20472: template 20472: 20472: _OIter 20472: copy(_IIter, _IIter, _OIter); 20472: 20472: template 20472: 20472: _BIter2 20472: copy_backward(_BIter1, _BIter1, _BIter2); 20472: 20472: 20472: template 20472: 20472: _OIter 20472: copy_if(_IIter, _IIter, _OIter, _Predicate); 20472: 20472: template 20472: 20472: _OIter 20472: copy_n(_IIter, _Size, _OIter); 20472: 20472: 20472: 20472: 20472: 20472: template 20472: 20472: pair<_FIter, _FIter> 20472: equal_range(_FIter, _FIter, const _Tp&); 20472: 20472: template 20472: 20472: pair<_FIter, _FIter> 20472: equal_range(_FIter, _FIter, const _Tp&, _Compare); 20472: 20472: template 20472: 20472: void 20472: fill(_FIter, _FIter, const _Tp&); 20472: 20472: template 20472: 20472: _OIter 20472: fill_n(_OIter, _Size, const _Tp&); 20472: 20472: 20472: 20472: template 20472: 20472: _FIter1 20472: find_end(_FIter1, _FIter1, _FIter2, _FIter2); 20472: 20472: template 20472: 20472: _FIter1 20472: find_end(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate); 20472: 20472: 20472: 20472: 20472: 20472: template 20472: 20472: _IIter 20472: find_if_not(_IIter, _IIter, _Predicate); 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: 20472: bool 20472: includes(_IIter1, _IIter1, _IIter2, _IIter2); 20472: 20472: template 20472: 20472: bool 20472: includes(_IIter1, _IIter1, _IIter2, _IIter2, _Compare); 20472: 20472: template 20472: void 20472: inplace_merge(_BIter, _BIter, _BIter); 20472: 20472: template 20472: void 20472: inplace_merge(_BIter, _BIter, _BIter, _Compare); 20472: 20472: 20472: template 20472: 20472: bool 20472: is_heap(_RAIter, _RAIter); 20472: 20472: template 20472: 20472: bool 20472: is_heap(_RAIter, _RAIter, _Compare); 20472: 20472: template 20472: 20472: _RAIter 20472: is_heap_until(_RAIter, _RAIter); 20472: 20472: template 20472: 20472: _RAIter 20472: is_heap_until(_RAIter, _RAIter, _Compare); 20472: 20472: template 20472: 20472: bool 20472: is_partitioned(_IIter, _IIter, _Predicate); 20472: 20472: template 20472: 20472: bool 20472: is_permutation(_FIter1, _FIter1, _FIter2); 20472: 20472: template 20472: 20472: bool 20472: is_permutation(_FIter1, _FIter1, _FIter2, _BinaryPredicate); 20472: 20472: template 20472: 20472: bool 20472: is_sorted(_FIter, _FIter); 20472: 20472: template 20472: 20472: bool 20472: is_sorted(_FIter, _FIter, _Compare); 20472: 20472: template 20472: 20472: _FIter 20472: is_sorted_until(_FIter, _FIter); 20472: 20472: template 20472: 20472: _FIter 20472: is_sorted_until(_FIter, _FIter, _Compare); 20472: 20472: 20472: template 20472: 20472: void 20472: iter_swap(_FIter1, _FIter2); 20472: 20472: template 20472: 20472: _FIter 20472: lower_bound(_FIter, _FIter, const _Tp&); 20472: 20472: template 20472: 20472: _FIter 20472: lower_bound(_FIter, _FIter, const _Tp&, _Compare); 20472: 20472: template 20472: 20472: void 20472: make_heap(_RAIter, _RAIter); 20472: 20472: template 20472: 20472: void 20472: make_heap(_RAIter, _RAIter, _Compare); 20472: 20472: template 20472: 20472: const _Tp& 20472: max(const _Tp&, const _Tp&); 20472: 20472: template 20472: 20472: const _Tp& 20472: max(const _Tp&, const _Tp&, _Compare); 20472: 20472: 20472: 20472: 20472: template 20472: 20472: const _Tp& 20472: min(const _Tp&, const _Tp&); 20472: 20472: template 20472: 20472: const _Tp& 20472: min(const _Tp&, const _Tp&, _Compare); 20472: 20472: 20472: 20472: 20472: template 20472: 20472: pair 20472: minmax(const _Tp&, const _Tp&); 20472: 20472: template 20472: 20472: pair 20472: minmax(const _Tp&, const _Tp&, _Compare); 20472: 20472: template 20472: 20472: pair<_FIter, _FIter> 20472: minmax_element(_FIter, _FIter); 20472: 20472: template 20472: 20472: pair<_FIter, _FIter> 20472: minmax_element(_FIter, _FIter, _Compare); 20472: 20472: template 20472: 20472: _Tp 20472: min(initializer_list<_Tp>); 20472: 20472: template 20472: 20472: _Tp 20472: min(initializer_list<_Tp>, _Compare); 20472: 20472: template 20472: 20472: _Tp 20472: max(initializer_list<_Tp>); 20472: 20472: template 20472: 20472: _Tp 20472: max(initializer_list<_Tp>, _Compare); 20472: 20472: template 20472: 20472: pair<_Tp, _Tp> 20472: minmax(initializer_list<_Tp>); 20472: 20472: template 20472: 20472: pair<_Tp, _Tp> 20472: minmax(initializer_list<_Tp>, _Compare); 20472: 20472: 20472: 20472: 20472: template 20472: 20472: bool 20472: next_permutation(_BIter, _BIter); 20472: 20472: template 20472: 20472: bool 20472: next_permutation(_BIter, _BIter, _Compare); 20472: 20472: 20472: template 20472: 20472: bool 20472: none_of(_IIter, _IIter, _Predicate); 20472: 20472: 20472: 20472: 20472: 20472: template 20472: 20472: _RAIter 20472: partial_sort_copy(_IIter, _IIter, _RAIter, _RAIter); 20472: 20472: template 20472: 20472: _RAIter 20472: partial_sort_copy(_IIter, _IIter, _RAIter, _RAIter, _Compare); 20472: 20472: 20472: 20472: 20472: template 20472: 20472: pair<_OIter1, _OIter2> 20472: partition_copy(_IIter, _IIter, _OIter1, _OIter2, _Predicate); 20472: 20472: template 20472: 20472: _FIter 20472: partition_point(_FIter, _FIter, _Predicate); 20472: 20472: 20472: template 20472: 20472: void 20472: pop_heap(_RAIter, _RAIter); 20472: 20472: template 20472: 20472: void 20472: pop_heap(_RAIter, _RAIter, _Compare); 20472: 20472: template 20472: 20472: bool 20472: prev_permutation(_BIter, _BIter); 20472: 20472: template 20472: 20472: bool 20472: prev_permutation(_BIter, _BIter, _Compare); 20472: 20472: template 20472: 20472: void 20472: push_heap(_RAIter, _RAIter); 20472: 20472: template 20472: 20472: void 20472: push_heap(_RAIter, _RAIter, _Compare); 20472: 20472: 20472: 20472: template 20472: 20472: _FIter 20472: remove(_FIter, _FIter, const _Tp&); 20472: 20472: template 20472: 20472: _FIter 20472: remove_if(_FIter, _FIter, _Predicate); 20472: 20472: template 20472: 20472: _OIter 20472: remove_copy(_IIter, _IIter, _OIter, const _Tp&); 20472: 20472: template 20472: 20472: _OIter 20472: remove_copy_if(_IIter, _IIter, _OIter, _Predicate); 20472: 20472: 20472: 20472: template 20472: 20472: _OIter 20472: replace_copy(_IIter, _IIter, _OIter, const _Tp&, const _Tp&); 20472: 20472: template 20472: 20472: _OIter 20472: replace_copy_if(_Iter, _Iter, _OIter, _Predicate, const _Tp&); 20472: 20472: 20472: 20472: template 20472: 20472: void 20472: reverse(_BIter, _BIter); 20472: 20472: template 20472: 20472: _OIter 20472: reverse_copy(_BIter, _BIter, _OIter); 20472: 20472: inline namespace _V2 20472: { 20472: template 20472: 20472: _FIter 20472: rotate(_FIter, _FIter, _FIter); 20472: } 20472: 20472: template 20472: 20472: _OIter 20472: rotate_copy(_FIter, _FIter, _FIter, _OIter); 20472: # 625 "/usr/include/c++/10/bits/algorithmfwd.h" 3 20472: template 20472: void 20472: shuffle(_RAIter, _RAIter, _UGenerator&&); 20472: 20472: 20472: template 20472: 20472: void 20472: sort_heap(_RAIter, _RAIter); 20472: 20472: template 20472: 20472: void 20472: sort_heap(_RAIter, _RAIter, _Compare); 20472: 20472: template 20472: _BIter 20472: stable_partition(_BIter, _BIter, _Predicate); 20472: # 658 "/usr/include/c++/10/bits/algorithmfwd.h" 3 20472: template 20472: 20472: _FIter2 20472: swap_ranges(_FIter1, _FIter1, _FIter2); 20472: 20472: 20472: 20472: template 20472: 20472: _FIter 20472: unique(_FIter, _FIter); 20472: 20472: template 20472: 20472: _FIter 20472: unique(_FIter, _FIter, _BinaryPredicate); 20472: 20472: 20472: 20472: template 20472: 20472: _FIter 20472: upper_bound(_FIter, _FIter, const _Tp&); 20472: 20472: template 20472: 20472: _FIter 20472: upper_bound(_FIter, _FIter, const _Tp&, _Compare); 20472: 20472: 20472: 20472: template 20472: 20472: _FIter 20472: adjacent_find(_FIter, _FIter); 20472: 20472: template 20472: 20472: _FIter 20472: adjacent_find(_FIter, _FIter, _BinaryPredicate); 20472: 20472: template 20472: 20472: typename iterator_traits<_IIter>::difference_type 20472: count(_IIter, _IIter, const _Tp&); 20472: 20472: template 20472: 20472: typename iterator_traits<_IIter>::difference_type 20472: count_if(_IIter, _IIter, _Predicate); 20472: 20472: template 20472: 20472: bool 20472: equal(_IIter1, _IIter1, _IIter2); 20472: 20472: template 20472: 20472: bool 20472: equal(_IIter1, _IIter1, _IIter2, _BinaryPredicate); 20472: 20472: template 20472: 20472: _IIter 20472: find(_IIter, _IIter, const _Tp&); 20472: 20472: template 20472: 20472: _FIter1 20472: find_first_of(_FIter1, _FIter1, _FIter2, _FIter2); 20472: 20472: template 20472: 20472: _FIter1 20472: find_first_of(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate); 20472: 20472: template 20472: 20472: _IIter 20472: find_if(_IIter, _IIter, _Predicate); 20472: 20472: template 20472: 20472: _Funct 20472: for_each(_IIter, _IIter, _Funct); 20472: 20472: template 20472: 20472: void 20472: generate(_FIter, _FIter, _Generator); 20472: 20472: template 20472: 20472: _OIter 20472: generate_n(_OIter, _Size, _Generator); 20472: 20472: template 20472: 20472: bool 20472: lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2); 20472: 20472: template 20472: 20472: bool 20472: lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2, _Compare); 20472: 20472: template 20472: 20472: _FIter 20472: max_element(_FIter, _FIter); 20472: 20472: template 20472: 20472: _FIter 20472: max_element(_FIter, _FIter, _Compare); 20472: 20472: template 20472: 20472: _OIter 20472: merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); 20472: 20472: template 20472: 20472: _OIter 20472: merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); 20472: 20472: template 20472: 20472: _FIter 20472: min_element(_FIter, _FIter); 20472: 20472: template 20472: 20472: _FIter 20472: min_element(_FIter, _FIter, _Compare); 20472: 20472: template 20472: 20472: pair<_IIter1, _IIter2> 20472: mismatch(_IIter1, _IIter1, _IIter2); 20472: 20472: template 20472: 20472: pair<_IIter1, _IIter2> 20472: mismatch(_IIter1, _IIter1, _IIter2, _BinaryPredicate); 20472: 20472: template 20472: 20472: void 20472: nth_element(_RAIter, _RAIter, _RAIter); 20472: 20472: template 20472: 20472: void 20472: nth_element(_RAIter, _RAIter, _RAIter, _Compare); 20472: 20472: template 20472: 20472: void 20472: partial_sort(_RAIter, _RAIter, _RAIter); 20472: 20472: template 20472: 20472: void 20472: partial_sort(_RAIter, _RAIter, _RAIter, _Compare); 20472: 20472: template 20472: 20472: _BIter 20472: partition(_BIter, _BIter, _Predicate); 20472: 20472: template 20472: void 20472: random_shuffle(_RAIter, _RAIter); 20472: 20472: template 20472: void 20472: random_shuffle(_RAIter, _RAIter, 20472: 20472: _Generator&&); 20472: 20472: 20472: 20472: 20472: template 20472: 20472: void 20472: replace(_FIter, _FIter, const _Tp&, const _Tp&); 20472: 20472: template 20472: 20472: void 20472: replace_if(_FIter, _FIter, _Predicate, const _Tp&); 20472: 20472: template 20472: 20472: _FIter1 20472: search(_FIter1, _FIter1, _FIter2, _FIter2); 20472: 20472: template 20472: 20472: _FIter1 20472: search(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate); 20472: 20472: template 20472: 20472: _FIter 20472: search_n(_FIter, _FIter, _Size, const _Tp&); 20472: 20472: template 20472: 20472: _FIter 20472: search_n(_FIter, _FIter, _Size, const _Tp&, _BinaryPredicate); 20472: 20472: template 20472: 20472: _OIter 20472: set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); 20472: 20472: template 20472: 20472: _OIter 20472: set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); 20472: 20472: template 20472: 20472: _OIter 20472: set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); 20472: 20472: template 20472: 20472: _OIter 20472: set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); 20472: 20472: template 20472: 20472: _OIter 20472: set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); 20472: 20472: template 20472: 20472: _OIter 20472: set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, 20472: _OIter, _Compare); 20472: 20472: template 20472: 20472: _OIter 20472: set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); 20472: 20472: template 20472: 20472: _OIter 20472: set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); 20472: 20472: template 20472: 20472: void 20472: sort(_RAIter, _RAIter); 20472: 20472: template 20472: 20472: void 20472: sort(_RAIter, _RAIter, _Compare); 20472: 20472: template 20472: void 20472: stable_sort(_RAIter, _RAIter); 20472: 20472: template 20472: void 20472: stable_sort(_RAIter, _RAIter, _Compare); 20472: 20472: template 20472: 20472: _OIter 20472: transform(_IIter, _IIter, _OIter, _UnaryOperation); 20472: 20472: template 20472: 20472: _OIter 20472: transform(_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation); 20472: 20472: template 20472: 20472: _OIter 20472: unique_copy(_IIter, _IIter, _OIter); 20472: 20472: template 20472: 20472: _OIter 20472: unique_copy(_IIter, _IIter, _OIter, _BinaryPredicate); 20472: 20472: 20472: 20472: } 20472: # 61 "/usr/include/c++/10/bits/stl_algo.h" 2 3 20472: # 1 "/usr/include/c++/10/bits/stl_heap.h" 1 3 20472: # 62 "/usr/include/c++/10/bits/stl_heap.h" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: 20472: _Distance 20472: __is_heap_until(_RandomAccessIterator __first, _Distance __n, 20472: _Compare& __comp) 20472: { 20472: _Distance __parent = 0; 20472: for (_Distance __child = 1; __child < __n; ++__child) 20472: { 20472: if (__comp(__first + __parent, __first + __child)) 20472: return __child; 20472: if ((__child & 1) == 0) 20472: ++__parent; 20472: } 20472: return __n; 20472: } 20472: 20472: 20472: 20472: template 20472: 20472: inline bool 20472: __is_heap(_RandomAccessIterator __first, _Distance __n) 20472: { 20472: __gnu_cxx::__ops::_Iter_less_iter __comp; 20472: return std::__is_heap_until(__first, __n, __comp) == __n; 20472: } 20472: 20472: template 20472: 20472: inline bool 20472: __is_heap(_RandomAccessIterator __first, _Compare __comp, _Distance __n) 20472: { 20472: typedef __decltype(__comp) _Cmp; 20472: __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(std::move(__comp)); 20472: return std::__is_heap_until(__first, __n, __cmp) == __n; 20472: } 20472: 20472: template 20472: 20472: inline bool 20472: __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) 20472: { return std::__is_heap(__first, std::distance(__first, __last)); } 20472: 20472: template 20472: 20472: inline bool 20472: __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, 20472: _Compare __comp) 20472: { 20472: return std::__is_heap(__first, std::move(__comp), 20472: std::distance(__first, __last)); 20472: } 20472: 20472: 20472: 20472: 20472: template 20472: 20472: void 20472: __push_heap(_RandomAccessIterator __first, 20472: _Distance __holeIndex, _Distance __topIndex, _Tp __value, 20472: _Compare& __comp) 20472: { 20472: _Distance __parent = (__holeIndex - 1) / 2; 20472: while (__holeIndex > __topIndex && __comp(__first + __parent, __value)) 20472: { 20472: *(__first + __holeIndex) = std::move(*(__first + __parent)); 20472: __holeIndex = __parent; 20472: __parent = (__holeIndex - 1) / 2; 20472: } 20472: *(__first + __holeIndex) = std::move(__value); 20472: } 20472: # 158 "/usr/include/c++/10/bits/stl_heap.h" 3 20472: template 20472: 20472: inline void 20472: push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) 20472: { 20472: typedef typename iterator_traits<_RandomAccessIterator>::value_type 20472: _ValueType; 20472: typedef typename iterator_traits<_RandomAccessIterator>::difference_type 20472: _DistanceType; 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: ; 20472: 20472: __gnu_cxx::__ops::_Iter_less_val __comp; 20472: _ValueType __value = std::move(*(__last - 1)); 20472: std::__push_heap(__first, _DistanceType((__last - __first) - 1), 20472: _DistanceType(0), std::move(__value), __comp); 20472: } 20472: # 194 "/usr/include/c++/10/bits/stl_heap.h" 3 20472: template 20472: 20472: inline void 20472: push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, 20472: _Compare __comp) 20472: { 20472: typedef typename iterator_traits<_RandomAccessIterator>::value_type 20472: _ValueType; 20472: typedef typename iterator_traits<_RandomAccessIterator>::difference_type 20472: _DistanceType; 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: ; 20472: 20472: __decltype(__gnu_cxx::__ops::__iter_comp_val(std::move(__comp))) 20472: __cmp(std::move(__comp)); 20472: _ValueType __value = std::move(*(__last - 1)); 20472: std::__push_heap(__first, _DistanceType((__last - __first) - 1), 20472: _DistanceType(0), std::move(__value), __cmp); 20472: } 20472: 20472: template 20472: 20472: void 20472: __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex, 20472: _Distance __len, _Tp __value, _Compare __comp) 20472: { 20472: const _Distance __topIndex = __holeIndex; 20472: _Distance __secondChild = __holeIndex; 20472: while (__secondChild < (__len - 1) / 2) 20472: { 20472: __secondChild = 2 * (__secondChild + 1); 20472: if (__comp(__first + __secondChild, 20472: __first + (__secondChild - 1))) 20472: __secondChild--; 20472: *(__first + __holeIndex) = std::move(*(__first + __secondChild)); 20472: __holeIndex = __secondChild; 20472: } 20472: if ((__len & 1) == 0 && __secondChild == (__len - 2) / 2) 20472: { 20472: __secondChild = 2 * (__secondChild + 1); 20472: *(__first + __holeIndex) = std::move(*(__first + (__secondChild - 1))) 20472: ; 20472: __holeIndex = __secondChild - 1; 20472: } 20472: __decltype(__gnu_cxx::__ops::__iter_comp_val(std::move(__comp))) 20472: __cmp(std::move(__comp)); 20472: std::__push_heap(__first, __holeIndex, __topIndex, 20472: std::move(__value), __cmp); 20472: } 20472: 20472: template 20472: 20472: inline void 20472: __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, 20472: _RandomAccessIterator __result, _Compare& __comp) 20472: { 20472: typedef typename iterator_traits<_RandomAccessIterator>::value_type 20472: _ValueType; 20472: typedef typename iterator_traits<_RandomAccessIterator>::difference_type 20472: _DistanceType; 20472: 20472: _ValueType __value = std::move(*__result); 20472: *__result = std::move(*__first); 20472: std::__adjust_heap(__first, _DistanceType(0), 20472: _DistanceType(__last - __first), 20472: std::move(__value), __comp); 20472: } 20472: # 279 "/usr/include/c++/10/bits/stl_heap.h" 3 20472: template 20472: 20472: inline void 20472: pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: ; 20472: ; 20472: 20472: if (__last - __first > 1) 20472: { 20472: --__last; 20472: __gnu_cxx::__ops::_Iter_less_iter __comp; 20472: std::__pop_heap(__first, __last, __last, __comp); 20472: } 20472: } 20472: # 313 "/usr/include/c++/10/bits/stl_heap.h" 3 20472: template 20472: 20472: inline void 20472: pop_heap(_RandomAccessIterator __first, 20472: _RandomAccessIterator __last, _Compare __comp) 20472: { 20472: 20472: 20472: 20472: ; 20472: ; 20472: ; 20472: ; 20472: 20472: if (__last - __first > 1) 20472: { 20472: typedef __decltype(__comp) _Cmp; 20472: __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(std::move(__comp)); 20472: --__last; 20472: std::__pop_heap(__first, __last, __last, __cmp); 20472: } 20472: } 20472: 20472: template 20472: 20472: void 20472: __make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, 20472: _Compare& __comp) 20472: { 20472: typedef typename iterator_traits<_RandomAccessIterator>::value_type 20472: _ValueType; 20472: typedef typename iterator_traits<_RandomAccessIterator>::difference_type 20472: _DistanceType; 20472: 20472: if (__last - __first < 2) 20472: return; 20472: 20472: const _DistanceType __len = __last - __first; 20472: _DistanceType __parent = (__len - 2) / 2; 20472: while (true) 20472: { 20472: _ValueType __value = std::move(*(__first + __parent)); 20472: std::__adjust_heap(__first, __parent, __len, std::move(__value), 20472: __comp); 20472: if (__parent == 0) 20472: return; 20472: __parent--; 20472: } 20472: } 20472: # 371 "/usr/include/c++/10/bits/stl_heap.h" 3 20472: template 20472: 20472: inline void 20472: make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: 20472: __gnu_cxx::__ops::_Iter_less_iter __comp; 20472: std::__make_heap(__first, __last, __comp); 20472: } 20472: # 398 "/usr/include/c++/10/bits/stl_heap.h" 3 20472: template 20472: 20472: inline void 20472: make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, 20472: _Compare __comp) 20472: { 20472: 20472: 20472: 20472: ; 20472: ; 20472: 20472: typedef __decltype(__comp) _Cmp; 20472: __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(std::move(__comp)); 20472: std::__make_heap(__first, __last, __cmp); 20472: } 20472: 20472: template 20472: 20472: void 20472: __sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, 20472: _Compare& __comp) 20472: { 20472: while (__last - __first > 1) 20472: { 20472: --__last; 20472: std::__pop_heap(__first, __last, __last, __comp); 20472: } 20472: } 20472: # 436 "/usr/include/c++/10/bits/stl_heap.h" 3 20472: template 20472: 20472: inline void 20472: sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: ; 20472: 20472: __gnu_cxx::__ops::_Iter_less_iter __comp; 20472: std::__sort_heap(__first, __last, __comp); 20472: } 20472: # 464 "/usr/include/c++/10/bits/stl_heap.h" 3 20472: template 20472: 20472: inline void 20472: sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, 20472: _Compare __comp) 20472: { 20472: 20472: 20472: 20472: ; 20472: ; 20472: ; 20472: 20472: typedef __decltype(__comp) _Cmp; 20472: __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(std::move(__comp)); 20472: std::__sort_heap(__first, __last, __cmp); 20472: } 20472: # 493 "/usr/include/c++/10/bits/stl_heap.h" 3 20472: template 20472: 20472: inline _RandomAccessIterator 20472: is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: 20472: __gnu_cxx::__ops::_Iter_less_iter __comp; 20472: return __first + 20472: std::__is_heap_until(__first, std::distance(__first, __last), __comp); 20472: } 20472: # 522 "/usr/include/c++/10/bits/stl_heap.h" 3 20472: template 20472: 20472: inline _RandomAccessIterator 20472: is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last, 20472: _Compare __comp) 20472: { 20472: 20472: 20472: 20472: ; 20472: ; 20472: 20472: typedef __decltype(__comp) _Cmp; 20472: __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(std::move(__comp)); 20472: return __first 20472: + std::__is_heap_until(__first, std::distance(__first, __last), __cmp); 20472: } 20472: # 547 "/usr/include/c++/10/bits/stl_heap.h" 3 20472: template 20472: 20472: inline bool 20472: is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) 20472: { return std::is_heap_until(__first, __last) == __last; } 20472: # 561 "/usr/include/c++/10/bits/stl_heap.h" 3 20472: template 20472: 20472: inline bool 20472: is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, 20472: _Compare __comp) 20472: { 20472: 20472: 20472: 20472: ; 20472: ; 20472: 20472: const auto __dist = std::distance(__first, __last); 20472: typedef __decltype(__comp) _Cmp; 20472: __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(std::move(__comp)); 20472: return std::__is_heap_until(__first, __dist, __cmp) == __dist; 20472: } 20472: 20472: 20472: 20472: } 20472: # 62 "/usr/include/c++/10/bits/stl_algo.h" 2 3 20472: 20472: 20472: 20472: 20472: # 1 "/usr/include/c++/10/bits/uniform_int_dist.h" 1 3 20472: # 40 "/usr/include/c++/10/bits/uniform_int_dist.h" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: # 57 "/usr/include/c++/10/bits/uniform_int_dist.h" 3 20472: namespace __detail 20472: { 20472: 20472: template 20472: inline bool 20472: _Power_of_2(_Tp __x) 20472: { 20472: return ((__x - 1) & __x) == 0; 20472: } 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: class uniform_int_distribution 20472: { 20472: static_assert(std::is_integral<_IntType>::value, 20472: "template argument must be an integral type"); 20472: 20472: public: 20472: 20472: typedef _IntType result_type; 20472: 20472: struct param_type 20472: { 20472: typedef uniform_int_distribution<_IntType> distribution_type; 20472: 20472: param_type() : param_type(0) { } 20472: 20472: explicit 20472: param_type(_IntType __a, 20472: _IntType __b = numeric_limits<_IntType>::max()) 20472: : _M_a(__a), _M_b(__b) 20472: { 20472: ; 20472: } 20472: 20472: result_type 20472: a() const 20472: { return _M_a; } 20472: 20472: result_type 20472: b() const 20472: { return _M_b; } 20472: 20472: friend bool 20472: operator==(const param_type& __p1, const param_type& __p2) 20472: { return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; } 20472: 20472: friend bool 20472: operator!=(const param_type& __p1, const param_type& __p2) 20472: { return !(__p1 == __p2); } 20472: 20472: private: 20472: _IntType _M_a; 20472: _IntType _M_b; 20472: }; 20472: 20472: public: 20472: 20472: 20472: 20472: uniform_int_distribution() : uniform_int_distribution(0) { } 20472: 20472: 20472: 20472: 20472: explicit 20472: uniform_int_distribution(_IntType __a, 20472: _IntType __b = numeric_limits<_IntType>::max()) 20472: : _M_param(__a, __b) 20472: { } 20472: 20472: explicit 20472: uniform_int_distribution(const param_type& __p) 20472: : _M_param(__p) 20472: { } 20472: 20472: 20472: 20472: 20472: 20472: 20472: void 20472: reset() { } 20472: 20472: result_type 20472: a() const 20472: { return _M_param.a(); } 20472: 20472: result_type 20472: b() const 20472: { return _M_param.b(); } 20472: 20472: 20472: 20472: 20472: param_type 20472: param() const 20472: { return _M_param; } 20472: 20472: 20472: 20472: 20472: 20472: void 20472: param(const param_type& __param) 20472: { _M_param = __param; } 20472: 20472: 20472: 20472: 20472: result_type 20472: min() const 20472: { return this->a(); } 20472: 20472: 20472: 20472: 20472: result_type 20472: max() const 20472: { return this->b(); } 20472: 20472: 20472: 20472: 20472: template 20472: result_type 20472: operator()(_UniformRandomNumberGenerator& __urng) 20472: { return this->operator()(__urng, _M_param); } 20472: 20472: template 20472: result_type 20472: operator()(_UniformRandomNumberGenerator& __urng, 20472: const param_type& __p); 20472: 20472: template 20472: void 20472: __generate(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng) 20472: { this->__generate(__f, __t, __urng, _M_param); } 20472: 20472: template 20472: void 20472: __generate(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { this->__generate_impl(__f, __t, __urng, __p); } 20472: 20472: template 20472: void 20472: __generate(result_type* __f, result_type* __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { this->__generate_impl(__f, __t, __urng, __p); } 20472: 20472: 20472: 20472: 20472: 20472: friend bool 20472: operator==(const uniform_int_distribution& __d1, 20472: const uniform_int_distribution& __d2) 20472: { return __d1._M_param == __d2._M_param; } 20472: 20472: private: 20472: template 20472: void 20472: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p); 20472: 20472: param_type _M_param; 20472: }; 20472: 20472: template 20472: template 20472: typename uniform_int_distribution<_IntType>::result_type 20472: uniform_int_distribution<_IntType>:: 20472: operator()(_UniformRandomNumberGenerator& __urng, 20472: const param_type& __param) 20472: { 20472: typedef typename _UniformRandomNumberGenerator::result_type 20472: _Gresult_type; 20472: typedef typename std::make_unsigned::type __utype; 20472: typedef typename std::common_type<_Gresult_type, __utype>::type 20472: __uctype; 20472: 20472: const __uctype __urngmin = __urng.min(); 20472: const __uctype __urngmax = __urng.max(); 20472: const __uctype __urngrange = __urngmax - __urngmin; 20472: const __uctype __urange 20472: = __uctype(__param.b()) - __uctype(__param.a()); 20472: 20472: __uctype __ret; 20472: 20472: if (__urngrange > __urange) 20472: { 20472: 20472: const __uctype __uerange = __urange + 1; 20472: const __uctype __scaling = __urngrange / __uerange; 20472: const __uctype __past = __uerange * __scaling; 20472: do 20472: __ret = __uctype(__urng()) - __urngmin; 20472: while (__ret >= __past); 20472: __ret /= __scaling; 20472: } 20472: else if (__urngrange < __urange) 20472: { 20472: # 287 "/usr/include/c++/10/bits/uniform_int_dist.h" 3 20472: __uctype __tmp; 20472: do 20472: { 20472: const __uctype __uerngrange = __urngrange + 1; 20472: __tmp = (__uerngrange * operator() 20472: (__urng, param_type(0, __urange / __uerngrange))); 20472: __ret = __tmp + (__uctype(__urng()) - __urngmin); 20472: } 20472: while (__ret > __urange || __ret < __tmp); 20472: } 20472: else 20472: __ret = __uctype(__urng()) - __urngmin; 20472: 20472: return __ret + __param.a(); 20472: } 20472: 20472: 20472: template 20472: template 20472: void 20472: uniform_int_distribution<_IntType>:: 20472: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __param) 20472: { 20472: 20472: typedef typename _UniformRandomNumberGenerator::result_type 20472: _Gresult_type; 20472: typedef typename std::make_unsigned::type __utype; 20472: typedef typename std::common_type<_Gresult_type, __utype>::type 20472: __uctype; 20472: 20472: const __uctype __urngmin = __urng.min(); 20472: const __uctype __urngmax = __urng.max(); 20472: const __uctype __urngrange = __urngmax - __urngmin; 20472: const __uctype __urange 20472: = __uctype(__param.b()) - __uctype(__param.a()); 20472: 20472: __uctype __ret; 20472: 20472: if (__urngrange > __urange) 20472: { 20472: if (__detail::_Power_of_2(__urngrange + 1) 20472: && __detail::_Power_of_2(__urange + 1)) 20472: { 20472: while (__f != __t) 20472: { 20472: __ret = __uctype(__urng()) - __urngmin; 20472: *__f++ = (__ret & __urange) + __param.a(); 20472: } 20472: } 20472: else 20472: { 20472: 20472: const __uctype __uerange = __urange + 1; 20472: const __uctype __scaling = __urngrange / __uerange; 20472: const __uctype __past = __uerange * __scaling; 20472: while (__f != __t) 20472: { 20472: do 20472: __ret = __uctype(__urng()) - __urngmin; 20472: while (__ret >= __past); 20472: *__f++ = __ret / __scaling + __param.a(); 20472: } 20472: } 20472: } 20472: else if (__urngrange < __urange) 20472: { 20472: # 371 "/usr/include/c++/10/bits/uniform_int_dist.h" 3 20472: __uctype __tmp; 20472: while (__f != __t) 20472: { 20472: do 20472: { 20472: const __uctype __uerngrange = __urngrange + 1; 20472: __tmp = (__uerngrange * operator() 20472: (__urng, param_type(0, __urange / __uerngrange))); 20472: __ret = __tmp + (__uctype(__urng()) - __urngmin); 20472: } 20472: while (__ret > __urange || __ret < __tmp); 20472: *__f++ = __ret; 20472: } 20472: } 20472: else 20472: while (__f != __t) 20472: *__f++ = __uctype(__urng()) - __urngmin + __param.a(); 20472: } 20472: 20472: 20472: 20472: 20472: } 20472: # 67 "/usr/include/c++/10/bits/stl_algo.h" 2 3 20472: 20472: 20472: 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: template 20472: 20472: void 20472: __move_median_to_first(_Iterator __result,_Iterator __a, _Iterator __b, 20472: _Iterator __c, _Compare __comp) 20472: { 20472: if (__comp(__a, __b)) 20472: { 20472: if (__comp(__b, __c)) 20472: std::iter_swap(__result, __b); 20472: else if (__comp(__a, __c)) 20472: std::iter_swap(__result, __c); 20472: else 20472: std::iter_swap(__result, __a); 20472: } 20472: else if (__comp(__a, __c)) 20472: std::iter_swap(__result, __a); 20472: else if (__comp(__b, __c)) 20472: std::iter_swap(__result, __c); 20472: else 20472: std::iter_swap(__result, __b); 20472: } 20472: 20472: 20472: template 20472: 20472: inline _InputIterator 20472: __find_if_not(_InputIterator __first, _InputIterator __last, 20472: _Predicate __pred) 20472: { 20472: return std::__find_if(__first, __last, 20472: __gnu_cxx::__ops::__negate(__pred), 20472: std::__iterator_category(__first)); 20472: } 20472: 20472: 20472: 20472: 20472: template 20472: 20472: _InputIterator 20472: __find_if_not_n(_InputIterator __first, _Distance& __len, _Predicate __pred) 20472: { 20472: for (; __len; --__len, (void) ++__first) 20472: if (!__pred(__first)) 20472: break; 20472: return __first; 20472: } 20472: # 138 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: _ForwardIterator1 20472: __search(_ForwardIterator1 __first1, _ForwardIterator1 __last1, 20472: _ForwardIterator2 __first2, _ForwardIterator2 __last2, 20472: _BinaryPredicate __predicate) 20472: { 20472: 20472: if (__first1 == __last1 || __first2 == __last2) 20472: return __first1; 20472: 20472: 20472: _ForwardIterator2 __p1(__first2); 20472: if (++__p1 == __last2) 20472: return std::__find_if(__first1, __last1, 20472: __gnu_cxx::__ops::__iter_comp_iter(__predicate, __first2)); 20472: 20472: 20472: _ForwardIterator1 __current = __first1; 20472: 20472: for (;;) 20472: { 20472: __first1 = 20472: std::__find_if(__first1, __last1, 20472: __gnu_cxx::__ops::__iter_comp_iter(__predicate, __first2)); 20472: 20472: if (__first1 == __last1) 20472: return __last1; 20472: 20472: _ForwardIterator2 __p = __p1; 20472: __current = __first1; 20472: if (++__current == __last1) 20472: return __last1; 20472: 20472: while (__predicate(__current, __p)) 20472: { 20472: if (++__p == __last2) 20472: return __first1; 20472: if (++__current == __last1) 20472: return __last1; 20472: } 20472: ++__first1; 20472: } 20472: return __first1; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: 20472: _ForwardIterator 20472: __search_n_aux(_ForwardIterator __first, _ForwardIterator __last, 20472: _Integer __count, _UnaryPredicate __unary_pred, 20472: std::forward_iterator_tag) 20472: { 20472: __first = std::__find_if(__first, __last, __unary_pred); 20472: while (__first != __last) 20472: { 20472: typename iterator_traits<_ForwardIterator>::difference_type 20472: __n = __count; 20472: _ForwardIterator __i = __first; 20472: ++__i; 20472: while (__i != __last && __n != 1 && __unary_pred(__i)) 20472: { 20472: ++__i; 20472: --__n; 20472: } 20472: if (__n == 1) 20472: return __first; 20472: if (__i == __last) 20472: return __last; 20472: __first = std::__find_if(++__i, __last, __unary_pred); 20472: } 20472: return __last; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: template 20472: 20472: _RandomAccessIter 20472: __search_n_aux(_RandomAccessIter __first, _RandomAccessIter __last, 20472: _Integer __count, _UnaryPredicate __unary_pred, 20472: std::random_access_iterator_tag) 20472: { 20472: typedef typename std::iterator_traits<_RandomAccessIter>::difference_type 20472: _DistanceType; 20472: 20472: _DistanceType __tailSize = __last - __first; 20472: _DistanceType __remainder = __count; 20472: 20472: while (__remainder <= __tailSize) 20472: { 20472: __first += __remainder; 20472: __tailSize -= __remainder; 20472: 20472: 20472: _RandomAccessIter __backTrack = __first; 20472: while (__unary_pred(--__backTrack)) 20472: { 20472: if (--__remainder == 0) 20472: return (__first - __count); 20472: } 20472: __remainder = __count + 1 - (__first - __backTrack); 20472: } 20472: return __last; 20472: } 20472: 20472: template 20472: 20472: _ForwardIterator 20472: __search_n(_ForwardIterator __first, _ForwardIterator __last, 20472: _Integer __count, 20472: _UnaryPredicate __unary_pred) 20472: { 20472: if (__count <= 0) 20472: return __first; 20472: 20472: if (__count == 1) 20472: return std::__find_if(__first, __last, __unary_pred); 20472: 20472: return std::__search_n_aux(__first, __last, __count, __unary_pred, 20472: std::__iterator_category(__first)); 20472: } 20472: 20472: 20472: template 20472: 20472: _ForwardIterator1 20472: __find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, 20472: _ForwardIterator2 __first2, _ForwardIterator2 __last2, 20472: forward_iterator_tag, forward_iterator_tag, 20472: _BinaryPredicate __comp) 20472: { 20472: if (__first2 == __last2) 20472: return __last1; 20472: 20472: _ForwardIterator1 __result = __last1; 20472: while (1) 20472: { 20472: _ForwardIterator1 __new_result 20472: = std::__search(__first1, __last1, __first2, __last2, __comp); 20472: if (__new_result == __last1) 20472: return __result; 20472: else 20472: { 20472: __result = __new_result; 20472: __first1 = __new_result; 20472: ++__first1; 20472: } 20472: } 20472: } 20472: 20472: 20472: template 20472: 20472: _BidirectionalIterator1 20472: __find_end(_BidirectionalIterator1 __first1, 20472: _BidirectionalIterator1 __last1, 20472: _BidirectionalIterator2 __first2, 20472: _BidirectionalIterator2 __last2, 20472: bidirectional_iterator_tag, bidirectional_iterator_tag, 20472: _BinaryPredicate __comp) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: typedef reverse_iterator<_BidirectionalIterator1> _RevIterator1; 20472: typedef reverse_iterator<_BidirectionalIterator2> _RevIterator2; 20472: 20472: _RevIterator1 __rlast1(__first1); 20472: _RevIterator2 __rlast2(__first2); 20472: _RevIterator1 __rresult = std::__search(_RevIterator1(__last1), __rlast1, 20472: _RevIterator2(__last2), __rlast2, 20472: __comp); 20472: 20472: if (__rresult == __rlast1) 20472: return __last1; 20472: else 20472: { 20472: _BidirectionalIterator1 __result = __rresult.base(); 20472: std::advance(__result, -std::distance(__first2, __last2)); 20472: return __result; 20472: } 20472: } 20472: # 364 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline _ForwardIterator1 20472: find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, 20472: _ForwardIterator2 __first2, _ForwardIterator2 __last2) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: 20472: return std::__find_end(__first1, __last1, __first2, __last2, 20472: std::__iterator_category(__first1), 20472: std::__iterator_category(__first2), 20472: __gnu_cxx::__ops::__iter_equal_to_iter()); 20472: } 20472: # 413 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline _ForwardIterator1 20472: find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, 20472: _ForwardIterator2 __first2, _ForwardIterator2 __last2, 20472: _BinaryPredicate __comp) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: 20472: return std::__find_end(__first1, __last1, __first2, __last2, 20472: std::__iterator_category(__first1), 20472: std::__iterator_category(__first2), 20472: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 20472: } 20472: # 449 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline bool 20472: all_of(_InputIterator __first, _InputIterator __last, _Predicate __pred) 20472: { return __last == std::find_if_not(__first, __last, __pred); } 20472: # 467 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline bool 20472: none_of(_InputIterator __first, _InputIterator __last, _Predicate __pred) 20472: { return __last == std::find_if(__first, __last, __pred); } 20472: # 486 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline bool 20472: any_of(_InputIterator __first, _InputIterator __last, _Predicate __pred) 20472: { return !std::none_of(__first, __last, __pred); } 20472: # 502 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline _InputIterator 20472: find_if_not(_InputIterator __first, _InputIterator __last, 20472: _Predicate __pred) 20472: { 20472: 20472: 20472: 20472: 20472: ; 20472: return std::__find_if_not(__first, __last, 20472: __gnu_cxx::__ops::__pred_iter(__pred)); 20472: } 20472: # 527 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline bool 20472: is_partitioned(_InputIterator __first, _InputIterator __last, 20472: _Predicate __pred) 20472: { 20472: __first = std::find_if_not(__first, __last, __pred); 20472: if (__first == __last) 20472: return true; 20472: ++__first; 20472: return std::none_of(__first, __last, __pred); 20472: } 20472: # 549 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: _ForwardIterator 20472: partition_point(_ForwardIterator __first, _ForwardIterator __last, 20472: _Predicate __pred) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: 20472: typedef typename iterator_traits<_ForwardIterator>::difference_type 20472: _DistanceType; 20472: 20472: _DistanceType __len = std::distance(__first, __last); 20472: 20472: while (__len > 0) 20472: { 20472: _DistanceType __half = __len >> 1; 20472: _ForwardIterator __middle = __first; 20472: std::advance(__middle, __half); 20472: if (__pred(*__middle)) 20472: { 20472: __first = __middle; 20472: ++__first; 20472: __len = __len - __half - 1; 20472: } 20472: else 20472: __len = __half; 20472: } 20472: return __first; 20472: } 20472: 20472: 20472: template 20472: 20472: _OutputIterator 20472: __remove_copy_if(_InputIterator __first, _InputIterator __last, 20472: _OutputIterator __result, _Predicate __pred) 20472: { 20472: for (; __first != __last; ++__first) 20472: if (!__pred(__first)) 20472: { 20472: *__result = *__first; 20472: ++__result; 20472: } 20472: return __result; 20472: } 20472: # 616 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline _OutputIterator 20472: remove_copy(_InputIterator __first, _InputIterator __last, 20472: _OutputIterator __result, const _Tp& __value) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: 20472: return std::__remove_copy_if(__first, __last, __result, 20472: __gnu_cxx::__ops::__iter_equals_val(__value)); 20472: } 20472: # 649 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline _OutputIterator 20472: remove_copy_if(_InputIterator __first, _InputIterator __last, 20472: _OutputIterator __result, _Predicate __pred) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: 20472: return std::__remove_copy_if(__first, __last, __result, 20472: __gnu_cxx::__ops::__pred_iter(__pred)); 20472: } 20472: # 684 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: _OutputIterator 20472: copy_if(_InputIterator __first, _InputIterator __last, 20472: _OutputIterator __result, _Predicate __pred) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: 20472: for (; __first != __last; ++__first) 20472: if (__pred(*__first)) 20472: { 20472: *__result = *__first; 20472: ++__result; 20472: } 20472: return __result; 20472: } 20472: 20472: template 20472: 20472: _OutputIterator 20472: __copy_n_a(_InputIterator __first, _Size __n, _OutputIterator __result) 20472: { 20472: if (__n > 0) 20472: { 20472: while (true) 20472: { 20472: *__result = *__first; 20472: ++__result; 20472: if (--__n > 0) 20472: ++__first; 20472: else 20472: break; 20472: } 20472: } 20472: return __result; 20472: } 20472: 20472: template 20472: __enable_if_t<__is_char<_CharT>::__value, _CharT*> 20472: __copy_n_a(istreambuf_iterator<_CharT, char_traits<_CharT>>, 20472: _Size, _CharT*); 20472: 20472: template 20472: 20472: _OutputIterator 20472: __copy_n(_InputIterator __first, _Size __n, 20472: _OutputIterator __result, input_iterator_tag) 20472: { 20472: return std::__niter_wrap(__result, 20472: __copy_n_a(__first, __n, 20472: std::__niter_base(__result))); 20472: } 20472: 20472: template 20472: 20472: inline _OutputIterator 20472: __copy_n(_RandomAccessIterator __first, _Size __n, 20472: _OutputIterator __result, random_access_iterator_tag) 20472: { return std::copy(__first, __first + __n, __result); } 20472: # 765 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline _OutputIterator 20472: copy_n(_InputIterator __first, _Size __n, _OutputIterator __result) 20472: { 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: 20472: return std::__copy_n(__first, __n, __result, 20472: std::__iterator_category(__first)); 20472: } 20472: # 796 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: pair<_OutputIterator1, _OutputIterator2> 20472: partition_copy(_InputIterator __first, _InputIterator __last, 20472: _OutputIterator1 __out_true, _OutputIterator2 __out_false, 20472: _Predicate __pred) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: 20472: for (; __first != __last; ++__first) 20472: if (__pred(*__first)) 20472: { 20472: *__out_true = *__first; 20472: ++__out_true; 20472: } 20472: else 20472: { 20472: *__out_false = *__first; 20472: ++__out_false; 20472: } 20472: 20472: return pair<_OutputIterator1, _OutputIterator2>(__out_true, __out_false); 20472: } 20472: 20472: 20472: template 20472: 20472: _ForwardIterator 20472: __remove_if(_ForwardIterator __first, _ForwardIterator __last, 20472: _Predicate __pred) 20472: { 20472: __first = std::__find_if(__first, __last, __pred); 20472: if (__first == __last) 20472: return __first; 20472: _ForwardIterator __result = __first; 20472: ++__first; 20472: for (; __first != __last; ++__first) 20472: if (!__pred(__first)) 20472: { 20472: *__result = std::move(*__first); 20472: ++__result; 20472: } 20472: return __result; 20472: } 20472: # 867 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline _ForwardIterator 20472: remove(_ForwardIterator __first, _ForwardIterator __last, 20472: const _Tp& __value) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: 20472: return std::__remove_if(__first, __last, 20472: __gnu_cxx::__ops::__iter_equals_val(__value)); 20472: } 20472: # 901 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline _ForwardIterator 20472: remove_if(_ForwardIterator __first, _ForwardIterator __last, 20472: _Predicate __pred) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: 20472: return std::__remove_if(__first, __last, 20472: __gnu_cxx::__ops::__pred_iter(__pred)); 20472: } 20472: 20472: template 20472: 20472: _ForwardIterator 20472: __adjacent_find(_ForwardIterator __first, _ForwardIterator __last, 20472: _BinaryPredicate __binary_pred) 20472: { 20472: if (__first == __last) 20472: return __last; 20472: _ForwardIterator __next = __first; 20472: while (++__next != __last) 20472: { 20472: if (__binary_pred(__first, __next)) 20472: return __first; 20472: __first = __next; 20472: } 20472: return __last; 20472: } 20472: 20472: template 20472: 20472: _ForwardIterator 20472: __unique(_ForwardIterator __first, _ForwardIterator __last, 20472: _BinaryPredicate __binary_pred) 20472: { 20472: 20472: __first = std::__adjacent_find(__first, __last, __binary_pred); 20472: if (__first == __last) 20472: return __last; 20472: 20472: 20472: _ForwardIterator __dest = __first; 20472: ++__first; 20472: while (++__first != __last) 20472: if (!__binary_pred(__dest, __first)) 20472: *++__dest = std::move(*__first); 20472: return ++__dest; 20472: } 20472: # 970 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline _ForwardIterator 20472: unique(_ForwardIterator __first, _ForwardIterator __last) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: 20472: return std::__unique(__first, __last, 20472: __gnu_cxx::__ops::__iter_equal_to_iter()); 20472: } 20472: # 1001 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline _ForwardIterator 20472: unique(_ForwardIterator __first, _ForwardIterator __last, 20472: _BinaryPredicate __binary_pred) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: 20472: return std::__unique(__first, __last, 20472: __gnu_cxx::__ops::__iter_comp_iter(__binary_pred)); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: 20472: _OutputIterator 20472: __unique_copy(_ForwardIterator __first, _ForwardIterator __last, 20472: _OutputIterator __result, _BinaryPredicate __binary_pred, 20472: forward_iterator_tag, output_iterator_tag) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: _ForwardIterator __next = __first; 20472: *__result = *__first; 20472: while (++__next != __last) 20472: if (!__binary_pred(__first, __next)) 20472: { 20472: __first = __next; 20472: *++__result = *__first; 20472: } 20472: return ++__result; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: 20472: _OutputIterator 20472: __unique_copy(_InputIterator __first, _InputIterator __last, 20472: _OutputIterator __result, _BinaryPredicate __binary_pred, 20472: input_iterator_tag, output_iterator_tag) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: typename iterator_traits<_InputIterator>::value_type __value = *__first; 20472: __decltype(__gnu_cxx::__ops::__iter_comp_val(__binary_pred)) 20472: __rebound_pred 20472: = __gnu_cxx::__ops::__iter_comp_val(__binary_pred); 20472: *__result = __value; 20472: while (++__first != __last) 20472: if (!__rebound_pred(__first, __value)) 20472: { 20472: __value = *__first; 20472: *++__result = __value; 20472: } 20472: return ++__result; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: 20472: _ForwardIterator 20472: __unique_copy(_InputIterator __first, _InputIterator __last, 20472: _ForwardIterator __result, _BinaryPredicate __binary_pred, 20472: input_iterator_tag, forward_iterator_tag) 20472: { 20472: 20472: 20472: 20472: 20472: *__result = *__first; 20472: while (++__first != __last) 20472: if (!__binary_pred(__result, __first)) 20472: *++__result = *__first; 20472: return ++__result; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: 20472: void 20472: __reverse(_BidirectionalIterator __first, _BidirectionalIterator __last, 20472: bidirectional_iterator_tag) 20472: { 20472: while (true) 20472: if (__first == __last || __first == --__last) 20472: return; 20472: else 20472: { 20472: std::iter_swap(__first, __last); 20472: ++__first; 20472: } 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: 20472: void 20472: __reverse(_RandomAccessIterator __first, _RandomAccessIterator __last, 20472: random_access_iterator_tag) 20472: { 20472: if (__first == __last) 20472: return; 20472: --__last; 20472: while (__first < __last) 20472: { 20472: std::iter_swap(__first, __last); 20472: ++__first; 20472: --__last; 20472: } 20472: } 20472: # 1162 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline void 20472: reverse(_BidirectionalIterator __first, _BidirectionalIterator __last) 20472: { 20472: 20472: 20472: 20472: ; 20472: std::__reverse(__first, __last, std::__iterator_category(__first)); 20472: } 20472: # 1190 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: _OutputIterator 20472: reverse_copy(_BidirectionalIterator __first, _BidirectionalIterator __last, 20472: _OutputIterator __result) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: 20472: while (__first != __last) 20472: { 20472: --__last; 20472: *__result = *__last; 20472: ++__result; 20472: } 20472: return __result; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: template 20472: 20472: _EuclideanRingElement 20472: __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n) 20472: { 20472: while (__n != 0) 20472: { 20472: _EuclideanRingElement __t = __m % __n; 20472: __m = __n; 20472: __n = __t; 20472: } 20472: return __m; 20472: } 20472: 20472: inline namespace _V2 20472: { 20472: 20472: 20472: template 20472: 20472: _ForwardIterator 20472: __rotate(_ForwardIterator __first, 20472: _ForwardIterator __middle, 20472: _ForwardIterator __last, 20472: forward_iterator_tag) 20472: { 20472: if (__first == __middle) 20472: return __last; 20472: else if (__last == __middle) 20472: return __first; 20472: 20472: _ForwardIterator __first2 = __middle; 20472: do 20472: { 20472: std::iter_swap(__first, __first2); 20472: ++__first; 20472: ++__first2; 20472: if (__first == __middle) 20472: __middle = __first2; 20472: } 20472: while (__first2 != __last); 20472: 20472: _ForwardIterator __ret = __first; 20472: 20472: __first2 = __middle; 20472: 20472: while (__first2 != __last) 20472: { 20472: std::iter_swap(__first, __first2); 20472: ++__first; 20472: ++__first2; 20472: if (__first == __middle) 20472: __middle = __first2; 20472: else if (__first2 == __last) 20472: __first2 = __middle; 20472: } 20472: return __ret; 20472: } 20472: 20472: 20472: template 20472: 20472: _BidirectionalIterator 20472: __rotate(_BidirectionalIterator __first, 20472: _BidirectionalIterator __middle, 20472: _BidirectionalIterator __last, 20472: bidirectional_iterator_tag) 20472: { 20472: 20472: 20472: 20472: 20472: if (__first == __middle) 20472: return __last; 20472: else if (__last == __middle) 20472: return __first; 20472: 20472: std::__reverse(__first, __middle, bidirectional_iterator_tag()); 20472: std::__reverse(__middle, __last, bidirectional_iterator_tag()); 20472: 20472: while (__first != __middle && __middle != __last) 20472: { 20472: std::iter_swap(__first, --__last); 20472: ++__first; 20472: } 20472: 20472: if (__first == __middle) 20472: { 20472: std::__reverse(__middle, __last, bidirectional_iterator_tag()); 20472: return __last; 20472: } 20472: else 20472: { 20472: std::__reverse(__first, __middle, bidirectional_iterator_tag()); 20472: return __first; 20472: } 20472: } 20472: 20472: 20472: template 20472: 20472: _RandomAccessIterator 20472: __rotate(_RandomAccessIterator __first, 20472: _RandomAccessIterator __middle, 20472: _RandomAccessIterator __last, 20472: random_access_iterator_tag) 20472: { 20472: 20472: 20472: 20472: 20472: if (__first == __middle) 20472: return __last; 20472: else if (__last == __middle) 20472: return __first; 20472: 20472: typedef typename iterator_traits<_RandomAccessIterator>::difference_type 20472: _Distance; 20472: typedef typename iterator_traits<_RandomAccessIterator>::value_type 20472: _ValueType; 20472: 20472: _Distance __n = __last - __first; 20472: _Distance __k = __middle - __first; 20472: 20472: if (__k == __n - __k) 20472: { 20472: std::swap_ranges(__first, __middle, __middle); 20472: return __middle; 20472: } 20472: 20472: _RandomAccessIterator __p = __first; 20472: _RandomAccessIterator __ret = __first + (__last - __middle); 20472: 20472: for (;;) 20472: { 20472: if (__k < __n - __k) 20472: { 20472: if (__is_pod(_ValueType) && __k == 1) 20472: { 20472: _ValueType __t = std::move(*__p); 20472: std::move(__p + 1, __p + __n, __p); 20472: *(__p + __n - 1) = std::move(__t); 20472: return __ret; 20472: } 20472: _RandomAccessIterator __q = __p + __k; 20472: for (_Distance __i = 0; __i < __n - __k; ++ __i) 20472: { 20472: std::iter_swap(__p, __q); 20472: ++__p; 20472: ++__q; 20472: } 20472: __n %= __k; 20472: if (__n == 0) 20472: return __ret; 20472: std::swap(__n, __k); 20472: __k = __n - __k; 20472: } 20472: else 20472: { 20472: __k = __n - __k; 20472: if (__is_pod(_ValueType) && __k == 1) 20472: { 20472: _ValueType __t = std::move(*(__p + __n - 1)); 20472: std::move_backward(__p, __p + __n - 1, __p + __n); 20472: *__p = std::move(__t); 20472: return __ret; 20472: } 20472: _RandomAccessIterator __q = __p + __n; 20472: __p = __q - __k; 20472: for (_Distance __i = 0; __i < __n - __k; ++ __i) 20472: { 20472: --__p; 20472: --__q; 20472: std::iter_swap(__p, __q); 20472: } 20472: __n %= __k; 20472: if (__n == 0) 20472: return __ret; 20472: std::swap(__n, __k); 20472: } 20472: } 20472: } 20472: # 1422 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline _ForwardIterator 20472: rotate(_ForwardIterator __first, _ForwardIterator __middle, 20472: _ForwardIterator __last) 20472: { 20472: 20472: 20472: 20472: ; 20472: ; 20472: 20472: return std::__rotate(__first, __middle, __last, 20472: std::__iterator_category(__first)); 20472: } 20472: 20472: } 20472: # 1460 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline _OutputIterator 20472: rotate_copy(_ForwardIterator __first, _ForwardIterator __middle, 20472: _ForwardIterator __last, _OutputIterator __result) 20472: { 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: 20472: return std::copy(__first, __middle, 20472: std::copy(__middle, __last, __result)); 20472: } 20472: 20472: 20472: template 20472: 20472: _ForwardIterator 20472: __partition(_ForwardIterator __first, _ForwardIterator __last, 20472: _Predicate __pred, forward_iterator_tag) 20472: { 20472: if (__first == __last) 20472: return __first; 20472: 20472: while (__pred(*__first)) 20472: if (++__first == __last) 20472: return __first; 20472: 20472: _ForwardIterator __next = __first; 20472: 20472: while (++__next != __last) 20472: if (__pred(*__next)) 20472: { 20472: std::iter_swap(__first, __next); 20472: ++__first; 20472: } 20472: 20472: return __first; 20472: } 20472: 20472: 20472: template 20472: 20472: _BidirectionalIterator 20472: __partition(_BidirectionalIterator __first, _BidirectionalIterator __last, 20472: _Predicate __pred, bidirectional_iterator_tag) 20472: { 20472: while (true) 20472: { 20472: while (true) 20472: if (__first == __last) 20472: return __first; 20472: else if (__pred(*__first)) 20472: ++__first; 20472: else 20472: break; 20472: --__last; 20472: while (true) 20472: if (__first == __last) 20472: return __first; 20472: else if (!bool(__pred(*__last))) 20472: --__last; 20472: else 20472: break; 20472: std::iter_swap(__first, __last); 20472: ++__first; 20472: } 20472: } 20472: # 1540 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: _ForwardIterator 20472: __stable_partition_adaptive(_ForwardIterator __first, 20472: _ForwardIterator __last, 20472: _Predicate __pred, _Distance __len, 20472: _Pointer __buffer, 20472: _Distance __buffer_size) 20472: { 20472: if (__len == 1) 20472: return __first; 20472: 20472: if (__len <= __buffer_size) 20472: { 20472: _ForwardIterator __result1 = __first; 20472: _Pointer __result2 = __buffer; 20472: 20472: 20472: 20472: 20472: *__result2 = std::move(*__first); 20472: ++__result2; 20472: ++__first; 20472: for (; __first != __last; ++__first) 20472: if (__pred(__first)) 20472: { 20472: *__result1 = std::move(*__first); 20472: ++__result1; 20472: } 20472: else 20472: { 20472: *__result2 = std::move(*__first); 20472: ++__result2; 20472: } 20472: 20472: std::move(__buffer, __result2, __result1); 20472: return __result1; 20472: } 20472: 20472: _ForwardIterator __middle = __first; 20472: std::advance(__middle, __len / 2); 20472: _ForwardIterator __left_split = 20472: std::__stable_partition_adaptive(__first, __middle, __pred, 20472: __len / 2, __buffer, 20472: __buffer_size); 20472: 20472: 20472: 20472: _Distance __right_len = __len - __len / 2; 20472: _ForwardIterator __right_split = 20472: std::__find_if_not_n(__middle, __right_len, __pred); 20472: 20472: if (__right_len) 20472: __right_split = 20472: std::__stable_partition_adaptive(__right_split, __last, __pred, 20472: __right_len, 20472: __buffer, __buffer_size); 20472: 20472: return std::rotate(__left_split, __middle, __right_split); 20472: } 20472: 20472: template 20472: _ForwardIterator 20472: __stable_partition(_ForwardIterator __first, _ForwardIterator __last, 20472: _Predicate __pred) 20472: { 20472: __first = std::__find_if_not(__first, __last, __pred); 20472: 20472: if (__first == __last) 20472: return __first; 20472: 20472: typedef typename iterator_traits<_ForwardIterator>::value_type 20472: _ValueType; 20472: typedef typename iterator_traits<_ForwardIterator>::difference_type 20472: _DistanceType; 20472: 20472: _Temporary_buffer<_ForwardIterator, _ValueType> 20472: __buf(__first, std::distance(__first, __last)); 20472: return 20472: std::__stable_partition_adaptive(__first, __last, __pred, 20472: _DistanceType(__buf.requested_size()), 20472: __buf.begin(), 20472: _DistanceType(__buf.size())); 20472: } 20472: # 1642 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: inline _ForwardIterator 20472: stable_partition(_ForwardIterator __first, _ForwardIterator __last, 20472: _Predicate __pred) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: 20472: return std::__stable_partition(__first, __last, 20472: __gnu_cxx::__ops::__pred_iter(__pred)); 20472: } 20472: 20472: 20472: template 20472: 20472: void 20472: __heap_select(_RandomAccessIterator __first, 20472: _RandomAccessIterator __middle, 20472: _RandomAccessIterator __last, _Compare __comp) 20472: { 20472: std::__make_heap(__first, __middle, __comp); 20472: for (_RandomAccessIterator __i = __middle; __i < __last; ++__i) 20472: if (__comp(__i, __first)) 20472: std::__pop_heap(__first, __middle, __i, __comp); 20472: } 20472: 20472: 20472: 20472: template 20472: 20472: _RandomAccessIterator 20472: __partial_sort_copy(_InputIterator __first, _InputIterator __last, 20472: _RandomAccessIterator __result_first, 20472: _RandomAccessIterator __result_last, 20472: _Compare __comp) 20472: { 20472: typedef typename iterator_traits<_InputIterator>::value_type 20472: _InputValueType; 20472: typedef iterator_traits<_RandomAccessIterator> _RItTraits; 20472: typedef typename _RItTraits::difference_type _DistanceType; 20472: 20472: if (__result_first == __result_last) 20472: return __result_last; 20472: _RandomAccessIterator __result_real_last = __result_first; 20472: while (__first != __last && __result_real_last != __result_last) 20472: { 20472: *__result_real_last = *__first; 20472: ++__result_real_last; 20472: ++__first; 20472: } 20472: 20472: std::__make_heap(__result_first, __result_real_last, __comp); 20472: while (__first != __last) 20472: { 20472: if (__comp(__first, __result_first)) 20472: std::__adjust_heap(__result_first, _DistanceType(0), 20472: _DistanceType(__result_real_last 20472: - __result_first), 20472: _InputValueType(*__first), __comp); 20472: ++__first; 20472: } 20472: std::__sort_heap(__result_first, __result_real_last, __comp); 20472: return __result_real_last; 20472: } 20472: # 1730 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline _RandomAccessIterator 20472: partial_sort_copy(_InputIterator __first, _InputIterator __last, 20472: _RandomAccessIterator __result_first, 20472: _RandomAccessIterator __result_last) 20472: { 20472: # 1745 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: ; 20472: 20472: return std::__partial_sort_copy(__first, __last, 20472: __result_first, __result_last, 20472: __gnu_cxx::__ops::__iter_less_iter()); 20472: } 20472: # 1780 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline _RandomAccessIterator 20472: partial_sort_copy(_InputIterator __first, _InputIterator __last, 20472: _RandomAccessIterator __result_first, 20472: _RandomAccessIterator __result_last, 20472: _Compare __comp) 20472: { 20472: # 1797 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: ; 20472: 20472: return std::__partial_sort_copy(__first, __last, 20472: __result_first, __result_last, 20472: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 20472: } 20472: 20472: 20472: template 20472: 20472: void 20472: __unguarded_linear_insert(_RandomAccessIterator __last, 20472: _Compare __comp) 20472: { 20472: typename iterator_traits<_RandomAccessIterator>::value_type 20472: __val = std::move(*__last); 20472: _RandomAccessIterator __next = __last; 20472: --__next; 20472: while (__comp(__val, __next)) 20472: { 20472: *__last = std::move(*__next); 20472: __last = __next; 20472: --__next; 20472: } 20472: *__last = std::move(__val); 20472: } 20472: 20472: 20472: template 20472: 20472: void 20472: __insertion_sort(_RandomAccessIterator __first, 20472: _RandomAccessIterator __last, _Compare __comp) 20472: { 20472: if (__first == __last) return; 20472: 20472: for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) 20472: { 20472: if (__comp(__i, __first)) 20472: { 20472: typename iterator_traits<_RandomAccessIterator>::value_type 20472: __val = std::move(*__i); 20472: std::move_backward(__first, __i, __i + 1); 20472: *__first = std::move(__val); 20472: } 20472: else 20472: std::__unguarded_linear_insert(__i, 20472: __gnu_cxx::__ops::__val_comp_iter(__comp)); 20472: } 20472: } 20472: 20472: 20472: template 20472: 20472: inline void 20472: __unguarded_insertion_sort(_RandomAccessIterator __first, 20472: _RandomAccessIterator __last, _Compare __comp) 20472: { 20472: for (_RandomAccessIterator __i = __first; __i != __last; ++__i) 20472: std::__unguarded_linear_insert(__i, 20472: __gnu_cxx::__ops::__val_comp_iter(__comp)); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: enum { _S_threshold = 16 }; 20472: 20472: 20472: template 20472: 20472: void 20472: __final_insertion_sort(_RandomAccessIterator __first, 20472: _RandomAccessIterator __last, _Compare __comp) 20472: { 20472: if (__last - __first > int(_S_threshold)) 20472: { 20472: std::__insertion_sort(__first, __first + int(_S_threshold), __comp); 20472: std::__unguarded_insertion_sort(__first + int(_S_threshold), __last, 20472: __comp); 20472: } 20472: else 20472: std::__insertion_sort(__first, __last, __comp); 20472: } 20472: 20472: 20472: template 20472: 20472: _RandomAccessIterator 20472: __unguarded_partition(_RandomAccessIterator __first, 20472: _RandomAccessIterator __last, 20472: _RandomAccessIterator __pivot, _Compare __comp) 20472: { 20472: while (true) 20472: { 20472: while (__comp(__first, __pivot)) 20472: ++__first; 20472: --__last; 20472: while (__comp(__pivot, __last)) 20472: --__last; 20472: if (!(__first < __last)) 20472: return __first; 20472: std::iter_swap(__first, __last); 20472: ++__first; 20472: } 20472: } 20472: 20472: 20472: template 20472: 20472: inline _RandomAccessIterator 20472: __unguarded_partition_pivot(_RandomAccessIterator __first, 20472: _RandomAccessIterator __last, _Compare __comp) 20472: { 20472: _RandomAccessIterator __mid = __first + (__last - __first) / 2; 20472: std::__move_median_to_first(__first, __first + 1, __mid, __last - 1, 20472: __comp); 20472: return std::__unguarded_partition(__first + 1, __last, __first, __comp); 20472: } 20472: 20472: template 20472: 20472: inline void 20472: __partial_sort(_RandomAccessIterator __first, 20472: _RandomAccessIterator __middle, 20472: _RandomAccessIterator __last, 20472: _Compare __comp) 20472: { 20472: std::__heap_select(__first, __middle, __last, __comp); 20472: std::__sort_heap(__first, __middle, __comp); 20472: } 20472: 20472: 20472: template 20472: 20472: void 20472: __introsort_loop(_RandomAccessIterator __first, 20472: _RandomAccessIterator __last, 20472: _Size __depth_limit, _Compare __comp) 20472: { 20472: while (__last - __first > int(_S_threshold)) 20472: { 20472: if (__depth_limit == 0) 20472: { 20472: std::__partial_sort(__first, __last, __last, __comp); 20472: return; 20472: } 20472: --__depth_limit; 20472: _RandomAccessIterator __cut = 20472: std::__unguarded_partition_pivot(__first, __last, __comp); 20472: std::__introsort_loop(__cut, __last, __depth_limit, __comp); 20472: __last = __cut; 20472: } 20472: } 20472: 20472: 20472: 20472: template 20472: 20472: inline void 20472: __sort(_RandomAccessIterator __first, _RandomAccessIterator __last, 20472: _Compare __comp) 20472: { 20472: if (__first != __last) 20472: { 20472: std::__introsort_loop(__first, __last, 20472: std::__lg(__last - __first) * 2, 20472: __comp); 20472: std::__final_insertion_sort(__first, __last, __comp); 20472: } 20472: } 20472: 20472: template 20472: 20472: void 20472: __introselect(_RandomAccessIterator __first, _RandomAccessIterator __nth, 20472: _RandomAccessIterator __last, _Size __depth_limit, 20472: _Compare __comp) 20472: { 20472: while (__last - __first > 3) 20472: { 20472: if (__depth_limit == 0) 20472: { 20472: std::__heap_select(__first, __nth + 1, __last, __comp); 20472: 20472: std::iter_swap(__first, __nth); 20472: return; 20472: } 20472: --__depth_limit; 20472: _RandomAccessIterator __cut = 20472: std::__unguarded_partition_pivot(__first, __last, __comp); 20472: if (__cut <= __nth) 20472: __first = __cut; 20472: else 20472: __last = __cut; 20472: } 20472: std::__insertion_sort(__first, __last, __comp); 20472: } 20472: # 2028 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline _ForwardIterator 20472: lower_bound(_ForwardIterator __first, _ForwardIterator __last, 20472: const _Tp& __val, _Compare __comp) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: 20472: return std::__lower_bound(__first, __last, __val, 20472: __gnu_cxx::__ops::__iter_comp_val(__comp)); 20472: } 20472: 20472: template 20472: 20472: _ForwardIterator 20472: __upper_bound(_ForwardIterator __first, _ForwardIterator __last, 20472: const _Tp& __val, _Compare __comp) 20472: { 20472: typedef typename iterator_traits<_ForwardIterator>::difference_type 20472: _DistanceType; 20472: 20472: _DistanceType __len = std::distance(__first, __last); 20472: 20472: while (__len > 0) 20472: { 20472: _DistanceType __half = __len >> 1; 20472: _ForwardIterator __middle = __first; 20472: std::advance(__middle, __half); 20472: if (__comp(__val, __middle)) 20472: __len = __half; 20472: else 20472: { 20472: __first = __middle; 20472: ++__first; 20472: __len = __len - __half - 1; 20472: } 20472: } 20472: return __first; 20472: } 20472: # 2084 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline _ForwardIterator 20472: upper_bound(_ForwardIterator __first, _ForwardIterator __last, 20472: const _Tp& __val) 20472: { 20472: 20472: 20472: 20472: 20472: ; 20472: 20472: return std::__upper_bound(__first, __last, __val, 20472: __gnu_cxx::__ops::__val_less_iter()); 20472: } 20472: # 2115 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline _ForwardIterator 20472: upper_bound(_ForwardIterator __first, _ForwardIterator __last, 20472: const _Tp& __val, _Compare __comp) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: 20472: return std::__upper_bound(__first, __last, __val, 20472: __gnu_cxx::__ops::__val_comp_iter(__comp)); 20472: } 20472: 20472: template 20472: 20472: pair<_ForwardIterator, _ForwardIterator> 20472: __equal_range(_ForwardIterator __first, _ForwardIterator __last, 20472: const _Tp& __val, 20472: _CompareItTp __comp_it_val, _CompareTpIt __comp_val_it) 20472: { 20472: typedef typename iterator_traits<_ForwardIterator>::difference_type 20472: _DistanceType; 20472: 20472: _DistanceType __len = std::distance(__first, __last); 20472: 20472: while (__len > 0) 20472: { 20472: _DistanceType __half = __len >> 1; 20472: _ForwardIterator __middle = __first; 20472: std::advance(__middle, __half); 20472: if (__comp_it_val(__middle, __val)) 20472: { 20472: __first = __middle; 20472: ++__first; 20472: __len = __len - __half - 1; 20472: } 20472: else if (__comp_val_it(__val, __middle)) 20472: __len = __half; 20472: else 20472: { 20472: _ForwardIterator __left 20472: = std::__lower_bound(__first, __middle, __val, __comp_it_val); 20472: std::advance(__first, __len); 20472: _ForwardIterator __right 20472: = std::__upper_bound(++__middle, __first, __val, __comp_val_it); 20472: return pair<_ForwardIterator, _ForwardIterator>(__left, __right); 20472: } 20472: } 20472: return pair<_ForwardIterator, _ForwardIterator>(__first, __first); 20472: } 20472: # 2188 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline pair<_ForwardIterator, _ForwardIterator> 20472: equal_range(_ForwardIterator __first, _ForwardIterator __last, 20472: const _Tp& __val) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: 20472: return std::__equal_range(__first, __last, __val, 20472: __gnu_cxx::__ops::__iter_less_val(), 20472: __gnu_cxx::__ops::__val_less_iter()); 20472: } 20472: # 2225 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline pair<_ForwardIterator, _ForwardIterator> 20472: equal_range(_ForwardIterator __first, _ForwardIterator __last, 20472: const _Tp& __val, _Compare __comp) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: 20472: ; 20472: 20472: return std::__equal_range(__first, __last, __val, 20472: __gnu_cxx::__ops::__iter_comp_val(__comp), 20472: __gnu_cxx::__ops::__val_comp_iter(__comp)); 20472: } 20472: # 2259 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: bool 20472: binary_search(_ForwardIterator __first, _ForwardIterator __last, 20472: const _Tp& __val) 20472: { 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: 20472: _ForwardIterator __i 20472: = std::__lower_bound(__first, __last, __val, 20472: __gnu_cxx::__ops::__iter_less_val()); 20472: return __i != __last && !(__val < *__i); 20472: } 20472: # 2293 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: bool 20472: binary_search(_ForwardIterator __first, _ForwardIterator __last, 20472: const _Tp& __val, _Compare __comp) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: 20472: ; 20472: 20472: _ForwardIterator __i 20472: = std::__lower_bound(__first, __last, __val, 20472: __gnu_cxx::__ops::__iter_comp_val(__comp)); 20472: return __i != __last && !bool(__comp(__val, *__i)); 20472: } 20472: 20472: 20472: 20472: 20472: template 20472: void 20472: __move_merge_adaptive(_InputIterator1 __first1, _InputIterator1 __last1, 20472: _InputIterator2 __first2, _InputIterator2 __last2, 20472: _OutputIterator __result, _Compare __comp) 20472: { 20472: while (__first1 != __last1 && __first2 != __last2) 20472: { 20472: if (__comp(__first2, __first1)) 20472: { 20472: *__result = std::move(*__first2); 20472: ++__first2; 20472: } 20472: else 20472: { 20472: *__result = std::move(*__first1); 20472: ++__first1; 20472: } 20472: ++__result; 20472: } 20472: if (__first1 != __last1) 20472: std::move(__first1, __last1, __result); 20472: } 20472: 20472: 20472: template 20472: void 20472: __move_merge_adaptive_backward(_BidirectionalIterator1 __first1, 20472: _BidirectionalIterator1 __last1, 20472: _BidirectionalIterator2 __first2, 20472: _BidirectionalIterator2 __last2, 20472: _BidirectionalIterator3 __result, 20472: _Compare __comp) 20472: { 20472: if (__first1 == __last1) 20472: { 20472: std::move_backward(__first2, __last2, __result); 20472: return; 20472: } 20472: else if (__first2 == __last2) 20472: return; 20472: 20472: --__last1; 20472: --__last2; 20472: while (true) 20472: { 20472: if (__comp(__last2, __last1)) 20472: { 20472: *--__result = std::move(*__last1); 20472: if (__first1 == __last1) 20472: { 20472: std::move_backward(__first2, ++__last2, __result); 20472: return; 20472: } 20472: --__last1; 20472: } 20472: else 20472: { 20472: *--__result = std::move(*__last2); 20472: if (__first2 == __last2) 20472: return; 20472: --__last2; 20472: } 20472: } 20472: } 20472: 20472: 20472: template 20472: _BidirectionalIterator1 20472: __rotate_adaptive(_BidirectionalIterator1 __first, 20472: _BidirectionalIterator1 __middle, 20472: _BidirectionalIterator1 __last, 20472: _Distance __len1, _Distance __len2, 20472: _BidirectionalIterator2 __buffer, 20472: _Distance __buffer_size) 20472: { 20472: _BidirectionalIterator2 __buffer_end; 20472: if (__len1 > __len2 && __len2 <= __buffer_size) 20472: { 20472: if (__len2) 20472: { 20472: __buffer_end = std::move(__middle, __last, __buffer); 20472: std::move_backward(__first, __middle, __last); 20472: return std::move(__buffer, __buffer_end, __first); 20472: } 20472: else 20472: return __first; 20472: } 20472: else if (__len1 <= __buffer_size) 20472: { 20472: if (__len1) 20472: { 20472: __buffer_end = std::move(__first, __middle, __buffer); 20472: std::move(__middle, __last, __first); 20472: return std::move_backward(__buffer, __buffer_end, __last); 20472: } 20472: else 20472: return __last; 20472: } 20472: else 20472: return std::rotate(__first, __middle, __last); 20472: } 20472: 20472: 20472: template 20472: void 20472: __merge_adaptive(_BidirectionalIterator __first, 20472: _BidirectionalIterator __middle, 20472: _BidirectionalIterator __last, 20472: _Distance __len1, _Distance __len2, 20472: _Pointer __buffer, _Distance __buffer_size, 20472: _Compare __comp) 20472: { 20472: if (__len1 <= __len2 && __len1 <= __buffer_size) 20472: { 20472: _Pointer __buffer_end = std::move(__first, __middle, __buffer); 20472: std::__move_merge_adaptive(__buffer, __buffer_end, __middle, __last, 20472: __first, __comp); 20472: } 20472: else if (__len2 <= __buffer_size) 20472: { 20472: _Pointer __buffer_end = std::move(__middle, __last, __buffer); 20472: std::__move_merge_adaptive_backward(__first, __middle, __buffer, 20472: __buffer_end, __last, __comp); 20472: } 20472: else 20472: { 20472: _BidirectionalIterator __first_cut = __first; 20472: _BidirectionalIterator __second_cut = __middle; 20472: _Distance __len11 = 0; 20472: _Distance __len22 = 0; 20472: if (__len1 > __len2) 20472: { 20472: __len11 = __len1 / 2; 20472: std::advance(__first_cut, __len11); 20472: __second_cut 20472: = std::__lower_bound(__middle, __last, *__first_cut, 20472: __gnu_cxx::__ops::__iter_comp_val(__comp)); 20472: __len22 = std::distance(__middle, __second_cut); 20472: } 20472: else 20472: { 20472: __len22 = __len2 / 2; 20472: std::advance(__second_cut, __len22); 20472: __first_cut 20472: = std::__upper_bound(__first, __middle, *__second_cut, 20472: __gnu_cxx::__ops::__val_comp_iter(__comp)); 20472: __len11 = std::distance(__first, __first_cut); 20472: } 20472: 20472: _BidirectionalIterator __new_middle 20472: = std::__rotate_adaptive(__first_cut, __middle, __second_cut, 20472: __len1 - __len11, __len22, __buffer, 20472: __buffer_size); 20472: std::__merge_adaptive(__first, __first_cut, __new_middle, __len11, 20472: __len22, __buffer, __buffer_size, __comp); 20472: std::__merge_adaptive(__new_middle, __second_cut, __last, 20472: __len1 - __len11, 20472: __len2 - __len22, __buffer, 20472: __buffer_size, __comp); 20472: } 20472: } 20472: 20472: 20472: template 20472: void 20472: __merge_without_buffer(_BidirectionalIterator __first, 20472: _BidirectionalIterator __middle, 20472: _BidirectionalIterator __last, 20472: _Distance __len1, _Distance __len2, 20472: _Compare __comp) 20472: { 20472: if (__len1 == 0 || __len2 == 0) 20472: return; 20472: 20472: if (__len1 + __len2 == 2) 20472: { 20472: if (__comp(__middle, __first)) 20472: std::iter_swap(__first, __middle); 20472: return; 20472: } 20472: 20472: _BidirectionalIterator __first_cut = __first; 20472: _BidirectionalIterator __second_cut = __middle; 20472: _Distance __len11 = 0; 20472: _Distance __len22 = 0; 20472: if (__len1 > __len2) 20472: { 20472: __len11 = __len1 / 2; 20472: std::advance(__first_cut, __len11); 20472: __second_cut 20472: = std::__lower_bound(__middle, __last, *__first_cut, 20472: __gnu_cxx::__ops::__iter_comp_val(__comp)); 20472: __len22 = std::distance(__middle, __second_cut); 20472: } 20472: else 20472: { 20472: __len22 = __len2 / 2; 20472: std::advance(__second_cut, __len22); 20472: __first_cut 20472: = std::__upper_bound(__first, __middle, *__second_cut, 20472: __gnu_cxx::__ops::__val_comp_iter(__comp)); 20472: __len11 = std::distance(__first, __first_cut); 20472: } 20472: 20472: _BidirectionalIterator __new_middle 20472: = std::rotate(__first_cut, __middle, __second_cut); 20472: std::__merge_without_buffer(__first, __first_cut, __new_middle, 20472: __len11, __len22, __comp); 20472: std::__merge_without_buffer(__new_middle, __second_cut, __last, 20472: __len1 - __len11, __len2 - __len22, __comp); 20472: } 20472: 20472: template 20472: void 20472: __inplace_merge(_BidirectionalIterator __first, 20472: _BidirectionalIterator __middle, 20472: _BidirectionalIterator __last, 20472: _Compare __comp) 20472: { 20472: typedef typename iterator_traits<_BidirectionalIterator>::value_type 20472: _ValueType; 20472: typedef typename iterator_traits<_BidirectionalIterator>::difference_type 20472: _DistanceType; 20472: 20472: if (__first == __middle || __middle == __last) 20472: return; 20472: 20472: const _DistanceType __len1 = std::distance(__first, __middle); 20472: const _DistanceType __len2 = std::distance(__middle, __last); 20472: 20472: typedef _Temporary_buffer<_BidirectionalIterator, _ValueType> _TmpBuf; 20472: _TmpBuf __buf(__first, __len1 + __len2); 20472: 20472: if (__buf.begin() == 0) 20472: std::__merge_without_buffer 20472: (__first, __middle, __last, __len1, __len2, __comp); 20472: else 20472: std::__merge_adaptive 20472: (__first, __middle, __last, __len1, __len2, __buf.begin(), 20472: _DistanceType(__buf.size()), __comp); 20472: } 20472: # 2583 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: inline void 20472: inplace_merge(_BidirectionalIterator __first, 20472: _BidirectionalIterator __middle, 20472: _BidirectionalIterator __last) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: ; 20472: 20472: std::__inplace_merge(__first, __middle, __last, 20472: __gnu_cxx::__ops::__iter_less_iter()); 20472: } 20472: # 2624 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: inline void 20472: inplace_merge(_BidirectionalIterator __first, 20472: _BidirectionalIterator __middle, 20472: _BidirectionalIterator __last, 20472: _Compare __comp) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: ; 20472: 20472: std::__inplace_merge(__first, __middle, __last, 20472: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 20472: } 20472: 20472: 20472: 20472: template 20472: _OutputIterator 20472: __move_merge(_InputIterator __first1, _InputIterator __last1, 20472: _InputIterator __first2, _InputIterator __last2, 20472: _OutputIterator __result, _Compare __comp) 20472: { 20472: while (__first1 != __last1 && __first2 != __last2) 20472: { 20472: if (__comp(__first2, __first1)) 20472: { 20472: *__result = std::move(*__first2); 20472: ++__first2; 20472: } 20472: else 20472: { 20472: *__result = std::move(*__first1); 20472: ++__first1; 20472: } 20472: ++__result; 20472: } 20472: return std::move(__first2, __last2, std::move(__first1, __last1, __result)) 20472: 20472: ; 20472: } 20472: 20472: template 20472: void 20472: __merge_sort_loop(_RandomAccessIterator1 __first, 20472: _RandomAccessIterator1 __last, 20472: _RandomAccessIterator2 __result, _Distance __step_size, 20472: _Compare __comp) 20472: { 20472: const _Distance __two_step = 2 * __step_size; 20472: 20472: while (__last - __first >= __two_step) 20472: { 20472: __result = std::__move_merge(__first, __first + __step_size, 20472: __first + __step_size, 20472: __first + __two_step, 20472: __result, __comp); 20472: __first += __two_step; 20472: } 20472: __step_size = std::min(_Distance(__last - __first), __step_size); 20472: 20472: std::__move_merge(__first, __first + __step_size, 20472: __first + __step_size, __last, __result, __comp); 20472: } 20472: 20472: template 20472: 20472: void 20472: __chunk_insertion_sort(_RandomAccessIterator __first, 20472: _RandomAccessIterator __last, 20472: _Distance __chunk_size, _Compare __comp) 20472: { 20472: while (__last - __first >= __chunk_size) 20472: { 20472: std::__insertion_sort(__first, __first + __chunk_size, __comp); 20472: __first += __chunk_size; 20472: } 20472: std::__insertion_sort(__first, __last, __comp); 20472: } 20472: 20472: enum { _S_chunk_size = 7 }; 20472: 20472: template 20472: void 20472: __merge_sort_with_buffer(_RandomAccessIterator __first, 20472: _RandomAccessIterator __last, 20472: _Pointer __buffer, _Compare __comp) 20472: { 20472: typedef typename iterator_traits<_RandomAccessIterator>::difference_type 20472: _Distance; 20472: 20472: const _Distance __len = __last - __first; 20472: const _Pointer __buffer_last = __buffer + __len; 20472: 20472: _Distance __step_size = _S_chunk_size; 20472: std::__chunk_insertion_sort(__first, __last, __step_size, __comp); 20472: 20472: while (__step_size < __len) 20472: { 20472: std::__merge_sort_loop(__first, __last, __buffer, 20472: __step_size, __comp); 20472: __step_size *= 2; 20472: std::__merge_sort_loop(__buffer, __buffer_last, __first, 20472: __step_size, __comp); 20472: __step_size *= 2; 20472: } 20472: } 20472: 20472: template 20472: void 20472: __stable_sort_adaptive(_RandomAccessIterator __first, 20472: _RandomAccessIterator __last, 20472: _Pointer __buffer, _Distance __buffer_size, 20472: _Compare __comp) 20472: { 20472: const _Distance __len = (__last - __first + 1) / 2; 20472: const _RandomAccessIterator __middle = __first + __len; 20472: if (__len > __buffer_size) 20472: { 20472: std::__stable_sort_adaptive(__first, __middle, __buffer, 20472: __buffer_size, __comp); 20472: std::__stable_sort_adaptive(__middle, __last, __buffer, 20472: __buffer_size, __comp); 20472: } 20472: else 20472: { 20472: std::__merge_sort_with_buffer(__first, __middle, __buffer, __comp); 20472: std::__merge_sort_with_buffer(__middle, __last, __buffer, __comp); 20472: } 20472: std::__merge_adaptive(__first, __middle, __last, 20472: _Distance(__middle - __first), 20472: _Distance(__last - __middle), 20472: __buffer, __buffer_size, 20472: __comp); 20472: } 20472: 20472: 20472: template 20472: void 20472: __inplace_stable_sort(_RandomAccessIterator __first, 20472: _RandomAccessIterator __last, _Compare __comp) 20472: { 20472: if (__last - __first < 15) 20472: { 20472: std::__insertion_sort(__first, __last, __comp); 20472: return; 20472: } 20472: _RandomAccessIterator __middle = __first + (__last - __first) / 2; 20472: std::__inplace_stable_sort(__first, __middle, __comp); 20472: std::__inplace_stable_sort(__middle, __last, __comp); 20472: std::__merge_without_buffer(__first, __middle, __last, 20472: __middle - __first, 20472: __last - __middle, 20472: __comp); 20472: } 20472: # 2797 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: bool 20472: __includes(_InputIterator1 __first1, _InputIterator1 __last1, 20472: _InputIterator2 __first2, _InputIterator2 __last2, 20472: _Compare __comp) 20472: { 20472: while (__first1 != __last1 && __first2 != __last2) 20472: if (__comp(__first2, __first1)) 20472: return false; 20472: else if (__comp(__first1, __first2)) 20472: ++__first1; 20472: else 20472: { 20472: ++__first1; 20472: ++__first2; 20472: } 20472: 20472: return __first2 == __last2; 20472: } 20472: # 2837 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline bool 20472: includes(_InputIterator1 __first1, _InputIterator1 __last1, 20472: _InputIterator2 __first2, _InputIterator2 __last2) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: ; 20472: ; 20472: 20472: return std::__includes(__first1, __last1, __first2, __last2, 20472: __gnu_cxx::__ops::__iter_less_iter()); 20472: } 20472: # 2882 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline bool 20472: includes(_InputIterator1 __first1, _InputIterator1 __last1, 20472: _InputIterator2 __first2, _InputIterator2 __last2, 20472: _Compare __comp) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: ; 20472: ; 20472: 20472: return std::__includes(__first1, __last1, __first2, __last2, 20472: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 20472: } 20472: # 2918 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: bool 20472: __next_permutation(_BidirectionalIterator __first, 20472: _BidirectionalIterator __last, _Compare __comp) 20472: { 20472: if (__first == __last) 20472: return false; 20472: _BidirectionalIterator __i = __first; 20472: ++__i; 20472: if (__i == __last) 20472: return false; 20472: __i = __last; 20472: --__i; 20472: 20472: for(;;) 20472: { 20472: _BidirectionalIterator __ii = __i; 20472: --__i; 20472: if (__comp(__i, __ii)) 20472: { 20472: _BidirectionalIterator __j = __last; 20472: while (!__comp(__i, --__j)) 20472: {} 20472: std::iter_swap(__i, __j); 20472: std::__reverse(__ii, __last, 20472: std::__iterator_category(__first)); 20472: return true; 20472: } 20472: if (__i == __first) 20472: { 20472: std::__reverse(__first, __last, 20472: std::__iterator_category(__first)); 20472: return false; 20472: } 20472: } 20472: } 20472: # 2968 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline bool 20472: next_permutation(_BidirectionalIterator __first, 20472: _BidirectionalIterator __last) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: 20472: return std::__next_permutation 20472: (__first, __last, __gnu_cxx::__ops::__iter_less_iter()); 20472: } 20472: # 3001 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline bool 20472: next_permutation(_BidirectionalIterator __first, 20472: _BidirectionalIterator __last, _Compare __comp) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: 20472: return std::__next_permutation 20472: (__first, __last, __gnu_cxx::__ops::__iter_comp_iter(__comp)); 20472: } 20472: 20472: template 20472: 20472: bool 20472: __prev_permutation(_BidirectionalIterator __first, 20472: _BidirectionalIterator __last, _Compare __comp) 20472: { 20472: if (__first == __last) 20472: return false; 20472: _BidirectionalIterator __i = __first; 20472: ++__i; 20472: if (__i == __last) 20472: return false; 20472: __i = __last; 20472: --__i; 20472: 20472: for(;;) 20472: { 20472: _BidirectionalIterator __ii = __i; 20472: --__i; 20472: if (__comp(__ii, __i)) 20472: { 20472: _BidirectionalIterator __j = __last; 20472: while (!__comp(--__j, __i)) 20472: {} 20472: std::iter_swap(__i, __j); 20472: std::__reverse(__ii, __last, 20472: std::__iterator_category(__first)); 20472: return true; 20472: } 20472: if (__i == __first) 20472: { 20472: std::__reverse(__first, __last, 20472: std::__iterator_category(__first)); 20472: return false; 20472: } 20472: } 20472: } 20472: # 3071 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline bool 20472: prev_permutation(_BidirectionalIterator __first, 20472: _BidirectionalIterator __last) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: 20472: return std::__prev_permutation(__first, __last, 20472: __gnu_cxx::__ops::__iter_less_iter()); 20472: } 20472: # 3104 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline bool 20472: prev_permutation(_BidirectionalIterator __first, 20472: _BidirectionalIterator __last, _Compare __comp) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: 20472: return std::__prev_permutation(__first, __last, 20472: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 20472: } 20472: 20472: 20472: 20472: 20472: template 20472: 20472: _OutputIterator 20472: __replace_copy_if(_InputIterator __first, _InputIterator __last, 20472: _OutputIterator __result, 20472: _Predicate __pred, const _Tp& __new_value) 20472: { 20472: for (; __first != __last; ++__first, (void)++__result) 20472: if (__pred(__first)) 20472: *__result = __new_value; 20472: else 20472: *__result = *__first; 20472: return __result; 20472: } 20472: # 3156 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline _OutputIterator 20472: replace_copy(_InputIterator __first, _InputIterator __last, 20472: _OutputIterator __result, 20472: const _Tp& __old_value, const _Tp& __new_value) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: 20472: return std::__replace_copy_if(__first, __last, __result, 20472: __gnu_cxx::__ops::__iter_equals_val(__old_value), 20472: __new_value); 20472: } 20472: # 3191 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline _OutputIterator 20472: replace_copy_if(_InputIterator __first, _InputIterator __last, 20472: _OutputIterator __result, 20472: _Predicate __pred, const _Tp& __new_value) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: 20472: return std::__replace_copy_if(__first, __last, __result, 20472: __gnu_cxx::__ops::__pred_iter(__pred), 20472: __new_value); 20472: } 20472: # 3220 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline bool 20472: is_sorted(_ForwardIterator __first, _ForwardIterator __last) 20472: { return std::is_sorted_until(__first, __last) == __last; } 20472: # 3235 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline bool 20472: is_sorted(_ForwardIterator __first, _ForwardIterator __last, 20472: _Compare __comp) 20472: { return std::is_sorted_until(__first, __last, __comp) == __last; } 20472: 20472: template 20472: 20472: _ForwardIterator 20472: __is_sorted_until(_ForwardIterator __first, _ForwardIterator __last, 20472: _Compare __comp) 20472: { 20472: if (__first == __last) 20472: return __last; 20472: 20472: _ForwardIterator __next = __first; 20472: for (++__next; __next != __last; __first = __next, (void)++__next) 20472: if (__comp(__next, __first)) 20472: return __next; 20472: return __next; 20472: } 20472: # 3266 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline _ForwardIterator 20472: is_sorted_until(_ForwardIterator __first, _ForwardIterator __last) 20472: { 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: 20472: return std::__is_sorted_until(__first, __last, 20472: __gnu_cxx::__ops::__iter_less_iter()); 20472: } 20472: # 3291 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline _ForwardIterator 20472: is_sorted_until(_ForwardIterator __first, _ForwardIterator __last, 20472: _Compare __comp) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: 20472: return std::__is_sorted_until(__first, __last, 20472: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 20472: } 20472: # 3317 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline pair 20472: minmax(const _Tp& __a, const _Tp& __b) 20472: { 20472: 20472: 20472: 20472: return __b < __a ? pair(__b, __a) 20472: : pair(__a, __b); 20472: } 20472: # 3338 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline pair 20472: minmax(const _Tp& __a, const _Tp& __b, _Compare __comp) 20472: { 20472: return __comp(__b, __a) ? pair(__b, __a) 20472: : pair(__a, __b); 20472: } 20472: 20472: template 20472: 20472: pair<_ForwardIterator, _ForwardIterator> 20472: __minmax_element(_ForwardIterator __first, _ForwardIterator __last, 20472: _Compare __comp) 20472: { 20472: _ForwardIterator __next = __first; 20472: if (__first == __last 20472: || ++__next == __last) 20472: return std::make_pair(__first, __first); 20472: 20472: _ForwardIterator __min{}, __max{}; 20472: if (__comp(__next, __first)) 20472: { 20472: __min = __next; 20472: __max = __first; 20472: } 20472: else 20472: { 20472: __min = __first; 20472: __max = __next; 20472: } 20472: 20472: __first = __next; 20472: ++__first; 20472: 20472: while (__first != __last) 20472: { 20472: __next = __first; 20472: if (++__next == __last) 20472: { 20472: if (__comp(__first, __min)) 20472: __min = __first; 20472: else if (!__comp(__first, __max)) 20472: __max = __first; 20472: break; 20472: } 20472: 20472: if (__comp(__next, __first)) 20472: { 20472: if (__comp(__next, __min)) 20472: __min = __next; 20472: if (!__comp(__first, __max)) 20472: __max = __first; 20472: } 20472: else 20472: { 20472: if (__comp(__first, __min)) 20472: __min = __first; 20472: if (!__comp(__next, __max)) 20472: __max = __next; 20472: } 20472: 20472: __first = __next; 20472: ++__first; 20472: } 20472: 20472: return std::make_pair(__min, __max); 20472: } 20472: # 3418 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline pair<_ForwardIterator, _ForwardIterator> 20472: minmax_element(_ForwardIterator __first, _ForwardIterator __last) 20472: { 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: 20472: return std::__minmax_element(__first, __last, 20472: __gnu_cxx::__ops::__iter_less_iter()); 20472: } 20472: # 3446 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline pair<_ForwardIterator, _ForwardIterator> 20472: minmax_element(_ForwardIterator __first, _ForwardIterator __last, 20472: _Compare __comp) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: 20472: return std::__minmax_element(__first, __last, 20472: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 20472: } 20472: 20472: 20472: template 20472: 20472: inline _Tp 20472: min(initializer_list<_Tp> __l) 20472: { return *std::min_element(__l.begin(), __l.end()); } 20472: 20472: template 20472: 20472: inline _Tp 20472: min(initializer_list<_Tp> __l, _Compare __comp) 20472: { return *std::min_element(__l.begin(), __l.end(), __comp); } 20472: 20472: template 20472: 20472: inline _Tp 20472: max(initializer_list<_Tp> __l) 20472: { return *std::max_element(__l.begin(), __l.end()); } 20472: 20472: template 20472: 20472: inline _Tp 20472: max(initializer_list<_Tp> __l, _Compare __comp) 20472: { return *std::max_element(__l.begin(), __l.end(), __comp); } 20472: 20472: template 20472: 20472: inline pair<_Tp, _Tp> 20472: minmax(initializer_list<_Tp> __l) 20472: { 20472: pair __p = 20472: std::minmax_element(__l.begin(), __l.end()); 20472: return std::make_pair(*__p.first, *__p.second); 20472: } 20472: 20472: template 20472: 20472: inline pair<_Tp, _Tp> 20472: minmax(initializer_list<_Tp> __l, _Compare __comp) 20472: { 20472: pair __p = 20472: std::minmax_element(__l.begin(), __l.end(), __comp); 20472: return std::make_pair(*__p.first, *__p.second); 20472: } 20472: # 3523 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline bool 20472: is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, 20472: _ForwardIterator2 __first2, _BinaryPredicate __pred) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: 20472: return std::__is_permutation(__first1, __last1, __first2, 20472: __gnu_cxx::__ops::__iter_comp_iter(__pred)); 20472: } 20472: # 3723 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: pair<_IntType, _IntType> 20472: __gen_two_uniform_ints(_IntType __b0, _IntType __b1, 20472: _UniformRandomBitGenerator&& __g) 20472: { 20472: _IntType __x 20472: = uniform_int_distribution<_IntType>{0, (__b0 * __b1) - 1}(__g); 20472: return std::make_pair(__x / __b1, __x % __b1); 20472: } 20472: # 3745 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: void 20472: shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last, 20472: _UniformRandomNumberGenerator&& __g) 20472: { 20472: 20472: 20472: 20472: ; 20472: 20472: if (__first == __last) 20472: return; 20472: 20472: typedef typename iterator_traits<_RandomAccessIterator>::difference_type 20472: _DistanceType; 20472: 20472: typedef typename std::make_unsigned<_DistanceType>::type __ud_type; 20472: typedef typename std::uniform_int_distribution<__ud_type> __distr_type; 20472: typedef typename __distr_type::param_type __p_type; 20472: 20472: typedef typename remove_reference<_UniformRandomNumberGenerator>::type 20472: _Gen; 20472: typedef typename common_type::type 20472: __uc_type; 20472: 20472: const __uc_type __urngrange = __g.max() - __g.min(); 20472: const __uc_type __urange = __uc_type(__last - __first); 20472: 20472: if (__urngrange / __urange >= __urange) 20472: 20472: { 20472: _RandomAccessIterator __i = __first + 1; 20472: 20472: 20472: 20472: 20472: 20472: if ((__urange % 2) == 0) 20472: { 20472: __distr_type __d{0, 1}; 20472: std::iter_swap(__i++, __first + __d(__g)); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: while (__i != __last) 20472: { 20472: const __uc_type __swap_range = __uc_type(__i - __first) + 1; 20472: 20472: const pair<__uc_type, __uc_type> __pospos = 20472: __gen_two_uniform_ints(__swap_range, __swap_range + 1, __g); 20472: 20472: std::iter_swap(__i++, __first + __pospos.first); 20472: std::iter_swap(__i++, __first + __pospos.second); 20472: } 20472: 20472: return; 20472: } 20472: 20472: __distr_type __d; 20472: 20472: for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) 20472: std::iter_swap(__i, __first + __d(__g, __p_type(0, __i - __first))); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: # 3830 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: _Function 20472: for_each(_InputIterator __first, _InputIterator __last, _Function __f) 20472: { 20472: 20472: 20472: ; 20472: for (; __first != __last; ++__first) 20472: __f(*__first); 20472: return __f; 20472: } 20472: # 3892 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline _InputIterator 20472: find(_InputIterator __first, _InputIterator __last, 20472: const _Tp& __val) 20472: { 20472: 20472: 20472: 20472: 20472: ; 20472: return std::__find_if(__first, __last, 20472: __gnu_cxx::__ops::__iter_equals_val(__val)); 20472: } 20472: # 3917 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline _InputIterator 20472: find_if(_InputIterator __first, _InputIterator __last, 20472: _Predicate __pred) 20472: { 20472: 20472: 20472: 20472: 20472: ; 20472: 20472: return std::__find_if(__first, __last, 20472: __gnu_cxx::__ops::__pred_iter(__pred)); 20472: } 20472: # 3949 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: _InputIterator 20472: find_first_of(_InputIterator __first1, _InputIterator __last1, 20472: _ForwardIterator __first2, _ForwardIterator __last2) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: 20472: for (; __first1 != __last1; ++__first1) 20472: for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter) 20472: if (*__first1 == *__iter) 20472: return __first1; 20472: return __last1; 20472: } 20472: # 3990 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: _InputIterator 20472: find_first_of(_InputIterator __first1, _InputIterator __last1, 20472: _ForwardIterator __first2, _ForwardIterator __last2, 20472: _BinaryPredicate __comp) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: 20472: for (; __first1 != __last1; ++__first1) 20472: for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter) 20472: if (__comp(*__first1, *__iter)) 20472: return __first1; 20472: return __last1; 20472: } 20472: # 4023 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline _ForwardIterator 20472: adjacent_find(_ForwardIterator __first, _ForwardIterator __last) 20472: { 20472: 20472: 20472: 20472: 20472: ; 20472: 20472: return std::__adjacent_find(__first, __last, 20472: __gnu_cxx::__ops::__iter_equal_to_iter()); 20472: } 20472: # 4049 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline _ForwardIterator 20472: adjacent_find(_ForwardIterator __first, _ForwardIterator __last, 20472: _BinaryPredicate __binary_pred) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: 20472: return std::__adjacent_find(__first, __last, 20472: __gnu_cxx::__ops::__iter_comp_iter(__binary_pred)); 20472: } 20472: # 4075 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline typename iterator_traits<_InputIterator>::difference_type 20472: count(_InputIterator __first, _InputIterator __last, const _Tp& __value) 20472: { 20472: 20472: 20472: 20472: 20472: ; 20472: 20472: return std::__count_if(__first, __last, 20472: __gnu_cxx::__ops::__iter_equals_val(__value)); 20472: } 20472: # 4099 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline typename iterator_traits<_InputIterator>::difference_type 20472: count_if(_InputIterator __first, _InputIterator __last, _Predicate __pred) 20472: { 20472: 20472: 20472: 20472: 20472: ; 20472: 20472: return std::__count_if(__first, __last, 20472: __gnu_cxx::__ops::__pred_iter(__pred)); 20472: } 20472: # 4140 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline _ForwardIterator1 20472: search(_ForwardIterator1 __first1, _ForwardIterator1 __last1, 20472: _ForwardIterator2 __first2, _ForwardIterator2 __last2) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: 20472: return std::__search(__first1, __last1, __first2, __last2, 20472: __gnu_cxx::__ops::__iter_equal_to_iter()); 20472: } 20472: # 4180 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline _ForwardIterator1 20472: search(_ForwardIterator1 __first1, _ForwardIterator1 __last1, 20472: _ForwardIterator2 __first2, _ForwardIterator2 __last2, 20472: _BinaryPredicate __predicate) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: 20472: return std::__search(__first1, __last1, __first2, __last2, 20472: __gnu_cxx::__ops::__iter_comp_iter(__predicate)); 20472: } 20472: # 4216 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline _ForwardIterator 20472: search_n(_ForwardIterator __first, _ForwardIterator __last, 20472: _Integer __count, const _Tp& __val) 20472: { 20472: 20472: 20472: 20472: 20472: ; 20472: 20472: return std::__search_n(__first, __last, __count, 20472: __gnu_cxx::__ops::__iter_equals_val(__val)); 20472: } 20472: # 4250 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline _ForwardIterator 20472: search_n(_ForwardIterator __first, _ForwardIterator __last, 20472: _Integer __count, const _Tp& __val, 20472: _BinaryPredicate __binary_pred) 20472: { 20472: 20472: 20472: 20472: 20472: ; 20472: 20472: return std::__search_n(__first, __last, __count, 20472: __gnu_cxx::__ops::__iter_comp_val(__binary_pred, __val)); 20472: } 20472: # 4300 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: _OutputIterator 20472: transform(_InputIterator __first, _InputIterator __last, 20472: _OutputIterator __result, _UnaryOperation __unary_op) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: 20472: for (; __first != __last; ++__first, (void)++__result) 20472: *__result = __unary_op(*__first); 20472: return __result; 20472: } 20472: # 4338 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: _OutputIterator 20472: transform(_InputIterator1 __first1, _InputIterator1 __last1, 20472: _InputIterator2 __first2, _OutputIterator __result, 20472: _BinaryOperation __binary_op) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: 20472: for (; __first1 != __last1; ++__first1, (void)++__first2, ++__result) 20472: *__result = __binary_op(*__first1, *__first2); 20472: return __result; 20472: } 20472: # 4372 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: void 20472: replace(_ForwardIterator __first, _ForwardIterator __last, 20472: const _Tp& __old_value, const _Tp& __new_value) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: 20472: for (; __first != __last; ++__first) 20472: if (*__first == __old_value) 20472: *__first = __new_value; 20472: } 20472: # 4405 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: void 20472: replace_if(_ForwardIterator __first, _ForwardIterator __last, 20472: _Predicate __pred, const _Tp& __new_value) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: 20472: for (; __first != __last; ++__first) 20472: if (__pred(*__first)) 20472: *__first = __new_value; 20472: } 20472: # 4438 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: void 20472: generate(_ForwardIterator __first, _ForwardIterator __last, 20472: _Generator __gen) 20472: { 20472: 20472: 20472: 20472: 20472: ; 20472: 20472: for (; __first != __last; ++__first) 20472: *__first = __gen(); 20472: } 20472: # 4472 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: _OutputIterator 20472: generate_n(_OutputIterator __first, _Size __n, _Generator __gen) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: typedef __decltype(std::__size_to_integer(__n)) _IntSize; 20472: for (_IntSize __niter = std::__size_to_integer(__n); 20472: __niter > 0; --__niter, (void) ++__first) 20472: *__first = __gen(); 20472: return __first; 20472: } 20472: # 4510 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline _OutputIterator 20472: unique_copy(_InputIterator __first, _InputIterator __last, 20472: _OutputIterator __result) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: 20472: if (__first == __last) 20472: return __result; 20472: return std::__unique_copy(__first, __last, __result, 20472: __gnu_cxx::__ops::__iter_equal_to_iter(), 20472: std::__iterator_category(__first), 20472: std::__iterator_category(__result)); 20472: } 20472: # 4551 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline _OutputIterator 20472: unique_copy(_InputIterator __first, _InputIterator __last, 20472: _OutputIterator __result, 20472: _BinaryPredicate __binary_pred) 20472: { 20472: 20472: 20472: 20472: 20472: ; 20472: 20472: if (__first == __last) 20472: return __result; 20472: return std::__unique_copy(__first, __last, __result, 20472: __gnu_cxx::__ops::__iter_comp_iter(__binary_pred), 20472: std::__iterator_category(__first), 20472: std::__iterator_category(__result)); 20472: } 20472: # 4585 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: inline void 20472: random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last) 20472: { 20472: 20472: 20472: 20472: ; 20472: 20472: if (__first != __last) 20472: for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) 20472: { 20472: 20472: _RandomAccessIterator __j = __first 20472: + std::rand() % ((__i - __first) + 1); 20472: if (__i != __j) 20472: std::iter_swap(__i, __j); 20472: } 20472: } 20472: # 4620 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: void 20472: random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last, 20472: 20472: _RandomNumberGenerator&& __rand) 20472: 20472: 20472: 20472: { 20472: 20472: 20472: 20472: ; 20472: 20472: if (__first == __last) 20472: return; 20472: for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) 20472: { 20472: _RandomAccessIterator __j = __first + __rand((__i - __first) + 1); 20472: if (__i != __j) 20472: std::iter_swap(__i, __j); 20472: } 20472: } 20472: # 4660 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline _ForwardIterator 20472: partition(_ForwardIterator __first, _ForwardIterator __last, 20472: _Predicate __pred) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: 20472: return std::__partition(__first, __last, __pred, 20472: std::__iterator_category(__first)); 20472: } 20472: # 4694 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline void 20472: partial_sort(_RandomAccessIterator __first, 20472: _RandomAccessIterator __middle, 20472: _RandomAccessIterator __last) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: ; 20472: 20472: std::__partial_sort(__first, __middle, __last, 20472: __gnu_cxx::__ops::__iter_less_iter()); 20472: } 20472: # 4733 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline void 20472: partial_sort(_RandomAccessIterator __first, 20472: _RandomAccessIterator __middle, 20472: _RandomAccessIterator __last, 20472: _Compare __comp) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: ; 20472: 20472: std::__partial_sort(__first, __middle, __last, 20472: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 20472: } 20472: # 4770 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline void 20472: nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, 20472: _RandomAccessIterator __last) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: ; 20472: 20472: if (__first == __last || __nth == __last) 20472: return; 20472: 20472: std::__introselect(__first, __nth, __last, 20472: std::__lg(__last - __first) * 2, 20472: __gnu_cxx::__ops::__iter_less_iter()); 20472: } 20472: # 4810 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline void 20472: nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, 20472: _RandomAccessIterator __last, _Compare __comp) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: ; 20472: 20472: if (__first == __last || __nth == __last) 20472: return; 20472: 20472: std::__introselect(__first, __nth, __last, 20472: std::__lg(__last - __first) * 2, 20472: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 20472: } 20472: # 4848 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline void 20472: sort(_RandomAccessIterator __first, _RandomAccessIterator __last) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: 20472: std::__sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); 20472: } 20472: # 4879 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline void 20472: sort(_RandomAccessIterator __first, _RandomAccessIterator __last, 20472: _Compare __comp) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: 20472: std::__sort(__first, __last, __gnu_cxx::__ops::__iter_comp_iter(__comp)); 20472: } 20472: 20472: template 20472: 20472: _OutputIterator 20472: __merge(_InputIterator1 __first1, _InputIterator1 __last1, 20472: _InputIterator2 __first2, _InputIterator2 __last2, 20472: _OutputIterator __result, _Compare __comp) 20472: { 20472: while (__first1 != __last1 && __first2 != __last2) 20472: { 20472: if (__comp(__first2, __first1)) 20472: { 20472: *__result = *__first2; 20472: ++__first2; 20472: } 20472: else 20472: { 20472: *__result = *__first1; 20472: ++__first1; 20472: } 20472: ++__result; 20472: } 20472: return std::copy(__first2, __last2, 20472: std::copy(__first1, __last1, __result)); 20472: } 20472: # 4942 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline _OutputIterator 20472: merge(_InputIterator1 __first1, _InputIterator1 __last1, 20472: _InputIterator2 __first2, _InputIterator2 __last2, 20472: _OutputIterator __result) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: ; 20472: ; 20472: 20472: return std::__merge(__first1, __last1, 20472: __first2, __last2, __result, 20472: __gnu_cxx::__ops::__iter_less_iter()); 20472: } 20472: # 4993 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline _OutputIterator 20472: merge(_InputIterator1 __first1, _InputIterator1 __last1, 20472: _InputIterator2 __first2, _InputIterator2 __last2, 20472: _OutputIterator __result, _Compare __comp) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: ; 20472: ; 20472: 20472: return std::__merge(__first1, __last1, 20472: __first2, __last2, __result, 20472: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 20472: } 20472: 20472: template 20472: inline void 20472: __stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, 20472: _Compare __comp) 20472: { 20472: typedef typename iterator_traits<_RandomAccessIterator>::value_type 20472: _ValueType; 20472: typedef typename iterator_traits<_RandomAccessIterator>::difference_type 20472: _DistanceType; 20472: 20472: typedef _Temporary_buffer<_RandomAccessIterator, _ValueType> _TmpBuf; 20472: _TmpBuf __buf(__first, std::distance(__first, __last)); 20472: 20472: if (__buf.begin() == 0) 20472: std::__inplace_stable_sort(__first, __last, __comp); 20472: else 20472: std::__stable_sort_adaptive(__first, __last, __buf.begin(), 20472: _DistanceType(__buf.size()), __comp); 20472: } 20472: # 5058 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: inline void 20472: stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: 20472: std::__stable_sort(__first, __last, 20472: __gnu_cxx::__ops::__iter_less_iter()); 20472: } 20472: # 5092 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: inline void 20472: stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, 20472: _Compare __comp) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: 20472: std::__stable_sort(__first, __last, 20472: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 20472: } 20472: 20472: template 20472: 20472: _OutputIterator 20472: __set_union(_InputIterator1 __first1, _InputIterator1 __last1, 20472: _InputIterator2 __first2, _InputIterator2 __last2, 20472: _OutputIterator __result, _Compare __comp) 20472: { 20472: while (__first1 != __last1 && __first2 != __last2) 20472: { 20472: if (__comp(__first1, __first2)) 20472: { 20472: *__result = *__first1; 20472: ++__first1; 20472: } 20472: else if (__comp(__first2, __first1)) 20472: { 20472: *__result = *__first2; 20472: ++__first2; 20472: } 20472: else 20472: { 20472: *__result = *__first1; 20472: ++__first1; 20472: ++__first2; 20472: } 20472: ++__result; 20472: } 20472: return std::copy(__first2, __last2, 20472: std::copy(__first1, __last1, __result)); 20472: } 20472: # 5162 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline _OutputIterator 20472: set_union(_InputIterator1 __first1, _InputIterator1 __last1, 20472: _InputIterator2 __first2, _InputIterator2 __last2, 20472: _OutputIterator __result) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: ; 20472: ; 20472: 20472: return std::__set_union(__first1, __last1, 20472: __first2, __last2, __result, 20472: __gnu_cxx::__ops::__iter_less_iter()); 20472: } 20472: # 5213 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline _OutputIterator 20472: set_union(_InputIterator1 __first1, _InputIterator1 __last1, 20472: _InputIterator2 __first2, _InputIterator2 __last2, 20472: _OutputIterator __result, _Compare __comp) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: ; 20472: ; 20472: 20472: return std::__set_union(__first1, __last1, 20472: __first2, __last2, __result, 20472: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 20472: } 20472: 20472: template 20472: 20472: _OutputIterator 20472: __set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, 20472: _InputIterator2 __first2, _InputIterator2 __last2, 20472: _OutputIterator __result, _Compare __comp) 20472: { 20472: while (__first1 != __last1 && __first2 != __last2) 20472: if (__comp(__first1, __first2)) 20472: ++__first1; 20472: else if (__comp(__first2, __first1)) 20472: ++__first2; 20472: else 20472: { 20472: *__result = *__first1; 20472: ++__first1; 20472: ++__first2; 20472: ++__result; 20472: } 20472: return __result; 20472: } 20472: # 5286 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline _OutputIterator 20472: set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, 20472: _InputIterator2 __first2, _InputIterator2 __last2, 20472: _OutputIterator __result) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: ; 20472: ; 20472: 20472: return std::__set_intersection(__first1, __last1, 20472: __first2, __last2, __result, 20472: __gnu_cxx::__ops::__iter_less_iter()); 20472: } 20472: # 5336 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline _OutputIterator 20472: set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, 20472: _InputIterator2 __first2, _InputIterator2 __last2, 20472: _OutputIterator __result, _Compare __comp) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: ; 20472: ; 20472: 20472: return std::__set_intersection(__first1, __last1, 20472: __first2, __last2, __result, 20472: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 20472: } 20472: 20472: template 20472: 20472: _OutputIterator 20472: __set_difference(_InputIterator1 __first1, _InputIterator1 __last1, 20472: _InputIterator2 __first2, _InputIterator2 __last2, 20472: _OutputIterator __result, _Compare __comp) 20472: { 20472: while (__first1 != __last1 && __first2 != __last2) 20472: if (__comp(__first1, __first2)) 20472: { 20472: *__result = *__first1; 20472: ++__first1; 20472: ++__result; 20472: } 20472: else if (__comp(__first2, __first1)) 20472: ++__first2; 20472: else 20472: { 20472: ++__first1; 20472: ++__first2; 20472: } 20472: return std::copy(__first1, __last1, __result); 20472: } 20472: # 5411 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline _OutputIterator 20472: set_difference(_InputIterator1 __first1, _InputIterator1 __last1, 20472: _InputIterator2 __first2, _InputIterator2 __last2, 20472: _OutputIterator __result) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: ; 20472: ; 20472: 20472: return std::__set_difference(__first1, __last1, 20472: __first2, __last2, __result, 20472: __gnu_cxx::__ops::__iter_less_iter()); 20472: } 20472: # 5463 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline _OutputIterator 20472: set_difference(_InputIterator1 __first1, _InputIterator1 __last1, 20472: _InputIterator2 __first2, _InputIterator2 __last2, 20472: _OutputIterator __result, _Compare __comp) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: ; 20472: ; 20472: 20472: return std::__set_difference(__first1, __last1, 20472: __first2, __last2, __result, 20472: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 20472: } 20472: 20472: template 20472: 20472: _OutputIterator 20472: __set_symmetric_difference(_InputIterator1 __first1, 20472: _InputIterator1 __last1, 20472: _InputIterator2 __first2, 20472: _InputIterator2 __last2, 20472: _OutputIterator __result, 20472: _Compare __comp) 20472: { 20472: while (__first1 != __last1 && __first2 != __last2) 20472: if (__comp(__first1, __first2)) 20472: { 20472: *__result = *__first1; 20472: ++__first1; 20472: ++__result; 20472: } 20472: else if (__comp(__first2, __first1)) 20472: { 20472: *__result = *__first2; 20472: ++__first2; 20472: ++__result; 20472: } 20472: else 20472: { 20472: ++__first1; 20472: ++__first2; 20472: } 20472: return std::copy(__first2, __last2, 20472: std::copy(__first1, __last1, __result)); 20472: } 20472: # 5544 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline _OutputIterator 20472: set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1, 20472: _InputIterator2 __first2, _InputIterator2 __last2, 20472: _OutputIterator __result) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: ; 20472: ; 20472: 20472: return std::__set_symmetric_difference(__first1, __last1, 20472: __first2, __last2, __result, 20472: __gnu_cxx::__ops::__iter_less_iter()); 20472: } 20472: # 5596 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline _OutputIterator 20472: set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1, 20472: _InputIterator2 __first2, _InputIterator2 __last2, 20472: _OutputIterator __result, 20472: _Compare __comp) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: ; 20472: ; 20472: 20472: return std::__set_symmetric_difference(__first1, __last1, 20472: __first2, __last2, __result, 20472: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 20472: } 20472: 20472: template 20472: 20472: _ForwardIterator 20472: __min_element(_ForwardIterator __first, _ForwardIterator __last, 20472: _Compare __comp) 20472: { 20472: if (__first == __last) 20472: return __first; 20472: _ForwardIterator __result = __first; 20472: while (++__first != __last) 20472: if (__comp(__first, __result)) 20472: __result = __first; 20472: return __result; 20472: } 20472: # 5650 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: _ForwardIterator 20472: inline min_element(_ForwardIterator __first, _ForwardIterator __last) 20472: { 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: 20472: return std::__min_element(__first, __last, 20472: __gnu_cxx::__ops::__iter_less_iter()); 20472: } 20472: # 5675 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline _ForwardIterator 20472: min_element(_ForwardIterator __first, _ForwardIterator __last, 20472: _Compare __comp) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: 20472: return std::__min_element(__first, __last, 20472: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 20472: } 20472: 20472: template 20472: 20472: _ForwardIterator 20472: __max_element(_ForwardIterator __first, _ForwardIterator __last, 20472: _Compare __comp) 20472: { 20472: if (__first == __last) return __first; 20472: _ForwardIterator __result = __first; 20472: while (++__first != __last) 20472: if (__comp(__result, __first)) 20472: __result = __first; 20472: return __result; 20472: } 20472: # 5714 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline _ForwardIterator 20472: max_element(_ForwardIterator __first, _ForwardIterator __last) 20472: { 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: 20472: return std::__max_element(__first, __last, 20472: __gnu_cxx::__ops::__iter_less_iter()); 20472: } 20472: # 5739 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: template 20472: 20472: inline _ForwardIterator 20472: max_element(_ForwardIterator __first, _ForwardIterator __last, 20472: _Compare __comp) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: ; 20472: 20472: return std::__max_element(__first, __last, 20472: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 20472: } 20472: # 5885 "/usr/include/c++/10/bits/stl_algo.h" 3 20472: 20472: 20472: } 20472: # 63 "/usr/include/c++/10/algorithm" 2 3 20472: # 8 "./db/merge_context.h" 2 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 13 "./db/merge_context.h" 20472: namespace rocksdb { 20472: 20472: const std::vector empty_operand_list; 20472: 20472: 20472: 20472: 20472: 20472: class MergeContext { 20472: public: 20472: 20472: void Clear() { 20472: if (operand_list_) { 20472: operand_list_->clear(); 20472: copied_operands_->clear(); 20472: } 20472: } 20472: 20472: 20472: void PushOperand(const Slice& operand_slice, bool operand_pinned = false) { 20472: Initialize(); 20472: SetDirectionBackward(); 20472: 20472: if (operand_pinned) { 20472: operand_list_->push_back(operand_slice); 20472: } else { 20472: 20472: copied_operands_->emplace_back( 20472: new std::string(operand_slice.data(), operand_slice.size())); 20472: operand_list_->push_back(*copied_operands_->back()); 20472: } 20472: } 20472: 20472: 20472: void PushOperandBack(const Slice& operand_slice, 20472: bool operand_pinned = false) { 20472: Initialize(); 20472: SetDirectionForward(); 20472: 20472: if (operand_pinned) { 20472: operand_list_->push_back(operand_slice); 20472: } else { 20472: 20472: copied_operands_->emplace_back( 20472: new std::string(operand_slice.data(), operand_slice.size())); 20472: operand_list_->push_back(*copied_operands_->back()); 20472: } 20472: } 20472: 20472: 20472: size_t GetNumOperands() const { 20472: if (!operand_list_) { 20472: return 0; 20472: } 20472: return operand_list_->size(); 20472: } 20472: 20472: 20472: Slice GetOperand(int index) { 20472: 20472: # 72 "./db/merge_context.h" 3 4 20472: (static_cast ( 20472: # 72 "./db/merge_context.h" 20472: operand_list_ 20472: # 72 "./db/merge_context.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 72 "./db/merge_context.h" 20472: "operand_list_" 20472: # 72 "./db/merge_context.h" 3 4 20472: , "./db/merge_context.h", 72, __extension__ __PRETTY_FUNCTION__)) 20472: # 72 "./db/merge_context.h" 20472: ; 20472: 20472: SetDirectionForward(); 20472: return (*operand_list_)[index]; 20472: } 20472: 20472: 20472: const std::vector& GetOperands() { 20472: return GetOperandsDirectionForward(); 20472: } 20472: 20472: 20472: 20472: const std::vector& GetOperandsDirectionForward() { 20472: if (!operand_list_) { 20472: return empty_operand_list; 20472: } 20472: 20472: SetDirectionForward(); 20472: return *operand_list_; 20472: } 20472: 20472: 20472: 20472: const std::vector& GetOperandsDirectionBackward() { 20472: if (!operand_list_) { 20472: return empty_operand_list; 20472: } 20472: 20472: SetDirectionBackward(); 20472: return *operand_list_; 20472: } 20472: 20472: private: 20472: void Initialize() { 20472: if (!operand_list_) { 20472: operand_list_.reset(new std::vector()); 20472: copied_operands_.reset(new std::vector>()); 20472: } 20472: } 20472: 20472: void SetDirectionForward() { 20472: if (operands_reversed_ == true) { 20472: std::reverse(operand_list_->begin(), operand_list_->end()); 20472: operands_reversed_ = false; 20472: } 20472: } 20472: 20472: void SetDirectionBackward() { 20472: if (operands_reversed_ == false) { 20472: std::reverse(operand_list_->begin(), operand_list_->end()); 20472: operands_reversed_ = true; 20472: } 20472: } 20472: 20472: 20472: std::unique_ptr> operand_list_; 20472: 20472: std::unique_ptr>> copied_operands_; 20472: bool operands_reversed_ = true; 20472: }; 20472: 20472: } 20472: # 17 "./db/dbformat.h" 2 20472: # 1 "./logging/logging.h" 1 20472: # 13 "./logging/logging.h" 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: inline const char* RocksLogShorterFileName(const char* file) 20472: { 20472: 20472: 20472: return file + (sizeof("./logging/logging.h") > 18 ? sizeof("./logging/logging.h") - 18 : 0); 20472: } 20472: # 18 "./db/dbformat.h" 2 20472: # 1 "./monitoring/perf_context_imp.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "./monitoring/perf_step_timer.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "./monitoring/perf_level_imp.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "./include/rocksdb/perf_level.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: namespace rocksdb { 20472: 20472: 20472: enum PerfLevel : unsigned char { 20472: kUninitialized = 0, 20472: kDisable = 1, 20472: kEnableCount = 2, 20472: kEnableTimeExceptForMutex = 3, 20472: 20472: 20472: 20472: kEnableTimeAndCPUTimeExceptForMutex = 4, 20472: kEnableTime = 5, 20472: kOutOfBounds = 6 20472: }; 20472: 20472: 20472: void SetPerfLevel(PerfLevel level); 20472: 20472: 20472: PerfLevel GetPerfLevel(); 20472: 20472: } 20472: # 8 "./monitoring/perf_level_imp.h" 2 20472: # 1 "./port/port.h" 1 20472: # 10 "./port/port.h" 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "./port/port_posix.h" 1 20472: # 12 "./port/port_posix.h" 20472: 20472: 20472: # 1 "/usr/include/c++/10/thread" 1 3 20472: # 32 "/usr/include/c++/10/thread" 3 20472: 20472: # 33 "/usr/include/c++/10/thread" 3 20472: # 53 "/usr/include/c++/10/thread" 3 20472: # 1 "/usr/include/c++/10/cerrno" 1 3 20472: # 39 "/usr/include/c++/10/cerrno" 3 20472: 20472: # 40 "/usr/include/c++/10/cerrno" 3 20472: # 54 "/usr/include/c++/10/thread" 2 3 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 60 "/usr/include/c++/10/thread" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: # 73 "/usr/include/c++/10/thread" 3 20472: class thread 20472: { 20472: public: 20472: 20472: 20472: struct _State 20472: { 20472: virtual ~_State(); 20472: virtual void _M_run() = 0; 20472: }; 20472: using _State_ptr = unique_ptr<_State>; 20472: 20472: typedef __gthread_t native_handle_type; 20472: 20472: 20472: class id 20472: { 20472: native_handle_type _M_thread; 20472: 20472: public: 20472: id() noexcept : _M_thread() { } 20472: 20472: explicit 20472: id(native_handle_type __id) : _M_thread(__id) { } 20472: 20472: private: 20472: friend class thread; 20472: friend class hash; 20472: 20472: friend bool 20472: operator==(id __x, id __y) noexcept; 20472: 20472: 20472: 20472: 20472: 20472: friend bool 20472: operator<(id __x, id __y) noexcept; 20472: 20472: 20472: template 20472: friend basic_ostream<_CharT, _Traits>& 20472: operator<<(basic_ostream<_CharT, _Traits>& __out, id __id); 20472: }; 20472: 20472: private: 20472: id _M_id; 20472: 20472: 20472: 20472: 20472: template 20472: using __not_same = __not_, thread>>; 20472: 20472: public: 20472: thread() noexcept = default; 20472: 20472: template>> 20472: explicit 20472: thread(_Callable&& __f, _Args&&... __args) 20472: { 20472: static_assert( __is_invocable::type, 20472: typename decay<_Args>::type...>::value, 20472: "std::thread arguments must be invocable after conversion to rvalues" 20472: ); 20472: 20472: 20472: 20472: auto __depend = reinterpret_cast(&pthread_create); 20472: 20472: 20472: 20472: 20472: using _Invoker_type = _Invoker<__decayed_tuple<_Callable, _Args...>>; 20472: 20472: _M_start_thread(_S_make_state<_Invoker_type>( 20472: std::forward<_Callable>(__f), std::forward<_Args>(__args)...), 20472: __depend); 20472: } 20472: 20472: ~thread() 20472: { 20472: if (joinable()) 20472: std::terminate(); 20472: } 20472: 20472: thread(const thread&) = delete; 20472: 20472: thread(thread&& __t) noexcept 20472: { swap(__t); } 20472: 20472: thread& operator=(const thread&) = delete; 20472: 20472: thread& operator=(thread&& __t) noexcept 20472: { 20472: if (joinable()) 20472: std::terminate(); 20472: swap(__t); 20472: return *this; 20472: } 20472: 20472: void 20472: swap(thread& __t) noexcept 20472: { std::swap(_M_id, __t._M_id); } 20472: 20472: bool 20472: joinable() const noexcept 20472: { return !(_M_id == id()); } 20472: 20472: void 20472: join(); 20472: 20472: void 20472: detach(); 20472: 20472: id 20472: get_id() const noexcept 20472: { return _M_id; } 20472: 20472: 20472: 20472: native_handle_type 20472: native_handle() 20472: { return _M_id._M_thread; } 20472: 20472: 20472: static unsigned int 20472: hardware_concurrency() noexcept; 20472: 20472: private: 20472: template 20472: struct _State_impl : public _State 20472: { 20472: _Callable _M_func; 20472: 20472: template 20472: _State_impl(_Args&&... __args) 20472: : _M_func{{std::forward<_Args>(__args)...}} 20472: { } 20472: 20472: void 20472: _M_run() { _M_func(); } 20472: }; 20472: 20472: void 20472: _M_start_thread(_State_ptr, void (*)()); 20472: 20472: template 20472: static _State_ptr 20472: _S_make_state(_Args&&... __args) 20472: { 20472: using _Impl = _State_impl<_Callable>; 20472: return _State_ptr{new _Impl{std::forward<_Args>(__args)...}}; 20472: } 20472: # 247 "/usr/include/c++/10/thread" 3 20472: private: 20472: 20472: template 20472: struct _Invoker 20472: { 20472: _Tuple _M_t; 20472: 20472: template 20472: struct __result; 20472: template 20472: struct __result> 20472: : __invoke_result<_Fn, _Args...> 20472: { }; 20472: 20472: template 20472: typename __result<_Tuple>::type 20472: _M_invoke(_Index_tuple<_Ind...>) 20472: { return std::__invoke(std::get<_Ind>(std::move(_M_t))...); } 20472: 20472: typename __result<_Tuple>::type 20472: operator()() 20472: { 20472: using _Indices 20472: = typename _Build_index_tuple::value>::__type; 20472: return _M_invoke(_Indices()); 20472: } 20472: }; 20472: 20472: template 20472: using __decayed_tuple = tuple::type...>; 20472: 20472: public: 20472: 20472: 20472: template 20472: static _Invoker<__decayed_tuple<_Callable, _Args...>> 20472: __make_invoker(_Callable&& __callable, _Args&&... __args) 20472: { 20472: return { __decayed_tuple<_Callable, _Args...>{ 20472: std::forward<_Callable>(__callable), std::forward<_Args>(__args)... 20472: } }; 20472: } 20472: }; 20472: 20472: inline void 20472: swap(thread& __x, thread& __y) noexcept 20472: { __x.swap(__y); } 20472: 20472: inline bool 20472: operator==(thread::id __x, thread::id __y) noexcept 20472: { 20472: 20472: 20472: 20472: 20472: return __x._M_thread == __y._M_thread; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: inline bool 20472: operator!=(thread::id __x, thread::id __y) noexcept 20472: { return !(__x == __y); } 20472: 20472: inline bool 20472: operator<(thread::id __x, thread::id __y) noexcept 20472: { 20472: 20472: 20472: return __x._M_thread < __y._M_thread; 20472: } 20472: 20472: inline bool 20472: operator<=(thread::id __x, thread::id __y) noexcept 20472: { return !(__y < __x); } 20472: 20472: inline bool 20472: operator>(thread::id __x, thread::id __y) noexcept 20472: { return __y < __x; } 20472: 20472: inline bool 20472: operator>=(thread::id __x, thread::id __y) noexcept 20472: { return !(__x < __y); } 20472: 20472: 20472: 20472: 20472: template<> 20472: struct hash 20472: : public __hash_base 20472: { 20472: size_t 20472: operator()(const thread::id& __id) const noexcept 20472: { return std::_Hash_impl::hash(__id._M_thread); } 20472: }; 20472: 20472: template 20472: inline basic_ostream<_CharT, _Traits>& 20472: operator<<(basic_ostream<_CharT, _Traits>& __out, thread::id __id) 20472: { 20472: if (__id == thread::id()) 20472: return __out << "thread::id of a non-executing thread"; 20472: else 20472: return __out << __id._M_thread; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: namespace this_thread 20472: { 20472: 20472: inline thread::id 20472: get_id() noexcept 20472: { 20472: 20472: return thread::id(pthread_self()); 20472: 20472: 20472: 20472: } 20472: 20472: 20472: inline void 20472: yield() noexcept 20472: { 20472: 20472: __gthread_yield(); 20472: 20472: } 20472: 20472: void 20472: __sleep_for(chrono::seconds, chrono::nanoseconds); 20472: 20472: 20472: template 20472: inline void 20472: sleep_for(const chrono::duration<_Rep, _Period>& __rtime) 20472: { 20472: if (__rtime <= __rtime.zero()) 20472: return; 20472: auto __s = chrono::duration_cast(__rtime); 20472: auto __ns = chrono::duration_cast(__rtime - __s); 20472: 20472: __gthread_time_t __ts = 20472: { 20472: static_cast(__s.count()), 20472: static_cast(__ns.count()) 20472: }; 20472: while (::nanosleep(&__ts, &__ts) == -1 && (*__errno_location ()) == 4) 20472: { } 20472: 20472: 20472: 20472: } 20472: 20472: 20472: template 20472: inline void 20472: sleep_until(const chrono::time_point<_Clock, _Duration>& __atime) 20472: { 20472: 20472: 20472: 20472: auto __now = _Clock::now(); 20472: if (_Clock::is_steady) 20472: { 20472: if (__now < __atime) 20472: sleep_for(__atime - __now); 20472: return; 20472: } 20472: while (__now < __atime) 20472: { 20472: sleep_for(__atime - __now); 20472: __now = _Clock::now(); 20472: } 20472: } 20472: } 20472: # 565 "/usr/include/c++/10/thread" 3 20472: 20472: } 20472: # 15 "./port/port_posix.h" 2 20472: # 88 "./port/port_posix.h" 20472: 20472: # 88 "./port/port_posix.h" 20472: namespace rocksdb { 20472: 20472: extern const bool kDefaultToAdaptiveMutex; 20472: 20472: namespace port { 20472: 20472: 20472: const uint32_t kMaxUint32 = std::numeric_limits::max(); 20472: const int kMaxInt32 = std::numeric_limits::max(); 20472: const int kMinInt32 = std::numeric_limits::min(); 20472: const uint64_t kMaxUint64 = std::numeric_limits::max(); 20472: const int64_t kMaxInt64 = std::numeric_limits::max(); 20472: const int64_t kMinInt64 = std::numeric_limits::min(); 20472: const size_t kMaxSizet = std::numeric_limits::max(); 20472: 20472: constexpr bool kLittleEndian = ( 20472: # 103 "./port/port_posix.h" 3 4 20472: 1234 20472: # 103 "./port/port_posix.h" 20472: == 20472: # 103 "./port/port_posix.h" 3 4 20472: 1234 20472: # 103 "./port/port_posix.h" 20472: ); 20472: 20472: 20472: class CondVar; 20472: 20472: class Mutex { 20472: public: 20472: explicit Mutex(bool adaptive = kDefaultToAdaptiveMutex); 20472: 20472: Mutex(const Mutex&) = delete; 20472: void operator=(const Mutex&) = delete; 20472: 20472: ~Mutex(); 20472: 20472: void Lock(); 20472: void Unlock(); 20472: 20472: 20472: void AssertHeld(); 20472: 20472: private: 20472: friend class CondVar; 20472: pthread_mutex_t mu_; 20472: 20472: bool locked_ = false; 20472: 20472: }; 20472: 20472: class RWMutex { 20472: public: 20472: RWMutex(); 20472: 20472: RWMutex(const RWMutex&) = delete; 20472: void operator=(const RWMutex&) = delete; 20472: 20472: ~RWMutex(); 20472: 20472: void ReadLock(); 20472: void WriteLock(); 20472: void ReadUnlock(); 20472: void WriteUnlock(); 20472: void AssertHeld() { } 20472: 20472: private: 20472: pthread_rwlock_t mu_; 20472: }; 20472: 20472: class CondVar { 20472: public: 20472: explicit CondVar(Mutex* mu); 20472: ~CondVar(); 20472: void Wait(); 20472: 20472: bool TimedWait(uint64_t abs_time_us); 20472: void Signal(); 20472: void SignalAll(); 20472: private: 20472: pthread_cond_t cv_; 20472: Mutex* mu_; 20472: }; 20472: 20472: using Thread = std::thread; 20472: 20472: static inline void AsmVolatilePause() { 20472: # 175 "./port/port_posix.h" 20472: } 20472: 20472: 20472: extern int PhysicalCoreID(); 20472: 20472: typedef pthread_once_t OnceType; 20472: 20472: extern void InitOnce(OnceType* once, void (*initializer)()); 20472: # 203 "./port/port_posix.h" 20472: static_assert((64U & (64U - 1)) == 0, 20472: "Cache line size must be a power of 2 number of bytes"); 20472: 20472: extern void *cacheline_aligned_alloc(size_t size); 20472: 20472: extern void cacheline_aligned_free(void *memblock); 20472: 20472: 20472: 20472: extern void Crash(const std::string& srcfile, int srcline); 20472: 20472: extern int GetMaxOpenFiles(); 20472: 20472: extern const size_t kPageSize; 20472: 20472: using ThreadId = pid_t; 20472: 20472: extern void SetCpuPriority(ThreadId id, CpuPriority priority); 20472: 20472: } 20472: } 20472: # 19 "./port/port.h" 2 20472: # 9 "./monitoring/perf_level_imp.h" 2 20472: 20472: namespace rocksdb { 20472: 20472: 20472: extern __thread PerfLevel perf_level; 20472: 20472: 20472: 20472: 20472: } 20472: # 8 "./monitoring/perf_step_timer.h" 2 20472: 20472: # 1 "./util/stop_watch.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "./monitoring/statistics.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "./monitoring/histogram.h" 1 20472: # 10 "./monitoring/histogram.h" 20472: 20472: 20472: 20472: # 1 "/usr/include/c++/10/cassert" 1 3 20472: # 41 "/usr/include/c++/10/cassert" 3 20472: 20472: # 42 "/usr/include/c++/10/cassert" 3 20472: 20472: 20472: # 1 "/usr/include/assert.h" 1 3 4 20472: # 45 "/usr/include/c++/10/cassert" 2 3 20472: # 14 "./monitoring/histogram.h" 2 20472: 20472: 20472: 20472: # 1 "/usr/include/c++/10/mutex" 1 3 20472: # 32 "/usr/include/c++/10/mutex" 3 20472: 20472: # 33 "/usr/include/c++/10/mutex" 3 20472: # 42 "/usr/include/c++/10/mutex" 3 20472: # 1 "/usr/include/c++/10/system_error" 1 3 20472: # 32 "/usr/include/c++/10/system_error" 3 20472: 20472: # 33 "/usr/include/c++/10/system_error" 3 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "/usr/include/arm-linux-gnueabihf/c++/10/bits/error_constants.h" 1 3 20472: # 34 "/usr/include/arm-linux-gnueabihf/c++/10/bits/error_constants.h" 3 20472: # 1 "/usr/include/c++/10/cerrno" 1 3 20472: # 39 "/usr/include/c++/10/cerrno" 3 20472: 20472: # 40 "/usr/include/c++/10/cerrno" 3 20472: # 35 "/usr/include/arm-linux-gnueabihf/c++/10/bits/error_constants.h" 2 3 20472: 20472: 20472: # 36 "/usr/include/arm-linux-gnueabihf/c++/10/bits/error_constants.h" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: enum class errc 20472: { 20472: address_family_not_supported = 97, 20472: address_in_use = 98, 20472: address_not_available = 99, 20472: already_connected = 106, 20472: argument_list_too_long = 7, 20472: argument_out_of_domain = 33, 20472: bad_address = 14, 20472: bad_file_descriptor = 9, 20472: 20472: 20472: bad_message = 74, 20472: 20472: 20472: broken_pipe = 32, 20472: connection_aborted = 103, 20472: connection_already_in_progress = 114, 20472: connection_refused = 111, 20472: connection_reset = 104, 20472: cross_device_link = 18, 20472: destination_address_required = 89, 20472: device_or_resource_busy = 16, 20472: directory_not_empty = 39, 20472: executable_format_error = 8, 20472: file_exists = 17, 20472: file_too_large = 27, 20472: filename_too_long = 36, 20472: function_not_supported = 38, 20472: host_unreachable = 113, 20472: 20472: 20472: identifier_removed = 43, 20472: 20472: 20472: illegal_byte_sequence = 84, 20472: inappropriate_io_control_operation = 25, 20472: interrupted = 4, 20472: invalid_argument = 22, 20472: invalid_seek = 29, 20472: io_error = 5, 20472: is_a_directory = 21, 20472: message_size = 90, 20472: network_down = 100, 20472: network_reset = 102, 20472: network_unreachable = 101, 20472: no_buffer_space = 105, 20472: no_child_process = 10, 20472: 20472: 20472: no_link = 67, 20472: 20472: 20472: no_lock_available = 37, 20472: 20472: 20472: no_message_available = 61, 20472: 20472: 20472: no_message = 42, 20472: no_protocol_option = 92, 20472: no_space_on_device = 28, 20472: 20472: 20472: no_stream_resources = 63, 20472: 20472: 20472: no_such_device_or_address = 6, 20472: no_such_device = 19, 20472: no_such_file_or_directory = 2, 20472: no_such_process = 3, 20472: not_a_directory = 20, 20472: not_a_socket = 88, 20472: 20472: 20472: not_a_stream = 60, 20472: 20472: 20472: not_connected = 107, 20472: not_enough_memory = 12, 20472: 20472: 20472: not_supported = 95, 20472: 20472: 20472: 20472: operation_canceled = 125, 20472: 20472: 20472: operation_in_progress = 115, 20472: operation_not_permitted = 1, 20472: operation_not_supported = 95, 20472: operation_would_block = 11, 20472: 20472: 20472: owner_dead = 130, 20472: 20472: 20472: permission_denied = 13, 20472: 20472: 20472: protocol_error = 71, 20472: 20472: 20472: protocol_not_supported = 93, 20472: read_only_file_system = 30, 20472: resource_deadlock_would_occur = 35, 20472: resource_unavailable_try_again = 11, 20472: result_out_of_range = 34, 20472: 20472: 20472: state_not_recoverable = 131, 20472: 20472: 20472: 20472: stream_timeout = 62, 20472: 20472: 20472: 20472: text_file_busy = 26, 20472: 20472: 20472: timed_out = 110, 20472: too_many_files_open_in_system = 23, 20472: too_many_files_open = 24, 20472: too_many_links = 31, 20472: too_many_symbolic_link_levels = 40, 20472: 20472: 20472: value_too_large = 75, 20472: 20472: 20472: wrong_protocol_type = 91 20472: }; 20472: 20472: 20472: } 20472: # 40 "/usr/include/c++/10/system_error" 2 3 20472: 20472: 20472: 20472: 20472: 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: class error_code; 20472: class error_condition; 20472: class system_error; 20472: 20472: 20472: template 20472: struct is_error_code_enum : public false_type { }; 20472: 20472: 20472: template 20472: struct is_error_condition_enum : public false_type { }; 20472: 20472: template<> 20472: struct is_error_condition_enum 20472: : public true_type { }; 20472: # 78 "/usr/include/c++/10/system_error" 3 20472: inline namespace _V2 { 20472: # 89 "/usr/include/c++/10/system_error" 3 20472: class error_category 20472: { 20472: public: 20472: constexpr error_category() noexcept = default; 20472: 20472: virtual ~error_category(); 20472: 20472: error_category(const error_category&) = delete; 20472: error_category& operator=(const error_category&) = delete; 20472: 20472: virtual const char* 20472: name() const noexcept = 0; 20472: 20472: 20472: 20472: 20472: 20472: 20472: private: 20472: __attribute ((__abi_tag__ ("cxx11"))) 20472: virtual __cow_string 20472: _M_message(int) const; 20472: 20472: public: 20472: __attribute ((__abi_tag__ ("cxx11"))) 20472: virtual string 20472: message(int) const = 0; 20472: # 125 "/usr/include/c++/10/system_error" 3 20472: public: 20472: virtual error_condition 20472: default_error_condition(int __i) const noexcept; 20472: 20472: virtual bool 20472: equivalent(int __i, const error_condition& __cond) const noexcept; 20472: 20472: virtual bool 20472: equivalent(const error_code& __code, int __i) const noexcept; 20472: 20472: bool 20472: operator==(const error_category& __other) const noexcept 20472: { return this == &__other; } 20472: 20472: 20472: 20472: 20472: 20472: 20472: bool 20472: operator!=(const error_category& __other) const noexcept 20472: { return this != &__other; } 20472: 20472: bool 20472: operator<(const error_category& __other) const noexcept 20472: { return less()(this, &__other); } 20472: 20472: }; 20472: 20472: 20472: 20472: 20472: __attribute__ ((__const__)) const error_category& generic_category() noexcept; 20472: 20472: 20472: __attribute__ ((__const__)) const error_category& system_category() noexcept; 20472: 20472: } 20472: 20472: error_code make_error_code(errc) noexcept; 20472: # 180 "/usr/include/c++/10/system_error" 3 20472: struct error_code 20472: { 20472: error_code() noexcept 20472: : _M_value(0), _M_cat(&system_category()) { } 20472: 20472: error_code(int __v, const error_category& __cat) noexcept 20472: : _M_value(__v), _M_cat(&__cat) { } 20472: 20472: template::value>::type> 20472: error_code(_ErrorCodeEnum __e) noexcept 20472: { *this = make_error_code(__e); } 20472: 20472: void 20472: assign(int __v, const error_category& __cat) noexcept 20472: { 20472: _M_value = __v; 20472: _M_cat = &__cat; 20472: } 20472: 20472: void 20472: clear() noexcept 20472: { assign(0, system_category()); } 20472: 20472: 20472: template 20472: typename enable_if::value, 20472: error_code&>::type 20472: operator=(_ErrorCodeEnum __e) noexcept 20472: { return *this = make_error_code(__e); } 20472: 20472: int 20472: value() const noexcept { return _M_value; } 20472: 20472: const error_category& 20472: category() const noexcept { return *_M_cat; } 20472: 20472: error_condition 20472: default_error_condition() const noexcept; 20472: 20472: __attribute ((__abi_tag__ ("cxx11"))) 20472: string 20472: message() const 20472: { return category().message(value()); } 20472: 20472: explicit operator bool() const noexcept 20472: { return _M_value != 0; } 20472: 20472: 20472: private: 20472: int _M_value; 20472: const error_category* _M_cat; 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: inline error_code 20472: make_error_code(errc __e) noexcept 20472: { return error_code(static_cast(__e), generic_category()); } 20472: # 251 "/usr/include/c++/10/system_error" 3 20472: inline bool 20472: operator<(const error_code& __lhs, const error_code& __rhs) noexcept 20472: { 20472: return (__lhs.category() < __rhs.category() 20472: || (__lhs.category() == __rhs.category() 20472: && __lhs.value() < __rhs.value())); 20472: } 20472: 20472: 20472: template 20472: basic_ostream<_CharT, _Traits>& 20472: operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e) 20472: { return (__os << __e.category().name() << ':' << __e.value()); } 20472: 20472: 20472: 20472: error_condition make_error_condition(errc) noexcept; 20472: # 278 "/usr/include/c++/10/system_error" 3 20472: struct error_condition 20472: { 20472: error_condition() noexcept 20472: : _M_value(0), _M_cat(&generic_category()) { } 20472: 20472: error_condition(int __v, const error_category& __cat) noexcept 20472: : _M_value(__v), _M_cat(&__cat) { } 20472: 20472: template::value>::type> 20472: error_condition(_ErrorConditionEnum __e) noexcept 20472: { *this = make_error_condition(__e); } 20472: 20472: void 20472: assign(int __v, const error_category& __cat) noexcept 20472: { 20472: _M_value = __v; 20472: _M_cat = &__cat; 20472: } 20472: 20472: 20472: template 20472: typename enable_if::value, error_condition&>::type 20472: operator=(_ErrorConditionEnum __e) noexcept 20472: { return *this = make_error_condition(__e); } 20472: 20472: void 20472: clear() noexcept 20472: { assign(0, generic_category()); } 20472: 20472: 20472: int 20472: value() const noexcept { return _M_value; } 20472: 20472: const error_category& 20472: category() const noexcept { return *_M_cat; } 20472: 20472: __attribute ((__abi_tag__ ("cxx11"))) 20472: string 20472: message() const 20472: { return category().message(value()); } 20472: 20472: explicit operator bool() const noexcept 20472: { return _M_value != 0; } 20472: 20472: 20472: private: 20472: int _M_value; 20472: const error_category* _M_cat; 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: inline error_condition 20472: make_error_condition(errc __e) noexcept 20472: { return error_condition(static_cast(__e), generic_category()); } 20472: 20472: 20472: 20472: 20472: inline bool 20472: operator==(const error_code& __lhs, const error_code& __rhs) noexcept 20472: { return (__lhs.category() == __rhs.category() 20472: && __lhs.value() == __rhs.value()); } 20472: 20472: 20472: 20472: inline bool 20472: operator==(const error_code& __lhs, const error_condition& __rhs) noexcept 20472: { 20472: return (__lhs.category().equivalent(__lhs.value(), __rhs) 20472: || __rhs.category().equivalent(__lhs, __rhs.value())); 20472: } 20472: 20472: 20472: inline bool 20472: operator==(const error_condition& __lhs, 20472: const error_condition& __rhs) noexcept 20472: { 20472: return (__lhs.category() == __rhs.category() 20472: && __lhs.value() == __rhs.value()); 20472: } 20472: # 378 "/usr/include/c++/10/system_error" 3 20472: inline bool 20472: operator<(const error_condition& __lhs, 20472: const error_condition& __rhs) noexcept 20472: { 20472: return (__lhs.category() < __rhs.category() 20472: || (__lhs.category() == __rhs.category() 20472: && __lhs.value() < __rhs.value())); 20472: } 20472: 20472: 20472: 20472: inline bool 20472: operator==(const error_condition& __lhs, const error_code& __rhs) noexcept 20472: { 20472: return (__rhs.category().equivalent(__rhs.value(), __lhs) 20472: || __lhs.category().equivalent(__rhs, __lhs.value())); 20472: } 20472: 20472: 20472: inline bool 20472: operator!=(const error_code& __lhs, const error_code& __rhs) noexcept 20472: { return !(__lhs == __rhs); } 20472: 20472: 20472: 20472: inline bool 20472: operator!=(const error_code& __lhs, const error_condition& __rhs) noexcept 20472: { return !(__lhs == __rhs); } 20472: 20472: 20472: 20472: inline bool 20472: operator!=(const error_condition& __lhs, const error_code& __rhs) noexcept 20472: { return !(__lhs == __rhs); } 20472: 20472: 20472: inline bool 20472: operator!=(const error_condition& __lhs, 20472: const error_condition& __rhs) noexcept 20472: { return !(__lhs == __rhs); } 20472: # 428 "/usr/include/c++/10/system_error" 3 20472: class system_error : public std::runtime_error 20472: { 20472: private: 20472: error_code _M_code; 20472: 20472: public: 20472: system_error(error_code __ec = error_code()) 20472: : runtime_error(__ec.message()), _M_code(__ec) { } 20472: 20472: system_error(error_code __ec, const string& __what) 20472: : runtime_error(__what + ": " + __ec.message()), _M_code(__ec) { } 20472: 20472: system_error(error_code __ec, const char* __what) 20472: : runtime_error(__what + (": " + __ec.message())), _M_code(__ec) { } 20472: 20472: system_error(int __v, const error_category& __ecat, const char* __what) 20472: : system_error(error_code(__v, __ecat), __what) { } 20472: 20472: system_error(int __v, const error_category& __ecat) 20472: : runtime_error(error_code(__v, __ecat).message()), 20472: _M_code(__v, __ecat) { } 20472: 20472: system_error(int __v, const error_category& __ecat, const string& __what) 20472: : runtime_error(__what + ": " + error_code(__v, __ecat).message()), 20472: _M_code(__v, __ecat) { } 20472: 20472: 20472: system_error (const system_error &) = default; 20472: system_error &operator= (const system_error &) = default; 20472: 20472: 20472: virtual ~system_error() noexcept; 20472: 20472: const error_code& 20472: code() const noexcept { return _M_code; } 20472: }; 20472: 20472: 20472: } 20472: 20472: 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: template<> 20472: struct hash 20472: : public __hash_base 20472: { 20472: size_t 20472: operator()(const error_code& __e) const noexcept 20472: { 20472: const size_t __tmp = std::_Hash_impl::hash(__e.value()); 20472: return std::_Hash_impl::__hash_combine(&__e.category(), __tmp); 20472: } 20472: }; 20472: # 508 "/usr/include/c++/10/system_error" 3 20472: 20472: } 20472: # 43 "/usr/include/c++/10/mutex" 2 3 20472: # 1 "/usr/include/c++/10/bits/std_mutex.h" 1 3 20472: # 33 "/usr/include/c++/10/bits/std_mutex.h" 3 20472: 20472: # 34 "/usr/include/c++/10/bits/std_mutex.h" 3 20472: # 43 "/usr/include/c++/10/bits/std_mutex.h" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: # 57 "/usr/include/c++/10/bits/std_mutex.h" 3 20472: class __mutex_base 20472: { 20472: protected: 20472: typedef __gthread_mutex_t __native_type; 20472: 20472: 20472: __native_type _M_mutex = { { 0, 0, 0, PTHREAD_MUTEX_TIMED_NP, 0, { 0 } } }; 20472: 20472: constexpr __mutex_base() noexcept = default; 20472: # 78 "/usr/include/c++/10/bits/std_mutex.h" 3 20472: __mutex_base(const __mutex_base&) = delete; 20472: __mutex_base& operator=(const __mutex_base&) = delete; 20472: }; 20472: 20472: 20472: class mutex : private __mutex_base 20472: { 20472: public: 20472: typedef __native_type* native_handle_type; 20472: 20472: 20472: constexpr 20472: 20472: mutex() noexcept = default; 20472: ~mutex() = default; 20472: 20472: mutex(const mutex&) = delete; 20472: mutex& operator=(const mutex&) = delete; 20472: 20472: void 20472: lock() 20472: { 20472: int __e = __gthread_mutex_lock(&_M_mutex); 20472: 20472: 20472: if (__e) 20472: __throw_system_error(__e); 20472: } 20472: 20472: bool 20472: try_lock() noexcept 20472: { 20472: 20472: return !__gthread_mutex_trylock(&_M_mutex); 20472: } 20472: 20472: void 20472: unlock() 20472: { 20472: 20472: __gthread_mutex_unlock(&_M_mutex); 20472: } 20472: 20472: native_handle_type 20472: native_handle() noexcept 20472: { return &_M_mutex; } 20472: }; 20472: 20472: 20472: 20472: 20472: struct defer_lock_t { explicit defer_lock_t() = default; }; 20472: 20472: 20472: struct try_to_lock_t { explicit try_to_lock_t() = default; }; 20472: 20472: 20472: 20472: struct adopt_lock_t { explicit adopt_lock_t() = default; }; 20472: 20472: 20472: constexpr defer_lock_t defer_lock { }; 20472: 20472: 20472: constexpr try_to_lock_t try_to_lock { }; 20472: 20472: 20472: constexpr adopt_lock_t adopt_lock { }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: class lock_guard 20472: { 20472: public: 20472: typedef _Mutex mutex_type; 20472: 20472: explicit lock_guard(mutex_type& __m) : _M_device(__m) 20472: { _M_device.lock(); } 20472: 20472: lock_guard(mutex_type& __m, adopt_lock_t) noexcept : _M_device(__m) 20472: { } 20472: 20472: ~lock_guard() 20472: { _M_device.unlock(); } 20472: 20472: lock_guard(const lock_guard&) = delete; 20472: lock_guard& operator=(const lock_guard&) = delete; 20472: 20472: private: 20472: mutex_type& _M_device; 20472: }; 20472: 20472: 20472: 20472: } 20472: # 44 "/usr/include/c++/10/mutex" 2 3 20472: # 1 "/usr/include/c++/10/bits/unique_lock.h" 1 3 20472: # 33 "/usr/include/c++/10/bits/unique_lock.h" 3 20472: 20472: # 34 "/usr/include/c++/10/bits/unique_lock.h" 3 20472: # 42 "/usr/include/c++/10/bits/unique_lock.h" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: # 55 "/usr/include/c++/10/bits/unique_lock.h" 3 20472: template 20472: class unique_lock 20472: { 20472: public: 20472: typedef _Mutex mutex_type; 20472: 20472: unique_lock() noexcept 20472: : _M_device(0), _M_owns(false) 20472: { } 20472: 20472: explicit unique_lock(mutex_type& __m) 20472: : _M_device(std::__addressof(__m)), _M_owns(false) 20472: { 20472: lock(); 20472: _M_owns = true; 20472: } 20472: 20472: unique_lock(mutex_type& __m, defer_lock_t) noexcept 20472: : _M_device(std::__addressof(__m)), _M_owns(false) 20472: { } 20472: 20472: unique_lock(mutex_type& __m, try_to_lock_t) 20472: : _M_device(std::__addressof(__m)), _M_owns(_M_device->try_lock()) 20472: { } 20472: 20472: unique_lock(mutex_type& __m, adopt_lock_t) noexcept 20472: : _M_device(std::__addressof(__m)), _M_owns(true) 20472: { 20472: 20472: } 20472: 20472: template 20472: unique_lock(mutex_type& __m, 20472: const chrono::time_point<_Clock, _Duration>& __atime) 20472: : _M_device(std::__addressof(__m)), 20472: _M_owns(_M_device->try_lock_until(__atime)) 20472: { } 20472: 20472: template 20472: unique_lock(mutex_type& __m, 20472: const chrono::duration<_Rep, _Period>& __rtime) 20472: : _M_device(std::__addressof(__m)), 20472: _M_owns(_M_device->try_lock_for(__rtime)) 20472: { } 20472: 20472: ~unique_lock() 20472: { 20472: if (_M_owns) 20472: unlock(); 20472: } 20472: 20472: unique_lock(const unique_lock&) = delete; 20472: unique_lock& operator=(const unique_lock&) = delete; 20472: 20472: unique_lock(unique_lock&& __u) noexcept 20472: : _M_device(__u._M_device), _M_owns(__u._M_owns) 20472: { 20472: __u._M_device = 0; 20472: __u._M_owns = false; 20472: } 20472: 20472: unique_lock& operator=(unique_lock&& __u) noexcept 20472: { 20472: if(_M_owns) 20472: unlock(); 20472: 20472: unique_lock(std::move(__u)).swap(*this); 20472: 20472: __u._M_device = 0; 20472: __u._M_owns = false; 20472: 20472: return *this; 20472: } 20472: 20472: void 20472: lock() 20472: { 20472: if (!_M_device) 20472: __throw_system_error(int(errc::operation_not_permitted)); 20472: else if (_M_owns) 20472: __throw_system_error(int(errc::resource_deadlock_would_occur)); 20472: else 20472: { 20472: _M_device->lock(); 20472: _M_owns = true; 20472: } 20472: } 20472: 20472: bool 20472: try_lock() 20472: { 20472: if (!_M_device) 20472: __throw_system_error(int(errc::operation_not_permitted)); 20472: else if (_M_owns) 20472: __throw_system_error(int(errc::resource_deadlock_would_occur)); 20472: else 20472: { 20472: _M_owns = _M_device->try_lock(); 20472: return _M_owns; 20472: } 20472: } 20472: 20472: template 20472: bool 20472: try_lock_until(const chrono::time_point<_Clock, _Duration>& __atime) 20472: { 20472: if (!_M_device) 20472: __throw_system_error(int(errc::operation_not_permitted)); 20472: else if (_M_owns) 20472: __throw_system_error(int(errc::resource_deadlock_would_occur)); 20472: else 20472: { 20472: _M_owns = _M_device->try_lock_until(__atime); 20472: return _M_owns; 20472: } 20472: } 20472: 20472: template 20472: bool 20472: try_lock_for(const chrono::duration<_Rep, _Period>& __rtime) 20472: { 20472: if (!_M_device) 20472: __throw_system_error(int(errc::operation_not_permitted)); 20472: else if (_M_owns) 20472: __throw_system_error(int(errc::resource_deadlock_would_occur)); 20472: else 20472: { 20472: _M_owns = _M_device->try_lock_for(__rtime); 20472: return _M_owns; 20472: } 20472: } 20472: 20472: void 20472: unlock() 20472: { 20472: if (!_M_owns) 20472: __throw_system_error(int(errc::operation_not_permitted)); 20472: else if (_M_device) 20472: { 20472: _M_device->unlock(); 20472: _M_owns = false; 20472: } 20472: } 20472: 20472: void 20472: swap(unique_lock& __u) noexcept 20472: { 20472: std::swap(_M_device, __u._M_device); 20472: std::swap(_M_owns, __u._M_owns); 20472: } 20472: 20472: mutex_type* 20472: release() noexcept 20472: { 20472: mutex_type* __ret = _M_device; 20472: _M_device = 0; 20472: _M_owns = false; 20472: return __ret; 20472: } 20472: 20472: bool 20472: owns_lock() const noexcept 20472: { return _M_owns; } 20472: 20472: explicit operator bool() const noexcept 20472: { return owns_lock(); } 20472: 20472: mutex_type* 20472: mutex() const noexcept 20472: { return _M_device; } 20472: 20472: private: 20472: mutex_type* _M_device; 20472: bool _M_owns; 20472: }; 20472: 20472: 20472: 20472: template 20472: inline void 20472: swap(unique_lock<_Mutex>& __x, unique_lock<_Mutex>& __y) noexcept 20472: { __x.swap(__y); } 20472: 20472: 20472: } 20472: # 45 "/usr/include/c++/10/mutex" 2 3 20472: # 53 "/usr/include/c++/10/mutex" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: # 65 "/usr/include/c++/10/mutex" 3 20472: class __recursive_mutex_base 20472: { 20472: protected: 20472: typedef __gthread_recursive_mutex_t __native_type; 20472: 20472: __recursive_mutex_base(const __recursive_mutex_base&) = delete; 20472: __recursive_mutex_base& operator=(const __recursive_mutex_base&) = delete; 20472: 20472: 20472: __native_type _M_mutex = { { 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, 0, { 0 } } }; 20472: 20472: __recursive_mutex_base() = default; 20472: # 89 "/usr/include/c++/10/mutex" 3 20472: }; 20472: 20472: 20472: class recursive_mutex : private __recursive_mutex_base 20472: { 20472: public: 20472: typedef __native_type* native_handle_type; 20472: 20472: recursive_mutex() = default; 20472: ~recursive_mutex() = default; 20472: 20472: recursive_mutex(const recursive_mutex&) = delete; 20472: recursive_mutex& operator=(const recursive_mutex&) = delete; 20472: 20472: void 20472: lock() 20472: { 20472: int __e = __gthread_recursive_mutex_lock(&_M_mutex); 20472: 20472: 20472: if (__e) 20472: __throw_system_error(__e); 20472: } 20472: 20472: bool 20472: try_lock() noexcept 20472: { 20472: 20472: return !__gthread_recursive_mutex_trylock(&_M_mutex); 20472: } 20472: 20472: void 20472: unlock() 20472: { 20472: 20472: __gthread_recursive_mutex_unlock(&_M_mutex); 20472: } 20472: 20472: native_handle_type 20472: native_handle() noexcept 20472: { return &_M_mutex; } 20472: }; 20472: 20472: 20472: template 20472: class __timed_mutex_impl 20472: { 20472: protected: 20472: template 20472: bool 20472: _M_try_lock_for(const chrono::duration<_Rep, _Period>& __rtime) 20472: { 20472: 20472: using __clock = chrono::steady_clock; 20472: 20472: 20472: 20472: 20472: auto __rt = chrono::duration_cast<__clock::duration>(__rtime); 20472: if (ratio_greater<__clock::period, _Period>()) 20472: ++__rt; 20472: return _M_try_lock_until(__clock::now() + __rt); 20472: } 20472: 20472: template 20472: bool 20472: _M_try_lock_until(const chrono::time_point& __atime) 20472: { 20472: auto __s = chrono::time_point_cast(__atime); 20472: auto __ns = chrono::duration_cast(__atime - __s); 20472: 20472: __gthread_time_t __ts = { 20472: static_cast(__s.time_since_epoch().count()), 20472: static_cast(__ns.count()) 20472: }; 20472: 20472: return static_cast<_Derived*>(this)->_M_timedlock(__ts); 20472: } 20472: 20472: 20472: template 20472: bool 20472: _M_try_lock_until(const chrono::time_point& __atime) 20472: { 20472: auto __s = chrono::time_point_cast(__atime); 20472: auto __ns = chrono::duration_cast(__atime - __s); 20472: 20472: __gthread_time_t __ts = { 20472: static_cast(__s.time_since_epoch().count()), 20472: static_cast(__ns.count()) 20472: }; 20472: 20472: return static_cast<_Derived*>(this)->_M_clocklock(1, 20472: __ts); 20472: } 20472: 20472: 20472: template 20472: bool 20472: _M_try_lock_until(const chrono::time_point<_Clock, _Duration>& __atime) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: auto __now = _Clock::now(); 20472: do { 20472: auto __rtime = __atime - __now; 20472: if (_M_try_lock_for(__rtime)) 20472: return true; 20472: __now = _Clock::now(); 20472: } while (__atime > __now); 20472: return false; 20472: } 20472: }; 20472: 20472: 20472: class timed_mutex 20472: : private __mutex_base, public __timed_mutex_impl 20472: { 20472: public: 20472: typedef __native_type* native_handle_type; 20472: 20472: timed_mutex() = default; 20472: ~timed_mutex() = default; 20472: 20472: timed_mutex(const timed_mutex&) = delete; 20472: timed_mutex& operator=(const timed_mutex&) = delete; 20472: 20472: void 20472: lock() 20472: { 20472: int __e = __gthread_mutex_lock(&_M_mutex); 20472: 20472: 20472: if (__e) 20472: __throw_system_error(__e); 20472: } 20472: 20472: bool 20472: try_lock() noexcept 20472: { 20472: 20472: return !__gthread_mutex_trylock(&_M_mutex); 20472: } 20472: 20472: template 20472: bool 20472: try_lock_for(const chrono::duration<_Rep, _Period>& __rtime) 20472: { return _M_try_lock_for(__rtime); } 20472: 20472: template 20472: bool 20472: try_lock_until(const chrono::time_point<_Clock, _Duration>& __atime) 20472: { return _M_try_lock_until(__atime); } 20472: 20472: void 20472: unlock() 20472: { 20472: 20472: __gthread_mutex_unlock(&_M_mutex); 20472: } 20472: 20472: native_handle_type 20472: native_handle() noexcept 20472: { return &_M_mutex; } 20472: 20472: private: 20472: friend class __timed_mutex_impl; 20472: 20472: bool 20472: _M_timedlock(const __gthread_time_t& __ts) 20472: { return !__gthread_mutex_timedlock(&_M_mutex, &__ts); } 20472: 20472: 20472: bool 20472: _M_clocklock(clockid_t clockid, const __gthread_time_t& __ts) 20472: { return !pthread_mutex_clocklock(&_M_mutex, clockid, &__ts); } 20472: 20472: }; 20472: 20472: 20472: class recursive_timed_mutex 20472: : private __recursive_mutex_base, 20472: public __timed_mutex_impl 20472: { 20472: public: 20472: typedef __native_type* native_handle_type; 20472: 20472: recursive_timed_mutex() = default; 20472: ~recursive_timed_mutex() = default; 20472: 20472: recursive_timed_mutex(const recursive_timed_mutex&) = delete; 20472: recursive_timed_mutex& operator=(const recursive_timed_mutex&) = delete; 20472: 20472: void 20472: lock() 20472: { 20472: int __e = __gthread_recursive_mutex_lock(&_M_mutex); 20472: 20472: 20472: if (__e) 20472: __throw_system_error(__e); 20472: } 20472: 20472: bool 20472: try_lock() noexcept 20472: { 20472: 20472: return !__gthread_recursive_mutex_trylock(&_M_mutex); 20472: } 20472: 20472: template 20472: bool 20472: try_lock_for(const chrono::duration<_Rep, _Period>& __rtime) 20472: { return _M_try_lock_for(__rtime); } 20472: 20472: template 20472: bool 20472: try_lock_until(const chrono::time_point<_Clock, _Duration>& __atime) 20472: { return _M_try_lock_until(__atime); } 20472: 20472: void 20472: unlock() 20472: { 20472: 20472: __gthread_recursive_mutex_unlock(&_M_mutex); 20472: } 20472: 20472: native_handle_type 20472: native_handle() noexcept 20472: { return &_M_mutex; } 20472: 20472: private: 20472: friend class __timed_mutex_impl; 20472: 20472: bool 20472: _M_timedlock(const __gthread_time_t& __ts) 20472: { return !__gthread_recursive_mutex_timedlock(&_M_mutex, &__ts); } 20472: 20472: 20472: bool 20472: _M_clocklock(clockid_t clockid, const __gthread_time_t& __ts) 20472: { return !pthread_mutex_clocklock(&_M_mutex, clockid, &__ts); } 20472: 20472: }; 20472: # 513 "/usr/include/c++/10/mutex" 3 20472: template 20472: inline unique_lock<_Lock> 20472: __try_to_lock(_Lock& __l) 20472: { return unique_lock<_Lock>{__l, try_to_lock}; } 20472: 20472: template 20472: struct __try_lock_impl 20472: { 20472: template 20472: static void 20472: __do_try_lock(tuple<_Lock&...>& __locks, int& __idx) 20472: { 20472: __idx = _Idx; 20472: auto __lock = std::__try_to_lock(std::get<_Idx>(__locks)); 20472: if (__lock.owns_lock()) 20472: { 20472: constexpr bool __cont = _Idx + 2 < sizeof...(_Lock); 20472: using __try_locker = __try_lock_impl<_Idx + 1, __cont>; 20472: __try_locker::__do_try_lock(__locks, __idx); 20472: if (__idx == -1) 20472: __lock.release(); 20472: } 20472: } 20472: }; 20472: 20472: template 20472: struct __try_lock_impl<_Idx, false> 20472: { 20472: template 20472: static void 20472: __do_try_lock(tuple<_Lock&...>& __locks, int& __idx) 20472: { 20472: __idx = _Idx; 20472: auto __lock = std::__try_to_lock(std::get<_Idx>(__locks)); 20472: if (__lock.owns_lock()) 20472: { 20472: __idx = -1; 20472: __lock.release(); 20472: } 20472: } 20472: }; 20472: # 566 "/usr/include/c++/10/mutex" 3 20472: template 20472: int 20472: try_lock(_Lock1& __l1, _Lock2& __l2, _Lock3&... __l3) 20472: { 20472: int __idx; 20472: auto __locks = std::tie(__l1, __l2, __l3...); 20472: __try_lock_impl<0>::__do_try_lock(__locks, __idx); 20472: return __idx; 20472: } 20472: # 587 "/usr/include/c++/10/mutex" 3 20472: template 20472: void 20472: lock(_L1& __l1, _L2& __l2, _L3&... __l3) 20472: { 20472: while (true) 20472: { 20472: using __try_locker = __try_lock_impl<0, sizeof...(_L3) != 0>; 20472: unique_lock<_L1> __first(__l1); 20472: int __idx; 20472: auto __locks = std::tie(__l2, __l3...); 20472: __try_locker::__do_try_lock(__locks, __idx); 20472: if (__idx == -1) 20472: { 20472: __first.release(); 20472: return; 20472: } 20472: } 20472: } 20472: # 672 "/usr/include/c++/10/mutex" 3 20472: struct once_flag 20472: { 20472: private: 20472: typedef __gthread_once_t __native_type; 20472: __native_type _M_once = 0; 20472: 20472: public: 20472: 20472: constexpr once_flag() noexcept = default; 20472: 20472: 20472: once_flag(const once_flag&) = delete; 20472: 20472: once_flag& operator=(const once_flag&) = delete; 20472: 20472: template 20472: friend void 20472: call_once(once_flag& __once, _Callable&& __f, _Args&&... __args); 20472: }; 20472: 20472: 20472: 20472: extern __thread void* __once_callable; 20472: extern __thread void (*__once_call)(); 20472: # 706 "/usr/include/c++/10/mutex" 3 20472: extern "C" void __once_proxy(void); 20472: 20472: 20472: 20472: template 20472: void 20472: call_once(once_flag& __once, _Callable&& __f, _Args&&... __args) 20472: { 20472: 20472: 20472: auto __callable = [&] { 20472: std::__invoke(std::forward<_Callable>(__f), 20472: std::forward<_Args>(__args)...); 20472: }; 20472: 20472: __once_callable = std::__addressof(__callable); 20472: __once_call = []{ (*(decltype(__callable)*)__once_callable)(); }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: int __e = __gthread_once(&__once._M_once, &__once_proxy); 20472: # 742 "/usr/include/c++/10/mutex" 3 20472: if (__e) 20472: __throw_system_error(__e); 20472: } 20472: 20472: 20472: 20472: 20472: } 20472: # 18 "./monitoring/histogram.h" 2 20472: 20472: 20472: # 19 "./monitoring/histogram.h" 20472: namespace rocksdb { 20472: 20472: class HistogramBucketMapper { 20472: public: 20472: 20472: HistogramBucketMapper(); 20472: 20472: 20472: size_t IndexForValue(uint64_t value) const; 20472: 20472: 20472: size_t BucketCount() const { 20472: return bucketValues_.size(); 20472: } 20472: 20472: uint64_t LastValue() const { 20472: return maxBucketValue_; 20472: } 20472: 20472: uint64_t FirstValue() const { 20472: return minBucketValue_; 20472: } 20472: 20472: uint64_t BucketLimit(const size_t bucketNumber) const { 20472: 20472: # 43 "./monitoring/histogram.h" 3 4 20472: (static_cast ( 20472: # 43 "./monitoring/histogram.h" 20472: bucketNumber < BucketCount() 20472: # 43 "./monitoring/histogram.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 43 "./monitoring/histogram.h" 20472: "bucketNumber < BucketCount()" 20472: # 43 "./monitoring/histogram.h" 3 4 20472: , "./monitoring/histogram.h", 43, __extension__ __PRETTY_FUNCTION__)) 20472: # 43 "./monitoring/histogram.h" 20472: ; 20472: return bucketValues_[bucketNumber]; 20472: } 20472: 20472: private: 20472: std::vector bucketValues_; 20472: uint64_t maxBucketValue_; 20472: uint64_t minBucketValue_; 20472: std::map valueIndexMap_; 20472: }; 20472: 20472: struct HistogramStat { 20472: HistogramStat(); 20472: ~HistogramStat() {} 20472: 20472: HistogramStat(const HistogramStat&) = delete; 20472: HistogramStat& operator=(const HistogramStat&) = delete; 20472: 20472: void Clear(); 20472: bool Empty() const; 20472: void Add(uint64_t value); 20472: void Merge(const HistogramStat& other); 20472: 20472: inline uint64_t min() const { return min_.load(std::memory_order_relaxed); } 20472: inline uint64_t max() const { return max_.load(std::memory_order_relaxed); } 20472: inline uint64_t num() const { return num_.load(std::memory_order_relaxed); } 20472: inline uint64_t sum() const { return sum_.load(std::memory_order_relaxed); } 20472: inline uint64_t sum_squares() const { 20472: return sum_squares_.load(std::memory_order_relaxed); 20472: } 20472: inline uint64_t bucket_at(size_t b) const { 20472: return buckets_[b].load(std::memory_order_relaxed); 20472: } 20472: 20472: double Median() const; 20472: double Percentile(double p) const; 20472: double Average() const; 20472: double StandardDeviation() const; 20472: void Data(HistogramData* const data) const; 20472: std::string ToString() const; 20472: 20472: 20472: 20472: 20472: std::atomic_uint_fast64_t min_; 20472: std::atomic_uint_fast64_t max_; 20472: std::atomic_uint_fast64_t num_; 20472: std::atomic_uint_fast64_t sum_; 20472: std::atomic_uint_fast64_t sum_squares_; 20472: std::atomic_uint_fast64_t buckets_[109]; 20472: const uint64_t num_buckets_; 20472: }; 20472: 20472: class Histogram { 20472: public: 20472: Histogram() {} 20472: virtual ~Histogram() {}; 20472: 20472: virtual void Clear() = 0; 20472: virtual bool Empty() const = 0; 20472: virtual void Add(uint64_t value) = 0; 20472: virtual void Merge(const Histogram&) = 0; 20472: 20472: virtual std::string ToString() const = 0; 20472: virtual const char* Name() const = 0; 20472: virtual uint64_t min() const = 0; 20472: virtual uint64_t max() const = 0; 20472: virtual uint64_t num() const = 0; 20472: virtual double Median() const = 0; 20472: virtual double Percentile(double p) const = 0; 20472: virtual double Average() const = 0; 20472: virtual double StandardDeviation() const = 0; 20472: virtual void Data(HistogramData* const data) const = 0; 20472: }; 20472: 20472: class HistogramImpl : public Histogram { 20472: public: 20472: HistogramImpl() { Clear(); } 20472: 20472: HistogramImpl(const HistogramImpl&) = delete; 20472: HistogramImpl& operator=(const HistogramImpl&) = delete; 20472: 20472: virtual void Clear() override; 20472: virtual bool Empty() const override; 20472: virtual void Add(uint64_t value) override; 20472: virtual void Merge(const Histogram& other) override; 20472: void Merge(const HistogramImpl& other); 20472: 20472: virtual std::string ToString() const override; 20472: virtual const char* Name() const override { return "HistogramImpl"; } 20472: virtual uint64_t min() const override { return stats_.min(); } 20472: virtual uint64_t max() const override { return stats_.max(); } 20472: virtual uint64_t num() const override { return stats_.num(); } 20472: virtual double Median() const override; 20472: virtual double Percentile(double p) const override; 20472: virtual double Average() const override; 20472: virtual double StandardDeviation() const override; 20472: virtual void Data(HistogramData* const data) const override; 20472: 20472: virtual ~HistogramImpl() {} 20472: 20472: private: 20472: HistogramStat stats_; 20472: std::mutex mutex_; 20472: }; 20472: 20472: } 20472: # 15 "./monitoring/statistics.h" 2 20472: # 1 "./port/likely.h" 1 20472: # 10 "./port/likely.h" 20472: 20472: # 16 "./monitoring/statistics.h" 2 20472: 20472: # 1 "./util/core_local.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 15 "./util/core_local.h" 20472: # 1 "./util/random.h" 1 20472: # 10 "./util/random.h" 20472: 20472: 20472: 20472: # 1 "/usr/include/c++/10/random" 1 3 20472: # 32 "/usr/include/c++/10/random" 3 20472: 20472: # 33 "/usr/include/c++/10/random" 3 20472: 20472: 20472: 20472: 20472: 20472: # 1 "/usr/include/c++/10/cmath" 1 3 20472: # 39 "/usr/include/c++/10/cmath" 3 20472: 20472: # 40 "/usr/include/c++/10/cmath" 3 20472: 20472: 20472: 20472: 20472: 20472: # 1 "/usr/include/math.h" 1 3 4 20472: # 27 "/usr/include/math.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/libc-header-start.h" 1 3 4 20472: # 28 "/usr/include/math.h" 2 3 4 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 34 "/usr/include/math.h" 3 4 20472: extern "C" { 20472: 20472: 20472: 20472: 20472: 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/math-vector.h" 1 3 4 20472: # 27 "/usr/include/arm-linux-gnueabihf/bits/math-vector.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/libm-simd-decl-stubs.h" 1 3 4 20472: # 28 "/usr/include/arm-linux-gnueabihf/bits/math-vector.h" 2 3 4 20472: # 41 "/usr/include/math.h" 2 3 4 20472: 20472: 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/floatn.h" 1 3 4 20472: # 44 "/usr/include/math.h" 2 3 4 20472: # 138 "/usr/include/math.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/flt-eval-method.h" 1 3 4 20472: # 139 "/usr/include/math.h" 2 3 4 20472: # 149 "/usr/include/math.h" 3 4 20472: typedef float float_t; 20472: typedef double double_t; 20472: # 190 "/usr/include/math.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/fp-logb.h" 1 3 4 20472: # 191 "/usr/include/math.h" 2 3 4 20472: # 233 "/usr/include/math.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/fp-fast.h" 1 3 4 20472: # 234 "/usr/include/math.h" 2 3 4 20472: 20472: 20472: 20472: enum 20472: { 20472: FP_INT_UPWARD = 20472: 20472: 0, 20472: FP_INT_DOWNWARD = 20472: 20472: 1, 20472: FP_INT_TOWARDZERO = 20472: 20472: 2, 20472: FP_INT_TONEARESTFROMZERO = 20472: 20472: 3, 20472: FP_INT_TONEAREST = 20472: 20472: 4, 20472: }; 20472: # 289 "/usr/include/math.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/mathcalls-helper-functions.h" 1 3 4 20472: # 21 "/usr/include/arm-linux-gnueabihf/bits/mathcalls-helper-functions.h" 3 4 20472: extern int __fpclassify (double __value) throw () 20472: __attribute__ ((__const__)); 20472: 20472: 20472: extern int __signbit (double __value) throw () 20472: __attribute__ ((__const__)); 20472: 20472: 20472: 20472: extern int __isinf (double __value) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern int __finite (double __value) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern int __isnan (double __value) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern int __iseqsig (double __x, double __y) throw (); 20472: 20472: 20472: extern int __issignaling (double __value) throw () 20472: __attribute__ ((__const__)); 20472: # 290 "/usr/include/math.h" 2 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 1 3 4 20472: # 53 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 3 4 20472: extern double acos (double __x) throw (); extern double __acos (double __x) throw (); 20472: 20472: extern double asin (double __x) throw (); extern double __asin (double __x) throw (); 20472: 20472: extern double atan (double __x) throw (); extern double __atan (double __x) throw (); 20472: 20472: extern double atan2 (double __y, double __x) throw (); extern double __atan2 (double __y, double __x) throw (); 20472: 20472: 20472: extern double cos (double __x) throw (); extern double __cos (double __x) throw (); 20472: 20472: extern double sin (double __x) throw (); extern double __sin (double __x) throw (); 20472: 20472: extern double tan (double __x) throw (); extern double __tan (double __x) throw (); 20472: 20472: 20472: 20472: 20472: extern double cosh (double __x) throw (); extern double __cosh (double __x) throw (); 20472: 20472: extern double sinh (double __x) throw (); extern double __sinh (double __x) throw (); 20472: 20472: extern double tanh (double __x) throw (); extern double __tanh (double __x) throw (); 20472: 20472: 20472: 20472: extern void sincos (double __x, double *__sinx, double *__cosx) throw (); extern void __sincos (double __x, double *__sinx, double *__cosx) throw () 20472: ; 20472: 20472: 20472: 20472: 20472: extern double acosh (double __x) throw (); extern double __acosh (double __x) throw (); 20472: 20472: extern double asinh (double __x) throw (); extern double __asinh (double __x) throw (); 20472: 20472: extern double atanh (double __x) throw (); extern double __atanh (double __x) throw (); 20472: 20472: 20472: 20472: 20472: 20472: extern double exp (double __x) throw (); extern double __exp (double __x) throw (); 20472: 20472: 20472: extern double frexp (double __x, int *__exponent) throw (); extern double __frexp (double __x, int *__exponent) throw (); 20472: 20472: 20472: extern double ldexp (double __x, int __exponent) throw (); extern double __ldexp (double __x, int __exponent) throw (); 20472: 20472: 20472: extern double log (double __x) throw (); extern double __log (double __x) throw (); 20472: 20472: 20472: extern double log10 (double __x) throw (); extern double __log10 (double __x) throw (); 20472: 20472: 20472: extern double modf (double __x, double *__iptr) throw (); extern double __modf (double __x, double *__iptr) throw () __attribute__ ((__nonnull__ (2))); 20472: 20472: 20472: 20472: extern double exp10 (double __x) throw (); extern double __exp10 (double __x) throw (); 20472: 20472: 20472: 20472: 20472: extern double expm1 (double __x) throw (); extern double __expm1 (double __x) throw (); 20472: 20472: 20472: extern double log1p (double __x) throw (); extern double __log1p (double __x) throw (); 20472: 20472: 20472: extern double logb (double __x) throw (); extern double __logb (double __x) throw (); 20472: 20472: 20472: 20472: 20472: extern double exp2 (double __x) throw (); extern double __exp2 (double __x) throw (); 20472: 20472: 20472: extern double log2 (double __x) throw (); extern double __log2 (double __x) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern double pow (double __x, double __y) throw (); extern double __pow (double __x, double __y) throw (); 20472: 20472: 20472: extern double sqrt (double __x) throw (); extern double __sqrt (double __x) throw (); 20472: 20472: 20472: 20472: extern double hypot (double __x, double __y) throw (); extern double __hypot (double __x, double __y) throw (); 20472: 20472: 20472: 20472: 20472: extern double cbrt (double __x) throw (); extern double __cbrt (double __x) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern double ceil (double __x) throw () __attribute__ ((__const__)); extern double __ceil (double __x) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern double fabs (double __x) throw () __attribute__ ((__const__)); extern double __fabs (double __x) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern double floor (double __x) throw () __attribute__ ((__const__)); extern double __floor (double __x) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern double fmod (double __x, double __y) throw (); extern double __fmod (double __x, double __y) throw (); 20472: # 182 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 3 4 20472: extern int finite (double __value) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern double drem (double __x, double __y) throw (); extern double __drem (double __x, double __y) throw (); 20472: 20472: 20472: 20472: extern double significand (double __x) throw (); extern double __significand (double __x) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern double copysign (double __x, double __y) throw () __attribute__ ((__const__)); extern double __copysign (double __x, double __y) throw () __attribute__ ((__const__)); 20472: 20472: 20472: 20472: 20472: extern double nan (const char *__tagb) throw (); extern double __nan (const char *__tagb) throw (); 20472: # 217 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 3 4 20472: extern double j0 (double) throw (); extern double __j0 (double) throw (); 20472: extern double j1 (double) throw (); extern double __j1 (double) throw (); 20472: extern double jn (int, double) throw (); extern double __jn (int, double) throw (); 20472: extern double y0 (double) throw (); extern double __y0 (double) throw (); 20472: extern double y1 (double) throw (); extern double __y1 (double) throw (); 20472: extern double yn (int, double) throw (); extern double __yn (int, double) throw (); 20472: 20472: 20472: 20472: 20472: 20472: extern double erf (double) throw (); extern double __erf (double) throw (); 20472: extern double erfc (double) throw (); extern double __erfc (double) throw (); 20472: extern double lgamma (double) throw (); extern double __lgamma (double) throw (); 20472: 20472: 20472: 20472: 20472: extern double tgamma (double) throw (); extern double __tgamma (double) throw (); 20472: 20472: 20472: 20472: 20472: 20472: extern double gamma (double) throw (); extern double __gamma (double) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern double lgamma_r (double, int *__signgamp) throw (); extern double __lgamma_r (double, int *__signgamp) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern double rint (double __x) throw (); extern double __rint (double __x) throw (); 20472: 20472: 20472: extern double nextafter (double __x, double __y) throw (); extern double __nextafter (double __x, double __y) throw (); 20472: 20472: extern double nexttoward (double __x, long double __y) throw (); extern double __nexttoward (double __x, long double __y) throw (); 20472: 20472: 20472: 20472: 20472: extern double nextdown (double __x) throw (); extern double __nextdown (double __x) throw (); 20472: 20472: extern double nextup (double __x) throw (); extern double __nextup (double __x) throw (); 20472: 20472: 20472: 20472: extern double remainder (double __x, double __y) throw (); extern double __remainder (double __x, double __y) throw (); 20472: 20472: 20472: 20472: extern double scalbn (double __x, int __n) throw (); extern double __scalbn (double __x, int __n) throw (); 20472: 20472: 20472: 20472: extern int ilogb (double __x) throw (); extern int __ilogb (double __x) throw (); 20472: 20472: 20472: 20472: 20472: extern long int llogb (double __x) throw (); extern long int __llogb (double __x) throw (); 20472: 20472: 20472: 20472: 20472: extern double scalbln (double __x, long int __n) throw (); extern double __scalbln (double __x, long int __n) throw (); 20472: 20472: 20472: 20472: extern double nearbyint (double __x) throw (); extern double __nearbyint (double __x) throw (); 20472: 20472: 20472: 20472: extern double round (double __x) throw () __attribute__ ((__const__)); extern double __round (double __x) throw () __attribute__ ((__const__)); 20472: 20472: 20472: 20472: extern double trunc (double __x) throw () __attribute__ ((__const__)); extern double __trunc (double __x) throw () __attribute__ ((__const__)); 20472: 20472: 20472: 20472: 20472: extern double remquo (double __x, double __y, int *__quo) throw (); extern double __remquo (double __x, double __y, int *__quo) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern long int lrint (double __x) throw (); extern long int __lrint (double __x) throw (); 20472: __extension__ 20472: extern long long int llrint (double __x) throw (); extern long long int __llrint (double __x) throw (); 20472: 20472: 20472: 20472: extern long int lround (double __x) throw (); extern long int __lround (double __x) throw (); 20472: __extension__ 20472: extern long long int llround (double __x) throw (); extern long long int __llround (double __x) throw (); 20472: 20472: 20472: 20472: extern double fdim (double __x, double __y) throw (); extern double __fdim (double __x, double __y) throw (); 20472: 20472: 20472: extern double fmax (double __x, double __y) throw () __attribute__ ((__const__)); extern double __fmax (double __x, double __y) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern double fmin (double __x, double __y) throw () __attribute__ ((__const__)); extern double __fmin (double __x, double __y) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern double fma (double __x, double __y, double __z) throw (); extern double __fma (double __x, double __y, double __z) throw (); 20472: 20472: 20472: 20472: 20472: extern double roundeven (double __x) throw () __attribute__ ((__const__)); extern double __roundeven (double __x) throw () __attribute__ ((__const__)); 20472: 20472: 20472: 20472: extern __intmax_t fromfp (double __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfp (double __x, int __round, unsigned int __width) throw () 20472: ; 20472: 20472: 20472: 20472: extern __uintmax_t ufromfp (double __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfp (double __x, int __round, unsigned int __width) throw () 20472: ; 20472: 20472: 20472: 20472: 20472: extern __intmax_t fromfpx (double __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfpx (double __x, int __round, unsigned int __width) throw () 20472: ; 20472: 20472: 20472: 20472: 20472: extern __uintmax_t ufromfpx (double __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfpx (double __x, int __round, unsigned int __width) throw () 20472: ; 20472: 20472: 20472: extern double fmaxmag (double __x, double __y) throw () __attribute__ ((__const__)); extern double __fmaxmag (double __x, double __y) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern double fminmag (double __x, double __y) throw () __attribute__ ((__const__)); extern double __fminmag (double __x, double __y) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern int canonicalize (double *__cx, const double *__x) throw (); 20472: 20472: 20472: 20472: 20472: extern int totalorder (const double *__x, const double *__y) throw () 20472: 20472: __attribute__ ((__pure__)); 20472: 20472: 20472: extern int totalordermag (const double *__x, const double *__y) throw () 20472: 20472: __attribute__ ((__pure__)); 20472: 20472: 20472: extern double getpayload (const double *__x) throw (); extern double __getpayload (const double *__x) throw (); 20472: 20472: 20472: extern int setpayload (double *__x, double __payload) throw (); 20472: 20472: 20472: extern int setpayloadsig (double *__x, double __payload) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern double scalb (double __x, double __n) throw (); extern double __scalb (double __x, double __n) throw (); 20472: # 291 "/usr/include/math.h" 2 3 4 20472: # 306 "/usr/include/math.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/mathcalls-helper-functions.h" 1 3 4 20472: # 21 "/usr/include/arm-linux-gnueabihf/bits/mathcalls-helper-functions.h" 3 4 20472: extern int __fpclassifyf (float __value) throw () 20472: __attribute__ ((__const__)); 20472: 20472: 20472: extern int __signbitf (float __value) throw () 20472: __attribute__ ((__const__)); 20472: 20472: 20472: 20472: extern int __isinff (float __value) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern int __finitef (float __value) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern int __isnanf (float __value) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern int __iseqsigf (float __x, float __y) throw (); 20472: 20472: 20472: extern int __issignalingf (float __value) throw () 20472: __attribute__ ((__const__)); 20472: # 307 "/usr/include/math.h" 2 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 1 3 4 20472: # 53 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 3 4 20472: extern float acosf (float __x) throw (); extern float __acosf (float __x) throw (); 20472: 20472: extern float asinf (float __x) throw (); extern float __asinf (float __x) throw (); 20472: 20472: extern float atanf (float __x) throw (); extern float __atanf (float __x) throw (); 20472: 20472: extern float atan2f (float __y, float __x) throw (); extern float __atan2f (float __y, float __x) throw (); 20472: 20472: 20472: extern float cosf (float __x) throw (); extern float __cosf (float __x) throw (); 20472: 20472: extern float sinf (float __x) throw (); extern float __sinf (float __x) throw (); 20472: 20472: extern float tanf (float __x) throw (); extern float __tanf (float __x) throw (); 20472: 20472: 20472: 20472: 20472: extern float coshf (float __x) throw (); extern float __coshf (float __x) throw (); 20472: 20472: extern float sinhf (float __x) throw (); extern float __sinhf (float __x) throw (); 20472: 20472: extern float tanhf (float __x) throw (); extern float __tanhf (float __x) throw (); 20472: 20472: 20472: 20472: extern void sincosf (float __x, float *__sinx, float *__cosx) throw (); extern void __sincosf (float __x, float *__sinx, float *__cosx) throw () 20472: ; 20472: 20472: 20472: 20472: 20472: extern float acoshf (float __x) throw (); extern float __acoshf (float __x) throw (); 20472: 20472: extern float asinhf (float __x) throw (); extern float __asinhf (float __x) throw (); 20472: 20472: extern float atanhf (float __x) throw (); extern float __atanhf (float __x) throw (); 20472: 20472: 20472: 20472: 20472: 20472: extern float expf (float __x) throw (); extern float __expf (float __x) throw (); 20472: 20472: 20472: extern float frexpf (float __x, int *__exponent) throw (); extern float __frexpf (float __x, int *__exponent) throw (); 20472: 20472: 20472: extern float ldexpf (float __x, int __exponent) throw (); extern float __ldexpf (float __x, int __exponent) throw (); 20472: 20472: 20472: extern float logf (float __x) throw (); extern float __logf (float __x) throw (); 20472: 20472: 20472: extern float log10f (float __x) throw (); extern float __log10f (float __x) throw (); 20472: 20472: 20472: extern float modff (float __x, float *__iptr) throw (); extern float __modff (float __x, float *__iptr) throw () __attribute__ ((__nonnull__ (2))); 20472: 20472: 20472: 20472: extern float exp10f (float __x) throw (); extern float __exp10f (float __x) throw (); 20472: 20472: 20472: 20472: 20472: extern float expm1f (float __x) throw (); extern float __expm1f (float __x) throw (); 20472: 20472: 20472: extern float log1pf (float __x) throw (); extern float __log1pf (float __x) throw (); 20472: 20472: 20472: extern float logbf (float __x) throw (); extern float __logbf (float __x) throw (); 20472: 20472: 20472: 20472: 20472: extern float exp2f (float __x) throw (); extern float __exp2f (float __x) throw (); 20472: 20472: 20472: extern float log2f (float __x) throw (); extern float __log2f (float __x) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern float powf (float __x, float __y) throw (); extern float __powf (float __x, float __y) throw (); 20472: 20472: 20472: extern float sqrtf (float __x) throw (); extern float __sqrtf (float __x) throw (); 20472: 20472: 20472: 20472: extern float hypotf (float __x, float __y) throw (); extern float __hypotf (float __x, float __y) throw (); 20472: 20472: 20472: 20472: 20472: extern float cbrtf (float __x) throw (); extern float __cbrtf (float __x) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern float ceilf (float __x) throw () __attribute__ ((__const__)); extern float __ceilf (float __x) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern float fabsf (float __x) throw () __attribute__ ((__const__)); extern float __fabsf (float __x) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern float floorf (float __x) throw () __attribute__ ((__const__)); extern float __floorf (float __x) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern float fmodf (float __x, float __y) throw (); extern float __fmodf (float __x, float __y) throw (); 20472: # 177 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 3 4 20472: extern int isinff (float __value) throw () __attribute__ ((__const__)); 20472: 20472: 20472: 20472: 20472: extern int finitef (float __value) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern float dremf (float __x, float __y) throw (); extern float __dremf (float __x, float __y) throw (); 20472: 20472: 20472: 20472: extern float significandf (float __x) throw (); extern float __significandf (float __x) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern float copysignf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) throw () __attribute__ ((__const__)); 20472: 20472: 20472: 20472: 20472: extern float nanf (const char *__tagb) throw (); extern float __nanf (const char *__tagb) throw (); 20472: # 211 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 3 4 20472: extern int isnanf (float __value) throw () __attribute__ ((__const__)); 20472: 20472: 20472: 20472: 20472: 20472: extern float j0f (float) throw (); extern float __j0f (float) throw (); 20472: extern float j1f (float) throw (); extern float __j1f (float) throw (); 20472: extern float jnf (int, float) throw (); extern float __jnf (int, float) throw (); 20472: extern float y0f (float) throw (); extern float __y0f (float) throw (); 20472: extern float y1f (float) throw (); extern float __y1f (float) throw (); 20472: extern float ynf (int, float) throw (); extern float __ynf (int, float) throw (); 20472: 20472: 20472: 20472: 20472: 20472: extern float erff (float) throw (); extern float __erff (float) throw (); 20472: extern float erfcf (float) throw (); extern float __erfcf (float) throw (); 20472: extern float lgammaf (float) throw (); extern float __lgammaf (float) throw (); 20472: 20472: 20472: 20472: 20472: extern float tgammaf (float) throw (); extern float __tgammaf (float) throw (); 20472: 20472: 20472: 20472: 20472: 20472: extern float gammaf (float) throw (); extern float __gammaf (float) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern float lgammaf_r (float, int *__signgamp) throw (); extern float __lgammaf_r (float, int *__signgamp) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern float rintf (float __x) throw (); extern float __rintf (float __x) throw (); 20472: 20472: 20472: extern float nextafterf (float __x, float __y) throw (); extern float __nextafterf (float __x, float __y) throw (); 20472: 20472: extern float nexttowardf (float __x, long double __y) throw (); extern float __nexttowardf (float __x, long double __y) throw (); 20472: 20472: 20472: 20472: 20472: extern float nextdownf (float __x) throw (); extern float __nextdownf (float __x) throw (); 20472: 20472: extern float nextupf (float __x) throw (); extern float __nextupf (float __x) throw (); 20472: 20472: 20472: 20472: extern float remainderf (float __x, float __y) throw (); extern float __remainderf (float __x, float __y) throw (); 20472: 20472: 20472: 20472: extern float scalbnf (float __x, int __n) throw (); extern float __scalbnf (float __x, int __n) throw (); 20472: 20472: 20472: 20472: extern int ilogbf (float __x) throw (); extern int __ilogbf (float __x) throw (); 20472: 20472: 20472: 20472: 20472: extern long int llogbf (float __x) throw (); extern long int __llogbf (float __x) throw (); 20472: 20472: 20472: 20472: 20472: extern float scalblnf (float __x, long int __n) throw (); extern float __scalblnf (float __x, long int __n) throw (); 20472: 20472: 20472: 20472: extern float nearbyintf (float __x) throw (); extern float __nearbyintf (float __x) throw (); 20472: 20472: 20472: 20472: extern float roundf (float __x) throw () __attribute__ ((__const__)); extern float __roundf (float __x) throw () __attribute__ ((__const__)); 20472: 20472: 20472: 20472: extern float truncf (float __x) throw () __attribute__ ((__const__)); extern float __truncf (float __x) throw () __attribute__ ((__const__)); 20472: 20472: 20472: 20472: 20472: extern float remquof (float __x, float __y, int *__quo) throw (); extern float __remquof (float __x, float __y, int *__quo) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern long int lrintf (float __x) throw (); extern long int __lrintf (float __x) throw (); 20472: __extension__ 20472: extern long long int llrintf (float __x) throw (); extern long long int __llrintf (float __x) throw (); 20472: 20472: 20472: 20472: extern long int lroundf (float __x) throw (); extern long int __lroundf (float __x) throw (); 20472: __extension__ 20472: extern long long int llroundf (float __x) throw (); extern long long int __llroundf (float __x) throw (); 20472: 20472: 20472: 20472: extern float fdimf (float __x, float __y) throw (); extern float __fdimf (float __x, float __y) throw (); 20472: 20472: 20472: extern float fmaxf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __fmaxf (float __x, float __y) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern float fminf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __fminf (float __x, float __y) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern float fmaf (float __x, float __y, float __z) throw (); extern float __fmaf (float __x, float __y, float __z) throw (); 20472: 20472: 20472: 20472: 20472: extern float roundevenf (float __x) throw () __attribute__ ((__const__)); extern float __roundevenf (float __x) throw () __attribute__ ((__const__)); 20472: 20472: 20472: 20472: extern __intmax_t fromfpf (float __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfpf (float __x, int __round, unsigned int __width) throw () 20472: ; 20472: 20472: 20472: 20472: extern __uintmax_t ufromfpf (float __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfpf (float __x, int __round, unsigned int __width) throw () 20472: ; 20472: 20472: 20472: 20472: 20472: extern __intmax_t fromfpxf (float __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfpxf (float __x, int __round, unsigned int __width) throw () 20472: ; 20472: 20472: 20472: 20472: 20472: extern __uintmax_t ufromfpxf (float __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfpxf (float __x, int __round, unsigned int __width) throw () 20472: ; 20472: 20472: 20472: extern float fmaxmagf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __fmaxmagf (float __x, float __y) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern float fminmagf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __fminmagf (float __x, float __y) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern int canonicalizef (float *__cx, const float *__x) throw (); 20472: 20472: 20472: 20472: 20472: extern int totalorderf (const float *__x, const float *__y) throw () 20472: 20472: __attribute__ ((__pure__)); 20472: 20472: 20472: extern int totalordermagf (const float *__x, const float *__y) throw () 20472: 20472: __attribute__ ((__pure__)); 20472: 20472: 20472: extern float getpayloadf (const float *__x) throw (); extern float __getpayloadf (const float *__x) throw (); 20472: 20472: 20472: extern int setpayloadf (float *__x, float __payload) throw (); 20472: 20472: 20472: extern int setpayloadsigf (float *__x, float __payload) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern float scalbf (float __x, float __n) throw (); extern float __scalbf (float __x, float __n) throw (); 20472: # 308 "/usr/include/math.h" 2 3 4 20472: # 349 "/usr/include/math.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/mathcalls-helper-functions.h" 1 3 4 20472: # 21 "/usr/include/arm-linux-gnueabihf/bits/mathcalls-helper-functions.h" 3 4 20472: extern int __fpclassifyl (long double __value) throw () 20472: __attribute__ ((__const__)); 20472: 20472: 20472: extern int __signbitl (long double __value) throw () 20472: __attribute__ ((__const__)); 20472: 20472: 20472: 20472: extern int __isinfl (long double __value) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern int __finitel (long double __value) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern int __isnanl (long double __value) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern int __iseqsigl (long double __x, long double __y) throw (); 20472: 20472: 20472: extern int __issignalingl (long double __value) throw () 20472: __attribute__ ((__const__)); 20472: # 350 "/usr/include/math.h" 2 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 1 3 4 20472: # 53 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 3 4 20472: extern long double acosl (long double __x) throw (); extern long double __acosl (long double __x) throw (); 20472: 20472: extern long double asinl (long double __x) throw (); extern long double __asinl (long double __x) throw (); 20472: 20472: extern long double atanl (long double __x) throw (); extern long double __atanl (long double __x) throw (); 20472: 20472: extern long double atan2l (long double __y, long double __x) throw (); extern long double __atan2l (long double __y, long double __x) throw (); 20472: 20472: 20472: extern long double cosl (long double __x) throw (); extern long double __cosl (long double __x) throw (); 20472: 20472: extern long double sinl (long double __x) throw (); extern long double __sinl (long double __x) throw (); 20472: 20472: extern long double tanl (long double __x) throw (); extern long double __tanl (long double __x) throw (); 20472: 20472: 20472: 20472: 20472: extern long double coshl (long double __x) throw (); extern long double __coshl (long double __x) throw (); 20472: 20472: extern long double sinhl (long double __x) throw (); extern long double __sinhl (long double __x) throw (); 20472: 20472: extern long double tanhl (long double __x) throw (); extern long double __tanhl (long double __x) throw (); 20472: 20472: 20472: 20472: 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 () 20472: ; 20472: 20472: 20472: 20472: 20472: extern long double acoshl (long double __x) throw (); extern long double __acoshl (long double __x) throw (); 20472: 20472: extern long double asinhl (long double __x) throw (); extern long double __asinhl (long double __x) throw (); 20472: 20472: extern long double atanhl (long double __x) throw (); extern long double __atanhl (long double __x) throw (); 20472: 20472: 20472: 20472: 20472: 20472: extern long double expl (long double __x) throw (); extern long double __expl (long double __x) throw (); 20472: 20472: 20472: extern long double frexpl (long double __x, int *__exponent) throw (); extern long double __frexpl (long double __x, int *__exponent) throw (); 20472: 20472: 20472: extern long double ldexpl (long double __x, int __exponent) throw (); extern long double __ldexpl (long double __x, int __exponent) throw (); 20472: 20472: 20472: extern long double logl (long double __x) throw (); extern long double __logl (long double __x) throw (); 20472: 20472: 20472: extern long double log10l (long double __x) throw (); extern long double __log10l (long double __x) throw (); 20472: 20472: 20472: 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))); 20472: 20472: 20472: 20472: extern long double exp10l (long double __x) throw (); extern long double __exp10l (long double __x) throw (); 20472: 20472: 20472: 20472: 20472: extern long double expm1l (long double __x) throw (); extern long double __expm1l (long double __x) throw (); 20472: 20472: 20472: extern long double log1pl (long double __x) throw (); extern long double __log1pl (long double __x) throw (); 20472: 20472: 20472: extern long double logbl (long double __x) throw (); extern long double __logbl (long double __x) throw (); 20472: 20472: 20472: 20472: 20472: extern long double exp2l (long double __x) throw (); extern long double __exp2l (long double __x) throw (); 20472: 20472: 20472: extern long double log2l (long double __x) throw (); extern long double __log2l (long double __x) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern long double powl (long double __x, long double __y) throw (); extern long double __powl (long double __x, long double __y) throw (); 20472: 20472: 20472: extern long double sqrtl (long double __x) throw (); extern long double __sqrtl (long double __x) throw (); 20472: 20472: 20472: 20472: extern long double hypotl (long double __x, long double __y) throw (); extern long double __hypotl (long double __x, long double __y) throw (); 20472: 20472: 20472: 20472: 20472: extern long double cbrtl (long double __x) throw (); extern long double __cbrtl (long double __x) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern long double ceill (long double __x) throw () __attribute__ ((__const__)); extern long double __ceill (long double __x) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern long double fabsl (long double __x) throw () __attribute__ ((__const__)); extern long double __fabsl (long double __x) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern long double floorl (long double __x) throw () __attribute__ ((__const__)); extern long double __floorl (long double __x) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern long double fmodl (long double __x, long double __y) throw (); extern long double __fmodl (long double __x, long double __y) throw (); 20472: # 177 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 3 4 20472: extern int isinfl (long double __value) throw () __attribute__ ((__const__)); 20472: 20472: 20472: 20472: 20472: extern int finitel (long double __value) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern long double dreml (long double __x, long double __y) throw (); extern long double __dreml (long double __x, long double __y) throw (); 20472: 20472: 20472: 20472: extern long double significandl (long double __x) throw (); extern long double __significandl (long double __x) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 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__)); 20472: 20472: 20472: 20472: 20472: extern long double nanl (const char *__tagb) throw (); extern long double __nanl (const char *__tagb) throw (); 20472: # 211 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 3 4 20472: extern int isnanl (long double __value) throw () __attribute__ ((__const__)); 20472: 20472: 20472: 20472: 20472: 20472: extern long double j0l (long double) throw (); extern long double __j0l (long double) throw (); 20472: extern long double j1l (long double) throw (); extern long double __j1l (long double) throw (); 20472: extern long double jnl (int, long double) throw (); extern long double __jnl (int, long double) throw (); 20472: extern long double y0l (long double) throw (); extern long double __y0l (long double) throw (); 20472: extern long double y1l (long double) throw (); extern long double __y1l (long double) throw (); 20472: extern long double ynl (int, long double) throw (); extern long double __ynl (int, long double) throw (); 20472: 20472: 20472: 20472: 20472: 20472: extern long double erfl (long double) throw (); extern long double __erfl (long double) throw (); 20472: extern long double erfcl (long double) throw (); extern long double __erfcl (long double) throw (); 20472: extern long double lgammal (long double) throw (); extern long double __lgammal (long double) throw (); 20472: 20472: 20472: 20472: 20472: extern long double tgammal (long double) throw (); extern long double __tgammal (long double) throw (); 20472: 20472: 20472: 20472: 20472: 20472: extern long double gammal (long double) throw (); extern long double __gammal (long double) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern long double lgammal_r (long double, int *__signgamp) throw (); extern long double __lgammal_r (long double, int *__signgamp) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern long double rintl (long double __x) throw (); extern long double __rintl (long double __x) throw (); 20472: 20472: 20472: extern long double nextafterl (long double __x, long double __y) throw (); extern long double __nextafterl (long double __x, long double __y) throw (); 20472: 20472: extern long double nexttowardl (long double __x, long double __y) throw (); extern long double __nexttowardl (long double __x, long double __y) throw (); 20472: 20472: 20472: 20472: 20472: extern long double nextdownl (long double __x) throw (); extern long double __nextdownl (long double __x) throw (); 20472: 20472: extern long double nextupl (long double __x) throw (); extern long double __nextupl (long double __x) throw (); 20472: 20472: 20472: 20472: extern long double remainderl (long double __x, long double __y) throw (); extern long double __remainderl (long double __x, long double __y) throw (); 20472: 20472: 20472: 20472: extern long double scalbnl (long double __x, int __n) throw (); extern long double __scalbnl (long double __x, int __n) throw (); 20472: 20472: 20472: 20472: extern int ilogbl (long double __x) throw (); extern int __ilogbl (long double __x) throw (); 20472: 20472: 20472: 20472: 20472: extern long int llogbl (long double __x) throw (); extern long int __llogbl (long double __x) throw (); 20472: 20472: 20472: 20472: 20472: extern long double scalblnl (long double __x, long int __n) throw (); extern long double __scalblnl (long double __x, long int __n) throw (); 20472: 20472: 20472: 20472: extern long double nearbyintl (long double __x) throw (); extern long double __nearbyintl (long double __x) throw (); 20472: 20472: 20472: 20472: extern long double roundl (long double __x) throw () __attribute__ ((__const__)); extern long double __roundl (long double __x) throw () __attribute__ ((__const__)); 20472: 20472: 20472: 20472: extern long double truncl (long double __x) throw () __attribute__ ((__const__)); extern long double __truncl (long double __x) throw () __attribute__ ((__const__)); 20472: 20472: 20472: 20472: 20472: 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 (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern long int lrintl (long double __x) throw (); extern long int __lrintl (long double __x) throw (); 20472: __extension__ 20472: extern long long int llrintl (long double __x) throw (); extern long long int __llrintl (long double __x) throw (); 20472: 20472: 20472: 20472: extern long int lroundl (long double __x) throw (); extern long int __lroundl (long double __x) throw (); 20472: __extension__ 20472: extern long long int llroundl (long double __x) throw (); extern long long int __llroundl (long double __x) throw (); 20472: 20472: 20472: 20472: extern long double fdiml (long double __x, long double __y) throw (); extern long double __fdiml (long double __x, long double __y) throw (); 20472: 20472: 20472: 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__)); 20472: 20472: 20472: 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__)); 20472: 20472: 20472: 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 (); 20472: 20472: 20472: 20472: 20472: extern long double roundevenl (long double __x) throw () __attribute__ ((__const__)); extern long double __roundevenl (long double __x) throw () __attribute__ ((__const__)); 20472: 20472: 20472: 20472: 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 () 20472: ; 20472: 20472: 20472: 20472: 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 () 20472: ; 20472: 20472: 20472: 20472: 20472: 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 () 20472: ; 20472: 20472: 20472: 20472: 20472: 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 () 20472: ; 20472: 20472: 20472: 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__)); 20472: 20472: 20472: 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__)); 20472: 20472: 20472: extern int canonicalizel (long double *__cx, const long double *__x) throw (); 20472: 20472: 20472: 20472: 20472: extern int totalorderl (const long double *__x, const long double *__y) throw () 20472: 20472: __attribute__ ((__pure__)); 20472: 20472: 20472: extern int totalordermagl (const long double *__x, const long double *__y) throw () 20472: 20472: __attribute__ ((__pure__)); 20472: 20472: 20472: extern long double getpayloadl (const long double *__x) throw (); extern long double __getpayloadl (const long double *__x) throw (); 20472: 20472: 20472: extern int setpayloadl (long double *__x, long double __payload) throw (); 20472: 20472: 20472: extern int setpayloadsigl (long double *__x, long double __payload) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern long double scalbl (long double __x, long double __n) throw (); extern long double __scalbl (long double __x, long double __n) throw (); 20472: # 351 "/usr/include/math.h" 2 3 4 20472: # 389 "/usr/include/math.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 1 3 4 20472: # 53 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 3 4 20472: extern _Float32 acosf32 (_Float32 __x) throw (); extern _Float32 __acosf32 (_Float32 __x) throw (); 20472: 20472: extern _Float32 asinf32 (_Float32 __x) throw (); extern _Float32 __asinf32 (_Float32 __x) throw (); 20472: 20472: extern _Float32 atanf32 (_Float32 __x) throw (); extern _Float32 __atanf32 (_Float32 __x) throw (); 20472: 20472: extern _Float32 atan2f32 (_Float32 __y, _Float32 __x) throw (); extern _Float32 __atan2f32 (_Float32 __y, _Float32 __x) throw (); 20472: 20472: 20472: extern _Float32 cosf32 (_Float32 __x) throw (); extern _Float32 __cosf32 (_Float32 __x) throw (); 20472: 20472: extern _Float32 sinf32 (_Float32 __x) throw (); extern _Float32 __sinf32 (_Float32 __x) throw (); 20472: 20472: extern _Float32 tanf32 (_Float32 __x) throw (); extern _Float32 __tanf32 (_Float32 __x) throw (); 20472: 20472: 20472: 20472: 20472: extern _Float32 coshf32 (_Float32 __x) throw (); extern _Float32 __coshf32 (_Float32 __x) throw (); 20472: 20472: extern _Float32 sinhf32 (_Float32 __x) throw (); extern _Float32 __sinhf32 (_Float32 __x) throw (); 20472: 20472: extern _Float32 tanhf32 (_Float32 __x) throw (); extern _Float32 __tanhf32 (_Float32 __x) throw (); 20472: 20472: 20472: 20472: extern void sincosf32 (_Float32 __x, _Float32 *__sinx, _Float32 *__cosx) throw (); extern void __sincosf32 (_Float32 __x, _Float32 *__sinx, _Float32 *__cosx) throw () 20472: ; 20472: 20472: 20472: 20472: 20472: extern _Float32 acoshf32 (_Float32 __x) throw (); extern _Float32 __acoshf32 (_Float32 __x) throw (); 20472: 20472: extern _Float32 asinhf32 (_Float32 __x) throw (); extern _Float32 __asinhf32 (_Float32 __x) throw (); 20472: 20472: extern _Float32 atanhf32 (_Float32 __x) throw (); extern _Float32 __atanhf32 (_Float32 __x) throw (); 20472: 20472: 20472: 20472: 20472: 20472: extern _Float32 expf32 (_Float32 __x) throw (); extern _Float32 __expf32 (_Float32 __x) throw (); 20472: 20472: 20472: extern _Float32 frexpf32 (_Float32 __x, int *__exponent) throw (); extern _Float32 __frexpf32 (_Float32 __x, int *__exponent) throw (); 20472: 20472: 20472: extern _Float32 ldexpf32 (_Float32 __x, int __exponent) throw (); extern _Float32 __ldexpf32 (_Float32 __x, int __exponent) throw (); 20472: 20472: 20472: extern _Float32 logf32 (_Float32 __x) throw (); extern _Float32 __logf32 (_Float32 __x) throw (); 20472: 20472: 20472: extern _Float32 log10f32 (_Float32 __x) throw (); extern _Float32 __log10f32 (_Float32 __x) throw (); 20472: 20472: 20472: extern _Float32 modff32 (_Float32 __x, _Float32 *__iptr) throw (); extern _Float32 __modff32 (_Float32 __x, _Float32 *__iptr) throw () __attribute__ ((__nonnull__ (2))); 20472: 20472: 20472: 20472: extern _Float32 exp10f32 (_Float32 __x) throw (); extern _Float32 __exp10f32 (_Float32 __x) throw (); 20472: 20472: 20472: 20472: 20472: extern _Float32 expm1f32 (_Float32 __x) throw (); extern _Float32 __expm1f32 (_Float32 __x) throw (); 20472: 20472: 20472: extern _Float32 log1pf32 (_Float32 __x) throw (); extern _Float32 __log1pf32 (_Float32 __x) throw (); 20472: 20472: 20472: extern _Float32 logbf32 (_Float32 __x) throw (); extern _Float32 __logbf32 (_Float32 __x) throw (); 20472: 20472: 20472: 20472: 20472: extern _Float32 exp2f32 (_Float32 __x) throw (); extern _Float32 __exp2f32 (_Float32 __x) throw (); 20472: 20472: 20472: extern _Float32 log2f32 (_Float32 __x) throw (); extern _Float32 __log2f32 (_Float32 __x) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern _Float32 powf32 (_Float32 __x, _Float32 __y) throw (); extern _Float32 __powf32 (_Float32 __x, _Float32 __y) throw (); 20472: 20472: 20472: extern _Float32 sqrtf32 (_Float32 __x) throw (); extern _Float32 __sqrtf32 (_Float32 __x) throw (); 20472: 20472: 20472: 20472: extern _Float32 hypotf32 (_Float32 __x, _Float32 __y) throw (); extern _Float32 __hypotf32 (_Float32 __x, _Float32 __y) throw (); 20472: 20472: 20472: 20472: 20472: extern _Float32 cbrtf32 (_Float32 __x) throw (); extern _Float32 __cbrtf32 (_Float32 __x) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern _Float32 ceilf32 (_Float32 __x) throw () __attribute__ ((__const__)); extern _Float32 __ceilf32 (_Float32 __x) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern _Float32 fabsf32 (_Float32 __x) throw () __attribute__ ((__const__)); extern _Float32 __fabsf32 (_Float32 __x) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern _Float32 floorf32 (_Float32 __x) throw () __attribute__ ((__const__)); extern _Float32 __floorf32 (_Float32 __x) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern _Float32 fmodf32 (_Float32 __x, _Float32 __y) throw (); extern _Float32 __fmodf32 (_Float32 __x, _Float32 __y) throw (); 20472: # 196 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 3 4 20472: extern _Float32 copysignf32 (_Float32 __x, _Float32 __y) throw () __attribute__ ((__const__)); extern _Float32 __copysignf32 (_Float32 __x, _Float32 __y) throw () __attribute__ ((__const__)); 20472: 20472: 20472: 20472: 20472: extern _Float32 nanf32 (const char *__tagb) throw (); extern _Float32 __nanf32 (const char *__tagb) throw (); 20472: # 217 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 3 4 20472: extern _Float32 j0f32 (_Float32) throw (); extern _Float32 __j0f32 (_Float32) throw (); 20472: extern _Float32 j1f32 (_Float32) throw (); extern _Float32 __j1f32 (_Float32) throw (); 20472: extern _Float32 jnf32 (int, _Float32) throw (); extern _Float32 __jnf32 (int, _Float32) throw (); 20472: extern _Float32 y0f32 (_Float32) throw (); extern _Float32 __y0f32 (_Float32) throw (); 20472: extern _Float32 y1f32 (_Float32) throw (); extern _Float32 __y1f32 (_Float32) throw (); 20472: extern _Float32 ynf32 (int, _Float32) throw (); extern _Float32 __ynf32 (int, _Float32) throw (); 20472: 20472: 20472: 20472: 20472: 20472: extern _Float32 erff32 (_Float32) throw (); extern _Float32 __erff32 (_Float32) throw (); 20472: extern _Float32 erfcf32 (_Float32) throw (); extern _Float32 __erfcf32 (_Float32) throw (); 20472: extern _Float32 lgammaf32 (_Float32) throw (); extern _Float32 __lgammaf32 (_Float32) throw (); 20472: 20472: 20472: 20472: 20472: extern _Float32 tgammaf32 (_Float32) throw (); extern _Float32 __tgammaf32 (_Float32) throw (); 20472: # 249 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 3 4 20472: extern _Float32 lgammaf32_r (_Float32, int *__signgamp) throw (); extern _Float32 __lgammaf32_r (_Float32, int *__signgamp) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern _Float32 rintf32 (_Float32 __x) throw (); extern _Float32 __rintf32 (_Float32 __x) throw (); 20472: 20472: 20472: extern _Float32 nextafterf32 (_Float32 __x, _Float32 __y) throw (); extern _Float32 __nextafterf32 (_Float32 __x, _Float32 __y) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern _Float32 nextdownf32 (_Float32 __x) throw (); extern _Float32 __nextdownf32 (_Float32 __x) throw (); 20472: 20472: extern _Float32 nextupf32 (_Float32 __x) throw (); extern _Float32 __nextupf32 (_Float32 __x) throw (); 20472: 20472: 20472: 20472: extern _Float32 remainderf32 (_Float32 __x, _Float32 __y) throw (); extern _Float32 __remainderf32 (_Float32 __x, _Float32 __y) throw (); 20472: 20472: 20472: 20472: extern _Float32 scalbnf32 (_Float32 __x, int __n) throw (); extern _Float32 __scalbnf32 (_Float32 __x, int __n) throw (); 20472: 20472: 20472: 20472: extern int ilogbf32 (_Float32 __x) throw (); extern int __ilogbf32 (_Float32 __x) throw (); 20472: 20472: 20472: 20472: 20472: extern long int llogbf32 (_Float32 __x) throw (); extern long int __llogbf32 (_Float32 __x) throw (); 20472: 20472: 20472: 20472: 20472: extern _Float32 scalblnf32 (_Float32 __x, long int __n) throw (); extern _Float32 __scalblnf32 (_Float32 __x, long int __n) throw (); 20472: 20472: 20472: 20472: extern _Float32 nearbyintf32 (_Float32 __x) throw (); extern _Float32 __nearbyintf32 (_Float32 __x) throw (); 20472: 20472: 20472: 20472: extern _Float32 roundf32 (_Float32 __x) throw () __attribute__ ((__const__)); extern _Float32 __roundf32 (_Float32 __x) throw () __attribute__ ((__const__)); 20472: 20472: 20472: 20472: extern _Float32 truncf32 (_Float32 __x) throw () __attribute__ ((__const__)); extern _Float32 __truncf32 (_Float32 __x) throw () __attribute__ ((__const__)); 20472: 20472: 20472: 20472: 20472: extern _Float32 remquof32 (_Float32 __x, _Float32 __y, int *__quo) throw (); extern _Float32 __remquof32 (_Float32 __x, _Float32 __y, int *__quo) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern long int lrintf32 (_Float32 __x) throw (); extern long int __lrintf32 (_Float32 __x) throw (); 20472: __extension__ 20472: extern long long int llrintf32 (_Float32 __x) throw (); extern long long int __llrintf32 (_Float32 __x) throw (); 20472: 20472: 20472: 20472: extern long int lroundf32 (_Float32 __x) throw (); extern long int __lroundf32 (_Float32 __x) throw (); 20472: __extension__ 20472: extern long long int llroundf32 (_Float32 __x) throw (); extern long long int __llroundf32 (_Float32 __x) throw (); 20472: 20472: 20472: 20472: extern _Float32 fdimf32 (_Float32 __x, _Float32 __y) throw (); extern _Float32 __fdimf32 (_Float32 __x, _Float32 __y) throw (); 20472: 20472: 20472: extern _Float32 fmaxf32 (_Float32 __x, _Float32 __y) throw () __attribute__ ((__const__)); extern _Float32 __fmaxf32 (_Float32 __x, _Float32 __y) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern _Float32 fminf32 (_Float32 __x, _Float32 __y) throw () __attribute__ ((__const__)); extern _Float32 __fminf32 (_Float32 __x, _Float32 __y) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern _Float32 fmaf32 (_Float32 __x, _Float32 __y, _Float32 __z) throw (); extern _Float32 __fmaf32 (_Float32 __x, _Float32 __y, _Float32 __z) throw (); 20472: 20472: 20472: 20472: 20472: extern _Float32 roundevenf32 (_Float32 __x) throw () __attribute__ ((__const__)); extern _Float32 __roundevenf32 (_Float32 __x) throw () __attribute__ ((__const__)); 20472: 20472: 20472: 20472: extern __intmax_t fromfpf32 (_Float32 __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfpf32 (_Float32 __x, int __round, unsigned int __width) throw () 20472: ; 20472: 20472: 20472: 20472: extern __uintmax_t ufromfpf32 (_Float32 __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfpf32 (_Float32 __x, int __round, unsigned int __width) throw () 20472: ; 20472: 20472: 20472: 20472: 20472: extern __intmax_t fromfpxf32 (_Float32 __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfpxf32 (_Float32 __x, int __round, unsigned int __width) throw () 20472: ; 20472: 20472: 20472: 20472: 20472: extern __uintmax_t ufromfpxf32 (_Float32 __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfpxf32 (_Float32 __x, int __round, unsigned int __width) throw () 20472: ; 20472: 20472: 20472: extern _Float32 fmaxmagf32 (_Float32 __x, _Float32 __y) throw () __attribute__ ((__const__)); extern _Float32 __fmaxmagf32 (_Float32 __x, _Float32 __y) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern _Float32 fminmagf32 (_Float32 __x, _Float32 __y) throw () __attribute__ ((__const__)); extern _Float32 __fminmagf32 (_Float32 __x, _Float32 __y) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern int canonicalizef32 (_Float32 *__cx, const _Float32 *__x) throw (); 20472: 20472: 20472: 20472: 20472: extern int totalorderf32 (const _Float32 *__x, const _Float32 *__y) throw () 20472: 20472: __attribute__ ((__pure__)); 20472: 20472: 20472: extern int totalordermagf32 (const _Float32 *__x, const _Float32 *__y) throw () 20472: 20472: __attribute__ ((__pure__)); 20472: 20472: 20472: extern _Float32 getpayloadf32 (const _Float32 *__x) throw (); extern _Float32 __getpayloadf32 (const _Float32 *__x) throw (); 20472: 20472: 20472: extern int setpayloadf32 (_Float32 *__x, _Float32 __payload) throw (); 20472: 20472: 20472: extern int setpayloadsigf32 (_Float32 *__x, _Float32 __payload) throw (); 20472: # 390 "/usr/include/math.h" 2 3 4 20472: # 406 "/usr/include/math.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 1 3 4 20472: # 53 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 3 4 20472: extern _Float64 acosf64 (_Float64 __x) throw (); extern _Float64 __acosf64 (_Float64 __x) throw (); 20472: 20472: extern _Float64 asinf64 (_Float64 __x) throw (); extern _Float64 __asinf64 (_Float64 __x) throw (); 20472: 20472: extern _Float64 atanf64 (_Float64 __x) throw (); extern _Float64 __atanf64 (_Float64 __x) throw (); 20472: 20472: extern _Float64 atan2f64 (_Float64 __y, _Float64 __x) throw (); extern _Float64 __atan2f64 (_Float64 __y, _Float64 __x) throw (); 20472: 20472: 20472: extern _Float64 cosf64 (_Float64 __x) throw (); extern _Float64 __cosf64 (_Float64 __x) throw (); 20472: 20472: extern _Float64 sinf64 (_Float64 __x) throw (); extern _Float64 __sinf64 (_Float64 __x) throw (); 20472: 20472: extern _Float64 tanf64 (_Float64 __x) throw (); extern _Float64 __tanf64 (_Float64 __x) throw (); 20472: 20472: 20472: 20472: 20472: extern _Float64 coshf64 (_Float64 __x) throw (); extern _Float64 __coshf64 (_Float64 __x) throw (); 20472: 20472: extern _Float64 sinhf64 (_Float64 __x) throw (); extern _Float64 __sinhf64 (_Float64 __x) throw (); 20472: 20472: extern _Float64 tanhf64 (_Float64 __x) throw (); extern _Float64 __tanhf64 (_Float64 __x) throw (); 20472: 20472: 20472: 20472: extern void sincosf64 (_Float64 __x, _Float64 *__sinx, _Float64 *__cosx) throw (); extern void __sincosf64 (_Float64 __x, _Float64 *__sinx, _Float64 *__cosx) throw () 20472: ; 20472: 20472: 20472: 20472: 20472: extern _Float64 acoshf64 (_Float64 __x) throw (); extern _Float64 __acoshf64 (_Float64 __x) throw (); 20472: 20472: extern _Float64 asinhf64 (_Float64 __x) throw (); extern _Float64 __asinhf64 (_Float64 __x) throw (); 20472: 20472: extern _Float64 atanhf64 (_Float64 __x) throw (); extern _Float64 __atanhf64 (_Float64 __x) throw (); 20472: 20472: 20472: 20472: 20472: 20472: extern _Float64 expf64 (_Float64 __x) throw (); extern _Float64 __expf64 (_Float64 __x) throw (); 20472: 20472: 20472: extern _Float64 frexpf64 (_Float64 __x, int *__exponent) throw (); extern _Float64 __frexpf64 (_Float64 __x, int *__exponent) throw (); 20472: 20472: 20472: extern _Float64 ldexpf64 (_Float64 __x, int __exponent) throw (); extern _Float64 __ldexpf64 (_Float64 __x, int __exponent) throw (); 20472: 20472: 20472: extern _Float64 logf64 (_Float64 __x) throw (); extern _Float64 __logf64 (_Float64 __x) throw (); 20472: 20472: 20472: extern _Float64 log10f64 (_Float64 __x) throw (); extern _Float64 __log10f64 (_Float64 __x) throw (); 20472: 20472: 20472: extern _Float64 modff64 (_Float64 __x, _Float64 *__iptr) throw (); extern _Float64 __modff64 (_Float64 __x, _Float64 *__iptr) throw () __attribute__ ((__nonnull__ (2))); 20472: 20472: 20472: 20472: extern _Float64 exp10f64 (_Float64 __x) throw (); extern _Float64 __exp10f64 (_Float64 __x) throw (); 20472: 20472: 20472: 20472: 20472: extern _Float64 expm1f64 (_Float64 __x) throw (); extern _Float64 __expm1f64 (_Float64 __x) throw (); 20472: 20472: 20472: extern _Float64 log1pf64 (_Float64 __x) throw (); extern _Float64 __log1pf64 (_Float64 __x) throw (); 20472: 20472: 20472: extern _Float64 logbf64 (_Float64 __x) throw (); extern _Float64 __logbf64 (_Float64 __x) throw (); 20472: 20472: 20472: 20472: 20472: extern _Float64 exp2f64 (_Float64 __x) throw (); extern _Float64 __exp2f64 (_Float64 __x) throw (); 20472: 20472: 20472: extern _Float64 log2f64 (_Float64 __x) throw (); extern _Float64 __log2f64 (_Float64 __x) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern _Float64 powf64 (_Float64 __x, _Float64 __y) throw (); extern _Float64 __powf64 (_Float64 __x, _Float64 __y) throw (); 20472: 20472: 20472: extern _Float64 sqrtf64 (_Float64 __x) throw (); extern _Float64 __sqrtf64 (_Float64 __x) throw (); 20472: 20472: 20472: 20472: extern _Float64 hypotf64 (_Float64 __x, _Float64 __y) throw (); extern _Float64 __hypotf64 (_Float64 __x, _Float64 __y) throw (); 20472: 20472: 20472: 20472: 20472: extern _Float64 cbrtf64 (_Float64 __x) throw (); extern _Float64 __cbrtf64 (_Float64 __x) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern _Float64 ceilf64 (_Float64 __x) throw () __attribute__ ((__const__)); extern _Float64 __ceilf64 (_Float64 __x) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern _Float64 fabsf64 (_Float64 __x) throw () __attribute__ ((__const__)); extern _Float64 __fabsf64 (_Float64 __x) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern _Float64 floorf64 (_Float64 __x) throw () __attribute__ ((__const__)); extern _Float64 __floorf64 (_Float64 __x) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern _Float64 fmodf64 (_Float64 __x, _Float64 __y) throw (); extern _Float64 __fmodf64 (_Float64 __x, _Float64 __y) throw (); 20472: # 196 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 3 4 20472: extern _Float64 copysignf64 (_Float64 __x, _Float64 __y) throw () __attribute__ ((__const__)); extern _Float64 __copysignf64 (_Float64 __x, _Float64 __y) throw () __attribute__ ((__const__)); 20472: 20472: 20472: 20472: 20472: extern _Float64 nanf64 (const char *__tagb) throw (); extern _Float64 __nanf64 (const char *__tagb) throw (); 20472: # 217 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 3 4 20472: extern _Float64 j0f64 (_Float64) throw (); extern _Float64 __j0f64 (_Float64) throw (); 20472: extern _Float64 j1f64 (_Float64) throw (); extern _Float64 __j1f64 (_Float64) throw (); 20472: extern _Float64 jnf64 (int, _Float64) throw (); extern _Float64 __jnf64 (int, _Float64) throw (); 20472: extern _Float64 y0f64 (_Float64) throw (); extern _Float64 __y0f64 (_Float64) throw (); 20472: extern _Float64 y1f64 (_Float64) throw (); extern _Float64 __y1f64 (_Float64) throw (); 20472: extern _Float64 ynf64 (int, _Float64) throw (); extern _Float64 __ynf64 (int, _Float64) throw (); 20472: 20472: 20472: 20472: 20472: 20472: extern _Float64 erff64 (_Float64) throw (); extern _Float64 __erff64 (_Float64) throw (); 20472: extern _Float64 erfcf64 (_Float64) throw (); extern _Float64 __erfcf64 (_Float64) throw (); 20472: extern _Float64 lgammaf64 (_Float64) throw (); extern _Float64 __lgammaf64 (_Float64) throw (); 20472: 20472: 20472: 20472: 20472: extern _Float64 tgammaf64 (_Float64) throw (); extern _Float64 __tgammaf64 (_Float64) throw (); 20472: # 249 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 3 4 20472: extern _Float64 lgammaf64_r (_Float64, int *__signgamp) throw (); extern _Float64 __lgammaf64_r (_Float64, int *__signgamp) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern _Float64 rintf64 (_Float64 __x) throw (); extern _Float64 __rintf64 (_Float64 __x) throw (); 20472: 20472: 20472: extern _Float64 nextafterf64 (_Float64 __x, _Float64 __y) throw (); extern _Float64 __nextafterf64 (_Float64 __x, _Float64 __y) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern _Float64 nextdownf64 (_Float64 __x) throw (); extern _Float64 __nextdownf64 (_Float64 __x) throw (); 20472: 20472: extern _Float64 nextupf64 (_Float64 __x) throw (); extern _Float64 __nextupf64 (_Float64 __x) throw (); 20472: 20472: 20472: 20472: extern _Float64 remainderf64 (_Float64 __x, _Float64 __y) throw (); extern _Float64 __remainderf64 (_Float64 __x, _Float64 __y) throw (); 20472: 20472: 20472: 20472: extern _Float64 scalbnf64 (_Float64 __x, int __n) throw (); extern _Float64 __scalbnf64 (_Float64 __x, int __n) throw (); 20472: 20472: 20472: 20472: extern int ilogbf64 (_Float64 __x) throw (); extern int __ilogbf64 (_Float64 __x) throw (); 20472: 20472: 20472: 20472: 20472: extern long int llogbf64 (_Float64 __x) throw (); extern long int __llogbf64 (_Float64 __x) throw (); 20472: 20472: 20472: 20472: 20472: extern _Float64 scalblnf64 (_Float64 __x, long int __n) throw (); extern _Float64 __scalblnf64 (_Float64 __x, long int __n) throw (); 20472: 20472: 20472: 20472: extern _Float64 nearbyintf64 (_Float64 __x) throw (); extern _Float64 __nearbyintf64 (_Float64 __x) throw (); 20472: 20472: 20472: 20472: extern _Float64 roundf64 (_Float64 __x) throw () __attribute__ ((__const__)); extern _Float64 __roundf64 (_Float64 __x) throw () __attribute__ ((__const__)); 20472: 20472: 20472: 20472: extern _Float64 truncf64 (_Float64 __x) throw () __attribute__ ((__const__)); extern _Float64 __truncf64 (_Float64 __x) throw () __attribute__ ((__const__)); 20472: 20472: 20472: 20472: 20472: extern _Float64 remquof64 (_Float64 __x, _Float64 __y, int *__quo) throw (); extern _Float64 __remquof64 (_Float64 __x, _Float64 __y, int *__quo) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern long int lrintf64 (_Float64 __x) throw (); extern long int __lrintf64 (_Float64 __x) throw (); 20472: __extension__ 20472: extern long long int llrintf64 (_Float64 __x) throw (); extern long long int __llrintf64 (_Float64 __x) throw (); 20472: 20472: 20472: 20472: extern long int lroundf64 (_Float64 __x) throw (); extern long int __lroundf64 (_Float64 __x) throw (); 20472: __extension__ 20472: extern long long int llroundf64 (_Float64 __x) throw (); extern long long int __llroundf64 (_Float64 __x) throw (); 20472: 20472: 20472: 20472: extern _Float64 fdimf64 (_Float64 __x, _Float64 __y) throw (); extern _Float64 __fdimf64 (_Float64 __x, _Float64 __y) throw (); 20472: 20472: 20472: extern _Float64 fmaxf64 (_Float64 __x, _Float64 __y) throw () __attribute__ ((__const__)); extern _Float64 __fmaxf64 (_Float64 __x, _Float64 __y) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern _Float64 fminf64 (_Float64 __x, _Float64 __y) throw () __attribute__ ((__const__)); extern _Float64 __fminf64 (_Float64 __x, _Float64 __y) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern _Float64 fmaf64 (_Float64 __x, _Float64 __y, _Float64 __z) throw (); extern _Float64 __fmaf64 (_Float64 __x, _Float64 __y, _Float64 __z) throw (); 20472: 20472: 20472: 20472: 20472: extern _Float64 roundevenf64 (_Float64 __x) throw () __attribute__ ((__const__)); extern _Float64 __roundevenf64 (_Float64 __x) throw () __attribute__ ((__const__)); 20472: 20472: 20472: 20472: extern __intmax_t fromfpf64 (_Float64 __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfpf64 (_Float64 __x, int __round, unsigned int __width) throw () 20472: ; 20472: 20472: 20472: 20472: extern __uintmax_t ufromfpf64 (_Float64 __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfpf64 (_Float64 __x, int __round, unsigned int __width) throw () 20472: ; 20472: 20472: 20472: 20472: 20472: extern __intmax_t fromfpxf64 (_Float64 __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfpxf64 (_Float64 __x, int __round, unsigned int __width) throw () 20472: ; 20472: 20472: 20472: 20472: 20472: extern __uintmax_t ufromfpxf64 (_Float64 __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfpxf64 (_Float64 __x, int __round, unsigned int __width) throw () 20472: ; 20472: 20472: 20472: extern _Float64 fmaxmagf64 (_Float64 __x, _Float64 __y) throw () __attribute__ ((__const__)); extern _Float64 __fmaxmagf64 (_Float64 __x, _Float64 __y) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern _Float64 fminmagf64 (_Float64 __x, _Float64 __y) throw () __attribute__ ((__const__)); extern _Float64 __fminmagf64 (_Float64 __x, _Float64 __y) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern int canonicalizef64 (_Float64 *__cx, const _Float64 *__x) throw (); 20472: 20472: 20472: 20472: 20472: extern int totalorderf64 (const _Float64 *__x, const _Float64 *__y) throw () 20472: 20472: __attribute__ ((__pure__)); 20472: 20472: 20472: extern int totalordermagf64 (const _Float64 *__x, const _Float64 *__y) throw () 20472: 20472: __attribute__ ((__pure__)); 20472: 20472: 20472: extern _Float64 getpayloadf64 (const _Float64 *__x) throw (); extern _Float64 __getpayloadf64 (const _Float64 *__x) throw (); 20472: 20472: 20472: extern int setpayloadf64 (_Float64 *__x, _Float64 __payload) throw (); 20472: 20472: 20472: extern int setpayloadsigf64 (_Float64 *__x, _Float64 __payload) throw (); 20472: # 407 "/usr/include/math.h" 2 3 4 20472: # 440 "/usr/include/math.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 1 3 4 20472: # 53 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 3 4 20472: extern _Float32x acosf32x (_Float32x __x) throw (); extern _Float32x __acosf32x (_Float32x __x) throw (); 20472: 20472: extern _Float32x asinf32x (_Float32x __x) throw (); extern _Float32x __asinf32x (_Float32x __x) throw (); 20472: 20472: extern _Float32x atanf32x (_Float32x __x) throw (); extern _Float32x __atanf32x (_Float32x __x) throw (); 20472: 20472: extern _Float32x atan2f32x (_Float32x __y, _Float32x __x) throw (); extern _Float32x __atan2f32x (_Float32x __y, _Float32x __x) throw (); 20472: 20472: 20472: extern _Float32x cosf32x (_Float32x __x) throw (); extern _Float32x __cosf32x (_Float32x __x) throw (); 20472: 20472: extern _Float32x sinf32x (_Float32x __x) throw (); extern _Float32x __sinf32x (_Float32x __x) throw (); 20472: 20472: extern _Float32x tanf32x (_Float32x __x) throw (); extern _Float32x __tanf32x (_Float32x __x) throw (); 20472: 20472: 20472: 20472: 20472: extern _Float32x coshf32x (_Float32x __x) throw (); extern _Float32x __coshf32x (_Float32x __x) throw (); 20472: 20472: extern _Float32x sinhf32x (_Float32x __x) throw (); extern _Float32x __sinhf32x (_Float32x __x) throw (); 20472: 20472: extern _Float32x tanhf32x (_Float32x __x) throw (); extern _Float32x __tanhf32x (_Float32x __x) throw (); 20472: 20472: 20472: 20472: extern void sincosf32x (_Float32x __x, _Float32x *__sinx, _Float32x *__cosx) throw (); extern void __sincosf32x (_Float32x __x, _Float32x *__sinx, _Float32x *__cosx) throw () 20472: ; 20472: 20472: 20472: 20472: 20472: extern _Float32x acoshf32x (_Float32x __x) throw (); extern _Float32x __acoshf32x (_Float32x __x) throw (); 20472: 20472: extern _Float32x asinhf32x (_Float32x __x) throw (); extern _Float32x __asinhf32x (_Float32x __x) throw (); 20472: 20472: extern _Float32x atanhf32x (_Float32x __x) throw (); extern _Float32x __atanhf32x (_Float32x __x) throw (); 20472: 20472: 20472: 20472: 20472: 20472: extern _Float32x expf32x (_Float32x __x) throw (); extern _Float32x __expf32x (_Float32x __x) throw (); 20472: 20472: 20472: extern _Float32x frexpf32x (_Float32x __x, int *__exponent) throw (); extern _Float32x __frexpf32x (_Float32x __x, int *__exponent) throw (); 20472: 20472: 20472: extern _Float32x ldexpf32x (_Float32x __x, int __exponent) throw (); extern _Float32x __ldexpf32x (_Float32x __x, int __exponent) throw (); 20472: 20472: 20472: extern _Float32x logf32x (_Float32x __x) throw (); extern _Float32x __logf32x (_Float32x __x) throw (); 20472: 20472: 20472: extern _Float32x log10f32x (_Float32x __x) throw (); extern _Float32x __log10f32x (_Float32x __x) throw (); 20472: 20472: 20472: extern _Float32x modff32x (_Float32x __x, _Float32x *__iptr) throw (); extern _Float32x __modff32x (_Float32x __x, _Float32x *__iptr) throw () __attribute__ ((__nonnull__ (2))); 20472: 20472: 20472: 20472: extern _Float32x exp10f32x (_Float32x __x) throw (); extern _Float32x __exp10f32x (_Float32x __x) throw (); 20472: 20472: 20472: 20472: 20472: extern _Float32x expm1f32x (_Float32x __x) throw (); extern _Float32x __expm1f32x (_Float32x __x) throw (); 20472: 20472: 20472: extern _Float32x log1pf32x (_Float32x __x) throw (); extern _Float32x __log1pf32x (_Float32x __x) throw (); 20472: 20472: 20472: extern _Float32x logbf32x (_Float32x __x) throw (); extern _Float32x __logbf32x (_Float32x __x) throw (); 20472: 20472: 20472: 20472: 20472: extern _Float32x exp2f32x (_Float32x __x) throw (); extern _Float32x __exp2f32x (_Float32x __x) throw (); 20472: 20472: 20472: extern _Float32x log2f32x (_Float32x __x) throw (); extern _Float32x __log2f32x (_Float32x __x) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern _Float32x powf32x (_Float32x __x, _Float32x __y) throw (); extern _Float32x __powf32x (_Float32x __x, _Float32x __y) throw (); 20472: 20472: 20472: extern _Float32x sqrtf32x (_Float32x __x) throw (); extern _Float32x __sqrtf32x (_Float32x __x) throw (); 20472: 20472: 20472: 20472: extern _Float32x hypotf32x (_Float32x __x, _Float32x __y) throw (); extern _Float32x __hypotf32x (_Float32x __x, _Float32x __y) throw (); 20472: 20472: 20472: 20472: 20472: extern _Float32x cbrtf32x (_Float32x __x) throw (); extern _Float32x __cbrtf32x (_Float32x __x) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern _Float32x ceilf32x (_Float32x __x) throw () __attribute__ ((__const__)); extern _Float32x __ceilf32x (_Float32x __x) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern _Float32x fabsf32x (_Float32x __x) throw () __attribute__ ((__const__)); extern _Float32x __fabsf32x (_Float32x __x) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern _Float32x floorf32x (_Float32x __x) throw () __attribute__ ((__const__)); extern _Float32x __floorf32x (_Float32x __x) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern _Float32x fmodf32x (_Float32x __x, _Float32x __y) throw (); extern _Float32x __fmodf32x (_Float32x __x, _Float32x __y) throw (); 20472: # 196 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 3 4 20472: extern _Float32x copysignf32x (_Float32x __x, _Float32x __y) throw () __attribute__ ((__const__)); extern _Float32x __copysignf32x (_Float32x __x, _Float32x __y) throw () __attribute__ ((__const__)); 20472: 20472: 20472: 20472: 20472: extern _Float32x nanf32x (const char *__tagb) throw (); extern _Float32x __nanf32x (const char *__tagb) throw (); 20472: # 217 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 3 4 20472: extern _Float32x j0f32x (_Float32x) throw (); extern _Float32x __j0f32x (_Float32x) throw (); 20472: extern _Float32x j1f32x (_Float32x) throw (); extern _Float32x __j1f32x (_Float32x) throw (); 20472: extern _Float32x jnf32x (int, _Float32x) throw (); extern _Float32x __jnf32x (int, _Float32x) throw (); 20472: extern _Float32x y0f32x (_Float32x) throw (); extern _Float32x __y0f32x (_Float32x) throw (); 20472: extern _Float32x y1f32x (_Float32x) throw (); extern _Float32x __y1f32x (_Float32x) throw (); 20472: extern _Float32x ynf32x (int, _Float32x) throw (); extern _Float32x __ynf32x (int, _Float32x) throw (); 20472: 20472: 20472: 20472: 20472: 20472: extern _Float32x erff32x (_Float32x) throw (); extern _Float32x __erff32x (_Float32x) throw (); 20472: extern _Float32x erfcf32x (_Float32x) throw (); extern _Float32x __erfcf32x (_Float32x) throw (); 20472: extern _Float32x lgammaf32x (_Float32x) throw (); extern _Float32x __lgammaf32x (_Float32x) throw (); 20472: 20472: 20472: 20472: 20472: extern _Float32x tgammaf32x (_Float32x) throw (); extern _Float32x __tgammaf32x (_Float32x) throw (); 20472: # 249 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 3 4 20472: extern _Float32x lgammaf32x_r (_Float32x, int *__signgamp) throw (); extern _Float32x __lgammaf32x_r (_Float32x, int *__signgamp) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern _Float32x rintf32x (_Float32x __x) throw (); extern _Float32x __rintf32x (_Float32x __x) throw (); 20472: 20472: 20472: extern _Float32x nextafterf32x (_Float32x __x, _Float32x __y) throw (); extern _Float32x __nextafterf32x (_Float32x __x, _Float32x __y) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern _Float32x nextdownf32x (_Float32x __x) throw (); extern _Float32x __nextdownf32x (_Float32x __x) throw (); 20472: 20472: extern _Float32x nextupf32x (_Float32x __x) throw (); extern _Float32x __nextupf32x (_Float32x __x) throw (); 20472: 20472: 20472: 20472: extern _Float32x remainderf32x (_Float32x __x, _Float32x __y) throw (); extern _Float32x __remainderf32x (_Float32x __x, _Float32x __y) throw (); 20472: 20472: 20472: 20472: extern _Float32x scalbnf32x (_Float32x __x, int __n) throw (); extern _Float32x __scalbnf32x (_Float32x __x, int __n) throw (); 20472: 20472: 20472: 20472: extern int ilogbf32x (_Float32x __x) throw (); extern int __ilogbf32x (_Float32x __x) throw (); 20472: 20472: 20472: 20472: 20472: extern long int llogbf32x (_Float32x __x) throw (); extern long int __llogbf32x (_Float32x __x) throw (); 20472: 20472: 20472: 20472: 20472: extern _Float32x scalblnf32x (_Float32x __x, long int __n) throw (); extern _Float32x __scalblnf32x (_Float32x __x, long int __n) throw (); 20472: 20472: 20472: 20472: extern _Float32x nearbyintf32x (_Float32x __x) throw (); extern _Float32x __nearbyintf32x (_Float32x __x) throw (); 20472: 20472: 20472: 20472: extern _Float32x roundf32x (_Float32x __x) throw () __attribute__ ((__const__)); extern _Float32x __roundf32x (_Float32x __x) throw () __attribute__ ((__const__)); 20472: 20472: 20472: 20472: extern _Float32x truncf32x (_Float32x __x) throw () __attribute__ ((__const__)); extern _Float32x __truncf32x (_Float32x __x) throw () __attribute__ ((__const__)); 20472: 20472: 20472: 20472: 20472: extern _Float32x remquof32x (_Float32x __x, _Float32x __y, int *__quo) throw (); extern _Float32x __remquof32x (_Float32x __x, _Float32x __y, int *__quo) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern long int lrintf32x (_Float32x __x) throw (); extern long int __lrintf32x (_Float32x __x) throw (); 20472: __extension__ 20472: extern long long int llrintf32x (_Float32x __x) throw (); extern long long int __llrintf32x (_Float32x __x) throw (); 20472: 20472: 20472: 20472: extern long int lroundf32x (_Float32x __x) throw (); extern long int __lroundf32x (_Float32x __x) throw (); 20472: __extension__ 20472: extern long long int llroundf32x (_Float32x __x) throw (); extern long long int __llroundf32x (_Float32x __x) throw (); 20472: 20472: 20472: 20472: extern _Float32x fdimf32x (_Float32x __x, _Float32x __y) throw (); extern _Float32x __fdimf32x (_Float32x __x, _Float32x __y) throw (); 20472: 20472: 20472: extern _Float32x fmaxf32x (_Float32x __x, _Float32x __y) throw () __attribute__ ((__const__)); extern _Float32x __fmaxf32x (_Float32x __x, _Float32x __y) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern _Float32x fminf32x (_Float32x __x, _Float32x __y) throw () __attribute__ ((__const__)); extern _Float32x __fminf32x (_Float32x __x, _Float32x __y) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern _Float32x fmaf32x (_Float32x __x, _Float32x __y, _Float32x __z) throw (); extern _Float32x __fmaf32x (_Float32x __x, _Float32x __y, _Float32x __z) throw (); 20472: 20472: 20472: 20472: 20472: extern _Float32x roundevenf32x (_Float32x __x) throw () __attribute__ ((__const__)); extern _Float32x __roundevenf32x (_Float32x __x) throw () __attribute__ ((__const__)); 20472: 20472: 20472: 20472: extern __intmax_t fromfpf32x (_Float32x __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfpf32x (_Float32x __x, int __round, unsigned int __width) throw () 20472: ; 20472: 20472: 20472: 20472: extern __uintmax_t ufromfpf32x (_Float32x __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfpf32x (_Float32x __x, int __round, unsigned int __width) throw () 20472: ; 20472: 20472: 20472: 20472: 20472: extern __intmax_t fromfpxf32x (_Float32x __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfpxf32x (_Float32x __x, int __round, unsigned int __width) throw () 20472: ; 20472: 20472: 20472: 20472: 20472: extern __uintmax_t ufromfpxf32x (_Float32x __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfpxf32x (_Float32x __x, int __round, unsigned int __width) throw () 20472: ; 20472: 20472: 20472: extern _Float32x fmaxmagf32x (_Float32x __x, _Float32x __y) throw () __attribute__ ((__const__)); extern _Float32x __fmaxmagf32x (_Float32x __x, _Float32x __y) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern _Float32x fminmagf32x (_Float32x __x, _Float32x __y) throw () __attribute__ ((__const__)); extern _Float32x __fminmagf32x (_Float32x __x, _Float32x __y) throw () __attribute__ ((__const__)); 20472: 20472: 20472: extern int canonicalizef32x (_Float32x *__cx, const _Float32x *__x) throw (); 20472: 20472: 20472: 20472: 20472: extern int totalorderf32x (const _Float32x *__x, const _Float32x *__y) throw () 20472: 20472: __attribute__ ((__pure__)); 20472: 20472: 20472: extern int totalordermagf32x (const _Float32x *__x, const _Float32x *__y) throw () 20472: 20472: __attribute__ ((__pure__)); 20472: 20472: 20472: extern _Float32x getpayloadf32x (const _Float32x *__x) throw (); extern _Float32x __getpayloadf32x (const _Float32x *__x) throw (); 20472: 20472: 20472: extern int setpayloadf32x (_Float32x *__x, _Float32x __payload) throw (); 20472: 20472: 20472: extern int setpayloadsigf32x (_Float32x *__x, _Float32x __payload) throw (); 20472: # 441 "/usr/include/math.h" 2 3 4 20472: # 503 "/usr/include/math.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/mathcalls-narrow.h" 1 3 4 20472: # 24 "/usr/include/arm-linux-gnueabihf/bits/mathcalls-narrow.h" 3 4 20472: extern float fadd (double __x, double __y) throw (); 20472: 20472: 20472: extern float fdiv (double __x, double __y) throw (); 20472: 20472: 20472: extern float fmul (double __x, double __y) throw (); 20472: 20472: 20472: extern float fsub (double __x, double __y) throw (); 20472: # 504 "/usr/include/math.h" 2 3 4 20472: # 517 "/usr/include/math.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/mathcalls-narrow.h" 1 3 4 20472: # 24 "/usr/include/arm-linux-gnueabihf/bits/mathcalls-narrow.h" 3 4 20472: extern float faddl (long double __x, long double __y) throw (); 20472: 20472: 20472: extern float fdivl (long double __x, long double __y) throw (); 20472: 20472: 20472: extern float fmull (long double __x, long double __y) throw (); 20472: 20472: 20472: extern float fsubl (long double __x, long double __y) throw (); 20472: # 518 "/usr/include/math.h" 2 3 4 20472: # 537 "/usr/include/math.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/mathcalls-narrow.h" 1 3 4 20472: # 24 "/usr/include/arm-linux-gnueabihf/bits/mathcalls-narrow.h" 3 4 20472: extern double daddl (long double __x, long double __y) throw (); 20472: 20472: 20472: extern double ddivl (long double __x, long double __y) throw (); 20472: 20472: 20472: extern double dmull (long double __x, long double __y) throw (); 20472: 20472: 20472: extern double dsubl (long double __x, long double __y) throw (); 20472: # 538 "/usr/include/math.h" 2 3 4 20472: # 616 "/usr/include/math.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/mathcalls-narrow.h" 1 3 4 20472: # 24 "/usr/include/arm-linux-gnueabihf/bits/mathcalls-narrow.h" 3 4 20472: extern _Float32 f32addf32x (_Float32x __x, _Float32x __y) throw (); 20472: 20472: 20472: extern _Float32 f32divf32x (_Float32x __x, _Float32x __y) throw (); 20472: 20472: 20472: extern _Float32 f32mulf32x (_Float32x __x, _Float32x __y) throw (); 20472: 20472: 20472: extern _Float32 f32subf32x (_Float32x __x, _Float32x __y) throw (); 20472: # 617 "/usr/include/math.h" 2 3 4 20472: # 626 "/usr/include/math.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/mathcalls-narrow.h" 1 3 4 20472: # 24 "/usr/include/arm-linux-gnueabihf/bits/mathcalls-narrow.h" 3 4 20472: extern _Float32 f32addf64 (_Float64 __x, _Float64 __y) throw (); 20472: 20472: 20472: extern _Float32 f32divf64 (_Float64 __x, _Float64 __y) throw (); 20472: 20472: 20472: extern _Float32 f32mulf64 (_Float64 __x, _Float64 __y) throw (); 20472: 20472: 20472: extern _Float32 f32subf64 (_Float64 __x, _Float64 __y) throw (); 20472: # 627 "/usr/include/math.h" 2 3 4 20472: # 666 "/usr/include/math.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/mathcalls-narrow.h" 1 3 4 20472: # 24 "/usr/include/arm-linux-gnueabihf/bits/mathcalls-narrow.h" 3 4 20472: extern _Float32x f32xaddf64 (_Float64 __x, _Float64 __y) throw (); 20472: 20472: 20472: extern _Float32x f32xdivf64 (_Float64 __x, _Float64 __y) throw (); 20472: 20472: 20472: extern _Float32x f32xmulf64 (_Float64 __x, _Float64 __y) throw (); 20472: 20472: 20472: extern _Float32x f32xsubf64 (_Float64 __x, _Float64 __y) throw (); 20472: # 667 "/usr/include/math.h" 2 3 4 20472: # 773 "/usr/include/math.h" 3 4 20472: extern int signgam; 20472: # 853 "/usr/include/math.h" 3 4 20472: enum 20472: { 20472: FP_NAN = 20472: 20472: 0, 20472: FP_INFINITE = 20472: 20472: 1, 20472: FP_ZERO = 20472: 20472: 2, 20472: FP_SUBNORMAL = 20472: 20472: 3, 20472: FP_NORMAL = 20472: 20472: 4 20472: }; 20472: # 973 "/usr/include/math.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/iscanonical.h" 1 3 4 20472: # 974 "/usr/include/math.h" 2 3 4 20472: # 985 "/usr/include/math.h" 3 4 20472: extern "C++" { 20472: inline int issignaling (float __val) { return __issignalingf (__val); } 20472: inline int issignaling (double __val) { return __issignaling (__val); } 20472: inline int 20472: issignaling (long double __val) 20472: { 20472: 20472: return __issignaling (__val); 20472: 20472: 20472: 20472: } 20472: 20472: 20472: 20472: 20472: 20472: } 20472: # 1016 "/usr/include/math.h" 3 4 20472: extern "C++" { 20472: # 1047 "/usr/include/math.h" 3 4 20472: template inline bool 20472: iszero (__T __val) 20472: { 20472: return __val == 0; 20472: } 20472: 20472: } 20472: # 1245 "/usr/include/math.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/mathinline.h" 1 3 4 20472: # 1246 "/usr/include/math.h" 2 3 4 20472: # 1278 "/usr/include/math.h" 3 4 20472: extern "C++" { 20472: template struct __iseqsig_type; 20472: 20472: template<> struct __iseqsig_type 20472: { 20472: static int __call (float __x, float __y) throw () 20472: { 20472: return __iseqsigf (__x, __y); 20472: } 20472: }; 20472: 20472: template<> struct __iseqsig_type 20472: { 20472: static int __call (double __x, double __y) throw () 20472: { 20472: return __iseqsig (__x, __y); 20472: } 20472: }; 20472: 20472: template<> struct __iseqsig_type 20472: { 20472: static int __call (long double __x, long double __y) throw () 20472: { 20472: 20472: 20472: 20472: return __iseqsig (__x, __y); 20472: 20472: } 20472: }; 20472: # 1321 "/usr/include/math.h" 3 4 20472: template 20472: inline int 20472: iseqsig (_T1 __x, _T2 __y) throw () 20472: { 20472: 20472: typedef decltype (((__x) + (__y) + 0.0f)) _T3; 20472: 20472: 20472: 20472: return __iseqsig_type<_T3>::__call (__x, __y); 20472: } 20472: 20472: } 20472: 20472: 20472: 20472: 20472: } 20472: # 46 "/usr/include/c++/10/cmath" 2 3 20472: # 77 "/usr/include/c++/10/cmath" 3 20472: extern "C++" 20472: { 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: using ::acos; 20472: 20472: 20472: inline constexpr float 20472: acos(float __x) 20472: { return __builtin_acosf(__x); } 20472: 20472: inline constexpr long double 20472: acos(long double __x) 20472: { return __builtin_acosl(__x); } 20472: 20472: 20472: template 20472: inline constexpr 20472: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 20472: double>::__type 20472: acos(_Tp __x) 20472: { return __builtin_acos(__x); } 20472: 20472: using ::asin; 20472: 20472: 20472: inline constexpr float 20472: asin(float __x) 20472: { return __builtin_asinf(__x); } 20472: 20472: inline constexpr long double 20472: asin(long double __x) 20472: { return __builtin_asinl(__x); } 20472: 20472: 20472: template 20472: inline constexpr 20472: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 20472: double>::__type 20472: asin(_Tp __x) 20472: { return __builtin_asin(__x); } 20472: 20472: using ::atan; 20472: 20472: 20472: inline constexpr float 20472: atan(float __x) 20472: { return __builtin_atanf(__x); } 20472: 20472: inline constexpr long double 20472: atan(long double __x) 20472: { return __builtin_atanl(__x); } 20472: 20472: 20472: template 20472: inline constexpr 20472: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 20472: double>::__type 20472: atan(_Tp __x) 20472: { return __builtin_atan(__x); } 20472: 20472: using ::atan2; 20472: 20472: 20472: inline constexpr float 20472: atan2(float __y, float __x) 20472: { return __builtin_atan2f(__y, __x); } 20472: 20472: inline constexpr long double 20472: atan2(long double __y, long double __x) 20472: { return __builtin_atan2l(__y, __x); } 20472: 20472: 20472: template 20472: inline constexpr 20472: typename __gnu_cxx::__promote_2<_Tp, _Up>::__type 20472: atan2(_Tp __y, _Up __x) 20472: { 20472: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 20472: return atan2(__type(__y), __type(__x)); 20472: } 20472: 20472: using ::ceil; 20472: 20472: 20472: inline constexpr float 20472: ceil(float __x) 20472: { return __builtin_ceilf(__x); } 20472: 20472: inline constexpr long double 20472: ceil(long double __x) 20472: { return __builtin_ceill(__x); } 20472: 20472: 20472: template 20472: inline constexpr 20472: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 20472: double>::__type 20472: ceil(_Tp __x) 20472: { return __builtin_ceil(__x); } 20472: 20472: using ::cos; 20472: 20472: 20472: inline constexpr float 20472: cos(float __x) 20472: { return __builtin_cosf(__x); } 20472: 20472: inline constexpr long double 20472: cos(long double __x) 20472: { return __builtin_cosl(__x); } 20472: 20472: 20472: template 20472: inline constexpr 20472: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 20472: double>::__type 20472: cos(_Tp __x) 20472: { return __builtin_cos(__x); } 20472: 20472: using ::cosh; 20472: 20472: 20472: inline constexpr float 20472: cosh(float __x) 20472: { return __builtin_coshf(__x); } 20472: 20472: inline constexpr long double 20472: cosh(long double __x) 20472: { return __builtin_coshl(__x); } 20472: 20472: 20472: template 20472: inline constexpr 20472: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 20472: double>::__type 20472: cosh(_Tp __x) 20472: { return __builtin_cosh(__x); } 20472: 20472: using ::exp; 20472: 20472: 20472: inline constexpr float 20472: exp(float __x) 20472: { return __builtin_expf(__x); } 20472: 20472: inline constexpr long double 20472: exp(long double __x) 20472: { return __builtin_expl(__x); } 20472: 20472: 20472: template 20472: inline constexpr 20472: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 20472: double>::__type 20472: exp(_Tp __x) 20472: { return __builtin_exp(__x); } 20472: 20472: using ::fabs; 20472: 20472: 20472: inline constexpr float 20472: fabs(float __x) 20472: { return __builtin_fabsf(__x); } 20472: 20472: inline constexpr long double 20472: fabs(long double __x) 20472: { return __builtin_fabsl(__x); } 20472: 20472: 20472: template 20472: inline constexpr 20472: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 20472: double>::__type 20472: fabs(_Tp __x) 20472: { return __builtin_fabs(__x); } 20472: 20472: using ::floor; 20472: 20472: 20472: inline constexpr float 20472: floor(float __x) 20472: { return __builtin_floorf(__x); } 20472: 20472: inline constexpr long double 20472: floor(long double __x) 20472: { return __builtin_floorl(__x); } 20472: 20472: 20472: template 20472: inline constexpr 20472: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 20472: double>::__type 20472: floor(_Tp __x) 20472: { return __builtin_floor(__x); } 20472: 20472: using ::fmod; 20472: 20472: 20472: inline constexpr float 20472: fmod(float __x, float __y) 20472: { return __builtin_fmodf(__x, __y); } 20472: 20472: inline constexpr long double 20472: fmod(long double __x, long double __y) 20472: { return __builtin_fmodl(__x, __y); } 20472: 20472: 20472: template 20472: inline constexpr 20472: typename __gnu_cxx::__promote_2<_Tp, _Up>::__type 20472: fmod(_Tp __x, _Up __y) 20472: { 20472: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 20472: return fmod(__type(__x), __type(__y)); 20472: } 20472: 20472: using ::frexp; 20472: 20472: 20472: inline float 20472: frexp(float __x, int* __exp) 20472: { return __builtin_frexpf(__x, __exp); } 20472: 20472: inline long double 20472: frexp(long double __x, int* __exp) 20472: { return __builtin_frexpl(__x, __exp); } 20472: 20472: 20472: template 20472: inline constexpr 20472: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 20472: double>::__type 20472: frexp(_Tp __x, int* __exp) 20472: { return __builtin_frexp(__x, __exp); } 20472: 20472: using ::ldexp; 20472: 20472: 20472: inline constexpr float 20472: ldexp(float __x, int __exp) 20472: { return __builtin_ldexpf(__x, __exp); } 20472: 20472: inline constexpr long double 20472: ldexp(long double __x, int __exp) 20472: { return __builtin_ldexpl(__x, __exp); } 20472: 20472: 20472: template 20472: inline constexpr 20472: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 20472: double>::__type 20472: ldexp(_Tp __x, int __exp) 20472: { return __builtin_ldexp(__x, __exp); } 20472: 20472: using ::log; 20472: 20472: 20472: inline constexpr float 20472: log(float __x) 20472: { return __builtin_logf(__x); } 20472: 20472: inline constexpr long double 20472: log(long double __x) 20472: { return __builtin_logl(__x); } 20472: 20472: 20472: template 20472: inline constexpr 20472: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 20472: double>::__type 20472: log(_Tp __x) 20472: { return __builtin_log(__x); } 20472: 20472: using ::log10; 20472: 20472: 20472: inline constexpr float 20472: log10(float __x) 20472: { return __builtin_log10f(__x); } 20472: 20472: inline constexpr long double 20472: log10(long double __x) 20472: { return __builtin_log10l(__x); } 20472: 20472: 20472: template 20472: inline constexpr 20472: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 20472: double>::__type 20472: log10(_Tp __x) 20472: { return __builtin_log10(__x); } 20472: 20472: using ::modf; 20472: 20472: 20472: inline float 20472: modf(float __x, float* __iptr) 20472: { return __builtin_modff(__x, __iptr); } 20472: 20472: inline long double 20472: modf(long double __x, long double* __iptr) 20472: { return __builtin_modfl(__x, __iptr); } 20472: 20472: 20472: using ::pow; 20472: 20472: 20472: inline constexpr float 20472: pow(float __x, float __y) 20472: { return __builtin_powf(__x, __y); } 20472: 20472: inline constexpr long double 20472: pow(long double __x, long double __y) 20472: { return __builtin_powl(__x, __y); } 20472: # 412 "/usr/include/c++/10/cmath" 3 20472: template 20472: inline constexpr 20472: typename __gnu_cxx::__promote_2<_Tp, _Up>::__type 20472: pow(_Tp __x, _Up __y) 20472: { 20472: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 20472: return pow(__type(__x), __type(__y)); 20472: } 20472: 20472: using ::sin; 20472: 20472: 20472: inline constexpr float 20472: sin(float __x) 20472: { return __builtin_sinf(__x); } 20472: 20472: inline constexpr long double 20472: sin(long double __x) 20472: { return __builtin_sinl(__x); } 20472: 20472: 20472: template 20472: inline constexpr 20472: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 20472: double>::__type 20472: sin(_Tp __x) 20472: { return __builtin_sin(__x); } 20472: 20472: using ::sinh; 20472: 20472: 20472: inline constexpr float 20472: sinh(float __x) 20472: { return __builtin_sinhf(__x); } 20472: 20472: inline constexpr long double 20472: sinh(long double __x) 20472: { return __builtin_sinhl(__x); } 20472: 20472: 20472: template 20472: inline constexpr 20472: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 20472: double>::__type 20472: sinh(_Tp __x) 20472: { return __builtin_sinh(__x); } 20472: 20472: using ::sqrt; 20472: 20472: 20472: inline constexpr float 20472: sqrt(float __x) 20472: { return __builtin_sqrtf(__x); } 20472: 20472: inline constexpr long double 20472: sqrt(long double __x) 20472: { return __builtin_sqrtl(__x); } 20472: 20472: 20472: template 20472: inline constexpr 20472: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 20472: double>::__type 20472: sqrt(_Tp __x) 20472: { return __builtin_sqrt(__x); } 20472: 20472: using ::tan; 20472: 20472: 20472: inline constexpr float 20472: tan(float __x) 20472: { return __builtin_tanf(__x); } 20472: 20472: inline constexpr long double 20472: tan(long double __x) 20472: { return __builtin_tanl(__x); } 20472: 20472: 20472: template 20472: inline constexpr 20472: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 20472: double>::__type 20472: tan(_Tp __x) 20472: { return __builtin_tan(__x); } 20472: 20472: using ::tanh; 20472: 20472: 20472: inline constexpr float 20472: tanh(float __x) 20472: { return __builtin_tanhf(__x); } 20472: 20472: inline constexpr long double 20472: tanh(long double __x) 20472: { return __builtin_tanhl(__x); } 20472: 20472: 20472: template 20472: inline constexpr 20472: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 20472: double>::__type 20472: tanh(_Tp __x) 20472: { return __builtin_tanh(__x); } 20472: # 536 "/usr/include/c++/10/cmath" 3 20472: constexpr int 20472: fpclassify(float __x) 20472: { return __builtin_fpclassify(0, 1, 4, 20472: 3, 2, __x); } 20472: 20472: constexpr int 20472: fpclassify(double __x) 20472: { return __builtin_fpclassify(0, 1, 4, 20472: 3, 2, __x); } 20472: 20472: constexpr int 20472: fpclassify(long double __x) 20472: { return __builtin_fpclassify(0, 1, 4, 20472: 3, 2, __x); } 20472: 20472: 20472: 20472: template 20472: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 20472: int>::__type 20472: fpclassify(_Tp __x) 20472: { return __x != 0 ? 4 : 2; } 20472: 20472: 20472: 20472: constexpr bool 20472: isfinite(float __x) 20472: { return __builtin_isfinite(__x); } 20472: 20472: constexpr bool 20472: isfinite(double __x) 20472: { return __builtin_isfinite(__x); } 20472: 20472: constexpr bool 20472: isfinite(long double __x) 20472: { return __builtin_isfinite(__x); } 20472: 20472: 20472: 20472: template 20472: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 20472: bool>::__type 20472: isfinite(_Tp __x) 20472: { return true; } 20472: 20472: 20472: 20472: constexpr bool 20472: isinf(float __x) 20472: { return __builtin_isinf(__x); } 20472: 20472: 20472: 20472: 20472: 20472: constexpr bool 20472: isinf(double __x) 20472: { return __builtin_isinf(__x); } 20472: 20472: 20472: constexpr bool 20472: isinf(long double __x) 20472: { return __builtin_isinf(__x); } 20472: 20472: 20472: 20472: template 20472: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 20472: bool>::__type 20472: isinf(_Tp __x) 20472: { return false; } 20472: 20472: 20472: 20472: constexpr bool 20472: isnan(float __x) 20472: { return __builtin_isnan(__x); } 20472: 20472: 20472: 20472: 20472: 20472: constexpr bool 20472: isnan(double __x) 20472: { return __builtin_isnan(__x); } 20472: 20472: 20472: constexpr bool 20472: isnan(long double __x) 20472: { return __builtin_isnan(__x); } 20472: 20472: 20472: 20472: template 20472: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 20472: bool>::__type 20472: isnan(_Tp __x) 20472: { return false; } 20472: 20472: 20472: 20472: constexpr bool 20472: isnormal(float __x) 20472: { return __builtin_isnormal(__x); } 20472: 20472: constexpr bool 20472: isnormal(double __x) 20472: { return __builtin_isnormal(__x); } 20472: 20472: constexpr bool 20472: isnormal(long double __x) 20472: { return __builtin_isnormal(__x); } 20472: 20472: 20472: 20472: template 20472: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 20472: bool>::__type 20472: isnormal(_Tp __x) 20472: { return __x != 0 ? true : false; } 20472: 20472: 20472: 20472: 20472: constexpr bool 20472: signbit(float __x) 20472: { return __builtin_signbit(__x); } 20472: 20472: constexpr bool 20472: signbit(double __x) 20472: { return __builtin_signbit(__x); } 20472: 20472: constexpr bool 20472: signbit(long double __x) 20472: { return __builtin_signbit(__x); } 20472: 20472: 20472: 20472: template 20472: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 20472: bool>::__type 20472: signbit(_Tp __x) 20472: { return __x < 0 ? true : false; } 20472: 20472: 20472: 20472: constexpr bool 20472: isgreater(float __x, float __y) 20472: { return __builtin_isgreater(__x, __y); } 20472: 20472: constexpr bool 20472: isgreater(double __x, double __y) 20472: { return __builtin_isgreater(__x, __y); } 20472: 20472: constexpr bool 20472: isgreater(long double __x, long double __y) 20472: { return __builtin_isgreater(__x, __y); } 20472: 20472: 20472: 20472: template 20472: constexpr typename 20472: __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value 20472: && __is_arithmetic<_Up>::__value), bool>::__type 20472: isgreater(_Tp __x, _Up __y) 20472: { 20472: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 20472: return __builtin_isgreater(__type(__x), __type(__y)); 20472: } 20472: 20472: 20472: 20472: constexpr bool 20472: isgreaterequal(float __x, float __y) 20472: { return __builtin_isgreaterequal(__x, __y); } 20472: 20472: constexpr bool 20472: isgreaterequal(double __x, double __y) 20472: { return __builtin_isgreaterequal(__x, __y); } 20472: 20472: constexpr bool 20472: isgreaterequal(long double __x, long double __y) 20472: { return __builtin_isgreaterequal(__x, __y); } 20472: 20472: 20472: 20472: template 20472: constexpr typename 20472: __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value 20472: && __is_arithmetic<_Up>::__value), bool>::__type 20472: isgreaterequal(_Tp __x, _Up __y) 20472: { 20472: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 20472: return __builtin_isgreaterequal(__type(__x), __type(__y)); 20472: } 20472: 20472: 20472: 20472: constexpr bool 20472: isless(float __x, float __y) 20472: { return __builtin_isless(__x, __y); } 20472: 20472: constexpr bool 20472: isless(double __x, double __y) 20472: { return __builtin_isless(__x, __y); } 20472: 20472: constexpr bool 20472: isless(long double __x, long double __y) 20472: { return __builtin_isless(__x, __y); } 20472: 20472: 20472: 20472: template 20472: constexpr typename 20472: __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value 20472: && __is_arithmetic<_Up>::__value), bool>::__type 20472: isless(_Tp __x, _Up __y) 20472: { 20472: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 20472: return __builtin_isless(__type(__x), __type(__y)); 20472: } 20472: 20472: 20472: 20472: constexpr bool 20472: islessequal(float __x, float __y) 20472: { return __builtin_islessequal(__x, __y); } 20472: 20472: constexpr bool 20472: islessequal(double __x, double __y) 20472: { return __builtin_islessequal(__x, __y); } 20472: 20472: constexpr bool 20472: islessequal(long double __x, long double __y) 20472: { return __builtin_islessequal(__x, __y); } 20472: 20472: 20472: 20472: template 20472: constexpr typename 20472: __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value 20472: && __is_arithmetic<_Up>::__value), bool>::__type 20472: islessequal(_Tp __x, _Up __y) 20472: { 20472: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 20472: return __builtin_islessequal(__type(__x), __type(__y)); 20472: } 20472: 20472: 20472: 20472: constexpr bool 20472: islessgreater(float __x, float __y) 20472: { return __builtin_islessgreater(__x, __y); } 20472: 20472: constexpr bool 20472: islessgreater(double __x, double __y) 20472: { return __builtin_islessgreater(__x, __y); } 20472: 20472: constexpr bool 20472: islessgreater(long double __x, long double __y) 20472: { return __builtin_islessgreater(__x, __y); } 20472: 20472: 20472: 20472: template 20472: constexpr typename 20472: __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value 20472: && __is_arithmetic<_Up>::__value), bool>::__type 20472: islessgreater(_Tp __x, _Up __y) 20472: { 20472: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 20472: return __builtin_islessgreater(__type(__x), __type(__y)); 20472: } 20472: 20472: 20472: 20472: constexpr bool 20472: isunordered(float __x, float __y) 20472: { return __builtin_isunordered(__x, __y); } 20472: 20472: constexpr bool 20472: isunordered(double __x, double __y) 20472: { return __builtin_isunordered(__x, __y); } 20472: 20472: constexpr bool 20472: isunordered(long double __x, long double __y) 20472: { return __builtin_isunordered(__x, __y); } 20472: 20472: 20472: 20472: template 20472: constexpr typename 20472: __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value 20472: && __is_arithmetic<_Up>::__value), bool>::__type 20472: isunordered(_Tp __x, _Up __y) 20472: { 20472: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 20472: return __builtin_isunordered(__type(__x), __type(__y)); 20472: } 20472: # 1065 "/usr/include/c++/10/cmath" 3 20472: using ::double_t; 20472: using ::float_t; 20472: 20472: 20472: using ::acosh; 20472: using ::acoshf; 20472: using ::acoshl; 20472: 20472: using ::asinh; 20472: using ::asinhf; 20472: using ::asinhl; 20472: 20472: using ::atanh; 20472: using ::atanhf; 20472: using ::atanhl; 20472: 20472: using ::cbrt; 20472: using ::cbrtf; 20472: using ::cbrtl; 20472: 20472: using ::copysign; 20472: using ::copysignf; 20472: using ::copysignl; 20472: 20472: using ::erf; 20472: using ::erff; 20472: using ::erfl; 20472: 20472: using ::erfc; 20472: using ::erfcf; 20472: using ::erfcl; 20472: 20472: using ::exp2; 20472: using ::exp2f; 20472: using ::exp2l; 20472: 20472: using ::expm1; 20472: using ::expm1f; 20472: using ::expm1l; 20472: 20472: using ::fdim; 20472: using ::fdimf; 20472: using ::fdiml; 20472: 20472: using ::fma; 20472: using ::fmaf; 20472: using ::fmal; 20472: 20472: using ::fmax; 20472: using ::fmaxf; 20472: using ::fmaxl; 20472: 20472: using ::fmin; 20472: using ::fminf; 20472: using ::fminl; 20472: 20472: using ::hypot; 20472: using ::hypotf; 20472: using ::hypotl; 20472: 20472: using ::ilogb; 20472: using ::ilogbf; 20472: using ::ilogbl; 20472: 20472: using ::lgamma; 20472: using ::lgammaf; 20472: using ::lgammal; 20472: 20472: 20472: using ::llrint; 20472: using ::llrintf; 20472: using ::llrintl; 20472: 20472: using ::llround; 20472: using ::llroundf; 20472: using ::llroundl; 20472: 20472: 20472: using ::log1p; 20472: using ::log1pf; 20472: using ::log1pl; 20472: 20472: using ::log2; 20472: using ::log2f; 20472: using ::log2l; 20472: 20472: using ::logb; 20472: using ::logbf; 20472: using ::logbl; 20472: 20472: using ::lrint; 20472: using ::lrintf; 20472: using ::lrintl; 20472: 20472: using ::lround; 20472: using ::lroundf; 20472: using ::lroundl; 20472: 20472: using ::nan; 20472: using ::nanf; 20472: using ::nanl; 20472: 20472: using ::nearbyint; 20472: using ::nearbyintf; 20472: using ::nearbyintl; 20472: 20472: using ::nextafter; 20472: using ::nextafterf; 20472: using ::nextafterl; 20472: 20472: using ::nexttoward; 20472: using ::nexttowardf; 20472: using ::nexttowardl; 20472: 20472: using ::remainder; 20472: using ::remainderf; 20472: using ::remainderl; 20472: 20472: using ::remquo; 20472: using ::remquof; 20472: using ::remquol; 20472: 20472: using ::rint; 20472: using ::rintf; 20472: using ::rintl; 20472: 20472: using ::round; 20472: using ::roundf; 20472: using ::roundl; 20472: 20472: using ::scalbln; 20472: using ::scalblnf; 20472: using ::scalblnl; 20472: 20472: using ::scalbn; 20472: using ::scalbnf; 20472: using ::scalbnl; 20472: 20472: using ::tgamma; 20472: using ::tgammaf; 20472: using ::tgammal; 20472: 20472: using ::trunc; 20472: using ::truncf; 20472: using ::truncl; 20472: 20472: 20472: 20472: constexpr float 20472: acosh(float __x) 20472: { return __builtin_acoshf(__x); } 20472: 20472: constexpr long double 20472: acosh(long double __x) 20472: { return __builtin_acoshl(__x); } 20472: 20472: 20472: 20472: template 20472: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 20472: double>::__type 20472: acosh(_Tp __x) 20472: { return __builtin_acosh(__x); } 20472: 20472: 20472: 20472: constexpr float 20472: asinh(float __x) 20472: { return __builtin_asinhf(__x); } 20472: 20472: constexpr long double 20472: asinh(long double __x) 20472: { return __builtin_asinhl(__x); } 20472: 20472: 20472: 20472: template 20472: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 20472: double>::__type 20472: asinh(_Tp __x) 20472: { return __builtin_asinh(__x); } 20472: 20472: 20472: 20472: constexpr float 20472: atanh(float __x) 20472: { return __builtin_atanhf(__x); } 20472: 20472: constexpr long double 20472: atanh(long double __x) 20472: { return __builtin_atanhl(__x); } 20472: 20472: 20472: 20472: template 20472: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 20472: double>::__type 20472: atanh(_Tp __x) 20472: { return __builtin_atanh(__x); } 20472: 20472: 20472: 20472: constexpr float 20472: cbrt(float __x) 20472: { return __builtin_cbrtf(__x); } 20472: 20472: constexpr long double 20472: cbrt(long double __x) 20472: { return __builtin_cbrtl(__x); } 20472: 20472: 20472: 20472: template 20472: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 20472: double>::__type 20472: cbrt(_Tp __x) 20472: { return __builtin_cbrt(__x); } 20472: 20472: 20472: 20472: constexpr float 20472: copysign(float __x, float __y) 20472: { return __builtin_copysignf(__x, __y); } 20472: 20472: constexpr long double 20472: copysign(long double __x, long double __y) 20472: { return __builtin_copysignl(__x, __y); } 20472: 20472: 20472: 20472: template 20472: constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type 20472: copysign(_Tp __x, _Up __y) 20472: { 20472: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 20472: return copysign(__type(__x), __type(__y)); 20472: } 20472: 20472: 20472: 20472: constexpr float 20472: erf(float __x) 20472: { return __builtin_erff(__x); } 20472: 20472: constexpr long double 20472: erf(long double __x) 20472: { return __builtin_erfl(__x); } 20472: 20472: 20472: 20472: template 20472: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 20472: double>::__type 20472: erf(_Tp __x) 20472: { return __builtin_erf(__x); } 20472: 20472: 20472: 20472: constexpr float 20472: erfc(float __x) 20472: { return __builtin_erfcf(__x); } 20472: 20472: constexpr long double 20472: erfc(long double __x) 20472: { return __builtin_erfcl(__x); } 20472: 20472: 20472: 20472: template 20472: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 20472: double>::__type 20472: erfc(_Tp __x) 20472: { return __builtin_erfc(__x); } 20472: 20472: 20472: 20472: constexpr float 20472: exp2(float __x) 20472: { return __builtin_exp2f(__x); } 20472: 20472: constexpr long double 20472: exp2(long double __x) 20472: { return __builtin_exp2l(__x); } 20472: 20472: 20472: 20472: template 20472: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 20472: double>::__type 20472: exp2(_Tp __x) 20472: { return __builtin_exp2(__x); } 20472: 20472: 20472: 20472: constexpr float 20472: expm1(float __x) 20472: { return __builtin_expm1f(__x); } 20472: 20472: constexpr long double 20472: expm1(long double __x) 20472: { return __builtin_expm1l(__x); } 20472: 20472: 20472: 20472: template 20472: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 20472: double>::__type 20472: expm1(_Tp __x) 20472: { return __builtin_expm1(__x); } 20472: 20472: 20472: 20472: constexpr float 20472: fdim(float __x, float __y) 20472: { return __builtin_fdimf(__x, __y); } 20472: 20472: constexpr long double 20472: fdim(long double __x, long double __y) 20472: { return __builtin_fdiml(__x, __y); } 20472: 20472: 20472: 20472: template 20472: constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type 20472: fdim(_Tp __x, _Up __y) 20472: { 20472: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 20472: return fdim(__type(__x), __type(__y)); 20472: } 20472: 20472: 20472: 20472: constexpr float 20472: fma(float __x, float __y, float __z) 20472: { return __builtin_fmaf(__x, __y, __z); } 20472: 20472: constexpr long double 20472: fma(long double __x, long double __y, long double __z) 20472: { return __builtin_fmal(__x, __y, __z); } 20472: 20472: 20472: 20472: template 20472: constexpr typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type 20472: fma(_Tp __x, _Up __y, _Vp __z) 20472: { 20472: typedef typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type __type; 20472: return fma(__type(__x), __type(__y), __type(__z)); 20472: } 20472: 20472: 20472: 20472: constexpr float 20472: fmax(float __x, float __y) 20472: { return __builtin_fmaxf(__x, __y); } 20472: 20472: constexpr long double 20472: fmax(long double __x, long double __y) 20472: { return __builtin_fmaxl(__x, __y); } 20472: 20472: 20472: 20472: template 20472: constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type 20472: fmax(_Tp __x, _Up __y) 20472: { 20472: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 20472: return fmax(__type(__x), __type(__y)); 20472: } 20472: 20472: 20472: 20472: constexpr float 20472: fmin(float __x, float __y) 20472: { return __builtin_fminf(__x, __y); } 20472: 20472: constexpr long double 20472: fmin(long double __x, long double __y) 20472: { return __builtin_fminl(__x, __y); } 20472: 20472: 20472: 20472: template 20472: constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type 20472: fmin(_Tp __x, _Up __y) 20472: { 20472: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 20472: return fmin(__type(__x), __type(__y)); 20472: } 20472: 20472: 20472: 20472: constexpr float 20472: hypot(float __x, float __y) 20472: { return __builtin_hypotf(__x, __y); } 20472: 20472: constexpr long double 20472: hypot(long double __x, long double __y) 20472: { return __builtin_hypotl(__x, __y); } 20472: 20472: 20472: 20472: template 20472: constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type 20472: hypot(_Tp __x, _Up __y) 20472: { 20472: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 20472: return hypot(__type(__x), __type(__y)); 20472: } 20472: 20472: 20472: 20472: constexpr int 20472: ilogb(float __x) 20472: { return __builtin_ilogbf(__x); } 20472: 20472: constexpr int 20472: ilogb(long double __x) 20472: { return __builtin_ilogbl(__x); } 20472: 20472: 20472: 20472: template 20472: constexpr 20472: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 20472: int>::__type 20472: ilogb(_Tp __x) 20472: { return __builtin_ilogb(__x); } 20472: 20472: 20472: 20472: constexpr float 20472: lgamma(float __x) 20472: { return __builtin_lgammaf(__x); } 20472: 20472: constexpr long double 20472: lgamma(long double __x) 20472: { return __builtin_lgammal(__x); } 20472: 20472: 20472: 20472: template 20472: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 20472: double>::__type 20472: lgamma(_Tp __x) 20472: { return __builtin_lgamma(__x); } 20472: 20472: 20472: 20472: constexpr long long 20472: llrint(float __x) 20472: { return __builtin_llrintf(__x); } 20472: 20472: constexpr long long 20472: llrint(long double __x) 20472: { return __builtin_llrintl(__x); } 20472: 20472: 20472: 20472: template 20472: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 20472: long long>::__type 20472: llrint(_Tp __x) 20472: { return __builtin_llrint(__x); } 20472: 20472: 20472: 20472: constexpr long long 20472: llround(float __x) 20472: { return __builtin_llroundf(__x); } 20472: 20472: constexpr long long 20472: llround(long double __x) 20472: { return __builtin_llroundl(__x); } 20472: 20472: 20472: 20472: template 20472: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 20472: long long>::__type 20472: llround(_Tp __x) 20472: { return __builtin_llround(__x); } 20472: 20472: 20472: 20472: constexpr float 20472: log1p(float __x) 20472: { return __builtin_log1pf(__x); } 20472: 20472: constexpr long double 20472: log1p(long double __x) 20472: { return __builtin_log1pl(__x); } 20472: 20472: 20472: 20472: template 20472: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 20472: double>::__type 20472: log1p(_Tp __x) 20472: { return __builtin_log1p(__x); } 20472: 20472: 20472: 20472: 20472: constexpr float 20472: log2(float __x) 20472: { return __builtin_log2f(__x); } 20472: 20472: constexpr long double 20472: log2(long double __x) 20472: { return __builtin_log2l(__x); } 20472: 20472: 20472: 20472: template 20472: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 20472: double>::__type 20472: log2(_Tp __x) 20472: { return __builtin_log2(__x); } 20472: 20472: 20472: 20472: constexpr float 20472: logb(float __x) 20472: { return __builtin_logbf(__x); } 20472: 20472: constexpr long double 20472: logb(long double __x) 20472: { return __builtin_logbl(__x); } 20472: 20472: 20472: 20472: template 20472: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 20472: double>::__type 20472: logb(_Tp __x) 20472: { return __builtin_logb(__x); } 20472: 20472: 20472: 20472: constexpr long 20472: lrint(float __x) 20472: { return __builtin_lrintf(__x); } 20472: 20472: constexpr long 20472: lrint(long double __x) 20472: { return __builtin_lrintl(__x); } 20472: 20472: 20472: 20472: template 20472: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 20472: long>::__type 20472: lrint(_Tp __x) 20472: { return __builtin_lrint(__x); } 20472: 20472: 20472: 20472: constexpr long 20472: lround(float __x) 20472: { return __builtin_lroundf(__x); } 20472: 20472: constexpr long 20472: lround(long double __x) 20472: { return __builtin_lroundl(__x); } 20472: 20472: 20472: 20472: template 20472: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 20472: long>::__type 20472: lround(_Tp __x) 20472: { return __builtin_lround(__x); } 20472: 20472: 20472: 20472: constexpr float 20472: nearbyint(float __x) 20472: { return __builtin_nearbyintf(__x); } 20472: 20472: constexpr long double 20472: nearbyint(long double __x) 20472: { return __builtin_nearbyintl(__x); } 20472: 20472: 20472: 20472: template 20472: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 20472: double>::__type 20472: nearbyint(_Tp __x) 20472: { return __builtin_nearbyint(__x); } 20472: 20472: 20472: 20472: constexpr float 20472: nextafter(float __x, float __y) 20472: { return __builtin_nextafterf(__x, __y); } 20472: 20472: constexpr long double 20472: nextafter(long double __x, long double __y) 20472: { return __builtin_nextafterl(__x, __y); } 20472: 20472: 20472: 20472: template 20472: constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type 20472: nextafter(_Tp __x, _Up __y) 20472: { 20472: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 20472: return nextafter(__type(__x), __type(__y)); 20472: } 20472: 20472: 20472: 20472: constexpr float 20472: nexttoward(float __x, long double __y) 20472: { return __builtin_nexttowardf(__x, __y); } 20472: 20472: constexpr long double 20472: nexttoward(long double __x, long double __y) 20472: { return __builtin_nexttowardl(__x, __y); } 20472: 20472: 20472: 20472: template 20472: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 20472: double>::__type 20472: nexttoward(_Tp __x, long double __y) 20472: { return __builtin_nexttoward(__x, __y); } 20472: 20472: 20472: 20472: constexpr float 20472: remainder(float __x, float __y) 20472: { return __builtin_remainderf(__x, __y); } 20472: 20472: constexpr long double 20472: remainder(long double __x, long double __y) 20472: { return __builtin_remainderl(__x, __y); } 20472: 20472: 20472: 20472: template 20472: constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type 20472: remainder(_Tp __x, _Up __y) 20472: { 20472: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 20472: return remainder(__type(__x), __type(__y)); 20472: } 20472: 20472: 20472: 20472: inline float 20472: remquo(float __x, float __y, int* __pquo) 20472: { return __builtin_remquof(__x, __y, __pquo); } 20472: 20472: inline long double 20472: remquo(long double __x, long double __y, int* __pquo) 20472: { return __builtin_remquol(__x, __y, __pquo); } 20472: 20472: 20472: 20472: template 20472: inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type 20472: remquo(_Tp __x, _Up __y, int* __pquo) 20472: { 20472: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 20472: return remquo(__type(__x), __type(__y), __pquo); 20472: } 20472: 20472: 20472: 20472: constexpr float 20472: rint(float __x) 20472: { return __builtin_rintf(__x); } 20472: 20472: constexpr long double 20472: rint(long double __x) 20472: { return __builtin_rintl(__x); } 20472: 20472: 20472: 20472: template 20472: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 20472: double>::__type 20472: rint(_Tp __x) 20472: { return __builtin_rint(__x); } 20472: 20472: 20472: 20472: constexpr float 20472: round(float __x) 20472: { return __builtin_roundf(__x); } 20472: 20472: constexpr long double 20472: round(long double __x) 20472: { return __builtin_roundl(__x); } 20472: 20472: 20472: 20472: template 20472: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 20472: double>::__type 20472: round(_Tp __x) 20472: { return __builtin_round(__x); } 20472: 20472: 20472: 20472: constexpr float 20472: scalbln(float __x, long __ex) 20472: { return __builtin_scalblnf(__x, __ex); } 20472: 20472: constexpr long double 20472: scalbln(long double __x, long __ex) 20472: { return __builtin_scalblnl(__x, __ex); } 20472: 20472: 20472: 20472: template 20472: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 20472: double>::__type 20472: scalbln(_Tp __x, long __ex) 20472: { return __builtin_scalbln(__x, __ex); } 20472: 20472: 20472: 20472: constexpr float 20472: scalbn(float __x, int __ex) 20472: { return __builtin_scalbnf(__x, __ex); } 20472: 20472: constexpr long double 20472: scalbn(long double __x, int __ex) 20472: { return __builtin_scalbnl(__x, __ex); } 20472: 20472: 20472: 20472: template 20472: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 20472: double>::__type 20472: scalbn(_Tp __x, int __ex) 20472: { return __builtin_scalbn(__x, __ex); } 20472: 20472: 20472: 20472: constexpr float 20472: tgamma(float __x) 20472: { return __builtin_tgammaf(__x); } 20472: 20472: constexpr long double 20472: tgamma(long double __x) 20472: { return __builtin_tgammal(__x); } 20472: 20472: 20472: 20472: template 20472: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 20472: double>::__type 20472: tgamma(_Tp __x) 20472: { return __builtin_tgamma(__x); } 20472: 20472: 20472: 20472: constexpr float 20472: trunc(float __x) 20472: { return __builtin_truncf(__x); } 20472: 20472: constexpr long double 20472: trunc(long double __x) 20472: { return __builtin_truncl(__x); } 20472: 20472: 20472: 20472: template 20472: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 20472: double>::__type 20472: trunc(_Tp __x) 20472: { return __builtin_trunc(__x); } 20472: # 1923 "/usr/include/c++/10/cmath" 3 20472: 20472: } 20472: 20472: 20472: 20472: 20472: 20472: } 20472: # 39 "/usr/include/c++/10/random" 2 3 20472: # 1 "/usr/include/c++/10/cstdlib" 1 3 20472: # 39 "/usr/include/c++/10/cstdlib" 3 20472: 20472: # 40 "/usr/include/c++/10/cstdlib" 3 20472: # 40 "/usr/include/c++/10/random" 2 3 20472: # 49 "/usr/include/c++/10/random" 3 20472: # 1 "/usr/include/c++/10/bits/random.h" 1 3 20472: # 37 "/usr/include/c++/10/bits/random.h" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: # 58 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: _RealType 20472: generate_canonical(_UniformRandomNumberGenerator& __g); 20472: 20472: 20472: 20472: 20472: namespace __detail 20472: { 20472: template 20472: (std::numeric_limits<_UIntType>::digits)> 20472: struct _Shift 20472: { static const _UIntType __value = 0; }; 20472: 20472: template 20472: struct _Shift<_UIntType, __w, true> 20472: { static const _UIntType __value = _UIntType(1) << __w; }; 20472: 20472: template 20472: struct _Select_uint_least_t 20472: { 20472: static_assert(__which < 0, 20472: "sorry, would be too much trouble for a slow result"); 20472: }; 20472: 20472: template 20472: struct _Select_uint_least_t<__s, 4> 20472: { typedef unsigned int type; }; 20472: 20472: template 20472: struct _Select_uint_least_t<__s, 3> 20472: { typedef unsigned long type; }; 20472: 20472: template 20472: struct _Select_uint_least_t<__s, 2> 20472: { typedef unsigned long long type; }; 20472: # 109 "/usr/include/c++/10/bits/random.h" 3 20472: template= __m - 1), 20472: bool __schrage_ok = __m % __a < __m / __a> 20472: struct _Mod 20472: { 20472: typedef typename _Select_uint_least_t::type _Tp2; 20472: static _Tp 20472: __calc(_Tp __x) 20472: { return static_cast<_Tp>((_Tp2(__a) * __x + __c) % __m); } 20472: }; 20472: 20472: 20472: template 20472: struct _Mod<_Tp, __m, __a, __c, false, true> 20472: { 20472: static _Tp 20472: __calc(_Tp __x); 20472: }; 20472: 20472: 20472: 20472: 20472: template 20472: struct _Mod<_Tp, __m, __a, __c, true, __s> 20472: { 20472: static _Tp 20472: __calc(_Tp __x) 20472: { 20472: _Tp __res = __a * __x + __c; 20472: if (__m) 20472: __res %= __m; 20472: return __res; 20472: } 20472: }; 20472: 20472: template 20472: inline _Tp 20472: __mod(_Tp __x) 20472: { return _Mod<_Tp, __m, __a, __c>::__calc(__x); } 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct _Adaptor 20472: { 20472: static_assert(std::is_floating_point<_DInputType>::value, 20472: "template argument must be a floating point type"); 20472: 20472: public: 20472: _Adaptor(_Engine& __g) 20472: : _M_g(__g) { } 20472: 20472: _DInputType 20472: min() const 20472: { return _DInputType(0); } 20472: 20472: _DInputType 20472: max() const 20472: { return _DInputType(1); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: _DInputType 20472: operator()() 20472: { 20472: return std::generate_canonical<_DInputType, 20472: std::numeric_limits<_DInputType>::digits, 20472: _Engine>(_M_g); 20472: } 20472: 20472: private: 20472: _Engine& _M_g; 20472: }; 20472: 20472: template 20472: using __seed_seq_generate_t = decltype( 20472: std::declval<_Sseq&>().generate(std::declval(), 20472: std::declval())); 20472: 20472: 20472: 20472: template> 20472: using __is_seed_seq = __and_< 20472: __not_, _Engine>>, 20472: is_unsigned, 20472: __not_> 20472: >; 20472: 20472: } 20472: # 245 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: class linear_congruential_engine 20472: { 20472: static_assert(std::is_unsigned<_UIntType>::value, 20472: "result_type must be an unsigned integral type"); 20472: static_assert(__m == 0u || (__a < __m && __c < __m), 20472: "template argument substituting __m out of bounds"); 20472: 20472: template 20472: using _If_seed_seq = typename enable_if<__detail::__is_seed_seq< 20472: _Sseq, linear_congruential_engine, _UIntType>::value>::type; 20472: 20472: public: 20472: 20472: typedef _UIntType result_type; 20472: 20472: 20472: static constexpr result_type multiplier = __a; 20472: 20472: static constexpr result_type increment = __c; 20472: 20472: static constexpr result_type modulus = __m; 20472: static constexpr result_type default_seed = 1u; 20472: 20472: 20472: 20472: 20472: 20472: linear_congruential_engine() : linear_congruential_engine(default_seed) 20472: { } 20472: # 283 "/usr/include/c++/10/bits/random.h" 3 20472: explicit 20472: linear_congruential_engine(result_type __s) 20472: { seed(__s); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template> 20472: explicit 20472: linear_congruential_engine(_Sseq& __q) 20472: { seed(__q); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: void 20472: seed(result_type __s = default_seed); 20472: # 314 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: _If_seed_seq<_Sseq> 20472: seed(_Sseq& __q); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: static constexpr result_type 20472: min() 20472: { return __c == 0u ? 1u : 0u; } 20472: 20472: 20472: 20472: 20472: static constexpr result_type 20472: max() 20472: { return __m - 1u; } 20472: 20472: 20472: 20472: 20472: void 20472: discard(unsigned long long __z) 20472: { 20472: for (; __z != 0ULL; --__z) 20472: (*this)(); 20472: } 20472: 20472: 20472: 20472: 20472: result_type 20472: operator()() 20472: { 20472: _M_x = __detail::__mod<_UIntType, __m, __a, __c>(_M_x); 20472: return _M_x; 20472: } 20472: # 366 "/usr/include/c++/10/bits/random.h" 3 20472: friend bool 20472: operator==(const linear_congruential_engine& __lhs, 20472: const linear_congruential_engine& __rhs) 20472: { return __lhs._M_x == __rhs._M_x; } 20472: # 379 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: friend std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 20472: const std::linear_congruential_engine<_UIntType1, 20472: __a1, __c1, __m1>& __lcr); 20472: # 399 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: friend std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>& __is, 20472: std::linear_congruential_engine<_UIntType1, __a1, 20472: __c1, __m1>& __lcr); 20472: 20472: private: 20472: _UIntType _M_x; 20472: }; 20472: # 421 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: inline bool 20472: operator!=(const std::linear_congruential_engine<_UIntType, __a, 20472: __c, __m>& __lhs, 20472: const std::linear_congruential_engine<_UIntType, __a, 20472: __c, __m>& __rhs) 20472: { return !(__lhs == __rhs); } 20472: # 458 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: class mersenne_twister_engine 20472: { 20472: static_assert(std::is_unsigned<_UIntType>::value, 20472: "result_type must be an unsigned integral type"); 20472: static_assert(1u <= __m && __m <= __n, 20472: "template argument substituting __m out of bounds"); 20472: static_assert(__r <= __w, "template argument substituting " 20472: "__r out of bound"); 20472: static_assert(__u <= __w, "template argument substituting " 20472: "__u out of bound"); 20472: static_assert(__s <= __w, "template argument substituting " 20472: "__s out of bound"); 20472: static_assert(__t <= __w, "template argument substituting " 20472: "__t out of bound"); 20472: static_assert(__l <= __w, "template argument substituting " 20472: "__l out of bound"); 20472: static_assert(__w <= std::numeric_limits<_UIntType>::digits, 20472: "template argument substituting __w out of bound"); 20472: static_assert(__a <= (__detail::_Shift<_UIntType, __w>::__value - 1), 20472: "template argument substituting __a out of bound"); 20472: static_assert(__b <= (__detail::_Shift<_UIntType, __w>::__value - 1), 20472: "template argument substituting __b out of bound"); 20472: static_assert(__c <= (__detail::_Shift<_UIntType, __w>::__value - 1), 20472: "template argument substituting __c out of bound"); 20472: static_assert(__d <= (__detail::_Shift<_UIntType, __w>::__value - 1), 20472: "template argument substituting __d out of bound"); 20472: static_assert(__f <= (__detail::_Shift<_UIntType, __w>::__value - 1), 20472: "template argument substituting __f out of bound"); 20472: 20472: template 20472: using _If_seed_seq = typename enable_if<__detail::__is_seed_seq< 20472: _Sseq, mersenne_twister_engine, _UIntType>::value>::type; 20472: 20472: public: 20472: 20472: typedef _UIntType result_type; 20472: 20472: 20472: static constexpr size_t word_size = __w; 20472: static constexpr size_t state_size = __n; 20472: static constexpr size_t shift_size = __m; 20472: static constexpr size_t mask_bits = __r; 20472: static constexpr result_type xor_mask = __a; 20472: static constexpr size_t tempering_u = __u; 20472: static constexpr result_type tempering_d = __d; 20472: static constexpr size_t tempering_s = __s; 20472: static constexpr result_type tempering_b = __b; 20472: static constexpr size_t tempering_t = __t; 20472: static constexpr result_type tempering_c = __c; 20472: static constexpr size_t tempering_l = __l; 20472: static constexpr result_type initialization_multiplier = __f; 20472: static constexpr result_type default_seed = 5489u; 20472: 20472: 20472: 20472: mersenne_twister_engine() : mersenne_twister_engine(default_seed) { } 20472: 20472: explicit 20472: mersenne_twister_engine(result_type __sd) 20472: { seed(__sd); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template> 20472: explicit 20472: mersenne_twister_engine(_Sseq& __q) 20472: { seed(__q); } 20472: 20472: void 20472: seed(result_type __sd = default_seed); 20472: 20472: template 20472: _If_seed_seq<_Sseq> 20472: seed(_Sseq& __q); 20472: 20472: 20472: 20472: 20472: static constexpr result_type 20472: min() 20472: { return 0; } 20472: 20472: 20472: 20472: 20472: static constexpr result_type 20472: max() 20472: { return __detail::_Shift<_UIntType, __w>::__value - 1; } 20472: 20472: 20472: 20472: 20472: void 20472: discard(unsigned long long __z); 20472: 20472: result_type 20472: operator()(); 20472: # 577 "/usr/include/c++/10/bits/random.h" 3 20472: friend bool 20472: operator==(const mersenne_twister_engine& __lhs, 20472: const mersenne_twister_engine& __rhs) 20472: { return (std::equal(__lhs._M_x, __lhs._M_x + state_size, __rhs._M_x) 20472: && __lhs._M_p == __rhs._M_p); } 20472: # 595 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: friend std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 20472: const std::mersenne_twister_engine<_UIntType1, __w1, __n1, 20472: __m1, __r1, __a1, __u1, __d1, __s1, __b1, __t1, __c1, 20472: __l1, __f1>& __x); 20472: # 621 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: friend std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>& __is, 20472: std::mersenne_twister_engine<_UIntType1, __w1, __n1, __m1, 20472: __r1, __a1, __u1, __d1, __s1, __b1, __t1, __c1, 20472: __l1, __f1>& __x); 20472: 20472: private: 20472: void _M_gen_rand(); 20472: 20472: _UIntType _M_x[state_size]; 20472: size_t _M_p; 20472: }; 20472: # 654 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: inline bool 20472: operator!=(const std::mersenne_twister_engine<_UIntType, __w, __n, __m, 20472: __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>& __lhs, 20472: const std::mersenne_twister_engine<_UIntType, __w, __n, __m, 20472: __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>& __rhs) 20472: { return !(__lhs == __rhs); } 20472: # 682 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: class subtract_with_carry_engine 20472: { 20472: static_assert(std::is_unsigned<_UIntType>::value, 20472: "result_type must be an unsigned integral type"); 20472: static_assert(0u < __s && __s < __r, 20472: "0 < s < r"); 20472: static_assert(0u < __w && __w <= std::numeric_limits<_UIntType>::digits, 20472: "template argument substituting __w out of bounds"); 20472: 20472: template 20472: using _If_seed_seq = typename enable_if<__detail::__is_seed_seq< 20472: _Sseq, subtract_with_carry_engine, _UIntType>::value>::type; 20472: 20472: public: 20472: 20472: typedef _UIntType result_type; 20472: 20472: 20472: static constexpr size_t word_size = __w; 20472: static constexpr size_t short_lag = __s; 20472: static constexpr size_t long_lag = __r; 20472: static constexpr result_type default_seed = 19780503u; 20472: 20472: subtract_with_carry_engine() : subtract_with_carry_engine(default_seed) 20472: { } 20472: 20472: 20472: 20472: 20472: 20472: explicit 20472: subtract_with_carry_engine(result_type __sd) 20472: { seed(__sd); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template> 20472: explicit 20472: subtract_with_carry_engine(_Sseq& __q) 20472: { seed(__q); } 20472: # 740 "/usr/include/c++/10/bits/random.h" 3 20472: void 20472: seed(result_type __sd = default_seed); 20472: 20472: 20472: 20472: 20472: 20472: template 20472: _If_seed_seq<_Sseq> 20472: seed(_Sseq& __q); 20472: 20472: 20472: 20472: 20472: 20472: static constexpr result_type 20472: min() 20472: { return 0; } 20472: 20472: 20472: 20472: 20472: 20472: static constexpr result_type 20472: max() 20472: { return __detail::_Shift<_UIntType, __w>::__value - 1; } 20472: 20472: 20472: 20472: 20472: void 20472: discard(unsigned long long __z) 20472: { 20472: for (; __z != 0ULL; --__z) 20472: (*this)(); 20472: } 20472: 20472: 20472: 20472: 20472: result_type 20472: operator()(); 20472: # 795 "/usr/include/c++/10/bits/random.h" 3 20472: friend bool 20472: operator==(const subtract_with_carry_engine& __lhs, 20472: const subtract_with_carry_engine& __rhs) 20472: { return (std::equal(__lhs._M_x, __lhs._M_x + long_lag, __rhs._M_x) 20472: && __lhs._M_carry == __rhs._M_carry 20472: && __lhs._M_p == __rhs._M_p); } 20472: # 814 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: friend std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 20472: const std::subtract_with_carry_engine<_UIntType1, __w1, 20472: __s1, __r1>& __x); 20472: # 833 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: friend std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>& __is, 20472: std::subtract_with_carry_engine<_UIntType1, __w1, 20472: __s1, __r1>& __x); 20472: 20472: private: 20472: 20472: _UIntType _M_x[long_lag]; 20472: _UIntType _M_carry; 20472: size_t _M_p; 20472: }; 20472: # 859 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: inline bool 20472: operator!=(const std::subtract_with_carry_engine<_UIntType, __w, 20472: __s, __r>& __lhs, 20472: const std::subtract_with_carry_engine<_UIntType, __w, 20472: __s, __r>& __rhs) 20472: { return !(__lhs == __rhs); } 20472: # 874 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: class discard_block_engine 20472: { 20472: static_assert(1 <= __r && __r <= __p, 20472: "template argument substituting __r out of bounds"); 20472: 20472: public: 20472: 20472: typedef typename _RandomNumberEngine::result_type result_type; 20472: 20472: template 20472: using _If_seed_seq = typename enable_if<__detail::__is_seed_seq< 20472: _Sseq, discard_block_engine, result_type>::value>::type; 20472: 20472: 20472: static constexpr size_t block_size = __p; 20472: static constexpr size_t used_block = __r; 20472: 20472: 20472: 20472: 20472: 20472: 20472: discard_block_engine() 20472: : _M_b(), _M_n(0) { } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: explicit 20472: discard_block_engine(const _RandomNumberEngine& __rng) 20472: : _M_b(__rng), _M_n(0) { } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: explicit 20472: discard_block_engine(_RandomNumberEngine&& __rng) 20472: : _M_b(std::move(__rng)), _M_n(0) { } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: explicit 20472: discard_block_engine(result_type __s) 20472: : _M_b(__s), _M_n(0) { } 20472: 20472: 20472: 20472: 20472: 20472: 20472: template> 20472: explicit 20472: discard_block_engine(_Sseq& __q) 20472: : _M_b(__q), _M_n(0) 20472: { } 20472: 20472: 20472: 20472: 20472: 20472: void 20472: seed() 20472: { 20472: _M_b.seed(); 20472: _M_n = 0; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: void 20472: seed(result_type __s) 20472: { 20472: _M_b.seed(__s); 20472: _M_n = 0; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: _If_seed_seq<_Sseq> 20472: seed(_Sseq& __q) 20472: { 20472: _M_b.seed(__q); 20472: _M_n = 0; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: const _RandomNumberEngine& 20472: base() const noexcept 20472: { return _M_b; } 20472: 20472: 20472: 20472: 20472: static constexpr result_type 20472: min() 20472: { return _RandomNumberEngine::min(); } 20472: 20472: 20472: 20472: 20472: static constexpr result_type 20472: max() 20472: { return _RandomNumberEngine::max(); } 20472: 20472: 20472: 20472: 20472: void 20472: discard(unsigned long long __z) 20472: { 20472: for (; __z != 0ULL; --__z) 20472: (*this)(); 20472: } 20472: 20472: 20472: 20472: 20472: result_type 20472: operator()(); 20472: # 1025 "/usr/include/c++/10/bits/random.h" 3 20472: friend bool 20472: operator==(const discard_block_engine& __lhs, 20472: const discard_block_engine& __rhs) 20472: { return __lhs._M_b == __rhs._M_b && __lhs._M_n == __rhs._M_n; } 20472: # 1041 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: friend std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 20472: const std::discard_block_engine<_RandomNumberEngine1, 20472: __p1, __r1>& __x); 20472: # 1059 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: friend std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>& __is, 20472: std::discard_block_engine<_RandomNumberEngine1, 20472: __p1, __r1>& __x); 20472: 20472: private: 20472: _RandomNumberEngine _M_b; 20472: size_t _M_n; 20472: }; 20472: # 1082 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: inline bool 20472: operator!=(const std::discard_block_engine<_RandomNumberEngine, __p, 20472: __r>& __lhs, 20472: const std::discard_block_engine<_RandomNumberEngine, __p, 20472: __r>& __rhs) 20472: { return !(__lhs == __rhs); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: class independent_bits_engine 20472: { 20472: static_assert(std::is_unsigned<_UIntType>::value, 20472: "result_type must be an unsigned integral type"); 20472: static_assert(0u < __w && __w <= std::numeric_limits<_UIntType>::digits, 20472: "template argument substituting __w out of bounds"); 20472: 20472: template 20472: using _If_seed_seq = typename enable_if<__detail::__is_seed_seq< 20472: _Sseq, independent_bits_engine, _UIntType>::value>::type; 20472: 20472: public: 20472: 20472: typedef _UIntType result_type; 20472: 20472: 20472: 20472: 20472: 20472: 20472: independent_bits_engine() 20472: : _M_b() { } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: explicit 20472: independent_bits_engine(const _RandomNumberEngine& __rng) 20472: : _M_b(__rng) { } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: explicit 20472: independent_bits_engine(_RandomNumberEngine&& __rng) 20472: : _M_b(std::move(__rng)) { } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: explicit 20472: independent_bits_engine(result_type __s) 20472: : _M_b(__s) { } 20472: 20472: 20472: 20472: 20472: 20472: 20472: template> 20472: explicit 20472: independent_bits_engine(_Sseq& __q) 20472: : _M_b(__q) 20472: { } 20472: 20472: 20472: 20472: 20472: 20472: void 20472: seed() 20472: { _M_b.seed(); } 20472: 20472: 20472: 20472: 20472: 20472: void 20472: seed(result_type __s) 20472: { _M_b.seed(__s); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: _If_seed_seq<_Sseq> 20472: seed(_Sseq& __q) 20472: { _M_b.seed(__q); } 20472: 20472: 20472: 20472: 20472: 20472: const _RandomNumberEngine& 20472: base() const noexcept 20472: { return _M_b; } 20472: 20472: 20472: 20472: 20472: static constexpr result_type 20472: min() 20472: { return 0U; } 20472: 20472: 20472: 20472: 20472: static constexpr result_type 20472: max() 20472: { return __detail::_Shift<_UIntType, __w>::__value - 1; } 20472: 20472: 20472: 20472: 20472: void 20472: discard(unsigned long long __z) 20472: { 20472: for (; __z != 0ULL; --__z) 20472: (*this)(); 20472: } 20472: 20472: 20472: 20472: 20472: result_type 20472: operator()(); 20472: # 1236 "/usr/include/c++/10/bits/random.h" 3 20472: friend bool 20472: operator==(const independent_bits_engine& __lhs, 20472: const independent_bits_engine& __rhs) 20472: { return __lhs._M_b == __rhs._M_b; } 20472: # 1253 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: friend std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>& __is, 20472: std::independent_bits_engine<_RandomNumberEngine, 20472: __w, _UIntType>& __x) 20472: { 20472: __is >> __x._M_b; 20472: return __is; 20472: } 20472: 20472: private: 20472: _RandomNumberEngine _M_b; 20472: }; 20472: # 1279 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: inline bool 20472: operator!=(const std::independent_bits_engine<_RandomNumberEngine, __w, 20472: _UIntType>& __lhs, 20472: const std::independent_bits_engine<_RandomNumberEngine, __w, 20472: _UIntType>& __rhs) 20472: { return !(__lhs == __rhs); } 20472: # 1297 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 20472: const std::independent_bits_engine<_RandomNumberEngine, 20472: __w, _UIntType>& __x) 20472: { 20472: __os << __x.base(); 20472: return __os; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: class shuffle_order_engine 20472: { 20472: static_assert(1u <= __k, "template argument substituting " 20472: "__k out of bound"); 20472: 20472: public: 20472: 20472: typedef typename _RandomNumberEngine::result_type result_type; 20472: 20472: template 20472: using _If_seed_seq = typename enable_if<__detail::__is_seed_seq< 20472: _Sseq, shuffle_order_engine, result_type>::value>::type; 20472: 20472: static constexpr size_t table_size = __k; 20472: 20472: 20472: 20472: 20472: 20472: 20472: shuffle_order_engine() 20472: : _M_b() 20472: { _M_initialize(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: explicit 20472: shuffle_order_engine(const _RandomNumberEngine& __rng) 20472: : _M_b(__rng) 20472: { _M_initialize(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: explicit 20472: shuffle_order_engine(_RandomNumberEngine&& __rng) 20472: : _M_b(std::move(__rng)) 20472: { _M_initialize(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: explicit 20472: shuffle_order_engine(result_type __s) 20472: : _M_b(__s) 20472: { _M_initialize(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: template> 20472: explicit 20472: shuffle_order_engine(_Sseq& __q) 20472: : _M_b(__q) 20472: { _M_initialize(); } 20472: 20472: 20472: 20472: 20472: 20472: void 20472: seed() 20472: { 20472: _M_b.seed(); 20472: _M_initialize(); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: void 20472: seed(result_type __s) 20472: { 20472: _M_b.seed(__s); 20472: _M_initialize(); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: _If_seed_seq<_Sseq> 20472: seed(_Sseq& __q) 20472: { 20472: _M_b.seed(__q); 20472: _M_initialize(); 20472: } 20472: 20472: 20472: 20472: 20472: const _RandomNumberEngine& 20472: base() const noexcept 20472: { return _M_b; } 20472: 20472: 20472: 20472: 20472: static constexpr result_type 20472: min() 20472: { return _RandomNumberEngine::min(); } 20472: 20472: 20472: 20472: 20472: static constexpr result_type 20472: max() 20472: { return _RandomNumberEngine::max(); } 20472: 20472: 20472: 20472: 20472: void 20472: discard(unsigned long long __z) 20472: { 20472: for (; __z != 0ULL; --__z) 20472: (*this)(); 20472: } 20472: 20472: 20472: 20472: 20472: result_type 20472: operator()(); 20472: # 1466 "/usr/include/c++/10/bits/random.h" 3 20472: friend bool 20472: operator==(const shuffle_order_engine& __lhs, 20472: const shuffle_order_engine& __rhs) 20472: { return (__lhs._M_b == __rhs._M_b 20472: && std::equal(__lhs._M_v, __lhs._M_v + __k, __rhs._M_v) 20472: && __lhs._M_y == __rhs._M_y); } 20472: # 1484 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: friend std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 20472: const std::shuffle_order_engine<_RandomNumberEngine1, 20472: __k1>& __x); 20472: # 1502 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: friend std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>& __is, 20472: std::shuffle_order_engine<_RandomNumberEngine1, __k1>& __x); 20472: 20472: private: 20472: void _M_initialize() 20472: { 20472: for (size_t __i = 0; __i < __k; ++__i) 20472: _M_v[__i] = _M_b(); 20472: _M_y = _M_b(); 20472: } 20472: 20472: _RandomNumberEngine _M_b; 20472: result_type _M_v[__k]; 20472: result_type _M_y; 20472: }; 20472: # 1532 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: inline bool 20472: operator!=(const std::shuffle_order_engine<_RandomNumberEngine, 20472: __k>& __lhs, 20472: const std::shuffle_order_engine<_RandomNumberEngine, 20472: __k>& __rhs) 20472: { return !(__lhs == __rhs); } 20472: 20472: 20472: 20472: 20472: 20472: typedef linear_congruential_engine 20472: minstd_rand0; 20472: 20472: 20472: 20472: 20472: typedef linear_congruential_engine 20472: minstd_rand; 20472: # 1561 "/usr/include/c++/10/bits/random.h" 3 20472: typedef mersenne_twister_engine< 20472: uint_fast32_t, 20472: 32, 624, 397, 31, 20472: 0x9908b0dfUL, 11, 20472: 0xffffffffUL, 7, 20472: 0x9d2c5680UL, 15, 20472: 0xefc60000UL, 18, 1812433253UL> mt19937; 20472: 20472: 20472: 20472: 20472: typedef mersenne_twister_engine< 20472: uint_fast64_t, 20472: 64, 312, 156, 31, 20472: 0xb5026f5aa96619e9ULL, 29, 20472: 0x5555555555555555ULL, 17, 20472: 0x71d67fffeda60000ULL, 37, 20472: 0xfff7eee000000000ULL, 43, 20472: 6364136223846793005ULL> mt19937_64; 20472: 20472: typedef subtract_with_carry_engine 20472: ranlux24_base; 20472: 20472: typedef subtract_with_carry_engine 20472: ranlux48_base; 20472: 20472: typedef discard_block_engine ranlux24; 20472: 20472: typedef discard_block_engine ranlux48; 20472: 20472: typedef shuffle_order_engine knuth_b; 20472: 20472: typedef minstd_rand0 default_random_engine; 20472: 20472: 20472: 20472: 20472: 20472: class random_device 20472: { 20472: public: 20472: 20472: typedef unsigned int result_type; 20472: 20472: 20472: 20472: random_device() { _M_init("default"); } 20472: 20472: explicit 20472: random_device(const std::string& __token) { _M_init(__token); } 20472: 20472: 20472: ~random_device() 20472: { _M_fini(); } 20472: 20472: 20472: static constexpr result_type 20472: min() 20472: { return std::numeric_limits::min(); } 20472: 20472: static constexpr result_type 20472: max() 20472: { return std::numeric_limits::max(); } 20472: 20472: double 20472: entropy() const noexcept 20472: { 20472: 20472: return this->_M_getentropy(); 20472: 20472: 20472: 20472: } 20472: 20472: result_type 20472: operator()() 20472: { return this->_M_getval(); } 20472: 20472: 20472: random_device(const random_device&) = delete; 20472: void operator=(const random_device&) = delete; 20472: 20472: private: 20472: 20472: void _M_init(const std::string& __token); 20472: void _M_init_pretr1(const std::string& __token); 20472: void _M_fini(); 20472: 20472: result_type _M_getval(); 20472: result_type _M_getval_pretr1(); 20472: double _M_getentropy() const noexcept; 20472: 20472: void _M_init(const char*, size_t); 20472: 20472: union 20472: { 20472: struct 20472: { 20472: void* _M_file; 20472: result_type (*_M_func)(void*); 20472: int _M_fd; 20472: }; 20472: mt19937 _M_mt; 20472: }; 20472: }; 20472: # 1687 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: inline bool 20472: operator!=(const std::uniform_int_distribution<_IntType>& __d1, 20472: const std::uniform_int_distribution<_IntType>& __d2) 20472: { return !(__d1 == __d2); } 20472: # 1703 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>&, 20472: const std::uniform_int_distribution<_IntType>&); 20472: # 1717 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>&, 20472: std::uniform_int_distribution<_IntType>&); 20472: # 1730 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: class uniform_real_distribution 20472: { 20472: static_assert(std::is_floating_point<_RealType>::value, 20472: "result_type must be a floating point type"); 20472: 20472: public: 20472: 20472: typedef _RealType result_type; 20472: 20472: 20472: struct param_type 20472: { 20472: typedef uniform_real_distribution<_RealType> distribution_type; 20472: 20472: param_type() : param_type(0) { } 20472: 20472: explicit 20472: param_type(_RealType __a, _RealType __b = _RealType(1)) 20472: : _M_a(__a), _M_b(__b) 20472: { 20472: ; 20472: } 20472: 20472: result_type 20472: a() const 20472: { return _M_a; } 20472: 20472: result_type 20472: b() const 20472: { return _M_b; } 20472: 20472: friend bool 20472: operator==(const param_type& __p1, const param_type& __p2) 20472: { return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; } 20472: 20472: friend bool 20472: operator!=(const param_type& __p1, const param_type& __p2) 20472: { return !(__p1 == __p2); } 20472: 20472: private: 20472: _RealType _M_a; 20472: _RealType _M_b; 20472: }; 20472: 20472: public: 20472: 20472: 20472: 20472: 20472: 20472: uniform_real_distribution() : uniform_real_distribution(0.0) { } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: explicit 20472: uniform_real_distribution(_RealType __a, _RealType __b = _RealType(1)) 20472: : _M_param(__a, __b) 20472: { } 20472: 20472: explicit 20472: uniform_real_distribution(const param_type& __p) 20472: : _M_param(__p) 20472: { } 20472: 20472: 20472: 20472: 20472: 20472: 20472: void 20472: reset() { } 20472: 20472: result_type 20472: a() const 20472: { return _M_param.a(); } 20472: 20472: result_type 20472: b() const 20472: { return _M_param.b(); } 20472: 20472: 20472: 20472: 20472: param_type 20472: param() const 20472: { return _M_param; } 20472: 20472: 20472: 20472: 20472: 20472: void 20472: param(const param_type& __param) 20472: { _M_param = __param; } 20472: 20472: 20472: 20472: 20472: result_type 20472: min() const 20472: { return this->a(); } 20472: 20472: 20472: 20472: 20472: result_type 20472: max() const 20472: { return this->b(); } 20472: 20472: 20472: 20472: 20472: template 20472: result_type 20472: operator()(_UniformRandomNumberGenerator& __urng) 20472: { return this->operator()(__urng, _M_param); } 20472: 20472: template 20472: result_type 20472: operator()(_UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { 20472: __detail::_Adaptor<_UniformRandomNumberGenerator, result_type> 20472: __aurng(__urng); 20472: return (__aurng() * (__p.b() - __p.a())) + __p.a(); 20472: } 20472: 20472: template 20472: void 20472: __generate(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng) 20472: { this->__generate(__f, __t, __urng, _M_param); } 20472: 20472: template 20472: void 20472: __generate(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { this->__generate_impl(__f, __t, __urng, __p); } 20472: 20472: template 20472: void 20472: __generate(result_type* __f, result_type* __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { this->__generate_impl(__f, __t, __urng, __p); } 20472: 20472: 20472: 20472: 20472: 20472: friend bool 20472: operator==(const uniform_real_distribution& __d1, 20472: const uniform_real_distribution& __d2) 20472: { return __d1._M_param == __d2._M_param; } 20472: 20472: private: 20472: template 20472: void 20472: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p); 20472: 20472: param_type _M_param; 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: template 20472: inline bool 20472: operator!=(const std::uniform_real_distribution<_IntType>& __d1, 20472: const std::uniform_real_distribution<_IntType>& __d2) 20472: { return !(__d1 == __d2); } 20472: # 1924 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>&, 20472: const std::uniform_real_distribution<_RealType>&); 20472: # 1938 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>&, 20472: std::uniform_real_distribution<_RealType>&); 20472: # 1960 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: class normal_distribution 20472: { 20472: static_assert(std::is_floating_point<_RealType>::value, 20472: "result_type must be a floating point type"); 20472: 20472: public: 20472: 20472: typedef _RealType result_type; 20472: 20472: 20472: struct param_type 20472: { 20472: typedef normal_distribution<_RealType> distribution_type; 20472: 20472: param_type() : param_type(0.0) { } 20472: 20472: explicit 20472: param_type(_RealType __mean, _RealType __stddev = _RealType(1)) 20472: : _M_mean(__mean), _M_stddev(__stddev) 20472: { 20472: ; 20472: } 20472: 20472: _RealType 20472: mean() const 20472: { return _M_mean; } 20472: 20472: _RealType 20472: stddev() const 20472: { return _M_stddev; } 20472: 20472: friend bool 20472: operator==(const param_type& __p1, const param_type& __p2) 20472: { return (__p1._M_mean == __p2._M_mean 20472: && __p1._M_stddev == __p2._M_stddev); } 20472: 20472: friend bool 20472: operator!=(const param_type& __p1, const param_type& __p2) 20472: { return !(__p1 == __p2); } 20472: 20472: private: 20472: _RealType _M_mean; 20472: _RealType _M_stddev; 20472: }; 20472: 20472: public: 20472: normal_distribution() : normal_distribution(0.0) { } 20472: 20472: 20472: 20472: 20472: 20472: explicit 20472: normal_distribution(result_type __mean, 20472: result_type __stddev = result_type(1)) 20472: : _M_param(__mean, __stddev), _M_saved_available(false) 20472: { } 20472: 20472: explicit 20472: normal_distribution(const param_type& __p) 20472: : _M_param(__p), _M_saved_available(false) 20472: { } 20472: 20472: 20472: 20472: 20472: void 20472: reset() 20472: { _M_saved_available = false; } 20472: 20472: 20472: 20472: 20472: _RealType 20472: mean() const 20472: { return _M_param.mean(); } 20472: 20472: 20472: 20472: 20472: _RealType 20472: stddev() const 20472: { return _M_param.stddev(); } 20472: 20472: 20472: 20472: 20472: param_type 20472: param() const 20472: { return _M_param; } 20472: 20472: 20472: 20472: 20472: 20472: void 20472: param(const param_type& __param) 20472: { _M_param = __param; } 20472: 20472: 20472: 20472: 20472: result_type 20472: min() const 20472: { return std::numeric_limits::lowest(); } 20472: 20472: 20472: 20472: 20472: result_type 20472: max() const 20472: { return std::numeric_limits::max(); } 20472: 20472: 20472: 20472: 20472: template 20472: result_type 20472: operator()(_UniformRandomNumberGenerator& __urng) 20472: { return this->operator()(__urng, _M_param); } 20472: 20472: template 20472: result_type 20472: operator()(_UniformRandomNumberGenerator& __urng, 20472: const param_type& __p); 20472: 20472: template 20472: void 20472: __generate(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng) 20472: { this->__generate(__f, __t, __urng, _M_param); } 20472: 20472: template 20472: void 20472: __generate(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { this->__generate_impl(__f, __t, __urng, __p); } 20472: 20472: template 20472: void 20472: __generate(result_type* __f, result_type* __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { this->__generate_impl(__f, __t, __urng, __p); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: friend bool 20472: operator==(const std::normal_distribution<_RealType1>& __d1, 20472: const std::normal_distribution<_RealType1>& __d2); 20472: # 2129 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: friend std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 20472: const std::normal_distribution<_RealType1>& __x); 20472: # 2144 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: friend std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>& __is, 20472: std::normal_distribution<_RealType1>& __x); 20472: 20472: private: 20472: template 20472: void 20472: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p); 20472: 20472: param_type _M_param; 20472: result_type _M_saved; 20472: bool _M_saved_available; 20472: }; 20472: 20472: 20472: 20472: 20472: template 20472: inline bool 20472: operator!=(const std::normal_distribution<_RealType>& __d1, 20472: const std::normal_distribution<_RealType>& __d2) 20472: { return !(__d1 == __d2); } 20472: # 2181 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: class lognormal_distribution 20472: { 20472: static_assert(std::is_floating_point<_RealType>::value, 20472: "result_type must be a floating point type"); 20472: 20472: public: 20472: 20472: typedef _RealType result_type; 20472: 20472: 20472: struct param_type 20472: { 20472: typedef lognormal_distribution<_RealType> distribution_type; 20472: 20472: param_type() : param_type(0.0) { } 20472: 20472: explicit 20472: param_type(_RealType __m, _RealType __s = _RealType(1)) 20472: : _M_m(__m), _M_s(__s) 20472: { } 20472: 20472: _RealType 20472: m() const 20472: { return _M_m; } 20472: 20472: _RealType 20472: s() const 20472: { return _M_s; } 20472: 20472: friend bool 20472: operator==(const param_type& __p1, const param_type& __p2) 20472: { return __p1._M_m == __p2._M_m && __p1._M_s == __p2._M_s; } 20472: 20472: friend bool 20472: operator!=(const param_type& __p1, const param_type& __p2) 20472: { return !(__p1 == __p2); } 20472: 20472: private: 20472: _RealType _M_m; 20472: _RealType _M_s; 20472: }; 20472: 20472: lognormal_distribution() : lognormal_distribution(0.0) { } 20472: 20472: explicit 20472: lognormal_distribution(_RealType __m, _RealType __s = _RealType(1)) 20472: : _M_param(__m, __s), _M_nd() 20472: { } 20472: 20472: explicit 20472: lognormal_distribution(const param_type& __p) 20472: : _M_param(__p), _M_nd() 20472: { } 20472: 20472: 20472: 20472: 20472: void 20472: reset() 20472: { _M_nd.reset(); } 20472: 20472: 20472: 20472: 20472: _RealType 20472: m() const 20472: { return _M_param.m(); } 20472: 20472: _RealType 20472: s() const 20472: { return _M_param.s(); } 20472: 20472: 20472: 20472: 20472: param_type 20472: param() const 20472: { return _M_param; } 20472: 20472: 20472: 20472: 20472: 20472: void 20472: param(const param_type& __param) 20472: { _M_param = __param; } 20472: 20472: 20472: 20472: 20472: result_type 20472: min() const 20472: { return result_type(0); } 20472: 20472: 20472: 20472: 20472: result_type 20472: max() const 20472: { return std::numeric_limits::max(); } 20472: 20472: 20472: 20472: 20472: template 20472: result_type 20472: operator()(_UniformRandomNumberGenerator& __urng) 20472: { return this->operator()(__urng, _M_param); } 20472: 20472: template 20472: result_type 20472: operator()(_UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { return std::exp(__p.s() * _M_nd(__urng) + __p.m()); } 20472: 20472: template 20472: void 20472: __generate(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng) 20472: { this->__generate(__f, __t, __urng, _M_param); } 20472: 20472: template 20472: void 20472: __generate(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { this->__generate_impl(__f, __t, __urng, __p); } 20472: 20472: template 20472: void 20472: __generate(result_type* __f, result_type* __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { this->__generate_impl(__f, __t, __urng, __p); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: friend bool 20472: operator==(const lognormal_distribution& __d1, 20472: const lognormal_distribution& __d2) 20472: { return (__d1._M_param == __d2._M_param 20472: && __d1._M_nd == __d2._M_nd); } 20472: # 2340 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: friend std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 20472: const std::lognormal_distribution<_RealType1>& __x); 20472: # 2355 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: friend std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>& __is, 20472: std::lognormal_distribution<_RealType1>& __x); 20472: 20472: private: 20472: template 20472: void 20472: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p); 20472: 20472: param_type _M_param; 20472: 20472: std::normal_distribution _M_nd; 20472: }; 20472: 20472: 20472: 20472: 20472: template 20472: inline bool 20472: operator!=(const std::lognormal_distribution<_RealType>& __d1, 20472: const std::lognormal_distribution<_RealType>& __d2) 20472: { return !(__d1 == __d2); } 20472: # 2392 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: class gamma_distribution 20472: { 20472: static_assert(std::is_floating_point<_RealType>::value, 20472: "result_type must be a floating point type"); 20472: 20472: public: 20472: 20472: typedef _RealType result_type; 20472: 20472: 20472: struct param_type 20472: { 20472: typedef gamma_distribution<_RealType> distribution_type; 20472: friend class gamma_distribution<_RealType>; 20472: 20472: param_type() : param_type(1.0) { } 20472: 20472: explicit 20472: param_type(_RealType __alpha_val, _RealType __beta_val = _RealType(1)) 20472: : _M_alpha(__alpha_val), _M_beta(__beta_val) 20472: { 20472: ; 20472: _M_initialize(); 20472: } 20472: 20472: _RealType 20472: alpha() const 20472: { return _M_alpha; } 20472: 20472: _RealType 20472: beta() const 20472: { return _M_beta; } 20472: 20472: friend bool 20472: operator==(const param_type& __p1, const param_type& __p2) 20472: { return (__p1._M_alpha == __p2._M_alpha 20472: && __p1._M_beta == __p2._M_beta); } 20472: 20472: friend bool 20472: operator!=(const param_type& __p1, const param_type& __p2) 20472: { return !(__p1 == __p2); } 20472: 20472: private: 20472: void 20472: _M_initialize(); 20472: 20472: _RealType _M_alpha; 20472: _RealType _M_beta; 20472: 20472: _RealType _M_malpha, _M_a2; 20472: }; 20472: 20472: public: 20472: 20472: 20472: 20472: gamma_distribution() : gamma_distribution(1.0) { } 20472: 20472: 20472: 20472: 20472: 20472: explicit 20472: gamma_distribution(_RealType __alpha_val, 20472: _RealType __beta_val = _RealType(1)) 20472: : _M_param(__alpha_val, __beta_val), _M_nd() 20472: { } 20472: 20472: explicit 20472: gamma_distribution(const param_type& __p) 20472: : _M_param(__p), _M_nd() 20472: { } 20472: 20472: 20472: 20472: 20472: void 20472: reset() 20472: { _M_nd.reset(); } 20472: 20472: 20472: 20472: 20472: _RealType 20472: alpha() const 20472: { return _M_param.alpha(); } 20472: 20472: 20472: 20472: 20472: _RealType 20472: beta() const 20472: { return _M_param.beta(); } 20472: 20472: 20472: 20472: 20472: param_type 20472: param() const 20472: { return _M_param; } 20472: 20472: 20472: 20472: 20472: 20472: void 20472: param(const param_type& __param) 20472: { _M_param = __param; } 20472: 20472: 20472: 20472: 20472: result_type 20472: min() const 20472: { return result_type(0); } 20472: 20472: 20472: 20472: 20472: result_type 20472: max() const 20472: { return std::numeric_limits::max(); } 20472: 20472: 20472: 20472: 20472: template 20472: result_type 20472: operator()(_UniformRandomNumberGenerator& __urng) 20472: { return this->operator()(__urng, _M_param); } 20472: 20472: template 20472: result_type 20472: operator()(_UniformRandomNumberGenerator& __urng, 20472: const param_type& __p); 20472: 20472: template 20472: void 20472: __generate(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng) 20472: { this->__generate(__f, __t, __urng, _M_param); } 20472: 20472: template 20472: void 20472: __generate(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { this->__generate_impl(__f, __t, __urng, __p); } 20472: 20472: template 20472: void 20472: __generate(result_type* __f, result_type* __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { this->__generate_impl(__f, __t, __urng, __p); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: friend bool 20472: operator==(const gamma_distribution& __d1, 20472: const gamma_distribution& __d2) 20472: { return (__d1._M_param == __d2._M_param 20472: && __d1._M_nd == __d2._M_nd); } 20472: # 2572 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: friend std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 20472: const std::gamma_distribution<_RealType1>& __x); 20472: # 2586 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: friend std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>& __is, 20472: std::gamma_distribution<_RealType1>& __x); 20472: 20472: private: 20472: template 20472: void 20472: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p); 20472: 20472: param_type _M_param; 20472: 20472: std::normal_distribution _M_nd; 20472: }; 20472: 20472: 20472: 20472: 20472: template 20472: inline bool 20472: operator!=(const std::gamma_distribution<_RealType>& __d1, 20472: const std::gamma_distribution<_RealType>& __d2) 20472: { return !(__d1 == __d2); } 20472: # 2620 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: class chi_squared_distribution 20472: { 20472: static_assert(std::is_floating_point<_RealType>::value, 20472: "result_type must be a floating point type"); 20472: 20472: public: 20472: 20472: typedef _RealType result_type; 20472: 20472: 20472: struct param_type 20472: { 20472: typedef chi_squared_distribution<_RealType> distribution_type; 20472: 20472: param_type() : param_type(1) { } 20472: 20472: explicit 20472: param_type(_RealType __n) 20472: : _M_n(__n) 20472: { } 20472: 20472: _RealType 20472: n() const 20472: { return _M_n; } 20472: 20472: friend bool 20472: operator==(const param_type& __p1, const param_type& __p2) 20472: { return __p1._M_n == __p2._M_n; } 20472: 20472: friend bool 20472: operator!=(const param_type& __p1, const param_type& __p2) 20472: { return !(__p1 == __p2); } 20472: 20472: private: 20472: _RealType _M_n; 20472: }; 20472: 20472: chi_squared_distribution() : chi_squared_distribution(1) { } 20472: 20472: explicit 20472: chi_squared_distribution(_RealType __n) 20472: : _M_param(__n), _M_gd(__n / 2) 20472: { } 20472: 20472: explicit 20472: chi_squared_distribution(const param_type& __p) 20472: : _M_param(__p), _M_gd(__p.n() / 2) 20472: { } 20472: 20472: 20472: 20472: 20472: void 20472: reset() 20472: { _M_gd.reset(); } 20472: 20472: 20472: 20472: 20472: _RealType 20472: n() const 20472: { return _M_param.n(); } 20472: 20472: 20472: 20472: 20472: param_type 20472: param() const 20472: { return _M_param; } 20472: 20472: 20472: 20472: 20472: 20472: void 20472: param(const param_type& __param) 20472: { 20472: _M_param = __param; 20472: typedef typename std::gamma_distribution::param_type 20472: param_type; 20472: _M_gd.param(param_type{__param.n() / 2}); 20472: } 20472: 20472: 20472: 20472: 20472: result_type 20472: min() const 20472: { return result_type(0); } 20472: 20472: 20472: 20472: 20472: result_type 20472: max() const 20472: { return std::numeric_limits::max(); } 20472: 20472: 20472: 20472: 20472: template 20472: result_type 20472: operator()(_UniformRandomNumberGenerator& __urng) 20472: { return 2 * _M_gd(__urng); } 20472: 20472: template 20472: result_type 20472: operator()(_UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { 20472: typedef typename std::gamma_distribution::param_type 20472: param_type; 20472: return 2 * _M_gd(__urng, param_type(__p.n() / 2)); 20472: } 20472: 20472: template 20472: void 20472: __generate(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng) 20472: { this->__generate_impl(__f, __t, __urng); } 20472: 20472: template 20472: void 20472: __generate(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { typename std::gamma_distribution::param_type 20472: __p2(__p.n() / 2); 20472: this->__generate_impl(__f, __t, __urng, __p2); } 20472: 20472: template 20472: void 20472: __generate(result_type* __f, result_type* __t, 20472: _UniformRandomNumberGenerator& __urng) 20472: { this->__generate_impl(__f, __t, __urng); } 20472: 20472: template 20472: void 20472: __generate(result_type* __f, result_type* __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { typename std::gamma_distribution::param_type 20472: __p2(__p.n() / 2); 20472: this->__generate_impl(__f, __t, __urng, __p2); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: friend bool 20472: operator==(const chi_squared_distribution& __d1, 20472: const chi_squared_distribution& __d2) 20472: { return __d1._M_param == __d2._M_param && __d1._M_gd == __d2._M_gd; } 20472: # 2788 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: friend std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 20472: const std::chi_squared_distribution<_RealType1>& __x); 20472: # 2803 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: friend std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>& __is, 20472: std::chi_squared_distribution<_RealType1>& __x); 20472: 20472: private: 20472: template 20472: void 20472: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng); 20472: 20472: template 20472: void 20472: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const typename 20472: std::gamma_distribution::param_type& __p); 20472: 20472: param_type _M_param; 20472: 20472: std::gamma_distribution _M_gd; 20472: }; 20472: 20472: 20472: 20472: 20472: template 20472: inline bool 20472: operator!=(const std::chi_squared_distribution<_RealType>& __d1, 20472: const std::chi_squared_distribution<_RealType>& __d2) 20472: { return !(__d1 == __d2); } 20472: # 2844 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: class cauchy_distribution 20472: { 20472: static_assert(std::is_floating_point<_RealType>::value, 20472: "result_type must be a floating point type"); 20472: 20472: public: 20472: 20472: typedef _RealType result_type; 20472: 20472: 20472: struct param_type 20472: { 20472: typedef cauchy_distribution<_RealType> distribution_type; 20472: 20472: param_type() : param_type(0) { } 20472: 20472: explicit 20472: param_type(_RealType __a, _RealType __b = _RealType(1)) 20472: : _M_a(__a), _M_b(__b) 20472: { } 20472: 20472: _RealType 20472: a() const 20472: { return _M_a; } 20472: 20472: _RealType 20472: b() const 20472: { return _M_b; } 20472: 20472: friend bool 20472: operator==(const param_type& __p1, const param_type& __p2) 20472: { return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; } 20472: 20472: friend bool 20472: operator!=(const param_type& __p1, const param_type& __p2) 20472: { return !(__p1 == __p2); } 20472: 20472: private: 20472: _RealType _M_a; 20472: _RealType _M_b; 20472: }; 20472: 20472: cauchy_distribution() : cauchy_distribution(0.0) { } 20472: 20472: explicit 20472: cauchy_distribution(_RealType __a, _RealType __b = 1.0) 20472: : _M_param(__a, __b) 20472: { } 20472: 20472: explicit 20472: cauchy_distribution(const param_type& __p) 20472: : _M_param(__p) 20472: { } 20472: 20472: 20472: 20472: 20472: void 20472: reset() 20472: { } 20472: 20472: 20472: 20472: 20472: _RealType 20472: a() const 20472: { return _M_param.a(); } 20472: 20472: _RealType 20472: b() const 20472: { return _M_param.b(); } 20472: 20472: 20472: 20472: 20472: param_type 20472: param() const 20472: { return _M_param; } 20472: 20472: 20472: 20472: 20472: 20472: void 20472: param(const param_type& __param) 20472: { _M_param = __param; } 20472: 20472: 20472: 20472: 20472: result_type 20472: min() const 20472: { return std::numeric_limits::lowest(); } 20472: 20472: 20472: 20472: 20472: result_type 20472: max() const 20472: { return std::numeric_limits::max(); } 20472: 20472: 20472: 20472: 20472: template 20472: result_type 20472: operator()(_UniformRandomNumberGenerator& __urng) 20472: { return this->operator()(__urng, _M_param); } 20472: 20472: template 20472: result_type 20472: operator()(_UniformRandomNumberGenerator& __urng, 20472: const param_type& __p); 20472: 20472: template 20472: void 20472: __generate(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng) 20472: { this->__generate(__f, __t, __urng, _M_param); } 20472: 20472: template 20472: void 20472: __generate(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { this->__generate_impl(__f, __t, __urng, __p); } 20472: 20472: template 20472: void 20472: __generate(result_type* __f, result_type* __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { this->__generate_impl(__f, __t, __urng, __p); } 20472: 20472: 20472: 20472: 20472: 20472: friend bool 20472: operator==(const cauchy_distribution& __d1, 20472: const cauchy_distribution& __d2) 20472: { return __d1._M_param == __d2._M_param; } 20472: 20472: private: 20472: template 20472: void 20472: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p); 20472: 20472: param_type _M_param; 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: template 20472: inline bool 20472: operator!=(const std::cauchy_distribution<_RealType>& __d1, 20472: const std::cauchy_distribution<_RealType>& __d2) 20472: { return !(__d1 == __d2); } 20472: # 3021 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 20472: const std::cauchy_distribution<_RealType>& __x); 20472: # 3036 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>& __is, 20472: std::cauchy_distribution<_RealType>& __x); 20472: # 3052 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: class fisher_f_distribution 20472: { 20472: static_assert(std::is_floating_point<_RealType>::value, 20472: "result_type must be a floating point type"); 20472: 20472: public: 20472: 20472: typedef _RealType result_type; 20472: 20472: 20472: struct param_type 20472: { 20472: typedef fisher_f_distribution<_RealType> distribution_type; 20472: 20472: param_type() : param_type(1) { } 20472: 20472: explicit 20472: param_type(_RealType __m, _RealType __n = _RealType(1)) 20472: : _M_m(__m), _M_n(__n) 20472: { } 20472: 20472: _RealType 20472: m() const 20472: { return _M_m; } 20472: 20472: _RealType 20472: n() const 20472: { return _M_n; } 20472: 20472: friend bool 20472: operator==(const param_type& __p1, const param_type& __p2) 20472: { return __p1._M_m == __p2._M_m && __p1._M_n == __p2._M_n; } 20472: 20472: friend bool 20472: operator!=(const param_type& __p1, const param_type& __p2) 20472: { return !(__p1 == __p2); } 20472: 20472: private: 20472: _RealType _M_m; 20472: _RealType _M_n; 20472: }; 20472: 20472: fisher_f_distribution() : fisher_f_distribution(1.0) { } 20472: 20472: explicit 20472: fisher_f_distribution(_RealType __m, 20472: _RealType __n = _RealType(1)) 20472: : _M_param(__m, __n), _M_gd_x(__m / 2), _M_gd_y(__n / 2) 20472: { } 20472: 20472: explicit 20472: fisher_f_distribution(const param_type& __p) 20472: : _M_param(__p), _M_gd_x(__p.m() / 2), _M_gd_y(__p.n() / 2) 20472: { } 20472: 20472: 20472: 20472: 20472: void 20472: reset() 20472: { 20472: _M_gd_x.reset(); 20472: _M_gd_y.reset(); 20472: } 20472: 20472: 20472: 20472: 20472: _RealType 20472: m() const 20472: { return _M_param.m(); } 20472: 20472: _RealType 20472: n() const 20472: { return _M_param.n(); } 20472: 20472: 20472: 20472: 20472: param_type 20472: param() const 20472: { return _M_param; } 20472: 20472: 20472: 20472: 20472: 20472: void 20472: param(const param_type& __param) 20472: { _M_param = __param; } 20472: 20472: 20472: 20472: 20472: result_type 20472: min() const 20472: { return result_type(0); } 20472: 20472: 20472: 20472: 20472: result_type 20472: max() const 20472: { return std::numeric_limits::max(); } 20472: 20472: 20472: 20472: 20472: template 20472: result_type 20472: operator()(_UniformRandomNumberGenerator& __urng) 20472: { return (_M_gd_x(__urng) * n()) / (_M_gd_y(__urng) * m()); } 20472: 20472: template 20472: result_type 20472: operator()(_UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { 20472: typedef typename std::gamma_distribution::param_type 20472: param_type; 20472: return ((_M_gd_x(__urng, param_type(__p.m() / 2)) * n()) 20472: / (_M_gd_y(__urng, param_type(__p.n() / 2)) * m())); 20472: } 20472: 20472: template 20472: void 20472: __generate(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng) 20472: { this->__generate_impl(__f, __t, __urng); } 20472: 20472: template 20472: void 20472: __generate(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { this->__generate_impl(__f, __t, __urng, __p); } 20472: 20472: template 20472: void 20472: __generate(result_type* __f, result_type* __t, 20472: _UniformRandomNumberGenerator& __urng) 20472: { this->__generate_impl(__f, __t, __urng); } 20472: 20472: template 20472: void 20472: __generate(result_type* __f, result_type* __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { this->__generate_impl(__f, __t, __urng, __p); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: friend bool 20472: operator==(const fisher_f_distribution& __d1, 20472: const fisher_f_distribution& __d2) 20472: { return (__d1._M_param == __d2._M_param 20472: && __d1._M_gd_x == __d2._M_gd_x 20472: && __d1._M_gd_y == __d2._M_gd_y); } 20472: # 3227 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: friend std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 20472: const std::fisher_f_distribution<_RealType1>& __x); 20472: # 3242 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: friend std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>& __is, 20472: std::fisher_f_distribution<_RealType1>& __x); 20472: 20472: private: 20472: template 20472: void 20472: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng); 20472: 20472: template 20472: void 20472: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p); 20472: 20472: param_type _M_param; 20472: 20472: std::gamma_distribution _M_gd_x, _M_gd_y; 20472: }; 20472: 20472: 20472: 20472: 20472: template 20472: inline bool 20472: operator!=(const std::fisher_f_distribution<_RealType>& __d1, 20472: const std::fisher_f_distribution<_RealType>& __d2) 20472: { return !(__d1 == __d2); } 20472: # 3284 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: class student_t_distribution 20472: { 20472: static_assert(std::is_floating_point<_RealType>::value, 20472: "result_type must be a floating point type"); 20472: 20472: public: 20472: 20472: typedef _RealType result_type; 20472: 20472: 20472: struct param_type 20472: { 20472: typedef student_t_distribution<_RealType> distribution_type; 20472: 20472: param_type() : param_type(1) { } 20472: 20472: explicit 20472: param_type(_RealType __n) 20472: : _M_n(__n) 20472: { } 20472: 20472: _RealType 20472: n() const 20472: { return _M_n; } 20472: 20472: friend bool 20472: operator==(const param_type& __p1, const param_type& __p2) 20472: { return __p1._M_n == __p2._M_n; } 20472: 20472: friend bool 20472: operator!=(const param_type& __p1, const param_type& __p2) 20472: { return !(__p1 == __p2); } 20472: 20472: private: 20472: _RealType _M_n; 20472: }; 20472: 20472: student_t_distribution() : student_t_distribution(1.0) { } 20472: 20472: explicit 20472: student_t_distribution(_RealType __n) 20472: : _M_param(__n), _M_nd(), _M_gd(__n / 2, 2) 20472: { } 20472: 20472: explicit 20472: student_t_distribution(const param_type& __p) 20472: : _M_param(__p), _M_nd(), _M_gd(__p.n() / 2, 2) 20472: { } 20472: 20472: 20472: 20472: 20472: void 20472: reset() 20472: { 20472: _M_nd.reset(); 20472: _M_gd.reset(); 20472: } 20472: 20472: 20472: 20472: 20472: _RealType 20472: n() const 20472: { return _M_param.n(); } 20472: 20472: 20472: 20472: 20472: param_type 20472: param() const 20472: { return _M_param; } 20472: 20472: 20472: 20472: 20472: 20472: void 20472: param(const param_type& __param) 20472: { _M_param = __param; } 20472: 20472: 20472: 20472: 20472: result_type 20472: min() const 20472: { return std::numeric_limits::lowest(); } 20472: 20472: 20472: 20472: 20472: result_type 20472: max() const 20472: { return std::numeric_limits::max(); } 20472: 20472: 20472: 20472: 20472: template 20472: result_type 20472: operator()(_UniformRandomNumberGenerator& __urng) 20472: { return _M_nd(__urng) * std::sqrt(n() / _M_gd(__urng)); } 20472: 20472: template 20472: result_type 20472: operator()(_UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { 20472: typedef typename std::gamma_distribution::param_type 20472: param_type; 20472: 20472: const result_type __g = _M_gd(__urng, param_type(__p.n() / 2, 2)); 20472: return _M_nd(__urng) * std::sqrt(__p.n() / __g); 20472: } 20472: 20472: template 20472: void 20472: __generate(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng) 20472: { this->__generate_impl(__f, __t, __urng); } 20472: 20472: template 20472: void 20472: __generate(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { this->__generate_impl(__f, __t, __urng, __p); } 20472: 20472: template 20472: void 20472: __generate(result_type* __f, result_type* __t, 20472: _UniformRandomNumberGenerator& __urng) 20472: { this->__generate_impl(__f, __t, __urng); } 20472: 20472: template 20472: void 20472: __generate(result_type* __f, result_type* __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { this->__generate_impl(__f, __t, __urng, __p); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: friend bool 20472: operator==(const student_t_distribution& __d1, 20472: const student_t_distribution& __d2) 20472: { return (__d1._M_param == __d2._M_param 20472: && __d1._M_nd == __d2._M_nd && __d1._M_gd == __d2._M_gd); } 20472: # 3449 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: friend std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 20472: const std::student_t_distribution<_RealType1>& __x); 20472: # 3464 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: friend std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>& __is, 20472: std::student_t_distribution<_RealType1>& __x); 20472: 20472: private: 20472: template 20472: void 20472: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng); 20472: template 20472: void 20472: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p); 20472: 20472: param_type _M_param; 20472: 20472: std::normal_distribution _M_nd; 20472: std::gamma_distribution _M_gd; 20472: }; 20472: 20472: 20472: 20472: 20472: template 20472: inline bool 20472: operator!=(const std::student_t_distribution<_RealType>& __d1, 20472: const std::student_t_distribution<_RealType>& __d2) 20472: { return !(__d1 == __d2); } 20472: # 3512 "/usr/include/c++/10/bits/random.h" 3 20472: class bernoulli_distribution 20472: { 20472: public: 20472: 20472: typedef bool result_type; 20472: 20472: 20472: struct param_type 20472: { 20472: typedef bernoulli_distribution distribution_type; 20472: 20472: param_type() : param_type(0.5) { } 20472: 20472: explicit 20472: param_type(double __p) 20472: : _M_p(__p) 20472: { 20472: ; 20472: } 20472: 20472: double 20472: p() const 20472: { return _M_p; } 20472: 20472: friend bool 20472: operator==(const param_type& __p1, const param_type& __p2) 20472: { return __p1._M_p == __p2._M_p; } 20472: 20472: friend bool 20472: operator!=(const param_type& __p1, const param_type& __p2) 20472: { return !(__p1 == __p2); } 20472: 20472: private: 20472: double _M_p; 20472: }; 20472: 20472: public: 20472: 20472: 20472: 20472: bernoulli_distribution() : bernoulli_distribution(0.5) { } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: explicit 20472: bernoulli_distribution(double __p) 20472: : _M_param(__p) 20472: { } 20472: 20472: explicit 20472: bernoulli_distribution(const param_type& __p) 20472: : _M_param(__p) 20472: { } 20472: 20472: 20472: 20472: 20472: 20472: 20472: void 20472: reset() { } 20472: 20472: 20472: 20472: 20472: double 20472: p() const 20472: { return _M_param.p(); } 20472: 20472: 20472: 20472: 20472: param_type 20472: param() const 20472: { return _M_param; } 20472: 20472: 20472: 20472: 20472: 20472: void 20472: param(const param_type& __param) 20472: { _M_param = __param; } 20472: 20472: 20472: 20472: 20472: result_type 20472: min() const 20472: { return std::numeric_limits::min(); } 20472: 20472: 20472: 20472: 20472: result_type 20472: max() const 20472: { return std::numeric_limits::max(); } 20472: 20472: 20472: 20472: 20472: template 20472: result_type 20472: operator()(_UniformRandomNumberGenerator& __urng) 20472: { return this->operator()(__urng, _M_param); } 20472: 20472: template 20472: result_type 20472: operator()(_UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { 20472: __detail::_Adaptor<_UniformRandomNumberGenerator, double> 20472: __aurng(__urng); 20472: if ((__aurng() - __aurng.min()) 20472: < __p.p() * (__aurng.max() - __aurng.min())) 20472: return true; 20472: return false; 20472: } 20472: 20472: template 20472: void 20472: __generate(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng) 20472: { this->__generate(__f, __t, __urng, _M_param); } 20472: 20472: template 20472: void 20472: __generate(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, const param_type& __p) 20472: { this->__generate_impl(__f, __t, __urng, __p); } 20472: 20472: template 20472: void 20472: __generate(result_type* __f, result_type* __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { this->__generate_impl(__f, __t, __urng, __p); } 20472: 20472: 20472: 20472: 20472: 20472: friend bool 20472: operator==(const bernoulli_distribution& __d1, 20472: const bernoulli_distribution& __d2) 20472: { return __d1._M_param == __d2._M_param; } 20472: 20472: private: 20472: template 20472: void 20472: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p); 20472: 20472: param_type _M_param; 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: inline bool 20472: operator!=(const std::bernoulli_distribution& __d1, 20472: const std::bernoulli_distribution& __d2) 20472: { return !(__d1 == __d2); } 20472: # 3695 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 20472: const std::bernoulli_distribution& __x); 20472: # 3709 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: inline std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>& __is, 20472: std::bernoulli_distribution& __x) 20472: { 20472: double __p; 20472: if (__is >> __p) 20472: __x.param(bernoulli_distribution::param_type(__p)); 20472: return __is; 20472: } 20472: # 3728 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: class binomial_distribution 20472: { 20472: static_assert(std::is_integral<_IntType>::value, 20472: "result_type must be an integral type"); 20472: 20472: public: 20472: 20472: typedef _IntType result_type; 20472: 20472: 20472: struct param_type 20472: { 20472: typedef binomial_distribution<_IntType> distribution_type; 20472: friend class binomial_distribution<_IntType>; 20472: 20472: param_type() : param_type(1) { } 20472: 20472: explicit 20472: param_type(_IntType __t, double __p = 0.5) 20472: : _M_t(__t), _M_p(__p) 20472: { 20472: 20472: 20472: ; 20472: _M_initialize(); 20472: } 20472: 20472: _IntType 20472: t() const 20472: { return _M_t; } 20472: 20472: double 20472: p() const 20472: { return _M_p; } 20472: 20472: friend bool 20472: operator==(const param_type& __p1, const param_type& __p2) 20472: { return __p1._M_t == __p2._M_t && __p1._M_p == __p2._M_p; } 20472: 20472: friend bool 20472: operator!=(const param_type& __p1, const param_type& __p2) 20472: { return !(__p1 == __p2); } 20472: 20472: private: 20472: void 20472: _M_initialize(); 20472: 20472: _IntType _M_t; 20472: double _M_p; 20472: 20472: double _M_q; 20472: 20472: double _M_d1, _M_d2, _M_s1, _M_s2, _M_c, 20472: _M_a1, _M_a123, _M_s, _M_lf, _M_lp1p; 20472: 20472: bool _M_easy; 20472: }; 20472: 20472: 20472: 20472: binomial_distribution() : binomial_distribution(1) { } 20472: 20472: explicit 20472: binomial_distribution(_IntType __t, double __p = 0.5) 20472: : _M_param(__t, __p), _M_nd() 20472: { } 20472: 20472: explicit 20472: binomial_distribution(const param_type& __p) 20472: : _M_param(__p), _M_nd() 20472: { } 20472: 20472: 20472: 20472: 20472: void 20472: reset() 20472: { _M_nd.reset(); } 20472: 20472: 20472: 20472: 20472: _IntType 20472: t() const 20472: { return _M_param.t(); } 20472: 20472: 20472: 20472: 20472: double 20472: p() const 20472: { return _M_param.p(); } 20472: 20472: 20472: 20472: 20472: param_type 20472: param() const 20472: { return _M_param; } 20472: 20472: 20472: 20472: 20472: 20472: void 20472: param(const param_type& __param) 20472: { _M_param = __param; } 20472: 20472: 20472: 20472: 20472: result_type 20472: min() const 20472: { return 0; } 20472: 20472: 20472: 20472: 20472: result_type 20472: max() const 20472: { return _M_param.t(); } 20472: 20472: 20472: 20472: 20472: template 20472: result_type 20472: operator()(_UniformRandomNumberGenerator& __urng) 20472: { return this->operator()(__urng, _M_param); } 20472: 20472: template 20472: result_type 20472: operator()(_UniformRandomNumberGenerator& __urng, 20472: const param_type& __p); 20472: 20472: template 20472: void 20472: __generate(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng) 20472: { this->__generate(__f, __t, __urng, _M_param); } 20472: 20472: template 20472: void 20472: __generate(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { this->__generate_impl(__f, __t, __urng, __p); } 20472: 20472: template 20472: void 20472: __generate(result_type* __f, result_type* __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { this->__generate_impl(__f, __t, __urng, __p); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: friend bool 20472: operator==(const binomial_distribution& __d1, 20472: const binomial_distribution& __d2) 20472: 20472: { return __d1._M_param == __d2._M_param && __d1._M_nd == __d2._M_nd; } 20472: # 3910 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: friend std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 20472: const std::binomial_distribution<_IntType1>& __x); 20472: # 3926 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: friend std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>& __is, 20472: std::binomial_distribution<_IntType1>& __x); 20472: 20472: private: 20472: template 20472: void 20472: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p); 20472: 20472: template 20472: result_type 20472: _M_waiting(_UniformRandomNumberGenerator& __urng, 20472: _IntType __t, double __q); 20472: 20472: param_type _M_param; 20472: 20472: 20472: std::normal_distribution _M_nd; 20472: }; 20472: 20472: 20472: 20472: 20472: template 20472: inline bool 20472: operator!=(const std::binomial_distribution<_IntType>& __d1, 20472: const std::binomial_distribution<_IntType>& __d2) 20472: { return !(__d1 == __d2); } 20472: # 3968 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: class geometric_distribution 20472: { 20472: static_assert(std::is_integral<_IntType>::value, 20472: "result_type must be an integral type"); 20472: 20472: public: 20472: 20472: typedef _IntType result_type; 20472: 20472: 20472: struct param_type 20472: { 20472: typedef geometric_distribution<_IntType> distribution_type; 20472: friend class geometric_distribution<_IntType>; 20472: 20472: param_type() : param_type(0.5) { } 20472: 20472: explicit 20472: param_type(double __p) 20472: : _M_p(__p) 20472: { 20472: ; 20472: _M_initialize(); 20472: } 20472: 20472: double 20472: p() const 20472: { return _M_p; } 20472: 20472: friend bool 20472: operator==(const param_type& __p1, const param_type& __p2) 20472: { return __p1._M_p == __p2._M_p; } 20472: 20472: friend bool 20472: operator!=(const param_type& __p1, const param_type& __p2) 20472: { return !(__p1 == __p2); } 20472: 20472: private: 20472: void 20472: _M_initialize() 20472: { _M_log_1_p = std::log(1.0 - _M_p); } 20472: 20472: double _M_p; 20472: 20472: double _M_log_1_p; 20472: }; 20472: 20472: 20472: 20472: geometric_distribution() : geometric_distribution(0.5) { } 20472: 20472: explicit 20472: geometric_distribution(double __p) 20472: : _M_param(__p) 20472: { } 20472: 20472: explicit 20472: geometric_distribution(const param_type& __p) 20472: : _M_param(__p) 20472: { } 20472: 20472: 20472: 20472: 20472: 20472: 20472: void 20472: reset() { } 20472: 20472: 20472: 20472: 20472: double 20472: p() const 20472: { return _M_param.p(); } 20472: 20472: 20472: 20472: 20472: param_type 20472: param() const 20472: { return _M_param; } 20472: 20472: 20472: 20472: 20472: 20472: void 20472: param(const param_type& __param) 20472: { _M_param = __param; } 20472: 20472: 20472: 20472: 20472: result_type 20472: min() const 20472: { return 0; } 20472: 20472: 20472: 20472: 20472: result_type 20472: max() const 20472: { return std::numeric_limits::max(); } 20472: 20472: 20472: 20472: 20472: template 20472: result_type 20472: operator()(_UniformRandomNumberGenerator& __urng) 20472: { return this->operator()(__urng, _M_param); } 20472: 20472: template 20472: result_type 20472: operator()(_UniformRandomNumberGenerator& __urng, 20472: const param_type& __p); 20472: 20472: template 20472: void 20472: __generate(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng) 20472: { this->__generate(__f, __t, __urng, _M_param); } 20472: 20472: template 20472: void 20472: __generate(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { this->__generate_impl(__f, __t, __urng, __p); } 20472: 20472: template 20472: void 20472: __generate(result_type* __f, result_type* __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { this->__generate_impl(__f, __t, __urng, __p); } 20472: 20472: 20472: 20472: 20472: 20472: friend bool 20472: operator==(const geometric_distribution& __d1, 20472: const geometric_distribution& __d2) 20472: { return __d1._M_param == __d2._M_param; } 20472: 20472: private: 20472: template 20472: void 20472: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p); 20472: 20472: param_type _M_param; 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: template 20472: inline bool 20472: operator!=(const std::geometric_distribution<_IntType>& __d1, 20472: const std::geometric_distribution<_IntType>& __d2) 20472: { return !(__d1 == __d2); } 20472: # 4149 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 20472: const std::geometric_distribution<_IntType>& __x); 20472: # 4164 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>& __is, 20472: std::geometric_distribution<_IntType>& __x); 20472: # 4178 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: class negative_binomial_distribution 20472: { 20472: static_assert(std::is_integral<_IntType>::value, 20472: "result_type must be an integral type"); 20472: 20472: public: 20472: 20472: typedef _IntType result_type; 20472: 20472: 20472: struct param_type 20472: { 20472: typedef negative_binomial_distribution<_IntType> distribution_type; 20472: 20472: param_type() : param_type(1) { } 20472: 20472: explicit 20472: param_type(_IntType __k, double __p = 0.5) 20472: : _M_k(__k), _M_p(__p) 20472: { 20472: ; 20472: } 20472: 20472: _IntType 20472: k() const 20472: { return _M_k; } 20472: 20472: double 20472: p() const 20472: { return _M_p; } 20472: 20472: friend bool 20472: operator==(const param_type& __p1, const param_type& __p2) 20472: { return __p1._M_k == __p2._M_k && __p1._M_p == __p2._M_p; } 20472: 20472: friend bool 20472: operator!=(const param_type& __p1, const param_type& __p2) 20472: { return !(__p1 == __p2); } 20472: 20472: private: 20472: _IntType _M_k; 20472: double _M_p; 20472: }; 20472: 20472: negative_binomial_distribution() : negative_binomial_distribution(1) { } 20472: 20472: explicit 20472: negative_binomial_distribution(_IntType __k, double __p = 0.5) 20472: : _M_param(__k, __p), _M_gd(__k, (1.0 - __p) / __p) 20472: { } 20472: 20472: explicit 20472: negative_binomial_distribution(const param_type& __p) 20472: : _M_param(__p), _M_gd(__p.k(), (1.0 - __p.p()) / __p.p()) 20472: { } 20472: 20472: 20472: 20472: 20472: void 20472: reset() 20472: { _M_gd.reset(); } 20472: 20472: 20472: 20472: 20472: _IntType 20472: k() const 20472: { return _M_param.k(); } 20472: 20472: 20472: 20472: 20472: double 20472: p() const 20472: { return _M_param.p(); } 20472: 20472: 20472: 20472: 20472: param_type 20472: param() const 20472: { return _M_param; } 20472: 20472: 20472: 20472: 20472: 20472: void 20472: param(const param_type& __param) 20472: { _M_param = __param; } 20472: 20472: 20472: 20472: 20472: result_type 20472: min() const 20472: { return result_type(0); } 20472: 20472: 20472: 20472: 20472: result_type 20472: max() const 20472: { return std::numeric_limits::max(); } 20472: 20472: 20472: 20472: 20472: template 20472: result_type 20472: operator()(_UniformRandomNumberGenerator& __urng); 20472: 20472: template 20472: result_type 20472: operator()(_UniformRandomNumberGenerator& __urng, 20472: const param_type& __p); 20472: 20472: template 20472: void 20472: __generate(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng) 20472: { this->__generate_impl(__f, __t, __urng); } 20472: 20472: template 20472: void 20472: __generate(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { this->__generate_impl(__f, __t, __urng, __p); } 20472: 20472: template 20472: void 20472: __generate(result_type* __f, result_type* __t, 20472: _UniformRandomNumberGenerator& __urng) 20472: { this->__generate_impl(__f, __t, __urng); } 20472: 20472: template 20472: void 20472: __generate(result_type* __f, result_type* __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { this->__generate_impl(__f, __t, __urng, __p); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: friend bool 20472: operator==(const negative_binomial_distribution& __d1, 20472: const negative_binomial_distribution& __d2) 20472: { return __d1._M_param == __d2._M_param && __d1._M_gd == __d2._M_gd; } 20472: # 4346 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: friend std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 20472: const std::negative_binomial_distribution<_IntType1>& __x); 20472: # 4361 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: friend std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>& __is, 20472: std::negative_binomial_distribution<_IntType1>& __x); 20472: 20472: private: 20472: template 20472: void 20472: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng); 20472: template 20472: void 20472: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p); 20472: 20472: param_type _M_param; 20472: 20472: std::gamma_distribution _M_gd; 20472: }; 20472: 20472: 20472: 20472: 20472: template 20472: inline bool 20472: operator!=(const std::negative_binomial_distribution<_IntType>& __d1, 20472: const std::negative_binomial_distribution<_IntType>& __d2) 20472: { return !(__d1 == __d2); } 20472: # 4409 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: class poisson_distribution 20472: { 20472: static_assert(std::is_integral<_IntType>::value, 20472: "result_type must be an integral type"); 20472: 20472: public: 20472: 20472: typedef _IntType result_type; 20472: 20472: 20472: struct param_type 20472: { 20472: typedef poisson_distribution<_IntType> distribution_type; 20472: friend class poisson_distribution<_IntType>; 20472: 20472: param_type() : param_type(1.0) { } 20472: 20472: explicit 20472: param_type(double __mean) 20472: : _M_mean(__mean) 20472: { 20472: ; 20472: _M_initialize(); 20472: } 20472: 20472: double 20472: mean() const 20472: { return _M_mean; } 20472: 20472: friend bool 20472: operator==(const param_type& __p1, const param_type& __p2) 20472: { return __p1._M_mean == __p2._M_mean; } 20472: 20472: friend bool 20472: operator!=(const param_type& __p1, const param_type& __p2) 20472: { return !(__p1 == __p2); } 20472: 20472: private: 20472: 20472: void 20472: _M_initialize(); 20472: 20472: double _M_mean; 20472: 20472: double _M_lm_thr; 20472: 20472: double _M_lfm, _M_sm, _M_d, _M_scx, _M_1cx, _M_c2b, _M_cb; 20472: 20472: }; 20472: 20472: 20472: 20472: poisson_distribution() : poisson_distribution(1.0) { } 20472: 20472: explicit 20472: poisson_distribution(double __mean) 20472: : _M_param(__mean), _M_nd() 20472: { } 20472: 20472: explicit 20472: poisson_distribution(const param_type& __p) 20472: : _M_param(__p), _M_nd() 20472: { } 20472: 20472: 20472: 20472: 20472: void 20472: reset() 20472: { _M_nd.reset(); } 20472: 20472: 20472: 20472: 20472: double 20472: mean() const 20472: { return _M_param.mean(); } 20472: 20472: 20472: 20472: 20472: param_type 20472: param() const 20472: { return _M_param; } 20472: 20472: 20472: 20472: 20472: 20472: void 20472: param(const param_type& __param) 20472: { _M_param = __param; } 20472: 20472: 20472: 20472: 20472: result_type 20472: min() const 20472: { return 0; } 20472: 20472: 20472: 20472: 20472: result_type 20472: max() const 20472: { return std::numeric_limits::max(); } 20472: 20472: 20472: 20472: 20472: template 20472: result_type 20472: operator()(_UniformRandomNumberGenerator& __urng) 20472: { return this->operator()(__urng, _M_param); } 20472: 20472: template 20472: result_type 20472: operator()(_UniformRandomNumberGenerator& __urng, 20472: const param_type& __p); 20472: 20472: template 20472: void 20472: __generate(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng) 20472: { this->__generate(__f, __t, __urng, _M_param); } 20472: 20472: template 20472: void 20472: __generate(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { this->__generate_impl(__f, __t, __urng, __p); } 20472: 20472: template 20472: void 20472: __generate(result_type* __f, result_type* __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { this->__generate_impl(__f, __t, __urng, __p); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: friend bool 20472: operator==(const poisson_distribution& __d1, 20472: const poisson_distribution& __d2) 20472: 20472: { return __d1._M_param == __d2._M_param && __d1._M_nd == __d2._M_nd; } 20472: # 4576 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: friend std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 20472: const std::poisson_distribution<_IntType1>& __x); 20472: # 4591 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: friend std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>& __is, 20472: std::poisson_distribution<_IntType1>& __x); 20472: 20472: private: 20472: template 20472: void 20472: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p); 20472: 20472: param_type _M_param; 20472: 20472: 20472: std::normal_distribution _M_nd; 20472: }; 20472: 20472: 20472: 20472: 20472: template 20472: inline bool 20472: operator!=(const std::poisson_distribution<_IntType>& __d1, 20472: const std::poisson_distribution<_IntType>& __d2) 20472: { return !(__d1 == __d2); } 20472: # 4635 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: class exponential_distribution 20472: { 20472: static_assert(std::is_floating_point<_RealType>::value, 20472: "result_type must be a floating point type"); 20472: 20472: public: 20472: 20472: typedef _RealType result_type; 20472: 20472: 20472: struct param_type 20472: { 20472: typedef exponential_distribution<_RealType> distribution_type; 20472: 20472: param_type() : param_type(1.0) { } 20472: 20472: explicit 20472: param_type(_RealType __lambda) 20472: : _M_lambda(__lambda) 20472: { 20472: ; 20472: } 20472: 20472: _RealType 20472: lambda() const 20472: { return _M_lambda; } 20472: 20472: friend bool 20472: operator==(const param_type& __p1, const param_type& __p2) 20472: { return __p1._M_lambda == __p2._M_lambda; } 20472: 20472: friend bool 20472: operator!=(const param_type& __p1, const param_type& __p2) 20472: { return !(__p1 == __p2); } 20472: 20472: private: 20472: _RealType _M_lambda; 20472: }; 20472: 20472: public: 20472: 20472: 20472: 20472: 20472: exponential_distribution() : exponential_distribution(1.0) { } 20472: 20472: 20472: 20472: 20472: 20472: explicit 20472: exponential_distribution(_RealType __lambda) 20472: : _M_param(__lambda) 20472: { } 20472: 20472: explicit 20472: exponential_distribution(const param_type& __p) 20472: : _M_param(__p) 20472: { } 20472: 20472: 20472: 20472: 20472: 20472: 20472: void 20472: reset() { } 20472: 20472: 20472: 20472: 20472: _RealType 20472: lambda() const 20472: { return _M_param.lambda(); } 20472: 20472: 20472: 20472: 20472: param_type 20472: param() const 20472: { return _M_param; } 20472: 20472: 20472: 20472: 20472: 20472: void 20472: param(const param_type& __param) 20472: { _M_param = __param; } 20472: 20472: 20472: 20472: 20472: result_type 20472: min() const 20472: { return result_type(0); } 20472: 20472: 20472: 20472: 20472: result_type 20472: max() const 20472: { return std::numeric_limits::max(); } 20472: 20472: 20472: 20472: 20472: template 20472: result_type 20472: operator()(_UniformRandomNumberGenerator& __urng) 20472: { return this->operator()(__urng, _M_param); } 20472: 20472: template 20472: result_type 20472: operator()(_UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { 20472: __detail::_Adaptor<_UniformRandomNumberGenerator, result_type> 20472: __aurng(__urng); 20472: return -std::log(result_type(1) - __aurng()) / __p.lambda(); 20472: } 20472: 20472: template 20472: void 20472: __generate(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng) 20472: { this->__generate(__f, __t, __urng, _M_param); } 20472: 20472: template 20472: void 20472: __generate(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { this->__generate_impl(__f, __t, __urng, __p); } 20472: 20472: template 20472: void 20472: __generate(result_type* __f, result_type* __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { this->__generate_impl(__f, __t, __urng, __p); } 20472: 20472: 20472: 20472: 20472: 20472: friend bool 20472: operator==(const exponential_distribution& __d1, 20472: const exponential_distribution& __d2) 20472: { return __d1._M_param == __d2._M_param; } 20472: 20472: private: 20472: template 20472: void 20472: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p); 20472: 20472: param_type _M_param; 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: template 20472: inline bool 20472: operator!=(const std::exponential_distribution<_RealType>& __d1, 20472: const std::exponential_distribution<_RealType>& __d2) 20472: { return !(__d1 == __d2); } 20472: # 4820 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 20472: const std::exponential_distribution<_RealType>& __x); 20472: # 4835 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>& __is, 20472: std::exponential_distribution<_RealType>& __x); 20472: # 4850 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: class weibull_distribution 20472: { 20472: static_assert(std::is_floating_point<_RealType>::value, 20472: "result_type must be a floating point type"); 20472: 20472: public: 20472: 20472: typedef _RealType result_type; 20472: 20472: 20472: struct param_type 20472: { 20472: typedef weibull_distribution<_RealType> distribution_type; 20472: 20472: param_type() : param_type(1.0) { } 20472: 20472: explicit 20472: param_type(_RealType __a, _RealType __b = _RealType(1.0)) 20472: : _M_a(__a), _M_b(__b) 20472: { } 20472: 20472: _RealType 20472: a() const 20472: { return _M_a; } 20472: 20472: _RealType 20472: b() const 20472: { return _M_b; } 20472: 20472: friend bool 20472: operator==(const param_type& __p1, const param_type& __p2) 20472: { return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; } 20472: 20472: friend bool 20472: operator!=(const param_type& __p1, const param_type& __p2) 20472: { return !(__p1 == __p2); } 20472: 20472: private: 20472: _RealType _M_a; 20472: _RealType _M_b; 20472: }; 20472: 20472: weibull_distribution() : weibull_distribution(1.0) { } 20472: 20472: explicit 20472: weibull_distribution(_RealType __a, _RealType __b = _RealType(1)) 20472: : _M_param(__a, __b) 20472: { } 20472: 20472: explicit 20472: weibull_distribution(const param_type& __p) 20472: : _M_param(__p) 20472: { } 20472: 20472: 20472: 20472: 20472: void 20472: reset() 20472: { } 20472: 20472: 20472: 20472: 20472: _RealType 20472: a() const 20472: { return _M_param.a(); } 20472: 20472: 20472: 20472: 20472: _RealType 20472: b() const 20472: { return _M_param.b(); } 20472: 20472: 20472: 20472: 20472: param_type 20472: param() const 20472: { return _M_param; } 20472: 20472: 20472: 20472: 20472: 20472: void 20472: param(const param_type& __param) 20472: { _M_param = __param; } 20472: 20472: 20472: 20472: 20472: result_type 20472: min() const 20472: { return result_type(0); } 20472: 20472: 20472: 20472: 20472: result_type 20472: max() const 20472: { return std::numeric_limits::max(); } 20472: 20472: 20472: 20472: 20472: template 20472: result_type 20472: operator()(_UniformRandomNumberGenerator& __urng) 20472: { return this->operator()(__urng, _M_param); } 20472: 20472: template 20472: result_type 20472: operator()(_UniformRandomNumberGenerator& __urng, 20472: const param_type& __p); 20472: 20472: template 20472: void 20472: __generate(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng) 20472: { this->__generate(__f, __t, __urng, _M_param); } 20472: 20472: template 20472: void 20472: __generate(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { this->__generate_impl(__f, __t, __urng, __p); } 20472: 20472: template 20472: void 20472: __generate(result_type* __f, result_type* __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { this->__generate_impl(__f, __t, __urng, __p); } 20472: 20472: 20472: 20472: 20472: 20472: friend bool 20472: operator==(const weibull_distribution& __d1, 20472: const weibull_distribution& __d2) 20472: { return __d1._M_param == __d2._M_param; } 20472: 20472: private: 20472: template 20472: void 20472: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p); 20472: 20472: param_type _M_param; 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: template 20472: inline bool 20472: operator!=(const std::weibull_distribution<_RealType>& __d1, 20472: const std::weibull_distribution<_RealType>& __d2) 20472: { return !(__d1 == __d2); } 20472: # 5030 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 20472: const std::weibull_distribution<_RealType>& __x); 20472: # 5045 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>& __is, 20472: std::weibull_distribution<_RealType>& __x); 20472: # 5060 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: class extreme_value_distribution 20472: { 20472: static_assert(std::is_floating_point<_RealType>::value, 20472: "result_type must be a floating point type"); 20472: 20472: public: 20472: 20472: typedef _RealType result_type; 20472: 20472: 20472: struct param_type 20472: { 20472: typedef extreme_value_distribution<_RealType> distribution_type; 20472: 20472: param_type() : param_type(0.0) { } 20472: 20472: explicit 20472: param_type(_RealType __a, _RealType __b = _RealType(1.0)) 20472: : _M_a(__a), _M_b(__b) 20472: { } 20472: 20472: _RealType 20472: a() const 20472: { return _M_a; } 20472: 20472: _RealType 20472: b() const 20472: { return _M_b; } 20472: 20472: friend bool 20472: operator==(const param_type& __p1, const param_type& __p2) 20472: { return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; } 20472: 20472: friend bool 20472: operator!=(const param_type& __p1, const param_type& __p2) 20472: { return !(__p1 == __p2); } 20472: 20472: private: 20472: _RealType _M_a; 20472: _RealType _M_b; 20472: }; 20472: 20472: extreme_value_distribution() : extreme_value_distribution(0.0) { } 20472: 20472: explicit 20472: extreme_value_distribution(_RealType __a, _RealType __b = _RealType(1)) 20472: : _M_param(__a, __b) 20472: { } 20472: 20472: explicit 20472: extreme_value_distribution(const param_type& __p) 20472: : _M_param(__p) 20472: { } 20472: 20472: 20472: 20472: 20472: void 20472: reset() 20472: { } 20472: 20472: 20472: 20472: 20472: _RealType 20472: a() const 20472: { return _M_param.a(); } 20472: 20472: 20472: 20472: 20472: _RealType 20472: b() const 20472: { return _M_param.b(); } 20472: 20472: 20472: 20472: 20472: param_type 20472: param() const 20472: { return _M_param; } 20472: 20472: 20472: 20472: 20472: 20472: void 20472: param(const param_type& __param) 20472: { _M_param = __param; } 20472: 20472: 20472: 20472: 20472: result_type 20472: min() const 20472: { return std::numeric_limits::lowest(); } 20472: 20472: 20472: 20472: 20472: result_type 20472: max() const 20472: { return std::numeric_limits::max(); } 20472: 20472: 20472: 20472: 20472: template 20472: result_type 20472: operator()(_UniformRandomNumberGenerator& __urng) 20472: { return this->operator()(__urng, _M_param); } 20472: 20472: template 20472: result_type 20472: operator()(_UniformRandomNumberGenerator& __urng, 20472: const param_type& __p); 20472: 20472: template 20472: void 20472: __generate(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng) 20472: { this->__generate(__f, __t, __urng, _M_param); } 20472: 20472: template 20472: void 20472: __generate(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { this->__generate_impl(__f, __t, __urng, __p); } 20472: 20472: template 20472: void 20472: __generate(result_type* __f, result_type* __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { this->__generate_impl(__f, __t, __urng, __p); } 20472: 20472: 20472: 20472: 20472: 20472: friend bool 20472: operator==(const extreme_value_distribution& __d1, 20472: const extreme_value_distribution& __d2) 20472: { return __d1._M_param == __d2._M_param; } 20472: 20472: private: 20472: template 20472: void 20472: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p); 20472: 20472: param_type _M_param; 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: template 20472: inline bool 20472: operator!=(const std::extreme_value_distribution<_RealType>& __d1, 20472: const std::extreme_value_distribution<_RealType>& __d2) 20472: { return !(__d1 == __d2); } 20472: # 5240 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 20472: const std::extreme_value_distribution<_RealType>& __x); 20472: # 5255 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>& __is, 20472: std::extreme_value_distribution<_RealType>& __x); 20472: # 5267 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: class discrete_distribution 20472: { 20472: static_assert(std::is_integral<_IntType>::value, 20472: "result_type must be an integral type"); 20472: 20472: public: 20472: 20472: typedef _IntType result_type; 20472: 20472: 20472: struct param_type 20472: { 20472: typedef discrete_distribution<_IntType> distribution_type; 20472: friend class discrete_distribution<_IntType>; 20472: 20472: param_type() 20472: : _M_prob(), _M_cp() 20472: { } 20472: 20472: template 20472: param_type(_InputIterator __wbegin, 20472: _InputIterator __wend) 20472: : _M_prob(__wbegin, __wend), _M_cp() 20472: { _M_initialize(); } 20472: 20472: param_type(initializer_list __wil) 20472: : _M_prob(__wil.begin(), __wil.end()), _M_cp() 20472: { _M_initialize(); } 20472: 20472: template 20472: param_type(size_t __nw, double __xmin, double __xmax, 20472: _Func __fw); 20472: 20472: 20472: param_type(const param_type&) = default; 20472: param_type& operator=(const param_type&) = default; 20472: 20472: std::vector 20472: probabilities() const 20472: { return _M_prob.empty() ? std::vector(1, 1.0) : _M_prob; } 20472: 20472: friend bool 20472: operator==(const param_type& __p1, const param_type& __p2) 20472: { return __p1._M_prob == __p2._M_prob; } 20472: 20472: friend bool 20472: operator!=(const param_type& __p1, const param_type& __p2) 20472: { return !(__p1 == __p2); } 20472: 20472: private: 20472: void 20472: _M_initialize(); 20472: 20472: std::vector _M_prob; 20472: std::vector _M_cp; 20472: }; 20472: 20472: discrete_distribution() 20472: : _M_param() 20472: { } 20472: 20472: template 20472: discrete_distribution(_InputIterator __wbegin, 20472: _InputIterator __wend) 20472: : _M_param(__wbegin, __wend) 20472: { } 20472: 20472: discrete_distribution(initializer_list __wl) 20472: : _M_param(__wl) 20472: { } 20472: 20472: template 20472: discrete_distribution(size_t __nw, double __xmin, double __xmax, 20472: _Func __fw) 20472: : _M_param(__nw, __xmin, __xmax, __fw) 20472: { } 20472: 20472: explicit 20472: discrete_distribution(const param_type& __p) 20472: : _M_param(__p) 20472: { } 20472: 20472: 20472: 20472: 20472: void 20472: reset() 20472: { } 20472: 20472: 20472: 20472: 20472: std::vector 20472: probabilities() const 20472: { 20472: return _M_param._M_prob.empty() 20472: ? std::vector(1, 1.0) : _M_param._M_prob; 20472: } 20472: 20472: 20472: 20472: 20472: param_type 20472: param() const 20472: { return _M_param; } 20472: 20472: 20472: 20472: 20472: 20472: void 20472: param(const param_type& __param) 20472: { _M_param = __param; } 20472: 20472: 20472: 20472: 20472: result_type 20472: min() const 20472: { return result_type(0); } 20472: 20472: 20472: 20472: 20472: result_type 20472: max() const 20472: { 20472: return _M_param._M_prob.empty() 20472: ? result_type(0) : result_type(_M_param._M_prob.size() - 1); 20472: } 20472: 20472: 20472: 20472: 20472: template 20472: result_type 20472: operator()(_UniformRandomNumberGenerator& __urng) 20472: { return this->operator()(__urng, _M_param); } 20472: 20472: template 20472: result_type 20472: operator()(_UniformRandomNumberGenerator& __urng, 20472: const param_type& __p); 20472: 20472: template 20472: void 20472: __generate(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng) 20472: { this->__generate(__f, __t, __urng, _M_param); } 20472: 20472: template 20472: void 20472: __generate(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { this->__generate_impl(__f, __t, __urng, __p); } 20472: 20472: template 20472: void 20472: __generate(result_type* __f, result_type* __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { this->__generate_impl(__f, __t, __urng, __p); } 20472: 20472: 20472: 20472: 20472: 20472: friend bool 20472: operator==(const discrete_distribution& __d1, 20472: const discrete_distribution& __d2) 20472: { return __d1._M_param == __d2._M_param; } 20472: # 5453 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: friend std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 20472: const std::discrete_distribution<_IntType1>& __x); 20472: # 5469 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: friend std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>& __is, 20472: std::discrete_distribution<_IntType1>& __x); 20472: 20472: private: 20472: template 20472: void 20472: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p); 20472: 20472: param_type _M_param; 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: template 20472: inline bool 20472: operator!=(const std::discrete_distribution<_IntType>& __d1, 20472: const std::discrete_distribution<_IntType>& __d2) 20472: { return !(__d1 == __d2); } 20472: # 5502 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: class piecewise_constant_distribution 20472: { 20472: static_assert(std::is_floating_point<_RealType>::value, 20472: "result_type must be a floating point type"); 20472: 20472: public: 20472: 20472: typedef _RealType result_type; 20472: 20472: 20472: struct param_type 20472: { 20472: typedef piecewise_constant_distribution<_RealType> distribution_type; 20472: friend class piecewise_constant_distribution<_RealType>; 20472: 20472: param_type() 20472: : _M_int(), _M_den(), _M_cp() 20472: { } 20472: 20472: template 20472: param_type(_InputIteratorB __bfirst, 20472: _InputIteratorB __bend, 20472: _InputIteratorW __wbegin); 20472: 20472: template 20472: param_type(initializer_list<_RealType> __bi, _Func __fw); 20472: 20472: template 20472: param_type(size_t __nw, _RealType __xmin, _RealType __xmax, 20472: _Func __fw); 20472: 20472: 20472: param_type(const param_type&) = default; 20472: param_type& operator=(const param_type&) = default; 20472: 20472: std::vector<_RealType> 20472: intervals() const 20472: { 20472: if (_M_int.empty()) 20472: { 20472: std::vector<_RealType> __tmp(2); 20472: __tmp[1] = _RealType(1); 20472: return __tmp; 20472: } 20472: else 20472: return _M_int; 20472: } 20472: 20472: std::vector 20472: densities() const 20472: { return _M_den.empty() ? std::vector(1, 1.0) : _M_den; } 20472: 20472: friend bool 20472: operator==(const param_type& __p1, const param_type& __p2) 20472: { return __p1._M_int == __p2._M_int && __p1._M_den == __p2._M_den; } 20472: 20472: friend bool 20472: operator!=(const param_type& __p1, const param_type& __p2) 20472: { return !(__p1 == __p2); } 20472: 20472: private: 20472: void 20472: _M_initialize(); 20472: 20472: std::vector<_RealType> _M_int; 20472: std::vector _M_den; 20472: std::vector _M_cp; 20472: }; 20472: 20472: piecewise_constant_distribution() 20472: : _M_param() 20472: { } 20472: 20472: template 20472: piecewise_constant_distribution(_InputIteratorB __bfirst, 20472: _InputIteratorB __bend, 20472: _InputIteratorW __wbegin) 20472: : _M_param(__bfirst, __bend, __wbegin) 20472: { } 20472: 20472: template 20472: piecewise_constant_distribution(initializer_list<_RealType> __bl, 20472: _Func __fw) 20472: : _M_param(__bl, __fw) 20472: { } 20472: 20472: template 20472: piecewise_constant_distribution(size_t __nw, 20472: _RealType __xmin, _RealType __xmax, 20472: _Func __fw) 20472: : _M_param(__nw, __xmin, __xmax, __fw) 20472: { } 20472: 20472: explicit 20472: piecewise_constant_distribution(const param_type& __p) 20472: : _M_param(__p) 20472: { } 20472: 20472: 20472: 20472: 20472: void 20472: reset() 20472: { } 20472: 20472: 20472: 20472: 20472: std::vector<_RealType> 20472: intervals() const 20472: { 20472: if (_M_param._M_int.empty()) 20472: { 20472: std::vector<_RealType> __tmp(2); 20472: __tmp[1] = _RealType(1); 20472: return __tmp; 20472: } 20472: else 20472: return _M_param._M_int; 20472: } 20472: 20472: 20472: 20472: 20472: std::vector 20472: densities() const 20472: { 20472: return _M_param._M_den.empty() 20472: ? std::vector(1, 1.0) : _M_param._M_den; 20472: } 20472: 20472: 20472: 20472: 20472: param_type 20472: param() const 20472: { return _M_param; } 20472: 20472: 20472: 20472: 20472: 20472: void 20472: param(const param_type& __param) 20472: { _M_param = __param; } 20472: 20472: 20472: 20472: 20472: result_type 20472: min() const 20472: { 20472: return _M_param._M_int.empty() 20472: ? result_type(0) : _M_param._M_int.front(); 20472: } 20472: 20472: 20472: 20472: 20472: result_type 20472: max() const 20472: { 20472: return _M_param._M_int.empty() 20472: ? result_type(1) : _M_param._M_int.back(); 20472: } 20472: 20472: 20472: 20472: 20472: template 20472: result_type 20472: operator()(_UniformRandomNumberGenerator& __urng) 20472: { return this->operator()(__urng, _M_param); } 20472: 20472: template 20472: result_type 20472: operator()(_UniformRandomNumberGenerator& __urng, 20472: const param_type& __p); 20472: 20472: template 20472: void 20472: __generate(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng) 20472: { this->__generate(__f, __t, __urng, _M_param); } 20472: 20472: template 20472: void 20472: __generate(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { this->__generate_impl(__f, __t, __urng, __p); } 20472: 20472: template 20472: void 20472: __generate(result_type* __f, result_type* __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { this->__generate_impl(__f, __t, __urng, __p); } 20472: 20472: 20472: 20472: 20472: 20472: friend bool 20472: operator==(const piecewise_constant_distribution& __d1, 20472: const piecewise_constant_distribution& __d2) 20472: { return __d1._M_param == __d2._M_param; } 20472: # 5724 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: friend std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 20472: const std::piecewise_constant_distribution<_RealType1>& __x); 20472: # 5740 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: friend std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>& __is, 20472: std::piecewise_constant_distribution<_RealType1>& __x); 20472: 20472: private: 20472: template 20472: void 20472: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p); 20472: 20472: param_type _M_param; 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: template 20472: inline bool 20472: operator!=(const std::piecewise_constant_distribution<_RealType>& __d1, 20472: const std::piecewise_constant_distribution<_RealType>& __d2) 20472: { return !(__d1 == __d2); } 20472: # 5773 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: class piecewise_linear_distribution 20472: { 20472: static_assert(std::is_floating_point<_RealType>::value, 20472: "result_type must be a floating point type"); 20472: 20472: public: 20472: 20472: typedef _RealType result_type; 20472: 20472: 20472: struct param_type 20472: { 20472: typedef piecewise_linear_distribution<_RealType> distribution_type; 20472: friend class piecewise_linear_distribution<_RealType>; 20472: 20472: param_type() 20472: : _M_int(), _M_den(), _M_cp(), _M_m() 20472: { } 20472: 20472: template 20472: param_type(_InputIteratorB __bfirst, 20472: _InputIteratorB __bend, 20472: _InputIteratorW __wbegin); 20472: 20472: template 20472: param_type(initializer_list<_RealType> __bl, _Func __fw); 20472: 20472: template 20472: param_type(size_t __nw, _RealType __xmin, _RealType __xmax, 20472: _Func __fw); 20472: 20472: 20472: param_type(const param_type&) = default; 20472: param_type& operator=(const param_type&) = default; 20472: 20472: std::vector<_RealType> 20472: intervals() const 20472: { 20472: if (_M_int.empty()) 20472: { 20472: std::vector<_RealType> __tmp(2); 20472: __tmp[1] = _RealType(1); 20472: return __tmp; 20472: } 20472: else 20472: return _M_int; 20472: } 20472: 20472: std::vector 20472: densities() const 20472: { return _M_den.empty() ? std::vector(2, 1.0) : _M_den; } 20472: 20472: friend bool 20472: operator==(const param_type& __p1, const param_type& __p2) 20472: { return __p1._M_int == __p2._M_int && __p1._M_den == __p2._M_den; } 20472: 20472: friend bool 20472: operator!=(const param_type& __p1, const param_type& __p2) 20472: { return !(__p1 == __p2); } 20472: 20472: private: 20472: void 20472: _M_initialize(); 20472: 20472: std::vector<_RealType> _M_int; 20472: std::vector _M_den; 20472: std::vector _M_cp; 20472: std::vector _M_m; 20472: }; 20472: 20472: piecewise_linear_distribution() 20472: : _M_param() 20472: { } 20472: 20472: template 20472: piecewise_linear_distribution(_InputIteratorB __bfirst, 20472: _InputIteratorB __bend, 20472: _InputIteratorW __wbegin) 20472: : _M_param(__bfirst, __bend, __wbegin) 20472: { } 20472: 20472: template 20472: piecewise_linear_distribution(initializer_list<_RealType> __bl, 20472: _Func __fw) 20472: : _M_param(__bl, __fw) 20472: { } 20472: 20472: template 20472: piecewise_linear_distribution(size_t __nw, 20472: _RealType __xmin, _RealType __xmax, 20472: _Func __fw) 20472: : _M_param(__nw, __xmin, __xmax, __fw) 20472: { } 20472: 20472: explicit 20472: piecewise_linear_distribution(const param_type& __p) 20472: : _M_param(__p) 20472: { } 20472: 20472: 20472: 20472: 20472: void 20472: reset() 20472: { } 20472: 20472: 20472: 20472: 20472: std::vector<_RealType> 20472: intervals() const 20472: { 20472: if (_M_param._M_int.empty()) 20472: { 20472: std::vector<_RealType> __tmp(2); 20472: __tmp[1] = _RealType(1); 20472: return __tmp; 20472: } 20472: else 20472: return _M_param._M_int; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: std::vector 20472: densities() const 20472: { 20472: return _M_param._M_den.empty() 20472: ? std::vector(2, 1.0) : _M_param._M_den; 20472: } 20472: 20472: 20472: 20472: 20472: param_type 20472: param() const 20472: { return _M_param; } 20472: 20472: 20472: 20472: 20472: 20472: void 20472: param(const param_type& __param) 20472: { _M_param = __param; } 20472: 20472: 20472: 20472: 20472: result_type 20472: min() const 20472: { 20472: return _M_param._M_int.empty() 20472: ? result_type(0) : _M_param._M_int.front(); 20472: } 20472: 20472: 20472: 20472: 20472: result_type 20472: max() const 20472: { 20472: return _M_param._M_int.empty() 20472: ? result_type(1) : _M_param._M_int.back(); 20472: } 20472: 20472: 20472: 20472: 20472: template 20472: result_type 20472: operator()(_UniformRandomNumberGenerator& __urng) 20472: { return this->operator()(__urng, _M_param); } 20472: 20472: template 20472: result_type 20472: operator()(_UniformRandomNumberGenerator& __urng, 20472: const param_type& __p); 20472: 20472: template 20472: void 20472: __generate(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng) 20472: { this->__generate(__f, __t, __urng, _M_param); } 20472: 20472: template 20472: void 20472: __generate(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { this->__generate_impl(__f, __t, __urng, __p); } 20472: 20472: template 20472: void 20472: __generate(result_type* __f, result_type* __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { this->__generate_impl(__f, __t, __urng, __p); } 20472: 20472: 20472: 20472: 20472: 20472: friend bool 20472: operator==(const piecewise_linear_distribution& __d1, 20472: const piecewise_linear_distribution& __d2) 20472: { return __d1._M_param == __d2._M_param; } 20472: # 5997 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: friend std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 20472: const std::piecewise_linear_distribution<_RealType1>& __x); 20472: # 6013 "/usr/include/c++/10/bits/random.h" 3 20472: template 20472: friend std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>& __is, 20472: std::piecewise_linear_distribution<_RealType1>& __x); 20472: 20472: private: 20472: template 20472: void 20472: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p); 20472: 20472: param_type _M_param; 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: template 20472: inline bool 20472: operator!=(const std::piecewise_linear_distribution<_RealType>& __d1, 20472: const std::piecewise_linear_distribution<_RealType>& __d2) 20472: { return !(__d1 == __d2); } 20472: # 6054 "/usr/include/c++/10/bits/random.h" 3 20472: class seed_seq 20472: { 20472: public: 20472: 20472: typedef uint_least32_t result_type; 20472: 20472: 20472: seed_seq() noexcept 20472: : _M_v() 20472: { } 20472: 20472: template 20472: seed_seq(std::initializer_list<_IntType> __il); 20472: 20472: template 20472: seed_seq(_InputIterator __begin, _InputIterator __end); 20472: 20472: 20472: template 20472: void 20472: generate(_RandomAccessIterator __begin, _RandomAccessIterator __end); 20472: 20472: 20472: size_t size() const noexcept 20472: { return _M_v.size(); } 20472: 20472: template 20472: void 20472: param(_OutputIterator __dest) const 20472: { std::copy(_M_v.begin(), _M_v.end(), __dest); } 20472: 20472: 20472: seed_seq(const seed_seq&) = delete; 20472: seed_seq& operator=(const seed_seq&) = delete; 20472: 20472: private: 20472: std::vector _M_v; 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: } 20472: # 50 "/usr/include/c++/10/random" 2 3 20472: # 1 "/usr/include/arm-linux-gnueabihf/c++/10/bits/opt_random.h" 1 3 20472: # 33 "/usr/include/arm-linux-gnueabihf/c++/10/bits/opt_random.h" 3 20472: 20472: # 34 "/usr/include/arm-linux-gnueabihf/c++/10/bits/opt_random.h" 3 20472: # 51 "/usr/include/c++/10/random" 2 3 20472: # 1 "/usr/include/c++/10/bits/random.tcc" 1 3 20472: # 33 "/usr/include/c++/10/bits/random.tcc" 3 20472: # 1 "/usr/include/c++/10/numeric" 1 3 20472: # 58 "/usr/include/c++/10/numeric" 3 20472: 20472: # 59 "/usr/include/c++/10/numeric" 3 20472: 20472: 20472: 20472: # 1 "/usr/include/c++/10/bits/stl_numeric.h" 1 3 20472: # 64 "/usr/include/c++/10/bits/stl_numeric.h" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: # 85 "/usr/include/c++/10/bits/stl_numeric.h" 3 20472: template 20472: 20472: void 20472: iota(_ForwardIterator __first, _ForwardIterator __last, _Tp __value) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: 20472: for (; __first != __last; ++__first) 20472: { 20472: *__first = __value; 20472: ++__value; 20472: } 20472: } 20472: 20472: 20472: 20472: 20472: 20472: # 131 "/usr/include/c++/10/bits/stl_numeric.h" 3 20472: template 20472: 20472: inline _Tp 20472: accumulate(_InputIterator __first, _InputIterator __last, _Tp __init) 20472: { 20472: 20472: 20472: ; 20472: 20472: for (; __first != __last; ++__first) 20472: __init = __init + *__first; 20472: return __init; 20472: } 20472: # 158 "/usr/include/c++/10/bits/stl_numeric.h" 3 20472: template 20472: 20472: inline _Tp 20472: accumulate(_InputIterator __first, _InputIterator __last, _Tp __init, 20472: _BinaryOperation __binary_op) 20472: { 20472: 20472: 20472: ; 20472: 20472: for (; __first != __last; ++__first) 20472: __init = __binary_op(__init, *__first); 20472: return __init; 20472: } 20472: # 187 "/usr/include/c++/10/bits/stl_numeric.h" 3 20472: template 20472: 20472: inline _Tp 20472: inner_product(_InputIterator1 __first1, _InputIterator1 __last1, 20472: _InputIterator2 __first2, _Tp __init) 20472: { 20472: 20472: 20472: 20472: ; 20472: 20472: for (; __first1 != __last1; ++__first1, (void)++__first2) 20472: __init = __init + (*__first1 * *__first2); 20472: return __init; 20472: } 20472: # 219 "/usr/include/c++/10/bits/stl_numeric.h" 3 20472: template 20472: 20472: inline _Tp 20472: inner_product(_InputIterator1 __first1, _InputIterator1 __last1, 20472: _InputIterator2 __first2, _Tp __init, 20472: _BinaryOperation1 __binary_op1, 20472: _BinaryOperation2 __binary_op2) 20472: { 20472: 20472: 20472: 20472: ; 20472: 20472: for (; __first1 != __last1; ++__first1, (void)++__first2) 20472: __init = __binary_op1(__init, 20472: __binary_op2(*__first1, *__first2)); 20472: return __init; 20472: } 20472: # 253 "/usr/include/c++/10/bits/stl_numeric.h" 3 20472: template 20472: 20472: _OutputIterator 20472: partial_sum(_InputIterator __first, _InputIterator __last, 20472: _OutputIterator __result) 20472: { 20472: typedef typename iterator_traits<_InputIterator>::value_type _ValueType; 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: 20472: if (__first == __last) 20472: return __result; 20472: _ValueType __value = *__first; 20472: *__result = __value; 20472: while (++__first != __last) 20472: { 20472: __value = __value + *__first; 20472: *++__result = __value; 20472: } 20472: return ++__result; 20472: } 20472: # 294 "/usr/include/c++/10/bits/stl_numeric.h" 3 20472: template 20472: 20472: _OutputIterator 20472: partial_sum(_InputIterator __first, _InputIterator __last, 20472: _OutputIterator __result, _BinaryOperation __binary_op) 20472: { 20472: typedef typename iterator_traits<_InputIterator>::value_type _ValueType; 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: 20472: if (__first == __last) 20472: return __result; 20472: _ValueType __value = *__first; 20472: *__result = __value; 20472: while (++__first != __last) 20472: { 20472: __value = __binary_op(__value, *__first); 20472: *++__result = __value; 20472: } 20472: return ++__result; 20472: } 20472: # 335 "/usr/include/c++/10/bits/stl_numeric.h" 3 20472: template 20472: 20472: _OutputIterator 20472: adjacent_difference(_InputIterator __first, 20472: _InputIterator __last, _OutputIterator __result) 20472: { 20472: typedef typename iterator_traits<_InputIterator>::value_type _ValueType; 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: 20472: if (__first == __last) 20472: return __result; 20472: _ValueType __value = *__first; 20472: *__result = __value; 20472: while (++__first != __last) 20472: { 20472: _ValueType __tmp = *__first; 20472: *++__result = __tmp - __value; 20472: __value = std::move(__tmp); 20472: } 20472: return ++__result; 20472: } 20472: # 378 "/usr/include/c++/10/bits/stl_numeric.h" 3 20472: template 20472: 20472: _OutputIterator 20472: adjacent_difference(_InputIterator __first, _InputIterator __last, 20472: _OutputIterator __result, _BinaryOperation __binary_op) 20472: { 20472: typedef typename iterator_traits<_InputIterator>::value_type _ValueType; 20472: 20472: 20472: 20472: 20472: 20472: ; 20472: 20472: if (__first == __last) 20472: return __result; 20472: _ValueType __value = *__first; 20472: *__result = __value; 20472: while (++__first != __last) 20472: { 20472: _ValueType __tmp = *__first; 20472: *++__result = __binary_op(__tmp, __value); 20472: __value = std::move(__tmp); 20472: } 20472: return ++__result; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: } 20472: # 63 "/usr/include/c++/10/numeric" 2 3 20472: # 34 "/usr/include/c++/10/bits/random.tcc" 2 3 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: namespace __detail 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: _Tp 20472: _Mod<_Tp, __m, __a, __c, false, true>:: 20472: __calc(_Tp __x) 20472: { 20472: if (__a == 1) 20472: __x %= __m; 20472: else 20472: { 20472: static const _Tp __q = __m / __a; 20472: static const _Tp __r = __m % __a; 20472: 20472: _Tp __t1 = __a * (__x % __q); 20472: _Tp __t2 = __r * (__x / __q); 20472: if (__t1 >= __t2) 20472: __x = __t1 - __t2; 20472: else 20472: __x = __m - __t2 + __t1; 20472: } 20472: 20472: if (__c != 0) 20472: { 20472: const _Tp __d = __m - __x; 20472: if (__d > __c) 20472: __x += __c; 20472: else 20472: __x = __c - __d; 20472: } 20472: return __x; 20472: } 20472: 20472: template 20472: _OutputIterator 20472: __normalize(_InputIterator __first, _InputIterator __last, 20472: _OutputIterator __result, const _Tp& __factor) 20472: { 20472: for (; __first != __last; ++__first, ++__result) 20472: *__result = *__first / __factor; 20472: return __result; 20472: } 20472: 20472: } 20472: 20472: template 20472: constexpr _UIntType 20472: linear_congruential_engine<_UIntType, __a, __c, __m>::multiplier; 20472: 20472: template 20472: constexpr _UIntType 20472: linear_congruential_engine<_UIntType, __a, __c, __m>::increment; 20472: 20472: template 20472: constexpr _UIntType 20472: linear_congruential_engine<_UIntType, __a, __c, __m>::modulus; 20472: 20472: template 20472: constexpr _UIntType 20472: linear_congruential_engine<_UIntType, __a, __c, __m>::default_seed; 20472: 20472: 20472: 20472: 20472: 20472: template 20472: void 20472: linear_congruential_engine<_UIntType, __a, __c, __m>:: 20472: seed(result_type __s) 20472: { 20472: if ((__detail::__mod<_UIntType, __m>(__c) == 0) 20472: && (__detail::__mod<_UIntType, __m>(__s) == 0)) 20472: _M_x = 1; 20472: else 20472: _M_x = __detail::__mod<_UIntType, __m>(__s); 20472: } 20472: 20472: 20472: 20472: 20472: template 20472: template 20472: auto 20472: linear_congruential_engine<_UIntType, __a, __c, __m>:: 20472: seed(_Sseq& __q) 20472: -> _If_seed_seq<_Sseq> 20472: { 20472: const _UIntType __k0 = __m == 0 ? std::numeric_limits<_UIntType>::digits 20472: : std::__lg(__m); 20472: const _UIntType __k = (__k0 + 31) / 32; 20472: uint_least32_t __arr[__k + 3]; 20472: __q.generate(__arr + 0, __arr + __k + 3); 20472: _UIntType __factor = 1u; 20472: _UIntType __sum = 0u; 20472: for (size_t __j = 0; __j < __k; ++__j) 20472: { 20472: __sum += __arr[__j + 3] * __factor; 20472: __factor *= __detail::_Shift<_UIntType, 32>::__value; 20472: } 20472: seed(__sum); 20472: } 20472: 20472: template 20472: std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 20472: const linear_congruential_engine<_UIntType, 20472: __a, __c, __m>& __lcr) 20472: { 20472: using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; 20472: 20472: const typename __ios_base::fmtflags __flags = __os.flags(); 20472: const _CharT __fill = __os.fill(); 20472: __os.flags(__ios_base::dec | __ios_base::fixed | __ios_base::left); 20472: __os.fill(__os.widen(' ')); 20472: 20472: __os << __lcr._M_x; 20472: 20472: __os.flags(__flags); 20472: __os.fill(__fill); 20472: return __os; 20472: } 20472: 20472: template 20472: std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>& __is, 20472: linear_congruential_engine<_UIntType, __a, __c, __m>& __lcr) 20472: { 20472: using __ios_base = typename basic_istream<_CharT, _Traits>::ios_base; 20472: 20472: const typename __ios_base::fmtflags __flags = __is.flags(); 20472: __is.flags(__ios_base::dec); 20472: 20472: __is >> __lcr._M_x; 20472: 20472: __is.flags(__flags); 20472: return __is; 20472: } 20472: 20472: 20472: template 20472: constexpr size_t 20472: mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, 20472: __s, __b, __t, __c, __l, __f>::word_size; 20472: 20472: template 20472: constexpr size_t 20472: mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, 20472: __s, __b, __t, __c, __l, __f>::state_size; 20472: 20472: template 20472: constexpr size_t 20472: mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, 20472: __s, __b, __t, __c, __l, __f>::shift_size; 20472: 20472: template 20472: constexpr size_t 20472: mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, 20472: __s, __b, __t, __c, __l, __f>::mask_bits; 20472: 20472: template 20472: constexpr _UIntType 20472: mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, 20472: __s, __b, __t, __c, __l, __f>::xor_mask; 20472: 20472: template 20472: constexpr size_t 20472: mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, 20472: __s, __b, __t, __c, __l, __f>::tempering_u; 20472: 20472: template 20472: constexpr _UIntType 20472: mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, 20472: __s, __b, __t, __c, __l, __f>::tempering_d; 20472: 20472: template 20472: constexpr size_t 20472: mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, 20472: __s, __b, __t, __c, __l, __f>::tempering_s; 20472: 20472: template 20472: constexpr _UIntType 20472: mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, 20472: __s, __b, __t, __c, __l, __f>::tempering_b; 20472: 20472: template 20472: constexpr size_t 20472: mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, 20472: __s, __b, __t, __c, __l, __f>::tempering_t; 20472: 20472: template 20472: constexpr _UIntType 20472: mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, 20472: __s, __b, __t, __c, __l, __f>::tempering_c; 20472: 20472: template 20472: constexpr size_t 20472: mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, 20472: __s, __b, __t, __c, __l, __f>::tempering_l; 20472: 20472: template 20472: constexpr _UIntType 20472: mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, 20472: __s, __b, __t, __c, __l, __f>:: 20472: initialization_multiplier; 20472: 20472: template 20472: constexpr _UIntType 20472: mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, 20472: __s, __b, __t, __c, __l, __f>::default_seed; 20472: 20472: template 20472: void 20472: mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, 20472: __s, __b, __t, __c, __l, __f>:: 20472: seed(result_type __sd) 20472: { 20472: _M_x[0] = __detail::__mod<_UIntType, 20472: __detail::_Shift<_UIntType, __w>::__value>(__sd); 20472: 20472: for (size_t __i = 1; __i < state_size; ++__i) 20472: { 20472: _UIntType __x = _M_x[__i - 1]; 20472: __x ^= __x >> (__w - 2); 20472: __x *= __f; 20472: __x += __detail::__mod<_UIntType, __n>(__i); 20472: _M_x[__i] = __detail::__mod<_UIntType, 20472: __detail::_Shift<_UIntType, __w>::__value>(__x); 20472: } 20472: _M_p = state_size; 20472: } 20472: 20472: template 20472: template 20472: auto 20472: mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, 20472: __s, __b, __t, __c, __l, __f>:: 20472: seed(_Sseq& __q) 20472: -> _If_seed_seq<_Sseq> 20472: { 20472: const _UIntType __upper_mask = (~_UIntType()) << __r; 20472: const size_t __k = (__w + 31) / 32; 20472: uint_least32_t __arr[__n * __k]; 20472: __q.generate(__arr + 0, __arr + __n * __k); 20472: 20472: bool __zero = true; 20472: for (size_t __i = 0; __i < state_size; ++__i) 20472: { 20472: _UIntType __factor = 1u; 20472: _UIntType __sum = 0u; 20472: for (size_t __j = 0; __j < __k; ++__j) 20472: { 20472: __sum += __arr[__k * __i + __j] * __factor; 20472: __factor *= __detail::_Shift<_UIntType, 32>::__value; 20472: } 20472: _M_x[__i] = __detail::__mod<_UIntType, 20472: __detail::_Shift<_UIntType, __w>::__value>(__sum); 20472: 20472: if (__zero) 20472: { 20472: if (__i == 0) 20472: { 20472: if ((_M_x[0] & __upper_mask) != 0u) 20472: __zero = false; 20472: } 20472: else if (_M_x[__i] != 0u) 20472: __zero = false; 20472: } 20472: } 20472: if (__zero) 20472: _M_x[0] = __detail::_Shift<_UIntType, __w - 1>::__value; 20472: _M_p = state_size; 20472: } 20472: 20472: template 20472: void 20472: mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, 20472: __s, __b, __t, __c, __l, __f>:: 20472: _M_gen_rand(void) 20472: { 20472: const _UIntType __upper_mask = (~_UIntType()) << __r; 20472: const _UIntType __lower_mask = ~__upper_mask; 20472: 20472: for (size_t __k = 0; __k < (__n - __m); ++__k) 20472: { 20472: _UIntType __y = ((_M_x[__k] & __upper_mask) 20472: | (_M_x[__k + 1] & __lower_mask)); 20472: _M_x[__k] = (_M_x[__k + __m] ^ (__y >> 1) 20472: ^ ((__y & 0x01) ? __a : 0)); 20472: } 20472: 20472: for (size_t __k = (__n - __m); __k < (__n - 1); ++__k) 20472: { 20472: _UIntType __y = ((_M_x[__k] & __upper_mask) 20472: | (_M_x[__k + 1] & __lower_mask)); 20472: _M_x[__k] = (_M_x[__k + (__m - __n)] ^ (__y >> 1) 20472: ^ ((__y & 0x01) ? __a : 0)); 20472: } 20472: 20472: _UIntType __y = ((_M_x[__n - 1] & __upper_mask) 20472: | (_M_x[0] & __lower_mask)); 20472: _M_x[__n - 1] = (_M_x[__m - 1] ^ (__y >> 1) 20472: ^ ((__y & 0x01) ? __a : 0)); 20472: _M_p = 0; 20472: } 20472: 20472: template 20472: void 20472: mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, 20472: __s, __b, __t, __c, __l, __f>:: 20472: discard(unsigned long long __z) 20472: { 20472: while (__z > state_size - _M_p) 20472: { 20472: __z -= state_size - _M_p; 20472: _M_gen_rand(); 20472: } 20472: _M_p += __z; 20472: } 20472: 20472: template 20472: typename 20472: mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, 20472: __s, __b, __t, __c, __l, __f>::result_type 20472: mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, 20472: __s, __b, __t, __c, __l, __f>:: 20472: operator()() 20472: { 20472: 20472: if (_M_p >= state_size) 20472: _M_gen_rand(); 20472: 20472: 20472: result_type __z = _M_x[_M_p++]; 20472: __z ^= (__z >> __u) & __d; 20472: __z ^= (__z << __s) & __b; 20472: __z ^= (__z << __t) & __c; 20472: __z ^= (__z >> __l); 20472: 20472: return __z; 20472: } 20472: 20472: template 20472: std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 20472: const mersenne_twister_engine<_UIntType, __w, __n, __m, 20472: __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>& __x) 20472: { 20472: using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; 20472: 20472: const typename __ios_base::fmtflags __flags = __os.flags(); 20472: const _CharT __fill = __os.fill(); 20472: const _CharT __space = __os.widen(' '); 20472: __os.flags(__ios_base::dec | __ios_base::fixed | __ios_base::left); 20472: __os.fill(__space); 20472: 20472: for (size_t __i = 0; __i < __n; ++__i) 20472: __os << __x._M_x[__i] << __space; 20472: __os << __x._M_p; 20472: 20472: __os.flags(__flags); 20472: __os.fill(__fill); 20472: return __os; 20472: } 20472: 20472: template 20472: std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>& __is, 20472: mersenne_twister_engine<_UIntType, __w, __n, __m, 20472: __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>& __x) 20472: { 20472: using __ios_base = typename basic_istream<_CharT, _Traits>::ios_base; 20472: 20472: const typename __ios_base::fmtflags __flags = __is.flags(); 20472: __is.flags(__ios_base::dec | __ios_base::skipws); 20472: 20472: for (size_t __i = 0; __i < __n; ++__i) 20472: __is >> __x._M_x[__i]; 20472: __is >> __x._M_p; 20472: 20472: __is.flags(__flags); 20472: return __is; 20472: } 20472: 20472: 20472: template 20472: constexpr size_t 20472: subtract_with_carry_engine<_UIntType, __w, __s, __r>::word_size; 20472: 20472: template 20472: constexpr size_t 20472: subtract_with_carry_engine<_UIntType, __w, __s, __r>::short_lag; 20472: 20472: template 20472: constexpr size_t 20472: subtract_with_carry_engine<_UIntType, __w, __s, __r>::long_lag; 20472: 20472: template 20472: constexpr _UIntType 20472: subtract_with_carry_engine<_UIntType, __w, __s, __r>::default_seed; 20472: 20472: template 20472: void 20472: subtract_with_carry_engine<_UIntType, __w, __s, __r>:: 20472: seed(result_type __value) 20472: { 20472: std::linear_congruential_engine 20472: __lcg(__value == 0u ? default_seed : __value); 20472: 20472: const size_t __n = (__w + 31) / 32; 20472: 20472: for (size_t __i = 0; __i < long_lag; ++__i) 20472: { 20472: _UIntType __sum = 0u; 20472: _UIntType __factor = 1u; 20472: for (size_t __j = 0; __j < __n; ++__j) 20472: { 20472: __sum += __detail::__mod::__value> 20472: (__lcg()) * __factor; 20472: __factor *= __detail::_Shift<_UIntType, 32>::__value; 20472: } 20472: _M_x[__i] = __detail::__mod<_UIntType, 20472: __detail::_Shift<_UIntType, __w>::__value>(__sum); 20472: } 20472: _M_carry = (_M_x[long_lag - 1] == 0) ? 1 : 0; 20472: _M_p = 0; 20472: } 20472: 20472: template 20472: template 20472: auto 20472: subtract_with_carry_engine<_UIntType, __w, __s, __r>:: 20472: seed(_Sseq& __q) 20472: -> _If_seed_seq<_Sseq> 20472: { 20472: const size_t __k = (__w + 31) / 32; 20472: uint_least32_t __arr[__r * __k]; 20472: __q.generate(__arr + 0, __arr + __r * __k); 20472: 20472: for (size_t __i = 0; __i < long_lag; ++__i) 20472: { 20472: _UIntType __sum = 0u; 20472: _UIntType __factor = 1u; 20472: for (size_t __j = 0; __j < __k; ++__j) 20472: { 20472: __sum += __arr[__k * __i + __j] * __factor; 20472: __factor *= __detail::_Shift<_UIntType, 32>::__value; 20472: } 20472: _M_x[__i] = __detail::__mod<_UIntType, 20472: __detail::_Shift<_UIntType, __w>::__value>(__sum); 20472: } 20472: _M_carry = (_M_x[long_lag - 1] == 0) ? 1 : 0; 20472: _M_p = 0; 20472: } 20472: 20472: template 20472: typename subtract_with_carry_engine<_UIntType, __w, __s, __r>:: 20472: result_type 20472: subtract_with_carry_engine<_UIntType, __w, __s, __r>:: 20472: operator()() 20472: { 20472: 20472: long __ps = _M_p - short_lag; 20472: if (__ps < 0) 20472: __ps += long_lag; 20472: 20472: 20472: 20472: 20472: _UIntType __xi; 20472: if (_M_x[__ps] >= _M_x[_M_p] + _M_carry) 20472: { 20472: __xi = _M_x[__ps] - _M_x[_M_p] - _M_carry; 20472: _M_carry = 0; 20472: } 20472: else 20472: { 20472: __xi = (__detail::_Shift<_UIntType, __w>::__value 20472: - _M_x[_M_p] - _M_carry + _M_x[__ps]); 20472: _M_carry = 1; 20472: } 20472: _M_x[_M_p] = __xi; 20472: 20472: 20472: if (++_M_p >= long_lag) 20472: _M_p = 0; 20472: 20472: return __xi; 20472: } 20472: 20472: template 20472: std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 20472: const subtract_with_carry_engine<_UIntType, 20472: __w, __s, __r>& __x) 20472: { 20472: using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; 20472: 20472: const typename __ios_base::fmtflags __flags = __os.flags(); 20472: const _CharT __fill = __os.fill(); 20472: const _CharT __space = __os.widen(' '); 20472: __os.flags(__ios_base::dec | __ios_base::fixed | __ios_base::left); 20472: __os.fill(__space); 20472: 20472: for (size_t __i = 0; __i < __r; ++__i) 20472: __os << __x._M_x[__i] << __space; 20472: __os << __x._M_carry << __space << __x._M_p; 20472: 20472: __os.flags(__flags); 20472: __os.fill(__fill); 20472: return __os; 20472: } 20472: 20472: template 20472: std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>& __is, 20472: subtract_with_carry_engine<_UIntType, __w, __s, __r>& __x) 20472: { 20472: using __ios_base = typename basic_istream<_CharT, _Traits>::ios_base; 20472: 20472: const typename __ios_base::fmtflags __flags = __is.flags(); 20472: __is.flags(__ios_base::dec | __ios_base::skipws); 20472: 20472: for (size_t __i = 0; __i < __r; ++__i) 20472: __is >> __x._M_x[__i]; 20472: __is >> __x._M_carry; 20472: __is >> __x._M_p; 20472: 20472: __is.flags(__flags); 20472: return __is; 20472: } 20472: 20472: 20472: template 20472: constexpr size_t 20472: discard_block_engine<_RandomNumberEngine, __p, __r>::block_size; 20472: 20472: template 20472: constexpr size_t 20472: discard_block_engine<_RandomNumberEngine, __p, __r>::used_block; 20472: 20472: template 20472: typename discard_block_engine<_RandomNumberEngine, 20472: __p, __r>::result_type 20472: discard_block_engine<_RandomNumberEngine, __p, __r>:: 20472: operator()() 20472: { 20472: if (_M_n >= used_block) 20472: { 20472: _M_b.discard(block_size - _M_n); 20472: _M_n = 0; 20472: } 20472: ++_M_n; 20472: return _M_b(); 20472: } 20472: 20472: template 20472: std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 20472: const discard_block_engine<_RandomNumberEngine, 20472: __p, __r>& __x) 20472: { 20472: using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; 20472: 20472: const typename __ios_base::fmtflags __flags = __os.flags(); 20472: const _CharT __fill = __os.fill(); 20472: const _CharT __space = __os.widen(' '); 20472: __os.flags(__ios_base::dec | __ios_base::fixed | __ios_base::left); 20472: __os.fill(__space); 20472: 20472: __os << __x.base() << __space << __x._M_n; 20472: 20472: __os.flags(__flags); 20472: __os.fill(__fill); 20472: return __os; 20472: } 20472: 20472: template 20472: std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>& __is, 20472: discard_block_engine<_RandomNumberEngine, __p, __r>& __x) 20472: { 20472: using __ios_base = typename basic_istream<_CharT, _Traits>::ios_base; 20472: 20472: const typename __ios_base::fmtflags __flags = __is.flags(); 20472: __is.flags(__ios_base::dec | __ios_base::skipws); 20472: 20472: __is >> __x._M_b >> __x._M_n; 20472: 20472: __is.flags(__flags); 20472: return __is; 20472: } 20472: 20472: 20472: template 20472: typename independent_bits_engine<_RandomNumberEngine, __w, _UIntType>:: 20472: result_type 20472: independent_bits_engine<_RandomNumberEngine, __w, _UIntType>:: 20472: operator()() 20472: { 20472: typedef typename _RandomNumberEngine::result_type _Eresult_type; 20472: const _Eresult_type __r 20472: = (_M_b.max() - _M_b.min() < std::numeric_limits<_Eresult_type>::max() 20472: ? _M_b.max() - _M_b.min() + 1 : 0); 20472: const unsigned __edig = std::numeric_limits<_Eresult_type>::digits; 20472: const unsigned __m = __r ? std::__lg(__r) : __edig; 20472: 20472: typedef typename std::common_type<_Eresult_type, result_type>::type 20472: __ctype; 20472: const unsigned __cdig = std::numeric_limits<__ctype>::digits; 20472: 20472: unsigned __n, __n0; 20472: __ctype __s0, __s1, __y0, __y1; 20472: 20472: for (size_t __i = 0; __i < 2; ++__i) 20472: { 20472: __n = (__w + __m - 1) / __m + __i; 20472: __n0 = __n - __w % __n; 20472: const unsigned __w0 = __w / __n; 20472: 20472: __s0 = 0; 20472: __s1 = 0; 20472: if (__w0 < __cdig) 20472: { 20472: __s0 = __ctype(1) << __w0; 20472: __s1 = __s0 << 1; 20472: } 20472: 20472: __y0 = 0; 20472: __y1 = 0; 20472: if (__r) 20472: { 20472: __y0 = __s0 * (__r / __s0); 20472: if (__s1) 20472: __y1 = __s1 * (__r / __s1); 20472: 20472: if (__r - __y0 <= __y0 / __n) 20472: break; 20472: } 20472: else 20472: break; 20472: } 20472: 20472: result_type __sum = 0; 20472: for (size_t __k = 0; __k < __n0; ++__k) 20472: { 20472: __ctype __u; 20472: do 20472: __u = _M_b() - _M_b.min(); 20472: while (__y0 && __u >= __y0); 20472: __sum = __s0 * __sum + (__s0 ? __u % __s0 : __u); 20472: } 20472: for (size_t __k = __n0; __k < __n; ++__k) 20472: { 20472: __ctype __u; 20472: do 20472: __u = _M_b() - _M_b.min(); 20472: while (__y1 && __u >= __y1); 20472: __sum = __s1 * __sum + (__s1 ? __u % __s1 : __u); 20472: } 20472: return __sum; 20472: } 20472: 20472: 20472: template 20472: constexpr size_t 20472: shuffle_order_engine<_RandomNumberEngine, __k>::table_size; 20472: 20472: template 20472: typename shuffle_order_engine<_RandomNumberEngine, __k>::result_type 20472: shuffle_order_engine<_RandomNumberEngine, __k>:: 20472: operator()() 20472: { 20472: size_t __j = __k * ((_M_y - _M_b.min()) 20472: / (_M_b.max() - _M_b.min() + 1.0L)); 20472: _M_y = _M_v[__j]; 20472: _M_v[__j] = _M_b(); 20472: 20472: return _M_y; 20472: } 20472: 20472: template 20472: std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 20472: const shuffle_order_engine<_RandomNumberEngine, __k>& __x) 20472: { 20472: using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; 20472: 20472: const typename __ios_base::fmtflags __flags = __os.flags(); 20472: const _CharT __fill = __os.fill(); 20472: const _CharT __space = __os.widen(' '); 20472: __os.flags(__ios_base::dec | __ios_base::fixed | __ios_base::left); 20472: __os.fill(__space); 20472: 20472: __os << __x.base(); 20472: for (size_t __i = 0; __i < __k; ++__i) 20472: __os << __space << __x._M_v[__i]; 20472: __os << __space << __x._M_y; 20472: 20472: __os.flags(__flags); 20472: __os.fill(__fill); 20472: return __os; 20472: } 20472: 20472: template 20472: std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>& __is, 20472: shuffle_order_engine<_RandomNumberEngine, __k>& __x) 20472: { 20472: using __ios_base = typename basic_istream<_CharT, _Traits>::ios_base; 20472: 20472: const typename __ios_base::fmtflags __flags = __is.flags(); 20472: __is.flags(__ios_base::dec | __ios_base::skipws); 20472: 20472: __is >> __x._M_b; 20472: for (size_t __i = 0; __i < __k; ++__i) 20472: __is >> __x._M_v[__i]; 20472: __is >> __x._M_y; 20472: 20472: __is.flags(__flags); 20472: return __is; 20472: } 20472: 20472: 20472: template 20472: std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 20472: const uniform_int_distribution<_IntType>& __x) 20472: { 20472: using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; 20472: 20472: const typename __ios_base::fmtflags __flags = __os.flags(); 20472: const _CharT __fill = __os.fill(); 20472: const _CharT __space = __os.widen(' '); 20472: __os.flags(__ios_base::scientific | __ios_base::left); 20472: __os.fill(__space); 20472: 20472: __os << __x.a() << __space << __x.b(); 20472: 20472: __os.flags(__flags); 20472: __os.fill(__fill); 20472: return __os; 20472: } 20472: 20472: template 20472: std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>& __is, 20472: uniform_int_distribution<_IntType>& __x) 20472: { 20472: using param_type 20472: = typename uniform_int_distribution<_IntType>::param_type; 20472: using __ios_base = typename basic_istream<_CharT, _Traits>::ios_base; 20472: 20472: const typename __ios_base::fmtflags __flags = __is.flags(); 20472: __is.flags(__ios_base::dec | __ios_base::skipws); 20472: 20472: _IntType __a, __b; 20472: if (__is >> __a >> __b) 20472: __x.param(param_type(__a, __b)); 20472: 20472: __is.flags(__flags); 20472: return __is; 20472: } 20472: 20472: 20472: template 20472: template 20472: void 20472: uniform_real_distribution<_RealType>:: 20472: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { 20472: 20472: __detail::_Adaptor<_UniformRandomNumberGenerator, result_type> 20472: __aurng(__urng); 20472: auto __range = __p.b() - __p.a(); 20472: while (__f != __t) 20472: *__f++ = __aurng() * __range + __p.a(); 20472: } 20472: 20472: template 20472: std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 20472: const uniform_real_distribution<_RealType>& __x) 20472: { 20472: using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; 20472: 20472: const typename __ios_base::fmtflags __flags = __os.flags(); 20472: const _CharT __fill = __os.fill(); 20472: const std::streamsize __precision = __os.precision(); 20472: const _CharT __space = __os.widen(' '); 20472: __os.flags(__ios_base::scientific | __ios_base::left); 20472: __os.fill(__space); 20472: __os.precision(std::numeric_limits<_RealType>::max_digits10); 20472: 20472: __os << __x.a() << __space << __x.b(); 20472: 20472: __os.flags(__flags); 20472: __os.fill(__fill); 20472: __os.precision(__precision); 20472: return __os; 20472: } 20472: 20472: template 20472: std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>& __is, 20472: uniform_real_distribution<_RealType>& __x) 20472: { 20472: using param_type 20472: = typename uniform_real_distribution<_RealType>::param_type; 20472: using __ios_base = typename basic_istream<_CharT, _Traits>::ios_base; 20472: 20472: const typename __ios_base::fmtflags __flags = __is.flags(); 20472: __is.flags(__ios_base::skipws); 20472: 20472: _RealType __a, __b; 20472: if (__is >> __a >> __b) 20472: __x.param(param_type(__a, __b)); 20472: 20472: __is.flags(__flags); 20472: return __is; 20472: } 20472: 20472: 20472: template 20472: void 20472: std::bernoulli_distribution:: 20472: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { 20472: 20472: __detail::_Adaptor<_UniformRandomNumberGenerator, double> 20472: __aurng(__urng); 20472: auto __limit = __p.p() * (__aurng.max() - __aurng.min()); 20472: 20472: while (__f != __t) 20472: *__f++ = (__aurng() - __aurng.min()) < __limit; 20472: } 20472: 20472: template 20472: std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 20472: const bernoulli_distribution& __x) 20472: { 20472: using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; 20472: 20472: const typename __ios_base::fmtflags __flags = __os.flags(); 20472: const _CharT __fill = __os.fill(); 20472: const std::streamsize __precision = __os.precision(); 20472: __os.flags(__ios_base::scientific | __ios_base::left); 20472: __os.fill(__os.widen(' ')); 20472: __os.precision(std::numeric_limits::max_digits10); 20472: 20472: __os << __x.p(); 20472: 20472: __os.flags(__flags); 20472: __os.fill(__fill); 20472: __os.precision(__precision); 20472: return __os; 20472: } 20472: 20472: 20472: template 20472: template 20472: typename geometric_distribution<_IntType>::result_type 20472: geometric_distribution<_IntType>:: 20472: operator()(_UniformRandomNumberGenerator& __urng, 20472: const param_type& __param) 20472: { 20472: 20472: 20472: const double __naf = 20472: (1 - std::numeric_limits::epsilon()) / 2; 20472: 20472: const double __thr = 20472: std::numeric_limits<_IntType>::max() + __naf; 20472: __detail::_Adaptor<_UniformRandomNumberGenerator, double> 20472: __aurng(__urng); 20472: 20472: double __cand; 20472: do 20472: __cand = std::floor(std::log(1.0 - __aurng()) / __param._M_log_1_p); 20472: while (__cand >= __thr); 20472: 20472: return result_type(__cand + __naf); 20472: } 20472: 20472: template 20472: template 20472: void 20472: geometric_distribution<_IntType>:: 20472: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __param) 20472: { 20472: 20472: 20472: 20472: const double __naf = 20472: (1 - std::numeric_limits::epsilon()) / 2; 20472: 20472: const double __thr = 20472: std::numeric_limits<_IntType>::max() + __naf; 20472: __detail::_Adaptor<_UniformRandomNumberGenerator, double> 20472: __aurng(__urng); 20472: 20472: while (__f != __t) 20472: { 20472: double __cand; 20472: do 20472: __cand = std::floor(std::log(1.0 - __aurng()) 20472: / __param._M_log_1_p); 20472: while (__cand >= __thr); 20472: 20472: *__f++ = __cand + __naf; 20472: } 20472: } 20472: 20472: template 20472: std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 20472: const geometric_distribution<_IntType>& __x) 20472: { 20472: using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; 20472: 20472: const typename __ios_base::fmtflags __flags = __os.flags(); 20472: const _CharT __fill = __os.fill(); 20472: const std::streamsize __precision = __os.precision(); 20472: __os.flags(__ios_base::scientific | __ios_base::left); 20472: __os.fill(__os.widen(' ')); 20472: __os.precision(std::numeric_limits::max_digits10); 20472: 20472: __os << __x.p(); 20472: 20472: __os.flags(__flags); 20472: __os.fill(__fill); 20472: __os.precision(__precision); 20472: return __os; 20472: } 20472: 20472: template 20472: std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>& __is, 20472: geometric_distribution<_IntType>& __x) 20472: { 20472: using param_type = typename geometric_distribution<_IntType>::param_type; 20472: using __ios_base = typename basic_istream<_CharT, _Traits>::ios_base; 20472: 20472: const typename __ios_base::fmtflags __flags = __is.flags(); 20472: __is.flags(__ios_base::skipws); 20472: 20472: double __p; 20472: if (__is >> __p) 20472: __x.param(param_type(__p)); 20472: 20472: __is.flags(__flags); 20472: return __is; 20472: } 20472: 20472: 20472: template 20472: template 20472: typename negative_binomial_distribution<_IntType>::result_type 20472: negative_binomial_distribution<_IntType>:: 20472: operator()(_UniformRandomNumberGenerator& __urng) 20472: { 20472: const double __y = _M_gd(__urng); 20472: 20472: 20472: std::poisson_distribution __poisson(__y); 20472: return __poisson(__urng); 20472: } 20472: 20472: template 20472: template 20472: typename negative_binomial_distribution<_IntType>::result_type 20472: negative_binomial_distribution<_IntType>:: 20472: operator()(_UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { 20472: typedef typename std::gamma_distribution::param_type 20472: param_type; 20472: 20472: const double __y = 20472: _M_gd(__urng, param_type(__p.k(), (1.0 - __p.p()) / __p.p())); 20472: 20472: std::poisson_distribution __poisson(__y); 20472: return __poisson(__urng); 20472: } 20472: 20472: template 20472: template 20472: void 20472: negative_binomial_distribution<_IntType>:: 20472: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng) 20472: { 20472: 20472: while (__f != __t) 20472: { 20472: const double __y = _M_gd(__urng); 20472: 20472: 20472: std::poisson_distribution __poisson(__y); 20472: *__f++ = __poisson(__urng); 20472: } 20472: } 20472: 20472: template 20472: template 20472: void 20472: negative_binomial_distribution<_IntType>:: 20472: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { 20472: 20472: typename std::gamma_distribution::param_type 20472: __p2(__p.k(), (1.0 - __p.p()) / __p.p()); 20472: 20472: while (__f != __t) 20472: { 20472: const double __y = _M_gd(__urng, __p2); 20472: 20472: std::poisson_distribution __poisson(__y); 20472: *__f++ = __poisson(__urng); 20472: } 20472: } 20472: 20472: template 20472: std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 20472: const negative_binomial_distribution<_IntType>& __x) 20472: { 20472: using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; 20472: 20472: const typename __ios_base::fmtflags __flags = __os.flags(); 20472: const _CharT __fill = __os.fill(); 20472: const std::streamsize __precision = __os.precision(); 20472: const _CharT __space = __os.widen(' '); 20472: __os.flags(__ios_base::scientific | __ios_base::left); 20472: __os.fill(__os.widen(' ')); 20472: __os.precision(std::numeric_limits::max_digits10); 20472: 20472: __os << __x.k() << __space << __x.p() 20472: << __space << __x._M_gd; 20472: 20472: __os.flags(__flags); 20472: __os.fill(__fill); 20472: __os.precision(__precision); 20472: return __os; 20472: } 20472: 20472: template 20472: std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>& __is, 20472: negative_binomial_distribution<_IntType>& __x) 20472: { 20472: using param_type 20472: = typename negative_binomial_distribution<_IntType>::param_type; 20472: using __ios_base = typename basic_istream<_CharT, _Traits>::ios_base; 20472: 20472: const typename __ios_base::fmtflags __flags = __is.flags(); 20472: __is.flags(__ios_base::skipws); 20472: 20472: _IntType __k; 20472: double __p; 20472: if (__is >> __k >> __p >> __x._M_gd) 20472: __x.param(param_type(__k, __p)); 20472: 20472: __is.flags(__flags); 20472: return __is; 20472: } 20472: 20472: 20472: template 20472: void 20472: poisson_distribution<_IntType>::param_type:: 20472: _M_initialize() 20472: { 20472: 20472: if (_M_mean >= 12) 20472: { 20472: const double __m = std::floor(_M_mean); 20472: _M_lm_thr = std::log(_M_mean); 20472: _M_lfm = std::lgamma(__m + 1); 20472: _M_sm = std::sqrt(__m); 20472: 20472: const double __pi_4 = 0.7853981633974483096156608458198757L; 20472: const double __dx = std::sqrt(2 * __m * std::log(32 * __m 20472: / __pi_4)); 20472: _M_d = std::round(std::max(6.0, std::min(__m, __dx))); 20472: const double __cx = 2 * __m + _M_d; 20472: _M_scx = std::sqrt(__cx / 2); 20472: _M_1cx = 1 / __cx; 20472: 20472: _M_c2b = std::sqrt(__pi_4 * __cx) * std::exp(_M_1cx); 20472: _M_cb = 2 * __cx * std::exp(-_M_d * _M_1cx * (1 + _M_d / 2)) 20472: / _M_d; 20472: } 20472: else 20472: 20472: _M_lm_thr = std::exp(-_M_mean); 20472: } 20472: # 1265 "/usr/include/c++/10/bits/random.tcc" 3 20472: template 20472: template 20472: typename poisson_distribution<_IntType>::result_type 20472: poisson_distribution<_IntType>:: 20472: operator()(_UniformRandomNumberGenerator& __urng, 20472: const param_type& __param) 20472: { 20472: __detail::_Adaptor<_UniformRandomNumberGenerator, double> 20472: __aurng(__urng); 20472: 20472: if (__param.mean() >= 12) 20472: { 20472: double __x; 20472: 20472: 20472: const double __naf = 20472: (1 - std::numeric_limits::epsilon()) / 2; 20472: const double __thr = 20472: std::numeric_limits<_IntType>::max() + __naf; 20472: 20472: const double __m = std::floor(__param.mean()); 20472: 20472: const double __spi_2 = 1.2533141373155002512078826424055226L; 20472: const double __c1 = __param._M_sm * __spi_2; 20472: const double __c2 = __param._M_c2b + __c1; 20472: const double __c3 = __c2 + 1; 20472: const double __c4 = __c3 + 1; 20472: 20472: const double __178 = 0.0128205128205128205128205128205128L; 20472: 20472: const double __e178 = 1.0129030479320018583185514777512983L; 20472: const double __c5 = __c4 + __e178; 20472: const double __c = __param._M_cb + __c5; 20472: const double __2cx = 2 * (2 * __m + __param._M_d); 20472: 20472: bool __reject = true; 20472: do 20472: { 20472: const double __u = __c * __aurng(); 20472: const double __e = -std::log(1.0 - __aurng()); 20472: 20472: double __w = 0.0; 20472: 20472: if (__u <= __c1) 20472: { 20472: const double __n = _M_nd(__urng); 20472: const double __y = -std::abs(__n) * __param._M_sm - 1; 20472: __x = std::floor(__y); 20472: __w = -__n * __n / 2; 20472: if (__x < -__m) 20472: continue; 20472: } 20472: else if (__u <= __c2) 20472: { 20472: const double __n = _M_nd(__urng); 20472: const double __y = 1 + std::abs(__n) * __param._M_scx; 20472: __x = std::ceil(__y); 20472: __w = __y * (2 - __y) * __param._M_1cx; 20472: if (__x > __param._M_d) 20472: continue; 20472: } 20472: else if (__u <= __c3) 20472: 20472: 20472: __x = -1; 20472: else if (__u <= __c4) 20472: __x = 0; 20472: else if (__u <= __c5) 20472: { 20472: __x = 1; 20472: 20472: __w = __178; 20472: } 20472: else 20472: { 20472: const double __v = -std::log(1.0 - __aurng()); 20472: const double __y = __param._M_d 20472: + __v * __2cx / __param._M_d; 20472: __x = std::ceil(__y); 20472: __w = -__param._M_d * __param._M_1cx * (1 + __y / 2); 20472: } 20472: 20472: __reject = (__w - __e - __x * __param._M_lm_thr 20472: > __param._M_lfm - std::lgamma(__x + __m + 1)); 20472: 20472: __reject |= __x + __m >= __thr; 20472: 20472: } while (__reject); 20472: 20472: return result_type(__x + __m + __naf); 20472: } 20472: else 20472: 20472: { 20472: _IntType __x = 0; 20472: double __prod = 1.0; 20472: 20472: do 20472: { 20472: __prod *= __aurng(); 20472: __x += 1; 20472: } 20472: while (__prod > __param._M_lm_thr); 20472: 20472: return __x - 1; 20472: } 20472: } 20472: 20472: template 20472: template 20472: void 20472: poisson_distribution<_IntType>:: 20472: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __param) 20472: { 20472: 20472: 20472: while (__f != __t) 20472: *__f++ = this->operator()(__urng, __param); 20472: } 20472: 20472: template 20472: std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 20472: const poisson_distribution<_IntType>& __x) 20472: { 20472: using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; 20472: 20472: const typename __ios_base::fmtflags __flags = __os.flags(); 20472: const _CharT __fill = __os.fill(); 20472: const std::streamsize __precision = __os.precision(); 20472: const _CharT __space = __os.widen(' '); 20472: __os.flags(__ios_base::scientific | __ios_base::left); 20472: __os.fill(__space); 20472: __os.precision(std::numeric_limits::max_digits10); 20472: 20472: __os << __x.mean() << __space << __x._M_nd; 20472: 20472: __os.flags(__flags); 20472: __os.fill(__fill); 20472: __os.precision(__precision); 20472: return __os; 20472: } 20472: 20472: template 20472: std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>& __is, 20472: poisson_distribution<_IntType>& __x) 20472: { 20472: using param_type = typename poisson_distribution<_IntType>::param_type; 20472: using __ios_base = typename basic_istream<_CharT, _Traits>::ios_base; 20472: 20472: const typename __ios_base::fmtflags __flags = __is.flags(); 20472: __is.flags(__ios_base::skipws); 20472: 20472: double __mean; 20472: if (__is >> __mean >> __x._M_nd) 20472: __x.param(param_type(__mean)); 20472: 20472: __is.flags(__flags); 20472: return __is; 20472: } 20472: 20472: 20472: template 20472: void 20472: binomial_distribution<_IntType>::param_type:: 20472: _M_initialize() 20472: { 20472: const double __p12 = _M_p <= 0.5 ? _M_p : 1.0 - _M_p; 20472: 20472: _M_easy = true; 20472: 20472: 20472: if (_M_t * __p12 >= 8) 20472: { 20472: _M_easy = false; 20472: const double __np = std::floor(_M_t * __p12); 20472: const double __pa = __np / _M_t; 20472: const double __1p = 1 - __pa; 20472: 20472: const double __pi_4 = 0.7853981633974483096156608458198757L; 20472: const double __d1x = 20472: std::sqrt(__np * __1p * std::log(32 * __np 20472: / (81 * __pi_4 * __1p))); 20472: _M_d1 = std::round(std::max(1.0, __d1x)); 20472: const double __d2x = 20472: std::sqrt(__np * __1p * std::log(32 * _M_t * __1p 20472: / (__pi_4 * __pa))); 20472: _M_d2 = std::round(std::max(1.0, __d2x)); 20472: 20472: 20472: const double __spi_2 = 1.2533141373155002512078826424055226L; 20472: _M_s1 = std::sqrt(__np * __1p) * (1 + _M_d1 / (4 * __np)); 20472: _M_s2 = std::sqrt(__np * __1p) * (1 + _M_d2 / (4 * _M_t * __1p)); 20472: _M_c = 2 * _M_d1 / __np; 20472: _M_a1 = std::exp(_M_c) * _M_s1 * __spi_2; 20472: const double __a12 = _M_a1 + _M_s2 * __spi_2; 20472: const double __s1s = _M_s1 * _M_s1; 20472: _M_a123 = __a12 + (std::exp(_M_d1 / (_M_t * __1p)) 20472: * 2 * __s1s / _M_d1 20472: * std::exp(-_M_d1 * _M_d1 / (2 * __s1s))); 20472: const double __s2s = _M_s2 * _M_s2; 20472: _M_s = (_M_a123 + 2 * __s2s / _M_d2 20472: * std::exp(-_M_d2 * _M_d2 / (2 * __s2s))); 20472: _M_lf = (std::lgamma(__np + 1) 20472: + std::lgamma(_M_t - __np + 1)); 20472: _M_lp1p = std::log(__pa / __1p); 20472: 20472: _M_q = -std::log(1 - (__p12 - __pa) / __1p); 20472: } 20472: else 20472: 20472: _M_q = -std::log(1 - __p12); 20472: } 20472: 20472: template 20472: template 20472: typename binomial_distribution<_IntType>::result_type 20472: binomial_distribution<_IntType>:: 20472: _M_waiting(_UniformRandomNumberGenerator& __urng, 20472: _IntType __t, double __q) 20472: { 20472: _IntType __x = 0; 20472: double __sum = 0.0; 20472: __detail::_Adaptor<_UniformRandomNumberGenerator, double> 20472: __aurng(__urng); 20472: 20472: do 20472: { 20472: if (__t == __x) 20472: return __x; 20472: const double __e = -std::log(1.0 - __aurng()); 20472: __sum += __e / (__t - __x); 20472: __x += 1; 20472: } 20472: while (__sum <= __q); 20472: 20472: return __x - 1; 20472: } 20472: # 1520 "/usr/include/c++/10/bits/random.tcc" 3 20472: template 20472: template 20472: typename binomial_distribution<_IntType>::result_type 20472: binomial_distribution<_IntType>:: 20472: operator()(_UniformRandomNumberGenerator& __urng, 20472: const param_type& __param) 20472: { 20472: result_type __ret; 20472: const _IntType __t = __param.t(); 20472: const double __p = __param.p(); 20472: const double __p12 = __p <= 0.5 ? __p : 1.0 - __p; 20472: __detail::_Adaptor<_UniformRandomNumberGenerator, double> 20472: __aurng(__urng); 20472: 20472: 20472: if (!__param._M_easy) 20472: { 20472: double __x; 20472: 20472: 20472: const double __naf = 20472: (1 - std::numeric_limits::epsilon()) / 2; 20472: const double __thr = 20472: std::numeric_limits<_IntType>::max() + __naf; 20472: 20472: const double __np = std::floor(__t * __p12); 20472: 20472: 20472: const double __spi_2 = 1.2533141373155002512078826424055226L; 20472: const double __a1 = __param._M_a1; 20472: const double __a12 = __a1 + __param._M_s2 * __spi_2; 20472: const double __a123 = __param._M_a123; 20472: const double __s1s = __param._M_s1 * __param._M_s1; 20472: const double __s2s = __param._M_s2 * __param._M_s2; 20472: 20472: bool __reject; 20472: do 20472: { 20472: const double __u = __param._M_s * __aurng(); 20472: 20472: double __v; 20472: 20472: if (__u <= __a1) 20472: { 20472: const double __n = _M_nd(__urng); 20472: const double __y = __param._M_s1 * std::abs(__n); 20472: __reject = __y >= __param._M_d1; 20472: if (!__reject) 20472: { 20472: const double __e = -std::log(1.0 - __aurng()); 20472: __x = std::floor(__y); 20472: __v = -__e - __n * __n / 2 + __param._M_c; 20472: } 20472: } 20472: else if (__u <= __a12) 20472: { 20472: const double __n = _M_nd(__urng); 20472: const double __y = __param._M_s2 * std::abs(__n); 20472: __reject = __y >= __param._M_d2; 20472: if (!__reject) 20472: { 20472: const double __e = -std::log(1.0 - __aurng()); 20472: __x = std::floor(-__y); 20472: __v = -__e - __n * __n / 2; 20472: } 20472: } 20472: else if (__u <= __a123) 20472: { 20472: const double __e1 = -std::log(1.0 - __aurng()); 20472: const double __e2 = -std::log(1.0 - __aurng()); 20472: 20472: const double __y = __param._M_d1 20472: + 2 * __s1s * __e1 / __param._M_d1; 20472: __x = std::floor(__y); 20472: __v = (-__e2 + __param._M_d1 * (1 / (__t - __np) 20472: -__y / (2 * __s1s))); 20472: __reject = false; 20472: } 20472: else 20472: { 20472: const double __e1 = -std::log(1.0 - __aurng()); 20472: const double __e2 = -std::log(1.0 - __aurng()); 20472: 20472: const double __y = __param._M_d2 20472: + 2 * __s2s * __e1 / __param._M_d2; 20472: __x = std::floor(-__y); 20472: __v = -__e2 - __param._M_d2 * __y / (2 * __s2s); 20472: __reject = false; 20472: } 20472: 20472: __reject = __reject || __x < -__np || __x > __t - __np; 20472: if (!__reject) 20472: { 20472: const double __lfx = 20472: std::lgamma(__np + __x + 1) 20472: + std::lgamma(__t - (__np + __x) + 1); 20472: __reject = __v > __param._M_lf - __lfx 20472: + __x * __param._M_lp1p; 20472: } 20472: 20472: __reject |= __x + __np >= __thr; 20472: } 20472: while (__reject); 20472: 20472: __x += __np + __naf; 20472: 20472: const _IntType __z = _M_waiting(__urng, __t - _IntType(__x), 20472: __param._M_q); 20472: __ret = _IntType(__x) + __z; 20472: } 20472: else 20472: 20472: __ret = _M_waiting(__urng, __t, __param._M_q); 20472: 20472: if (__p12 != __p) 20472: __ret = __t - __ret; 20472: return __ret; 20472: } 20472: 20472: template 20472: template 20472: void 20472: binomial_distribution<_IntType>:: 20472: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __param) 20472: { 20472: 20472: 20472: while (__f != __t) 20472: *__f++ = this->operator()(__urng, __param); 20472: } 20472: 20472: template 20472: std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 20472: const binomial_distribution<_IntType>& __x) 20472: { 20472: using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; 20472: 20472: const typename __ios_base::fmtflags __flags = __os.flags(); 20472: const _CharT __fill = __os.fill(); 20472: const std::streamsize __precision = __os.precision(); 20472: const _CharT __space = __os.widen(' '); 20472: __os.flags(__ios_base::scientific | __ios_base::left); 20472: __os.fill(__space); 20472: __os.precision(std::numeric_limits::max_digits10); 20472: 20472: __os << __x.t() << __space << __x.p() 20472: << __space << __x._M_nd; 20472: 20472: __os.flags(__flags); 20472: __os.fill(__fill); 20472: __os.precision(__precision); 20472: return __os; 20472: } 20472: 20472: template 20472: std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>& __is, 20472: binomial_distribution<_IntType>& __x) 20472: { 20472: using param_type = typename binomial_distribution<_IntType>::param_type; 20472: using __ios_base = typename basic_istream<_CharT, _Traits>::ios_base; 20472: 20472: const typename __ios_base::fmtflags __flags = __is.flags(); 20472: __is.flags(__ios_base::dec | __ios_base::skipws); 20472: 20472: _IntType __t; 20472: double __p; 20472: if (__is >> __t >> __p >> __x._M_nd) 20472: __x.param(param_type(__t, __p)); 20472: 20472: __is.flags(__flags); 20472: return __is; 20472: } 20472: 20472: 20472: template 20472: template 20472: void 20472: std::exponential_distribution<_RealType>:: 20472: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { 20472: 20472: __detail::_Adaptor<_UniformRandomNumberGenerator, result_type> 20472: __aurng(__urng); 20472: while (__f != __t) 20472: *__f++ = -std::log(result_type(1) - __aurng()) / __p.lambda(); 20472: } 20472: 20472: template 20472: std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 20472: const exponential_distribution<_RealType>& __x) 20472: { 20472: using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; 20472: 20472: const typename __ios_base::fmtflags __flags = __os.flags(); 20472: const _CharT __fill = __os.fill(); 20472: const std::streamsize __precision = __os.precision(); 20472: __os.flags(__ios_base::scientific | __ios_base::left); 20472: __os.fill(__os.widen(' ')); 20472: __os.precision(std::numeric_limits<_RealType>::max_digits10); 20472: 20472: __os << __x.lambda(); 20472: 20472: __os.flags(__flags); 20472: __os.fill(__fill); 20472: __os.precision(__precision); 20472: return __os; 20472: } 20472: 20472: template 20472: std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>& __is, 20472: exponential_distribution<_RealType>& __x) 20472: { 20472: using param_type 20472: = typename exponential_distribution<_RealType>::param_type; 20472: using __ios_base = typename basic_istream<_CharT, _Traits>::ios_base; 20472: 20472: const typename __ios_base::fmtflags __flags = __is.flags(); 20472: __is.flags(__ios_base::dec | __ios_base::skipws); 20472: 20472: _RealType __lambda; 20472: if (__is >> __lambda) 20472: __x.param(param_type(__lambda)); 20472: 20472: __is.flags(__flags); 20472: return __is; 20472: } 20472: # 1766 "/usr/include/c++/10/bits/random.tcc" 3 20472: template 20472: template 20472: typename normal_distribution<_RealType>::result_type 20472: normal_distribution<_RealType>:: 20472: operator()(_UniformRandomNumberGenerator& __urng, 20472: const param_type& __param) 20472: { 20472: result_type __ret; 20472: __detail::_Adaptor<_UniformRandomNumberGenerator, result_type> 20472: __aurng(__urng); 20472: 20472: if (_M_saved_available) 20472: { 20472: _M_saved_available = false; 20472: __ret = _M_saved; 20472: } 20472: else 20472: { 20472: result_type __x, __y, __r2; 20472: do 20472: { 20472: __x = result_type(2.0) * __aurng() - 1.0; 20472: __y = result_type(2.0) * __aurng() - 1.0; 20472: __r2 = __x * __x + __y * __y; 20472: } 20472: while (__r2 > 1.0 || __r2 == 0.0); 20472: 20472: const result_type __mult = std::sqrt(-2 * std::log(__r2) / __r2); 20472: _M_saved = __x * __mult; 20472: _M_saved_available = true; 20472: __ret = __y * __mult; 20472: } 20472: 20472: __ret = __ret * __param.stddev() + __param.mean(); 20472: return __ret; 20472: } 20472: 20472: template 20472: template 20472: void 20472: normal_distribution<_RealType>:: 20472: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __param) 20472: { 20472: 20472: 20472: if (__f == __t) 20472: return; 20472: 20472: if (_M_saved_available) 20472: { 20472: _M_saved_available = false; 20472: *__f++ = _M_saved * __param.stddev() + __param.mean(); 20472: 20472: if (__f == __t) 20472: return; 20472: } 20472: 20472: __detail::_Adaptor<_UniformRandomNumberGenerator, result_type> 20472: __aurng(__urng); 20472: 20472: while (__f + 1 < __t) 20472: { 20472: result_type __x, __y, __r2; 20472: do 20472: { 20472: __x = result_type(2.0) * __aurng() - 1.0; 20472: __y = result_type(2.0) * __aurng() - 1.0; 20472: __r2 = __x * __x + __y * __y; 20472: } 20472: while (__r2 > 1.0 || __r2 == 0.0); 20472: 20472: const result_type __mult = std::sqrt(-2 * std::log(__r2) / __r2); 20472: *__f++ = __y * __mult * __param.stddev() + __param.mean(); 20472: *__f++ = __x * __mult * __param.stddev() + __param.mean(); 20472: } 20472: 20472: if (__f != __t) 20472: { 20472: result_type __x, __y, __r2; 20472: do 20472: { 20472: __x = result_type(2.0) * __aurng() - 1.0; 20472: __y = result_type(2.0) * __aurng() - 1.0; 20472: __r2 = __x * __x + __y * __y; 20472: } 20472: while (__r2 > 1.0 || __r2 == 0.0); 20472: 20472: const result_type __mult = std::sqrt(-2 * std::log(__r2) / __r2); 20472: _M_saved = __x * __mult; 20472: _M_saved_available = true; 20472: *__f = __y * __mult * __param.stddev() + __param.mean(); 20472: } 20472: } 20472: 20472: template 20472: bool 20472: operator==(const std::normal_distribution<_RealType>& __d1, 20472: const std::normal_distribution<_RealType>& __d2) 20472: { 20472: if (__d1._M_param == __d2._M_param 20472: && __d1._M_saved_available == __d2._M_saved_available) 20472: { 20472: if (__d1._M_saved_available 20472: && __d1._M_saved == __d2._M_saved) 20472: return true; 20472: else if(!__d1._M_saved_available) 20472: return true; 20472: else 20472: return false; 20472: } 20472: else 20472: return false; 20472: } 20472: 20472: template 20472: std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 20472: const normal_distribution<_RealType>& __x) 20472: { 20472: using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; 20472: 20472: const typename __ios_base::fmtflags __flags = __os.flags(); 20472: const _CharT __fill = __os.fill(); 20472: const std::streamsize __precision = __os.precision(); 20472: const _CharT __space = __os.widen(' '); 20472: __os.flags(__ios_base::scientific | __ios_base::left); 20472: __os.fill(__space); 20472: __os.precision(std::numeric_limits<_RealType>::max_digits10); 20472: 20472: __os << __x.mean() << __space << __x.stddev() 20472: << __space << __x._M_saved_available; 20472: if (__x._M_saved_available) 20472: __os << __space << __x._M_saved; 20472: 20472: __os.flags(__flags); 20472: __os.fill(__fill); 20472: __os.precision(__precision); 20472: return __os; 20472: } 20472: 20472: template 20472: std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>& __is, 20472: normal_distribution<_RealType>& __x) 20472: { 20472: using param_type = typename normal_distribution<_RealType>::param_type; 20472: using __ios_base = typename basic_istream<_CharT, _Traits>::ios_base; 20472: 20472: const typename __ios_base::fmtflags __flags = __is.flags(); 20472: __is.flags(__ios_base::dec | __ios_base::skipws); 20472: 20472: double __mean, __stddev; 20472: bool __saved_avail; 20472: if (__is >> __mean >> __stddev >> __saved_avail) 20472: { 20472: if (__saved_avail && (__is >> __x._M_saved)) 20472: { 20472: __x._M_saved_available = __saved_avail; 20472: __x.param(param_type(__mean, __stddev)); 20472: } 20472: } 20472: 20472: __is.flags(__flags); 20472: return __is; 20472: } 20472: 20472: 20472: template 20472: template 20472: void 20472: lognormal_distribution<_RealType>:: 20472: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { 20472: 20472: while (__f != __t) 20472: *__f++ = std::exp(__p.s() * _M_nd(__urng) + __p.m()); 20472: } 20472: 20472: template 20472: std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 20472: const lognormal_distribution<_RealType>& __x) 20472: { 20472: using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; 20472: 20472: const typename __ios_base::fmtflags __flags = __os.flags(); 20472: const _CharT __fill = __os.fill(); 20472: const std::streamsize __precision = __os.precision(); 20472: const _CharT __space = __os.widen(' '); 20472: __os.flags(__ios_base::scientific | __ios_base::left); 20472: __os.fill(__space); 20472: __os.precision(std::numeric_limits<_RealType>::max_digits10); 20472: 20472: __os << __x.m() << __space << __x.s() 20472: << __space << __x._M_nd; 20472: 20472: __os.flags(__flags); 20472: __os.fill(__fill); 20472: __os.precision(__precision); 20472: return __os; 20472: } 20472: 20472: template 20472: std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>& __is, 20472: lognormal_distribution<_RealType>& __x) 20472: { 20472: using param_type 20472: = typename lognormal_distribution<_RealType>::param_type; 20472: using __ios_base = typename basic_istream<_CharT, _Traits>::ios_base; 20472: 20472: const typename __ios_base::fmtflags __flags = __is.flags(); 20472: __is.flags(__ios_base::dec | __ios_base::skipws); 20472: 20472: _RealType __m, __s; 20472: if (__is >> __m >> __s >> __x._M_nd) 20472: __x.param(param_type(__m, __s)); 20472: 20472: __is.flags(__flags); 20472: return __is; 20472: } 20472: 20472: template 20472: template 20472: void 20472: std::chi_squared_distribution<_RealType>:: 20472: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng) 20472: { 20472: 20472: while (__f != __t) 20472: *__f++ = 2 * _M_gd(__urng); 20472: } 20472: 20472: template 20472: template 20472: void 20472: std::chi_squared_distribution<_RealType>:: 20472: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const typename 20472: std::gamma_distribution::param_type& __p) 20472: { 20472: 20472: while (__f != __t) 20472: *__f++ = 2 * _M_gd(__urng, __p); 20472: } 20472: 20472: template 20472: std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 20472: const chi_squared_distribution<_RealType>& __x) 20472: { 20472: using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; 20472: 20472: const typename __ios_base::fmtflags __flags = __os.flags(); 20472: const _CharT __fill = __os.fill(); 20472: const std::streamsize __precision = __os.precision(); 20472: const _CharT __space = __os.widen(' '); 20472: __os.flags(__ios_base::scientific | __ios_base::left); 20472: __os.fill(__space); 20472: __os.precision(std::numeric_limits<_RealType>::max_digits10); 20472: 20472: __os << __x.n() << __space << __x._M_gd; 20472: 20472: __os.flags(__flags); 20472: __os.fill(__fill); 20472: __os.precision(__precision); 20472: return __os; 20472: } 20472: 20472: template 20472: std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>& __is, 20472: chi_squared_distribution<_RealType>& __x) 20472: { 20472: using param_type 20472: = typename chi_squared_distribution<_RealType>::param_type; 20472: using __ios_base = typename basic_istream<_CharT, _Traits>::ios_base; 20472: 20472: const typename __ios_base::fmtflags __flags = __is.flags(); 20472: __is.flags(__ios_base::dec | __ios_base::skipws); 20472: 20472: _RealType __n; 20472: if (__is >> __n >> __x._M_gd) 20472: __x.param(param_type(__n)); 20472: 20472: __is.flags(__flags); 20472: return __is; 20472: } 20472: 20472: 20472: template 20472: template 20472: typename cauchy_distribution<_RealType>::result_type 20472: cauchy_distribution<_RealType>:: 20472: operator()(_UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { 20472: __detail::_Adaptor<_UniformRandomNumberGenerator, result_type> 20472: __aurng(__urng); 20472: _RealType __u; 20472: do 20472: __u = __aurng(); 20472: while (__u == 0.5); 20472: 20472: const _RealType __pi = 3.1415926535897932384626433832795029L; 20472: return __p.a() + __p.b() * std::tan(__pi * __u); 20472: } 20472: 20472: template 20472: template 20472: void 20472: cauchy_distribution<_RealType>:: 20472: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { 20472: 20472: const _RealType __pi = 3.1415926535897932384626433832795029L; 20472: __detail::_Adaptor<_UniformRandomNumberGenerator, result_type> 20472: __aurng(__urng); 20472: while (__f != __t) 20472: { 20472: _RealType __u; 20472: do 20472: __u = __aurng(); 20472: while (__u == 0.5); 20472: 20472: *__f++ = __p.a() + __p.b() * std::tan(__pi * __u); 20472: } 20472: } 20472: 20472: template 20472: std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 20472: const cauchy_distribution<_RealType>& __x) 20472: { 20472: using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; 20472: 20472: const typename __ios_base::fmtflags __flags = __os.flags(); 20472: const _CharT __fill = __os.fill(); 20472: const std::streamsize __precision = __os.precision(); 20472: const _CharT __space = __os.widen(' '); 20472: __os.flags(__ios_base::scientific | __ios_base::left); 20472: __os.fill(__space); 20472: __os.precision(std::numeric_limits<_RealType>::max_digits10); 20472: 20472: __os << __x.a() << __space << __x.b(); 20472: 20472: __os.flags(__flags); 20472: __os.fill(__fill); 20472: __os.precision(__precision); 20472: return __os; 20472: } 20472: 20472: template 20472: std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>& __is, 20472: cauchy_distribution<_RealType>& __x) 20472: { 20472: using param_type = typename cauchy_distribution<_RealType>::param_type; 20472: using __ios_base = typename basic_istream<_CharT, _Traits>::ios_base; 20472: 20472: const typename __ios_base::fmtflags __flags = __is.flags(); 20472: __is.flags(__ios_base::dec | __ios_base::skipws); 20472: 20472: _RealType __a, __b; 20472: if (__is >> __a >> __b) 20472: __x.param(param_type(__a, __b)); 20472: 20472: __is.flags(__flags); 20472: return __is; 20472: } 20472: 20472: 20472: template 20472: template 20472: void 20472: std::fisher_f_distribution<_RealType>:: 20472: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng) 20472: { 20472: 20472: while (__f != __t) 20472: *__f++ = ((_M_gd_x(__urng) * n()) / (_M_gd_y(__urng) * m())); 20472: } 20472: 20472: template 20472: template 20472: void 20472: std::fisher_f_distribution<_RealType>:: 20472: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { 20472: 20472: typedef typename std::gamma_distribution::param_type 20472: param_type; 20472: param_type __p1(__p.m() / 2); 20472: param_type __p2(__p.n() / 2); 20472: while (__f != __t) 20472: *__f++ = ((_M_gd_x(__urng, __p1) * n()) 20472: / (_M_gd_y(__urng, __p2) * m())); 20472: } 20472: 20472: template 20472: std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 20472: const fisher_f_distribution<_RealType>& __x) 20472: { 20472: using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; 20472: 20472: const typename __ios_base::fmtflags __flags = __os.flags(); 20472: const _CharT __fill = __os.fill(); 20472: const std::streamsize __precision = __os.precision(); 20472: const _CharT __space = __os.widen(' '); 20472: __os.flags(__ios_base::scientific | __ios_base::left); 20472: __os.fill(__space); 20472: __os.precision(std::numeric_limits<_RealType>::max_digits10); 20472: 20472: __os << __x.m() << __space << __x.n() 20472: << __space << __x._M_gd_x << __space << __x._M_gd_y; 20472: 20472: __os.flags(__flags); 20472: __os.fill(__fill); 20472: __os.precision(__precision); 20472: return __os; 20472: } 20472: 20472: template 20472: std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>& __is, 20472: fisher_f_distribution<_RealType>& __x) 20472: { 20472: using param_type 20472: = typename fisher_f_distribution<_RealType>::param_type; 20472: using __ios_base = typename basic_istream<_CharT, _Traits>::ios_base; 20472: 20472: const typename __ios_base::fmtflags __flags = __is.flags(); 20472: __is.flags(__ios_base::dec | __ios_base::skipws); 20472: 20472: _RealType __m, __n; 20472: if (__is >> __m >> __n >> __x._M_gd_x >> __x._M_gd_y) 20472: __x.param(param_type(__m, __n)); 20472: 20472: __is.flags(__flags); 20472: return __is; 20472: } 20472: 20472: 20472: template 20472: template 20472: void 20472: std::student_t_distribution<_RealType>:: 20472: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng) 20472: { 20472: 20472: while (__f != __t) 20472: *__f++ = _M_nd(__urng) * std::sqrt(n() / _M_gd(__urng)); 20472: } 20472: 20472: template 20472: template 20472: void 20472: std::student_t_distribution<_RealType>:: 20472: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { 20472: 20472: typename std::gamma_distribution::param_type 20472: __p2(__p.n() / 2, 2); 20472: while (__f != __t) 20472: *__f++ = _M_nd(__urng) * std::sqrt(__p.n() / _M_gd(__urng, __p2)); 20472: } 20472: 20472: template 20472: std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 20472: const student_t_distribution<_RealType>& __x) 20472: { 20472: using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; 20472: 20472: const typename __ios_base::fmtflags __flags = __os.flags(); 20472: const _CharT __fill = __os.fill(); 20472: const std::streamsize __precision = __os.precision(); 20472: const _CharT __space = __os.widen(' '); 20472: __os.flags(__ios_base::scientific | __ios_base::left); 20472: __os.fill(__space); 20472: __os.precision(std::numeric_limits<_RealType>::max_digits10); 20472: 20472: __os << __x.n() << __space << __x._M_nd << __space << __x._M_gd; 20472: 20472: __os.flags(__flags); 20472: __os.fill(__fill); 20472: __os.precision(__precision); 20472: return __os; 20472: } 20472: 20472: template 20472: std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>& __is, 20472: student_t_distribution<_RealType>& __x) 20472: { 20472: using param_type 20472: = typename student_t_distribution<_RealType>::param_type; 20472: using __ios_base = typename basic_istream<_CharT, _Traits>::ios_base; 20472: 20472: const typename __ios_base::fmtflags __flags = __is.flags(); 20472: __is.flags(__ios_base::dec | __ios_base::skipws); 20472: 20472: _RealType __n; 20472: if (__is >> __n >> __x._M_nd >> __x._M_gd) 20472: __x.param(param_type(__n)); 20472: 20472: __is.flags(__flags); 20472: return __is; 20472: } 20472: 20472: 20472: template 20472: void 20472: gamma_distribution<_RealType>::param_type:: 20472: _M_initialize() 20472: { 20472: _M_malpha = _M_alpha < 1.0 ? _M_alpha + _RealType(1.0) : _M_alpha; 20472: 20472: const _RealType __a1 = _M_malpha - _RealType(1.0) / _RealType(3.0); 20472: _M_a2 = _RealType(1.0) / std::sqrt(_RealType(9.0) * __a1); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: template 20472: typename gamma_distribution<_RealType>::result_type 20472: gamma_distribution<_RealType>:: 20472: operator()(_UniformRandomNumberGenerator& __urng, 20472: const param_type& __param) 20472: { 20472: __detail::_Adaptor<_UniformRandomNumberGenerator, result_type> 20472: __aurng(__urng); 20472: 20472: result_type __u, __v, __n; 20472: const result_type __a1 = (__param._M_malpha 20472: - _RealType(1.0) / _RealType(3.0)); 20472: 20472: do 20472: { 20472: do 20472: { 20472: __n = _M_nd(__urng); 20472: __v = result_type(1.0) + __param._M_a2 * __n; 20472: } 20472: while (__v <= 0.0); 20472: 20472: __v = __v * __v * __v; 20472: __u = __aurng(); 20472: } 20472: while (__u > result_type(1.0) - 0.0331 * __n * __n * __n * __n 20472: && (std::log(__u) > (0.5 * __n * __n + __a1 20472: * (1.0 - __v + std::log(__v))))); 20472: 20472: if (__param.alpha() == __param._M_malpha) 20472: return __a1 * __v * __param.beta(); 20472: else 20472: { 20472: do 20472: __u = __aurng(); 20472: while (__u == 0.0); 20472: 20472: return (std::pow(__u, result_type(1.0) / __param.alpha()) 20472: * __a1 * __v * __param.beta()); 20472: } 20472: } 20472: 20472: template 20472: template 20472: void 20472: gamma_distribution<_RealType>:: 20472: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __param) 20472: { 20472: 20472: __detail::_Adaptor<_UniformRandomNumberGenerator, result_type> 20472: __aurng(__urng); 20472: 20472: result_type __u, __v, __n; 20472: const result_type __a1 = (__param._M_malpha 20472: - _RealType(1.0) / _RealType(3.0)); 20472: 20472: if (__param.alpha() == __param._M_malpha) 20472: while (__f != __t) 20472: { 20472: do 20472: { 20472: do 20472: { 20472: __n = _M_nd(__urng); 20472: __v = result_type(1.0) + __param._M_a2 * __n; 20472: } 20472: while (__v <= 0.0); 20472: 20472: __v = __v * __v * __v; 20472: __u = __aurng(); 20472: } 20472: while (__u > result_type(1.0) - 0.0331 * __n * __n * __n * __n 20472: && (std::log(__u) > (0.5 * __n * __n + __a1 20472: * (1.0 - __v + std::log(__v))))); 20472: 20472: *__f++ = __a1 * __v * __param.beta(); 20472: } 20472: else 20472: while (__f != __t) 20472: { 20472: do 20472: { 20472: do 20472: { 20472: __n = _M_nd(__urng); 20472: __v = result_type(1.0) + __param._M_a2 * __n; 20472: } 20472: while (__v <= 0.0); 20472: 20472: __v = __v * __v * __v; 20472: __u = __aurng(); 20472: } 20472: while (__u > result_type(1.0) - 0.0331 * __n * __n * __n * __n 20472: && (std::log(__u) > (0.5 * __n * __n + __a1 20472: * (1.0 - __v + std::log(__v))))); 20472: 20472: do 20472: __u = __aurng(); 20472: while (__u == 0.0); 20472: 20472: *__f++ = (std::pow(__u, result_type(1.0) / __param.alpha()) 20472: * __a1 * __v * __param.beta()); 20472: } 20472: } 20472: 20472: template 20472: std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 20472: const gamma_distribution<_RealType>& __x) 20472: { 20472: using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; 20472: 20472: const typename __ios_base::fmtflags __flags = __os.flags(); 20472: const _CharT __fill = __os.fill(); 20472: const std::streamsize __precision = __os.precision(); 20472: const _CharT __space = __os.widen(' '); 20472: __os.flags(__ios_base::scientific | __ios_base::left); 20472: __os.fill(__space); 20472: __os.precision(std::numeric_limits<_RealType>::max_digits10); 20472: 20472: __os << __x.alpha() << __space << __x.beta() 20472: << __space << __x._M_nd; 20472: 20472: __os.flags(__flags); 20472: __os.fill(__fill); 20472: __os.precision(__precision); 20472: return __os; 20472: } 20472: 20472: template 20472: std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>& __is, 20472: gamma_distribution<_RealType>& __x) 20472: { 20472: using param_type = typename gamma_distribution<_RealType>::param_type; 20472: using __ios_base = typename basic_istream<_CharT, _Traits>::ios_base; 20472: 20472: const typename __ios_base::fmtflags __flags = __is.flags(); 20472: __is.flags(__ios_base::dec | __ios_base::skipws); 20472: 20472: _RealType __alpha_val, __beta_val; 20472: if (__is >> __alpha_val >> __beta_val >> __x._M_nd) 20472: __x.param(param_type(__alpha_val, __beta_val)); 20472: 20472: __is.flags(__flags); 20472: return __is; 20472: } 20472: 20472: 20472: template 20472: template 20472: typename weibull_distribution<_RealType>::result_type 20472: weibull_distribution<_RealType>:: 20472: operator()(_UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { 20472: __detail::_Adaptor<_UniformRandomNumberGenerator, result_type> 20472: __aurng(__urng); 20472: return __p.b() * std::pow(-std::log(result_type(1) - __aurng()), 20472: result_type(1) / __p.a()); 20472: } 20472: 20472: template 20472: template 20472: void 20472: weibull_distribution<_RealType>:: 20472: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { 20472: 20472: __detail::_Adaptor<_UniformRandomNumberGenerator, result_type> 20472: __aurng(__urng); 20472: auto __inv_a = result_type(1) / __p.a(); 20472: 20472: while (__f != __t) 20472: *__f++ = __p.b() * std::pow(-std::log(result_type(1) - __aurng()), 20472: __inv_a); 20472: } 20472: 20472: template 20472: std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 20472: const weibull_distribution<_RealType>& __x) 20472: { 20472: using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; 20472: 20472: const typename __ios_base::fmtflags __flags = __os.flags(); 20472: const _CharT __fill = __os.fill(); 20472: const std::streamsize __precision = __os.precision(); 20472: const _CharT __space = __os.widen(' '); 20472: __os.flags(__ios_base::scientific | __ios_base::left); 20472: __os.fill(__space); 20472: __os.precision(std::numeric_limits<_RealType>::max_digits10); 20472: 20472: __os << __x.a() << __space << __x.b(); 20472: 20472: __os.flags(__flags); 20472: __os.fill(__fill); 20472: __os.precision(__precision); 20472: return __os; 20472: } 20472: 20472: template 20472: std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>& __is, 20472: weibull_distribution<_RealType>& __x) 20472: { 20472: using param_type = typename weibull_distribution<_RealType>::param_type; 20472: using __ios_base = typename basic_istream<_CharT, _Traits>::ios_base; 20472: 20472: const typename __ios_base::fmtflags __flags = __is.flags(); 20472: __is.flags(__ios_base::dec | __ios_base::skipws); 20472: 20472: _RealType __a, __b; 20472: if (__is >> __a >> __b) 20472: __x.param(param_type(__a, __b)); 20472: 20472: __is.flags(__flags); 20472: return __is; 20472: } 20472: 20472: 20472: template 20472: template 20472: typename extreme_value_distribution<_RealType>::result_type 20472: extreme_value_distribution<_RealType>:: 20472: operator()(_UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { 20472: __detail::_Adaptor<_UniformRandomNumberGenerator, result_type> 20472: __aurng(__urng); 20472: return __p.a() - __p.b() * std::log(-std::log(result_type(1) 20472: - __aurng())); 20472: } 20472: 20472: template 20472: template 20472: void 20472: extreme_value_distribution<_RealType>:: 20472: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __p) 20472: { 20472: 20472: __detail::_Adaptor<_UniformRandomNumberGenerator, result_type> 20472: __aurng(__urng); 20472: 20472: while (__f != __t) 20472: *__f++ = __p.a() - __p.b() * std::log(-std::log(result_type(1) 20472: - __aurng())); 20472: } 20472: 20472: template 20472: std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 20472: const extreme_value_distribution<_RealType>& __x) 20472: { 20472: using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; 20472: 20472: const typename __ios_base::fmtflags __flags = __os.flags(); 20472: const _CharT __fill = __os.fill(); 20472: const std::streamsize __precision = __os.precision(); 20472: const _CharT __space = __os.widen(' '); 20472: __os.flags(__ios_base::scientific | __ios_base::left); 20472: __os.fill(__space); 20472: __os.precision(std::numeric_limits<_RealType>::max_digits10); 20472: 20472: __os << __x.a() << __space << __x.b(); 20472: 20472: __os.flags(__flags); 20472: __os.fill(__fill); 20472: __os.precision(__precision); 20472: return __os; 20472: } 20472: 20472: template 20472: std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>& __is, 20472: extreme_value_distribution<_RealType>& __x) 20472: { 20472: using param_type 20472: = typename extreme_value_distribution<_RealType>::param_type; 20472: using __ios_base = typename basic_istream<_CharT, _Traits>::ios_base; 20472: 20472: const typename __ios_base::fmtflags __flags = __is.flags(); 20472: __is.flags(__ios_base::dec | __ios_base::skipws); 20472: 20472: _RealType __a, __b; 20472: if (__is >> __a >> __b) 20472: __x.param(param_type(__a, __b)); 20472: 20472: __is.flags(__flags); 20472: return __is; 20472: } 20472: 20472: 20472: template 20472: void 20472: discrete_distribution<_IntType>::param_type:: 20472: _M_initialize() 20472: { 20472: if (_M_prob.size() < 2) 20472: { 20472: _M_prob.clear(); 20472: return; 20472: } 20472: 20472: const double __sum = std::accumulate(_M_prob.begin(), 20472: _M_prob.end(), 0.0); 20472: 20472: __detail::__normalize(_M_prob.begin(), _M_prob.end(), _M_prob.begin(), 20472: __sum); 20472: 20472: _M_cp.reserve(_M_prob.size()); 20472: std::partial_sum(_M_prob.begin(), _M_prob.end(), 20472: std::back_inserter(_M_cp)); 20472: 20472: _M_cp[_M_cp.size() - 1] = 1.0; 20472: } 20472: 20472: template 20472: template 20472: discrete_distribution<_IntType>::param_type:: 20472: param_type(size_t __nw, double __xmin, double __xmax, _Func __fw) 20472: : _M_prob(), _M_cp() 20472: { 20472: const size_t __n = __nw == 0 ? 1 : __nw; 20472: const double __delta = (__xmax - __xmin) / __n; 20472: 20472: _M_prob.reserve(__n); 20472: for (size_t __k = 0; __k < __nw; ++__k) 20472: _M_prob.push_back(__fw(__xmin + __k * __delta + 0.5 * __delta)); 20472: 20472: _M_initialize(); 20472: } 20472: 20472: template 20472: template 20472: typename discrete_distribution<_IntType>::result_type 20472: discrete_distribution<_IntType>:: 20472: operator()(_UniformRandomNumberGenerator& __urng, 20472: const param_type& __param) 20472: { 20472: if (__param._M_cp.empty()) 20472: return result_type(0); 20472: 20472: __detail::_Adaptor<_UniformRandomNumberGenerator, double> 20472: __aurng(__urng); 20472: 20472: const double __p = __aurng(); 20472: auto __pos = std::lower_bound(__param._M_cp.begin(), 20472: __param._M_cp.end(), __p); 20472: 20472: return __pos - __param._M_cp.begin(); 20472: } 20472: 20472: template 20472: template 20472: void 20472: discrete_distribution<_IntType>:: 20472: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __param) 20472: { 20472: 20472: 20472: if (__param._M_cp.empty()) 20472: { 20472: while (__f != __t) 20472: *__f++ = result_type(0); 20472: return; 20472: } 20472: 20472: __detail::_Adaptor<_UniformRandomNumberGenerator, double> 20472: __aurng(__urng); 20472: 20472: while (__f != __t) 20472: { 20472: const double __p = __aurng(); 20472: auto __pos = std::lower_bound(__param._M_cp.begin(), 20472: __param._M_cp.end(), __p); 20472: 20472: *__f++ = __pos - __param._M_cp.begin(); 20472: } 20472: } 20472: 20472: template 20472: std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 20472: const discrete_distribution<_IntType>& __x) 20472: { 20472: using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; 20472: 20472: const typename __ios_base::fmtflags __flags = __os.flags(); 20472: const _CharT __fill = __os.fill(); 20472: const std::streamsize __precision = __os.precision(); 20472: const _CharT __space = __os.widen(' '); 20472: __os.flags(__ios_base::scientific | __ios_base::left); 20472: __os.fill(__space); 20472: __os.precision(std::numeric_limits::max_digits10); 20472: 20472: std::vector __prob = __x.probabilities(); 20472: __os << __prob.size(); 20472: for (auto __dit = __prob.begin(); __dit != __prob.end(); ++__dit) 20472: __os << __space << *__dit; 20472: 20472: __os.flags(__flags); 20472: __os.fill(__fill); 20472: __os.precision(__precision); 20472: return __os; 20472: } 20472: 20472: namespace __detail 20472: { 20472: template 20472: basic_istream<_CharT, _Traits>& 20472: __extract_params(basic_istream<_CharT, _Traits>& __is, 20472: vector<_ValT>& __vals, size_t __n) 20472: { 20472: __vals.reserve(__n); 20472: while (__n--) 20472: { 20472: _ValT __val; 20472: if (__is >> __val) 20472: __vals.push_back(__val); 20472: else 20472: break; 20472: } 20472: return __is; 20472: } 20472: } 20472: 20472: template 20472: std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>& __is, 20472: discrete_distribution<_IntType>& __x) 20472: { 20472: using __ios_base = typename basic_istream<_CharT, _Traits>::ios_base; 20472: 20472: const typename __ios_base::fmtflags __flags = __is.flags(); 20472: __is.flags(__ios_base::dec | __ios_base::skipws); 20472: 20472: size_t __n; 20472: if (__is >> __n) 20472: { 20472: std::vector __prob_vec; 20472: if (__detail::__extract_params(__is, __prob_vec, __n)) 20472: __x.param({__prob_vec.begin(), __prob_vec.end()}); 20472: } 20472: 20472: __is.flags(__flags); 20472: return __is; 20472: } 20472: 20472: 20472: template 20472: void 20472: piecewise_constant_distribution<_RealType>::param_type:: 20472: _M_initialize() 20472: { 20472: if (_M_int.size() < 2 20472: || (_M_int.size() == 2 20472: && _M_int[0] == _RealType(0) 20472: && _M_int[1] == _RealType(1))) 20472: { 20472: _M_int.clear(); 20472: _M_den.clear(); 20472: return; 20472: } 20472: 20472: const double __sum = std::accumulate(_M_den.begin(), 20472: _M_den.end(), 0.0); 20472: 20472: __detail::__normalize(_M_den.begin(), _M_den.end(), _M_den.begin(), 20472: __sum); 20472: 20472: _M_cp.reserve(_M_den.size()); 20472: std::partial_sum(_M_den.begin(), _M_den.end(), 20472: std::back_inserter(_M_cp)); 20472: 20472: 20472: _M_cp[_M_cp.size() - 1] = 1.0; 20472: 20472: for (size_t __k = 0; __k < _M_den.size(); ++__k) 20472: _M_den[__k] /= _M_int[__k + 1] - _M_int[__k]; 20472: } 20472: 20472: template 20472: template 20472: piecewise_constant_distribution<_RealType>::param_type:: 20472: param_type(_InputIteratorB __bbegin, 20472: _InputIteratorB __bend, 20472: _InputIteratorW __wbegin) 20472: : _M_int(), _M_den(), _M_cp() 20472: { 20472: if (__bbegin != __bend) 20472: { 20472: for (;;) 20472: { 20472: _M_int.push_back(*__bbegin); 20472: ++__bbegin; 20472: if (__bbegin == __bend) 20472: break; 20472: 20472: _M_den.push_back(*__wbegin); 20472: ++__wbegin; 20472: } 20472: } 20472: 20472: _M_initialize(); 20472: } 20472: 20472: template 20472: template 20472: piecewise_constant_distribution<_RealType>::param_type:: 20472: param_type(initializer_list<_RealType> __bl, _Func __fw) 20472: : _M_int(), _M_den(), _M_cp() 20472: { 20472: _M_int.reserve(__bl.size()); 20472: for (auto __biter = __bl.begin(); __biter != __bl.end(); ++__biter) 20472: _M_int.push_back(*__biter); 20472: 20472: _M_den.reserve(_M_int.size() - 1); 20472: for (size_t __k = 0; __k < _M_int.size() - 1; ++__k) 20472: _M_den.push_back(__fw(0.5 * (_M_int[__k + 1] + _M_int[__k]))); 20472: 20472: _M_initialize(); 20472: } 20472: 20472: template 20472: template 20472: piecewise_constant_distribution<_RealType>::param_type:: 20472: param_type(size_t __nw, _RealType __xmin, _RealType __xmax, _Func __fw) 20472: : _M_int(), _M_den(), _M_cp() 20472: { 20472: const size_t __n = __nw == 0 ? 1 : __nw; 20472: const _RealType __delta = (__xmax - __xmin) / __n; 20472: 20472: _M_int.reserve(__n + 1); 20472: for (size_t __k = 0; __k <= __nw; ++__k) 20472: _M_int.push_back(__xmin + __k * __delta); 20472: 20472: _M_den.reserve(__n); 20472: for (size_t __k = 0; __k < __nw; ++__k) 20472: _M_den.push_back(__fw(_M_int[__k] + 0.5 * __delta)); 20472: 20472: _M_initialize(); 20472: } 20472: 20472: template 20472: template 20472: typename piecewise_constant_distribution<_RealType>::result_type 20472: piecewise_constant_distribution<_RealType>:: 20472: operator()(_UniformRandomNumberGenerator& __urng, 20472: const param_type& __param) 20472: { 20472: __detail::_Adaptor<_UniformRandomNumberGenerator, double> 20472: __aurng(__urng); 20472: 20472: const double __p = __aurng(); 20472: if (__param._M_cp.empty()) 20472: return __p; 20472: 20472: auto __pos = std::lower_bound(__param._M_cp.begin(), 20472: __param._M_cp.end(), __p); 20472: const size_t __i = __pos - __param._M_cp.begin(); 20472: 20472: const double __pref = __i > 0 ? __param._M_cp[__i - 1] : 0.0; 20472: 20472: return __param._M_int[__i] + (__p - __pref) / __param._M_den[__i]; 20472: } 20472: 20472: template 20472: template 20472: void 20472: piecewise_constant_distribution<_RealType>:: 20472: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __param) 20472: { 20472: 20472: __detail::_Adaptor<_UniformRandomNumberGenerator, double> 20472: __aurng(__urng); 20472: 20472: if (__param._M_cp.empty()) 20472: { 20472: while (__f != __t) 20472: *__f++ = __aurng(); 20472: return; 20472: } 20472: 20472: while (__f != __t) 20472: { 20472: const double __p = __aurng(); 20472: 20472: auto __pos = std::lower_bound(__param._M_cp.begin(), 20472: __param._M_cp.end(), __p); 20472: const size_t __i = __pos - __param._M_cp.begin(); 20472: 20472: const double __pref = __i > 0 ? __param._M_cp[__i - 1] : 0.0; 20472: 20472: *__f++ = (__param._M_int[__i] 20472: + (__p - __pref) / __param._M_den[__i]); 20472: } 20472: } 20472: 20472: template 20472: std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 20472: const piecewise_constant_distribution<_RealType>& __x) 20472: { 20472: using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; 20472: 20472: const typename __ios_base::fmtflags __flags = __os.flags(); 20472: const _CharT __fill = __os.fill(); 20472: const std::streamsize __precision = __os.precision(); 20472: const _CharT __space = __os.widen(' '); 20472: __os.flags(__ios_base::scientific | __ios_base::left); 20472: __os.fill(__space); 20472: __os.precision(std::numeric_limits<_RealType>::max_digits10); 20472: 20472: std::vector<_RealType> __int = __x.intervals(); 20472: __os << __int.size() - 1; 20472: 20472: for (auto __xit = __int.begin(); __xit != __int.end(); ++__xit) 20472: __os << __space << *__xit; 20472: 20472: std::vector __den = __x.densities(); 20472: for (auto __dit = __den.begin(); __dit != __den.end(); ++__dit) 20472: __os << __space << *__dit; 20472: 20472: __os.flags(__flags); 20472: __os.fill(__fill); 20472: __os.precision(__precision); 20472: return __os; 20472: } 20472: 20472: template 20472: std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>& __is, 20472: piecewise_constant_distribution<_RealType>& __x) 20472: { 20472: using __ios_base = typename basic_istream<_CharT, _Traits>::ios_base; 20472: 20472: const typename __ios_base::fmtflags __flags = __is.flags(); 20472: __is.flags(__ios_base::dec | __ios_base::skipws); 20472: 20472: size_t __n; 20472: if (__is >> __n) 20472: { 20472: std::vector<_RealType> __int_vec; 20472: if (__detail::__extract_params(__is, __int_vec, __n + 1)) 20472: { 20472: std::vector __den_vec; 20472: if (__detail::__extract_params(__is, __den_vec, __n)) 20472: { 20472: __x.param({ __int_vec.begin(), __int_vec.end(), 20472: __den_vec.begin() }); 20472: } 20472: } 20472: } 20472: 20472: __is.flags(__flags); 20472: return __is; 20472: } 20472: 20472: 20472: template 20472: void 20472: piecewise_linear_distribution<_RealType>::param_type:: 20472: _M_initialize() 20472: { 20472: if (_M_int.size() < 2 20472: || (_M_int.size() == 2 20472: && _M_int[0] == _RealType(0) 20472: && _M_int[1] == _RealType(1) 20472: && _M_den[0] == _M_den[1])) 20472: { 20472: _M_int.clear(); 20472: _M_den.clear(); 20472: return; 20472: } 20472: 20472: double __sum = 0.0; 20472: _M_cp.reserve(_M_int.size() - 1); 20472: _M_m.reserve(_M_int.size() - 1); 20472: for (size_t __k = 0; __k < _M_int.size() - 1; ++__k) 20472: { 20472: const _RealType __delta = _M_int[__k + 1] - _M_int[__k]; 20472: __sum += 0.5 * (_M_den[__k + 1] + _M_den[__k]) * __delta; 20472: _M_cp.push_back(__sum); 20472: _M_m.push_back((_M_den[__k + 1] - _M_den[__k]) / __delta); 20472: } 20472: 20472: 20472: __detail::__normalize(_M_den.begin(), _M_den.end(), _M_den.begin(), 20472: __sum); 20472: 20472: __detail::__normalize(_M_cp.begin(), _M_cp.end(), _M_cp.begin(), __sum); 20472: 20472: __detail::__normalize(_M_m.begin(), _M_m.end(), _M_m.begin(), __sum); 20472: 20472: 20472: _M_cp[_M_cp.size() - 1] = 1.0; 20472: } 20472: 20472: template 20472: template 20472: piecewise_linear_distribution<_RealType>::param_type:: 20472: param_type(_InputIteratorB __bbegin, 20472: _InputIteratorB __bend, 20472: _InputIteratorW __wbegin) 20472: : _M_int(), _M_den(), _M_cp(), _M_m() 20472: { 20472: for (; __bbegin != __bend; ++__bbegin, ++__wbegin) 20472: { 20472: _M_int.push_back(*__bbegin); 20472: _M_den.push_back(*__wbegin); 20472: } 20472: 20472: _M_initialize(); 20472: } 20472: 20472: template 20472: template 20472: piecewise_linear_distribution<_RealType>::param_type:: 20472: param_type(initializer_list<_RealType> __bl, _Func __fw) 20472: : _M_int(), _M_den(), _M_cp(), _M_m() 20472: { 20472: _M_int.reserve(__bl.size()); 20472: _M_den.reserve(__bl.size()); 20472: for (auto __biter = __bl.begin(); __biter != __bl.end(); ++__biter) 20472: { 20472: _M_int.push_back(*__biter); 20472: _M_den.push_back(__fw(*__biter)); 20472: } 20472: 20472: _M_initialize(); 20472: } 20472: 20472: template 20472: template 20472: piecewise_linear_distribution<_RealType>::param_type:: 20472: param_type(size_t __nw, _RealType __xmin, _RealType __xmax, _Func __fw) 20472: : _M_int(), _M_den(), _M_cp(), _M_m() 20472: { 20472: const size_t __n = __nw == 0 ? 1 : __nw; 20472: const _RealType __delta = (__xmax - __xmin) / __n; 20472: 20472: _M_int.reserve(__n + 1); 20472: _M_den.reserve(__n + 1); 20472: for (size_t __k = 0; __k <= __nw; ++__k) 20472: { 20472: _M_int.push_back(__xmin + __k * __delta); 20472: _M_den.push_back(__fw(_M_int[__k] + __delta)); 20472: } 20472: 20472: _M_initialize(); 20472: } 20472: 20472: template 20472: template 20472: typename piecewise_linear_distribution<_RealType>::result_type 20472: piecewise_linear_distribution<_RealType>:: 20472: operator()(_UniformRandomNumberGenerator& __urng, 20472: const param_type& __param) 20472: { 20472: __detail::_Adaptor<_UniformRandomNumberGenerator, double> 20472: __aurng(__urng); 20472: 20472: const double __p = __aurng(); 20472: if (__param._M_cp.empty()) 20472: return __p; 20472: 20472: auto __pos = std::lower_bound(__param._M_cp.begin(), 20472: __param._M_cp.end(), __p); 20472: const size_t __i = __pos - __param._M_cp.begin(); 20472: 20472: const double __pref = __i > 0 ? __param._M_cp[__i - 1] : 0.0; 20472: 20472: const double __a = 0.5 * __param._M_m[__i]; 20472: const double __b = __param._M_den[__i]; 20472: const double __cm = __p - __pref; 20472: 20472: _RealType __x = __param._M_int[__i]; 20472: if (__a == 0) 20472: __x += __cm / __b; 20472: else 20472: { 20472: const double __d = __b * __b + 4.0 * __a * __cm; 20472: __x += 0.5 * (std::sqrt(__d) - __b) / __a; 20472: } 20472: 20472: return __x; 20472: } 20472: 20472: template 20472: template 20472: void 20472: piecewise_linear_distribution<_RealType>:: 20472: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 20472: _UniformRandomNumberGenerator& __urng, 20472: const param_type& __param) 20472: { 20472: 20472: 20472: while (__f != __t) 20472: *__f++ = this->operator()(__urng, __param); 20472: } 20472: 20472: template 20472: std::basic_ostream<_CharT, _Traits>& 20472: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 20472: const piecewise_linear_distribution<_RealType>& __x) 20472: { 20472: using __ios_base = typename basic_ostream<_CharT, _Traits>::ios_base; 20472: 20472: const typename __ios_base::fmtflags __flags = __os.flags(); 20472: const _CharT __fill = __os.fill(); 20472: const std::streamsize __precision = __os.precision(); 20472: const _CharT __space = __os.widen(' '); 20472: __os.flags(__ios_base::scientific | __ios_base::left); 20472: __os.fill(__space); 20472: __os.precision(std::numeric_limits<_RealType>::max_digits10); 20472: 20472: std::vector<_RealType> __int = __x.intervals(); 20472: __os << __int.size() - 1; 20472: 20472: for (auto __xit = __int.begin(); __xit != __int.end(); ++__xit) 20472: __os << __space << *__xit; 20472: 20472: std::vector __den = __x.densities(); 20472: for (auto __dit = __den.begin(); __dit != __den.end(); ++__dit) 20472: __os << __space << *__dit; 20472: 20472: __os.flags(__flags); 20472: __os.fill(__fill); 20472: __os.precision(__precision); 20472: return __os; 20472: } 20472: 20472: template 20472: std::basic_istream<_CharT, _Traits>& 20472: operator>>(std::basic_istream<_CharT, _Traits>& __is, 20472: piecewise_linear_distribution<_RealType>& __x) 20472: { 20472: using __ios_base = typename basic_istream<_CharT, _Traits>::ios_base; 20472: 20472: const typename __ios_base::fmtflags __flags = __is.flags(); 20472: __is.flags(__ios_base::dec | __ios_base::skipws); 20472: 20472: size_t __n; 20472: if (__is >> __n) 20472: { 20472: vector<_RealType> __int_vec; 20472: if (__detail::__extract_params(__is, __int_vec, __n + 1)) 20472: { 20472: vector __den_vec; 20472: if (__detail::__extract_params(__is, __den_vec, __n + 1)) 20472: { 20472: __x.param({ __int_vec.begin(), __int_vec.end(), 20472: __den_vec.begin() }); 20472: } 20472: } 20472: } 20472: __is.flags(__flags); 20472: return __is; 20472: } 20472: 20472: 20472: template 20472: seed_seq::seed_seq(std::initializer_list<_IntType> __il) 20472: { 20472: for (auto __iter = __il.begin(); __iter != __il.end(); ++__iter) 20472: _M_v.push_back(__detail::__mod::__value>(*__iter)); 20472: } 20472: 20472: template 20472: seed_seq::seed_seq(_InputIterator __begin, _InputIterator __end) 20472: { 20472: for (_InputIterator __iter = __begin; __iter != __end; ++__iter) 20472: _M_v.push_back(__detail::__mod::__value>(*__iter)); 20472: } 20472: 20472: template 20472: void 20472: seed_seq::generate(_RandomAccessIterator __begin, 20472: _RandomAccessIterator __end) 20472: { 20472: typedef typename iterator_traits<_RandomAccessIterator>::value_type 20472: _Type; 20472: 20472: if (__begin == __end) 20472: return; 20472: 20472: std::fill(__begin, __end, _Type(0x8b8b8b8bu)); 20472: 20472: const size_t __n = __end - __begin; 20472: const size_t __s = _M_v.size(); 20472: const size_t __t = (__n >= 623) ? 11 20472: : (__n >= 68) ? 7 20472: : (__n >= 39) ? 5 20472: : (__n >= 7) ? 3 20472: : (__n - 1) / 2; 20472: const size_t __p = (__n - __t) / 2; 20472: const size_t __q = __p + __t; 20472: const size_t __m = std::max(size_t(__s + 1), __n); 20472: 20472: for (size_t __k = 0; __k < __m; ++__k) 20472: { 20472: _Type __arg = (__begin[__k % __n] 20472: ^ __begin[(__k + __p) % __n] 20472: ^ __begin[(__k - 1) % __n]); 20472: _Type __r1 = __arg ^ (__arg >> 27); 20472: __r1 = __detail::__mod<_Type, 20472: __detail::_Shift<_Type, 32>::__value>(1664525u * __r1); 20472: _Type __r2 = __r1; 20472: if (__k == 0) 20472: __r2 += __s; 20472: else if (__k <= __s) 20472: __r2 += __k % __n + _M_v[__k - 1]; 20472: else 20472: __r2 += __k % __n; 20472: __r2 = __detail::__mod<_Type, 20472: __detail::_Shift<_Type, 32>::__value>(__r2); 20472: __begin[(__k + __p) % __n] += __r1; 20472: __begin[(__k + __q) % __n] += __r2; 20472: __begin[__k % __n] = __r2; 20472: } 20472: 20472: for (size_t __k = __m; __k < __m + __n; ++__k) 20472: { 20472: _Type __arg = (__begin[__k % __n] 20472: + __begin[(__k + __p) % __n] 20472: + __begin[(__k - 1) % __n]); 20472: _Type __r3 = __arg ^ (__arg >> 27); 20472: __r3 = __detail::__mod<_Type, 20472: __detail::_Shift<_Type, 32>::__value>(1566083941u * __r3); 20472: _Type __r4 = __r3 - __k % __n; 20472: __r4 = __detail::__mod<_Type, 20472: __detail::_Shift<_Type, 32>::__value>(__r4); 20472: __begin[(__k + __p) % __n] ^= __r3; 20472: __begin[(__k + __q) % __n] ^= __r4; 20472: __begin[__k % __n] = __r4; 20472: } 20472: } 20472: 20472: template 20472: _RealType 20472: generate_canonical(_UniformRandomNumberGenerator& __urng) 20472: { 20472: static_assert(std::is_floating_point<_RealType>::value, 20472: "template argument must be a floating point type"); 20472: 20472: const size_t __b 20472: = std::min(static_cast(std::numeric_limits<_RealType>::digits), 20472: __bits); 20472: const long double __r = static_cast(__urng.max()) 20472: - static_cast(__urng.min()) + 1.0L; 20472: const size_t __log2r = std::log(__r) / std::log(2.0L); 20472: const size_t __m = std::max(1UL, 20472: (__b + __log2r - 1UL) / __log2r); 20472: _RealType __ret; 20472: _RealType __sum = _RealType(0); 20472: _RealType __tmp = _RealType(1); 20472: for (size_t __k = __m; __k != 0; --__k) 20472: { 20472: __sum += _RealType(__urng() - __urng.min()) * __tmp; 20472: __tmp *= __r; 20472: } 20472: __ret = __sum / __tmp; 20472: if (__builtin_expect(__ret >= _RealType(1), 0)) 20472: { 20472: 20472: __ret = std::nextafter(_RealType(1), _RealType(0)); 20472: 20472: 20472: 20472: 20472: } 20472: return __ret; 20472: } 20472: 20472: 20472: } 20472: # 52 "/usr/include/c++/10/random" 2 3 20472: # 14 "./util/random.h" 2 20472: 20472: 20472: 20472: 20472: # 17 "./util/random.h" 20472: namespace rocksdb { 20472: 20472: 20472: 20472: 20472: class Random { 20472: private: 20472: enum : uint32_t { 20472: M = 2147483647L 20472: }; 20472: enum : uint64_t { 20472: A = 16807 20472: }; 20472: 20472: uint32_t seed_; 20472: 20472: static uint32_t GoodSeed(uint32_t s) { return (s & M) != 0 ? (s & M) : 1; } 20472: 20472: public: 20472: 20472: enum : uint32_t { kMaxNext = M }; 20472: 20472: explicit Random(uint32_t s) : seed_(GoodSeed(s)) {} 20472: 20472: void Reset(uint32_t s) { seed_ = GoodSeed(s); } 20472: 20472: uint32_t Next() { 20472: 20472: 20472: 20472: 20472: 20472: 20472: uint64_t product = seed_ * A; 20472: 20472: 20472: seed_ = static_cast((product >> 31) + (product & M)); 20472: 20472: 20472: 20472: if (seed_ > M) { 20472: seed_ -= M; 20472: } 20472: return seed_; 20472: } 20472: 20472: 20472: 20472: uint32_t Uniform(int n) { return Next() % n; } 20472: 20472: 20472: 20472: bool OneIn(int n) { return Uniform(n) == 0; } 20472: 20472: 20472: 20472: bool OneInOpt(int n) { return n > 0 && OneIn(n); } 20472: 20472: 20472: 20472: 20472: bool PercentTrue(int percentage) { 20472: return static_cast(Uniform(100)) < percentage; 20472: } 20472: 20472: 20472: 20472: 20472: uint32_t Skewed(int max_log) { 20472: return Uniform(1 << Uniform(max_log + 1)); 20472: } 20472: 20472: 20472: 20472: static Random* GetTLSInstance(); 20472: }; 20472: 20472: 20472: 20472: 20472: class Random32 { 20472: private: 20472: std::mt19937 generator_; 20472: 20472: public: 20472: explicit Random32(uint32_t s) : generator_(s) {} 20472: 20472: 20472: uint32_t Next() { return static_cast(generator_()); } 20472: 20472: 20472: 20472: uint32_t Uniform(uint32_t n) { 20472: return static_cast( 20472: std::uniform_int_distribution( 20472: 0, n - 1)(generator_)); 20472: } 20472: 20472: 20472: 20472: 20472: uint32_t Uniformish(uint32_t n) { 20472: 20472: return static_cast((uint64_t(generator_()) * uint64_t(n)) >> 32); 20472: } 20472: 20472: 20472: 20472: bool OneIn(uint32_t n) { return Uniform(n) == 0; } 20472: 20472: 20472: 20472: 20472: uint32_t Skewed(int max_log) { 20472: return Uniform(uint32_t{1} << Uniform(max_log + 1)); 20472: } 20472: 20472: 20472: void Seed(uint32_t new_seed) { generator_.seed(new_seed); } 20472: }; 20472: 20472: 20472: class Random64 { 20472: private: 20472: std::mt19937_64 generator_; 20472: 20472: public: 20472: explicit Random64(uint64_t s) : generator_(s) { } 20472: 20472: 20472: uint64_t Next() { return generator_(); } 20472: 20472: 20472: 20472: uint64_t Uniform(uint64_t n) { 20472: return std::uniform_int_distribution(0, n - 1)(generator_); 20472: } 20472: 20472: 20472: 20472: bool OneIn(uint64_t n) { return Uniform(n) == 0; } 20472: 20472: 20472: 20472: 20472: uint64_t Skewed(int max_log) { 20472: return Uniform(uint64_t(1) << Uniform(max_log + 1)); 20472: } 20472: }; 20472: 20472: 20472: template 20472: void RandomShuffle(RandomIt first, RandomIt last, uint32_t seed) { 20472: std::mt19937 rng(seed); 20472: std::shuffle(first, last, rng); 20472: } 20472: 20472: 20472: template 20472: void RandomShuffle(RandomIt first, RandomIt last) { 20472: RandomShuffle(first, last, std::random_device{}()); 20472: } 20472: 20472: } 20472: # 16 "./util/core_local.h" 2 20472: 20472: namespace rocksdb { 20472: 20472: 20472: 20472: template 20472: class CoreLocalArray { 20472: public: 20472: CoreLocalArray(); 20472: 20472: size_t Size() const; 20472: 20472: 20472: T* Access() const; 20472: 20472: 20472: 20472: std::pair AccessElementAndIndex() const; 20472: 20472: 20472: T* AccessAtCore(size_t core_idx) const; 20472: 20472: private: 20472: std::unique_ptr data_; 20472: int size_shift_; 20472: }; 20472: 20472: template 20472: CoreLocalArray::CoreLocalArray() { 20472: int num_cpus = static_cast(std::thread::hardware_concurrency()); 20472: 20472: size_shift_ = 3; 20472: while (1 << size_shift_ < num_cpus) { 20472: ++size_shift_; 20472: } 20472: data_.reset(new T[static_cast(1) << size_shift_]); 20472: } 20472: 20472: template 20472: size_t CoreLocalArray::Size() const { 20472: return static_cast(1) << size_shift_; 20472: } 20472: 20472: template 20472: T* CoreLocalArray::Access() const { 20472: return AccessElementAndIndex().first; 20472: } 20472: 20472: template 20472: std::pair CoreLocalArray::AccessElementAndIndex() const { 20472: int cpuid = port::PhysicalCoreID(); 20472: size_t core_idx; 20472: if ((__builtin_expect((cpuid < 0), 0))) { 20472: 20472: core_idx = Random::GetTLSInstance()->Uniform(1 << size_shift_); 20472: } else { 20472: core_idx = static_cast(cpuid & ((1 << size_shift_) - 1)); 20472: } 20472: return {AccessAtCore(core_idx), core_idx}; 20472: } 20472: 20472: template 20472: T* CoreLocalArray::AccessAtCore(size_t core_idx) const { 20472: 20472: # 79 "./util/core_local.h" 3 4 20472: (static_cast ( 20472: # 79 "./util/core_local.h" 20472: core_idx < static_cast(1) << size_shift_ 20472: # 79 "./util/core_local.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 79 "./util/core_local.h" 20472: "core_idx < static_cast(1) << size_shift_" 20472: # 79 "./util/core_local.h" 3 4 20472: , "./util/core_local.h", 79, __extension__ __PRETTY_FUNCTION__)) 20472: # 79 "./util/core_local.h" 20472: ; 20472: return &data_[core_idx]; 20472: } 20472: 20472: } 20472: # 18 "./monitoring/statistics.h" 2 20472: # 1 "./util/mutexlock.h" 1 20472: # 10 "./util/mutexlock.h" 20472: 20472: # 1 "/usr/include/assert.h" 1 3 4 20472: # 12 "./util/mutexlock.h" 2 20472: 20472: 20472: 20472: 20472: 20472: namespace rocksdb { 20472: # 29 "./util/mutexlock.h" 20472: class MutexLock { 20472: public: 20472: explicit MutexLock(port::Mutex *mu) : mu_(mu) { 20472: this->mu_->Lock(); 20472: } 20472: 20472: MutexLock(const MutexLock &) = delete; 20472: void operator=(const MutexLock &) = delete; 20472: 20472: ~MutexLock() { this->mu_->Unlock(); } 20472: 20472: private: 20472: port::Mutex *const mu_; 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: class ReadLock { 20472: public: 20472: explicit ReadLock(port::RWMutex *mu) : mu_(mu) { 20472: this->mu_->ReadLock(); 20472: } 20472: 20472: ReadLock(const ReadLock &) = delete; 20472: void operator=(const ReadLock &) = delete; 20472: 20472: ~ReadLock() { this->mu_->ReadUnlock(); } 20472: 20472: private: 20472: port::RWMutex *const mu_; 20472: }; 20472: 20472: 20472: 20472: 20472: class ReadUnlock { 20472: public: 20472: explicit ReadUnlock(port::RWMutex *mu) : mu_(mu) { mu->AssertHeld(); } 20472: 20472: ReadUnlock(const ReadUnlock &) = delete; 20472: ReadUnlock &operator=(const ReadUnlock &) = delete; 20472: 20472: ~ReadUnlock() { mu_->ReadUnlock(); } 20472: 20472: private: 20472: port::RWMutex *const mu_; 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: class WriteLock { 20472: public: 20472: explicit WriteLock(port::RWMutex *mu) : mu_(mu) { 20472: this->mu_->WriteLock(); 20472: } 20472: 20472: WriteLock(const WriteLock &) = delete; 20472: void operator=(const WriteLock &) = delete; 20472: 20472: ~WriteLock() { this->mu_->WriteUnlock(); } 20472: 20472: private: 20472: port::RWMutex *const mu_; 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: class SpinMutex { 20472: public: 20472: SpinMutex() : locked_(false) {} 20472: 20472: bool try_lock() { 20472: auto currently_locked = locked_.load(std::memory_order_relaxed); 20472: return !currently_locked && 20472: locked_.compare_exchange_weak(currently_locked, true, 20472: std::memory_order_acquire, 20472: std::memory_order_relaxed); 20472: } 20472: 20472: void lock() { 20472: for (size_t tries = 0;; ++tries) { 20472: if (try_lock()) { 20472: 20472: break; 20472: } 20472: port::AsmVolatilePause(); 20472: if (tries > 100) { 20472: std::this_thread::yield(); 20472: } 20472: } 20472: } 20472: 20472: void unlock() { locked_.store(false, std::memory_order_release); } 20472: 20472: private: 20472: std::atomic locked_; 20472: }; 20472: 20472: 20472: template 20472: struct alignas(64U) LockData { 20472: T lock_; 20472: }; 20472: # 150 "./util/mutexlock.h" 20472: template 20472: class Striped { 20472: public: 20472: Striped(size_t stripes, std::function hash) 20472: : stripes_(stripes), hash_(hash) { 20472: 20472: locks_ = reinterpret_cast *>( 20472: port::cacheline_aligned_alloc(sizeof(LockData) * stripes)); 20472: for (size_t i = 0; i < stripes; i++) { 20472: new (&locks_[i]) LockData(); 20472: } 20472: 20472: } 20472: 20472: virtual ~Striped() { 20472: if (locks_ != nullptr) { 20472: 20472: # 166 "./util/mutexlock.h" 3 4 20472: (static_cast ( 20472: # 166 "./util/mutexlock.h" 20472: stripes_ > 0 20472: # 166 "./util/mutexlock.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 166 "./util/mutexlock.h" 20472: "stripes_ > 0" 20472: # 166 "./util/mutexlock.h" 3 4 20472: , "./util/mutexlock.h", 166, __extension__ __PRETTY_FUNCTION__)) 20472: # 166 "./util/mutexlock.h" 20472: ; 20472: for (size_t i = 0; i < stripes_; i++) { 20472: locks_[i].~LockData(); 20472: } 20472: port::cacheline_aligned_free(locks_); 20472: } 20472: } 20472: 20472: T *get(const P &key) { 20472: uint64_t h = hash_(key); 20472: size_t index = h % stripes_; 20472: return &reinterpret_cast *>(&locks_[index])->lock_; 20472: } 20472: 20472: private: 20472: size_t stripes_; 20472: LockData *locks_; 20472: std::function hash_; 20472: }; 20472: 20472: } 20472: # 19 "./monitoring/statistics.h" 2 20472: # 31 "./monitoring/statistics.h" 20472: namespace rocksdb { 20472: 20472: enum TickersInternal : uint32_t { 20472: INTERNAL_TICKER_ENUM_START = TICKER_ENUM_MAX, 20472: INTERNAL_TICKER_ENUM_MAX 20472: }; 20472: 20472: enum HistogramsInternal : uint32_t { 20472: INTERNAL_HISTOGRAM_START = HISTOGRAM_ENUM_MAX, 20472: INTERNAL_HISTOGRAM_ENUM_MAX 20472: }; 20472: 20472: class StatisticsImpl : public Statistics { 20472: public: 20472: StatisticsImpl(std::shared_ptr stats); 20472: virtual ~StatisticsImpl(); 20472: 20472: virtual uint64_t getTickerCount(uint32_t ticker_type) const override; 20472: virtual void histogramData(uint32_t histogram_type, 20472: HistogramData* const data) const override; 20472: std::string getHistogramString(uint32_t histogram_type) const override; 20472: 20472: virtual void setTickerCount(uint32_t ticker_type, uint64_t count) override; 20472: virtual uint64_t getAndResetTickerCount(uint32_t ticker_type) override; 20472: virtual void recordTick(uint32_t ticker_type, uint64_t count) override; 20472: 20472: 20472: 20472: 20472: void measureTime(uint32_t histogramType, uint64_t time) override { 20472: recordInHistogram(histogramType, time); 20472: } 20472: virtual void recordInHistogram(uint32_t histogram_type, 20472: uint64_t value) override; 20472: 20472: virtual Status Reset() override; 20472: virtual std::string ToString() const override; 20472: virtual bool getTickerMap(std::map*) const override; 20472: virtual bool HistEnabledForType(uint32_t type) const override; 20472: 20472: private: 20472: 20472: std::shared_ptr stats_; 20472: 20472: 20472: mutable port::Mutex aggregate_lock_; 20472: 20472: 20472: 20472: 20472: 20472: 20472: struct alignas(64U) StatisticsData { 20472: std::atomic_uint_fast64_t tickers_[INTERNAL_TICKER_ENUM_MAX] = {{0}}; 20472: HistogramImpl histograms_[INTERNAL_HISTOGRAM_ENUM_MAX]; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: void *operator new(size_t s) { return port::cacheline_aligned_alloc(s); } 20472: void *operator new[](size_t s) { return port::cacheline_aligned_alloc(s); } 20472: void operator delete(void *p) { port::cacheline_aligned_free(p); } 20472: void operator delete[](void *p) { port::cacheline_aligned_free(p); } 20472: }; 20472: 20472: static_assert(sizeof(StatisticsData) % 64U == 0, "Expected " "64U" "-byte aligned"); 20472: 20472: CoreLocalArray per_core_stats_; 20472: 20472: uint64_t getTickerCountLocked(uint32_t ticker_type) const; 20472: std::unique_ptr getHistogramImplLocked( 20472: uint32_t histogram_type) const; 20472: void setTickerCountLocked(uint32_t ticker_type, uint64_t count); 20472: }; 20472: 20472: 20472: inline void RecordInHistogram(Statistics* statistics, uint32_t histogram_type, 20472: uint64_t value) { 20472: if (statistics) { 20472: statistics->recordInHistogram(histogram_type, value); 20472: } 20472: } 20472: 20472: inline void RecordTimeToHistogram(Statistics* statistics, 20472: uint32_t histogram_type, uint64_t value) { 20472: if (statistics) { 20472: statistics->reportTimeToHistogram(histogram_type, value); 20472: } 20472: } 20472: 20472: inline void RecordTick(Statistics* statistics, uint32_t ticker_type, 20472: uint64_t count = 1) { 20472: if (statistics) { 20472: statistics->recordTick(ticker_type, count); 20472: } 20472: } 20472: 20472: inline void SetTickerCount(Statistics* statistics, uint32_t ticker_type, 20472: uint64_t count) { 20472: if (statistics) { 20472: statistics->setTickerCount(ticker_type, count); 20472: } 20472: } 20472: 20472: } 20472: # 8 "./util/stop_watch.h" 2 20472: 20472: 20472: namespace rocksdb { 20472: 20472: 20472: 20472: 20472: class StopWatch { 20472: public: 20472: StopWatch(Env* const env, Statistics* statistics, const uint32_t hist_type, 20472: uint64_t* elapsed = nullptr, bool overwrite = true, 20472: bool delay_enabled = false) 20472: : env_(env), 20472: statistics_(statistics), 20472: hist_type_(hist_type), 20472: elapsed_(elapsed), 20472: overwrite_(overwrite), 20472: stats_enabled_(statistics && 20472: statistics->get_stats_level() >= 20472: StatsLevel::kExceptTimers && 20472: statistics->HistEnabledForType(hist_type)), 20472: delay_enabled_(delay_enabled), 20472: total_delay_(0), 20472: delay_start_time_(0), 20472: start_time_((stats_enabled_ || elapsed != nullptr) ? env->NowMicros() 20472: : 0) {} 20472: 20472: ~StopWatch() { 20472: if (elapsed_) { 20472: if (overwrite_) { 20472: *elapsed_ = env_->NowMicros() - start_time_; 20472: } else { 20472: *elapsed_ += env_->NowMicros() - start_time_; 20472: } 20472: } 20472: if (elapsed_ && delay_enabled_) { 20472: *elapsed_ -= total_delay_; 20472: } 20472: if (stats_enabled_) { 20472: statistics_->reportTimeToHistogram( 20472: hist_type_, (elapsed_ != nullptr) 20472: ? *elapsed_ 20472: : (env_->NowMicros() - start_time_)); 20472: } 20472: } 20472: 20472: void DelayStart() { 20472: 20472: 20472: if (elapsed_ && delay_enabled_ && delay_start_time_ == 0) { 20472: delay_start_time_ = env_->NowMicros(); 20472: } 20472: } 20472: 20472: void DelayStop() { 20472: if (elapsed_ && delay_enabled_ && delay_start_time_ != 0) { 20472: total_delay_ += env_->NowMicros() - delay_start_time_; 20472: } 20472: 20472: 20472: delay_start_time_ = 0; 20472: } 20472: 20472: uint64_t GetDelay() const { return delay_enabled_ ? total_delay_ : 0; } 20472: 20472: uint64_t start_time() const { return start_time_; } 20472: 20472: private: 20472: Env* const env_; 20472: Statistics* statistics_; 20472: const uint32_t hist_type_; 20472: uint64_t* elapsed_; 20472: bool overwrite_; 20472: bool stats_enabled_; 20472: bool delay_enabled_; 20472: uint64_t total_delay_; 20472: uint64_t delay_start_time_; 20472: const uint64_t start_time_; 20472: }; 20472: 20472: 20472: class StopWatchNano { 20472: public: 20472: explicit StopWatchNano(Env* const env, bool auto_start = false) 20472: : env_(env), start_(0) { 20472: if (auto_start) { 20472: Start(); 20472: } 20472: } 20472: 20472: void Start() { start_ = env_->NowNanos(); } 20472: 20472: uint64_t ElapsedNanos(bool reset = false) { 20472: auto now = env_->NowNanos(); 20472: auto elapsed = now - start_; 20472: if (reset) { 20472: start_ = now; 20472: } 20472: return elapsed; 20472: } 20472: 20472: uint64_t ElapsedNanosSafe(bool reset = false) { 20472: return (env_ != nullptr) ? ElapsedNanos(reset) : 0U; 20472: } 20472: 20472: private: 20472: Env* const env_; 20472: uint64_t start_; 20472: }; 20472: 20472: } 20472: # 10 "./monitoring/perf_step_timer.h" 2 20472: 20472: namespace rocksdb { 20472: 20472: class PerfStepTimer { 20472: public: 20472: explicit PerfStepTimer( 20472: uint64_t* metric, Env* env = nullptr, bool use_cpu_time = false, 20472: PerfLevel enable_level = PerfLevel::kEnableTimeExceptForMutex, 20472: Statistics* statistics = nullptr, uint32_t ticker_type = 0) 20472: : perf_counter_enabled_(perf_level >= enable_level), 20472: use_cpu_time_(use_cpu_time), 20472: env_((perf_counter_enabled_ || statistics != nullptr) 20472: ? ((env != nullptr) ? env : Env::Default()) 20472: : nullptr), 20472: start_(0), 20472: metric_(metric), 20472: statistics_(statistics), 20472: ticker_type_(ticker_type) {} 20472: 20472: ~PerfStepTimer() { 20472: Stop(); 20472: } 20472: 20472: void Start() { 20472: if (perf_counter_enabled_ || statistics_ != nullptr) { 20472: start_ = time_now(); 20472: } 20472: } 20472: 20472: uint64_t time_now() { 20472: if (!use_cpu_time_) { 20472: return env_->NowNanos(); 20472: } else { 20472: return env_->NowCPUNanos(); 20472: } 20472: } 20472: 20472: void Measure() { 20472: if (start_) { 20472: uint64_t now = time_now(); 20472: *metric_ += now - start_; 20472: start_ = now; 20472: } 20472: } 20472: 20472: void Stop() { 20472: if (start_) { 20472: uint64_t duration = time_now() - start_; 20472: if (perf_counter_enabled_) { 20472: *metric_ += duration; 20472: } 20472: 20472: if (statistics_ != nullptr) { 20472: RecordTick(statistics_, ticker_type_, duration); 20472: } 20472: start_ = 0; 20472: } 20472: } 20472: 20472: private: 20472: const bool perf_counter_enabled_; 20472: const bool use_cpu_time_; 20472: Env* const env_; 20472: uint64_t start_; 20472: uint64_t* metric_; 20472: Statistics* statistics_; 20472: uint32_t ticker_type_; 20472: }; 20472: 20472: } 20472: # 8 "./monitoring/perf_context_imp.h" 2 20472: # 1 "./include/rocksdb/perf_context.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: namespace rocksdb { 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: struct PerfContextByLevel { 20472: 20472: uint64_t bloom_filter_useful = 0; 20472: 20472: uint64_t bloom_filter_full_positive = 0; 20472: 20472: 20472: uint64_t bloom_filter_full_true_positive = 0; 20472: 20472: 20472: 20472: uint64_t user_key_return_count = 0; 20472: 20472: 20472: uint64_t get_from_table_nanos = 0; 20472: 20472: uint64_t block_cache_hit_count = 0; 20472: uint64_t block_cache_miss_count = 0; 20472: 20472: void Reset(); 20472: }; 20472: 20472: struct PerfContext { 20472: ~PerfContext(); 20472: 20472: PerfContext() {} 20472: 20472: PerfContext(const PerfContext&); 20472: PerfContext& operator=(const PerfContext&); 20472: PerfContext(PerfContext&&) noexcept; 20472: 20472: void Reset(); 20472: 20472: std::string ToString(bool exclude_zero_counters = false) const; 20472: 20472: 20472: void EnablePerLevelPerfContext(); 20472: 20472: 20472: void DisablePerLevelPerfContext(); 20472: 20472: 20472: void ClearPerLevelPerfContext(); 20472: 20472: uint64_t user_key_comparison_count; 20472: uint64_t block_cache_hit_count; 20472: uint64_t block_read_count; 20472: uint64_t block_read_byte; 20472: uint64_t block_read_time; 20472: uint64_t block_cache_index_hit_count; 20472: uint64_t index_block_read_count; 20472: uint64_t block_cache_filter_hit_count; 20472: uint64_t filter_block_read_count; 20472: uint64_t compression_dict_block_read_count; 20472: 20472: uint64_t block_checksum_time; 20472: uint64_t block_decompress_time; 20472: 20472: uint64_t get_read_bytes; 20472: uint64_t multiget_read_bytes; 20472: uint64_t iter_read_bytes; 20472: # 101 "./include/rocksdb/perf_context.h" 20472: uint64_t internal_key_skipped_count; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: uint64_t internal_delete_skipped_count; 20472: 20472: 20472: 20472: uint64_t internal_recent_skipped_count; 20472: 20472: 20472: uint64_t internal_merge_count; 20472: 20472: uint64_t get_snapshot_time; 20472: uint64_t get_from_memtable_time; 20472: uint64_t get_from_memtable_count; 20472: 20472: uint64_t get_post_process_time; 20472: uint64_t get_from_output_files_time; 20472: 20472: uint64_t seek_on_memtable_time; 20472: 20472: 20472: uint64_t seek_on_memtable_count; 20472: 20472: uint64_t next_on_memtable_count; 20472: 20472: uint64_t prev_on_memtable_count; 20472: 20472: uint64_t seek_child_seek_time; 20472: 20472: uint64_t seek_child_seek_count; 20472: uint64_t seek_min_heap_time; 20472: uint64_t seek_max_heap_time; 20472: 20472: uint64_t seek_internal_seek_time; 20472: 20472: uint64_t find_next_user_entry_time; 20472: 20472: 20472: 20472: 20472: 20472: 20472: uint64_t write_wal_time; 20472: 20472: uint64_t write_memtable_time; 20472: 20472: uint64_t write_delay_time; 20472: 20472: 20472: uint64_t write_scheduling_flushes_compactions_time; 20472: 20472: uint64_t write_pre_and_post_process_time; 20472: 20472: 20472: uint64_t write_thread_wait_nanos; 20472: 20472: 20472: uint64_t db_mutex_lock_nanos; 20472: 20472: uint64_t db_condition_wait_nanos; 20472: 20472: uint64_t merge_operator_time_nanos; 20472: 20472: 20472: uint64_t read_index_block_nanos; 20472: 20472: uint64_t read_filter_block_nanos; 20472: 20472: uint64_t new_table_block_iter_nanos; 20472: 20472: uint64_t new_table_iterator_nanos; 20472: 20472: uint64_t block_seek_nanos; 20472: 20472: uint64_t find_table_nanos; 20472: 20472: uint64_t bloom_memtable_hit_count; 20472: 20472: uint64_t bloom_memtable_miss_count; 20472: 20472: uint64_t bloom_sst_hit_count; 20472: 20472: uint64_t bloom_sst_miss_count; 20472: 20472: 20472: uint64_t key_lock_wait_time; 20472: 20472: uint64_t key_lock_wait_count; 20472: 20472: 20472: 20472: uint64_t env_new_sequential_file_nanos; 20472: uint64_t env_new_random_access_file_nanos; 20472: uint64_t env_new_writable_file_nanos; 20472: uint64_t env_reuse_writable_file_nanos; 20472: uint64_t env_new_random_rw_file_nanos; 20472: uint64_t env_new_directory_nanos; 20472: uint64_t env_file_exists_nanos; 20472: uint64_t env_get_children_nanos; 20472: uint64_t env_get_children_file_attributes_nanos; 20472: uint64_t env_delete_file_nanos; 20472: uint64_t env_create_dir_nanos; 20472: uint64_t env_create_dir_if_missing_nanos; 20472: uint64_t env_delete_dir_nanos; 20472: uint64_t env_get_file_size_nanos; 20472: uint64_t env_get_file_modification_time_nanos; 20472: uint64_t env_rename_file_nanos; 20472: uint64_t env_link_file_nanos; 20472: uint64_t env_lock_file_nanos; 20472: uint64_t env_unlock_file_nanos; 20472: uint64_t env_new_logger_nanos; 20472: 20472: uint64_t get_cpu_nanos; 20472: uint64_t iter_next_cpu_nanos; 20472: uint64_t iter_prev_cpu_nanos; 20472: uint64_t iter_seek_cpu_nanos; 20472: 20472: 20472: uint64_t encrypt_data_nanos; 20472: 20472: uint64_t decrypt_data_nanos; 20472: 20472: std::map* level_to_perf_context = nullptr; 20472: bool per_level_perf_context_enabled = false; 20472: }; 20472: 20472: 20472: 20472: PerfContext* get_perf_context(); 20472: 20472: } 20472: # 9 "./monitoring/perf_context_imp.h" 2 20472: 20472: 20472: namespace rocksdb { 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern thread_local PerfContext perf_context; 20472: # 97 "./monitoring/perf_context_imp.h" 20472: } 20472: # 19 "./db/dbformat.h" 2 20472: 20472: 20472: # 1 "./include/rocksdb/filter_policy.h" 1 20472: # 20 "./include/rocksdb/filter_policy.h" 20472: 20472: 20472: # 1 "/usr/include/c++/10/stdlib.h" 1 3 20472: # 23 "./include/rocksdb/filter_policy.h" 2 20472: # 32 "./include/rocksdb/filter_policy.h" 20472: namespace rocksdb { 20472: 20472: class Slice; 20472: struct BlockBasedTableOptions; 20472: struct ConfigOptions; 20472: 20472: 20472: class FilterBitsBuilder { 20472: public: 20472: virtual ~FilterBitsBuilder() {} 20472: 20472: 20472: 20472: 20472: virtual void AddKey(const Slice& key) = 0; 20472: 20472: 20472: 20472: 20472: virtual Slice Finish(std::unique_ptr* buf) = 0; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual int CalculateNumEntry(const uint32_t ) { 20472: 20472: throw std::runtime_error("CalculateNumEntry not Implemented"); 20472: 20472: 20472: 20472: return 0; 20472: } 20472: 20472: 20472: 20472: }; 20472: 20472: 20472: 20472: class FilterBitsReader { 20472: public: 20472: virtual ~FilterBitsReader() {} 20472: 20472: 20472: virtual bool MayMatch(const Slice& entry) = 0; 20472: 20472: 20472: virtual void MayMatch(int num_keys, Slice** keys, bool* may_match) { 20472: for (int i = 0; i < num_keys; ++i) { 20472: may_match[i] = MayMatch(*keys[i]); 20472: } 20472: } 20472: }; 20472: 20472: 20472: 20472: 20472: struct FilterBuildingContext { 20472: 20472: FilterBuildingContext(const BlockBasedTableOptions& table_options); 20472: 20472: 20472: const BlockBasedTableOptions& table_options; 20472: 20472: 20472: std::string column_family_name; 20472: 20472: 20472: CompactionStyle compaction_style = kCompactionStyleLevel; 20472: 20472: 20472: 20472: int level_at_creation = -1; 20472: 20472: 20472: Logger* info_log = nullptr; 20472: }; 20472: # 127 "./include/rocksdb/filter_policy.h" 20472: class FilterPolicy { 20472: public: 20472: virtual ~FilterPolicy(); 20472: # 139 "./include/rocksdb/filter_policy.h" 20472: static Status CreateFromString(const ConfigOptions& config_options, 20472: const std::string& value, 20472: std::shared_ptr* result); 20472: 20472: 20472: 20472: 20472: 20472: virtual const char* Name() const = 0; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual void CreateFilter(const Slice* keys, int n, 20472: std::string* dst) const = 0; 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual bool KeyMayMatch(const Slice& key, const Slice& filter) const = 0; 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual FilterBitsBuilder* GetFilterBitsBuilder() const { return nullptr; } 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual FilterBitsBuilder* GetBuilderWithContext( 20472: const FilterBuildingContext&) const { 20472: return GetFilterBitsBuilder(); 20472: } 20472: 20472: 20472: 20472: 20472: virtual FilterBitsReader* GetFilterBitsReader( 20472: const Slice& ) const { 20472: return nullptr; 20472: } 20472: }; 20472: # 213 "./include/rocksdb/filter_policy.h" 20472: extern const FilterPolicy* NewBloomFilterPolicy( 20472: double bits_per_key, bool use_block_based_builder = false); 20472: } 20472: # 22 "./db/dbformat.h" 2 20472: 20472: # 1 "./include/rocksdb/slice_transform.h" 1 20472: # 15 "./include/rocksdb/slice_transform.h" 20472: 20472: 20472: 20472: 20472: 20472: 20472: namespace rocksdb { 20472: 20472: class Slice; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: class SliceTransform { 20472: public: 20472: virtual ~SliceTransform(){}; 20472: 20472: 20472: virtual const char* Name() const = 0; 20472: 20472: 20472: 20472: 20472: virtual Slice Transform(const Slice& key) const = 0; 20472: # 59 "./include/rocksdb/slice_transform.h" 20472: virtual bool InDomain(const Slice& key) const = 0; 20472: 20472: 20472: virtual bool InRange(const Slice& ) const { return false; } 20472: 20472: 20472: 20472: 20472: virtual bool FullLengthEnabled(size_t* ) const { return false; } 20472: # 92 "./include/rocksdb/slice_transform.h" 20472: virtual bool SameResultWhenAppended(const Slice& ) const { 20472: return false; 20472: } 20472: }; 20472: 20472: extern const SliceTransform* NewFixedPrefixTransform(size_t prefix_len); 20472: 20472: extern const SliceTransform* NewCappedPrefixTransform(size_t cap_len); 20472: 20472: extern const SliceTransform* NewNoopTransform(); 20472: 20472: } 20472: # 24 "./db/dbformat.h" 2 20472: # 1 "./include/rocksdb/table.h" 1 20472: # 19 "./include/rocksdb/table.h" 20472: 20472: # 31 "./include/rocksdb/table.h" 20472: namespace rocksdb { 20472: 20472: 20472: class FilterPolicy; 20472: class FlushBlockPolicyFactory; 20472: class PersistentCache; 20472: class RandomAccessFile; 20472: struct TableReaderOptions; 20472: struct TableBuilderOptions; 20472: class TableBuilder; 20472: class TableFactory; 20472: class TableReader; 20472: class WritableFileWriter; 20472: struct ConfigOptions; 20472: struct EnvOptions; 20472: 20472: enum ChecksumType : char { 20472: kNoChecksum = 0x0, 20472: kCRC32c = 0x1, 20472: kxxHash = 0x2, 20472: kxxHash64 = 0x3, 20472: }; 20472: 20472: 20472: struct BlockBasedTableOptions { 20472: 20472: 20472: 20472: 20472: 20472: std::shared_ptr flush_block_policy_factory; 20472: # 73 "./include/rocksdb/table.h" 20472: bool cache_index_and_filter_blocks = false; 20472: 20472: 20472: 20472: 20472: 20472: bool cache_index_and_filter_blocks_with_high_priority = true; 20472: 20472: 20472: 20472: 20472: 20472: bool pin_l0_filter_and_index_blocks_in_cache = false; 20472: 20472: 20472: 20472: 20472: 20472: 20472: bool pin_top_level_index_and_filter = true; 20472: 20472: 20472: enum IndexType : char { 20472: 20472: 20472: kBinarySearch = 0x00, 20472: 20472: 20472: 20472: kHashSearch = 0x01, 20472: 20472: 20472: kTwoLevelIndexSearch = 0x02, 20472: # 118 "./include/rocksdb/table.h" 20472: kBinarySearchWithFirstKey = 0x03, 20472: }; 20472: 20472: IndexType index_type = kBinarySearch; 20472: 20472: 20472: enum DataBlockIndexType : char { 20472: kDataBlockBinarySearch = 0, 20472: kDataBlockBinaryAndHash = 1, 20472: }; 20472: 20472: DataBlockIndexType data_block_index_type = kDataBlockBinarySearch; 20472: 20472: 20472: 20472: double data_block_hash_table_util_ratio = 0.75; 20472: 20472: 20472: 20472: bool hash_index_allow_collision = true; 20472: 20472: 20472: 20472: 20472: ChecksumType checksum = kCRC32c; 20472: 20472: 20472: 20472: 20472: bool no_block_cache = false; 20472: 20472: 20472: 20472: std::shared_ptr block_cache = nullptr; 20472: 20472: 20472: 20472: std::shared_ptr persistent_cache = nullptr; 20472: 20472: 20472: 20472: 20472: 20472: std::shared_ptr block_cache_compressed = nullptr; 20472: 20472: 20472: 20472: 20472: 20472: size_t block_size = 4 * 1024; 20472: 20472: 20472: 20472: 20472: 20472: 20472: int block_size_deviation = 10; 20472: 20472: 20472: 20472: 20472: 20472: int block_restart_interval = 16; 20472: 20472: 20472: int index_block_restart_interval = 1; 20472: # 194 "./include/rocksdb/table.h" 20472: uint64_t metadata_block_size = 4096; 20472: 20472: 20472: 20472: 20472: 20472: 20472: bool partition_filters = false; 20472: 20472: 20472: 20472: 20472: 20472: bool use_delta_encoding = true; 20472: 20472: 20472: 20472: 20472: std::shared_ptr filter_policy = nullptr; 20472: 20472: 20472: 20472: bool whole_key_filtering = true; 20472: 20472: 20472: 20472: 20472: bool verify_compression = false; 20472: # 244 "./include/rocksdb/table.h" 20472: uint32_t read_amp_bytes_per_bit = 0; 20472: # 272 "./include/rocksdb/table.h" 20472: uint32_t format_version = 4; 20472: 20472: 20472: 20472: 20472: bool enable_index_compression = true; 20472: 20472: 20472: bool block_align = false; 20472: # 304 "./include/rocksdb/table.h" 20472: enum class IndexShorteningMode : char { 20472: 20472: kNoShortening, 20472: 20472: 20472: kShortenSeparators, 20472: 20472: kShortenSeparatorsAndSuccessor, 20472: }; 20472: 20472: IndexShorteningMode index_shortening = 20472: IndexShorteningMode::kShortenSeparators; 20472: }; 20472: 20472: 20472: struct BlockBasedTablePropertyNames { 20472: 20472: static const std::string kIndexType; 20472: 20472: static const std::string kWholeKeyFiltering; 20472: 20472: static const std::string kPrefixFiltering; 20472: }; 20472: 20472: 20472: extern TableFactory* NewBlockBasedTableFactory( 20472: const BlockBasedTableOptions& table_options = BlockBasedTableOptions()); 20472: 20472: 20472: 20472: enum EncodingType : char { 20472: 20472: kPlain, 20472: # 348 "./include/rocksdb/table.h" 20472: kPrefix, 20472: }; 20472: 20472: 20472: struct PlainTablePropertyNames { 20472: static const std::string kEncodingType; 20472: static const std::string kBloomVersion; 20472: static const std::string kNumBloomBlocks; 20472: }; 20472: 20472: const uint32_t kPlainTableVariableLength = 0; 20472: 20472: struct PlainTableOptions { 20472: 20472: 20472: 20472: 20472: uint32_t user_key_len = kPlainTableVariableLength; 20472: 20472: 20472: 20472: int bloom_bits_per_key = 10; 20472: 20472: 20472: 20472: 20472: 20472: double hash_table_ratio = 0.75; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: size_t index_sparseness = 16; 20472: 20472: 20472: 20472: 20472: 20472: 20472: size_t huge_page_tlb_size = 0; 20472: # 400 "./include/rocksdb/table.h" 20472: EncodingType encoding_type = kPlain; 20472: 20472: 20472: 20472: bool full_scan_mode = false; 20472: 20472: 20472: 20472: 20472: bool store_index_in_file = false; 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern TableFactory* NewPlainTableFactory( 20472: const PlainTableOptions& options = PlainTableOptions()); 20472: 20472: struct CuckooTablePropertyNames { 20472: 20472: static const std::string kEmptyKey; 20472: 20472: static const std::string kValueLength; 20472: 20472: static const std::string kNumHashFunc; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: static const std::string kCuckooBlockSize; 20472: 20472: 20472: 20472: 20472: 20472: static const std::string kHashTableSize; 20472: 20472: 20472: static const std::string kIsLastLevel; 20472: 20472: static const std::string kIdentityAsFirstHash; 20472: 20472: static const std::string kUseModuleHash; 20472: 20472: static const std::string kUserKeyLength; 20472: }; 20472: 20472: struct CuckooTableOptions { 20472: 20472: 20472: double hash_table_ratio = 0.9; 20472: 20472: 20472: 20472: 20472: 20472: uint32_t max_search_depth = 100; 20472: 20472: 20472: 20472: 20472: 20472: uint32_t cuckoo_block_size = 5; 20472: 20472: 20472: 20472: 20472: bool identity_as_first_hash = false; 20472: 20472: 20472: 20472: 20472: 20472: bool use_module_hash = true; 20472: }; 20472: 20472: 20472: extern TableFactory* NewCuckooTableFactory( 20472: const CuckooTableOptions& table_options = CuckooTableOptions()); 20472: 20472: 20472: 20472: class RandomAccessFileReader; 20472: 20472: 20472: class TableFactory { 20472: public: 20472: virtual ~TableFactory() {} 20472: # 502 "./include/rocksdb/table.h" 20472: virtual const char* Name() const = 0; 20472: # 521 "./include/rocksdb/table.h" 20472: virtual Status NewTableReader( 20472: const TableReaderOptions& table_reader_options, 20472: std::unique_ptr&& file, uint64_t file_size, 20472: std::unique_ptr* table_reader, 20472: bool prefetch_index_and_filter_in_cache = true) const = 0; 20472: # 545 "./include/rocksdb/table.h" 20472: virtual TableBuilder* NewTableBuilder( 20472: const TableBuilderOptions& table_builder_options, 20472: uint32_t column_family_id, WritableFileWriter* file) const = 0; 20472: 20472: 20472: 20472: 20472: 20472: virtual Status SanitizeOptions(const DBOptions& db_opts, 20472: const ColumnFamilyOptions& cf_opts) const = 0; 20472: 20472: 20472: 20472: virtual std::string GetPrintableTableOptions() const = 0; 20472: 20472: virtual Status GetOptionString(const ConfigOptions& , 20472: std::string* ) const { 20472: return Status::NotSupported( 20472: "The table factory doesn't implement GetOptionString()."); 20472: } 20472: # 580 "./include/rocksdb/table.h" 20472: virtual void* GetOptions() { return nullptr; } 20472: 20472: 20472: virtual bool IsDeleteRangeSupported() const { return false; } 20472: }; 20472: # 596 "./include/rocksdb/table.h" 20472: extern TableFactory* NewAdaptiveTableFactory( 20472: std::shared_ptr table_factory_to_write = nullptr, 20472: std::shared_ptr block_based_table_factory = nullptr, 20472: std::shared_ptr plain_table_factory = nullptr, 20472: std::shared_ptr cuckoo_table_factory = nullptr); 20472: 20472: 20472: 20472: } 20472: # 25 "./db/dbformat.h" 2 20472: 20472: # 1 "./util/coding.h" 1 20472: # 16 "./util/coding.h" 20472: 20472: # 30 "./util/coding.h" 20472: namespace rocksdb { 20472: 20472: 20472: const unsigned int kMaxVarint64Length = 10; 20472: 20472: 20472: extern void PutFixed16(std::string* dst, uint16_t value); 20472: extern void PutFixed32(std::string* dst, uint32_t value); 20472: extern void PutFixed64(std::string* dst, uint64_t value); 20472: extern void PutVarint32(std::string* dst, uint32_t value); 20472: extern void PutVarint32Varint32(std::string* dst, uint32_t value1, 20472: uint32_t value2); 20472: extern void PutVarint32Varint32Varint32(std::string* dst, uint32_t value1, 20472: uint32_t value2, uint32_t value3); 20472: extern void PutVarint64(std::string* dst, uint64_t value); 20472: extern void PutVarint64Varint64(std::string* dst, uint64_t value1, 20472: uint64_t value2); 20472: extern void PutVarint32Varint64(std::string* dst, uint32_t value1, 20472: uint64_t value2); 20472: extern void PutVarint32Varint32Varint64(std::string* dst, uint32_t value1, 20472: uint32_t value2, uint64_t value3); 20472: extern void PutLengthPrefixedSlice(std::string* dst, const Slice& value); 20472: extern void PutLengthPrefixedSliceParts(std::string* dst, 20472: const SliceParts& slice_parts); 20472: extern void PutLengthPrefixedSlicePartsWithPadding( 20472: std::string* dst, const SliceParts& slice_parts, size_t pad_sz); 20472: 20472: 20472: 20472: extern bool GetFixed64(Slice* input, uint64_t* value); 20472: extern bool GetFixed32(Slice* input, uint32_t* value); 20472: extern bool GetFixed16(Slice* input, uint16_t* value); 20472: extern bool GetVarint32(Slice* input, uint32_t* value); 20472: extern bool GetVarint64(Slice* input, uint64_t* value); 20472: extern bool GetVarsignedint64(Slice* input, int64_t* value); 20472: extern bool GetLengthPrefixedSlice(Slice* input, Slice* result); 20472: 20472: extern Slice GetLengthPrefixedSlice(const char* data); 20472: 20472: extern Slice GetSliceUntil(Slice* slice, char delimiter); 20472: 20472: 20472: 20472: constexpr inline uint64_t i64ToZigzag(const int64_t l) { 20472: return (static_cast(l) << 1) ^ static_cast(l >> 63); 20472: } 20472: inline int64_t zigzagToI64(uint64_t n) { 20472: return (n >> 1) ^ -static_cast(n & 1); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: extern const char* GetVarint32Ptr(const char* p,const char* limit, uint32_t* v); 20472: extern const char* GetVarint64Ptr(const char* p,const char* limit, uint64_t* v); 20472: inline const char* GetVarsignedint64Ptr(const char* p, const char* limit, 20472: int64_t* value) { 20472: uint64_t u = 0; 20472: const char* ret = GetVarint64Ptr(p, limit, &u); 20472: *value = zigzagToI64(u); 20472: return ret; 20472: } 20472: 20472: 20472: extern int VarintLength(uint64_t v); 20472: 20472: 20472: 20472: extern void EncodeFixed16(char* dst, uint16_t value); 20472: extern void EncodeFixed32(char* dst, uint32_t value); 20472: extern void EncodeFixed64(char* dst, uint64_t value); 20472: 20472: 20472: 20472: 20472: extern char* EncodeVarint32(char* dst, uint32_t value); 20472: extern char* EncodeVarint64(char* dst, uint64_t value); 20472: 20472: 20472: 20472: 20472: inline uint16_t DecodeFixed16(const char* ptr) { 20472: if (port::kLittleEndian) { 20472: 20472: uint16_t result; 20472: memcpy(&result, ptr, sizeof(result)); 20472: return result; 20472: } else { 20472: return ((static_cast(static_cast(ptr[0]))) | 20472: (static_cast(static_cast(ptr[1])) << 8)); 20472: } 20472: } 20472: 20472: inline uint32_t DecodeFixed32(const char* ptr) { 20472: if (port::kLittleEndian) { 20472: 20472: uint32_t result; 20472: memcpy(&result, ptr, sizeof(result)); 20472: return result; 20472: } else { 20472: return ((static_cast(static_cast(ptr[0]))) 20472: | (static_cast(static_cast(ptr[1])) << 8) 20472: | (static_cast(static_cast(ptr[2])) << 16) 20472: | (static_cast(static_cast(ptr[3])) << 24)); 20472: } 20472: } 20472: 20472: inline uint64_t DecodeFixed64(const char* ptr) { 20472: if (port::kLittleEndian) { 20472: 20472: uint64_t result; 20472: memcpy(&result, ptr, sizeof(result)); 20472: return result; 20472: } else { 20472: uint64_t lo = DecodeFixed32(ptr); 20472: uint64_t hi = DecodeFixed32(ptr + 4); 20472: return (hi << 32) | lo; 20472: } 20472: } 20472: 20472: 20472: extern const char* GetVarint32PtrFallback(const char* p, 20472: const char* limit, 20472: uint32_t* value); 20472: inline const char* GetVarint32Ptr(const char* p, 20472: const char* limit, 20472: uint32_t* value) { 20472: if (p < limit) { 20472: uint32_t result = *(reinterpret_cast(p)); 20472: if ((result & 128) == 0) { 20472: *value = result; 20472: return p + 1; 20472: } 20472: } 20472: return GetVarint32PtrFallback(p, limit, value); 20472: } 20472: 20472: 20472: inline void EncodeFixed16(char* buf, uint16_t value) { 20472: if (port::kLittleEndian) { 20472: memcpy(buf, &value, sizeof(value)); 20472: } else { 20472: buf[0] = value & 0xff; 20472: buf[1] = (value >> 8) & 0xff; 20472: } 20472: } 20472: 20472: inline void EncodeFixed32(char* buf, uint32_t value) { 20472: if (port::kLittleEndian) { 20472: memcpy(buf, &value, sizeof(value)); 20472: } else { 20472: buf[0] = value & 0xff; 20472: buf[1] = (value >> 8) & 0xff; 20472: buf[2] = (value >> 16) & 0xff; 20472: buf[3] = (value >> 24) & 0xff; 20472: } 20472: } 20472: 20472: inline void EncodeFixed64(char* buf, uint64_t value) { 20472: if (port::kLittleEndian) { 20472: memcpy(buf, &value, sizeof(value)); 20472: } else { 20472: buf[0] = value & 0xff; 20472: buf[1] = (value >> 8) & 0xff; 20472: buf[2] = (value >> 16) & 0xff; 20472: buf[3] = (value >> 24) & 0xff; 20472: buf[4] = (value >> 32) & 0xff; 20472: buf[5] = (value >> 40) & 0xff; 20472: buf[6] = (value >> 48) & 0xff; 20472: buf[7] = (value >> 56) & 0xff; 20472: } 20472: } 20472: 20472: 20472: inline void PutFixed16(std::string* dst, uint16_t value) { 20472: if (port::kLittleEndian) { 20472: dst->append(const_cast(reinterpret_cast(&value)), 20472: sizeof(value)); 20472: } else { 20472: char buf[sizeof(value)]; 20472: EncodeFixed16(buf, value); 20472: dst->append(buf, sizeof(buf)); 20472: } 20472: } 20472: 20472: inline void PutFixed32(std::string* dst, uint32_t value) { 20472: if (port::kLittleEndian) { 20472: dst->append(const_cast(reinterpret_cast(&value)), 20472: sizeof(value)); 20472: } else { 20472: char buf[sizeof(value)]; 20472: EncodeFixed32(buf, value); 20472: dst->append(buf, sizeof(buf)); 20472: } 20472: } 20472: 20472: inline void PutFixed64(std::string* dst, uint64_t value) { 20472: if (port::kLittleEndian) { 20472: dst->append(const_cast(reinterpret_cast(&value)), 20472: sizeof(value)); 20472: } else { 20472: char buf[sizeof(value)]; 20472: EncodeFixed64(buf, value); 20472: dst->append(buf, sizeof(buf)); 20472: } 20472: } 20472: 20472: inline void PutVarint32(std::string* dst, uint32_t v) { 20472: char buf[5]; 20472: char* ptr = EncodeVarint32(buf, v); 20472: dst->append(buf, static_cast(ptr - buf)); 20472: } 20472: 20472: inline void PutVarint32Varint32(std::string* dst, uint32_t v1, uint32_t v2) { 20472: char buf[10]; 20472: char* ptr = EncodeVarint32(buf, v1); 20472: ptr = EncodeVarint32(ptr, v2); 20472: dst->append(buf, static_cast(ptr - buf)); 20472: } 20472: 20472: inline void PutVarint32Varint32Varint32(std::string* dst, uint32_t v1, 20472: uint32_t v2, uint32_t v3) { 20472: char buf[15]; 20472: char* ptr = EncodeVarint32(buf, v1); 20472: ptr = EncodeVarint32(ptr, v2); 20472: ptr = EncodeVarint32(ptr, v3); 20472: dst->append(buf, static_cast(ptr - buf)); 20472: } 20472: 20472: inline char* EncodeVarint64(char* dst, uint64_t v) { 20472: static const unsigned int B = 128; 20472: unsigned char* ptr = reinterpret_cast(dst); 20472: while (v >= B) { 20472: *(ptr++) = (v & (B - 1)) | B; 20472: v >>= 7; 20472: } 20472: *(ptr++) = static_cast(v); 20472: return reinterpret_cast(ptr); 20472: } 20472: 20472: inline void PutVarint64(std::string* dst, uint64_t v) { 20472: char buf[kMaxVarint64Length]; 20472: char* ptr = EncodeVarint64(buf, v); 20472: dst->append(buf, static_cast(ptr - buf)); 20472: } 20472: 20472: inline void PutVarsignedint64(std::string* dst, int64_t v) { 20472: char buf[kMaxVarint64Length]; 20472: 20472: char* ptr = EncodeVarint64(buf, i64ToZigzag(v)); 20472: dst->append(buf, static_cast(ptr - buf)); 20472: } 20472: 20472: inline void PutVarint64Varint64(std::string* dst, uint64_t v1, uint64_t v2) { 20472: char buf[20]; 20472: char* ptr = EncodeVarint64(buf, v1); 20472: ptr = EncodeVarint64(ptr, v2); 20472: dst->append(buf, static_cast(ptr - buf)); 20472: } 20472: 20472: inline void PutVarint32Varint64(std::string* dst, uint32_t v1, uint64_t v2) { 20472: char buf[15]; 20472: char* ptr = EncodeVarint32(buf, v1); 20472: ptr = EncodeVarint64(ptr, v2); 20472: dst->append(buf, static_cast(ptr - buf)); 20472: } 20472: 20472: inline void PutVarint32Varint32Varint64(std::string* dst, uint32_t v1, 20472: uint32_t v2, uint64_t v3) { 20472: char buf[20]; 20472: char* ptr = EncodeVarint32(buf, v1); 20472: ptr = EncodeVarint32(ptr, v2); 20472: ptr = EncodeVarint64(ptr, v3); 20472: dst->append(buf, static_cast(ptr - buf)); 20472: } 20472: 20472: inline void PutLengthPrefixedSlice(std::string* dst, const Slice& value) { 20472: PutVarint32(dst, static_cast(value.size())); 20472: dst->append(value.data(), value.size()); 20472: } 20472: 20472: inline void PutLengthPrefixedSliceParts(std::string* dst, size_t total_bytes, 20472: const SliceParts& slice_parts) { 20472: for (int i = 0; i < slice_parts.num_parts; ++i) { 20472: total_bytes += slice_parts.parts[i].size(); 20472: } 20472: PutVarint32(dst, static_cast(total_bytes)); 20472: for (int i = 0; i < slice_parts.num_parts; ++i) { 20472: dst->append(slice_parts.parts[i].data(), slice_parts.parts[i].size()); 20472: } 20472: } 20472: 20472: inline void PutLengthPrefixedSliceParts(std::string* dst, 20472: const SliceParts& slice_parts) { 20472: PutLengthPrefixedSliceParts(dst, 0, slice_parts); 20472: } 20472: 20472: inline void PutLengthPrefixedSlicePartsWithPadding( 20472: std::string* dst, const SliceParts& slice_parts, size_t pad_sz) { 20472: PutLengthPrefixedSliceParts(dst, pad_sz, slice_parts); 20472: dst->append(pad_sz, '\0'); 20472: } 20472: 20472: inline int VarintLength(uint64_t v) { 20472: int len = 1; 20472: while (v >= 128) { 20472: v >>= 7; 20472: len++; 20472: } 20472: return len; 20472: } 20472: 20472: inline bool GetFixed64(Slice* input, uint64_t* value) { 20472: if (input->size() < sizeof(uint64_t)) { 20472: return false; 20472: } 20472: *value = DecodeFixed64(input->data()); 20472: input->remove_prefix(sizeof(uint64_t)); 20472: return true; 20472: } 20472: 20472: inline bool GetFixed32(Slice* input, uint32_t* value) { 20472: if (input->size() < sizeof(uint32_t)) { 20472: return false; 20472: } 20472: *value = DecodeFixed32(input->data()); 20472: input->remove_prefix(sizeof(uint32_t)); 20472: return true; 20472: } 20472: 20472: inline bool GetFixed16(Slice* input, uint16_t* value) { 20472: if (input->size() < sizeof(uint16_t)) { 20472: return false; 20472: } 20472: *value = DecodeFixed16(input->data()); 20472: input->remove_prefix(sizeof(uint16_t)); 20472: return true; 20472: } 20472: 20472: inline bool GetVarint32(Slice* input, uint32_t* value) { 20472: const char* p = input->data(); 20472: const char* limit = p + input->size(); 20472: const char* q = GetVarint32Ptr(p, limit, value); 20472: if (q == nullptr) { 20472: return false; 20472: } else { 20472: *input = Slice(q, static_cast(limit - q)); 20472: return true; 20472: } 20472: } 20472: 20472: inline bool GetVarint64(Slice* input, uint64_t* value) { 20472: const char* p = input->data(); 20472: const char* limit = p + input->size(); 20472: const char* q = GetVarint64Ptr(p, limit, value); 20472: if (q == nullptr) { 20472: return false; 20472: } else { 20472: *input = Slice(q, static_cast(limit - q)); 20472: return true; 20472: } 20472: } 20472: 20472: inline bool GetVarsignedint64(Slice* input, int64_t* value) { 20472: const char* p = input->data(); 20472: const char* limit = p + input->size(); 20472: const char* q = GetVarsignedint64Ptr(p, limit, value); 20472: if (q == nullptr) { 20472: return false; 20472: } else { 20472: *input = Slice(q, static_cast(limit - q)); 20472: return true; 20472: } 20472: } 20472: 20472: 20472: 20472: 20472: template 20472: inline T EndianSwapValue(T v) { 20472: static_assert(std::is_integral::value, "non-integral type"); 20472: # 422 "./util/coding.h" 20472: if (sizeof(T) == 2) { 20472: return static_cast(__builtin_bswap16(static_cast(v))); 20472: } else if (sizeof(T) == 4) { 20472: return static_cast(__builtin_bswap32(static_cast(v))); 20472: } else if (sizeof(T) == 8) { 20472: return static_cast(__builtin_bswap64(static_cast(v))); 20472: } 20472: 20472: 20472: T ret_val = 0; 20472: for (size_t i = 0; i < sizeof(T); ++i) { 20472: ret_val |= ((v >> (8 * i)) & 0xff) << (8 * (sizeof(T) - 1 - i)); 20472: } 20472: return ret_val; 20472: } 20472: 20472: inline bool GetLengthPrefixedSlice(Slice* input, Slice* result) { 20472: uint32_t len = 0; 20472: if (GetVarint32(input, &len) && input->size() >= len) { 20472: *result = Slice(input->data(), len); 20472: input->remove_prefix(len); 20472: return true; 20472: } else { 20472: return false; 20472: } 20472: } 20472: 20472: inline Slice GetLengthPrefixedSlice(const char* data) { 20472: uint32_t len = 0; 20472: 20472: 20472: auto p = GetVarint32Ptr(data, data + 5 , &len); 20472: return Slice(p, len); 20472: } 20472: 20472: inline Slice GetSliceUntil(Slice* slice, char delimiter) { 20472: uint32_t len = 0; 20472: for (len = 0; len < slice->size() && slice->data()[len] != delimiter; ++len) { 20472: 20472: } 20472: 20472: Slice ret(slice->data(), len); 20472: slice->remove_prefix(len + ((len < slice->size()) ? 1 : 0)); 20472: return ret; 20472: } 20472: 20472: template 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: inline void PutUnaligned(T *memory, const T &value) { 20472: 20472: 20472: 20472: 20472: *memory = value; 20472: 20472: } 20472: 20472: template 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: inline void GetUnaligned(const T *memory, T *value) { 20472: 20472: 20472: 20472: 20472: *value = *memory; 20472: 20472: } 20472: 20472: } 20472: # 27 "./db/dbformat.h" 2 20472: # 1 "./util/user_comparator_wrapper.h" 1 20472: # 9 "./util/user_comparator_wrapper.h" 20472: 20472: 20472: 20472: 20472: 20472: namespace rocksdb { 20472: 20472: 20472: 20472: class UserComparatorWrapper final : public Comparator { 20472: public: 20472: explicit UserComparatorWrapper(const Comparator* const user_cmp) 20472: : Comparator(user_cmp->timestamp_size()), user_comparator_(user_cmp) {} 20472: 20472: ~UserComparatorWrapper() = default; 20472: 20472: const Comparator* user_comparator() const { return user_comparator_; } 20472: 20472: int Compare(const Slice& a, const Slice& b) const override { 20472: if (perf_level >= PerfLevel::kEnableCount) { perf_context.user_key_comparison_count += 1; }; 20472: return user_comparator_->Compare(a, b); 20472: } 20472: 20472: bool Equal(const Slice& a, const Slice& b) const override { 20472: if (perf_level >= PerfLevel::kEnableCount) { perf_context.user_key_comparison_count += 1; }; 20472: return user_comparator_->Equal(a, b); 20472: } 20472: 20472: const char* Name() const override { return user_comparator_->Name(); } 20472: 20472: void FindShortestSeparator(std::string* start, 20472: const Slice& limit) const override { 20472: return user_comparator_->FindShortestSeparator(start, limit); 20472: } 20472: 20472: void FindShortSuccessor(std::string* key) const override { 20472: return user_comparator_->FindShortSuccessor(key); 20472: } 20472: 20472: const Comparator* GetRootComparator() const override { 20472: return user_comparator_->GetRootComparator(); 20472: } 20472: 20472: bool IsSameLengthImmediateSuccessor(const Slice& s, 20472: const Slice& t) const override { 20472: return user_comparator_->IsSameLengthImmediateSuccessor(s, t); 20472: } 20472: 20472: bool CanKeysWithDifferentByteContentsBeEqual() const override { 20472: return user_comparator_->CanKeysWithDifferentByteContentsBeEqual(); 20472: } 20472: 20472: int CompareTimestamp(const Slice& ts1, const Slice& ts2) const override { 20472: return user_comparator_->CompareTimestamp(ts1, ts2); 20472: } 20472: 20472: using Comparator::CompareWithoutTimestamp; 20472: int CompareWithoutTimestamp(const Slice& a, bool a_has_ts, const Slice& b, 20472: bool b_has_ts) const override { 20472: if (perf_level >= PerfLevel::kEnableCount) { perf_context.user_key_comparison_count += 1; }; 20472: return user_comparator_->CompareWithoutTimestamp(a, a_has_ts, b, b_has_ts); 20472: } 20472: 20472: private: 20472: const Comparator* user_comparator_; 20472: }; 20472: 20472: } 20472: # 28 "./db/dbformat.h" 2 20472: 20472: namespace rocksdb { 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: class InternalKey; 20472: 20472: 20472: 20472: 20472: 20472: 20472: enum ValueType : unsigned char { 20472: kTypeDeletion = 0x0, 20472: kTypeValue = 0x1, 20472: kTypeMerge = 0x2, 20472: kTypeLogData = 0x3, 20472: kTypeColumnFamilyDeletion = 0x4, 20472: kTypeColumnFamilyValue = 0x5, 20472: kTypeColumnFamilyMerge = 0x6, 20472: kTypeSingleDeletion = 0x7, 20472: kTypeColumnFamilySingleDeletion = 0x8, 20472: kTypeBeginPrepareXID = 0x9, 20472: kTypeEndPrepareXID = 0xA, 20472: kTypeCommitXID = 0xB, 20472: kTypeRollbackXID = 0xC, 20472: kTypeNoop = 0xD, 20472: kTypeColumnFamilyRangeDeletion = 0xE, 20472: kTypeRangeDeletion = 0xF, 20472: kTypeColumnFamilyBlobIndex = 0x10, 20472: kTypeBlobIndex = 0x11, 20472: 20472: 20472: 20472: 20472: kTypeBeginPersistedPrepareXID = 0x12, 20472: 20472: 20472: 20472: kTypeBeginUnprepareXID = 0x13, 20472: kTypeDeletionWithTimestamp = 0x14, 20472: kMaxValue = 0x7F 20472: }; 20472: 20472: 20472: extern const ValueType kValueTypeForSeek; 20472: extern const ValueType kValueTypeForSeekForPrev; 20472: 20472: 20472: 20472: inline bool IsValueType(ValueType t) { 20472: return t <= kTypeMerge || t == kTypeSingleDeletion || t == kTypeBlobIndex || 20472: kTypeDeletionWithTimestamp == t; 20472: } 20472: 20472: 20472: 20472: inline bool IsExtendedValueType(ValueType t) { 20472: return IsValueType(t) || t == kTypeRangeDeletion; 20472: } 20472: 20472: 20472: 20472: static const SequenceNumber kMaxSequenceNumber = ((0x1ull << 56) - 1); 20472: 20472: static const SequenceNumber kDisableGlobalSequenceNumber = port::kMaxUint64; 20472: 20472: 20472: 20472: struct ParsedInternalKey { 20472: Slice user_key; 20472: SequenceNumber sequence; 20472: ValueType type; 20472: 20472: ParsedInternalKey() 20472: : sequence(kMaxSequenceNumber) 20472: {} 20472: 20472: ParsedInternalKey(const Slice& u, const SequenceNumber& seq, ValueType t) 20472: : user_key(u), sequence(seq), type(t) {} 20472: std::string DebugString(bool hex = false) const; 20472: 20472: void clear() { 20472: user_key.clear(); 20472: sequence = 0; 20472: type = kTypeDeletion; 20472: } 20472: }; 20472: 20472: 20472: inline size_t InternalKeyEncodingLength(const ParsedInternalKey& key) { 20472: return key.user_key.size() + 8; 20472: } 20472: 20472: 20472: extern uint64_t PackSequenceAndType(uint64_t seq, ValueType t); 20472: 20472: 20472: 20472: extern void UnPackSequenceAndType(uint64_t packed, uint64_t* seq, ValueType* t); 20472: 20472: EntryType GetEntryType(ValueType value_type); 20472: 20472: 20472: extern void AppendInternalKey(std::string* result, 20472: const ParsedInternalKey& key); 20472: 20472: 20472: 20472: extern void AppendInternalKeyWithDifferentTimestamp( 20472: std::string* result, const ParsedInternalKey& key, const Slice& ts); 20472: 20472: 20472: 20472: 20472: extern void AppendInternalKeyFooter(std::string* result, SequenceNumber s, 20472: ValueType t); 20472: 20472: 20472: 20472: 20472: 20472: extern bool ParseInternalKey(const Slice& internal_key, 20472: ParsedInternalKey* result); 20472: 20472: 20472: inline Slice ExtractUserKey(const Slice& internal_key) { 20472: 20472: # 159 "./db/dbformat.h" 3 4 20472: (static_cast ( 20472: # 159 "./db/dbformat.h" 20472: internal_key.size() >= 8 20472: # 159 "./db/dbformat.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 159 "./db/dbformat.h" 20472: "internal_key.size() >= 8" 20472: # 159 "./db/dbformat.h" 3 4 20472: , "./db/dbformat.h", 159, __extension__ __PRETTY_FUNCTION__)) 20472: # 159 "./db/dbformat.h" 20472: ; 20472: return Slice(internal_key.data(), internal_key.size() - 8); 20472: } 20472: 20472: inline Slice ExtractUserKeyAndStripTimestamp(const Slice& internal_key, 20472: size_t ts_sz) { 20472: 20472: # 165 "./db/dbformat.h" 3 4 20472: (static_cast ( 20472: # 165 "./db/dbformat.h" 20472: internal_key.size() >= 8 + ts_sz 20472: # 165 "./db/dbformat.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 165 "./db/dbformat.h" 20472: "internal_key.size() >= 8 + ts_sz" 20472: # 165 "./db/dbformat.h" 3 4 20472: , "./db/dbformat.h", 165, __extension__ __PRETTY_FUNCTION__)) 20472: # 165 "./db/dbformat.h" 20472: ; 20472: return Slice(internal_key.data(), internal_key.size() - 8 - ts_sz); 20472: } 20472: 20472: inline Slice StripTimestampFromUserKey(const Slice& user_key, size_t ts_sz) { 20472: 20472: # 170 "./db/dbformat.h" 3 4 20472: (static_cast ( 20472: # 170 "./db/dbformat.h" 20472: user_key.size() >= ts_sz 20472: # 170 "./db/dbformat.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 170 "./db/dbformat.h" 20472: "user_key.size() >= ts_sz" 20472: # 170 "./db/dbformat.h" 3 4 20472: , "./db/dbformat.h", 170, __extension__ __PRETTY_FUNCTION__)) 20472: # 170 "./db/dbformat.h" 20472: ; 20472: return Slice(user_key.data(), user_key.size() - ts_sz); 20472: } 20472: 20472: inline Slice ExtractTimestampFromUserKey(const Slice& user_key, size_t ts_sz) { 20472: 20472: # 175 "./db/dbformat.h" 3 4 20472: (static_cast ( 20472: # 175 "./db/dbformat.h" 20472: user_key.size() >= ts_sz 20472: # 175 "./db/dbformat.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 175 "./db/dbformat.h" 20472: "user_key.size() >= ts_sz" 20472: # 175 "./db/dbformat.h" 3 4 20472: , "./db/dbformat.h", 175, __extension__ __PRETTY_FUNCTION__)) 20472: # 175 "./db/dbformat.h" 20472: ; 20472: return Slice(user_key.data() + user_key.size() - ts_sz, ts_sz); 20472: } 20472: 20472: inline uint64_t ExtractInternalKeyFooter(const Slice& internal_key) { 20472: 20472: # 180 "./db/dbformat.h" 3 4 20472: (static_cast ( 20472: # 180 "./db/dbformat.h" 20472: internal_key.size() >= 8 20472: # 180 "./db/dbformat.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 180 "./db/dbformat.h" 20472: "internal_key.size() >= 8" 20472: # 180 "./db/dbformat.h" 3 4 20472: , "./db/dbformat.h", 180, __extension__ __PRETTY_FUNCTION__)) 20472: # 180 "./db/dbformat.h" 20472: ; 20472: const size_t n = internal_key.size(); 20472: return DecodeFixed64(internal_key.data() + n - 8); 20472: } 20472: 20472: inline ValueType ExtractValueType(const Slice& internal_key) { 20472: uint64_t num = ExtractInternalKeyFooter(internal_key); 20472: unsigned char c = num & 0xff; 20472: return static_cast(c); 20472: } 20472: 20472: 20472: 20472: class InternalKeyComparator 20472: 20472: 20472: 20472: : public Comparator { 20472: private: 20472: UserComparatorWrapper user_comparator_; 20472: std::string name_; 20472: 20472: public: 20472: explicit InternalKeyComparator(const Comparator* c) 20472: : Comparator(c->timestamp_size()), 20472: user_comparator_(c), 20472: name_("rocksdb.InternalKeyComparator:" + 20472: std::string(user_comparator_.Name())) {} 20472: virtual ~InternalKeyComparator() {} 20472: 20472: virtual const char* Name() const override; 20472: virtual int Compare(const Slice& a, const Slice& b) const override; 20472: 20472: virtual int CompareKeySeq(const Slice& a, const Slice& b) const; 20472: virtual void FindShortestSeparator(std::string* start, 20472: const Slice& limit) const override; 20472: virtual void FindShortSuccessor(std::string* key) const override; 20472: 20472: const Comparator* user_comparator() const { 20472: return user_comparator_.user_comparator(); 20472: } 20472: 20472: int Compare(const InternalKey& a, const InternalKey& b) const; 20472: int Compare(const ParsedInternalKey& a, const ParsedInternalKey& b) const; 20472: virtual const Comparator* GetRootComparator() const override { 20472: return user_comparator_.GetRootComparator(); 20472: } 20472: }; 20472: 20472: 20472: class InternalKey { 20472: private: 20472: std::string rep_; 20472: 20472: public: 20472: InternalKey() {} 20472: InternalKey(const Slice& _user_key, SequenceNumber s, ValueType t) { 20472: AppendInternalKey(&rep_, ParsedInternalKey(_user_key, s, t)); 20472: } 20472: 20472: 20472: 20472: void SetMaxPossibleForUserKey(const Slice& _user_key) { 20472: AppendInternalKey( 20472: &rep_, ParsedInternalKey(_user_key, 0, static_cast(0))); 20472: } 20472: 20472: 20472: 20472: void SetMinPossibleForUserKey(const Slice& _user_key) { 20472: AppendInternalKey(&rep_, ParsedInternalKey(_user_key, kMaxSequenceNumber, 20472: kValueTypeForSeek)); 20472: } 20472: 20472: bool Valid() const { 20472: ParsedInternalKey parsed; 20472: return ParseInternalKey(Slice(rep_), &parsed); 20472: } 20472: 20472: void DecodeFrom(const Slice& s) { rep_.assign(s.data(), s.size()); } 20472: Slice Encode() const { 20472: 20472: # 261 "./db/dbformat.h" 3 4 20472: (static_cast ( 20472: # 261 "./db/dbformat.h" 20472: !rep_.empty() 20472: # 261 "./db/dbformat.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 261 "./db/dbformat.h" 20472: "!rep_.empty()" 20472: # 261 "./db/dbformat.h" 3 4 20472: , "./db/dbformat.h", 261, __extension__ __PRETTY_FUNCTION__)) 20472: # 261 "./db/dbformat.h" 20472: ; 20472: return rep_; 20472: } 20472: 20472: Slice user_key() const { return ExtractUserKey(rep_); } 20472: size_t size() { return rep_.size(); } 20472: 20472: void Set(const Slice& _user_key, SequenceNumber s, ValueType t) { 20472: SetFrom(ParsedInternalKey(_user_key, s, t)); 20472: } 20472: 20472: void SetFrom(const ParsedInternalKey& p) { 20472: rep_.clear(); 20472: AppendInternalKey(&rep_, p); 20472: } 20472: 20472: void Clear() { rep_.clear(); } 20472: 20472: 20472: 20472: std::string* rep() { return &rep_; } 20472: 20472: 20472: 20472: void ConvertFromUserKey(SequenceNumber s, ValueType t) { 20472: AppendInternalKeyFooter(&rep_, s, t); 20472: } 20472: 20472: std::string DebugString(bool hex = false) const; 20472: }; 20472: 20472: inline int InternalKeyComparator::Compare(const InternalKey& a, 20472: const InternalKey& b) const { 20472: return Compare(a.Encode(), b.Encode()); 20472: } 20472: 20472: inline bool ParseInternalKey(const Slice& internal_key, 20472: ParsedInternalKey* result) { 20472: const size_t n = internal_key.size(); 20472: if (n < 8) return false; 20472: uint64_t num = DecodeFixed64(internal_key.data() + n - 8); 20472: unsigned char c = num & 0xff; 20472: result->sequence = num >> 8; 20472: result->type = static_cast(c); 20472: 20472: # 305 "./db/dbformat.h" 3 4 20472: (static_cast ( 20472: # 305 "./db/dbformat.h" 20472: result->type <= ValueType::kMaxValue 20472: # 305 "./db/dbformat.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 305 "./db/dbformat.h" 20472: "result->type <= ValueType::kMaxValue" 20472: # 305 "./db/dbformat.h" 3 4 20472: , "./db/dbformat.h", 305, __extension__ __PRETTY_FUNCTION__)) 20472: # 305 "./db/dbformat.h" 20472: ; 20472: result->user_key = Slice(internal_key.data(), n - 8); 20472: return IsExtendedValueType(result->type); 20472: } 20472: 20472: 20472: 20472: inline void UpdateInternalKey(std::string* ikey, uint64_t seq, ValueType t) { 20472: size_t ikey_sz = ikey->size(); 20472: 20472: # 314 "./db/dbformat.h" 3 4 20472: (static_cast ( 20472: # 314 "./db/dbformat.h" 20472: ikey_sz >= 8 20472: # 314 "./db/dbformat.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 314 "./db/dbformat.h" 20472: "ikey_sz >= 8" 20472: # 314 "./db/dbformat.h" 3 4 20472: , "./db/dbformat.h", 314, __extension__ __PRETTY_FUNCTION__)) 20472: # 314 "./db/dbformat.h" 20472: ; 20472: uint64_t newval = (seq << 8) | t; 20472: 20472: 20472: 20472: EncodeFixed64(&(*ikey)[ikey_sz - 8], newval); 20472: } 20472: 20472: 20472: inline uint64_t GetInternalKeySeqno(const Slice& internal_key) { 20472: const size_t n = internal_key.size(); 20472: 20472: # 325 "./db/dbformat.h" 3 4 20472: (static_cast ( 20472: # 325 "./db/dbformat.h" 20472: n >= 8 20472: # 325 "./db/dbformat.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 325 "./db/dbformat.h" 20472: "n >= 8" 20472: # 325 "./db/dbformat.h" 3 4 20472: , "./db/dbformat.h", 325, __extension__ __PRETTY_FUNCTION__)) 20472: # 325 "./db/dbformat.h" 20472: ; 20472: uint64_t num = DecodeFixed64(internal_key.data() + n - 8); 20472: return num >> 8; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: class IterKey { 20472: public: 20472: IterKey() 20472: : buf_(space_), 20472: key_(buf_), 20472: key_size_(0), 20472: buf_size_(sizeof(space_)), 20472: is_user_key_(true) {} 20472: 20472: IterKey(const IterKey&) = delete; 20472: void operator=(const IterKey&) = delete; 20472: 20472: ~IterKey() { ResetBuffer(); } 20472: 20472: 20472: void SetIsUserKey(bool is_user_key) { is_user_key_ = is_user_key; } 20472: 20472: 20472: Slice GetKey() const { return Slice(key_, key_size_); } 20472: 20472: Slice GetInternalKey() const { 20472: 20472: # 357 "./db/dbformat.h" 3 4 20472: (static_cast ( 20472: # 357 "./db/dbformat.h" 20472: !IsUserKey() 20472: # 357 "./db/dbformat.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 357 "./db/dbformat.h" 20472: "!IsUserKey()" 20472: # 357 "./db/dbformat.h" 3 4 20472: , "./db/dbformat.h", 357, __extension__ __PRETTY_FUNCTION__)) 20472: # 357 "./db/dbformat.h" 20472: ; 20472: return Slice(key_, key_size_); 20472: } 20472: 20472: Slice GetUserKey() const { 20472: if (IsUserKey()) { 20472: return Slice(key_, key_size_); 20472: } else { 20472: 20472: # 365 "./db/dbformat.h" 3 4 20472: (static_cast ( 20472: # 365 "./db/dbformat.h" 20472: key_size_ >= 8 20472: # 365 "./db/dbformat.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 365 "./db/dbformat.h" 20472: "key_size_ >= 8" 20472: # 365 "./db/dbformat.h" 3 4 20472: , "./db/dbformat.h", 365, __extension__ __PRETTY_FUNCTION__)) 20472: # 365 "./db/dbformat.h" 20472: ; 20472: return Slice(key_, key_size_ - 8); 20472: } 20472: } 20472: 20472: size_t Size() const { return key_size_; } 20472: 20472: void Clear() { key_size_ = 0; } 20472: 20472: 20472: 20472: 20472: 20472: void TrimAppend(const size_t shared_len, const char* non_shared_data, 20472: const size_t non_shared_len) { 20472: 20472: # 380 "./db/dbformat.h" 3 4 20472: (static_cast ( 20472: # 380 "./db/dbformat.h" 20472: shared_len <= key_size_ 20472: # 380 "./db/dbformat.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 380 "./db/dbformat.h" 20472: "shared_len <= key_size_" 20472: # 380 "./db/dbformat.h" 3 4 20472: , "./db/dbformat.h", 380, __extension__ __PRETTY_FUNCTION__)) 20472: # 380 "./db/dbformat.h" 20472: ; 20472: size_t total_size = shared_len + non_shared_len; 20472: 20472: if (IsKeyPinned() ) { 20472: 20472: EnlargeBufferIfNeeded(total_size); 20472: memcpy(buf_, key_, shared_len); 20472: } else if (total_size > buf_size_) { 20472: 20472: char* p = new char[total_size]; 20472: memcpy(p, key_, shared_len); 20472: 20472: if (buf_ != space_) { 20472: delete[] buf_; 20472: } 20472: 20472: buf_ = p; 20472: buf_size_ = total_size; 20472: } 20472: 20472: memcpy(buf_ + shared_len, non_shared_data, non_shared_len); 20472: key_ = buf_; 20472: key_size_ = total_size; 20472: } 20472: 20472: Slice SetKey(const Slice& key, bool copy = true) { 20472: 20472: return SetKeyImpl(key, copy); 20472: } 20472: 20472: Slice SetUserKey(const Slice& key, bool copy = true) { 20472: is_user_key_ = true; 20472: return SetKeyImpl(key, copy); 20472: } 20472: 20472: Slice SetInternalKey(const Slice& key, bool copy = true) { 20472: is_user_key_ = false; 20472: return SetKeyImpl(key, copy); 20472: } 20472: 20472: 20472: 20472: Slice SetInternalKey(const Slice& key, ParsedInternalKey* ikey) { 20472: size_t key_n = key.size(); 20472: 20472: # 424 "./db/dbformat.h" 3 4 20472: (static_cast ( 20472: # 424 "./db/dbformat.h" 20472: key_n >= 8 20472: # 424 "./db/dbformat.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 424 "./db/dbformat.h" 20472: "key_n >= 8" 20472: # 424 "./db/dbformat.h" 3 4 20472: , "./db/dbformat.h", 424, __extension__ __PRETTY_FUNCTION__)) 20472: # 424 "./db/dbformat.h" 20472: ; 20472: SetInternalKey(key); 20472: ikey->user_key = Slice(key_, key_n - 8); 20472: return Slice(key_, key_n); 20472: } 20472: 20472: 20472: void OwnKey() { 20472: 20472: # 432 "./db/dbformat.h" 3 4 20472: (static_cast ( 20472: # 432 "./db/dbformat.h" 20472: IsKeyPinned() == true 20472: # 432 "./db/dbformat.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 432 "./db/dbformat.h" 20472: "IsKeyPinned() == true" 20472: # 432 "./db/dbformat.h" 3 4 20472: , "./db/dbformat.h", 432, __extension__ __PRETTY_FUNCTION__)) 20472: # 432 "./db/dbformat.h" 20472: ; 20472: 20472: Reserve(key_size_); 20472: memcpy(buf_, key_, key_size_); 20472: key_ = buf_; 20472: } 20472: 20472: 20472: 20472: void UpdateInternalKey(uint64_t seq, ValueType t) { 20472: 20472: # 442 "./db/dbformat.h" 3 4 20472: (static_cast ( 20472: # 442 "./db/dbformat.h" 20472: !IsKeyPinned() 20472: # 442 "./db/dbformat.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 442 "./db/dbformat.h" 20472: "!IsKeyPinned()" 20472: # 442 "./db/dbformat.h" 3 4 20472: , "./db/dbformat.h", 442, __extension__ __PRETTY_FUNCTION__)) 20472: # 442 "./db/dbformat.h" 20472: ; 20472: 20472: # 443 "./db/dbformat.h" 3 4 20472: (static_cast ( 20472: # 443 "./db/dbformat.h" 20472: key_size_ >= 8 20472: # 443 "./db/dbformat.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 443 "./db/dbformat.h" 20472: "key_size_ >= 8" 20472: # 443 "./db/dbformat.h" 3 4 20472: , "./db/dbformat.h", 443, __extension__ __PRETTY_FUNCTION__)) 20472: # 443 "./db/dbformat.h" 20472: ; 20472: uint64_t newval = (seq << 8) | t; 20472: EncodeFixed64(&buf_[key_size_ - 8], newval); 20472: } 20472: 20472: bool IsKeyPinned() const { return (key_ != buf_); } 20472: 20472: void SetInternalKey(const Slice& key_prefix, const Slice& user_key, 20472: SequenceNumber s, 20472: ValueType value_type = kValueTypeForSeek, 20472: const Slice* ts = nullptr) { 20472: size_t psize = key_prefix.size(); 20472: size_t usize = user_key.size(); 20472: size_t ts_sz = (ts != nullptr ? ts->size() : 0); 20472: EnlargeBufferIfNeeded(psize + usize + sizeof(uint64_t) + ts_sz); 20472: if (psize > 0) { 20472: memcpy(buf_, key_prefix.data(), psize); 20472: } 20472: memcpy(buf_ + psize, user_key.data(), usize); 20472: if (ts) { 20472: memcpy(buf_ + psize + usize, ts->data(), ts_sz); 20472: } 20472: EncodeFixed64(buf_ + usize + psize + ts_sz, 20472: PackSequenceAndType(s, value_type)); 20472: 20472: key_ = buf_; 20472: key_size_ = psize + usize + sizeof(uint64_t) + ts_sz; 20472: is_user_key_ = false; 20472: } 20472: 20472: void SetInternalKey(const Slice& user_key, SequenceNumber s, 20472: ValueType value_type = kValueTypeForSeek, 20472: const Slice* ts = nullptr) { 20472: SetInternalKey(Slice(), user_key, s, value_type, ts); 20472: } 20472: 20472: void Reserve(size_t size) { 20472: EnlargeBufferIfNeeded(size); 20472: key_size_ = size; 20472: } 20472: 20472: void SetInternalKey(const ParsedInternalKey& parsed_key) { 20472: SetInternalKey(Slice(), parsed_key); 20472: } 20472: 20472: void SetInternalKey(const Slice& key_prefix, 20472: const ParsedInternalKey& parsed_key_suffix) { 20472: SetInternalKey(key_prefix, parsed_key_suffix.user_key, 20472: parsed_key_suffix.sequence, parsed_key_suffix.type); 20472: } 20472: 20472: void EncodeLengthPrefixedKey(const Slice& key) { 20472: auto size = key.size(); 20472: EnlargeBufferIfNeeded(size + static_cast(VarintLength(size))); 20472: char* ptr = EncodeVarint32(buf_, static_cast(size)); 20472: memcpy(ptr, key.data(), size); 20472: key_ = buf_; 20472: is_user_key_ = true; 20472: } 20472: 20472: bool IsUserKey() const { return is_user_key_; } 20472: 20472: private: 20472: char* buf_; 20472: const char* key_; 20472: size_t key_size_; 20472: size_t buf_size_; 20472: char space_[32]; 20472: bool is_user_key_; 20472: 20472: Slice SetKeyImpl(const Slice& key, bool copy) { 20472: size_t size = key.size(); 20472: if (copy) { 20472: 20472: EnlargeBufferIfNeeded(size); 20472: memcpy(buf_, key.data(), size); 20472: key_ = buf_; 20472: } else { 20472: 20472: key_ = key.data(); 20472: } 20472: key_size_ = size; 20472: return Slice(key_, key_size_); 20472: } 20472: 20472: void ResetBuffer() { 20472: if (buf_ != space_) { 20472: delete[] buf_; 20472: buf_ = space_; 20472: } 20472: buf_size_ = sizeof(space_); 20472: key_size_ = 0; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: void EnlargeBufferIfNeeded(size_t key_size) { 20472: 20472: 20472: if (key_size > buf_size_) { 20472: EnlargeBuffer(key_size); 20472: } 20472: } 20472: 20472: void EnlargeBuffer(size_t key_size); 20472: }; 20472: 20472: 20472: 20472: class InternalKeySliceTransform : public SliceTransform { 20472: public: 20472: explicit InternalKeySliceTransform(const SliceTransform* transform) 20472: : transform_(transform) {} 20472: 20472: virtual const char* Name() const override { return transform_->Name(); } 20472: 20472: virtual Slice Transform(const Slice& src) const override { 20472: auto user_key = ExtractUserKey(src); 20472: return transform_->Transform(user_key); 20472: } 20472: 20472: virtual bool InDomain(const Slice& src) const override { 20472: auto user_key = ExtractUserKey(src); 20472: return transform_->InDomain(user_key); 20472: } 20472: 20472: virtual bool InRange(const Slice& dst) const override { 20472: auto user_key = ExtractUserKey(dst); 20472: return transform_->InRange(user_key); 20472: } 20472: 20472: const SliceTransform* user_prefix_extractor() const { return transform_; } 20472: 20472: private: 20472: 20472: 20472: const SliceTransform* const transform_; 20472: }; 20472: 20472: 20472: 20472: 20472: extern bool ReadKeyFromWriteBatchEntry(Slice* input, Slice* key, 20472: bool cf_record); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern Status ReadRecordFromWriteBatch(Slice* input, char* tag, 20472: uint32_t* column_family, Slice* key, 20472: Slice* value, Slice* blob, Slice* xid); 20472: 20472: 20472: 20472: 20472: 20472: struct RangeTombstone { 20472: Slice start_key_; 20472: Slice end_key_; 20472: SequenceNumber seq_; 20472: RangeTombstone() = default; 20472: RangeTombstone(Slice sk, Slice ek, SequenceNumber sn) 20472: : start_key_(sk), end_key_(ek), seq_(sn) {} 20472: 20472: RangeTombstone(ParsedInternalKey parsed_key, Slice value) { 20472: start_key_ = parsed_key.user_key; 20472: seq_ = parsed_key.sequence; 20472: end_key_ = value; 20472: } 20472: 20472: 20472: std::pair Serialize() const { 20472: auto key = InternalKey(start_key_, seq_, kTypeRangeDeletion); 20472: Slice value = end_key_; 20472: return std::make_pair(std::move(key), std::move(value)); 20472: } 20472: 20472: 20472: InternalKey SerializeKey() const { 20472: return InternalKey(start_key_, seq_, kTypeRangeDeletion); 20472: } 20472: # 637 "./db/dbformat.h" 20472: InternalKey SerializeEndKey() const { 20472: return InternalKey(end_key_, kMaxSequenceNumber, kTypeRangeDeletion); 20472: } 20472: }; 20472: 20472: inline int InternalKeyComparator::Compare(const Slice& akey, 20472: const Slice& bkey) const { 20472: 20472: 20472: 20472: 20472: int r = user_comparator_.Compare(ExtractUserKey(akey), ExtractUserKey(bkey)); 20472: if (r == 0) { 20472: const uint64_t anum = DecodeFixed64(akey.data() + akey.size() - 8); 20472: const uint64_t bnum = DecodeFixed64(bkey.data() + bkey.size() - 8); 20472: if (anum > bnum) { 20472: r = -1; 20472: } else if (anum < bnum) { 20472: r = +1; 20472: } 20472: } 20472: return r; 20472: } 20472: 20472: inline int InternalKeyComparator::CompareKeySeq(const Slice& akey, 20472: const Slice& bkey) const { 20472: 20472: 20472: 20472: int r = user_comparator_.Compare(ExtractUserKey(akey), ExtractUserKey(bkey)); 20472: if (r == 0) { 20472: 20472: const uint64_t anum = DecodeFixed64(akey.data() + akey.size() - 8) >> 8; 20472: const uint64_t bnum = DecodeFixed64(bkey.data() + bkey.size() - 8) >> 8; 20472: if (anum > bnum) { 20472: r = -1; 20472: } else if (anum < bnum) { 20472: r = +1; 20472: } 20472: } 20472: return r; 20472: } 20472: 20472: 20472: struct ParsedInternalKeyComparator { 20472: explicit ParsedInternalKeyComparator(const InternalKeyComparator* c) 20472: : cmp(c) {} 20472: 20472: bool operator()(const ParsedInternalKey& a, 20472: const ParsedInternalKey& b) const { 20472: return cmp->Compare(a, b) < 0; 20472: } 20472: 20472: const InternalKeyComparator* cmp; 20472: }; 20472: 20472: } 20472: # 19 "./db/memtable.h" 2 20472: # 1 "./db/range_tombstone_fragmenter.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "/usr/include/c++/10/list" 1 3 20472: # 58 "/usr/include/c++/10/list" 3 20472: 20472: # 59 "/usr/include/c++/10/list" 3 20472: 20472: 20472: 20472: 20472: # 1 "/usr/include/c++/10/bits/stl_list.h" 1 3 20472: # 67 "/usr/include/c++/10/bits/stl_list.h" 3 20472: 20472: # 67 "/usr/include/c++/10/bits/stl_list.h" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: namespace __detail 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: struct _List_node_base 20472: { 20472: _List_node_base* _M_next; 20472: _List_node_base* _M_prev; 20472: 20472: static void 20472: swap(_List_node_base& __x, _List_node_base& __y) noexcept; 20472: 20472: void 20472: _M_transfer(_List_node_base* const __first, 20472: _List_node_base* const __last) noexcept; 20472: 20472: void 20472: _M_reverse() noexcept; 20472: 20472: void 20472: _M_hook(_List_node_base* const __position) noexcept; 20472: 20472: void 20472: _M_unhook() noexcept; 20472: }; 20472: 20472: 20472: struct _List_node_header : public _List_node_base 20472: { 20472: 20472: std::size_t _M_size; 20472: 20472: 20472: _List_node_header() noexcept 20472: { _M_init(); } 20472: 20472: 20472: _List_node_header(_List_node_header&& __x) noexcept 20472: : _List_node_base{ __x._M_next, __x._M_prev } 20472: 20472: , _M_size(__x._M_size) 20472: 20472: { 20472: if (__x._M_base()->_M_next == __x._M_base()) 20472: this->_M_next = this->_M_prev = this; 20472: else 20472: { 20472: this->_M_next->_M_prev = this->_M_prev->_M_next = this->_M_base(); 20472: __x._M_init(); 20472: } 20472: } 20472: 20472: void 20472: _M_move_nodes(_List_node_header&& __x) 20472: { 20472: _List_node_base* const __xnode = __x._M_base(); 20472: if (__xnode->_M_next == __xnode) 20472: _M_init(); 20472: else 20472: { 20472: _List_node_base* const __node = this->_M_base(); 20472: __node->_M_next = __xnode->_M_next; 20472: __node->_M_prev = __xnode->_M_prev; 20472: __node->_M_next->_M_prev = __node->_M_prev->_M_next = __node; 20472: 20472: _M_size = __x._M_size; 20472: 20472: __x._M_init(); 20472: } 20472: } 20472: 20472: 20472: void 20472: _M_init() noexcept 20472: { 20472: this->_M_next = this->_M_prev = this; 20472: 20472: this->_M_size = 0; 20472: 20472: } 20472: 20472: private: 20472: _List_node_base* _M_base() { return this; } 20472: }; 20472: } 20472: 20472: 20472: 20472: 20472: template 20472: struct _List_node : public __detail::_List_node_base 20472: { 20472: 20472: __gnu_cxx::__aligned_membuf<_Tp> _M_storage; 20472: _Tp* _M_valptr() { return _M_storage._M_ptr(); } 20472: _Tp const* _M_valptr() const { return _M_storage._M_ptr(); } 20472: 20472: 20472: 20472: 20472: 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct _List_iterator 20472: { 20472: typedef _List_iterator<_Tp> _Self; 20472: typedef _List_node<_Tp> _Node; 20472: 20472: typedef ptrdiff_t difference_type; 20472: typedef std::bidirectional_iterator_tag iterator_category; 20472: typedef _Tp value_type; 20472: typedef _Tp* pointer; 20472: typedef _Tp& reference; 20472: 20472: _List_iterator() noexcept 20472: : _M_node() { } 20472: 20472: explicit 20472: _List_iterator(__detail::_List_node_base* __x) noexcept 20472: : _M_node(__x) { } 20472: 20472: _Self 20472: _M_const_cast() const noexcept 20472: { return *this; } 20472: 20472: 20472: reference 20472: operator*() const noexcept 20472: { return *static_cast<_Node*>(_M_node)->_M_valptr(); } 20472: 20472: pointer 20472: operator->() const noexcept 20472: { return static_cast<_Node*>(_M_node)->_M_valptr(); } 20472: 20472: _Self& 20472: operator++() noexcept 20472: { 20472: _M_node = _M_node->_M_next; 20472: return *this; 20472: } 20472: 20472: _Self 20472: operator++(int) noexcept 20472: { 20472: _Self __tmp = *this; 20472: _M_node = _M_node->_M_next; 20472: return __tmp; 20472: } 20472: 20472: _Self& 20472: operator--() noexcept 20472: { 20472: _M_node = _M_node->_M_prev; 20472: return *this; 20472: } 20472: 20472: _Self 20472: operator--(int) noexcept 20472: { 20472: _Self __tmp = *this; 20472: _M_node = _M_node->_M_prev; 20472: return __tmp; 20472: } 20472: 20472: friend bool 20472: operator==(const _Self& __x, const _Self& __y) noexcept 20472: { return __x._M_node == __y._M_node; } 20472: 20472: 20472: friend bool 20472: operator!=(const _Self& __x, const _Self& __y) noexcept 20472: { return __x._M_node != __y._M_node; } 20472: 20472: 20472: 20472: __detail::_List_node_base* _M_node; 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: struct _List_const_iterator 20472: { 20472: typedef _List_const_iterator<_Tp> _Self; 20472: typedef const _List_node<_Tp> _Node; 20472: typedef _List_iterator<_Tp> iterator; 20472: 20472: typedef ptrdiff_t difference_type; 20472: typedef std::bidirectional_iterator_tag iterator_category; 20472: typedef _Tp value_type; 20472: typedef const _Tp* pointer; 20472: typedef const _Tp& reference; 20472: 20472: _List_const_iterator() noexcept 20472: : _M_node() { } 20472: 20472: explicit 20472: _List_const_iterator(const __detail::_List_node_base* __x) 20472: noexcept 20472: : _M_node(__x) { } 20472: 20472: _List_const_iterator(const iterator& __x) noexcept 20472: : _M_node(__x._M_node) { } 20472: 20472: iterator 20472: _M_const_cast() const noexcept 20472: { return iterator(const_cast<__detail::_List_node_base*>(_M_node)); } 20472: 20472: 20472: reference 20472: operator*() const noexcept 20472: { return *static_cast<_Node*>(_M_node)->_M_valptr(); } 20472: 20472: pointer 20472: operator->() const noexcept 20472: { return static_cast<_Node*>(_M_node)->_M_valptr(); } 20472: 20472: _Self& 20472: operator++() noexcept 20472: { 20472: _M_node = _M_node->_M_next; 20472: return *this; 20472: } 20472: 20472: _Self 20472: operator++(int) noexcept 20472: { 20472: _Self __tmp = *this; 20472: _M_node = _M_node->_M_next; 20472: return __tmp; 20472: } 20472: 20472: _Self& 20472: operator--() noexcept 20472: { 20472: _M_node = _M_node->_M_prev; 20472: return *this; 20472: } 20472: 20472: _Self 20472: operator--(int) noexcept 20472: { 20472: _Self __tmp = *this; 20472: _M_node = _M_node->_M_prev; 20472: return __tmp; 20472: } 20472: 20472: friend bool 20472: operator==(const _Self& __x, const _Self& __y) noexcept 20472: { return __x._M_node == __y._M_node; } 20472: 20472: 20472: friend bool 20472: operator!=(const _Self& __x, const _Self& __y) noexcept 20472: { return __x._M_node != __y._M_node; } 20472: 20472: 20472: 20472: const __detail::_List_node_base* _M_node; 20472: }; 20472: 20472: namespace __cxx11 { 20472: 20472: template 20472: class _List_base 20472: { 20472: protected: 20472: typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template 20472: rebind<_Tp>::other _Tp_alloc_type; 20472: typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Tp_alloc_traits; 20472: typedef typename _Tp_alloc_traits::template 20472: rebind<_List_node<_Tp> >::other _Node_alloc_type; 20472: typedef __gnu_cxx::__alloc_traits<_Node_alloc_type> _Node_alloc_traits; 20472: 20472: 20472: static size_t 20472: _S_distance(const __detail::_List_node_base* __first, 20472: const __detail::_List_node_base* __last) 20472: { 20472: size_t __n = 0; 20472: while (__first != __last) 20472: { 20472: __first = __first->_M_next; 20472: ++__n; 20472: } 20472: return __n; 20472: } 20472: 20472: 20472: struct _List_impl 20472: : public _Node_alloc_type 20472: { 20472: __detail::_List_node_header _M_node; 20472: 20472: _List_impl() noexcept(is_nothrow_default_constructible<_Node_alloc_type>::value) 20472: 20472: : _Node_alloc_type() 20472: { } 20472: 20472: _List_impl(const _Node_alloc_type& __a) noexcept 20472: : _Node_alloc_type(__a) 20472: { } 20472: 20472: 20472: _List_impl(_List_impl&&) = default; 20472: 20472: _List_impl(_Node_alloc_type&& __a, _List_impl&& __x) 20472: : _Node_alloc_type(std::move(__a)), _M_node(std::move(__x._M_node)) 20472: { } 20472: 20472: _List_impl(_Node_alloc_type&& __a) noexcept 20472: : _Node_alloc_type(std::move(__a)) 20472: { } 20472: 20472: }; 20472: 20472: _List_impl _M_impl; 20472: 20472: 20472: size_t _M_get_size() const { return _M_impl._M_node._M_size; } 20472: 20472: void _M_set_size(size_t __n) { _M_impl._M_node._M_size = __n; } 20472: 20472: void _M_inc_size(size_t __n) { _M_impl._M_node._M_size += __n; } 20472: 20472: void _M_dec_size(size_t __n) { _M_impl._M_node._M_size -= __n; } 20472: 20472: 20472: size_t 20472: _M_distance(const __detail::_List_node_base* __first, 20472: const __detail::_List_node_base* __last) const 20472: { return _S_distance(__first, __last); } 20472: 20472: 20472: size_t _M_node_count() const { return _M_get_size(); } 20472: # 440 "/usr/include/c++/10/bits/stl_list.h" 3 20472: typename _Node_alloc_traits::pointer 20472: _M_get_node() 20472: { return _Node_alloc_traits::allocate(_M_impl, 1); } 20472: 20472: void 20472: _M_put_node(typename _Node_alloc_traits::pointer __p) noexcept 20472: { _Node_alloc_traits::deallocate(_M_impl, __p, 1); } 20472: 20472: public: 20472: typedef _Alloc allocator_type; 20472: 20472: _Node_alloc_type& 20472: _M_get_Node_allocator() noexcept 20472: { return _M_impl; } 20472: 20472: const _Node_alloc_type& 20472: _M_get_Node_allocator() const noexcept 20472: { return _M_impl; } 20472: 20472: 20472: _List_base() = default; 20472: 20472: 20472: 20472: 20472: _List_base(const _Node_alloc_type& __a) noexcept 20472: : _M_impl(__a) 20472: { } 20472: 20472: 20472: _List_base(_List_base&&) = default; 20472: 20472: 20472: _List_base(_List_base&& __x, _Node_alloc_type&& __a) 20472: : _M_impl(std::move(__a)) 20472: { 20472: if (__x._M_get_Node_allocator() == _M_get_Node_allocator()) 20472: _M_move_nodes(std::move(__x)); 20472: 20472: } 20472: 20472: 20472: 20472: _List_base(_Node_alloc_type&& __a, _List_base&& __x) 20472: : _M_impl(std::move(__a), std::move(__x._M_impl)) 20472: { } 20472: 20472: 20472: _List_base(_Node_alloc_type&& __a) 20472: : _M_impl(std::move(__a)) 20472: { } 20472: 20472: void 20472: _M_move_nodes(_List_base&& __x) 20472: { _M_impl._M_node._M_move_nodes(std::move(__x._M_impl._M_node)); } 20472: 20472: 20472: 20472: ~_List_base() noexcept 20472: { _M_clear(); } 20472: 20472: void 20472: _M_clear() noexcept; 20472: 20472: void 20472: _M_init() noexcept 20472: { this->_M_impl._M_node._M_init(); } 20472: }; 20472: # 555 "/usr/include/c++/10/bits/stl_list.h" 3 20472: template > 20472: class list : protected _List_base<_Tp, _Alloc> 20472: { 20472: # 568 "/usr/include/c++/10/bits/stl_list.h" 3 20472: static_assert(is_same::type, _Tp>::value, 20472: "std::list must have a non-const, non-volatile value_type"); 20472: 20472: static_assert(is_same::value, 20472: "std::list must have the same value_type as its allocator"); 20472: 20472: 20472: 20472: typedef _List_base<_Tp, _Alloc> _Base; 20472: typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; 20472: typedef typename _Base::_Tp_alloc_traits _Tp_alloc_traits; 20472: typedef typename _Base::_Node_alloc_type _Node_alloc_type; 20472: typedef typename _Base::_Node_alloc_traits _Node_alloc_traits; 20472: 20472: public: 20472: typedef _Tp value_type; 20472: typedef typename _Tp_alloc_traits::pointer pointer; 20472: typedef typename _Tp_alloc_traits::const_pointer const_pointer; 20472: typedef typename _Tp_alloc_traits::reference reference; 20472: typedef typename _Tp_alloc_traits::const_reference const_reference; 20472: typedef _List_iterator<_Tp> iterator; 20472: typedef _List_const_iterator<_Tp> const_iterator; 20472: typedef std::reverse_iterator const_reverse_iterator; 20472: typedef std::reverse_iterator reverse_iterator; 20472: typedef size_t size_type; 20472: typedef ptrdiff_t difference_type; 20472: typedef _Alloc allocator_type; 20472: 20472: protected: 20472: 20472: 20472: typedef _List_node<_Tp> _Node; 20472: 20472: using _Base::_M_impl; 20472: using _Base::_M_put_node; 20472: using _Base::_M_get_node; 20472: using _Base::_M_get_Node_allocator; 20472: # 630 "/usr/include/c++/10/bits/stl_list.h" 3 20472: template 20472: _Node* 20472: _M_create_node(_Args&&... __args) 20472: { 20472: auto __p = this->_M_get_node(); 20472: auto& __alloc = _M_get_Node_allocator(); 20472: __allocated_ptr<_Node_alloc_type> __guard{__alloc, __p}; 20472: _Node_alloc_traits::construct(__alloc, __p->_M_valptr(), 20472: std::forward<_Args>(__args)...); 20472: __guard = nullptr; 20472: return __p; 20472: } 20472: 20472: 20472: 20472: static size_t 20472: _S_distance(const_iterator __first, const_iterator __last) 20472: { return std::distance(__first, __last); } 20472: 20472: 20472: size_t 20472: _M_node_count() const 20472: { return this->_M_get_size(); } 20472: # 665 "/usr/include/c++/10/bits/stl_list.h" 3 20472: public: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: list() = default; 20472: # 682 "/usr/include/c++/10/bits/stl_list.h" 3 20472: explicit 20472: list(const allocator_type& __a) noexcept 20472: : _Base(_Node_alloc_type(__a)) { } 20472: # 695 "/usr/include/c++/10/bits/stl_list.h" 3 20472: explicit 20472: list(size_type __n, const allocator_type& __a = allocator_type()) 20472: : _Base(_Node_alloc_type(__a)) 20472: { _M_default_initialize(__n); } 20472: # 708 "/usr/include/c++/10/bits/stl_list.h" 3 20472: list(size_type __n, const value_type& __value, 20472: const allocator_type& __a = allocator_type()) 20472: : _Base(_Node_alloc_type(__a)) 20472: { _M_fill_initialize(__n, __value); } 20472: # 735 "/usr/include/c++/10/bits/stl_list.h" 3 20472: list(const list& __x) 20472: : _Base(_Node_alloc_traits:: 20472: _S_select_on_copy(__x._M_get_Node_allocator())) 20472: { _M_initialize_dispatch(__x.begin(), __x.end(), __false_type()); } 20472: # 748 "/usr/include/c++/10/bits/stl_list.h" 3 20472: list(list&&) = default; 20472: # 758 "/usr/include/c++/10/bits/stl_list.h" 3 20472: list(initializer_list __l, 20472: const allocator_type& __a = allocator_type()) 20472: : _Base(_Node_alloc_type(__a)) 20472: { _M_initialize_dispatch(__l.begin(), __l.end(), __false_type()); } 20472: 20472: list(const list& __x, const allocator_type& __a) 20472: : _Base(_Node_alloc_type(__a)) 20472: { _M_initialize_dispatch(__x.begin(), __x.end(), __false_type()); } 20472: 20472: private: 20472: list(list&& __x, const allocator_type& __a, true_type) noexcept 20472: : _Base(_Node_alloc_type(__a), std::move(__x)) 20472: { } 20472: 20472: list(list&& __x, const allocator_type& __a, false_type) 20472: : _Base(_Node_alloc_type(__a)) 20472: { 20472: if (__x._M_get_Node_allocator() == this->_M_get_Node_allocator()) 20472: this->_M_move_nodes(std::move(__x)); 20472: else 20472: insert(begin(), std::__make_move_if_noexcept_iterator(__x.begin()), 20472: std::__make_move_if_noexcept_iterator(__x.end())); 20472: } 20472: 20472: public: 20472: list(list&& __x, const allocator_type& __a) 20472: noexcept(_Node_alloc_traits::_S_always_equal()) 20472: : list(std::move(__x), __a, 20472: typename _Node_alloc_traits::is_always_equal{}) 20472: { } 20472: # 801 "/usr/include/c++/10/bits/stl_list.h" 3 20472: template> 20472: list(_InputIterator __first, _InputIterator __last, 20472: const allocator_type& __a = allocator_type()) 20472: : _Base(_Node_alloc_type(__a)) 20472: { _M_initialize_dispatch(__first, __last, __false_type()); } 20472: # 827 "/usr/include/c++/10/bits/stl_list.h" 3 20472: ~list() = default; 20472: # 838 "/usr/include/c++/10/bits/stl_list.h" 3 20472: list& 20472: operator=(const list& __x); 20472: # 852 "/usr/include/c++/10/bits/stl_list.h" 3 20472: list& 20472: operator=(list&& __x) 20472: noexcept(_Node_alloc_traits::_S_nothrow_move()) 20472: { 20472: constexpr bool __move_storage = 20472: _Node_alloc_traits::_S_propagate_on_move_assign() 20472: || _Node_alloc_traits::_S_always_equal(); 20472: _M_move_assign(std::move(__x), __bool_constant<__move_storage>()); 20472: return *this; 20472: } 20472: # 870 "/usr/include/c++/10/bits/stl_list.h" 3 20472: list& 20472: operator=(initializer_list __l) 20472: { 20472: this->assign(__l.begin(), __l.end()); 20472: return *this; 20472: } 20472: # 888 "/usr/include/c++/10/bits/stl_list.h" 3 20472: void 20472: assign(size_type __n, const value_type& __val) 20472: { _M_fill_assign(__n, __val); } 20472: # 905 "/usr/include/c++/10/bits/stl_list.h" 3 20472: template> 20472: void 20472: assign(_InputIterator __first, _InputIterator __last) 20472: { _M_assign_dispatch(__first, __last, __false_type()); } 20472: # 929 "/usr/include/c++/10/bits/stl_list.h" 3 20472: void 20472: assign(initializer_list __l) 20472: { this->_M_assign_dispatch(__l.begin(), __l.end(), __false_type()); } 20472: 20472: 20472: 20472: allocator_type 20472: get_allocator() const noexcept 20472: { return allocator_type(_Base::_M_get_Node_allocator()); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: iterator 20472: begin() noexcept 20472: { return iterator(this->_M_impl._M_node._M_next); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: const_iterator 20472: begin() const noexcept 20472: { return const_iterator(this->_M_impl._M_node._M_next); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: iterator 20472: end() noexcept 20472: { return iterator(&this->_M_impl._M_node); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: const_iterator 20472: end() const noexcept 20472: { return const_iterator(&this->_M_impl._M_node); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: reverse_iterator 20472: rbegin() noexcept 20472: { return reverse_iterator(end()); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: const_reverse_iterator 20472: rbegin() const noexcept 20472: { return const_reverse_iterator(end()); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: reverse_iterator 20472: rend() noexcept 20472: { return reverse_iterator(begin()); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: const_reverse_iterator 20472: rend() const noexcept 20472: { return const_reverse_iterator(begin()); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: const_iterator 20472: cbegin() const noexcept 20472: { return const_iterator(this->_M_impl._M_node._M_next); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: const_iterator 20472: cend() const noexcept 20472: { return const_iterator(&this->_M_impl._M_node); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: const_reverse_iterator 20472: crbegin() const noexcept 20472: { return const_reverse_iterator(end()); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: const_reverse_iterator 20472: crend() const noexcept 20472: { return const_reverse_iterator(begin()); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: bool 20472: empty() const noexcept 20472: { return this->_M_impl._M_node._M_next == &this->_M_impl._M_node; } 20472: 20472: 20472: size_type 20472: size() const noexcept 20472: { return _M_node_count(); } 20472: 20472: 20472: size_type 20472: max_size() const noexcept 20472: { return _Node_alloc_traits::max_size(_M_get_Node_allocator()); } 20472: # 1078 "/usr/include/c++/10/bits/stl_list.h" 3 20472: void 20472: resize(size_type __new_size); 20472: # 1091 "/usr/include/c++/10/bits/stl_list.h" 3 20472: void 20472: resize(size_type __new_size, const value_type& __x); 20472: # 1113 "/usr/include/c++/10/bits/stl_list.h" 3 20472: reference 20472: front() noexcept 20472: { return *begin(); } 20472: 20472: 20472: 20472: 20472: 20472: const_reference 20472: front() const noexcept 20472: { return *begin(); } 20472: 20472: 20472: 20472: 20472: 20472: reference 20472: back() noexcept 20472: { 20472: iterator __tmp = end(); 20472: --__tmp; 20472: return *__tmp; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: const_reference 20472: back() const noexcept 20472: { 20472: const_iterator __tmp = end(); 20472: --__tmp; 20472: return *__tmp; 20472: } 20472: # 1160 "/usr/include/c++/10/bits/stl_list.h" 3 20472: void 20472: push_front(const value_type& __x) 20472: { this->_M_insert(begin(), __x); } 20472: 20472: 20472: void 20472: push_front(value_type&& __x) 20472: { this->_M_insert(begin(), std::move(__x)); } 20472: 20472: template 20472: 20472: 20472: 20472: void 20472: 20472: emplace_front(_Args&&... __args) 20472: { 20472: this->_M_insert(begin(), std::forward<_Args>(__args)...); 20472: 20472: 20472: 20472: } 20472: # 1196 "/usr/include/c++/10/bits/stl_list.h" 3 20472: void 20472: pop_front() noexcept 20472: { this->_M_erase(begin()); } 20472: # 1210 "/usr/include/c++/10/bits/stl_list.h" 3 20472: void 20472: push_back(const value_type& __x) 20472: { this->_M_insert(end(), __x); } 20472: 20472: 20472: void 20472: push_back(value_type&& __x) 20472: { this->_M_insert(end(), std::move(__x)); } 20472: 20472: template 20472: 20472: 20472: 20472: void 20472: 20472: emplace_back(_Args&&... __args) 20472: { 20472: this->_M_insert(end(), std::forward<_Args>(__args)...); 20472: 20472: 20472: 20472: } 20472: # 1245 "/usr/include/c++/10/bits/stl_list.h" 3 20472: void 20472: pop_back() noexcept 20472: { this->_M_erase(iterator(this->_M_impl._M_node._M_prev)); } 20472: # 1262 "/usr/include/c++/10/bits/stl_list.h" 3 20472: template 20472: iterator 20472: emplace(const_iterator __position, _Args&&... __args); 20472: # 1277 "/usr/include/c++/10/bits/stl_list.h" 3 20472: iterator 20472: insert(const_iterator __position, const value_type& __x); 20472: # 1307 "/usr/include/c++/10/bits/stl_list.h" 3 20472: iterator 20472: insert(const_iterator __position, value_type&& __x) 20472: { return emplace(__position, std::move(__x)); } 20472: # 1326 "/usr/include/c++/10/bits/stl_list.h" 3 20472: iterator 20472: insert(const_iterator __p, initializer_list __l) 20472: { return this->insert(__p, __l.begin(), __l.end()); } 20472: # 1346 "/usr/include/c++/10/bits/stl_list.h" 3 20472: iterator 20472: insert(const_iterator __position, size_type __n, const value_type& __x); 20472: # 1385 "/usr/include/c++/10/bits/stl_list.h" 3 20472: template> 20472: iterator 20472: insert(const_iterator __position, _InputIterator __first, 20472: _InputIterator __last); 20472: # 1429 "/usr/include/c++/10/bits/stl_list.h" 3 20472: iterator 20472: 20472: erase(const_iterator __position) noexcept; 20472: # 1454 "/usr/include/c++/10/bits/stl_list.h" 3 20472: iterator 20472: 20472: erase(const_iterator __first, const_iterator __last) noexcept 20472: 20472: 20472: 20472: { 20472: while (__first != __last) 20472: __first = erase(__first); 20472: return __last._M_const_cast(); 20472: } 20472: # 1477 "/usr/include/c++/10/bits/stl_list.h" 3 20472: void 20472: swap(list& __x) noexcept 20472: { 20472: __detail::_List_node_base::swap(this->_M_impl._M_node, 20472: __x._M_impl._M_node); 20472: 20472: size_t __xsize = __x._M_get_size(); 20472: __x._M_set_size(this->_M_get_size()); 20472: this->_M_set_size(__xsize); 20472: 20472: _Node_alloc_traits::_S_on_swap(this->_M_get_Node_allocator(), 20472: __x._M_get_Node_allocator()); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: void 20472: clear() noexcept 20472: { 20472: _Base::_M_clear(); 20472: _Base::_M_init(); 20472: } 20472: # 1516 "/usr/include/c++/10/bits/stl_list.h" 3 20472: void 20472: 20472: splice(const_iterator __position, list&& __x) noexcept 20472: 20472: 20472: 20472: { 20472: if (!__x.empty()) 20472: { 20472: _M_check_equal_allocators(__x); 20472: 20472: this->_M_transfer(__position._M_const_cast(), 20472: __x.begin(), __x.end()); 20472: 20472: this->_M_inc_size(__x._M_get_size()); 20472: __x._M_set_size(0); 20472: } 20472: } 20472: 20472: 20472: void 20472: splice(const_iterator __position, list& __x) noexcept 20472: { splice(__position, std::move(__x)); } 20472: # 1552 "/usr/include/c++/10/bits/stl_list.h" 3 20472: void 20472: splice(const_iterator __position, list&& __x, const_iterator __i) noexcept 20472: # 1567 "/usr/include/c++/10/bits/stl_list.h" 3 20472: { 20472: iterator __j = __i._M_const_cast(); 20472: ++__j; 20472: if (__position == __i || __position == __j) 20472: return; 20472: 20472: if (this != std::__addressof(__x)) 20472: _M_check_equal_allocators(__x); 20472: 20472: this->_M_transfer(__position._M_const_cast(), 20472: __i._M_const_cast(), __j); 20472: 20472: this->_M_inc_size(1); 20472: __x._M_dec_size(1); 20472: } 20472: # 1594 "/usr/include/c++/10/bits/stl_list.h" 3 20472: void 20472: splice(const_iterator __position, list& __x, const_iterator __i) noexcept 20472: { splice(__position, std::move(__x), __i); } 20472: # 1613 "/usr/include/c++/10/bits/stl_list.h" 3 20472: void 20472: splice(const_iterator __position, list&& __x, const_iterator __first, 20472: const_iterator __last) noexcept 20472: # 1633 "/usr/include/c++/10/bits/stl_list.h" 3 20472: { 20472: if (__first != __last) 20472: { 20472: if (this != std::__addressof(__x)) 20472: _M_check_equal_allocators(__x); 20472: 20472: size_t __n = _S_distance(__first, __last); 20472: this->_M_inc_size(__n); 20472: __x._M_dec_size(__n); 20472: 20472: this->_M_transfer(__position._M_const_cast(), 20472: __first._M_const_cast(), 20472: __last._M_const_cast()); 20472: } 20472: } 20472: # 1663 "/usr/include/c++/10/bits/stl_list.h" 3 20472: void 20472: splice(const_iterator __position, list& __x, const_iterator __first, 20472: const_iterator __last) noexcept 20472: { splice(__position, std::move(__x), __first, __last); } 20472: 20472: 20472: private: 20472: 20472: 20472: 20472: 20472: 20472: 20472: typedef void __remove_return_type; 20472: 20472: 20472: public: 20472: # 1692 "/usr/include/c++/10/bits/stl_list.h" 3 20472: 20472: __remove_return_type 20472: remove(const _Tp& __value); 20472: # 1707 "/usr/include/c++/10/bits/stl_list.h" 3 20472: template 20472: __remove_return_type 20472: remove_if(_Predicate); 20472: # 1721 "/usr/include/c++/10/bits/stl_list.h" 3 20472: 20472: __remove_return_type 20472: unique(); 20472: # 1737 "/usr/include/c++/10/bits/stl_list.h" 3 20472: template 20472: __remove_return_type 20472: unique(_BinaryPredicate); 20472: # 1753 "/usr/include/c++/10/bits/stl_list.h" 3 20472: void 20472: merge(list&& __x); 20472: 20472: void 20472: merge(list& __x) 20472: { merge(std::move(__x)); } 20472: # 1778 "/usr/include/c++/10/bits/stl_list.h" 3 20472: template 20472: void 20472: merge(list&& __x, _StrictWeakOrdering __comp); 20472: 20472: template 20472: void 20472: merge(list& __x, _StrictWeakOrdering __comp) 20472: { merge(std::move(__x), __comp); } 20472: # 1797 "/usr/include/c++/10/bits/stl_list.h" 3 20472: void 20472: reverse() noexcept 20472: { this->_M_impl._M_node._M_reverse(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: void 20472: sort(); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: void 20472: sort(_StrictWeakOrdering); 20472: 20472: protected: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: void 20472: _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type) 20472: { _M_fill_initialize(static_cast(__n), __x); } 20472: 20472: 20472: template 20472: void 20472: _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, 20472: __false_type) 20472: { 20472: for (; __first != __last; ++__first) 20472: 20472: emplace_back(*__first); 20472: 20472: 20472: 20472: } 20472: 20472: 20472: 20472: void 20472: _M_fill_initialize(size_type __n, const value_type& __x) 20472: { 20472: for (; __n; --__n) 20472: push_back(__x); 20472: } 20472: 20472: 20472: 20472: void 20472: _M_default_initialize(size_type __n) 20472: { 20472: for (; __n; --__n) 20472: emplace_back(); 20472: } 20472: 20472: 20472: void 20472: _M_default_append(size_type __n); 20472: # 1875 "/usr/include/c++/10/bits/stl_list.h" 3 20472: template 20472: void 20472: _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) 20472: { _M_fill_assign(__n, __val); } 20472: 20472: 20472: template 20472: void 20472: _M_assign_dispatch(_InputIterator __first, _InputIterator __last, 20472: __false_type); 20472: 20472: 20472: 20472: void 20472: _M_fill_assign(size_type __n, const value_type& __val); 20472: 20472: 20472: 20472: void 20472: _M_transfer(iterator __position, iterator __first, iterator __last) 20472: { __position._M_node->_M_transfer(__first._M_node, __last._M_node); } 20472: # 1907 "/usr/include/c++/10/bits/stl_list.h" 3 20472: template 20472: void 20472: _M_insert(iterator __position, _Args&&... __args) 20472: { 20472: _Node* __tmp = _M_create_node(std::forward<_Args>(__args)...); 20472: __tmp->_M_hook(__position._M_node); 20472: this->_M_inc_size(1); 20472: } 20472: 20472: 20472: 20472: void 20472: _M_erase(iterator __position) noexcept 20472: { 20472: this->_M_dec_size(1); 20472: __position._M_node->_M_unhook(); 20472: _Node* __n = static_cast<_Node*>(__position._M_node); 20472: 20472: _Node_alloc_traits::destroy(_M_get_Node_allocator(), __n->_M_valptr()); 20472: 20472: 20472: 20472: 20472: _M_put_node(__n); 20472: } 20472: 20472: 20472: void 20472: _M_check_equal_allocators(list& __x) noexcept 20472: { 20472: if (std::__alloc_neq:: 20472: _S_do_it(_M_get_Node_allocator(), __x._M_get_Node_allocator())) 20472: __builtin_abort(); 20472: } 20472: 20472: 20472: const_iterator 20472: _M_resize_pos(size_type& __new_size) const; 20472: 20472: 20472: void 20472: _M_move_assign(list&& __x, true_type) noexcept 20472: { 20472: this->_M_clear(); 20472: this->_M_move_nodes(std::move(__x)); 20472: std::__alloc_on_move(this->_M_get_Node_allocator(), 20472: __x._M_get_Node_allocator()); 20472: } 20472: 20472: void 20472: _M_move_assign(list&& __x, false_type) 20472: { 20472: if (__x._M_get_Node_allocator() == this->_M_get_Node_allocator()) 20472: _M_move_assign(std::move(__x), true_type{}); 20472: else 20472: 20472: 20472: _M_assign_dispatch(std::make_move_iterator(__x.begin()), 20472: std::make_move_iterator(__x.end()), 20472: __false_type{}); 20472: } 20472: 20472: }; 20472: # 1981 "/usr/include/c++/10/bits/stl_list.h" 3 20472: } 20472: # 1993 "/usr/include/c++/10/bits/stl_list.h" 3 20472: template 20472: inline bool 20472: operator==(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) 20472: { 20472: 20472: if (__x.size() != __y.size()) 20472: return false; 20472: 20472: 20472: typedef typename list<_Tp, _Alloc>::const_iterator const_iterator; 20472: const_iterator __end1 = __x.end(); 20472: const_iterator __end2 = __y.end(); 20472: 20472: const_iterator __i1 = __x.begin(); 20472: const_iterator __i2 = __y.begin(); 20472: while (__i1 != __end1 && __i2 != __end2 && *__i1 == *__i2) 20472: { 20472: ++__i1; 20472: ++__i2; 20472: } 20472: return __i1 == __end1 && __i2 == __end2; 20472: } 20472: # 2048 "/usr/include/c++/10/bits/stl_list.h" 3 20472: template 20472: inline bool 20472: operator<(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) 20472: { return std::lexicographical_compare(__x.begin(), __x.end(), 20472: __y.begin(), __y.end()); } 20472: 20472: 20472: template 20472: inline bool 20472: operator!=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) 20472: { return !(__x == __y); } 20472: 20472: 20472: template 20472: inline bool 20472: operator>(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) 20472: { return __y < __x; } 20472: 20472: 20472: template 20472: inline bool 20472: operator<=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) 20472: { return !(__y < __x); } 20472: 20472: 20472: template 20472: inline bool 20472: operator>=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) 20472: { return !(__x < __y); } 20472: 20472: 20472: 20472: template 20472: inline void 20472: swap(list<_Tp, _Alloc>& __x, list<_Tp, _Alloc>& __y) 20472: noexcept(noexcept(__x.swap(__y))) 20472: { __x.swap(__y); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: inline ptrdiff_t 20472: __distance(std::_List_iterator<_Tp> __first, 20472: std::_List_iterator<_Tp> __last, 20472: input_iterator_tag __tag) 20472: { 20472: typedef std::_List_const_iterator<_Tp> _CIter; 20472: return std::__distance(_CIter(__first), _CIter(__last), __tag); 20472: } 20472: 20472: template 20472: inline ptrdiff_t 20472: __distance(std::_List_const_iterator<_Tp> __first, 20472: std::_List_const_iterator<_Tp> __last, 20472: input_iterator_tag) 20472: { 20472: typedef __detail::_List_node_header _Sentinel; 20472: std::_List_const_iterator<_Tp> __beyond = __last; 20472: ++__beyond; 20472: const bool __whole = __first == __beyond; 20472: if (__builtin_constant_p (__whole) && __whole) 20472: return static_cast(__last._M_node)->_M_size; 20472: 20472: ptrdiff_t __n = 0; 20472: while (__first != __last) 20472: { 20472: ++__first; 20472: ++__n; 20472: } 20472: return __n; 20472: } 20472: 20472: 20472: 20472: } 20472: # 64 "/usr/include/c++/10/list" 2 3 20472: # 1 "/usr/include/c++/10/bits/list.tcc" 1 3 20472: # 59 "/usr/include/c++/10/bits/list.tcc" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: template 20472: void 20472: _List_base<_Tp, _Alloc>:: 20472: _M_clear() noexcept 20472: { 20472: typedef _List_node<_Tp> _Node; 20472: __detail::_List_node_base* __cur = _M_impl._M_node._M_next; 20472: while (__cur != &_M_impl._M_node) 20472: { 20472: _Node* __tmp = static_cast<_Node*>(__cur); 20472: __cur = __tmp->_M_next; 20472: _Tp* __val = __tmp->_M_valptr(); 20472: 20472: _Node_alloc_traits::destroy(_M_get_Node_allocator(), __val); 20472: 20472: 20472: 20472: _M_put_node(__tmp); 20472: } 20472: } 20472: 20472: 20472: template 20472: template 20472: typename list<_Tp, _Alloc>::iterator 20472: list<_Tp, _Alloc>:: 20472: emplace(const_iterator __position, _Args&&... __args) 20472: { 20472: _Node* __tmp = _M_create_node(std::forward<_Args>(__args)...); 20472: __tmp->_M_hook(__position._M_const_cast()._M_node); 20472: this->_M_inc_size(1); 20472: return iterator(__tmp); 20472: } 20472: 20472: 20472: template 20472: typename list<_Tp, _Alloc>::iterator 20472: list<_Tp, _Alloc>:: 20472: 20472: insert(const_iterator __position, const value_type& __x) 20472: 20472: 20472: 20472: { 20472: _Node* __tmp = _M_create_node(__x); 20472: __tmp->_M_hook(__position._M_const_cast()._M_node); 20472: this->_M_inc_size(1); 20472: return iterator(__tmp); 20472: } 20472: 20472: 20472: template 20472: typename list<_Tp, _Alloc>::iterator 20472: list<_Tp, _Alloc>:: 20472: insert(const_iterator __position, size_type __n, const value_type& __x) 20472: { 20472: if (__n) 20472: { 20472: list __tmp(__n, __x, get_allocator()); 20472: iterator __it = __tmp.begin(); 20472: splice(__position, __tmp); 20472: return __it; 20472: } 20472: return __position._M_const_cast(); 20472: } 20472: 20472: template 20472: template 20472: typename list<_Tp, _Alloc>::iterator 20472: list<_Tp, _Alloc>:: 20472: insert(const_iterator __position, _InputIterator __first, 20472: _InputIterator __last) 20472: { 20472: list __tmp(__first, __last, get_allocator()); 20472: if (!__tmp.empty()) 20472: { 20472: iterator __it = __tmp.begin(); 20472: splice(__position, __tmp); 20472: return __it; 20472: } 20472: return __position._M_const_cast(); 20472: } 20472: 20472: 20472: template 20472: typename list<_Tp, _Alloc>::iterator 20472: list<_Tp, _Alloc>:: 20472: 20472: erase(const_iterator __position) noexcept 20472: 20472: 20472: 20472: { 20472: iterator __ret = iterator(__position._M_node->_M_next); 20472: _M_erase(__position._M_const_cast()); 20472: return __ret; 20472: } 20472: # 173 "/usr/include/c++/10/bits/list.tcc" 3 20472: template 20472: typename list<_Tp, _Alloc>::const_iterator 20472: list<_Tp, _Alloc>:: 20472: _M_resize_pos(size_type& __new_size) const 20472: { 20472: const_iterator __i; 20472: 20472: const size_type __len = size(); 20472: if (__new_size < __len) 20472: { 20472: if (__new_size <= __len / 2) 20472: { 20472: __i = begin(); 20472: std::advance(__i, __new_size); 20472: } 20472: else 20472: { 20472: __i = end(); 20472: ptrdiff_t __num_erase = __len - __new_size; 20472: std::advance(__i, -__num_erase); 20472: } 20472: __new_size = 0; 20472: return __i; 20472: } 20472: else 20472: __i = end(); 20472: 20472: 20472: 20472: 20472: 20472: __new_size -= __len; 20472: return __i; 20472: } 20472: 20472: 20472: template 20472: void 20472: list<_Tp, _Alloc>:: 20472: _M_default_append(size_type __n) 20472: { 20472: size_type __i = 0; 20472: try 20472: { 20472: for (; __i < __n; ++__i) 20472: emplace_back(); 20472: } 20472: catch(...) 20472: { 20472: for (; __i; --__i) 20472: pop_back(); 20472: throw; 20472: } 20472: } 20472: 20472: template 20472: void 20472: list<_Tp, _Alloc>:: 20472: resize(size_type __new_size) 20472: { 20472: const_iterator __i = _M_resize_pos(__new_size); 20472: if (__new_size) 20472: _M_default_append(__new_size); 20472: else 20472: erase(__i, end()); 20472: } 20472: 20472: template 20472: void 20472: list<_Tp, _Alloc>:: 20472: resize(size_type __new_size, const value_type& __x) 20472: { 20472: const_iterator __i = _M_resize_pos(__new_size); 20472: if (__new_size) 20472: insert(end(), __new_size, __x); 20472: else 20472: erase(__i, end()); 20472: } 20472: # 265 "/usr/include/c++/10/bits/list.tcc" 3 20472: template 20472: list<_Tp, _Alloc>& 20472: list<_Tp, _Alloc>:: 20472: operator=(const list& __x) 20472: { 20472: if (this != std::__addressof(__x)) 20472: { 20472: 20472: if (_Node_alloc_traits::_S_propagate_on_copy_assign()) 20472: { 20472: auto& __this_alloc = this->_M_get_Node_allocator(); 20472: auto& __that_alloc = __x._M_get_Node_allocator(); 20472: if (!_Node_alloc_traits::_S_always_equal() 20472: && __this_alloc != __that_alloc) 20472: { 20472: 20472: clear(); 20472: } 20472: std::__alloc_on_copy(__this_alloc, __that_alloc); 20472: } 20472: 20472: _M_assign_dispatch(__x.begin(), __x.end(), __false_type()); 20472: } 20472: return *this; 20472: } 20472: 20472: template 20472: void 20472: list<_Tp, _Alloc>:: 20472: _M_fill_assign(size_type __n, const value_type& __val) 20472: { 20472: iterator __i = begin(); 20472: for (; __i != end() && __n > 0; ++__i, --__n) 20472: *__i = __val; 20472: if (__n > 0) 20472: insert(end(), __n, __val); 20472: else 20472: erase(__i, end()); 20472: } 20472: 20472: template 20472: template 20472: void 20472: list<_Tp, _Alloc>:: 20472: _M_assign_dispatch(_InputIterator __first2, _InputIterator __last2, 20472: __false_type) 20472: { 20472: iterator __first1 = begin(); 20472: iterator __last1 = end(); 20472: for (; __first1 != __last1 && __first2 != __last2; 20472: ++__first1, (void)++__first2) 20472: *__first1 = *__first2; 20472: if (__first2 == __last2) 20472: erase(__first1, __last1); 20472: else 20472: insert(__last1, __first2, __last2); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: typename list<_Tp, _Alloc>::__remove_return_type 20472: list<_Tp, _Alloc>:: 20472: remove(const value_type& __value) 20472: { 20472: size_type __removed __attribute__((__unused__)) = 0; 20472: iterator __first = begin(); 20472: iterator __last = end(); 20472: iterator __extra = __last; 20472: while (__first != __last) 20472: { 20472: iterator __next = __first; 20472: ++__next; 20472: if (*__first == __value) 20472: { 20472: 20472: 20472: 20472: if (std::__addressof(*__first) != std::__addressof(__value)) 20472: { 20472: _M_erase(__first); 20472: ; 20472: } 20472: else 20472: __extra = __first; 20472: } 20472: __first = __next; 20472: } 20472: if (__extra != __last) 20472: { 20472: _M_erase(__extra); 20472: ; 20472: } 20472: return ; 20472: } 20472: 20472: template 20472: typename list<_Tp, _Alloc>::__remove_return_type 20472: list<_Tp, _Alloc>:: 20472: unique() 20472: { 20472: iterator __first = begin(); 20472: iterator __last = end(); 20472: if (__first == __last) 20472: return ; 20472: size_type __removed __attribute__((__unused__)) = 0; 20472: iterator __next = __first; 20472: while (++__next != __last) 20472: { 20472: if (*__first == *__next) 20472: { 20472: _M_erase(__next); 20472: ; 20472: } 20472: else 20472: __first = __next; 20472: __next = __first; 20472: } 20472: return ; 20472: } 20472: 20472: template 20472: void 20472: list<_Tp, _Alloc>:: 20472: 20472: merge(list&& __x) 20472: 20472: 20472: 20472: { 20472: 20472: 20472: if (this != std::__addressof(__x)) 20472: { 20472: _M_check_equal_allocators(__x); 20472: 20472: iterator __first1 = begin(); 20472: iterator __last1 = end(); 20472: iterator __first2 = __x.begin(); 20472: iterator __last2 = __x.end(); 20472: const size_t __orig_size = __x.size(); 20472: try { 20472: while (__first1 != __last1 && __first2 != __last2) 20472: if (*__first2 < *__first1) 20472: { 20472: iterator __next = __first2; 20472: _M_transfer(__first1, __first2, ++__next); 20472: __first2 = __next; 20472: } 20472: else 20472: ++__first1; 20472: if (__first2 != __last2) 20472: _M_transfer(__last1, __first2, __last2); 20472: 20472: this->_M_inc_size(__x._M_get_size()); 20472: __x._M_set_size(0); 20472: } 20472: catch(...) 20472: { 20472: const size_t __dist = std::distance(__first2, __last2); 20472: this->_M_inc_size(__orig_size - __dist); 20472: __x._M_set_size(__dist); 20472: throw; 20472: } 20472: } 20472: } 20472: 20472: template 20472: template 20472: void 20472: list<_Tp, _Alloc>:: 20472: 20472: merge(list&& __x, _StrictWeakOrdering __comp) 20472: 20472: 20472: 20472: { 20472: 20472: 20472: if (this != std::__addressof(__x)) 20472: { 20472: _M_check_equal_allocators(__x); 20472: 20472: iterator __first1 = begin(); 20472: iterator __last1 = end(); 20472: iterator __first2 = __x.begin(); 20472: iterator __last2 = __x.end(); 20472: const size_t __orig_size = __x.size(); 20472: try 20472: { 20472: while (__first1 != __last1 && __first2 != __last2) 20472: if (__comp(*__first2, *__first1)) 20472: { 20472: iterator __next = __first2; 20472: _M_transfer(__first1, __first2, ++__next); 20472: __first2 = __next; 20472: } 20472: else 20472: ++__first1; 20472: if (__first2 != __last2) 20472: _M_transfer(__last1, __first2, __last2); 20472: 20472: this->_M_inc_size(__x._M_get_size()); 20472: __x._M_set_size(0); 20472: } 20472: catch(...) 20472: { 20472: const size_t __dist = std::distance(__first2, __last2); 20472: this->_M_inc_size(__orig_size - __dist); 20472: __x._M_set_size(__dist); 20472: throw; 20472: } 20472: } 20472: } 20472: 20472: template 20472: void 20472: list<_Tp, _Alloc>:: 20472: sort() 20472: { 20472: 20472: if (this->_M_impl._M_node._M_next != &this->_M_impl._M_node 20472: && this->_M_impl._M_node._M_next->_M_next != &this->_M_impl._M_node) 20472: { 20472: list __carry; 20472: list __tmp[64]; 20472: list * __fill = __tmp; 20472: list * __counter; 20472: try 20472: { 20472: do 20472: { 20472: __carry.splice(__carry.begin(), *this, begin()); 20472: 20472: for(__counter = __tmp; 20472: __counter != __fill && !__counter->empty(); 20472: ++__counter) 20472: { 20472: __counter->merge(__carry); 20472: __carry.swap(*__counter); 20472: } 20472: __carry.swap(*__counter); 20472: if (__counter == __fill) 20472: ++__fill; 20472: } 20472: while ( !empty() ); 20472: 20472: for (__counter = __tmp + 1; __counter != __fill; ++__counter) 20472: __counter->merge(*(__counter - 1)); 20472: swap( *(__fill - 1) ); 20472: } 20472: catch(...) 20472: { 20472: this->splice(this->end(), __carry); 20472: for (int __i = 0; __i < sizeof(__tmp)/sizeof(__tmp[0]); ++__i) 20472: this->splice(this->end(), __tmp[__i]); 20472: throw; 20472: } 20472: } 20472: } 20472: 20472: template 20472: template 20472: typename list<_Tp, _Alloc>::__remove_return_type 20472: list<_Tp, _Alloc>:: 20472: remove_if(_Predicate __pred) 20472: { 20472: size_type __removed __attribute__((__unused__)) = 0; 20472: iterator __first = begin(); 20472: iterator __last = end(); 20472: while (__first != __last) 20472: { 20472: iterator __next = __first; 20472: ++__next; 20472: if (__pred(*__first)) 20472: { 20472: _M_erase(__first); 20472: ; 20472: } 20472: __first = __next; 20472: } 20472: return ; 20472: } 20472: 20472: template 20472: template 20472: typename list<_Tp, _Alloc>::__remove_return_type 20472: list<_Tp, _Alloc>:: 20472: unique(_BinaryPredicate __binary_pred) 20472: { 20472: iterator __first = begin(); 20472: iterator __last = end(); 20472: if (__first == __last) 20472: return ; 20472: size_type __removed __attribute__((__unused__)) = 0; 20472: iterator __next = __first; 20472: while (++__next != __last) 20472: { 20472: if (__binary_pred(*__first, *__next)) 20472: { 20472: _M_erase(__next); 20472: ; 20472: } 20472: else 20472: __first = __next; 20472: __next = __first; 20472: } 20472: return ; 20472: } 20472: 20472: 20472: 20472: template 20472: template 20472: void 20472: list<_Tp, _Alloc>:: 20472: sort(_StrictWeakOrdering __comp) 20472: { 20472: 20472: if (this->_M_impl._M_node._M_next != &this->_M_impl._M_node 20472: && this->_M_impl._M_node._M_next->_M_next != &this->_M_impl._M_node) 20472: { 20472: list __carry; 20472: list __tmp[64]; 20472: list * __fill = __tmp; 20472: list * __counter; 20472: try 20472: { 20472: do 20472: { 20472: __carry.splice(__carry.begin(), *this, begin()); 20472: 20472: for(__counter = __tmp; 20472: __counter != __fill && !__counter->empty(); 20472: ++__counter) 20472: { 20472: __counter->merge(__carry, __comp); 20472: __carry.swap(*__counter); 20472: } 20472: __carry.swap(*__counter); 20472: if (__counter == __fill) 20472: ++__fill; 20472: } 20472: while ( !empty() ); 20472: 20472: for (__counter = __tmp + 1; __counter != __fill; ++__counter) 20472: __counter->merge(*(__counter - 1), __comp); 20472: swap(*(__fill - 1)); 20472: } 20472: catch(...) 20472: { 20472: this->splice(this->end(), __carry); 20472: for (int __i = 0; __i < sizeof(__tmp)/sizeof(__tmp[0]); ++__i) 20472: this->splice(this->end(), __tmp[__i]); 20472: throw; 20472: } 20472: } 20472: } 20472: 20472: 20472: 20472: } 20472: # 65 "/usr/include/c++/10/list" 2 3 20472: # 9 "./db/range_tombstone_fragmenter.h" 2 20472: 20472: # 1 "/usr/include/c++/10/set" 1 3 20472: # 58 "/usr/include/c++/10/set" 3 20472: 20472: # 59 "/usr/include/c++/10/set" 3 20472: 20472: 20472: # 1 "/usr/include/c++/10/bits/stl_set.h" 1 3 20472: # 64 "/usr/include/c++/10/bits/stl_set.h" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: template 20472: class multiset; 20472: # 92 "/usr/include/c++/10/bits/stl_set.h" 3 20472: template, 20472: typename _Alloc = std::allocator<_Key> > 20472: class set 20472: { 20472: # 108 "/usr/include/c++/10/bits/stl_set.h" 3 20472: static_assert(is_same::type, _Key>::value, 20472: "std::set must have a non-const, non-volatile value_type"); 20472: 20472: static_assert(is_same::value, 20472: "std::set must have the same value_type as its allocator"); 20472: 20472: 20472: 20472: public: 20472: 20472: 20472: 20472: typedef _Key key_type; 20472: typedef _Key value_type; 20472: typedef _Compare key_compare; 20472: typedef _Compare value_compare; 20472: typedef _Alloc allocator_type; 20472: 20472: 20472: private: 20472: typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template 20472: rebind<_Key>::other _Key_alloc_type; 20472: 20472: typedef _Rb_tree, 20472: key_compare, _Key_alloc_type> _Rep_type; 20472: _Rep_type _M_t; 20472: 20472: typedef __gnu_cxx::__alloc_traits<_Key_alloc_type> _Alloc_traits; 20472: 20472: public: 20472: 20472: 20472: typedef typename _Alloc_traits::pointer pointer; 20472: typedef typename _Alloc_traits::const_pointer const_pointer; 20472: typedef typename _Alloc_traits::reference reference; 20472: typedef typename _Alloc_traits::const_reference const_reference; 20472: 20472: 20472: 20472: typedef typename _Rep_type::const_iterator iterator; 20472: typedef typename _Rep_type::const_iterator const_iterator; 20472: typedef typename _Rep_type::const_reverse_iterator reverse_iterator; 20472: typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; 20472: typedef typename _Rep_type::size_type size_type; 20472: typedef typename _Rep_type::difference_type difference_type; 20472: # 167 "/usr/include/c++/10/bits/stl_set.h" 3 20472: set() = default; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: explicit 20472: set(const _Compare& __comp, 20472: const allocator_type& __a = allocator_type()) 20472: : _M_t(__comp, _Key_alloc_type(__a)) { } 20472: # 190 "/usr/include/c++/10/bits/stl_set.h" 3 20472: template 20472: set(_InputIterator __first, _InputIterator __last) 20472: : _M_t() 20472: { _M_t._M_insert_range_unique(__first, __last); } 20472: # 207 "/usr/include/c++/10/bits/stl_set.h" 3 20472: template 20472: set(_InputIterator __first, _InputIterator __last, 20472: const _Compare& __comp, 20472: const allocator_type& __a = allocator_type()) 20472: : _M_t(__comp, _Key_alloc_type(__a)) 20472: { _M_t._M_insert_range_unique(__first, __last); } 20472: # 223 "/usr/include/c++/10/bits/stl_set.h" 3 20472: set(const set&) = default; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: set(set&&) = default; 20472: # 243 "/usr/include/c++/10/bits/stl_set.h" 3 20472: set(initializer_list __l, 20472: const _Compare& __comp = _Compare(), 20472: const allocator_type& __a = allocator_type()) 20472: : _M_t(__comp, _Key_alloc_type(__a)) 20472: { _M_t._M_insert_range_unique(__l.begin(), __l.end()); } 20472: 20472: 20472: explicit 20472: set(const allocator_type& __a) 20472: : _M_t(_Key_alloc_type(__a)) { } 20472: 20472: 20472: set(const set& __x, const allocator_type& __a) 20472: : _M_t(__x._M_t, _Key_alloc_type(__a)) { } 20472: 20472: 20472: set(set&& __x, const allocator_type& __a) 20472: noexcept(is_nothrow_copy_constructible<_Compare>::value 20472: && _Alloc_traits::_S_always_equal()) 20472: : _M_t(std::move(__x._M_t), _Key_alloc_type(__a)) { } 20472: 20472: 20472: set(initializer_list __l, const allocator_type& __a) 20472: : _M_t(_Key_alloc_type(__a)) 20472: { _M_t._M_insert_range_unique(__l.begin(), __l.end()); } 20472: 20472: 20472: template 20472: set(_InputIterator __first, _InputIterator __last, 20472: const allocator_type& __a) 20472: : _M_t(_Key_alloc_type(__a)) 20472: { _M_t._M_insert_range_unique(__first, __last); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: ~set() = default; 20472: # 297 "/usr/include/c++/10/bits/stl_set.h" 3 20472: set& 20472: operator=(const set&) = default; 20472: 20472: 20472: set& 20472: operator=(set&&) = default; 20472: # 315 "/usr/include/c++/10/bits/stl_set.h" 3 20472: set& 20472: operator=(initializer_list __l) 20472: { 20472: _M_t._M_assign_unique(__l.begin(), __l.end()); 20472: return *this; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: key_compare 20472: key_comp() const 20472: { return _M_t.key_comp(); } 20472: 20472: value_compare 20472: value_comp() const 20472: { return _M_t.key_comp(); } 20472: 20472: allocator_type 20472: get_allocator() const noexcept 20472: { return allocator_type(_M_t.get_allocator()); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: iterator 20472: begin() const noexcept 20472: { return _M_t.begin(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: iterator 20472: end() const noexcept 20472: { return _M_t.end(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: reverse_iterator 20472: rbegin() const noexcept 20472: { return _M_t.rbegin(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: reverse_iterator 20472: rend() const noexcept 20472: { return _M_t.rend(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: iterator 20472: cbegin() const noexcept 20472: { return _M_t.begin(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: iterator 20472: cend() const noexcept 20472: { return _M_t.end(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: reverse_iterator 20472: crbegin() const noexcept 20472: { return _M_t.rbegin(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: reverse_iterator 20472: crend() const noexcept 20472: { return _M_t.rend(); } 20472: 20472: 20472: 20472: bool 20472: empty() const noexcept 20472: { return _M_t.empty(); } 20472: 20472: 20472: size_type 20472: size() const noexcept 20472: { return _M_t.size(); } 20472: 20472: 20472: size_type 20472: max_size() const noexcept 20472: { return _M_t.max_size(); } 20472: # 440 "/usr/include/c++/10/bits/stl_set.h" 3 20472: void 20472: swap(set& __x) 20472: noexcept(__is_nothrow_swappable<_Compare>::value) 20472: { _M_t.swap(__x._M_t); } 20472: # 460 "/usr/include/c++/10/bits/stl_set.h" 3 20472: template 20472: std::pair 20472: emplace(_Args&&... __args) 20472: { return _M_t._M_emplace_unique(std::forward<_Args>(__args)...); } 20472: # 486 "/usr/include/c++/10/bits/stl_set.h" 3 20472: template 20472: iterator 20472: emplace_hint(const_iterator __pos, _Args&&... __args) 20472: { 20472: return _M_t._M_emplace_hint_unique(__pos, 20472: std::forward<_Args>(__args)...); 20472: } 20472: # 508 "/usr/include/c++/10/bits/stl_set.h" 3 20472: std::pair 20472: insert(const value_type& __x) 20472: { 20472: std::pair __p = 20472: _M_t._M_insert_unique(__x); 20472: return std::pair(__p.first, __p.second); 20472: } 20472: 20472: 20472: std::pair 20472: insert(value_type&& __x) 20472: { 20472: std::pair __p = 20472: _M_t._M_insert_unique(std::move(__x)); 20472: return std::pair(__p.first, __p.second); 20472: } 20472: # 545 "/usr/include/c++/10/bits/stl_set.h" 3 20472: iterator 20472: insert(const_iterator __position, const value_type& __x) 20472: { return _M_t._M_insert_unique_(__position, __x); } 20472: 20472: 20472: iterator 20472: insert(const_iterator __position, value_type&& __x) 20472: { return _M_t._M_insert_unique_(__position, std::move(__x)); } 20472: # 564 "/usr/include/c++/10/bits/stl_set.h" 3 20472: template 20472: void 20472: insert(_InputIterator __first, _InputIterator __last) 20472: { _M_t._M_insert_range_unique(__first, __last); } 20472: # 577 "/usr/include/c++/10/bits/stl_set.h" 3 20472: void 20472: insert(initializer_list __l) 20472: { this->insert(__l.begin(), __l.end()); } 20472: # 652 "/usr/include/c++/10/bits/stl_set.h" 3 20472: __attribute ((__abi_tag__ ("cxx11"))) 20472: iterator 20472: erase(const_iterator __position) 20472: { return _M_t.erase(__position); } 20472: # 683 "/usr/include/c++/10/bits/stl_set.h" 3 20472: size_type 20472: erase(const key_type& __x) 20472: { return _M_t.erase(__x); } 20472: # 704 "/usr/include/c++/10/bits/stl_set.h" 3 20472: __attribute ((__abi_tag__ ("cxx11"))) 20472: iterator 20472: erase(const_iterator __first, const_iterator __last) 20472: { return _M_t.erase(__first, __last); } 20472: # 732 "/usr/include/c++/10/bits/stl_set.h" 3 20472: void 20472: clear() noexcept 20472: { _M_t.clear(); } 20472: # 747 "/usr/include/c++/10/bits/stl_set.h" 3 20472: size_type 20472: count(const key_type& __x) const 20472: { return _M_t.find(__x) == _M_t.end() ? 0 : 1; } 20472: # 793 "/usr/include/c++/10/bits/stl_set.h" 3 20472: iterator 20472: find(const key_type& __x) 20472: { return _M_t.find(__x); } 20472: 20472: const_iterator 20472: find(const key_type& __x) const 20472: { return _M_t.find(__x); } 20472: # 828 "/usr/include/c++/10/bits/stl_set.h" 3 20472: iterator 20472: lower_bound(const key_type& __x) 20472: { return _M_t.lower_bound(__x); } 20472: 20472: const_iterator 20472: lower_bound(const key_type& __x) const 20472: { return _M_t.lower_bound(__x); } 20472: # 858 "/usr/include/c++/10/bits/stl_set.h" 3 20472: iterator 20472: upper_bound(const key_type& __x) 20472: { return _M_t.upper_bound(__x); } 20472: 20472: const_iterator 20472: upper_bound(const key_type& __x) const 20472: { return _M_t.upper_bound(__x); } 20472: # 897 "/usr/include/c++/10/bits/stl_set.h" 3 20472: std::pair 20472: equal_range(const key_type& __x) 20472: { return _M_t.equal_range(__x); } 20472: 20472: std::pair 20472: equal_range(const key_type& __x) const 20472: { return _M_t.equal_range(__x); } 20472: # 920 "/usr/include/c++/10/bits/stl_set.h" 3 20472: template 20472: friend bool 20472: operator==(const set<_K1, _C1, _A1>&, const set<_K1, _C1, _A1>&); 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: friend bool 20472: operator<(const set<_K1, _C1, _A1>&, const set<_K1, _C1, _A1>&); 20472: 20472: }; 20472: # 983 "/usr/include/c++/10/bits/stl_set.h" 3 20472: template 20472: inline bool 20472: operator==(const set<_Key, _Compare, _Alloc>& __x, 20472: const set<_Key, _Compare, _Alloc>& __y) 20472: { return __x._M_t == __y._M_t; } 20472: # 1021 "/usr/include/c++/10/bits/stl_set.h" 3 20472: template 20472: inline bool 20472: operator<(const set<_Key, _Compare, _Alloc>& __x, 20472: const set<_Key, _Compare, _Alloc>& __y) 20472: { return __x._M_t < __y._M_t; } 20472: 20472: 20472: template 20472: inline bool 20472: operator!=(const set<_Key, _Compare, _Alloc>& __x, 20472: const set<_Key, _Compare, _Alloc>& __y) 20472: { return !(__x == __y); } 20472: 20472: 20472: template 20472: inline bool 20472: operator>(const set<_Key, _Compare, _Alloc>& __x, 20472: const set<_Key, _Compare, _Alloc>& __y) 20472: { return __y < __x; } 20472: 20472: 20472: template 20472: inline bool 20472: operator<=(const set<_Key, _Compare, _Alloc>& __x, 20472: const set<_Key, _Compare, _Alloc>& __y) 20472: { return !(__y < __x); } 20472: 20472: 20472: template 20472: inline bool 20472: operator>=(const set<_Key, _Compare, _Alloc>& __x, 20472: const set<_Key, _Compare, _Alloc>& __y) 20472: { return !(__x < __y); } 20472: 20472: 20472: 20472: template 20472: inline void 20472: swap(set<_Key, _Compare, _Alloc>& __x, set<_Key, _Compare, _Alloc>& __y) 20472: noexcept(noexcept(__x.swap(__y))) 20472: { __x.swap(__y); } 20472: 20472: 20472: # 1084 "/usr/include/c++/10/bits/stl_set.h" 3 20472: 20472: } 20472: # 62 "/usr/include/c++/10/set" 2 3 20472: # 1 "/usr/include/c++/10/bits/stl_multiset.h" 1 3 20472: # 64 "/usr/include/c++/10/bits/stl_multiset.h" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: template 20472: class set; 20472: # 94 "/usr/include/c++/10/bits/stl_multiset.h" 3 20472: template , 20472: typename _Alloc = std::allocator<_Key> > 20472: class multiset 20472: { 20472: # 110 "/usr/include/c++/10/bits/stl_multiset.h" 3 20472: static_assert(is_same::type, _Key>::value, 20472: "std::multiset must have a non-const, non-volatile value_type"); 20472: 20472: static_assert(is_same::value, 20472: "std::multiset must have the same value_type as its allocator"); 20472: 20472: 20472: 20472: public: 20472: 20472: typedef _Key key_type; 20472: typedef _Key value_type; 20472: typedef _Compare key_compare; 20472: typedef _Compare value_compare; 20472: typedef _Alloc allocator_type; 20472: 20472: private: 20472: 20472: typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template 20472: rebind<_Key>::other _Key_alloc_type; 20472: 20472: typedef _Rb_tree, 20472: key_compare, _Key_alloc_type> _Rep_type; 20472: 20472: _Rep_type _M_t; 20472: 20472: typedef __gnu_cxx::__alloc_traits<_Key_alloc_type> _Alloc_traits; 20472: 20472: public: 20472: typedef typename _Alloc_traits::pointer pointer; 20472: typedef typename _Alloc_traits::const_pointer const_pointer; 20472: typedef typename _Alloc_traits::reference reference; 20472: typedef typename _Alloc_traits::const_reference const_reference; 20472: 20472: 20472: 20472: typedef typename _Rep_type::const_iterator iterator; 20472: typedef typename _Rep_type::const_iterator const_iterator; 20472: typedef typename _Rep_type::const_reverse_iterator reverse_iterator; 20472: typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; 20472: typedef typename _Rep_type::size_type size_type; 20472: typedef typename _Rep_type::difference_type difference_type; 20472: # 164 "/usr/include/c++/10/bits/stl_multiset.h" 3 20472: multiset() = default; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: explicit 20472: multiset(const _Compare& __comp, 20472: const allocator_type& __a = allocator_type()) 20472: : _M_t(__comp, _Key_alloc_type(__a)) { } 20472: # 186 "/usr/include/c++/10/bits/stl_multiset.h" 3 20472: template 20472: multiset(_InputIterator __first, _InputIterator __last) 20472: : _M_t() 20472: { _M_t._M_insert_range_equal(__first, __last); } 20472: # 202 "/usr/include/c++/10/bits/stl_multiset.h" 3 20472: template 20472: multiset(_InputIterator __first, _InputIterator __last, 20472: const _Compare& __comp, 20472: const allocator_type& __a = allocator_type()) 20472: : _M_t(__comp, _Key_alloc_type(__a)) 20472: { _M_t._M_insert_range_equal(__first, __last); } 20472: # 218 "/usr/include/c++/10/bits/stl_multiset.h" 3 20472: multiset(const multiset&) = default; 20472: # 227 "/usr/include/c++/10/bits/stl_multiset.h" 3 20472: multiset(multiset&&) = default; 20472: # 239 "/usr/include/c++/10/bits/stl_multiset.h" 3 20472: multiset(initializer_list __l, 20472: const _Compare& __comp = _Compare(), 20472: const allocator_type& __a = allocator_type()) 20472: : _M_t(__comp, _Key_alloc_type(__a)) 20472: { _M_t._M_insert_range_equal(__l.begin(), __l.end()); } 20472: 20472: 20472: explicit 20472: multiset(const allocator_type& __a) 20472: : _M_t(_Key_alloc_type(__a)) { } 20472: 20472: 20472: multiset(const multiset& __m, const allocator_type& __a) 20472: : _M_t(__m._M_t, _Key_alloc_type(__a)) { } 20472: 20472: 20472: multiset(multiset&& __m, const allocator_type& __a) 20472: noexcept(is_nothrow_copy_constructible<_Compare>::value 20472: && _Alloc_traits::_S_always_equal()) 20472: : _M_t(std::move(__m._M_t), _Key_alloc_type(__a)) { } 20472: 20472: 20472: multiset(initializer_list __l, const allocator_type& __a) 20472: : _M_t(_Key_alloc_type(__a)) 20472: { _M_t._M_insert_range_equal(__l.begin(), __l.end()); } 20472: 20472: 20472: template 20472: multiset(_InputIterator __first, _InputIterator __last, 20472: const allocator_type& __a) 20472: : _M_t(_Key_alloc_type(__a)) 20472: { _M_t._M_insert_range_equal(__first, __last); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: ~multiset() = default; 20472: # 293 "/usr/include/c++/10/bits/stl_multiset.h" 3 20472: multiset& 20472: operator=(const multiset&) = default; 20472: 20472: 20472: multiset& 20472: operator=(multiset&&) = default; 20472: # 311 "/usr/include/c++/10/bits/stl_multiset.h" 3 20472: multiset& 20472: operator=(initializer_list __l) 20472: { 20472: _M_t._M_assign_equal(__l.begin(), __l.end()); 20472: return *this; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: key_compare 20472: key_comp() const 20472: { return _M_t.key_comp(); } 20472: 20472: value_compare 20472: value_comp() const 20472: { return _M_t.key_comp(); } 20472: 20472: allocator_type 20472: get_allocator() const noexcept 20472: { return allocator_type(_M_t.get_allocator()); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: iterator 20472: begin() const noexcept 20472: { return _M_t.begin(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: iterator 20472: end() const noexcept 20472: { return _M_t.end(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: reverse_iterator 20472: rbegin() const noexcept 20472: { return _M_t.rbegin(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: reverse_iterator 20472: rend() const noexcept 20472: { return _M_t.rend(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: iterator 20472: cbegin() const noexcept 20472: { return _M_t.begin(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: iterator 20472: cend() const noexcept 20472: { return _M_t.end(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: reverse_iterator 20472: crbegin() const noexcept 20472: { return _M_t.rbegin(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: reverse_iterator 20472: crend() const noexcept 20472: { return _M_t.rend(); } 20472: 20472: 20472: 20472: bool 20472: empty() const noexcept 20472: { return _M_t.empty(); } 20472: 20472: 20472: size_type 20472: size() const noexcept 20472: { return _M_t.size(); } 20472: 20472: 20472: size_type 20472: max_size() const noexcept 20472: { return _M_t.max_size(); } 20472: # 436 "/usr/include/c++/10/bits/stl_multiset.h" 3 20472: void 20472: swap(multiset& __x) 20472: noexcept(__is_nothrow_swappable<_Compare>::value) 20472: { _M_t.swap(__x._M_t); } 20472: # 455 "/usr/include/c++/10/bits/stl_multiset.h" 3 20472: template 20472: iterator 20472: emplace(_Args&&... __args) 20472: { return _M_t._M_emplace_equal(std::forward<_Args>(__args)...); } 20472: # 481 "/usr/include/c++/10/bits/stl_multiset.h" 3 20472: template 20472: iterator 20472: emplace_hint(const_iterator __pos, _Args&&... __args) 20472: { 20472: return _M_t._M_emplace_hint_equal(__pos, 20472: std::forward<_Args>(__args)...); 20472: } 20472: # 501 "/usr/include/c++/10/bits/stl_multiset.h" 3 20472: iterator 20472: insert(const value_type& __x) 20472: { return _M_t._M_insert_equal(__x); } 20472: 20472: 20472: iterator 20472: insert(value_type&& __x) 20472: { return _M_t._M_insert_equal(std::move(__x)); } 20472: # 531 "/usr/include/c++/10/bits/stl_multiset.h" 3 20472: iterator 20472: insert(const_iterator __position, const value_type& __x) 20472: { return _M_t._M_insert_equal_(__position, __x); } 20472: 20472: 20472: iterator 20472: insert(const_iterator __position, value_type&& __x) 20472: { return _M_t._M_insert_equal_(__position, std::move(__x)); } 20472: # 549 "/usr/include/c++/10/bits/stl_multiset.h" 3 20472: template 20472: void 20472: insert(_InputIterator __first, _InputIterator __last) 20472: { _M_t._M_insert_range_equal(__first, __last); } 20472: # 562 "/usr/include/c++/10/bits/stl_multiset.h" 3 20472: void 20472: insert(initializer_list __l) 20472: { this->insert(__l.begin(), __l.end()); } 20472: # 637 "/usr/include/c++/10/bits/stl_multiset.h" 3 20472: __attribute ((__abi_tag__ ("cxx11"))) 20472: iterator 20472: erase(const_iterator __position) 20472: { return _M_t.erase(__position); } 20472: # 668 "/usr/include/c++/10/bits/stl_multiset.h" 3 20472: size_type 20472: erase(const key_type& __x) 20472: { return _M_t.erase(__x); } 20472: # 689 "/usr/include/c++/10/bits/stl_multiset.h" 3 20472: __attribute ((__abi_tag__ ("cxx11"))) 20472: iterator 20472: erase(const_iterator __first, const_iterator __last) 20472: { return _M_t.erase(__first, __last); } 20472: # 717 "/usr/include/c++/10/bits/stl_multiset.h" 3 20472: void 20472: clear() noexcept 20472: { _M_t.clear(); } 20472: # 729 "/usr/include/c++/10/bits/stl_multiset.h" 3 20472: size_type 20472: count(const key_type& __x) const 20472: { return _M_t.count(__x); } 20472: # 774 "/usr/include/c++/10/bits/stl_multiset.h" 3 20472: iterator 20472: find(const key_type& __x) 20472: { return _M_t.find(__x); } 20472: 20472: const_iterator 20472: find(const key_type& __x) const 20472: { return _M_t.find(__x); } 20472: # 809 "/usr/include/c++/10/bits/stl_multiset.h" 3 20472: iterator 20472: lower_bound(const key_type& __x) 20472: { return _M_t.lower_bound(__x); } 20472: 20472: const_iterator 20472: lower_bound(const key_type& __x) const 20472: { return _M_t.lower_bound(__x); } 20472: # 839 "/usr/include/c++/10/bits/stl_multiset.h" 3 20472: iterator 20472: upper_bound(const key_type& __x) 20472: { return _M_t.upper_bound(__x); } 20472: 20472: const_iterator 20472: upper_bound(const key_type& __x) const 20472: { return _M_t.upper_bound(__x); } 20472: # 878 "/usr/include/c++/10/bits/stl_multiset.h" 3 20472: std::pair 20472: equal_range(const key_type& __x) 20472: { return _M_t.equal_range(__x); } 20472: 20472: std::pair 20472: equal_range(const key_type& __x) const 20472: { return _M_t.equal_range(__x); } 20472: # 901 "/usr/include/c++/10/bits/stl_multiset.h" 3 20472: template 20472: friend bool 20472: operator==(const multiset<_K1, _C1, _A1>&, 20472: const multiset<_K1, _C1, _A1>&); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: friend bool 20472: operator< (const multiset<_K1, _C1, _A1>&, 20472: const multiset<_K1, _C1, _A1>&); 20472: 20472: }; 20472: # 969 "/usr/include/c++/10/bits/stl_multiset.h" 3 20472: template 20472: inline bool 20472: operator==(const multiset<_Key, _Compare, _Alloc>& __x, 20472: const multiset<_Key, _Compare, _Alloc>& __y) 20472: { return __x._M_t == __y._M_t; } 20472: # 1007 "/usr/include/c++/10/bits/stl_multiset.h" 3 20472: template 20472: inline bool 20472: operator<(const multiset<_Key, _Compare, _Alloc>& __x, 20472: const multiset<_Key, _Compare, _Alloc>& __y) 20472: { return __x._M_t < __y._M_t; } 20472: 20472: 20472: template 20472: inline bool 20472: operator!=(const multiset<_Key, _Compare, _Alloc>& __x, 20472: const multiset<_Key, _Compare, _Alloc>& __y) 20472: { return !(__x == __y); } 20472: 20472: 20472: template 20472: inline bool 20472: operator>(const multiset<_Key,_Compare,_Alloc>& __x, 20472: const multiset<_Key,_Compare,_Alloc>& __y) 20472: { return __y < __x; } 20472: 20472: 20472: template 20472: inline bool 20472: operator<=(const multiset<_Key, _Compare, _Alloc>& __x, 20472: const multiset<_Key, _Compare, _Alloc>& __y) 20472: { return !(__y < __x); } 20472: 20472: 20472: template 20472: inline bool 20472: operator>=(const multiset<_Key, _Compare, _Alloc>& __x, 20472: const multiset<_Key, _Compare, _Alloc>& __y) 20472: { return !(__x < __y); } 20472: 20472: 20472: 20472: template 20472: inline void 20472: swap(multiset<_Key, _Compare, _Alloc>& __x, 20472: multiset<_Key, _Compare, _Alloc>& __y) 20472: noexcept(noexcept(__x.swap(__y))) 20472: { __x.swap(__y); } 20472: 20472: 20472: # 1072 "/usr/include/c++/10/bits/stl_multiset.h" 3 20472: 20472: } 20472: # 63 "/usr/include/c++/10/set" 2 3 20472: # 11 "./db/range_tombstone_fragmenter.h" 2 20472: 20472: 20472: 20472: 20472: # 1 "./db/pinned_iterators_manager.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "./table/internal_iterator.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "./table/format.h" 1 20472: # 10 "./table/format.h" 20472: 20472: 20472: 20472: # 1 "./file/file_prefetch_buffer.h" 1 20472: # 10 "./file/file_prefetch_buffer.h" 20472: 20472: 20472: # 1 "/usr/include/c++/10/sstream" 1 3 20472: # 36 "/usr/include/c++/10/sstream" 3 20472: 20472: # 37 "/usr/include/c++/10/sstream" 3 20472: 20472: # 1 "/usr/include/c++/10/istream" 1 3 20472: # 36 "/usr/include/c++/10/istream" 3 20472: 20472: # 37 "/usr/include/c++/10/istream" 3 20472: 20472: # 1 "/usr/include/c++/10/ios" 1 3 20472: # 36 "/usr/include/c++/10/ios" 3 20472: 20472: # 37 "/usr/include/c++/10/ios" 3 20472: 20472: 20472: 20472: 20472: 20472: # 1 "/usr/include/c++/10/bits/ios_base.h" 1 3 20472: # 37 "/usr/include/c++/10/bits/ios_base.h" 3 20472: 20472: # 38 "/usr/include/c++/10/bits/ios_base.h" 3 20472: 20472: 20472: 20472: # 1 "/usr/include/c++/10/bits/locale_classes.h" 1 3 20472: # 37 "/usr/include/c++/10/bits/locale_classes.h" 3 20472: 20472: # 38 "/usr/include/c++/10/bits/locale_classes.h" 3 20472: 20472: 20472: 20472: 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: # 62 "/usr/include/c++/10/bits/locale_classes.h" 3 20472: class locale 20472: { 20472: public: 20472: 20472: 20472: typedef int category; 20472: 20472: 20472: class facet; 20472: class id; 20472: class _Impl; 20472: 20472: friend class facet; 20472: friend class _Impl; 20472: 20472: template 20472: friend bool 20472: has_facet(const locale&) throw(); 20472: 20472: template 20472: friend const _Facet& 20472: use_facet(const locale&); 20472: 20472: template 20472: friend struct __use_cache; 20472: # 98 "/usr/include/c++/10/bits/locale_classes.h" 3 20472: static const category none = 0; 20472: static const category ctype = 1L << 0; 20472: static const category numeric = 1L << 1; 20472: static const category collate = 1L << 2; 20472: static const category time = 1L << 3; 20472: static const category monetary = 1L << 4; 20472: static const category messages = 1L << 5; 20472: static const category all = (ctype | numeric | collate | 20472: time | monetary | messages); 20472: # 117 "/usr/include/c++/10/bits/locale_classes.h" 3 20472: locale() throw(); 20472: # 126 "/usr/include/c++/10/bits/locale_classes.h" 3 20472: locale(const locale& __other) throw(); 20472: # 136 "/usr/include/c++/10/bits/locale_classes.h" 3 20472: explicit 20472: locale(const char* __s); 20472: # 151 "/usr/include/c++/10/bits/locale_classes.h" 3 20472: locale(const locale& __base, const char* __s, category __cat); 20472: # 162 "/usr/include/c++/10/bits/locale_classes.h" 3 20472: explicit 20472: locale(const std::string& __s) : locale(__s.c_str()) { } 20472: # 177 "/usr/include/c++/10/bits/locale_classes.h" 3 20472: locale(const locale& __base, const std::string& __s, category __cat) 20472: : locale(__base, __s.c_str(), __cat) { } 20472: # 192 "/usr/include/c++/10/bits/locale_classes.h" 3 20472: locale(const locale& __base, const locale& __add, category __cat); 20472: # 205 "/usr/include/c++/10/bits/locale_classes.h" 3 20472: template 20472: locale(const locale& __other, _Facet* __f); 20472: 20472: 20472: ~locale() throw(); 20472: # 219 "/usr/include/c++/10/bits/locale_classes.h" 3 20472: const locale& 20472: operator=(const locale& __other) throw(); 20472: # 234 "/usr/include/c++/10/bits/locale_classes.h" 3 20472: template 20472: locale 20472: combine(const locale& __other) const; 20472: 20472: 20472: 20472: 20472: 20472: 20472: __attribute ((__abi_tag__ ("cxx11"))) 20472: string 20472: name() const; 20472: # 254 "/usr/include/c++/10/bits/locale_classes.h" 3 20472: bool 20472: operator==(const locale& __other) const throw(); 20472: # 264 "/usr/include/c++/10/bits/locale_classes.h" 3 20472: bool 20472: operator!=(const locale& __other) const throw() 20472: { return !(this->operator==(__other)); } 20472: # 284 "/usr/include/c++/10/bits/locale_classes.h" 3 20472: template 20472: bool 20472: operator()(const basic_string<_Char, _Traits, _Alloc>& __s1, 20472: const basic_string<_Char, _Traits, _Alloc>& __s2) const; 20472: # 300 "/usr/include/c++/10/bits/locale_classes.h" 3 20472: static locale 20472: global(const locale& __loc); 20472: 20472: 20472: 20472: 20472: static const locale& 20472: classic(); 20472: 20472: private: 20472: 20472: _Impl* _M_impl; 20472: 20472: 20472: static _Impl* _S_classic; 20472: 20472: 20472: static _Impl* _S_global; 20472: 20472: 20472: 20472: 20472: 20472: static const char* const* const _S_categories; 20472: # 335 "/usr/include/c++/10/bits/locale_classes.h" 3 20472: enum { _S_categories_size = 6 + 6 }; 20472: 20472: 20472: static __gthread_once_t _S_once; 20472: 20472: 20472: explicit 20472: locale(_Impl*) throw(); 20472: 20472: static void 20472: _S_initialize(); 20472: 20472: static void 20472: _S_initialize_once() throw(); 20472: 20472: static category 20472: _S_normalize_category(category); 20472: 20472: void 20472: _M_coalesce(const locale& __base, const locale& __add, category __cat); 20472: 20472: 20472: static const id* const _S_twinned_facets[]; 20472: 20472: }; 20472: # 373 "/usr/include/c++/10/bits/locale_classes.h" 3 20472: class locale::facet 20472: { 20472: private: 20472: friend class locale; 20472: friend class locale::_Impl; 20472: 20472: mutable _Atomic_word _M_refcount; 20472: 20472: 20472: static __c_locale _S_c_locale; 20472: 20472: 20472: static const char _S_c_name[2]; 20472: 20472: 20472: static __gthread_once_t _S_once; 20472: 20472: 20472: static void 20472: _S_initialize_once(); 20472: 20472: protected: 20472: # 404 "/usr/include/c++/10/bits/locale_classes.h" 3 20472: explicit 20472: facet(size_t __refs = 0) throw() : _M_refcount(__refs ? 1 : 0) 20472: { } 20472: 20472: 20472: virtual 20472: ~facet(); 20472: 20472: static void 20472: _S_create_c_locale(__c_locale& __cloc, const char* __s, 20472: __c_locale __old = 0); 20472: 20472: static __c_locale 20472: _S_clone_c_locale(__c_locale& __cloc) throw(); 20472: 20472: static void 20472: _S_destroy_c_locale(__c_locale& __cloc); 20472: 20472: static __c_locale 20472: _S_lc_ctype_c_locale(__c_locale __cloc, const char* __s); 20472: 20472: 20472: 20472: static __c_locale 20472: _S_get_c_locale(); 20472: 20472: __attribute__ ((__const__)) static const char* 20472: _S_get_c_name() throw(); 20472: # 440 "/usr/include/c++/10/bits/locale_classes.h" 3 20472: facet(const facet&) = delete; 20472: 20472: facet& 20472: operator=(const facet&) = delete; 20472: 20472: 20472: private: 20472: void 20472: _M_add_reference() const throw() 20472: { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } 20472: 20472: void 20472: _M_remove_reference() const throw() 20472: { 20472: 20472: ; 20472: if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1) 20472: { 20472: ; 20472: try 20472: { delete this; } 20472: catch(...) 20472: { } 20472: } 20472: } 20472: 20472: const facet* _M_sso_shim(const id*) const; 20472: const facet* _M_cow_shim(const id*) const; 20472: 20472: protected: 20472: class __shim; 20472: }; 20472: # 485 "/usr/include/c++/10/bits/locale_classes.h" 3 20472: class locale::id 20472: { 20472: private: 20472: friend class locale; 20472: friend class locale::_Impl; 20472: 20472: template 20472: friend const _Facet& 20472: use_facet(const locale&); 20472: 20472: template 20472: friend bool 20472: has_facet(const locale&) throw(); 20472: 20472: 20472: 20472: 20472: mutable size_t _M_index; 20472: 20472: 20472: static _Atomic_word _S_refcount; 20472: 20472: void 20472: operator=(const id&); 20472: 20472: id(const id&); 20472: 20472: public: 20472: 20472: 20472: 20472: id() { } 20472: 20472: size_t 20472: _M_id() const throw(); 20472: }; 20472: 20472: 20472: 20472: class locale::_Impl 20472: { 20472: public: 20472: 20472: friend class locale; 20472: friend class locale::facet; 20472: 20472: template 20472: friend bool 20472: has_facet(const locale&) throw(); 20472: 20472: template 20472: friend const _Facet& 20472: use_facet(const locale&); 20472: 20472: template 20472: friend struct __use_cache; 20472: 20472: private: 20472: 20472: _Atomic_word _M_refcount; 20472: const facet** _M_facets; 20472: size_t _M_facets_size; 20472: const facet** _M_caches; 20472: char** _M_names; 20472: static const locale::id* const _S_id_ctype[]; 20472: static const locale::id* const _S_id_numeric[]; 20472: static const locale::id* const _S_id_collate[]; 20472: static const locale::id* const _S_id_time[]; 20472: static const locale::id* const _S_id_monetary[]; 20472: static const locale::id* const _S_id_messages[]; 20472: static const locale::id* const* const _S_facet_categories[]; 20472: 20472: void 20472: _M_add_reference() throw() 20472: { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } 20472: 20472: void 20472: _M_remove_reference() throw() 20472: { 20472: 20472: ; 20472: if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1) 20472: { 20472: ; 20472: try 20472: { delete this; } 20472: catch(...) 20472: { } 20472: } 20472: } 20472: 20472: _Impl(const _Impl&, size_t); 20472: _Impl(const char*, size_t); 20472: _Impl(size_t) throw(); 20472: 20472: ~_Impl() throw(); 20472: 20472: _Impl(const _Impl&); 20472: 20472: void 20472: operator=(const _Impl&); 20472: 20472: bool 20472: _M_check_same_name() 20472: { 20472: bool __ret = true; 20472: if (_M_names[1]) 20472: 20472: for (size_t __i = 0; __ret && __i < _S_categories_size - 1; ++__i) 20472: __ret = __builtin_strcmp(_M_names[__i], _M_names[__i + 1]) == 0; 20472: return __ret; 20472: } 20472: 20472: void 20472: _M_replace_categories(const _Impl*, category); 20472: 20472: void 20472: _M_replace_category(const _Impl*, const locale::id* const*); 20472: 20472: void 20472: _M_replace_facet(const _Impl*, const locale::id*); 20472: 20472: void 20472: _M_install_facet(const locale::id*, const facet*); 20472: 20472: template 20472: void 20472: _M_init_facet(_Facet* __facet) 20472: { _M_install_facet(&_Facet::id, __facet); } 20472: 20472: template 20472: void 20472: _M_init_facet_unchecked(_Facet* __facet) 20472: { 20472: __facet->_M_add_reference(); 20472: _M_facets[_Facet::id._M_id()] = __facet; 20472: } 20472: 20472: void 20472: _M_install_cache(const facet*, size_t); 20472: 20472: void _M_init_extra(facet**); 20472: void _M_init_extra(void*, void*, const char*, const char*); 20472: }; 20472: # 643 "/usr/include/c++/10/bits/locale_classes.h" 3 20472: template 20472: class __cxx11:: collate : public locale::facet 20472: { 20472: public: 20472: 20472: 20472: 20472: typedef _CharT char_type; 20472: typedef basic_string<_CharT> string_type; 20472: 20472: 20472: protected: 20472: 20472: 20472: __c_locale _M_c_locale_collate; 20472: 20472: public: 20472: 20472: static locale::id id; 20472: # 670 "/usr/include/c++/10/bits/locale_classes.h" 3 20472: explicit 20472: collate(size_t __refs = 0) 20472: : facet(__refs), _M_c_locale_collate(_S_get_c_locale()) 20472: { } 20472: # 684 "/usr/include/c++/10/bits/locale_classes.h" 3 20472: explicit 20472: collate(__c_locale __cloc, size_t __refs = 0) 20472: : facet(__refs), _M_c_locale_collate(_S_clone_c_locale(__cloc)) 20472: { } 20472: # 701 "/usr/include/c++/10/bits/locale_classes.h" 3 20472: int 20472: compare(const _CharT* __lo1, const _CharT* __hi1, 20472: const _CharT* __lo2, const _CharT* __hi2) const 20472: { return this->do_compare(__lo1, __hi1, __lo2, __hi2); } 20472: # 720 "/usr/include/c++/10/bits/locale_classes.h" 3 20472: string_type 20472: transform(const _CharT* __lo, const _CharT* __hi) const 20472: { return this->do_transform(__lo, __hi); } 20472: # 734 "/usr/include/c++/10/bits/locale_classes.h" 3 20472: long 20472: hash(const _CharT* __lo, const _CharT* __hi) const 20472: { return this->do_hash(__lo, __hi); } 20472: 20472: 20472: int 20472: _M_compare(const _CharT*, const _CharT*) const throw(); 20472: 20472: size_t 20472: _M_transform(_CharT*, const _CharT*, size_t) const throw(); 20472: 20472: protected: 20472: 20472: virtual 20472: ~collate() 20472: { _S_destroy_c_locale(_M_c_locale_collate); } 20472: # 763 "/usr/include/c++/10/bits/locale_classes.h" 3 20472: virtual int 20472: do_compare(const _CharT* __lo1, const _CharT* __hi1, 20472: const _CharT* __lo2, const _CharT* __hi2) const; 20472: # 777 "/usr/include/c++/10/bits/locale_classes.h" 3 20472: virtual string_type 20472: do_transform(const _CharT* __lo, const _CharT* __hi) const; 20472: # 790 "/usr/include/c++/10/bits/locale_classes.h" 3 20472: virtual long 20472: do_hash(const _CharT* __lo, const _CharT* __hi) const; 20472: }; 20472: 20472: template 20472: locale::id collate<_CharT>::id; 20472: 20472: 20472: template<> 20472: int 20472: collate::_M_compare(const char*, const char*) const throw(); 20472: 20472: template<> 20472: size_t 20472: collate::_M_transform(char*, const char*, size_t) const throw(); 20472: 20472: 20472: template<> 20472: int 20472: collate::_M_compare(const wchar_t*, const wchar_t*) const throw(); 20472: 20472: template<> 20472: size_t 20472: collate::_M_transform(wchar_t*, const wchar_t*, size_t) const throw(); 20472: 20472: 20472: 20472: template 20472: class __cxx11:: collate_byname : public collate<_CharT> 20472: { 20472: public: 20472: 20472: 20472: typedef _CharT char_type; 20472: typedef basic_string<_CharT> string_type; 20472: 20472: 20472: explicit 20472: collate_byname(const char* __s, size_t __refs = 0) 20472: : collate<_CharT>(__refs) 20472: { 20472: if (__builtin_strcmp(__s, "C") != 0 20472: && __builtin_strcmp(__s, "POSIX") != 0) 20472: { 20472: this->_S_destroy_c_locale(this->_M_c_locale_collate); 20472: this->_S_create_c_locale(this->_M_c_locale_collate, __s); 20472: } 20472: } 20472: 20472: 20472: explicit 20472: collate_byname(const string& __s, size_t __refs = 0) 20472: : collate_byname(__s.c_str(), __refs) { } 20472: 20472: 20472: protected: 20472: virtual 20472: ~collate_byname() { } 20472: }; 20472: 20472: 20472: } 20472: 20472: # 1 "/usr/include/c++/10/bits/locale_classes.tcc" 1 3 20472: # 37 "/usr/include/c++/10/bits/locale_classes.tcc" 3 20472: 20472: # 38 "/usr/include/c++/10/bits/locale_classes.tcc" 3 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: template 20472: locale:: 20472: locale(const locale& __other, _Facet* __f) 20472: { 20472: _M_impl = new _Impl(*__other._M_impl, 1); 20472: 20472: try 20472: { _M_impl->_M_install_facet(&_Facet::id, __f); } 20472: catch(...) 20472: { 20472: _M_impl->_M_remove_reference(); 20472: throw; 20472: } 20472: delete [] _M_impl->_M_names[0]; 20472: _M_impl->_M_names[0] = 0; 20472: } 20472: 20472: template 20472: locale 20472: locale:: 20472: combine(const locale& __other) const 20472: { 20472: _Impl* __tmp = new _Impl(*_M_impl, 1); 20472: try 20472: { 20472: __tmp->_M_replace_facet(__other._M_impl, &_Facet::id); 20472: } 20472: catch(...) 20472: { 20472: __tmp->_M_remove_reference(); 20472: throw; 20472: } 20472: return locale(__tmp); 20472: } 20472: 20472: template 20472: bool 20472: locale:: 20472: operator()(const basic_string<_CharT, _Traits, _Alloc>& __s1, 20472: const basic_string<_CharT, _Traits, _Alloc>& __s2) const 20472: { 20472: typedef std::collate<_CharT> __collate_type; 20472: const __collate_type& __collate = use_facet<__collate_type>(*this); 20472: return (__collate.compare(__s1.data(), __s1.data() + __s1.length(), 20472: __s2.data(), __s2.data() + __s2.length()) < 0); 20472: } 20472: # 102 "/usr/include/c++/10/bits/locale_classes.tcc" 3 20472: template 20472: bool 20472: has_facet(const locale& __loc) throw() 20472: { 20472: const size_t __i = _Facet::id._M_id(); 20472: const locale::facet** __facets = __loc._M_impl->_M_facets; 20472: return (__i < __loc._M_impl->_M_facets_size 20472: 20472: && dynamic_cast(__facets[__i])); 20472: 20472: 20472: 20472: } 20472: # 130 "/usr/include/c++/10/bits/locale_classes.tcc" 3 20472: template 20472: const _Facet& 20472: use_facet(const locale& __loc) 20472: { 20472: const size_t __i = _Facet::id._M_id(); 20472: const locale::facet** __facets = __loc._M_impl->_M_facets; 20472: if (__i >= __loc._M_impl->_M_facets_size || !__facets[__i]) 20472: __throw_bad_cast(); 20472: 20472: return dynamic_cast(*__facets[__i]); 20472: 20472: 20472: 20472: } 20472: 20472: 20472: 20472: template 20472: int 20472: collate<_CharT>::_M_compare(const _CharT*, const _CharT*) const throw () 20472: { return 0; } 20472: 20472: 20472: template 20472: size_t 20472: collate<_CharT>::_M_transform(_CharT*, const _CharT*, size_t) const throw () 20472: { return 0; } 20472: 20472: template 20472: int 20472: collate<_CharT>:: 20472: do_compare(const _CharT* __lo1, const _CharT* __hi1, 20472: const _CharT* __lo2, const _CharT* __hi2) const 20472: { 20472: 20472: 20472: const string_type __one(__lo1, __hi1); 20472: const string_type __two(__lo2, __hi2); 20472: 20472: const _CharT* __p = __one.c_str(); 20472: const _CharT* __pend = __one.data() + __one.length(); 20472: const _CharT* __q = __two.c_str(); 20472: const _CharT* __qend = __two.data() + __two.length(); 20472: 20472: 20472: 20472: 20472: for (;;) 20472: { 20472: const int __res = _M_compare(__p, __q); 20472: if (__res) 20472: return __res; 20472: 20472: __p += char_traits<_CharT>::length(__p); 20472: __q += char_traits<_CharT>::length(__q); 20472: if (__p == __pend && __q == __qend) 20472: return 0; 20472: else if (__p == __pend) 20472: return -1; 20472: else if (__q == __qend) 20472: return 1; 20472: 20472: __p++; 20472: __q++; 20472: } 20472: } 20472: 20472: template 20472: typename collate<_CharT>::string_type 20472: collate<_CharT>:: 20472: do_transform(const _CharT* __lo, const _CharT* __hi) const 20472: { 20472: string_type __ret; 20472: 20472: 20472: const string_type __str(__lo, __hi); 20472: 20472: const _CharT* __p = __str.c_str(); 20472: const _CharT* __pend = __str.data() + __str.length(); 20472: 20472: size_t __len = (__hi - __lo) * 2; 20472: 20472: _CharT* __c = new _CharT[__len]; 20472: 20472: try 20472: { 20472: 20472: 20472: 20472: for (;;) 20472: { 20472: 20472: size_t __res = _M_transform(__c, __p, __len); 20472: 20472: 20472: if (__res >= __len) 20472: { 20472: __len = __res + 1; 20472: delete [] __c, __c = 0; 20472: __c = new _CharT[__len]; 20472: __res = _M_transform(__c, __p, __len); 20472: } 20472: 20472: __ret.append(__c, __res); 20472: __p += char_traits<_CharT>::length(__p); 20472: if (__p == __pend) 20472: break; 20472: 20472: __p++; 20472: __ret.push_back(_CharT()); 20472: } 20472: } 20472: catch(...) 20472: { 20472: delete [] __c; 20472: throw; 20472: } 20472: 20472: delete [] __c; 20472: 20472: return __ret; 20472: } 20472: 20472: template 20472: long 20472: collate<_CharT>:: 20472: do_hash(const _CharT* __lo, const _CharT* __hi) const 20472: { 20472: unsigned long __val = 0; 20472: for (; __lo < __hi; ++__lo) 20472: __val = 20472: *__lo + ((__val << 7) 20472: | (__val >> (__gnu_cxx::__numeric_traits:: 20472: __digits - 7))); 20472: return static_cast(__val); 20472: } 20472: 20472: 20472: 20472: 20472: extern template class collate; 20472: extern template class collate_byname; 20472: 20472: extern template 20472: const collate& 20472: use_facet >(const locale&); 20472: 20472: extern template 20472: bool 20472: has_facet >(const locale&); 20472: 20472: 20472: extern template class collate; 20472: extern template class collate_byname; 20472: 20472: extern template 20472: const collate& 20472: use_facet >(const locale&); 20472: 20472: extern template 20472: bool 20472: has_facet >(const locale&); 20472: 20472: 20472: 20472: 20472: } 20472: # 854 "/usr/include/c++/10/bits/locale_classes.h" 2 3 20472: # 42 "/usr/include/c++/10/bits/ios_base.h" 2 3 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: enum _Ios_Fmtflags 20472: { 20472: _S_boolalpha = 1L << 0, 20472: _S_dec = 1L << 1, 20472: _S_fixed = 1L << 2, 20472: _S_hex = 1L << 3, 20472: _S_internal = 1L << 4, 20472: _S_left = 1L << 5, 20472: _S_oct = 1L << 6, 20472: _S_right = 1L << 7, 20472: _S_scientific = 1L << 8, 20472: _S_showbase = 1L << 9, 20472: _S_showpoint = 1L << 10, 20472: _S_showpos = 1L << 11, 20472: _S_skipws = 1L << 12, 20472: _S_unitbuf = 1L << 13, 20472: _S_uppercase = 1L << 14, 20472: _S_adjustfield = _S_left | _S_right | _S_internal, 20472: _S_basefield = _S_dec | _S_oct | _S_hex, 20472: _S_floatfield = _S_scientific | _S_fixed, 20472: _S_ios_fmtflags_end = 1L << 16, 20472: _S_ios_fmtflags_max = 0x7fffffff, 20472: _S_ios_fmtflags_min = ~0x7fffffff 20472: }; 20472: 20472: inline constexpr _Ios_Fmtflags 20472: operator&(_Ios_Fmtflags __a, _Ios_Fmtflags __b) 20472: { return _Ios_Fmtflags(static_cast(__a) & static_cast(__b)); } 20472: 20472: inline constexpr _Ios_Fmtflags 20472: operator|(_Ios_Fmtflags __a, _Ios_Fmtflags __b) 20472: { return _Ios_Fmtflags(static_cast(__a) | static_cast(__b)); } 20472: 20472: inline constexpr _Ios_Fmtflags 20472: operator^(_Ios_Fmtflags __a, _Ios_Fmtflags __b) 20472: { return _Ios_Fmtflags(static_cast(__a) ^ static_cast(__b)); } 20472: 20472: inline constexpr _Ios_Fmtflags 20472: operator~(_Ios_Fmtflags __a) 20472: { return _Ios_Fmtflags(~static_cast(__a)); } 20472: 20472: inline const _Ios_Fmtflags& 20472: operator|=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) 20472: { return __a = __a | __b; } 20472: 20472: inline const _Ios_Fmtflags& 20472: operator&=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) 20472: { return __a = __a & __b; } 20472: 20472: inline const _Ios_Fmtflags& 20472: operator^=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) 20472: { return __a = __a ^ __b; } 20472: 20472: 20472: enum _Ios_Openmode 20472: { 20472: _S_app = 1L << 0, 20472: _S_ate = 1L << 1, 20472: _S_bin = 1L << 2, 20472: _S_in = 1L << 3, 20472: _S_out = 1L << 4, 20472: _S_trunc = 1L << 5, 20472: _S_ios_openmode_end = 1L << 16, 20472: _S_ios_openmode_max = 0x7fffffff, 20472: _S_ios_openmode_min = ~0x7fffffff 20472: }; 20472: 20472: inline constexpr _Ios_Openmode 20472: operator&(_Ios_Openmode __a, _Ios_Openmode __b) 20472: { return _Ios_Openmode(static_cast(__a) & static_cast(__b)); } 20472: 20472: inline constexpr _Ios_Openmode 20472: operator|(_Ios_Openmode __a, _Ios_Openmode __b) 20472: { return _Ios_Openmode(static_cast(__a) | static_cast(__b)); } 20472: 20472: inline constexpr _Ios_Openmode 20472: operator^(_Ios_Openmode __a, _Ios_Openmode __b) 20472: { return _Ios_Openmode(static_cast(__a) ^ static_cast(__b)); } 20472: 20472: inline constexpr _Ios_Openmode 20472: operator~(_Ios_Openmode __a) 20472: { return _Ios_Openmode(~static_cast(__a)); } 20472: 20472: inline const _Ios_Openmode& 20472: operator|=(_Ios_Openmode& __a, _Ios_Openmode __b) 20472: { return __a = __a | __b; } 20472: 20472: inline const _Ios_Openmode& 20472: operator&=(_Ios_Openmode& __a, _Ios_Openmode __b) 20472: { return __a = __a & __b; } 20472: 20472: inline const _Ios_Openmode& 20472: operator^=(_Ios_Openmode& __a, _Ios_Openmode __b) 20472: { return __a = __a ^ __b; } 20472: 20472: 20472: enum _Ios_Iostate 20472: { 20472: _S_goodbit = 0, 20472: _S_badbit = 1L << 0, 20472: _S_eofbit = 1L << 1, 20472: _S_failbit = 1L << 2, 20472: _S_ios_iostate_end = 1L << 16, 20472: _S_ios_iostate_max = 0x7fffffff, 20472: _S_ios_iostate_min = ~0x7fffffff 20472: }; 20472: 20472: inline constexpr _Ios_Iostate 20472: operator&(_Ios_Iostate __a, _Ios_Iostate __b) 20472: { return _Ios_Iostate(static_cast(__a) & static_cast(__b)); } 20472: 20472: inline constexpr _Ios_Iostate 20472: operator|(_Ios_Iostate __a, _Ios_Iostate __b) 20472: { return _Ios_Iostate(static_cast(__a) | static_cast(__b)); } 20472: 20472: inline constexpr _Ios_Iostate 20472: operator^(_Ios_Iostate __a, _Ios_Iostate __b) 20472: { return _Ios_Iostate(static_cast(__a) ^ static_cast(__b)); } 20472: 20472: inline constexpr _Ios_Iostate 20472: operator~(_Ios_Iostate __a) 20472: { return _Ios_Iostate(~static_cast(__a)); } 20472: 20472: inline const _Ios_Iostate& 20472: operator|=(_Ios_Iostate& __a, _Ios_Iostate __b) 20472: { return __a = __a | __b; } 20472: 20472: inline const _Ios_Iostate& 20472: operator&=(_Ios_Iostate& __a, _Ios_Iostate __b) 20472: { return __a = __a & __b; } 20472: 20472: inline const _Ios_Iostate& 20472: operator^=(_Ios_Iostate& __a, _Ios_Iostate __b) 20472: { return __a = __a ^ __b; } 20472: 20472: 20472: enum _Ios_Seekdir 20472: { 20472: _S_beg = 0, 20472: _S_cur = 1, 20472: _S_end = 2, 20472: _S_ios_seekdir_end = 1L << 16 20472: }; 20472: 20472: 20472: 20472: enum class io_errc { stream = 1 }; 20472: 20472: template <> struct is_error_code_enum : public true_type { }; 20472: 20472: const error_category& iostream_category() noexcept; 20472: 20472: inline error_code 20472: make_error_code(io_errc __e) noexcept 20472: { return error_code(static_cast(__e), iostream_category()); } 20472: 20472: inline error_condition 20472: make_error_condition(io_errc __e) noexcept 20472: { return error_condition(static_cast(__e), iostream_category()); } 20472: # 228 "/usr/include/c++/10/bits/ios_base.h" 3 20472: class ios_base 20472: { 20472: # 246 "/usr/include/c++/10/bits/ios_base.h" 3 20472: public: 20472: # 255 "/usr/include/c++/10/bits/ios_base.h" 3 20472: class __attribute ((__abi_tag__ ("cxx11"))) failure : public system_error 20472: { 20472: public: 20472: explicit 20472: failure(const string& __str); 20472: 20472: 20472: explicit 20472: failure(const string&, const error_code&); 20472: 20472: explicit 20472: failure(const char*, const error_code& = io_errc::stream); 20472: 20472: 20472: virtual 20472: ~failure() throw(); 20472: 20472: virtual const char* 20472: what() const throw(); 20472: }; 20472: # 341 "/usr/include/c++/10/bits/ios_base.h" 3 20472: typedef _Ios_Fmtflags fmtflags; 20472: 20472: 20472: static const fmtflags boolalpha = _S_boolalpha; 20472: 20472: 20472: static const fmtflags dec = _S_dec; 20472: 20472: 20472: static const fmtflags fixed = _S_fixed; 20472: 20472: 20472: static const fmtflags hex = _S_hex; 20472: 20472: 20472: 20472: 20472: static const fmtflags internal = _S_internal; 20472: 20472: 20472: 20472: static const fmtflags left = _S_left; 20472: 20472: 20472: static const fmtflags oct = _S_oct; 20472: 20472: 20472: 20472: static const fmtflags right = _S_right; 20472: 20472: 20472: static const fmtflags scientific = _S_scientific; 20472: 20472: 20472: 20472: static const fmtflags showbase = _S_showbase; 20472: 20472: 20472: 20472: static const fmtflags showpoint = _S_showpoint; 20472: 20472: 20472: static const fmtflags showpos = _S_showpos; 20472: 20472: 20472: static const fmtflags skipws = _S_skipws; 20472: 20472: 20472: static const fmtflags unitbuf = _S_unitbuf; 20472: 20472: 20472: 20472: static const fmtflags uppercase = _S_uppercase; 20472: 20472: 20472: static const fmtflags adjustfield = _S_adjustfield; 20472: 20472: 20472: static const fmtflags basefield = _S_basefield; 20472: 20472: 20472: static const fmtflags floatfield = _S_floatfield; 20472: # 416 "/usr/include/c++/10/bits/ios_base.h" 3 20472: typedef _Ios_Iostate iostate; 20472: 20472: 20472: 20472: static const iostate badbit = _S_badbit; 20472: 20472: 20472: static const iostate eofbit = _S_eofbit; 20472: 20472: 20472: 20472: 20472: static const iostate failbit = _S_failbit; 20472: 20472: 20472: static const iostate goodbit = _S_goodbit; 20472: # 447 "/usr/include/c++/10/bits/ios_base.h" 3 20472: typedef _Ios_Openmode openmode; 20472: 20472: 20472: static const openmode app = _S_app; 20472: 20472: 20472: static const openmode ate = _S_ate; 20472: 20472: 20472: 20472: 20472: static const openmode binary = _S_bin; 20472: 20472: 20472: static const openmode in = _S_in; 20472: 20472: 20472: static const openmode out = _S_out; 20472: 20472: 20472: static const openmode trunc = _S_trunc; 20472: # 479 "/usr/include/c++/10/bits/ios_base.h" 3 20472: typedef _Ios_Seekdir seekdir; 20472: 20472: 20472: static const seekdir beg = _S_beg; 20472: 20472: 20472: static const seekdir cur = _S_cur; 20472: 20472: 20472: static const seekdir end = _S_end; 20472: 20472: 20472: 20472: typedef int io_state 20472: __attribute__ ((__deprecated__ ("use '" "std::iostate" "' instead"))); 20472: typedef int open_mode 20472: __attribute__ ((__deprecated__ ("use '" "std::openmode" "' instead"))); 20472: typedef int seek_dir 20472: __attribute__ ((__deprecated__ ("use '" "std::seekdir" "' instead"))); 20472: 20472: typedef std::streampos streampos 20472: __attribute__ ((__deprecated__ ("use '" "std::streampos" "' instead"))); 20472: typedef std::streamoff streamoff 20472: __attribute__ ((__deprecated__ ("use '" "std::streamoff" "' instead"))); 20472: # 512 "/usr/include/c++/10/bits/ios_base.h" 3 20472: enum event 20472: { 20472: erase_event, 20472: imbue_event, 20472: copyfmt_event 20472: }; 20472: # 529 "/usr/include/c++/10/bits/ios_base.h" 3 20472: typedef void (*event_callback) (event __e, ios_base& __b, int __i); 20472: # 541 "/usr/include/c++/10/bits/ios_base.h" 3 20472: void 20472: register_callback(event_callback __fn, int __index); 20472: 20472: protected: 20472: streamsize _M_precision; 20472: streamsize _M_width; 20472: fmtflags _M_flags; 20472: iostate _M_exception; 20472: iostate _M_streambuf_state; 20472: 20472: 20472: 20472: struct _Callback_list 20472: { 20472: 20472: _Callback_list* _M_next; 20472: ios_base::event_callback _M_fn; 20472: int _M_index; 20472: _Atomic_word _M_refcount; 20472: 20472: _Callback_list(ios_base::event_callback __fn, int __index, 20472: _Callback_list* __cb) 20472: : _M_next(__cb), _M_fn(__fn), _M_index(__index), _M_refcount(0) { } 20472: 20472: void 20472: _M_add_reference() { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } 20472: 20472: 20472: int 20472: _M_remove_reference() 20472: { 20472: 20472: ; 20472: int __res = __gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1); 20472: if (__res == 0) 20472: { 20472: ; 20472: } 20472: return __res; 20472: } 20472: }; 20472: 20472: _Callback_list* _M_callbacks; 20472: 20472: void 20472: _M_call_callbacks(event __ev) throw(); 20472: 20472: void 20472: _M_dispose_callbacks(void) throw(); 20472: 20472: 20472: struct _Words 20472: { 20472: void* _M_pword; 20472: long _M_iword; 20472: _Words() : _M_pword(0), _M_iword(0) { } 20472: }; 20472: 20472: 20472: _Words _M_word_zero; 20472: 20472: 20472: 20472: enum { _S_local_word_size = 8 }; 20472: _Words _M_local_word[_S_local_word_size]; 20472: 20472: 20472: int _M_word_size; 20472: _Words* _M_word; 20472: 20472: _Words& 20472: _M_grow_words(int __index, bool __iword); 20472: 20472: 20472: locale _M_ios_locale; 20472: 20472: void 20472: _M_init() throw(); 20472: 20472: public: 20472: 20472: 20472: 20472: 20472: 20472: class Init 20472: { 20472: friend class ios_base; 20472: public: 20472: Init(); 20472: ~Init(); 20472: 20472: 20472: Init(const Init&) = default; 20472: Init& operator=(const Init&) = default; 20472: 20472: 20472: private: 20472: static _Atomic_word _S_refcount; 20472: static bool _S_synced_with_stdio; 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: fmtflags 20472: flags() const 20472: { return _M_flags; } 20472: # 659 "/usr/include/c++/10/bits/ios_base.h" 3 20472: fmtflags 20472: flags(fmtflags __fmtfl) 20472: { 20472: fmtflags __old = _M_flags; 20472: _M_flags = __fmtfl; 20472: return __old; 20472: } 20472: # 675 "/usr/include/c++/10/bits/ios_base.h" 3 20472: fmtflags 20472: setf(fmtflags __fmtfl) 20472: { 20472: fmtflags __old = _M_flags; 20472: _M_flags |= __fmtfl; 20472: return __old; 20472: } 20472: # 692 "/usr/include/c++/10/bits/ios_base.h" 3 20472: fmtflags 20472: setf(fmtflags __fmtfl, fmtflags __mask) 20472: { 20472: fmtflags __old = _M_flags; 20472: _M_flags &= ~__mask; 20472: _M_flags |= (__fmtfl & __mask); 20472: return __old; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: void 20472: unsetf(fmtflags __mask) 20472: { _M_flags &= ~__mask; } 20472: # 718 "/usr/include/c++/10/bits/ios_base.h" 3 20472: streamsize 20472: precision() const 20472: { return _M_precision; } 20472: 20472: 20472: 20472: 20472: 20472: 20472: streamsize 20472: precision(streamsize __prec) 20472: { 20472: streamsize __old = _M_precision; 20472: _M_precision = __prec; 20472: return __old; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: streamsize 20472: width() const 20472: { return _M_width; } 20472: 20472: 20472: 20472: 20472: 20472: 20472: streamsize 20472: width(streamsize __wide) 20472: { 20472: streamsize __old = _M_width; 20472: _M_width = __wide; 20472: return __old; 20472: } 20472: # 769 "/usr/include/c++/10/bits/ios_base.h" 3 20472: static bool 20472: sync_with_stdio(bool __sync = true); 20472: # 781 "/usr/include/c++/10/bits/ios_base.h" 3 20472: locale 20472: imbue(const locale& __loc) throw(); 20472: # 792 "/usr/include/c++/10/bits/ios_base.h" 3 20472: locale 20472: getloc() const 20472: { return _M_ios_locale; } 20472: # 803 "/usr/include/c++/10/bits/ios_base.h" 3 20472: const locale& 20472: _M_getloc() const 20472: { return _M_ios_locale; } 20472: # 822 "/usr/include/c++/10/bits/ios_base.h" 3 20472: static int 20472: xalloc() throw(); 20472: # 838 "/usr/include/c++/10/bits/ios_base.h" 3 20472: long& 20472: iword(int __ix) 20472: { 20472: _Words& __word = ((unsigned)__ix < (unsigned)_M_word_size) 20472: ? _M_word[__ix] : _M_grow_words(__ix, true); 20472: return __word._M_iword; 20472: } 20472: # 859 "/usr/include/c++/10/bits/ios_base.h" 3 20472: void*& 20472: pword(int __ix) 20472: { 20472: _Words& __word = ((unsigned)__ix < (unsigned)_M_word_size) 20472: ? _M_word[__ix] : _M_grow_words(__ix, false); 20472: return __word._M_pword; 20472: } 20472: # 876 "/usr/include/c++/10/bits/ios_base.h" 3 20472: virtual ~ios_base(); 20472: 20472: protected: 20472: ios_base() throw (); 20472: # 890 "/usr/include/c++/10/bits/ios_base.h" 3 20472: public: 20472: ios_base(const ios_base&) = delete; 20472: 20472: ios_base& 20472: operator=(const ios_base&) = delete; 20472: 20472: protected: 20472: void 20472: _M_move(ios_base&) noexcept; 20472: 20472: void 20472: _M_swap(ios_base& __rhs) noexcept; 20472: 20472: }; 20472: 20472: 20472: 20472: inline ios_base& 20472: boolalpha(ios_base& __base) 20472: { 20472: __base.setf(ios_base::boolalpha); 20472: return __base; 20472: } 20472: 20472: 20472: inline ios_base& 20472: noboolalpha(ios_base& __base) 20472: { 20472: __base.unsetf(ios_base::boolalpha); 20472: return __base; 20472: } 20472: 20472: 20472: inline ios_base& 20472: showbase(ios_base& __base) 20472: { 20472: __base.setf(ios_base::showbase); 20472: return __base; 20472: } 20472: 20472: 20472: inline ios_base& 20472: noshowbase(ios_base& __base) 20472: { 20472: __base.unsetf(ios_base::showbase); 20472: return __base; 20472: } 20472: 20472: 20472: inline ios_base& 20472: showpoint(ios_base& __base) 20472: { 20472: __base.setf(ios_base::showpoint); 20472: return __base; 20472: } 20472: 20472: 20472: inline ios_base& 20472: noshowpoint(ios_base& __base) 20472: { 20472: __base.unsetf(ios_base::showpoint); 20472: return __base; 20472: } 20472: 20472: 20472: inline ios_base& 20472: showpos(ios_base& __base) 20472: { 20472: __base.setf(ios_base::showpos); 20472: return __base; 20472: } 20472: 20472: 20472: inline ios_base& 20472: noshowpos(ios_base& __base) 20472: { 20472: __base.unsetf(ios_base::showpos); 20472: return __base; 20472: } 20472: 20472: 20472: inline ios_base& 20472: skipws(ios_base& __base) 20472: { 20472: __base.setf(ios_base::skipws); 20472: return __base; 20472: } 20472: 20472: 20472: inline ios_base& 20472: noskipws(ios_base& __base) 20472: { 20472: __base.unsetf(ios_base::skipws); 20472: return __base; 20472: } 20472: 20472: 20472: inline ios_base& 20472: uppercase(ios_base& __base) 20472: { 20472: __base.setf(ios_base::uppercase); 20472: return __base; 20472: } 20472: 20472: 20472: inline ios_base& 20472: nouppercase(ios_base& __base) 20472: { 20472: __base.unsetf(ios_base::uppercase); 20472: return __base; 20472: } 20472: 20472: 20472: inline ios_base& 20472: unitbuf(ios_base& __base) 20472: { 20472: __base.setf(ios_base::unitbuf); 20472: return __base; 20472: } 20472: 20472: 20472: inline ios_base& 20472: nounitbuf(ios_base& __base) 20472: { 20472: __base.unsetf(ios_base::unitbuf); 20472: return __base; 20472: } 20472: 20472: 20472: 20472: inline ios_base& 20472: internal(ios_base& __base) 20472: { 20472: __base.setf(ios_base::internal, ios_base::adjustfield); 20472: return __base; 20472: } 20472: 20472: 20472: inline ios_base& 20472: left(ios_base& __base) 20472: { 20472: __base.setf(ios_base::left, ios_base::adjustfield); 20472: return __base; 20472: } 20472: 20472: 20472: inline ios_base& 20472: right(ios_base& __base) 20472: { 20472: __base.setf(ios_base::right, ios_base::adjustfield); 20472: return __base; 20472: } 20472: 20472: 20472: 20472: inline ios_base& 20472: dec(ios_base& __base) 20472: { 20472: __base.setf(ios_base::dec, ios_base::basefield); 20472: return __base; 20472: } 20472: 20472: 20472: inline ios_base& 20472: hex(ios_base& __base) 20472: { 20472: __base.setf(ios_base::hex, ios_base::basefield); 20472: return __base; 20472: } 20472: 20472: 20472: inline ios_base& 20472: oct(ios_base& __base) 20472: { 20472: __base.setf(ios_base::oct, ios_base::basefield); 20472: return __base; 20472: } 20472: 20472: 20472: 20472: inline ios_base& 20472: fixed(ios_base& __base) 20472: { 20472: __base.setf(ios_base::fixed, ios_base::floatfield); 20472: return __base; 20472: } 20472: 20472: 20472: inline ios_base& 20472: scientific(ios_base& __base) 20472: { 20472: __base.setf(ios_base::scientific, ios_base::floatfield); 20472: return __base; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: inline ios_base& 20472: hexfloat(ios_base& __base) 20472: { 20472: __base.setf(ios_base::fixed | ios_base::scientific, ios_base::floatfield); 20472: return __base; 20472: } 20472: 20472: 20472: inline ios_base& 20472: defaultfloat(ios_base& __base) 20472: { 20472: __base.unsetf(ios_base::floatfield); 20472: return __base; 20472: } 20472: 20472: 20472: 20472: } 20472: # 43 "/usr/include/c++/10/ios" 2 3 20472: # 1 "/usr/include/c++/10/streambuf" 1 3 20472: # 36 "/usr/include/c++/10/streambuf" 3 20472: 20472: # 37 "/usr/include/c++/10/streambuf" 3 20472: # 45 "/usr/include/c++/10/streambuf" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: 20472: template 20472: streamsize 20472: __copy_streambufs_eof(basic_streambuf<_CharT, _Traits>*, 20472: basic_streambuf<_CharT, _Traits>*, bool&); 20472: # 121 "/usr/include/c++/10/streambuf" 3 20472: template 20472: class basic_streambuf 20472: { 20472: public: 20472: 20472: 20472: 20472: 20472: 20472: 20472: typedef _CharT char_type; 20472: typedef _Traits traits_type; 20472: typedef typename traits_type::int_type int_type; 20472: typedef typename traits_type::pos_type pos_type; 20472: typedef typename traits_type::off_type off_type; 20472: 20472: 20472: 20472: 20472: typedef basic_streambuf __streambuf_type; 20472: 20472: 20472: friend class basic_ios; 20472: friend class basic_istream; 20472: friend class basic_ostream; 20472: friend class istreambuf_iterator; 20472: friend class ostreambuf_iterator; 20472: 20472: friend streamsize 20472: __copy_streambufs_eof<>(basic_streambuf*, basic_streambuf*, bool&); 20472: 20472: template 20472: friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, 20472: _CharT2*>::__type 20472: __copy_move_a2(istreambuf_iterator<_CharT2>, 20472: istreambuf_iterator<_CharT2>, _CharT2*); 20472: 20472: template 20472: friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, 20472: istreambuf_iterator<_CharT2> >::__type 20472: find(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, 20472: const _CharT2&); 20472: 20472: template 20472: friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, 20472: void>::__type 20472: advance(istreambuf_iterator<_CharT2>&, _Distance); 20472: 20472: template 20472: friend basic_istream<_CharT2, _Traits2>& 20472: operator>>(basic_istream<_CharT2, _Traits2>&, _CharT2*); 20472: 20472: template 20472: friend basic_istream<_CharT2, _Traits2>& 20472: operator>>(basic_istream<_CharT2, _Traits2>&, 20472: basic_string<_CharT2, _Traits2, _Alloc>&); 20472: 20472: template 20472: friend basic_istream<_CharT2, _Traits2>& 20472: getline(basic_istream<_CharT2, _Traits2>&, 20472: basic_string<_CharT2, _Traits2, _Alloc>&, _CharT2); 20472: 20472: protected: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: char_type* _M_in_beg; 20472: char_type* _M_in_cur; 20472: char_type* _M_in_end; 20472: char_type* _M_out_beg; 20472: char_type* _M_out_cur; 20472: char_type* _M_out_end; 20472: 20472: 20472: locale _M_buf_locale; 20472: 20472: public: 20472: 20472: virtual 20472: ~basic_streambuf() 20472: { } 20472: # 215 "/usr/include/c++/10/streambuf" 3 20472: locale 20472: pubimbue(const locale& __loc) 20472: { 20472: locale __tmp(this->getloc()); 20472: this->imbue(__loc); 20472: _M_buf_locale = __loc; 20472: return __tmp; 20472: } 20472: # 232 "/usr/include/c++/10/streambuf" 3 20472: locale 20472: getloc() const 20472: { return _M_buf_locale; } 20472: # 245 "/usr/include/c++/10/streambuf" 3 20472: basic_streambuf* 20472: pubsetbuf(char_type* __s, streamsize __n) 20472: { return this->setbuf(__s, __n); } 20472: # 257 "/usr/include/c++/10/streambuf" 3 20472: pos_type 20472: pubseekoff(off_type __off, ios_base::seekdir __way, 20472: ios_base::openmode __mode = ios_base::in | ios_base::out) 20472: { return this->seekoff(__off, __way, __mode); } 20472: # 269 "/usr/include/c++/10/streambuf" 3 20472: pos_type 20472: pubseekpos(pos_type __sp, 20472: ios_base::openmode __mode = ios_base::in | ios_base::out) 20472: { return this->seekpos(__sp, __mode); } 20472: 20472: 20472: 20472: 20472: int 20472: pubsync() { return this->sync(); } 20472: # 290 "/usr/include/c++/10/streambuf" 3 20472: streamsize 20472: in_avail() 20472: { 20472: const streamsize __ret = this->egptr() - this->gptr(); 20472: return __ret ? __ret : this->showmanyc(); 20472: } 20472: # 304 "/usr/include/c++/10/streambuf" 3 20472: int_type 20472: snextc() 20472: { 20472: int_type __ret = traits_type::eof(); 20472: if (__builtin_expect(!traits_type::eq_int_type(this->sbumpc(), 20472: __ret), true)) 20472: __ret = this->sgetc(); 20472: return __ret; 20472: } 20472: # 322 "/usr/include/c++/10/streambuf" 3 20472: int_type 20472: sbumpc() 20472: { 20472: int_type __ret; 20472: if (__builtin_expect(this->gptr() < this->egptr(), true)) 20472: { 20472: __ret = traits_type::to_int_type(*this->gptr()); 20472: this->gbump(1); 20472: } 20472: else 20472: __ret = this->uflow(); 20472: return __ret; 20472: } 20472: # 344 "/usr/include/c++/10/streambuf" 3 20472: int_type 20472: sgetc() 20472: { 20472: int_type __ret; 20472: if (__builtin_expect(this->gptr() < this->egptr(), true)) 20472: __ret = traits_type::to_int_type(*this->gptr()); 20472: else 20472: __ret = this->underflow(); 20472: return __ret; 20472: } 20472: # 363 "/usr/include/c++/10/streambuf" 3 20472: streamsize 20472: sgetn(char_type* __s, streamsize __n) 20472: { return this->xsgetn(__s, __n); } 20472: # 378 "/usr/include/c++/10/streambuf" 3 20472: int_type 20472: sputbackc(char_type __c) 20472: { 20472: int_type __ret; 20472: const bool __testpos = this->eback() < this->gptr(); 20472: if (__builtin_expect(!__testpos || 20472: !traits_type::eq(__c, this->gptr()[-1]), false)) 20472: __ret = this->pbackfail(traits_type::to_int_type(__c)); 20472: else 20472: { 20472: this->gbump(-1); 20472: __ret = traits_type::to_int_type(*this->gptr()); 20472: } 20472: return __ret; 20472: } 20472: # 403 "/usr/include/c++/10/streambuf" 3 20472: int_type 20472: sungetc() 20472: { 20472: int_type __ret; 20472: if (__builtin_expect(this->eback() < this->gptr(), true)) 20472: { 20472: this->gbump(-1); 20472: __ret = traits_type::to_int_type(*this->gptr()); 20472: } 20472: else 20472: __ret = this->pbackfail(); 20472: return __ret; 20472: } 20472: # 430 "/usr/include/c++/10/streambuf" 3 20472: int_type 20472: sputc(char_type __c) 20472: { 20472: int_type __ret; 20472: if (__builtin_expect(this->pptr() < this->epptr(), true)) 20472: { 20472: *this->pptr() = __c; 20472: this->pbump(1); 20472: __ret = traits_type::to_int_type(__c); 20472: } 20472: else 20472: __ret = this->overflow(traits_type::to_int_type(__c)); 20472: return __ret; 20472: } 20472: # 456 "/usr/include/c++/10/streambuf" 3 20472: streamsize 20472: sputn(const char_type* __s, streamsize __n) 20472: { return this->xsputn(__s, __n); } 20472: 20472: protected: 20472: # 470 "/usr/include/c++/10/streambuf" 3 20472: basic_streambuf() 20472: : _M_in_beg(0), _M_in_cur(0), _M_in_end(0), 20472: _M_out_beg(0), _M_out_cur(0), _M_out_end(0), 20472: _M_buf_locale(locale()) 20472: { } 20472: # 488 "/usr/include/c++/10/streambuf" 3 20472: char_type* 20472: eback() const { return _M_in_beg; } 20472: 20472: char_type* 20472: gptr() const { return _M_in_cur; } 20472: 20472: char_type* 20472: egptr() const { return _M_in_end; } 20472: # 504 "/usr/include/c++/10/streambuf" 3 20472: void 20472: gbump(int __n) { _M_in_cur += __n; } 20472: # 515 "/usr/include/c++/10/streambuf" 3 20472: void 20472: setg(char_type* __gbeg, char_type* __gnext, char_type* __gend) 20472: { 20472: _M_in_beg = __gbeg; 20472: _M_in_cur = __gnext; 20472: _M_in_end = __gend; 20472: } 20472: # 535 "/usr/include/c++/10/streambuf" 3 20472: char_type* 20472: pbase() const { return _M_out_beg; } 20472: 20472: char_type* 20472: pptr() const { return _M_out_cur; } 20472: 20472: char_type* 20472: epptr() const { return _M_out_end; } 20472: # 551 "/usr/include/c++/10/streambuf" 3 20472: void 20472: pbump(int __n) { _M_out_cur += __n; } 20472: # 561 "/usr/include/c++/10/streambuf" 3 20472: void 20472: setp(char_type* __pbeg, char_type* __pend) 20472: { 20472: _M_out_beg = _M_out_cur = __pbeg; 20472: _M_out_end = __pend; 20472: } 20472: # 582 "/usr/include/c++/10/streambuf" 3 20472: virtual void 20472: imbue(const locale& __loc __attribute__ ((__unused__))) 20472: { } 20472: # 597 "/usr/include/c++/10/streambuf" 3 20472: virtual basic_streambuf* 20472: setbuf(char_type*, streamsize) 20472: { return this; } 20472: # 608 "/usr/include/c++/10/streambuf" 3 20472: virtual pos_type 20472: seekoff(off_type, ios_base::seekdir, 20472: ios_base::openmode = ios_base::in | ios_base::out) 20472: { return pos_type(off_type(-1)); } 20472: # 620 "/usr/include/c++/10/streambuf" 3 20472: virtual pos_type 20472: seekpos(pos_type, 20472: ios_base::openmode = ios_base::in | ios_base::out) 20472: { return pos_type(off_type(-1)); } 20472: # 633 "/usr/include/c++/10/streambuf" 3 20472: virtual int 20472: sync() { return 0; } 20472: # 655 "/usr/include/c++/10/streambuf" 3 20472: virtual streamsize 20472: showmanyc() { return 0; } 20472: # 671 "/usr/include/c++/10/streambuf" 3 20472: virtual streamsize 20472: xsgetn(char_type* __s, streamsize __n); 20472: # 693 "/usr/include/c++/10/streambuf" 3 20472: virtual int_type 20472: underflow() 20472: { return traits_type::eof(); } 20472: # 706 "/usr/include/c++/10/streambuf" 3 20472: virtual int_type 20472: uflow() 20472: { 20472: int_type __ret = traits_type::eof(); 20472: const bool __testeof = traits_type::eq_int_type(this->underflow(), 20472: __ret); 20472: if (!__testeof) 20472: { 20472: __ret = traits_type::to_int_type(*this->gptr()); 20472: this->gbump(1); 20472: } 20472: return __ret; 20472: } 20472: # 730 "/usr/include/c++/10/streambuf" 3 20472: virtual int_type 20472: pbackfail(int_type __c __attribute__ ((__unused__)) = traits_type::eof()) 20472: { return traits_type::eof(); } 20472: # 748 "/usr/include/c++/10/streambuf" 3 20472: virtual streamsize 20472: xsputn(const char_type* __s, streamsize __n); 20472: # 774 "/usr/include/c++/10/streambuf" 3 20472: virtual int_type 20472: overflow(int_type __c __attribute__ ((__unused__)) = traits_type::eof()) 20472: { return traits_type::eof(); } 20472: 20472: 20472: 20472: public: 20472: # 789 "/usr/include/c++/10/streambuf" 3 20472: __attribute__ ((__deprecated__ ("use '" "std::basic_streambuf::sbumpc" "' instead"))) 20472: void 20472: stossc() 20472: { 20472: if (this->gptr() < this->egptr()) 20472: this->gbump(1); 20472: else 20472: this->uflow(); 20472: } 20472: 20472: 20472: 20472: void 20472: __safe_gbump(streamsize __n) { _M_in_cur += __n; } 20472: 20472: void 20472: __safe_pbump(streamsize __n) { _M_out_cur += __n; } 20472: 20472: 20472: 20472: 20472: protected: 20472: 20472: basic_streambuf(const basic_streambuf&); 20472: 20472: basic_streambuf& 20472: operator=(const basic_streambuf&); 20472: 20472: 20472: void 20472: swap(basic_streambuf& __sb) 20472: { 20472: std::swap(_M_in_beg, __sb._M_in_beg); 20472: std::swap(_M_in_cur, __sb._M_in_cur); 20472: std::swap(_M_in_end, __sb._M_in_end); 20472: std::swap(_M_out_beg, __sb._M_out_beg); 20472: std::swap(_M_out_cur, __sb._M_out_cur); 20472: std::swap(_M_out_end, __sb._M_out_end); 20472: std::swap(_M_buf_locale, __sb._M_buf_locale); 20472: } 20472: 20472: }; 20472: 20472: 20472: template 20472: std::basic_streambuf<_CharT, _Traits>:: 20472: basic_streambuf(const basic_streambuf&) = default; 20472: 20472: template 20472: std::basic_streambuf<_CharT, _Traits>& 20472: std::basic_streambuf<_CharT, _Traits>:: 20472: operator=(const basic_streambuf&) = default; 20472: 20472: 20472: 20472: template<> 20472: streamsize 20472: __copy_streambufs_eof(basic_streambuf* __sbin, 20472: basic_streambuf* __sbout, bool& __ineof); 20472: 20472: template<> 20472: streamsize 20472: __copy_streambufs_eof(basic_streambuf* __sbin, 20472: basic_streambuf* __sbout, bool& __ineof); 20472: 20472: 20472: 20472: 20472: 20472: } 20472: 20472: # 1 "/usr/include/c++/10/bits/streambuf.tcc" 1 3 20472: # 37 "/usr/include/c++/10/bits/streambuf.tcc" 3 20472: 20472: # 38 "/usr/include/c++/10/bits/streambuf.tcc" 3 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: template 20472: streamsize 20472: basic_streambuf<_CharT, _Traits>:: 20472: xsgetn(char_type* __s, streamsize __n) 20472: { 20472: streamsize __ret = 0; 20472: while (__ret < __n) 20472: { 20472: const streamsize __buf_len = this->egptr() - this->gptr(); 20472: if (__buf_len) 20472: { 20472: const streamsize __remaining = __n - __ret; 20472: const streamsize __len = std::min(__buf_len, __remaining); 20472: traits_type::copy(__s, this->gptr(), __len); 20472: __ret += __len; 20472: __s += __len; 20472: this->__safe_gbump(__len); 20472: } 20472: 20472: if (__ret < __n) 20472: { 20472: const int_type __c = this->uflow(); 20472: if (!traits_type::eq_int_type(__c, traits_type::eof())) 20472: { 20472: traits_type::assign(*__s++, traits_type::to_char_type(__c)); 20472: ++__ret; 20472: } 20472: else 20472: break; 20472: } 20472: } 20472: return __ret; 20472: } 20472: 20472: template 20472: streamsize 20472: basic_streambuf<_CharT, _Traits>:: 20472: xsputn(const char_type* __s, streamsize __n) 20472: { 20472: streamsize __ret = 0; 20472: while (__ret < __n) 20472: { 20472: const streamsize __buf_len = this->epptr() - this->pptr(); 20472: if (__buf_len) 20472: { 20472: const streamsize __remaining = __n - __ret; 20472: const streamsize __len = std::min(__buf_len, __remaining); 20472: traits_type::copy(this->pptr(), __s, __len); 20472: __ret += __len; 20472: __s += __len; 20472: this->__safe_pbump(__len); 20472: } 20472: 20472: if (__ret < __n) 20472: { 20472: int_type __c = this->overflow(traits_type::to_int_type(*__s)); 20472: if (!traits_type::eq_int_type(__c, traits_type::eof())) 20472: { 20472: ++__ret; 20472: ++__s; 20472: } 20472: else 20472: break; 20472: } 20472: } 20472: return __ret; 20472: } 20472: 20472: 20472: 20472: 20472: template 20472: streamsize 20472: __copy_streambufs_eof(basic_streambuf<_CharT, _Traits>* __sbin, 20472: basic_streambuf<_CharT, _Traits>* __sbout, 20472: bool& __ineof) 20472: { 20472: streamsize __ret = 0; 20472: __ineof = true; 20472: typename _Traits::int_type __c = __sbin->sgetc(); 20472: while (!_Traits::eq_int_type(__c, _Traits::eof())) 20472: { 20472: __c = __sbout->sputc(_Traits::to_char_type(__c)); 20472: if (_Traits::eq_int_type(__c, _Traits::eof())) 20472: { 20472: __ineof = false; 20472: break; 20472: } 20472: ++__ret; 20472: __c = __sbin->snextc(); 20472: } 20472: return __ret; 20472: } 20472: 20472: template 20472: inline streamsize 20472: __copy_streambufs(basic_streambuf<_CharT, _Traits>* __sbin, 20472: basic_streambuf<_CharT, _Traits>* __sbout) 20472: { 20472: bool __ineof; 20472: return __copy_streambufs_eof(__sbin, __sbout, __ineof); 20472: } 20472: 20472: 20472: 20472: 20472: extern template class basic_streambuf; 20472: extern template 20472: streamsize 20472: __copy_streambufs(basic_streambuf*, 20472: basic_streambuf*); 20472: extern template 20472: streamsize 20472: __copy_streambufs_eof(basic_streambuf*, 20472: basic_streambuf*, bool&); 20472: 20472: 20472: extern template class basic_streambuf; 20472: extern template 20472: streamsize 20472: __copy_streambufs(basic_streambuf*, 20472: basic_streambuf*); 20472: extern template 20472: streamsize 20472: __copy_streambufs_eof(basic_streambuf*, 20472: basic_streambuf*, bool&); 20472: 20472: 20472: 20472: 20472: } 20472: # 861 "/usr/include/c++/10/streambuf" 2 3 20472: # 44 "/usr/include/c++/10/ios" 2 3 20472: # 1 "/usr/include/c++/10/bits/basic_ios.h" 1 3 20472: # 33 "/usr/include/c++/10/bits/basic_ios.h" 3 20472: 20472: # 34 "/usr/include/c++/10/bits/basic_ios.h" 3 20472: 20472: 20472: 20472: # 1 "/usr/include/c++/10/bits/locale_facets.h" 1 3 20472: # 37 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: 20472: # 38 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: 20472: # 1 "/usr/include/c++/10/cwctype" 1 3 20472: # 39 "/usr/include/c++/10/cwctype" 3 20472: 20472: # 40 "/usr/include/c++/10/cwctype" 3 20472: # 50 "/usr/include/c++/10/cwctype" 3 20472: # 1 "/usr/include/wctype.h" 1 3 4 20472: # 38 "/usr/include/wctype.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/wctype-wchar.h" 1 3 4 20472: # 38 "/usr/include/arm-linux-gnueabihf/bits/wctype-wchar.h" 3 4 20472: typedef unsigned long int wctype_t; 20472: # 56 "/usr/include/arm-linux-gnueabihf/bits/wctype-wchar.h" 3 4 20472: enum 20472: { 20472: __ISwupper = 0, 20472: __ISwlower = 1, 20472: __ISwalpha = 2, 20472: __ISwdigit = 3, 20472: __ISwxdigit = 4, 20472: __ISwspace = 5, 20472: __ISwprint = 6, 20472: __ISwgraph = 7, 20472: __ISwblank = 8, 20472: __ISwcntrl = 9, 20472: __ISwpunct = 10, 20472: __ISwalnum = 11, 20472: 20472: _ISwupper = ((__ISwupper) < 8 ? (int) ((1UL << (__ISwupper)) << 24) : ((__ISwupper) < 16 ? (int) ((1UL << (__ISwupper)) << 8) : ((__ISwupper) < 24 ? (int) ((1UL << (__ISwupper)) >> 8) : (int) ((1UL << (__ISwupper)) >> 24)))), 20472: _ISwlower = ((__ISwlower) < 8 ? (int) ((1UL << (__ISwlower)) << 24) : ((__ISwlower) < 16 ? (int) ((1UL << (__ISwlower)) << 8) : ((__ISwlower) < 24 ? (int) ((1UL << (__ISwlower)) >> 8) : (int) ((1UL << (__ISwlower)) >> 24)))), 20472: _ISwalpha = ((__ISwalpha) < 8 ? (int) ((1UL << (__ISwalpha)) << 24) : ((__ISwalpha) < 16 ? (int) ((1UL << (__ISwalpha)) << 8) : ((__ISwalpha) < 24 ? (int) ((1UL << (__ISwalpha)) >> 8) : (int) ((1UL << (__ISwalpha)) >> 24)))), 20472: _ISwdigit = ((__ISwdigit) < 8 ? (int) ((1UL << (__ISwdigit)) << 24) : ((__ISwdigit) < 16 ? (int) ((1UL << (__ISwdigit)) << 8) : ((__ISwdigit) < 24 ? (int) ((1UL << (__ISwdigit)) >> 8) : (int) ((1UL << (__ISwdigit)) >> 24)))), 20472: _ISwxdigit = ((__ISwxdigit) < 8 ? (int) ((1UL << (__ISwxdigit)) << 24) : ((__ISwxdigit) < 16 ? (int) ((1UL << (__ISwxdigit)) << 8) : ((__ISwxdigit) < 24 ? (int) ((1UL << (__ISwxdigit)) >> 8) : (int) ((1UL << (__ISwxdigit)) >> 24)))), 20472: _ISwspace = ((__ISwspace) < 8 ? (int) ((1UL << (__ISwspace)) << 24) : ((__ISwspace) < 16 ? (int) ((1UL << (__ISwspace)) << 8) : ((__ISwspace) < 24 ? (int) ((1UL << (__ISwspace)) >> 8) : (int) ((1UL << (__ISwspace)) >> 24)))), 20472: _ISwprint = ((__ISwprint) < 8 ? (int) ((1UL << (__ISwprint)) << 24) : ((__ISwprint) < 16 ? (int) ((1UL << (__ISwprint)) << 8) : ((__ISwprint) < 24 ? (int) ((1UL << (__ISwprint)) >> 8) : (int) ((1UL << (__ISwprint)) >> 24)))), 20472: _ISwgraph = ((__ISwgraph) < 8 ? (int) ((1UL << (__ISwgraph)) << 24) : ((__ISwgraph) < 16 ? (int) ((1UL << (__ISwgraph)) << 8) : ((__ISwgraph) < 24 ? (int) ((1UL << (__ISwgraph)) >> 8) : (int) ((1UL << (__ISwgraph)) >> 24)))), 20472: _ISwblank = ((__ISwblank) < 8 ? (int) ((1UL << (__ISwblank)) << 24) : ((__ISwblank) < 16 ? (int) ((1UL << (__ISwblank)) << 8) : ((__ISwblank) < 24 ? (int) ((1UL << (__ISwblank)) >> 8) : (int) ((1UL << (__ISwblank)) >> 24)))), 20472: _ISwcntrl = ((__ISwcntrl) < 8 ? (int) ((1UL << (__ISwcntrl)) << 24) : ((__ISwcntrl) < 16 ? (int) ((1UL << (__ISwcntrl)) << 8) : ((__ISwcntrl) < 24 ? (int) ((1UL << (__ISwcntrl)) >> 8) : (int) ((1UL << (__ISwcntrl)) >> 24)))), 20472: _ISwpunct = ((__ISwpunct) < 8 ? (int) ((1UL << (__ISwpunct)) << 24) : ((__ISwpunct) < 16 ? (int) ((1UL << (__ISwpunct)) << 8) : ((__ISwpunct) < 24 ? (int) ((1UL << (__ISwpunct)) >> 8) : (int) ((1UL << (__ISwpunct)) >> 24)))), 20472: _ISwalnum = ((__ISwalnum) < 8 ? (int) ((1UL << (__ISwalnum)) << 24) : ((__ISwalnum) < 16 ? (int) ((1UL << (__ISwalnum)) << 8) : ((__ISwalnum) < 24 ? (int) ((1UL << (__ISwalnum)) >> 8) : (int) ((1UL << (__ISwalnum)) >> 24)))) 20472: }; 20472: 20472: 20472: 20472: extern "C" { 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int iswalnum (wint_t __wc) throw (); 20472: 20472: 20472: 20472: 20472: 20472: extern int iswalpha (wint_t __wc) throw (); 20472: 20472: 20472: extern int iswcntrl (wint_t __wc) throw (); 20472: 20472: 20472: 20472: extern int iswdigit (wint_t __wc) throw (); 20472: 20472: 20472: 20472: extern int iswgraph (wint_t __wc) throw (); 20472: 20472: 20472: 20472: 20472: extern int iswlower (wint_t __wc) throw (); 20472: 20472: 20472: extern int iswprint (wint_t __wc) throw (); 20472: 20472: 20472: 20472: 20472: extern int iswpunct (wint_t __wc) throw (); 20472: 20472: 20472: 20472: 20472: extern int iswspace (wint_t __wc) throw (); 20472: 20472: 20472: 20472: 20472: extern int iswupper (wint_t __wc) throw (); 20472: 20472: 20472: 20472: 20472: extern int iswxdigit (wint_t __wc) throw (); 20472: 20472: 20472: 20472: 20472: 20472: extern int iswblank (wint_t __wc) throw (); 20472: # 155 "/usr/include/arm-linux-gnueabihf/bits/wctype-wchar.h" 3 4 20472: extern wctype_t wctype (const char *__property) throw (); 20472: 20472: 20472: 20472: extern int iswctype (wint_t __wc, wctype_t __desc) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern wint_t towlower (wint_t __wc) throw (); 20472: 20472: 20472: extern wint_t towupper (wint_t __wc) throw (); 20472: 20472: } 20472: # 39 "/usr/include/wctype.h" 2 3 4 20472: 20472: 20472: 20472: 20472: 20472: extern "C" { 20472: 20472: 20472: 20472: typedef const __int32_t *wctrans_t; 20472: 20472: 20472: 20472: extern wctrans_t wctrans (const char *__property) throw (); 20472: 20472: 20472: extern wint_t towctrans (wint_t __wc, wctrans_t __desc) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int iswalnum_l (wint_t __wc, locale_t __locale) throw (); 20472: 20472: 20472: 20472: 20472: 20472: extern int iswalpha_l (wint_t __wc, locale_t __locale) throw (); 20472: 20472: 20472: extern int iswcntrl_l (wint_t __wc, locale_t __locale) throw (); 20472: 20472: 20472: 20472: extern int iswdigit_l (wint_t __wc, locale_t __locale) throw (); 20472: 20472: 20472: 20472: extern int iswgraph_l (wint_t __wc, locale_t __locale) throw (); 20472: 20472: 20472: 20472: 20472: extern int iswlower_l (wint_t __wc, locale_t __locale) throw (); 20472: 20472: 20472: extern int iswprint_l (wint_t __wc, locale_t __locale) throw (); 20472: 20472: 20472: 20472: 20472: extern int iswpunct_l (wint_t __wc, locale_t __locale) throw (); 20472: 20472: 20472: 20472: 20472: extern int iswspace_l (wint_t __wc, locale_t __locale) throw (); 20472: 20472: 20472: 20472: 20472: extern int iswupper_l (wint_t __wc, locale_t __locale) throw (); 20472: 20472: 20472: 20472: 20472: extern int iswxdigit_l (wint_t __wc, locale_t __locale) throw (); 20472: 20472: 20472: 20472: 20472: extern int iswblank_l (wint_t __wc, locale_t __locale) throw (); 20472: 20472: 20472: 20472: extern wctype_t wctype_l (const char *__property, locale_t __locale) 20472: throw (); 20472: 20472: 20472: 20472: extern int iswctype_l (wint_t __wc, wctype_t __desc, locale_t __locale) 20472: throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern wint_t towlower_l (wint_t __wc, locale_t __locale) throw (); 20472: 20472: 20472: extern wint_t towupper_l (wint_t __wc, locale_t __locale) throw (); 20472: 20472: 20472: 20472: extern wctrans_t wctrans_l (const char *__property, locale_t __locale) 20472: throw (); 20472: 20472: 20472: extern wint_t towctrans_l (wint_t __wc, wctrans_t __desc, 20472: locale_t __locale) throw (); 20472: 20472: 20472: 20472: } 20472: # 51 "/usr/include/c++/10/cwctype" 2 3 20472: # 80 "/usr/include/c++/10/cwctype" 3 20472: namespace std 20472: { 20472: using ::wctrans_t; 20472: using ::wctype_t; 20472: using ::wint_t; 20472: 20472: using ::iswalnum; 20472: using ::iswalpha; 20472: 20472: using ::iswblank; 20472: 20472: using ::iswcntrl; 20472: using ::iswctype; 20472: using ::iswdigit; 20472: using ::iswgraph; 20472: using ::iswlower; 20472: using ::iswprint; 20472: using ::iswpunct; 20472: using ::iswspace; 20472: using ::iswupper; 20472: using ::iswxdigit; 20472: using ::towctrans; 20472: using ::towlower; 20472: using ::towupper; 20472: using ::wctrans; 20472: using ::wctype; 20472: } 20472: # 40 "/usr/include/c++/10/bits/locale_facets.h" 2 3 20472: # 1 "/usr/include/c++/10/cctype" 1 3 20472: # 39 "/usr/include/c++/10/cctype" 3 20472: 20472: # 40 "/usr/include/c++/10/cctype" 3 20472: # 41 "/usr/include/c++/10/bits/locale_facets.h" 2 3 20472: # 1 "/usr/include/arm-linux-gnueabihf/c++/10/bits/ctype_base.h" 1 3 20472: # 36 "/usr/include/arm-linux-gnueabihf/c++/10/bits/ctype_base.h" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: struct ctype_base 20472: { 20472: 20472: typedef const int* __to_type; 20472: 20472: 20472: 20472: typedef unsigned short mask; 20472: static const mask upper = _ISupper; 20472: static const mask lower = _ISlower; 20472: static const mask alpha = _ISalpha; 20472: static const mask digit = _ISdigit; 20472: static const mask xdigit = _ISxdigit; 20472: static const mask space = _ISspace; 20472: static const mask print = _ISprint; 20472: static const mask graph = _ISalpha | _ISdigit | _ISpunct; 20472: static const mask cntrl = _IScntrl; 20472: static const mask punct = _ISpunct; 20472: static const mask alnum = _ISalpha | _ISdigit; 20472: 20472: static const mask blank = _ISblank; 20472: 20472: }; 20472: 20472: 20472: } 20472: # 42 "/usr/include/c++/10/bits/locale_facets.h" 2 3 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "/usr/include/c++/10/bits/streambuf_iterator.h" 1 3 20472: # 33 "/usr/include/c++/10/bits/streambuf_iterator.h" 3 20472: 20472: # 34 "/usr/include/c++/10/bits/streambuf_iterator.h" 3 20472: 20472: 20472: 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: # 49 "/usr/include/c++/10/bits/streambuf_iterator.h" 3 20472: template 20472: class istreambuf_iterator 20472: : public iterator 20472: { 20472: public: 20472: # 66 "/usr/include/c++/10/bits/streambuf_iterator.h" 3 20472: typedef _CharT char_type; 20472: typedef _Traits traits_type; 20472: typedef typename _Traits::int_type int_type; 20472: typedef basic_streambuf<_CharT, _Traits> streambuf_type; 20472: typedef basic_istream<_CharT, _Traits> istream_type; 20472: 20472: 20472: template 20472: friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, 20472: ostreambuf_iterator<_CharT2> >::__type 20472: copy(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, 20472: ostreambuf_iterator<_CharT2>); 20472: 20472: template 20472: friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, 20472: _CharT2*>::__type 20472: __copy_move_a2(istreambuf_iterator<_CharT2>, 20472: istreambuf_iterator<_CharT2>, _CharT2*); 20472: 20472: 20472: template 20472: friend __enable_if_t<__is_char<_CharT2>::__value, _CharT2*> 20472: __copy_n_a(istreambuf_iterator<_CharT2>, _Size, _CharT2*); 20472: 20472: 20472: template 20472: friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, 20472: istreambuf_iterator<_CharT2> >::__type 20472: find(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, 20472: const _CharT2&); 20472: 20472: template 20472: friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, 20472: void>::__type 20472: advance(istreambuf_iterator<_CharT2>&, _Distance); 20472: 20472: private: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: mutable streambuf_type* _M_sbuf; 20472: int_type _M_c; 20472: 20472: public: 20472: 20472: constexpr istreambuf_iterator() noexcept 20472: : _M_sbuf(0), _M_c(traits_type::eof()) { } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: istreambuf_iterator(const istreambuf_iterator&) noexcept = default; 20472: 20472: ~istreambuf_iterator() = default; 20472: 20472: 20472: 20472: istreambuf_iterator(istream_type& __s) noexcept 20472: : _M_sbuf(__s.rdbuf()), _M_c(traits_type::eof()) { } 20472: 20472: 20472: istreambuf_iterator(streambuf_type* __s) noexcept 20472: : _M_sbuf(__s), _M_c(traits_type::eof()) { } 20472: 20472: 20472: istreambuf_iterator& 20472: operator=(const istreambuf_iterator&) noexcept = default; 20472: 20472: 20472: 20472: 20472: 20472: char_type 20472: operator*() const 20472: { 20472: int_type __c = _M_get(); 20472: # 157 "/usr/include/c++/10/bits/streambuf_iterator.h" 3 20472: return traits_type::to_char_type(__c); 20472: } 20472: 20472: 20472: istreambuf_iterator& 20472: operator++() 20472: { 20472: 20472: 20472: 20472: ; 20472: 20472: _M_sbuf->sbumpc(); 20472: _M_c = traits_type::eof(); 20472: return *this; 20472: } 20472: 20472: 20472: istreambuf_iterator 20472: operator++(int) 20472: { 20472: 20472: 20472: 20472: ; 20472: 20472: istreambuf_iterator __old = *this; 20472: __old._M_c = _M_sbuf->sbumpc(); 20472: _M_c = traits_type::eof(); 20472: return __old; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: bool 20472: equal(const istreambuf_iterator& __b) const 20472: { return _M_at_eof() == __b._M_at_eof(); } 20472: 20472: private: 20472: int_type 20472: _M_get() const 20472: { 20472: int_type __ret = _M_c; 20472: if (_M_sbuf && _S_is_eof(__ret) && _S_is_eof(__ret = _M_sbuf->sgetc())) 20472: _M_sbuf = 0; 20472: return __ret; 20472: } 20472: 20472: bool 20472: _M_at_eof() const 20472: { return _S_is_eof(_M_get()); } 20472: 20472: static bool 20472: _S_is_eof(int_type __c) 20472: { 20472: const int_type __eof = traits_type::eof(); 20472: return traits_type::eq_int_type(__c, __eof); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: }; 20472: 20472: template 20472: inline bool 20472: operator==(const istreambuf_iterator<_CharT, _Traits>& __a, 20472: const istreambuf_iterator<_CharT, _Traits>& __b) 20472: { return __a.equal(__b); } 20472: 20472: template 20472: inline bool 20472: operator!=(const istreambuf_iterator<_CharT, _Traits>& __a, 20472: const istreambuf_iterator<_CharT, _Traits>& __b) 20472: { return !__a.equal(__b); } 20472: 20472: 20472: template 20472: class ostreambuf_iterator 20472: : public iterator 20472: { 20472: public: 20472: 20472: 20472: 20472: 20472: 20472: 20472: typedef _CharT char_type; 20472: typedef _Traits traits_type; 20472: typedef basic_streambuf<_CharT, _Traits> streambuf_type; 20472: typedef basic_ostream<_CharT, _Traits> ostream_type; 20472: 20472: 20472: template 20472: friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, 20472: ostreambuf_iterator<_CharT2> >::__type 20472: copy(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, 20472: ostreambuf_iterator<_CharT2>); 20472: 20472: private: 20472: streambuf_type* _M_sbuf; 20472: bool _M_failed; 20472: 20472: public: 20472: # 274 "/usr/include/c++/10/bits/streambuf_iterator.h" 3 20472: ostreambuf_iterator(ostream_type& __s) noexcept 20472: : _M_sbuf(__s.rdbuf()), _M_failed(!_M_sbuf) { } 20472: 20472: 20472: ostreambuf_iterator(streambuf_type* __s) noexcept 20472: : _M_sbuf(__s), _M_failed(!_M_sbuf) { } 20472: 20472: 20472: ostreambuf_iterator& 20472: operator=(_CharT __c) 20472: { 20472: if (!_M_failed && 20472: _Traits::eq_int_type(_M_sbuf->sputc(__c), _Traits::eof())) 20472: _M_failed = true; 20472: return *this; 20472: } 20472: 20472: 20472: ostreambuf_iterator& 20472: operator*() 20472: { return *this; } 20472: 20472: 20472: ostreambuf_iterator& 20472: operator++(int) 20472: { return *this; } 20472: 20472: 20472: ostreambuf_iterator& 20472: operator++() 20472: { return *this; } 20472: 20472: 20472: bool 20472: failed() const noexcept 20472: { return _M_failed; } 20472: 20472: ostreambuf_iterator& 20472: _M_put(const _CharT* __ws, streamsize __len) 20472: { 20472: if (__builtin_expect(!_M_failed, true) 20472: && __builtin_expect(this->_M_sbuf->sputn(__ws, __len) != __len, 20472: false)) 20472: _M_failed = true; 20472: return *this; 20472: } 20472: }; 20472: 20472: 20472: template 20472: typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, 20472: ostreambuf_iterator<_CharT> >::__type 20472: copy(istreambuf_iterator<_CharT> __first, 20472: istreambuf_iterator<_CharT> __last, 20472: ostreambuf_iterator<_CharT> __result) 20472: { 20472: if (__first._M_sbuf && !__last._M_sbuf && !__result._M_failed) 20472: { 20472: bool __ineof; 20472: __copy_streambufs_eof(__first._M_sbuf, __result._M_sbuf, __ineof); 20472: if (!__ineof) 20472: __result._M_failed = true; 20472: } 20472: return __result; 20472: } 20472: 20472: template 20472: typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, 20472: ostreambuf_iterator<_CharT> >::__type 20472: __copy_move_a2(_CharT* __first, _CharT* __last, 20472: ostreambuf_iterator<_CharT> __result) 20472: { 20472: const streamsize __num = __last - __first; 20472: if (__num > 0) 20472: __result._M_put(__first, __num); 20472: return __result; 20472: } 20472: 20472: template 20472: typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, 20472: ostreambuf_iterator<_CharT> >::__type 20472: __copy_move_a2(const _CharT* __first, const _CharT* __last, 20472: ostreambuf_iterator<_CharT> __result) 20472: { 20472: const streamsize __num = __last - __first; 20472: if (__num > 0) 20472: __result._M_put(__first, __num); 20472: return __result; 20472: } 20472: 20472: template 20472: typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, 20472: _CharT*>::__type 20472: __copy_move_a2(istreambuf_iterator<_CharT> __first, 20472: istreambuf_iterator<_CharT> __last, _CharT* __result) 20472: { 20472: typedef istreambuf_iterator<_CharT> __is_iterator_type; 20472: typedef typename __is_iterator_type::traits_type traits_type; 20472: typedef typename __is_iterator_type::streambuf_type streambuf_type; 20472: typedef typename traits_type::int_type int_type; 20472: 20472: if (__first._M_sbuf && !__last._M_sbuf) 20472: { 20472: streambuf_type* __sb = __first._M_sbuf; 20472: int_type __c = __sb->sgetc(); 20472: while (!traits_type::eq_int_type(__c, traits_type::eof())) 20472: { 20472: const streamsize __n = __sb->egptr() - __sb->gptr(); 20472: if (__n > 1) 20472: { 20472: traits_type::copy(__result, __sb->gptr(), __n); 20472: __sb->__safe_gbump(__n); 20472: __result += __n; 20472: __c = __sb->underflow(); 20472: } 20472: else 20472: { 20472: *__result++ = traits_type::to_char_type(__c); 20472: __c = __sb->snextc(); 20472: } 20472: } 20472: } 20472: return __result; 20472: } 20472: 20472: 20472: template 20472: __enable_if_t<__is_char<_CharT>::__value, _CharT*> 20472: __copy_n_a(istreambuf_iterator<_CharT> __it, _Size __n, _CharT* __result) 20472: { 20472: if (__n == 0) 20472: return __result; 20472: 20472: 20472: 20472: ; 20472: _CharT* __beg = __result; 20472: __result += __it._M_sbuf->sgetn(__beg, __n); 20472: 20472: 20472: ; 20472: return __result; 20472: } 20472: 20472: 20472: template 20472: typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, 20472: istreambuf_iterator<_CharT> >::__type 20472: find(istreambuf_iterator<_CharT> __first, 20472: istreambuf_iterator<_CharT> __last, const _CharT& __val) 20472: { 20472: typedef istreambuf_iterator<_CharT> __is_iterator_type; 20472: typedef typename __is_iterator_type::traits_type traits_type; 20472: typedef typename __is_iterator_type::streambuf_type streambuf_type; 20472: typedef typename traits_type::int_type int_type; 20472: const int_type __eof = traits_type::eof(); 20472: 20472: if (__first._M_sbuf && !__last._M_sbuf) 20472: { 20472: const int_type __ival = traits_type::to_int_type(__val); 20472: streambuf_type* __sb = __first._M_sbuf; 20472: int_type __c = __sb->sgetc(); 20472: while (!traits_type::eq_int_type(__c, __eof) 20472: && !traits_type::eq_int_type(__c, __ival)) 20472: { 20472: streamsize __n = __sb->egptr() - __sb->gptr(); 20472: if (__n > 1) 20472: { 20472: const _CharT* __p = traits_type::find(__sb->gptr(), 20472: __n, __val); 20472: if (__p) 20472: __n = __p - __sb->gptr(); 20472: __sb->__safe_gbump(__n); 20472: __c = __sb->sgetc(); 20472: } 20472: else 20472: __c = __sb->snextc(); 20472: } 20472: 20472: __first._M_c = __eof; 20472: } 20472: 20472: return __first; 20472: } 20472: 20472: template 20472: typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, 20472: void>::__type 20472: advance(istreambuf_iterator<_CharT>& __i, _Distance __n) 20472: { 20472: if (__n == 0) 20472: return; 20472: 20472: ; 20472: 20472: 20472: ; 20472: 20472: typedef istreambuf_iterator<_CharT> __is_iterator_type; 20472: typedef typename __is_iterator_type::traits_type traits_type; 20472: typedef typename __is_iterator_type::streambuf_type streambuf_type; 20472: typedef typename traits_type::int_type int_type; 20472: const int_type __eof = traits_type::eof(); 20472: 20472: streambuf_type* __sb = __i._M_sbuf; 20472: while (__n > 0) 20472: { 20472: streamsize __size = __sb->egptr() - __sb->gptr(); 20472: if (__size > __n) 20472: { 20472: __sb->__safe_gbump(__n); 20472: break; 20472: } 20472: 20472: __sb->__safe_gbump(__size); 20472: __n -= __size; 20472: if (traits_type::eq_int_type(__sb->underflow(), __eof)) 20472: { 20472: 20472: 20472: ; 20472: break; 20472: } 20472: } 20472: 20472: __i._M_c = __eof; 20472: } 20472: 20472: 20472: 20472: 20472: } 20472: # 49 "/usr/include/c++/10/bits/locale_facets.h" 2 3 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: # 71 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: template 20472: void 20472: __convert_to_v(const char*, _Tp&, ios_base::iostate&, 20472: const __c_locale&) throw(); 20472: 20472: 20472: template<> 20472: void 20472: __convert_to_v(const char*, float&, ios_base::iostate&, 20472: const __c_locale&) throw(); 20472: 20472: template<> 20472: void 20472: __convert_to_v(const char*, double&, ios_base::iostate&, 20472: const __c_locale&) throw(); 20472: 20472: template<> 20472: void 20472: __convert_to_v(const char*, long double&, ios_base::iostate&, 20472: const __c_locale&) throw(); 20472: 20472: 20472: 20472: template 20472: struct __pad 20472: { 20472: static void 20472: _S_pad(ios_base& __io, _CharT __fill, _CharT* __news, 20472: const _CharT* __olds, streamsize __newlen, streamsize __oldlen); 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: _CharT* 20472: __add_grouping(_CharT* __s, _CharT __sep, 20472: const char* __gbeg, size_t __gsize, 20472: const _CharT* __first, const _CharT* __last); 20472: 20472: 20472: 20472: 20472: template 20472: inline 20472: ostreambuf_iterator<_CharT> 20472: __write(ostreambuf_iterator<_CharT> __s, const _CharT* __ws, int __len) 20472: { 20472: __s._M_put(__ws, __len); 20472: return __s; 20472: } 20472: 20472: 20472: template 20472: inline 20472: _OutIter 20472: __write(_OutIter __s, const _CharT* __ws, int __len) 20472: { 20472: for (int __j = 0; __j < __len; __j++, ++__s) 20472: *__s = __ws[__j]; 20472: return __s; 20472: } 20472: # 149 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: template 20472: class __ctype_abstract_base : public locale::facet, public ctype_base 20472: { 20472: public: 20472: 20472: 20472: typedef _CharT char_type; 20472: # 168 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: bool 20472: is(mask __m, char_type __c) const 20472: { return this->do_is(__m, __c); } 20472: # 185 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: const char_type* 20472: is(const char_type *__lo, const char_type *__hi, mask *__vec) const 20472: { return this->do_is(__lo, __hi, __vec); } 20472: # 201 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: const char_type* 20472: scan_is(mask __m, const char_type* __lo, const char_type* __hi) const 20472: { return this->do_scan_is(__m, __lo, __hi); } 20472: # 217 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: const char_type* 20472: scan_not(mask __m, const char_type* __lo, const char_type* __hi) const 20472: { return this->do_scan_not(__m, __lo, __hi); } 20472: # 231 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: char_type 20472: toupper(char_type __c) const 20472: { return this->do_toupper(__c); } 20472: # 246 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: const char_type* 20472: toupper(char_type *__lo, const char_type* __hi) const 20472: { return this->do_toupper(__lo, __hi); } 20472: # 260 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: char_type 20472: tolower(char_type __c) const 20472: { return this->do_tolower(__c); } 20472: # 275 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: const char_type* 20472: tolower(char_type* __lo, const char_type* __hi) const 20472: { return this->do_tolower(__lo, __hi); } 20472: # 292 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: char_type 20472: widen(char __c) const 20472: { return this->do_widen(__c); } 20472: # 311 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: const char* 20472: widen(const char* __lo, const char* __hi, char_type* __to) const 20472: { return this->do_widen(__lo, __hi, __to); } 20472: # 330 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: char 20472: narrow(char_type __c, char __dfault) const 20472: { return this->do_narrow(__c, __dfault); } 20472: # 352 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: const char_type* 20472: narrow(const char_type* __lo, const char_type* __hi, 20472: char __dfault, char* __to) const 20472: { return this->do_narrow(__lo, __hi, __dfault, __to); } 20472: 20472: protected: 20472: explicit 20472: __ctype_abstract_base(size_t __refs = 0): facet(__refs) { } 20472: 20472: virtual 20472: ~__ctype_abstract_base() { } 20472: # 377 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: virtual bool 20472: do_is(mask __m, char_type __c) const = 0; 20472: # 396 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: virtual const char_type* 20472: do_is(const char_type* __lo, const char_type* __hi, 20472: mask* __vec) const = 0; 20472: # 415 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: virtual const char_type* 20472: do_scan_is(mask __m, const char_type* __lo, 20472: const char_type* __hi) const = 0; 20472: # 434 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: virtual const char_type* 20472: do_scan_not(mask __m, const char_type* __lo, 20472: const char_type* __hi) const = 0; 20472: # 452 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: virtual char_type 20472: do_toupper(char_type __c) const = 0; 20472: # 469 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: virtual const char_type* 20472: do_toupper(char_type* __lo, const char_type* __hi) const = 0; 20472: # 485 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: virtual char_type 20472: do_tolower(char_type __c) const = 0; 20472: # 502 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: virtual const char_type* 20472: do_tolower(char_type* __lo, const char_type* __hi) const = 0; 20472: # 521 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: virtual char_type 20472: do_widen(char __c) const = 0; 20472: # 542 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: virtual const char* 20472: do_widen(const char* __lo, const char* __hi, char_type* __to) const = 0; 20472: # 563 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: virtual char 20472: do_narrow(char_type __c, char __dfault) const = 0; 20472: # 588 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: virtual const char_type* 20472: do_narrow(const char_type* __lo, const char_type* __hi, 20472: char __dfault, char* __to) const = 0; 20472: }; 20472: # 611 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: template 20472: class ctype : public __ctype_abstract_base<_CharT> 20472: { 20472: public: 20472: 20472: typedef _CharT char_type; 20472: typedef typename __ctype_abstract_base<_CharT>::mask mask; 20472: 20472: 20472: static locale::id id; 20472: 20472: explicit 20472: ctype(size_t __refs = 0) : __ctype_abstract_base<_CharT>(__refs) { } 20472: 20472: protected: 20472: virtual 20472: ~ctype(); 20472: 20472: virtual bool 20472: do_is(mask __m, char_type __c) const; 20472: 20472: virtual const char_type* 20472: do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const; 20472: 20472: virtual const char_type* 20472: do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const; 20472: 20472: virtual const char_type* 20472: do_scan_not(mask __m, const char_type* __lo, 20472: const char_type* __hi) const; 20472: 20472: virtual char_type 20472: do_toupper(char_type __c) const; 20472: 20472: virtual const char_type* 20472: do_toupper(char_type* __lo, const char_type* __hi) const; 20472: 20472: virtual char_type 20472: do_tolower(char_type __c) const; 20472: 20472: virtual const char_type* 20472: do_tolower(char_type* __lo, const char_type* __hi) const; 20472: 20472: virtual char_type 20472: do_widen(char __c) const; 20472: 20472: virtual const char* 20472: do_widen(const char* __lo, const char* __hi, char_type* __dest) const; 20472: 20472: virtual char 20472: do_narrow(char_type, char __dfault) const; 20472: 20472: virtual const char_type* 20472: do_narrow(const char_type* __lo, const char_type* __hi, 20472: char __dfault, char* __to) const; 20472: }; 20472: 20472: template 20472: locale::id ctype<_CharT>::id; 20472: # 680 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: template<> 20472: class ctype : public locale::facet, public ctype_base 20472: { 20472: public: 20472: 20472: 20472: typedef char char_type; 20472: 20472: protected: 20472: 20472: __c_locale _M_c_locale_ctype; 20472: bool _M_del; 20472: __to_type _M_toupper; 20472: __to_type _M_tolower; 20472: const mask* _M_table; 20472: mutable char _M_widen_ok; 20472: mutable char _M_widen[1 + static_cast(-1)]; 20472: mutable char _M_narrow[1 + static_cast(-1)]; 20472: mutable char _M_narrow_ok; 20472: 20472: 20472: public: 20472: 20472: static locale::id id; 20472: 20472: static const size_t table_size = 1 + static_cast(-1); 20472: # 717 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: explicit 20472: ctype(const mask* __table = 0, bool __del = false, size_t __refs = 0); 20472: # 730 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: explicit 20472: ctype(__c_locale __cloc, const mask* __table = 0, bool __del = false, 20472: size_t __refs = 0); 20472: # 743 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: inline bool 20472: is(mask __m, char __c) const; 20472: # 758 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: inline const char* 20472: is(const char* __lo, const char* __hi, mask* __vec) const; 20472: # 772 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: inline const char* 20472: scan_is(mask __m, const char* __lo, const char* __hi) const; 20472: # 786 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: inline const char* 20472: scan_not(mask __m, const char* __lo, const char* __hi) const; 20472: # 801 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: char_type 20472: toupper(char_type __c) const 20472: { return this->do_toupper(__c); } 20472: # 818 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: const char_type* 20472: toupper(char_type *__lo, const char_type* __hi) const 20472: { return this->do_toupper(__lo, __hi); } 20472: # 834 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: char_type 20472: tolower(char_type __c) const 20472: { return this->do_tolower(__c); } 20472: # 851 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: const char_type* 20472: tolower(char_type* __lo, const char_type* __hi) const 20472: { return this->do_tolower(__lo, __hi); } 20472: # 871 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: char_type 20472: widen(char __c) const 20472: { 20472: if (_M_widen_ok) 20472: return _M_widen[static_cast(__c)]; 20472: this->_M_widen_init(); 20472: return this->do_widen(__c); 20472: } 20472: # 898 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: const char* 20472: widen(const char* __lo, const char* __hi, char_type* __to) const 20472: { 20472: if (_M_widen_ok == 1) 20472: { 20472: if (__builtin_expect(__hi != __lo, true)) 20472: __builtin_memcpy(__to, __lo, __hi - __lo); 20472: return __hi; 20472: } 20472: if (!_M_widen_ok) 20472: _M_widen_init(); 20472: return this->do_widen(__lo, __hi, __to); 20472: } 20472: # 930 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: char 20472: narrow(char_type __c, char __dfault) const 20472: { 20472: if (_M_narrow[static_cast(__c)]) 20472: return _M_narrow[static_cast(__c)]; 20472: const char __t = do_narrow(__c, __dfault); 20472: if (__t != __dfault) 20472: _M_narrow[static_cast(__c)] = __t; 20472: return __t; 20472: } 20472: # 963 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: const char_type* 20472: narrow(const char_type* __lo, const char_type* __hi, 20472: char __dfault, char* __to) const 20472: { 20472: if (__builtin_expect(_M_narrow_ok == 1, true)) 20472: { 20472: if (__builtin_expect(__hi != __lo, true)) 20472: __builtin_memcpy(__to, __lo, __hi - __lo); 20472: return __hi; 20472: } 20472: if (!_M_narrow_ok) 20472: _M_narrow_init(); 20472: return this->do_narrow(__lo, __hi, __dfault, __to); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: const mask* 20472: table() const throw() 20472: { return _M_table; } 20472: 20472: 20472: static const mask* 20472: classic_table() throw(); 20472: protected: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual 20472: ~ctype(); 20472: # 1013 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: virtual char_type 20472: do_toupper(char_type __c) const; 20472: # 1030 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: virtual const char_type* 20472: do_toupper(char_type* __lo, const char_type* __hi) const; 20472: # 1046 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: virtual char_type 20472: do_tolower(char_type __c) const; 20472: # 1063 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: virtual const char_type* 20472: do_tolower(char_type* __lo, const char_type* __hi) const; 20472: # 1083 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: virtual char_type 20472: do_widen(char __c) const 20472: { return __c; } 20472: # 1106 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: virtual const char* 20472: do_widen(const char* __lo, const char* __hi, char_type* __to) const 20472: { 20472: if (__builtin_expect(__hi != __lo, true)) 20472: __builtin_memcpy(__to, __lo, __hi - __lo); 20472: return __hi; 20472: } 20472: # 1133 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: virtual char 20472: do_narrow(char_type __c, char __dfault __attribute__((__unused__))) const 20472: { return __c; } 20472: # 1159 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: virtual const char_type* 20472: do_narrow(const char_type* __lo, const char_type* __hi, 20472: char __dfault __attribute__((__unused__)), char* __to) const 20472: { 20472: if (__builtin_expect(__hi != __lo, true)) 20472: __builtin_memcpy(__to, __lo, __hi - __lo); 20472: return __hi; 20472: } 20472: 20472: private: 20472: void _M_narrow_init() const; 20472: void _M_widen_init() const; 20472: }; 20472: # 1185 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: template<> 20472: class ctype : public __ctype_abstract_base 20472: { 20472: public: 20472: 20472: 20472: typedef wchar_t char_type; 20472: typedef wctype_t __wmask_type; 20472: 20472: protected: 20472: __c_locale _M_c_locale_ctype; 20472: 20472: 20472: bool _M_narrow_ok; 20472: char _M_narrow[128]; 20472: wint_t _M_widen[1 + static_cast(-1)]; 20472: 20472: 20472: mask _M_bit[16]; 20472: __wmask_type _M_wmask[16]; 20472: 20472: public: 20472: 20472: 20472: static locale::id id; 20472: # 1218 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: explicit 20472: ctype(size_t __refs = 0); 20472: # 1229 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: explicit 20472: ctype(__c_locale __cloc, size_t __refs = 0); 20472: 20472: protected: 20472: __wmask_type 20472: _M_convert_to_wmask(const mask __m) const throw(); 20472: 20472: 20472: virtual 20472: ~ctype(); 20472: # 1253 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: virtual bool 20472: do_is(mask __m, char_type __c) const; 20472: # 1272 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: virtual const char_type* 20472: do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const; 20472: # 1290 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: virtual const char_type* 20472: do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const; 20472: # 1308 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: virtual const char_type* 20472: do_scan_not(mask __m, const char_type* __lo, 20472: const char_type* __hi) const; 20472: # 1325 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: virtual char_type 20472: do_toupper(char_type __c) const; 20472: # 1342 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: virtual const char_type* 20472: do_toupper(char_type* __lo, const char_type* __hi) const; 20472: # 1358 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: virtual char_type 20472: do_tolower(char_type __c) const; 20472: # 1375 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: virtual const char_type* 20472: do_tolower(char_type* __lo, const char_type* __hi) const; 20472: # 1395 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: virtual char_type 20472: do_widen(char __c) const; 20472: # 1417 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: virtual const char* 20472: do_widen(const char* __lo, const char* __hi, char_type* __to) const; 20472: # 1440 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: virtual char 20472: do_narrow(char_type __c, char __dfault) const; 20472: # 1466 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: virtual const char_type* 20472: do_narrow(const char_type* __lo, const char_type* __hi, 20472: char __dfault, char* __to) const; 20472: 20472: 20472: void 20472: _M_initialize_ctype() throw(); 20472: }; 20472: 20472: 20472: 20472: template 20472: class ctype_byname : public ctype<_CharT> 20472: { 20472: public: 20472: typedef typename ctype<_CharT>::mask mask; 20472: 20472: explicit 20472: ctype_byname(const char* __s, size_t __refs = 0); 20472: 20472: 20472: explicit 20472: ctype_byname(const string& __s, size_t __refs = 0) 20472: : ctype_byname(__s.c_str(), __refs) { } 20472: 20472: 20472: protected: 20472: virtual 20472: ~ctype_byname() { } 20472: }; 20472: 20472: 20472: template<> 20472: class ctype_byname : public ctype 20472: { 20472: public: 20472: explicit 20472: ctype_byname(const char* __s, size_t __refs = 0); 20472: 20472: 20472: explicit 20472: ctype_byname(const string& __s, size_t __refs = 0); 20472: 20472: 20472: protected: 20472: virtual 20472: ~ctype_byname(); 20472: }; 20472: 20472: 20472: template<> 20472: class ctype_byname : public ctype 20472: { 20472: public: 20472: explicit 20472: ctype_byname(const char* __s, size_t __refs = 0); 20472: 20472: 20472: explicit 20472: ctype_byname(const string& __s, size_t __refs = 0); 20472: 20472: 20472: protected: 20472: virtual 20472: ~ctype_byname(); 20472: }; 20472: 20472: 20472: 20472: } 20472: 20472: 20472: # 1 "/usr/include/arm-linux-gnueabihf/c++/10/bits/ctype_inline.h" 1 3 20472: # 37 "/usr/include/arm-linux-gnueabihf/c++/10/bits/ctype_inline.h" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: bool 20472: ctype:: 20472: is(mask __m, char __c) const 20472: { return _M_table[static_cast(__c)] & __m; } 20472: 20472: const char* 20472: ctype:: 20472: is(const char* __low, const char* __high, mask* __vec) const 20472: { 20472: while (__low < __high) 20472: *__vec++ = _M_table[static_cast(*__low++)]; 20472: return __high; 20472: } 20472: 20472: const char* 20472: ctype:: 20472: scan_is(mask __m, const char* __low, const char* __high) const 20472: { 20472: while (__low < __high 20472: && !(_M_table[static_cast(*__low)] & __m)) 20472: ++__low; 20472: return __low; 20472: } 20472: 20472: const char* 20472: ctype:: 20472: scan_not(mask __m, const char* __low, const char* __high) const 20472: { 20472: while (__low < __high 20472: && (_M_table[static_cast(*__low)] & __m) != 0) 20472: ++__low; 20472: return __low; 20472: } 20472: 20472: 20472: } 20472: # 1539 "/usr/include/c++/10/bits/locale_facets.h" 2 3 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: class __num_base 20472: { 20472: public: 20472: 20472: 20472: enum 20472: { 20472: _S_ominus, 20472: _S_oplus, 20472: _S_ox, 20472: _S_oX, 20472: _S_odigits, 20472: _S_odigits_end = _S_odigits + 16, 20472: _S_oudigits = _S_odigits_end, 20472: _S_oudigits_end = _S_oudigits + 16, 20472: _S_oe = _S_odigits + 14, 20472: _S_oE = _S_oudigits + 14, 20472: _S_oend = _S_oudigits_end 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: static const char* _S_atoms_out; 20472: 20472: 20472: 20472: static const char* _S_atoms_in; 20472: 20472: enum 20472: { 20472: _S_iminus, 20472: _S_iplus, 20472: _S_ix, 20472: _S_iX, 20472: _S_izero, 20472: _S_ie = _S_izero + 14, 20472: _S_iE = _S_izero + 20, 20472: _S_iend = 26 20472: }; 20472: 20472: 20472: 20472: static void 20472: _S_format_float(const ios_base& __io, char* __fptr, char __mod) throw(); 20472: }; 20472: 20472: template 20472: struct __numpunct_cache : public locale::facet 20472: { 20472: const char* _M_grouping; 20472: size_t _M_grouping_size; 20472: bool _M_use_grouping; 20472: const _CharT* _M_truename; 20472: size_t _M_truename_size; 20472: const _CharT* _M_falsename; 20472: size_t _M_falsename_size; 20472: _CharT _M_decimal_point; 20472: _CharT _M_thousands_sep; 20472: 20472: 20472: 20472: 20472: 20472: _CharT _M_atoms_out[__num_base::_S_oend]; 20472: 20472: 20472: 20472: 20472: 20472: _CharT _M_atoms_in[__num_base::_S_iend]; 20472: 20472: bool _M_allocated; 20472: 20472: __numpunct_cache(size_t __refs = 0) 20472: : facet(__refs), _M_grouping(0), _M_grouping_size(0), 20472: _M_use_grouping(false), 20472: _M_truename(0), _M_truename_size(0), _M_falsename(0), 20472: _M_falsename_size(0), _M_decimal_point(_CharT()), 20472: _M_thousands_sep(_CharT()), _M_allocated(false) 20472: { } 20472: 20472: ~__numpunct_cache(); 20472: 20472: void 20472: _M_cache(const locale& __loc); 20472: 20472: private: 20472: __numpunct_cache& 20472: operator=(const __numpunct_cache&); 20472: 20472: explicit 20472: __numpunct_cache(const __numpunct_cache&); 20472: }; 20472: 20472: template 20472: __numpunct_cache<_CharT>::~__numpunct_cache() 20472: { 20472: if (_M_allocated) 20472: { 20472: delete [] _M_grouping; 20472: delete [] _M_truename; 20472: delete [] _M_falsename; 20472: } 20472: } 20472: 20472: namespace __cxx11 { 20472: # 1669 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: template 20472: class numpunct : public locale::facet 20472: { 20472: public: 20472: 20472: 20472: 20472: typedef _CharT char_type; 20472: typedef basic_string<_CharT> string_type; 20472: 20472: typedef __numpunct_cache<_CharT> __cache_type; 20472: 20472: protected: 20472: __cache_type* _M_data; 20472: 20472: public: 20472: 20472: static locale::id id; 20472: 20472: 20472: 20472: 20472: 20472: 20472: explicit 20472: numpunct(size_t __refs = 0) 20472: : facet(__refs), _M_data(0) 20472: { _M_initialize_numpunct(); } 20472: # 1707 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: explicit 20472: numpunct(__cache_type* __cache, size_t __refs = 0) 20472: : facet(__refs), _M_data(__cache) 20472: { _M_initialize_numpunct(); } 20472: # 1721 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: explicit 20472: numpunct(__c_locale __cloc, size_t __refs = 0) 20472: : facet(__refs), _M_data(0) 20472: { _M_initialize_numpunct(__cloc); } 20472: # 1735 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: char_type 20472: decimal_point() const 20472: { return this->do_decimal_point(); } 20472: # 1748 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: char_type 20472: thousands_sep() const 20472: { return this->do_thousands_sep(); } 20472: # 1779 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: string 20472: grouping() const 20472: { return this->do_grouping(); } 20472: # 1792 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: string_type 20472: truename() const 20472: { return this->do_truename(); } 20472: # 1805 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: string_type 20472: falsename() const 20472: { return this->do_falsename(); } 20472: 20472: protected: 20472: 20472: virtual 20472: ~numpunct(); 20472: # 1822 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: virtual char_type 20472: do_decimal_point() const 20472: { return _M_data->_M_decimal_point; } 20472: # 1834 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: virtual char_type 20472: do_thousands_sep() const 20472: { return _M_data->_M_thousands_sep; } 20472: # 1847 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: virtual string 20472: do_grouping() const 20472: { return _M_data->_M_grouping; } 20472: # 1860 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: virtual string_type 20472: do_truename() const 20472: { return _M_data->_M_truename; } 20472: # 1873 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: virtual string_type 20472: do_falsename() const 20472: { return _M_data->_M_falsename; } 20472: 20472: 20472: void 20472: _M_initialize_numpunct(__c_locale __cloc = 0); 20472: }; 20472: 20472: template 20472: locale::id numpunct<_CharT>::id; 20472: 20472: template<> 20472: numpunct::~numpunct(); 20472: 20472: template<> 20472: void 20472: numpunct::_M_initialize_numpunct(__c_locale __cloc); 20472: 20472: 20472: template<> 20472: numpunct::~numpunct(); 20472: 20472: template<> 20472: void 20472: numpunct::_M_initialize_numpunct(__c_locale __cloc); 20472: 20472: 20472: 20472: template 20472: class numpunct_byname : public numpunct<_CharT> 20472: { 20472: public: 20472: typedef _CharT char_type; 20472: typedef basic_string<_CharT> string_type; 20472: 20472: explicit 20472: numpunct_byname(const char* __s, size_t __refs = 0) 20472: : numpunct<_CharT>(__refs) 20472: { 20472: if (__builtin_strcmp(__s, "C") != 0 20472: && __builtin_strcmp(__s, "POSIX") != 0) 20472: { 20472: __c_locale __tmp; 20472: this->_S_create_c_locale(__tmp, __s); 20472: this->_M_initialize_numpunct(__tmp); 20472: this->_S_destroy_c_locale(__tmp); 20472: } 20472: } 20472: 20472: 20472: explicit 20472: numpunct_byname(const string& __s, size_t __refs = 0) 20472: : numpunct_byname(__s.c_str(), __refs) { } 20472: 20472: 20472: protected: 20472: virtual 20472: ~numpunct_byname() { } 20472: }; 20472: 20472: } 20472: 20472: 20472: # 1951 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: template 20472: class num_get : public locale::facet 20472: { 20472: public: 20472: 20472: 20472: 20472: typedef _CharT char_type; 20472: typedef _InIter iter_type; 20472: 20472: 20472: 20472: static locale::id id; 20472: # 1972 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: explicit 20472: num_get(size_t __refs = 0) : facet(__refs) { } 20472: # 1998 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: iter_type 20472: get(iter_type __in, iter_type __end, ios_base& __io, 20472: ios_base::iostate& __err, bool& __v) const 20472: { return this->do_get(__in, __end, __io, __err, __v); } 20472: # 2035 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: iter_type 20472: get(iter_type __in, iter_type __end, ios_base& __io, 20472: ios_base::iostate& __err, long& __v) const 20472: { return this->do_get(__in, __end, __io, __err, __v); } 20472: 20472: iter_type 20472: get(iter_type __in, iter_type __end, ios_base& __io, 20472: ios_base::iostate& __err, unsigned short& __v) const 20472: { return this->do_get(__in, __end, __io, __err, __v); } 20472: 20472: iter_type 20472: get(iter_type __in, iter_type __end, ios_base& __io, 20472: ios_base::iostate& __err, unsigned int& __v) const 20472: { return this->do_get(__in, __end, __io, __err, __v); } 20472: 20472: iter_type 20472: get(iter_type __in, iter_type __end, ios_base& __io, 20472: ios_base::iostate& __err, unsigned long& __v) const 20472: { return this->do_get(__in, __end, __io, __err, __v); } 20472: 20472: 20472: iter_type 20472: get(iter_type __in, iter_type __end, ios_base& __io, 20472: ios_base::iostate& __err, long long& __v) const 20472: { return this->do_get(__in, __end, __io, __err, __v); } 20472: 20472: iter_type 20472: get(iter_type __in, iter_type __end, ios_base& __io, 20472: ios_base::iostate& __err, unsigned long long& __v) const 20472: { return this->do_get(__in, __end, __io, __err, __v); } 20472: # 2095 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: iter_type 20472: get(iter_type __in, iter_type __end, ios_base& __io, 20472: ios_base::iostate& __err, float& __v) const 20472: { return this->do_get(__in, __end, __io, __err, __v); } 20472: 20472: iter_type 20472: get(iter_type __in, iter_type __end, ios_base& __io, 20472: ios_base::iostate& __err, double& __v) const 20472: { return this->do_get(__in, __end, __io, __err, __v); } 20472: 20472: iter_type 20472: get(iter_type __in, iter_type __end, ios_base& __io, 20472: ios_base::iostate& __err, long double& __v) const 20472: { return this->do_get(__in, __end, __io, __err, __v); } 20472: # 2138 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: iter_type 20472: get(iter_type __in, iter_type __end, ios_base& __io, 20472: ios_base::iostate& __err, void*& __v) const 20472: { return this->do_get(__in, __end, __io, __err, __v); } 20472: 20472: protected: 20472: 20472: virtual ~num_get() { } 20472: 20472: __attribute ((__abi_tag__ ("cxx11"))) 20472: iter_type 20472: _M_extract_float(iter_type, iter_type, ios_base&, ios_base::iostate&, 20472: string&) const; 20472: 20472: template 20472: __attribute ((__abi_tag__ ("cxx11"))) 20472: iter_type 20472: _M_extract_int(iter_type, iter_type, ios_base&, ios_base::iostate&, 20472: _ValueT&) const; 20472: 20472: template 20472: typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, int>::__type 20472: _M_find(const _CharT2*, size_t __len, _CharT2 __c) const 20472: { 20472: int __ret = -1; 20472: if (__len <= 10) 20472: { 20472: if (__c >= _CharT2('0') && __c < _CharT2(_CharT2('0') + __len)) 20472: __ret = __c - _CharT2('0'); 20472: } 20472: else 20472: { 20472: if (__c >= _CharT2('0') && __c <= _CharT2('9')) 20472: __ret = __c - _CharT2('0'); 20472: else if (__c >= _CharT2('a') && __c <= _CharT2('f')) 20472: __ret = 10 + (__c - _CharT2('a')); 20472: else if (__c >= _CharT2('A') && __c <= _CharT2('F')) 20472: __ret = 10 + (__c - _CharT2('A')); 20472: } 20472: return __ret; 20472: } 20472: 20472: template 20472: typename __gnu_cxx::__enable_if::__value, 20472: int>::__type 20472: _M_find(const _CharT2* __zero, size_t __len, _CharT2 __c) const 20472: { 20472: int __ret = -1; 20472: const char_type* __q = char_traits<_CharT2>::find(__zero, __len, __c); 20472: if (__q) 20472: { 20472: __ret = __q - __zero; 20472: if (__ret > 15) 20472: __ret -= 6; 20472: } 20472: return __ret; 20472: } 20472: # 2211 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: virtual iter_type 20472: do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, bool&) const; 20472: 20472: virtual iter_type 20472: do_get(iter_type __beg, iter_type __end, ios_base& __io, 20472: ios_base::iostate& __err, long& __v) const 20472: { return _M_extract_int(__beg, __end, __io, __err, __v); } 20472: 20472: virtual iter_type 20472: do_get(iter_type __beg, iter_type __end, ios_base& __io, 20472: ios_base::iostate& __err, unsigned short& __v) const 20472: { return _M_extract_int(__beg, __end, __io, __err, __v); } 20472: 20472: virtual iter_type 20472: do_get(iter_type __beg, iter_type __end, ios_base& __io, 20472: ios_base::iostate& __err, unsigned int& __v) const 20472: { return _M_extract_int(__beg, __end, __io, __err, __v); } 20472: 20472: virtual iter_type 20472: do_get(iter_type __beg, iter_type __end, ios_base& __io, 20472: ios_base::iostate& __err, unsigned long& __v) const 20472: { return _M_extract_int(__beg, __end, __io, __err, __v); } 20472: 20472: 20472: virtual iter_type 20472: do_get(iter_type __beg, iter_type __end, ios_base& __io, 20472: ios_base::iostate& __err, long long& __v) const 20472: { return _M_extract_int(__beg, __end, __io, __err, __v); } 20472: 20472: virtual iter_type 20472: do_get(iter_type __beg, iter_type __end, ios_base& __io, 20472: ios_base::iostate& __err, unsigned long long& __v) const 20472: { return _M_extract_int(__beg, __end, __io, __err, __v); } 20472: 20472: 20472: virtual iter_type 20472: do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, float&) const; 20472: 20472: virtual iter_type 20472: do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, 20472: double&) const; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual iter_type 20472: do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, 20472: long double&) const; 20472: 20472: 20472: virtual iter_type 20472: do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, void*&) const; 20472: # 2274 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: }; 20472: 20472: template 20472: locale::id num_get<_CharT, _InIter>::id; 20472: # 2292 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: template 20472: class num_put : public locale::facet 20472: { 20472: public: 20472: 20472: 20472: 20472: typedef _CharT char_type; 20472: typedef _OutIter iter_type; 20472: 20472: 20472: 20472: static locale::id id; 20472: # 2313 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: explicit 20472: num_put(size_t __refs = 0) : facet(__refs) { } 20472: # 2331 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: iter_type 20472: put(iter_type __s, ios_base& __io, char_type __fill, bool __v) const 20472: { return this->do_put(__s, __io, __fill, __v); } 20472: # 2373 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: iter_type 20472: put(iter_type __s, ios_base& __io, char_type __fill, long __v) const 20472: { return this->do_put(__s, __io, __fill, __v); } 20472: 20472: iter_type 20472: put(iter_type __s, ios_base& __io, char_type __fill, 20472: unsigned long __v) const 20472: { return this->do_put(__s, __io, __fill, __v); } 20472: 20472: 20472: iter_type 20472: put(iter_type __s, ios_base& __io, char_type __fill, long long __v) const 20472: { return this->do_put(__s, __io, __fill, __v); } 20472: 20472: iter_type 20472: put(iter_type __s, ios_base& __io, char_type __fill, 20472: unsigned long long __v) const 20472: { return this->do_put(__s, __io, __fill, __v); } 20472: # 2436 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: iter_type 20472: put(iter_type __s, ios_base& __io, char_type __fill, double __v) const 20472: { return this->do_put(__s, __io, __fill, __v); } 20472: 20472: iter_type 20472: put(iter_type __s, ios_base& __io, char_type __fill, 20472: long double __v) const 20472: { return this->do_put(__s, __io, __fill, __v); } 20472: # 2461 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: iter_type 20472: put(iter_type __s, ios_base& __io, char_type __fill, 20472: const void* __v) const 20472: { return this->do_put(__s, __io, __fill, __v); } 20472: 20472: protected: 20472: template 20472: iter_type 20472: _M_insert_float(iter_type, ios_base& __io, char_type __fill, 20472: char __mod, _ValueT __v) const; 20472: 20472: void 20472: _M_group_float(const char* __grouping, size_t __grouping_size, 20472: char_type __sep, const char_type* __p, char_type* __new, 20472: char_type* __cs, int& __len) const; 20472: 20472: template 20472: iter_type 20472: _M_insert_int(iter_type, ios_base& __io, char_type __fill, 20472: _ValueT __v) const; 20472: 20472: void 20472: _M_group_int(const char* __grouping, size_t __grouping_size, 20472: char_type __sep, ios_base& __io, char_type* __new, 20472: char_type* __cs, int& __len) const; 20472: 20472: void 20472: _M_pad(char_type __fill, streamsize __w, ios_base& __io, 20472: char_type* __new, const char_type* __cs, int& __len) const; 20472: 20472: 20472: virtual 20472: ~num_put() { } 20472: # 2509 "/usr/include/c++/10/bits/locale_facets.h" 3 20472: virtual iter_type 20472: do_put(iter_type __s, ios_base& __io, char_type __fill, bool __v) const; 20472: 20472: virtual iter_type 20472: do_put(iter_type __s, ios_base& __io, char_type __fill, long __v) const 20472: { return _M_insert_int(__s, __io, __fill, __v); } 20472: 20472: virtual iter_type 20472: do_put(iter_type __s, ios_base& __io, char_type __fill, 20472: unsigned long __v) const 20472: { return _M_insert_int(__s, __io, __fill, __v); } 20472: 20472: 20472: virtual iter_type 20472: do_put(iter_type __s, ios_base& __io, char_type __fill, 20472: long long __v) const 20472: { return _M_insert_int(__s, __io, __fill, __v); } 20472: 20472: virtual iter_type 20472: do_put(iter_type __s, ios_base& __io, char_type __fill, 20472: unsigned long long __v) const 20472: { return _M_insert_int(__s, __io, __fill, __v); } 20472: 20472: 20472: virtual iter_type 20472: do_put(iter_type, ios_base&, char_type, double) const; 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual iter_type 20472: do_put(iter_type, ios_base&, char_type, long double) const; 20472: 20472: 20472: virtual iter_type 20472: do_put(iter_type, ios_base&, char_type, const void*) const; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: }; 20472: 20472: template 20472: locale::id num_put<_CharT, _OutIter>::id; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: inline bool 20472: isspace(_CharT __c, const locale& __loc) 20472: { return use_facet >(__loc).is(ctype_base::space, __c); } 20472: 20472: 20472: template 20472: inline bool 20472: isprint(_CharT __c, const locale& __loc) 20472: { return use_facet >(__loc).is(ctype_base::print, __c); } 20472: 20472: 20472: template 20472: inline bool 20472: iscntrl(_CharT __c, const locale& __loc) 20472: { return use_facet >(__loc).is(ctype_base::cntrl, __c); } 20472: 20472: 20472: template 20472: inline bool 20472: isupper(_CharT __c, const locale& __loc) 20472: { return use_facet >(__loc).is(ctype_base::upper, __c); } 20472: 20472: 20472: template 20472: inline bool 20472: islower(_CharT __c, const locale& __loc) 20472: { return use_facet >(__loc).is(ctype_base::lower, __c); } 20472: 20472: 20472: template 20472: inline bool 20472: isalpha(_CharT __c, const locale& __loc) 20472: { return use_facet >(__loc).is(ctype_base::alpha, __c); } 20472: 20472: 20472: template 20472: inline bool 20472: isdigit(_CharT __c, const locale& __loc) 20472: { return use_facet >(__loc).is(ctype_base::digit, __c); } 20472: 20472: 20472: template 20472: inline bool 20472: ispunct(_CharT __c, const locale& __loc) 20472: { return use_facet >(__loc).is(ctype_base::punct, __c); } 20472: 20472: 20472: template 20472: inline bool 20472: isxdigit(_CharT __c, const locale& __loc) 20472: { return use_facet >(__loc).is(ctype_base::xdigit, __c); } 20472: 20472: 20472: template 20472: inline bool 20472: isalnum(_CharT __c, const locale& __loc) 20472: { return use_facet >(__loc).is(ctype_base::alnum, __c); } 20472: 20472: 20472: template 20472: inline bool 20472: isgraph(_CharT __c, const locale& __loc) 20472: { return use_facet >(__loc).is(ctype_base::graph, __c); } 20472: 20472: 20472: 20472: template 20472: inline bool 20472: isblank(_CharT __c, const locale& __loc) 20472: { return use_facet >(__loc).is(ctype_base::blank, __c); } 20472: 20472: 20472: 20472: template 20472: inline _CharT 20472: toupper(_CharT __c, const locale& __loc) 20472: { return use_facet >(__loc).toupper(__c); } 20472: 20472: 20472: template 20472: inline _CharT 20472: tolower(_CharT __c, const locale& __loc) 20472: { return use_facet >(__loc).tolower(__c); } 20472: 20472: 20472: } 20472: 20472: # 1 "/usr/include/c++/10/bits/locale_facets.tcc" 1 3 20472: # 33 "/usr/include/c++/10/bits/locale_facets.tcc" 3 20472: 20472: # 34 "/usr/include/c++/10/bits/locale_facets.tcc" 3 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: 20472: template 20472: struct __use_cache 20472: { 20472: const _Facet* 20472: operator() (const locale& __loc) const; 20472: }; 20472: 20472: 20472: template 20472: struct __use_cache<__numpunct_cache<_CharT> > 20472: { 20472: const __numpunct_cache<_CharT>* 20472: operator() (const locale& __loc) const 20472: { 20472: const size_t __i = numpunct<_CharT>::id._M_id(); 20472: const locale::facet** __caches = __loc._M_impl->_M_caches; 20472: if (!__caches[__i]) 20472: { 20472: __numpunct_cache<_CharT>* __tmp = 0; 20472: try 20472: { 20472: __tmp = new __numpunct_cache<_CharT>; 20472: __tmp->_M_cache(__loc); 20472: } 20472: catch(...) 20472: { 20472: delete __tmp; 20472: throw; 20472: } 20472: __loc._M_impl->_M_install_cache(__tmp, __i); 20472: } 20472: return static_cast*>(__caches[__i]); 20472: } 20472: }; 20472: 20472: template 20472: void 20472: __numpunct_cache<_CharT>::_M_cache(const locale& __loc) 20472: { 20472: const numpunct<_CharT>& __np = use_facet >(__loc); 20472: 20472: char* __grouping = 0; 20472: _CharT* __truename = 0; 20472: _CharT* __falsename = 0; 20472: try 20472: { 20472: const string& __g = __np.grouping(); 20472: _M_grouping_size = __g.size(); 20472: __grouping = new char[_M_grouping_size]; 20472: __g.copy(__grouping, _M_grouping_size); 20472: _M_use_grouping = (_M_grouping_size 20472: && static_cast(__grouping[0]) > 0 20472: && (__grouping[0] 20472: != __gnu_cxx::__numeric_traits::__max)); 20472: 20472: const basic_string<_CharT>& __tn = __np.truename(); 20472: _M_truename_size = __tn.size(); 20472: __truename = new _CharT[_M_truename_size]; 20472: __tn.copy(__truename, _M_truename_size); 20472: 20472: const basic_string<_CharT>& __fn = __np.falsename(); 20472: _M_falsename_size = __fn.size(); 20472: __falsename = new _CharT[_M_falsename_size]; 20472: __fn.copy(__falsename, _M_falsename_size); 20472: 20472: _M_decimal_point = __np.decimal_point(); 20472: _M_thousands_sep = __np.thousands_sep(); 20472: 20472: const ctype<_CharT>& __ct = use_facet >(__loc); 20472: __ct.widen(__num_base::_S_atoms_out, 20472: __num_base::_S_atoms_out 20472: + __num_base::_S_oend, _M_atoms_out); 20472: __ct.widen(__num_base::_S_atoms_in, 20472: __num_base::_S_atoms_in 20472: + __num_base::_S_iend, _M_atoms_in); 20472: 20472: _M_grouping = __grouping; 20472: _M_truename = __truename; 20472: _M_falsename = __falsename; 20472: _M_allocated = true; 20472: } 20472: catch(...) 20472: { 20472: delete [] __grouping; 20472: delete [] __truename; 20472: delete [] __falsename; 20472: throw; 20472: } 20472: } 20472: # 139 "/usr/include/c++/10/bits/locale_facets.tcc" 3 20472: __attribute__ ((__pure__)) bool 20472: __verify_grouping(const char* __grouping, size_t __grouping_size, 20472: const string& __grouping_tmp) throw (); 20472: 20472: 20472: 20472: template 20472: __attribute ((__abi_tag__ ("cxx11"))) 20472: _InIter 20472: num_get<_CharT, _InIter>:: 20472: _M_extract_float(_InIter __beg, _InIter __end, ios_base& __io, 20472: ios_base::iostate& __err, string& __xtrc) const 20472: { 20472: typedef char_traits<_CharT> __traits_type; 20472: typedef __numpunct_cache<_CharT> __cache_type; 20472: __use_cache<__cache_type> __uc; 20472: const locale& __loc = __io._M_getloc(); 20472: const __cache_type* __lc = __uc(__loc); 20472: const _CharT* __lit = __lc->_M_atoms_in; 20472: char_type __c = char_type(); 20472: 20472: 20472: bool __testeof = __beg == __end; 20472: 20472: 20472: if (!__testeof) 20472: { 20472: __c = *__beg; 20472: const bool __plus = __c == __lit[__num_base::_S_iplus]; 20472: if ((__plus || __c == __lit[__num_base::_S_iminus]) 20472: && !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) 20472: && !(__c == __lc->_M_decimal_point)) 20472: { 20472: __xtrc += __plus ? '+' : '-'; 20472: if (++__beg != __end) 20472: __c = *__beg; 20472: else 20472: __testeof = true; 20472: } 20472: } 20472: 20472: 20472: bool __found_mantissa = false; 20472: int __sep_pos = 0; 20472: while (!__testeof) 20472: { 20472: if ((__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) 20472: || __c == __lc->_M_decimal_point) 20472: break; 20472: else if (__c == __lit[__num_base::_S_izero]) 20472: { 20472: if (!__found_mantissa) 20472: { 20472: __xtrc += '0'; 20472: __found_mantissa = true; 20472: } 20472: ++__sep_pos; 20472: 20472: if (++__beg != __end) 20472: __c = *__beg; 20472: else 20472: __testeof = true; 20472: } 20472: else 20472: break; 20472: } 20472: 20472: 20472: bool __found_dec = false; 20472: bool __found_sci = false; 20472: string __found_grouping; 20472: if (__lc->_M_use_grouping) 20472: __found_grouping.reserve(32); 20472: const char_type* __lit_zero = __lit + __num_base::_S_izero; 20472: 20472: if (!__lc->_M_allocated) 20472: 20472: while (!__testeof) 20472: { 20472: const int __digit = _M_find(__lit_zero, 10, __c); 20472: if (__digit != -1) 20472: { 20472: __xtrc += '0' + __digit; 20472: __found_mantissa = true; 20472: } 20472: else if (__c == __lc->_M_decimal_point 20472: && !__found_dec && !__found_sci) 20472: { 20472: __xtrc += '.'; 20472: __found_dec = true; 20472: } 20472: else if ((__c == __lit[__num_base::_S_ie] 20472: || __c == __lit[__num_base::_S_iE]) 20472: && !__found_sci && __found_mantissa) 20472: { 20472: 20472: __xtrc += 'e'; 20472: __found_sci = true; 20472: 20472: 20472: if (++__beg != __end) 20472: { 20472: __c = *__beg; 20472: const bool __plus = __c == __lit[__num_base::_S_iplus]; 20472: if (__plus || __c == __lit[__num_base::_S_iminus]) 20472: __xtrc += __plus ? '+' : '-'; 20472: else 20472: continue; 20472: } 20472: else 20472: { 20472: __testeof = true; 20472: break; 20472: } 20472: } 20472: else 20472: break; 20472: 20472: if (++__beg != __end) 20472: __c = *__beg; 20472: else 20472: __testeof = true; 20472: } 20472: else 20472: while (!__testeof) 20472: { 20472: 20472: 20472: if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) 20472: { 20472: if (!__found_dec && !__found_sci) 20472: { 20472: 20472: 20472: if (__sep_pos) 20472: { 20472: __found_grouping += static_cast(__sep_pos); 20472: __sep_pos = 0; 20472: } 20472: else 20472: { 20472: 20472: 20472: __xtrc.clear(); 20472: break; 20472: } 20472: } 20472: else 20472: break; 20472: } 20472: else if (__c == __lc->_M_decimal_point) 20472: { 20472: if (!__found_dec && !__found_sci) 20472: { 20472: 20472: 20472: 20472: if (__found_grouping.size()) 20472: __found_grouping += static_cast(__sep_pos); 20472: __xtrc += '.'; 20472: __found_dec = true; 20472: } 20472: else 20472: break; 20472: } 20472: else 20472: { 20472: const char_type* __q = 20472: __traits_type::find(__lit_zero, 10, __c); 20472: if (__q) 20472: { 20472: __xtrc += '0' + (__q - __lit_zero); 20472: __found_mantissa = true; 20472: ++__sep_pos; 20472: } 20472: else if ((__c == __lit[__num_base::_S_ie] 20472: || __c == __lit[__num_base::_S_iE]) 20472: && !__found_sci && __found_mantissa) 20472: { 20472: 20472: if (__found_grouping.size() && !__found_dec) 20472: __found_grouping += static_cast(__sep_pos); 20472: __xtrc += 'e'; 20472: __found_sci = true; 20472: 20472: 20472: if (++__beg != __end) 20472: { 20472: __c = *__beg; 20472: const bool __plus = __c == __lit[__num_base::_S_iplus]; 20472: if ((__plus || __c == __lit[__num_base::_S_iminus]) 20472: && !(__lc->_M_use_grouping 20472: && __c == __lc->_M_thousands_sep) 20472: && !(__c == __lc->_M_decimal_point)) 20472: __xtrc += __plus ? '+' : '-'; 20472: else 20472: continue; 20472: } 20472: else 20472: { 20472: __testeof = true; 20472: break; 20472: } 20472: } 20472: else 20472: break; 20472: } 20472: 20472: if (++__beg != __end) 20472: __c = *__beg; 20472: else 20472: __testeof = true; 20472: } 20472: 20472: 20472: 20472: if (__found_grouping.size()) 20472: { 20472: 20472: if (!__found_dec && !__found_sci) 20472: __found_grouping += static_cast(__sep_pos); 20472: 20472: if (!std::__verify_grouping(__lc->_M_grouping, 20472: __lc->_M_grouping_size, 20472: __found_grouping)) 20472: __err = ios_base::failbit; 20472: } 20472: 20472: return __beg; 20472: } 20472: 20472: template 20472: template 20472: __attribute ((__abi_tag__ ("cxx11"))) 20472: _InIter 20472: num_get<_CharT, _InIter>:: 20472: _M_extract_int(_InIter __beg, _InIter __end, ios_base& __io, 20472: ios_base::iostate& __err, _ValueT& __v) const 20472: { 20472: typedef char_traits<_CharT> __traits_type; 20472: using __gnu_cxx::__add_unsigned; 20472: typedef typename __add_unsigned<_ValueT>::__type __unsigned_type; 20472: typedef __numpunct_cache<_CharT> __cache_type; 20472: __use_cache<__cache_type> __uc; 20472: const locale& __loc = __io._M_getloc(); 20472: const __cache_type* __lc = __uc(__loc); 20472: const _CharT* __lit = __lc->_M_atoms_in; 20472: char_type __c = char_type(); 20472: 20472: 20472: const ios_base::fmtflags __basefield = __io.flags() 20472: & ios_base::basefield; 20472: const bool __oct = __basefield == ios_base::oct; 20472: int __base = __oct ? 8 : (__basefield == ios_base::hex ? 16 : 10); 20472: 20472: 20472: bool __testeof = __beg == __end; 20472: 20472: 20472: bool __negative = false; 20472: if (!__testeof) 20472: { 20472: __c = *__beg; 20472: __negative = __c == __lit[__num_base::_S_iminus]; 20472: if ((__negative || __c == __lit[__num_base::_S_iplus]) 20472: && !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) 20472: && !(__c == __lc->_M_decimal_point)) 20472: { 20472: if (++__beg != __end) 20472: __c = *__beg; 20472: else 20472: __testeof = true; 20472: } 20472: } 20472: 20472: 20472: 20472: bool __found_zero = false; 20472: int __sep_pos = 0; 20472: while (!__testeof) 20472: { 20472: if ((__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) 20472: || __c == __lc->_M_decimal_point) 20472: break; 20472: else if (__c == __lit[__num_base::_S_izero] 20472: && (!__found_zero || __base == 10)) 20472: { 20472: __found_zero = true; 20472: ++__sep_pos; 20472: if (__basefield == 0) 20472: __base = 8; 20472: if (__base == 8) 20472: __sep_pos = 0; 20472: } 20472: else if (__found_zero 20472: && (__c == __lit[__num_base::_S_ix] 20472: || __c == __lit[__num_base::_S_iX])) 20472: { 20472: if (__basefield == 0) 20472: __base = 16; 20472: if (__base == 16) 20472: { 20472: __found_zero = false; 20472: __sep_pos = 0; 20472: } 20472: else 20472: break; 20472: } 20472: else 20472: break; 20472: 20472: if (++__beg != __end) 20472: { 20472: __c = *__beg; 20472: if (!__found_zero) 20472: break; 20472: } 20472: else 20472: __testeof = true; 20472: } 20472: 20472: 20472: 20472: const size_t __len = (__base == 16 ? __num_base::_S_iend 20472: - __num_base::_S_izero : __base); 20472: 20472: 20472: typedef __gnu_cxx::__numeric_traits<_ValueT> __num_traits; 20472: string __found_grouping; 20472: if (__lc->_M_use_grouping) 20472: __found_grouping.reserve(32); 20472: bool __testfail = false; 20472: bool __testoverflow = false; 20472: const __unsigned_type __max = 20472: (__negative && __num_traits::__is_signed) 20472: ? -static_cast<__unsigned_type>(__num_traits::__min) 20472: : __num_traits::__max; 20472: const __unsigned_type __smax = __max / __base; 20472: __unsigned_type __result = 0; 20472: int __digit = 0; 20472: const char_type* __lit_zero = __lit + __num_base::_S_izero; 20472: 20472: if (!__lc->_M_allocated) 20472: 20472: while (!__testeof) 20472: { 20472: __digit = _M_find(__lit_zero, __len, __c); 20472: if (__digit == -1) 20472: break; 20472: 20472: if (__result > __smax) 20472: __testoverflow = true; 20472: else 20472: { 20472: __result *= __base; 20472: __testoverflow |= __result > __max - __digit; 20472: __result += __digit; 20472: ++__sep_pos; 20472: } 20472: 20472: if (++__beg != __end) 20472: __c = *__beg; 20472: else 20472: __testeof = true; 20472: } 20472: else 20472: while (!__testeof) 20472: { 20472: 20472: 20472: if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) 20472: { 20472: 20472: 20472: if (__sep_pos) 20472: { 20472: __found_grouping += static_cast(__sep_pos); 20472: __sep_pos = 0; 20472: } 20472: else 20472: { 20472: __testfail = true; 20472: break; 20472: } 20472: } 20472: else if (__c == __lc->_M_decimal_point) 20472: break; 20472: else 20472: { 20472: const char_type* __q = 20472: __traits_type::find(__lit_zero, __len, __c); 20472: if (!__q) 20472: break; 20472: 20472: __digit = __q - __lit_zero; 20472: if (__digit > 15) 20472: __digit -= 6; 20472: if (__result > __smax) 20472: __testoverflow = true; 20472: else 20472: { 20472: __result *= __base; 20472: __testoverflow |= __result > __max - __digit; 20472: __result += __digit; 20472: ++__sep_pos; 20472: } 20472: } 20472: 20472: if (++__beg != __end) 20472: __c = *__beg; 20472: else 20472: __testeof = true; 20472: } 20472: 20472: 20472: 20472: if (__found_grouping.size()) 20472: { 20472: 20472: __found_grouping += static_cast(__sep_pos); 20472: 20472: if (!std::__verify_grouping(__lc->_M_grouping, 20472: __lc->_M_grouping_size, 20472: __found_grouping)) 20472: __err = ios_base::failbit; 20472: } 20472: 20472: 20472: 20472: if ((!__sep_pos && !__found_zero && !__found_grouping.size()) 20472: || __testfail) 20472: { 20472: __v = 0; 20472: __err = ios_base::failbit; 20472: } 20472: else if (__testoverflow) 20472: { 20472: if (__negative && __num_traits::__is_signed) 20472: __v = __num_traits::__min; 20472: else 20472: __v = __num_traits::__max; 20472: __err = ios_base::failbit; 20472: } 20472: else 20472: __v = __negative ? -__result : __result; 20472: 20472: if (__testeof) 20472: __err |= ios_base::eofbit; 20472: return __beg; 20472: } 20472: 20472: 20472: 20472: template 20472: _InIter 20472: num_get<_CharT, _InIter>:: 20472: do_get(iter_type __beg, iter_type __end, ios_base& __io, 20472: ios_base::iostate& __err, bool& __v) const 20472: { 20472: if (!(__io.flags() & ios_base::boolalpha)) 20472: { 20472: 20472: 20472: 20472: long __l = -1; 20472: __beg = _M_extract_int(__beg, __end, __io, __err, __l); 20472: if (__l == 0 || __l == 1) 20472: __v = bool(__l); 20472: else 20472: { 20472: 20472: 20472: __v = true; 20472: __err = ios_base::failbit; 20472: if (__beg == __end) 20472: __err |= ios_base::eofbit; 20472: } 20472: } 20472: else 20472: { 20472: 20472: typedef __numpunct_cache<_CharT> __cache_type; 20472: __use_cache<__cache_type> __uc; 20472: const locale& __loc = __io._M_getloc(); 20472: const __cache_type* __lc = __uc(__loc); 20472: 20472: bool __testf = true; 20472: bool __testt = true; 20472: bool __donef = __lc->_M_falsename_size == 0; 20472: bool __donet = __lc->_M_truename_size == 0; 20472: bool __testeof = false; 20472: size_t __n = 0; 20472: while (!__donef || !__donet) 20472: { 20472: if (__beg == __end) 20472: { 20472: __testeof = true; 20472: break; 20472: } 20472: 20472: const char_type __c = *__beg; 20472: 20472: if (!__donef) 20472: __testf = __c == __lc->_M_falsename[__n]; 20472: 20472: if (!__testf && __donet) 20472: break; 20472: 20472: if (!__donet) 20472: __testt = __c == __lc->_M_truename[__n]; 20472: 20472: if (!__testt && __donef) 20472: break; 20472: 20472: if (!__testt && !__testf) 20472: break; 20472: 20472: ++__n; 20472: ++__beg; 20472: 20472: __donef = !__testf || __n >= __lc->_M_falsename_size; 20472: __donet = !__testt || __n >= __lc->_M_truename_size; 20472: } 20472: if (__testf && __n == __lc->_M_falsename_size && __n) 20472: { 20472: __v = false; 20472: if (__testt && __n == __lc->_M_truename_size) 20472: __err = ios_base::failbit; 20472: else 20472: __err = __testeof ? ios_base::eofbit : ios_base::goodbit; 20472: } 20472: else if (__testt && __n == __lc->_M_truename_size && __n) 20472: { 20472: __v = true; 20472: __err = __testeof ? ios_base::eofbit : ios_base::goodbit; 20472: } 20472: else 20472: { 20472: 20472: 20472: __v = false; 20472: __err = ios_base::failbit; 20472: if (__testeof) 20472: __err |= ios_base::eofbit; 20472: } 20472: } 20472: return __beg; 20472: } 20472: 20472: template 20472: _InIter 20472: num_get<_CharT, _InIter>:: 20472: do_get(iter_type __beg, iter_type __end, ios_base& __io, 20472: ios_base::iostate& __err, float& __v) const 20472: { 20472: string __xtrc; 20472: __xtrc.reserve(32); 20472: __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); 20472: std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); 20472: if (__beg == __end) 20472: __err |= ios_base::eofbit; 20472: return __beg; 20472: } 20472: 20472: template 20472: _InIter 20472: num_get<_CharT, _InIter>:: 20472: do_get(iter_type __beg, iter_type __end, ios_base& __io, 20472: ios_base::iostate& __err, double& __v) const 20472: { 20472: string __xtrc; 20472: __xtrc.reserve(32); 20472: __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); 20472: std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); 20472: if (__beg == __end) 20472: __err |= ios_base::eofbit; 20472: return __beg; 20472: } 20472: # 735 "/usr/include/c++/10/bits/locale_facets.tcc" 3 20472: template 20472: _InIter 20472: num_get<_CharT, _InIter>:: 20472: do_get(iter_type __beg, iter_type __end, ios_base& __io, 20472: ios_base::iostate& __err, long double& __v) const 20472: { 20472: string __xtrc; 20472: __xtrc.reserve(32); 20472: __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); 20472: std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); 20472: if (__beg == __end) 20472: __err |= ios_base::eofbit; 20472: return __beg; 20472: } 20472: 20472: template 20472: _InIter 20472: num_get<_CharT, _InIter>:: 20472: do_get(iter_type __beg, iter_type __end, ios_base& __io, 20472: ios_base::iostate& __err, void*& __v) const 20472: { 20472: 20472: typedef ios_base::fmtflags fmtflags; 20472: const fmtflags __fmt = __io.flags(); 20472: __io.flags((__fmt & ~ios_base::basefield) | ios_base::hex); 20472: 20472: typedef __gnu_cxx::__conditional_type<(sizeof(void*) 20472: <= sizeof(unsigned long)), 20472: unsigned long, unsigned long long>::__type _UIntPtrType; 20472: 20472: _UIntPtrType __ul; 20472: __beg = _M_extract_int(__beg, __end, __io, __err, __ul); 20472: 20472: 20472: __io.flags(__fmt); 20472: 20472: __v = reinterpret_cast(__ul); 20472: return __beg; 20472: } 20472: 20472: 20472: 20472: template 20472: void 20472: num_put<_CharT, _OutIter>:: 20472: _M_pad(_CharT __fill, streamsize __w, ios_base& __io, 20472: _CharT* __new, const _CharT* __cs, int& __len) const 20472: { 20472: 20472: 20472: __pad<_CharT, char_traits<_CharT> >::_S_pad(__io, __fill, __new, 20472: __cs, __w, __len); 20472: __len = static_cast(__w); 20472: } 20472: 20472: 20472: 20472: template 20472: int 20472: __int_to_char(_CharT* __bufend, _ValueT __v, const _CharT* __lit, 20472: ios_base::fmtflags __flags, bool __dec) 20472: { 20472: _CharT* __buf = __bufend; 20472: if (__builtin_expect(__dec, true)) 20472: { 20472: 20472: do 20472: { 20472: *--__buf = __lit[(__v % 10) + __num_base::_S_odigits]; 20472: __v /= 10; 20472: } 20472: while (__v != 0); 20472: } 20472: else if ((__flags & ios_base::basefield) == ios_base::oct) 20472: { 20472: 20472: do 20472: { 20472: *--__buf = __lit[(__v & 0x7) + __num_base::_S_odigits]; 20472: __v >>= 3; 20472: } 20472: while (__v != 0); 20472: } 20472: else 20472: { 20472: 20472: const bool __uppercase = __flags & ios_base::uppercase; 20472: const int __case_offset = __uppercase ? __num_base::_S_oudigits 20472: : __num_base::_S_odigits; 20472: do 20472: { 20472: *--__buf = __lit[(__v & 0xf) + __case_offset]; 20472: __v >>= 4; 20472: } 20472: while (__v != 0); 20472: } 20472: return __bufend - __buf; 20472: } 20472: 20472: 20472: 20472: template 20472: void 20472: num_put<_CharT, _OutIter>:: 20472: _M_group_int(const char* __grouping, size_t __grouping_size, _CharT __sep, 20472: ios_base&, _CharT* __new, _CharT* __cs, int& __len) const 20472: { 20472: _CharT* __p = std::__add_grouping(__new, __sep, __grouping, 20472: __grouping_size, __cs, __cs + __len); 20472: __len = __p - __new; 20472: } 20472: 20472: template 20472: template 20472: _OutIter 20472: num_put<_CharT, _OutIter>:: 20472: _M_insert_int(_OutIter __s, ios_base& __io, _CharT __fill, 20472: _ValueT __v) const 20472: { 20472: using __gnu_cxx::__add_unsigned; 20472: typedef typename __add_unsigned<_ValueT>::__type __unsigned_type; 20472: typedef __numpunct_cache<_CharT> __cache_type; 20472: __use_cache<__cache_type> __uc; 20472: const locale& __loc = __io._M_getloc(); 20472: const __cache_type* __lc = __uc(__loc); 20472: const _CharT* __lit = __lc->_M_atoms_out; 20472: const ios_base::fmtflags __flags = __io.flags(); 20472: 20472: 20472: const int __ilen = 5 * sizeof(_ValueT); 20472: _CharT* __cs = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) 20472: * __ilen)); 20472: 20472: 20472: 20472: const ios_base::fmtflags __basefield = __flags & ios_base::basefield; 20472: const bool __dec = (__basefield != ios_base::oct 20472: && __basefield != ios_base::hex); 20472: const __unsigned_type __u = ((__v > 0 || !__dec) 20472: ? __unsigned_type(__v) 20472: : -__unsigned_type(__v)); 20472: int __len = __int_to_char(__cs + __ilen, __u, __lit, __flags, __dec); 20472: __cs += __ilen - __len; 20472: 20472: 20472: if (__lc->_M_use_grouping) 20472: { 20472: 20472: 20472: _CharT* __cs2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) 20472: * (__len + 1) 20472: * 2)); 20472: _M_group_int(__lc->_M_grouping, __lc->_M_grouping_size, 20472: __lc->_M_thousands_sep, __io, __cs2 + 2, __cs, __len); 20472: __cs = __cs2 + 2; 20472: } 20472: 20472: 20472: if (__builtin_expect(__dec, true)) 20472: { 20472: 20472: if (__v >= 0) 20472: { 20472: if (bool(__flags & ios_base::showpos) 20472: && __gnu_cxx::__numeric_traits<_ValueT>::__is_signed) 20472: *--__cs = __lit[__num_base::_S_oplus], ++__len; 20472: } 20472: else 20472: *--__cs = __lit[__num_base::_S_ominus], ++__len; 20472: } 20472: else if (bool(__flags & ios_base::showbase) && __v) 20472: { 20472: if (__basefield == ios_base::oct) 20472: *--__cs = __lit[__num_base::_S_odigits], ++__len; 20472: else 20472: { 20472: 20472: const bool __uppercase = __flags & ios_base::uppercase; 20472: *--__cs = __lit[__num_base::_S_ox + __uppercase]; 20472: 20472: *--__cs = __lit[__num_base::_S_odigits]; 20472: __len += 2; 20472: } 20472: } 20472: 20472: 20472: const streamsize __w = __io.width(); 20472: if (__w > static_cast(__len)) 20472: { 20472: _CharT* __cs3 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) 20472: * __w)); 20472: _M_pad(__fill, __w, __io, __cs3, __cs, __len); 20472: __cs = __cs3; 20472: } 20472: __io.width(0); 20472: 20472: 20472: 20472: return std::__write(__s, __cs, __len); 20472: } 20472: 20472: template 20472: void 20472: num_put<_CharT, _OutIter>:: 20472: _M_group_float(const char* __grouping, size_t __grouping_size, 20472: _CharT __sep, const _CharT* __p, _CharT* __new, 20472: _CharT* __cs, int& __len) const 20472: { 20472: 20472: 20472: 20472: const int __declen = __p ? __p - __cs : __len; 20472: _CharT* __p2 = std::__add_grouping(__new, __sep, __grouping, 20472: __grouping_size, 20472: __cs, __cs + __declen); 20472: 20472: 20472: int __newlen = __p2 - __new; 20472: if (__p) 20472: { 20472: char_traits<_CharT>::copy(__p2, __p, __len - __declen); 20472: __newlen += __len - __declen; 20472: } 20472: __len = __newlen; 20472: } 20472: # 971 "/usr/include/c++/10/bits/locale_facets.tcc" 3 20472: template 20472: template 20472: _OutIter 20472: num_put<_CharT, _OutIter>:: 20472: _M_insert_float(_OutIter __s, ios_base& __io, _CharT __fill, char __mod, 20472: _ValueT __v) const 20472: { 20472: typedef __numpunct_cache<_CharT> __cache_type; 20472: __use_cache<__cache_type> __uc; 20472: const locale& __loc = __io._M_getloc(); 20472: const __cache_type* __lc = __uc(__loc); 20472: 20472: 20472: const streamsize __prec = __io.precision() < 0 ? 6 : __io.precision(); 20472: 20472: const int __max_digits = 20472: __gnu_cxx::__numeric_traits<_ValueT>::__digits10; 20472: 20472: 20472: int __len; 20472: 20472: char __fbuf[16]; 20472: __num_base::_S_format_float(__io, __fbuf, __mod); 20472: 20472: 20472: 20472: const bool __use_prec = 20472: (__io.flags() & ios_base::floatfield) != ios_base::floatfield; 20472: 20472: 20472: 20472: int __cs_size = __max_digits * 3; 20472: char* __cs = static_cast(__builtin_alloca(__cs_size)); 20472: if (__use_prec) 20472: __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, 20472: __fbuf, __prec, __v); 20472: else 20472: __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, 20472: __fbuf, __v); 20472: 20472: 20472: if (__len >= __cs_size) 20472: { 20472: __cs_size = __len + 1; 20472: __cs = static_cast(__builtin_alloca(__cs_size)); 20472: if (__use_prec) 20472: __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, 20472: __fbuf, __prec, __v); 20472: else 20472: __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, 20472: __fbuf, __v); 20472: } 20472: # 1044 "/usr/include/c++/10/bits/locale_facets.tcc" 3 20472: const ctype<_CharT>& __ctype = use_facet >(__loc); 20472: 20472: _CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) 20472: * __len)); 20472: __ctype.widen(__cs, __cs + __len, __ws); 20472: 20472: 20472: _CharT* __wp = 0; 20472: const char* __p = char_traits::find(__cs, __len, '.'); 20472: if (__p) 20472: { 20472: __wp = __ws + (__p - __cs); 20472: *__wp = __lc->_M_decimal_point; 20472: } 20472: 20472: 20472: 20472: 20472: if (__lc->_M_use_grouping 20472: && (__wp || __len < 3 || (__cs[1] <= '9' && __cs[2] <= '9' 20472: && __cs[1] >= '0' && __cs[2] >= '0'))) 20472: { 20472: 20472: 20472: _CharT* __ws2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) 20472: * __len * 2)); 20472: 20472: streamsize __off = 0; 20472: if (__cs[0] == '-' || __cs[0] == '+') 20472: { 20472: __off = 1; 20472: __ws2[0] = __ws[0]; 20472: __len -= 1; 20472: } 20472: 20472: _M_group_float(__lc->_M_grouping, __lc->_M_grouping_size, 20472: __lc->_M_thousands_sep, __wp, __ws2 + __off, 20472: __ws + __off, __len); 20472: __len += __off; 20472: 20472: __ws = __ws2; 20472: } 20472: 20472: 20472: const streamsize __w = __io.width(); 20472: if (__w > static_cast(__len)) 20472: { 20472: _CharT* __ws3 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) 20472: * __w)); 20472: _M_pad(__fill, __w, __io, __ws3, __ws, __len); 20472: __ws = __ws3; 20472: } 20472: __io.width(0); 20472: 20472: 20472: 20472: return std::__write(__s, __ws, __len); 20472: } 20472: 20472: template 20472: _OutIter 20472: num_put<_CharT, _OutIter>:: 20472: do_put(iter_type __s, ios_base& __io, char_type __fill, bool __v) const 20472: { 20472: const ios_base::fmtflags __flags = __io.flags(); 20472: if ((__flags & ios_base::boolalpha) == 0) 20472: { 20472: const long __l = __v; 20472: __s = _M_insert_int(__s, __io, __fill, __l); 20472: } 20472: else 20472: { 20472: typedef __numpunct_cache<_CharT> __cache_type; 20472: __use_cache<__cache_type> __uc; 20472: const locale& __loc = __io._M_getloc(); 20472: const __cache_type* __lc = __uc(__loc); 20472: 20472: const _CharT* __name = __v ? __lc->_M_truename 20472: : __lc->_M_falsename; 20472: int __len = __v ? __lc->_M_truename_size 20472: : __lc->_M_falsename_size; 20472: 20472: const streamsize __w = __io.width(); 20472: if (__w > static_cast(__len)) 20472: { 20472: const streamsize __plen = __w - __len; 20472: _CharT* __ps 20472: = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) 20472: * __plen)); 20472: 20472: char_traits<_CharT>::assign(__ps, __plen, __fill); 20472: __io.width(0); 20472: 20472: if ((__flags & ios_base::adjustfield) == ios_base::left) 20472: { 20472: __s = std::__write(__s, __name, __len); 20472: __s = std::__write(__s, __ps, __plen); 20472: } 20472: else 20472: { 20472: __s = std::__write(__s, __ps, __plen); 20472: __s = std::__write(__s, __name, __len); 20472: } 20472: return __s; 20472: } 20472: __io.width(0); 20472: __s = std::__write(__s, __name, __len); 20472: } 20472: return __s; 20472: } 20472: 20472: template 20472: _OutIter 20472: num_put<_CharT, _OutIter>:: 20472: do_put(iter_type __s, ios_base& __io, char_type __fill, double __v) const 20472: { return _M_insert_float(__s, __io, __fill, char(), __v); } 20472: # 1169 "/usr/include/c++/10/bits/locale_facets.tcc" 3 20472: template 20472: _OutIter 20472: num_put<_CharT, _OutIter>:: 20472: do_put(iter_type __s, ios_base& __io, char_type __fill, 20472: long double __v) const 20472: { return _M_insert_float(__s, __io, __fill, 'L', __v); } 20472: 20472: template 20472: _OutIter 20472: num_put<_CharT, _OutIter>:: 20472: do_put(iter_type __s, ios_base& __io, char_type __fill, 20472: const void* __v) const 20472: { 20472: const ios_base::fmtflags __flags = __io.flags(); 20472: const ios_base::fmtflags __fmt = ~(ios_base::basefield 20472: | ios_base::uppercase); 20472: __io.flags((__flags & __fmt) | (ios_base::hex | ios_base::showbase)); 20472: 20472: typedef __gnu_cxx::__conditional_type<(sizeof(const void*) 20472: <= sizeof(unsigned long)), 20472: unsigned long, unsigned long long>::__type _UIntPtrType; 20472: 20472: __s = _M_insert_int(__s, __io, __fill, 20472: reinterpret_cast<_UIntPtrType>(__v)); 20472: __io.flags(__flags); 20472: return __s; 20472: } 20472: 20472: 20472: # 1206 "/usr/include/c++/10/bits/locale_facets.tcc" 3 20472: template 20472: void 20472: __pad<_CharT, _Traits>::_S_pad(ios_base& __io, _CharT __fill, 20472: _CharT* __news, const _CharT* __olds, 20472: streamsize __newlen, streamsize __oldlen) 20472: { 20472: const size_t __plen = static_cast(__newlen - __oldlen); 20472: const ios_base::fmtflags __adjust = __io.flags() & ios_base::adjustfield; 20472: 20472: 20472: if (__adjust == ios_base::left) 20472: { 20472: _Traits::copy(__news, __olds, __oldlen); 20472: _Traits::assign(__news + __oldlen, __plen, __fill); 20472: return; 20472: } 20472: 20472: size_t __mod = 0; 20472: if (__adjust == ios_base::internal) 20472: { 20472: 20472: 20472: 20472: const locale& __loc = __io._M_getloc(); 20472: const ctype<_CharT>& __ctype = use_facet >(__loc); 20472: 20472: if (__ctype.widen('-') == __olds[0] 20472: || __ctype.widen('+') == __olds[0]) 20472: { 20472: __news[0] = __olds[0]; 20472: __mod = 1; 20472: ++__news; 20472: } 20472: else if (__ctype.widen('0') == __olds[0] 20472: && __oldlen > 1 20472: && (__ctype.widen('x') == __olds[1] 20472: || __ctype.widen('X') == __olds[1])) 20472: { 20472: __news[0] = __olds[0]; 20472: __news[1] = __olds[1]; 20472: __mod = 2; 20472: __news += 2; 20472: } 20472: 20472: } 20472: _Traits::assign(__news, __plen, __fill); 20472: _Traits::copy(__news + __plen, __olds + __mod, __oldlen - __mod); 20472: } 20472: 20472: template 20472: _CharT* 20472: __add_grouping(_CharT* __s, _CharT __sep, 20472: const char* __gbeg, size_t __gsize, 20472: const _CharT* __first, const _CharT* __last) 20472: { 20472: size_t __idx = 0; 20472: size_t __ctr = 0; 20472: 20472: while (__last - __first > __gbeg[__idx] 20472: && static_cast(__gbeg[__idx]) > 0 20472: && __gbeg[__idx] != __gnu_cxx::__numeric_traits::__max) 20472: { 20472: __last -= __gbeg[__idx]; 20472: __idx < __gsize - 1 ? ++__idx : ++__ctr; 20472: } 20472: 20472: while (__first != __last) 20472: *__s++ = *__first++; 20472: 20472: while (__ctr--) 20472: { 20472: *__s++ = __sep; 20472: for (char __i = __gbeg[__idx]; __i > 0; --__i) 20472: *__s++ = *__first++; 20472: } 20472: 20472: while (__idx--) 20472: { 20472: *__s++ = __sep; 20472: for (char __i = __gbeg[__idx]; __i > 0; --__i) 20472: *__s++ = *__first++; 20472: } 20472: 20472: return __s; 20472: } 20472: 20472: 20472: 20472: 20472: extern template class __cxx11:: numpunct; 20472: extern template class __cxx11:: numpunct_byname; 20472: extern template class num_get; 20472: extern template class num_put; 20472: extern template class ctype_byname; 20472: 20472: extern template 20472: const ctype& 20472: use_facet >(const locale&); 20472: 20472: extern template 20472: const numpunct& 20472: use_facet >(const locale&); 20472: 20472: extern template 20472: const num_put& 20472: use_facet >(const locale&); 20472: 20472: extern template 20472: const num_get& 20472: use_facet >(const locale&); 20472: 20472: extern template 20472: bool 20472: has_facet >(const locale&); 20472: 20472: extern template 20472: bool 20472: has_facet >(const locale&); 20472: 20472: extern template 20472: bool 20472: has_facet >(const locale&); 20472: 20472: extern template 20472: bool 20472: has_facet >(const locale&); 20472: 20472: 20472: extern template class __cxx11:: numpunct; 20472: extern template class __cxx11:: numpunct_byname; 20472: extern template class num_get; 20472: extern template class num_put; 20472: extern template class ctype_byname; 20472: 20472: extern template 20472: const ctype& 20472: use_facet >(const locale&); 20472: 20472: extern template 20472: const numpunct& 20472: use_facet >(const locale&); 20472: 20472: extern template 20472: const num_put& 20472: use_facet >(const locale&); 20472: 20472: extern template 20472: const num_get& 20472: use_facet >(const locale&); 20472: 20472: extern template 20472: bool 20472: has_facet >(const locale&); 20472: 20472: extern template 20472: bool 20472: has_facet >(const locale&); 20472: 20472: extern template 20472: bool 20472: has_facet >(const locale&); 20472: 20472: extern template 20472: bool 20472: has_facet >(const locale&); 20472: 20472: 20472: 20472: 20472: } 20472: # 2656 "/usr/include/c++/10/bits/locale_facets.h" 2 3 20472: # 38 "/usr/include/c++/10/bits/basic_ios.h" 2 3 20472: 20472: 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: template 20472: inline const _Facet& 20472: __check_facet(const _Facet* __f) 20472: { 20472: if (!__f) 20472: __throw_bad_cast(); 20472: return *__f; 20472: } 20472: # 66 "/usr/include/c++/10/bits/basic_ios.h" 3 20472: template 20472: class basic_ios : public ios_base 20472: { 20472: public: 20472: 20472: 20472: 20472: 20472: 20472: 20472: typedef _CharT char_type; 20472: typedef typename _Traits::int_type int_type; 20472: typedef typename _Traits::pos_type pos_type; 20472: typedef typename _Traits::off_type off_type; 20472: typedef _Traits traits_type; 20472: 20472: 20472: 20472: 20472: 20472: 20472: typedef ctype<_CharT> __ctype_type; 20472: typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> > 20472: __num_put_type; 20472: typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> > 20472: __num_get_type; 20472: 20472: 20472: 20472: protected: 20472: basic_ostream<_CharT, _Traits>* _M_tie; 20472: mutable char_type _M_fill; 20472: mutable bool _M_fill_init; 20472: basic_streambuf<_CharT, _Traits>* _M_streambuf; 20472: 20472: 20472: const __ctype_type* _M_ctype; 20472: 20472: const __num_put_type* _M_num_put; 20472: 20472: const __num_get_type* _M_num_get; 20472: 20472: public: 20472: # 117 "/usr/include/c++/10/bits/basic_ios.h" 3 20472: explicit operator bool() const 20472: { return !this->fail(); } 20472: 20472: 20472: 20472: 20472: 20472: bool 20472: operator!() const 20472: { return this->fail(); } 20472: # 136 "/usr/include/c++/10/bits/basic_ios.h" 3 20472: iostate 20472: rdstate() const 20472: { return _M_streambuf_state; } 20472: # 147 "/usr/include/c++/10/bits/basic_ios.h" 3 20472: void 20472: clear(iostate __state = goodbit); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: void 20472: setstate(iostate __state) 20472: { this->clear(this->rdstate() | __state); } 20472: 20472: 20472: 20472: 20472: void 20472: _M_setstate(iostate __state) 20472: { 20472: 20472: 20472: _M_streambuf_state |= __state; 20472: if (this->exceptions() & __state) 20472: throw; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: bool 20472: good() const 20472: { return this->rdstate() == 0; } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: bool 20472: eof() const 20472: { return (this->rdstate() & eofbit) != 0; } 20472: # 200 "/usr/include/c++/10/bits/basic_ios.h" 3 20472: bool 20472: fail() const 20472: { return (this->rdstate() & (badbit | failbit)) != 0; } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: bool 20472: bad() const 20472: { return (this->rdstate() & badbit) != 0; } 20472: # 221 "/usr/include/c++/10/bits/basic_ios.h" 3 20472: iostate 20472: exceptions() const 20472: { return _M_exception; } 20472: # 256 "/usr/include/c++/10/bits/basic_ios.h" 3 20472: void 20472: exceptions(iostate __except) 20472: { 20472: _M_exception = __except; 20472: this->clear(_M_streambuf_state); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: explicit 20472: basic_ios(basic_streambuf<_CharT, _Traits>* __sb) 20472: : ios_base(), _M_tie(0), _M_fill(), _M_fill_init(false), _M_streambuf(0), 20472: _M_ctype(0), _M_num_put(0), _M_num_get(0) 20472: { this->init(__sb); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual 20472: ~basic_ios() { } 20472: # 294 "/usr/include/c++/10/bits/basic_ios.h" 3 20472: basic_ostream<_CharT, _Traits>* 20472: tie() const 20472: { return _M_tie; } 20472: # 306 "/usr/include/c++/10/bits/basic_ios.h" 3 20472: basic_ostream<_CharT, _Traits>* 20472: tie(basic_ostream<_CharT, _Traits>* __tiestr) 20472: { 20472: basic_ostream<_CharT, _Traits>* __old = _M_tie; 20472: _M_tie = __tiestr; 20472: return __old; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: basic_streambuf<_CharT, _Traits>* 20472: rdbuf() const 20472: { return _M_streambuf; } 20472: # 346 "/usr/include/c++/10/bits/basic_ios.h" 3 20472: basic_streambuf<_CharT, _Traits>* 20472: rdbuf(basic_streambuf<_CharT, _Traits>* __sb); 20472: # 360 "/usr/include/c++/10/bits/basic_ios.h" 3 20472: basic_ios& 20472: copyfmt(const basic_ios& __rhs); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: char_type 20472: fill() const 20472: { 20472: if (!_M_fill_init) 20472: { 20472: _M_fill = this->widen(' '); 20472: _M_fill_init = true; 20472: } 20472: return _M_fill; 20472: } 20472: # 389 "/usr/include/c++/10/bits/basic_ios.h" 3 20472: char_type 20472: fill(char_type __ch) 20472: { 20472: char_type __old = this->fill(); 20472: _M_fill = __ch; 20472: return __old; 20472: } 20472: # 409 "/usr/include/c++/10/bits/basic_ios.h" 3 20472: locale 20472: imbue(const locale& __loc); 20472: # 429 "/usr/include/c++/10/bits/basic_ios.h" 3 20472: char 20472: narrow(char_type __c, char __dfault) const 20472: { return __check_facet(_M_ctype).narrow(__c, __dfault); } 20472: # 448 "/usr/include/c++/10/bits/basic_ios.h" 3 20472: char_type 20472: widen(char __c) const 20472: { return __check_facet(_M_ctype).widen(__c); } 20472: 20472: protected: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: basic_ios() 20472: : ios_base(), _M_tie(0), _M_fill(char_type()), _M_fill_init(false), 20472: _M_streambuf(0), _M_ctype(0), _M_num_put(0), _M_num_get(0) 20472: { } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: void 20472: init(basic_streambuf<_CharT, _Traits>* __sb); 20472: 20472: 20472: basic_ios(const basic_ios&) = delete; 20472: basic_ios& operator=(const basic_ios&) = delete; 20472: 20472: void 20472: move(basic_ios& __rhs) 20472: { 20472: ios_base::_M_move(__rhs); 20472: _M_cache_locale(_M_ios_locale); 20472: this->tie(__rhs.tie(nullptr)); 20472: _M_fill = __rhs._M_fill; 20472: _M_fill_init = __rhs._M_fill_init; 20472: _M_streambuf = nullptr; 20472: } 20472: 20472: void 20472: move(basic_ios&& __rhs) 20472: { this->move(__rhs); } 20472: 20472: void 20472: swap(basic_ios& __rhs) noexcept 20472: { 20472: ios_base::_M_swap(__rhs); 20472: _M_cache_locale(_M_ios_locale); 20472: __rhs._M_cache_locale(__rhs._M_ios_locale); 20472: std::swap(_M_tie, __rhs._M_tie); 20472: std::swap(_M_fill, __rhs._M_fill); 20472: std::swap(_M_fill_init, __rhs._M_fill_init); 20472: } 20472: 20472: void 20472: set_rdbuf(basic_streambuf<_CharT, _Traits>* __sb) 20472: { _M_streambuf = __sb; } 20472: 20472: 20472: void 20472: _M_cache_locale(const locale& __loc); 20472: }; 20472: 20472: 20472: } 20472: 20472: # 1 "/usr/include/c++/10/bits/basic_ios.tcc" 1 3 20472: # 33 "/usr/include/c++/10/bits/basic_ios.tcc" 3 20472: 20472: # 34 "/usr/include/c++/10/bits/basic_ios.tcc" 3 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: template 20472: void 20472: basic_ios<_CharT, _Traits>::clear(iostate __state) 20472: { 20472: if (this->rdbuf()) 20472: _M_streambuf_state = __state; 20472: else 20472: _M_streambuf_state = __state | badbit; 20472: if (this->exceptions() & this->rdstate()) 20472: __throw_ios_failure(("basic_ios::clear")); 20472: } 20472: 20472: template 20472: basic_streambuf<_CharT, _Traits>* 20472: basic_ios<_CharT, _Traits>::rdbuf(basic_streambuf<_CharT, _Traits>* __sb) 20472: { 20472: basic_streambuf<_CharT, _Traits>* __old = _M_streambuf; 20472: _M_streambuf = __sb; 20472: this->clear(); 20472: return __old; 20472: } 20472: 20472: template 20472: basic_ios<_CharT, _Traits>& 20472: basic_ios<_CharT, _Traits>::copyfmt(const basic_ios& __rhs) 20472: { 20472: 20472: 20472: if (this != &__rhs) 20472: { 20472: 20472: 20472: 20472: 20472: _Words* __words = (__rhs._M_word_size <= _S_local_word_size) ? 20472: _M_local_word : new _Words[__rhs._M_word_size]; 20472: 20472: 20472: _Callback_list* __cb = __rhs._M_callbacks; 20472: if (__cb) 20472: __cb->_M_add_reference(); 20472: _M_call_callbacks(erase_event); 20472: if (_M_word != _M_local_word) 20472: { 20472: delete [] _M_word; 20472: _M_word = 0; 20472: } 20472: _M_dispose_callbacks(); 20472: 20472: 20472: _M_callbacks = __cb; 20472: for (int __i = 0; __i < __rhs._M_word_size; ++__i) 20472: __words[__i] = __rhs._M_word[__i]; 20472: _M_word = __words; 20472: _M_word_size = __rhs._M_word_size; 20472: 20472: this->flags(__rhs.flags()); 20472: this->width(__rhs.width()); 20472: this->precision(__rhs.precision()); 20472: this->tie(__rhs.tie()); 20472: this->fill(__rhs.fill()); 20472: _M_ios_locale = __rhs.getloc(); 20472: _M_cache_locale(_M_ios_locale); 20472: 20472: _M_call_callbacks(copyfmt_event); 20472: 20472: 20472: this->exceptions(__rhs.exceptions()); 20472: } 20472: return *this; 20472: } 20472: 20472: 20472: template 20472: locale 20472: basic_ios<_CharT, _Traits>::imbue(const locale& __loc) 20472: { 20472: locale __old(this->getloc()); 20472: ios_base::imbue(__loc); 20472: _M_cache_locale(__loc); 20472: if (this->rdbuf() != 0) 20472: this->rdbuf()->pubimbue(__loc); 20472: return __old; 20472: } 20472: 20472: template 20472: void 20472: basic_ios<_CharT, _Traits>::init(basic_streambuf<_CharT, _Traits>* __sb) 20472: { 20472: 20472: ios_base::_M_init(); 20472: 20472: 20472: _M_cache_locale(_M_ios_locale); 20472: # 146 "/usr/include/c++/10/bits/basic_ios.tcc" 3 20472: _M_fill = _CharT(); 20472: _M_fill_init = false; 20472: 20472: _M_tie = 0; 20472: _M_exception = goodbit; 20472: _M_streambuf = __sb; 20472: _M_streambuf_state = __sb ? goodbit : badbit; 20472: } 20472: 20472: template 20472: void 20472: basic_ios<_CharT, _Traits>::_M_cache_locale(const locale& __loc) 20472: { 20472: if (__builtin_expect(has_facet<__ctype_type>(__loc), true)) 20472: _M_ctype = std::__addressof(use_facet<__ctype_type>(__loc)); 20472: else 20472: _M_ctype = 0; 20472: 20472: if (__builtin_expect(has_facet<__num_put_type>(__loc), true)) 20472: _M_num_put = std::__addressof(use_facet<__num_put_type>(__loc)); 20472: else 20472: _M_num_put = 0; 20472: 20472: if (__builtin_expect(has_facet<__num_get_type>(__loc), true)) 20472: _M_num_get = std::__addressof(use_facet<__num_get_type>(__loc)); 20472: else 20472: _M_num_get = 0; 20472: } 20472: 20472: 20472: 20472: 20472: extern template class basic_ios; 20472: 20472: 20472: extern template class basic_ios; 20472: 20472: 20472: 20472: 20472: } 20472: # 517 "/usr/include/c++/10/bits/basic_ios.h" 2 3 20472: # 45 "/usr/include/c++/10/ios" 2 3 20472: # 39 "/usr/include/c++/10/istream" 2 3 20472: # 1 "/usr/include/c++/10/ostream" 1 3 20472: # 36 "/usr/include/c++/10/ostream" 3 20472: 20472: # 37 "/usr/include/c++/10/ostream" 3 20472: 20472: 20472: 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: # 57 "/usr/include/c++/10/ostream" 3 20472: template 20472: class basic_ostream : virtual public basic_ios<_CharT, _Traits> 20472: { 20472: public: 20472: 20472: typedef _CharT char_type; 20472: typedef typename _Traits::int_type int_type; 20472: typedef typename _Traits::pos_type pos_type; 20472: typedef typename _Traits::off_type off_type; 20472: typedef _Traits traits_type; 20472: 20472: 20472: typedef basic_streambuf<_CharT, _Traits> __streambuf_type; 20472: typedef basic_ios<_CharT, _Traits> __ios_type; 20472: typedef basic_ostream<_CharT, _Traits> __ostream_type; 20472: typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> > 20472: __num_put_type; 20472: typedef ctype<_CharT> __ctype_type; 20472: # 83 "/usr/include/c++/10/ostream" 3 20472: explicit 20472: basic_ostream(__streambuf_type* __sb) 20472: { this->init(__sb); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual 20472: ~basic_ostream() { } 20472: 20472: 20472: class sentry; 20472: friend class sentry; 20472: # 107 "/usr/include/c++/10/ostream" 3 20472: __ostream_type& 20472: operator<<(__ostream_type& (*__pf)(__ostream_type&)) 20472: { 20472: 20472: 20472: 20472: return __pf(*this); 20472: } 20472: 20472: __ostream_type& 20472: operator<<(__ios_type& (*__pf)(__ios_type&)) 20472: { 20472: 20472: 20472: 20472: __pf(*this); 20472: return *this; 20472: } 20472: 20472: __ostream_type& 20472: operator<<(ios_base& (*__pf) (ios_base&)) 20472: { 20472: 20472: 20472: 20472: __pf(*this); 20472: return *this; 20472: } 20472: # 165 "/usr/include/c++/10/ostream" 3 20472: __ostream_type& 20472: operator<<(long __n) 20472: { return _M_insert(__n); } 20472: 20472: __ostream_type& 20472: operator<<(unsigned long __n) 20472: { return _M_insert(__n); } 20472: 20472: __ostream_type& 20472: operator<<(bool __n) 20472: { return _M_insert(__n); } 20472: 20472: __ostream_type& 20472: operator<<(short __n); 20472: 20472: __ostream_type& 20472: operator<<(unsigned short __n) 20472: { 20472: 20472: 20472: return _M_insert(static_cast(__n)); 20472: } 20472: 20472: __ostream_type& 20472: operator<<(int __n); 20472: 20472: __ostream_type& 20472: operator<<(unsigned int __n) 20472: { 20472: 20472: 20472: return _M_insert(static_cast(__n)); 20472: } 20472: 20472: 20472: __ostream_type& 20472: operator<<(long long __n) 20472: { return _M_insert(__n); } 20472: 20472: __ostream_type& 20472: operator<<(unsigned long long __n) 20472: { return _M_insert(__n); } 20472: # 219 "/usr/include/c++/10/ostream" 3 20472: __ostream_type& 20472: operator<<(double __f) 20472: { return _M_insert(__f); } 20472: 20472: __ostream_type& 20472: operator<<(float __f) 20472: { 20472: 20472: 20472: return _M_insert(static_cast(__f)); 20472: } 20472: 20472: __ostream_type& 20472: operator<<(long double __f) 20472: { return _M_insert(__f); } 20472: # 244 "/usr/include/c++/10/ostream" 3 20472: __ostream_type& 20472: operator<<(const void* __p) 20472: { return _M_insert(__p); } 20472: # 275 "/usr/include/c++/10/ostream" 3 20472: __ostream_type& 20472: operator<<(__streambuf_type* __sb); 20472: # 308 "/usr/include/c++/10/ostream" 3 20472: __ostream_type& 20472: put(char_type __c); 20472: 20472: 20472: 20472: 20472: 20472: 20472: void 20472: _M_write(const char_type* __s, streamsize __n) 20472: { 20472: const streamsize __put = this->rdbuf()->sputn(__s, __n); 20472: if (__put != __n) 20472: this->setstate(ios_base::badbit); 20472: } 20472: # 340 "/usr/include/c++/10/ostream" 3 20472: __ostream_type& 20472: write(const char_type* __s, streamsize __n); 20472: # 353 "/usr/include/c++/10/ostream" 3 20472: __ostream_type& 20472: flush(); 20472: # 363 "/usr/include/c++/10/ostream" 3 20472: pos_type 20472: tellp(); 20472: # 374 "/usr/include/c++/10/ostream" 3 20472: __ostream_type& 20472: seekp(pos_type); 20472: # 386 "/usr/include/c++/10/ostream" 3 20472: __ostream_type& 20472: seekp(off_type, ios_base::seekdir); 20472: 20472: protected: 20472: basic_ostream() 20472: { this->init(0); } 20472: 20472: 20472: 20472: basic_ostream(basic_iostream<_CharT, _Traits>&) { } 20472: 20472: basic_ostream(const basic_ostream&) = delete; 20472: 20472: basic_ostream(basic_ostream&& __rhs) 20472: : __ios_type() 20472: { __ios_type::move(__rhs); } 20472: 20472: 20472: 20472: basic_ostream& operator=(const basic_ostream&) = delete; 20472: 20472: basic_ostream& 20472: operator=(basic_ostream&& __rhs) 20472: { 20472: swap(__rhs); 20472: return *this; 20472: } 20472: 20472: void 20472: swap(basic_ostream& __rhs) 20472: { __ios_type::swap(__rhs); } 20472: 20472: 20472: template 20472: __ostream_type& 20472: _M_insert(_ValueT __v); 20472: }; 20472: # 431 "/usr/include/c++/10/ostream" 3 20472: template 20472: class basic_ostream<_CharT, _Traits>::sentry 20472: { 20472: 20472: bool _M_ok; 20472: basic_ostream<_CharT, _Traits>& _M_os; 20472: 20472: public: 20472: # 450 "/usr/include/c++/10/ostream" 3 20472: explicit 20472: sentry(basic_ostream<_CharT, _Traits>& __os); 20472: 20472: #pragma GCC diagnostic push 20472: #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: ~sentry() 20472: { 20472: 20472: if (bool(_M_os.flags() & ios_base::unitbuf) && !uncaught_exception()) 20472: { 20472: 20472: if (_M_os.rdbuf() && _M_os.rdbuf()->pubsync() == -1) 20472: _M_os.setstate(ios_base::badbit); 20472: } 20472: } 20472: #pragma GCC diagnostic pop 20472: # 482 "/usr/include/c++/10/ostream" 3 20472: explicit 20472: 20472: operator bool() const 20472: { return _M_ok; } 20472: }; 20472: # 504 "/usr/include/c++/10/ostream" 3 20472: template 20472: inline basic_ostream<_CharT, _Traits>& 20472: operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) 20472: { return __ostream_insert(__out, &__c, 1); } 20472: 20472: template 20472: inline basic_ostream<_CharT, _Traits>& 20472: operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) 20472: { return (__out << __out.widen(__c)); } 20472: 20472: 20472: template 20472: inline basic_ostream& 20472: operator<<(basic_ostream& __out, char __c) 20472: { return __ostream_insert(__out, &__c, 1); } 20472: 20472: 20472: template 20472: inline basic_ostream& 20472: operator<<(basic_ostream& __out, signed char __c) 20472: { return (__out << static_cast(__c)); } 20472: 20472: template 20472: inline basic_ostream& 20472: operator<<(basic_ostream& __out, unsigned char __c) 20472: { return (__out << static_cast(__c)); } 20472: # 587 "/usr/include/c++/10/ostream" 3 20472: template 20472: inline basic_ostream<_CharT, _Traits>& 20472: operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) 20472: { 20472: if (!__s) 20472: __out.setstate(ios_base::badbit); 20472: else 20472: __ostream_insert(__out, __s, 20472: static_cast(_Traits::length(__s))); 20472: return __out; 20472: } 20472: 20472: template 20472: basic_ostream<_CharT, _Traits> & 20472: operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s); 20472: 20472: 20472: template 20472: inline basic_ostream& 20472: operator<<(basic_ostream& __out, const char* __s) 20472: { 20472: if (!__s) 20472: __out.setstate(ios_base::badbit); 20472: else 20472: __ostream_insert(__out, __s, 20472: static_cast(_Traits::length(__s))); 20472: return __out; 20472: } 20472: 20472: 20472: template 20472: inline basic_ostream& 20472: operator<<(basic_ostream& __out, const signed char* __s) 20472: { return (__out << reinterpret_cast(__s)); } 20472: 20472: template 20472: inline basic_ostream & 20472: operator<<(basic_ostream& __out, const unsigned char* __s) 20472: { return (__out << reinterpret_cast(__s)); } 20472: # 679 "/usr/include/c++/10/ostream" 3 20472: template 20472: inline basic_ostream<_CharT, _Traits>& 20472: endl(basic_ostream<_CharT, _Traits>& __os) 20472: { return flush(__os.put(__os.widen('\n'))); } 20472: # 691 "/usr/include/c++/10/ostream" 3 20472: template 20472: inline basic_ostream<_CharT, _Traits>& 20472: ends(basic_ostream<_CharT, _Traits>& __os) 20472: { return __os.put(_CharT()); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: template 20472: inline basic_ostream<_CharT, _Traits>& 20472: flush(basic_ostream<_CharT, _Traits>& __os) 20472: { return __os.flush(); } 20472: 20472: 20472: template 20472: basic_ostream<_Ch, _Up>& 20472: __is_convertible_to_basic_ostream_test(basic_ostream<_Ch, _Up>*); 20472: 20472: template 20472: struct __is_convertible_to_basic_ostream_impl 20472: { 20472: using __ostream_type = void; 20472: }; 20472: 20472: template 20472: using __do_is_convertible_to_basic_ostream_impl = 20472: decltype(__is_convertible_to_basic_ostream_test 20472: (declval::type*>())); 20472: 20472: template 20472: struct __is_convertible_to_basic_ostream_impl 20472: <_Tp, 20472: __void_t<__do_is_convertible_to_basic_ostream_impl<_Tp>>> 20472: { 20472: using __ostream_type = 20472: __do_is_convertible_to_basic_ostream_impl<_Tp>; 20472: }; 20472: 20472: template 20472: struct __is_convertible_to_basic_ostream 20472: : __is_convertible_to_basic_ostream_impl<_Tp> 20472: { 20472: public: 20472: using type = __not_::__ostream_type>>; 20472: constexpr static bool value = type::value; 20472: }; 20472: 20472: template 20472: struct __is_insertable : false_type {}; 20472: 20472: template 20472: struct __is_insertable<_Ostream, _Tp, 20472: __void_t() 20472: << declval())>> 20472: : true_type {}; 20472: 20472: template 20472: using __rvalue_ostream_type = 20472: typename __is_convertible_to_basic_ostream< 20472: _Ostream>::__ostream_type; 20472: # 765 "/usr/include/c++/10/ostream" 3 20472: template 20472: inline 20472: typename enable_if<__and_<__not_>, 20472: __is_convertible_to_basic_ostream<_Ostream>, 20472: __is_insertable< 20472: __rvalue_ostream_type<_Ostream>, 20472: const _Tp&>>::value, 20472: __rvalue_ostream_type<_Ostream>>::type 20472: operator<<(_Ostream&& __os, const _Tp& __x) 20472: { 20472: __rvalue_ostream_type<_Ostream> __ret_os = __os; 20472: __ret_os << __x; 20472: return __ret_os; 20472: } 20472: 20472: 20472: 20472: } 20472: 20472: # 1 "/usr/include/c++/10/bits/ostream.tcc" 1 3 20472: # 37 "/usr/include/c++/10/bits/ostream.tcc" 3 20472: 20472: # 38 "/usr/include/c++/10/bits/ostream.tcc" 3 20472: 20472: 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: template 20472: basic_ostream<_CharT, _Traits>::sentry:: 20472: sentry(basic_ostream<_CharT, _Traits>& __os) 20472: : _M_ok(false), _M_os(__os) 20472: { 20472: 20472: if (__os.tie() && __os.good()) 20472: __os.tie()->flush(); 20472: 20472: if (__os.good()) 20472: _M_ok = true; 20472: else 20472: __os.setstate(ios_base::failbit); 20472: } 20472: 20472: template 20472: template 20472: basic_ostream<_CharT, _Traits>& 20472: basic_ostream<_CharT, _Traits>:: 20472: _M_insert(_ValueT __v) 20472: { 20472: sentry __cerb(*this); 20472: if (__cerb) 20472: { 20472: ios_base::iostate __err = ios_base::goodbit; 20472: try 20472: { 20472: const __num_put_type& __np = __check_facet(this->_M_num_put); 20472: if (__np.put(*this, *this, this->fill(), __v).failed()) 20472: __err |= ios_base::badbit; 20472: } 20472: catch(__cxxabiv1::__forced_unwind&) 20472: { 20472: this->_M_setstate(ios_base::badbit); 20472: throw; 20472: } 20472: catch(...) 20472: { this->_M_setstate(ios_base::badbit); } 20472: if (__err) 20472: this->setstate(__err); 20472: } 20472: return *this; 20472: } 20472: 20472: template 20472: basic_ostream<_CharT, _Traits>& 20472: basic_ostream<_CharT, _Traits>:: 20472: operator<<(short __n) 20472: { 20472: 20472: 20472: const ios_base::fmtflags __fmt = this->flags() & ios_base::basefield; 20472: if (__fmt == ios_base::oct || __fmt == ios_base::hex) 20472: return _M_insert(static_cast(static_cast(__n))); 20472: else 20472: return _M_insert(static_cast(__n)); 20472: } 20472: 20472: template 20472: basic_ostream<_CharT, _Traits>& 20472: basic_ostream<_CharT, _Traits>:: 20472: operator<<(int __n) 20472: { 20472: 20472: 20472: const ios_base::fmtflags __fmt = this->flags() & ios_base::basefield; 20472: if (__fmt == ios_base::oct || __fmt == ios_base::hex) 20472: return _M_insert(static_cast(static_cast(__n))); 20472: else 20472: return _M_insert(static_cast(__n)); 20472: } 20472: 20472: template 20472: basic_ostream<_CharT, _Traits>& 20472: basic_ostream<_CharT, _Traits>:: 20472: operator<<(__streambuf_type* __sbin) 20472: { 20472: ios_base::iostate __err = ios_base::goodbit; 20472: sentry __cerb(*this); 20472: if (__cerb && __sbin) 20472: { 20472: try 20472: { 20472: if (!__copy_streambufs(__sbin, this->rdbuf())) 20472: __err |= ios_base::failbit; 20472: } 20472: catch(__cxxabiv1::__forced_unwind&) 20472: { 20472: this->_M_setstate(ios_base::badbit); 20472: throw; 20472: } 20472: catch(...) 20472: { this->_M_setstate(ios_base::failbit); } 20472: } 20472: else if (!__sbin) 20472: __err |= ios_base::badbit; 20472: if (__err) 20472: this->setstate(__err); 20472: return *this; 20472: } 20472: 20472: template 20472: basic_ostream<_CharT, _Traits>& 20472: basic_ostream<_CharT, _Traits>:: 20472: put(char_type __c) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: sentry __cerb(*this); 20472: if (__cerb) 20472: { 20472: ios_base::iostate __err = ios_base::goodbit; 20472: try 20472: { 20472: const int_type __put = this->rdbuf()->sputc(__c); 20472: if (traits_type::eq_int_type(__put, traits_type::eof())) 20472: __err |= ios_base::badbit; 20472: } 20472: catch(__cxxabiv1::__forced_unwind&) 20472: { 20472: this->_M_setstate(ios_base::badbit); 20472: throw; 20472: } 20472: catch(...) 20472: { this->_M_setstate(ios_base::badbit); } 20472: if (__err) 20472: this->setstate(__err); 20472: } 20472: return *this; 20472: } 20472: 20472: template 20472: basic_ostream<_CharT, _Traits>& 20472: basic_ostream<_CharT, _Traits>:: 20472: write(const _CharT* __s, streamsize __n) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: sentry __cerb(*this); 20472: if (__cerb) 20472: { 20472: try 20472: { _M_write(__s, __n); } 20472: catch(__cxxabiv1::__forced_unwind&) 20472: { 20472: this->_M_setstate(ios_base::badbit); 20472: throw; 20472: } 20472: catch(...) 20472: { this->_M_setstate(ios_base::badbit); } 20472: } 20472: return *this; 20472: } 20472: 20472: template 20472: basic_ostream<_CharT, _Traits>& 20472: basic_ostream<_CharT, _Traits>:: 20472: flush() 20472: { 20472: 20472: 20472: 20472: ios_base::iostate __err = ios_base::goodbit; 20472: try 20472: { 20472: if (this->rdbuf() && this->rdbuf()->pubsync() == -1) 20472: __err |= ios_base::badbit; 20472: } 20472: catch(__cxxabiv1::__forced_unwind&) 20472: { 20472: this->_M_setstate(ios_base::badbit); 20472: throw; 20472: } 20472: catch(...) 20472: { this->_M_setstate(ios_base::badbit); } 20472: if (__err) 20472: this->setstate(__err); 20472: return *this; 20472: } 20472: 20472: template 20472: typename basic_ostream<_CharT, _Traits>::pos_type 20472: basic_ostream<_CharT, _Traits>:: 20472: tellp() 20472: { 20472: pos_type __ret = pos_type(-1); 20472: try 20472: { 20472: if (!this->fail()) 20472: __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::out); 20472: } 20472: catch(__cxxabiv1::__forced_unwind&) 20472: { 20472: this->_M_setstate(ios_base::badbit); 20472: throw; 20472: } 20472: catch(...) 20472: { this->_M_setstate(ios_base::badbit); } 20472: return __ret; 20472: } 20472: 20472: template 20472: basic_ostream<_CharT, _Traits>& 20472: basic_ostream<_CharT, _Traits>:: 20472: seekp(pos_type __pos) 20472: { 20472: ios_base::iostate __err = ios_base::goodbit; 20472: try 20472: { 20472: if (!this->fail()) 20472: { 20472: 20472: 20472: const pos_type __p = this->rdbuf()->pubseekpos(__pos, 20472: ios_base::out); 20472: 20472: 20472: if (__p == pos_type(off_type(-1))) 20472: __err |= ios_base::failbit; 20472: } 20472: } 20472: catch(__cxxabiv1::__forced_unwind&) 20472: { 20472: this->_M_setstate(ios_base::badbit); 20472: throw; 20472: } 20472: catch(...) 20472: { this->_M_setstate(ios_base::badbit); } 20472: if (__err) 20472: this->setstate(__err); 20472: return *this; 20472: } 20472: 20472: template 20472: basic_ostream<_CharT, _Traits>& 20472: basic_ostream<_CharT, _Traits>:: 20472: seekp(off_type __off, ios_base::seekdir __dir) 20472: { 20472: ios_base::iostate __err = ios_base::goodbit; 20472: try 20472: { 20472: if (!this->fail()) 20472: { 20472: 20472: 20472: const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir, 20472: ios_base::out); 20472: 20472: 20472: if (__p == pos_type(off_type(-1))) 20472: __err |= ios_base::failbit; 20472: } 20472: } 20472: catch(__cxxabiv1::__forced_unwind&) 20472: { 20472: this->_M_setstate(ios_base::badbit); 20472: throw; 20472: } 20472: catch(...) 20472: { this->_M_setstate(ios_base::badbit); } 20472: if (__err) 20472: this->setstate(__err); 20472: return *this; 20472: } 20472: 20472: template 20472: basic_ostream<_CharT, _Traits>& 20472: operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) 20472: { 20472: if (!__s) 20472: __out.setstate(ios_base::badbit); 20472: else 20472: { 20472: 20472: 20472: const size_t __clen = char_traits::length(__s); 20472: try 20472: { 20472: struct __ptr_guard 20472: { 20472: _CharT *__p; 20472: __ptr_guard (_CharT *__ip): __p(__ip) { } 20472: ~__ptr_guard() { delete[] __p; } 20472: _CharT* __get() { return __p; } 20472: } __pg (new _CharT[__clen]); 20472: 20472: _CharT *__ws = __pg.__get(); 20472: for (size_t __i = 0; __i < __clen; ++__i) 20472: __ws[__i] = __out.widen(__s[__i]); 20472: __ostream_insert(__out, __ws, __clen); 20472: } 20472: catch(__cxxabiv1::__forced_unwind&) 20472: { 20472: __out._M_setstate(ios_base::badbit); 20472: throw; 20472: } 20472: catch(...) 20472: { __out._M_setstate(ios_base::badbit); } 20472: } 20472: return __out; 20472: } 20472: 20472: 20472: 20472: 20472: extern template class basic_ostream; 20472: extern template ostream& endl(ostream&); 20472: extern template ostream& ends(ostream&); 20472: extern template ostream& flush(ostream&); 20472: extern template ostream& operator<<(ostream&, char); 20472: extern template ostream& operator<<(ostream&, unsigned char); 20472: extern template ostream& operator<<(ostream&, signed char); 20472: extern template ostream& operator<<(ostream&, const char*); 20472: extern template ostream& operator<<(ostream&, const unsigned char*); 20472: extern template ostream& operator<<(ostream&, const signed char*); 20472: 20472: extern template ostream& ostream::_M_insert(long); 20472: extern template ostream& ostream::_M_insert(unsigned long); 20472: extern template ostream& ostream::_M_insert(bool); 20472: 20472: extern template ostream& ostream::_M_insert(long long); 20472: extern template ostream& ostream::_M_insert(unsigned long long); 20472: 20472: extern template ostream& ostream::_M_insert(double); 20472: extern template ostream& ostream::_M_insert(long double); 20472: extern template ostream& ostream::_M_insert(const void*); 20472: 20472: 20472: extern template class basic_ostream; 20472: extern template wostream& endl(wostream&); 20472: extern template wostream& ends(wostream&); 20472: extern template wostream& flush(wostream&); 20472: extern template wostream& operator<<(wostream&, wchar_t); 20472: extern template wostream& operator<<(wostream&, char); 20472: extern template wostream& operator<<(wostream&, const wchar_t*); 20472: extern template wostream& operator<<(wostream&, const char*); 20472: 20472: extern template wostream& wostream::_M_insert(long); 20472: extern template wostream& wostream::_M_insert(unsigned long); 20472: extern template wostream& wostream::_M_insert(bool); 20472: 20472: extern template wostream& wostream::_M_insert(long long); 20472: extern template wostream& wostream::_M_insert(unsigned long long); 20472: 20472: extern template wostream& wostream::_M_insert(double); 20472: extern template wostream& wostream::_M_insert(long double); 20472: extern template wostream& wostream::_M_insert(const void*); 20472: 20472: 20472: 20472: 20472: } 20472: # 785 "/usr/include/c++/10/ostream" 2 3 20472: # 40 "/usr/include/c++/10/istream" 2 3 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: # 57 "/usr/include/c++/10/istream" 3 20472: template 20472: class basic_istream : virtual public basic_ios<_CharT, _Traits> 20472: { 20472: public: 20472: 20472: typedef _CharT char_type; 20472: typedef typename _Traits::int_type int_type; 20472: typedef typename _Traits::pos_type pos_type; 20472: typedef typename _Traits::off_type off_type; 20472: typedef _Traits traits_type; 20472: 20472: 20472: typedef basic_streambuf<_CharT, _Traits> __streambuf_type; 20472: typedef basic_ios<_CharT, _Traits> __ios_type; 20472: typedef basic_istream<_CharT, _Traits> __istream_type; 20472: typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> > 20472: __num_get_type; 20472: typedef ctype<_CharT> __ctype_type; 20472: 20472: protected: 20472: 20472: 20472: 20472: 20472: 20472: streamsize _M_gcount; 20472: 20472: public: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: explicit 20472: basic_istream(__streambuf_type* __sb) 20472: : _M_gcount(streamsize(0)) 20472: { this->init(__sb); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual 20472: ~basic_istream() 20472: { _M_gcount = streamsize(0); } 20472: 20472: 20472: class sentry; 20472: friend class sentry; 20472: # 119 "/usr/include/c++/10/istream" 3 20472: __istream_type& 20472: operator>>(__istream_type& (*__pf)(__istream_type&)) 20472: { return __pf(*this); } 20472: 20472: __istream_type& 20472: operator>>(__ios_type& (*__pf)(__ios_type&)) 20472: { 20472: __pf(*this); 20472: return *this; 20472: } 20472: 20472: __istream_type& 20472: operator>>(ios_base& (*__pf)(ios_base&)) 20472: { 20472: __pf(*this); 20472: return *this; 20472: } 20472: # 167 "/usr/include/c++/10/istream" 3 20472: __istream_type& 20472: operator>>(bool& __n) 20472: { return _M_extract(__n); } 20472: 20472: __istream_type& 20472: operator>>(short& __n); 20472: 20472: __istream_type& 20472: operator>>(unsigned short& __n) 20472: { return _M_extract(__n); } 20472: 20472: __istream_type& 20472: operator>>(int& __n); 20472: 20472: __istream_type& 20472: operator>>(unsigned int& __n) 20472: { return _M_extract(__n); } 20472: 20472: __istream_type& 20472: operator>>(long& __n) 20472: { return _M_extract(__n); } 20472: 20472: __istream_type& 20472: operator>>(unsigned long& __n) 20472: { return _M_extract(__n); } 20472: 20472: 20472: __istream_type& 20472: operator>>(long long& __n) 20472: { return _M_extract(__n); } 20472: 20472: __istream_type& 20472: operator>>(unsigned long long& __n) 20472: { return _M_extract(__n); } 20472: # 213 "/usr/include/c++/10/istream" 3 20472: __istream_type& 20472: operator>>(float& __f) 20472: { return _M_extract(__f); } 20472: 20472: __istream_type& 20472: operator>>(double& __f) 20472: { return _M_extract(__f); } 20472: 20472: __istream_type& 20472: operator>>(long double& __f) 20472: { return _M_extract(__f); } 20472: # 234 "/usr/include/c++/10/istream" 3 20472: __istream_type& 20472: operator>>(void*& __p) 20472: { return _M_extract(__p); } 20472: # 258 "/usr/include/c++/10/istream" 3 20472: __istream_type& 20472: operator>>(__streambuf_type* __sb); 20472: # 268 "/usr/include/c++/10/istream" 3 20472: streamsize 20472: gcount() const 20472: { return _M_gcount; } 20472: # 301 "/usr/include/c++/10/istream" 3 20472: int_type 20472: get(); 20472: # 315 "/usr/include/c++/10/istream" 3 20472: __istream_type& 20472: get(char_type& __c); 20472: # 342 "/usr/include/c++/10/istream" 3 20472: __istream_type& 20472: get(char_type* __s, streamsize __n, char_type __delim); 20472: # 353 "/usr/include/c++/10/istream" 3 20472: __istream_type& 20472: get(char_type* __s, streamsize __n) 20472: { return this->get(__s, __n, this->widen('\n')); } 20472: # 376 "/usr/include/c++/10/istream" 3 20472: __istream_type& 20472: get(__streambuf_type& __sb, char_type __delim); 20472: # 386 "/usr/include/c++/10/istream" 3 20472: __istream_type& 20472: get(__streambuf_type& __sb) 20472: { return this->get(__sb, this->widen('\n')); } 20472: # 415 "/usr/include/c++/10/istream" 3 20472: __istream_type& 20472: getline(char_type* __s, streamsize __n, char_type __delim); 20472: # 426 "/usr/include/c++/10/istream" 3 20472: __istream_type& 20472: getline(char_type* __s, streamsize __n) 20472: { return this->getline(__s, __n, this->widen('\n')); } 20472: # 450 "/usr/include/c++/10/istream" 3 20472: __istream_type& 20472: ignore(streamsize __n, int_type __delim); 20472: 20472: __istream_type& 20472: ignore(streamsize __n); 20472: 20472: __istream_type& 20472: ignore(); 20472: # 467 "/usr/include/c++/10/istream" 3 20472: int_type 20472: peek(); 20472: # 485 "/usr/include/c++/10/istream" 3 20472: __istream_type& 20472: read(char_type* __s, streamsize __n); 20472: # 504 "/usr/include/c++/10/istream" 3 20472: streamsize 20472: readsome(char_type* __s, streamsize __n); 20472: # 521 "/usr/include/c++/10/istream" 3 20472: __istream_type& 20472: putback(char_type __c); 20472: # 537 "/usr/include/c++/10/istream" 3 20472: __istream_type& 20472: unget(); 20472: # 555 "/usr/include/c++/10/istream" 3 20472: int 20472: sync(); 20472: # 570 "/usr/include/c++/10/istream" 3 20472: pos_type 20472: tellg(); 20472: # 585 "/usr/include/c++/10/istream" 3 20472: __istream_type& 20472: seekg(pos_type); 20472: # 601 "/usr/include/c++/10/istream" 3 20472: __istream_type& 20472: seekg(off_type, ios_base::seekdir); 20472: 20472: 20472: protected: 20472: basic_istream() 20472: : _M_gcount(streamsize(0)) 20472: { this->init(0); } 20472: 20472: 20472: basic_istream(const basic_istream&) = delete; 20472: 20472: basic_istream(basic_istream&& __rhs) 20472: : __ios_type(), _M_gcount(__rhs._M_gcount) 20472: { 20472: __ios_type::move(__rhs); 20472: __rhs._M_gcount = 0; 20472: } 20472: 20472: 20472: 20472: basic_istream& operator=(const basic_istream&) = delete; 20472: 20472: basic_istream& 20472: operator=(basic_istream&& __rhs) 20472: { 20472: swap(__rhs); 20472: return *this; 20472: } 20472: 20472: void 20472: swap(basic_istream& __rhs) 20472: { 20472: __ios_type::swap(__rhs); 20472: std::swap(_M_gcount, __rhs._M_gcount); 20472: } 20472: 20472: 20472: template 20472: __istream_type& 20472: _M_extract(_ValueT& __v); 20472: }; 20472: 20472: 20472: template<> 20472: basic_istream& 20472: basic_istream:: 20472: getline(char_type* __s, streamsize __n, char_type __delim); 20472: 20472: template<> 20472: basic_istream& 20472: basic_istream:: 20472: ignore(streamsize __n); 20472: 20472: template<> 20472: basic_istream& 20472: basic_istream:: 20472: ignore(streamsize __n, int_type __delim); 20472: 20472: 20472: template<> 20472: basic_istream& 20472: basic_istream:: 20472: getline(char_type* __s, streamsize __n, char_type __delim); 20472: 20472: template<> 20472: basic_istream& 20472: basic_istream:: 20472: ignore(streamsize __n); 20472: 20472: template<> 20472: basic_istream& 20472: basic_istream:: 20472: ignore(streamsize __n, int_type __delim); 20472: # 685 "/usr/include/c++/10/istream" 3 20472: template 20472: class basic_istream<_CharT, _Traits>::sentry 20472: { 20472: 20472: bool _M_ok; 20472: 20472: public: 20472: 20472: typedef _Traits traits_type; 20472: typedef basic_streambuf<_CharT, _Traits> __streambuf_type; 20472: typedef basic_istream<_CharT, _Traits> __istream_type; 20472: typedef typename __istream_type::__ctype_type __ctype_type; 20472: typedef typename _Traits::int_type __int_type; 20472: # 721 "/usr/include/c++/10/istream" 3 20472: explicit 20472: sentry(basic_istream<_CharT, _Traits>& __is, bool __noskipws = false); 20472: # 732 "/usr/include/c++/10/istream" 3 20472: explicit 20472: 20472: operator bool() const 20472: { return _M_ok; } 20472: }; 20472: # 750 "/usr/include/c++/10/istream" 3 20472: template 20472: basic_istream<_CharT, _Traits>& 20472: operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c); 20472: 20472: template 20472: inline basic_istream& 20472: operator>>(basic_istream& __in, unsigned char& __c) 20472: { return (__in >> reinterpret_cast(__c)); } 20472: 20472: template 20472: inline basic_istream& 20472: operator>>(basic_istream& __in, signed char& __c) 20472: { return (__in >> reinterpret_cast(__c)); } 20472: # 792 "/usr/include/c++/10/istream" 3 20472: template 20472: basic_istream<_CharT, _Traits>& 20472: operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s); 20472: 20472: 20472: template<> 20472: basic_istream& 20472: operator>>(basic_istream& __in, char* __s); 20472: 20472: template 20472: inline basic_istream& 20472: operator>>(basic_istream& __in, unsigned char* __s) 20472: { return (__in >> reinterpret_cast(__s)); } 20472: 20472: template 20472: inline basic_istream& 20472: operator>>(basic_istream& __in, signed char* __s) 20472: { return (__in >> reinterpret_cast(__s)); } 20472: # 823 "/usr/include/c++/10/istream" 3 20472: template 20472: class basic_iostream 20472: : public basic_istream<_CharT, _Traits>, 20472: public basic_ostream<_CharT, _Traits> 20472: { 20472: public: 20472: 20472: 20472: 20472: typedef _CharT char_type; 20472: typedef typename _Traits::int_type int_type; 20472: typedef typename _Traits::pos_type pos_type; 20472: typedef typename _Traits::off_type off_type; 20472: typedef _Traits traits_type; 20472: 20472: 20472: typedef basic_istream<_CharT, _Traits> __istream_type; 20472: typedef basic_ostream<_CharT, _Traits> __ostream_type; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: explicit 20472: basic_iostream(basic_streambuf<_CharT, _Traits>* __sb) 20472: : __istream_type(__sb), __ostream_type(__sb) { } 20472: 20472: 20472: 20472: 20472: virtual 20472: ~basic_iostream() { } 20472: 20472: protected: 20472: basic_iostream() 20472: : __istream_type(), __ostream_type() { } 20472: 20472: 20472: basic_iostream(const basic_iostream&) = delete; 20472: 20472: basic_iostream(basic_iostream&& __rhs) 20472: : __istream_type(std::move(__rhs)), __ostream_type(*this) 20472: { } 20472: 20472: 20472: 20472: basic_iostream& operator=(const basic_iostream&) = delete; 20472: 20472: basic_iostream& 20472: operator=(basic_iostream&& __rhs) 20472: { 20472: swap(__rhs); 20472: return *this; 20472: } 20472: 20472: void 20472: swap(basic_iostream& __rhs) 20472: { __istream_type::swap(__rhs); } 20472: 20472: }; 20472: # 906 "/usr/include/c++/10/istream" 3 20472: template 20472: basic_istream<_CharT, _Traits>& 20472: ws(basic_istream<_CharT, _Traits>& __is); 20472: 20472: 20472: template 20472: basic_istream<_Ch, _Up>& 20472: __is_convertible_to_basic_istream_test(basic_istream<_Ch, _Up>*); 20472: 20472: template 20472: struct __is_convertible_to_basic_istream_impl 20472: { 20472: using __istream_type = void; 20472: }; 20472: 20472: template 20472: using __do_is_convertible_to_basic_istream_impl = 20472: decltype(__is_convertible_to_basic_istream_test 20472: (declval::type*>())); 20472: 20472: template 20472: struct __is_convertible_to_basic_istream_impl 20472: <_Tp, 20472: __void_t<__do_is_convertible_to_basic_istream_impl<_Tp>>> 20472: { 20472: using __istream_type = 20472: __do_is_convertible_to_basic_istream_impl<_Tp>; 20472: }; 20472: 20472: template 20472: struct __is_convertible_to_basic_istream 20472: : __is_convertible_to_basic_istream_impl<_Tp> 20472: { 20472: public: 20472: using type = __not_::__istream_type>>; 20472: constexpr static bool value = type::value; 20472: }; 20472: 20472: template 20472: struct __is_extractable : false_type {}; 20472: 20472: template 20472: struct __is_extractable<_Istream, _Tp, 20472: __void_t() 20472: >> declval<_Tp>())>> 20472: : true_type {}; 20472: 20472: template 20472: using __rvalue_istream_type = 20472: typename __is_convertible_to_basic_istream< 20472: _Istream>::__istream_type; 20472: # 972 "/usr/include/c++/10/istream" 3 20472: template 20472: inline 20472: typename enable_if<__and_<__not_>, 20472: __is_convertible_to_basic_istream<_Istream>, 20472: __is_extractable< 20472: __rvalue_istream_type<_Istream>, 20472: _Tp&&>>::value, 20472: __rvalue_istream_type<_Istream>>::type 20472: operator>>(_Istream&& __is, _Tp&& __x) 20472: { 20472: __rvalue_istream_type<_Istream> __ret_is = __is; 20472: __ret_is >> std::forward<_Tp>(__x); 20472: return __ret_is; 20472: } 20472: 20472: 20472: 20472: } 20472: 20472: # 1 "/usr/include/c++/10/bits/istream.tcc" 1 3 20472: # 37 "/usr/include/c++/10/bits/istream.tcc" 3 20472: 20472: # 38 "/usr/include/c++/10/bits/istream.tcc" 3 20472: 20472: 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: template 20472: basic_istream<_CharT, _Traits>::sentry:: 20472: sentry(basic_istream<_CharT, _Traits>& __in, bool __noskip) : _M_ok(false) 20472: { 20472: ios_base::iostate __err = ios_base::goodbit; 20472: if (__in.good()) 20472: try 20472: { 20472: if (__in.tie()) 20472: __in.tie()->flush(); 20472: if (!__noskip && bool(__in.flags() & ios_base::skipws)) 20472: { 20472: const __int_type __eof = traits_type::eof(); 20472: __streambuf_type* __sb = __in.rdbuf(); 20472: __int_type __c = __sb->sgetc(); 20472: 20472: const __ctype_type& __ct = __check_facet(__in._M_ctype); 20472: while (!traits_type::eq_int_type(__c, __eof) 20472: && __ct.is(ctype_base::space, 20472: traits_type::to_char_type(__c))) 20472: __c = __sb->snextc(); 20472: 20472: 20472: 20472: 20472: if (traits_type::eq_int_type(__c, __eof)) 20472: __err |= ios_base::eofbit; 20472: } 20472: } 20472: catch(__cxxabiv1::__forced_unwind&) 20472: { 20472: __in._M_setstate(ios_base::badbit); 20472: throw; 20472: } 20472: catch(...) 20472: { __in._M_setstate(ios_base::badbit); } 20472: 20472: if (__in.good() && __err == ios_base::goodbit) 20472: _M_ok = true; 20472: else 20472: { 20472: __err |= ios_base::failbit; 20472: __in.setstate(__err); 20472: } 20472: } 20472: 20472: template 20472: template 20472: basic_istream<_CharT, _Traits>& 20472: basic_istream<_CharT, _Traits>:: 20472: _M_extract(_ValueT& __v) 20472: { 20472: sentry __cerb(*this, false); 20472: if (__cerb) 20472: { 20472: ios_base::iostate __err = ios_base::goodbit; 20472: try 20472: { 20472: const __num_get_type& __ng = __check_facet(this->_M_num_get); 20472: __ng.get(*this, 0, *this, __err, __v); 20472: } 20472: catch(__cxxabiv1::__forced_unwind&) 20472: { 20472: this->_M_setstate(ios_base::badbit); 20472: throw; 20472: } 20472: catch(...) 20472: { this->_M_setstate(ios_base::badbit); } 20472: if (__err) 20472: this->setstate(__err); 20472: } 20472: return *this; 20472: } 20472: 20472: template 20472: basic_istream<_CharT, _Traits>& 20472: basic_istream<_CharT, _Traits>:: 20472: operator>>(short& __n) 20472: { 20472: 20472: 20472: sentry __cerb(*this, false); 20472: if (__cerb) 20472: { 20472: ios_base::iostate __err = ios_base::goodbit; 20472: try 20472: { 20472: long __l; 20472: const __num_get_type& __ng = __check_facet(this->_M_num_get); 20472: __ng.get(*this, 0, *this, __err, __l); 20472: 20472: 20472: 20472: if (__l < __gnu_cxx::__numeric_traits::__min) 20472: { 20472: __err |= ios_base::failbit; 20472: __n = __gnu_cxx::__numeric_traits::__min; 20472: } 20472: else if (__l > __gnu_cxx::__numeric_traits::__max) 20472: { 20472: __err |= ios_base::failbit; 20472: __n = __gnu_cxx::__numeric_traits::__max; 20472: } 20472: else 20472: __n = short(__l); 20472: } 20472: catch(__cxxabiv1::__forced_unwind&) 20472: { 20472: this->_M_setstate(ios_base::badbit); 20472: throw; 20472: } 20472: catch(...) 20472: { this->_M_setstate(ios_base::badbit); } 20472: if (__err) 20472: this->setstate(__err); 20472: } 20472: return *this; 20472: } 20472: 20472: template 20472: basic_istream<_CharT, _Traits>& 20472: basic_istream<_CharT, _Traits>:: 20472: operator>>(int& __n) 20472: { 20472: 20472: 20472: sentry __cerb(*this, false); 20472: if (__cerb) 20472: { 20472: ios_base::iostate __err = ios_base::goodbit; 20472: try 20472: { 20472: long __l; 20472: const __num_get_type& __ng = __check_facet(this->_M_num_get); 20472: __ng.get(*this, 0, *this, __err, __l); 20472: 20472: 20472: 20472: if (__l < __gnu_cxx::__numeric_traits::__min) 20472: { 20472: __err |= ios_base::failbit; 20472: __n = __gnu_cxx::__numeric_traits::__min; 20472: } 20472: else if (__l > __gnu_cxx::__numeric_traits::__max) 20472: { 20472: __err |= ios_base::failbit; 20472: __n = __gnu_cxx::__numeric_traits::__max; 20472: } 20472: else 20472: __n = int(__l); 20472: } 20472: catch(__cxxabiv1::__forced_unwind&) 20472: { 20472: this->_M_setstate(ios_base::badbit); 20472: throw; 20472: } 20472: catch(...) 20472: { this->_M_setstate(ios_base::badbit); } 20472: if (__err) 20472: this->setstate(__err); 20472: } 20472: return *this; 20472: } 20472: 20472: template 20472: basic_istream<_CharT, _Traits>& 20472: basic_istream<_CharT, _Traits>:: 20472: operator>>(__streambuf_type* __sbout) 20472: { 20472: ios_base::iostate __err = ios_base::goodbit; 20472: sentry __cerb(*this, false); 20472: if (__cerb && __sbout) 20472: { 20472: try 20472: { 20472: bool __ineof; 20472: if (!__copy_streambufs_eof(this->rdbuf(), __sbout, __ineof)) 20472: __err |= ios_base::failbit; 20472: if (__ineof) 20472: __err |= ios_base::eofbit; 20472: } 20472: catch(__cxxabiv1::__forced_unwind&) 20472: { 20472: this->_M_setstate(ios_base::failbit); 20472: throw; 20472: } 20472: catch(...) 20472: { this->_M_setstate(ios_base::failbit); } 20472: } 20472: else if (!__sbout) 20472: __err |= ios_base::failbit; 20472: if (__err) 20472: this->setstate(__err); 20472: return *this; 20472: } 20472: 20472: template 20472: typename basic_istream<_CharT, _Traits>::int_type 20472: basic_istream<_CharT, _Traits>:: 20472: get(void) 20472: { 20472: const int_type __eof = traits_type::eof(); 20472: int_type __c = __eof; 20472: _M_gcount = 0; 20472: ios_base::iostate __err = ios_base::goodbit; 20472: sentry __cerb(*this, true); 20472: if (__cerb) 20472: { 20472: try 20472: { 20472: __c = this->rdbuf()->sbumpc(); 20472: 20472: if (!traits_type::eq_int_type(__c, __eof)) 20472: _M_gcount = 1; 20472: else 20472: __err |= ios_base::eofbit; 20472: } 20472: catch(__cxxabiv1::__forced_unwind&) 20472: { 20472: this->_M_setstate(ios_base::badbit); 20472: throw; 20472: } 20472: catch(...) 20472: { this->_M_setstate(ios_base::badbit); } 20472: } 20472: if (!_M_gcount) 20472: __err |= ios_base::failbit; 20472: if (__err) 20472: this->setstate(__err); 20472: return __c; 20472: } 20472: 20472: template 20472: basic_istream<_CharT, _Traits>& 20472: basic_istream<_CharT, _Traits>:: 20472: get(char_type& __c) 20472: { 20472: _M_gcount = 0; 20472: ios_base::iostate __err = ios_base::goodbit; 20472: sentry __cerb(*this, true); 20472: if (__cerb) 20472: { 20472: try 20472: { 20472: const int_type __cb = this->rdbuf()->sbumpc(); 20472: 20472: if (!traits_type::eq_int_type(__cb, traits_type::eof())) 20472: { 20472: _M_gcount = 1; 20472: __c = traits_type::to_char_type(__cb); 20472: } 20472: else 20472: __err |= ios_base::eofbit; 20472: } 20472: catch(__cxxabiv1::__forced_unwind&) 20472: { 20472: this->_M_setstate(ios_base::badbit); 20472: throw; 20472: } 20472: catch(...) 20472: { this->_M_setstate(ios_base::badbit); } 20472: } 20472: if (!_M_gcount) 20472: __err |= ios_base::failbit; 20472: if (__err) 20472: this->setstate(__err); 20472: return *this; 20472: } 20472: 20472: template 20472: basic_istream<_CharT, _Traits>& 20472: basic_istream<_CharT, _Traits>:: 20472: get(char_type* __s, streamsize __n, char_type __delim) 20472: { 20472: _M_gcount = 0; 20472: ios_base::iostate __err = ios_base::goodbit; 20472: sentry __cerb(*this, true); 20472: if (__cerb) 20472: { 20472: try 20472: { 20472: const int_type __idelim = traits_type::to_int_type(__delim); 20472: const int_type __eof = traits_type::eof(); 20472: __streambuf_type* __sb = this->rdbuf(); 20472: int_type __c = __sb->sgetc(); 20472: 20472: while (_M_gcount + 1 < __n 20472: && !traits_type::eq_int_type(__c, __eof) 20472: && !traits_type::eq_int_type(__c, __idelim)) 20472: { 20472: *__s++ = traits_type::to_char_type(__c); 20472: ++_M_gcount; 20472: __c = __sb->snextc(); 20472: } 20472: if (traits_type::eq_int_type(__c, __eof)) 20472: __err |= ios_base::eofbit; 20472: } 20472: catch(__cxxabiv1::__forced_unwind&) 20472: { 20472: this->_M_setstate(ios_base::badbit); 20472: throw; 20472: } 20472: catch(...) 20472: { this->_M_setstate(ios_base::badbit); } 20472: } 20472: 20472: 20472: if (__n > 0) 20472: *__s = char_type(); 20472: if (!_M_gcount) 20472: __err |= ios_base::failbit; 20472: if (__err) 20472: this->setstate(__err); 20472: return *this; 20472: } 20472: 20472: template 20472: basic_istream<_CharT, _Traits>& 20472: basic_istream<_CharT, _Traits>:: 20472: get(__streambuf_type& __sb, char_type __delim) 20472: { 20472: _M_gcount = 0; 20472: ios_base::iostate __err = ios_base::goodbit; 20472: sentry __cerb(*this, true); 20472: if (__cerb) 20472: { 20472: try 20472: { 20472: const int_type __idelim = traits_type::to_int_type(__delim); 20472: const int_type __eof = traits_type::eof(); 20472: __streambuf_type* __this_sb = this->rdbuf(); 20472: int_type __c = __this_sb->sgetc(); 20472: char_type __c2 = traits_type::to_char_type(__c); 20472: 20472: while (!traits_type::eq_int_type(__c, __eof) 20472: && !traits_type::eq_int_type(__c, __idelim) 20472: && !traits_type::eq_int_type(__sb.sputc(__c2), __eof)) 20472: { 20472: ++_M_gcount; 20472: __c = __this_sb->snextc(); 20472: __c2 = traits_type::to_char_type(__c); 20472: } 20472: if (traits_type::eq_int_type(__c, __eof)) 20472: __err |= ios_base::eofbit; 20472: } 20472: catch(__cxxabiv1::__forced_unwind&) 20472: { 20472: this->_M_setstate(ios_base::badbit); 20472: throw; 20472: } 20472: catch(...) 20472: { this->_M_setstate(ios_base::badbit); } 20472: } 20472: if (!_M_gcount) 20472: __err |= ios_base::failbit; 20472: if (__err) 20472: this->setstate(__err); 20472: return *this; 20472: } 20472: 20472: template 20472: basic_istream<_CharT, _Traits>& 20472: basic_istream<_CharT, _Traits>:: 20472: getline(char_type* __s, streamsize __n, char_type __delim) 20472: { 20472: _M_gcount = 0; 20472: ios_base::iostate __err = ios_base::goodbit; 20472: sentry __cerb(*this, true); 20472: if (__cerb) 20472: { 20472: try 20472: { 20472: const int_type __idelim = traits_type::to_int_type(__delim); 20472: const int_type __eof = traits_type::eof(); 20472: __streambuf_type* __sb = this->rdbuf(); 20472: int_type __c = __sb->sgetc(); 20472: 20472: while (_M_gcount + 1 < __n 20472: && !traits_type::eq_int_type(__c, __eof) 20472: && !traits_type::eq_int_type(__c, __idelim)) 20472: { 20472: *__s++ = traits_type::to_char_type(__c); 20472: __c = __sb->snextc(); 20472: ++_M_gcount; 20472: } 20472: if (traits_type::eq_int_type(__c, __eof)) 20472: __err |= ios_base::eofbit; 20472: else 20472: { 20472: if (traits_type::eq_int_type(__c, __idelim)) 20472: { 20472: __sb->sbumpc(); 20472: ++_M_gcount; 20472: } 20472: else 20472: __err |= ios_base::failbit; 20472: } 20472: } 20472: catch(__cxxabiv1::__forced_unwind&) 20472: { 20472: this->_M_setstate(ios_base::badbit); 20472: throw; 20472: } 20472: catch(...) 20472: { this->_M_setstate(ios_base::badbit); } 20472: } 20472: 20472: 20472: if (__n > 0) 20472: *__s = char_type(); 20472: if (!_M_gcount) 20472: __err |= ios_base::failbit; 20472: if (__err) 20472: this->setstate(__err); 20472: return *this; 20472: } 20472: 20472: 20472: 20472: 20472: template 20472: basic_istream<_CharT, _Traits>& 20472: basic_istream<_CharT, _Traits>:: 20472: ignore(void) 20472: { 20472: _M_gcount = 0; 20472: sentry __cerb(*this, true); 20472: if (__cerb) 20472: { 20472: ios_base::iostate __err = ios_base::goodbit; 20472: try 20472: { 20472: const int_type __eof = traits_type::eof(); 20472: __streambuf_type* __sb = this->rdbuf(); 20472: 20472: if (traits_type::eq_int_type(__sb->sbumpc(), __eof)) 20472: __err |= ios_base::eofbit; 20472: else 20472: _M_gcount = 1; 20472: } 20472: catch(__cxxabiv1::__forced_unwind&) 20472: { 20472: this->_M_setstate(ios_base::badbit); 20472: throw; 20472: } 20472: catch(...) 20472: { this->_M_setstate(ios_base::badbit); } 20472: if (__err) 20472: this->setstate(__err); 20472: } 20472: return *this; 20472: } 20472: 20472: template 20472: basic_istream<_CharT, _Traits>& 20472: basic_istream<_CharT, _Traits>:: 20472: ignore(streamsize __n) 20472: { 20472: _M_gcount = 0; 20472: sentry __cerb(*this, true); 20472: if (__cerb && __n > 0) 20472: { 20472: ios_base::iostate __err = ios_base::goodbit; 20472: try 20472: { 20472: const int_type __eof = traits_type::eof(); 20472: __streambuf_type* __sb = this->rdbuf(); 20472: int_type __c = __sb->sgetc(); 20472: # 521 "/usr/include/c++/10/bits/istream.tcc" 3 20472: bool __large_ignore = false; 20472: while (true) 20472: { 20472: while (_M_gcount < __n 20472: && !traits_type::eq_int_type(__c, __eof)) 20472: { 20472: ++_M_gcount; 20472: __c = __sb->snextc(); 20472: } 20472: if (__n == __gnu_cxx::__numeric_traits::__max 20472: && !traits_type::eq_int_type(__c, __eof)) 20472: { 20472: _M_gcount = 20472: __gnu_cxx::__numeric_traits::__min; 20472: __large_ignore = true; 20472: } 20472: else 20472: break; 20472: } 20472: 20472: if (__large_ignore) 20472: _M_gcount = __gnu_cxx::__numeric_traits::__max; 20472: 20472: if (traits_type::eq_int_type(__c, __eof)) 20472: __err |= ios_base::eofbit; 20472: } 20472: catch(__cxxabiv1::__forced_unwind&) 20472: { 20472: this->_M_setstate(ios_base::badbit); 20472: throw; 20472: } 20472: catch(...) 20472: { this->_M_setstate(ios_base::badbit); } 20472: if (__err) 20472: this->setstate(__err); 20472: } 20472: return *this; 20472: } 20472: 20472: template 20472: basic_istream<_CharT, _Traits>& 20472: basic_istream<_CharT, _Traits>:: 20472: ignore(streamsize __n, int_type __delim) 20472: { 20472: _M_gcount = 0; 20472: sentry __cerb(*this, true); 20472: if (__cerb && __n > 0) 20472: { 20472: ios_base::iostate __err = ios_base::goodbit; 20472: try 20472: { 20472: const int_type __eof = traits_type::eof(); 20472: __streambuf_type* __sb = this->rdbuf(); 20472: int_type __c = __sb->sgetc(); 20472: 20472: 20472: bool __large_ignore = false; 20472: while (true) 20472: { 20472: while (_M_gcount < __n 20472: && !traits_type::eq_int_type(__c, __eof) 20472: && !traits_type::eq_int_type(__c, __delim)) 20472: { 20472: ++_M_gcount; 20472: __c = __sb->snextc(); 20472: } 20472: if (__n == __gnu_cxx::__numeric_traits::__max 20472: && !traits_type::eq_int_type(__c, __eof) 20472: && !traits_type::eq_int_type(__c, __delim)) 20472: { 20472: _M_gcount = 20472: __gnu_cxx::__numeric_traits::__min; 20472: __large_ignore = true; 20472: } 20472: else 20472: break; 20472: } 20472: 20472: if (__large_ignore) 20472: _M_gcount = __gnu_cxx::__numeric_traits::__max; 20472: 20472: if (traits_type::eq_int_type(__c, __eof)) 20472: __err |= ios_base::eofbit; 20472: else if (traits_type::eq_int_type(__c, __delim)) 20472: { 20472: if (_M_gcount 20472: < __gnu_cxx::__numeric_traits::__max) 20472: ++_M_gcount; 20472: __sb->sbumpc(); 20472: } 20472: } 20472: catch(__cxxabiv1::__forced_unwind&) 20472: { 20472: this->_M_setstate(ios_base::badbit); 20472: throw; 20472: } 20472: catch(...) 20472: { this->_M_setstate(ios_base::badbit); } 20472: if (__err) 20472: this->setstate(__err); 20472: } 20472: return *this; 20472: } 20472: 20472: template 20472: typename basic_istream<_CharT, _Traits>::int_type 20472: basic_istream<_CharT, _Traits>:: 20472: peek(void) 20472: { 20472: int_type __c = traits_type::eof(); 20472: _M_gcount = 0; 20472: sentry __cerb(*this, true); 20472: if (__cerb) 20472: { 20472: ios_base::iostate __err = ios_base::goodbit; 20472: try 20472: { 20472: __c = this->rdbuf()->sgetc(); 20472: if (traits_type::eq_int_type(__c, traits_type::eof())) 20472: __err |= ios_base::eofbit; 20472: } 20472: catch(__cxxabiv1::__forced_unwind&) 20472: { 20472: this->_M_setstate(ios_base::badbit); 20472: throw; 20472: } 20472: catch(...) 20472: { this->_M_setstate(ios_base::badbit); } 20472: if (__err) 20472: this->setstate(__err); 20472: } 20472: return __c; 20472: } 20472: 20472: template 20472: basic_istream<_CharT, _Traits>& 20472: basic_istream<_CharT, _Traits>:: 20472: read(char_type* __s, streamsize __n) 20472: { 20472: _M_gcount = 0; 20472: sentry __cerb(*this, true); 20472: if (__cerb) 20472: { 20472: ios_base::iostate __err = ios_base::goodbit; 20472: try 20472: { 20472: _M_gcount = this->rdbuf()->sgetn(__s, __n); 20472: if (_M_gcount != __n) 20472: __err |= (ios_base::eofbit | ios_base::failbit); 20472: } 20472: catch(__cxxabiv1::__forced_unwind&) 20472: { 20472: this->_M_setstate(ios_base::badbit); 20472: throw; 20472: } 20472: catch(...) 20472: { this->_M_setstate(ios_base::badbit); } 20472: if (__err) 20472: this->setstate(__err); 20472: } 20472: return *this; 20472: } 20472: 20472: template 20472: streamsize 20472: basic_istream<_CharT, _Traits>:: 20472: readsome(char_type* __s, streamsize __n) 20472: { 20472: _M_gcount = 0; 20472: sentry __cerb(*this, true); 20472: if (__cerb) 20472: { 20472: ios_base::iostate __err = ios_base::goodbit; 20472: try 20472: { 20472: 20472: const streamsize __num = this->rdbuf()->in_avail(); 20472: if (__num > 0) 20472: _M_gcount = this->rdbuf()->sgetn(__s, std::min(__num, __n)); 20472: else if (__num == -1) 20472: __err |= ios_base::eofbit; 20472: } 20472: catch(__cxxabiv1::__forced_unwind&) 20472: { 20472: this->_M_setstate(ios_base::badbit); 20472: throw; 20472: } 20472: catch(...) 20472: { this->_M_setstate(ios_base::badbit); } 20472: if (__err) 20472: this->setstate(__err); 20472: } 20472: return _M_gcount; 20472: } 20472: 20472: template 20472: basic_istream<_CharT, _Traits>& 20472: basic_istream<_CharT, _Traits>:: 20472: putback(char_type __c) 20472: { 20472: 20472: 20472: _M_gcount = 0; 20472: 20472: this->clear(this->rdstate() & ~ios_base::eofbit); 20472: sentry __cerb(*this, true); 20472: if (__cerb) 20472: { 20472: ios_base::iostate __err = ios_base::goodbit; 20472: try 20472: { 20472: const int_type __eof = traits_type::eof(); 20472: __streambuf_type* __sb = this->rdbuf(); 20472: if (!__sb 20472: || traits_type::eq_int_type(__sb->sputbackc(__c), __eof)) 20472: __err |= ios_base::badbit; 20472: } 20472: catch(__cxxabiv1::__forced_unwind&) 20472: { 20472: this->_M_setstate(ios_base::badbit); 20472: throw; 20472: } 20472: catch(...) 20472: { this->_M_setstate(ios_base::badbit); } 20472: if (__err) 20472: this->setstate(__err); 20472: } 20472: return *this; 20472: } 20472: 20472: template 20472: basic_istream<_CharT, _Traits>& 20472: basic_istream<_CharT, _Traits>:: 20472: unget(void) 20472: { 20472: 20472: 20472: _M_gcount = 0; 20472: 20472: this->clear(this->rdstate() & ~ios_base::eofbit); 20472: sentry __cerb(*this, true); 20472: if (__cerb) 20472: { 20472: ios_base::iostate __err = ios_base::goodbit; 20472: try 20472: { 20472: const int_type __eof = traits_type::eof(); 20472: __streambuf_type* __sb = this->rdbuf(); 20472: if (!__sb 20472: || traits_type::eq_int_type(__sb->sungetc(), __eof)) 20472: __err |= ios_base::badbit; 20472: } 20472: catch(__cxxabiv1::__forced_unwind&) 20472: { 20472: this->_M_setstate(ios_base::badbit); 20472: throw; 20472: } 20472: catch(...) 20472: { this->_M_setstate(ios_base::badbit); } 20472: if (__err) 20472: this->setstate(__err); 20472: } 20472: return *this; 20472: } 20472: 20472: template 20472: int 20472: basic_istream<_CharT, _Traits>:: 20472: sync(void) 20472: { 20472: 20472: 20472: int __ret = -1; 20472: sentry __cerb(*this, true); 20472: if (__cerb) 20472: { 20472: ios_base::iostate __err = ios_base::goodbit; 20472: try 20472: { 20472: __streambuf_type* __sb = this->rdbuf(); 20472: if (__sb) 20472: { 20472: if (__sb->pubsync() == -1) 20472: __err |= ios_base::badbit; 20472: else 20472: __ret = 0; 20472: } 20472: } 20472: catch(__cxxabiv1::__forced_unwind&) 20472: { 20472: this->_M_setstate(ios_base::badbit); 20472: throw; 20472: } 20472: catch(...) 20472: { this->_M_setstate(ios_base::badbit); } 20472: if (__err) 20472: this->setstate(__err); 20472: } 20472: return __ret; 20472: } 20472: 20472: template 20472: typename basic_istream<_CharT, _Traits>::pos_type 20472: basic_istream<_CharT, _Traits>:: 20472: tellg(void) 20472: { 20472: 20472: 20472: pos_type __ret = pos_type(-1); 20472: sentry __cerb(*this, true); 20472: if (__cerb) 20472: { 20472: try 20472: { 20472: if (!this->fail()) 20472: __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, 20472: ios_base::in); 20472: } 20472: catch(__cxxabiv1::__forced_unwind&) 20472: { 20472: this->_M_setstate(ios_base::badbit); 20472: throw; 20472: } 20472: catch(...) 20472: { this->_M_setstate(ios_base::badbit); } 20472: } 20472: return __ret; 20472: } 20472: 20472: template 20472: basic_istream<_CharT, _Traits>& 20472: basic_istream<_CharT, _Traits>:: 20472: seekg(pos_type __pos) 20472: { 20472: 20472: 20472: 20472: this->clear(this->rdstate() & ~ios_base::eofbit); 20472: sentry __cerb(*this, true); 20472: if (__cerb) 20472: { 20472: ios_base::iostate __err = ios_base::goodbit; 20472: try 20472: { 20472: if (!this->fail()) 20472: { 20472: 20472: const pos_type __p = this->rdbuf()->pubseekpos(__pos, 20472: ios_base::in); 20472: 20472: 20472: if (__p == pos_type(off_type(-1))) 20472: __err |= ios_base::failbit; 20472: } 20472: } 20472: catch(__cxxabiv1::__forced_unwind&) 20472: { 20472: this->_M_setstate(ios_base::badbit); 20472: throw; 20472: } 20472: catch(...) 20472: { this->_M_setstate(ios_base::badbit); } 20472: if (__err) 20472: this->setstate(__err); 20472: } 20472: return *this; 20472: } 20472: 20472: template 20472: basic_istream<_CharT, _Traits>& 20472: basic_istream<_CharT, _Traits>:: 20472: seekg(off_type __off, ios_base::seekdir __dir) 20472: { 20472: 20472: 20472: 20472: this->clear(this->rdstate() & ~ios_base::eofbit); 20472: sentry __cerb(*this, true); 20472: if (__cerb) 20472: { 20472: ios_base::iostate __err = ios_base::goodbit; 20472: try 20472: { 20472: if (!this->fail()) 20472: { 20472: 20472: const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir, 20472: ios_base::in); 20472: 20472: 20472: if (__p == pos_type(off_type(-1))) 20472: __err |= ios_base::failbit; 20472: } 20472: } 20472: catch(__cxxabiv1::__forced_unwind&) 20472: { 20472: this->_M_setstate(ios_base::badbit); 20472: throw; 20472: } 20472: catch(...) 20472: { this->_M_setstate(ios_base::badbit); } 20472: if (__err) 20472: this->setstate(__err); 20472: } 20472: return *this; 20472: } 20472: 20472: 20472: template 20472: basic_istream<_CharT, _Traits>& 20472: operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) 20472: { 20472: typedef basic_istream<_CharT, _Traits> __istream_type; 20472: typedef typename __istream_type::int_type __int_type; 20472: 20472: typename __istream_type::sentry __cerb(__in, false); 20472: if (__cerb) 20472: { 20472: ios_base::iostate __err = ios_base::goodbit; 20472: try 20472: { 20472: const __int_type __cb = __in.rdbuf()->sbumpc(); 20472: if (!_Traits::eq_int_type(__cb, _Traits::eof())) 20472: __c = _Traits::to_char_type(__cb); 20472: else 20472: __err |= (ios_base::eofbit | ios_base::failbit); 20472: } 20472: catch(__cxxabiv1::__forced_unwind&) 20472: { 20472: __in._M_setstate(ios_base::badbit); 20472: throw; 20472: } 20472: catch(...) 20472: { __in._M_setstate(ios_base::badbit); } 20472: if (__err) 20472: __in.setstate(__err); 20472: } 20472: return __in; 20472: } 20472: 20472: template 20472: basic_istream<_CharT, _Traits>& 20472: operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) 20472: { 20472: typedef basic_istream<_CharT, _Traits> __istream_type; 20472: typedef basic_streambuf<_CharT, _Traits> __streambuf_type; 20472: typedef typename _Traits::int_type int_type; 20472: typedef _CharT char_type; 20472: typedef ctype<_CharT> __ctype_type; 20472: 20472: streamsize __extracted = 0; 20472: ios_base::iostate __err = ios_base::goodbit; 20472: typename __istream_type::sentry __cerb(__in, false); 20472: if (__cerb) 20472: { 20472: try 20472: { 20472: 20472: streamsize __num = __in.width(); 20472: if (__num <= 0) 20472: __num = __gnu_cxx::__numeric_traits::__max; 20472: 20472: const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); 20472: 20472: const int_type __eof = _Traits::eof(); 20472: __streambuf_type* __sb = __in.rdbuf(); 20472: int_type __c = __sb->sgetc(); 20472: 20472: while (__extracted < __num - 1 20472: && !_Traits::eq_int_type(__c, __eof) 20472: && !__ct.is(ctype_base::space, 20472: _Traits::to_char_type(__c))) 20472: { 20472: *__s++ = _Traits::to_char_type(__c); 20472: ++__extracted; 20472: __c = __sb->snextc(); 20472: } 20472: if (_Traits::eq_int_type(__c, __eof)) 20472: __err |= ios_base::eofbit; 20472: 20472: 20472: 20472: *__s = char_type(); 20472: __in.width(0); 20472: } 20472: catch(__cxxabiv1::__forced_unwind&) 20472: { 20472: __in._M_setstate(ios_base::badbit); 20472: throw; 20472: } 20472: catch(...) 20472: { __in._M_setstate(ios_base::badbit); } 20472: } 20472: if (!__extracted) 20472: __err |= ios_base::failbit; 20472: if (__err) 20472: __in.setstate(__err); 20472: return __in; 20472: } 20472: 20472: 20472: template 20472: basic_istream<_CharT, _Traits>& 20472: ws(basic_istream<_CharT, _Traits>& __in) 20472: { 20472: typedef basic_istream<_CharT, _Traits> __istream_type; 20472: typedef basic_streambuf<_CharT, _Traits> __streambuf_type; 20472: typedef typename __istream_type::int_type __int_type; 20472: typedef ctype<_CharT> __ctype_type; 20472: 20472: const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); 20472: const __int_type __eof = _Traits::eof(); 20472: __streambuf_type* __sb = __in.rdbuf(); 20472: __int_type __c = __sb->sgetc(); 20472: 20472: while (!_Traits::eq_int_type(__c, __eof) 20472: && __ct.is(ctype_base::space, _Traits::to_char_type(__c))) 20472: __c = __sb->snextc(); 20472: 20472: if (_Traits::eq_int_type(__c, __eof)) 20472: __in.setstate(ios_base::eofbit); 20472: return __in; 20472: } 20472: 20472: 20472: 20472: 20472: extern template class basic_istream; 20472: extern template istream& ws(istream&); 20472: extern template istream& operator>>(istream&, char&); 20472: extern template istream& operator>>(istream&, char*); 20472: extern template istream& operator>>(istream&, unsigned char&); 20472: extern template istream& operator>>(istream&, signed char&); 20472: extern template istream& operator>>(istream&, unsigned char*); 20472: extern template istream& operator>>(istream&, signed char*); 20472: 20472: extern template istream& istream::_M_extract(unsigned short&); 20472: extern template istream& istream::_M_extract(unsigned int&); 20472: extern template istream& istream::_M_extract(long&); 20472: extern template istream& istream::_M_extract(unsigned long&); 20472: extern template istream& istream::_M_extract(bool&); 20472: 20472: extern template istream& istream::_M_extract(long long&); 20472: extern template istream& istream::_M_extract(unsigned long long&); 20472: 20472: extern template istream& istream::_M_extract(float&); 20472: extern template istream& istream::_M_extract(double&); 20472: extern template istream& istream::_M_extract(long double&); 20472: extern template istream& istream::_M_extract(void*&); 20472: 20472: extern template class basic_iostream; 20472: 20472: 20472: extern template class basic_istream; 20472: extern template wistream& ws(wistream&); 20472: extern template wistream& operator>>(wistream&, wchar_t&); 20472: extern template wistream& operator>>(wistream&, wchar_t*); 20472: 20472: extern template wistream& wistream::_M_extract(unsigned short&); 20472: extern template wistream& wistream::_M_extract(unsigned int&); 20472: extern template wistream& wistream::_M_extract(long&); 20472: extern template wistream& wistream::_M_extract(unsigned long&); 20472: extern template wistream& wistream::_M_extract(bool&); 20472: 20472: extern template wistream& wistream::_M_extract(long long&); 20472: extern template wistream& wistream::_M_extract(unsigned long long&); 20472: 20472: extern template wistream& wistream::_M_extract(float&); 20472: extern template wistream& wistream::_M_extract(double&); 20472: extern template wistream& wistream::_M_extract(long double&); 20472: extern template wistream& wistream::_M_extract(void*&); 20472: 20472: extern template class basic_iostream; 20472: 20472: 20472: 20472: 20472: } 20472: # 992 "/usr/include/c++/10/istream" 2 3 20472: # 39 "/usr/include/c++/10/sstream" 2 3 20472: 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: namespace __cxx11 { 20472: # 64 "/usr/include/c++/10/sstream" 3 20472: template 20472: class basic_stringbuf : public basic_streambuf<_CharT, _Traits> 20472: { 20472: struct __xfer_bufptrs; 20472: public: 20472: 20472: typedef _CharT char_type; 20472: typedef _Traits traits_type; 20472: 20472: 20472: typedef _Alloc allocator_type; 20472: typedef typename traits_type::int_type int_type; 20472: typedef typename traits_type::pos_type pos_type; 20472: typedef typename traits_type::off_type off_type; 20472: 20472: typedef basic_streambuf __streambuf_type; 20472: typedef basic_string __string_type; 20472: typedef typename __string_type::size_type __size_type; 20472: 20472: protected: 20472: 20472: ios_base::openmode _M_mode; 20472: 20472: 20472: __string_type _M_string; 20472: 20472: public: 20472: # 99 "/usr/include/c++/10/sstream" 3 20472: basic_stringbuf() 20472: : __streambuf_type(), _M_mode(ios_base::in | ios_base::out), _M_string() 20472: { } 20472: # 110 "/usr/include/c++/10/sstream" 3 20472: explicit 20472: basic_stringbuf(ios_base::openmode __mode) 20472: : __streambuf_type(), _M_mode(__mode), _M_string() 20472: { } 20472: # 123 "/usr/include/c++/10/sstream" 3 20472: explicit 20472: basic_stringbuf(const __string_type& __str, 20472: ios_base::openmode __mode = ios_base::in | ios_base::out) 20472: : __streambuf_type(), _M_mode(), 20472: _M_string(__str.data(), __str.size(), __str.get_allocator()) 20472: { _M_stringbuf_init(__mode); } 20472: 20472: 20472: basic_stringbuf(const basic_stringbuf&) = delete; 20472: 20472: basic_stringbuf(basic_stringbuf&& __rhs) 20472: : basic_stringbuf(std::move(__rhs), __xfer_bufptrs(__rhs, this)) 20472: { __rhs._M_sync(const_cast(__rhs._M_string.data()), 0, 0); } 20472: 20472: 20472: 20472: basic_stringbuf& 20472: operator=(const basic_stringbuf&) = delete; 20472: 20472: basic_stringbuf& 20472: operator=(basic_stringbuf&& __rhs) 20472: { 20472: __xfer_bufptrs __st{__rhs, this}; 20472: const __streambuf_type& __base = __rhs; 20472: __streambuf_type::operator=(__base); 20472: this->pubimbue(__rhs.getloc()); 20472: _M_mode = __rhs._M_mode; 20472: _M_string = std::move(__rhs._M_string); 20472: __rhs._M_sync(const_cast(__rhs._M_string.data()), 0, 0); 20472: return *this; 20472: } 20472: 20472: void 20472: swap(basic_stringbuf& __rhs) 20472: { 20472: __xfer_bufptrs __l_st{*this, std::__addressof(__rhs)}; 20472: __xfer_bufptrs __r_st{__rhs, this}; 20472: __streambuf_type& __base = __rhs; 20472: __streambuf_type::swap(__base); 20472: __rhs.pubimbue(this->pubimbue(__rhs.getloc())); 20472: std::swap(_M_mode, __rhs._M_mode); 20472: std::swap(_M_string, __rhs._M_string); 20472: } 20472: # 177 "/usr/include/c++/10/sstream" 3 20472: __string_type 20472: str() const 20472: { 20472: __string_type __ret(_M_string.get_allocator()); 20472: if (this->pptr()) 20472: { 20472: 20472: if (this->pptr() > this->egptr()) 20472: __ret.assign(this->pbase(), this->pptr()); 20472: else 20472: __ret.assign(this->pbase(), this->egptr()); 20472: } 20472: else 20472: __ret = _M_string; 20472: return __ret; 20472: } 20472: # 201 "/usr/include/c++/10/sstream" 3 20472: void 20472: str(const __string_type& __s) 20472: { 20472: 20472: 20472: _M_string.assign(__s.data(), __s.size()); 20472: _M_stringbuf_init(_M_mode); 20472: } 20472: 20472: protected: 20472: 20472: void 20472: _M_stringbuf_init(ios_base::openmode __mode) 20472: { 20472: _M_mode = __mode; 20472: __size_type __len = 0; 20472: if (_M_mode & (ios_base::ate | ios_base::app)) 20472: __len = _M_string.size(); 20472: _M_sync(const_cast(_M_string.data()), 0, __len); 20472: } 20472: 20472: virtual streamsize 20472: showmanyc() 20472: { 20472: streamsize __ret = -1; 20472: if (_M_mode & ios_base::in) 20472: { 20472: _M_update_egptr(); 20472: __ret = this->egptr() - this->gptr(); 20472: } 20472: return __ret; 20472: } 20472: 20472: virtual int_type 20472: underflow(); 20472: 20472: virtual int_type 20472: pbackfail(int_type __c = traits_type::eof()); 20472: 20472: virtual int_type 20472: overflow(int_type __c = traits_type::eof()); 20472: # 254 "/usr/include/c++/10/sstream" 3 20472: virtual __streambuf_type* 20472: setbuf(char_type* __s, streamsize __n) 20472: { 20472: if (__s && __n >= 0) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: _M_string.clear(); 20472: 20472: 20472: _M_sync(__s, __n, 0); 20472: } 20472: return this; 20472: } 20472: 20472: virtual pos_type 20472: seekoff(off_type __off, ios_base::seekdir __way, 20472: ios_base::openmode __mode = ios_base::in | ios_base::out); 20472: 20472: virtual pos_type 20472: seekpos(pos_type __sp, 20472: ios_base::openmode __mode = ios_base::in | ios_base::out); 20472: 20472: 20472: 20472: 20472: void 20472: _M_sync(char_type* __base, __size_type __i, __size_type __o); 20472: 20472: 20472: 20472: void 20472: _M_update_egptr() 20472: { 20472: const bool __testin = _M_mode & ios_base::in; 20472: if (this->pptr() && this->pptr() > this->egptr()) 20472: { 20472: if (__testin) 20472: this->setg(this->eback(), this->gptr(), this->pptr()); 20472: else 20472: this->setg(this->pptr(), this->pptr(), this->pptr()); 20472: } 20472: } 20472: 20472: 20472: 20472: void 20472: _M_pbump(char_type* __pbeg, char_type* __pend, off_type __off); 20472: 20472: private: 20472: 20472: 20472: 20472: 20472: struct __xfer_bufptrs 20472: { 20472: __xfer_bufptrs(const basic_stringbuf& __from, basic_stringbuf* __to) 20472: : _M_to{__to}, _M_goff{-1, -1, -1}, _M_poff{-1, -1, -1} 20472: { 20472: const _CharT* const __str = __from._M_string.data(); 20472: const _CharT* __end = nullptr; 20472: if (__from.eback()) 20472: { 20472: _M_goff[0] = __from.eback() - __str; 20472: _M_goff[1] = __from.gptr() - __str; 20472: _M_goff[2] = __from.egptr() - __str; 20472: __end = __from.egptr(); 20472: } 20472: if (__from.pbase()) 20472: { 20472: _M_poff[0] = __from.pbase() - __str; 20472: _M_poff[1] = __from.pptr() - __from.pbase(); 20472: _M_poff[2] = __from.epptr() - __str; 20472: if (__from.pptr() > __end) 20472: __end = __from.pptr(); 20472: } 20472: 20472: 20472: if (__end) 20472: { 20472: 20472: 20472: auto& __mut_from = const_cast(__from); 20472: __mut_from._M_string._M_length(__end - __str); 20472: } 20472: } 20472: 20472: ~__xfer_bufptrs() 20472: { 20472: char_type* __str = const_cast(_M_to->_M_string.data()); 20472: if (_M_goff[0] != -1) 20472: _M_to->setg(__str+_M_goff[0], __str+_M_goff[1], __str+_M_goff[2]); 20472: if (_M_poff[0] != -1) 20472: _M_to->_M_pbump(__str+_M_poff[0], __str+_M_poff[2], _M_poff[1]); 20472: } 20472: 20472: basic_stringbuf* _M_to; 20472: off_type _M_goff[3]; 20472: off_type _M_poff[3]; 20472: }; 20472: # 368 "/usr/include/c++/10/sstream" 3 20472: basic_stringbuf(basic_stringbuf&& __rhs, __xfer_bufptrs&&) 20472: : __streambuf_type(static_cast(__rhs)), 20472: _M_mode(__rhs._M_mode), _M_string(std::move(__rhs._M_string)) 20472: { } 20472: 20472: }; 20472: # 391 "/usr/include/c++/10/sstream" 3 20472: template 20472: class basic_istringstream : public basic_istream<_CharT, _Traits> 20472: { 20472: public: 20472: 20472: typedef _CharT char_type; 20472: typedef _Traits traits_type; 20472: 20472: 20472: typedef _Alloc allocator_type; 20472: typedef typename traits_type::int_type int_type; 20472: typedef typename traits_type::pos_type pos_type; 20472: typedef typename traits_type::off_type off_type; 20472: 20472: 20472: typedef basic_string<_CharT, _Traits, _Alloc> __string_type; 20472: typedef basic_stringbuf<_CharT, _Traits, _Alloc> __stringbuf_type; 20472: typedef basic_istream __istream_type; 20472: 20472: private: 20472: __stringbuf_type _M_stringbuf; 20472: 20472: public: 20472: # 425 "/usr/include/c++/10/sstream" 3 20472: basic_istringstream() 20472: : __istream_type(), _M_stringbuf(ios_base::in) 20472: { this->init(&_M_stringbuf); } 20472: # 441 "/usr/include/c++/10/sstream" 3 20472: explicit 20472: basic_istringstream(ios_base::openmode __mode) 20472: : __istream_type(), _M_stringbuf(__mode | ios_base::in) 20472: { this->init(&_M_stringbuf); } 20472: # 459 "/usr/include/c++/10/sstream" 3 20472: explicit 20472: basic_istringstream(const __string_type& __str, 20472: ios_base::openmode __mode = ios_base::in) 20472: : __istream_type(), _M_stringbuf(__str, __mode | ios_base::in) 20472: { this->init(&_M_stringbuf); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: ~basic_istringstream() 20472: { } 20472: 20472: 20472: basic_istringstream(const basic_istringstream&) = delete; 20472: 20472: basic_istringstream(basic_istringstream&& __rhs) 20472: : __istream_type(std::move(__rhs)), 20472: _M_stringbuf(std::move(__rhs._M_stringbuf)) 20472: { __istream_type::set_rdbuf(&_M_stringbuf); } 20472: 20472: 20472: 20472: basic_istringstream& 20472: operator=(const basic_istringstream&) = delete; 20472: 20472: basic_istringstream& 20472: operator=(basic_istringstream&& __rhs) 20472: { 20472: __istream_type::operator=(std::move(__rhs)); 20472: _M_stringbuf = std::move(__rhs._M_stringbuf); 20472: return *this; 20472: } 20472: 20472: void 20472: swap(basic_istringstream& __rhs) 20472: { 20472: __istream_type::swap(__rhs); 20472: _M_stringbuf.swap(__rhs._M_stringbuf); 20472: } 20472: # 510 "/usr/include/c++/10/sstream" 3 20472: __stringbuf_type* 20472: rdbuf() const 20472: { return const_cast<__stringbuf_type*>(&_M_stringbuf); } 20472: 20472: 20472: 20472: 20472: 20472: __string_type 20472: str() const 20472: { return _M_stringbuf.str(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: void 20472: str(const __string_type& __s) 20472: { _M_stringbuf.str(__s); } 20472: }; 20472: # 549 "/usr/include/c++/10/sstream" 3 20472: template 20472: class basic_ostringstream : public basic_ostream<_CharT, _Traits> 20472: { 20472: public: 20472: 20472: typedef _CharT char_type; 20472: typedef _Traits traits_type; 20472: 20472: 20472: typedef _Alloc allocator_type; 20472: typedef typename traits_type::int_type int_type; 20472: typedef typename traits_type::pos_type pos_type; 20472: typedef typename traits_type::off_type off_type; 20472: 20472: 20472: typedef basic_string<_CharT, _Traits, _Alloc> __string_type; 20472: typedef basic_stringbuf<_CharT, _Traits, _Alloc> __stringbuf_type; 20472: typedef basic_ostream __ostream_type; 20472: 20472: private: 20472: __stringbuf_type _M_stringbuf; 20472: 20472: public: 20472: # 583 "/usr/include/c++/10/sstream" 3 20472: basic_ostringstream() 20472: : __ostream_type(), _M_stringbuf(ios_base::out) 20472: { this->init(&_M_stringbuf); } 20472: # 599 "/usr/include/c++/10/sstream" 3 20472: explicit 20472: basic_ostringstream(ios_base::openmode __mode) 20472: : __ostream_type(), _M_stringbuf(__mode | ios_base::out) 20472: { this->init(&_M_stringbuf); } 20472: # 617 "/usr/include/c++/10/sstream" 3 20472: explicit 20472: basic_ostringstream(const __string_type& __str, 20472: ios_base::openmode __mode = ios_base::out) 20472: : __ostream_type(), _M_stringbuf(__str, __mode | ios_base::out) 20472: { this->init(&_M_stringbuf); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: ~basic_ostringstream() 20472: { } 20472: 20472: 20472: basic_ostringstream(const basic_ostringstream&) = delete; 20472: 20472: basic_ostringstream(basic_ostringstream&& __rhs) 20472: : __ostream_type(std::move(__rhs)), 20472: _M_stringbuf(std::move(__rhs._M_stringbuf)) 20472: { __ostream_type::set_rdbuf(&_M_stringbuf); } 20472: 20472: 20472: 20472: basic_ostringstream& 20472: operator=(const basic_ostringstream&) = delete; 20472: 20472: basic_ostringstream& 20472: operator=(basic_ostringstream&& __rhs) 20472: { 20472: __ostream_type::operator=(std::move(__rhs)); 20472: _M_stringbuf = std::move(__rhs._M_stringbuf); 20472: return *this; 20472: } 20472: 20472: void 20472: swap(basic_ostringstream& __rhs) 20472: { 20472: __ostream_type::swap(__rhs); 20472: _M_stringbuf.swap(__rhs._M_stringbuf); 20472: } 20472: # 668 "/usr/include/c++/10/sstream" 3 20472: __stringbuf_type* 20472: rdbuf() const 20472: { return const_cast<__stringbuf_type*>(&_M_stringbuf); } 20472: 20472: 20472: 20472: 20472: 20472: __string_type 20472: str() const 20472: { return _M_stringbuf.str(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: void 20472: str(const __string_type& __s) 20472: { _M_stringbuf.str(__s); } 20472: }; 20472: # 707 "/usr/include/c++/10/sstream" 3 20472: template 20472: class basic_stringstream : public basic_iostream<_CharT, _Traits> 20472: { 20472: public: 20472: 20472: typedef _CharT char_type; 20472: typedef _Traits traits_type; 20472: 20472: 20472: typedef _Alloc allocator_type; 20472: typedef typename traits_type::int_type int_type; 20472: typedef typename traits_type::pos_type pos_type; 20472: typedef typename traits_type::off_type off_type; 20472: 20472: 20472: typedef basic_string<_CharT, _Traits, _Alloc> __string_type; 20472: typedef basic_stringbuf<_CharT, _Traits, _Alloc> __stringbuf_type; 20472: typedef basic_iostream __iostream_type; 20472: 20472: private: 20472: __stringbuf_type _M_stringbuf; 20472: 20472: public: 20472: # 741 "/usr/include/c++/10/sstream" 3 20472: basic_stringstream() 20472: : __iostream_type(), _M_stringbuf(ios_base::out | ios_base::in) 20472: { this->init(&_M_stringbuf); } 20472: # 755 "/usr/include/c++/10/sstream" 3 20472: explicit 20472: basic_stringstream(ios_base::openmode __m) 20472: : __iostream_type(), _M_stringbuf(__m) 20472: { this->init(&_M_stringbuf); } 20472: # 771 "/usr/include/c++/10/sstream" 3 20472: explicit 20472: basic_stringstream(const __string_type& __str, 20472: ios_base::openmode __m = ios_base::out | ios_base::in) 20472: : __iostream_type(), _M_stringbuf(__str, __m) 20472: { this->init(&_M_stringbuf); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: ~basic_stringstream() 20472: { } 20472: 20472: 20472: basic_stringstream(const basic_stringstream&) = delete; 20472: 20472: basic_stringstream(basic_stringstream&& __rhs) 20472: : __iostream_type(std::move(__rhs)), 20472: _M_stringbuf(std::move(__rhs._M_stringbuf)) 20472: { __iostream_type::set_rdbuf(&_M_stringbuf); } 20472: 20472: 20472: 20472: basic_stringstream& 20472: operator=(const basic_stringstream&) = delete; 20472: 20472: basic_stringstream& 20472: operator=(basic_stringstream&& __rhs) 20472: { 20472: __iostream_type::operator=(std::move(__rhs)); 20472: _M_stringbuf = std::move(__rhs._M_stringbuf); 20472: return *this; 20472: } 20472: 20472: void 20472: swap(basic_stringstream& __rhs) 20472: { 20472: __iostream_type::swap(__rhs); 20472: _M_stringbuf.swap(__rhs._M_stringbuf); 20472: } 20472: # 822 "/usr/include/c++/10/sstream" 3 20472: __stringbuf_type* 20472: rdbuf() const 20472: { return const_cast<__stringbuf_type*>(&_M_stringbuf); } 20472: 20472: 20472: 20472: 20472: 20472: __string_type 20472: str() const 20472: { return _M_stringbuf.str(); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: void 20472: str(const __string_type& __s) 20472: { _M_stringbuf.str(__s); } 20472: }; 20472: 20472: 20472: 20472: template 20472: inline void 20472: swap(basic_stringbuf<_CharT, _Traits, _Allocator>& __x, 20472: basic_stringbuf<_CharT, _Traits, _Allocator>& __y) 20472: { __x.swap(__y); } 20472: 20472: 20472: template 20472: inline void 20472: swap(basic_istringstream<_CharT, _Traits, _Allocator>& __x, 20472: basic_istringstream<_CharT, _Traits, _Allocator>& __y) 20472: { __x.swap(__y); } 20472: 20472: 20472: template 20472: inline void 20472: swap(basic_ostringstream<_CharT, _Traits, _Allocator>& __x, 20472: basic_ostringstream<_CharT, _Traits, _Allocator>& __y) 20472: { __x.swap(__y); } 20472: 20472: 20472: template 20472: inline void 20472: swap(basic_stringstream<_CharT, _Traits, _Allocator>& __x, 20472: basic_stringstream<_CharT, _Traits, _Allocator>& __y) 20472: { __x.swap(__y); } 20472: 20472: 20472: } 20472: 20472: } 20472: 20472: # 1 "/usr/include/c++/10/bits/sstream.tcc" 1 3 20472: # 37 "/usr/include/c++/10/bits/sstream.tcc" 3 20472: 20472: # 38 "/usr/include/c++/10/bits/sstream.tcc" 3 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: template 20472: typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type 20472: basic_stringbuf<_CharT, _Traits, _Alloc>:: 20472: pbackfail(int_type __c) 20472: { 20472: int_type __ret = traits_type::eof(); 20472: if (this->eback() < this->gptr()) 20472: { 20472: 20472: 20472: const bool __testeof = traits_type::eq_int_type(__c, __ret); 20472: if (!__testeof) 20472: { 20472: const bool __testeq = traits_type::eq(traits_type:: 20472: to_char_type(__c), 20472: this->gptr()[-1]); 20472: const bool __testout = this->_M_mode & ios_base::out; 20472: if (__testeq || __testout) 20472: { 20472: this->gbump(-1); 20472: if (!__testeq) 20472: *this->gptr() = traits_type::to_char_type(__c); 20472: __ret = __c; 20472: } 20472: } 20472: else 20472: { 20472: this->gbump(-1); 20472: __ret = traits_type::not_eof(__c); 20472: } 20472: } 20472: return __ret; 20472: } 20472: 20472: template 20472: typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type 20472: basic_stringbuf<_CharT, _Traits, _Alloc>:: 20472: overflow(int_type __c) 20472: { 20472: const bool __testout = this->_M_mode & ios_base::out; 20472: if (__builtin_expect(!__testout, false)) 20472: return traits_type::eof(); 20472: 20472: const bool __testeof = traits_type::eq_int_type(__c, traits_type::eof()); 20472: if (__builtin_expect(__testeof, false)) 20472: return traits_type::not_eof(__c); 20472: 20472: const __size_type __capacity = _M_string.capacity(); 20472: 20472: 20472: if ((this->epptr() - this->pbase()) < __capacity) 20472: { 20472: 20472: char_type* __base = const_cast(_M_string.data()); 20472: _M_pbump(__base, __base + __capacity, this->pptr() - this->pbase()); 20472: if (_M_mode & ios_base::in) 20472: { 20472: const __size_type __nget = this->gptr() - this->eback(); 20472: const __size_type __eget = this->egptr() - this->eback(); 20472: this->setg(__base, __base + __nget, __base + __eget + 1); 20472: } 20472: *this->pptr() = traits_type::to_char_type(__c); 20472: this->pbump(1); 20472: return __c; 20472: } 20472: 20472: 20472: const __size_type __max_size = _M_string.max_size(); 20472: const bool __testput = this->pptr() < this->epptr(); 20472: if (__builtin_expect(!__testput && __capacity == __max_size, false)) 20472: return traits_type::eof(); 20472: 20472: 20472: 20472: const char_type __conv = traits_type::to_char_type(__c); 20472: if (!__testput) 20472: { 20472: # 129 "/usr/include/c++/10/bits/sstream.tcc" 3 20472: const __size_type __opt_len = std::max(__size_type(2 * __capacity), 20472: __size_type(512)); 20472: const __size_type __len = std::min(__opt_len, __max_size); 20472: __string_type __tmp(_M_string.get_allocator()); 20472: __tmp.reserve(__len); 20472: if (this->pbase()) 20472: __tmp.assign(this->pbase(), this->epptr() - this->pbase()); 20472: __tmp.push_back(__conv); 20472: _M_string.swap(__tmp); 20472: _M_sync(const_cast(_M_string.data()), 20472: this->gptr() - this->eback(), this->pptr() - this->pbase()); 20472: } 20472: else 20472: *this->pptr() = __conv; 20472: this->pbump(1); 20472: return __c; 20472: } 20472: 20472: template 20472: typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type 20472: basic_stringbuf<_CharT, _Traits, _Alloc>:: 20472: underflow() 20472: { 20472: int_type __ret = traits_type::eof(); 20472: const bool __testin = this->_M_mode & ios_base::in; 20472: if (__testin) 20472: { 20472: 20472: _M_update_egptr(); 20472: 20472: if (this->gptr() < this->egptr()) 20472: __ret = traits_type::to_int_type(*this->gptr()); 20472: } 20472: return __ret; 20472: } 20472: 20472: template 20472: typename basic_stringbuf<_CharT, _Traits, _Alloc>::pos_type 20472: basic_stringbuf<_CharT, _Traits, _Alloc>:: 20472: seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode __mode) 20472: { 20472: pos_type __ret = pos_type(off_type(-1)); 20472: bool __testin = (ios_base::in & this->_M_mode & __mode) != 0; 20472: bool __testout = (ios_base::out & this->_M_mode & __mode) != 0; 20472: const bool __testboth = __testin && __testout && __way != ios_base::cur; 20472: __testin &= !(__mode & ios_base::out); 20472: __testout &= !(__mode & ios_base::in); 20472: 20472: 20472: 20472: const char_type* __beg = __testin ? this->eback() : this->pbase(); 20472: if ((__beg || !__off) && (__testin || __testout || __testboth)) 20472: { 20472: _M_update_egptr(); 20472: 20472: off_type __newoffi = __off; 20472: off_type __newoffo = __newoffi; 20472: if (__way == ios_base::cur) 20472: { 20472: __newoffi += this->gptr() - __beg; 20472: __newoffo += this->pptr() - __beg; 20472: } 20472: else if (__way == ios_base::end) 20472: __newoffo = __newoffi += this->egptr() - __beg; 20472: 20472: if ((__testin || __testboth) 20472: && __newoffi >= 0 20472: && this->egptr() - __beg >= __newoffi) 20472: { 20472: this->setg(this->eback(), this->eback() + __newoffi, 20472: this->egptr()); 20472: __ret = pos_type(__newoffi); 20472: } 20472: if ((__testout || __testboth) 20472: && __newoffo >= 0 20472: && this->egptr() - __beg >= __newoffo) 20472: { 20472: _M_pbump(this->pbase(), this->epptr(), __newoffo); 20472: __ret = pos_type(__newoffo); 20472: } 20472: } 20472: return __ret; 20472: } 20472: 20472: template 20472: typename basic_stringbuf<_CharT, _Traits, _Alloc>::pos_type 20472: basic_stringbuf<_CharT, _Traits, _Alloc>:: 20472: seekpos(pos_type __sp, ios_base::openmode __mode) 20472: { 20472: pos_type __ret = pos_type(off_type(-1)); 20472: const bool __testin = (ios_base::in & this->_M_mode & __mode) != 0; 20472: const bool __testout = (ios_base::out & this->_M_mode & __mode) != 0; 20472: 20472: const char_type* __beg = __testin ? this->eback() : this->pbase(); 20472: if ((__beg || !off_type(__sp)) && (__testin || __testout)) 20472: { 20472: _M_update_egptr(); 20472: 20472: const off_type __pos(__sp); 20472: const bool __testpos = (0 <= __pos 20472: && __pos <= this->egptr() - __beg); 20472: if (__testpos) 20472: { 20472: if (__testin) 20472: this->setg(this->eback(), this->eback() + __pos, 20472: this->egptr()); 20472: if (__testout) 20472: _M_pbump(this->pbase(), this->epptr(), __pos); 20472: __ret = __sp; 20472: } 20472: } 20472: return __ret; 20472: } 20472: 20472: template 20472: void 20472: basic_stringbuf<_CharT, _Traits, _Alloc>:: 20472: _M_sync(char_type* __base, __size_type __i, __size_type __o) 20472: { 20472: const bool __testin = _M_mode & ios_base::in; 20472: const bool __testout = _M_mode & ios_base::out; 20472: char_type* __endg = __base + _M_string.size(); 20472: char_type* __endp = __base + _M_string.capacity(); 20472: 20472: if (__base != _M_string.data()) 20472: { 20472: 20472: __endg += __i; 20472: __i = 0; 20472: __endp = __endg; 20472: } 20472: 20472: if (__testin) 20472: this->setg(__base, __base + __i, __endg); 20472: if (__testout) 20472: { 20472: _M_pbump(__base, __endp, __o); 20472: 20472: 20472: 20472: if (!__testin) 20472: this->setg(__endg, __endg, __endg); 20472: } 20472: } 20472: 20472: template 20472: void 20472: basic_stringbuf<_CharT, _Traits, _Alloc>:: 20472: _M_pbump(char_type* __pbeg, char_type* __pend, off_type __off) 20472: { 20472: this->setp(__pbeg, __pend); 20472: while (__off > __gnu_cxx::__numeric_traits::__max) 20472: { 20472: this->pbump(__gnu_cxx::__numeric_traits::__max); 20472: __off -= __gnu_cxx::__numeric_traits::__max; 20472: } 20472: this->pbump(__off); 20472: } 20472: 20472: 20472: 20472: 20472: extern template class basic_stringbuf; 20472: extern template class basic_istringstream; 20472: extern template class basic_ostringstream; 20472: extern template class basic_stringstream; 20472: 20472: 20472: extern template class basic_stringbuf; 20472: extern template class basic_istringstream; 20472: extern template class basic_ostringstream; 20472: extern template class basic_stringstream; 20472: 20472: 20472: 20472: 20472: } 20472: # 880 "/usr/include/c++/10/sstream" 2 3 20472: # 13 "./file/file_prefetch_buffer.h" 2 20472: 20472: # 1 "./file/random_access_file_reader.h" 1 20472: # 10 "./file/random_access_file_reader.h" 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "./include/rocksdb/file_system.h" 1 20472: # 17 "./include/rocksdb/file_system.h" 20472: 20472: 20472: 20472: 20472: # 1 "/usr/include/c++/10/cstdarg" 1 3 20472: # 39 "/usr/include/c++/10/cstdarg" 3 20472: 20472: # 40 "/usr/include/c++/10/cstdarg" 3 20472: # 22 "./include/rocksdb/file_system.h" 2 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "./include/rocksdb/io_status.h" 1 20472: # 14 "./include/rocksdb/io_status.h" 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "/usr/include/c++/10/cstring" 1 3 20472: # 39 "/usr/include/c++/10/cstring" 3 20472: 20472: # 40 "/usr/include/c++/10/cstring" 3 20472: # 71 "/usr/include/c++/10/cstring" 3 20472: extern "C++" 20472: { 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: using ::memchr; 20472: using ::memcmp; 20472: using ::memcpy; 20472: using ::memmove; 20472: using ::memset; 20472: using ::strcat; 20472: using ::strcmp; 20472: using ::strcoll; 20472: using ::strcpy; 20472: using ::strcspn; 20472: using ::strerror; 20472: using ::strlen; 20472: using ::strncat; 20472: using ::strncmp; 20472: using ::strncpy; 20472: using ::strspn; 20472: using ::strtok; 20472: using ::strxfrm; 20472: using ::strchr; 20472: using ::strpbrk; 20472: using ::strrchr; 20472: using ::strstr; 20472: # 122 "/usr/include/c++/10/cstring" 3 20472: 20472: } 20472: } 20472: # 22 "./include/rocksdb/io_status.h" 2 20472: 20472: 20472: 20472: # 24 "./include/rocksdb/io_status.h" 20472: namespace rocksdb { 20472: 20472: class IOStatus : public Status { 20472: public: 20472: using Code = Status::Code; 20472: using SubCode = Status::SubCode; 20472: 20472: enum IOErrorScope { 20472: kIOErrorScopeFileSystem, 20472: kIOErrorScopeFile, 20472: kIOErrorScopeRange, 20472: kIOErrorScopeMax, 20472: }; 20472: 20472: 20472: IOStatus() : IOStatus(kOk, kNone) {} 20472: ~IOStatus() {} 20472: 20472: 20472: IOStatus(const IOStatus& s); 20472: IOStatus& operator=(const IOStatus& s); 20472: IOStatus(IOStatus&& s) 20472: 20472: noexcept 20472: 20472: ; 20472: IOStatus& operator=(IOStatus&& s) 20472: 20472: noexcept 20472: 20472: ; 20472: bool operator==(const IOStatus& rhs) const; 20472: bool operator!=(const IOStatus& rhs) const; 20472: 20472: void SetRetryable(bool retryable) { retryable_ = retryable; } 20472: void SetDataLoss(bool data_loss) { data_loss_ = data_loss; } 20472: void SetScope(IOErrorScope scope) { scope_ = scope; } 20472: 20472: bool GetRetryable() const { return retryable_; } 20472: bool GetDataLoss() const { return data_loss_; } 20472: IOErrorScope GetScope() const { return scope_; } 20472: 20472: 20472: static IOStatus OK() { return IOStatus(); } 20472: 20472: static IOStatus NotSupported(const Slice& msg, const Slice& msg2 = Slice()) { 20472: return IOStatus(kNotSupported, msg, msg2); 20472: } 20472: static IOStatus NotSupported(SubCode msg = kNone) { 20472: return IOStatus(kNotSupported, msg); 20472: } 20472: 20472: 20472: static IOStatus NotFound(const Slice& msg, const Slice& msg2 = Slice()) { 20472: return IOStatus(kNotFound, msg, msg2); 20472: } 20472: 20472: static IOStatus NotFound(SubCode msg = kNone) { 20472: return IOStatus(kNotFound, msg); 20472: } 20472: 20472: static IOStatus Corruption(const Slice& msg, const Slice& msg2 = Slice()) { 20472: return IOStatus(kCorruption, msg, msg2); 20472: } 20472: static IOStatus Corruption(SubCode msg = kNone) { 20472: return IOStatus(kCorruption, msg); 20472: } 20472: 20472: static IOStatus InvalidArgument(const Slice& msg, 20472: const Slice& msg2 = Slice()) { 20472: return IOStatus(kInvalidArgument, msg, msg2); 20472: } 20472: static IOStatus InvalidArgument(SubCode msg = kNone) { 20472: return IOStatus(kInvalidArgument, msg); 20472: } 20472: 20472: static IOStatus IOError(const Slice& msg, const Slice& msg2 = Slice()) { 20472: return IOStatus(kIOError, msg, msg2); 20472: } 20472: static IOStatus IOError(SubCode msg = kNone) { 20472: return IOStatus(kIOError, msg); 20472: } 20472: 20472: static IOStatus Busy(SubCode msg = kNone) { return IOStatus(kBusy, msg); } 20472: static IOStatus Busy(const Slice& msg, const Slice& msg2 = Slice()) { 20472: return IOStatus(kBusy, msg, msg2); 20472: } 20472: 20472: static IOStatus TimedOut(SubCode msg = kNone) { 20472: return IOStatus(kTimedOut, msg); 20472: } 20472: static IOStatus TimedOut(const Slice& msg, const Slice& msg2 = Slice()) { 20472: return IOStatus(kTimedOut, msg, msg2); 20472: } 20472: 20472: static IOStatus NoSpace() { return IOStatus(kIOError, kNoSpace); } 20472: static IOStatus NoSpace(const Slice& msg, const Slice& msg2 = Slice()) { 20472: return IOStatus(kIOError, kNoSpace, msg, msg2); 20472: } 20472: 20472: static IOStatus PathNotFound() { return IOStatus(kIOError, kPathNotFound); } 20472: static IOStatus PathNotFound(const Slice& msg, const Slice& msg2 = Slice()) { 20472: return IOStatus(kIOError, kPathNotFound, msg, msg2); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: private: 20472: friend IOStatus status_to_io_status(Status&&); 20472: bool retryable_; 20472: bool data_loss_; 20472: IOErrorScope scope_; 20472: 20472: explicit IOStatus(Code _code, SubCode _subcode = kNone) 20472: : Status(_code, _subcode), 20472: retryable_(false), 20472: data_loss_(false), 20472: scope_(kIOErrorScopeFileSystem) {} 20472: 20472: IOStatus(Code _code, SubCode _subcode, const Slice& msg, const Slice& msg2); 20472: IOStatus(Code _code, const Slice& msg, const Slice& msg2) 20472: : IOStatus(_code, kNone, msg, msg2) {} 20472: }; 20472: 20472: inline IOStatus::IOStatus(Code _code, SubCode _subcode, const Slice& msg, 20472: const Slice& msg2) 20472: : Status(_code, _subcode), 20472: retryable_(false), 20472: data_loss_(false), 20472: scope_(kIOErrorScopeFileSystem) { 20472: 20472: # 156 "./include/rocksdb/io_status.h" 3 4 20472: (static_cast ( 20472: # 156 "./include/rocksdb/io_status.h" 20472: code_ != kOk 20472: # 156 "./include/rocksdb/io_status.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 156 "./include/rocksdb/io_status.h" 20472: "code_ != kOk" 20472: # 156 "./include/rocksdb/io_status.h" 3 4 20472: , "./include/rocksdb/io_status.h", 156, __extension__ __PRETTY_FUNCTION__)) 20472: # 156 "./include/rocksdb/io_status.h" 20472: ; 20472: 20472: # 157 "./include/rocksdb/io_status.h" 3 4 20472: (static_cast ( 20472: # 157 "./include/rocksdb/io_status.h" 20472: subcode_ != kMaxSubCode 20472: # 157 "./include/rocksdb/io_status.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 157 "./include/rocksdb/io_status.h" 20472: "subcode_ != kMaxSubCode" 20472: # 157 "./include/rocksdb/io_status.h" 3 4 20472: , "./include/rocksdb/io_status.h", 157, __extension__ __PRETTY_FUNCTION__)) 20472: # 157 "./include/rocksdb/io_status.h" 20472: ; 20472: const size_t len1 = msg.size(); 20472: const size_t len2 = msg2.size(); 20472: const size_t size = len1 + (len2 ? (2 + len2) : 0); 20472: char* const result = new char[size + 1]; 20472: memcpy(result, msg.data(), len1); 20472: if (len2) { 20472: result[len1] = ':'; 20472: result[len1 + 1] = ' '; 20472: memcpy(result + len1 + 2, msg2.data(), len2); 20472: } 20472: result[size] = '\0'; 20472: state_ = result; 20472: } 20472: 20472: inline IOStatus::IOStatus(const IOStatus& s) : Status(s.code_, s.subcode_) { 20472: 20472: 20472: 20472: retryable_ = s.retryable_; 20472: data_loss_ = s.data_loss_; 20472: scope_ = s.scope_; 20472: state_ = (s.state_ == nullptr) ? nullptr : CopyState(s.state_); 20472: } 20472: inline IOStatus& IOStatus::operator=(const IOStatus& s) { 20472: 20472: 20472: if (this != &s) { 20472: 20472: 20472: 20472: 20472: code_ = s.code_; 20472: subcode_ = s.subcode_; 20472: retryable_ = s.retryable_; 20472: data_loss_ = s.data_loss_; 20472: scope_ = s.scope_; 20472: delete[] state_; 20472: state_ = (s.state_ == nullptr) ? nullptr : CopyState(s.state_); 20472: } 20472: return *this; 20472: } 20472: 20472: inline IOStatus::IOStatus(IOStatus&& s) 20472: 20472: noexcept 20472: 20472: : IOStatus() { 20472: *this = std::move(s); 20472: } 20472: 20472: inline IOStatus& IOStatus::operator=(IOStatus&& s) 20472: 20472: noexcept 20472: 20472: { 20472: if (this != &s) { 20472: 20472: 20472: 20472: 20472: code_ = std::move(s.code_); 20472: s.code_ = kOk; 20472: subcode_ = std::move(s.subcode_); 20472: s.subcode_ = kNone; 20472: retryable_ = s.retryable_; 20472: data_loss_ = s.data_loss_; 20472: scope_ = s.scope_; 20472: s.scope_ = kIOErrorScopeFileSystem; 20472: delete[] state_; 20472: state_ = nullptr; 20472: std::swap(state_, s.state_); 20472: } 20472: return *this; 20472: } 20472: 20472: inline bool IOStatus::operator==(const IOStatus& rhs) const { 20472: 20472: 20472: 20472: 20472: return (code_ == rhs.code_); 20472: } 20472: 20472: inline bool IOStatus::operator!=(const IOStatus& rhs) const { 20472: 20472: 20472: 20472: 20472: return !(*this == rhs); 20472: } 20472: 20472: inline IOStatus status_to_io_status(Status&& status) { 20472: if (status.ok()) { 20472: 20472: return IOStatus::OK(); 20472: } else { 20472: const char* state = status.getState(); 20472: if (state) { 20472: return IOStatus(status.code(), status.subcode(), 20472: Slice(state, strlen(status.getState()) + 1), Slice()); 20472: } else { 20472: return IOStatus(status.code(), status.subcode()); 20472: } 20472: } 20472: } 20472: 20472: } 20472: # 30 "./include/rocksdb/file_system.h" 2 20472: 20472: 20472: 20472: namespace rocksdb { 20472: 20472: class FileLock; 20472: class FSDirectory; 20472: class FSRandomAccessFile; 20472: class FSRandomRWFile; 20472: class FSSequentialFile; 20472: class FSWritableFile; 20472: class Logger; 20472: class Slice; 20472: struct ImmutableDBOptions; 20472: struct MutableDBOptions; 20472: class RateLimiter; 20472: 20472: using AccessPattern = RandomAccessFile::AccessPattern; 20472: using FileAttributes = Env::FileAttributes; 20472: 20472: 20472: 20472: 20472: 20472: enum class IOPriority : uint8_t { 20472: kIOLow, 20472: kIOHigh, 20472: kIOTotal, 20472: }; 20472: 20472: 20472: 20472: 20472: enum class IOType : uint8_t { 20472: kData, 20472: kFilter, 20472: kIndex, 20472: kMetadata, 20472: kWAL, 20472: kManifest, 20472: kLog, 20472: kUnknown, 20472: kInvalid, 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: struct IOOptions { 20472: 20472: std::chrono::microseconds timeout; 20472: 20472: 20472: IOPriority prio; 20472: 20472: 20472: IOType type; 20472: 20472: IOOptions() : timeout(0), prio(IOPriority::kIOLow), type(IOType::kUnknown) {} 20472: }; 20472: 20472: 20472: 20472: 20472: struct FileOptions : EnvOptions { 20472: 20472: 20472: IOOptions io_options; 20472: 20472: FileOptions() : EnvOptions() {} 20472: 20472: FileOptions(const DBOptions& opts) 20472: : EnvOptions(opts) {} 20472: 20472: FileOptions(const EnvOptions& opts) 20472: : EnvOptions(opts) {} 20472: 20472: FileOptions(const FileOptions& opts) 20472: : EnvOptions(opts), io_options(opts.io_options) {} 20472: 20472: FileOptions& operator=(const FileOptions& opts) = default; 20472: }; 20472: 20472: 20472: 20472: struct IODebugContext { 20472: 20472: std::string file_path; 20472: 20472: 20472: std::map counters; 20472: 20472: 20472: std::string msg; 20472: 20472: IODebugContext() {} 20472: 20472: void AddCounter(std::string& name, uint64_t value) { 20472: counters.emplace(name, value); 20472: } 20472: 20472: std::string ToString() { 20472: std::ostringstream ss; 20472: ss << file_path << ", "; 20472: for (auto counter : counters) { 20472: ss << counter.first << " = " << counter.second << ","; 20472: } 20472: ss << msg; 20472: return ss.str(); 20472: } 20472: }; 20472: # 157 "./include/rocksdb/file_system.h" 20472: class FileSystem { 20472: public: 20472: FileSystem(); 20472: 20472: 20472: FileSystem(const FileSystem&) = delete; 20472: 20472: virtual ~FileSystem(); 20472: 20472: virtual const char* Name() const = 0; 20472: 20472: static const char* Type() { return "FileSystem"; } 20472: 20472: 20472: static Status Load(const std::string& value, 20472: std::shared_ptr* result); 20472: 20472: 20472: 20472: 20472: 20472: 20472: static std::shared_ptr Default(); 20472: # 196 "./include/rocksdb/file_system.h" 20472: virtual Status RegisterDbPaths(const std::vector& ) { 20472: return Status::OK(); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual Status UnregisterDbPaths(const std::vector& ) { 20472: return Status::OK(); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual IOStatus NewSequentialFile(const std::string& fname, 20472: const FileOptions& file_opts, 20472: std::unique_ptr* result, 20472: IODebugContext* dbg) = 0; 20472: # 228 "./include/rocksdb/file_system.h" 20472: virtual IOStatus NewRandomAccessFile( 20472: const std::string& fname, const FileOptions& file_opts, 20472: std::unique_ptr* result, 20472: IODebugContext* dbg) = 0; 20472: 20472: 20472: enum WriteLifeTimeHint { 20472: kWLTHNotSet = 0, 20472: kWLTHNone, 20472: kWLTHShort, 20472: kWLTHMedium, 20472: kWLTHLong, 20472: kWLTHExtreme, 20472: }; 20472: # 250 "./include/rocksdb/file_system.h" 20472: virtual IOStatus NewWritableFile(const std::string& fname, 20472: const FileOptions& file_opts, 20472: std::unique_ptr* result, 20472: IODebugContext* dbg) = 0; 20472: # 262 "./include/rocksdb/file_system.h" 20472: virtual IOStatus ReopenWritableFile( 20472: const std::string& , const FileOptions& , 20472: std::unique_ptr* , IODebugContext* ) { 20472: return IOStatus::NotSupported(); 20472: } 20472: 20472: 20472: virtual IOStatus ReuseWritableFile(const std::string& fname, 20472: const std::string& old_fname, 20472: const FileOptions& file_opts, 20472: std::unique_ptr* result, 20472: IODebugContext* dbg); 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual IOStatus NewRandomRWFile(const std::string& , 20472: const FileOptions& , 20472: std::unique_ptr* , 20472: IODebugContext* ) { 20472: return IOStatus::NotSupported( 20472: "RandomRWFile is not implemented in this FileSystem"); 20472: } 20472: 20472: 20472: 20472: 20472: virtual IOStatus NewMemoryMappedFileBuffer( 20472: const std::string& , 20472: std::unique_ptr* ) { 20472: return IOStatus::NotSupported( 20472: "MemoryMappedFileBuffer is not implemented in this FileSystem"); 20472: } 20472: # 305 "./include/rocksdb/file_system.h" 20472: virtual IOStatus NewDirectory(const std::string& name, 20472: const IOOptions& io_opts, 20472: std::unique_ptr* result, 20472: IODebugContext* dbg) = 0; 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual IOStatus FileExists(const std::string& fname, 20472: const IOOptions& options, 20472: IODebugContext* dbg) = 0; 20472: # 326 "./include/rocksdb/file_system.h" 20472: virtual IOStatus GetChildren(const std::string& dir, const IOOptions& options, 20472: std::vector* result, 20472: IODebugContext* dbg) = 0; 20472: # 340 "./include/rocksdb/file_system.h" 20472: virtual IOStatus GetChildrenFileAttributes( 20472: const std::string& dir, const IOOptions& options, 20472: std::vector* result, IODebugContext* dbg) { 20472: 20472: # 343 "./include/rocksdb/file_system.h" 3 4 20472: (static_cast ( 20472: # 343 "./include/rocksdb/file_system.h" 20472: result != nullptr 20472: # 343 "./include/rocksdb/file_system.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 343 "./include/rocksdb/file_system.h" 20472: "result != nullptr" 20472: # 343 "./include/rocksdb/file_system.h" 3 4 20472: , "./include/rocksdb/file_system.h", 343, __extension__ __PRETTY_FUNCTION__)) 20472: # 343 "./include/rocksdb/file_system.h" 20472: ; 20472: std::vector child_fnames; 20472: IOStatus s = GetChildren(dir, options, &child_fnames, dbg); 20472: if (!s.ok()) { 20472: return s; 20472: } 20472: result->resize(child_fnames.size()); 20472: size_t result_size = 0; 20472: for (size_t i = 0; i < child_fnames.size(); ++i) { 20472: const std::string path = dir + "/" + child_fnames[i]; 20472: if (!(s = GetFileSize(path, options, &(*result)[result_size].size_bytes, 20472: dbg)) 20472: .ok()) { 20472: if (FileExists(path, options, dbg).IsNotFound()) { 20472: 20472: continue; 20472: } 20472: return s; 20472: } 20472: (*result)[result_size].name = std::move(child_fnames[i]); 20472: result_size++; 20472: } 20472: result->resize(result_size); 20472: return IOStatus::OK(); 20472: } 20472: 20472: 20472: virtual IOStatus DeleteFile(const std::string& fname, 20472: const IOOptions& options, 20472: IODebugContext* dbg) = 0; 20472: 20472: 20472: virtual IOStatus Truncate(const std::string& , size_t , 20472: const IOOptions& , 20472: IODebugContext* ) { 20472: return IOStatus::NotSupported("Truncate is not supported for this FileSystem"); 20472: } 20472: 20472: 20472: virtual IOStatus CreateDir(const std::string& dirname, 20472: const IOOptions& options, IODebugContext* dbg) = 0; 20472: 20472: 20472: 20472: virtual IOStatus CreateDirIfMissing(const std::string& dirname, 20472: const IOOptions& options, 20472: IODebugContext* dbg) = 0; 20472: 20472: 20472: virtual IOStatus DeleteDir(const std::string& dirname, 20472: const IOOptions& options, IODebugContext* dbg) = 0; 20472: 20472: 20472: virtual IOStatus GetFileSize(const std::string& fname, 20472: const IOOptions& options, uint64_t* file_size, 20472: IODebugContext* dbg) = 0; 20472: 20472: 20472: virtual IOStatus GetFileModificationTime(const std::string& fname, 20472: const IOOptions& options, 20472: uint64_t* file_mtime, 20472: IODebugContext* dbg) = 0; 20472: 20472: virtual IOStatus RenameFile(const std::string& src, const std::string& target, 20472: const IOOptions& options, 20472: IODebugContext* dbg) = 0; 20472: 20472: 20472: virtual IOStatus LinkFile(const std::string& , 20472: const std::string& , 20472: const IOOptions& , 20472: IODebugContext* ) { 20472: return IOStatus::NotSupported("LinkFile is not supported for this FileSystem"); 20472: } 20472: 20472: virtual IOStatus NumFileLinks(const std::string& , 20472: const IOOptions& , 20472: uint64_t* , IODebugContext* ) { 20472: return IOStatus::NotSupported( 20472: "Getting number of file links is not supported for this FileSystem"); 20472: } 20472: 20472: virtual IOStatus AreFilesSame(const std::string& , 20472: const std::string& , 20472: const IOOptions& , bool* , 20472: IODebugContext* ) { 20472: return IOStatus::NotSupported("AreFilesSame is not supported for this FileSystem"); 20472: } 20472: # 446 "./include/rocksdb/file_system.h" 20472: virtual IOStatus LockFile(const std::string& fname, const IOOptions& options, 20472: FileLock** lock, IODebugContext* dbg) = 0; 20472: 20472: 20472: 20472: 20472: virtual IOStatus UnlockFile(FileLock* lock, const IOOptions& options, 20472: IODebugContext* dbg) = 0; 20472: 20472: 20472: 20472: 20472: 20472: virtual IOStatus GetTestDirectory(const IOOptions& options, std::string* path, 20472: IODebugContext* dbg) = 0; 20472: 20472: 20472: 20472: 20472: virtual IOStatus NewLogger(const std::string& fname, const IOOptions& io_opts, 20472: std::shared_ptr* result, 20472: IODebugContext* dbg) = 0; 20472: 20472: 20472: virtual IOStatus GetAbsolutePath(const std::string& db_path, 20472: const IOOptions& options, 20472: std::string* output_path, 20472: IODebugContext* dbg) = 0; 20472: 20472: 20472: 20472: virtual void SanitizeFileOptions(FileOptions* ) const {} 20472: 20472: 20472: 20472: virtual FileOptions OptimizeForLogRead(const FileOptions& file_options) const; 20472: 20472: 20472: 20472: 20472: virtual FileOptions OptimizeForManifestRead( 20472: const FileOptions& file_options) const; 20472: 20472: 20472: 20472: 20472: virtual FileOptions OptimizeForLogWrite(const FileOptions& file_options, 20472: const DBOptions& db_options) const; 20472: 20472: 20472: 20472: 20472: 20472: virtual FileOptions OptimizeForManifestWrite( 20472: const FileOptions& file_options) const; 20472: 20472: 20472: 20472: 20472: virtual FileOptions OptimizeForCompactionTableWrite( 20472: const FileOptions& file_options, 20472: const ImmutableDBOptions& immutable_ops) const; 20472: 20472: 20472: 20472: 20472: virtual FileOptions OptimizeForCompactionTableRead( 20472: const FileOptions& file_options, 20472: const ImmutableDBOptions& db_options) const; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual IOStatus GetFreeSpace(const std::string& , 20472: const IOOptions& , 20472: uint64_t* , 20472: IODebugContext* ) { 20472: return IOStatus::NotSupported(); 20472: } 20472: 20472: virtual IOStatus IsDirectory(const std::string& , 20472: const IOOptions& options, bool* is_dir, 20472: IODebugContext* ) = 0; 20472: 20472: 20472: 20472: private: 20472: void operator=(const FileSystem&); 20472: }; 20472: 20472: 20472: class FSSequentialFile { 20472: public: 20472: FSSequentialFile() {} 20472: 20472: virtual ~FSSequentialFile() {} 20472: # 554 "./include/rocksdb/file_system.h" 20472: virtual IOStatus Read(size_t n, const IOOptions& options, Slice* result, 20472: char* scratch, IODebugContext* dbg) = 0; 20472: # 564 "./include/rocksdb/file_system.h" 20472: virtual IOStatus Skip(uint64_t n) = 0; 20472: 20472: 20472: 20472: virtual bool use_direct_io() const { return false; } 20472: 20472: 20472: 20472: virtual size_t GetRequiredBufferAlignment() const { return kDefaultPageSize; } 20472: 20472: 20472: 20472: 20472: virtual IOStatus InvalidateCache(size_t , size_t ) { 20472: return IOStatus::NotSupported("InvalidateCache not supported."); 20472: } 20472: 20472: 20472: 20472: virtual IOStatus PositionedRead(uint64_t , size_t , 20472: const IOOptions& , 20472: Slice* , char* , 20472: IODebugContext* ) { 20472: return IOStatus::NotSupported(); 20472: } 20472: 20472: 20472: 20472: }; 20472: 20472: 20472: struct FSReadRequest { 20472: 20472: uint64_t offset; 20472: 20472: 20472: size_t len; 20472: 20472: 20472: 20472: char* scratch; 20472: 20472: 20472: 20472: Slice result; 20472: 20472: 20472: IOStatus status; 20472: }; 20472: 20472: 20472: class FSRandomAccessFile { 20472: public: 20472: FSRandomAccessFile() {} 20472: 20472: virtual ~FSRandomAccessFile() {} 20472: # 631 "./include/rocksdb/file_system.h" 20472: virtual IOStatus Read(uint64_t offset, size_t n, const IOOptions& options, 20472: Slice* result, char* scratch, 20472: IODebugContext* dbg) const = 0; 20472: 20472: 20472: virtual IOStatus Prefetch(uint64_t , size_t , 20472: const IOOptions& , 20472: IODebugContext* ) { 20472: return IOStatus::OK(); 20472: } 20472: # 649 "./include/rocksdb/file_system.h" 20472: virtual IOStatus MultiRead(FSReadRequest* reqs, size_t num_reqs, 20472: const IOOptions& options, IODebugContext* dbg) { 20472: 20472: # 651 "./include/rocksdb/file_system.h" 3 4 20472: (static_cast ( 20472: # 651 "./include/rocksdb/file_system.h" 20472: reqs != nullptr 20472: # 651 "./include/rocksdb/file_system.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 651 "./include/rocksdb/file_system.h" 20472: "reqs != nullptr" 20472: # 651 "./include/rocksdb/file_system.h" 3 4 20472: , "./include/rocksdb/file_system.h", 651, __extension__ __PRETTY_FUNCTION__)) 20472: # 651 "./include/rocksdb/file_system.h" 20472: ; 20472: for (size_t i = 0; i < num_reqs; ++i) { 20472: FSReadRequest& req = reqs[i]; 20472: req.status = 20472: Read(req.offset, req.len, options, &req.result, req.scratch, dbg); 20472: } 20472: return IOStatus::OK(); 20472: } 20472: # 675 "./include/rocksdb/file_system.h" 20472: virtual size_t GetUniqueId(char* , size_t ) const { 20472: return 0; 20472: 20472: }; 20472: 20472: enum AccessPattern { kNormal, kRandom, kSequential, kWillNeed, kWontNeed }; 20472: 20472: virtual void Hint(AccessPattern ) {} 20472: 20472: 20472: 20472: virtual bool use_direct_io() const { return false; } 20472: 20472: 20472: 20472: virtual size_t GetRequiredBufferAlignment() const { return kDefaultPageSize; } 20472: 20472: 20472: 20472: 20472: virtual IOStatus InvalidateCache(size_t , size_t ) { 20472: return IOStatus::NotSupported("InvalidateCache not supported."); 20472: } 20472: 20472: 20472: 20472: }; 20472: 20472: 20472: 20472: 20472: class FSWritableFile { 20472: public: 20472: FSWritableFile() 20472: : last_preallocated_block_(0), 20472: preallocation_block_size_(0), 20472: io_priority_(Env::IO_TOTAL), 20472: write_hint_(Env::WLTH_NOT_SET), 20472: strict_bytes_per_sync_(false) {} 20472: 20472: explicit FSWritableFile(const FileOptions& options) 20472: : last_preallocated_block_(0), 20472: preallocation_block_size_(0), 20472: io_priority_(Env::IO_TOTAL), 20472: write_hint_(Env::WLTH_NOT_SET), 20472: strict_bytes_per_sync_(options.strict_bytes_per_sync) {} 20472: 20472: virtual ~FSWritableFile() {} 20472: 20472: 20472: 20472: 20472: virtual IOStatus Append(const Slice& data, const IOOptions& options, 20472: IODebugContext* dbg) = 0; 20472: # 750 "./include/rocksdb/file_system.h" 20472: virtual IOStatus PositionedAppend(const Slice& , 20472: uint64_t , 20472: const IOOptions& , 20472: IODebugContext* ) { 20472: return IOStatus::NotSupported(); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: virtual IOStatus Truncate(uint64_t , const IOOptions& , 20472: IODebugContext* ) { 20472: return IOStatus::OK(); 20472: } 20472: virtual IOStatus Close(const IOOptions& options, IODebugContext* dbg) = 0; 20472: virtual IOStatus Flush(const IOOptions& options, IODebugContext* dbg) = 0; 20472: virtual IOStatus Sync(const IOOptions& options, 20472: IODebugContext* dbg) = 0; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual IOStatus Fsync(const IOOptions& options, IODebugContext* dbg) { 20472: return Sync(options, dbg); 20472: } 20472: 20472: 20472: 20472: virtual bool IsSyncThreadSafe() const { return false; } 20472: 20472: 20472: 20472: virtual bool use_direct_io() const { return false; } 20472: 20472: 20472: 20472: virtual size_t GetRequiredBufferAlignment() const { return kDefaultPageSize; } 20472: 20472: virtual void SetWriteLifeTimeHint(Env::WriteLifeTimeHint hint) { 20472: write_hint_ = hint; 20472: } 20472: 20472: virtual void SetIOPriority(Env::IOPriority pri) { io_priority_ = pri; } 20472: 20472: virtual Env::IOPriority GetIOPriority() { return io_priority_; } 20472: 20472: virtual Env::WriteLifeTimeHint GetWriteLifeTimeHint() { return write_hint_; } 20472: 20472: 20472: 20472: virtual uint64_t GetFileSize(const IOOptions& , 20472: IODebugContext* ) { 20472: return 0; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual void SetPreallocationBlockSize(size_t size) { 20472: preallocation_block_size_ = size; 20472: } 20472: 20472: virtual void GetPreallocationStatus(size_t* block_size, 20472: size_t* last_allocated_block) { 20472: *last_allocated_block = last_preallocated_block_; 20472: *block_size = preallocation_block_size_; 20472: } 20472: 20472: 20472: virtual size_t GetUniqueId(char* , size_t ) const { 20472: return 0; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: virtual IOStatus InvalidateCache(size_t , size_t ) { 20472: return IOStatus::NotSupported("InvalidateCache not supported."); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual IOStatus RangeSync(uint64_t , uint64_t , 20472: const IOOptions& options, IODebugContext* dbg) { 20472: if (strict_bytes_per_sync_) { 20472: return Sync(options, dbg); 20472: } 20472: return IOStatus::OK(); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual void PrepareWrite(size_t offset, size_t len, const IOOptions& options, 20472: IODebugContext* dbg) { 20472: if (preallocation_block_size_ == 0) { 20472: return; 20472: } 20472: 20472: 20472: 20472: const auto block_size = preallocation_block_size_; 20472: size_t new_last_preallocated_block = 20472: (offset + len + block_size - 1) / block_size; 20472: if (new_last_preallocated_block > last_preallocated_block_) { 20472: size_t num_spanned_blocks = 20472: new_last_preallocated_block - last_preallocated_block_; 20472: Allocate(block_size * last_preallocated_block_, 20472: block_size * num_spanned_blocks, options, dbg); 20472: last_preallocated_block_ = new_last_preallocated_block; 20472: } 20472: } 20472: 20472: 20472: virtual IOStatus Allocate(uint64_t , uint64_t , 20472: const IOOptions& , 20472: IODebugContext* ) { 20472: return IOStatus::OK(); 20472: } 20472: 20472: 20472: 20472: 20472: protected: 20472: size_t preallocation_block_size() { return preallocation_block_size_; } 20472: 20472: private: 20472: size_t last_preallocated_block_; 20472: size_t preallocation_block_size_; 20472: 20472: FSWritableFile(const FSWritableFile&); 20472: void operator=(const FSWritableFile&); 20472: 20472: protected: 20472: Env::IOPriority io_priority_; 20472: Env::WriteLifeTimeHint write_hint_; 20472: const bool strict_bytes_per_sync_; 20472: }; 20472: 20472: 20472: class FSRandomRWFile { 20472: public: 20472: FSRandomRWFile() {} 20472: 20472: virtual ~FSRandomRWFile() {} 20472: 20472: 20472: 20472: virtual bool use_direct_io() const { return false; } 20472: 20472: 20472: 20472: virtual size_t GetRequiredBufferAlignment() const { return kDefaultPageSize; } 20472: 20472: 20472: 20472: virtual IOStatus Write(uint64_t offset, const Slice& data, 20472: const IOOptions& options, IODebugContext* dbg) = 0; 20472: 20472: 20472: 20472: 20472: virtual IOStatus Read(uint64_t offset, size_t n, const IOOptions& options, 20472: Slice* result, char* scratch, 20472: IODebugContext* dbg) const = 0; 20472: 20472: virtual IOStatus Flush(const IOOptions& options, IODebugContext* dbg) = 0; 20472: 20472: virtual IOStatus Sync(const IOOptions& options, IODebugContext* dbg) = 0; 20472: 20472: virtual IOStatus Fsync(const IOOptions& options, IODebugContext* dbg) { 20472: return Sync(options, dbg); 20472: } 20472: 20472: virtual IOStatus Close(const IOOptions& options, IODebugContext* dbg) = 0; 20472: 20472: 20472: 20472: 20472: 20472: FSRandomRWFile(const RandomRWFile&) = delete; 20472: FSRandomRWFile& operator=(const RandomRWFile&) = delete; 20472: }; 20472: 20472: 20472: 20472: class FSMemoryMappedFileBuffer { 20472: public: 20472: FSMemoryMappedFileBuffer(void* _base, size_t _length) 20472: : base_(_base), length_(_length) {} 20472: 20472: virtual ~FSMemoryMappedFileBuffer() = 0; 20472: 20472: 20472: 20472: FSMemoryMappedFileBuffer(const FSMemoryMappedFileBuffer&) = delete; 20472: FSMemoryMappedFileBuffer& operator=(const FSMemoryMappedFileBuffer&) = delete; 20472: 20472: void* GetBase() const { return base_; } 20472: size_t GetLen() const { return length_; } 20472: 20472: protected: 20472: void* base_; 20472: const size_t length_; 20472: }; 20472: 20472: 20472: 20472: class FSDirectory { 20472: public: 20472: virtual ~FSDirectory() {} 20472: 20472: virtual IOStatus Fsync(const IOOptions& options, IODebugContext* dbg) = 0; 20472: 20472: virtual size_t GetUniqueId(char* , size_t ) const { 20472: return 0; 20472: } 20472: 20472: 20472: 20472: }; 20472: # 1016 "./include/rocksdb/file_system.h" 20472: class FileSystemWrapper : public FileSystem { 20472: public: 20472: 20472: explicit FileSystemWrapper(std::shared_ptr t) : target_(t) {} 20472: ~FileSystemWrapper() override {} 20472: 20472: const char* Name() const override { return target_->Name(); } 20472: 20472: 20472: FileSystem* target() const { return target_.get(); } 20472: 20472: 20472: IOStatus NewSequentialFile(const std::string& f, 20472: const FileOptions& file_opts, 20472: std::unique_ptr* r, 20472: IODebugContext* dbg) override { 20472: return target_->NewSequentialFile(f, file_opts, r, dbg); 20472: } 20472: IOStatus NewRandomAccessFile(const std::string& f, 20472: const FileOptions& file_opts, 20472: std::unique_ptr* r, 20472: IODebugContext* dbg) override { 20472: return target_->NewRandomAccessFile(f, file_opts, r, dbg); 20472: } 20472: IOStatus NewWritableFile(const std::string& f, const FileOptions& file_opts, 20472: std::unique_ptr* r, 20472: IODebugContext* dbg) override { 20472: return target_->NewWritableFile(f, file_opts, r, dbg); 20472: } 20472: IOStatus ReopenWritableFile(const std::string& fname, 20472: const FileOptions& file_opts, 20472: std::unique_ptr* result, 20472: IODebugContext* dbg) override { 20472: return target_->ReopenWritableFile(fname, file_opts, result, dbg); 20472: } 20472: IOStatus ReuseWritableFile(const std::string& fname, 20472: const std::string& old_fname, 20472: const FileOptions& file_opts, 20472: std::unique_ptr* r, 20472: IODebugContext* dbg) override { 20472: return target_->ReuseWritableFile(fname, old_fname, file_opts, r, 20472: dbg); 20472: } 20472: IOStatus NewRandomRWFile(const std::string& fname, 20472: const FileOptions& file_opts, 20472: std::unique_ptr* result, 20472: IODebugContext* dbg) override { 20472: return target_->NewRandomRWFile(fname, file_opts, result, dbg); 20472: } 20472: IOStatus NewMemoryMappedFileBuffer( 20472: const std::string& fname, 20472: std::unique_ptr* result) override { 20472: return target_->NewMemoryMappedFileBuffer(fname, result); 20472: } 20472: IOStatus NewDirectory(const std::string& name, const IOOptions& io_opts, 20472: std::unique_ptr* result, 20472: IODebugContext* dbg) override { 20472: return target_->NewDirectory(name, io_opts, result, dbg); 20472: } 20472: IOStatus FileExists(const std::string& f, const IOOptions& io_opts, 20472: IODebugContext* dbg) override { 20472: return target_->FileExists(f, io_opts, dbg); 20472: } 20472: IOStatus GetChildren(const std::string& dir, const IOOptions& io_opts, 20472: std::vector* r, 20472: IODebugContext* dbg) override { 20472: return target_->GetChildren(dir, io_opts, r, dbg); 20472: } 20472: IOStatus GetChildrenFileAttributes(const std::string& dir, 20472: const IOOptions& options, 20472: std::vector* result, 20472: IODebugContext* dbg) override { 20472: return target_->GetChildrenFileAttributes(dir, options, result, dbg); 20472: } 20472: IOStatus DeleteFile(const std::string& f, const IOOptions& options, 20472: IODebugContext* dbg) override { 20472: return target_->DeleteFile(f, options, dbg); 20472: } 20472: IOStatus Truncate(const std::string& fname, size_t size, 20472: const IOOptions& options, IODebugContext* dbg) override { 20472: return target_->Truncate(fname, size, options, dbg); 20472: } 20472: IOStatus CreateDir(const std::string& d, const IOOptions& options, 20472: IODebugContext* dbg) override { 20472: return target_->CreateDir(d, options, dbg); 20472: } 20472: IOStatus CreateDirIfMissing(const std::string& d, const IOOptions& options, 20472: IODebugContext* dbg) override { 20472: return target_->CreateDirIfMissing(d, options, dbg); 20472: } 20472: IOStatus DeleteDir(const std::string& d, const IOOptions& options, 20472: IODebugContext* dbg) override { 20472: return target_->DeleteDir(d, options, dbg); 20472: } 20472: IOStatus GetFileSize(const std::string& f, const IOOptions& options, 20472: uint64_t* s, IODebugContext* dbg) override { 20472: return target_->GetFileSize(f, options, s, dbg); 20472: } 20472: 20472: IOStatus GetFileModificationTime(const std::string& fname, 20472: const IOOptions& options, 20472: uint64_t* file_mtime, 20472: IODebugContext* dbg) override { 20472: return target_->GetFileModificationTime(fname, options, file_mtime, dbg); 20472: } 20472: 20472: IOStatus GetAbsolutePath(const std::string& db_path, const IOOptions& options, 20472: std::string* output_path, 20472: IODebugContext* dbg) override { 20472: return target_->GetAbsolutePath(db_path, options, output_path, dbg); 20472: } 20472: 20472: IOStatus RenameFile(const std::string& s, const std::string& t, 20472: const IOOptions& options, IODebugContext* dbg) override { 20472: return target_->RenameFile(s, t, options, dbg); 20472: } 20472: 20472: IOStatus LinkFile(const std::string& s, const std::string& t, 20472: const IOOptions& options, IODebugContext* dbg) override { 20472: return target_->LinkFile(s, t, options, dbg); 20472: } 20472: 20472: IOStatus NumFileLinks(const std::string& fname, const IOOptions& options, 20472: uint64_t* count, IODebugContext* dbg) override { 20472: return target_->NumFileLinks(fname, options, count, dbg); 20472: } 20472: 20472: IOStatus AreFilesSame(const std::string& first, const std::string& second, 20472: const IOOptions& options, bool* res, 20472: IODebugContext* dbg) override { 20472: return target_->AreFilesSame(first, second, options, res, dbg); 20472: } 20472: 20472: IOStatus LockFile(const std::string& f, const IOOptions& options, 20472: FileLock** l, IODebugContext* dbg) override { 20472: return target_->LockFile(f, options, l, dbg); 20472: } 20472: 20472: IOStatus UnlockFile(FileLock* l, const IOOptions& options, 20472: IODebugContext* dbg) override { 20472: return target_->UnlockFile(l, options, dbg); 20472: } 20472: 20472: IOStatus GetTestDirectory(const IOOptions& options, std::string* path, 20472: IODebugContext* dbg) override { 20472: return target_->GetTestDirectory(options, path, dbg); 20472: } 20472: IOStatus NewLogger(const std::string& fname, const IOOptions& options, 20472: std::shared_ptr* result, 20472: IODebugContext* dbg) override { 20472: return target_->NewLogger(fname, options, result, dbg); 20472: } 20472: 20472: void SanitizeFileOptions(FileOptions* opts) const override { 20472: target_->SanitizeFileOptions(opts); 20472: } 20472: 20472: FileOptions OptimizeForLogRead( 20472: const FileOptions& file_options) const override { 20472: return target_->OptimizeForLogRead(file_options); 20472: } 20472: FileOptions OptimizeForManifestRead( 20472: const FileOptions& file_options) const override { 20472: return target_->OptimizeForManifestRead(file_options); 20472: } 20472: FileOptions OptimizeForLogWrite(const FileOptions& file_options, 20472: const DBOptions& db_options) const override { 20472: return target_->OptimizeForLogWrite(file_options, db_options); 20472: } 20472: FileOptions OptimizeForManifestWrite( 20472: const FileOptions& file_options) const override { 20472: return target_->OptimizeForManifestWrite(file_options); 20472: } 20472: FileOptions OptimizeForCompactionTableWrite( 20472: const FileOptions& file_options, 20472: const ImmutableDBOptions& immutable_ops) const override { 20472: return target_->OptimizeForCompactionTableWrite(file_options, 20472: immutable_ops); 20472: } 20472: FileOptions OptimizeForCompactionTableRead( 20472: const FileOptions& file_options, 20472: const ImmutableDBOptions& db_options) const override { 20472: return target_->OptimizeForCompactionTableRead(file_options, db_options); 20472: } 20472: IOStatus GetFreeSpace(const std::string& path, const IOOptions& options, 20472: uint64_t* diskfree, IODebugContext* dbg) override { 20472: return target_->GetFreeSpace(path, options, diskfree, dbg); 20472: } 20472: IOStatus IsDirectory(const std::string& path, const IOOptions& options, 20472: bool* is_dir, IODebugContext* dbg) override { 20472: return target_->IsDirectory(path, options, is_dir, dbg); 20472: } 20472: 20472: private: 20472: std::shared_ptr target_; 20472: }; 20472: 20472: class FSSequentialFileWrapper : public FSSequentialFile { 20472: public: 20472: explicit FSSequentialFileWrapper(FSSequentialFile* target) 20472: : target_(target) {} 20472: 20472: IOStatus Read(size_t n, const IOOptions& options, Slice* result, 20472: char* scratch, IODebugContext* dbg) override { 20472: return target_->Read(n, options, result, scratch, dbg); 20472: } 20472: IOStatus Skip(uint64_t n) override { return target_->Skip(n); } 20472: bool use_direct_io() const override { return target_->use_direct_io(); } 20472: size_t GetRequiredBufferAlignment() const override { 20472: return target_->GetRequiredBufferAlignment(); 20472: } 20472: IOStatus InvalidateCache(size_t offset, size_t length) override { 20472: return target_->InvalidateCache(offset, length); 20472: } 20472: IOStatus PositionedRead(uint64_t offset, size_t n, const IOOptions& options, 20472: Slice* result, char* scratch, 20472: IODebugContext* dbg) override { 20472: return target_->PositionedRead(offset, n, options, result, scratch, dbg); 20472: } 20472: 20472: private: 20472: FSSequentialFile* target_; 20472: }; 20472: 20472: class FSRandomAccessFileWrapper : public FSRandomAccessFile { 20472: public: 20472: explicit FSRandomAccessFileWrapper(FSRandomAccessFile* target) 20472: : target_(target) {} 20472: 20472: IOStatus Read(uint64_t offset, size_t n, const IOOptions& options, 20472: Slice* result, char* scratch, 20472: IODebugContext* dbg) const override { 20472: return target_->Read(offset, n, options, result, scratch, dbg); 20472: } 20472: IOStatus MultiRead(FSReadRequest* reqs, size_t num_reqs, 20472: const IOOptions& options, IODebugContext* dbg) override { 20472: return target_->MultiRead(reqs, num_reqs, options, dbg); 20472: } 20472: IOStatus Prefetch(uint64_t offset, size_t n, const IOOptions& options, 20472: IODebugContext* dbg) override { 20472: return target_->Prefetch(offset, n, options, dbg); 20472: } 20472: size_t GetUniqueId(char* id, size_t max_size) const override { 20472: return target_->GetUniqueId(id, max_size); 20472: }; 20472: void Hint(AccessPattern pattern) override { target_->Hint(pattern); } 20472: bool use_direct_io() const override { return target_->use_direct_io(); } 20472: size_t GetRequiredBufferAlignment() const override { 20472: return target_->GetRequiredBufferAlignment(); 20472: } 20472: IOStatus InvalidateCache(size_t offset, size_t length) override { 20472: return target_->InvalidateCache(offset, length); 20472: } 20472: 20472: private: 20472: FSRandomAccessFile* target_; 20472: }; 20472: 20472: class FSWritableFileWrapper : public FSWritableFile { 20472: public: 20472: explicit FSWritableFileWrapper(FSWritableFile* t) : target_(t) {} 20472: 20472: IOStatus Append(const Slice& data, const IOOptions& options, 20472: IODebugContext* dbg) override { 20472: return target_->Append(data, options, dbg); 20472: } 20472: IOStatus PositionedAppend(const Slice& data, uint64_t offset, 20472: const IOOptions& options, 20472: IODebugContext* dbg) override { 20472: return target_->PositionedAppend(data, offset, options, dbg); 20472: } 20472: IOStatus Truncate(uint64_t size, const IOOptions& options, 20472: IODebugContext* dbg) override { 20472: return target_->Truncate(size, options, dbg); 20472: } 20472: IOStatus Close(const IOOptions& options, IODebugContext* dbg) override { 20472: return target_->Close(options, dbg); 20472: } 20472: IOStatus Flush(const IOOptions& options, IODebugContext* dbg) override { 20472: return target_->Flush(options, dbg); 20472: } 20472: IOStatus Sync(const IOOptions& options, IODebugContext* dbg) override { 20472: return target_->Sync(options, dbg); 20472: } 20472: IOStatus Fsync(const IOOptions& options, IODebugContext* dbg) override { 20472: return target_->Fsync(options, dbg); 20472: } 20472: bool IsSyncThreadSafe() const override { return target_->IsSyncThreadSafe(); } 20472: 20472: bool use_direct_io() const override { return target_->use_direct_io(); } 20472: 20472: size_t GetRequiredBufferAlignment() const override { 20472: return target_->GetRequiredBufferAlignment(); 20472: } 20472: 20472: void SetWriteLifeTimeHint(Env::WriteLifeTimeHint hint) override { 20472: target_->SetWriteLifeTimeHint(hint); 20472: } 20472: 20472: Env::WriteLifeTimeHint GetWriteLifeTimeHint() override { 20472: return target_->GetWriteLifeTimeHint(); 20472: } 20472: 20472: uint64_t GetFileSize(const IOOptions& options, IODebugContext* dbg) override { 20472: return target_->GetFileSize(options, dbg); 20472: } 20472: 20472: void SetPreallocationBlockSize(size_t size) override { 20472: target_->SetPreallocationBlockSize(size); 20472: } 20472: 20472: void GetPreallocationStatus(size_t* block_size, 20472: size_t* last_allocated_block) override { 20472: target_->GetPreallocationStatus(block_size, last_allocated_block); 20472: } 20472: 20472: size_t GetUniqueId(char* id, size_t max_size) const override { 20472: return target_->GetUniqueId(id, max_size); 20472: } 20472: 20472: IOStatus InvalidateCache(size_t offset, size_t length) override { 20472: return target_->InvalidateCache(offset, length); 20472: } 20472: 20472: IOStatus RangeSync(uint64_t offset, uint64_t nbytes, const IOOptions& options, 20472: IODebugContext* dbg) override { 20472: return target_->RangeSync(offset, nbytes, options, dbg); 20472: } 20472: 20472: void PrepareWrite(size_t offset, size_t len, const IOOptions& options, 20472: IODebugContext* dbg) override { 20472: target_->PrepareWrite(offset, len, options, dbg); 20472: } 20472: 20472: IOStatus Allocate(uint64_t offset, uint64_t len, const IOOptions& options, 20472: IODebugContext* dbg) override { 20472: return target_->Allocate(offset, len, options, dbg); 20472: } 20472: 20472: private: 20472: FSWritableFile* target_; 20472: }; 20472: 20472: class FSRandomRWFileWrapper : public FSRandomRWFile { 20472: public: 20472: explicit FSRandomRWFileWrapper(FSRandomRWFile* target) : target_(target) {} 20472: 20472: bool use_direct_io() const override { return target_->use_direct_io(); } 20472: size_t GetRequiredBufferAlignment() const override { 20472: return target_->GetRequiredBufferAlignment(); 20472: } 20472: IOStatus Write(uint64_t offset, const Slice& data, const IOOptions& options, 20472: IODebugContext* dbg) override { 20472: return target_->Write(offset, data, options, dbg); 20472: } 20472: IOStatus Read(uint64_t offset, size_t n, const IOOptions& options, 20472: Slice* result, char* scratch, 20472: IODebugContext* dbg) const override { 20472: return target_->Read(offset, n, options, result, scratch, dbg); 20472: } 20472: IOStatus Flush(const IOOptions& options, IODebugContext* dbg) override { 20472: return target_->Flush(options, dbg); 20472: } 20472: IOStatus Sync(const IOOptions& options, IODebugContext* dbg) override { 20472: return target_->Sync(options, dbg); 20472: } 20472: IOStatus Fsync(const IOOptions& options, IODebugContext* dbg) override { 20472: return target_->Fsync(options, dbg); 20472: } 20472: IOStatus Close(const IOOptions& options, IODebugContext* dbg) override { 20472: return target_->Close(options, dbg); 20472: } 20472: 20472: private: 20472: FSRandomRWFile* target_; 20472: }; 20472: 20472: class FSDirectoryWrapper : public FSDirectory { 20472: public: 20472: explicit FSDirectoryWrapper(FSDirectory* target) : target_(target) {} 20472: 20472: IOStatus Fsync(const IOOptions& options, IODebugContext* dbg) override { 20472: return target_->Fsync(options, dbg); 20472: } 20472: size_t GetUniqueId(char* id, size_t max_size) const override { 20472: return target_->GetUniqueId(id, max_size); 20472: } 20472: 20472: private: 20472: FSDirectory* target_; 20472: }; 20472: 20472: 20472: extern IOStatus WriteStringToFile(FileSystem* fs, const Slice& data, 20472: const std::string& fname, 20472: bool should_sync = false); 20472: 20472: 20472: extern IOStatus ReadFileToString(FileSystem* fs, const std::string& fname, 20472: std::string* data); 20472: 20472: } 20472: # 17 "./file/random_access_file_reader.h" 2 20472: 20472: # 1 "./include/rocksdb/rate_limiter.h" 1 20472: # 10 "./include/rocksdb/rate_limiter.h" 20472: 20472: 20472: 20472: 20472: 20472: namespace rocksdb { 20472: 20472: class RateLimiter { 20472: public: 20472: enum class OpType { 20472: 20472: 20472: kRead, 20472: kWrite, 20472: }; 20472: enum class Mode { 20472: kReadsOnly, 20472: kWritesOnly, 20472: kAllIo, 20472: }; 20472: 20472: 20472: explicit RateLimiter(Mode mode = Mode::kWritesOnly) : mode_(mode) {} 20472: 20472: virtual ~RateLimiter() {} 20472: 20472: 20472: 20472: virtual void SetBytesPerSecond(int64_t bytes_per_second) = 0; 20472: # 48 "./include/rocksdb/rate_limiter.h" 20472: virtual void Request(const int64_t , const Env::IOPriority ) { 20472: 20472: # 49 "./include/rocksdb/rate_limiter.h" 3 4 20472: (static_cast ( 20472: # 49 "./include/rocksdb/rate_limiter.h" 20472: false 20472: # 49 "./include/rocksdb/rate_limiter.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 49 "./include/rocksdb/rate_limiter.h" 20472: "false" 20472: # 49 "./include/rocksdb/rate_limiter.h" 3 4 20472: , "./include/rocksdb/rate_limiter.h", 49, __extension__ __PRETTY_FUNCTION__)) 20472: # 49 "./include/rocksdb/rate_limiter.h" 20472: ; 20472: } 20472: 20472: 20472: 20472: 20472: virtual void Request(const int64_t bytes, const Env::IOPriority pri, 20472: Statistics* ) { 20472: 20472: 20472: Request(bytes, pri); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: virtual void Request(const int64_t bytes, const Env::IOPriority pri, 20472: Statistics* stats, OpType op_type) { 20472: if (IsRateLimited(op_type)) { 20472: Request(bytes, pri, stats); 20472: } 20472: } 20472: 20472: 20472: 20472: 20472: 20472: virtual size_t RequestToken(size_t bytes, size_t alignment, 20472: Env::IOPriority io_priority, Statistics* stats, 20472: RateLimiter::OpType op_type); 20472: 20472: 20472: virtual int64_t GetSingleBurstBytes() const = 0; 20472: 20472: 20472: virtual int64_t GetTotalBytesThrough( 20472: const Env::IOPriority pri = Env::IO_TOTAL) const = 0; 20472: 20472: 20472: virtual int64_t GetTotalRequests( 20472: const Env::IOPriority pri = Env::IO_TOTAL) const = 0; 20472: 20472: virtual int64_t GetBytesPerSecond() const = 0; 20472: 20472: virtual bool IsRateLimited(OpType op_type) { 20472: if ((mode_ == RateLimiter::Mode::kWritesOnly && 20472: op_type == RateLimiter::OpType::kRead) || 20472: (mode_ == RateLimiter::Mode::kReadsOnly && 20472: op_type == RateLimiter::OpType::kWrite)) { 20472: return false; 20472: } 20472: return true; 20472: } 20472: 20472: protected: 20472: Mode GetMode() { return mode_; } 20472: 20472: private: 20472: const Mode mode_; 20472: }; 20472: # 133 "./include/rocksdb/rate_limiter.h" 20472: extern RateLimiter* NewGenericRateLimiter( 20472: int64_t rate_bytes_per_sec, int64_t refill_period_us = 100 * 1000, 20472: int32_t fairness = 10, 20472: RateLimiter::Mode mode = RateLimiter::Mode::kWritesOnly, 20472: bool auto_tuned = false); 20472: 20472: } 20472: # 19 "./file/random_access_file_reader.h" 2 20472: # 1 "./util/aligned_buffer.h" 1 20472: # 9 "./util/aligned_buffer.h" 20472: 20472: 20472: 20472: 20472: 20472: namespace rocksdb { 20472: # 23 "./util/aligned_buffer.h" 20472: inline size_t TruncateToPageBoundary(size_t page_size, size_t s) { 20472: s -= (s & (page_size - 1)); 20472: 20472: # 25 "./util/aligned_buffer.h" 3 4 20472: (static_cast ( 20472: # 25 "./util/aligned_buffer.h" 20472: (s % page_size) == 0 20472: # 25 "./util/aligned_buffer.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 25 "./util/aligned_buffer.h" 20472: "(s % page_size) == 0" 20472: # 25 "./util/aligned_buffer.h" 3 4 20472: , "./util/aligned_buffer.h", 25, __extension__ __PRETTY_FUNCTION__)) 20472: # 25 "./util/aligned_buffer.h" 20472: ; 20472: return s; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: inline size_t Roundup(size_t x, size_t y) { 20472: return ((x + y - 1) / y) * y; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: inline size_t Rounddown(size_t x, size_t y) { return (x / y) * y; } 20472: # 57 "./util/aligned_buffer.h" 20472: class AlignedBuffer { 20472: size_t alignment_; 20472: std::unique_ptr buf_; 20472: size_t capacity_; 20472: size_t cursize_; 20472: char* bufstart_; 20472: 20472: public: 20472: AlignedBuffer() 20472: : alignment_(), 20472: capacity_(0), 20472: cursize_(0), 20472: bufstart_(nullptr) { 20472: } 20472: 20472: AlignedBuffer(AlignedBuffer&& o) noexcept { 20472: *this = std::move(o); 20472: } 20472: 20472: AlignedBuffer& operator=(AlignedBuffer&& o) noexcept { 20472: alignment_ = std::move(o.alignment_); 20472: buf_ = std::move(o.buf_); 20472: capacity_ = std::move(o.capacity_); 20472: cursize_ = std::move(o.cursize_); 20472: bufstart_ = std::move(o.bufstart_); 20472: return *this; 20472: } 20472: 20472: AlignedBuffer(const AlignedBuffer&) = delete; 20472: 20472: AlignedBuffer& operator=(const AlignedBuffer&) = delete; 20472: 20472: static bool isAligned(const void* ptr, size_t alignment) { 20472: return reinterpret_cast(ptr) % alignment == 0; 20472: } 20472: 20472: static bool isAligned(size_t n, size_t alignment) { 20472: return n % alignment == 0; 20472: } 20472: 20472: size_t Alignment() const { 20472: return alignment_; 20472: } 20472: 20472: size_t Capacity() const { 20472: return capacity_; 20472: } 20472: 20472: size_t CurrentSize() const { 20472: return cursize_; 20472: } 20472: 20472: const char* BufferStart() const { 20472: return bufstart_; 20472: } 20472: 20472: char* BufferStart() { return bufstart_; } 20472: 20472: void Clear() { 20472: cursize_ = 0; 20472: } 20472: 20472: char* Release() { 20472: cursize_ = 0; 20472: capacity_ = 0; 20472: bufstart_ = nullptr; 20472: return buf_.release(); 20472: } 20472: 20472: void Alignment(size_t alignment) { 20472: 20472: # 127 "./util/aligned_buffer.h" 3 4 20472: (static_cast ( 20472: # 127 "./util/aligned_buffer.h" 20472: alignment > 0 20472: # 127 "./util/aligned_buffer.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 127 "./util/aligned_buffer.h" 20472: "alignment > 0" 20472: # 127 "./util/aligned_buffer.h" 3 4 20472: , "./util/aligned_buffer.h", 127, __extension__ __PRETTY_FUNCTION__)) 20472: # 127 "./util/aligned_buffer.h" 20472: ; 20472: 20472: # 128 "./util/aligned_buffer.h" 3 4 20472: (static_cast ( 20472: # 128 "./util/aligned_buffer.h" 20472: (alignment & (alignment - 1)) == 0 20472: # 128 "./util/aligned_buffer.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 128 "./util/aligned_buffer.h" 20472: "(alignment & (alignment - 1)) == 0" 20472: # 128 "./util/aligned_buffer.h" 3 4 20472: , "./util/aligned_buffer.h", 128, __extension__ __PRETTY_FUNCTION__)) 20472: # 128 "./util/aligned_buffer.h" 20472: ; 20472: alignment_ = alignment; 20472: } 20472: # 147 "./util/aligned_buffer.h" 20472: void AllocateNewBuffer(size_t requested_capacity, bool copy_data = false, 20472: uint64_t copy_offset = 0, size_t copy_len = 0) { 20472: 20472: # 149 "./util/aligned_buffer.h" 3 4 20472: (static_cast ( 20472: # 149 "./util/aligned_buffer.h" 20472: alignment_ > 0 20472: # 149 "./util/aligned_buffer.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 149 "./util/aligned_buffer.h" 20472: "alignment_ > 0" 20472: # 149 "./util/aligned_buffer.h" 3 4 20472: , "./util/aligned_buffer.h", 149, __extension__ __PRETTY_FUNCTION__)) 20472: # 149 "./util/aligned_buffer.h" 20472: ; 20472: 20472: # 150 "./util/aligned_buffer.h" 3 4 20472: (static_cast ( 20472: # 150 "./util/aligned_buffer.h" 20472: (alignment_ & (alignment_ - 1)) == 0 20472: # 150 "./util/aligned_buffer.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 150 "./util/aligned_buffer.h" 20472: "(alignment_ & (alignment_ - 1)) == 0" 20472: # 150 "./util/aligned_buffer.h" 3 4 20472: , "./util/aligned_buffer.h", 150, __extension__ __PRETTY_FUNCTION__)) 20472: # 150 "./util/aligned_buffer.h" 20472: ; 20472: 20472: copy_len = copy_len > 0 ? copy_len : cursize_; 20472: if (copy_data && requested_capacity < copy_len) { 20472: 20472: 20472: return; 20472: } 20472: 20472: size_t new_capacity = Roundup(requested_capacity, alignment_); 20472: char* new_buf = new char[new_capacity + alignment_]; 20472: char* new_bufstart = reinterpret_cast( 20472: (reinterpret_cast(new_buf) + (alignment_ - 1)) & 20472: ~static_cast(alignment_ - 1)); 20472: 20472: if (copy_data) { 20472: 20472: # 166 "./util/aligned_buffer.h" 3 4 20472: (static_cast ( 20472: # 166 "./util/aligned_buffer.h" 20472: bufstart_ + copy_offset + copy_len <= bufstart_ + cursize_ 20472: # 166 "./util/aligned_buffer.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 166 "./util/aligned_buffer.h" 20472: "bufstart_ + copy_offset + copy_len <= bufstart_ + cursize_" 20472: # 166 "./util/aligned_buffer.h" 3 4 20472: , "./util/aligned_buffer.h", 166, __extension__ __PRETTY_FUNCTION__)) 20472: # 166 "./util/aligned_buffer.h" 20472: ; 20472: memcpy(new_bufstart, bufstart_ + copy_offset, copy_len); 20472: cursize_ = copy_len; 20472: } else { 20472: cursize_ = 0; 20472: } 20472: 20472: bufstart_ = new_bufstart; 20472: capacity_ = new_capacity; 20472: buf_.reset(new_buf); 20472: } 20472: # 186 "./util/aligned_buffer.h" 20472: size_t Append(const char* src, size_t append_size) { 20472: size_t buffer_remaining = capacity_ - cursize_; 20472: size_t to_copy = std::min(append_size, buffer_remaining); 20472: 20472: if (to_copy > 0) { 20472: memcpy(bufstart_ + cursize_, src, to_copy); 20472: cursize_ += to_copy; 20472: } 20472: return to_copy; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: size_t Read(char* dest, size_t offset, size_t read_size) const { 20472: 20472: # 204 "./util/aligned_buffer.h" 3 4 20472: (static_cast ( 20472: # 204 "./util/aligned_buffer.h" 20472: offset < cursize_ 20472: # 204 "./util/aligned_buffer.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 204 "./util/aligned_buffer.h" 20472: "offset < cursize_" 20472: # 204 "./util/aligned_buffer.h" 3 4 20472: , "./util/aligned_buffer.h", 204, __extension__ __PRETTY_FUNCTION__)) 20472: # 204 "./util/aligned_buffer.h" 20472: ; 20472: 20472: size_t to_read = 0; 20472: if(offset < cursize_) { 20472: to_read = std::min(cursize_ - offset, read_size); 20472: } 20472: if (to_read > 0) { 20472: memcpy(dest, bufstart_ + offset, to_read); 20472: } 20472: return to_read; 20472: } 20472: 20472: 20472: void PadToAlignmentWith(int padding) { 20472: size_t total_size = Roundup(cursize_, alignment_); 20472: size_t pad_size = total_size - cursize_; 20472: 20472: if (pad_size > 0) { 20472: 20472: # 222 "./util/aligned_buffer.h" 3 4 20472: (static_cast ( 20472: # 222 "./util/aligned_buffer.h" 20472: (pad_size + cursize_) <= capacity_ 20472: # 222 "./util/aligned_buffer.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 222 "./util/aligned_buffer.h" 20472: "(pad_size + cursize_) <= capacity_" 20472: # 222 "./util/aligned_buffer.h" 3 4 20472: , "./util/aligned_buffer.h", 222, __extension__ __PRETTY_FUNCTION__)) 20472: # 222 "./util/aligned_buffer.h" 20472: ; 20472: memset(bufstart_ + cursize_, padding, pad_size); 20472: cursize_ += pad_size; 20472: } 20472: } 20472: 20472: void PadWith(size_t pad_size, int padding) { 20472: 20472: # 229 "./util/aligned_buffer.h" 3 4 20472: (static_cast ( 20472: # 229 "./util/aligned_buffer.h" 20472: (pad_size + cursize_) <= capacity_ 20472: # 229 "./util/aligned_buffer.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 229 "./util/aligned_buffer.h" 20472: "(pad_size + cursize_) <= capacity_" 20472: # 229 "./util/aligned_buffer.h" 3 4 20472: , "./util/aligned_buffer.h", 229, __extension__ __PRETTY_FUNCTION__)) 20472: # 229 "./util/aligned_buffer.h" 20472: ; 20472: memset(bufstart_ + cursize_, padding, pad_size); 20472: cursize_ += pad_size; 20472: } 20472: 20472: 20472: void RefitTail(size_t tail_offset, size_t tail_size) { 20472: if (tail_size > 0) { 20472: memmove(bufstart_, bufstart_ + tail_offset, tail_size); 20472: } 20472: cursize_ = tail_size; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: char* Destination() { 20472: return bufstart_ + cursize_; 20472: } 20472: 20472: void Size(size_t cursize) { 20472: cursize_ = cursize; 20472: } 20472: }; 20472: } 20472: # 20 "./file/random_access_file_reader.h" 2 20472: 20472: namespace rocksdb { 20472: class Statistics; 20472: class HistogramImpl; 20472: 20472: using AlignedBuf = std::unique_ptr; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: class RandomAccessFileReader { 20472: private: 20472: 20472: void NotifyOnFileReadFinish(uint64_t offset, size_t length, 20472: const FileOperationInfo::TimePoint& start_ts, 20472: const FileOperationInfo::TimePoint& finish_ts, 20472: const Status& status) const { 20472: FileOperationInfo info(file_name_, start_ts, finish_ts); 20472: info.offset = offset; 20472: info.length = length; 20472: info.status = status; 20472: 20472: for (auto& listener : listeners_) { 20472: listener->OnFileReadFinish(info); 20472: } 20472: } 20472: 20472: 20472: bool ShouldNotifyListeners() const { return !listeners_.empty(); } 20472: 20472: std::unique_ptr file_; 20472: std::string file_name_; 20472: Env* env_; 20472: Statistics* stats_; 20472: uint32_t hist_type_; 20472: HistogramImpl* file_read_hist_; 20472: RateLimiter* rate_limiter_; 20472: std::vector> listeners_; 20472: 20472: public: 20472: explicit RandomAccessFileReader( 20472: std::unique_ptr&& raf, const std::string& _file_name, 20472: Env* _env = nullptr, Statistics* stats = nullptr, uint32_t hist_type = 0, 20472: HistogramImpl* file_read_hist = nullptr, 20472: RateLimiter* rate_limiter = nullptr, 20472: const std::vector>& listeners = {}) 20472: : file_(std::move(raf)), 20472: file_name_(std::move(_file_name)), 20472: env_(_env), 20472: stats_(stats), 20472: hist_type_(hist_type), 20472: file_read_hist_(file_read_hist), 20472: rate_limiter_(rate_limiter), 20472: listeners_() { 20472: 20472: std::for_each(listeners.begin(), listeners.end(), 20472: [this](const std::shared_ptr& e) { 20472: if (e->ShouldBeNotifiedOnFileIO()) { 20472: listeners_.emplace_back(e); 20472: } 20472: }); 20472: 20472: 20472: 20472: } 20472: 20472: RandomAccessFileReader(RandomAccessFileReader&& o) noexcept { 20472: *this = std::move(o); 20472: } 20472: 20472: RandomAccessFileReader& operator=(RandomAccessFileReader&& o) 20472: noexcept { 20472: file_ = std::move(o.file_); 20472: env_ = std::move(o.env_); 20472: stats_ = std::move(o.stats_); 20472: hist_type_ = std::move(o.hist_type_); 20472: file_read_hist_ = std::move(o.file_read_hist_); 20472: rate_limiter_ = std::move(o.rate_limiter_); 20472: return *this; 20472: } 20472: 20472: RandomAccessFileReader(const RandomAccessFileReader&) = delete; 20472: RandomAccessFileReader& operator=(const RandomAccessFileReader&) = delete; 20472: # 117 "./file/random_access_file_reader.h" 20472: Status Read(const IOOptions& opts, uint64_t offset, size_t n, Slice* result, 20472: char* scratch, AlignedBuf* aligned_buf, 20472: bool for_compaction = false) const; 20472: 20472: 20472: 20472: 20472: 20472: 20472: Status MultiRead(const IOOptions& opts, FSReadRequest* reqs, size_t num_reqs, 20472: AlignedBuf* aligned_buf) const; 20472: 20472: Status Prefetch(uint64_t offset, size_t n) const { 20472: return file_->Prefetch(offset, n, IOOptions(), nullptr); 20472: } 20472: 20472: FSRandomAccessFile* file() { return file_.get(); } 20472: 20472: std::string file_name() const { return file_name_; } 20472: 20472: bool use_direct_io() const { return file_->use_direct_io(); } 20472: 20472: Env* env() const { return env_; } 20472: }; 20472: } 20472: # 15 "./file/file_prefetch_buffer.h" 2 20472: 20472: 20472: 20472: 20472: namespace rocksdb { 20472: 20472: 20472: class FilePrefetchBuffer { 20472: public: 20472: # 46 "./file/file_prefetch_buffer.h" 20472: FilePrefetchBuffer(RandomAccessFileReader* file_reader = nullptr, 20472: size_t readadhead_size = 0, size_t max_readahead_size = 0, 20472: bool enable = true, bool track_min_offset = false) 20472: : buffer_offset_(0), 20472: file_reader_(file_reader), 20472: readahead_size_(readadhead_size), 20472: max_readahead_size_(max_readahead_size), 20472: min_offset_read_(port::kMaxSizet), 20472: enable_(enable), 20472: track_min_offset_(track_min_offset) {} 20472: 20472: 20472: 20472: 20472: 20472: 20472: Status Prefetch(RandomAccessFileReader* reader, uint64_t offset, size_t n, 20472: bool for_compaction = false); 20472: # 75 "./file/file_prefetch_buffer.h" 20472: bool TryReadFromCache(uint64_t offset, size_t n, Slice* result, 20472: bool for_compaction = false); 20472: 20472: 20472: 20472: size_t min_offset_read() const { return min_offset_read_; } 20472: 20472: private: 20472: AlignedBuffer buffer_; 20472: uint64_t buffer_offset_; 20472: RandomAccessFileReader* file_reader_; 20472: size_t readahead_size_; 20472: size_t max_readahead_size_; 20472: 20472: size_t min_offset_read_; 20472: 20472: 20472: bool enable_; 20472: 20472: 20472: bool track_min_offset_; 20472: }; 20472: } 20472: # 14 "./table/format.h" 2 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "./memory/memory_allocator.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: namespace rocksdb { 20472: 20472: struct CustomDeleter { 20472: CustomDeleter(MemoryAllocator* a = nullptr) : allocator(a) {} 20472: 20472: void operator()(char* ptr) const { 20472: if (allocator) { 20472: allocator->Deallocate(reinterpret_cast(ptr)); 20472: } else { 20472: delete[] ptr; 20472: } 20472: } 20472: 20472: MemoryAllocator* allocator; 20472: }; 20472: 20472: using CacheAllocationPtr = std::unique_ptr; 20472: 20472: inline CacheAllocationPtr AllocateBlock(size_t size, 20472: MemoryAllocator* allocator) { 20472: if (allocator) { 20472: auto block = reinterpret_cast(allocator->Allocate(size)); 20472: return CacheAllocationPtr(block, allocator); 20472: } 20472: return CacheAllocationPtr(new char[size]); 20472: } 20472: 20472: } 20472: # 22 "./table/format.h" 2 20472: # 1 "./options/cf_options.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "./options/db_options.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: namespace rocksdb { 20472: 20472: struct ImmutableDBOptions { 20472: ImmutableDBOptions(); 20472: explicit ImmutableDBOptions(const DBOptions& options); 20472: 20472: void Dump(Logger* log) const; 20472: 20472: bool create_if_missing; 20472: bool create_missing_column_families; 20472: bool error_if_exists; 20472: bool paranoid_checks; 20472: Env* env; 20472: std::shared_ptr fs; 20472: std::shared_ptr rate_limiter; 20472: std::shared_ptr sst_file_manager; 20472: std::shared_ptr info_log; 20472: InfoLogLevel info_log_level; 20472: int max_file_opening_threads; 20472: std::shared_ptr statistics; 20472: bool use_fsync; 20472: std::vector db_paths; 20472: std::string db_log_dir; 20472: std::string wal_dir; 20472: uint32_t max_subcompactions; 20472: size_t max_log_file_size; 20472: size_t log_file_time_to_roll; 20472: size_t keep_log_file_num; 20472: size_t recycle_log_file_num; 20472: uint64_t max_manifest_file_size; 20472: int table_cache_numshardbits; 20472: uint64_t wal_ttl_seconds; 20472: uint64_t wal_size_limit_mb; 20472: uint64_t max_write_batch_group_size_bytes; 20472: size_t manifest_preallocation_size; 20472: bool allow_mmap_reads; 20472: bool allow_mmap_writes; 20472: bool use_direct_reads; 20472: bool use_direct_io_for_flush_and_compaction; 20472: bool allow_fallocate; 20472: bool is_fd_close_on_exec; 20472: bool advise_random_on_open; 20472: size_t db_write_buffer_size; 20472: std::shared_ptr write_buffer_manager; 20472: DBOptions::AccessHint access_hint_on_compaction_start; 20472: bool new_table_reader_for_compaction_inputs; 20472: size_t random_access_max_buffer_size; 20472: bool use_adaptive_mutex; 20472: std::vector> listeners; 20472: bool enable_thread_tracking; 20472: bool enable_pipelined_write; 20472: bool unordered_write; 20472: bool allow_concurrent_memtable_write; 20472: bool enable_write_thread_adaptive_yield; 20472: uint64_t write_thread_max_yield_usec; 20472: uint64_t write_thread_slow_yield_usec; 20472: bool skip_stats_update_on_db_open; 20472: bool skip_checking_sst_file_sizes_on_db_open; 20472: WALRecoveryMode wal_recovery_mode; 20472: bool allow_2pc; 20472: std::shared_ptr row_cache; 20472: 20472: WalFilter* wal_filter; 20472: 20472: bool fail_if_options_file_error; 20472: bool dump_malloc_stats; 20472: bool avoid_flush_during_recovery; 20472: bool allow_ingest_behind; 20472: bool preserve_deletes; 20472: bool two_write_queues; 20472: bool manual_wal_flush; 20472: bool atomic_flush; 20472: bool avoid_unnecessary_blocking_io; 20472: bool persist_stats_to_disk; 20472: bool write_dbid_to_manifest; 20472: size_t log_readahead_size; 20472: std::shared_ptr file_checksum_gen_factory; 20472: bool best_efforts_recovery; 20472: }; 20472: 20472: struct MutableDBOptions { 20472: MutableDBOptions(); 20472: explicit MutableDBOptions(const MutableDBOptions& options) = default; 20472: explicit MutableDBOptions(const DBOptions& options); 20472: 20472: void Dump(Logger* log) const; 20472: 20472: int max_background_jobs; 20472: int base_background_compactions; 20472: int max_background_compactions; 20472: bool avoid_flush_during_shutdown; 20472: size_t writable_file_max_buffer_size; 20472: uint64_t delayed_write_rate; 20472: uint64_t max_total_wal_size; 20472: uint64_t delete_obsolete_files_period_micros; 20472: unsigned int stats_dump_period_sec; 20472: unsigned int stats_persist_period_sec; 20472: size_t stats_history_buffer_size; 20472: int max_open_files; 20472: uint64_t bytes_per_sync; 20472: uint64_t wal_bytes_per_sync; 20472: bool strict_bytes_per_sync; 20472: size_t compaction_readahead_size; 20472: int max_background_flushes; 20472: }; 20472: 20472: } 20472: # 13 "./options/cf_options.h" 2 20472: 20472: # 1 "./util/compression.h" 1 20472: # 10 "./util/compression.h" 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "/usr/include/malloc.h" 1 3 4 20472: # 23 "/usr/include/malloc.h" 3 4 20472: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/10/include/stddef.h" 1 3 4 20472: # 24 "/usr/include/malloc.h" 2 3 4 20472: # 35 "/usr/include/malloc.h" 3 4 20472: 20472: # 35 "/usr/include/malloc.h" 3 4 20472: extern "C" { 20472: 20472: 20472: extern void *malloc (size_t __size) throw () __attribute__ ((__malloc__)) 20472: __attribute__ ((__alloc_size__ (1))) ; 20472: 20472: 20472: extern void *calloc (size_t __nmemb, size_t __size) 20472: throw () __attribute__ ((__malloc__)) __attribute__ ((__alloc_size__ (1, 2))) ; 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern void *realloc (void *__ptr, size_t __size) 20472: throw () __attribute__ ((__warn_unused_result__)) __attribute__ ((__alloc_size__ (2))); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size) 20472: throw () __attribute__ ((__warn_unused_result__)) __attribute__ ((__alloc_size__ (2, 3))); 20472: 20472: 20472: extern void free (void *__ptr) throw (); 20472: 20472: 20472: extern void *memalign (size_t __alignment, size_t __size) 20472: throw () __attribute__ ((__malloc__)) __attribute__ ((__alloc_size__ (2))) ; 20472: 20472: 20472: extern void *valloc (size_t __size) throw () __attribute__ ((__malloc__)) 20472: __attribute__ ((__alloc_size__ (1))) ; 20472: 20472: 20472: 20472: extern void *pvalloc (size_t __size) throw () __attribute__ ((__malloc__)) ; 20472: 20472: 20472: 20472: extern void *(*__morecore) (ptrdiff_t __size); 20472: 20472: 20472: extern void *__default_morecore (ptrdiff_t __size) 20472: throw () __attribute__ ((__malloc__)); 20472: 20472: 20472: 20472: struct mallinfo 20472: { 20472: int arena; 20472: int ordblks; 20472: int smblks; 20472: int hblks; 20472: int hblkhd; 20472: int usmblks; 20472: int fsmblks; 20472: int uordblks; 20472: int fordblks; 20472: int keepcost; 20472: }; 20472: 20472: 20472: extern struct mallinfo mallinfo (void) throw (); 20472: # 128 "/usr/include/malloc.h" 3 4 20472: extern int mallopt (int __param, int __val) throw (); 20472: 20472: 20472: 20472: extern int malloc_trim (size_t __pad) throw (); 20472: 20472: 20472: 20472: extern size_t malloc_usable_size (void *__ptr) throw (); 20472: 20472: 20472: extern void malloc_stats (void) throw (); 20472: 20472: 20472: extern int malloc_info (int __options, FILE *__fp) throw (); 20472: 20472: 20472: extern void (*volatile __free_hook) (void *__ptr, 20472: const void *) 20472: __attribute__ ((__deprecated__)); 20472: extern void *(*volatile __malloc_hook)(size_t __size, 20472: const void *) 20472: __attribute__ ((__deprecated__)); 20472: extern void *(*volatile __realloc_hook)(void *__ptr, 20472: size_t __size, 20472: const void *) 20472: __attribute__ ((__deprecated__)); 20472: extern void *(*volatile __memalign_hook)(size_t __alignment, 20472: size_t __size, 20472: const void *) 20472: __attribute__ ((__deprecated__)); 20472: extern void (*volatile __after_morecore_hook) (void); 20472: 20472: 20472: } 20472: # 19 "./util/compression.h" 2 20472: # 27 "./util/compression.h" 20472: # 1 "./util/compression_context_cache.h" 1 20472: # 18 "./util/compression_context_cache.h" 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 24 "./util/compression_context_cache.h" 20472: namespace rocksdb { 20472: class ZSTDUncompressCachedData; 20472: 20472: class CompressionContextCache { 20472: public: 20472: 20472: static CompressionContextCache* Instance(); 20472: static void InitSingleton(); 20472: CompressionContextCache(const CompressionContextCache&) = delete; 20472: CompressionContextCache& operator=(const CompressionContextCache&) = delete; 20472: 20472: ZSTDUncompressCachedData GetCachedZSTDUncompressData(); 20472: void ReturnCachedZSTDUncompressData(int64_t idx); 20472: 20472: private: 20472: 20472: CompressionContextCache(); 20472: ~CompressionContextCache(); 20472: 20472: class Rep; 20472: Rep* rep_; 20472: }; 20472: 20472: } 20472: # 28 "./util/compression.h" 2 20472: # 1 "./util/string_util.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 16 "./util/string_util.h" 20472: namespace rocksdb { 20472: 20472: class Slice; 20472: 20472: extern std::vector StringSplit(const std::string& arg, char delim); 20472: 20472: template 20472: inline std::string ToString(T value) { 20472: 20472: return std::to_string(value); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: } 20472: 20472: 20472: extern void AppendNumberTo(std::string* str, uint64_t num); 20472: 20472: 20472: 20472: extern void AppendEscapedStringTo(std::string* str, const Slice& value); 20472: 20472: 20472: extern std::string NumberToString(uint64_t num); 20472: 20472: 20472: 20472: 20472: 20472: extern std::string NumberToHumanString(int64_t num); 20472: 20472: 20472: 20472: extern std::string BytesToHumanString(uint64_t bytes); 20472: 20472: 20472: 20472: extern std::string TimeToHumanString(int unixtime); 20472: 20472: 20472: int AppendHumanMicros(uint64_t micros, char* output, int len, 20472: bool fixed_format); 20472: 20472: 20472: int AppendHumanBytes(uint64_t bytes, char* output, int len); 20472: 20472: 20472: 20472: extern std::string EscapeString(const Slice& value); 20472: 20472: 20472: 20472: 20472: 20472: extern bool ConsumeDecimalNumber(Slice* in, uint64_t* val); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: bool isSpecialChar(const char c); 20472: 20472: 20472: 20472: 20472: char UnescapeChar(const char c); 20472: 20472: 20472: 20472: 20472: char EscapeChar(const char c); 20472: # 103 "./util/string_util.h" 20472: std::string EscapeOptionString(const std::string& raw_string); 20472: 20472: 20472: 20472: 20472: 20472: 20472: std::string UnescapeOptionString(const std::string& escaped_string); 20472: 20472: std::string trim(const std::string& str); 20472: 20472: 20472: bool EndsWith(const std::string& string, const std::string& pattern); 20472: 20472: 20472: bool StartsWith(const std::string& string, const std::string& pattern); 20472: 20472: 20472: bool ParseBoolean(const std::string& type, const std::string& value); 20472: 20472: uint32_t ParseUint32(const std::string& value); 20472: 20472: int32_t ParseInt32(const std::string& value); 20472: 20472: 20472: uint64_t ParseUint64(const std::string& value); 20472: 20472: int ParseInt(const std::string& value); 20472: 20472: int64_t ParseInt64(const std::string& value); 20472: 20472: double ParseDouble(const std::string& value); 20472: 20472: size_t ParseSizeT(const std::string& value); 20472: 20472: std::vector ParseVectorInt(const std::string& value); 20472: 20472: bool SerializeIntVector(const std::vector& vec, std::string* value); 20472: 20472: extern const std::string kNullptrString; 20472: 20472: } 20472: # 29 "./util/compression.h" 2 20472: 20472: 20472: # 1 "/usr/include/snappy.h" 1 3 4 20472: # 45 "/usr/include/snappy.h" 3 4 20472: # 1 "/usr/include/snappy-stubs-public.h" 1 3 4 20472: # 43 "/usr/include/snappy-stubs-public.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/sys/uio.h" 1 3 4 20472: # 23 "/usr/include/arm-linux-gnueabihf/sys/uio.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/types/struct_iovec.h" 1 3 4 20472: # 23 "/usr/include/arm-linux-gnueabihf/bits/types/struct_iovec.h" 3 4 20472: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/10/include/stddef.h" 1 3 4 20472: # 24 "/usr/include/arm-linux-gnueabihf/bits/types/struct_iovec.h" 2 3 4 20472: 20472: 20472: 20472: # 26 "/usr/include/arm-linux-gnueabihf/bits/types/struct_iovec.h" 3 4 20472: struct iovec 20472: { 20472: void *iov_base; 20472: size_t iov_len; 20472: }; 20472: # 24 "/usr/include/arm-linux-gnueabihf/sys/uio.h" 2 3 4 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern "C" { 20472: # 41 "/usr/include/arm-linux-gnueabihf/sys/uio.h" 3 4 20472: extern ssize_t readv (int __fd, const struct iovec *__iovec, int __count) 20472: ; 20472: # 52 "/usr/include/arm-linux-gnueabihf/sys/uio.h" 3 4 20472: extern ssize_t writev (int __fd, const struct iovec *__iovec, int __count) 20472: ; 20472: # 67 "/usr/include/arm-linux-gnueabihf/sys/uio.h" 3 4 20472: extern ssize_t preadv (int __fd, const struct iovec *__iovec, int __count, 20472: __off_t __offset) ; 20472: # 79 "/usr/include/arm-linux-gnueabihf/sys/uio.h" 3 4 20472: extern ssize_t pwritev (int __fd, const struct iovec *__iovec, int __count, 20472: __off_t __offset) ; 20472: # 106 "/usr/include/arm-linux-gnueabihf/sys/uio.h" 3 4 20472: extern ssize_t preadv64 (int __fd, const struct iovec *__iovec, int __count, 20472: __off64_t __offset) ; 20472: # 118 "/usr/include/arm-linux-gnueabihf/sys/uio.h" 3 4 20472: extern ssize_t pwritev64 (int __fd, const struct iovec *__iovec, int __count, 20472: __off64_t __offset) ; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern ssize_t preadv2 (int __fp, const struct iovec *__iovec, int __count, 20472: __off_t __offset, int ___flags) ; 20472: 20472: 20472: extern ssize_t pwritev2 (int __fd, const struct iovec *__iodev, int __count, 20472: __off_t __offset, int __flags) ; 20472: # 152 "/usr/include/arm-linux-gnueabihf/sys/uio.h" 3 4 20472: extern ssize_t preadv64v2 (int __fp, const struct iovec *__iovec, 20472: int __count, __off64_t __offset, 20472: int ___flags) ; 20472: 20472: 20472: extern ssize_t pwritev64v2 (int __fd, const struct iovec *__iodev, 20472: int __count, __off64_t __offset, 20472: int __flags) ; 20472: 20472: 20472: 20472: } 20472: 20472: 20472: 20472: 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/uio-ext.h" 1 3 4 20472: # 26 "/usr/include/arm-linux-gnueabihf/bits/uio-ext.h" 3 4 20472: extern "C" { 20472: 20472: 20472: extern ssize_t process_vm_readv (pid_t __pid, const struct iovec *__lvec, 20472: unsigned long int __liovcnt, 20472: const struct iovec *__rvec, 20472: unsigned long int __riovcnt, 20472: unsigned long int __flags) 20472: throw (); 20472: 20472: 20472: extern ssize_t process_vm_writev (pid_t __pid, const struct iovec *__lvec, 20472: unsigned long int __liovcnt, 20472: const struct iovec *__rvec, 20472: unsigned long int __riovcnt, 20472: unsigned long int __flags) 20472: throw (); 20472: # 51 "/usr/include/arm-linux-gnueabihf/bits/uio-ext.h" 3 4 20472: } 20472: # 169 "/usr/include/arm-linux-gnueabihf/sys/uio.h" 2 3 4 20472: # 44 "/usr/include/snappy-stubs-public.h" 2 3 4 20472: # 52 "/usr/include/snappy-stubs-public.h" 3 4 20472: namespace snappy { 20472: 20472: using int8 = std::int8_t; 20472: using uint8 = std::uint8_t; 20472: using int16 = std::int16_t; 20472: using uint16 = std::uint16_t; 20472: using int32 = std::int32_t; 20472: using uint32 = std::uint32_t; 20472: using int64 = std::int64_t; 20472: using uint64 = std::uint64_t; 20472: # 72 "/usr/include/snappy-stubs-public.h" 3 4 20472: } 20472: # 46 "/usr/include/snappy.h" 2 3 4 20472: 20472: namespace snappy { 20472: class Source; 20472: class Sink; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: size_t Compress(Source* source, Sink* sink); 20472: # 66 "/usr/include/snappy.h" 3 4 20472: bool GetUncompressedLength(Source* source, uint32* result); 20472: # 76 "/usr/include/snappy.h" 3 4 20472: size_t Compress(const char* input, size_t input_length, 20472: std::string* compressed); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: bool Uncompress(const char* compressed, size_t compressed_length, 20472: std::string* uncompressed); 20472: 20472: 20472: 20472: 20472: bool Uncompress(Source* compressed, Sink* uncompressed); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: size_t UncompressAsMuchAsPossible(Source* compressed, Sink* uncompressed); 20472: # 120 "/usr/include/snappy.h" 3 4 20472: void RawCompress(const char* input, 20472: size_t input_length, 20472: char* compressed, 20472: size_t* compressed_length); 20472: 20472: 20472: 20472: 20472: 20472: 20472: bool RawUncompress(const char* compressed, size_t compressed_length, 20472: char* uncompressed); 20472: 20472: 20472: 20472: 20472: 20472: 20472: bool RawUncompress(Source* compressed, char* uncompressed); 20472: # 148 "/usr/include/snappy.h" 3 4 20472: bool RawUncompressToIOVec(const char* compressed, size_t compressed_length, 20472: const struct iovec* iov, size_t iov_cnt); 20472: # 159 "/usr/include/snappy.h" 3 4 20472: bool RawUncompressToIOVec(Source* compressed, const struct iovec* iov, 20472: size_t iov_cnt); 20472: 20472: 20472: 20472: size_t MaxCompressedLength(size_t source_bytes); 20472: 20472: 20472: 20472: 20472: 20472: bool GetUncompressedLength(const char* compressed, size_t compressed_length, 20472: size_t* result); 20472: 20472: 20472: 20472: 20472: 20472: bool IsValidCompressedBuffer(const char* compressed, 20472: size_t compressed_length); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: bool IsValidCompressed(Source* compressed); 20472: # 197 "/usr/include/snappy.h" 3 4 20472: static constexpr int kBlockLog = 16; 20472: static constexpr size_t kBlockSize = 1 << kBlockLog; 20472: 20472: static constexpr int kMinHashTableBits = 8; 20472: static constexpr size_t kMinHashTableSize = 1 << kMinHashTableBits; 20472: 20472: static constexpr int kMaxHashTableBits = 14; 20472: static constexpr size_t kMaxHashTableSize = 1 << kMaxHashTableBits; 20472: } 20472: # 32 "./util/compression.h" 2 20472: 20472: 20472: 20472: # 1 "/usr/include/zlib.h" 1 3 4 20472: # 34 "/usr/include/zlib.h" 3 4 20472: # 1 "/usr/include/zconf.h" 1 3 4 20472: # 247 "/usr/include/zconf.h" 3 4 20472: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/10/include/stddef.h" 1 3 4 20472: # 248 "/usr/include/zconf.h" 2 3 4 20472: typedef size_t z_size_t; 20472: # 391 "/usr/include/zconf.h" 3 4 20472: typedef unsigned char Byte; 20472: 20472: typedef unsigned int uInt; 20472: typedef unsigned long uLong; 20472: 20472: 20472: 20472: 20472: 20472: typedef Byte Bytef; 20472: 20472: typedef char charf; 20472: typedef int intf; 20472: typedef uInt uIntf; 20472: typedef uLong uLongf; 20472: 20472: 20472: typedef void const *voidpc; 20472: typedef void *voidpf; 20472: typedef void *voidp; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/10/include/limits.h" 1 3 4 20472: # 419 "/usr/include/zconf.h" 2 3 4 20472: # 429 "/usr/include/zconf.h" 3 4 20472: typedef unsigned z_crc_t; 20472: # 475 "/usr/include/zconf.h" 3 4 20472: # 1 "/usr/include/unistd.h" 1 3 4 20472: # 27 "/usr/include/unistd.h" 3 4 20472: extern "C" { 20472: # 202 "/usr/include/unistd.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/posix_opt.h" 1 3 4 20472: # 203 "/usr/include/unistd.h" 2 3 4 20472: 20472: 20472: 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/environments.h" 1 3 4 20472: # 22 "/usr/include/arm-linux-gnueabihf/bits/environments.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/wordsize.h" 1 3 4 20472: # 23 "/usr/include/arm-linux-gnueabihf/bits/environments.h" 2 3 4 20472: # 207 "/usr/include/unistd.h" 2 3 4 20472: # 226 "/usr/include/unistd.h" 3 4 20472: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/10/include/stddef.h" 1 3 4 20472: # 227 "/usr/include/unistd.h" 2 3 4 20472: # 274 "/usr/include/unistd.h" 3 4 20472: typedef __socklen_t socklen_t; 20472: # 287 "/usr/include/unistd.h" 3 4 20472: extern int access (const char *__name, int __type) throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: 20472: 20472: extern int euidaccess (const char *__name, int __type) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: extern int eaccess (const char *__name, int __type) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int faccessat (int __fd, const char *__file, int __type, int __flag) 20472: throw () __attribute__ ((__nonnull__ (2))) ; 20472: # 334 "/usr/include/unistd.h" 3 4 20472: extern __off_t lseek (int __fd, __off_t __offset, int __whence) throw (); 20472: # 345 "/usr/include/unistd.h" 3 4 20472: extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence) 20472: throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int close (int __fd); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern ssize_t read (int __fd, void *__buf, size_t __nbytes) ; 20472: 20472: 20472: 20472: 20472: 20472: extern ssize_t write (int __fd, const void *__buf, size_t __n) ; 20472: # 376 "/usr/include/unistd.h" 3 4 20472: extern ssize_t pread (int __fd, void *__buf, size_t __nbytes, 20472: __off_t __offset) ; 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern ssize_t pwrite (int __fd, const void *__buf, size_t __n, 20472: __off_t __offset) ; 20472: # 404 "/usr/include/unistd.h" 3 4 20472: extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes, 20472: __off64_t __offset) ; 20472: 20472: 20472: extern ssize_t pwrite64 (int __fd, const void *__buf, size_t __n, 20472: __off64_t __offset) ; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int pipe (int __pipedes[2]) throw () ; 20472: 20472: 20472: 20472: 20472: extern int pipe2 (int __pipedes[2], int __flags) throw () ; 20472: # 432 "/usr/include/unistd.h" 3 4 20472: extern unsigned int alarm (unsigned int __seconds) throw (); 20472: # 444 "/usr/include/unistd.h" 3 4 20472: extern unsigned int sleep (unsigned int __seconds); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval) 20472: throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int usleep (__useconds_t __useconds); 20472: # 469 "/usr/include/unistd.h" 3 4 20472: extern int pause (void); 20472: 20472: 20472: 20472: extern int chown (const char *__file, __uid_t __owner, __gid_t __group) 20472: throw () __attribute__ ((__nonnull__ (1))) ; 20472: 20472: 20472: 20472: extern int fchown (int __fd, __uid_t __owner, __gid_t __group) throw () ; 20472: 20472: 20472: 20472: 20472: extern int lchown (const char *__file, __uid_t __owner, __gid_t __group) 20472: throw () __attribute__ ((__nonnull__ (1))) ; 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int fchownat (int __fd, const char *__file, __uid_t __owner, 20472: __gid_t __group, int __flag) 20472: throw () __attribute__ ((__nonnull__ (2))) ; 20472: 20472: 20472: 20472: extern int chdir (const char *__path) throw () __attribute__ ((__nonnull__ (1))) ; 20472: 20472: 20472: 20472: extern int fchdir (int __fd) throw () ; 20472: # 511 "/usr/include/unistd.h" 3 4 20472: extern char *getcwd (char *__buf, size_t __size) throw () ; 20472: 20472: 20472: 20472: 20472: 20472: extern char *get_current_dir_name (void) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern char *getwd (char *__buf) 20472: throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) ; 20472: 20472: 20472: 20472: 20472: extern int dup (int __fd) throw () ; 20472: 20472: 20472: extern int dup2 (int __fd, int __fd2) throw (); 20472: 20472: 20472: 20472: 20472: extern int dup3 (int __fd, int __fd2, int __flags) throw (); 20472: 20472: 20472: 20472: extern char **__environ; 20472: 20472: extern char **environ; 20472: 20472: 20472: 20472: 20472: 20472: extern int execve (const char *__path, char *const __argv[], 20472: char *const __envp[]) throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: 20472: 20472: extern int fexecve (int __fd, char *const __argv[], char *const __envp[]) 20472: throw () __attribute__ ((__nonnull__ (2))); 20472: 20472: 20472: 20472: 20472: extern int execv (const char *__path, char *const __argv[]) 20472: throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: 20472: extern int execle (const char *__path, const char *__arg, ...) 20472: throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: 20472: extern int execl (const char *__path, const char *__arg, ...) 20472: throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: 20472: extern int execvp (const char *__file, char *const __argv[]) 20472: throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: 20472: 20472: extern int execlp (const char *__file, const char *__arg, ...) 20472: throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: 20472: 20472: extern int execvpe (const char *__file, char *const __argv[], 20472: char *const __envp[]) 20472: throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: 20472: 20472: 20472: extern int nice (int __inc) throw () ; 20472: 20472: 20472: 20472: 20472: extern void _exit (int __status) __attribute__ ((__noreturn__)); 20472: 20472: 20472: 20472: 20472: 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/confname.h" 1 3 4 20472: # 24 "/usr/include/arm-linux-gnueabihf/bits/confname.h" 3 4 20472: enum 20472: { 20472: _PC_LINK_MAX, 20472: 20472: _PC_MAX_CANON, 20472: 20472: _PC_MAX_INPUT, 20472: 20472: _PC_NAME_MAX, 20472: 20472: _PC_PATH_MAX, 20472: 20472: _PC_PIPE_BUF, 20472: 20472: _PC_CHOWN_RESTRICTED, 20472: 20472: _PC_NO_TRUNC, 20472: 20472: _PC_VDISABLE, 20472: 20472: _PC_SYNC_IO, 20472: 20472: _PC_ASYNC_IO, 20472: 20472: _PC_PRIO_IO, 20472: 20472: _PC_SOCK_MAXBUF, 20472: 20472: _PC_FILESIZEBITS, 20472: 20472: _PC_REC_INCR_XFER_SIZE, 20472: 20472: _PC_REC_MAX_XFER_SIZE, 20472: 20472: _PC_REC_MIN_XFER_SIZE, 20472: 20472: _PC_REC_XFER_ALIGN, 20472: 20472: _PC_ALLOC_SIZE_MIN, 20472: 20472: _PC_SYMLINK_MAX, 20472: 20472: _PC_2_SYMLINKS 20472: 20472: }; 20472: 20472: 20472: enum 20472: { 20472: _SC_ARG_MAX, 20472: 20472: _SC_CHILD_MAX, 20472: 20472: _SC_CLK_TCK, 20472: 20472: _SC_NGROUPS_MAX, 20472: 20472: _SC_OPEN_MAX, 20472: 20472: _SC_STREAM_MAX, 20472: 20472: _SC_TZNAME_MAX, 20472: 20472: _SC_JOB_CONTROL, 20472: 20472: _SC_SAVED_IDS, 20472: 20472: _SC_REALTIME_SIGNALS, 20472: 20472: _SC_PRIORITY_SCHEDULING, 20472: 20472: _SC_TIMERS, 20472: 20472: _SC_ASYNCHRONOUS_IO, 20472: 20472: _SC_PRIORITIZED_IO, 20472: 20472: _SC_SYNCHRONIZED_IO, 20472: 20472: _SC_FSYNC, 20472: 20472: _SC_MAPPED_FILES, 20472: 20472: _SC_MEMLOCK, 20472: 20472: _SC_MEMLOCK_RANGE, 20472: 20472: _SC_MEMORY_PROTECTION, 20472: 20472: _SC_MESSAGE_PASSING, 20472: 20472: _SC_SEMAPHORES, 20472: 20472: _SC_SHARED_MEMORY_OBJECTS, 20472: 20472: _SC_AIO_LISTIO_MAX, 20472: 20472: _SC_AIO_MAX, 20472: 20472: _SC_AIO_PRIO_DELTA_MAX, 20472: 20472: _SC_DELAYTIMER_MAX, 20472: 20472: _SC_MQ_OPEN_MAX, 20472: 20472: _SC_MQ_PRIO_MAX, 20472: 20472: _SC_VERSION, 20472: 20472: _SC_PAGESIZE, 20472: 20472: 20472: _SC_RTSIG_MAX, 20472: 20472: _SC_SEM_NSEMS_MAX, 20472: 20472: _SC_SEM_VALUE_MAX, 20472: 20472: _SC_SIGQUEUE_MAX, 20472: 20472: _SC_TIMER_MAX, 20472: 20472: 20472: 20472: 20472: _SC_BC_BASE_MAX, 20472: 20472: _SC_BC_DIM_MAX, 20472: 20472: _SC_BC_SCALE_MAX, 20472: 20472: _SC_BC_STRING_MAX, 20472: 20472: _SC_COLL_WEIGHTS_MAX, 20472: 20472: _SC_EQUIV_CLASS_MAX, 20472: 20472: _SC_EXPR_NEST_MAX, 20472: 20472: _SC_LINE_MAX, 20472: 20472: _SC_RE_DUP_MAX, 20472: 20472: _SC_CHARCLASS_NAME_MAX, 20472: 20472: 20472: _SC_2_VERSION, 20472: 20472: _SC_2_C_BIND, 20472: 20472: _SC_2_C_DEV, 20472: 20472: _SC_2_FORT_DEV, 20472: 20472: _SC_2_FORT_RUN, 20472: 20472: _SC_2_SW_DEV, 20472: 20472: _SC_2_LOCALEDEF, 20472: 20472: 20472: _SC_PII, 20472: 20472: _SC_PII_XTI, 20472: 20472: _SC_PII_SOCKET, 20472: 20472: _SC_PII_INTERNET, 20472: 20472: _SC_PII_OSI, 20472: 20472: _SC_POLL, 20472: 20472: _SC_SELECT, 20472: 20472: _SC_UIO_MAXIOV, 20472: 20472: _SC_IOV_MAX = _SC_UIO_MAXIOV, 20472: 20472: _SC_PII_INTERNET_STREAM, 20472: 20472: _SC_PII_INTERNET_DGRAM, 20472: 20472: _SC_PII_OSI_COTS, 20472: 20472: _SC_PII_OSI_CLTS, 20472: 20472: _SC_PII_OSI_M, 20472: 20472: _SC_T_IOV_MAX, 20472: 20472: 20472: 20472: _SC_THREADS, 20472: 20472: _SC_THREAD_SAFE_FUNCTIONS, 20472: 20472: _SC_GETGR_R_SIZE_MAX, 20472: 20472: _SC_GETPW_R_SIZE_MAX, 20472: 20472: _SC_LOGIN_NAME_MAX, 20472: 20472: _SC_TTY_NAME_MAX, 20472: 20472: _SC_THREAD_DESTRUCTOR_ITERATIONS, 20472: 20472: _SC_THREAD_KEYS_MAX, 20472: 20472: _SC_THREAD_STACK_MIN, 20472: 20472: _SC_THREAD_THREADS_MAX, 20472: 20472: _SC_THREAD_ATTR_STACKADDR, 20472: 20472: _SC_THREAD_ATTR_STACKSIZE, 20472: 20472: _SC_THREAD_PRIORITY_SCHEDULING, 20472: 20472: _SC_THREAD_PRIO_INHERIT, 20472: 20472: _SC_THREAD_PRIO_PROTECT, 20472: 20472: _SC_THREAD_PROCESS_SHARED, 20472: 20472: 20472: _SC_NPROCESSORS_CONF, 20472: 20472: _SC_NPROCESSORS_ONLN, 20472: 20472: _SC_PHYS_PAGES, 20472: 20472: _SC_AVPHYS_PAGES, 20472: 20472: _SC_ATEXIT_MAX, 20472: 20472: _SC_PASS_MAX, 20472: 20472: 20472: _SC_XOPEN_VERSION, 20472: 20472: _SC_XOPEN_XCU_VERSION, 20472: 20472: _SC_XOPEN_UNIX, 20472: 20472: _SC_XOPEN_CRYPT, 20472: 20472: _SC_XOPEN_ENH_I18N, 20472: 20472: _SC_XOPEN_SHM, 20472: 20472: 20472: _SC_2_CHAR_TERM, 20472: 20472: _SC_2_C_VERSION, 20472: 20472: _SC_2_UPE, 20472: 20472: 20472: _SC_XOPEN_XPG2, 20472: 20472: _SC_XOPEN_XPG3, 20472: 20472: _SC_XOPEN_XPG4, 20472: 20472: 20472: _SC_CHAR_BIT, 20472: 20472: _SC_CHAR_MAX, 20472: 20472: _SC_CHAR_MIN, 20472: 20472: _SC_INT_MAX, 20472: 20472: _SC_INT_MIN, 20472: 20472: _SC_LONG_BIT, 20472: 20472: _SC_WORD_BIT, 20472: 20472: _SC_MB_LEN_MAX, 20472: 20472: _SC_NZERO, 20472: 20472: _SC_SSIZE_MAX, 20472: 20472: _SC_SCHAR_MAX, 20472: 20472: _SC_SCHAR_MIN, 20472: 20472: _SC_SHRT_MAX, 20472: 20472: _SC_SHRT_MIN, 20472: 20472: _SC_UCHAR_MAX, 20472: 20472: _SC_UINT_MAX, 20472: 20472: _SC_ULONG_MAX, 20472: 20472: _SC_USHRT_MAX, 20472: 20472: 20472: _SC_NL_ARGMAX, 20472: 20472: _SC_NL_LANGMAX, 20472: 20472: _SC_NL_MSGMAX, 20472: 20472: _SC_NL_NMAX, 20472: 20472: _SC_NL_SETMAX, 20472: 20472: _SC_NL_TEXTMAX, 20472: 20472: 20472: _SC_XBS5_ILP32_OFF32, 20472: 20472: _SC_XBS5_ILP32_OFFBIG, 20472: 20472: _SC_XBS5_LP64_OFF64, 20472: 20472: _SC_XBS5_LPBIG_OFFBIG, 20472: 20472: 20472: _SC_XOPEN_LEGACY, 20472: 20472: _SC_XOPEN_REALTIME, 20472: 20472: _SC_XOPEN_REALTIME_THREADS, 20472: 20472: 20472: _SC_ADVISORY_INFO, 20472: 20472: _SC_BARRIERS, 20472: 20472: _SC_BASE, 20472: 20472: _SC_C_LANG_SUPPORT, 20472: 20472: _SC_C_LANG_SUPPORT_R, 20472: 20472: _SC_CLOCK_SELECTION, 20472: 20472: _SC_CPUTIME, 20472: 20472: _SC_THREAD_CPUTIME, 20472: 20472: _SC_DEVICE_IO, 20472: 20472: _SC_DEVICE_SPECIFIC, 20472: 20472: _SC_DEVICE_SPECIFIC_R, 20472: 20472: _SC_FD_MGMT, 20472: 20472: _SC_FIFO, 20472: 20472: _SC_PIPE, 20472: 20472: _SC_FILE_ATTRIBUTES, 20472: 20472: _SC_FILE_LOCKING, 20472: 20472: _SC_FILE_SYSTEM, 20472: 20472: _SC_MONOTONIC_CLOCK, 20472: 20472: _SC_MULTI_PROCESS, 20472: 20472: _SC_SINGLE_PROCESS, 20472: 20472: _SC_NETWORKING, 20472: 20472: _SC_READER_WRITER_LOCKS, 20472: 20472: _SC_SPIN_LOCKS, 20472: 20472: _SC_REGEXP, 20472: 20472: _SC_REGEX_VERSION, 20472: 20472: _SC_SHELL, 20472: 20472: _SC_SIGNALS, 20472: 20472: _SC_SPAWN, 20472: 20472: _SC_SPORADIC_SERVER, 20472: 20472: _SC_THREAD_SPORADIC_SERVER, 20472: 20472: _SC_SYSTEM_DATABASE, 20472: 20472: _SC_SYSTEM_DATABASE_R, 20472: 20472: _SC_TIMEOUTS, 20472: 20472: _SC_TYPED_MEMORY_OBJECTS, 20472: 20472: _SC_USER_GROUPS, 20472: 20472: _SC_USER_GROUPS_R, 20472: 20472: _SC_2_PBS, 20472: 20472: _SC_2_PBS_ACCOUNTING, 20472: 20472: _SC_2_PBS_LOCATE, 20472: 20472: _SC_2_PBS_MESSAGE, 20472: 20472: _SC_2_PBS_TRACK, 20472: 20472: _SC_SYMLOOP_MAX, 20472: 20472: _SC_STREAMS, 20472: 20472: _SC_2_PBS_CHECKPOINT, 20472: 20472: 20472: _SC_V6_ILP32_OFF32, 20472: 20472: _SC_V6_ILP32_OFFBIG, 20472: 20472: _SC_V6_LP64_OFF64, 20472: 20472: _SC_V6_LPBIG_OFFBIG, 20472: 20472: 20472: _SC_HOST_NAME_MAX, 20472: 20472: _SC_TRACE, 20472: 20472: _SC_TRACE_EVENT_FILTER, 20472: 20472: _SC_TRACE_INHERIT, 20472: 20472: _SC_TRACE_LOG, 20472: 20472: 20472: _SC_LEVEL1_ICACHE_SIZE, 20472: 20472: _SC_LEVEL1_ICACHE_ASSOC, 20472: 20472: _SC_LEVEL1_ICACHE_LINESIZE, 20472: 20472: _SC_LEVEL1_DCACHE_SIZE, 20472: 20472: _SC_LEVEL1_DCACHE_ASSOC, 20472: 20472: _SC_LEVEL1_DCACHE_LINESIZE, 20472: 20472: _SC_LEVEL2_CACHE_SIZE, 20472: 20472: _SC_LEVEL2_CACHE_ASSOC, 20472: 20472: _SC_LEVEL2_CACHE_LINESIZE, 20472: 20472: _SC_LEVEL3_CACHE_SIZE, 20472: 20472: _SC_LEVEL3_CACHE_ASSOC, 20472: 20472: _SC_LEVEL3_CACHE_LINESIZE, 20472: 20472: _SC_LEVEL4_CACHE_SIZE, 20472: 20472: _SC_LEVEL4_CACHE_ASSOC, 20472: 20472: _SC_LEVEL4_CACHE_LINESIZE, 20472: 20472: 20472: 20472: _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50, 20472: 20472: _SC_RAW_SOCKETS, 20472: 20472: 20472: _SC_V7_ILP32_OFF32, 20472: 20472: _SC_V7_ILP32_OFFBIG, 20472: 20472: _SC_V7_LP64_OFF64, 20472: 20472: _SC_V7_LPBIG_OFFBIG, 20472: 20472: 20472: _SC_SS_REPL_MAX, 20472: 20472: 20472: _SC_TRACE_EVENT_NAME_MAX, 20472: 20472: _SC_TRACE_NAME_MAX, 20472: 20472: _SC_TRACE_SYS_MAX, 20472: 20472: _SC_TRACE_USER_EVENT_MAX, 20472: 20472: 20472: _SC_XOPEN_STREAMS, 20472: 20472: 20472: _SC_THREAD_ROBUST_PRIO_INHERIT, 20472: 20472: _SC_THREAD_ROBUST_PRIO_PROTECT 20472: 20472: }; 20472: 20472: 20472: enum 20472: { 20472: _CS_PATH, 20472: 20472: 20472: _CS_V6_WIDTH_RESTRICTED_ENVS, 20472: 20472: 20472: 20472: _CS_GNU_LIBC_VERSION, 20472: 20472: _CS_GNU_LIBPTHREAD_VERSION, 20472: 20472: 20472: _CS_V5_WIDTH_RESTRICTED_ENVS, 20472: 20472: 20472: 20472: _CS_V7_WIDTH_RESTRICTED_ENVS, 20472: 20472: 20472: 20472: _CS_LFS_CFLAGS = 1000, 20472: 20472: _CS_LFS_LDFLAGS, 20472: 20472: _CS_LFS_LIBS, 20472: 20472: _CS_LFS_LINTFLAGS, 20472: 20472: _CS_LFS64_CFLAGS, 20472: 20472: _CS_LFS64_LDFLAGS, 20472: 20472: _CS_LFS64_LIBS, 20472: 20472: _CS_LFS64_LINTFLAGS, 20472: 20472: 20472: _CS_XBS5_ILP32_OFF32_CFLAGS = 1100, 20472: 20472: _CS_XBS5_ILP32_OFF32_LDFLAGS, 20472: 20472: _CS_XBS5_ILP32_OFF32_LIBS, 20472: 20472: _CS_XBS5_ILP32_OFF32_LINTFLAGS, 20472: 20472: _CS_XBS5_ILP32_OFFBIG_CFLAGS, 20472: 20472: _CS_XBS5_ILP32_OFFBIG_LDFLAGS, 20472: 20472: _CS_XBS5_ILP32_OFFBIG_LIBS, 20472: 20472: _CS_XBS5_ILP32_OFFBIG_LINTFLAGS, 20472: 20472: _CS_XBS5_LP64_OFF64_CFLAGS, 20472: 20472: _CS_XBS5_LP64_OFF64_LDFLAGS, 20472: 20472: _CS_XBS5_LP64_OFF64_LIBS, 20472: 20472: _CS_XBS5_LP64_OFF64_LINTFLAGS, 20472: 20472: _CS_XBS5_LPBIG_OFFBIG_CFLAGS, 20472: 20472: _CS_XBS5_LPBIG_OFFBIG_LDFLAGS, 20472: 20472: _CS_XBS5_LPBIG_OFFBIG_LIBS, 20472: 20472: _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS, 20472: 20472: 20472: _CS_POSIX_V6_ILP32_OFF32_CFLAGS, 20472: 20472: _CS_POSIX_V6_ILP32_OFF32_LDFLAGS, 20472: 20472: _CS_POSIX_V6_ILP32_OFF32_LIBS, 20472: 20472: _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS, 20472: 20472: _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS, 20472: 20472: _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS, 20472: 20472: _CS_POSIX_V6_ILP32_OFFBIG_LIBS, 20472: 20472: _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS, 20472: 20472: _CS_POSIX_V6_LP64_OFF64_CFLAGS, 20472: 20472: _CS_POSIX_V6_LP64_OFF64_LDFLAGS, 20472: 20472: _CS_POSIX_V6_LP64_OFF64_LIBS, 20472: 20472: _CS_POSIX_V6_LP64_OFF64_LINTFLAGS, 20472: 20472: _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS, 20472: 20472: _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS, 20472: 20472: _CS_POSIX_V6_LPBIG_OFFBIG_LIBS, 20472: 20472: _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS, 20472: 20472: 20472: _CS_POSIX_V7_ILP32_OFF32_CFLAGS, 20472: 20472: _CS_POSIX_V7_ILP32_OFF32_LDFLAGS, 20472: 20472: _CS_POSIX_V7_ILP32_OFF32_LIBS, 20472: 20472: _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS, 20472: 20472: _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS, 20472: 20472: _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS, 20472: 20472: _CS_POSIX_V7_ILP32_OFFBIG_LIBS, 20472: 20472: _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS, 20472: 20472: _CS_POSIX_V7_LP64_OFF64_CFLAGS, 20472: 20472: _CS_POSIX_V7_LP64_OFF64_LDFLAGS, 20472: 20472: _CS_POSIX_V7_LP64_OFF64_LIBS, 20472: 20472: _CS_POSIX_V7_LP64_OFF64_LINTFLAGS, 20472: 20472: _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS, 20472: 20472: _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS, 20472: 20472: _CS_POSIX_V7_LPBIG_OFFBIG_LIBS, 20472: 20472: _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS, 20472: 20472: 20472: _CS_V6_ENV, 20472: 20472: _CS_V7_ENV 20472: 20472: }; 20472: # 610 "/usr/include/unistd.h" 2 3 4 20472: 20472: 20472: extern long int pathconf (const char *__path, int __name) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: extern long int fpathconf (int __fd, int __name) throw (); 20472: 20472: 20472: extern long int sysconf (int __name) throw (); 20472: 20472: 20472: 20472: extern size_t confstr (int __name, char *__buf, size_t __len) throw (); 20472: 20472: 20472: 20472: 20472: extern __pid_t getpid (void) throw (); 20472: 20472: 20472: extern __pid_t getppid (void) throw (); 20472: 20472: 20472: extern __pid_t getpgrp (void) throw (); 20472: 20472: 20472: extern __pid_t __getpgid (__pid_t __pid) throw (); 20472: 20472: extern __pid_t getpgid (__pid_t __pid) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int setpgid (__pid_t __pid, __pid_t __pgid) throw (); 20472: # 660 "/usr/include/unistd.h" 3 4 20472: extern int setpgrp (void) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern __pid_t setsid (void) throw (); 20472: 20472: 20472: 20472: extern __pid_t getsid (__pid_t __pid) throw (); 20472: 20472: 20472: 20472: extern __uid_t getuid (void) throw (); 20472: 20472: 20472: extern __uid_t geteuid (void) throw (); 20472: 20472: 20472: extern __gid_t getgid (void) throw (); 20472: 20472: 20472: extern __gid_t getegid (void) throw (); 20472: 20472: 20472: 20472: 20472: extern int getgroups (int __size, __gid_t __list[]) throw () ; 20472: 20472: 20472: 20472: extern int group_member (__gid_t __gid) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int setuid (__uid_t __uid) throw () ; 20472: 20472: 20472: 20472: 20472: extern int setreuid (__uid_t __ruid, __uid_t __euid) throw () ; 20472: 20472: 20472: 20472: 20472: extern int seteuid (__uid_t __uid) throw () ; 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int setgid (__gid_t __gid) throw () ; 20472: 20472: 20472: 20472: 20472: extern int setregid (__gid_t __rgid, __gid_t __egid) throw () ; 20472: 20472: 20472: 20472: 20472: extern int setegid (__gid_t __gid) throw () ; 20472: 20472: 20472: 20472: 20472: 20472: extern int getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid) 20472: throw (); 20472: 20472: 20472: 20472: extern int getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid) 20472: throw (); 20472: 20472: 20472: 20472: extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid) 20472: throw () ; 20472: 20472: 20472: 20472: extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid) 20472: throw () ; 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern __pid_t fork (void) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern __pid_t vfork (void) throw (); 20472: 20472: 20472: 20472: 20472: 20472: extern char *ttyname (int __fd) throw (); 20472: 20472: 20472: 20472: extern int ttyname_r (int __fd, char *__buf, size_t __buflen) 20472: throw () __attribute__ ((__nonnull__ (2))) ; 20472: 20472: 20472: 20472: extern int isatty (int __fd) throw (); 20472: 20472: 20472: 20472: 20472: extern int ttyslot (void) throw (); 20472: 20472: 20472: 20472: 20472: extern int link (const char *__from, const char *__to) 20472: throw () __attribute__ ((__nonnull__ (1, 2))) ; 20472: 20472: 20472: 20472: 20472: extern int linkat (int __fromfd, const char *__from, int __tofd, 20472: const char *__to, int __flags) 20472: throw () __attribute__ ((__nonnull__ (2, 4))) ; 20472: 20472: 20472: 20472: 20472: extern int symlink (const char *__from, const char *__to) 20472: throw () __attribute__ ((__nonnull__ (1, 2))) ; 20472: 20472: 20472: 20472: 20472: extern ssize_t readlink (const char *__restrict __path, 20472: char *__restrict __buf, size_t __len) 20472: throw () __attribute__ ((__nonnull__ (1, 2))) ; 20472: 20472: 20472: 20472: 20472: extern int symlinkat (const char *__from, int __tofd, 20472: const char *__to) throw () __attribute__ ((__nonnull__ (1, 3))) ; 20472: 20472: 20472: extern ssize_t readlinkat (int __fd, const char *__restrict __path, 20472: char *__restrict __buf, size_t __len) 20472: throw () __attribute__ ((__nonnull__ (2, 3))) ; 20472: 20472: 20472: 20472: extern int unlink (const char *__name) throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: 20472: extern int unlinkat (int __fd, const char *__name, int __flag) 20472: throw () __attribute__ ((__nonnull__ (2))); 20472: 20472: 20472: 20472: extern int rmdir (const char *__path) throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: 20472: extern __pid_t tcgetpgrp (int __fd) throw (); 20472: 20472: 20472: extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern char *getlogin (void); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: 20472: 20472: extern int setlogin (const char *__name) throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/getopt_posix.h" 1 3 4 20472: # 27 "/usr/include/arm-linux-gnueabihf/bits/getopt_posix.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/getopt_core.h" 1 3 4 20472: # 28 "/usr/include/arm-linux-gnueabihf/bits/getopt_core.h" 3 4 20472: extern "C" { 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern char *optarg; 20472: # 50 "/usr/include/arm-linux-gnueabihf/bits/getopt_core.h" 3 4 20472: extern int optind; 20472: 20472: 20472: 20472: 20472: extern int opterr; 20472: 20472: 20472: 20472: extern int optopt; 20472: # 91 "/usr/include/arm-linux-gnueabihf/bits/getopt_core.h" 3 4 20472: extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) 20472: throw () __attribute__ ((__nonnull__ (2, 3))); 20472: 20472: } 20472: # 28 "/usr/include/arm-linux-gnueabihf/bits/getopt_posix.h" 2 3 4 20472: 20472: extern "C" { 20472: # 49 "/usr/include/arm-linux-gnueabihf/bits/getopt_posix.h" 3 4 20472: } 20472: # 870 "/usr/include/unistd.h" 2 3 4 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int gethostname (char *__name, size_t __len) throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int sethostname (const char *__name, size_t __len) 20472: throw () __attribute__ ((__nonnull__ (1))) ; 20472: 20472: 20472: 20472: extern int sethostid (long int __id) throw () ; 20472: 20472: 20472: 20472: 20472: 20472: extern int getdomainname (char *__name, size_t __len) 20472: throw () __attribute__ ((__nonnull__ (1))) ; 20472: extern int setdomainname (const char *__name, size_t __len) 20472: throw () __attribute__ ((__nonnull__ (1))) ; 20472: 20472: 20472: 20472: 20472: 20472: extern int vhangup (void) throw (); 20472: 20472: 20472: extern int revoke (const char *__file) throw () __attribute__ ((__nonnull__ (1))) ; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int profil (unsigned short int *__sample_buffer, size_t __size, 20472: size_t __offset, unsigned int __scale) 20472: throw () __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: 20472: 20472: 20472: extern int acct (const char *__name) throw (); 20472: 20472: 20472: 20472: extern char *getusershell (void) throw (); 20472: extern void endusershell (void) throw (); 20472: extern void setusershell (void) throw (); 20472: 20472: 20472: 20472: 20472: 20472: extern int daemon (int __nochdir, int __noclose) throw () ; 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int chroot (const char *__path) throw () __attribute__ ((__nonnull__ (1))) ; 20472: 20472: 20472: 20472: extern char *getpass (const char *__prompt) __attribute__ ((__nonnull__ (1))); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int fsync (int __fd); 20472: 20472: 20472: 20472: 20472: 20472: extern int syncfs (int __fd) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern long int gethostid (void); 20472: 20472: 20472: extern void sync (void) throw (); 20472: 20472: 20472: 20472: 20472: 20472: extern int getpagesize (void) throw () __attribute__ ((__const__)); 20472: 20472: 20472: 20472: 20472: extern int getdtablesize (void) throw (); 20472: # 991 "/usr/include/unistd.h" 3 4 20472: extern int truncate (const char *__file, __off_t __length) 20472: throw () __attribute__ ((__nonnull__ (1))) ; 20472: # 1003 "/usr/include/unistd.h" 3 4 20472: extern int truncate64 (const char *__file, __off64_t __length) 20472: throw () __attribute__ ((__nonnull__ (1))) ; 20472: # 1014 "/usr/include/unistd.h" 3 4 20472: extern int ftruncate (int __fd, __off_t __length) throw () ; 20472: # 1024 "/usr/include/unistd.h" 3 4 20472: extern int ftruncate64 (int __fd, __off64_t __length) throw () ; 20472: # 1035 "/usr/include/unistd.h" 3 4 20472: extern int brk (void *__addr) throw () ; 20472: 20472: 20472: 20472: 20472: 20472: extern void *sbrk (intptr_t __delta) throw (); 20472: # 1056 "/usr/include/unistd.h" 3 4 20472: extern long int syscall (long int __sysno, ...) throw (); 20472: # 1079 "/usr/include/unistd.h" 3 4 20472: extern int lockf (int __fd, int __cmd, __off_t __len) ; 20472: # 1089 "/usr/include/unistd.h" 3 4 20472: extern int lockf64 (int __fd, int __cmd, __off64_t __len) ; 20472: # 1107 "/usr/include/unistd.h" 3 4 20472: ssize_t copy_file_range (int __infd, __off64_t *__pinoff, 20472: int __outfd, __off64_t *__poutoff, 20472: size_t __length, unsigned int __flags); 20472: 20472: 20472: 20472: 20472: 20472: extern int fdatasync (int __fildes); 20472: # 1124 "/usr/include/unistd.h" 3 4 20472: extern char *crypt (const char *__key, const char *__salt) 20472: throw () __attribute__ ((__nonnull__ (1, 2))); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern void swab (const void *__restrict __from, void *__restrict __to, 20472: ssize_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); 20472: # 1161 "/usr/include/unistd.h" 3 4 20472: int getentropy (void *__buffer, size_t __length) ; 20472: # 1170 "/usr/include/unistd.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/unistd_ext.h" 1 3 4 20472: # 34 "/usr/include/arm-linux-gnueabihf/bits/unistd_ext.h" 3 4 20472: extern __pid_t gettid (void) throw (); 20472: # 1171 "/usr/include/unistd.h" 2 3 4 20472: 20472: } 20472: # 476 "/usr/include/zconf.h" 2 3 4 20472: # 35 "/usr/include/zlib.h" 2 3 4 20472: 20472: 20472: extern "C" { 20472: # 81 "/usr/include/zlib.h" 3 4 20472: typedef voidpf (*alloc_func) (voidpf opaque, uInt items, uInt size); 20472: typedef void (*free_func) (voidpf opaque, voidpf address); 20472: 20472: struct internal_state; 20472: 20472: typedef struct z_stream_s { 20472: Bytef *next_in; 20472: uInt avail_in; 20472: uLong total_in; 20472: 20472: Bytef *next_out; 20472: uInt avail_out; 20472: uLong total_out; 20472: 20472: char *msg; 20472: struct internal_state *state; 20472: 20472: alloc_func zalloc; 20472: free_func zfree; 20472: voidpf opaque; 20472: 20472: int data_type; 20472: 20472: uLong adler; 20472: uLong reserved; 20472: } z_stream; 20472: 20472: typedef z_stream *z_streamp; 20472: 20472: 20472: 20472: 20472: 20472: typedef struct gz_header_s { 20472: int text; 20472: uLong time; 20472: int xflags; 20472: int os; 20472: Bytef *extra; 20472: uInt extra_len; 20472: uInt extra_max; 20472: Bytef *name; 20472: uInt name_max; 20472: Bytef *comment; 20472: uInt comm_max; 20472: int hcrc; 20472: int done; 20472: 20472: } gz_header; 20472: 20472: typedef gz_header *gz_headerp; 20472: # 220 "/usr/include/zlib.h" 3 4 20472: extern const char * zlibVersion (void); 20472: # 250 "/usr/include/zlib.h" 3 4 20472: extern int deflate (z_streamp strm, int flush); 20472: # 363 "/usr/include/zlib.h" 3 4 20472: extern int deflateEnd (z_streamp strm); 20472: # 400 "/usr/include/zlib.h" 3 4 20472: extern int inflate (z_streamp strm, int flush); 20472: # 520 "/usr/include/zlib.h" 3 4 20472: extern int inflateEnd (z_streamp strm); 20472: # 611 "/usr/include/zlib.h" 3 4 20472: extern int deflateSetDictionary (z_streamp strm, const Bytef *dictionary, uInt dictLength) 20472: 20472: ; 20472: # 655 "/usr/include/zlib.h" 3 4 20472: extern int deflateGetDictionary (z_streamp strm, Bytef *dictionary, uInt *dictLength) 20472: 20472: ; 20472: # 677 "/usr/include/zlib.h" 3 4 20472: extern int deflateCopy (z_streamp dest, z_streamp source) 20472: ; 20472: # 695 "/usr/include/zlib.h" 3 4 20472: extern int deflateReset (z_streamp strm); 20472: # 706 "/usr/include/zlib.h" 3 4 20472: extern int deflateParams (z_streamp strm, int level, int strategy) 20472: 20472: ; 20472: # 743 "/usr/include/zlib.h" 3 4 20472: extern int deflateTune (z_streamp strm, int good_length, int max_lazy, int nice_length, int max_chain) 20472: 20472: 20472: 20472: ; 20472: # 760 "/usr/include/zlib.h" 3 4 20472: extern uLong deflateBound (z_streamp strm, uLong sourceLen) 20472: ; 20472: # 775 "/usr/include/zlib.h" 3 4 20472: extern int deflatePending (z_streamp strm, unsigned *pending, int *bits) 20472: 20472: ; 20472: # 790 "/usr/include/zlib.h" 3 4 20472: extern int deflatePrime (z_streamp strm, int bits, int value) 20472: 20472: ; 20472: # 807 "/usr/include/zlib.h" 3 4 20472: extern int deflateSetHeader (z_streamp strm, gz_headerp head) 20472: ; 20472: # 884 "/usr/include/zlib.h" 3 4 20472: extern int inflateSetDictionary (z_streamp strm, const Bytef *dictionary, uInt dictLength) 20472: 20472: ; 20472: # 907 "/usr/include/zlib.h" 3 4 20472: extern int inflateGetDictionary (z_streamp strm, Bytef *dictionary, uInt *dictLength) 20472: 20472: ; 20472: # 922 "/usr/include/zlib.h" 3 4 20472: extern int inflateSync (z_streamp strm); 20472: # 941 "/usr/include/zlib.h" 3 4 20472: extern int inflateCopy (z_streamp dest, z_streamp source) 20472: ; 20472: # 957 "/usr/include/zlib.h" 3 4 20472: extern int inflateReset (z_streamp strm); 20472: # 967 "/usr/include/zlib.h" 3 4 20472: extern int inflateReset2 (z_streamp strm, int windowBits) 20472: ; 20472: # 981 "/usr/include/zlib.h" 3 4 20472: extern int inflatePrime (z_streamp strm, int bits, int value) 20472: 20472: ; 20472: # 1002 "/usr/include/zlib.h" 3 4 20472: extern long inflateMark (z_streamp strm); 20472: # 1030 "/usr/include/zlib.h" 3 4 20472: extern int inflateGetHeader (z_streamp strm, gz_headerp head) 20472: ; 20472: # 1092 "/usr/include/zlib.h" 3 4 20472: typedef unsigned (*in_func) (void *, unsigned char * *) 20472: ; 20472: typedef int (*out_func) (void *, unsigned char *, unsigned); 20472: 20472: extern int inflateBack (z_streamp strm, in_func in, void *in_desc, out_func out, void *out_desc) 20472: 20472: ; 20472: # 1166 "/usr/include/zlib.h" 3 4 20472: extern int inflateBackEnd (z_streamp strm); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern uLong zlibCompileFlags (void); 20472: # 1227 "/usr/include/zlib.h" 3 4 20472: extern int compress (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen) 20472: ; 20472: # 1242 "/usr/include/zlib.h" 3 4 20472: extern int compress2 (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen, int level) 20472: 20472: ; 20472: # 1258 "/usr/include/zlib.h" 3 4 20472: extern uLong compressBound (uLong sourceLen); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int uncompress (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen) 20472: ; 20472: # 1283 "/usr/include/zlib.h" 3 4 20472: extern int uncompress2 (Bytef *dest, uLongf *destLen, const Bytef *source, uLong *sourceLen) 20472: ; 20472: # 1300 "/usr/include/zlib.h" 3 4 20472: typedef struct gzFile_s *gzFile; 20472: # 1340 "/usr/include/zlib.h" 3 4 20472: extern gzFile gzdopen (int fd, const char *mode); 20472: # 1363 "/usr/include/zlib.h" 3 4 20472: extern int gzbuffer (gzFile file, unsigned size); 20472: # 1379 "/usr/include/zlib.h" 3 4 20472: extern int gzsetparams (gzFile file, int level, int strategy); 20472: # 1390 "/usr/include/zlib.h" 3 4 20472: extern int gzread (gzFile file, voidp buf, unsigned len); 20472: # 1420 "/usr/include/zlib.h" 3 4 20472: extern z_size_t gzfread (voidp buf, z_size_t size, z_size_t nitems, gzFile file) 20472: ; 20472: # 1446 "/usr/include/zlib.h" 3 4 20472: extern int gzwrite (gzFile file, voidpc buf, unsigned len) 20472: ; 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern z_size_t gzfwrite (voidpc buf, z_size_t size, z_size_t nitems, gzFile file) 20472: ; 20472: # 1468 "/usr/include/zlib.h" 3 4 20472: extern int gzprintf (gzFile file, const char *format, ...); 20472: # 1483 "/usr/include/zlib.h" 3 4 20472: extern int gzputs (gzFile file, const char *s); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern char * gzgets (gzFile file, char *buf, int len); 20472: # 1504 "/usr/include/zlib.h" 3 4 20472: extern int gzputc (gzFile file, int c); 20472: 20472: 20472: 20472: 20472: 20472: extern int gzgetc (gzFile file); 20472: # 1519 "/usr/include/zlib.h" 3 4 20472: extern int gzungetc (int c, gzFile file); 20472: # 1531 "/usr/include/zlib.h" 3 4 20472: extern int gzflush (gzFile file, int flush); 20472: # 1566 "/usr/include/zlib.h" 3 4 20472: extern int gzrewind (gzFile file); 20472: # 1594 "/usr/include/zlib.h" 3 4 20472: extern int gzeof (gzFile file); 20472: # 1609 "/usr/include/zlib.h" 3 4 20472: extern int gzdirect (gzFile file); 20472: # 1630 "/usr/include/zlib.h" 3 4 20472: extern int gzclose (gzFile file); 20472: # 1643 "/usr/include/zlib.h" 3 4 20472: extern int gzclose_r (gzFile file); 20472: extern int gzclose_w (gzFile file); 20472: # 1655 "/usr/include/zlib.h" 3 4 20472: extern const char * gzerror (gzFile file, int *errnum); 20472: # 1671 "/usr/include/zlib.h" 3 4 20472: extern void gzclearerr (gzFile file); 20472: # 1688 "/usr/include/zlib.h" 3 4 20472: extern uLong adler32 (uLong adler, const Bytef *buf, uInt len); 20472: # 1707 "/usr/include/zlib.h" 3 4 20472: extern uLong adler32_z (uLong adler, const Bytef *buf, z_size_t len) 20472: ; 20472: # 1725 "/usr/include/zlib.h" 3 4 20472: extern uLong crc32 (uLong crc, const Bytef *buf, uInt len); 20472: # 1742 "/usr/include/zlib.h" 3 4 20472: extern uLong crc32_z (uLong adler, const Bytef *buf, z_size_t len) 20472: ; 20472: # 1764 "/usr/include/zlib.h" 3 4 20472: extern int deflateInit_ (z_streamp strm, int level, const char *version, int stream_size) 20472: ; 20472: extern int inflateInit_ (z_streamp strm, const char *version, int stream_size) 20472: ; 20472: extern int deflateInit2_ (z_streamp strm, int level, int method, int windowBits, int memLevel, int strategy, const char *version, int stream_size) 20472: 20472: 20472: ; 20472: extern int inflateInit2_ (z_streamp strm, int windowBits, const char *version, int stream_size) 20472: ; 20472: extern int inflateBackInit_ (z_streamp strm, int windowBits, unsigned char *window, const char *version, int stream_size) 20472: 20472: 20472: ; 20472: # 1817 "/usr/include/zlib.h" 3 4 20472: struct gzFile_s { 20472: unsigned have; 20472: unsigned char *next; 20472: off64_t pos; 20472: }; 20472: extern int gzgetc_ (gzFile file); 20472: # 1839 "/usr/include/zlib.h" 3 4 20472: extern gzFile gzopen64 (const char *, const char *); 20472: extern off64_t gzseek64 (gzFile, off64_t, int); 20472: extern off64_t gztell64 (gzFile); 20472: extern off64_t gzoffset64 (gzFile); 20472: extern uLong adler32_combine64 (uLong, uLong, off64_t); 20472: extern uLong crc32_combine64 (uLong, uLong, off64_t); 20472: # 1872 "/usr/include/zlib.h" 3 4 20472: extern gzFile gzopen (const char *, const char *); 20472: extern off_t gzseek (gzFile, off_t, int); 20472: extern off_t gztell (gzFile); 20472: extern off_t gzoffset (gzFile); 20472: extern uLong adler32_combine (uLong, uLong, off_t); 20472: extern uLong crc32_combine (uLong, uLong, off_t); 20472: # 1888 "/usr/include/zlib.h" 3 4 20472: extern const char * zError (int); 20472: extern int inflateSyncPoint (z_streamp); 20472: extern const z_crc_t * get_crc_table (void); 20472: extern int inflateUndermine (z_streamp, int); 20472: extern int inflateValidate (z_streamp, int); 20472: extern unsigned long inflateCodesUsed (z_streamp); 20472: extern int inflateResetKeep (z_streamp); 20472: extern int deflateResetKeep (z_streamp); 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int gzvprintf (gzFile file, const char *format, va_list va) 20472: 20472: ; 20472: 20472: 20472: 20472: 20472: } 20472: # 36 "./util/compression.h" 2 20472: 20472: 20472: 20472: # 1 "/usr/include/bzlib.h" 1 3 4 20472: # 26 "/usr/include/bzlib.h" 3 4 20472: extern "C" { 20472: # 48 "/usr/include/bzlib.h" 3 4 20472: typedef 20472: struct { 20472: char *next_in; 20472: unsigned int avail_in; 20472: unsigned int total_in_lo32; 20472: unsigned int total_in_hi32; 20472: 20472: char *next_out; 20472: unsigned int avail_out; 20472: unsigned int total_out_lo32; 20472: unsigned int total_out_hi32; 20472: 20472: void *state; 20472: 20472: void *(*bzalloc)(void *,int,int); 20472: void (*bzfree)(void *,void *); 20472: void *opaque; 20472: } 20472: bz_stream; 20472: # 100 "/usr/include/bzlib.h" 3 4 20472: extern int BZ2_bzCompressInit ( 20472: bz_stream* strm, 20472: int blockSize100k, 20472: int verbosity, 20472: int workFactor 20472: ); 20472: 20472: extern int BZ2_bzCompress ( 20472: bz_stream* strm, 20472: int action 20472: ); 20472: 20472: extern int BZ2_bzCompressEnd ( 20472: bz_stream* strm 20472: ); 20472: 20472: extern int BZ2_bzDecompressInit ( 20472: bz_stream *strm, 20472: int verbosity, 20472: int small 20472: ); 20472: 20472: extern int BZ2_bzDecompress ( 20472: bz_stream* strm 20472: ); 20472: 20472: extern int BZ2_bzDecompressEnd ( 20472: bz_stream *strm 20472: ); 20472: # 137 "/usr/include/bzlib.h" 3 4 20472: typedef void BZFILE; 20472: 20472: extern BZFILE* BZ2_bzReadOpen ( 20472: int* bzerror, 20472: FILE* f, 20472: int verbosity, 20472: int small, 20472: void* unused, 20472: int nUnused 20472: ); 20472: 20472: extern void BZ2_bzReadClose ( 20472: int* bzerror, 20472: BZFILE* b 20472: ); 20472: 20472: extern void BZ2_bzReadGetUnused ( 20472: int* bzerror, 20472: BZFILE* b, 20472: void** unused, 20472: int* nUnused 20472: ); 20472: 20472: extern int BZ2_bzRead ( 20472: int* bzerror, 20472: BZFILE* b, 20472: void* buf, 20472: int len 20472: ); 20472: 20472: extern BZFILE* BZ2_bzWriteOpen ( 20472: int* bzerror, 20472: FILE* f, 20472: int blockSize100k, 20472: int verbosity, 20472: int workFactor 20472: ); 20472: 20472: extern void BZ2_bzWrite ( 20472: int* bzerror, 20472: BZFILE* b, 20472: void* buf, 20472: int len 20472: ); 20472: 20472: extern void BZ2_bzWriteClose ( 20472: int* bzerror, 20472: BZFILE* b, 20472: int abandon, 20472: unsigned int* nbytes_in, 20472: unsigned int* nbytes_out 20472: ); 20472: 20472: extern void BZ2_bzWriteClose64 ( 20472: int* bzerror, 20472: BZFILE* b, 20472: int abandon, 20472: unsigned int* nbytes_in_lo32, 20472: unsigned int* nbytes_in_hi32, 20472: unsigned int* nbytes_out_lo32, 20472: unsigned int* nbytes_out_hi32 20472: ); 20472: 20472: 20472: 20472: 20472: 20472: extern int BZ2_bzBuffToBuffCompress ( 20472: char* dest, 20472: unsigned int* destLen, 20472: char* source, 20472: unsigned int sourceLen, 20472: int blockSize100k, 20472: int verbosity, 20472: int workFactor 20472: ); 20472: 20472: extern int BZ2_bzBuffToBuffDecompress ( 20472: char* dest, 20472: unsigned int* destLen, 20472: char* source, 20472: unsigned int sourceLen, 20472: int small, 20472: int verbosity 20472: ); 20472: # 233 "/usr/include/bzlib.h" 3 4 20472: extern const char * BZ2_bzlibVersion ( 20472: void 20472: ); 20472: 20472: 20472: extern BZFILE * BZ2_bzopen ( 20472: const char *path, 20472: const char *mode 20472: ); 20472: 20472: extern BZFILE * BZ2_bzdopen ( 20472: int fd, 20472: const char *mode 20472: ); 20472: 20472: extern int BZ2_bzread ( 20472: BZFILE* b, 20472: void* buf, 20472: int len 20472: ); 20472: 20472: extern int BZ2_bzwrite ( 20472: BZFILE* b, 20472: void* buf, 20472: int len 20472: ); 20472: 20472: extern int BZ2_bzflush ( 20472: BZFILE* b 20472: ); 20472: 20472: extern void BZ2_bzclose ( 20472: BZFILE* b 20472: ); 20472: 20472: extern const char * BZ2_bzerror ( 20472: BZFILE *b, 20472: int *errnum 20472: ); 20472: 20472: 20472: 20472: } 20472: # 40 "./util/compression.h" 2 20472: 20472: 20472: 20472: # 1 "/usr/include/lz4.h" 1 3 4 20472: # 36 "/usr/include/lz4.h" 3 4 20472: extern "C" { 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/10/include/stddef.h" 1 3 4 20472: # 44 "/usr/include/lz4.h" 2 3 4 20472: # 112 "/usr/include/lz4.h" 3 4 20472: __attribute__ ((visibility ("default"))) int LZ4_versionNumber (void); 20472: __attribute__ ((visibility ("default"))) const char* LZ4_versionString (void); 20472: # 148 "/usr/include/lz4.h" 3 4 20472: __attribute__ ((visibility ("default"))) int LZ4_compress_default(const char* src, char* dst, int srcSize, int dstCapacity); 20472: # 164 "/usr/include/lz4.h" 3 4 20472: __attribute__ ((visibility ("default"))) int LZ4_decompress_safe (const char* src, char* dst, int compressedSize, int dstCapacity); 20472: # 182 "/usr/include/lz4.h" 3 4 20472: __attribute__ ((visibility ("default"))) int LZ4_compressBound(int inputSize); 20472: # 192 "/usr/include/lz4.h" 3 4 20472: __attribute__ ((visibility ("default"))) int LZ4_compress_fast (const char* src, char* dst, int srcSize, int dstCapacity, int acceleration); 20472: # 201 "/usr/include/lz4.h" 3 4 20472: __attribute__ ((visibility ("default"))) int LZ4_sizeofState(void); 20472: __attribute__ ((visibility ("default"))) int LZ4_compress_fast_extState (void* state, const char* src, char* dst, int srcSize, int dstCapacity, int acceleration); 20472: # 228 "/usr/include/lz4.h" 3 4 20472: __attribute__ ((visibility ("default"))) int LZ4_compress_destSize (const char* src, char* dst, int* srcSizePtr, int targetDstSize); 20472: # 265 "/usr/include/lz4.h" 3 4 20472: __attribute__ ((visibility ("default"))) int LZ4_decompress_safe_partial (const char* src, char* dst, int srcSize, int targetOutputSize, int dstCapacity); 20472: 20472: 20472: 20472: 20472: 20472: typedef union LZ4_stream_u LZ4_stream_t; 20472: 20472: __attribute__ ((visibility ("default"))) LZ4_stream_t* LZ4_createStream(void); 20472: __attribute__ ((visibility ("default"))) int LZ4_freeStream (LZ4_stream_t* streamPtr); 20472: # 298 "/usr/include/lz4.h" 3 4 20472: __attribute__ ((visibility ("default"))) void LZ4_resetStream_fast (LZ4_stream_t* streamPtr); 20472: # 311 "/usr/include/lz4.h" 3 4 20472: __attribute__ ((visibility ("default"))) int LZ4_loadDict (LZ4_stream_t* streamPtr, const char* dictionary, int dictSize); 20472: # 336 "/usr/include/lz4.h" 3 4 20472: __attribute__ ((visibility ("default"))) int LZ4_compress_fast_continue (LZ4_stream_t* streamPtr, const char* src, char* dst, int srcSize, int dstCapacity, int acceleration); 20472: # 345 "/usr/include/lz4.h" 3 4 20472: __attribute__ ((visibility ("default"))) int LZ4_saveDict (LZ4_stream_t* streamPtr, char* safeBuffer, int maxDictSize); 20472: 20472: 20472: 20472: 20472: 20472: 20472: typedef union LZ4_streamDecode_u LZ4_streamDecode_t; 20472: 20472: 20472: 20472: 20472: 20472: __attribute__ ((visibility ("default"))) LZ4_streamDecode_t* LZ4_createStreamDecode(void); 20472: __attribute__ ((visibility ("default"))) int LZ4_freeStreamDecode (LZ4_streamDecode_t* LZ4_stream); 20472: # 368 "/usr/include/lz4.h" 3 4 20472: __attribute__ ((visibility ("default"))) int LZ4_setStreamDecode (LZ4_streamDecode_t* LZ4_streamDecode, const char* dictionary, int dictSize); 20472: # 381 "/usr/include/lz4.h" 3 4 20472: __attribute__ ((visibility ("default"))) int LZ4_decoderRingBufferSize(int maxBlockSize); 20472: # 409 "/usr/include/lz4.h" 3 4 20472: __attribute__ ((visibility ("default"))) int LZ4_decompress_safe_continue (LZ4_streamDecode_t* LZ4_streamDecode, const char* src, char* dst, int srcSize, int dstCapacity); 20472: # 420 "/usr/include/lz4.h" 3 4 20472: __attribute__ ((visibility ("default"))) int LZ4_decompress_safe_usingDict (const char* src, char* dst, int srcSize, int dstCapcity, const char* dictStart, int dictSize); 20472: # 584 "/usr/include/lz4.h" 3 4 20472: typedef int8_t LZ4_i8; 20472: typedef uint8_t LZ4_byte; 20472: typedef uint16_t LZ4_u16; 20472: typedef uint32_t LZ4_u32; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: typedef struct LZ4_stream_t_internal LZ4_stream_t_internal; 20472: struct LZ4_stream_t_internal { 20472: LZ4_u32 hashTable[(1 << (14 -2))]; 20472: LZ4_u32 currentOffset; 20472: LZ4_u32 tableType; 20472: const LZ4_byte* dictionary; 20472: const LZ4_stream_t_internal* dictCtx; 20472: LZ4_u32 dictSize; 20472: }; 20472: 20472: typedef struct { 20472: const LZ4_byte* externalDict; 20472: size_t extDictSize; 20472: const LZ4_byte* prefixEnd; 20472: size_t prefixSize; 20472: } LZ4_streamDecode_t_internal; 20472: # 625 "/usr/include/lz4.h" 3 4 20472: union LZ4_stream_u { 20472: void* table[(16416 / sizeof(void*))]; 20472: LZ4_stream_t_internal internal_donotuse; 20472: }; 20472: # 645 "/usr/include/lz4.h" 3 4 20472: __attribute__ ((visibility ("default"))) LZ4_stream_t* LZ4_initStream (void* buffer, size_t size); 20472: # 657 "/usr/include/lz4.h" 3 4 20472: union LZ4_streamDecode_u { 20472: unsigned long long table[(4 + ((sizeof(void*)==16) ? 2 : 0) )]; 20472: LZ4_streamDecode_t_internal internal_donotuse; 20472: } ; 20472: # 697 "/usr/include/lz4.h" 3 4 20472: __attribute__((deprecated("use LZ4_compress_default() instead"))) __attribute__ ((visibility ("default"))) int LZ4_compress (const char* src, char* dest, int srcSize); 20472: __attribute__((deprecated("use LZ4_compress_default() instead"))) __attribute__ ((visibility ("default"))) int LZ4_compress_limitedOutput (const char* src, char* dest, int srcSize, int maxOutputSize); 20472: __attribute__((deprecated("use LZ4_compress_fast_extState() instead"))) __attribute__ ((visibility ("default"))) int LZ4_compress_withState (void* state, const char* source, char* dest, int inputSize); 20472: __attribute__((deprecated("use LZ4_compress_fast_extState() instead"))) __attribute__ ((visibility ("default"))) int LZ4_compress_limitedOutput_withState (void* state, const char* source, char* dest, int inputSize, int maxOutputSize); 20472: __attribute__((deprecated("use LZ4_compress_fast_continue() instead"))) __attribute__ ((visibility ("default"))) int LZ4_compress_continue (LZ4_stream_t* LZ4_streamPtr, const char* source, char* dest, int inputSize); 20472: __attribute__((deprecated("use LZ4_compress_fast_continue() instead"))) __attribute__ ((visibility ("default"))) int LZ4_compress_limitedOutput_continue (LZ4_stream_t* LZ4_streamPtr, const char* source, char* dest, int inputSize, int maxOutputSize); 20472: 20472: 20472: __attribute__((deprecated("use LZ4_decompress_fast() instead"))) __attribute__ ((visibility ("default"))) int LZ4_uncompress (const char* source, char* dest, int outputSize); 20472: __attribute__((deprecated("use LZ4_decompress_safe() instead"))) __attribute__ ((visibility ("default"))) int LZ4_uncompress_unknownOutputSize (const char* source, char* dest, int isize, int maxOutputSize); 20472: # 718 "/usr/include/lz4.h" 3 4 20472: __attribute__((deprecated("Use LZ4_createStream() instead"))) __attribute__ ((visibility ("default"))) void* LZ4_create (char* inputBuffer); 20472: __attribute__((deprecated("Use LZ4_createStream() instead"))) __attribute__ ((visibility ("default"))) int LZ4_sizeofStreamState(void); 20472: __attribute__((deprecated("Use LZ4_resetStream() instead"))) __attribute__ ((visibility ("default"))) int LZ4_resetStreamState(void* state, char* inputBuffer); 20472: __attribute__((deprecated("Use LZ4_saveDict() instead"))) __attribute__ ((visibility ("default"))) char* LZ4_slideInputBuffer (void* state); 20472: 20472: 20472: __attribute__((deprecated("use LZ4_decompress_safe_usingDict() instead"))) __attribute__ ((visibility ("default"))) int LZ4_decompress_safe_withPrefix64k (const char* src, char* dst, int compressedSize, int maxDstSize); 20472: __attribute__((deprecated("use LZ4_decompress_fast_usingDict() instead"))) __attribute__ ((visibility ("default"))) int LZ4_decompress_fast_withPrefix64k (const char* src, char* dst, int originalSize); 20472: # 753 "/usr/include/lz4.h" 3 4 20472: __attribute__((deprecated("This function is deprecated and unsafe. Consider using LZ4_decompress_safe() instead"))) 20472: __attribute__ ((visibility ("default"))) int LZ4_decompress_fast (const char* src, char* dst, int originalSize); 20472: __attribute__((deprecated("This function is deprecated and unsafe. Consider using LZ4_decompress_safe_continue() instead"))) 20472: __attribute__ ((visibility ("default"))) int LZ4_decompress_fast_continue (LZ4_streamDecode_t* LZ4_streamDecode, const char* src, char* dst, int originalSize); 20472: __attribute__((deprecated("This function is deprecated and unsafe. Consider using LZ4_decompress_safe_usingDict() instead"))) 20472: __attribute__ ((visibility ("default"))) int LZ4_decompress_fast_usingDict (const char* src, char* dst, int originalSize, const char* dictStart, int dictSize); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: __attribute__ ((visibility ("default"))) void LZ4_resetStream (LZ4_stream_t* streamPtr); 20472: 20472: 20472: 20472: 20472: 20472: 20472: } 20472: # 44 "./util/compression.h" 2 20472: # 1 "/usr/include/lz4hc.h" 1 3 4 20472: # 38 "/usr/include/lz4hc.h" 3 4 20472: extern "C" { 20472: 20472: 20472: 20472: 20472: # 1 "/usr/include/lz4.h" 1 3 4 20472: # 36 "/usr/include/lz4.h" 3 4 20472: extern "C" { 20472: # 773 "/usr/include/lz4.h" 3 4 20472: } 20472: # 44 "/usr/include/lz4hc.h" 2 3 4 20472: # 66 "/usr/include/lz4hc.h" 3 4 20472: __attribute__ ((visibility ("default"))) int LZ4_compress_HC (const char* src, char* dst, int srcSize, int dstCapacity, int compressionLevel); 20472: # 79 "/usr/include/lz4hc.h" 3 4 20472: __attribute__ ((visibility ("default"))) int LZ4_sizeofStateHC(void); 20472: __attribute__ ((visibility ("default"))) int LZ4_compress_HC_extStateHC(void* stateHC, const char* src, char* dst, int srcSize, int maxDstSize, int compressionLevel); 20472: # 91 "/usr/include/lz4hc.h" 3 4 20472: __attribute__ ((visibility ("default"))) int LZ4_compress_HC_destSize(void* stateHC, 20472: const char* src, char* dst, 20472: int* srcSizePtr, int targetDstSize, 20472: int compressionLevel); 20472: 20472: 20472: 20472: 20472: 20472: 20472: typedef union LZ4_streamHC_u LZ4_streamHC_t; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: __attribute__ ((visibility ("default"))) LZ4_streamHC_t* LZ4_createStreamHC(void); 20472: __attribute__ ((visibility ("default"))) int LZ4_freeStreamHC (LZ4_streamHC_t* streamHCPtr); 20472: # 155 "/usr/include/lz4hc.h" 3 4 20472: __attribute__ ((visibility ("default"))) void LZ4_resetStreamHC_fast(LZ4_streamHC_t* streamHCPtr, int compressionLevel); 20472: __attribute__ ((visibility ("default"))) int LZ4_loadDictHC (LZ4_streamHC_t* streamHCPtr, const char* dictionary, int dictSize); 20472: 20472: __attribute__ ((visibility ("default"))) int LZ4_compress_HC_continue (LZ4_streamHC_t* streamHCPtr, 20472: const char* src, char* dst, 20472: int srcSize, int maxDstSize); 20472: # 172 "/usr/include/lz4hc.h" 3 4 20472: __attribute__ ((visibility ("default"))) int LZ4_compress_HC_continue_destSize(LZ4_streamHC_t* LZ4_streamHCPtr, 20472: const char* src, char* dst, 20472: int* srcSizePtr, int targetDstSize); 20472: 20472: __attribute__ ((visibility ("default"))) int LZ4_saveDictHC (LZ4_streamHC_t* streamHCPtr, char* safeBuffer, int maxDictSize); 20472: # 201 "/usr/include/lz4hc.h" 3 4 20472: typedef struct LZ4HC_CCtx_internal LZ4HC_CCtx_internal; 20472: struct LZ4HC_CCtx_internal 20472: { 20472: LZ4_u32 hashTable[(1 << 15)]; 20472: LZ4_u16 chainTable[(1<<16)]; 20472: const LZ4_byte* end; 20472: const LZ4_byte* base; 20472: const LZ4_byte* dictBase; 20472: LZ4_u32 dictLimit; 20472: LZ4_u32 lowLimit; 20472: LZ4_u32 nextToUpdate; 20472: short compressionLevel; 20472: LZ4_i8 favorDecSpeed; 20472: 20472: LZ4_i8 dirty; 20472: const LZ4HC_CCtx_internal* dictCtx; 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: union LZ4_streamHC_u { 20472: void* table[(262200 / sizeof(void*))]; 20472: LZ4HC_CCtx_internal internal_donotuse; 20472: }; 20472: # 247 "/usr/include/lz4hc.h" 3 4 20472: __attribute__ ((visibility ("default"))) LZ4_streamHC_t* LZ4_initStreamHC (void* buffer, size_t size); 20472: # 256 "/usr/include/lz4hc.h" 3 4 20472: __attribute__((deprecated("use LZ4_compress_HC() instead"))) __attribute__ ((visibility ("default"))) int LZ4_compressHC (const char* source, char* dest, int inputSize); 20472: __attribute__((deprecated("use LZ4_compress_HC() instead"))) __attribute__ ((visibility ("default"))) int LZ4_compressHC_limitedOutput (const char* source, char* dest, int inputSize, int maxOutputSize); 20472: __attribute__((deprecated("use LZ4_compress_HC() instead"))) __attribute__ ((visibility ("default"))) int LZ4_compressHC2 (const char* source, char* dest, int inputSize, int compressionLevel); 20472: __attribute__((deprecated("use LZ4_compress_HC() instead"))) __attribute__ ((visibility ("default"))) int LZ4_compressHC2_limitedOutput(const char* source, char* dest, int inputSize, int maxOutputSize, int compressionLevel); 20472: __attribute__((deprecated("use LZ4_compress_HC_extStateHC() instead"))) __attribute__ ((visibility ("default"))) int LZ4_compressHC_withStateHC (void* state, const char* source, char* dest, int inputSize); 20472: __attribute__((deprecated("use LZ4_compress_HC_extStateHC() instead"))) __attribute__ ((visibility ("default"))) int LZ4_compressHC_limitedOutput_withStateHC (void* state, const char* source, char* dest, int inputSize, int maxOutputSize); 20472: __attribute__((deprecated("use LZ4_compress_HC_extStateHC() instead"))) __attribute__ ((visibility ("default"))) int LZ4_compressHC2_withStateHC (void* state, const char* source, char* dest, int inputSize, int compressionLevel); 20472: __attribute__((deprecated("use LZ4_compress_HC_extStateHC() instead"))) __attribute__ ((visibility ("default"))) int LZ4_compressHC2_limitedOutput_withStateHC(void* state, const char* source, char* dest, int inputSize, int maxOutputSize, int compressionLevel); 20472: __attribute__((deprecated("use LZ4_compress_HC_continue() instead"))) __attribute__ ((visibility ("default"))) int LZ4_compressHC_continue (LZ4_streamHC_t* LZ4_streamHCPtr, const char* source, char* dest, int inputSize); 20472: __attribute__((deprecated("use LZ4_compress_HC_continue() instead"))) __attribute__ ((visibility ("default"))) int LZ4_compressHC_limitedOutput_continue (LZ4_streamHC_t* LZ4_streamHCPtr, const char* source, char* dest, int inputSize, int maxOutputSize); 20472: # 275 "/usr/include/lz4hc.h" 3 4 20472: __attribute__((deprecated("use LZ4_createStreamHC() instead"))) __attribute__ ((visibility ("default"))) void* LZ4_createHC (const char* inputBuffer); 20472: __attribute__((deprecated("use LZ4_saveDictHC() instead"))) __attribute__ ((visibility ("default"))) char* LZ4_slideInputBufferHC (void* LZ4HC_Data); 20472: __attribute__((deprecated("use LZ4_freeStreamHC() instead"))) __attribute__ ((visibility ("default"))) int LZ4_freeHC (void* LZ4HC_Data); 20472: __attribute__((deprecated("use LZ4_compress_HC_continue() instead"))) __attribute__ ((visibility ("default"))) int LZ4_compressHC2_continue (void* LZ4HC_Data, const char* source, char* dest, int inputSize, int compressionLevel); 20472: __attribute__((deprecated("use LZ4_compress_HC_continue() instead"))) __attribute__ ((visibility ("default"))) int LZ4_compressHC2_limitedOutput_continue (void* LZ4HC_Data, const char* source, char* dest, int inputSize, int maxOutputSize, int compressionLevel); 20472: __attribute__((deprecated("use LZ4_createStreamHC() instead"))) __attribute__ ((visibility ("default"))) int LZ4_sizeofStreamStateHC(void); 20472: __attribute__((deprecated("use LZ4_initStreamHC() instead"))) __attribute__ ((visibility ("default"))) int LZ4_resetStreamStateHC(void* state, char* inputBuffer); 20472: # 292 "/usr/include/lz4hc.h" 3 4 20472: __attribute__ ((visibility ("default"))) void LZ4_resetStreamHC (LZ4_streamHC_t* streamHCPtr, int compressionLevel); 20472: 20472: 20472: 20472: } 20472: # 45 "./util/compression.h" 2 20472: 20472: 20472: 20472: # 1 "/usr/include/zstd.h" 1 3 4 20472: # 11 "/usr/include/zstd.h" 3 4 20472: extern "C" { 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/10/include/limits.h" 1 3 4 20472: # 19 "/usr/include/zstd.h" 2 3 4 20472: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/10/include/stddef.h" 1 3 4 20472: # 20 "/usr/include/zstd.h" 2 3 4 20472: # 80 "/usr/include/zstd.h" 3 4 20472: __attribute__ ((visibility ("default"))) unsigned ZSTD_versionNumber(void); 20472: # 89 "/usr/include/zstd.h" 3 4 20472: __attribute__ ((visibility ("default"))) const char* ZSTD_versionString(void); 20472: # 121 "/usr/include/zstd.h" 3 4 20472: __attribute__ ((visibility ("default"))) size_t ZSTD_compress( void* dst, size_t dstCapacity, 20472: const void* src, size_t srcSize, 20472: int compressionLevel); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: __attribute__ ((visibility ("default"))) size_t ZSTD_decompress( void* dst, size_t dstCapacity, 20472: const void* src, size_t compressedSize); 20472: # 159 "/usr/include/zstd.h" 3 4 20472: __attribute__ ((visibility ("default"))) unsigned long long ZSTD_getFrameContentSize(const void *src, size_t srcSize); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: __attribute__ ((visibility ("default"))) unsigned long long ZSTD_getDecompressedSize(const void* src, size_t srcSize); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: __attribute__ ((visibility ("default"))) size_t ZSTD_findFrameCompressedSize(const void* src, size_t srcSize); 20472: 20472: 20472: 20472: 20472: __attribute__ ((visibility ("default"))) size_t ZSTD_compressBound(size_t srcSize); 20472: __attribute__ ((visibility ("default"))) unsigned ZSTD_isError(size_t code); 20472: __attribute__ ((visibility ("default"))) const char* ZSTD_getErrorName(size_t code); 20472: __attribute__ ((visibility ("default"))) int ZSTD_minCLevel(void); 20472: __attribute__ ((visibility ("default"))) int ZSTD_maxCLevel(void); 20472: # 200 "/usr/include/zstd.h" 3 4 20472: typedef struct ZSTD_CCtx_s ZSTD_CCtx; 20472: __attribute__ ((visibility ("default"))) ZSTD_CCtx* ZSTD_createCCtx(void); 20472: __attribute__ ((visibility ("default"))) size_t ZSTD_freeCCtx(ZSTD_CCtx* cctx); 20472: # 212 "/usr/include/zstd.h" 3 4 20472: __attribute__ ((visibility ("default"))) size_t ZSTD_compressCCtx(ZSTD_CCtx* cctx, 20472: void* dst, size_t dstCapacity, 20472: const void* src, size_t srcSize, 20472: int compressionLevel); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: typedef struct ZSTD_DCtx_s ZSTD_DCtx; 20472: __attribute__ ((visibility ("default"))) ZSTD_DCtx* ZSTD_createDCtx(void); 20472: __attribute__ ((visibility ("default"))) size_t ZSTD_freeDCtx(ZSTD_DCtx* dctx); 20472: 20472: 20472: 20472: 20472: 20472: 20472: __attribute__ ((visibility ("default"))) size_t ZSTD_decompressDCtx(ZSTD_DCtx* dctx, 20472: void* dst, size_t dstCapacity, 20472: const void* src, size_t srcSize); 20472: # 256 "/usr/include/zstd.h" 3 4 20472: typedef enum { ZSTD_fast=1, 20472: ZSTD_dfast=2, 20472: ZSTD_greedy=3, 20472: ZSTD_lazy=4, 20472: ZSTD_lazy2=5, 20472: ZSTD_btlazy2=6, 20472: ZSTD_btopt=7, 20472: ZSTD_btultra=8, 20472: ZSTD_btultra2=9 20472: 20472: 20472: } ZSTD_strategy; 20472: 20472: 20472: typedef enum { 20472: 20472: 20472: 20472: 20472: 20472: ZSTD_c_compressionLevel=100, 20472: # 289 "/usr/include/zstd.h" 3 4 20472: ZSTD_c_windowLog=101, 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: ZSTD_c_hashLog=102, 20472: 20472: 20472: 20472: 20472: 20472: ZSTD_c_chainLog=103, 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: ZSTD_c_searchLog=104, 20472: 20472: 20472: 20472: ZSTD_c_minMatch=105, 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: ZSTD_c_targetLength=106, 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: ZSTD_c_strategy=107, 20472: 20472: 20472: 20472: 20472: 20472: ZSTD_c_enableLongDistanceMatching=160, 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: ZSTD_c_ldmHashLog=161, 20472: 20472: 20472: 20472: 20472: 20472: ZSTD_c_ldmMinMatch=162, 20472: 20472: 20472: 20472: ZSTD_c_ldmBucketSizeLog=163, 20472: 20472: 20472: 20472: ZSTD_c_ldmHashRateLog=164, 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: ZSTD_c_contentSizeFlag=200, 20472: 20472: 20472: 20472: ZSTD_c_checksumFlag=201, 20472: ZSTD_c_dictIDFlag=202, 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: ZSTD_c_nbWorkers=400, 20472: # 389 "/usr/include/zstd.h" 3 4 20472: ZSTD_c_jobSize=401, 20472: 20472: 20472: 20472: 20472: ZSTD_c_overlapLog=402, 20472: # 426 "/usr/include/zstd.h" 3 4 20472: ZSTD_c_experimentalParam1=500, 20472: ZSTD_c_experimentalParam2=10, 20472: ZSTD_c_experimentalParam3=1000, 20472: ZSTD_c_experimentalParam4=1001, 20472: ZSTD_c_experimentalParam5=1002, 20472: ZSTD_c_experimentalParam6=1003, 20472: ZSTD_c_experimentalParam7=1004, 20472: ZSTD_c_experimentalParam8=1005, 20472: ZSTD_c_experimentalParam9=1006, 20472: ZSTD_c_experimentalParam10=1007, 20472: ZSTD_c_experimentalParam11=1008, 20472: ZSTD_c_experimentalParam12=1009 20472: } ZSTD_cParameter; 20472: 20472: typedef struct { 20472: size_t error; 20472: int lowerBound; 20472: int upperBound; 20472: } ZSTD_bounds; 20472: # 453 "/usr/include/zstd.h" 3 4 20472: __attribute__ ((visibility ("default"))) ZSTD_bounds ZSTD_cParam_getBounds(ZSTD_cParameter cParam); 20472: # 466 "/usr/include/zstd.h" 3 4 20472: __attribute__ ((visibility ("default"))) size_t ZSTD_CCtx_setParameter(ZSTD_CCtx* cctx, ZSTD_cParameter param, int value); 20472: # 483 "/usr/include/zstd.h" 3 4 20472: __attribute__ ((visibility ("default"))) size_t ZSTD_CCtx_setPledgedSrcSize(ZSTD_CCtx* cctx, unsigned long long pledgedSrcSize); 20472: 20472: typedef enum { 20472: ZSTD_reset_session_only = 1, 20472: ZSTD_reset_parameters = 2, 20472: ZSTD_reset_session_and_parameters = 3 20472: } ZSTD_ResetDirective; 20472: # 505 "/usr/include/zstd.h" 3 4 20472: __attribute__ ((visibility ("default"))) size_t ZSTD_CCtx_reset(ZSTD_CCtx* cctx, ZSTD_ResetDirective reset); 20472: # 517 "/usr/include/zstd.h" 3 4 20472: __attribute__ ((visibility ("default"))) size_t ZSTD_compress2( ZSTD_CCtx* cctx, 20472: void* dst, size_t dstCapacity, 20472: const void* src, size_t srcSize); 20472: # 534 "/usr/include/zstd.h" 3 4 20472: typedef enum { 20472: 20472: ZSTD_d_windowLogMax=100, 20472: # 552 "/usr/include/zstd.h" 3 4 20472: ZSTD_d_experimentalParam1=1000, 20472: ZSTD_d_experimentalParam2=1001, 20472: ZSTD_d_experimentalParam3=1002 20472: 20472: } ZSTD_dParameter; 20472: # 565 "/usr/include/zstd.h" 3 4 20472: __attribute__ ((visibility ("default"))) ZSTD_bounds ZSTD_dParam_getBounds(ZSTD_dParameter dParam); 20472: # 574 "/usr/include/zstd.h" 3 4 20472: __attribute__ ((visibility ("default"))) size_t ZSTD_DCtx_setParameter(ZSTD_DCtx* dctx, ZSTD_dParameter param, int value); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: __attribute__ ((visibility ("default"))) size_t ZSTD_DCtx_reset(ZSTD_DCtx* dctx, ZSTD_ResetDirective reset); 20472: 20472: 20472: 20472: 20472: 20472: 20472: typedef struct ZSTD_inBuffer_s { 20472: const void* src; 20472: size_t size; 20472: size_t pos; 20472: } ZSTD_inBuffer; 20472: 20472: typedef struct ZSTD_outBuffer_s { 20472: void* dst; 20472: size_t size; 20472: size_t pos; 20472: } ZSTD_outBuffer; 20472: # 664 "/usr/include/zstd.h" 3 4 20472: typedef ZSTD_CCtx ZSTD_CStream; 20472: 20472: 20472: __attribute__ ((visibility ("default"))) ZSTD_CStream* ZSTD_createCStream(void); 20472: __attribute__ ((visibility ("default"))) size_t ZSTD_freeCStream(ZSTD_CStream* zcs); 20472: 20472: 20472: typedef enum { 20472: ZSTD_e_continue=0, 20472: ZSTD_e_flush=1, 20472: 20472: 20472: 20472: ZSTD_e_end=2 20472: 20472: 20472: 20472: 20472: } ZSTD_EndDirective; 20472: # 706 "/usr/include/zstd.h" 3 4 20472: __attribute__ ((visibility ("default"))) size_t ZSTD_compressStream2( ZSTD_CCtx* cctx, 20472: ZSTD_outBuffer* output, 20472: ZSTD_inBuffer* input, 20472: ZSTD_EndDirective endOp); 20472: # 725 "/usr/include/zstd.h" 3 4 20472: __attribute__ ((visibility ("default"))) size_t ZSTD_CStreamInSize(void); 20472: __attribute__ ((visibility ("default"))) size_t ZSTD_CStreamOutSize(void); 20472: # 744 "/usr/include/zstd.h" 3 4 20472: __attribute__ ((visibility ("default"))) size_t ZSTD_initCStream(ZSTD_CStream* zcs, int compressionLevel); 20472: 20472: 20472: 20472: 20472: 20472: 20472: __attribute__ ((visibility ("default"))) size_t ZSTD_compressStream(ZSTD_CStream* zcs, ZSTD_outBuffer* output, ZSTD_inBuffer* input); 20472: 20472: __attribute__ ((visibility ("default"))) size_t ZSTD_flushStream(ZSTD_CStream* zcs, ZSTD_outBuffer* output); 20472: 20472: __attribute__ ((visibility ("default"))) size_t ZSTD_endStream(ZSTD_CStream* zcs, ZSTD_outBuffer* output); 20472: # 785 "/usr/include/zstd.h" 3 4 20472: typedef ZSTD_DCtx ZSTD_DStream; 20472: 20472: 20472: __attribute__ ((visibility ("default"))) ZSTD_DStream* ZSTD_createDStream(void); 20472: __attribute__ ((visibility ("default"))) size_t ZSTD_freeDStream(ZSTD_DStream* zds); 20472: # 798 "/usr/include/zstd.h" 3 4 20472: __attribute__ ((visibility ("default"))) size_t ZSTD_initDStream(ZSTD_DStream* zds); 20472: 20472: __attribute__ ((visibility ("default"))) size_t ZSTD_decompressStream(ZSTD_DStream* zds, ZSTD_outBuffer* output, ZSTD_inBuffer* input); 20472: 20472: __attribute__ ((visibility ("default"))) size_t ZSTD_DStreamInSize(void); 20472: __attribute__ ((visibility ("default"))) size_t ZSTD_DStreamOutSize(void); 20472: # 816 "/usr/include/zstd.h" 3 4 20472: __attribute__ ((visibility ("default"))) size_t ZSTD_compress_usingDict(ZSTD_CCtx* ctx, 20472: void* dst, size_t dstCapacity, 20472: const void* src, size_t srcSize, 20472: const void* dict,size_t dictSize, 20472: int compressionLevel); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: __attribute__ ((visibility ("default"))) size_t ZSTD_decompress_usingDict(ZSTD_DCtx* dctx, 20472: void* dst, size_t dstCapacity, 20472: const void* src, size_t srcSize, 20472: const void* dict,size_t dictSize); 20472: 20472: 20472: 20472: 20472: 20472: typedef struct ZSTD_CDict_s ZSTD_CDict; 20472: # 851 "/usr/include/zstd.h" 3 4 20472: __attribute__ ((visibility ("default"))) ZSTD_CDict* ZSTD_createCDict(const void* dictBuffer, size_t dictSize, 20472: int compressionLevel); 20472: 20472: 20472: 20472: __attribute__ ((visibility ("default"))) size_t ZSTD_freeCDict(ZSTD_CDict* CDict); 20472: 20472: 20472: 20472: 20472: 20472: 20472: __attribute__ ((visibility ("default"))) size_t ZSTD_compress_usingCDict(ZSTD_CCtx* cctx, 20472: void* dst, size_t dstCapacity, 20472: const void* src, size_t srcSize, 20472: const ZSTD_CDict* cdict); 20472: 20472: 20472: typedef struct ZSTD_DDict_s ZSTD_DDict; 20472: 20472: 20472: 20472: 20472: __attribute__ ((visibility ("default"))) ZSTD_DDict* ZSTD_createDDict(const void* dictBuffer, size_t dictSize); 20472: 20472: 20472: 20472: __attribute__ ((visibility ("default"))) size_t ZSTD_freeDDict(ZSTD_DDict* ddict); 20472: 20472: 20472: 20472: 20472: __attribute__ ((visibility ("default"))) size_t ZSTD_decompress_usingDDict(ZSTD_DCtx* dctx, 20472: void* dst, size_t dstCapacity, 20472: const void* src, size_t srcSize, 20472: const ZSTD_DDict* ddict); 20472: # 897 "/usr/include/zstd.h" 3 4 20472: __attribute__ ((visibility ("default"))) unsigned ZSTD_getDictID_fromDict(const void* dict, size_t dictSize); 20472: 20472: 20472: 20472: 20472: 20472: __attribute__ ((visibility ("default"))) unsigned ZSTD_getDictID_fromDDict(const ZSTD_DDict* ddict); 20472: # 915 "/usr/include/zstd.h" 3 4 20472: __attribute__ ((visibility ("default"))) unsigned ZSTD_getDictID_fromFrame(const void* src, size_t srcSize); 20472: # 945 "/usr/include/zstd.h" 3 4 20472: __attribute__ ((visibility ("default"))) size_t ZSTD_CCtx_loadDictionary(ZSTD_CCtx* cctx, const void* dict, size_t dictSize); 20472: # 959 "/usr/include/zstd.h" 3 4 20472: __attribute__ ((visibility ("default"))) size_t ZSTD_CCtx_refCDict(ZSTD_CCtx* cctx, const ZSTD_CDict* cdict); 20472: # 979 "/usr/include/zstd.h" 3 4 20472: __attribute__ ((visibility ("default"))) size_t ZSTD_CCtx_refPrefix(ZSTD_CCtx* cctx, 20472: const void* prefix, size_t prefixSize); 20472: # 997 "/usr/include/zstd.h" 3 4 20472: __attribute__ ((visibility ("default"))) size_t ZSTD_DCtx_loadDictionary(ZSTD_DCtx* dctx, const void* dict, size_t dictSize); 20472: # 1008 "/usr/include/zstd.h" 3 4 20472: __attribute__ ((visibility ("default"))) size_t ZSTD_DCtx_refDDict(ZSTD_DCtx* dctx, const ZSTD_DDict* ddict); 20472: # 1026 "/usr/include/zstd.h" 3 4 20472: __attribute__ ((visibility ("default"))) size_t ZSTD_DCtx_refPrefix(ZSTD_DCtx* dctx, 20472: const void* prefix, size_t prefixSize); 20472: 20472: 20472: 20472: 20472: 20472: 20472: __attribute__ ((visibility ("default"))) size_t ZSTD_sizeof_CCtx(const ZSTD_CCtx* cctx); 20472: __attribute__ ((visibility ("default"))) size_t ZSTD_sizeof_DCtx(const ZSTD_DCtx* dctx); 20472: __attribute__ ((visibility ("default"))) size_t ZSTD_sizeof_CStream(const ZSTD_CStream* zcs); 20472: __attribute__ ((visibility ("default"))) size_t ZSTD_sizeof_DStream(const ZSTD_DStream* zds); 20472: __attribute__ ((visibility ("default"))) size_t ZSTD_sizeof_CDict(const ZSTD_CDict* cdict); 20472: __attribute__ ((visibility ("default"))) size_t ZSTD_sizeof_DDict(const ZSTD_DDict* ddict); 20472: # 2390 "/usr/include/zstd.h" 3 4 20472: } 20472: # 49 "./util/compression.h" 2 20472: 20472: # 1 "/usr/include/zdict.h" 1 3 4 20472: # 15 "/usr/include/zdict.h" 3 4 20472: extern "C" { 20472: 20472: 20472: 20472: 20472: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/10/include/stddef.h" 1 3 4 20472: # 21 "/usr/include/zdict.h" 2 3 4 20472: # 60 "/usr/include/zdict.h" 3 4 20472: __attribute__ ((visibility ("default"))) size_t ZDICT_trainFromBuffer(void* dictBuffer, size_t dictBufferCapacity, 20472: const void* samplesBuffer, 20472: const size_t* samplesSizes, unsigned nbSamples); 20472: 20472: typedef struct { 20472: int compressionLevel; 20472: unsigned notificationLevel; 20472: unsigned dictID; 20472: } ZDICT_params_t; 20472: # 106 "/usr/include/zdict.h" 3 4 20472: __attribute__ ((visibility ("default"))) size_t ZDICT_finalizeDictionary(void* dstDictBuffer, size_t maxDictSize, 20472: const void* dictContent, size_t dictContentSize, 20472: const void* samplesBuffer, const size_t* samplesSizes, unsigned nbSamples, 20472: ZDICT_params_t parameters); 20472: 20472: 20472: 20472: __attribute__ ((visibility ("default"))) unsigned ZDICT_getDictID(const void* dictBuffer, size_t dictSize); 20472: __attribute__ ((visibility ("default"))) size_t ZDICT_getDictHeaderSize(const void* dictBuffer, size_t dictSize); 20472: __attribute__ ((visibility ("default"))) unsigned ZDICT_isError(size_t errorCode); 20472: __attribute__ ((visibility ("default"))) const char* ZDICT_getErrorName(size_t errorCode); 20472: # 302 "/usr/include/zdict.h" 3 4 20472: } 20472: # 51 "./util/compression.h" 2 20472: 20472: 20472: # 52 "./util/compression.h" 20472: namespace rocksdb { 20472: # 78 "./util/compression.h" 20472: class ZSTDUncompressCachedData { 20472: public: 20472: using ZSTDNativeContext = ZSTD_DCtx*; 20472: ZSTDUncompressCachedData() {} 20472: 20472: ZSTDUncompressCachedData(const ZSTDUncompressCachedData& o) = delete; 20472: ZSTDUncompressCachedData& operator=(const ZSTDUncompressCachedData&) = delete; 20472: ZSTDUncompressCachedData(ZSTDUncompressCachedData&& o) noexcept 20472: : ZSTDUncompressCachedData() { 20472: *this = std::move(o); 20472: } 20472: ZSTDUncompressCachedData& operator=(ZSTDUncompressCachedData&& o) 20472: noexcept { 20472: 20472: # 91 "./util/compression.h" 3 4 20472: (static_cast ( 20472: # 91 "./util/compression.h" 20472: zstd_ctx_ == nullptr 20472: # 91 "./util/compression.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 91 "./util/compression.h" 20472: "zstd_ctx_ == nullptr" 20472: # 91 "./util/compression.h" 3 4 20472: , "./util/compression.h", 91, __extension__ __PRETTY_FUNCTION__)) 20472: # 91 "./util/compression.h" 20472: ; 20472: std::swap(zstd_ctx_, o.zstd_ctx_); 20472: std::swap(cache_idx_, o.cache_idx_); 20472: return *this; 20472: } 20472: ZSTDNativeContext Get() const { return zstd_ctx_; } 20472: int64_t GetCacheIndex() const { return cache_idx_; } 20472: void CreateIfNeeded() { 20472: if (zstd_ctx_ == nullptr) { 20472: 20472: 20472: 20472: 20472: zstd_ctx_ = ZSTD_createDCtx(); 20472: 20472: cache_idx_ = -1; 20472: } 20472: } 20472: void InitFromCache(const ZSTDUncompressCachedData& o, int64_t idx) { 20472: zstd_ctx_ = o.zstd_ctx_; 20472: cache_idx_ = idx; 20472: } 20472: ~ZSTDUncompressCachedData() { 20472: if (zstd_ctx_ != nullptr && cache_idx_ == -1) { 20472: ZSTD_freeDCtx(zstd_ctx_); 20472: } 20472: } 20472: 20472: private: 20472: ZSTDNativeContext zstd_ctx_ = nullptr; 20472: int64_t cache_idx_ = -1; 20472: }; 20472: 20472: } 20472: # 154 "./util/compression.h" 20472: namespace rocksdb { 20472: 20472: 20472: 20472: struct CompressionDict { 20472: 20472: ZSTD_CDict* zstd_cdict_ = nullptr; 20472: 20472: std::string dict_; 20472: 20472: public: 20472: 20472: CompressionDict(std::string dict, CompressionType type, int level) { 20472: 20472: 20472: 20472: dict_ = std::move(dict); 20472: 20472: zstd_cdict_ = nullptr; 20472: if (!dict_.empty() && (type == kZSTD || type == kZSTDNotFinalCompression)) { 20472: if (level == CompressionOptions::kDefaultCompressionLevel) { 20472: 20472: 20472: level = 3; 20472: } 20472: 20472: 20472: zstd_cdict_ = ZSTD_createCDict(dict_.data(), dict_.size(), level); 20472: 20472: # 182 "./util/compression.h" 3 4 20472: (static_cast ( 20472: # 182 "./util/compression.h" 20472: zstd_cdict_ != nullptr 20472: # 182 "./util/compression.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 182 "./util/compression.h" 20472: "zstd_cdict_ != nullptr" 20472: # 182 "./util/compression.h" 3 4 20472: , "./util/compression.h", 182, __extension__ __PRETTY_FUNCTION__)) 20472: # 182 "./util/compression.h" 20472: ; 20472: } 20472: 20472: } 20472: 20472: ~CompressionDict() { 20472: 20472: size_t res = 0; 20472: if (zstd_cdict_ != nullptr) { 20472: res = ZSTD_freeCDict(zstd_cdict_); 20472: } 20472: 20472: # 193 "./util/compression.h" 3 4 20472: (static_cast ( 20472: # 193 "./util/compression.h" 20472: res == 0 20472: # 193 "./util/compression.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 193 "./util/compression.h" 20472: "res == 0" 20472: # 193 "./util/compression.h" 3 4 20472: , "./util/compression.h", 193, __extension__ __PRETTY_FUNCTION__)) 20472: # 193 "./util/compression.h" 20472: ; 20472: (void)res; 20472: 20472: } 20472: 20472: 20472: const ZSTD_CDict* GetDigestedZstdCDict() const { return zstd_cdict_; } 20472: 20472: 20472: Slice GetRawDict() const { return dict_; } 20472: 20472: static const CompressionDict& GetEmptyDict() { 20472: static CompressionDict empty_dict{}; 20472: return empty_dict; 20472: } 20472: 20472: CompressionDict() = default; 20472: 20472: CompressionDict(const CompressionDict&) = delete; 20472: CompressionDict& operator=(const CompressionDict&) = delete; 20472: CompressionDict(CompressionDict&&) = delete; 20472: CompressionDict& operator=(CompressionDict&&) = delete; 20472: }; 20472: 20472: 20472: 20472: struct UncompressionDict { 20472: 20472: 20472: std::string dict_; 20472: 20472: 20472: 20472: 20472: CacheAllocationPtr allocation_; 20472: 20472: 20472: 20472: 20472: Slice slice_; 20472: # 242 "./util/compression.h" 20472: UncompressionDict(std::string dict, bool ) 20472: 20472: : dict_(std::move(dict)), slice_(dict_) { 20472: 20472: 20472: 20472: 20472: 20472: 20472: } 20472: 20472: 20472: 20472: 20472: 20472: UncompressionDict(Slice slice, CacheAllocationPtr&& allocation, 20472: bool ) 20472: 20472: : allocation_(std::move(allocation)), slice_(std::move(slice)) { 20472: 20472: 20472: 20472: 20472: 20472: 20472: } 20472: 20472: UncompressionDict(UncompressionDict&& rhs) 20472: : dict_(std::move(rhs.dict_)), 20472: allocation_(std::move(rhs.allocation_)), 20472: slice_(std::move(rhs.slice_)) 20472: 20472: 20472: 20472: 20472: { 20472: 20472: 20472: 20472: } 20472: 20472: ~UncompressionDict() { 20472: # 292 "./util/compression.h" 20472: } 20472: 20472: UncompressionDict& operator=(UncompressionDict&& rhs) { 20472: if (this == &rhs) { 20472: return *this; 20472: } 20472: 20472: dict_ = std::move(rhs.dict_); 20472: allocation_ = std::move(rhs.allocation_); 20472: slice_ = std::move(rhs.slice_); 20472: 20472: 20472: 20472: 20472: 20472: 20472: return *this; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: bool own_bytes() const { return !dict_.empty() || allocation_; } 20472: 20472: const Slice& GetRawDict() const { return slice_; } 20472: 20472: 20472: 20472: 20472: 20472: static const UncompressionDict& GetEmptyDict() { 20472: static UncompressionDict empty_dict{}; 20472: return empty_dict; 20472: } 20472: 20472: size_t ApproximateMemoryUsage() const { 20472: size_t usage = sizeof(struct UncompressionDict); 20472: usage += dict_.size(); 20472: if (allocation_) { 20472: auto allocator = allocation_.get_deleter().allocator; 20472: if (allocator) { 20472: usage += allocator->UsableSize(allocation_.get(), slice_.size()); 20472: } else { 20472: usage += slice_.size(); 20472: } 20472: } 20472: 20472: 20472: 20472: return usage; 20472: } 20472: 20472: UncompressionDict() = default; 20472: 20472: UncompressionDict(const CompressionDict&) = delete; 20472: UncompressionDict& operator=(const CompressionDict&) = delete; 20472: }; 20472: 20472: class CompressionContext { 20472: private: 20472: 20472: ZSTD_CCtx* zstd_ctx_ = nullptr; 20472: void CreateNativeContext(CompressionType type) { 20472: if (type == kZSTD || type == kZSTDNotFinalCompression) { 20472: 20472: 20472: 20472: 20472: zstd_ctx_ = ZSTD_createCCtx(); 20472: 20472: } 20472: } 20472: void DestroyNativeContext() { 20472: if (zstd_ctx_ != nullptr) { 20472: ZSTD_freeCCtx(zstd_ctx_); 20472: } 20472: } 20472: 20472: public: 20472: 20472: ZSTD_CCtx* ZSTDPreallocCtx() const { 20472: 20472: # 374 "./util/compression.h" 3 4 20472: (static_cast ( 20472: # 374 "./util/compression.h" 20472: zstd_ctx_ != nullptr 20472: # 374 "./util/compression.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 374 "./util/compression.h" 20472: "zstd_ctx_ != nullptr" 20472: # 374 "./util/compression.h" 3 4 20472: , "./util/compression.h", 374, __extension__ __PRETTY_FUNCTION__)) 20472: # 374 "./util/compression.h" 20472: ; 20472: return zstd_ctx_; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: public: 20472: explicit CompressionContext(CompressionType type) { 20472: CreateNativeContext(type); 20472: } 20472: ~CompressionContext() { DestroyNativeContext(); } 20472: CompressionContext(const CompressionContext&) = delete; 20472: CompressionContext& operator=(const CompressionContext&) = delete; 20472: }; 20472: 20472: class CompressionInfo { 20472: const CompressionOptions& opts_; 20472: const CompressionContext& context_; 20472: const CompressionDict& dict_; 20472: const CompressionType type_; 20472: const uint64_t sample_for_compression_; 20472: 20472: public: 20472: CompressionInfo(const CompressionOptions& _opts, 20472: const CompressionContext& _context, 20472: const CompressionDict& _dict, CompressionType _type, 20472: uint64_t _sample_for_compression) 20472: : opts_(_opts), 20472: context_(_context), 20472: dict_(_dict), 20472: type_(_type), 20472: sample_for_compression_(_sample_for_compression) {} 20472: 20472: const CompressionOptions& options() const { return opts_; } 20472: const CompressionContext& context() const { return context_; } 20472: const CompressionDict& dict() const { return dict_; } 20472: CompressionType type() const { return type_; } 20472: uint64_t SampleForCompression() const { return sample_for_compression_; } 20472: }; 20472: 20472: class UncompressionContext { 20472: private: 20472: CompressionContextCache* ctx_cache_ = nullptr; 20472: ZSTDUncompressCachedData uncomp_cached_data_; 20472: 20472: public: 20472: explicit UncompressionContext(CompressionType type) { 20472: if (type == kZSTD || type == kZSTDNotFinalCompression) { 20472: ctx_cache_ = CompressionContextCache::Instance(); 20472: uncomp_cached_data_ = ctx_cache_->GetCachedZSTDUncompressData(); 20472: } 20472: } 20472: ~UncompressionContext() { 20472: if (uncomp_cached_data_.GetCacheIndex() != -1) { 20472: 20472: # 431 "./util/compression.h" 3 4 20472: (static_cast ( 20472: # 431 "./util/compression.h" 20472: ctx_cache_ != nullptr 20472: # 431 "./util/compression.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 431 "./util/compression.h" 20472: "ctx_cache_ != nullptr" 20472: # 431 "./util/compression.h" 3 4 20472: , "./util/compression.h", 431, __extension__ __PRETTY_FUNCTION__)) 20472: # 431 "./util/compression.h" 20472: ; 20472: ctx_cache_->ReturnCachedZSTDUncompressData( 20472: uncomp_cached_data_.GetCacheIndex()); 20472: } 20472: } 20472: UncompressionContext(const UncompressionContext&) = delete; 20472: UncompressionContext& operator=(const UncompressionContext&) = delete; 20472: 20472: ZSTDUncompressCachedData::ZSTDNativeContext GetZSTDContext() const { 20472: return uncomp_cached_data_.Get(); 20472: } 20472: }; 20472: 20472: class UncompressionInfo { 20472: const UncompressionContext& context_; 20472: const UncompressionDict& dict_; 20472: const CompressionType type_; 20472: 20472: public: 20472: UncompressionInfo(const UncompressionContext& _context, 20472: const UncompressionDict& _dict, CompressionType _type) 20472: : context_(_context), dict_(_dict), type_(_type) {} 20472: 20472: const UncompressionContext& context() const { return context_; } 20472: const UncompressionDict& dict() const { return dict_; } 20472: CompressionType type() const { return type_; } 20472: }; 20472: 20472: inline bool Snappy_Supported() { 20472: 20472: return true; 20472: 20472: 20472: 20472: } 20472: 20472: inline bool Zlib_Supported() { 20472: 20472: return true; 20472: 20472: 20472: 20472: } 20472: 20472: inline bool BZip2_Supported() { 20472: 20472: return true; 20472: 20472: 20472: 20472: } 20472: 20472: inline bool LZ4_Supported() { 20472: 20472: return true; 20472: 20472: 20472: 20472: } 20472: 20472: inline bool XPRESS_Supported() { 20472: 20472: 20472: 20472: return false; 20472: 20472: } 20472: 20472: inline bool ZSTD_Supported() { 20472: 20472: 20472: return (ZSTD_versionNumber() >= 800); 20472: 20472: 20472: 20472: } 20472: 20472: inline bool ZSTDNotFinal_Supported() { 20472: 20472: return true; 20472: 20472: 20472: 20472: } 20472: 20472: inline bool CompressionTypeSupported(CompressionType compression_type) { 20472: switch (compression_type) { 20472: case kNoCompression: 20472: return true; 20472: case kSnappyCompression: 20472: return Snappy_Supported(); 20472: case kZlibCompression: 20472: return Zlib_Supported(); 20472: case kBZip2Compression: 20472: return BZip2_Supported(); 20472: case kLZ4Compression: 20472: return LZ4_Supported(); 20472: case kLZ4HCCompression: 20472: return LZ4_Supported(); 20472: case kXpressCompression: 20472: return XPRESS_Supported(); 20472: case kZSTDNotFinalCompression: 20472: return ZSTDNotFinal_Supported(); 20472: case kZSTD: 20472: return ZSTD_Supported(); 20472: default: 20472: 20472: # 537 "./util/compression.h" 3 4 20472: (static_cast ( 20472: # 537 "./util/compression.h" 20472: false 20472: # 537 "./util/compression.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 537 "./util/compression.h" 20472: "false" 20472: # 537 "./util/compression.h" 3 4 20472: , "./util/compression.h", 537, __extension__ __PRETTY_FUNCTION__)) 20472: # 537 "./util/compression.h" 20472: ; 20472: return false; 20472: } 20472: } 20472: 20472: inline std::string CompressionTypeToString(CompressionType compression_type) { 20472: switch (compression_type) { 20472: case kNoCompression: 20472: return "NoCompression"; 20472: case kSnappyCompression: 20472: return "Snappy"; 20472: case kZlibCompression: 20472: return "Zlib"; 20472: case kBZip2Compression: 20472: return "BZip2"; 20472: case kLZ4Compression: 20472: return "LZ4"; 20472: case kLZ4HCCompression: 20472: return "LZ4HC"; 20472: case kXpressCompression: 20472: return "Xpress"; 20472: case kZSTD: 20472: return "ZSTD"; 20472: case kZSTDNotFinalCompression: 20472: return "ZSTDNotFinal"; 20472: case kDisableCompressionOption: 20472: return "DisableOption"; 20472: default: 20472: 20472: # 565 "./util/compression.h" 3 4 20472: (static_cast ( 20472: # 565 "./util/compression.h" 20472: false 20472: # 565 "./util/compression.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 565 "./util/compression.h" 20472: "false" 20472: # 565 "./util/compression.h" 3 4 20472: , "./util/compression.h", 565, __extension__ __PRETTY_FUNCTION__)) 20472: # 565 "./util/compression.h" 20472: ; 20472: return ""; 20472: } 20472: } 20472: 20472: inline std::string CompressionOptionsToString( 20472: CompressionOptions& compression_options) { 20472: std::string result; 20472: result.reserve(512); 20472: result.append("window_bits=") 20472: .append(ToString(compression_options.window_bits)) 20472: .append("; "); 20472: result.append("level=") 20472: .append(ToString(compression_options.level)) 20472: .append("; "); 20472: result.append("strategy=") 20472: .append(ToString(compression_options.strategy)) 20472: .append("; "); 20472: result.append("max_dict_bytes=") 20472: .append(ToString(compression_options.max_dict_bytes)) 20472: .append("; "); 20472: result.append("zstd_max_train_bytes=") 20472: .append(ToString(compression_options.zstd_max_train_bytes)) 20472: .append("; "); 20472: result.append("enabled=") 20472: .append(ToString(compression_options.enabled)) 20472: .append("; "); 20472: return result; 20472: } 20472: # 602 "./util/compression.h" 20472: inline bool Snappy_Compress(const CompressionInfo& , const char* input, 20472: size_t length, ::std::string* output) { 20472: 20472: output->resize(snappy::MaxCompressedLength(length)); 20472: size_t outlen; 20472: snappy::RawCompress(input, length, &(*output)[0], &outlen); 20472: output->resize(outlen); 20472: return true; 20472: 20472: 20472: 20472: 20472: 20472: 20472: } 20472: 20472: inline bool Snappy_GetUncompressedLength(const char* input, size_t length, 20472: size_t* result) { 20472: 20472: return snappy::GetUncompressedLength(input, length, result); 20472: 20472: 20472: 20472: 20472: 20472: 20472: } 20472: 20472: inline bool Snappy_Uncompress(const char* input, size_t length, char* output) { 20472: 20472: return snappy::RawUncompress(input, length, output); 20472: 20472: 20472: 20472: 20472: 20472: 20472: } 20472: 20472: namespace compression { 20472: 20472: inline size_t PutDecompressedSizeInfo(std::string* output, uint32_t length) { 20472: PutVarint32(output, length); 20472: return output->size(); 20472: } 20472: 20472: inline bool GetDecompressedSizeInfo(const char** input_data, 20472: size_t* input_length, 20472: uint32_t* output_len) { 20472: auto new_input_data = 20472: GetVarint32Ptr(*input_data, *input_data + *input_length, output_len); 20472: if (new_input_data == nullptr) { 20472: return false; 20472: } 20472: *input_length -= (new_input_data - *input_data); 20472: *input_data = new_input_data; 20472: return true; 20472: } 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: inline bool Zlib_Compress(const CompressionInfo& info, 20472: uint32_t compress_format_version, const char* input, 20472: size_t length, ::std::string* output) { 20472: 20472: if (length > std::numeric_limits::max()) { 20472: 20472: return false; 20472: } 20472: 20472: size_t output_header_len = 0; 20472: if (compress_format_version == 2) { 20472: output_header_len = compression::PutDecompressedSizeInfo( 20472: output, static_cast(length)); 20472: } 20472: 20472: 20472: output->resize(output_header_len + length); 20472: 20472: 20472: 20472: 20472: 20472: 20472: static const int memLevel = 8; 20472: int level; 20472: if (info.options().level == CompressionOptions::kDefaultCompressionLevel) { 20472: level = 20472: # 694 "./util/compression.h" 3 4 20472: (-1) 20472: # 694 "./util/compression.h" 20472: ; 20472: } else { 20472: level = info.options().level; 20472: } 20472: z_stream _stream; 20472: memset(&_stream, 0, sizeof(z_stream)); 20472: int st = 20472: # 700 "./util/compression.h" 3 4 20472: deflateInit2_(( 20472: # 700 "./util/compression.h" 20472: &_stream 20472: # 700 "./util/compression.h" 3 4 20472: ),( 20472: # 700 "./util/compression.h" 20472: level 20472: # 700 "./util/compression.h" 3 4 20472: ),(8),( 20472: # 700 "./util/compression.h" 20472: info.options().window_bits 20472: # 700 "./util/compression.h" 3 4 20472: ),( 20472: # 700 "./util/compression.h" 20472: memLevel 20472: # 700 "./util/compression.h" 3 4 20472: ), ( 20472: # 700 "./util/compression.h" 20472: info.options().strategy 20472: # 700 "./util/compression.h" 3 4 20472: ), "1.2.11", (int)sizeof(z_stream)) 20472: 20472: # 701 "./util/compression.h" 20472: ; 20472: if (st != 20472: # 702 "./util/compression.h" 3 4 20472: 0 20472: # 702 "./util/compression.h" 20472: ) { 20472: return false; 20472: } 20472: 20472: Slice compression_dict = info.dict().GetRawDict(); 20472: if (compression_dict.size()) { 20472: 20472: st = deflateSetDictionary( 20472: &_stream, reinterpret_cast(compression_dict.data()), 20472: static_cast(compression_dict.size())); 20472: if (st != 20472: # 712 "./util/compression.h" 3 4 20472: 0 20472: # 712 "./util/compression.h" 20472: ) { 20472: deflateEnd(&_stream); 20472: return false; 20472: } 20472: } 20472: 20472: 20472: _stream.next_in = (Bytef*)input; 20472: _stream.avail_in = static_cast(length); 20472: 20472: 20472: _stream.avail_out = static_cast(length); 20472: _stream.next_out = reinterpret_cast(&(*output)[output_header_len]); 20472: 20472: bool compressed = false; 20472: st = deflate(&_stream, 20472: # 727 "./util/compression.h" 3 4 20472: 4 20472: # 727 "./util/compression.h" 20472: ); 20472: if (st == 20472: # 728 "./util/compression.h" 3 4 20472: 1 20472: # 728 "./util/compression.h" 20472: ) { 20472: compressed = true; 20472: output->resize(output->size() - _stream.avail_out); 20472: } 20472: 20472: 20472: 20472: 20472: deflateEnd(&_stream); 20472: return compressed; 20472: # 746 "./util/compression.h" 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: inline CacheAllocationPtr Zlib_Uncompress( 20472: const UncompressionInfo& info, const char* input_data, size_t input_length, 20472: int* decompress_size, uint32_t compress_format_version, 20472: MemoryAllocator* allocator = nullptr, int windowBits = -14) { 20472: 20472: uint32_t output_len = 0; 20472: if (compress_format_version == 2) { 20472: if (!compression::GetDecompressedSizeInfo(&input_data, &input_length, 20472: &output_len)) { 20472: return nullptr; 20472: } 20472: } else { 20472: 20472: 20472: size_t proposed_output_len = ((input_length * 5) & (~(4096 - 1))) + 4096; 20472: output_len = static_cast( 20472: std::min(proposed_output_len, 20472: static_cast(std::numeric_limits::max()))); 20472: } 20472: 20472: z_stream _stream; 20472: memset(&_stream, 0, sizeof(z_stream)); 20472: 20472: 20472: 20472: 20472: int st = 20472: 20472: # 781 "./util/compression.h" 3 4 20472: inflateInit2_(( 20472: # 781 "./util/compression.h" 20472: &_stream 20472: # 781 "./util/compression.h" 3 4 20472: ), ( 20472: # 781 "./util/compression.h" 20472: windowBits > 0 ? windowBits + 32 : windowBits 20472: # 781 "./util/compression.h" 3 4 20472: ), "1.2.11", (int)sizeof(z_stream)) 20472: # 781 "./util/compression.h" 20472: ; 20472: if (st != 20472: # 782 "./util/compression.h" 3 4 20472: 0 20472: # 782 "./util/compression.h" 20472: ) { 20472: return nullptr; 20472: } 20472: 20472: const Slice& compression_dict = info.dict().GetRawDict(); 20472: if (compression_dict.size()) { 20472: 20472: st = inflateSetDictionary( 20472: &_stream, reinterpret_cast(compression_dict.data()), 20472: static_cast(compression_dict.size())); 20472: if (st != 20472: # 792 "./util/compression.h" 3 4 20472: 0 20472: # 792 "./util/compression.h" 20472: ) { 20472: return nullptr; 20472: } 20472: } 20472: 20472: _stream.next_in = (Bytef*)input_data; 20472: _stream.avail_in = static_cast(input_length); 20472: 20472: auto output = AllocateBlock(output_len, allocator); 20472: 20472: _stream.next_out = (Bytef*)output.get(); 20472: _stream.avail_out = static_cast(output_len); 20472: 20472: bool done = false; 20472: while (!done) { 20472: st = inflate(&_stream, 20472: # 807 "./util/compression.h" 3 4 20472: 2 20472: # 807 "./util/compression.h" 20472: ); 20472: switch (st) { 20472: case 20472: # 809 "./util/compression.h" 3 4 20472: 1 20472: # 809 "./util/compression.h" 20472: : 20472: done = true; 20472: break; 20472: case 20472: # 812 "./util/compression.h" 3 4 20472: 0 20472: # 812 "./util/compression.h" 20472: : { 20472: 20472: 20472: 20472: 20472: # 816 "./util/compression.h" 3 4 20472: (static_cast ( 20472: # 816 "./util/compression.h" 20472: compress_format_version != 2 20472: # 816 "./util/compression.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 816 "./util/compression.h" 20472: "compress_format_version != 2" 20472: # 816 "./util/compression.h" 3 4 20472: , "./util/compression.h", 816, __extension__ __PRETTY_FUNCTION__)) 20472: # 816 "./util/compression.h" 20472: ; 20472: size_t old_sz = output_len; 20472: uint32_t output_len_delta = output_len / 5; 20472: output_len += output_len_delta < 10 ? 10 : output_len_delta; 20472: auto tmp = AllocateBlock(output_len, allocator); 20472: memcpy(tmp.get(), output.get(), old_sz); 20472: output = std::move(tmp); 20472: 20472: 20472: _stream.next_out = (Bytef*)(output.get() + old_sz); 20472: _stream.avail_out = static_cast(output_len - old_sz); 20472: break; 20472: } 20472: case 20472: # 829 "./util/compression.h" 3 4 20472: (-5) 20472: # 829 "./util/compression.h" 20472: : 20472: default: 20472: inflateEnd(&_stream); 20472: return nullptr; 20472: } 20472: } 20472: 20472: 20472: 20472: # 837 "./util/compression.h" 3 4 20472: (static_cast ( 20472: # 837 "./util/compression.h" 20472: compress_format_version != 2 || _stream.avail_out == 0 20472: # 837 "./util/compression.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 837 "./util/compression.h" 20472: "compress_format_version != 2 || _stream.avail_out == 0" 20472: # 837 "./util/compression.h" 3 4 20472: , "./util/compression.h", 837, __extension__ __PRETTY_FUNCTION__)) 20472: # 837 "./util/compression.h" 20472: ; 20472: *decompress_size = static_cast(output_len - _stream.avail_out); 20472: inflateEnd(&_stream); 20472: return output; 20472: # 851 "./util/compression.h" 20472: } 20472: 20472: 20472: 20472: 20472: 20472: inline bool BZip2_Compress(const CompressionInfo& , 20472: uint32_t compress_format_version, const char* input, 20472: size_t length, ::std::string* output) { 20472: 20472: if (length > std::numeric_limits::max()) { 20472: 20472: return false; 20472: } 20472: size_t output_header_len = 0; 20472: if (compress_format_version == 2) { 20472: output_header_len = compression::PutDecompressedSizeInfo( 20472: output, static_cast(length)); 20472: } 20472: 20472: 20472: output->resize(output_header_len + length); 20472: 20472: bz_stream _stream; 20472: memset(&_stream, 0, sizeof(bz_stream)); 20472: 20472: 20472: 20472: 20472: int st = BZ2_bzCompressInit(&_stream, 1, 0, 30); 20472: if (st != 20472: # 881 "./util/compression.h" 3 4 20472: 0 20472: # 881 "./util/compression.h" 20472: ) { 20472: return false; 20472: } 20472: 20472: 20472: _stream.next_in = (char*)input; 20472: _stream.avail_in = static_cast(length); 20472: 20472: 20472: _stream.avail_out = static_cast(length); 20472: _stream.next_out = reinterpret_cast(&(*output)[output_header_len]); 20472: 20472: bool compressed = false; 20472: st = BZ2_bzCompress(&_stream, 20472: # 894 "./util/compression.h" 3 4 20472: 2 20472: # 894 "./util/compression.h" 20472: ); 20472: if (st == 20472: # 895 "./util/compression.h" 3 4 20472: 4 20472: # 895 "./util/compression.h" 20472: ) { 20472: compressed = true; 20472: output->resize(output->size() - _stream.avail_out); 20472: } 20472: 20472: 20472: 20472: 20472: BZ2_bzCompressEnd(&_stream); 20472: return compressed; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: } 20472: 20472: 20472: 20472: 20472: 20472: inline CacheAllocationPtr BZip2_Uncompress( 20472: const char* input_data, size_t input_length, int* decompress_size, 20472: uint32_t compress_format_version, MemoryAllocator* allocator = nullptr) { 20472: 20472: uint32_t output_len = 0; 20472: if (compress_format_version == 2) { 20472: if (!compression::GetDecompressedSizeInfo(&input_data, &input_length, 20472: &output_len)) { 20472: return nullptr; 20472: } 20472: } else { 20472: 20472: 20472: size_t proposed_output_len = ((input_length * 5) & (~(4096 - 1))) + 4096; 20472: output_len = static_cast( 20472: std::min(proposed_output_len, 20472: static_cast(std::numeric_limits::max()))); 20472: } 20472: 20472: bz_stream _stream; 20472: memset(&_stream, 0, sizeof(bz_stream)); 20472: 20472: int st = BZ2_bzDecompressInit(&_stream, 0, 0); 20472: if (st != 20472: # 941 "./util/compression.h" 3 4 20472: 0 20472: # 941 "./util/compression.h" 20472: ) { 20472: return nullptr; 20472: } 20472: 20472: _stream.next_in = (char*)input_data; 20472: _stream.avail_in = static_cast(input_length); 20472: 20472: auto output = AllocateBlock(output_len, allocator); 20472: 20472: _stream.next_out = (char*)output.get(); 20472: _stream.avail_out = static_cast(output_len); 20472: 20472: bool done = false; 20472: while (!done) { 20472: st = BZ2_bzDecompress(&_stream); 20472: switch (st) { 20472: case 20472: # 957 "./util/compression.h" 3 4 20472: 4 20472: # 957 "./util/compression.h" 20472: : 20472: done = true; 20472: break; 20472: case 20472: # 960 "./util/compression.h" 3 4 20472: 0 20472: # 960 "./util/compression.h" 20472: : { 20472: 20472: 20472: 20472: 20472: # 964 "./util/compression.h" 3 4 20472: (static_cast ( 20472: # 964 "./util/compression.h" 20472: compress_format_version != 2 20472: # 964 "./util/compression.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 964 "./util/compression.h" 20472: "compress_format_version != 2" 20472: # 964 "./util/compression.h" 3 4 20472: , "./util/compression.h", 964, __extension__ __PRETTY_FUNCTION__)) 20472: # 964 "./util/compression.h" 20472: ; 20472: uint32_t old_sz = output_len; 20472: output_len = output_len * 1.2; 20472: auto tmp = AllocateBlock(output_len, allocator); 20472: memcpy(tmp.get(), output.get(), old_sz); 20472: output = std::move(tmp); 20472: 20472: 20472: _stream.next_out = (char*)(output.get() + old_sz); 20472: _stream.avail_out = static_cast(output_len - old_sz); 20472: break; 20472: } 20472: default: 20472: BZ2_bzDecompressEnd(&_stream); 20472: return nullptr; 20472: } 20472: } 20472: 20472: 20472: 20472: # 983 "./util/compression.h" 3 4 20472: (static_cast ( 20472: # 983 "./util/compression.h" 20472: compress_format_version != 2 || _stream.avail_out == 0 20472: # 983 "./util/compression.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 983 "./util/compression.h" 20472: "compress_format_version != 2 || _stream.avail_out == 0" 20472: # 983 "./util/compression.h" 3 4 20472: , "./util/compression.h", 983, __extension__ __PRETTY_FUNCTION__)) 20472: # 983 "./util/compression.h" 20472: ; 20472: *decompress_size = static_cast(output_len - _stream.avail_out); 20472: BZ2_bzDecompressEnd(&_stream); 20472: return output; 20472: # 995 "./util/compression.h" 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: inline bool LZ4_Compress(const CompressionInfo& info, 20472: uint32_t compress_format_version, const char* input, 20472: size_t length, ::std::string* output) { 20472: 20472: if (length > std::numeric_limits::max()) { 20472: 20472: return false; 20472: } 20472: 20472: size_t output_header_len = 0; 20472: if (compress_format_version == 2) { 20472: 20472: output_header_len = compression::PutDecompressedSizeInfo( 20472: output, static_cast(length)); 20472: } else { 20472: 20472: 20472: output_header_len = 8; 20472: output->resize(output_header_len); 20472: char* p = const_cast(output->c_str()); 20472: memcpy(p, &length, sizeof(length)); 20472: } 20472: int compress_bound = LZ4_compressBound(static_cast(length)); 20472: output->resize(static_cast(output_header_len + compress_bound)); 20472: 20472: int outlen; 20472: 20472: LZ4_stream_t* stream = LZ4_createStream(); 20472: Slice compression_dict = info.dict().GetRawDict(); 20472: if (compression_dict.size()) { 20472: LZ4_loadDict(stream, compression_dict.data(), 20472: static_cast(compression_dict.size())); 20472: } 20472: 20472: outlen = 20472: LZ4_compress_fast_continue(stream, input, &(*output)[output_header_len], 20472: static_cast(length), compress_bound, 1); 20472: 20472: 20472: 20472: 20472: 20472: LZ4_freeStream(stream); 20472: 20472: 20472: 20472: 20472: 20472: if (outlen == 0) { 20472: return false; 20472: } 20472: output->resize(static_cast(output_header_len + outlen)); 20472: return true; 20472: # 1064 "./util/compression.h" 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: inline CacheAllocationPtr LZ4_Uncompress(const UncompressionInfo& info, 20472: const char* input_data, 20472: size_t input_length, 20472: int* decompress_size, 20472: uint32_t compress_format_version, 20472: MemoryAllocator* allocator = nullptr) { 20472: 20472: uint32_t output_len = 0; 20472: if (compress_format_version == 2) { 20472: 20472: if (!compression::GetDecompressedSizeInfo(&input_data, &input_length, 20472: &output_len)) { 20472: return nullptr; 20472: } 20472: } else { 20472: 20472: 20472: if (input_length < 8) { 20472: return nullptr; 20472: } 20472: memcpy(&output_len, input_data, sizeof(output_len)); 20472: input_length -= 8; 20472: input_data += 8; 20472: } 20472: 20472: auto output = AllocateBlock(output_len, allocator); 20472: 20472: LZ4_streamDecode_t* stream = LZ4_createStreamDecode(); 20472: const Slice& compression_dict = info.dict().GetRawDict(); 20472: if (compression_dict.size()) { 20472: LZ4_setStreamDecode(stream, compression_dict.data(), 20472: static_cast(compression_dict.size())); 20472: } 20472: *decompress_size = LZ4_decompress_safe_continue( 20472: stream, input_data, output.get(), static_cast(input_length), 20472: static_cast(output_len)); 20472: LZ4_freeStreamDecode(stream); 20472: 20472: 20472: 20472: 20472: 20472: 20472: if (*decompress_size < 0) { 20472: return nullptr; 20472: } 20472: 20472: # 1118 "./util/compression.h" 3 4 20472: (static_cast ( 20472: # 1118 "./util/compression.h" 20472: *decompress_size == static_cast(output_len) 20472: # 1118 "./util/compression.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 1118 "./util/compression.h" 20472: "*decompress_size == static_cast(output_len)" 20472: # 1118 "./util/compression.h" 3 4 20472: , "./util/compression.h", 1118, __extension__ __PRETTY_FUNCTION__)) 20472: # 1118 "./util/compression.h" 20472: ; 20472: return output; 20472: # 1129 "./util/compression.h" 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: inline bool LZ4HC_Compress(const CompressionInfo& info, 20472: uint32_t compress_format_version, const char* input, 20472: size_t length, ::std::string* output) { 20472: 20472: if (length > std::numeric_limits::max()) { 20472: 20472: return false; 20472: } 20472: 20472: size_t output_header_len = 0; 20472: if (compress_format_version == 2) { 20472: 20472: output_header_len = compression::PutDecompressedSizeInfo( 20472: output, static_cast(length)); 20472: } else { 20472: 20472: 20472: output_header_len = 8; 20472: output->resize(output_header_len); 20472: char* p = const_cast(output->c_str()); 20472: memcpy(p, &length, sizeof(length)); 20472: } 20472: int compress_bound = LZ4_compressBound(static_cast(length)); 20472: output->resize(static_cast(output_header_len + compress_bound)); 20472: 20472: int outlen; 20472: int level; 20472: if (info.options().level == CompressionOptions::kDefaultCompressionLevel) { 20472: level = 0; 20472: } else { 20472: level = info.options().level; 20472: } 20472: 20472: LZ4_streamHC_t* stream = LZ4_createStreamHC(); 20472: LZ4_resetStreamHC(stream, level); 20472: Slice compression_dict = info.dict().GetRawDict(); 20472: const char* compression_dict_data = 20472: compression_dict.size() > 0 ? compression_dict.data() : nullptr; 20472: size_t compression_dict_size = compression_dict.size(); 20472: LZ4_loadDictHC(stream, compression_dict_data, 20472: static_cast(compression_dict_size)); 20472: 20472: 20472: outlen = 20472: LZ4_compress_HC_continue(stream, input, &(*output)[output_header_len], 20472: static_cast(length), compress_bound); 20472: 20472: 20472: 20472: 20472: 20472: LZ4_freeStreamHC(stream); 20472: # 1200 "./util/compression.h" 20472: if (outlen == 0) { 20472: return false; 20472: } 20472: output->resize(static_cast(output_header_len + outlen)); 20472: return true; 20472: # 1213 "./util/compression.h" 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: inline bool XPRESS_Compress(const char* , size_t , 20472: std::string* ) { 20472: return false; 20472: } 20472: # 1233 "./util/compression.h" 20472: inline char* XPRESS_Uncompress(const char* , 20472: size_t , 20472: int* ) { 20472: return nullptr; 20472: } 20472: 20472: 20472: inline bool ZSTD_Compress(const CompressionInfo& info, const char* input, 20472: size_t length, ::std::string* output) { 20472: 20472: if (length > std::numeric_limits::max()) { 20472: 20472: return false; 20472: } 20472: 20472: size_t output_header_len = compression::PutDecompressedSizeInfo( 20472: output, static_cast(length)); 20472: 20472: size_t compressBound = ZSTD_compressBound(length); 20472: output->resize(static_cast(output_header_len + compressBound)); 20472: size_t outlen = 0; 20472: int level; 20472: if (info.options().level == CompressionOptions::kDefaultCompressionLevel) { 20472: 20472: 20472: level = 3; 20472: } else { 20472: level = info.options().level; 20472: } 20472: 20472: ZSTD_CCtx* context = info.context().ZSTDPreallocCtx(); 20472: 20472: # 1264 "./util/compression.h" 3 4 20472: (static_cast ( 20472: # 1264 "./util/compression.h" 20472: context != nullptr 20472: # 1264 "./util/compression.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 1264 "./util/compression.h" 20472: "context != nullptr" 20472: # 1264 "./util/compression.h" 3 4 20472: , "./util/compression.h", 1264, __extension__ __PRETTY_FUNCTION__)) 20472: # 1264 "./util/compression.h" 20472: ; 20472: 20472: if (info.dict().GetDigestedZstdCDict() != nullptr) { 20472: outlen = ZSTD_compress_usingCDict(context, &(*output)[output_header_len], 20472: compressBound, input, length, 20472: info.dict().GetDigestedZstdCDict()); 20472: } 20472: 20472: if (outlen == 0) { 20472: outlen = ZSTD_compress_usingDict(context, &(*output)[output_header_len], 20472: compressBound, input, length, 20472: info.dict().GetRawDict().data(), 20472: info.dict().GetRawDict().size(), level); 20472: } 20472: 20472: 20472: 20472: 20472: if (outlen == 0) { 20472: return false; 20472: } 20472: output->resize(output_header_len + outlen); 20472: return true; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: } 20472: 20472: 20472: 20472: inline CacheAllocationPtr ZSTD_Uncompress( 20472: const UncompressionInfo& info, const char* input_data, size_t input_length, 20472: int* decompress_size, MemoryAllocator* allocator = nullptr) { 20472: 20472: uint32_t output_len = 0; 20472: if (!compression::GetDecompressedSizeInfo(&input_data, &input_length, 20472: &output_len)) { 20472: return nullptr; 20472: } 20472: 20472: auto output = AllocateBlock(output_len, allocator); 20472: size_t actual_output_length = 0; 20472: 20472: ZSTD_DCtx* context = info.context().GetZSTDContext(); 20472: 20472: # 1312 "./util/compression.h" 3 4 20472: (static_cast ( 20472: # 1312 "./util/compression.h" 20472: context != nullptr 20472: # 1312 "./util/compression.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 1312 "./util/compression.h" 20472: "context != nullptr" 20472: # 1312 "./util/compression.h" 3 4 20472: , "./util/compression.h", 1312, __extension__ __PRETTY_FUNCTION__)) 20472: # 1312 "./util/compression.h" 20472: ; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: if (actual_output_length == 0) { 20472: actual_output_length = ZSTD_decompress_usingDict( 20472: context, output.get(), output_len, input_data, input_length, 20472: info.dict().GetRawDict().data(), info.dict().GetRawDict().size()); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1330 "./util/compression.h" 3 4 20472: (static_cast ( 20472: # 1330 "./util/compression.h" 20472: actual_output_length == output_len 20472: # 1330 "./util/compression.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 1330 "./util/compression.h" 20472: "actual_output_length == output_len" 20472: # 1330 "./util/compression.h" 3 4 20472: , "./util/compression.h", 1330, __extension__ __PRETTY_FUNCTION__)) 20472: # 1330 "./util/compression.h" 20472: ; 20472: *decompress_size = static_cast(actual_output_length); 20472: return output; 20472: # 1341 "./util/compression.h" 20472: } 20472: 20472: inline bool ZSTD_TrainDictionarySupported() { 20472: 20472: 20472: 20472: 20472: return (ZSTD_versionNumber() >= 10103); 20472: 20472: 20472: 20472: } 20472: 20472: inline std::string ZSTD_TrainDictionary(const std::string& samples, 20472: const std::vector& sample_lens, 20472: size_t max_dict_bytes) { 20472: 20472: 20472: 20472: 20472: 20472: # 1361 "./util/compression.h" 3 4 20472: (static_cast ( 20472: # 1361 "./util/compression.h" 20472: samples.empty() == sample_lens.empty() 20472: # 1361 "./util/compression.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 1361 "./util/compression.h" 20472: "samples.empty() == sample_lens.empty()" 20472: # 1361 "./util/compression.h" 3 4 20472: , "./util/compression.h", 1361, __extension__ __PRETTY_FUNCTION__)) 20472: # 1361 "./util/compression.h" 20472: ; 20472: if (samples.empty()) { 20472: return ""; 20472: } 20472: std::string dict_data(max_dict_bytes, '\0'); 20472: size_t dict_len = ZDICT_trainFromBuffer( 20472: &dict_data[0], max_dict_bytes, &samples[0], &sample_lens[0], 20472: static_cast(sample_lens.size())); 20472: if (ZDICT_isError(dict_len)) { 20472: return ""; 20472: } 20472: 20472: # 1372 "./util/compression.h" 3 4 20472: (static_cast ( 20472: # 1372 "./util/compression.h" 20472: dict_len <= max_dict_bytes 20472: # 1372 "./util/compression.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 1372 "./util/compression.h" 20472: "dict_len <= max_dict_bytes" 20472: # 1372 "./util/compression.h" 3 4 20472: , "./util/compression.h", 1372, __extension__ __PRETTY_FUNCTION__)) 20472: # 1372 "./util/compression.h" 20472: ; 20472: dict_data.resize(dict_len); 20472: return dict_data; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: } 20472: 20472: inline std::string ZSTD_TrainDictionary(const std::string& samples, 20472: size_t sample_len_shift, 20472: size_t max_dict_bytes) { 20472: 20472: 20472: 20472: 20472: size_t num_samples = samples.size() >> sample_len_shift; 20472: std::vector sample_lens(num_samples, size_t(1) << sample_len_shift); 20472: return ZSTD_TrainDictionary(samples, sample_lens, max_dict_bytes); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: } 20472: 20472: } 20472: # 15 "./options/cf_options.h" 2 20472: 20472: namespace rocksdb { 20472: 20472: 20472: 20472: 20472: 20472: struct ImmutableCFOptions { 20472: explicit ImmutableCFOptions(const Options& options); 20472: 20472: ImmutableCFOptions(const ImmutableDBOptions& db_options, 20472: const ColumnFamilyOptions& cf_options); 20472: 20472: CompactionStyle compaction_style; 20472: 20472: CompactionPri compaction_pri; 20472: 20472: const Comparator* user_comparator; 20472: InternalKeyComparator internal_comparator; 20472: 20472: MergeOperator* merge_operator; 20472: 20472: const CompactionFilter* compaction_filter; 20472: 20472: CompactionFilterFactory* compaction_filter_factory; 20472: 20472: int min_write_buffer_number_to_merge; 20472: 20472: int max_write_buffer_number_to_maintain; 20472: 20472: int64_t max_write_buffer_size_to_maintain; 20472: 20472: bool inplace_update_support; 20472: 20472: UpdateStatus (*inplace_callback)(char* existing_value, 20472: uint32_t* existing_value_size, 20472: Slice delta_value, 20472: std::string* merged_value); 20472: 20472: Logger* info_log; 20472: 20472: Statistics* statistics; 20472: 20472: RateLimiter* rate_limiter; 20472: 20472: InfoLogLevel info_log_level; 20472: 20472: Env* env; 20472: 20472: FileSystem* fs; 20472: 20472: 20472: bool allow_mmap_reads; 20472: 20472: 20472: bool allow_mmap_writes; 20472: 20472: std::vector db_paths; 20472: 20472: MemTableRepFactory* memtable_factory; 20472: 20472: TableFactory* table_factory; 20472: 20472: Options::TablePropertiesCollectorFactories 20472: table_properties_collector_factories; 20472: 20472: bool advise_random_on_open; 20472: 20472: 20472: 20472: uint32_t bloom_locality; 20472: 20472: bool purge_redundant_kvs_while_flush; 20472: 20472: bool use_fsync; 20472: 20472: std::vector compression_per_level; 20472: 20472: bool level_compaction_dynamic_level_bytes; 20472: 20472: Options::AccessHint access_hint_on_compaction_start; 20472: 20472: bool new_table_reader_for_compaction_inputs; 20472: 20472: int num_levels; 20472: 20472: bool optimize_filters_for_hits; 20472: 20472: bool force_consistency_checks; 20472: 20472: bool allow_ingest_behind; 20472: 20472: bool preserve_deletes; 20472: 20472: 20472: 20472: std::vector> listeners; 20472: 20472: std::shared_ptr row_cache; 20472: 20472: uint32_t max_subcompactions; 20472: 20472: const SliceTransform* memtable_insert_with_hint_prefix_extractor; 20472: 20472: std::vector cf_paths; 20472: 20472: std::shared_ptr compaction_thread_limiter; 20472: 20472: FileChecksumGenFactory* file_checksum_gen_factory; 20472: }; 20472: 20472: struct MutableCFOptions { 20472: explicit MutableCFOptions(const ColumnFamilyOptions& options) 20472: : write_buffer_size(options.write_buffer_size), 20472: max_write_buffer_number(options.max_write_buffer_number), 20472: arena_block_size(options.arena_block_size), 20472: memtable_prefix_bloom_size_ratio( 20472: options.memtable_prefix_bloom_size_ratio), 20472: memtable_whole_key_filtering(options.memtable_whole_key_filtering), 20472: memtable_huge_page_size(options.memtable_huge_page_size), 20472: max_successive_merges(options.max_successive_merges), 20472: inplace_update_num_locks(options.inplace_update_num_locks), 20472: prefix_extractor(options.prefix_extractor), 20472: disable_auto_compactions(options.disable_auto_compactions), 20472: soft_pending_compaction_bytes_limit( 20472: options.soft_pending_compaction_bytes_limit), 20472: hard_pending_compaction_bytes_limit( 20472: options.hard_pending_compaction_bytes_limit), 20472: level0_file_num_compaction_trigger( 20472: options.level0_file_num_compaction_trigger), 20472: level0_slowdown_writes_trigger(options.level0_slowdown_writes_trigger), 20472: level0_stop_writes_trigger(options.level0_stop_writes_trigger), 20472: max_compaction_bytes(options.max_compaction_bytes), 20472: target_file_size_base(options.target_file_size_base), 20472: target_file_size_multiplier(options.target_file_size_multiplier), 20472: max_bytes_for_level_base(options.max_bytes_for_level_base), 20472: max_bytes_for_level_multiplier(options.max_bytes_for_level_multiplier), 20472: ttl(options.ttl), 20472: periodic_compaction_seconds(options.periodic_compaction_seconds), 20472: max_bytes_for_level_multiplier_additional( 20472: options.max_bytes_for_level_multiplier_additional), 20472: compaction_options_fifo(options.compaction_options_fifo), 20472: compaction_options_universal(options.compaction_options_universal), 20472: max_sequential_skip_in_iterations( 20472: options.max_sequential_skip_in_iterations), 20472: paranoid_file_checks(options.paranoid_file_checks), 20472: report_bg_io_stats(options.report_bg_io_stats), 20472: compression(options.compression), 20472: bottommost_compression(options.bottommost_compression), 20472: compression_opts(options.compression_opts), 20472: bottommost_compression_opts(options.bottommost_compression_opts), 20472: sample_for_compression(options.sample_for_compression) { 20472: RefreshDerivedOptions(options.num_levels, options.compaction_style); 20472: } 20472: 20472: MutableCFOptions() 20472: : write_buffer_size(0), 20472: max_write_buffer_number(0), 20472: arena_block_size(0), 20472: memtable_prefix_bloom_size_ratio(0), 20472: memtable_whole_key_filtering(false), 20472: memtable_huge_page_size(0), 20472: max_successive_merges(0), 20472: inplace_update_num_locks(0), 20472: prefix_extractor(nullptr), 20472: disable_auto_compactions(false), 20472: soft_pending_compaction_bytes_limit(0), 20472: hard_pending_compaction_bytes_limit(0), 20472: level0_file_num_compaction_trigger(0), 20472: level0_slowdown_writes_trigger(0), 20472: level0_stop_writes_trigger(0), 20472: max_compaction_bytes(0), 20472: target_file_size_base(0), 20472: target_file_size_multiplier(0), 20472: max_bytes_for_level_base(0), 20472: max_bytes_for_level_multiplier(0), 20472: ttl(0), 20472: periodic_compaction_seconds(0), 20472: compaction_options_fifo(), 20472: max_sequential_skip_in_iterations(0), 20472: paranoid_file_checks(false), 20472: report_bg_io_stats(false), 20472: compression(Snappy_Supported() ? kSnappyCompression : kNoCompression), 20472: bottommost_compression(kDisableCompressionOption), 20472: sample_for_compression(0) {} 20472: 20472: explicit MutableCFOptions(const Options& options); 20472: 20472: 20472: void RefreshDerivedOptions(int num_levels, CompactionStyle compaction_style); 20472: 20472: void RefreshDerivedOptions(const ImmutableCFOptions& ioptions) { 20472: RefreshDerivedOptions(ioptions.num_levels, ioptions.compaction_style); 20472: } 20472: 20472: int MaxBytesMultiplerAdditional(int level) const { 20472: if (level >= 20472: static_cast(max_bytes_for_level_multiplier_additional.size())) { 20472: return 1; 20472: } 20472: return max_bytes_for_level_multiplier_additional[level]; 20472: } 20472: 20472: void Dump(Logger* log) const; 20472: 20472: 20472: size_t write_buffer_size; 20472: int max_write_buffer_number; 20472: size_t arena_block_size; 20472: double memtable_prefix_bloom_size_ratio; 20472: bool memtable_whole_key_filtering; 20472: size_t memtable_huge_page_size; 20472: size_t max_successive_merges; 20472: size_t inplace_update_num_locks; 20472: std::shared_ptr prefix_extractor; 20472: 20472: 20472: bool disable_auto_compactions; 20472: uint64_t soft_pending_compaction_bytes_limit; 20472: uint64_t hard_pending_compaction_bytes_limit; 20472: int level0_file_num_compaction_trigger; 20472: int level0_slowdown_writes_trigger; 20472: int level0_stop_writes_trigger; 20472: uint64_t max_compaction_bytes; 20472: uint64_t target_file_size_base; 20472: int target_file_size_multiplier; 20472: uint64_t max_bytes_for_level_base; 20472: double max_bytes_for_level_multiplier; 20472: uint64_t ttl; 20472: uint64_t periodic_compaction_seconds; 20472: std::vector max_bytes_for_level_multiplier_additional; 20472: CompactionOptionsFIFO compaction_options_fifo; 20472: CompactionOptionsUniversal compaction_options_universal; 20472: 20472: 20472: uint64_t max_sequential_skip_in_iterations; 20472: bool paranoid_file_checks; 20472: bool report_bg_io_stats; 20472: CompressionType compression; 20472: CompressionType bottommost_compression; 20472: CompressionOptions compression_opts; 20472: CompressionOptions bottommost_compression_opts; 20472: 20472: uint64_t sample_for_compression; 20472: 20472: 20472: 20472: std::vector max_file_size; 20472: }; 20472: 20472: uint64_t MultiplyCheckOverflow(uint64_t op1, double op2); 20472: 20472: 20472: uint64_t MaxFileSizeForLevel(const MutableCFOptions& cf_options, 20472: int level, CompactionStyle compaction_style, int base_level = 1, 20472: bool level_compaction_dynamic_level_bytes = false); 20472: 20472: 20472: 20472: size_t MaxFileSizeForL0MetaPin(const MutableCFOptions& cf_options); 20472: 20472: } 20472: # 23 "./table/format.h" 2 20472: # 1 "./port/malloc.h" 1 20472: # 9 "./port/malloc.h" 20472: 20472: # 24 "./table/format.h" 2 20472: 20472: # 1 "./table/persistent_cache_options.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "./include/rocksdb/persistent_cache.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 19 "./include/rocksdb/persistent_cache.h" 20472: namespace rocksdb { 20472: 20472: 20472: 20472: 20472: 20472: class PersistentCache { 20472: public: 20472: typedef std::vector> StatsType; 20472: 20472: virtual ~PersistentCache() {} 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual Status Insert(const Slice& key, const char* data, 20472: const size_t size) = 0; 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual Status Lookup(const Slice& key, std::unique_ptr* data, 20472: size_t* size) = 0; 20472: 20472: 20472: 20472: 20472: virtual bool IsCompressed() = 0; 20472: 20472: 20472: 20472: 20472: 20472: virtual StatsType Stats() = 0; 20472: 20472: virtual std::string GetPrintableOptions() const = 0; 20472: }; 20472: 20472: 20472: Status NewPersistentCache(Env* const env, const std::string& path, 20472: const uint64_t size, 20472: const std::shared_ptr& log, 20472: const bool optimized_for_nvm, 20472: std::shared_ptr* cache); 20472: } 20472: # 11 "./table/persistent_cache_options.h" 2 20472: 20472: namespace rocksdb { 20472: 20472: 20472: 20472: 20472: 20472: struct PersistentCacheOptions { 20472: PersistentCacheOptions() {} 20472: explicit PersistentCacheOptions( 20472: const std::shared_ptr& _persistent_cache, 20472: const std::string _key_prefix, Statistics* const _statistics) 20472: : persistent_cache(_persistent_cache), 20472: key_prefix(_key_prefix), 20472: statistics(_statistics) {} 20472: 20472: virtual ~PersistentCacheOptions() {} 20472: 20472: std::shared_ptr persistent_cache; 20472: std::string key_prefix; 20472: Statistics* statistics = nullptr; 20472: }; 20472: 20472: } 20472: # 26 "./table/format.h" 2 20472: 20472: namespace rocksdb { 20472: 20472: class RandomAccessFile; 20472: struct ReadOptions; 20472: 20472: extern bool ShouldReportDetailedTime(Env* env, Statistics* stats); 20472: 20472: 20472: const int kMagicNumberLengthByte = 8; 20472: 20472: 20472: 20472: class BlockHandle { 20472: public: 20472: 20472: 20472: BlockHandle(); 20472: BlockHandle(uint64_t offset, uint64_t size); 20472: 20472: 20472: uint64_t offset() const { return offset_; } 20472: void set_offset(uint64_t _offset) { offset_ = _offset; } 20472: 20472: 20472: uint64_t size() const { return size_; } 20472: void set_size(uint64_t _size) { size_ = _size; } 20472: 20472: void EncodeTo(std::string* dst) const; 20472: Status DecodeFrom(Slice* input); 20472: Status DecodeSizeFrom(uint64_t offset, Slice* input); 20472: 20472: 20472: std::string ToString(bool hex = true) const; 20472: 20472: 20472: 20472: bool IsNull() const { return offset_ == 0 && size_ == 0; } 20472: 20472: static const BlockHandle& NullBlockHandle() { return kNullBlockHandle; } 20472: 20472: 20472: enum { kMaxEncodedLength = 10 + 10 }; 20472: 20472: inline bool operator==(const BlockHandle& rhs) const { 20472: return offset_ == rhs.offset_ && size_ == rhs.size_; 20472: } 20472: inline bool operator!=(const BlockHandle& rhs) const { 20472: return !(*this == rhs); 20472: } 20472: 20472: private: 20472: uint64_t offset_; 20472: uint64_t size_; 20472: 20472: static const BlockHandle kNullBlockHandle; 20472: }; 20472: # 91 "./table/format.h" 20472: struct IndexValue { 20472: BlockHandle handle; 20472: 20472: Slice first_internal_key; 20472: 20472: IndexValue() = default; 20472: IndexValue(BlockHandle _handle, Slice _first_internal_key) 20472: : handle(_handle), first_internal_key(_first_internal_key) {} 20472: 20472: 20472: 20472: 20472: 20472: 20472: void EncodeTo(std::string* dst, bool have_first_key, 20472: const BlockHandle* previous_handle) const; 20472: Status DecodeFrom(Slice* input, bool have_first_key, 20472: const BlockHandle* previous_handle); 20472: 20472: std::string ToString(bool hex, bool have_first_key) const; 20472: }; 20472: 20472: inline uint32_t GetCompressFormatForVersion(CompressionType compression_type, 20472: uint32_t version) { 20472: 20472: 20472: 20472: 20472: 20472: # 119 "./table/format.h" 3 4 20472: (static_cast ( 20472: # 119 "./table/format.h" 20472: compression_type != kSnappyCompression && compression_type != kXpressCompression && compression_type != kNoCompression 20472: # 119 "./table/format.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 119 "./table/format.h" 20472: "compression_type != kSnappyCompression && compression_type != kXpressCompression && compression_type != kNoCompression" 20472: # 119 "./table/format.h" 3 4 20472: , "./table/format.h", 119, __extension__ __PRETTY_FUNCTION__)) 20472: 20472: 20472: # 121 "./table/format.h" 20472: ; 20472: 20472: 20472: 20472: return version >= 2 ? 2 : 1; 20472: } 20472: 20472: inline bool BlockBasedTableSupportedVersion(uint32_t version) { 20472: return version <= 5; 20472: } 20472: 20472: 20472: 20472: class Footer { 20472: public: 20472: 20472: 20472: 20472: 20472: 20472: Footer() : Footer(kInvalidTableMagicNumber, 0) {} 20472: 20472: 20472: 20472: Footer(uint64_t table_magic_number, uint32_t version); 20472: 20472: 20472: uint32_t version() const { return version_; } 20472: 20472: 20472: ChecksumType checksum() const { return checksum_; } 20472: void set_checksum(const ChecksumType c) { checksum_ = c; } 20472: 20472: 20472: const BlockHandle& metaindex_handle() const { return metaindex_handle_; } 20472: void set_metaindex_handle(const BlockHandle& h) { metaindex_handle_ = h; } 20472: 20472: 20472: const BlockHandle& index_handle() const { return index_handle_; } 20472: 20472: void set_index_handle(const BlockHandle& h) { index_handle_ = h; } 20472: 20472: uint64_t table_magic_number() const { return table_magic_number_; } 20472: 20472: void EncodeTo(std::string* dst) const; 20472: 20472: 20472: 20472: 20472: 20472: 20472: Status DecodeFrom(Slice* input); 20472: 20472: 20472: 20472: 20472: 20472: enum { 20472: 20472: 20472: kVersion0EncodedLength = 2 * BlockHandle::kMaxEncodedLength + 8, 20472: 20472: 20472: 20472: kNewVersionsEncodedLength = 1 + 2 * BlockHandle::kMaxEncodedLength + 4 + 8, 20472: kMinEncodedLength = kVersion0EncodedLength, 20472: kMaxEncodedLength = kNewVersionsEncodedLength, 20472: }; 20472: 20472: static const uint64_t kInvalidTableMagicNumber = 0; 20472: 20472: 20472: std::string ToString() const; 20472: 20472: private: 20472: 20472: void set_table_magic_number(uint64_t magic_number) { 20472: 20472: # 198 "./table/format.h" 3 4 20472: (static_cast ( 20472: # 198 "./table/format.h" 20472: !HasInitializedTableMagicNumber() 20472: # 198 "./table/format.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 198 "./table/format.h" 20472: "!HasInitializedTableMagicNumber()" 20472: # 198 "./table/format.h" 3 4 20472: , "./table/format.h", 198, __extension__ __PRETTY_FUNCTION__)) 20472: # 198 "./table/format.h" 20472: ; 20472: table_magic_number_ = magic_number; 20472: } 20472: 20472: 20472: 20472: bool HasInitializedTableMagicNumber() const { 20472: return (table_magic_number_ != kInvalidTableMagicNumber); 20472: } 20472: 20472: uint32_t version_; 20472: ChecksumType checksum_; 20472: BlockHandle metaindex_handle_; 20472: BlockHandle index_handle_; 20472: uint64_t table_magic_number_ = 0; 20472: }; 20472: 20472: 20472: 20472: 20472: Status ReadFooterFromFile(RandomAccessFileReader* file, 20472: FilePrefetchBuffer* prefetch_buffer, 20472: uint64_t file_size, Footer* footer, 20472: uint64_t enforce_table_magic_number = 0); 20472: 20472: 20472: static const size_t kBlockTrailerSize = 5; 20472: 20472: 20472: inline uint64_t block_size(const BlockHandle& handle) { 20472: return handle.size() + kBlockTrailerSize; 20472: } 20472: 20472: inline CompressionType get_block_compression_type(const char* block_data, 20472: size_t block_size) { 20472: return static_cast(block_data[block_size]); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: struct BlockContents { 20472: Slice data; 20472: CacheAllocationPtr allocation; 20472: 20472: 20472: 20472: 20472: bool is_raw_block = false; 20472: 20472: 20472: BlockContents() {} 20472: 20472: 20472: BlockContents(const Slice& _data) : data(_data) {} 20472: 20472: 20472: BlockContents(CacheAllocationPtr&& _data, size_t _size) 20472: : data(_data.get(), _size), allocation(std::move(_data)) {} 20472: 20472: 20472: BlockContents(std::unique_ptr&& _data, size_t _size) 20472: : data(_data.get(), _size) { 20472: allocation.reset(_data.release()); 20472: } 20472: 20472: 20472: bool own_bytes() const { return allocation.get() != nullptr; } 20472: 20472: 20472: 20472: 20472: CompressionType get_compression_type() const { 20472: 20472: # 272 "./table/format.h" 3 4 20472: (static_cast ( 20472: # 272 "./table/format.h" 20472: is_raw_block 20472: # 272 "./table/format.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 272 "./table/format.h" 20472: "is_raw_block" 20472: # 272 "./table/format.h" 3 4 20472: , "./table/format.h", 272, __extension__ __PRETTY_FUNCTION__)) 20472: # 272 "./table/format.h" 20472: ; 20472: return get_block_compression_type(data.data(), data.size()); 20472: } 20472: 20472: 20472: size_t usable_size() const { 20472: if (allocation.get() != nullptr) { 20472: auto allocator = allocation.get_deleter().allocator; 20472: if (allocator) { 20472: return allocator->UsableSize(allocation.get(), data.size()); 20472: } 20472: 20472: return malloc_usable_size(allocation.get()); 20472: 20472: 20472: 20472: } else { 20472: return 0; 20472: } 20472: } 20472: 20472: size_t ApproximateMemoryUsage() const { 20472: return usable_size() + sizeof(*this); 20472: } 20472: 20472: BlockContents(BlockContents&& other) noexcept { 20472: *this = std::move(other); 20472: } 20472: 20472: BlockContents& operator=(BlockContents&& other) { 20472: data = std::move(other.data); 20472: allocation = std::move(other.allocation); 20472: 20472: is_raw_block = other.is_raw_block; 20472: 20472: return *this; 20472: } 20472: }; 20472: 20472: 20472: 20472: extern Status ReadBlockContents( 20472: RandomAccessFileReader* file, FilePrefetchBuffer* prefetch_buffer, 20472: const Footer& footer, const ReadOptions& options, const BlockHandle& handle, 20472: BlockContents* contents, const ImmutableCFOptions& ioptions, 20472: bool do_uncompress = true, const Slice& compression_dict = Slice(), 20472: const PersistentCacheOptions& cache_options = PersistentCacheOptions()); 20472: # 327 "./table/format.h" 20472: extern Status UncompressBlockContents(const UncompressionInfo& info, 20472: const char* data, size_t n, 20472: BlockContents* contents, 20472: uint32_t compress_format_version, 20472: const ImmutableCFOptions& ioptions, 20472: MemoryAllocator* allocator = nullptr); 20472: 20472: 20472: 20472: 20472: extern Status UncompressBlockContentsForCompressionType( 20472: const UncompressionInfo& info, const char* data, size_t n, 20472: BlockContents* contents, uint32_t compress_format_version, 20472: const ImmutableCFOptions& ioptions, MemoryAllocator* allocator = nullptr); 20472: 20472: 20472: 20472: 20472: 20472: 20472: inline BlockHandle::BlockHandle() 20472: : BlockHandle(~static_cast(0), ~static_cast(0)) {} 20472: 20472: inline BlockHandle::BlockHandle(uint64_t _offset, uint64_t _size) 20472: : offset_(_offset), size_(_size) {} 20472: 20472: } 20472: # 15 "./table/internal_iterator.h" 2 20472: 20472: namespace rocksdb { 20472: 20472: class PinnedIteratorsManager; 20472: 20472: struct IterateResult { 20472: Slice key; 20472: bool may_be_out_of_upper_bound; 20472: 20472: bool value_prepared = true; 20472: }; 20472: 20472: template 20472: class InternalIteratorBase : public Cleanable { 20472: public: 20472: InternalIteratorBase() {} 20472: 20472: 20472: InternalIteratorBase(const InternalIteratorBase&) = delete; 20472: InternalIteratorBase& operator=(const InternalIteratorBase&) = delete; 20472: 20472: virtual ~InternalIteratorBase() {} 20472: 20472: 20472: 20472: 20472: virtual bool Valid() const = 0; 20472: 20472: 20472: 20472: virtual void SeekToFirst() = 0; 20472: 20472: 20472: 20472: virtual void SeekToLast() = 0; 20472: # 58 "./table/internal_iterator.h" 20472: virtual void Seek(const Slice& target) = 0; 20472: 20472: 20472: 20472: 20472: virtual void SeekForPrev(const Slice& target) = 0; 20472: 20472: 20472: 20472: 20472: virtual void Next() = 0; 20472: 20472: 20472: 20472: 20472: 20472: virtual bool NextAndGetResult(IterateResult* result) { 20472: Next(); 20472: bool is_valid = Valid(); 20472: if (is_valid) { 20472: result->key = key(); 20472: 20472: 20472: 20472: result->may_be_out_of_upper_bound = true; 20472: result->value_prepared = false; 20472: 20472: # 84 "./table/internal_iterator.h" 3 4 20472: (static_cast ( 20472: # 84 "./table/internal_iterator.h" 20472: MayBeOutOfUpperBound() 20472: # 84 "./table/internal_iterator.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 84 "./table/internal_iterator.h" 20472: "MayBeOutOfUpperBound()" 20472: # 84 "./table/internal_iterator.h" 3 4 20472: , "./table/internal_iterator.h", 84, __extension__ __PRETTY_FUNCTION__)) 20472: # 84 "./table/internal_iterator.h" 20472: ; 20472: } 20472: return is_valid; 20472: } 20472: 20472: 20472: 20472: 20472: virtual void Prev() = 0; 20472: 20472: 20472: 20472: 20472: 20472: virtual Slice key() const = 0; 20472: 20472: 20472: 20472: virtual Slice user_key() const { return ExtractUserKey(key()); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual TValue value() const = 0; 20472: 20472: 20472: 20472: 20472: virtual Status status() const = 0; 20472: # 127 "./table/internal_iterator.h" 20472: virtual bool PrepareValue() { return true; } 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual bool IsOutOfBound() { return false; } 20472: 20472: 20472: virtual bool MayBeOutOfLowerBound() { return true; } 20472: 20472: 20472: 20472: virtual bool MayBeOutOfUpperBound() { return true; } 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual void SetPinnedItersMgr(PinnedIteratorsManager* ) { 20472: } 20472: # 159 "./table/internal_iterator.h" 20472: virtual bool IsKeyPinned() const { return false; } 20472: 20472: 20472: 20472: 20472: 20472: virtual bool IsValuePinned() const { return false; } 20472: 20472: virtual Status GetProperty(std::string , std::string* ) { 20472: return Status::NotSupported(""); 20472: } 20472: 20472: protected: 20472: void SeekForPrevImpl(const Slice& target, const Comparator* cmp) { 20472: Seek(target); 20472: if (!Valid()) { 20472: SeekToLast(); 20472: } 20472: while (Valid() && cmp->Compare(target, key()) < 0) { 20472: Prev(); 20472: } 20472: } 20472: 20472: bool is_mutable_; 20472: }; 20472: 20472: using InternalIterator = InternalIteratorBase; 20472: 20472: 20472: template 20472: extern InternalIteratorBase* NewEmptyInternalIterator(); 20472: 20472: 20472: template 20472: extern InternalIteratorBase* NewErrorInternalIterator( 20472: const Status& status); 20472: 20472: 20472: template 20472: extern InternalIteratorBase* NewErrorInternalIterator( 20472: const Status& status, Arena* arena); 20472: 20472: } 20472: # 13 "./db/pinned_iterators_manager.h" 2 20472: 20472: namespace rocksdb { 20472: 20472: 20472: 20472: 20472: class PinnedIteratorsManager : public Cleanable { 20472: public: 20472: PinnedIteratorsManager() : pinning_enabled(false) {} 20472: ~PinnedIteratorsManager() { 20472: if (pinning_enabled) { 20472: ReleasePinnedData(); 20472: } 20472: } 20472: 20472: 20472: void StartPinning() { 20472: 20472: # 30 "./db/pinned_iterators_manager.h" 3 4 20472: (static_cast ( 20472: # 30 "./db/pinned_iterators_manager.h" 20472: pinning_enabled == false 20472: # 30 "./db/pinned_iterators_manager.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 30 "./db/pinned_iterators_manager.h" 20472: "pinning_enabled == false" 20472: # 30 "./db/pinned_iterators_manager.h" 3 4 20472: , "./db/pinned_iterators_manager.h", 30, __extension__ __PRETTY_FUNCTION__)) 20472: # 30 "./db/pinned_iterators_manager.h" 20472: ; 20472: pinning_enabled = true; 20472: } 20472: 20472: 20472: bool PinningEnabled() { return pinning_enabled; } 20472: 20472: 20472: void PinIterator(InternalIterator* iter, bool arena = false) { 20472: if (arena) { 20472: PinPtr(iter, &PinnedIteratorsManager::ReleaseArenaInternalIterator); 20472: } else { 20472: PinPtr(iter, &PinnedIteratorsManager::ReleaseInternalIterator); 20472: } 20472: } 20472: 20472: typedef void (*ReleaseFunction)(void* arg1); 20472: void PinPtr(void* ptr, ReleaseFunction release_func) { 20472: 20472: # 48 "./db/pinned_iterators_manager.h" 3 4 20472: (static_cast ( 20472: # 48 "./db/pinned_iterators_manager.h" 20472: pinning_enabled 20472: # 48 "./db/pinned_iterators_manager.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 48 "./db/pinned_iterators_manager.h" 20472: "pinning_enabled" 20472: # 48 "./db/pinned_iterators_manager.h" 3 4 20472: , "./db/pinned_iterators_manager.h", 48, __extension__ __PRETTY_FUNCTION__)) 20472: # 48 "./db/pinned_iterators_manager.h" 20472: ; 20472: if (ptr == nullptr) { 20472: return; 20472: } 20472: pinned_ptrs_.emplace_back(ptr, release_func); 20472: } 20472: 20472: 20472: inline void ReleasePinnedData() { 20472: 20472: # 57 "./db/pinned_iterators_manager.h" 3 4 20472: (static_cast ( 20472: # 57 "./db/pinned_iterators_manager.h" 20472: pinning_enabled == true 20472: # 57 "./db/pinned_iterators_manager.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 57 "./db/pinned_iterators_manager.h" 20472: "pinning_enabled == true" 20472: # 57 "./db/pinned_iterators_manager.h" 3 4 20472: , "./db/pinned_iterators_manager.h", 57, __extension__ __PRETTY_FUNCTION__)) 20472: # 57 "./db/pinned_iterators_manager.h" 20472: ; 20472: pinning_enabled = false; 20472: 20472: 20472: std::sort(pinned_ptrs_.begin(), pinned_ptrs_.end()); 20472: auto unique_end = std::unique(pinned_ptrs_.begin(), pinned_ptrs_.end()); 20472: 20472: for (auto i = pinned_ptrs_.begin(); i != unique_end; ++i) { 20472: void* ptr = i->first; 20472: ReleaseFunction release_func = i->second; 20472: release_func(ptr); 20472: } 20472: pinned_ptrs_.clear(); 20472: 20472: Cleanable::Reset(); 20472: } 20472: 20472: private: 20472: static void ReleaseInternalIterator(void* ptr) { 20472: delete reinterpret_cast(ptr); 20472: } 20472: 20472: static void ReleaseArenaInternalIterator(void* ptr) { 20472: reinterpret_cast(ptr)->~InternalIterator(); 20472: } 20472: 20472: bool pinning_enabled; 20472: std::vector> pinned_ptrs_; 20472: }; 20472: 20472: } 20472: # 16 "./db/range_tombstone_fragmenter.h" 2 20472: 20472: 20472: 20472: namespace rocksdb { 20472: 20472: struct FragmentedRangeTombstoneList { 20472: public: 20472: 20472: 20472: 20472: 20472: struct RangeTombstoneStack { 20472: RangeTombstoneStack(const Slice& start, const Slice& end, size_t start_idx, 20472: size_t end_idx) 20472: : start_key(start), 20472: end_key(end), 20472: seq_start_idx(start_idx), 20472: seq_end_idx(end_idx) {} 20472: 20472: Slice start_key; 20472: Slice end_key; 20472: size_t seq_start_idx; 20472: size_t seq_end_idx; 20472: }; 20472: FragmentedRangeTombstoneList( 20472: std::unique_ptr unfragmented_tombstones, 20472: const InternalKeyComparator& icmp, bool for_compaction = false, 20472: const std::vector& snapshots = {}); 20472: 20472: std::vector::const_iterator begin() const { 20472: return tombstones_.begin(); 20472: } 20472: 20472: std::vector::const_iterator end() const { 20472: return tombstones_.end(); 20472: } 20472: 20472: std::vector::const_iterator seq_iter(size_t idx) const { 20472: return std::next(tombstone_seqs_.begin(), idx); 20472: } 20472: 20472: std::vector::const_iterator seq_begin() const { 20472: return tombstone_seqs_.begin(); 20472: } 20472: 20472: std::vector::const_iterator seq_end() const { 20472: return tombstone_seqs_.end(); 20472: } 20472: 20472: bool empty() const { return tombstones_.empty(); } 20472: 20472: 20472: 20472: bool ContainsRange(SequenceNumber lower, SequenceNumber upper) const; 20472: 20472: private: 20472: 20472: 20472: 20472: void FragmentTombstones( 20472: std::unique_ptr unfragmented_tombstones, 20472: const InternalKeyComparator& icmp, bool for_compaction, 20472: const std::vector& snapshots); 20472: 20472: std::vector tombstones_; 20472: std::vector tombstone_seqs_; 20472: std::set seq_set_; 20472: std::list pinned_slices_; 20472: PinnedIteratorsManager pinned_iters_mgr_; 20472: }; 20472: # 96 "./db/range_tombstone_fragmenter.h" 20472: class FragmentedRangeTombstoneIterator : public InternalIterator { 20472: public: 20472: FragmentedRangeTombstoneIterator( 20472: const FragmentedRangeTombstoneList* tombstones, 20472: const InternalKeyComparator& icmp, SequenceNumber upper_bound, 20472: SequenceNumber lower_bound = 0); 20472: FragmentedRangeTombstoneIterator( 20472: const std::shared_ptr& tombstones, 20472: const InternalKeyComparator& icmp, SequenceNumber upper_bound, 20472: SequenceNumber lower_bound = 0); 20472: 20472: void SeekToFirst() override; 20472: void SeekToLast() override; 20472: 20472: void SeekToTopFirst(); 20472: void SeekToTopLast(); 20472: # 121 "./db/range_tombstone_fragmenter.h" 20472: void Seek(const Slice& target) override; 20472: 20472: 20472: 20472: void SeekForPrev(const Slice& target) override; 20472: 20472: void Next() override; 20472: void Prev() override; 20472: 20472: void TopNext(); 20472: void TopPrev(); 20472: 20472: bool Valid() const override; 20472: Slice key() const override { 20472: MaybePinKey(); 20472: return current_start_key_.Encode(); 20472: } 20472: Slice value() const override { return pos_->end_key; } 20472: bool IsKeyPinned() const override { return false; } 20472: bool IsValuePinned() const override { return true; } 20472: Status status() const override { return Status::OK(); } 20472: 20472: bool empty() const { return tombstones_->empty(); } 20472: void Invalidate() { 20472: pos_ = tombstones_->end(); 20472: seq_pos_ = tombstones_->seq_end(); 20472: pinned_pos_ = tombstones_->end(); 20472: pinned_seq_pos_ = tombstones_->seq_end(); 20472: } 20472: 20472: RangeTombstone Tombstone() const { 20472: return RangeTombstone(start_key(), end_key(), seq()); 20472: } 20472: Slice start_key() const { return pos_->start_key; } 20472: Slice end_key() const { return pos_->end_key; } 20472: SequenceNumber seq() const { return *seq_pos_; } 20472: ParsedInternalKey parsed_start_key() const { 20472: return ParsedInternalKey(pos_->start_key, kMaxSequenceNumber, 20472: kTypeRangeDeletion); 20472: } 20472: ParsedInternalKey parsed_end_key() const { 20472: return ParsedInternalKey(pos_->end_key, kMaxSequenceNumber, 20472: kTypeRangeDeletion); 20472: } 20472: 20472: SequenceNumber MaxCoveringTombstoneSeqnum(const Slice& user_key); 20472: # 177 "./db/range_tombstone_fragmenter.h" 20472: std::map> 20472: SplitBySnapshot(const std::vector& snapshots); 20472: 20472: SequenceNumber upper_bound() const { return upper_bound_; } 20472: SequenceNumber lower_bound() const { return lower_bound_; } 20472: 20472: private: 20472: using RangeTombstoneStack = FragmentedRangeTombstoneList::RangeTombstoneStack; 20472: 20472: struct RangeTombstoneStackStartComparator { 20472: explicit RangeTombstoneStackStartComparator(const Comparator* c) : cmp(c) {} 20472: 20472: bool operator()(const RangeTombstoneStack& a, 20472: const RangeTombstoneStack& b) const { 20472: return cmp->Compare(a.start_key, b.start_key) < 0; 20472: } 20472: 20472: bool operator()(const RangeTombstoneStack& a, const Slice& b) const { 20472: return cmp->Compare(a.start_key, b) < 0; 20472: } 20472: 20472: bool operator()(const Slice& a, const RangeTombstoneStack& b) const { 20472: return cmp->Compare(a, b.start_key) < 0; 20472: } 20472: 20472: const Comparator* cmp; 20472: }; 20472: 20472: struct RangeTombstoneStackEndComparator { 20472: explicit RangeTombstoneStackEndComparator(const Comparator* c) : cmp(c) {} 20472: 20472: bool operator()(const RangeTombstoneStack& a, 20472: const RangeTombstoneStack& b) const { 20472: return cmp->Compare(a.end_key, b.end_key) < 0; 20472: } 20472: 20472: bool operator()(const RangeTombstoneStack& a, const Slice& b) const { 20472: return cmp->Compare(a.end_key, b) < 0; 20472: } 20472: 20472: bool operator()(const Slice& a, const RangeTombstoneStack& b) const { 20472: return cmp->Compare(a, b.end_key) < 0; 20472: } 20472: 20472: const Comparator* cmp; 20472: }; 20472: 20472: void MaybePinKey() const { 20472: if (pos_ != tombstones_->end() && seq_pos_ != tombstones_->seq_end() && 20472: (pinned_pos_ != pos_ || pinned_seq_pos_ != seq_pos_)) { 20472: current_start_key_.Set(pos_->start_key, *seq_pos_, kTypeRangeDeletion); 20472: pinned_pos_ = pos_; 20472: pinned_seq_pos_ = seq_pos_; 20472: } 20472: } 20472: 20472: void SeekToCoveringTombstone(const Slice& key); 20472: void SeekForPrevToCoveringTombstone(const Slice& key); 20472: void ScanForwardToVisibleTombstone(); 20472: void ScanBackwardToVisibleTombstone(); 20472: bool ValidPos() const { 20472: return Valid() && seq_pos_ != tombstones_->seq_iter(pos_->seq_end_idx); 20472: } 20472: 20472: const RangeTombstoneStackStartComparator tombstone_start_cmp_; 20472: const RangeTombstoneStackEndComparator tombstone_end_cmp_; 20472: const InternalKeyComparator* icmp_; 20472: const Comparator* ucmp_; 20472: std::shared_ptr tombstones_ref_; 20472: const FragmentedRangeTombstoneList* tombstones_; 20472: SequenceNumber upper_bound_; 20472: SequenceNumber lower_bound_; 20472: std::vector::const_iterator pos_; 20472: std::vector::const_iterator seq_pos_; 20472: mutable std::vector::const_iterator pinned_pos_; 20472: mutable std::vector::const_iterator pinned_seq_pos_; 20472: mutable InternalKey current_start_key_; 20472: }; 20472: 20472: } 20472: # 20 "./db/memtable.h" 2 20472: # 1 "./db/read_callback.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: namespace rocksdb { 20472: 20472: class ReadCallback { 20472: public: 20472: ReadCallback(SequenceNumber last_visible_seq) 20472: : max_visible_seq_(last_visible_seq) {} 20472: ReadCallback(SequenceNumber last_visible_seq, SequenceNumber min_uncommitted) 20472: : max_visible_seq_(last_visible_seq), min_uncommitted_(min_uncommitted) {} 20472: 20472: virtual ~ReadCallback() {} 20472: 20472: 20472: 20472: virtual bool IsVisibleFullCheck(SequenceNumber seq) = 0; 20472: 20472: inline bool IsVisible(SequenceNumber seq) { 20472: 20472: # 26 "./db/read_callback.h" 3 4 20472: (static_cast ( 20472: # 26 "./db/read_callback.h" 20472: min_uncommitted_ > 0 20472: # 26 "./db/read_callback.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 26 "./db/read_callback.h" 20472: "min_uncommitted_ > 0" 20472: # 26 "./db/read_callback.h" 3 4 20472: , "./db/read_callback.h", 26, __extension__ __PRETTY_FUNCTION__)) 20472: # 26 "./db/read_callback.h" 20472: ; 20472: 20472: # 27 "./db/read_callback.h" 3 4 20472: (static_cast ( 20472: # 27 "./db/read_callback.h" 20472: min_uncommitted_ >= kMinUnCommittedSeq 20472: # 27 "./db/read_callback.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 27 "./db/read_callback.h" 20472: "min_uncommitted_ >= kMinUnCommittedSeq" 20472: # 27 "./db/read_callback.h" 3 4 20472: , "./db/read_callback.h", 27, __extension__ __PRETTY_FUNCTION__)) 20472: # 27 "./db/read_callback.h" 20472: ; 20472: if (seq < min_uncommitted_) { 20472: 20472: # 29 "./db/read_callback.h" 3 4 20472: (static_cast ( 20472: # 29 "./db/read_callback.h" 20472: seq <= max_visible_seq_ 20472: # 29 "./db/read_callback.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 29 "./db/read_callback.h" 20472: "seq <= max_visible_seq_" 20472: # 29 "./db/read_callback.h" 3 4 20472: , "./db/read_callback.h", 29, __extension__ __PRETTY_FUNCTION__)) 20472: # 29 "./db/read_callback.h" 20472: ; 20472: return true; 20472: } else if (max_visible_seq_ < seq) { 20472: 20472: # 32 "./db/read_callback.h" 3 4 20472: (static_cast ( 20472: # 32 "./db/read_callback.h" 20472: seq != 0 20472: # 32 "./db/read_callback.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 32 "./db/read_callback.h" 20472: "seq != 0" 20472: # 32 "./db/read_callback.h" 3 4 20472: , "./db/read_callback.h", 32, __extension__ __PRETTY_FUNCTION__)) 20472: # 32 "./db/read_callback.h" 20472: ; 20472: return false; 20472: } else { 20472: 20472: # 35 "./db/read_callback.h" 3 4 20472: (static_cast ( 20472: # 35 "./db/read_callback.h" 20472: seq != 0 20472: # 35 "./db/read_callback.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 35 "./db/read_callback.h" 20472: "seq != 0" 20472: # 35 "./db/read_callback.h" 3 4 20472: , "./db/read_callback.h", 35, __extension__ __PRETTY_FUNCTION__)) 20472: # 35 "./db/read_callback.h" 20472: ; 20472: return IsVisibleFullCheck(seq); 20472: } 20472: } 20472: 20472: inline SequenceNumber max_visible_seq() { return max_visible_seq_; } 20472: 20472: 20472: virtual void Refresh(SequenceNumber seq) { max_visible_seq_ = seq; } 20472: 20472: protected: 20472: 20472: 20472: SequenceNumber max_visible_seq_ = kMaxSequenceNumber; 20472: 20472: const SequenceNumber min_uncommitted_ = kMinUnCommittedSeq; 20472: }; 20472: 20472: } 20472: # 21 "./db/memtable.h" 2 20472: # 1 "./db/version_edit.h" 1 20472: # 10 "./db/version_edit.h" 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "./db/blob/blob_file_addition.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "/usr/include/c++/10/cassert" 1 3 20472: # 41 "/usr/include/c++/10/cassert" 3 20472: 20472: # 42 "/usr/include/c++/10/cassert" 3 20472: 20472: 20472: # 1 "/usr/include/assert.h" 1 3 4 20472: # 45 "/usr/include/c++/10/cassert" 2 3 20472: # 9 "./db/blob/blob_file_addition.h" 2 20472: 20472: 20472: 20472: 20472: # 1 "./db/blob/blob_constants.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: namespace rocksdb { 20472: 20472: constexpr uint64_t kInvalidBlobFileNumber = 0; 20472: 20472: } 20472: # 14 "./db/blob/blob_file_addition.h" 2 20472: 20472: 20472: namespace rocksdb { 20472: 20472: class JSONWriter; 20472: class Slice; 20472: class Status; 20472: 20472: class BlobFileAddition { 20472: public: 20472: BlobFileAddition() = default; 20472: 20472: BlobFileAddition(uint64_t blob_file_number, uint64_t total_blob_count, 20472: uint64_t total_blob_bytes, std::string checksum_method, 20472: std::string checksum_value) 20472: : blob_file_number_(blob_file_number), 20472: total_blob_count_(total_blob_count), 20472: total_blob_bytes_(total_blob_bytes), 20472: checksum_method_(std::move(checksum_method)), 20472: checksum_value_(std::move(checksum_value)) { 20472: 20472: # 34 "./db/blob/blob_file_addition.h" 3 4 20472: (static_cast ( 20472: # 34 "./db/blob/blob_file_addition.h" 20472: checksum_method_.empty() == checksum_value_.empty() 20472: # 34 "./db/blob/blob_file_addition.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 34 "./db/blob/blob_file_addition.h" 20472: "checksum_method_.empty() == checksum_value_.empty()" 20472: # 34 "./db/blob/blob_file_addition.h" 3 4 20472: , "./db/blob/blob_file_addition.h", 34, __extension__ __PRETTY_FUNCTION__)) 20472: # 34 "./db/blob/blob_file_addition.h" 20472: ; 20472: } 20472: 20472: uint64_t GetBlobFileNumber() const { return blob_file_number_; } 20472: uint64_t GetTotalBlobCount() const { return total_blob_count_; } 20472: uint64_t GetTotalBlobBytes() const { return total_blob_bytes_; } 20472: const std::string& GetChecksumMethod() const { return checksum_method_; } 20472: const std::string& GetChecksumValue() const { return checksum_value_; } 20472: 20472: void EncodeTo(std::string* output) const; 20472: Status DecodeFrom(Slice* input); 20472: 20472: std::string DebugString() const; 20472: std::string DebugJSON() const; 20472: 20472: private: 20472: enum CustomFieldTags : uint32_t; 20472: 20472: uint64_t blob_file_number_ = kInvalidBlobFileNumber; 20472: uint64_t total_blob_count_ = 0; 20472: uint64_t total_blob_bytes_ = 0; 20472: std::string checksum_method_; 20472: std::string checksum_value_; 20472: }; 20472: 20472: bool operator==(const BlobFileAddition& lhs, const BlobFileAddition& rhs); 20472: bool operator!=(const BlobFileAddition& lhs, const BlobFileAddition& rhs); 20472: 20472: std::ostream& operator<<(std::ostream& os, 20472: const BlobFileAddition& blob_file_addition); 20472: JSONWriter& operator<<(JSONWriter& jw, 20472: const BlobFileAddition& blob_file_addition); 20472: 20472: } 20472: # 17 "./db/version_edit.h" 2 20472: # 1 "./db/blob/blob_file_garbage.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 15 "./db/blob/blob_file_garbage.h" 20472: namespace rocksdb { 20472: 20472: class JSONWriter; 20472: class Slice; 20472: class Status; 20472: 20472: class BlobFileGarbage { 20472: public: 20472: BlobFileGarbage() = default; 20472: 20472: BlobFileGarbage(uint64_t blob_file_number, uint64_t garbage_blob_count, 20472: uint64_t garbage_blob_bytes) 20472: : blob_file_number_(blob_file_number), 20472: garbage_blob_count_(garbage_blob_count), 20472: garbage_blob_bytes_(garbage_blob_bytes) {} 20472: 20472: uint64_t GetBlobFileNumber() const { return blob_file_number_; } 20472: uint64_t GetGarbageBlobCount() const { return garbage_blob_count_; } 20472: uint64_t GetGarbageBlobBytes() const { return garbage_blob_bytes_; } 20472: 20472: void EncodeTo(std::string* output) const; 20472: Status DecodeFrom(Slice* input); 20472: 20472: std::string DebugString() const; 20472: std::string DebugJSON() const; 20472: 20472: private: 20472: enum CustomFieldTags : uint32_t; 20472: 20472: uint64_t blob_file_number_ = kInvalidBlobFileNumber; 20472: uint64_t garbage_blob_count_ = 0; 20472: uint64_t garbage_blob_bytes_ = 0; 20472: }; 20472: 20472: bool operator==(const BlobFileGarbage& lhs, const BlobFileGarbage& rhs); 20472: bool operator!=(const BlobFileGarbage& lhs, const BlobFileGarbage& rhs); 20472: 20472: std::ostream& operator<<(std::ostream& os, 20472: const BlobFileGarbage& blob_file_garbage); 20472: JSONWriter& operator<<(JSONWriter& jw, 20472: const BlobFileGarbage& blob_file_garbage); 20472: 20472: } 20472: # 18 "./db/version_edit.h" 2 20472: 20472: # 1 "./memory/arena.h" 1 20472: # 14 "./memory/arena.h" 20472: 20472: 20472: # 1 "/usr/include/arm-linux-gnueabihf/sys/mman.h" 1 3 4 20472: # 25 "/usr/include/arm-linux-gnueabihf/sys/mman.h" 3 4 20472: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/10/include/stddef.h" 1 3 4 20472: # 26 "/usr/include/arm-linux-gnueabihf/sys/mman.h" 2 3 4 20472: # 41 "/usr/include/arm-linux-gnueabihf/sys/mman.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/mman.h" 1 3 4 20472: # 29 "/usr/include/arm-linux-gnueabihf/bits/mman.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/mman-map-flags-generic.h" 1 3 4 20472: # 30 "/usr/include/arm-linux-gnueabihf/bits/mman.h" 2 3 4 20472: 20472: 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/mman-linux.h" 1 3 4 20472: # 113 "/usr/include/arm-linux-gnueabihf/bits/mman-linux.h" 3 4 20472: # 1 "/usr/include/arm-linux-gnueabihf/bits/mman-shared.h" 1 3 4 20472: # 46 "/usr/include/arm-linux-gnueabihf/bits/mman-shared.h" 3 4 20472: 20472: # 46 "/usr/include/arm-linux-gnueabihf/bits/mman-shared.h" 3 4 20472: extern "C" { 20472: 20472: 20472: 20472: int memfd_create (const char *__name, unsigned int __flags) throw (); 20472: 20472: 20472: 20472: int mlock2 (const void *__addr, size_t __length, unsigned int __flags) throw (); 20472: 20472: 20472: 20472: 20472: 20472: int pkey_alloc (unsigned int __flags, unsigned int __access_rights) throw (); 20472: 20472: 20472: 20472: int pkey_set (int __key, unsigned int __access_rights) throw (); 20472: 20472: 20472: 20472: int pkey_get (int __key) throw (); 20472: 20472: 20472: 20472: int pkey_free (int __key) throw (); 20472: 20472: 20472: 20472: int pkey_mprotect (void *__addr, size_t __len, int __prot, int __pkey) throw (); 20472: 20472: } 20472: # 114 "/usr/include/arm-linux-gnueabihf/bits/mman-linux.h" 2 3 4 20472: # 33 "/usr/include/arm-linux-gnueabihf/bits/mman.h" 2 3 4 20472: # 42 "/usr/include/arm-linux-gnueabihf/sys/mman.h" 2 3 4 20472: 20472: 20472: 20472: 20472: extern "C" { 20472: # 57 "/usr/include/arm-linux-gnueabihf/sys/mman.h" 3 4 20472: extern void *mmap (void *__addr, size_t __len, int __prot, 20472: int __flags, int __fd, __off_t __offset) throw (); 20472: # 70 "/usr/include/arm-linux-gnueabihf/sys/mman.h" 3 4 20472: extern void *mmap64 (void *__addr, size_t __len, int __prot, 20472: int __flags, int __fd, __off64_t __offset) throw (); 20472: 20472: 20472: 20472: 20472: extern int munmap (void *__addr, size_t __len) throw (); 20472: 20472: 20472: 20472: 20472: extern int mprotect (void *__addr, size_t __len, int __prot) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int msync (void *__addr, size_t __len, int __flags); 20472: 20472: 20472: 20472: 20472: extern int madvise (void *__addr, size_t __len, int __advice) throw (); 20472: 20472: 20472: 20472: extern int posix_madvise (void *__addr, size_t __len, int __advice) throw (); 20472: 20472: 20472: 20472: 20472: extern int mlock (const void *__addr, size_t __len) throw (); 20472: 20472: 20472: extern int munlock (const void *__addr, size_t __len) throw (); 20472: 20472: 20472: 20472: 20472: extern int mlockall (int __flags) throw (); 20472: 20472: 20472: 20472: extern int munlockall (void) throw (); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: extern int mincore (void *__start, size_t __len, unsigned char *__vec) 20472: throw (); 20472: # 133 "/usr/include/arm-linux-gnueabihf/sys/mman.h" 3 4 20472: extern void *mremap (void *__addr, size_t __old_len, size_t __new_len, 20472: int __flags, ...) throw (); 20472: 20472: 20472: 20472: extern int remap_file_pages (void *__start, size_t __size, int __prot, 20472: size_t __pgoff, int __flags) throw (); 20472: 20472: 20472: 20472: 20472: extern int shm_open (const char *__name, int __oflag, mode_t __mode); 20472: 20472: 20472: extern int shm_unlink (const char *__name); 20472: 20472: } 20472: # 17 "./memory/arena.h" 2 20472: 20472: # 1 "/usr/include/assert.h" 1 3 4 20472: # 19 "./memory/arena.h" 2 20472: 20472: # 1 "/usr/include/c++/10/cerrno" 1 3 20472: # 39 "/usr/include/c++/10/cerrno" 3 20472: 20472: # 40 "/usr/include/c++/10/cerrno" 3 20472: # 21 "./memory/arena.h" 2 20472: 20472: 20472: # 1 "./memory/allocator.h" 1 20472: # 13 "./memory/allocator.h" 20472: 20472: # 1 "/usr/include/c++/10/cerrno" 1 3 20472: # 39 "/usr/include/c++/10/cerrno" 3 20472: 20472: # 40 "/usr/include/c++/10/cerrno" 3 20472: # 15 "./memory/allocator.h" 2 20472: 20472: 20472: 20472: 20472: # 18 "./memory/allocator.h" 20472: namespace rocksdb { 20472: 20472: class Logger; 20472: 20472: class Allocator { 20472: public: 20472: virtual ~Allocator() {} 20472: 20472: virtual char* Allocate(size_t bytes) = 0; 20472: virtual char* AllocateAligned(size_t bytes, size_t huge_page_size = 0, 20472: Logger* logger = nullptr) = 0; 20472: 20472: virtual size_t BlockSize() const = 0; 20472: }; 20472: 20472: class AllocTracker { 20472: public: 20472: explicit AllocTracker(WriteBufferManager* write_buffer_manager); 20472: 20472: AllocTracker(const AllocTracker&) = delete; 20472: void operator=(const AllocTracker&) = delete; 20472: 20472: ~AllocTracker(); 20472: void Allocate(size_t bytes); 20472: 20472: 20472: void DoneAllocating(); 20472: 20472: void FreeMem(); 20472: 20472: bool is_freed() const { return write_buffer_manager_ == nullptr || freed_; } 20472: 20472: private: 20472: WriteBufferManager* write_buffer_manager_; 20472: std::atomic bytes_allocated_; 20472: bool done_allocating_; 20472: bool freed_; 20472: }; 20472: 20472: } 20472: # 24 "./memory/arena.h" 2 20472: 20472: 20472: namespace rocksdb { 20472: 20472: class Arena : public Allocator { 20472: public: 20472: 20472: Arena(const Arena&) = delete; 20472: void operator=(const Arena&) = delete; 20472: 20472: static const size_t kInlineSize = 2048; 20472: static const size_t kMinBlockSize; 20472: static const size_t kMaxBlockSize; 20472: 20472: 20472: 20472: 20472: explicit Arena(size_t block_size = kMinBlockSize, 20472: AllocTracker* tracker = nullptr, size_t huge_page_size = 0); 20472: ~Arena(); 20472: 20472: char* Allocate(size_t bytes) override; 20472: # 59 "./memory/arena.h" 20472: char* AllocateAligned(size_t bytes, size_t huge_page_size = 0, 20472: Logger* logger = nullptr) override; 20472: 20472: 20472: 20472: 20472: size_t ApproximateMemoryUsage() const { 20472: return blocks_memory_ + blocks_.capacity() * sizeof(char*) - 20472: alloc_bytes_remaining_; 20472: } 20472: 20472: size_t MemoryAllocatedBytes() const { return blocks_memory_; } 20472: 20472: size_t AllocatedAndUnused() const { return alloc_bytes_remaining_; } 20472: 20472: 20472: 20472: size_t IrregularBlockNum() const { return irregular_block_num; } 20472: 20472: size_t BlockSize() const override { return kBlockSize; } 20472: 20472: bool IsInInlineBlock() const { 20472: return blocks_.empty(); 20472: } 20472: 20472: private: 20472: char inline_block_[kInlineSize] __attribute__((__aligned__(alignof(max_align_t)))); 20472: 20472: const size_t kBlockSize; 20472: 20472: typedef std::vector Blocks; 20472: Blocks blocks_; 20472: 20472: struct MmapInfo { 20472: void* addr_; 20472: size_t length_; 20472: 20472: MmapInfo(void* addr, size_t length) : addr_(addr), length_(length) {} 20472: }; 20472: std::vector huge_blocks_; 20472: size_t irregular_block_num = 0; 20472: 20472: 20472: 20472: 20472: 20472: 20472: char* unaligned_alloc_ptr_ = nullptr; 20472: char* aligned_alloc_ptr_ = nullptr; 20472: 20472: size_t alloc_bytes_remaining_ = 0; 20472: 20472: 20472: size_t hugetlb_size_ = 0; 20472: 20472: char* AllocateFromHugePage(size_t bytes); 20472: char* AllocateFallback(size_t bytes, bool aligned); 20472: char* AllocateNewBlock(size_t block_bytes); 20472: 20472: 20472: size_t blocks_memory_ = 0; 20472: AllocTracker* tracker_; 20472: }; 20472: 20472: inline char* Arena::Allocate(size_t bytes) { 20472: 20472: 20472: 20472: 20472: # 127 "./memory/arena.h" 3 4 20472: (static_cast ( 20472: # 127 "./memory/arena.h" 20472: bytes > 0 20472: # 127 "./memory/arena.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 127 "./memory/arena.h" 20472: "bytes > 0" 20472: # 127 "./memory/arena.h" 3 4 20472: , "./memory/arena.h", 127, __extension__ __PRETTY_FUNCTION__)) 20472: # 127 "./memory/arena.h" 20472: ; 20472: if (bytes <= alloc_bytes_remaining_) { 20472: unaligned_alloc_ptr_ -= bytes; 20472: alloc_bytes_remaining_ -= bytes; 20472: return unaligned_alloc_ptr_; 20472: } 20472: return AllocateFallback(bytes, false ); 20472: } 20472: 20472: 20472: 20472: 20472: extern size_t OptimizeBlockSize(size_t block_size); 20472: 20472: } 20472: # 20 "./db/version_edit.h" 2 20472: 20472: # 1 "./table/table_reader.h" 1 20472: # 10 "./table/table_reader.h" 20472: 20472: 20472: 20472: 20472: # 1 "./table/get_context.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "./table/block_based/block.h" 1 20472: # 10 "./table/block_based/block.h" 20472: 20472: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/10/include/stddef.h" 1 3 4 20472: # 12 "./table/block_based/block.h" 2 20472: # 23 "./table/block_based/block.h" 20472: # 1 "./table/block_based/block_prefix_index.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: namespace rocksdb { 20472: 20472: class Comparator; 20472: class Iterator; 20472: class Slice; 20472: class SliceTransform; 20472: 20472: 20472: 20472: 20472: class BlockPrefixIndex { 20472: public: 20472: 20472: 20472: 20472: 20472: uint32_t GetBlocks(const Slice& key, uint32_t** blocks); 20472: 20472: size_t ApproximateMemoryUsage() const { 20472: return sizeof(BlockPrefixIndex) + 20472: (num_block_array_buffer_entries_ + num_buckets_) * sizeof(uint32_t); 20472: } 20472: 20472: 20472: 20472: 20472: static Status Create(const SliceTransform* hash_key_extractor, 20472: const Slice& prefixes, const Slice& prefix_meta, 20472: BlockPrefixIndex** prefix_index); 20472: 20472: ~BlockPrefixIndex() { 20472: delete[] buckets_; 20472: delete[] block_array_buffer_; 20472: } 20472: 20472: private: 20472: class Builder; 20472: friend Builder; 20472: 20472: BlockPrefixIndex(const SliceTransform* internal_prefix_extractor, 20472: uint32_t num_buckets, uint32_t* buckets, 20472: uint32_t num_block_array_buffer_entries, 20472: uint32_t* block_array_buffer) 20472: : internal_prefix_extractor_(internal_prefix_extractor), 20472: num_buckets_(num_buckets), 20472: num_block_array_buffer_entries_(num_block_array_buffer_entries), 20472: buckets_(buckets), 20472: block_array_buffer_(block_array_buffer) {} 20472: 20472: const SliceTransform* internal_prefix_extractor_; 20472: uint32_t num_buckets_; 20472: uint32_t num_block_array_buffer_entries_; 20472: uint32_t* buckets_; 20472: uint32_t* block_array_buffer_; 20472: }; 20472: 20472: } 20472: # 24 "./table/block_based/block.h" 2 20472: # 1 "./table/block_based/data_block_hash_index.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: namespace rocksdb { 20472: # 65 "./table/block_based/data_block_hash_index.h" 20472: const uint8_t kNoEntry = 255; 20472: const uint8_t kCollision = 254; 20472: const uint8_t kMaxRestartSupportedByHashIndex = 253; 20472: 20472: 20472: const size_t kMaxBlockSizeSupportedByHashIndex = 1u << 16; 20472: const double kDefaultUtilRatio = 0.75; 20472: 20472: class DataBlockHashIndexBuilder { 20472: public: 20472: DataBlockHashIndexBuilder() 20472: : bucket_per_key_(-1 ), 20472: estimated_num_buckets_(0), 20472: valid_(false) {} 20472: 20472: void Initialize(double util_ratio) { 20472: if (util_ratio <= 0) { 20472: util_ratio = kDefaultUtilRatio; 20472: } 20472: bucket_per_key_ = 1 / util_ratio; 20472: valid_ = true; 20472: } 20472: 20472: inline bool Valid() const { return valid_ && bucket_per_key_ > 0; } 20472: void Add(const Slice& key, const size_t restart_index); 20472: void Finish(std::string& buffer); 20472: void Reset(); 20472: inline size_t EstimateSize() const { 20472: uint16_t estimated_num_buckets = 20472: static_cast(estimated_num_buckets_); 20472: 20472: 20472: estimated_num_buckets |= 1; 20472: 20472: return sizeof(uint16_t) + 20472: static_cast(estimated_num_buckets * sizeof(uint8_t)); 20472: } 20472: 20472: private: 20472: double bucket_per_key_; 20472: double estimated_num_buckets_; 20472: 20472: 20472: 20472: 20472: bool valid_; 20472: 20472: std::vector> hash_and_restart_pairs_; 20472: friend class DataBlockHashIndex_DataBlockHashTestSmall_Test; 20472: }; 20472: 20472: class DataBlockHashIndex { 20472: public: 20472: DataBlockHashIndex() : num_buckets_(0) {} 20472: 20472: void Initialize(const char* data, uint16_t size, uint16_t* map_offset); 20472: 20472: uint8_t Lookup(const char* data, uint32_t map_offset, const Slice& key) const; 20472: 20472: inline bool Valid() { return num_buckets_ != 0; } 20472: 20472: private: 20472: 20472: 20472: 20472: 20472: 20472: 20472: uint16_t num_buckets_; 20472: }; 20472: 20472: } 20472: # 25 "./table/block_based/block.h" 2 20472: 20472: 20472: # 1 "./test_util/sync_point.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "/usr/include/assert.h" 1 3 4 20472: # 8 "./test_util/sync_point.h" 2 20472: # 18 "./test_util/sync_point.h" 20472: extern int rocksdb_kill_odds; 20472: 20472: extern std::vector rocksdb_kill_prefix_blacklist; 20472: 20472: 20472: 20472: 20472: 20472: 20472: namespace rocksdb { 20472: 20472: extern void TestKillRandom(std::string kill_point, int odds, 20472: const std::string& srcfile, int srcline); 20472: # 43 "./test_util/sync_point.h" 20472: } 20472: # 53 "./test_util/sync_point.h" 20472: namespace rocksdb { 20472: # 64 "./test_util/sync_point.h" 20472: class SyncPoint { 20472: public: 20472: static SyncPoint* GetInstance(); 20472: 20472: SyncPoint(const SyncPoint&) = delete; 20472: SyncPoint& operator=(const SyncPoint&) = delete; 20472: ~SyncPoint(); 20472: 20472: struct SyncPointPair { 20472: std::string predecessor; 20472: std::string successor; 20472: }; 20472: 20472: 20472: 20472: void LoadDependency(const std::vector& dependencies); 20472: 20472: 20472: 20472: 20472: 20472: void LoadDependencyAndMarkers(const std::vector& dependencies, 20472: const std::vector& markers); 20472: 20472: 20472: 20472: 20472: void SetCallBack(const std::string& point, 20472: const std::function& callback); 20472: 20472: 20472: void ClearCallBack(const std::string& point); 20472: 20472: 20472: void ClearAllCallBacks(); 20472: 20472: 20472: void EnableProcessing(); 20472: 20472: 20472: void DisableProcessing(); 20472: 20472: 20472: void ClearTrace(); 20472: 20472: 20472: 20472: 20472: void Process(const std::string& point, void* cb_arg = nullptr); 20472: 20472: 20472: 20472: 20472: 20472: 20472: struct Data; 20472: 20472: private: 20472: 20472: SyncPoint(); 20472: Data* impl_; 20472: }; 20472: 20472: } 20472: # 28 "./table/block_based/block.h" 2 20472: 20472: 20472: namespace rocksdb { 20472: 20472: struct BlockContents; 20472: class Comparator; 20472: template 20472: class BlockIter; 20472: class DataBlockIter; 20472: class IndexBlockIter; 20472: class BlockPrefixIndex; 20472: 20472: 20472: 20472: 20472: 20472: class BlockReadAmpBitmap { 20472: public: 20472: explicit BlockReadAmpBitmap(size_t block_size, size_t bytes_per_bit, 20472: Statistics* statistics) 20472: : bitmap_(nullptr), 20472: bytes_per_bit_pow_(0), 20472: statistics_(statistics), 20472: rnd_(Random::GetTLSInstance()->Uniform( 20472: static_cast(bytes_per_bit))) { 20472: rocksdb::SyncPoint::GetInstance()->Process("BlockReadAmpBitmap:rnd", &rnd_); 20472: 20472: # 54 "./table/block_based/block.h" 3 4 20472: (static_cast ( 20472: # 54 "./table/block_based/block.h" 20472: block_size > 0 && bytes_per_bit > 0 20472: # 54 "./table/block_based/block.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 54 "./table/block_based/block.h" 20472: "block_size > 0 && bytes_per_bit > 0" 20472: # 54 "./table/block_based/block.h" 3 4 20472: , "./table/block_based/block.h", 54, __extension__ __PRETTY_FUNCTION__)) 20472: # 54 "./table/block_based/block.h" 20472: ; 20472: 20472: 20472: while (bytes_per_bit >>= 1) { 20472: bytes_per_bit_pow_++; 20472: } 20472: 20472: 20472: size_t num_bits_needed = ((block_size - 1) >> bytes_per_bit_pow_) + 1; 20472: 20472: # 63 "./table/block_based/block.h" 3 4 20472: (static_cast ( 20472: # 63 "./table/block_based/block.h" 20472: num_bits_needed > 0 20472: # 63 "./table/block_based/block.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 63 "./table/block_based/block.h" 20472: "num_bits_needed > 0" 20472: # 63 "./table/block_based/block.h" 3 4 20472: , "./table/block_based/block.h", 63, __extension__ __PRETTY_FUNCTION__)) 20472: # 63 "./table/block_based/block.h" 20472: ; 20472: 20472: 20472: size_t bitmap_size = (num_bits_needed - 1) / kBitsPerEntry + 1; 20472: 20472: 20472: bitmap_ = new std::atomic[bitmap_size](); 20472: 20472: RecordTick(GetStatistics(), READ_AMP_TOTAL_READ_BYTES, block_size); 20472: } 20472: 20472: ~BlockReadAmpBitmap() { delete[] bitmap_; } 20472: 20472: void Mark(uint32_t start_offset, uint32_t end_offset) { 20472: 20472: # 77 "./table/block_based/block.h" 3 4 20472: (static_cast ( 20472: # 77 "./table/block_based/block.h" 20472: end_offset >= start_offset 20472: # 77 "./table/block_based/block.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 77 "./table/block_based/block.h" 20472: "end_offset >= start_offset" 20472: # 77 "./table/block_based/block.h" 3 4 20472: , "./table/block_based/block.h", 77, __extension__ __PRETTY_FUNCTION__)) 20472: # 77 "./table/block_based/block.h" 20472: ; 20472: 20472: uint32_t start_bit = 20472: (start_offset + (1 << bytes_per_bit_pow_) - rnd_ - 1) >> 20472: bytes_per_bit_pow_; 20472: 20472: uint32_t exclusive_end_bit = 20472: (end_offset + (1 << bytes_per_bit_pow_) - rnd_) >> bytes_per_bit_pow_; 20472: if (start_bit >= exclusive_end_bit) { 20472: return; 20472: } 20472: 20472: # 88 "./table/block_based/block.h" 3 4 20472: (static_cast ( 20472: # 88 "./table/block_based/block.h" 20472: exclusive_end_bit > 0 20472: # 88 "./table/block_based/block.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 88 "./table/block_based/block.h" 20472: "exclusive_end_bit > 0" 20472: # 88 "./table/block_based/block.h" 3 4 20472: , "./table/block_based/block.h", 88, __extension__ __PRETTY_FUNCTION__)) 20472: # 88 "./table/block_based/block.h" 20472: ; 20472: 20472: if (GetAndSet(start_bit) == 0) { 20472: uint32_t new_useful_bytes = (exclusive_end_bit - start_bit) 20472: << bytes_per_bit_pow_; 20472: RecordTick(GetStatistics(), READ_AMP_ESTIMATE_USEFUL_BYTES, 20472: new_useful_bytes); 20472: } 20472: } 20472: 20472: Statistics* GetStatistics() { 20472: return statistics_.load(std::memory_order_relaxed); 20472: } 20472: 20472: void SetStatistics(Statistics* stats) { statistics_.store(stats); } 20472: 20472: uint32_t GetBytesPerBit() { return 1 << bytes_per_bit_pow_; } 20472: 20472: size_t ApproximateMemoryUsage() const { 20472: 20472: return malloc_usable_size((void*)this); 20472: 20472: return sizeof(*this); 20472: } 20472: 20472: private: 20472: 20472: inline bool GetAndSet(uint32_t bit_idx) { 20472: const uint32_t byte_idx = bit_idx / kBitsPerEntry; 20472: const uint32_t bit_mask = 1 << (bit_idx % kBitsPerEntry); 20472: 20472: return bitmap_[byte_idx].fetch_or(bit_mask, std::memory_order_relaxed) & 20472: bit_mask; 20472: } 20472: 20472: const uint32_t kBytesPersEntry = sizeof(uint32_t); 20472: const uint32_t kBitsPerEntry = kBytesPersEntry * 8; 20472: 20472: 20472: 20472: std::atomic* bitmap_; 20472: 20472: 20472: uint8_t bytes_per_bit_pow_; 20472: 20472: 20472: 20472: std::atomic statistics_; 20472: uint32_t rnd_; 20472: }; 20472: # 151 "./table/block_based/block.h" 20472: class Block { 20472: public: 20472: 20472: explicit Block(BlockContents&& contents, size_t read_amp_bytes_per_bit = 0, 20472: Statistics* statistics = nullptr); 20472: 20472: Block(const Block&) = delete; 20472: void operator=(const Block&) = delete; 20472: 20472: ~Block(); 20472: 20472: size_t size() const { return size_; } 20472: const char* data() const { return data_; } 20472: 20472: size_t usable_size() const { return contents_.usable_size(); } 20472: uint32_t NumRestarts() const; 20472: bool own_bytes() const { return contents_.own_bytes(); } 20472: 20472: BlockBasedTableOptions::DataBlockIndexType IndexType() const; 20472: # 190 "./table/block_based/block.h" 20472: DataBlockIter* NewDataIterator(const Comparator* comparator, 20472: const Comparator* user_comparator, 20472: SequenceNumber global_seqno, 20472: DataBlockIter* iter = nullptr, 20472: Statistics* stats = nullptr, 20472: bool block_contents_pinned = false); 20472: # 209 "./table/block_based/block.h" 20472: IndexBlockIter* NewIndexIterator(const Comparator* comparator, 20472: const Comparator* user_comparator, 20472: SequenceNumber global_seqno, 20472: IndexBlockIter* iter, Statistics* stats, 20472: bool total_order_seek, bool have_first_key, 20472: bool key_includes_seq, bool value_is_full, 20472: bool block_contents_pinned = false, 20472: BlockPrefixIndex* prefix_index = nullptr); 20472: 20472: 20472: size_t ApproximateMemoryUsage() const; 20472: 20472: private: 20472: BlockContents contents_; 20472: const char* data_; 20472: size_t size_; 20472: uint32_t restart_offset_; 20472: uint32_t num_restarts_; 20472: std::unique_ptr read_amp_bitmap_; 20472: DataBlockHashIndex data_block_hash_index_; 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: class GlobalSeqnoAppliedKey { 20472: public: 20472: void Initialize(IterKey* key, SequenceNumber global_seqno) { 20472: key_ = key; 20472: global_seqno_ = global_seqno; 20472: 20472: init_ = true; 20472: 20472: } 20472: 20472: Slice UpdateAndGetKey() { 20472: 20472: # 247 "./table/block_based/block.h" 3 4 20472: (static_cast ( 20472: # 247 "./table/block_based/block.h" 20472: init_ 20472: # 247 "./table/block_based/block.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 247 "./table/block_based/block.h" 20472: "init_" 20472: # 247 "./table/block_based/block.h" 3 4 20472: , "./table/block_based/block.h", 247, __extension__ __PRETTY_FUNCTION__)) 20472: # 247 "./table/block_based/block.h" 20472: ; 20472: if (global_seqno_ == kDisableGlobalSequenceNumber) { 20472: return key_->GetKey(); 20472: } 20472: ParsedInternalKey parsed(Slice(), 0, kTypeValue); 20472: if (!ParseInternalKey(key_->GetInternalKey(), &parsed)) { 20472: 20472: # 253 "./table/block_based/block.h" 3 4 20472: (static_cast ( 20472: # 253 "./table/block_based/block.h" 20472: false 20472: # 253 "./table/block_based/block.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 253 "./table/block_based/block.h" 20472: "false" 20472: # 253 "./table/block_based/block.h" 3 4 20472: , "./table/block_based/block.h", 253, __extension__ __PRETTY_FUNCTION__)) 20472: # 253 "./table/block_based/block.h" 20472: ; 20472: return Slice(); 20472: } 20472: parsed.sequence = global_seqno_; 20472: scratch_.SetInternalKey(parsed); 20472: return scratch_.GetInternalKey(); 20472: } 20472: 20472: bool IsKeyPinned() const { 20472: return global_seqno_ == kDisableGlobalSequenceNumber && key_->IsKeyPinned(); 20472: } 20472: 20472: private: 20472: const IterKey* key_; 20472: SequenceNumber global_seqno_; 20472: IterKey scratch_; 20472: 20472: bool init_ = false; 20472: 20472: }; 20472: 20472: template 20472: class BlockIter : public InternalIteratorBase { 20472: public: 20472: void InitializeBase(const Comparator* comparator, const char* data, 20472: uint32_t restarts, uint32_t num_restarts, 20472: SequenceNumber global_seqno, bool block_contents_pinned) { 20472: 20472: # 280 "./table/block_based/block.h" 3 4 20472: (static_cast ( 20472: # 280 "./table/block_based/block.h" 20472: data_ == nullptr 20472: # 280 "./table/block_based/block.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 280 "./table/block_based/block.h" 20472: "data_ == nullptr" 20472: # 280 "./table/block_based/block.h" 3 4 20472: , "./table/block_based/block.h", 280, __extension__ __PRETTY_FUNCTION__)) 20472: # 280 "./table/block_based/block.h" 20472: ; 20472: 20472: # 281 "./table/block_based/block.h" 3 4 20472: (static_cast ( 20472: # 281 "./table/block_based/block.h" 20472: num_restarts > 0 20472: # 281 "./table/block_based/block.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 281 "./table/block_based/block.h" 20472: "num_restarts > 0" 20472: # 281 "./table/block_based/block.h" 3 4 20472: , "./table/block_based/block.h", 281, __extension__ __PRETTY_FUNCTION__)) 20472: # 281 "./table/block_based/block.h" 20472: ; 20472: 20472: applied_key_.Initialize(&raw_key_, global_seqno); 20472: 20472: comparator_ = comparator; 20472: data_ = data; 20472: restarts_ = restarts; 20472: num_restarts_ = num_restarts; 20472: current_ = restarts_; 20472: restart_index_ = num_restarts_; 20472: global_seqno_ = global_seqno; 20472: block_contents_pinned_ = block_contents_pinned; 20472: cache_handle_ = nullptr; 20472: } 20472: 20472: 20472: 20472: void InvalidateBase(Status s) { 20472: 20472: 20472: # 300 "./table/block_based/block.h" 3 4 20472: (static_cast ( 20472: # 300 "./table/block_based/block.h" 20472: !pinned_iters_mgr_ || (pinned_iters_mgr_ && !pinned_iters_mgr_->PinningEnabled()) 20472: # 300 "./table/block_based/block.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 300 "./table/block_based/block.h" 20472: "!pinned_iters_mgr_ || (pinned_iters_mgr_ && !pinned_iters_mgr_->PinningEnabled())" 20472: # 300 "./table/block_based/block.h" 3 4 20472: , "./table/block_based/block.h", 300, __extension__ __PRETTY_FUNCTION__)) 20472: 20472: # 301 "./table/block_based/block.h" 20472: ; 20472: 20472: data_ = nullptr; 20472: current_ = restarts_; 20472: status_ = s; 20472: 20472: 20472: Cleanable::Reset(); 20472: } 20472: 20472: bool Valid() const override { return current_ < restarts_; } 20472: Status status() const override { return status_; } 20472: Slice key() const override { 20472: 20472: # 314 "./table/block_based/block.h" 3 4 20472: (static_cast ( 20472: # 314 "./table/block_based/block.h" 20472: Valid() 20472: # 314 "./table/block_based/block.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 314 "./table/block_based/block.h" 20472: "Valid()" 20472: # 314 "./table/block_based/block.h" 3 4 20472: , "./table/block_based/block.h", 314, __extension__ __PRETTY_FUNCTION__)) 20472: # 314 "./table/block_based/block.h" 20472: ; 20472: return key_; 20472: } 20472: 20472: 20472: ~BlockIter() override { 20472: 20472: 20472: # 321 "./table/block_based/block.h" 3 4 20472: (static_cast ( 20472: # 321 "./table/block_based/block.h" 20472: !pinned_iters_mgr_ || (pinned_iters_mgr_ && !pinned_iters_mgr_->PinningEnabled()) 20472: # 321 "./table/block_based/block.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 321 "./table/block_based/block.h" 20472: "!pinned_iters_mgr_ || (pinned_iters_mgr_ && !pinned_iters_mgr_->PinningEnabled())" 20472: # 321 "./table/block_based/block.h" 3 4 20472: , "./table/block_based/block.h", 321, __extension__ __PRETTY_FUNCTION__)) 20472: 20472: # 322 "./table/block_based/block.h" 20472: ; 20472: } 20472: void SetPinnedItersMgr(PinnedIteratorsManager* pinned_iters_mgr) override { 20472: pinned_iters_mgr_ = pinned_iters_mgr; 20472: } 20472: PinnedIteratorsManager* pinned_iters_mgr_ = nullptr; 20472: 20472: 20472: bool IsKeyPinned() const override { 20472: return block_contents_pinned_ && key_pinned_; 20472: } 20472: 20472: bool IsValuePinned() const override { return block_contents_pinned_; } 20472: 20472: size_t TEST_CurrentEntrySize() { return NextEntryOffset() - current_; } 20472: 20472: uint32_t ValueOffset() const { 20472: return static_cast(value_.data() - data_); 20472: } 20472: 20472: void SetCacheHandle(Cache::Handle* handle) { cache_handle_ = handle; } 20472: 20472: Cache::Handle* cache_handle() { return cache_handle_; } 20472: 20472: virtual void Next() override = 0; 20472: 20472: protected: 20472: 20472: 20472: const Comparator* comparator_; 20472: const char* data_; 20472: uint32_t num_restarts_; 20472: 20472: 20472: uint32_t restart_index_; 20472: uint32_t restarts_; 20472: 20472: uint32_t current_; 20472: 20472: IterKey raw_key_; 20472: 20472: 20472: GlobalSeqnoAppliedKey applied_key_; 20472: 20472: Slice key_; 20472: Slice value_; 20472: Status status_; 20472: bool key_pinned_; 20472: 20472: 20472: 20472: bool block_contents_pinned_; 20472: SequenceNumber global_seqno_; 20472: 20472: private: 20472: 20472: 20472: 20472: 20472: 20472: Cache::Handle* cache_handle_; 20472: 20472: public: 20472: 20472: inline uint32_t NextEntryOffset() const { 20472: 20472: return static_cast((value_.data() + value_.size()) - data_); 20472: } 20472: 20472: uint32_t GetRestartPoint(uint32_t index) { 20472: 20472: # 392 "./table/block_based/block.h" 3 4 20472: (static_cast ( 20472: # 392 "./table/block_based/block.h" 20472: index < num_restarts_ 20472: # 392 "./table/block_based/block.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 392 "./table/block_based/block.h" 20472: "index < num_restarts_" 20472: # 392 "./table/block_based/block.h" 3 4 20472: , "./table/block_based/block.h", 392, __extension__ __PRETTY_FUNCTION__)) 20472: # 392 "./table/block_based/block.h" 20472: ; 20472: return DecodeFixed32(data_ + restarts_ + index * sizeof(uint32_t)); 20472: } 20472: 20472: void SeekToRestartPoint(uint32_t index) { 20472: raw_key_.Clear(); 20472: restart_index_ = index; 20472: 20472: 20472: 20472: uint32_t offset = GetRestartPoint(index); 20472: value_ = Slice(data_ + offset, 0); 20472: } 20472: 20472: void CorruptionError(); 20472: 20472: protected: 20472: template 20472: inline bool BinarySeek(const Slice& target, uint32_t left, uint32_t right, 20472: uint32_t* index, bool* is_index_key_result, 20472: const Comparator* comp); 20472: 20472: void FindKeyAfterBinarySeek(const Slice& target, uint32_t index, 20472: bool is_index_key_result, const Comparator* comp); 20472: }; 20472: 20472: class DataBlockIter final : public BlockIter { 20472: public: 20472: DataBlockIter() 20472: : BlockIter(), read_amp_bitmap_(nullptr), last_bitmap_offset_(0) {} 20472: DataBlockIter(const Comparator* comparator, const Comparator* user_comparator, 20472: const char* data, uint32_t restarts, uint32_t num_restarts, 20472: SequenceNumber global_seqno, 20472: BlockReadAmpBitmap* read_amp_bitmap, bool block_contents_pinned, 20472: DataBlockHashIndex* data_block_hash_index) 20472: : DataBlockIter() { 20472: Initialize(comparator, user_comparator, data, restarts, num_restarts, 20472: global_seqno, read_amp_bitmap, block_contents_pinned, 20472: data_block_hash_index); 20472: } 20472: void Initialize(const Comparator* comparator, 20472: const Comparator* user_comparator, const char* data, 20472: uint32_t restarts, uint32_t num_restarts, 20472: SequenceNumber global_seqno, 20472: BlockReadAmpBitmap* read_amp_bitmap, 20472: bool block_contents_pinned, 20472: DataBlockHashIndex* data_block_hash_index) { 20472: InitializeBase(comparator, data, restarts, num_restarts, global_seqno, 20472: block_contents_pinned); 20472: user_comparator_ = user_comparator; 20472: raw_key_.SetIsUserKey(false); 20472: read_amp_bitmap_ = read_amp_bitmap; 20472: last_bitmap_offset_ = current_ + 1; 20472: data_block_hash_index_ = data_block_hash_index; 20472: } 20472: 20472: Slice value() const override { 20472: 20472: # 449 "./table/block_based/block.h" 3 4 20472: (static_cast ( 20472: # 449 "./table/block_based/block.h" 20472: Valid() 20472: # 449 "./table/block_based/block.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 449 "./table/block_based/block.h" 20472: "Valid()" 20472: # 449 "./table/block_based/block.h" 3 4 20472: , "./table/block_based/block.h", 449, __extension__ __PRETTY_FUNCTION__)) 20472: # 449 "./table/block_based/block.h" 20472: ; 20472: if (read_amp_bitmap_ && current_ < restarts_ && 20472: current_ != last_bitmap_offset_) { 20472: read_amp_bitmap_->Mark(current_ , 20472: NextEntryOffset() - 1); 20472: last_bitmap_offset_ = current_; 20472: } 20472: return value_; 20472: } 20472: 20472: void Seek(const Slice& target) override; 20472: 20472: inline bool SeekForGet(const Slice& target) { 20472: if (!data_block_hash_index_) { 20472: Seek(target); 20472: return true; 20472: } 20472: 20472: return SeekForGetImpl(target); 20472: } 20472: 20472: void SeekForPrev(const Slice& target) override; 20472: 20472: void Prev() override; 20472: 20472: void Next() final override; 20472: 20472: 20472: 20472: 20472: void NextOrReport(); 20472: 20472: void SeekToFirst() override; 20472: 20472: 20472: 20472: 20472: void SeekToFirstOrReport(); 20472: 20472: void SeekToLast() override; 20472: 20472: void Invalidate(Status s) { 20472: InvalidateBase(s); 20472: 20472: prev_entries_keys_buff_.clear(); 20472: prev_entries_.clear(); 20472: prev_entries_idx_ = -1; 20472: } 20472: 20472: private: 20472: 20472: BlockReadAmpBitmap* read_amp_bitmap_; 20472: 20472: mutable uint32_t last_bitmap_offset_; 20472: struct CachedPrevEntry { 20472: explicit CachedPrevEntry(uint32_t _offset, const char* _key_ptr, 20472: size_t _key_offset, size_t _key_size, Slice _value) 20472: : offset(_offset), 20472: key_ptr(_key_ptr), 20472: key_offset(_key_offset), 20472: key_size(_key_size), 20472: value(_value) {} 20472: 20472: 20472: uint32_t offset; 20472: 20472: const char* key_ptr; 20472: 20472: size_t key_offset; 20472: 20472: size_t key_size; 20472: 20472: Slice value; 20472: }; 20472: std::string prev_entries_keys_buff_; 20472: std::vector prev_entries_; 20472: int32_t prev_entries_idx_ = -1; 20472: 20472: DataBlockHashIndex* data_block_hash_index_; 20472: const Comparator* user_comparator_; 20472: 20472: template 20472: inline bool ParseNextDataKey(const char* limit = nullptr); 20472: 20472: bool SeekForGetImpl(const Slice& target); 20472: }; 20472: 20472: class IndexBlockIter final : public BlockIter { 20472: public: 20472: IndexBlockIter() : BlockIter(), prefix_index_(nullptr) {} 20472: 20472: 20472: 20472: 20472: 20472: void Initialize(const Comparator* comparator, 20472: const Comparator* user_comparator, const char* data, 20472: uint32_t restarts, uint32_t num_restarts, 20472: SequenceNumber global_seqno, BlockPrefixIndex* prefix_index, 20472: bool have_first_key, bool key_includes_seq, 20472: bool value_is_full, bool block_contents_pinned) { 20472: if (!key_includes_seq) { 20472: user_comparator_wrapper_ = std::unique_ptr( 20472: new UserComparatorWrapper(user_comparator)); 20472: } 20472: InitializeBase( 20472: key_includes_seq ? comparator : user_comparator_wrapper_.get(), data, 20472: restarts, num_restarts, kDisableGlobalSequenceNumber, 20472: block_contents_pinned); 20472: key_includes_seq_ = key_includes_seq; 20472: raw_key_.SetIsUserKey(!key_includes_seq_); 20472: prefix_index_ = prefix_index; 20472: value_delta_encoded_ = !value_is_full; 20472: have_first_key_ = have_first_key; 20472: if (have_first_key_ && global_seqno != kDisableGlobalSequenceNumber) { 20472: global_seqno_state_.reset(new GlobalSeqnoState(global_seqno)); 20472: } else { 20472: global_seqno_state_.reset(); 20472: } 20472: } 20472: 20472: Slice user_key() const override { 20472: if (key_includes_seq_) { 20472: return ExtractUserKey(key()); 20472: } 20472: return key(); 20472: } 20472: 20472: IndexValue value() const override { 20472: 20472: # 578 "./table/block_based/block.h" 3 4 20472: (static_cast ( 20472: # 578 "./table/block_based/block.h" 20472: Valid() 20472: # 578 "./table/block_based/block.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 578 "./table/block_based/block.h" 20472: "Valid()" 20472: # 578 "./table/block_based/block.h" 3 4 20472: , "./table/block_based/block.h", 578, __extension__ __PRETTY_FUNCTION__)) 20472: # 578 "./table/block_based/block.h" 20472: ; 20472: if (value_delta_encoded_ || global_seqno_state_ != nullptr) { 20472: return decoded_value_; 20472: } else { 20472: IndexValue entry; 20472: Slice v = value_; 20472: Status decode_s __attribute__((__unused__)) = 20472: entry.DecodeFrom(&v, have_first_key_, nullptr); 20472: 20472: # 586 "./table/block_based/block.h" 3 4 20472: (static_cast ( 20472: # 586 "./table/block_based/block.h" 20472: decode_s.ok() 20472: # 586 "./table/block_based/block.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 586 "./table/block_based/block.h" 20472: "decode_s.ok()" 20472: # 586 "./table/block_based/block.h" 3 4 20472: , "./table/block_based/block.h", 586, __extension__ __PRETTY_FUNCTION__)) 20472: # 586 "./table/block_based/block.h" 20472: ; 20472: return entry; 20472: } 20472: } 20472: # 598 "./table/block_based/block.h" 20472: void Seek(const Slice& target) override; 20472: 20472: void SeekForPrev(const Slice&) override { 20472: 20472: # 601 "./table/block_based/block.h" 3 4 20472: (static_cast ( 20472: # 601 "./table/block_based/block.h" 20472: false 20472: # 601 "./table/block_based/block.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 601 "./table/block_based/block.h" 20472: "false" 20472: # 601 "./table/block_based/block.h" 3 4 20472: , "./table/block_based/block.h", 601, __extension__ __PRETTY_FUNCTION__)) 20472: # 601 "./table/block_based/block.h" 20472: ; 20472: current_ = restarts_; 20472: restart_index_ = num_restarts_; 20472: status_ = Status::InvalidArgument( 20472: "RocksDB internal error: should never call SeekForPrev() on index " 20472: "blocks"); 20472: raw_key_.Clear(); 20472: value_.clear(); 20472: } 20472: 20472: void Prev() override; 20472: 20472: void Next() override; 20472: 20472: void SeekToFirst() override; 20472: 20472: void SeekToLast() override; 20472: 20472: void Invalidate(Status s) { InvalidateBase(s); } 20472: 20472: bool IsValuePinned() const override { 20472: return global_seqno_state_ != nullptr ? false : BlockIter::IsValuePinned(); 20472: } 20472: 20472: private: 20472: std::unique_ptr user_comparator_wrapper_; 20472: 20472: bool key_includes_seq_; 20472: bool value_delta_encoded_; 20472: bool have_first_key_; 20472: BlockPrefixIndex* prefix_index_; 20472: 20472: 20472: 20472: 20472: 20472: 20472: IndexValue decoded_value_; 20472: 20472: 20472: 20472: 20472: 20472: struct GlobalSeqnoState { 20472: 20472: 20472: IterKey first_internal_key; 20472: SequenceNumber global_seqno; 20472: 20472: explicit GlobalSeqnoState(SequenceNumber seqno) : global_seqno(seqno) {} 20472: }; 20472: 20472: std::unique_ptr global_seqno_state_; 20472: 20472: 20472: 20472: 20472: bool PrefixSeek(const Slice& target, uint32_t* index, bool* prefix_may_exist); 20472: 20472: 20472: 20472: bool BinaryBlockIndexSeek(const Slice& target, uint32_t* block_ids, 20472: uint32_t left, uint32_t right, uint32_t* index, 20472: bool* prefix_may_exist); 20472: inline int CompareBlockKey(uint32_t block_index, const Slice& target); 20472: 20472: inline bool ParseNextIndexKey(); 20472: 20472: 20472: 20472: inline void DecodeCurrentValue(uint32_t shared); 20472: }; 20472: 20472: } 20472: # 15 "./table/get_context.h" 2 20472: 20472: namespace rocksdb { 20472: class MergeContext; 20472: class PinnedIteratorsManager; 20472: 20472: 20472: 20472: 20472: struct GetContextStats { 20472: uint64_t num_cache_hit = 0; 20472: uint64_t num_cache_index_hit = 0; 20472: uint64_t num_cache_data_hit = 0; 20472: uint64_t num_cache_filter_hit = 0; 20472: uint64_t num_cache_compression_dict_hit = 0; 20472: uint64_t num_cache_index_miss = 0; 20472: uint64_t num_cache_filter_miss = 0; 20472: uint64_t num_cache_data_miss = 0; 20472: uint64_t num_cache_compression_dict_miss = 0; 20472: uint64_t num_cache_bytes_read = 0; 20472: uint64_t num_cache_miss = 0; 20472: uint64_t num_cache_add = 0; 20472: uint64_t num_cache_add_redundant = 0; 20472: uint64_t num_cache_bytes_write = 0; 20472: uint64_t num_cache_index_add = 0; 20472: uint64_t num_cache_index_add_redundant = 0; 20472: uint64_t num_cache_index_bytes_insert = 0; 20472: uint64_t num_cache_data_add = 0; 20472: uint64_t num_cache_data_add_redundant = 0; 20472: uint64_t num_cache_data_bytes_insert = 0; 20472: uint64_t num_cache_filter_add = 0; 20472: uint64_t num_cache_filter_add_redundant = 0; 20472: uint64_t num_cache_filter_bytes_insert = 0; 20472: uint64_t num_cache_compression_dict_add = 0; 20472: uint64_t num_cache_compression_dict_add_redundant = 0; 20472: uint64_t num_cache_compression_dict_bytes_insert = 0; 20472: }; 20472: # 59 "./table/get_context.h" 20472: class GetContext { 20472: public: 20472: 20472: 20472: enum GetState { 20472: kNotFound, 20472: kFound, 20472: kDeleted, 20472: kCorrupt, 20472: kMerge, 20472: kBlobIndex, 20472: }; 20472: GetContextStats get_context_stats_; 20472: # 93 "./table/get_context.h" 20472: GetContext(const Comparator* ucmp, const MergeOperator* merge_operator, 20472: Logger* logger, Statistics* statistics, GetState init_state, 20472: const Slice& user_key, PinnableSlice* value, 20472: bool* value_found, MergeContext* merge_context, bool do_merge, 20472: SequenceNumber* max_covering_tombstone_seq, Env* env, 20472: SequenceNumber* seq = nullptr, 20472: PinnedIteratorsManager* _pinned_iters_mgr = nullptr, 20472: ReadCallback* callback = nullptr, bool* is_blob_index = nullptr, 20472: uint64_t tracing_get_id = 0); 20472: GetContext(const Comparator* ucmp, const MergeOperator* merge_operator, 20472: Logger* logger, Statistics* statistics, GetState init_state, 20472: const Slice& user_key, PinnableSlice* value, 20472: std::string* timestamp, bool* value_found, 20472: MergeContext* merge_context, bool do_merge, 20472: SequenceNumber* max_covering_tombstone_seq, Env* env, 20472: SequenceNumber* seq = nullptr, 20472: PinnedIteratorsManager* _pinned_iters_mgr = nullptr, 20472: ReadCallback* callback = nullptr, bool* is_blob_index = nullptr, 20472: uint64_t tracing_get_id = 0); 20472: 20472: GetContext() = delete; 20472: 20472: 20472: 20472: void MarkKeyMayExist(); 20472: # 127 "./table/get_context.h" 20472: bool SaveValue(const ParsedInternalKey& parsed_key, const Slice& value, 20472: bool* matched, Cleanable* value_pinner = nullptr); 20472: 20472: 20472: 20472: void SaveValue(const Slice& value, SequenceNumber seq); 20472: 20472: GetState State() const { return state_; } 20472: 20472: SequenceNumber* max_covering_tombstone_seq() { 20472: return max_covering_tombstone_seq_; 20472: } 20472: 20472: PinnedIteratorsManager* pinned_iters_mgr() { return pinned_iters_mgr_; } 20472: 20472: 20472: 20472: 20472: void SetReplayLog(std::string* replay_log) { replay_log_ = replay_log; } 20472: 20472: 20472: bool NeedToReadSequence() const { return (seq_ != nullptr); } 20472: 20472: bool sample() const { return sample_; } 20472: 20472: bool CheckCallback(SequenceNumber seq) { 20472: if (callback_) { 20472: return callback_->IsVisible(seq); 20472: } 20472: return true; 20472: } 20472: 20472: void ReportCounters(); 20472: 20472: bool has_callback() const { return callback_ != nullptr; } 20472: 20472: uint64_t get_tracing_get_id() const { return tracing_get_id_; } 20472: 20472: void push_operand(const Slice& value, Cleanable* value_pinner); 20472: 20472: private: 20472: const Comparator* ucmp_; 20472: const MergeOperator* merge_operator_; 20472: 20472: Logger* logger_; 20472: Statistics* statistics_; 20472: 20472: GetState state_; 20472: Slice user_key_; 20472: PinnableSlice* pinnable_val_; 20472: std::string* timestamp_; 20472: bool* value_found_; 20472: MergeContext* merge_context_; 20472: SequenceNumber* max_covering_tombstone_seq_; 20472: Env* env_; 20472: 20472: 20472: SequenceNumber* seq_; 20472: std::string* replay_log_; 20472: 20472: PinnedIteratorsManager* pinned_iters_mgr_; 20472: ReadCallback* callback_; 20472: bool sample_; 20472: 20472: 20472: 20472: bool do_merge_; 20472: bool* is_blob_index_; 20472: 20472: 20472: const uint64_t tracing_get_id_; 20472: }; 20472: 20472: 20472: 20472: 20472: void replayGetContextLog(const Slice& replay_log, const Slice& user_key, 20472: GetContext* get_context, 20472: Cleanable* value_pinner = nullptr); 20472: 20472: } 20472: # 15 "./table/table_reader.h" 2 20472: 20472: # 1 "./table/multiget_context.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 15 "./table/multiget_context.h" 20472: # 1 "./util/autovector.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "/usr/include/c++/10/cassert" 1 3 20472: # 41 "/usr/include/c++/10/cassert" 3 20472: 20472: # 42 "/usr/include/c++/10/cassert" 3 20472: 20472: 20472: # 1 "/usr/include/assert.h" 1 3 4 20472: # 45 "/usr/include/c++/10/cassert" 2 3 20472: # 9 "./util/autovector.h" 2 20472: 20472: # 1 "/usr/include/c++/10/iterator" 1 3 20472: # 58 "/usr/include/c++/10/iterator" 3 20472: 20472: # 59 "/usr/include/c++/10/iterator" 3 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "/usr/include/c++/10/bits/stream_iterator.h" 1 3 20472: # 33 "/usr/include/c++/10/bits/stream_iterator.h" 3 20472: 20472: # 34 "/usr/include/c++/10/bits/stream_iterator.h" 3 20472: 20472: 20472: 20472: 20472: # 37 "/usr/include/c++/10/bits/stream_iterator.h" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template, typename _Dist = ptrdiff_t> 20472: class istream_iterator 20472: : public iterator 20472: { 20472: public: 20472: typedef _CharT char_type; 20472: typedef _Traits traits_type; 20472: typedef basic_istream<_CharT, _Traits> istream_type; 20472: 20472: private: 20472: istream_type* _M_stream; 20472: _Tp _M_value; 20472: 20472: 20472: 20472: bool _M_ok; 20472: 20472: public: 20472: 20472: constexpr istream_iterator() 20472: : _M_stream(0), _M_value(), _M_ok(false) {} 20472: 20472: 20472: istream_iterator(istream_type& __s) 20472: : _M_stream(std::__addressof(__s)), _M_ok(true) 20472: { _M_read(); } 20472: 20472: istream_iterator(const istream_iterator& __obj) 20472: : _M_stream(__obj._M_stream), _M_value(__obj._M_value), 20472: _M_ok(__obj._M_ok) 20472: { } 20472: # 88 "/usr/include/c++/10/bits/stream_iterator.h" 3 20472: istream_iterator& operator=(const istream_iterator&) = default; 20472: ~istream_iterator() = default; 20472: 20472: 20472: const _Tp& 20472: operator*() const 20472: { 20472: 20472: 20472: ; 20472: return _M_value; 20472: } 20472: 20472: const _Tp* 20472: operator->() const { return std::__addressof((operator*())); } 20472: 20472: istream_iterator& 20472: operator++() 20472: { 20472: 20472: 20472: ; 20472: _M_read(); 20472: return *this; 20472: } 20472: 20472: istream_iterator 20472: operator++(int) 20472: { 20472: 20472: 20472: ; 20472: istream_iterator __tmp = *this; 20472: _M_read(); 20472: return __tmp; 20472: } 20472: 20472: private: 20472: bool 20472: _M_equal(const istream_iterator& __x) const 20472: { 20472: 20472: 20472: return (_M_ok == __x._M_ok) && (!_M_ok || _M_stream == __x._M_stream); 20472: } 20472: 20472: void 20472: _M_read() 20472: { 20472: if (_M_stream && !(*_M_stream >> _M_value)) 20472: { 20472: _M_stream = 0; 20472: _M_ok = false; 20472: } 20472: } 20472: 20472: 20472: 20472: friend bool 20472: operator==(const istream_iterator& __x, const istream_iterator& __y) 20472: { return __x._M_equal(__y); } 20472: 20472: 20472: 20472: friend bool 20472: operator!=(const istream_iterator& __x, const istream_iterator& __y) 20472: { return !__x._M_equal(__y); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: }; 20472: # 174 "/usr/include/c++/10/bits/stream_iterator.h" 3 20472: template > 20472: class ostream_iterator 20472: : public iterator 20472: { 20472: public: 20472: 20472: 20472: 20472: 20472: 20472: typedef _CharT char_type; 20472: typedef _Traits traits_type; 20472: typedef basic_ostream<_CharT, _Traits> ostream_type; 20472: 20472: 20472: private: 20472: ostream_type* _M_stream; 20472: const _CharT* _M_string; 20472: 20472: public: 20472: 20472: 20472: 20472: 20472: 20472: 20472: ostream_iterator(ostream_type& __s) 20472: : _M_stream(std::__addressof(__s)), _M_string(0) {} 20472: # 214 "/usr/include/c++/10/bits/stream_iterator.h" 3 20472: ostream_iterator(ostream_type& __s, const _CharT* __c) 20472: : _M_stream(std::__addressof(__s)), _M_string(__c) { } 20472: 20472: 20472: ostream_iterator(const ostream_iterator& __obj) 20472: : _M_stream(__obj._M_stream), _M_string(__obj._M_string) { } 20472: 20472: 20472: ostream_iterator& operator=(const ostream_iterator&) = default; 20472: 20472: 20472: 20472: 20472: ostream_iterator& 20472: operator=(const _Tp& __value) 20472: { 20472: 20472: 20472: ; 20472: *_M_stream << __value; 20472: if (_M_string) 20472: *_M_stream << _M_string; 20472: return *this; 20472: } 20472: 20472: ostream_iterator& 20472: operator*() 20472: { return *this; } 20472: 20472: ostream_iterator& 20472: operator++() 20472: { return *this; } 20472: 20472: ostream_iterator& 20472: operator++(int) 20472: { return *this; } 20472: }; 20472: 20472: 20472: 20472: 20472: } 20472: # 66 "/usr/include/c++/10/iterator" 2 3 20472: # 11 "./util/autovector.h" 2 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 16 "./util/autovector.h" 20472: namespace rocksdb { 20472: # 50 "./util/autovector.h" 20472: template 20472: class autovector { 20472: public: 20472: 20472: typedef T value_type; 20472: typedef typename std::vector::difference_type difference_type; 20472: typedef typename std::vector::size_type size_type; 20472: typedef value_type& reference; 20472: typedef const value_type& const_reference; 20472: typedef value_type* pointer; 20472: typedef const value_type* const_pointer; 20472: 20472: 20472: template 20472: class iterator_impl { 20472: public: 20472: 20472: typedef iterator_impl self_type; 20472: typedef TValueType value_type; 20472: typedef TValueType& reference; 20472: typedef TValueType* pointer; 20472: typedef typename TAutoVector::difference_type difference_type; 20472: typedef std::random_access_iterator_tag iterator_category; 20472: 20472: iterator_impl(TAutoVector* vect, size_t index) 20472: : vect_(vect), index_(index) {}; 20472: iterator_impl(const iterator_impl&) = default; 20472: ~iterator_impl() {} 20472: iterator_impl& operator=(const iterator_impl&) = default; 20472: 20472: 20472: 20472: self_type& operator++() { 20472: ++index_; 20472: return *this; 20472: } 20472: 20472: 20472: self_type operator++(int) { 20472: auto old = *this; 20472: ++index_; 20472: return old; 20472: } 20472: 20472: 20472: self_type& operator--() { 20472: --index_; 20472: return *this; 20472: } 20472: 20472: 20472: self_type operator--(int) { 20472: auto old = *this; 20472: --index_; 20472: return old; 20472: } 20472: 20472: self_type operator-(difference_type len) const { 20472: return self_type(vect_, index_ - len); 20472: } 20472: 20472: difference_type operator-(const self_type& other) const { 20472: 20472: # 112 "./util/autovector.h" 3 4 20472: (static_cast ( 20472: # 112 "./util/autovector.h" 20472: vect_ == other.vect_ 20472: # 112 "./util/autovector.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 112 "./util/autovector.h" 20472: "vect_ == other.vect_" 20472: # 112 "./util/autovector.h" 3 4 20472: , "./util/autovector.h", 112, __extension__ __PRETTY_FUNCTION__)) 20472: # 112 "./util/autovector.h" 20472: ; 20472: return index_ - other.index_; 20472: } 20472: 20472: self_type operator+(difference_type len) const { 20472: return self_type(vect_, index_ + len); 20472: } 20472: 20472: self_type& operator+=(difference_type len) { 20472: index_ += len; 20472: return *this; 20472: } 20472: 20472: self_type& operator-=(difference_type len) { 20472: index_ -= len; 20472: return *this; 20472: } 20472: 20472: 20472: reference operator*() const { 20472: 20472: # 132 "./util/autovector.h" 3 4 20472: (static_cast ( 20472: # 132 "./util/autovector.h" 20472: vect_->size() >= index_ 20472: # 132 "./util/autovector.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 132 "./util/autovector.h" 20472: "vect_->size() >= index_" 20472: # 132 "./util/autovector.h" 3 4 20472: , "./util/autovector.h", 132, __extension__ __PRETTY_FUNCTION__)) 20472: # 132 "./util/autovector.h" 20472: ; 20472: return (*vect_)[index_]; 20472: } 20472: 20472: pointer operator->() const { 20472: 20472: # 137 "./util/autovector.h" 3 4 20472: (static_cast ( 20472: # 137 "./util/autovector.h" 20472: vect_->size() >= index_ 20472: # 137 "./util/autovector.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 137 "./util/autovector.h" 20472: "vect_->size() >= index_" 20472: # 137 "./util/autovector.h" 3 4 20472: , "./util/autovector.h", 137, __extension__ __PRETTY_FUNCTION__)) 20472: # 137 "./util/autovector.h" 20472: ; 20472: return &(*vect_)[index_]; 20472: } 20472: 20472: reference operator[](difference_type len) const { 20472: return *(*this + len); 20472: } 20472: 20472: 20472: bool operator==(const self_type& other) const { 20472: 20472: # 147 "./util/autovector.h" 3 4 20472: (static_cast ( 20472: # 147 "./util/autovector.h" 20472: vect_ == other.vect_ 20472: # 147 "./util/autovector.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 147 "./util/autovector.h" 20472: "vect_ == other.vect_" 20472: # 147 "./util/autovector.h" 3 4 20472: , "./util/autovector.h", 147, __extension__ __PRETTY_FUNCTION__)) 20472: # 147 "./util/autovector.h" 20472: ; 20472: return index_ == other.index_; 20472: } 20472: 20472: bool operator!=(const self_type& other) const { return !(*this == other); } 20472: 20472: bool operator>(const self_type& other) const { 20472: 20472: # 154 "./util/autovector.h" 3 4 20472: (static_cast ( 20472: # 154 "./util/autovector.h" 20472: vect_ == other.vect_ 20472: # 154 "./util/autovector.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 154 "./util/autovector.h" 20472: "vect_ == other.vect_" 20472: # 154 "./util/autovector.h" 3 4 20472: , "./util/autovector.h", 154, __extension__ __PRETTY_FUNCTION__)) 20472: # 154 "./util/autovector.h" 20472: ; 20472: return index_ > other.index_; 20472: } 20472: 20472: bool operator<(const self_type& other) const { 20472: 20472: # 159 "./util/autovector.h" 3 4 20472: (static_cast ( 20472: # 159 "./util/autovector.h" 20472: vect_ == other.vect_ 20472: # 159 "./util/autovector.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 159 "./util/autovector.h" 20472: "vect_ == other.vect_" 20472: # 159 "./util/autovector.h" 3 4 20472: , "./util/autovector.h", 159, __extension__ __PRETTY_FUNCTION__)) 20472: # 159 "./util/autovector.h" 20472: ; 20472: return index_ < other.index_; 20472: } 20472: 20472: bool operator>=(const self_type& other) const { 20472: 20472: # 164 "./util/autovector.h" 3 4 20472: (static_cast ( 20472: # 164 "./util/autovector.h" 20472: vect_ == other.vect_ 20472: # 164 "./util/autovector.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 164 "./util/autovector.h" 20472: "vect_ == other.vect_" 20472: # 164 "./util/autovector.h" 3 4 20472: , "./util/autovector.h", 164, __extension__ __PRETTY_FUNCTION__)) 20472: # 164 "./util/autovector.h" 20472: ; 20472: return index_ >= other.index_; 20472: } 20472: 20472: bool operator<=(const self_type& other) const { 20472: 20472: # 169 "./util/autovector.h" 3 4 20472: (static_cast ( 20472: # 169 "./util/autovector.h" 20472: vect_ == other.vect_ 20472: # 169 "./util/autovector.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 169 "./util/autovector.h" 20472: "vect_ == other.vect_" 20472: # 169 "./util/autovector.h" 3 4 20472: , "./util/autovector.h", 169, __extension__ __PRETTY_FUNCTION__)) 20472: # 169 "./util/autovector.h" 20472: ; 20472: return index_ <= other.index_; 20472: } 20472: 20472: private: 20472: TAutoVector* vect_ = nullptr; 20472: size_t index_ = 0; 20472: }; 20472: 20472: typedef iterator_impl iterator; 20472: typedef iterator_impl const_iterator; 20472: typedef std::reverse_iterator reverse_iterator; 20472: typedef std::reverse_iterator const_reverse_iterator; 20472: 20472: autovector() : values_(reinterpret_cast(buf_)) {} 20472: 20472: autovector(std::initializer_list init_list) 20472: : values_(reinterpret_cast(buf_)) { 20472: for (const T& item : init_list) { 20472: push_back(item); 20472: } 20472: } 20472: 20472: ~autovector() { clear(); } 20472: 20472: 20472: 20472: bool only_in_stack() const { 20472: 20472: return vect_.capacity() == 0; 20472: } 20472: 20472: size_type size() const { return num_stack_items_ + vect_.size(); } 20472: 20472: 20472: 20472: void resize(size_type n) { 20472: if (n > kSize) { 20472: vect_.resize(n - kSize); 20472: while (num_stack_items_ < kSize) { 20472: new ((void*)(&values_[num_stack_items_++])) value_type(); 20472: } 20472: num_stack_items_ = kSize; 20472: } else { 20472: vect_.clear(); 20472: while (num_stack_items_ < n) { 20472: new ((void*)(&values_[num_stack_items_++])) value_type(); 20472: } 20472: while (num_stack_items_ > n) { 20472: values_[--num_stack_items_].~value_type(); 20472: } 20472: } 20472: } 20472: 20472: bool empty() const { return size() == 0; } 20472: 20472: const_reference operator[](size_type n) const { 20472: 20472: # 226 "./util/autovector.h" 3 4 20472: (static_cast ( 20472: # 226 "./util/autovector.h" 20472: n < size() 20472: # 226 "./util/autovector.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 226 "./util/autovector.h" 20472: "n < size()" 20472: # 226 "./util/autovector.h" 3 4 20472: , "./util/autovector.h", 226, __extension__ __PRETTY_FUNCTION__)) 20472: # 226 "./util/autovector.h" 20472: ; 20472: if (n < kSize) { 20472: return values_[n]; 20472: } 20472: return vect_[n - kSize]; 20472: } 20472: 20472: reference operator[](size_type n) { 20472: 20472: # 234 "./util/autovector.h" 3 4 20472: (static_cast ( 20472: # 234 "./util/autovector.h" 20472: n < size() 20472: # 234 "./util/autovector.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 234 "./util/autovector.h" 20472: "n < size()" 20472: # 234 "./util/autovector.h" 3 4 20472: , "./util/autovector.h", 234, __extension__ __PRETTY_FUNCTION__)) 20472: # 234 "./util/autovector.h" 20472: ; 20472: if (n < kSize) { 20472: return values_[n]; 20472: } 20472: return vect_[n - kSize]; 20472: } 20472: 20472: const_reference at(size_type n) const { 20472: 20472: # 242 "./util/autovector.h" 3 4 20472: (static_cast ( 20472: # 242 "./util/autovector.h" 20472: n < size() 20472: # 242 "./util/autovector.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 242 "./util/autovector.h" 20472: "n < size()" 20472: # 242 "./util/autovector.h" 3 4 20472: , "./util/autovector.h", 242, __extension__ __PRETTY_FUNCTION__)) 20472: # 242 "./util/autovector.h" 20472: ; 20472: return (*this)[n]; 20472: } 20472: 20472: reference at(size_type n) { 20472: 20472: # 247 "./util/autovector.h" 3 4 20472: (static_cast ( 20472: # 247 "./util/autovector.h" 20472: n < size() 20472: # 247 "./util/autovector.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 247 "./util/autovector.h" 20472: "n < size()" 20472: # 247 "./util/autovector.h" 3 4 20472: , "./util/autovector.h", 247, __extension__ __PRETTY_FUNCTION__)) 20472: # 247 "./util/autovector.h" 20472: ; 20472: return (*this)[n]; 20472: } 20472: 20472: reference front() { 20472: 20472: # 252 "./util/autovector.h" 3 4 20472: (static_cast ( 20472: # 252 "./util/autovector.h" 20472: !empty() 20472: # 252 "./util/autovector.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 252 "./util/autovector.h" 20472: "!empty()" 20472: # 252 "./util/autovector.h" 3 4 20472: , "./util/autovector.h", 252, __extension__ __PRETTY_FUNCTION__)) 20472: # 252 "./util/autovector.h" 20472: ; 20472: return *begin(); 20472: } 20472: 20472: const_reference front() const { 20472: 20472: # 257 "./util/autovector.h" 3 4 20472: (static_cast ( 20472: # 257 "./util/autovector.h" 20472: !empty() 20472: # 257 "./util/autovector.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 257 "./util/autovector.h" 20472: "!empty()" 20472: # 257 "./util/autovector.h" 3 4 20472: , "./util/autovector.h", 257, __extension__ __PRETTY_FUNCTION__)) 20472: # 257 "./util/autovector.h" 20472: ; 20472: return *begin(); 20472: } 20472: 20472: reference back() { 20472: 20472: # 262 "./util/autovector.h" 3 4 20472: (static_cast ( 20472: # 262 "./util/autovector.h" 20472: !empty() 20472: # 262 "./util/autovector.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 262 "./util/autovector.h" 20472: "!empty()" 20472: # 262 "./util/autovector.h" 3 4 20472: , "./util/autovector.h", 262, __extension__ __PRETTY_FUNCTION__)) 20472: # 262 "./util/autovector.h" 20472: ; 20472: return *(end() - 1); 20472: } 20472: 20472: const_reference back() const { 20472: 20472: # 267 "./util/autovector.h" 3 4 20472: (static_cast ( 20472: # 267 "./util/autovector.h" 20472: !empty() 20472: # 267 "./util/autovector.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 267 "./util/autovector.h" 20472: "!empty()" 20472: # 267 "./util/autovector.h" 3 4 20472: , "./util/autovector.h", 267, __extension__ __PRETTY_FUNCTION__)) 20472: # 267 "./util/autovector.h" 20472: ; 20472: return *(end() - 1); 20472: } 20472: 20472: 20472: void push_back(T&& item) { 20472: if (num_stack_items_ < kSize) { 20472: new ((void*)(&values_[num_stack_items_])) value_type(); 20472: values_[num_stack_items_++] = std::move(item); 20472: } else { 20472: vect_.push_back(item); 20472: } 20472: } 20472: 20472: void push_back(const T& item) { 20472: if (num_stack_items_ < kSize) { 20472: new ((void*)(&values_[num_stack_items_])) value_type(); 20472: values_[num_stack_items_++] = item; 20472: } else { 20472: vect_.push_back(item); 20472: } 20472: } 20472: 20472: template 20472: void emplace_back(Args&&... args) { 20472: if (num_stack_items_ < kSize) { 20472: new ((void*)(&values_[num_stack_items_++])) 20472: value_type(std::forward(args)...); 20472: } else { 20472: vect_.emplace_back(std::forward(args)...); 20472: } 20472: } 20472: 20472: void pop_back() { 20472: 20472: # 301 "./util/autovector.h" 3 4 20472: (static_cast ( 20472: # 301 "./util/autovector.h" 20472: !empty() 20472: # 301 "./util/autovector.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 301 "./util/autovector.h" 20472: "!empty()" 20472: # 301 "./util/autovector.h" 3 4 20472: , "./util/autovector.h", 301, __extension__ __PRETTY_FUNCTION__)) 20472: # 301 "./util/autovector.h" 20472: ; 20472: if (!vect_.empty()) { 20472: vect_.pop_back(); 20472: } else { 20472: values_[--num_stack_items_].~value_type(); 20472: } 20472: } 20472: 20472: void clear() { 20472: while (num_stack_items_ > 0) { 20472: values_[--num_stack_items_].~value_type(); 20472: } 20472: vect_.clear(); 20472: } 20472: 20472: 20472: autovector& assign(const autovector& other); 20472: 20472: autovector(const autovector& other) { assign(other); } 20472: 20472: autovector& operator=(const autovector& other) { return assign(other); } 20472: 20472: 20472: iterator begin() { return iterator(this, 0); } 20472: 20472: const_iterator begin() const { return const_iterator(this, 0); } 20472: 20472: iterator end() { return iterator(this, this->size()); } 20472: 20472: const_iterator end() const { return const_iterator(this, this->size()); } 20472: 20472: reverse_iterator rbegin() { return reverse_iterator(end()); } 20472: 20472: const_reverse_iterator rbegin() const { 20472: return const_reverse_iterator(end()); 20472: } 20472: 20472: reverse_iterator rend() { return reverse_iterator(begin()); } 20472: 20472: const_reverse_iterator rend() const { 20472: return const_reverse_iterator(begin()); 20472: } 20472: 20472: private: 20472: size_type num_stack_items_ = 0; 20472: alignas(alignof( 20472: value_type)) char buf_[kSize * 20472: sizeof(value_type)]; 20472: pointer values_; 20472: 20472: std::vector vect_; 20472: }; 20472: 20472: template 20472: autovector& autovector::assign(const autovector& other) { 20472: values_ = reinterpret_cast(buf_); 20472: 20472: vect_.assign(other.vect_.begin(), other.vect_.end()); 20472: 20472: 20472: num_stack_items_ = other.num_stack_items_; 20472: std::copy(other.values_, other.values_ + num_stack_items_, values_); 20472: 20472: return *this; 20472: } 20472: 20472: } 20472: # 16 "./table/multiget_context.h" 2 20472: # 1 "./util/math.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "/usr/include/assert.h" 1 3 4 20472: # 9 "./util/math.h" 2 20472: 20472: 20472: 20472: 20472: 20472: namespace rocksdb { 20472: 20472: template 20472: inline int BitsSetToOne(T v) { 20472: static_assert(std::is_integral::value, "non-integral type"); 20472: # 27 "./util/math.h" 20472: static_assert(sizeof(T) <= sizeof(unsigned long long), "type too big"); 20472: if (sizeof(T) > sizeof(unsigned long)) { 20472: return __builtin_popcountll(static_cast(v)); 20472: } else if (sizeof(T) > sizeof(unsigned int)) { 20472: return __builtin_popcountl(static_cast(v)); 20472: } else { 20472: return __builtin_popcount(static_cast(v)); 20472: } 20472: 20472: } 20472: 20472: } 20472: # 17 "./table/multiget_context.h" 2 20472: 20472: namespace rocksdb { 20472: class GetContext; 20472: 20472: struct KeyContext { 20472: const Slice* key; 20472: LookupKey* lkey; 20472: Slice ukey; 20472: Slice ikey; 20472: ColumnFamilyHandle* column_family; 20472: Status* s; 20472: MergeContext merge_context; 20472: SequenceNumber max_covering_tombstone_seq; 20472: bool key_exists; 20472: void* cb_arg; 20472: PinnableSlice* value; 20472: std::string* timestamp; 20472: GetContext* get_context; 20472: 20472: KeyContext(ColumnFamilyHandle* col_family, const Slice& user_key, 20472: PinnableSlice* val, std::string* ts, Status* stat) 20472: : key(&user_key), 20472: lkey(nullptr), 20472: column_family(col_family), 20472: s(stat), 20472: max_covering_tombstone_seq(0), 20472: key_exists(false), 20472: cb_arg(nullptr), 20472: value(val), 20472: timestamp(ts), 20472: get_context(nullptr) {} 20472: 20472: KeyContext() = default; 20472: }; 20472: # 87 "./table/multiget_context.h" 20472: class MultiGetContext { 20472: public: 20472: 20472: 20472: 20472: 20472: static const int MAX_BATCH_SIZE = 32; 20472: 20472: MultiGetContext(autovector* sorted_keys, 20472: size_t begin, size_t num_keys, SequenceNumber snapshot, 20472: const ReadOptions& read_opts) 20472: : num_keys_(num_keys), 20472: value_mask_(0), 20472: value_size_(0), 20472: lookup_key_ptr_(reinterpret_cast(lookup_key_stack_buf)) { 20472: if (num_keys > MAX_LOOKUP_KEYS_ON_STACK) { 20472: lookup_key_heap_buf.reset(new char[sizeof(LookupKey) * num_keys]); 20472: lookup_key_ptr_ = reinterpret_cast( 20472: lookup_key_heap_buf.get()); 20472: } 20472: 20472: for (size_t iter = 0; iter != num_keys_; ++iter) { 20472: 20472: sorted_keys_[iter] = (*sorted_keys)[begin + iter]; 20472: sorted_keys_[iter]->lkey = new (&lookup_key_ptr_[iter]) 20472: LookupKey(*sorted_keys_[iter]->key, snapshot, read_opts.timestamp); 20472: sorted_keys_[iter]->ukey = sorted_keys_[iter]->lkey->user_key(); 20472: sorted_keys_[iter]->ikey = sorted_keys_[iter]->lkey->internal_key(); 20472: } 20472: } 20472: 20472: ~MultiGetContext() { 20472: for (size_t i = 0; i < num_keys_; ++i) { 20472: lookup_key_ptr_[i].~LookupKey(); 20472: } 20472: } 20472: 20472: private: 20472: static const int MAX_LOOKUP_KEYS_ON_STACK = 16; 20472: alignas(alignof(LookupKey)) 20472: char lookup_key_stack_buf[sizeof(LookupKey) * MAX_LOOKUP_KEYS_ON_STACK]; 20472: std::array sorted_keys_; 20472: size_t num_keys_; 20472: uint64_t value_mask_; 20472: uint64_t value_size_; 20472: std::unique_ptr lookup_key_heap_buf; 20472: LookupKey* lookup_key_ptr_; 20472: 20472: public: 20472: # 145 "./table/multiget_context.h" 20472: class Range { 20472: public: 20472: 20472: 20472: 20472: class Iterator { 20472: public: 20472: 20472: typedef Iterator self_type; 20472: typedef KeyContext value_type; 20472: typedef KeyContext& reference; 20472: typedef KeyContext* pointer; 20472: typedef int difference_type; 20472: typedef std::forward_iterator_tag iterator_category; 20472: 20472: Iterator(const Range* range, size_t idx) 20472: : range_(range), ctx_(range->ctx_), index_(idx) { 20472: while (index_ < range_->end_ && 20472: (uint64_t{1} << index_) & 20472: (range_->ctx_->value_mask_ | range_->skip_mask_)) 20472: index_++; 20472: } 20472: 20472: Iterator(const Iterator&) = default; 20472: Iterator& operator=(const Iterator&) = default; 20472: 20472: Iterator& operator++() { 20472: while (++index_ < range_->end_ && 20472: (uint64_t{1} << index_) & 20472: (range_->ctx_->value_mask_ | range_->skip_mask_)) 20472: ; 20472: return *this; 20472: } 20472: 20472: bool operator==(Iterator other) const { 20472: 20472: # 180 "./table/multiget_context.h" 3 4 20472: (static_cast ( 20472: # 180 "./table/multiget_context.h" 20472: range_->ctx_ == other.range_->ctx_ 20472: # 180 "./table/multiget_context.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 180 "./table/multiget_context.h" 20472: "range_->ctx_ == other.range_->ctx_" 20472: # 180 "./table/multiget_context.h" 3 4 20472: , "./table/multiget_context.h", 180, __extension__ __PRETTY_FUNCTION__)) 20472: # 180 "./table/multiget_context.h" 20472: ; 20472: return index_ == other.index_; 20472: } 20472: 20472: bool operator!=(Iterator other) const { 20472: 20472: # 185 "./table/multiget_context.h" 3 4 20472: (static_cast ( 20472: # 185 "./table/multiget_context.h" 20472: range_->ctx_ == other.range_->ctx_ 20472: # 185 "./table/multiget_context.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 185 "./table/multiget_context.h" 20472: "range_->ctx_ == other.range_->ctx_" 20472: # 185 "./table/multiget_context.h" 3 4 20472: , "./table/multiget_context.h", 185, __extension__ __PRETTY_FUNCTION__)) 20472: # 185 "./table/multiget_context.h" 20472: ; 20472: return index_ != other.index_; 20472: } 20472: 20472: KeyContext& operator*() { 20472: 20472: # 190 "./table/multiget_context.h" 3 4 20472: (static_cast ( 20472: # 190 "./table/multiget_context.h" 20472: index_ < range_->end_ && index_ >= range_->start_ 20472: # 190 "./table/multiget_context.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 190 "./table/multiget_context.h" 20472: "index_ < range_->end_ && index_ >= range_->start_" 20472: # 190 "./table/multiget_context.h" 3 4 20472: , "./table/multiget_context.h", 190, __extension__ __PRETTY_FUNCTION__)) 20472: # 190 "./table/multiget_context.h" 20472: ; 20472: return *(ctx_->sorted_keys_[index_]); 20472: } 20472: 20472: KeyContext* operator->() { 20472: 20472: # 195 "./table/multiget_context.h" 3 4 20472: (static_cast ( 20472: # 195 "./table/multiget_context.h" 20472: index_ < range_->end_ && index_ >= range_->start_ 20472: # 195 "./table/multiget_context.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 195 "./table/multiget_context.h" 20472: "index_ < range_->end_ && index_ >= range_->start_" 20472: # 195 "./table/multiget_context.h" 3 4 20472: , "./table/multiget_context.h", 195, __extension__ __PRETTY_FUNCTION__)) 20472: # 195 "./table/multiget_context.h" 20472: ; 20472: return ctx_->sorted_keys_[index_]; 20472: } 20472: 20472: size_t index() { return index_; } 20472: 20472: private: 20472: friend Range; 20472: const Range* range_; 20472: const MultiGetContext* ctx_; 20472: size_t index_; 20472: }; 20472: 20472: Range(const Range& mget_range, 20472: const Iterator& first, 20472: const Iterator& last) { 20472: ctx_ = mget_range.ctx_; 20472: start_ = first.index_; 20472: end_ = last.index_; 20472: skip_mask_ = mget_range.skip_mask_; 20472: 20472: # 215 "./table/multiget_context.h" 3 4 20472: (static_cast ( 20472: # 215 "./table/multiget_context.h" 20472: start_ < 64 20472: # 215 "./table/multiget_context.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 215 "./table/multiget_context.h" 20472: "start_ < 64" 20472: # 215 "./table/multiget_context.h" 3 4 20472: , "./table/multiget_context.h", 215, __extension__ __PRETTY_FUNCTION__)) 20472: # 215 "./table/multiget_context.h" 20472: ; 20472: 20472: # 216 "./table/multiget_context.h" 3 4 20472: (static_cast ( 20472: # 216 "./table/multiget_context.h" 20472: end_ < 64 20472: # 216 "./table/multiget_context.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 216 "./table/multiget_context.h" 20472: "end_ < 64" 20472: # 216 "./table/multiget_context.h" 3 4 20472: , "./table/multiget_context.h", 216, __extension__ __PRETTY_FUNCTION__)) 20472: # 216 "./table/multiget_context.h" 20472: ; 20472: } 20472: 20472: Range() = default; 20472: 20472: Iterator begin() const { return Iterator(this, start_); } 20472: 20472: Iterator end() const { return Iterator(this, end_); } 20472: 20472: bool empty() const { return RemainingMask() == 0; } 20472: 20472: void SkipKey(const Iterator& iter) { 20472: skip_mask_ |= uint64_t{1} << iter.index_; 20472: } 20472: 20472: 20472: 20472: void MarkKeyDone(Iterator& iter) { 20472: ctx_->value_mask_ |= (uint64_t{1} << iter.index_); 20472: } 20472: 20472: bool CheckKeyDone(Iterator& iter) const { 20472: return ctx_->value_mask_ & (uint64_t{1} << iter.index_); 20472: } 20472: 20472: uint64_t KeysLeft() const { return BitsSetToOne(RemainingMask()); } 20472: 20472: void AddSkipsFrom(const Range& other) { 20472: 20472: # 244 "./table/multiget_context.h" 3 4 20472: (static_cast ( 20472: # 244 "./table/multiget_context.h" 20472: ctx_ == other.ctx_ 20472: # 244 "./table/multiget_context.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 244 "./table/multiget_context.h" 20472: "ctx_ == other.ctx_" 20472: # 244 "./table/multiget_context.h" 3 4 20472: , "./table/multiget_context.h", 244, __extension__ __PRETTY_FUNCTION__)) 20472: # 244 "./table/multiget_context.h" 20472: ; 20472: skip_mask_ |= other.skip_mask_; 20472: } 20472: 20472: uint64_t GetValueSize() { return ctx_->value_size_; } 20472: 20472: void AddValueSize(uint64_t value_size) { ctx_->value_size_ += value_size; } 20472: 20472: private: 20472: friend MultiGetContext; 20472: MultiGetContext* ctx_; 20472: size_t start_; 20472: size_t end_; 20472: uint64_t skip_mask_; 20472: 20472: Range(MultiGetContext* ctx, size_t num_keys) 20472: : ctx_(ctx), start_(0), end_(num_keys), skip_mask_(0) { 20472: 20472: # 261 "./table/multiget_context.h" 3 4 20472: (static_cast ( 20472: # 261 "./table/multiget_context.h" 20472: num_keys < 64 20472: # 261 "./table/multiget_context.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 261 "./table/multiget_context.h" 20472: "num_keys < 64" 20472: # 261 "./table/multiget_context.h" 3 4 20472: , "./table/multiget_context.h", 261, __extension__ __PRETTY_FUNCTION__)) 20472: # 261 "./table/multiget_context.h" 20472: ; 20472: } 20472: 20472: uint64_t RemainingMask() const { 20472: return (((uint64_t{1} << end_) - 1) & ~((uint64_t{1} << start_) - 1) & 20472: ~(ctx_->value_mask_ | skip_mask_)); 20472: } 20472: }; 20472: 20472: 20472: Range GetMultiGetRange() { return Range(this, num_keys_); } 20472: }; 20472: 20472: } 20472: # 17 "./table/table_reader.h" 2 20472: # 1 "./table/table_reader_caller.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: namespace rocksdb { 20472: 20472: 20472: 20472: 20472: 20472: enum TableReaderCaller : char { 20472: kUserGet = 1, 20472: kUserMultiGet = 2, 20472: kUserIterator = 3, 20472: kUserApproximateSize = 4, 20472: kUserVerifyChecksum = 5, 20472: kSSTDumpTool = 6, 20472: kExternalSSTIngestion = 7, 20472: kRepair = 8, 20472: kPrefetch = 9, 20472: kCompaction = 10, 20472: 20472: 20472: kCompactionRefill = 11, 20472: 20472: 20472: kFlush = 12, 20472: 20472: kSSTFileReader = 13, 20472: 20472: 20472: kUncategorized = 14, 20472: 20472: kMaxBlockCacheLookupCaller 20472: }; 20472: } 20472: # 18 "./table/table_reader.h" 2 20472: 20472: namespace rocksdb { 20472: 20472: class Iterator; 20472: struct ParsedInternalKey; 20472: class Slice; 20472: class Arena; 20472: struct ReadOptions; 20472: struct TableProperties; 20472: class GetContext; 20472: class MultiGetContext; 20472: 20472: 20472: 20472: 20472: 20472: 20472: class TableReader { 20472: public: 20472: virtual ~TableReader() {} 20472: # 50 "./table/table_reader.h" 20472: virtual InternalIterator* NewIterator( 20472: const ReadOptions&, const SliceTransform* prefix_extractor, Arena* arena, 20472: bool skip_filters, TableReaderCaller caller, 20472: size_t compaction_readahead_size = 0, 20472: bool allow_unprepared_value = false) = 0; 20472: 20472: virtual FragmentedRangeTombstoneIterator* NewRangeTombstoneIterator( 20472: const ReadOptions& ) { 20472: return nullptr; 20472: } 20472: # 72 "./table/table_reader.h" 20472: virtual uint64_t ApproximateOffsetOf(const Slice& key, 20472: TableReaderCaller caller) = 0; 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual uint64_t ApproximateSize(const Slice& start, const Slice& end, 20472: TableReaderCaller caller) = 0; 20472: 20472: 20472: 20472: virtual void SetupForCompaction() = 0; 20472: 20472: virtual std::shared_ptr GetTableProperties() const = 0; 20472: 20472: 20472: virtual void Prepare(const Slice& ) {} 20472: 20472: 20472: virtual size_t ApproximateMemoryUsage() const = 0; 20472: # 106 "./table/table_reader.h" 20472: virtual Status Get(const ReadOptions& readOptions, const Slice& key, 20472: GetContext* get_context, 20472: const SliceTransform* prefix_extractor, 20472: bool skip_filters = false) = 0; 20472: 20472: virtual void MultiGet(const ReadOptions& readOptions, 20472: const MultiGetContext::Range* mget_range, 20472: const SliceTransform* prefix_extractor, 20472: bool skip_filters = false) { 20472: for (auto iter = mget_range->begin(); iter != mget_range->end(); ++iter) { 20472: *iter->s = Get(readOptions, iter->ikey, iter->get_context, 20472: prefix_extractor, skip_filters); 20472: } 20472: } 20472: 20472: 20472: 20472: 20472: virtual Status Prefetch(const Slice* begin = nullptr, 20472: const Slice* end = nullptr) { 20472: (void) begin; 20472: (void) end; 20472: 20472: 20472: return Status::OK(); 20472: } 20472: 20472: 20472: virtual Status DumpTable(WritableFile* ) { 20472: return Status::NotSupported("DumpTable() not supported"); 20472: } 20472: 20472: 20472: virtual Status VerifyChecksum(const ReadOptions& , 20472: TableReaderCaller ) { 20472: return Status::NotSupported("VerifyChecksum() not supported"); 20472: } 20472: }; 20472: 20472: } 20472: # 22 "./db/version_edit.h" 2 20472: 20472: 20472: namespace rocksdb { 20472: 20472: class VersionSet; 20472: 20472: constexpr uint64_t kFileNumberMask = 0x3FFFFFFFFFFFFFFF; 20472: constexpr uint64_t kUnknownOldestAncesterTime = 0; 20472: constexpr uint64_t kUnknownFileCreationTime = 0; 20472: 20472: extern uint64_t PackFileNumberAndPathId(uint64_t number, uint64_t path_id); 20472: 20472: 20472: 20472: 20472: 20472: 20472: struct FileDescriptor { 20472: 20472: TableReader* table_reader; 20472: uint64_t packed_number_and_path_id; 20472: uint64_t file_size; 20472: SequenceNumber smallest_seqno; 20472: SequenceNumber largest_seqno; 20472: 20472: FileDescriptor() : FileDescriptor(0, 0, 0) {} 20472: 20472: FileDescriptor(uint64_t number, uint32_t path_id, uint64_t _file_size) 20472: : FileDescriptor(number, path_id, _file_size, kMaxSequenceNumber, 0) {} 20472: 20472: FileDescriptor(uint64_t number, uint32_t path_id, uint64_t _file_size, 20472: SequenceNumber _smallest_seqno, SequenceNumber _largest_seqno) 20472: : table_reader(nullptr), 20472: packed_number_and_path_id(PackFileNumberAndPathId(number, path_id)), 20472: file_size(_file_size), 20472: smallest_seqno(_smallest_seqno), 20472: largest_seqno(_largest_seqno) {} 20472: 20472: FileDescriptor(const FileDescriptor& fd) { *this = fd; } 20472: 20472: FileDescriptor& operator=(const FileDescriptor& fd) { 20472: table_reader = fd.table_reader; 20472: packed_number_and_path_id = fd.packed_number_and_path_id; 20472: file_size = fd.file_size; 20472: smallest_seqno = fd.smallest_seqno; 20472: largest_seqno = fd.largest_seqno; 20472: return *this; 20472: } 20472: 20472: uint64_t GetNumber() const { 20472: return packed_number_and_path_id & kFileNumberMask; 20472: } 20472: uint32_t GetPathId() const { 20472: return static_cast( 20472: packed_number_and_path_id / (kFileNumberMask + 1)); 20472: } 20472: uint64_t GetFileSize() const { return file_size; } 20472: }; 20472: 20472: struct FileSampledStats { 20472: FileSampledStats() : num_reads_sampled(0) {} 20472: FileSampledStats(const FileSampledStats& other) { *this = other; } 20472: FileSampledStats& operator=(const FileSampledStats& other) { 20472: num_reads_sampled = other.num_reads_sampled.load(); 20472: return *this; 20472: } 20472: 20472: 20472: mutable std::atomic num_reads_sampled; 20472: }; 20472: 20472: struct FileMetaData { 20472: FileDescriptor fd; 20472: InternalKey smallest; 20472: InternalKey largest; 20472: 20472: 20472: Cache::Handle* table_reader_handle = nullptr; 20472: 20472: FileSampledStats stats; 20472: 20472: 20472: 20472: 20472: 20472: 20472: uint64_t compensated_file_size = 0; 20472: 20472: 20472: uint64_t num_entries = 0; 20472: uint64_t num_deletions = 0; 20472: uint64_t raw_key_size = 0; 20472: uint64_t raw_value_size = 0; 20472: 20472: int refs = 0; 20472: 20472: bool being_compacted = false; 20472: bool init_stats_from_file = false; 20472: 20472: 20472: bool marked_for_compaction = false; 20472: 20472: 20472: 20472: 20472: uint64_t oldest_blob_file_number = kInvalidBlobFileNumber; 20472: 20472: 20472: 20472: 20472: 20472: uint64_t oldest_ancester_time = kUnknownOldestAncesterTime; 20472: 20472: 20472: uint64_t file_creation_time = kUnknownFileCreationTime; 20472: 20472: 20472: std::string file_checksum = kUnknownFileChecksum; 20472: 20472: 20472: std::string file_checksum_func_name = kUnknownFileChecksumFuncName; 20472: 20472: FileMetaData() = default; 20472: 20472: FileMetaData(uint64_t file, uint32_t file_path_id, uint64_t file_size, 20472: const InternalKey& smallest_key, const InternalKey& largest_key, 20472: const SequenceNumber& smallest_seq, 20472: const SequenceNumber& largest_seq, bool marked_for_compact, 20472: uint64_t oldest_blob_file, uint64_t _oldest_ancester_time, 20472: uint64_t _file_creation_time, const std::string& _file_checksum, 20472: const std::string& _file_checksum_func_name) 20472: : fd(file, file_path_id, file_size, smallest_seq, largest_seq), 20472: smallest(smallest_key), 20472: largest(largest_key), 20472: marked_for_compaction(marked_for_compact), 20472: oldest_blob_file_number(oldest_blob_file), 20472: oldest_ancester_time(_oldest_ancester_time), 20472: file_creation_time(_file_creation_time), 20472: file_checksum(_file_checksum), 20472: file_checksum_func_name(_file_checksum_func_name) { 20472: rocksdb::SyncPoint::GetInstance()->Process("FileMetaData::FileMetaData", this); 20472: } 20472: 20472: 20472: 20472: void UpdateBoundaries(const Slice& key, const Slice& value, 20472: SequenceNumber seqno, ValueType value_type); 20472: 20472: 20472: 20472: void UpdateBoundariesForRange(const InternalKey& start, 20472: const InternalKey& end, SequenceNumber seqno, 20472: const InternalKeyComparator& icmp) { 20472: if (smallest.size() == 0 || icmp.Compare(start, smallest) < 0) { 20472: smallest = start; 20472: } 20472: if (largest.size() == 0 || icmp.Compare(largest, end) < 0) { 20472: largest = end; 20472: } 20472: fd.smallest_seqno = std::min(fd.smallest_seqno, seqno); 20472: fd.largest_seqno = std::max(fd.largest_seqno, seqno); 20472: } 20472: 20472: 20472: 20472: 20472: uint64_t TryGetOldestAncesterTime() { 20472: if (oldest_ancester_time != kUnknownOldestAncesterTime) { 20472: return oldest_ancester_time; 20472: } else if (fd.table_reader != nullptr && 20472: fd.table_reader->GetTableProperties() != nullptr) { 20472: return fd.table_reader->GetTableProperties()->creation_time; 20472: } 20472: return kUnknownOldestAncesterTime; 20472: } 20472: 20472: uint64_t TryGetFileCreationTime() { 20472: if (file_creation_time != kUnknownFileCreationTime) { 20472: return file_creation_time; 20472: } else if (fd.table_reader != nullptr && 20472: fd.table_reader->GetTableProperties() != nullptr) { 20472: return fd.table_reader->GetTableProperties()->file_creation_time; 20472: } 20472: return kUnknownFileCreationTime; 20472: } 20472: }; 20472: 20472: 20472: 20472: 20472: struct FdWithKeyRange { 20472: FileDescriptor fd; 20472: FileMetaData* file_metadata; 20472: Slice smallest_key; 20472: Slice largest_key; 20472: 20472: FdWithKeyRange() 20472: : fd(), 20472: file_metadata(nullptr), 20472: smallest_key(), 20472: largest_key() { 20472: } 20472: 20472: FdWithKeyRange(FileDescriptor _fd, Slice _smallest_key, Slice _largest_key, 20472: FileMetaData* _file_metadata) 20472: : fd(_fd), 20472: file_metadata(_file_metadata), 20472: smallest_key(_smallest_key), 20472: largest_key(_largest_key) {} 20472: }; 20472: 20472: 20472: 20472: struct LevelFilesBrief { 20472: size_t num_files; 20472: FdWithKeyRange* files; 20472: LevelFilesBrief() { 20472: num_files = 0; 20472: files = nullptr; 20472: } 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: class VersionEdit { 20472: public: 20472: void Clear(); 20472: 20472: void SetDBId(const std::string& db_id) { 20472: has_db_id_ = true; 20472: db_id_ = db_id; 20472: } 20472: bool HasDbId() const { return has_db_id_; } 20472: const std::string& GetDbId() const { return db_id_; } 20472: 20472: void SetComparatorName(const Slice& name) { 20472: has_comparator_ = true; 20472: comparator_ = name.ToString(); 20472: } 20472: bool HasComparatorName() const { return has_comparator_; } 20472: const std::string& GetComparatorName() const { return comparator_; } 20472: 20472: void SetLogNumber(uint64_t num) { 20472: has_log_number_ = true; 20472: log_number_ = num; 20472: } 20472: bool HasLogNumber() const { return has_log_number_; } 20472: uint64_t GetLogNumber() const { return log_number_; } 20472: 20472: void SetPrevLogNumber(uint64_t num) { 20472: has_prev_log_number_ = true; 20472: prev_log_number_ = num; 20472: } 20472: bool HasPrevLogNumber() const { return has_prev_log_number_; } 20472: uint64_t GetPrevLogNumber() const { return prev_log_number_; } 20472: 20472: void SetNextFile(uint64_t num) { 20472: has_next_file_number_ = true; 20472: next_file_number_ = num; 20472: } 20472: bool HasNextFile() const { return has_next_file_number_; } 20472: uint64_t GetNextFile() const { return next_file_number_; } 20472: 20472: void SetMaxColumnFamily(uint32_t max_column_family) { 20472: has_max_column_family_ = true; 20472: max_column_family_ = max_column_family; 20472: } 20472: bool HasMaxColumnFamily() const { return has_max_column_family_; } 20472: uint32_t GetMaxColumnFamily() const { return max_column_family_; } 20472: 20472: void SetMinLogNumberToKeep(uint64_t num) { 20472: has_min_log_number_to_keep_ = true; 20472: min_log_number_to_keep_ = num; 20472: } 20472: bool HasMinLogNumberToKeep() const { return has_min_log_number_to_keep_; } 20472: uint64_t GetMinLogNumberToKeep() const { return min_log_number_to_keep_; } 20472: 20472: void SetLastSequence(SequenceNumber seq) { 20472: has_last_sequence_ = true; 20472: last_sequence_ = seq; 20472: } 20472: bool HasLastSequence() const { return has_last_sequence_; } 20472: SequenceNumber GetLastSequence() const { return last_sequence_; } 20472: 20472: 20472: void DeleteFile(int level, uint64_t file) { 20472: deleted_files_.emplace(level, file); 20472: } 20472: 20472: 20472: using DeletedFiles = std::set>; 20472: const DeletedFiles& GetDeletedFiles() const { return deleted_files_; } 20472: 20472: 20472: 20472: 20472: 20472: 20472: void AddFile(int level, uint64_t file, uint32_t file_path_id, 20472: uint64_t file_size, const InternalKey& smallest, 20472: const InternalKey& largest, const SequenceNumber& smallest_seqno, 20472: const SequenceNumber& largest_seqno, bool marked_for_compaction, 20472: uint64_t oldest_blob_file_number, uint64_t oldest_ancester_time, 20472: uint64_t file_creation_time, const std::string& file_checksum, 20472: const std::string& file_checksum_func_name) { 20472: 20472: # 329 "./db/version_edit.h" 3 4 20472: (static_cast ( 20472: # 329 "./db/version_edit.h" 20472: smallest_seqno <= largest_seqno 20472: # 329 "./db/version_edit.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 329 "./db/version_edit.h" 20472: "smallest_seqno <= largest_seqno" 20472: # 329 "./db/version_edit.h" 3 4 20472: , "./db/version_edit.h", 329, __extension__ __PRETTY_FUNCTION__)) 20472: # 329 "./db/version_edit.h" 20472: ; 20472: new_files_.emplace_back( 20472: level, FileMetaData(file, file_path_id, file_size, smallest, largest, 20472: smallest_seqno, largest_seqno, 20472: marked_for_compaction, oldest_blob_file_number, 20472: oldest_ancester_time, file_creation_time, 20472: file_checksum, file_checksum_func_name)); 20472: } 20472: 20472: void AddFile(int level, const FileMetaData& f) { 20472: 20472: # 339 "./db/version_edit.h" 3 4 20472: (static_cast ( 20472: # 339 "./db/version_edit.h" 20472: f.fd.smallest_seqno <= f.fd.largest_seqno 20472: # 339 "./db/version_edit.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 339 "./db/version_edit.h" 20472: "f.fd.smallest_seqno <= f.fd.largest_seqno" 20472: # 339 "./db/version_edit.h" 3 4 20472: , "./db/version_edit.h", 339, __extension__ __PRETTY_FUNCTION__)) 20472: # 339 "./db/version_edit.h" 20472: ; 20472: new_files_.emplace_back(level, f); 20472: } 20472: 20472: 20472: using NewFiles = std::vector>; 20472: const NewFiles& GetNewFiles() const { return new_files_; } 20472: 20472: 20472: void AddBlobFile(uint64_t blob_file_number, uint64_t total_blob_count, 20472: uint64_t total_blob_bytes, std::string checksum_method, 20472: std::string checksum_value) { 20472: blob_file_additions_.emplace_back( 20472: blob_file_number, total_blob_count, total_blob_bytes, 20472: std::move(checksum_method), std::move(checksum_value)); 20472: } 20472: 20472: 20472: using BlobFileAdditions = std::vector; 20472: const BlobFileAdditions& GetBlobFileAdditions() const { 20472: return blob_file_additions_; 20472: } 20472: 20472: 20472: 20472: void AddBlobFileGarbage(uint64_t blob_file_number, 20472: uint64_t garbage_blob_count, 20472: uint64_t garbage_blob_bytes) { 20472: blob_file_garbages_.emplace_back(blob_file_number, garbage_blob_count, 20472: garbage_blob_bytes); 20472: } 20472: 20472: 20472: using BlobFileGarbages = std::vector; 20472: const BlobFileGarbages& GetBlobFileGarbages() const { 20472: return blob_file_garbages_; 20472: } 20472: 20472: 20472: size_t NumEntries() const { 20472: return new_files_.size() + deleted_files_.size() + 20472: blob_file_additions_.size() + blob_file_garbages_.size(); 20472: } 20472: 20472: void SetColumnFamily(uint32_t column_family_id) { 20472: column_family_ = column_family_id; 20472: } 20472: uint32_t GetColumnFamily() const { return column_family_; } 20472: 20472: 20472: void AddColumnFamily(const std::string& name) { 20472: 20472: # 390 "./db/version_edit.h" 3 4 20472: (static_cast ( 20472: # 390 "./db/version_edit.h" 20472: !is_column_family_drop_ 20472: # 390 "./db/version_edit.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 390 "./db/version_edit.h" 20472: "!is_column_family_drop_" 20472: # 390 "./db/version_edit.h" 3 4 20472: , "./db/version_edit.h", 390, __extension__ __PRETTY_FUNCTION__)) 20472: # 390 "./db/version_edit.h" 20472: ; 20472: 20472: # 391 "./db/version_edit.h" 3 4 20472: (static_cast ( 20472: # 391 "./db/version_edit.h" 20472: !is_column_family_add_ 20472: # 391 "./db/version_edit.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 391 "./db/version_edit.h" 20472: "!is_column_family_add_" 20472: # 391 "./db/version_edit.h" 3 4 20472: , "./db/version_edit.h", 391, __extension__ __PRETTY_FUNCTION__)) 20472: # 391 "./db/version_edit.h" 20472: ; 20472: 20472: # 392 "./db/version_edit.h" 3 4 20472: (static_cast ( 20472: # 392 "./db/version_edit.h" 20472: NumEntries() == 0 20472: # 392 "./db/version_edit.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 392 "./db/version_edit.h" 20472: "NumEntries() == 0" 20472: # 392 "./db/version_edit.h" 3 4 20472: , "./db/version_edit.h", 392, __extension__ __PRETTY_FUNCTION__)) 20472: # 392 "./db/version_edit.h" 20472: ; 20472: is_column_family_add_ = true; 20472: column_family_name_ = name; 20472: } 20472: 20472: 20472: void DropColumnFamily() { 20472: 20472: # 399 "./db/version_edit.h" 3 4 20472: (static_cast ( 20472: # 399 "./db/version_edit.h" 20472: !is_column_family_drop_ 20472: # 399 "./db/version_edit.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 399 "./db/version_edit.h" 20472: "!is_column_family_drop_" 20472: # 399 "./db/version_edit.h" 3 4 20472: , "./db/version_edit.h", 399, __extension__ __PRETTY_FUNCTION__)) 20472: # 399 "./db/version_edit.h" 20472: ; 20472: 20472: # 400 "./db/version_edit.h" 3 4 20472: (static_cast ( 20472: # 400 "./db/version_edit.h" 20472: !is_column_family_add_ 20472: # 400 "./db/version_edit.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 400 "./db/version_edit.h" 20472: "!is_column_family_add_" 20472: # 400 "./db/version_edit.h" 3 4 20472: , "./db/version_edit.h", 400, __extension__ __PRETTY_FUNCTION__)) 20472: # 400 "./db/version_edit.h" 20472: ; 20472: 20472: # 401 "./db/version_edit.h" 3 4 20472: (static_cast ( 20472: # 401 "./db/version_edit.h" 20472: NumEntries() == 0 20472: # 401 "./db/version_edit.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 401 "./db/version_edit.h" 20472: "NumEntries() == 0" 20472: # 401 "./db/version_edit.h" 3 4 20472: , "./db/version_edit.h", 401, __extension__ __PRETTY_FUNCTION__)) 20472: # 401 "./db/version_edit.h" 20472: ; 20472: is_column_family_drop_ = true; 20472: } 20472: 20472: bool IsColumnFamilyManipulation() const { 20472: return is_column_family_add_ || is_column_family_drop_; 20472: } 20472: 20472: void MarkAtomicGroup(uint32_t remaining_entries) { 20472: is_in_atomic_group_ = true; 20472: remaining_entries_ = remaining_entries; 20472: } 20472: bool IsInAtomicGroup() const { return is_in_atomic_group_; } 20472: uint32_t GetRemainingEntries() const { return remaining_entries_; } 20472: 20472: 20472: bool EncodeTo(std::string* dst) const; 20472: Status DecodeFrom(const Slice& src); 20472: 20472: std::string DebugString(bool hex_key = false) const; 20472: std::string DebugJSON(int edit_num, bool hex_key = false) const; 20472: 20472: private: 20472: friend class ReactiveVersionSet; 20472: friend class VersionEditHandler; 20472: friend class VersionEditHandlerPointInTime; 20472: friend class VersionSet; 20472: friend class Version; 20472: friend class AtomicGroupReadBuffer; 20472: 20472: bool GetLevel(Slice* input, int* level, const char** msg); 20472: 20472: const char* DecodeNewFile4From(Slice* input); 20472: 20472: int max_level_ = 0; 20472: std::string db_id_; 20472: std::string comparator_; 20472: uint64_t log_number_ = 0; 20472: uint64_t prev_log_number_ = 0; 20472: uint64_t next_file_number_ = 0; 20472: uint32_t max_column_family_ = 0; 20472: 20472: uint64_t min_log_number_to_keep_ = 0; 20472: SequenceNumber last_sequence_ = 0; 20472: bool has_db_id_ = false; 20472: bool has_comparator_ = false; 20472: bool has_log_number_ = false; 20472: bool has_prev_log_number_ = false; 20472: bool has_next_file_number_ = false; 20472: bool has_max_column_family_ = false; 20472: bool has_min_log_number_to_keep_ = false; 20472: bool has_last_sequence_ = false; 20472: 20472: DeletedFiles deleted_files_; 20472: NewFiles new_files_; 20472: 20472: BlobFileAdditions blob_file_additions_; 20472: BlobFileGarbages blob_file_garbages_; 20472: 20472: 20472: 20472: uint32_t column_family_ = 0; 20472: 20472: 20472: 20472: bool is_column_family_drop_ = false; 20472: bool is_column_family_add_ = false; 20472: std::string column_family_name_; 20472: 20472: bool is_in_atomic_group_ = false; 20472: uint32_t remaining_entries_ = 0; 20472: }; 20472: 20472: } 20472: # 22 "./db/memtable.h" 2 20472: 20472: # 1 "./memory/concurrent_arena.h" 1 20472: # 10 "./memory/concurrent_arena.h" 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "./port/lang.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 17 "./memory/concurrent_arena.h" 2 20472: 20472: 20472: 20472: # 1 "./util/thread_local.h" 1 20472: # 10 "./util/thread_local.h" 20472: 20472: # 21 "./util/thread_local.h" 20472: namespace rocksdb { 20472: # 34 "./util/thread_local.h" 20472: typedef void (*UnrefHandler)(void* ptr); 20472: # 44 "./util/thread_local.h" 20472: class ThreadLocalPtr { 20472: public: 20472: explicit ThreadLocalPtr(UnrefHandler handler = nullptr); 20472: 20472: ThreadLocalPtr(const ThreadLocalPtr&) = delete; 20472: ThreadLocalPtr& operator=(const ThreadLocalPtr&) = delete; 20472: 20472: ~ThreadLocalPtr(); 20472: 20472: 20472: void* Get() const; 20472: 20472: 20472: void Reset(void* ptr); 20472: 20472: 20472: void* Swap(void* ptr); 20472: 20472: 20472: 20472: 20472: 20472: bool CompareAndSwap(void* ptr, void*& expected); 20472: 20472: 20472: 20472: void Scrape(autovector* ptrs, void* const replacement); 20472: 20472: typedef std::function FoldFunc; 20472: 20472: 20472: 20472: 20472: void Fold(FoldFunc func, void* res); 20472: 20472: 20472: 20472: static uint32_t TEST_PeekId(); 20472: # 90 "./util/thread_local.h" 20472: static void InitSingletons(); 20472: 20472: class StaticMeta; 20472: 20472: private: 20472: 20472: static StaticMeta* Instance(); 20472: 20472: const uint32_t id_; 20472: }; 20472: 20472: } 20472: # 21 "./memory/concurrent_arena.h" 2 20472: # 30 "./memory/concurrent_arena.h" 20472: namespace rocksdb { 20472: 20472: class Logger; 20472: # 41 "./memory/concurrent_arena.h" 20472: class ConcurrentArena : public Allocator { 20472: public: 20472: 20472: 20472: 20472: 20472: explicit ConcurrentArena(size_t block_size = Arena::kMinBlockSize, 20472: AllocTracker* tracker = nullptr, 20472: size_t huge_page_size = 0); 20472: 20472: char* Allocate(size_t bytes) override { 20472: return AllocateImpl(bytes, false , 20472: [this, bytes]() { return arena_.Allocate(bytes); }); 20472: } 20472: 20472: char* AllocateAligned(size_t bytes, size_t huge_page_size = 0, 20472: Logger* logger = nullptr) override { 20472: size_t rounded_up = ((bytes - 1) | (sizeof(void*) - 1)) + 1; 20472: 20472: # 59 "./memory/concurrent_arena.h" 3 4 20472: (static_cast ( 20472: # 59 "./memory/concurrent_arena.h" 20472: rounded_up >= bytes && rounded_up < bytes + sizeof(void*) && (rounded_up % sizeof(void*)) == 0 20472: # 59 "./memory/concurrent_arena.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 59 "./memory/concurrent_arena.h" 20472: "rounded_up >= bytes && rounded_up < bytes + sizeof(void*) && (rounded_up % sizeof(void*)) == 0" 20472: # 59 "./memory/concurrent_arena.h" 3 4 20472: , "./memory/concurrent_arena.h", 59, __extension__ __PRETTY_FUNCTION__)) 20472: 20472: # 60 "./memory/concurrent_arena.h" 20472: ; 20472: 20472: return AllocateImpl(rounded_up, huge_page_size != 0 , 20472: [this, rounded_up, huge_page_size, logger]() { 20472: return arena_.AllocateAligned(rounded_up, 20472: huge_page_size, logger); 20472: }); 20472: } 20472: 20472: size_t ApproximateMemoryUsage() const { 20472: std::unique_lock lock(arena_mutex_, std::defer_lock); 20472: lock.lock(); 20472: return arena_.ApproximateMemoryUsage() - ShardAllocatedAndUnused(); 20472: } 20472: 20472: size_t MemoryAllocatedBytes() const { 20472: return memory_allocated_bytes_.load(std::memory_order_relaxed); 20472: } 20472: 20472: size_t AllocatedAndUnused() const { 20472: return arena_allocated_and_unused_.load(std::memory_order_relaxed) + 20472: ShardAllocatedAndUnused(); 20472: } 20472: 20472: size_t IrregularBlockNum() const { 20472: return irregular_block_num_.load(std::memory_order_relaxed); 20472: } 20472: 20472: size_t BlockSize() const override { return arena_.BlockSize(); } 20472: 20472: private: 20472: struct Shard { 20472: char padding[40] ; 20472: mutable SpinMutex mutex; 20472: char* free_begin_; 20472: std::atomic allocated_and_unused_; 20472: 20472: Shard() : free_begin_(nullptr), allocated_and_unused_(0) {} 20472: }; 20472: 20472: 20472: static __thread size_t tls_cpuid; 20472: 20472: 20472: 20472: 20472: char padding0[56] ; 20472: 20472: size_t shard_block_size_; 20472: 20472: CoreLocalArray shards_; 20472: 20472: Arena arena_; 20472: mutable SpinMutex arena_mutex_; 20472: std::atomic arena_allocated_and_unused_; 20472: std::atomic memory_allocated_bytes_; 20472: std::atomic irregular_block_num_; 20472: 20472: char padding1[56] ; 20472: 20472: Shard* Repick(); 20472: 20472: size_t ShardAllocatedAndUnused() const { 20472: size_t total = 0; 20472: for (size_t i = 0; i < shards_.Size(); ++i) { 20472: total += shards_.AccessAtCore(i)->allocated_and_unused_.load( 20472: std::memory_order_relaxed); 20472: } 20472: return total; 20472: } 20472: 20472: template 20472: char* AllocateImpl(size_t bytes, bool force_arena, const Func& func) { 20472: size_t cpu; 20472: 20472: 20472: 20472: 20472: 20472: std::unique_lock arena_lock(arena_mutex_, std::defer_lock); 20472: if (bytes > shard_block_size_ / 4 || force_arena || 20472: ((cpu = tls_cpuid) == 0 && 20472: !shards_.AccessAtCore(0)->allocated_and_unused_.load( 20472: std::memory_order_relaxed) && 20472: arena_lock.try_lock())) { 20472: if (!arena_lock.owns_lock()) { 20472: arena_lock.lock(); 20472: } 20472: auto rv = func(); 20472: Fixup(); 20472: return rv; 20472: } 20472: 20472: 20472: Shard* s = shards_.AccessAtCore(cpu & (shards_.Size() - 1)); 20472: if (!s->mutex.try_lock()) { 20472: s = Repick(); 20472: s->mutex.lock(); 20472: } 20472: std::unique_lock lock(s->mutex, std::adopt_lock); 20472: 20472: size_t avail = s->allocated_and_unused_.load(std::memory_order_relaxed); 20472: if (avail < bytes) { 20472: 20472: std::lock_guard reload_lock(arena_mutex_); 20472: 20472: 20472: 20472: auto exact = arena_allocated_and_unused_.load(std::memory_order_relaxed); 20472: 20472: # 169 "./memory/concurrent_arena.h" 3 4 20472: (static_cast ( 20472: # 169 "./memory/concurrent_arena.h" 20472: exact == arena_.AllocatedAndUnused() 20472: # 169 "./memory/concurrent_arena.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 169 "./memory/concurrent_arena.h" 20472: "exact == arena_.AllocatedAndUnused()" 20472: # 169 "./memory/concurrent_arena.h" 3 4 20472: , "./memory/concurrent_arena.h", 169, __extension__ __PRETTY_FUNCTION__)) 20472: # 169 "./memory/concurrent_arena.h" 20472: ; 20472: 20472: if (exact >= bytes && arena_.IsInInlineBlock()) { 20472: # 180 "./memory/concurrent_arena.h" 20472: auto rv = func(); 20472: Fixup(); 20472: return rv; 20472: } 20472: 20472: avail = exact >= shard_block_size_ / 2 && exact < shard_block_size_ * 2 20472: ? exact 20472: : shard_block_size_; 20472: s->free_begin_ = arena_.AllocateAligned(avail); 20472: Fixup(); 20472: } 20472: s->allocated_and_unused_.store(avail - bytes, std::memory_order_relaxed); 20472: 20472: char* rv; 20472: if ((bytes % sizeof(void*)) == 0) { 20472: 20472: rv = s->free_begin_; 20472: s->free_begin_ += bytes; 20472: } else { 20472: 20472: rv = s->free_begin_ + avail - bytes; 20472: } 20472: return rv; 20472: } 20472: 20472: void Fixup() { 20472: arena_allocated_and_unused_.store(arena_.AllocatedAndUnused(), 20472: std::memory_order_relaxed); 20472: memory_allocated_bytes_.store(arena_.MemoryAllocatedBytes(), 20472: std::memory_order_relaxed); 20472: irregular_block_num_.store(arena_.IrregularBlockNum(), 20472: std::memory_order_relaxed); 20472: } 20472: 20472: ConcurrentArena(const ConcurrentArena&) = delete; 20472: ConcurrentArena& operator=(const ConcurrentArena&) = delete; 20472: }; 20472: 20472: } 20472: # 24 "./db/memtable.h" 2 20472: # 1 "./monitoring/instrumented_mutex.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 15 "./monitoring/instrumented_mutex.h" 20472: namespace rocksdb { 20472: class InstrumentedCondVar; 20472: 20472: 20472: 20472: class InstrumentedMutex { 20472: public: 20472: explicit InstrumentedMutex(bool adaptive = false) 20472: : mutex_(adaptive), stats_(nullptr), env_(nullptr), 20472: stats_code_(0) {} 20472: 20472: InstrumentedMutex( 20472: Statistics* stats, Env* env, 20472: int stats_code, bool adaptive = false) 20472: : mutex_(adaptive), stats_(stats), env_(env), 20472: stats_code_(stats_code) {} 20472: 20472: void Lock(); 20472: 20472: void Unlock() { 20472: mutex_.Unlock(); 20472: } 20472: 20472: void AssertHeld() { 20472: mutex_.AssertHeld(); 20472: } 20472: 20472: private: 20472: void LockInternal(); 20472: friend class InstrumentedCondVar; 20472: port::Mutex mutex_; 20472: Statistics* stats_; 20472: Env* env_; 20472: int stats_code_; 20472: }; 20472: 20472: 20472: 20472: class InstrumentedMutexLock { 20472: public: 20472: explicit InstrumentedMutexLock(InstrumentedMutex* mutex) : mutex_(mutex) { 20472: mutex_->Lock(); 20472: } 20472: 20472: ~InstrumentedMutexLock() { 20472: mutex_->Unlock(); 20472: } 20472: 20472: private: 20472: InstrumentedMutex* const mutex_; 20472: InstrumentedMutexLock(const InstrumentedMutexLock&) = delete; 20472: void operator=(const InstrumentedMutexLock&) = delete; 20472: }; 20472: 20472: class InstrumentedCondVar { 20472: public: 20472: explicit InstrumentedCondVar(InstrumentedMutex* instrumented_mutex) 20472: : cond_(&(instrumented_mutex->mutex_)), 20472: stats_(instrumented_mutex->stats_), 20472: env_(instrumented_mutex->env_), 20472: stats_code_(instrumented_mutex->stats_code_) {} 20472: 20472: void Wait(); 20472: 20472: bool TimedWait(uint64_t abs_time_us); 20472: 20472: void Signal() { 20472: cond_.Signal(); 20472: } 20472: 20472: void SignalAll() { 20472: cond_.SignalAll(); 20472: } 20472: 20472: private: 20472: void WaitInternal(); 20472: bool TimedWaitInternal(uint64_t abs_time_us); 20472: port::CondVar cond_; 20472: Statistics* stats_; 20472: Env* env_; 20472: int stats_code_; 20472: }; 20472: 20472: } 20472: # 25 "./db/memtable.h" 2 20472: 20472: 20472: 20472: 20472: 20472: # 1 "./util/dynamic_bloom.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "./util/hash.h" 1 20472: # 20 "./util/hash.h" 20472: 20472: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/10/include/stddef.h" 1 3 4 20472: # 22 "./util/hash.h" 2 20472: 20472: 20472: 20472: 20472: namespace rocksdb { 20472: 20472: 20472: 20472: extern uint64_t Hash64(const char* data, size_t n, uint64_t seed); 20472: 20472: 20472: extern uint64_t Hash64(const char* data, size_t n); 20472: 20472: 20472: 20472: 20472: inline uint64_t NPHash64(const char* data, size_t n, uint32_t seed) { 20472: 20472: return Hash64(data, n, seed); 20472: } 20472: 20472: 20472: inline uint64_t NPHash64(const char* data, size_t n) { 20472: 20472: return Hash64(data, n); 20472: } 20472: 20472: 20472: 20472: 20472: extern uint32_t Hash(const char* data, size_t n, uint32_t seed); 20472: 20472: 20472: inline uint32_t BloomHash(const Slice& key) { 20472: return Hash(key.data(), key.size(), 0xbc9f1d34); 20472: } 20472: 20472: inline uint64_t GetSliceHash64(const Slice& key) { 20472: return Hash64(key.data(), key.size()); 20472: } 20472: 20472: inline uint64_t GetSliceNPHash64(const Slice& s) { 20472: return NPHash64(s.data(), s.size()); 20472: } 20472: 20472: 20472: inline uint32_t GetSliceHash(const Slice& s) { 20472: return Hash(s.data(), s.size(), 397); 20472: } 20472: 20472: 20472: inline uint32_t Upper32of64(uint64_t v) { 20472: return static_cast(v >> 32); 20472: } 20472: inline uint32_t Lower32of64(uint64_t v) { return static_cast(v); } 20472: 20472: 20472: 20472: struct SliceHasher { 20472: uint32_t operator()(const Slice& s) const { return GetSliceHash(s); } 20472: }; 20472: 20472: 20472: 20472: inline uint32_t fastrange32(uint32_t hash, uint32_t range) { 20472: uint64_t product = uint64_t{range} * hash; 20472: return static_cast(product >> 32); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: inline size_t fastrange64(uint64_t hash, size_t range) { 20472: # 106 "./util/hash.h" 20472: uint64_t range64 = range; 20472: uint64_t tmp = uint64_t{range64 & 0xffffFFFF} * uint64_t{hash & 0xffffFFFF}; 20472: tmp >>= 32; 20472: tmp += uint64_t{range64 & 0xffffFFFF} * uint64_t{hash >> 32}; 20472: 20472: uint64_t tmp2 = uint64_t{range64 >> 32} * uint64_t{hash & 0xffffFFFF}; 20472: tmp += static_cast(tmp2); 20472: tmp >>= 32; 20472: tmp += (tmp2 >> 32); 20472: tmp += uint64_t{range64 >> 32} * uint64_t{hash >> 32}; 20472: return static_cast(tmp); 20472: 20472: } 20472: 20472: } 20472: # 14 "./util/dynamic_bloom.h" 2 20472: 20472: 20472: 20472: 20472: namespace rocksdb { 20472: 20472: class Slice; 20472: class Allocator; 20472: class Logger; 20472: # 36 "./util/dynamic_bloom.h" 20472: class DynamicBloom { 20472: public: 20472: # 47 "./util/dynamic_bloom.h" 20472: explicit DynamicBloom(Allocator* allocator, uint32_t total_bits, 20472: uint32_t num_probes = 6, size_t huge_page_tlb_size = 0, 20472: Logger* logger = nullptr); 20472: 20472: ~DynamicBloom() {} 20472: 20472: 20472: void Add(const Slice& key); 20472: 20472: 20472: void AddConcurrently(const Slice& key); 20472: 20472: 20472: void AddHash(uint32_t hash); 20472: 20472: 20472: void AddHashConcurrently(uint32_t hash); 20472: 20472: 20472: bool MayContain(const Slice& key) const; 20472: 20472: void MayContain(int num_keys, Slice** keys, bool* may_match) const; 20472: 20472: 20472: bool MayContainHash(uint32_t hash) const; 20472: 20472: void Prefetch(uint32_t h); 20472: 20472: private: 20472: 20472: 20472: uint32_t kLen; 20472: 20472: 20472: const uint32_t kNumDoubleProbes; 20472: 20472: std::atomic* data_; 20472: 20472: 20472: 20472: template 20472: void AddHash(uint32_t hash, const OrFunc& or_func); 20472: 20472: bool DoubleProbe(uint32_t h32, size_t a) const; 20472: }; 20472: 20472: inline void DynamicBloom::Add(const Slice& key) { AddHash(BloomHash(key)); } 20472: 20472: inline void DynamicBloom::AddConcurrently(const Slice& key) { 20472: AddHashConcurrently(BloomHash(key)); 20472: } 20472: 20472: inline void DynamicBloom::AddHash(uint32_t hash) { 20472: AddHash(hash, [](std::atomic* ptr, uint64_t mask) { 20472: ptr->store(ptr->load(std::memory_order_relaxed) | mask, 20472: std::memory_order_relaxed); 20472: }); 20472: } 20472: 20472: inline void DynamicBloom::AddHashConcurrently(uint32_t hash) { 20472: AddHash(hash, [](std::atomic* ptr, uint64_t mask) { 20472: 20472: 20472: 20472: 20472: 20472: if ((mask & ptr->load(std::memory_order_relaxed)) != mask) { 20472: ptr->fetch_or(mask, std::memory_order_relaxed); 20472: } 20472: }); 20472: } 20472: 20472: inline bool DynamicBloom::MayContain(const Slice& key) const { 20472: return (MayContainHash(BloomHash(key))); 20472: } 20472: 20472: inline void DynamicBloom::MayContain(int num_keys, Slice** keys, 20472: bool* may_match) const { 20472: std::array hashes; 20472: std::array byte_offsets; 20472: for (int i = 0; i < num_keys; ++i) { 20472: hashes[i] = BloomHash(*keys[i]); 20472: size_t a = fastrange32(kLen, hashes[i]); 20472: __builtin_prefetch(data_ + a, 0, 3); 20472: byte_offsets[i] = a; 20472: } 20472: 20472: for (int i = 0; i < num_keys; i++) { 20472: may_match[i] = DoubleProbe(hashes[i], byte_offsets[i]); 20472: } 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: inline void DynamicBloom::Prefetch(uint32_t h32) { 20472: size_t a = fastrange32(kLen, h32); 20472: __builtin_prefetch(data_ + a, 0, 3); 20472: } 20472: # 173 "./util/dynamic_bloom.h" 20472: inline bool DynamicBloom::MayContainHash(uint32_t h32) const { 20472: size_t a = fastrange32(kLen, h32); 20472: __builtin_prefetch(data_ + a, 0, 3); 20472: return DoubleProbe(h32, a); 20472: } 20472: 20472: inline bool DynamicBloom::DoubleProbe(uint32_t h32, size_t byte_offset) const { 20472: 20472: uint64_t h = 0x9e3779b97f4a7c13ULL * h32; 20472: for (unsigned i = 0;; ++i) { 20472: 20472: uint64_t mask = 20472: ((uint64_t)1 << (h & 63)) | ((uint64_t)1 << ((h >> 6) & 63)); 20472: uint64_t val = data_[byte_offset ^ i].load(std::memory_order_relaxed); 20472: if (i + 1 >= kNumDoubleProbes) { 20472: return (val & mask) == mask; 20472: } else if ((val & mask) != mask) { 20472: return false; 20472: } 20472: h = (h >> 12) | (h << 52); 20472: } 20472: } 20472: 20472: template 20472: inline void DynamicBloom::AddHash(uint32_t h32, const OrFunc& or_func) { 20472: size_t a = fastrange32(kLen, h32); 20472: __builtin_prefetch(data_ + a, 0, 3); 20472: 20472: uint64_t h = 0x9e3779b97f4a7c13ULL * h32; 20472: for (unsigned i = 0;; ++i) { 20472: 20472: uint64_t mask = 20472: ((uint64_t)1 << (h & 63)) | ((uint64_t)1 << ((h >> 6) & 63)); 20472: or_func(&data_[a ^ i], mask); 20472: if (i + 1 >= kNumDoubleProbes) { 20472: return; 20472: } 20472: h = (h >> 12) | (h << 52); 20472: } 20472: } 20472: 20472: } 20472: # 31 "./db/memtable.h" 2 20472: 20472: 20472: namespace rocksdb { 20472: 20472: struct FlushJobInfo; 20472: class Mutex; 20472: class MemTableIterator; 20472: class MergeContext; 20472: 20472: struct ImmutableMemTableOptions { 20472: explicit ImmutableMemTableOptions(const ImmutableCFOptions& ioptions, 20472: const MutableCFOptions& mutable_cf_options); 20472: size_t arena_block_size; 20472: uint32_t memtable_prefix_bloom_bits; 20472: size_t memtable_huge_page_size; 20472: bool memtable_whole_key_filtering; 20472: bool inplace_update_support; 20472: size_t inplace_update_num_locks; 20472: UpdateStatus (*inplace_callback)(char* existing_value, 20472: uint32_t* existing_value_size, 20472: Slice delta_value, 20472: std::string* merged_value); 20472: size_t max_successive_merges; 20472: Statistics* statistics; 20472: MergeOperator* merge_operator; 20472: Logger* info_log; 20472: }; 20472: 20472: 20472: 20472: 20472: struct MemTablePostProcessInfo { 20472: uint64_t data_size = 0; 20472: uint64_t num_entries = 0; 20472: uint64_t num_deletes = 0; 20472: }; 20472: 20472: using MultiGetRange = MultiGetContext::Range; 20472: # 82 "./db/memtable.h" 20472: class MemTable { 20472: public: 20472: struct KeyComparator : public MemTableRep::KeyComparator { 20472: const InternalKeyComparator comparator; 20472: explicit KeyComparator(const InternalKeyComparator& c) : comparator(c) { } 20472: virtual int operator()(const char* prefix_len_key1, 20472: const char* prefix_len_key2) const override; 20472: virtual int operator()(const char* prefix_len_key, 20472: const DecodedType& key) const override; 20472: }; 20472: # 102 "./db/memtable.h" 20472: explicit MemTable(const InternalKeyComparator& comparator, 20472: const ImmutableCFOptions& ioptions, 20472: const MutableCFOptions& mutable_cf_options, 20472: WriteBufferManager* write_buffer_manager, 20472: SequenceNumber earliest_seq, uint32_t column_family_id); 20472: 20472: MemTable(const MemTable&) = delete; 20472: MemTable& operator=(const MemTable&) = delete; 20472: 20472: 20472: ~MemTable(); 20472: 20472: 20472: 20472: 20472: void Ref() { ++refs_; } 20472: 20472: 20472: 20472: 20472: 20472: MemTable* Unref() { 20472: --refs_; 20472: 20472: # 125 "./db/memtable.h" 3 4 20472: (static_cast ( 20472: # 125 "./db/memtable.h" 20472: refs_ >= 0 20472: # 125 "./db/memtable.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 125 "./db/memtable.h" 20472: "refs_ >= 0" 20472: # 125 "./db/memtable.h" 3 4 20472: , "./db/memtable.h", 125, __extension__ __PRETTY_FUNCTION__)) 20472: # 125 "./db/memtable.h" 20472: ; 20472: if (refs_ <= 0) { 20472: return this; 20472: } 20472: return nullptr; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: size_t ApproximateMemoryUsage(); 20472: 20472: 20472: 20472: size_t ApproximateMemoryUsageFast() const { 20472: return approximate_memory_usage_.load(std::memory_order_relaxed); 20472: } 20472: 20472: 20472: 20472: bool ShouldScheduleFlush() const { 20472: return flush_state_.load(std::memory_order_relaxed) == FLUSH_REQUESTED; 20472: } 20472: 20472: 20472: 20472: bool MarkFlushScheduled() { 20472: auto before = FLUSH_REQUESTED; 20472: return flush_state_.compare_exchange_strong(before, FLUSH_SCHEDULED, 20472: std::memory_order_relaxed, 20472: std::memory_order_relaxed); 20472: } 20472: # 172 "./db/memtable.h" 20472: InternalIterator* NewIterator(const ReadOptions& read_options, Arena* arena); 20472: 20472: FragmentedRangeTombstoneIterator* NewRangeTombstoneIterator( 20472: const ReadOptions& read_options, SequenceNumber read_seq); 20472: # 186 "./db/memtable.h" 20472: bool Add(SequenceNumber seq, ValueType type, const Slice& key, 20472: const Slice& value, bool allow_concurrent = false, 20472: MemTablePostProcessInfo* post_process_info = nullptr, 20472: void** hint = nullptr); 20472: # 211 "./db/memtable.h" 20472: bool Get(const LookupKey& key, std::string* value, Status* s, 20472: MergeContext* merge_context, 20472: SequenceNumber* max_covering_tombstone_seq, SequenceNumber* seq, 20472: const ReadOptions& read_opts, ReadCallback* callback = nullptr, 20472: bool* is_blob_index = nullptr, bool do_merge = true) { 20472: return Get(key, value, nullptr, s, merge_context, 20472: max_covering_tombstone_seq, seq, read_opts, callback, 20472: is_blob_index, do_merge); 20472: } 20472: 20472: bool Get(const LookupKey& key, std::string* value, std::string* timestamp, 20472: Status* s, MergeContext* merge_context, 20472: SequenceNumber* max_covering_tombstone_seq, SequenceNumber* seq, 20472: const ReadOptions& read_opts, ReadCallback* callback = nullptr, 20472: bool* is_blob_index = nullptr, bool do_merge = true); 20472: 20472: bool Get(const LookupKey& key, std::string* value, std::string* timestamp, 20472: Status* s, MergeContext* merge_context, 20472: SequenceNumber* max_covering_tombstone_seq, 20472: const ReadOptions& read_opts, ReadCallback* callback = nullptr, 20472: bool* is_blob_index = nullptr, bool do_merge = true) { 20472: SequenceNumber seq; 20472: return Get(key, value, timestamp, s, merge_context, 20472: max_covering_tombstone_seq, &seq, read_opts, callback, 20472: is_blob_index, do_merge); 20472: } 20472: 20472: void MultiGet(const ReadOptions& read_options, MultiGetRange* range, 20472: ReadCallback* callback, bool* is_blob); 20472: # 251 "./db/memtable.h" 20472: void Update(SequenceNumber seq, 20472: const Slice& key, 20472: const Slice& value); 20472: # 267 "./db/memtable.h" 20472: bool UpdateCallback(SequenceNumber seq, 20472: const Slice& key, 20472: const Slice& delta); 20472: 20472: 20472: 20472: 20472: size_t CountSuccessiveMergeEntries(const LookupKey& key); 20472: 20472: 20472: 20472: void BatchPostProcess(const MemTablePostProcessInfo& update_counters) { 20472: num_entries_.fetch_add(update_counters.num_entries, 20472: std::memory_order_relaxed); 20472: data_size_.fetch_add(update_counters.data_size, std::memory_order_relaxed); 20472: if (update_counters.num_deletes != 0) { 20472: num_deletes_.fetch_add(update_counters.num_deletes, 20472: std::memory_order_relaxed); 20472: } 20472: UpdateFlushState(); 20472: } 20472: 20472: 20472: 20472: 20472: uint64_t num_entries() const { 20472: return num_entries_.load(std::memory_order_relaxed); 20472: } 20472: 20472: 20472: 20472: 20472: uint64_t num_deletes() const { 20472: return num_deletes_.load(std::memory_order_relaxed); 20472: } 20472: 20472: uint64_t get_data_size() const { 20472: return data_size_.load(std::memory_order_relaxed); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: void UpdateWriteBufferSize(size_t new_write_buffer_size) { 20472: if (bloom_filter_ == nullptr || 20472: new_write_buffer_size < write_buffer_size_) { 20472: write_buffer_size_.store(new_write_buffer_size, 20472: std::memory_order_relaxed); 20472: } 20472: } 20472: 20472: 20472: VersionEdit* GetEdits() { return &edit_; } 20472: 20472: 20472: 20472: 20472: bool IsEmpty() const { return first_seqno_ == 0; } 20472: 20472: 20472: 20472: 20472: 20472: SequenceNumber GetFirstSequenceNumber() { 20472: return first_seqno_.load(std::memory_order_relaxed); 20472: } 20472: # 342 "./db/memtable.h" 20472: SequenceNumber GetEarliestSequenceNumber() { 20472: return earliest_seqno_.load(std::memory_order_relaxed); 20472: } 20472: 20472: 20472: 20472: SequenceNumber GetCreationSeq() const { return creation_seq_; } 20472: 20472: void SetCreationSeq(SequenceNumber sn) { creation_seq_ = sn; } 20472: 20472: 20472: 20472: 20472: 20472: uint64_t GetNextLogNumber() { return mem_next_logfile_number_; } 20472: 20472: 20472: 20472: 20472: 20472: void SetNextLogNumber(uint64_t num) { mem_next_logfile_number_ = num; } 20472: 20472: 20472: 20472: 20472: 20472: void RefLogContainingPrepSection(uint64_t log); 20472: uint64_t GetMinLogContainingPrepSection(); 20472: 20472: 20472: 20472: 20472: 20472: 20472: void MarkImmutable() { 20472: table_->MarkReadOnly(); 20472: mem_tracker_.DoneAllocating(); 20472: } 20472: 20472: 20472: 20472: 20472: 20472: void MarkFlushed() { 20472: table_->MarkFlushed(); 20472: } 20472: 20472: 20472: bool IsMergeOperatorSupported() const { 20472: return table_->IsMergeOperatorSupported(); 20472: } 20472: 20472: 20472: 20472: bool IsSnapshotSupported() const { 20472: return table_->IsSnapshotSupported() && !moptions_.inplace_update_support; 20472: } 20472: 20472: struct MemTableStats { 20472: uint64_t size; 20472: uint64_t count; 20472: }; 20472: 20472: MemTableStats ApproximateStats(const Slice& start_ikey, 20472: const Slice& end_ikey); 20472: 20472: 20472: port::RWMutex* GetLock(const Slice& key); 20472: 20472: const InternalKeyComparator& GetInternalKeyComparator() const { 20472: return comparator_.comparator; 20472: } 20472: 20472: const ImmutableMemTableOptions* GetImmutableMemTableOptions() const { 20472: return &moptions_; 20472: } 20472: 20472: uint64_t ApproximateOldestKeyTime() const { 20472: return oldest_key_time_.load(std::memory_order_relaxed); 20472: } 20472: 20472: 20472: void SetID(uint64_t id) { id_ = id; } 20472: 20472: uint64_t GetID() const { return id_; } 20472: 20472: void SetFlushCompleted(bool completed) { flush_completed_ = completed; } 20472: 20472: uint64_t GetFileNumber() const { return file_number_; } 20472: 20472: void SetFileNumber(uint64_t file_num) { file_number_ = file_num; } 20472: 20472: void SetFlushInProgress(bool in_progress) { 20472: flush_in_progress_ = in_progress; 20472: } 20472: 20472: 20472: void SetFlushJobInfo(std::unique_ptr&& info) { 20472: flush_job_info_ = std::move(info); 20472: } 20472: 20472: std::unique_ptr ReleaseFlushJobInfo() { 20472: return std::move(flush_job_info_); 20472: } 20472: 20472: 20472: private: 20472: enum FlushStateEnum { FLUSH_NOT_REQUESTED, FLUSH_REQUESTED, FLUSH_SCHEDULED }; 20472: 20472: friend class MemTableIterator; 20472: friend class MemTableBackwardIterator; 20472: friend class MemTableList; 20472: 20472: KeyComparator comparator_; 20472: const ImmutableMemTableOptions moptions_; 20472: int refs_; 20472: const size_t kArenaBlockSize; 20472: AllocTracker mem_tracker_; 20472: ConcurrentArena arena_; 20472: std::unique_ptr table_; 20472: std::unique_ptr range_del_table_; 20472: std::atomic_bool is_range_del_table_empty_; 20472: 20472: 20472: std::atomic data_size_; 20472: std::atomic num_entries_; 20472: std::atomic num_deletes_; 20472: 20472: 20472: std::atomic write_buffer_size_; 20472: 20472: 20472: bool flush_in_progress_; 20472: bool flush_completed_; 20472: uint64_t file_number_; 20472: 20472: 20472: 20472: VersionEdit edit_; 20472: 20472: 20472: std::atomic first_seqno_; 20472: 20472: 20472: 20472: std::atomic earliest_seqno_; 20472: 20472: SequenceNumber creation_seq_; 20472: 20472: 20472: uint64_t mem_next_logfile_number_; 20472: 20472: 20472: 20472: std::atomic min_prep_log_referenced_; 20472: 20472: 20472: std::vector locks_; 20472: 20472: const SliceTransform* const prefix_extractor_; 20472: std::unique_ptr bloom_filter_; 20472: 20472: std::atomic flush_state_; 20472: 20472: Env* env_; 20472: 20472: 20472: const SliceTransform* insert_with_hint_prefix_extractor_; 20472: 20472: 20472: std::unordered_map insert_hints_; 20472: 20472: 20472: std::atomic oldest_key_time_; 20472: 20472: 20472: uint64_t id_ = 0; 20472: 20472: 20472: 20472: 20472: 20472: SequenceNumber atomic_flush_seqno_; 20472: 20472: 20472: 20472: std::atomic approximate_memory_usage_; 20472: 20472: 20472: 20472: std::unique_ptr flush_job_info_; 20472: 20472: 20472: 20472: bool ShouldFlushNow(); 20472: 20472: 20472: void UpdateFlushState(); 20472: 20472: void UpdateOldestKeyTime(); 20472: 20472: void GetFromTable(const LookupKey& key, 20472: SequenceNumber max_covering_tombstone_seq, bool do_merge, 20472: ReadCallback* callback, bool* is_blob_index, 20472: std::string* value, std::string* timestamp, Status* s, 20472: MergeContext* merge_context, SequenceNumber* seq, 20472: bool* found_final_value, bool* merge_in_progress); 20472: }; 20472: 20472: extern const char* EncodeKey(std::string* scratch, const Slice& target); 20472: 20472: } 20472: # 11 "db/memtable.cc" 2 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "./db/merge_helper.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "./db/range_del_aggregator.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 16 "./db/range_del_aggregator.h" 20472: # 1 "./db/compaction/compaction_iteration_stats.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: struct CompactionIterationStats { 20472: 20472: 20472: 20472: 20472: int64_t num_record_drop_user = 0; 20472: 20472: int64_t num_record_drop_hidden = 0; 20472: int64_t num_record_drop_obsolete = 0; 20472: int64_t num_record_drop_range_del = 0; 20472: int64_t num_range_del_drop_obsolete = 0; 20472: 20472: int64_t num_optimized_del_drop_obsolete = 0; 20472: uint64_t total_filter_time = 0; 20472: 20472: 20472: 20472: 20472: uint64_t num_input_records = 0; 20472: uint64_t num_input_deletion_records = 0; 20472: uint64_t num_input_corrupt_records = 0; 20472: uint64_t total_input_raw_key_bytes = 0; 20472: uint64_t total_input_raw_value_bytes = 0; 20472: 20472: 20472: uint64_t num_single_del_fallthru = 0; 20472: uint64_t num_single_del_mismatch = 0; 20472: }; 20472: # 17 "./db/range_del_aggregator.h" 2 20472: # 25 "./db/range_del_aggregator.h" 20472: # 1 "./table/scoped_arena_iterator.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: namespace rocksdb { 20472: class ScopedArenaIterator { 20472: 20472: void reset(InternalIterator* iter) noexcept { 20472: if (iter_ != nullptr) { 20472: iter_->~InternalIterator(); 20472: } 20472: iter_ = iter; 20472: } 20472: 20472: public: 20472: 20472: explicit ScopedArenaIterator(InternalIterator* iter = nullptr) 20472: : iter_(iter) {} 20472: 20472: ScopedArenaIterator(const ScopedArenaIterator&) = delete; 20472: ScopedArenaIterator& operator=(const ScopedArenaIterator&) = delete; 20472: 20472: ScopedArenaIterator(ScopedArenaIterator&& o) noexcept { 20472: iter_ = o.iter_; 20472: o.iter_ = nullptr; 20472: } 20472: 20472: ScopedArenaIterator& operator=(ScopedArenaIterator&& o) noexcept { 20472: reset(o.iter_); 20472: o.iter_ = nullptr; 20472: return *this; 20472: } 20472: 20472: InternalIterator* operator->() { return iter_; } 20472: InternalIterator* get() { return iter_; } 20472: 20472: void set(InternalIterator* iter) { reset(iter); } 20472: 20472: InternalIterator* release() { 20472: 20472: # 48 "./table/scoped_arena_iterator.h" 3 4 20472: (static_cast ( 20472: # 48 "./table/scoped_arena_iterator.h" 20472: iter_ != nullptr 20472: # 48 "./table/scoped_arena_iterator.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 48 "./table/scoped_arena_iterator.h" 20472: "iter_ != nullptr" 20472: # 48 "./table/scoped_arena_iterator.h" 3 4 20472: , "./table/scoped_arena_iterator.h", 48, __extension__ __PRETTY_FUNCTION__)) 20472: # 48 "./table/scoped_arena_iterator.h" 20472: ; 20472: auto* res = iter_; 20472: iter_ = nullptr; 20472: return res; 20472: } 20472: 20472: ~ScopedArenaIterator() { 20472: reset(nullptr); 20472: } 20472: 20472: private: 20472: InternalIterator* iter_; 20472: }; 20472: } 20472: # 26 "./db/range_del_aggregator.h" 2 20472: # 1 "./table/table_builder.h" 1 20472: # 10 "./table/table_builder.h" 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "./db/table_properties_collector.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: namespace rocksdb { 20472: 20472: 20472: class IntTblPropCollector { 20472: public: 20472: virtual ~IntTblPropCollector() {} 20472: virtual Status Finish(UserCollectedProperties* properties) = 0; 20472: 20472: virtual const char* Name() const = 0; 20472: 20472: 20472: 20472: virtual Status InternalAdd(const Slice& key, const Slice& value, 20472: uint64_t file_size) = 0; 20472: 20472: virtual void BlockAdd(uint64_t blockRawBytes, 20472: uint64_t blockCompressedBytesFast, 20472: uint64_t blockCompressedBytesSlow) = 0; 20472: 20472: virtual UserCollectedProperties GetReadableProperties() const = 0; 20472: 20472: virtual bool NeedCompact() const { return false; } 20472: }; 20472: 20472: 20472: class IntTblPropCollectorFactory { 20472: public: 20472: virtual ~IntTblPropCollectorFactory() {} 20472: 20472: virtual IntTblPropCollector* CreateIntTblPropCollector( 20472: uint32_t column_family_id) = 0; 20472: 20472: 20472: virtual const char* Name() const = 0; 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: class UserKeyTablePropertiesCollector : public IntTblPropCollector { 20472: public: 20472: 20472: explicit UserKeyTablePropertiesCollector(TablePropertiesCollector* collector) 20472: : collector_(collector) {} 20472: 20472: virtual ~UserKeyTablePropertiesCollector() {} 20472: 20472: virtual Status InternalAdd(const Slice& key, const Slice& value, 20472: uint64_t file_size) override; 20472: 20472: virtual void BlockAdd(uint64_t blockRawBytes, 20472: uint64_t blockCompressedBytesFast, 20472: uint64_t blockCompressedBytesSlow) override; 20472: 20472: virtual Status Finish(UserCollectedProperties* properties) override; 20472: 20472: virtual const char* Name() const override { return collector_->Name(); } 20472: 20472: UserCollectedProperties GetReadableProperties() const override; 20472: 20472: virtual bool NeedCompact() const override { 20472: return collector_->NeedCompact(); 20472: } 20472: 20472: protected: 20472: std::unique_ptr collector_; 20472: }; 20472: 20472: class UserKeyTablePropertiesCollectorFactory 20472: : public IntTblPropCollectorFactory { 20472: public: 20472: explicit UserKeyTablePropertiesCollectorFactory( 20472: std::shared_ptr user_collector_factory) 20472: : user_collector_factory_(user_collector_factory) {} 20472: virtual IntTblPropCollector* CreateIntTblPropCollector( 20472: uint32_t column_family_id) override { 20472: TablePropertiesCollectorFactory::Context context; 20472: context.column_family_id = column_family_id; 20472: return new UserKeyTablePropertiesCollector( 20472: user_collector_factory_->CreateTablePropertiesCollector(context)); 20472: } 20472: 20472: virtual const char* Name() const override { 20472: return user_collector_factory_->Name(); 20472: } 20472: 20472: private: 20472: std::shared_ptr user_collector_factory_; 20472: }; 20472: 20472: } 20472: # 18 "./table/table_builder.h" 2 20472: # 1 "./file/writable_file_writer.h" 1 20472: # 10 "./file/writable_file_writer.h" 20472: 20472: # 24 "./file/writable_file_writer.h" 20472: namespace rocksdb { 20472: class Statistics; 20472: # 34 "./file/writable_file_writer.h" 20472: class WritableFileWriter { 20472: private: 20472: 20472: void NotifyOnFileWriteFinish(uint64_t offset, size_t length, 20472: const FileOperationInfo::TimePoint& start_ts, 20472: const FileOperationInfo::TimePoint& finish_ts, 20472: const IOStatus& io_status) { 20472: FileOperationInfo info(file_name_, start_ts, finish_ts); 20472: info.offset = offset; 20472: info.length = length; 20472: info.status = io_status; 20472: 20472: for (auto& listener : listeners_) { 20472: listener->OnFileWriteFinish(info); 20472: } 20472: info.status.PermitUncheckedError(); 20472: } 20472: 20472: 20472: bool ShouldNotifyListeners() const { return !listeners_.empty(); } 20472: void UpdateFileChecksum(const Slice& data); 20472: 20472: std::unique_ptr writable_file_; 20472: std::string file_name_; 20472: Env* env_; 20472: AlignedBuffer buf_; 20472: size_t max_buffer_size_; 20472: 20472: 20472: uint64_t filesize_; 20472: 20472: 20472: 20472: 20472: uint64_t next_write_offset_; 20472: 20472: bool pending_sync_; 20472: uint64_t last_sync_size_; 20472: uint64_t bytes_per_sync_; 20472: RateLimiter* rate_limiter_; 20472: Statistics* stats_; 20472: std::vector> listeners_; 20472: std::unique_ptr checksum_generator_; 20472: bool checksum_finalized_; 20472: 20472: public: 20472: WritableFileWriter( 20472: std::unique_ptr&& file, const std::string& _file_name, 20472: const FileOptions& options, Env* env = nullptr, 20472: Statistics* stats = nullptr, 20472: const std::vector>& listeners = {}, 20472: FileChecksumGenFactory* file_checksum_gen_factory = nullptr) 20472: : writable_file_(std::move(file)), 20472: file_name_(_file_name), 20472: env_(env), 20472: buf_(), 20472: max_buffer_size_(options.writable_file_max_buffer_size), 20472: filesize_(0), 20472: 20472: next_write_offset_(0), 20472: 20472: pending_sync_(false), 20472: last_sync_size_(0), 20472: bytes_per_sync_(options.bytes_per_sync), 20472: rate_limiter_(options.rate_limiter), 20472: stats_(stats), 20472: listeners_(), 20472: checksum_generator_(nullptr), 20472: checksum_finalized_(false) { 20472: rocksdb::SyncPoint::GetInstance()->Process("WritableFileWriter::WritableFileWriter:0", reinterpret_cast(max_buffer_size_)) 20472: ; 20472: buf_.Alignment(writable_file_->GetRequiredBufferAlignment()); 20472: buf_.AllocateNewBuffer(std::min((size_t)65536, max_buffer_size_)); 20472: 20472: std::for_each(listeners.begin(), listeners.end(), 20472: [this](const std::shared_ptr& e) { 20472: if (e->ShouldBeNotifiedOnFileIO()) { 20472: listeners_.emplace_back(e); 20472: } 20472: }); 20472: 20472: 20472: 20472: if (file_checksum_gen_factory != nullptr) { 20472: FileChecksumGenContext checksum_gen_context; 20472: checksum_gen_context.file_name = _file_name; 20472: checksum_generator_ = 20472: file_checksum_gen_factory->CreateFileChecksumGenerator( 20472: checksum_gen_context); 20472: } 20472: } 20472: 20472: WritableFileWriter(const WritableFileWriter&) = delete; 20472: 20472: WritableFileWriter& operator=(const WritableFileWriter&) = delete; 20472: 20472: ~WritableFileWriter() { 20472: auto s = Close(); 20472: s.PermitUncheckedError(); 20472: } 20472: 20472: std::string file_name() const { return file_name_; } 20472: 20472: IOStatus Append(const Slice& data); 20472: 20472: IOStatus Pad(const size_t pad_bytes); 20472: 20472: IOStatus Flush(); 20472: 20472: IOStatus Close(); 20472: 20472: IOStatus Sync(bool use_fsync); 20472: 20472: 20472: 20472: 20472: IOStatus SyncWithoutFlush(bool use_fsync); 20472: 20472: uint64_t GetFileSize() const { return filesize_; } 20472: 20472: IOStatus InvalidateCache(size_t offset, size_t length) { 20472: return writable_file_->InvalidateCache(offset, length); 20472: } 20472: 20472: FSWritableFile* writable_file() const { return writable_file_.get(); } 20472: 20472: bool use_direct_io() { return writable_file_->use_direct_io(); } 20472: 20472: bool TEST_BufferIsEmpty() { return buf_.CurrentSize() == 0; } 20472: 20472: void TEST_SetFileChecksumGenerator( 20472: FileChecksumGenerator* checksum_generator) { 20472: checksum_generator_.reset(checksum_generator); 20472: } 20472: 20472: std::string GetFileChecksum(); 20472: 20472: const char* GetFileChecksumFuncName() const; 20472: 20472: private: 20472: 20472: 20472: 20472: IOStatus WriteDirect(); 20472: 20472: 20472: IOStatus WriteBuffered(const char* data, size_t size); 20472: IOStatus RangeSync(uint64_t offset, uint64_t nbytes); 20472: IOStatus SyncInternal(bool use_fsync); 20472: }; 20472: } 20472: # 19 "./table/table_builder.h" 2 20472: 20472: 20472: 20472: # 1 "./trace_replay/block_cache_tracer.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "/usr/include/c++/10/fstream" 1 3 20472: # 36 "/usr/include/c++/10/fstream" 3 20472: 20472: # 37 "/usr/include/c++/10/fstream" 3 20472: 20472: 20472: 20472: # 1 "/usr/include/c++/10/bits/codecvt.h" 1 3 20472: # 39 "/usr/include/c++/10/bits/codecvt.h" 3 20472: 20472: # 40 "/usr/include/c++/10/bits/codecvt.h" 3 20472: 20472: 20472: # 41 "/usr/include/c++/10/bits/codecvt.h" 3 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: class codecvt_base 20472: { 20472: public: 20472: enum result 20472: { 20472: ok, 20472: partial, 20472: error, 20472: noconv 20472: }; 20472: }; 20472: # 67 "/usr/include/c++/10/bits/codecvt.h" 3 20472: template 20472: class __codecvt_abstract_base 20472: : public locale::facet, public codecvt_base 20472: { 20472: public: 20472: 20472: typedef codecvt_base::result result; 20472: typedef _InternT intern_type; 20472: typedef _ExternT extern_type; 20472: typedef _StateT state_type; 20472: # 115 "/usr/include/c++/10/bits/codecvt.h" 3 20472: result 20472: out(state_type& __state, const intern_type* __from, 20472: const intern_type* __from_end, const intern_type*& __from_next, 20472: extern_type* __to, extern_type* __to_end, 20472: extern_type*& __to_next) const 20472: { 20472: return this->do_out(__state, __from, __from_end, __from_next, 20472: __to, __to_end, __to_next); 20472: } 20472: # 154 "/usr/include/c++/10/bits/codecvt.h" 3 20472: result 20472: unshift(state_type& __state, extern_type* __to, extern_type* __to_end, 20472: extern_type*& __to_next) const 20472: { return this->do_unshift(__state, __to,__to_end,__to_next); } 20472: # 195 "/usr/include/c++/10/bits/codecvt.h" 3 20472: result 20472: in(state_type& __state, const extern_type* __from, 20472: const extern_type* __from_end, const extern_type*& __from_next, 20472: intern_type* __to, intern_type* __to_end, 20472: intern_type*& __to_next) const 20472: { 20472: return this->do_in(__state, __from, __from_end, __from_next, 20472: __to, __to_end, __to_next); 20472: } 20472: 20472: int 20472: encoding() const throw() 20472: { return this->do_encoding(); } 20472: 20472: bool 20472: always_noconv() const throw() 20472: { return this->do_always_noconv(); } 20472: 20472: int 20472: length(state_type& __state, const extern_type* __from, 20472: const extern_type* __end, size_t __max) const 20472: { return this->do_length(__state, __from, __end, __max); } 20472: 20472: int 20472: max_length() const throw() 20472: { return this->do_max_length(); } 20472: 20472: protected: 20472: explicit 20472: __codecvt_abstract_base(size_t __refs = 0) : locale::facet(__refs) { } 20472: 20472: virtual 20472: ~__codecvt_abstract_base() { } 20472: # 236 "/usr/include/c++/10/bits/codecvt.h" 3 20472: virtual result 20472: do_out(state_type& __state, const intern_type* __from, 20472: const intern_type* __from_end, const intern_type*& __from_next, 20472: extern_type* __to, extern_type* __to_end, 20472: extern_type*& __to_next) const = 0; 20472: 20472: virtual result 20472: do_unshift(state_type& __state, extern_type* __to, 20472: extern_type* __to_end, extern_type*& __to_next) const = 0; 20472: 20472: virtual result 20472: do_in(state_type& __state, const extern_type* __from, 20472: const extern_type* __from_end, const extern_type*& __from_next, 20472: intern_type* __to, intern_type* __to_end, 20472: intern_type*& __to_next) const = 0; 20472: 20472: virtual int 20472: do_encoding() const throw() = 0; 20472: 20472: virtual bool 20472: do_always_noconv() const throw() = 0; 20472: 20472: virtual int 20472: do_length(state_type&, const extern_type* __from, 20472: const extern_type* __end, size_t __max) const = 0; 20472: 20472: virtual int 20472: do_max_length() const throw() = 0; 20472: }; 20472: # 273 "/usr/include/c++/10/bits/codecvt.h" 3 20472: template 20472: class codecvt 20472: : public __codecvt_abstract_base<_InternT, _ExternT, _StateT> 20472: { 20472: public: 20472: 20472: typedef codecvt_base::result result; 20472: typedef _InternT intern_type; 20472: typedef _ExternT extern_type; 20472: typedef _StateT state_type; 20472: 20472: protected: 20472: __c_locale _M_c_locale_codecvt; 20472: 20472: public: 20472: static locale::id id; 20472: 20472: explicit 20472: codecvt(size_t __refs = 0) 20472: : __codecvt_abstract_base<_InternT, _ExternT, _StateT> (__refs), 20472: _M_c_locale_codecvt(0) 20472: { } 20472: 20472: explicit 20472: codecvt(__c_locale __cloc, size_t __refs = 0); 20472: 20472: protected: 20472: virtual 20472: ~codecvt() { } 20472: 20472: virtual result 20472: do_out(state_type& __state, const intern_type* __from, 20472: const intern_type* __from_end, const intern_type*& __from_next, 20472: extern_type* __to, extern_type* __to_end, 20472: extern_type*& __to_next) const; 20472: 20472: virtual result 20472: do_unshift(state_type& __state, extern_type* __to, 20472: extern_type* __to_end, extern_type*& __to_next) const; 20472: 20472: virtual result 20472: do_in(state_type& __state, const extern_type* __from, 20472: const extern_type* __from_end, const extern_type*& __from_next, 20472: intern_type* __to, intern_type* __to_end, 20472: intern_type*& __to_next) const; 20472: 20472: virtual int 20472: do_encoding() const throw(); 20472: 20472: virtual bool 20472: do_always_noconv() const throw(); 20472: 20472: virtual int 20472: do_length(state_type&, const extern_type* __from, 20472: const extern_type* __end, size_t __max) const; 20472: 20472: virtual int 20472: do_max_length() const throw(); 20472: }; 20472: 20472: template 20472: locale::id codecvt<_InternT, _ExternT, _StateT>::id; 20472: 20472: 20472: template<> 20472: class codecvt 20472: : public __codecvt_abstract_base 20472: { 20472: friend class messages; 20472: 20472: public: 20472: 20472: typedef char intern_type; 20472: typedef char extern_type; 20472: typedef mbstate_t state_type; 20472: 20472: protected: 20472: __c_locale _M_c_locale_codecvt; 20472: 20472: public: 20472: static locale::id id; 20472: 20472: explicit 20472: codecvt(size_t __refs = 0); 20472: 20472: explicit 20472: codecvt(__c_locale __cloc, size_t __refs = 0); 20472: 20472: protected: 20472: virtual 20472: ~codecvt(); 20472: 20472: virtual result 20472: do_out(state_type& __state, const intern_type* __from, 20472: const intern_type* __from_end, const intern_type*& __from_next, 20472: extern_type* __to, extern_type* __to_end, 20472: extern_type*& __to_next) const; 20472: 20472: virtual result 20472: do_unshift(state_type& __state, extern_type* __to, 20472: extern_type* __to_end, extern_type*& __to_next) const; 20472: 20472: virtual result 20472: do_in(state_type& __state, const extern_type* __from, 20472: const extern_type* __from_end, const extern_type*& __from_next, 20472: intern_type* __to, intern_type* __to_end, 20472: intern_type*& __to_next) const; 20472: 20472: virtual int 20472: do_encoding() const throw(); 20472: 20472: virtual bool 20472: do_always_noconv() const throw(); 20472: 20472: virtual int 20472: do_length(state_type&, const extern_type* __from, 20472: const extern_type* __end, size_t __max) const; 20472: 20472: virtual int 20472: do_max_length() const throw(); 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: template<> 20472: class codecvt 20472: : public __codecvt_abstract_base 20472: { 20472: friend class messages; 20472: 20472: public: 20472: 20472: typedef wchar_t intern_type; 20472: typedef char extern_type; 20472: typedef mbstate_t state_type; 20472: 20472: protected: 20472: __c_locale _M_c_locale_codecvt; 20472: 20472: public: 20472: static locale::id id; 20472: 20472: explicit 20472: codecvt(size_t __refs = 0); 20472: 20472: explicit 20472: codecvt(__c_locale __cloc, size_t __refs = 0); 20472: 20472: protected: 20472: virtual 20472: ~codecvt(); 20472: 20472: virtual result 20472: do_out(state_type& __state, const intern_type* __from, 20472: const intern_type* __from_end, const intern_type*& __from_next, 20472: extern_type* __to, extern_type* __to_end, 20472: extern_type*& __to_next) const; 20472: 20472: virtual result 20472: do_unshift(state_type& __state, 20472: extern_type* __to, extern_type* __to_end, 20472: extern_type*& __to_next) const; 20472: 20472: virtual result 20472: do_in(state_type& __state, 20472: const extern_type* __from, const extern_type* __from_end, 20472: const extern_type*& __from_next, 20472: intern_type* __to, intern_type* __to_end, 20472: intern_type*& __to_next) const; 20472: 20472: virtual 20472: int do_encoding() const throw(); 20472: 20472: virtual 20472: bool do_always_noconv() const throw(); 20472: 20472: virtual 20472: int do_length(state_type&, const extern_type* __from, 20472: const extern_type* __end, size_t __max) const; 20472: 20472: virtual int 20472: do_max_length() const throw(); 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: template<> 20472: class codecvt 20472: : public __codecvt_abstract_base 20472: { 20472: public: 20472: 20472: typedef char16_t intern_type; 20472: typedef char extern_type; 20472: typedef mbstate_t state_type; 20472: 20472: public: 20472: static locale::id id; 20472: 20472: explicit 20472: codecvt(size_t __refs = 0) 20472: : __codecvt_abstract_base(__refs) { } 20472: 20472: protected: 20472: virtual 20472: ~codecvt(); 20472: 20472: virtual result 20472: do_out(state_type& __state, const intern_type* __from, 20472: const intern_type* __from_end, const intern_type*& __from_next, 20472: extern_type* __to, extern_type* __to_end, 20472: extern_type*& __to_next) const; 20472: 20472: virtual result 20472: do_unshift(state_type& __state, 20472: extern_type* __to, extern_type* __to_end, 20472: extern_type*& __to_next) const; 20472: 20472: virtual result 20472: do_in(state_type& __state, 20472: const extern_type* __from, const extern_type* __from_end, 20472: const extern_type*& __from_next, 20472: intern_type* __to, intern_type* __to_end, 20472: intern_type*& __to_next) const; 20472: 20472: virtual 20472: int do_encoding() const throw(); 20472: 20472: virtual 20472: bool do_always_noconv() const throw(); 20472: 20472: virtual 20472: int do_length(state_type&, const extern_type* __from, 20472: const extern_type* __end, size_t __max) const; 20472: 20472: virtual int 20472: do_max_length() const throw(); 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: template<> 20472: class codecvt 20472: : public __codecvt_abstract_base 20472: { 20472: public: 20472: 20472: typedef char32_t intern_type; 20472: typedef char extern_type; 20472: typedef mbstate_t state_type; 20472: 20472: public: 20472: static locale::id id; 20472: 20472: explicit 20472: codecvt(size_t __refs = 0) 20472: : __codecvt_abstract_base(__refs) { } 20472: 20472: protected: 20472: virtual 20472: ~codecvt(); 20472: 20472: virtual result 20472: do_out(state_type& __state, const intern_type* __from, 20472: const intern_type* __from_end, const intern_type*& __from_next, 20472: extern_type* __to, extern_type* __to_end, 20472: extern_type*& __to_next) const; 20472: 20472: virtual result 20472: do_unshift(state_type& __state, 20472: extern_type* __to, extern_type* __to_end, 20472: extern_type*& __to_next) const; 20472: 20472: virtual result 20472: do_in(state_type& __state, 20472: const extern_type* __from, const extern_type* __from_end, 20472: const extern_type*& __from_next, 20472: intern_type* __to, intern_type* __to_end, 20472: intern_type*& __to_next) const; 20472: 20472: virtual 20472: int do_encoding() const throw(); 20472: 20472: virtual 20472: bool do_always_noconv() const throw(); 20472: 20472: virtual 20472: int do_length(state_type&, const extern_type* __from, 20472: const extern_type* __end, size_t __max) const; 20472: 20472: virtual int 20472: do_max_length() const throw(); 20472: }; 20472: # 695 "/usr/include/c++/10/bits/codecvt.h" 3 20472: template 20472: class codecvt_byname : public codecvt<_InternT, _ExternT, _StateT> 20472: { 20472: public: 20472: explicit 20472: codecvt_byname(const char* __s, size_t __refs = 0) 20472: : codecvt<_InternT, _ExternT, _StateT>(__refs) 20472: { 20472: if (__builtin_strcmp(__s, "C") != 0 20472: && __builtin_strcmp(__s, "POSIX") != 0) 20472: { 20472: this->_S_destroy_c_locale(this->_M_c_locale_codecvt); 20472: this->_S_create_c_locale(this->_M_c_locale_codecvt, __s); 20472: } 20472: } 20472: 20472: 20472: explicit 20472: codecvt_byname(const string& __s, size_t __refs = 0) 20472: : codecvt_byname(__s.c_str(), __refs) { } 20472: 20472: 20472: protected: 20472: virtual 20472: ~codecvt_byname() { } 20472: }; 20472: 20472: 20472: template<> 20472: class codecvt_byname 20472: : public codecvt 20472: { 20472: public: 20472: explicit 20472: codecvt_byname(const char*, size_t __refs = 0) 20472: : codecvt(__refs) { } 20472: 20472: explicit 20472: codecvt_byname(const string& __s, size_t __refs = 0) 20472: : codecvt_byname(__s.c_str(), __refs) { } 20472: 20472: protected: 20472: virtual 20472: ~codecvt_byname() { } 20472: }; 20472: 20472: template<> 20472: class codecvt_byname 20472: : public codecvt 20472: { 20472: public: 20472: explicit 20472: codecvt_byname(const char*, size_t __refs = 0) 20472: : codecvt(__refs) { } 20472: 20472: explicit 20472: codecvt_byname(const string& __s, size_t __refs = 0) 20472: : codecvt_byname(__s.c_str(), __refs) { } 20472: 20472: protected: 20472: virtual 20472: ~codecvt_byname() { } 20472: }; 20472: # 802 "/usr/include/c++/10/bits/codecvt.h" 3 20472: extern template class codecvt_byname; 20472: 20472: extern template 20472: const codecvt& 20472: use_facet >(const locale&); 20472: 20472: extern template 20472: bool 20472: has_facet >(const locale&); 20472: 20472: 20472: extern template class codecvt_byname; 20472: 20472: extern template 20472: const codecvt& 20472: use_facet >(const locale&); 20472: 20472: extern template 20472: bool 20472: has_facet >(const locale&); 20472: 20472: 20472: 20472: extern template class codecvt_byname; 20472: extern template class codecvt_byname; 20472: # 837 "/usr/include/c++/10/bits/codecvt.h" 3 20472: 20472: } 20472: # 41 "/usr/include/c++/10/fstream" 2 3 20472: # 1 "/usr/include/c++/10/cstdio" 1 3 20472: # 39 "/usr/include/c++/10/cstdio" 3 20472: 20472: # 40 "/usr/include/c++/10/cstdio" 3 20472: # 42 "/usr/include/c++/10/fstream" 2 3 20472: # 1 "/usr/include/arm-linux-gnueabihf/c++/10/bits/basic_file.h" 1 3 20472: # 37 "/usr/include/arm-linux-gnueabihf/c++/10/bits/basic_file.h" 3 20472: 20472: # 38 "/usr/include/arm-linux-gnueabihf/c++/10/bits/basic_file.h" 3 20472: 20472: 20472: # 1 "/usr/include/arm-linux-gnueabihf/c++/10/bits/c++io.h" 1 3 20472: # 35 "/usr/include/arm-linux-gnueabihf/c++/10/bits/c++io.h" 3 20472: # 1 "/usr/include/c++/10/cstdio" 1 3 20472: # 39 "/usr/include/c++/10/cstdio" 3 20472: 20472: # 40 "/usr/include/c++/10/cstdio" 3 20472: # 36 "/usr/include/arm-linux-gnueabihf/c++/10/bits/c++io.h" 2 3 20472: 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: typedef __gthread_mutex_t __c_lock; 20472: 20472: 20472: typedef FILE __c_file; 20472: 20472: 20472: } 20472: # 41 "/usr/include/arm-linux-gnueabihf/c++/10/bits/basic_file.h" 2 3 20472: 20472: 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: 20472: template 20472: class __basic_file; 20472: 20472: 20472: template<> 20472: class __basic_file 20472: { 20472: 20472: __c_file* _M_cfile; 20472: 20472: 20472: bool _M_cfile_created; 20472: 20472: public: 20472: __basic_file(__c_lock* __lock = 0) throw (); 20472: 20472: 20472: __basic_file(__basic_file&& __rv, __c_lock* = 0) noexcept 20472: : _M_cfile(__rv._M_cfile), _M_cfile_created(__rv._M_cfile_created) 20472: { 20472: __rv._M_cfile = nullptr; 20472: __rv._M_cfile_created = false; 20472: } 20472: 20472: __basic_file& operator=(const __basic_file&) = delete; 20472: __basic_file& operator=(__basic_file&&) = delete; 20472: 20472: void 20472: swap(__basic_file& __f) noexcept 20472: { 20472: std::swap(_M_cfile, __f._M_cfile); 20472: std::swap(_M_cfile_created, __f._M_cfile_created); 20472: } 20472: 20472: 20472: __basic_file* 20472: open(const char* __name, ios_base::openmode __mode, int __prot = 0664); 20472: 20472: 20472: 20472: 20472: 20472: 20472: __basic_file* 20472: sys_open(__c_file* __file, ios_base::openmode); 20472: 20472: __basic_file* 20472: sys_open(int __fd, ios_base::openmode __mode) throw (); 20472: 20472: __basic_file* 20472: close(); 20472: 20472: __attribute__ ((__pure__)) bool 20472: is_open() const throw (); 20472: 20472: __attribute__ ((__pure__)) int 20472: fd() throw (); 20472: 20472: __attribute__ ((__pure__)) __c_file* 20472: file() throw (); 20472: 20472: ~__basic_file(); 20472: 20472: streamsize 20472: xsputn(const char* __s, streamsize __n); 20472: 20472: streamsize 20472: xsputn_2(const char* __s1, streamsize __n1, 20472: const char* __s2, streamsize __n2); 20472: 20472: streamsize 20472: xsgetn(char* __s, streamsize __n); 20472: 20472: streamoff 20472: seekoff(streamoff __off, ios_base::seekdir __way) throw (); 20472: 20472: int 20472: sync(); 20472: 20472: streamsize 20472: showmanyc(); 20472: }; 20472: 20472: 20472: } 20472: # 43 "/usr/include/c++/10/fstream" 2 3 20472: 20472: 20472: 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: # 79 "/usr/include/c++/10/fstream" 3 20472: template 20472: class basic_filebuf : public basic_streambuf<_CharT, _Traits> 20472: { 20472: 20472: template 20472: using __chk_state = __and_, 20472: is_copy_constructible<_Tp>, 20472: is_default_constructible<_Tp>>; 20472: 20472: static_assert(__chk_state::value, 20472: "state_type must be CopyAssignable, CopyConstructible" 20472: " and DefaultConstructible"); 20472: 20472: static_assert(is_same>::value, 20472: "pos_type must be fpos"); 20472: 20472: public: 20472: 20472: typedef _CharT char_type; 20472: typedef _Traits traits_type; 20472: typedef typename traits_type::int_type int_type; 20472: typedef typename traits_type::pos_type pos_type; 20472: typedef typename traits_type::off_type off_type; 20472: 20472: typedef basic_streambuf __streambuf_type; 20472: typedef basic_filebuf __filebuf_type; 20472: typedef __basic_file __file_type; 20472: typedef typename traits_type::state_type __state_type; 20472: typedef codecvt __codecvt_type; 20472: 20472: friend class ios_base; 20472: 20472: protected: 20472: 20472: 20472: __c_lock _M_lock; 20472: 20472: 20472: __file_type _M_file; 20472: 20472: 20472: ios_base::openmode _M_mode; 20472: 20472: 20472: __state_type _M_state_beg; 20472: 20472: 20472: 20472: 20472: __state_type _M_state_cur; 20472: 20472: 20472: 20472: __state_type _M_state_last; 20472: 20472: 20472: char_type* _M_buf; 20472: 20472: 20472: 20472: 20472: 20472: 20472: size_t _M_buf_size; 20472: 20472: 20472: bool _M_buf_allocated; 20472: # 155 "/usr/include/c++/10/fstream" 3 20472: bool _M_reading; 20472: bool _M_writing; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: char_type _M_pback; 20472: char_type* _M_pback_cur_save; 20472: char_type* _M_pback_end_save; 20472: bool _M_pback_init; 20472: 20472: 20472: 20472: const __codecvt_type* _M_codecvt; 20472: 20472: 20472: 20472: 20472: 20472: 20472: char* _M_ext_buf; 20472: 20472: 20472: 20472: 20472: streamsize _M_ext_buf_size; 20472: 20472: 20472: 20472: 20472: 20472: 20472: const char* _M_ext_next; 20472: char* _M_ext_end; 20472: 20472: 20472: 20472: 20472: 20472: 20472: void 20472: _M_create_pback() 20472: { 20472: if (!_M_pback_init) 20472: { 20472: _M_pback_cur_save = this->gptr(); 20472: _M_pback_end_save = this->egptr(); 20472: this->setg(&_M_pback, &_M_pback, &_M_pback + 1); 20472: _M_pback_init = true; 20472: } 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: void 20472: _M_destroy_pback() throw() 20472: { 20472: if (_M_pback_init) 20472: { 20472: 20472: _M_pback_cur_save += this->gptr() != this->eback(); 20472: this->setg(_M_buf, _M_pback_cur_save, _M_pback_end_save); 20472: _M_pback_init = false; 20472: } 20472: } 20472: 20472: public: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: basic_filebuf(); 20472: 20472: 20472: basic_filebuf(const basic_filebuf&) = delete; 20472: basic_filebuf(basic_filebuf&&); 20472: 20472: 20472: 20472: 20472: 20472: virtual 20472: ~basic_filebuf() 20472: { 20472: try 20472: { this->close(); } 20472: catch(...) 20472: { } 20472: } 20472: 20472: 20472: basic_filebuf& operator=(const basic_filebuf&) = delete; 20472: basic_filebuf& operator=(basic_filebuf&&); 20472: void swap(basic_filebuf&); 20472: 20472: 20472: 20472: 20472: 20472: 20472: bool 20472: is_open() const throw() 20472: { return _M_file.is_open(); } 20472: # 309 "/usr/include/c++/10/fstream" 3 20472: __filebuf_type* 20472: open(const char* __s, ios_base::openmode __mode); 20472: # 330 "/usr/include/c++/10/fstream" 3 20472: __filebuf_type* 20472: open(const std::string& __s, ios_base::openmode __mode) 20472: { return open(__s.c_str(), __mode); } 20472: # 360 "/usr/include/c++/10/fstream" 3 20472: __filebuf_type* 20472: close(); 20472: 20472: protected: 20472: void 20472: _M_allocate_internal_buffer(); 20472: 20472: void 20472: _M_destroy_internal_buffer() throw(); 20472: 20472: 20472: virtual streamsize 20472: showmanyc(); 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual int_type 20472: underflow(); 20472: 20472: virtual int_type 20472: pbackfail(int_type __c = _Traits::eof()); 20472: # 392 "/usr/include/c++/10/fstream" 3 20472: virtual int_type 20472: overflow(int_type __c = _Traits::eof()); 20472: 20472: 20472: 20472: bool 20472: _M_convert_to_external(char_type*, streamsize); 20472: # 412 "/usr/include/c++/10/fstream" 3 20472: virtual __streambuf_type* 20472: setbuf(char_type* __s, streamsize __n); 20472: 20472: virtual pos_type 20472: seekoff(off_type __off, ios_base::seekdir __way, 20472: ios_base::openmode __mode = ios_base::in | ios_base::out); 20472: 20472: virtual pos_type 20472: seekpos(pos_type __pos, 20472: ios_base::openmode __mode = ios_base::in | ios_base::out); 20472: 20472: 20472: pos_type 20472: _M_seek(off_type __off, ios_base::seekdir __way, __state_type __state); 20472: 20472: int 20472: _M_get_ext_pos(__state_type &__state); 20472: 20472: virtual int 20472: sync(); 20472: 20472: virtual void 20472: imbue(const locale& __loc); 20472: 20472: virtual streamsize 20472: xsgetn(char_type* __s, streamsize __n); 20472: 20472: virtual streamsize 20472: xsputn(const char_type* __s, streamsize __n); 20472: 20472: 20472: bool 20472: _M_terminate_output(); 20472: # 458 "/usr/include/c++/10/fstream" 3 20472: void 20472: _M_set_buffer(streamsize __off) 20472: { 20472: const bool __testin = _M_mode & ios_base::in; 20472: const bool __testout = (_M_mode & ios_base::out 20472: || _M_mode & ios_base::app); 20472: 20472: if (__testin && __off > 0) 20472: this->setg(_M_buf, _M_buf, _M_buf + __off); 20472: else 20472: this->setg(_M_buf, _M_buf, _M_buf); 20472: 20472: if (__testout && __off == 0 && _M_buf_size > 1 ) 20472: this->setp(_M_buf, _M_buf + _M_buf_size - 1); 20472: else 20472: this->setp(0, 0); 20472: } 20472: }; 20472: # 491 "/usr/include/c++/10/fstream" 3 20472: template 20472: class basic_ifstream : public basic_istream<_CharT, _Traits> 20472: { 20472: public: 20472: 20472: typedef _CharT char_type; 20472: typedef _Traits traits_type; 20472: typedef typename traits_type::int_type int_type; 20472: typedef typename traits_type::pos_type pos_type; 20472: typedef typename traits_type::off_type off_type; 20472: 20472: 20472: typedef basic_filebuf __filebuf_type; 20472: typedef basic_istream __istream_type; 20472: 20472: private: 20472: __filebuf_type _M_filebuf; 20472: 20472: public: 20472: # 518 "/usr/include/c++/10/fstream" 3 20472: basic_ifstream() : __istream_type(), _M_filebuf() 20472: { this->init(&_M_filebuf); } 20472: # 528 "/usr/include/c++/10/fstream" 3 20472: explicit 20472: basic_ifstream(const char* __s, ios_base::openmode __mode = ios_base::in) 20472: : __istream_type(), _M_filebuf() 20472: { 20472: this->init(&_M_filebuf); 20472: this->open(__s, __mode); 20472: } 20472: # 561 "/usr/include/c++/10/fstream" 3 20472: explicit 20472: basic_ifstream(const std::string& __s, 20472: ios_base::openmode __mode = ios_base::in) 20472: : __istream_type(), _M_filebuf() 20472: { 20472: this->init(&_M_filebuf); 20472: this->open(__s, __mode); 20472: } 20472: # 585 "/usr/include/c++/10/fstream" 3 20472: basic_ifstream(const basic_ifstream&) = delete; 20472: 20472: basic_ifstream(basic_ifstream&& __rhs) 20472: : __istream_type(std::move(__rhs)), 20472: _M_filebuf(std::move(__rhs._M_filebuf)) 20472: { __istream_type::set_rdbuf(&_M_filebuf); } 20472: # 599 "/usr/include/c++/10/fstream" 3 20472: ~basic_ifstream() 20472: { } 20472: 20472: 20472: 20472: 20472: basic_ifstream& 20472: operator=(const basic_ifstream&) = delete; 20472: 20472: basic_ifstream& 20472: operator=(basic_ifstream&& __rhs) 20472: { 20472: __istream_type::operator=(std::move(__rhs)); 20472: _M_filebuf = std::move(__rhs._M_filebuf); 20472: return *this; 20472: } 20472: 20472: void 20472: swap(basic_ifstream& __rhs) 20472: { 20472: __istream_type::swap(__rhs); 20472: _M_filebuf.swap(__rhs._M_filebuf); 20472: } 20472: # 631 "/usr/include/c++/10/fstream" 3 20472: __filebuf_type* 20472: rdbuf() const 20472: { return const_cast<__filebuf_type*>(&_M_filebuf); } 20472: 20472: 20472: 20472: 20472: 20472: bool 20472: is_open() 20472: { return _M_filebuf.is_open(); } 20472: 20472: 20472: 20472: bool 20472: is_open() const 20472: { return _M_filebuf.is_open(); } 20472: # 657 "/usr/include/c++/10/fstream" 3 20472: void 20472: open(const char* __s, ios_base::openmode __mode = ios_base::in) 20472: { 20472: if (!_M_filebuf.open(__s, __mode | ios_base::in)) 20472: this->setstate(ios_base::failbit); 20472: else 20472: 20472: 20472: this->clear(); 20472: } 20472: # 696 "/usr/include/c++/10/fstream" 3 20472: void 20472: open(const std::string& __s, ios_base::openmode __mode = ios_base::in) 20472: { 20472: if (!_M_filebuf.open(__s, __mode | ios_base::in)) 20472: this->setstate(ios_base::failbit); 20472: else 20472: 20472: 20472: this->clear(); 20472: } 20472: # 729 "/usr/include/c++/10/fstream" 3 20472: void 20472: close() 20472: { 20472: if (!_M_filebuf.close()) 20472: this->setstate(ios_base::failbit); 20472: } 20472: }; 20472: # 752 "/usr/include/c++/10/fstream" 3 20472: template 20472: class basic_ofstream : public basic_ostream<_CharT,_Traits> 20472: { 20472: public: 20472: 20472: typedef _CharT char_type; 20472: typedef _Traits traits_type; 20472: typedef typename traits_type::int_type int_type; 20472: typedef typename traits_type::pos_type pos_type; 20472: typedef typename traits_type::off_type off_type; 20472: 20472: 20472: typedef basic_filebuf __filebuf_type; 20472: typedef basic_ostream __ostream_type; 20472: 20472: private: 20472: __filebuf_type _M_filebuf; 20472: 20472: public: 20472: # 779 "/usr/include/c++/10/fstream" 3 20472: basic_ofstream(): __ostream_type(), _M_filebuf() 20472: { this->init(&_M_filebuf); } 20472: # 789 "/usr/include/c++/10/fstream" 3 20472: explicit 20472: basic_ofstream(const char* __s, 20472: ios_base::openmode __mode = ios_base::out) 20472: : __ostream_type(), _M_filebuf() 20472: { 20472: this->init(&_M_filebuf); 20472: this->open(__s, __mode); 20472: } 20472: # 824 "/usr/include/c++/10/fstream" 3 20472: explicit 20472: basic_ofstream(const std::string& __s, 20472: ios_base::openmode __mode = ios_base::out) 20472: : __ostream_type(), _M_filebuf() 20472: { 20472: this->init(&_M_filebuf); 20472: this->open(__s, __mode); 20472: } 20472: # 848 "/usr/include/c++/10/fstream" 3 20472: basic_ofstream(const basic_ofstream&) = delete; 20472: 20472: basic_ofstream(basic_ofstream&& __rhs) 20472: : __ostream_type(std::move(__rhs)), 20472: _M_filebuf(std::move(__rhs._M_filebuf)) 20472: { __ostream_type::set_rdbuf(&_M_filebuf); } 20472: # 862 "/usr/include/c++/10/fstream" 3 20472: ~basic_ofstream() 20472: { } 20472: 20472: 20472: 20472: 20472: basic_ofstream& 20472: operator=(const basic_ofstream&) = delete; 20472: 20472: basic_ofstream& 20472: operator=(basic_ofstream&& __rhs) 20472: { 20472: __ostream_type::operator=(std::move(__rhs)); 20472: _M_filebuf = std::move(__rhs._M_filebuf); 20472: return *this; 20472: } 20472: 20472: void 20472: swap(basic_ofstream& __rhs) 20472: { 20472: __ostream_type::swap(__rhs); 20472: _M_filebuf.swap(__rhs._M_filebuf); 20472: } 20472: # 894 "/usr/include/c++/10/fstream" 3 20472: __filebuf_type* 20472: rdbuf() const 20472: { return const_cast<__filebuf_type*>(&_M_filebuf); } 20472: 20472: 20472: 20472: 20472: 20472: bool 20472: is_open() 20472: { return _M_filebuf.is_open(); } 20472: 20472: 20472: 20472: bool 20472: is_open() const 20472: { return _M_filebuf.is_open(); } 20472: # 920 "/usr/include/c++/10/fstream" 3 20472: void 20472: open(const char* __s, ios_base::openmode __mode = ios_base::out) 20472: { 20472: if (!_M_filebuf.open(__s, __mode | ios_base::out)) 20472: this->setstate(ios_base::failbit); 20472: else 20472: 20472: 20472: this->clear(); 20472: } 20472: # 959 "/usr/include/c++/10/fstream" 3 20472: void 20472: open(const std::string& __s, ios_base::openmode __mode = ios_base::out) 20472: { 20472: if (!_M_filebuf.open(__s, __mode | ios_base::out)) 20472: this->setstate(ios_base::failbit); 20472: else 20472: 20472: 20472: this->clear(); 20472: } 20472: # 992 "/usr/include/c++/10/fstream" 3 20472: void 20472: close() 20472: { 20472: if (!_M_filebuf.close()) 20472: this->setstate(ios_base::failbit); 20472: } 20472: }; 20472: # 1015 "/usr/include/c++/10/fstream" 3 20472: template 20472: class basic_fstream : public basic_iostream<_CharT, _Traits> 20472: { 20472: public: 20472: 20472: typedef _CharT char_type; 20472: typedef _Traits traits_type; 20472: typedef typename traits_type::int_type int_type; 20472: typedef typename traits_type::pos_type pos_type; 20472: typedef typename traits_type::off_type off_type; 20472: 20472: 20472: typedef basic_filebuf __filebuf_type; 20472: typedef basic_ios __ios_type; 20472: typedef basic_iostream __iostream_type; 20472: 20472: private: 20472: __filebuf_type _M_filebuf; 20472: 20472: public: 20472: # 1043 "/usr/include/c++/10/fstream" 3 20472: basic_fstream() 20472: : __iostream_type(), _M_filebuf() 20472: { this->init(&_M_filebuf); } 20472: 20472: 20472: 20472: 20472: 20472: 20472: explicit 20472: basic_fstream(const char* __s, 20472: ios_base::openmode __mode = ios_base::in | ios_base::out) 20472: : __iostream_type(0), _M_filebuf() 20472: { 20472: this->init(&_M_filebuf); 20472: this->open(__s, __mode); 20472: } 20472: # 1082 "/usr/include/c++/10/fstream" 3 20472: explicit 20472: basic_fstream(const std::string& __s, 20472: ios_base::openmode __mode = ios_base::in | ios_base::out) 20472: : __iostream_type(0), _M_filebuf() 20472: { 20472: this->init(&_M_filebuf); 20472: this->open(__s, __mode); 20472: } 20472: # 1104 "/usr/include/c++/10/fstream" 3 20472: basic_fstream(const basic_fstream&) = delete; 20472: 20472: basic_fstream(basic_fstream&& __rhs) 20472: : __iostream_type(std::move(__rhs)), 20472: _M_filebuf(std::move(__rhs._M_filebuf)) 20472: { __iostream_type::set_rdbuf(&_M_filebuf); } 20472: # 1118 "/usr/include/c++/10/fstream" 3 20472: ~basic_fstream() 20472: { } 20472: 20472: 20472: 20472: 20472: basic_fstream& 20472: operator=(const basic_fstream&) = delete; 20472: 20472: basic_fstream& 20472: operator=(basic_fstream&& __rhs) 20472: { 20472: __iostream_type::operator=(std::move(__rhs)); 20472: _M_filebuf = std::move(__rhs._M_filebuf); 20472: return *this; 20472: } 20472: 20472: void 20472: swap(basic_fstream& __rhs) 20472: { 20472: __iostream_type::swap(__rhs); 20472: _M_filebuf.swap(__rhs._M_filebuf); 20472: } 20472: # 1150 "/usr/include/c++/10/fstream" 3 20472: __filebuf_type* 20472: rdbuf() const 20472: { return const_cast<__filebuf_type*>(&_M_filebuf); } 20472: 20472: 20472: 20472: 20472: 20472: bool 20472: is_open() 20472: { return _M_filebuf.is_open(); } 20472: 20472: 20472: 20472: bool 20472: is_open() const 20472: { return _M_filebuf.is_open(); } 20472: # 1176 "/usr/include/c++/10/fstream" 3 20472: void 20472: open(const char* __s, 20472: ios_base::openmode __mode = ios_base::in | ios_base::out) 20472: { 20472: if (!_M_filebuf.open(__s, __mode)) 20472: this->setstate(ios_base::failbit); 20472: else 20472: 20472: 20472: this->clear(); 20472: } 20472: # 1217 "/usr/include/c++/10/fstream" 3 20472: void 20472: open(const std::string& __s, 20472: ios_base::openmode __mode = ios_base::in | ios_base::out) 20472: { 20472: if (!_M_filebuf.open(__s, __mode)) 20472: this->setstate(ios_base::failbit); 20472: else 20472: 20472: 20472: this->clear(); 20472: } 20472: # 1252 "/usr/include/c++/10/fstream" 3 20472: void 20472: close() 20472: { 20472: if (!_M_filebuf.close()) 20472: this->setstate(ios_base::failbit); 20472: } 20472: }; 20472: 20472: 20472: 20472: template 20472: inline void 20472: swap(basic_filebuf<_CharT, _Traits>& __x, 20472: basic_filebuf<_CharT, _Traits>& __y) 20472: { __x.swap(__y); } 20472: 20472: 20472: template 20472: inline void 20472: swap(basic_ifstream<_CharT, _Traits>& __x, 20472: basic_ifstream<_CharT, _Traits>& __y) 20472: { __x.swap(__y); } 20472: 20472: 20472: template 20472: inline void 20472: swap(basic_ofstream<_CharT, _Traits>& __x, 20472: basic_ofstream<_CharT, _Traits>& __y) 20472: { __x.swap(__y); } 20472: 20472: 20472: template 20472: inline void 20472: swap(basic_fstream<_CharT, _Traits>& __x, 20472: basic_fstream<_CharT, _Traits>& __y) 20472: { __x.swap(__y); } 20472: 20472: 20472: 20472: } 20472: 20472: # 1 "/usr/include/c++/10/bits/fstream.tcc" 1 3 20472: # 37 "/usr/include/c++/10/bits/fstream.tcc" 3 20472: 20472: # 38 "/usr/include/c++/10/bits/fstream.tcc" 3 20472: 20472: 20472: 20472: # 1 "/usr/include/c++/10/cerrno" 1 3 20472: # 39 "/usr/include/c++/10/cerrno" 3 20472: 20472: # 40 "/usr/include/c++/10/cerrno" 3 20472: # 42 "/usr/include/c++/10/bits/fstream.tcc" 2 3 20472: 20472: namespace std __attribute__ ((__visibility__ ("default"))) 20472: { 20472: 20472: 20472: template 20472: void 20472: basic_filebuf<_CharT, _Traits>:: 20472: _M_allocate_internal_buffer() 20472: { 20472: 20472: 20472: if (!_M_buf_allocated && !_M_buf) 20472: { 20472: _M_buf = new char_type[_M_buf_size]; 20472: _M_buf_allocated = true; 20472: } 20472: } 20472: 20472: template 20472: void 20472: basic_filebuf<_CharT, _Traits>:: 20472: _M_destroy_internal_buffer() throw() 20472: { 20472: if (_M_buf_allocated) 20472: { 20472: delete [] _M_buf; 20472: _M_buf = 0; 20472: _M_buf_allocated = false; 20472: } 20472: delete [] _M_ext_buf; 20472: _M_ext_buf = 0; 20472: _M_ext_buf_size = 0; 20472: _M_ext_next = 0; 20472: _M_ext_end = 0; 20472: } 20472: 20472: template 20472: basic_filebuf<_CharT, _Traits>:: 20472: basic_filebuf() : __streambuf_type(), _M_lock(), _M_file(&_M_lock), 20472: _M_mode(ios_base::openmode(0)), _M_state_beg(), _M_state_cur(), 20472: _M_state_last(), _M_buf(0), _M_buf_size(8192), 20472: _M_buf_allocated(false), _M_reading(false), _M_writing(false), _M_pback(), 20472: _M_pback_cur_save(0), _M_pback_end_save(0), _M_pback_init(false), 20472: _M_codecvt(0), _M_ext_buf(0), _M_ext_buf_size(0), _M_ext_next(0), 20472: _M_ext_end(0) 20472: { 20472: if (has_facet<__codecvt_type>(this->_M_buf_locale)) 20472: _M_codecvt = &use_facet<__codecvt_type>(this->_M_buf_locale); 20472: } 20472: 20472: 20472: template 20472: basic_filebuf<_CharT, _Traits>:: 20472: basic_filebuf(basic_filebuf&& __rhs) 20472: : __streambuf_type(__rhs), 20472: _M_lock(), _M_file(std::move(__rhs._M_file), &_M_lock), 20472: _M_mode(std::__exchange(__rhs._M_mode, ios_base::openmode(0))), 20472: _M_state_beg(std::move(__rhs._M_state_beg)), 20472: _M_state_cur(std::move(__rhs._M_state_cur)), 20472: _M_state_last(std::move(__rhs._M_state_last)), 20472: _M_buf(std::__exchange(__rhs._M_buf, nullptr)), 20472: _M_buf_size(std::__exchange(__rhs._M_buf_size, 1)), 20472: _M_buf_allocated(std::__exchange(__rhs._M_buf_allocated, false)), 20472: _M_reading(std::__exchange(__rhs._M_reading, false)), 20472: _M_writing(std::__exchange(__rhs._M_writing, false)), 20472: _M_pback(__rhs._M_pback), 20472: _M_pback_cur_save(std::__exchange(__rhs._M_pback_cur_save, nullptr)), 20472: _M_pback_end_save(std::__exchange(__rhs._M_pback_end_save, nullptr)), 20472: _M_pback_init(std::__exchange(__rhs._M_pback_init, false)), 20472: _M_codecvt(__rhs._M_codecvt), 20472: _M_ext_buf(std::__exchange(__rhs._M_ext_buf, nullptr)), 20472: _M_ext_buf_size(std::__exchange(__rhs._M_ext_buf_size, 0)), 20472: _M_ext_next(std::__exchange(__rhs._M_ext_next, nullptr)), 20472: _M_ext_end(std::__exchange(__rhs._M_ext_end, nullptr)) 20472: { 20472: __rhs._M_set_buffer(-1); 20472: __rhs._M_state_last = __rhs._M_state_cur = __rhs._M_state_beg; 20472: } 20472: 20472: template 20472: basic_filebuf<_CharT, _Traits>& 20472: basic_filebuf<_CharT, _Traits>:: 20472: operator=(basic_filebuf&& __rhs) 20472: { 20472: this->close(); 20472: __streambuf_type::operator=(__rhs); 20472: _M_file.swap(__rhs._M_file); 20472: _M_mode = std::__exchange(__rhs._M_mode, ios_base::openmode(0)); 20472: _M_state_beg = std::move(__rhs._M_state_beg); 20472: _M_state_cur = std::move(__rhs._M_state_cur); 20472: _M_state_last = std::move(__rhs._M_state_last); 20472: _M_buf = std::__exchange(__rhs._M_buf, nullptr); 20472: _M_buf_size = std::__exchange(__rhs._M_buf_size, 1); 20472: _M_buf_allocated = std::__exchange(__rhs._M_buf_allocated, false); 20472: _M_ext_buf = std::__exchange(__rhs._M_ext_buf, nullptr); 20472: _M_ext_buf_size = std::__exchange(__rhs._M_ext_buf_size, 0); 20472: _M_ext_next = std::__exchange(__rhs._M_ext_next, nullptr); 20472: _M_ext_end = std::__exchange(__rhs._M_ext_end, nullptr); 20472: _M_reading = std::__exchange(__rhs._M_reading, false); 20472: _M_writing = std::__exchange(__rhs._M_writing, false); 20472: _M_pback_cur_save = std::__exchange(__rhs._M_pback_cur_save, nullptr); 20472: _M_pback_end_save = std::__exchange(__rhs._M_pback_end_save, nullptr); 20472: _M_pback_init = std::__exchange(__rhs._M_pback_init, false); 20472: __rhs._M_set_buffer(-1); 20472: __rhs._M_state_last = __rhs._M_state_cur = __rhs._M_state_beg; 20472: return *this; 20472: } 20472: 20472: template 20472: void 20472: basic_filebuf<_CharT, _Traits>:: 20472: swap(basic_filebuf& __rhs) 20472: { 20472: __streambuf_type::swap(__rhs); 20472: _M_file.swap(__rhs._M_file); 20472: std::swap(_M_mode, __rhs._M_mode); 20472: std::swap(_M_state_beg, __rhs._M_state_beg); 20472: std::swap(_M_state_cur, __rhs._M_state_cur); 20472: std::swap(_M_state_last, __rhs._M_state_last); 20472: std::swap(_M_buf, __rhs._M_buf); 20472: std::swap(_M_buf_size, __rhs._M_buf_size); 20472: std::swap(_M_buf_allocated, __rhs._M_buf_allocated); 20472: std::swap(_M_ext_buf, __rhs._M_ext_buf); 20472: std::swap(_M_ext_buf_size, __rhs._M_ext_buf_size); 20472: std::swap(_M_ext_next, __rhs._M_ext_next); 20472: std::swap(_M_ext_end, __rhs._M_ext_end); 20472: std::swap(_M_reading, __rhs._M_reading); 20472: std::swap(_M_writing, __rhs._M_writing); 20472: std::swap(_M_pback_cur_save, __rhs._M_pback_cur_save); 20472: std::swap(_M_pback_end_save, __rhs._M_pback_end_save); 20472: std::swap(_M_pback_init, __rhs._M_pback_init); 20472: } 20472: 20472: 20472: template 20472: typename basic_filebuf<_CharT, _Traits>::__filebuf_type* 20472: basic_filebuf<_CharT, _Traits>:: 20472: open(const char* __s, ios_base::openmode __mode) 20472: { 20472: __filebuf_type *__ret = 0; 20472: if (!this->is_open()) 20472: { 20472: _M_file.open(__s, __mode); 20472: if (this->is_open()) 20472: { 20472: _M_allocate_internal_buffer(); 20472: _M_mode = __mode; 20472: 20472: 20472: _M_reading = false; 20472: _M_writing = false; 20472: _M_set_buffer(-1); 20472: 20472: 20472: _M_state_last = _M_state_cur = _M_state_beg; 20472: 20472: 20472: if ((__mode & ios_base::ate) 20472: && this->seekoff(0, ios_base::end, __mode) 20472: == pos_type(off_type(-1))) 20472: this->close(); 20472: else 20472: __ret = this; 20472: } 20472: } 20472: return __ret; 20472: } 20472: # 247 "/usr/include/c++/10/bits/fstream.tcc" 3 20472: template 20472: typename basic_filebuf<_CharT, _Traits>::__filebuf_type* 20472: basic_filebuf<_CharT, _Traits>:: 20472: close() 20472: { 20472: if (!this->is_open()) 20472: return 0; 20472: 20472: bool __testfail = false; 20472: { 20472: 20472: struct __close_sentry 20472: { 20472: basic_filebuf *__fb; 20472: __close_sentry (basic_filebuf *__fbi): __fb(__fbi) { } 20472: ~__close_sentry () 20472: { 20472: __fb->_M_mode = ios_base::openmode(0); 20472: __fb->_M_pback_init = false; 20472: __fb->_M_destroy_internal_buffer(); 20472: __fb->_M_reading = false; 20472: __fb->_M_writing = false; 20472: __fb->_M_set_buffer(-1); 20472: __fb->_M_state_last = __fb->_M_state_cur = __fb->_M_state_beg; 20472: } 20472: } __cs (this); 20472: 20472: try 20472: { 20472: if (!_M_terminate_output()) 20472: __testfail = true; 20472: } 20472: catch(...) 20472: { 20472: _M_file.close(); 20472: throw; 20472: } 20472: } 20472: 20472: if (!_M_file.close()) 20472: __testfail = true; 20472: 20472: if (__testfail) 20472: return 0; 20472: else 20472: return this; 20472: } 20472: 20472: template 20472: streamsize 20472: basic_filebuf<_CharT, _Traits>:: 20472: showmanyc() 20472: { 20472: streamsize __ret = -1; 20472: const bool __testin = _M_mode & ios_base::in; 20472: if (__testin && this->is_open()) 20472: { 20472: 20472: 20472: __ret = this->egptr() - this->gptr(); 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: if (__check_facet(_M_codecvt).encoding() >= 0) 20472: 20472: __ret += _M_file.showmanyc() / _M_codecvt->max_length(); 20472: } 20472: return __ret; 20472: } 20472: 20472: template 20472: typename basic_filebuf<_CharT, _Traits>::int_type 20472: basic_filebuf<_CharT, _Traits>:: 20472: underflow() 20472: { 20472: int_type __ret = traits_type::eof(); 20472: const bool __testin = _M_mode & ios_base::in; 20472: if (__testin) 20472: { 20472: if (_M_writing) 20472: { 20472: if (overflow() == traits_type::eof()) 20472: return __ret; 20472: _M_set_buffer(-1); 20472: _M_writing = false; 20472: } 20472: 20472: 20472: 20472: _M_destroy_pback(); 20472: 20472: if (this->gptr() < this->egptr()) 20472: return traits_type::to_int_type(*this->gptr()); 20472: 20472: 20472: const size_t __buflen = _M_buf_size > 1 ? _M_buf_size - 1 : 1; 20472: 20472: 20472: bool __got_eof = false; 20472: 20472: streamsize __ilen = 0; 20472: codecvt_base::result __r = codecvt_base::ok; 20472: if (__check_facet(_M_codecvt).always_noconv()) 20472: { 20472: __ilen = _M_file.xsgetn(reinterpret_cast(this->eback()), 20472: __buflen); 20472: if (__ilen == 0) 20472: __got_eof = true; 20472: } 20472: else 20472: { 20472: 20472: 20472: const int __enc = _M_codecvt->encoding(); 20472: streamsize __blen; 20472: streamsize __rlen; 20472: if (__enc > 0) 20472: __blen = __rlen = __buflen * __enc; 20472: else 20472: { 20472: __blen = __buflen + _M_codecvt->max_length() - 1; 20472: __rlen = __buflen; 20472: } 20472: const streamsize __remainder = _M_ext_end - _M_ext_next; 20472: __rlen = __rlen > __remainder ? __rlen - __remainder : 0; 20472: 20472: 20472: 20472: if (_M_reading && this->egptr() == this->eback() && __remainder) 20472: __rlen = 0; 20472: 20472: 20472: 20472: if (_M_ext_buf_size < __blen) 20472: { 20472: char* __buf = new char[__blen]; 20472: if (__remainder) 20472: __builtin_memcpy(__buf, _M_ext_next, __remainder); 20472: 20472: delete [] _M_ext_buf; 20472: _M_ext_buf = __buf; 20472: _M_ext_buf_size = __blen; 20472: } 20472: else if (__remainder) 20472: __builtin_memmove(_M_ext_buf, _M_ext_next, __remainder); 20472: 20472: _M_ext_next = _M_ext_buf; 20472: _M_ext_end = _M_ext_buf + __remainder; 20472: _M_state_last = _M_state_cur; 20472: 20472: do 20472: { 20472: if (__rlen > 0) 20472: { 20472: 20472: 20472: 20472: if (_M_ext_end - _M_ext_buf + __rlen > _M_ext_buf_size) 20472: { 20472: __throw_ios_failure(("basic_filebuf::underflow " "codecvt::max_length() " "is not valid") 20472: 20472: ); 20472: } 20472: streamsize __elen = _M_file.xsgetn(_M_ext_end, __rlen); 20472: if (__elen == 0) 20472: __got_eof = true; 20472: else if (__elen == -1) 20472: break; 20472: _M_ext_end += __elen; 20472: } 20472: 20472: char_type* __iend = this->eback(); 20472: if (_M_ext_next < _M_ext_end) 20472: __r = _M_codecvt->in(_M_state_cur, _M_ext_next, 20472: _M_ext_end, _M_ext_next, 20472: this->eback(), 20472: this->eback() + __buflen, __iend); 20472: if (__r == codecvt_base::noconv) 20472: { 20472: size_t __avail = _M_ext_end - _M_ext_buf; 20472: __ilen = std::min(__avail, __buflen); 20472: traits_type::copy(this->eback(), 20472: reinterpret_cast 20472: (_M_ext_buf), __ilen); 20472: _M_ext_next = _M_ext_buf + __ilen; 20472: } 20472: else 20472: __ilen = __iend - this->eback(); 20472: 20472: 20472: 20472: 20472: if (__r == codecvt_base::error) 20472: break; 20472: 20472: __rlen = 1; 20472: } 20472: while (__ilen == 0 && !__got_eof); 20472: } 20472: 20472: if (__ilen > 0) 20472: { 20472: _M_set_buffer(__ilen); 20472: _M_reading = true; 20472: __ret = traits_type::to_int_type(*this->gptr()); 20472: } 20472: else if (__got_eof) 20472: { 20472: 20472: 20472: 20472: _M_set_buffer(-1); 20472: _M_reading = false; 20472: 20472: 20472: if (__r == codecvt_base::partial) 20472: __throw_ios_failure(("basic_filebuf::underflow " "incomplete character in file") 20472: ); 20472: } 20472: else if (__r == codecvt_base::error) 20472: __throw_ios_failure(("basic_filebuf::underflow " "invalid byte sequence in file") 20472: ); 20472: else 20472: __throw_ios_failure(("basic_filebuf::underflow " "error reading the file") 20472: , (*__errno_location ())); 20472: } 20472: return __ret; 20472: } 20472: 20472: template 20472: typename basic_filebuf<_CharT, _Traits>::int_type 20472: basic_filebuf<_CharT, _Traits>:: 20472: pbackfail(int_type __i) 20472: { 20472: int_type __ret = traits_type::eof(); 20472: const bool __testin = _M_mode & ios_base::in; 20472: if (__testin) 20472: { 20472: if (_M_writing) 20472: { 20472: if (overflow() == traits_type::eof()) 20472: return __ret; 20472: _M_set_buffer(-1); 20472: _M_writing = false; 20472: } 20472: 20472: 20472: const bool __testpb = _M_pback_init; 20472: const bool __testeof = traits_type::eq_int_type(__i, __ret); 20472: int_type __tmp; 20472: if (this->eback() < this->gptr()) 20472: { 20472: this->gbump(-1); 20472: __tmp = traits_type::to_int_type(*this->gptr()); 20472: } 20472: else if (this->seekoff(-1, ios_base::cur) != pos_type(off_type(-1))) 20472: { 20472: __tmp = this->underflow(); 20472: if (traits_type::eq_int_type(__tmp, __ret)) 20472: return __ret; 20472: } 20472: else 20472: { 20472: 20472: 20472: 20472: 20472: 20472: return __ret; 20472: } 20472: 20472: 20472: 20472: if (!__testeof && traits_type::eq_int_type(__i, __tmp)) 20472: __ret = __i; 20472: else if (__testeof) 20472: __ret = traits_type::not_eof(__i); 20472: else if (!__testpb) 20472: { 20472: _M_create_pback(); 20472: _M_reading = true; 20472: *this->gptr() = traits_type::to_char_type(__i); 20472: __ret = __i; 20472: } 20472: } 20472: return __ret; 20472: } 20472: 20472: template 20472: typename basic_filebuf<_CharT, _Traits>::int_type 20472: basic_filebuf<_CharT, _Traits>:: 20472: overflow(int_type __c) 20472: { 20472: int_type __ret = traits_type::eof(); 20472: const bool __testeof = traits_type::eq_int_type(__c, __ret); 20472: const bool __testout = (_M_mode & ios_base::out 20472: || _M_mode & ios_base::app); 20472: if (__testout) 20472: { 20472: if (_M_reading) 20472: { 20472: _M_destroy_pback(); 20472: const int __gptr_off = _M_get_ext_pos(_M_state_last); 20472: if (_M_seek(__gptr_off, ios_base::cur, _M_state_last) 20472: == pos_type(off_type(-1))) 20472: return __ret; 20472: } 20472: if (this->pbase() < this->pptr()) 20472: { 20472: 20472: if (!__testeof) 20472: { 20472: *this->pptr() = traits_type::to_char_type(__c); 20472: this->pbump(1); 20472: } 20472: 20472: 20472: 20472: if (_M_convert_to_external(this->pbase(), 20472: this->pptr() - this->pbase())) 20472: { 20472: _M_set_buffer(0); 20472: __ret = traits_type::not_eof(__c); 20472: } 20472: } 20472: else if (_M_buf_size > 1) 20472: { 20472: 20472: 20472: 20472: _M_set_buffer(0); 20472: _M_writing = true; 20472: if (!__testeof) 20472: { 20472: *this->pptr() = traits_type::to_char_type(__c); 20472: this->pbump(1); 20472: } 20472: __ret = traits_type::not_eof(__c); 20472: } 20472: else 20472: { 20472: 20472: char_type __conv = traits_type::to_char_type(__c); 20472: if (__testeof || _M_convert_to_external(&__conv, 1)) 20472: { 20472: _M_writing = true; 20472: __ret = traits_type::not_eof(__c); 20472: } 20472: } 20472: } 20472: return __ret; 20472: } 20472: 20472: template 20472: bool 20472: basic_filebuf<_CharT, _Traits>:: 20472: _M_convert_to_external(_CharT* __ibuf, streamsize __ilen) 20472: { 20472: 20472: streamsize __elen; 20472: streamsize __plen; 20472: if (__check_facet(_M_codecvt).always_noconv()) 20472: { 20472: __elen = _M_file.xsputn(reinterpret_cast(__ibuf), __ilen); 20472: __plen = __ilen; 20472: } 20472: else 20472: { 20472: 20472: 20472: streamsize __blen = __ilen * _M_codecvt->max_length(); 20472: char* __buf = static_cast(__builtin_alloca(__blen)); 20472: 20472: char* __bend; 20472: const char_type* __iend; 20472: codecvt_base::result __r; 20472: __r = _M_codecvt->out(_M_state_cur, __ibuf, __ibuf + __ilen, 20472: __iend, __buf, __buf + __blen, __bend); 20472: 20472: if (__r == codecvt_base::ok || __r == codecvt_base::partial) 20472: __blen = __bend - __buf; 20472: else if (__r == codecvt_base::noconv) 20472: { 20472: 20472: __buf = reinterpret_cast(__ibuf); 20472: __blen = __ilen; 20472: } 20472: else 20472: __throw_ios_failure(("basic_filebuf::_M_convert_to_external " "conversion error") 20472: ); 20472: 20472: __elen = _M_file.xsputn(__buf, __blen); 20472: __plen = __blen; 20472: 20472: 20472: if (__r == codecvt_base::partial && __elen == __plen) 20472: { 20472: const char_type* __iresume = __iend; 20472: streamsize __rlen = this->pptr() - __iend; 20472: __r = _M_codecvt->out(_M_state_cur, __iresume, 20472: __iresume + __rlen, __iend, __buf, 20472: __buf + __blen, __bend); 20472: if (__r != codecvt_base::error) 20472: { 20472: __rlen = __bend - __buf; 20472: __elen = _M_file.xsputn(__buf, __rlen); 20472: __plen = __rlen; 20472: } 20472: else 20472: __throw_ios_failure(("basic_filebuf::_M_convert_to_external " "conversion error") 20472: ); 20472: } 20472: } 20472: return __elen == __plen; 20472: } 20472: 20472: template 20472: streamsize 20472: basic_filebuf<_CharT, _Traits>:: 20472: xsgetn(_CharT* __s, streamsize __n) 20472: { 20472: 20472: streamsize __ret = 0; 20472: if (_M_pback_init) 20472: { 20472: if (__n > 0 && this->gptr() == this->eback()) 20472: { 20472: *__s++ = *this->gptr(); 20472: this->gbump(1); 20472: __ret = 1; 20472: --__n; 20472: } 20472: _M_destroy_pback(); 20472: } 20472: else if (_M_writing) 20472: { 20472: if (overflow() == traits_type::eof()) 20472: return __ret; 20472: _M_set_buffer(-1); 20472: _M_writing = false; 20472: } 20472: 20472: 20472: 20472: 20472: const bool __testin = _M_mode & ios_base::in; 20472: const streamsize __buflen = _M_buf_size > 1 ? _M_buf_size - 1 : 1; 20472: 20472: if (__n > __buflen && __check_facet(_M_codecvt).always_noconv() 20472: && __testin) 20472: { 20472: 20472: const streamsize __avail = this->egptr() - this->gptr(); 20472: if (__avail != 0) 20472: { 20472: traits_type::copy(__s, this->gptr(), __avail); 20472: __s += __avail; 20472: this->setg(this->eback(), this->gptr() + __avail, this->egptr()); 20472: __ret += __avail; 20472: __n -= __avail; 20472: } 20472: 20472: 20472: 20472: streamsize __len; 20472: for (;;) 20472: { 20472: __len = _M_file.xsgetn(reinterpret_cast(__s), __n); 20472: if (__len == -1) 20472: __throw_ios_failure(("basic_filebuf::xsgetn " "error reading the file") 20472: , (*__errno_location ())); 20472: if (__len == 0) 20472: break; 20472: 20472: __n -= __len; 20472: __ret += __len; 20472: if (__n == 0) 20472: break; 20472: 20472: __s += __len; 20472: } 20472: 20472: if (__n == 0) 20472: { 20472: 20472: _M_reading = true; 20472: } 20472: else if (__len == 0) 20472: { 20472: 20472: 20472: 20472: _M_set_buffer(-1); 20472: _M_reading = false; 20472: } 20472: } 20472: else 20472: __ret += __streambuf_type::xsgetn(__s, __n); 20472: 20472: return __ret; 20472: } 20472: 20472: template 20472: streamsize 20472: basic_filebuf<_CharT, _Traits>:: 20472: xsputn(const _CharT* __s, streamsize __n) 20472: { 20472: streamsize __ret = 0; 20472: 20472: 20472: 20472: const bool __testout = (_M_mode & ios_base::out 20472: || _M_mode & ios_base::app); 20472: if (__check_facet(_M_codecvt).always_noconv() 20472: && __testout && !_M_reading) 20472: { 20472: 20472: const streamsize __chunk = 1ul << 10; 20472: streamsize __bufavail = this->epptr() - this->pptr(); 20472: 20472: 20472: if (!_M_writing && _M_buf_size > 1) 20472: __bufavail = _M_buf_size - 1; 20472: 20472: const streamsize __limit = std::min(__chunk, __bufavail); 20472: if (__n >= __limit) 20472: { 20472: const streamsize __buffill = this->pptr() - this->pbase(); 20472: const char* __buf = reinterpret_cast(this->pbase()); 20472: __ret = _M_file.xsputn_2(__buf, __buffill, 20472: reinterpret_cast(__s), 20472: __n); 20472: if (__ret == __buffill + __n) 20472: { 20472: _M_set_buffer(0); 20472: _M_writing = true; 20472: } 20472: if (__ret > __buffill) 20472: __ret -= __buffill; 20472: else 20472: __ret = 0; 20472: } 20472: else 20472: __ret = __streambuf_type::xsputn(__s, __n); 20472: } 20472: else 20472: __ret = __streambuf_type::xsputn(__s, __n); 20472: return __ret; 20472: } 20472: 20472: template 20472: typename basic_filebuf<_CharT, _Traits>::__streambuf_type* 20472: basic_filebuf<_CharT, _Traits>:: 20472: setbuf(char_type* __s, streamsize __n) 20472: { 20472: if (!this->is_open()) 20472: { 20472: if (__s == 0 && __n == 0) 20472: _M_buf_size = 1; 20472: else if (__s && __n > 0) 20472: { 20472: # 820 "/usr/include/c++/10/bits/fstream.tcc" 3 20472: _M_buf = __s; 20472: _M_buf_size = __n; 20472: } 20472: } 20472: return this; 20472: } 20472: 20472: 20472: 20472: 20472: template 20472: typename basic_filebuf<_CharT, _Traits>::pos_type 20472: basic_filebuf<_CharT, _Traits>:: 20472: seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode) 20472: { 20472: int __width = 0; 20472: if (_M_codecvt) 20472: __width = _M_codecvt->encoding(); 20472: if (__width < 0) 20472: __width = 0; 20472: 20472: pos_type __ret = pos_type(off_type(-1)); 20472: const bool __testfail = __off != 0 && __width <= 0; 20472: if (this->is_open() && !__testfail) 20472: { 20472: 20472: 20472: 20472: 20472: bool __no_movement = __way == ios_base::cur && __off == 0 20472: && (!_M_writing || _M_codecvt->always_noconv()); 20472: 20472: 20472: if (!__no_movement) 20472: _M_destroy_pback(); 20472: 20472: 20472: 20472: 20472: 20472: 20472: __state_type __state = _M_state_beg; 20472: off_type __computed_off = __off * __width; 20472: if (_M_reading && __way == ios_base::cur) 20472: { 20472: __state = _M_state_last; 20472: __computed_off += _M_get_ext_pos(__state); 20472: } 20472: if (!__no_movement) 20472: __ret = _M_seek(__computed_off, __way, __state); 20472: else 20472: { 20472: if (_M_writing) 20472: __computed_off = this->pptr() - this->pbase(); 20472: 20472: off_type __file_off = _M_file.seekoff(0, ios_base::cur); 20472: if (__file_off != off_type(-1)) 20472: { 20472: __ret = __file_off + __computed_off; 20472: __ret.state(__state); 20472: } 20472: } 20472: } 20472: return __ret; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: template 20472: typename basic_filebuf<_CharT, _Traits>::pos_type 20472: basic_filebuf<_CharT, _Traits>:: 20472: seekpos(pos_type __pos, ios_base::openmode) 20472: { 20472: pos_type __ret = pos_type(off_type(-1)); 20472: if (this->is_open()) 20472: { 20472: 20472: _M_destroy_pback(); 20472: __ret = _M_seek(off_type(__pos), ios_base::beg, __pos.state()); 20472: } 20472: return __ret; 20472: } 20472: 20472: template 20472: typename basic_filebuf<_CharT, _Traits>::pos_type 20472: basic_filebuf<_CharT, _Traits>:: 20472: _M_seek(off_type __off, ios_base::seekdir __way, __state_type __state) 20472: { 20472: pos_type __ret = pos_type(off_type(-1)); 20472: if (_M_terminate_output()) 20472: { 20472: off_type __file_off = _M_file.seekoff(__off, __way); 20472: if (__file_off != off_type(-1)) 20472: { 20472: _M_reading = false; 20472: _M_writing = false; 20472: _M_ext_next = _M_ext_end = _M_ext_buf; 20472: _M_set_buffer(-1); 20472: _M_state_cur = __state; 20472: __ret = __file_off; 20472: __ret.state(_M_state_cur); 20472: } 20472: } 20472: return __ret; 20472: } 20472: 20472: 20472: 20472: 20472: template 20472: int basic_filebuf<_CharT, _Traits>:: 20472: _M_get_ext_pos(__state_type& __state) 20472: { 20472: if (_M_codecvt->always_noconv()) 20472: return this->gptr() - this->egptr(); 20472: else 20472: { 20472: 20472: 20472: 20472: const int __gptr_off = 20472: _M_codecvt->length(__state, _M_ext_buf, _M_ext_next, 20472: this->gptr() - this->eback()); 20472: return _M_ext_buf + __gptr_off - _M_ext_end; 20472: } 20472: } 20472: 20472: template 20472: bool 20472: basic_filebuf<_CharT, _Traits>:: 20472: _M_terminate_output() 20472: { 20472: 20472: bool __testvalid = true; 20472: if (this->pbase() < this->pptr()) 20472: { 20472: const int_type __tmp = this->overflow(); 20472: if (traits_type::eq_int_type(__tmp, traits_type::eof())) 20472: __testvalid = false; 20472: } 20472: 20472: 20472: if (_M_writing && !__check_facet(_M_codecvt).always_noconv() 20472: && __testvalid) 20472: { 20472: 20472: 20472: 20472: const size_t __blen = 128; 20472: char __buf[__blen]; 20472: codecvt_base::result __r; 20472: streamsize __ilen = 0; 20472: 20472: do 20472: { 20472: char* __next; 20472: __r = _M_codecvt->unshift(_M_state_cur, __buf, 20472: __buf + __blen, __next); 20472: if (__r == codecvt_base::error) 20472: __testvalid = false; 20472: else if (__r == codecvt_base::ok || 20472: __r == codecvt_base::partial) 20472: { 20472: __ilen = __next - __buf; 20472: if (__ilen > 0) 20472: { 20472: const streamsize __elen = _M_file.xsputn(__buf, __ilen); 20472: if (__elen != __ilen) 20472: __testvalid = false; 20472: } 20472: } 20472: } 20472: while (__r == codecvt_base::partial && __ilen > 0 && __testvalid); 20472: 20472: if (__testvalid) 20472: { 20472: 20472: 20472: 20472: 20472: const int_type __tmp = this->overflow(); 20472: if (traits_type::eq_int_type(__tmp, traits_type::eof())) 20472: __testvalid = false; 20472: } 20472: } 20472: return __testvalid; 20472: } 20472: 20472: template 20472: int 20472: basic_filebuf<_CharT, _Traits>:: 20472: sync() 20472: { 20472: 20472: 20472: int __ret = 0; 20472: if (this->pbase() < this->pptr()) 20472: { 20472: const int_type __tmp = this->overflow(); 20472: if (traits_type::eq_int_type(__tmp, traits_type::eof())) 20472: __ret = -1; 20472: } 20472: return __ret; 20472: } 20472: 20472: template 20472: void 20472: basic_filebuf<_CharT, _Traits>:: 20472: imbue(const locale& __loc) 20472: { 20472: bool __testvalid = true; 20472: 20472: const __codecvt_type* _M_codecvt_tmp = 0; 20472: if (__builtin_expect(has_facet<__codecvt_type>(__loc), true)) 20472: _M_codecvt_tmp = &use_facet<__codecvt_type>(__loc); 20472: 20472: if (this->is_open()) 20472: { 20472: 20472: if ((_M_reading || _M_writing) 20472: && __check_facet(_M_codecvt).encoding() == -1) 20472: __testvalid = false; 20472: else 20472: { 20472: if (_M_reading) 20472: { 20472: if (__check_facet(_M_codecvt).always_noconv()) 20472: { 20472: if (_M_codecvt_tmp 20472: && !__check_facet(_M_codecvt_tmp).always_noconv()) 20472: __testvalid = this->seekoff(0, ios_base::cur, _M_mode) 20472: != pos_type(off_type(-1)); 20472: } 20472: else 20472: { 20472: 20472: _M_ext_next = _M_ext_buf 20472: + _M_codecvt->length(_M_state_last, _M_ext_buf, 20472: _M_ext_next, 20472: this->gptr() - this->eback()); 20472: const streamsize __remainder = _M_ext_end - _M_ext_next; 20472: if (__remainder) 20472: __builtin_memmove(_M_ext_buf, _M_ext_next, __remainder); 20472: 20472: _M_ext_next = _M_ext_buf; 20472: _M_ext_end = _M_ext_buf + __remainder; 20472: _M_set_buffer(-1); 20472: _M_state_last = _M_state_cur = _M_state_beg; 20472: } 20472: } 20472: else if (_M_writing && (__testvalid = _M_terminate_output())) 20472: _M_set_buffer(-1); 20472: } 20472: } 20472: 20472: if (__testvalid) 20472: _M_codecvt = _M_codecvt_tmp; 20472: else 20472: _M_codecvt = 0; 20472: } 20472: 20472: 20472: 20472: 20472: extern template class basic_filebuf; 20472: extern template class basic_ifstream; 20472: extern template class basic_ofstream; 20472: extern template class basic_fstream; 20472: 20472: 20472: extern template class basic_filebuf; 20472: extern template class basic_ifstream; 20472: extern template class basic_ofstream; 20472: extern template class basic_fstream; 20472: 20472: 20472: 20472: 20472: } 20472: # 1294 "/usr/include/c++/10/fstream" 2 3 20472: # 10 "./trace_replay/block_cache_tracer.h" 2 20472: 20472: 20472: 20472: 20472: # 1 "./include/rocksdb/trace_reader_writer.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 10 "./include/rocksdb/trace_reader_writer.h" 20472: namespace rocksdb { 20472: # 20 "./include/rocksdb/trace_reader_writer.h" 20472: class TraceWriter { 20472: public: 20472: TraceWriter() {} 20472: virtual ~TraceWriter() {} 20472: 20472: virtual Status Write(const Slice& data) = 0; 20472: virtual Status Close() = 0; 20472: virtual uint64_t GetFileSize() = 0; 20472: }; 20472: 20472: 20472: 20472: class TraceReader { 20472: public: 20472: TraceReader() {} 20472: virtual ~TraceReader() {} 20472: 20472: virtual Status Read(std::string* data) = 0; 20472: virtual Status Close() = 0; 20472: }; 20472: 20472: 20472: Status NewFileTraceWriter(Env* env, const EnvOptions& env_options, 20472: const std::string& trace_filename, 20472: std::unique_ptr* trace_writer); 20472: Status NewFileTraceReader(Env* env, const EnvOptions& env_options, 20472: const std::string& trace_filename, 20472: std::unique_ptr* trace_reader); 20472: } 20472: # 15 "./trace_replay/block_cache_tracer.h" 2 20472: 20472: # 1 "./trace_replay/trace_replay.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 16 "./trace_replay/trace_replay.h" 20472: namespace rocksdb { 20472: 20472: 20472: 20472: 20472: class ColumnFamilyHandle; 20472: class ColumnFamilyData; 20472: class DB; 20472: class DBImpl; 20472: class Slice; 20472: class WriteBatch; 20472: 20472: extern const std::string kTraceMagic; 20472: const unsigned int kTraceTimestampSize = 8; 20472: const unsigned int kTraceTypeSize = 1; 20472: const unsigned int kTracePayloadLengthSize = 4; 20472: const unsigned int kTraceMetadataSize = 20472: kTraceTimestampSize + kTraceTypeSize + kTracePayloadLengthSize; 20472: 20472: 20472: enum TraceType : char { 20472: kTraceBegin = 1, 20472: kTraceEnd = 2, 20472: kTraceWrite = 3, 20472: kTraceGet = 4, 20472: kTraceIteratorSeek = 5, 20472: kTraceIteratorSeekForPrev = 6, 20472: 20472: kBlockTraceIndexBlock = 7, 20472: kBlockTraceFilterBlock = 8, 20472: kBlockTraceDataBlock = 9, 20472: kBlockTraceUncompressionDictBlock = 10, 20472: kBlockTraceRangeDeletionBlock = 11, 20472: 20472: kTraceMax, 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: struct Trace { 20472: uint64_t ts; 20472: TraceType type; 20472: std::string payload; 20472: 20472: void reset() { 20472: ts = 0; 20472: type = kTraceMax; 20472: payload.clear(); 20472: } 20472: }; 20472: 20472: class TracerHelper { 20472: public: 20472: 20472: static void EncodeTrace(const Trace& trace, std::string* encoded_trace); 20472: 20472: 20472: static Status DecodeTrace(const std::string& encoded_trace, Trace* trace); 20472: }; 20472: 20472: 20472: 20472: 20472: class Tracer { 20472: public: 20472: Tracer(Env* env, const TraceOptions& trace_options, 20472: std::unique_ptr&& trace_writer); 20472: ~Tracer(); 20472: 20472: 20472: Status Write(WriteBatch* write_batch); 20472: 20472: 20472: Status Get(ColumnFamilyHandle* cfname, const Slice& key); 20472: 20472: 20472: Status IteratorSeek(const uint32_t& cf_id, const Slice& key); 20472: Status IteratorSeekForPrev(const uint32_t& cf_id, const Slice& key); 20472: 20472: 20472: 20472: bool IsTraceFileOverMax(); 20472: 20472: 20472: Status Close(); 20472: 20472: private: 20472: 20472: 20472: 20472: Status WriteHeader(); 20472: 20472: 20472: Status WriteFooter(); 20472: 20472: 20472: 20472: Status WriteTrace(const Trace& trace); 20472: 20472: 20472: 20472: bool ShouldSkipTrace(const TraceType& type); 20472: 20472: Env* env_; 20472: TraceOptions trace_options_; 20472: std::unique_ptr trace_writer_; 20472: uint64_t trace_request_count_; 20472: }; 20472: 20472: 20472: 20472: 20472: class Replayer { 20472: public: 20472: Replayer(DB* db, const std::vector& handles, 20472: std::unique_ptr&& reader); 20472: ~Replayer(); 20472: 20472: 20472: 20472: Status Replay(); 20472: 20472: 20472: 20472: 20472: Status MultiThreadReplay(uint32_t threads_num); 20472: 20472: 20472: 20472: 20472: 20472: 20472: Status SetFastForward(uint32_t fast_forward); 20472: 20472: private: 20472: Status ReadHeader(Trace* header); 20472: Status ReadFooter(Trace* footer); 20472: Status ReadTrace(Trace* trace); 20472: 20472: 20472: 20472: static void BGWorkGet(void* arg); 20472: 20472: 20472: 20472: static void BGWorkWriteBatch(void* arg); 20472: 20472: 20472: 20472: static void BGWorkIterSeek(void* arg); 20472: 20472: 20472: 20472: static void BGWorkIterSeekForPrev(void* arg); 20472: 20472: DBImpl* db_; 20472: Env* env_; 20472: std::unique_ptr trace_reader_; 20472: std::unordered_map cf_map_; 20472: uint32_t fast_forward_; 20472: }; 20472: 20472: 20472: struct ReplayerWorkerArg { 20472: DB* db; 20472: Trace trace_entry; 20472: std::unordered_map* cf_map; 20472: WriteOptions woptions; 20472: ReadOptions roptions; 20472: }; 20472: 20472: } 20472: # 17 "./trace_replay/block_cache_tracer.h" 2 20472: 20472: namespace rocksdb { 20472: 20472: extern const uint64_t kMicrosInSecond; 20472: extern const uint64_t kSecondInMinute; 20472: extern const uint64_t kSecondInHour; 20472: 20472: struct BlockCacheTraceRecord; 20472: 20472: class BlockCacheTraceHelper { 20472: public: 20472: static bool IsGetOrMultiGetOnDataBlock(TraceType block_type, 20472: TableReaderCaller caller); 20472: static bool IsGetOrMultiGet(TableReaderCaller caller); 20472: static bool IsUserAccess(TableReaderCaller caller); 20472: 20472: 20472: static std::string ComputeRowKey(const BlockCacheTraceRecord& access); 20472: 20472: 20472: static uint64_t GetTableId(const BlockCacheTraceRecord& access); 20472: 20472: 20472: static uint64_t GetSequenceNumber(const BlockCacheTraceRecord& access); 20472: 20472: static uint64_t GetBlockOffsetInFile(const BlockCacheTraceRecord& access); 20472: 20472: static const std::string kUnknownColumnFamilyName; 20472: static const uint64_t kReservedGetId; 20472: }; 20472: # 67 "./trace_replay/block_cache_tracer.h" 20472: struct BlockCacheLookupContext { 20472: BlockCacheLookupContext(const TableReaderCaller& _caller) : caller(_caller) {} 20472: BlockCacheLookupContext(const TableReaderCaller& _caller, uint64_t _get_id, 20472: bool _get_from_user_specified_snapshot) 20472: : caller(_caller), 20472: get_id(_get_id), 20472: get_from_user_specified_snapshot(_get_from_user_specified_snapshot) {} 20472: const TableReaderCaller caller; 20472: 20472: 20472: 20472: bool is_cache_hit = false; 20472: bool no_insert = false; 20472: TraceType block_type = TraceType::kTraceMax; 20472: uint64_t block_size = 0; 20472: std::string block_key; 20472: uint64_t num_keys_in_block = 0; 20472: 20472: 20472: 20472: uint64_t get_id = 0; 20472: std::string referenced_key; 20472: bool get_from_user_specified_snapshot = false; 20472: 20472: void FillLookupContext(bool _is_cache_hit, bool _no_insert, 20472: TraceType _block_type, uint64_t _block_size, 20472: const std::string& _block_key, 20472: uint64_t _num_keys_in_block) { 20472: is_cache_hit = _is_cache_hit; 20472: no_insert = _no_insert; 20472: block_type = _block_type; 20472: block_size = _block_size; 20472: block_key = _block_key; 20472: num_keys_in_block = _num_keys_in_block; 20472: } 20472: }; 20472: 20472: enum Boolean : char { kTrue = 1, kFalse = 0 }; 20472: 20472: struct BlockCacheTraceRecord { 20472: 20472: uint64_t access_timestamp = 0; 20472: std::string block_key; 20472: TraceType block_type = TraceType::kTraceMax; 20472: uint64_t block_size = 0; 20472: uint64_t cf_id = 0; 20472: std::string cf_name; 20472: uint32_t level = 0; 20472: uint64_t sst_fd_number = 0; 20472: TableReaderCaller caller = TableReaderCaller::kMaxBlockCacheLookupCaller; 20472: Boolean is_cache_hit = Boolean::kFalse; 20472: Boolean no_insert = Boolean::kFalse; 20472: 20472: uint64_t get_id = BlockCacheTraceHelper::kReservedGetId; 20472: Boolean get_from_user_specified_snapshot = Boolean::kFalse; 20472: std::string referenced_key; 20472: 20472: uint64_t referenced_data_size = 0; 20472: uint64_t num_keys_in_block = 0; 20472: Boolean referenced_key_exist_in_block = Boolean::kFalse; 20472: 20472: BlockCacheTraceRecord() {} 20472: 20472: BlockCacheTraceRecord( 20472: uint64_t _access_timestamp, std::string _block_key, TraceType _block_type, 20472: uint64_t _block_size, uint64_t _cf_id, std::string _cf_name, 20472: uint32_t _level, uint64_t _sst_fd_number, TableReaderCaller _caller, 20472: bool _is_cache_hit, bool _no_insert, 20472: uint64_t _get_id = BlockCacheTraceHelper::kReservedGetId, 20472: bool _get_from_user_specified_snapshot = false, 20472: std::string _referenced_key = "", uint64_t _referenced_data_size = 0, 20472: uint64_t _num_keys_in_block = 0, 20472: bool _referenced_key_exist_in_block = false) 20472: : access_timestamp(_access_timestamp), 20472: block_key(_block_key), 20472: block_type(_block_type), 20472: block_size(_block_size), 20472: cf_id(_cf_id), 20472: cf_name(_cf_name), 20472: level(_level), 20472: sst_fd_number(_sst_fd_number), 20472: caller(_caller), 20472: is_cache_hit(_is_cache_hit ? Boolean::kTrue : Boolean::kFalse), 20472: no_insert(_no_insert ? Boolean::kTrue : Boolean::kFalse), 20472: get_id(_get_id), 20472: get_from_user_specified_snapshot(_get_from_user_specified_snapshot 20472: ? Boolean::kTrue 20472: : Boolean::kFalse), 20472: referenced_key(_referenced_key), 20472: referenced_data_size(_referenced_data_size), 20472: num_keys_in_block(_num_keys_in_block), 20472: referenced_key_exist_in_block( 20472: _referenced_key_exist_in_block ? Boolean::kTrue : Boolean::kFalse) { 20472: } 20472: }; 20472: 20472: struct BlockCacheTraceHeader { 20472: uint64_t start_time; 20472: uint32_t rocksdb_major_version; 20472: uint32_t rocksdb_minor_version; 20472: }; 20472: 20472: 20472: 20472: 20472: 20472: class BlockCacheTraceWriter { 20472: public: 20472: BlockCacheTraceWriter(Env* env, const TraceOptions& trace_options, 20472: std::unique_ptr&& trace_writer); 20472: ~BlockCacheTraceWriter() = default; 20472: 20472: BlockCacheTraceWriter(const BlockCacheTraceWriter&) = delete; 20472: BlockCacheTraceWriter& operator=(const BlockCacheTraceWriter&) = delete; 20472: BlockCacheTraceWriter(BlockCacheTraceWriter&&) = delete; 20472: BlockCacheTraceWriter& operator=(BlockCacheTraceWriter&&) = delete; 20472: 20472: 20472: Status WriteBlockAccess(const BlockCacheTraceRecord& record, 20472: const Slice& block_key, const Slice& cf_name, 20472: const Slice& referenced_key); 20472: 20472: 20472: 20472: Status WriteHeader(); 20472: 20472: private: 20472: Env* env_; 20472: TraceOptions trace_options_; 20472: std::unique_ptr trace_writer_; 20472: }; 20472: 20472: 20472: 20472: 20472: class BlockCacheHumanReadableTraceWriter { 20472: public: 20472: ~BlockCacheHumanReadableTraceWriter(); 20472: 20472: Status NewWritableFile(const std::string& human_readable_trace_file_path, 20472: rocksdb::Env* env); 20472: 20472: Status WriteHumanReadableTraceRecord(const BlockCacheTraceRecord& access, 20472: uint64_t block_id, uint64_t get_key_id); 20472: 20472: private: 20472: char trace_record_buffer_[1024 * 1024]; 20472: std::unique_ptr 20472: human_readable_trace_file_writer_; 20472: }; 20472: 20472: 20472: 20472: class BlockCacheTraceReader { 20472: public: 20472: BlockCacheTraceReader(std::unique_ptr&& reader); 20472: virtual ~BlockCacheTraceReader() = default; 20472: 20472: BlockCacheTraceReader(const BlockCacheTraceReader&) = delete; 20472: BlockCacheTraceReader& operator=(const BlockCacheTraceReader&) = delete; 20472: BlockCacheTraceReader(BlockCacheTraceReader&&) = delete; 20472: BlockCacheTraceReader& operator=(BlockCacheTraceReader&&) = delete; 20472: 20472: Status ReadHeader(BlockCacheTraceHeader* header); 20472: 20472: Status ReadAccess(BlockCacheTraceRecord* record); 20472: 20472: private: 20472: std::unique_ptr trace_reader_; 20472: }; 20472: 20472: 20472: 20472: 20472: class BlockCacheHumanReadableTraceReader : public BlockCacheTraceReader { 20472: public: 20472: BlockCacheHumanReadableTraceReader(const std::string& trace_file_path); 20472: 20472: ~BlockCacheHumanReadableTraceReader(); 20472: 20472: Status ReadHeader(BlockCacheTraceHeader* header); 20472: 20472: Status ReadAccess(BlockCacheTraceRecord* record); 20472: 20472: private: 20472: std::ifstream human_readable_trace_reader_; 20472: }; 20472: 20472: 20472: 20472: 20472: class BlockCacheTracer { 20472: public: 20472: BlockCacheTracer(); 20472: ~BlockCacheTracer(); 20472: 20472: BlockCacheTracer(const BlockCacheTracer&) = delete; 20472: BlockCacheTracer& operator=(const BlockCacheTracer&) = delete; 20472: BlockCacheTracer(BlockCacheTracer&&) = delete; 20472: BlockCacheTracer& operator=(BlockCacheTracer&&) = delete; 20472: 20472: 20472: Status StartTrace(Env* env, const TraceOptions& trace_options, 20472: std::unique_ptr&& trace_writer); 20472: 20472: 20472: void EndTrace(); 20472: 20472: bool is_tracing_enabled() const { 20472: return writer_.load(std::memory_order_relaxed); 20472: } 20472: 20472: Status WriteBlockAccess(const BlockCacheTraceRecord& record, 20472: const Slice& block_key, const Slice& cf_name, 20472: const Slice& referenced_key); 20472: 20472: 20472: uint64_t NextGetId(); 20472: 20472: private: 20472: TraceOptions trace_options_; 20472: 20472: InstrumentedMutex trace_writer_mutex_; 20472: std::atomic writer_; 20472: std::atomic get_id_counter_; 20472: }; 20472: 20472: } 20472: # 23 "./table/table_builder.h" 2 20472: 20472: namespace rocksdb { 20472: 20472: class Slice; 20472: class Status; 20472: 20472: struct TableReaderOptions { 20472: 20472: TableReaderOptions(const ImmutableCFOptions& _ioptions, 20472: const SliceTransform* _prefix_extractor, 20472: const EnvOptions& _env_options, 20472: const InternalKeyComparator& _internal_comparator, 20472: bool _skip_filters = false, bool _immortal = false, 20472: bool _force_direct_prefetch = false, int _level = -1, 20472: BlockCacheTracer* const _block_cache_tracer = nullptr, 20472: size_t _max_file_size_for_l0_meta_pin = 0) 20472: : TableReaderOptions(_ioptions, _prefix_extractor, _env_options, 20472: _internal_comparator, _skip_filters, _immortal, 20472: _force_direct_prefetch, _level, 20472: 0 , _block_cache_tracer, 20472: _max_file_size_for_l0_meta_pin) {} 20472: 20472: 20472: TableReaderOptions(const ImmutableCFOptions& _ioptions, 20472: const SliceTransform* _prefix_extractor, 20472: const EnvOptions& _env_options, 20472: const InternalKeyComparator& _internal_comparator, 20472: bool _skip_filters, bool _immortal, 20472: bool _force_direct_prefetch, int _level, 20472: SequenceNumber _largest_seqno, 20472: BlockCacheTracer* const _block_cache_tracer, 20472: size_t _max_file_size_for_l0_meta_pin) 20472: : ioptions(_ioptions), 20472: prefix_extractor(_prefix_extractor), 20472: env_options(_env_options), 20472: internal_comparator(_internal_comparator), 20472: skip_filters(_skip_filters), 20472: immortal(_immortal), 20472: force_direct_prefetch(_force_direct_prefetch), 20472: level(_level), 20472: largest_seqno(_largest_seqno), 20472: block_cache_tracer(_block_cache_tracer), 20472: max_file_size_for_l0_meta_pin(_max_file_size_for_l0_meta_pin) {} 20472: 20472: const ImmutableCFOptions& ioptions; 20472: const SliceTransform* prefix_extractor; 20472: const EnvOptions& env_options; 20472: const InternalKeyComparator& internal_comparator; 20472: 20472: bool skip_filters; 20472: 20472: bool immortal; 20472: 20472: 20472: 20472: bool force_direct_prefetch; 20472: 20472: int level; 20472: 20472: SequenceNumber largest_seqno; 20472: BlockCacheTracer* const block_cache_tracer; 20472: 20472: 20472: const size_t max_file_size_for_l0_meta_pin; 20472: }; 20472: 20472: struct TableBuilderOptions { 20472: TableBuilderOptions( 20472: const ImmutableCFOptions& _ioptions, const MutableCFOptions& _moptions, 20472: const InternalKeyComparator& _internal_comparator, 20472: const std::vector>* 20472: _int_tbl_prop_collector_factories, 20472: CompressionType _compression_type, uint64_t _sample_for_compression, 20472: const CompressionOptions& _compression_opts, bool _skip_filters, 20472: const std::string& _column_family_name, int _level, 20472: const uint64_t _creation_time = 0, const int64_t _oldest_key_time = 0, 20472: const uint64_t _target_file_size = 0, 20472: const uint64_t _file_creation_time = 0) 20472: : ioptions(_ioptions), 20472: moptions(_moptions), 20472: internal_comparator(_internal_comparator), 20472: int_tbl_prop_collector_factories(_int_tbl_prop_collector_factories), 20472: compression_type(_compression_type), 20472: sample_for_compression(_sample_for_compression), 20472: compression_opts(_compression_opts), 20472: skip_filters(_skip_filters), 20472: column_family_name(_column_family_name), 20472: level(_level), 20472: creation_time(_creation_time), 20472: oldest_key_time(_oldest_key_time), 20472: target_file_size(_target_file_size), 20472: file_creation_time(_file_creation_time) {} 20472: const ImmutableCFOptions& ioptions; 20472: const MutableCFOptions& moptions; 20472: const InternalKeyComparator& internal_comparator; 20472: const std::vector>* 20472: int_tbl_prop_collector_factories; 20472: CompressionType compression_type; 20472: uint64_t sample_for_compression; 20472: const CompressionOptions& compression_opts; 20472: bool skip_filters; 20472: const std::string& column_family_name; 20472: int level; 20472: const uint64_t creation_time; 20472: const int64_t oldest_key_time; 20472: const uint64_t target_file_size; 20472: const uint64_t file_creation_time; 20472: }; 20472: # 139 "./table/table_builder.h" 20472: class TableBuilder { 20472: public: 20472: 20472: virtual ~TableBuilder() {} 20472: 20472: 20472: 20472: 20472: virtual void Add(const Slice& key, const Slice& value) = 0; 20472: 20472: 20472: virtual Status status() const = 0; 20472: 20472: 20472: virtual IOStatus io_status() const = 0; 20472: 20472: 20472: 20472: virtual Status Finish() = 0; 20472: 20472: 20472: 20472: 20472: 20472: virtual void Abandon() = 0; 20472: 20472: 20472: virtual uint64_t NumEntries() const = 0; 20472: 20472: 20472: 20472: virtual bool IsEmpty() const { 20472: return NumEntries() == 0 && GetTableProperties().num_range_deletions == 0; 20472: } 20472: 20472: 20472: 20472: virtual uint64_t FileSize() const = 0; 20472: 20472: 20472: 20472: 20472: virtual uint64_t EstimatedFileSize() const { return FileSize(); } 20472: 20472: 20472: 20472: virtual bool NeedCompact() const { return false; } 20472: 20472: 20472: virtual TableProperties GetTableProperties() const = 0; 20472: 20472: 20472: virtual std::string GetFileChecksum() const = 0; 20472: 20472: 20472: virtual const char* GetFileChecksumFuncName() const = 0; 20472: }; 20472: 20472: } 20472: # 27 "./db/range_del_aggregator.h" 2 20472: # 1 "./util/heap.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: namespace rocksdb { 20472: # 40 "./util/heap.h" 20472: template> 20472: class BinaryHeap { 20472: public: 20472: BinaryHeap() { } 20472: explicit BinaryHeap(Compare cmp) : cmp_(std::move(cmp)) { } 20472: 20472: void push(const T& value) { 20472: data_.push_back(value); 20472: upheap(data_.size() - 1); 20472: } 20472: 20472: void push(T&& value) { 20472: data_.push_back(std::move(value)); 20472: upheap(data_.size() - 1); 20472: } 20472: 20472: const T& top() const { 20472: 20472: # 57 "./util/heap.h" 3 4 20472: (static_cast ( 20472: # 57 "./util/heap.h" 20472: !empty() 20472: # 57 "./util/heap.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 57 "./util/heap.h" 20472: "!empty()" 20472: # 57 "./util/heap.h" 3 4 20472: , "./util/heap.h", 57, __extension__ __PRETTY_FUNCTION__)) 20472: # 57 "./util/heap.h" 20472: ; 20472: return data_.front(); 20472: } 20472: 20472: void replace_top(const T& value) { 20472: 20472: # 62 "./util/heap.h" 3 4 20472: (static_cast ( 20472: # 62 "./util/heap.h" 20472: !empty() 20472: # 62 "./util/heap.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 62 "./util/heap.h" 20472: "!empty()" 20472: # 62 "./util/heap.h" 3 4 20472: , "./util/heap.h", 62, __extension__ __PRETTY_FUNCTION__)) 20472: # 62 "./util/heap.h" 20472: ; 20472: data_.front() = value; 20472: downheap(get_root()); 20472: } 20472: 20472: void replace_top(T&& value) { 20472: 20472: # 68 "./util/heap.h" 3 4 20472: (static_cast ( 20472: # 68 "./util/heap.h" 20472: !empty() 20472: # 68 "./util/heap.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 68 "./util/heap.h" 20472: "!empty()" 20472: # 68 "./util/heap.h" 3 4 20472: , "./util/heap.h", 68, __extension__ __PRETTY_FUNCTION__)) 20472: # 68 "./util/heap.h" 20472: ; 20472: data_.front() = std::move(value); 20472: downheap(get_root()); 20472: } 20472: 20472: void pop() { 20472: 20472: # 74 "./util/heap.h" 3 4 20472: (static_cast ( 20472: # 74 "./util/heap.h" 20472: !empty() 20472: # 74 "./util/heap.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 74 "./util/heap.h" 20472: "!empty()" 20472: # 74 "./util/heap.h" 3 4 20472: , "./util/heap.h", 74, __extension__ __PRETTY_FUNCTION__)) 20472: # 74 "./util/heap.h" 20472: ; 20472: data_.front() = std::move(data_.back()); 20472: data_.pop_back(); 20472: if (!empty()) { 20472: downheap(get_root()); 20472: } else { 20472: reset_root_cmp_cache(); 20472: } 20472: } 20472: 20472: void swap(BinaryHeap &other) { 20472: std::swap(cmp_, other.cmp_); 20472: data_.swap(other.data_); 20472: std::swap(root_cmp_cache_, other.root_cmp_cache_); 20472: } 20472: 20472: void clear() { 20472: data_.clear(); 20472: reset_root_cmp_cache(); 20472: } 20472: 20472: bool empty() const { return data_.empty(); } 20472: 20472: size_t size() const { return data_.size(); } 20472: 20472: void reset_root_cmp_cache() { root_cmp_cache_ = port::kMaxSizet; } 20472: 20472: private: 20472: static inline size_t get_root() { return 0; } 20472: static inline size_t get_parent(size_t index) { return (index - 1) / 2; } 20472: static inline size_t get_left(size_t index) { return 2 * index + 1; } 20472: static inline size_t get_right(size_t index) { return 2 * index + 2; } 20472: 20472: void upheap(size_t index) { 20472: T v = std::move(data_[index]); 20472: while (index > get_root()) { 20472: const size_t parent = get_parent(index); 20472: if (!cmp_(data_[parent], v)) { 20472: break; 20472: } 20472: data_[index] = std::move(data_[parent]); 20472: index = parent; 20472: } 20472: data_[index] = std::move(v); 20472: reset_root_cmp_cache(); 20472: } 20472: 20472: void downheap(size_t index) { 20472: T v = std::move(data_[index]); 20472: 20472: size_t picked_child = port::kMaxSizet; 20472: while (1) { 20472: const size_t left_child = get_left(index); 20472: if (get_left(index) >= data_.size()) { 20472: break; 20472: } 20472: const size_t right_child = left_child + 1; 20472: 20472: # 131 "./util/heap.h" 3 4 20472: (static_cast ( 20472: # 131 "./util/heap.h" 20472: right_child == get_right(index) 20472: # 131 "./util/heap.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 131 "./util/heap.h" 20472: "right_child == get_right(index)" 20472: # 131 "./util/heap.h" 3 4 20472: , "./util/heap.h", 131, __extension__ __PRETTY_FUNCTION__)) 20472: # 131 "./util/heap.h" 20472: ; 20472: picked_child = left_child; 20472: if (index == 0 && root_cmp_cache_ < data_.size()) { 20472: picked_child = root_cmp_cache_; 20472: } else if (right_child < data_.size() && 20472: cmp_(data_[left_child], data_[right_child])) { 20472: picked_child = right_child; 20472: } 20472: if (!cmp_(v, data_[picked_child])) { 20472: break; 20472: } 20472: data_[index] = std::move(data_[picked_child]); 20472: index = picked_child; 20472: } 20472: 20472: if (index == 0) { 20472: 20472: 20472: 20472: 20472: root_cmp_cache_ = picked_child; 20472: } else { 20472: 20472: reset_root_cmp_cache(); 20472: } 20472: 20472: data_[index] = std::move(v); 20472: } 20472: 20472: Compare cmp_; 20472: autovector data_; 20472: 20472: size_t root_cmp_cache_ = port::kMaxSizet; 20472: }; 20472: 20472: } 20472: # 28 "./db/range_del_aggregator.h" 2 20472: # 1 "./util/kv_map.h" 1 20472: 20472: 20472: 20472: 20472: 20472: # 14 "./util/kv_map.h" 20472: namespace rocksdb { 20472: namespace stl_wrappers { 20472: 20472: struct LessOfComparator { 20472: explicit LessOfComparator(const Comparator* c = BytewiseComparator()) 20472: : cmp(c) {} 20472: 20472: bool operator()(const std::string& a, const std::string& b) const { 20472: return cmp->Compare(Slice(a), Slice(b)) < 0; 20472: } 20472: bool operator()(const Slice& a, const Slice& b) const { 20472: return cmp->Compare(a, b) < 0; 20472: } 20472: 20472: const Comparator* cmp; 20472: }; 20472: 20472: typedef std::map KVMap; 20472: } 20472: } 20472: # 29 "./db/range_del_aggregator.h" 2 20472: 20472: namespace rocksdb { 20472: 20472: class TruncatedRangeDelIterator { 20472: public: 20472: TruncatedRangeDelIterator( 20472: std::unique_ptr iter, 20472: const InternalKeyComparator* icmp, const InternalKey* smallest, 20472: const InternalKey* largest); 20472: 20472: bool Valid() const; 20472: 20472: void Next(); 20472: void Prev(); 20472: 20472: void InternalNext(); 20472: 20472: 20472: 20472: 20472: void Seek(const Slice& target); 20472: 20472: 20472: 20472: 20472: void SeekForPrev(const Slice& target); 20472: 20472: void SeekToFirst(); 20472: void SeekToLast(); 20472: 20472: ParsedInternalKey start_key() const { 20472: return (smallest_ == nullptr || 20472: icmp_->Compare(*smallest_, iter_->parsed_start_key()) <= 0) 20472: ? iter_->parsed_start_key() 20472: : *smallest_; 20472: } 20472: 20472: ParsedInternalKey end_key() const { 20472: return (largest_ == nullptr || 20472: icmp_->Compare(iter_->parsed_end_key(), *largest_) <= 0) 20472: ? iter_->parsed_end_key() 20472: : *largest_; 20472: } 20472: 20472: SequenceNumber seq() const { return iter_->seq(); } 20472: 20472: std::map> 20472: SplitBySnapshot(const std::vector& snapshots); 20472: 20472: SequenceNumber upper_bound() const { return iter_->upper_bound(); } 20472: 20472: SequenceNumber lower_bound() const { return iter_->lower_bound(); } 20472: 20472: private: 20472: std::unique_ptr iter_; 20472: const InternalKeyComparator* icmp_; 20472: const ParsedInternalKey* smallest_ = nullptr; 20472: const ParsedInternalKey* largest_ = nullptr; 20472: std::list pinned_bounds_; 20472: 20472: const InternalKey* smallest_ikey_; 20472: const InternalKey* largest_ikey_; 20472: }; 20472: 20472: struct SeqMaxComparator { 20472: bool operator()(const TruncatedRangeDelIterator* a, 20472: const TruncatedRangeDelIterator* b) const { 20472: return a->seq() > b->seq(); 20472: } 20472: }; 20472: 20472: struct StartKeyMinComparator { 20472: explicit StartKeyMinComparator(const InternalKeyComparator* c) : icmp(c) {} 20472: 20472: bool operator()(const TruncatedRangeDelIterator* a, 20472: const TruncatedRangeDelIterator* b) const { 20472: return icmp->Compare(a->start_key(), b->start_key()) > 0; 20472: } 20472: 20472: const InternalKeyComparator* icmp; 20472: }; 20472: 20472: class ForwardRangeDelIterator { 20472: public: 20472: explicit ForwardRangeDelIterator(const InternalKeyComparator* icmp); 20472: 20472: bool ShouldDelete(const ParsedInternalKey& parsed); 20472: void Invalidate(); 20472: 20472: void AddNewIter(TruncatedRangeDelIterator* iter, 20472: const ParsedInternalKey& parsed) { 20472: iter->Seek(parsed.user_key); 20472: PushIter(iter, parsed); 20472: 20472: # 122 "./db/range_del_aggregator.h" 3 4 20472: (static_cast ( 20472: # 122 "./db/range_del_aggregator.h" 20472: active_iters_.size() == active_seqnums_.size() 20472: # 122 "./db/range_del_aggregator.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 122 "./db/range_del_aggregator.h" 20472: "active_iters_.size() == active_seqnums_.size()" 20472: # 122 "./db/range_del_aggregator.h" 3 4 20472: , "./db/range_del_aggregator.h", 122, __extension__ __PRETTY_FUNCTION__)) 20472: # 122 "./db/range_del_aggregator.h" 20472: ; 20472: } 20472: 20472: size_t UnusedIdx() const { return unused_idx_; } 20472: void IncUnusedIdx() { unused_idx_++; } 20472: 20472: private: 20472: using ActiveSeqSet = 20472: std::multiset; 20472: 20472: struct EndKeyMinComparator { 20472: explicit EndKeyMinComparator(const InternalKeyComparator* c) : icmp(c) {} 20472: 20472: bool operator()(const ActiveSeqSet::const_iterator& a, 20472: const ActiveSeqSet::const_iterator& b) const { 20472: return icmp->Compare((*a)->end_key(), (*b)->end_key()) > 0; 20472: } 20472: 20472: const InternalKeyComparator* icmp; 20472: }; 20472: 20472: void PushIter(TruncatedRangeDelIterator* iter, 20472: const ParsedInternalKey& parsed) { 20472: if (!iter->Valid()) { 20472: 20472: 20472: return; 20472: } 20472: int cmp = icmp_->Compare(parsed, iter->start_key()); 20472: if (cmp < 0) { 20472: PushInactiveIter(iter); 20472: } else { 20472: PushActiveIter(iter); 20472: } 20472: } 20472: 20472: void PushActiveIter(TruncatedRangeDelIterator* iter) { 20472: auto seq_pos = active_seqnums_.insert(iter); 20472: active_iters_.push(seq_pos); 20472: } 20472: 20472: TruncatedRangeDelIterator* PopActiveIter() { 20472: auto active_top = active_iters_.top(); 20472: auto iter = *active_top; 20472: active_iters_.pop(); 20472: active_seqnums_.erase(active_top); 20472: return iter; 20472: } 20472: 20472: void PushInactiveIter(TruncatedRangeDelIterator* iter) { 20472: inactive_iters_.push(iter); 20472: } 20472: 20472: TruncatedRangeDelIterator* PopInactiveIter() { 20472: auto* iter = inactive_iters_.top(); 20472: inactive_iters_.pop(); 20472: return iter; 20472: } 20472: 20472: const InternalKeyComparator* icmp_; 20472: size_t unused_idx_; 20472: ActiveSeqSet active_seqnums_; 20472: BinaryHeap active_iters_; 20472: BinaryHeap inactive_iters_; 20472: }; 20472: 20472: class ReverseRangeDelIterator { 20472: public: 20472: explicit ReverseRangeDelIterator(const InternalKeyComparator* icmp); 20472: 20472: bool ShouldDelete(const ParsedInternalKey& parsed); 20472: void Invalidate(); 20472: 20472: void AddNewIter(TruncatedRangeDelIterator* iter, 20472: const ParsedInternalKey& parsed) { 20472: iter->SeekForPrev(parsed.user_key); 20472: PushIter(iter, parsed); 20472: 20472: # 199 "./db/range_del_aggregator.h" 3 4 20472: (static_cast ( 20472: # 199 "./db/range_del_aggregator.h" 20472: active_iters_.size() == active_seqnums_.size() 20472: # 199 "./db/range_del_aggregator.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 199 "./db/range_del_aggregator.h" 20472: "active_iters_.size() == active_seqnums_.size()" 20472: # 199 "./db/range_del_aggregator.h" 3 4 20472: , "./db/range_del_aggregator.h", 199, __extension__ __PRETTY_FUNCTION__)) 20472: # 199 "./db/range_del_aggregator.h" 20472: ; 20472: } 20472: 20472: size_t UnusedIdx() const { return unused_idx_; } 20472: void IncUnusedIdx() { unused_idx_++; } 20472: 20472: private: 20472: using ActiveSeqSet = 20472: std::multiset; 20472: 20472: struct EndKeyMaxComparator { 20472: explicit EndKeyMaxComparator(const InternalKeyComparator* c) : icmp(c) {} 20472: 20472: bool operator()(const TruncatedRangeDelIterator* a, 20472: const TruncatedRangeDelIterator* b) const { 20472: return icmp->Compare(a->end_key(), b->end_key()) < 0; 20472: } 20472: 20472: const InternalKeyComparator* icmp; 20472: }; 20472: struct StartKeyMaxComparator { 20472: explicit StartKeyMaxComparator(const InternalKeyComparator* c) : icmp(c) {} 20472: 20472: bool operator()(const ActiveSeqSet::const_iterator& a, 20472: const ActiveSeqSet::const_iterator& b) const { 20472: return icmp->Compare((*a)->start_key(), (*b)->start_key()) < 0; 20472: } 20472: 20472: const InternalKeyComparator* icmp; 20472: }; 20472: 20472: void PushIter(TruncatedRangeDelIterator* iter, 20472: const ParsedInternalKey& parsed) { 20472: if (!iter->Valid()) { 20472: 20472: 20472: } else if (icmp_->Compare(iter->end_key(), parsed) <= 0) { 20472: PushInactiveIter(iter); 20472: } else { 20472: PushActiveIter(iter); 20472: } 20472: } 20472: 20472: void PushActiveIter(TruncatedRangeDelIterator* iter) { 20472: auto seq_pos = active_seqnums_.insert(iter); 20472: active_iters_.push(seq_pos); 20472: } 20472: 20472: TruncatedRangeDelIterator* PopActiveIter() { 20472: auto active_top = active_iters_.top(); 20472: auto iter = *active_top; 20472: active_iters_.pop(); 20472: active_seqnums_.erase(active_top); 20472: return iter; 20472: } 20472: 20472: void PushInactiveIter(TruncatedRangeDelIterator* iter) { 20472: inactive_iters_.push(iter); 20472: } 20472: 20472: TruncatedRangeDelIterator* PopInactiveIter() { 20472: auto* iter = inactive_iters_.top(); 20472: inactive_iters_.pop(); 20472: return iter; 20472: } 20472: 20472: const InternalKeyComparator* icmp_; 20472: size_t unused_idx_; 20472: ActiveSeqSet active_seqnums_; 20472: BinaryHeap active_iters_; 20472: BinaryHeap inactive_iters_; 20472: }; 20472: 20472: enum class RangeDelPositioningMode { kForwardTraversal, kBackwardTraversal }; 20472: class RangeDelAggregator { 20472: public: 20472: explicit RangeDelAggregator(const InternalKeyComparator* icmp) 20472: : icmp_(icmp) {} 20472: virtual ~RangeDelAggregator() {} 20472: 20472: virtual void AddTombstones( 20472: std::unique_ptr input_iter, 20472: const InternalKey* smallest = nullptr, 20472: const InternalKey* largest = nullptr) = 0; 20472: 20472: bool ShouldDelete(const Slice& key, RangeDelPositioningMode mode) { 20472: ParsedInternalKey parsed; 20472: if (!ParseInternalKey(key, &parsed)) { 20472: return false; 20472: } 20472: return ShouldDelete(parsed, mode); 20472: } 20472: virtual bool ShouldDelete(const ParsedInternalKey& parsed, 20472: RangeDelPositioningMode mode) = 0; 20472: 20472: virtual void InvalidateRangeDelMapPositions() = 0; 20472: 20472: virtual bool IsEmpty() const = 0; 20472: 20472: bool AddFile(uint64_t file_number) { 20472: return files_seen_.insert(file_number).second; 20472: } 20472: 20472: protected: 20472: class StripeRep { 20472: public: 20472: StripeRep(const InternalKeyComparator* icmp, SequenceNumber upper_bound, 20472: SequenceNumber lower_bound) 20472: : icmp_(icmp), 20472: forward_iter_(icmp), 20472: reverse_iter_(icmp), 20472: upper_bound_(upper_bound), 20472: lower_bound_(lower_bound) {} 20472: 20472: void AddTombstones(std::unique_ptr input_iter) { 20472: iters_.push_back(std::move(input_iter)); 20472: } 20472: 20472: bool IsEmpty() const { return iters_.empty(); } 20472: 20472: bool ShouldDelete(const ParsedInternalKey& parsed, 20472: RangeDelPositioningMode mode); 20472: 20472: void Invalidate() { 20472: if (!IsEmpty()) { 20472: InvalidateForwardIter(); 20472: InvalidateReverseIter(); 20472: } 20472: } 20472: 20472: bool IsRangeOverlapped(const Slice& start, const Slice& end); 20472: 20472: private: 20472: bool InStripe(SequenceNumber seq) const { 20472: return lower_bound_ <= seq && seq <= upper_bound_; 20472: } 20472: 20472: void InvalidateForwardIter() { forward_iter_.Invalidate(); } 20472: 20472: void InvalidateReverseIter() { reverse_iter_.Invalidate(); } 20472: 20472: const InternalKeyComparator* icmp_; 20472: std::vector> iters_; 20472: ForwardRangeDelIterator forward_iter_; 20472: ReverseRangeDelIterator reverse_iter_; 20472: SequenceNumber upper_bound_; 20472: SequenceNumber lower_bound_; 20472: }; 20472: 20472: const InternalKeyComparator* icmp_; 20472: 20472: private: 20472: std::set files_seen_; 20472: }; 20472: 20472: class ReadRangeDelAggregator final : public RangeDelAggregator { 20472: public: 20472: ReadRangeDelAggregator(const InternalKeyComparator* icmp, 20472: SequenceNumber upper_bound) 20472: : RangeDelAggregator(icmp), 20472: rep_(icmp, upper_bound, 0 ) {} 20472: ~ReadRangeDelAggregator() override {} 20472: 20472: using RangeDelAggregator::ShouldDelete; 20472: void AddTombstones( 20472: std::unique_ptr input_iter, 20472: const InternalKey* smallest = nullptr, 20472: const InternalKey* largest = nullptr) override; 20472: 20472: bool ShouldDelete(const ParsedInternalKey& parsed, 20472: RangeDelPositioningMode mode) final override { 20472: if (rep_.IsEmpty()) { 20472: return false; 20472: } 20472: return ShouldDeleteImpl(parsed, mode); 20472: } 20472: 20472: bool IsRangeOverlapped(const Slice& start, const Slice& end); 20472: 20472: void InvalidateRangeDelMapPositions() override { rep_.Invalidate(); } 20472: 20472: bool IsEmpty() const override { return rep_.IsEmpty(); } 20472: 20472: private: 20472: StripeRep rep_; 20472: 20472: bool ShouldDeleteImpl(const ParsedInternalKey& parsed, 20472: RangeDelPositioningMode mode); 20472: }; 20472: 20472: class CompactionRangeDelAggregator : public RangeDelAggregator { 20472: public: 20472: CompactionRangeDelAggregator(const InternalKeyComparator* icmp, 20472: const std::vector& snapshots) 20472: : RangeDelAggregator(icmp), snapshots_(&snapshots) {} 20472: ~CompactionRangeDelAggregator() override {} 20472: 20472: void AddTombstones( 20472: std::unique_ptr input_iter, 20472: const InternalKey* smallest = nullptr, 20472: const InternalKey* largest = nullptr) override; 20472: 20472: using RangeDelAggregator::ShouldDelete; 20472: bool ShouldDelete(const ParsedInternalKey& parsed, 20472: RangeDelPositioningMode mode) override; 20472: 20472: bool IsRangeOverlapped(const Slice& start, const Slice& end); 20472: 20472: void InvalidateRangeDelMapPositions() override { 20472: for (auto& rep : reps_) { 20472: rep.second.Invalidate(); 20472: } 20472: } 20472: 20472: bool IsEmpty() const override { 20472: for (const auto& rep : reps_) { 20472: if (!rep.second.IsEmpty()) { 20472: return false; 20472: } 20472: } 20472: return true; 20472: } 20472: # 430 "./db/range_del_aggregator.h" 20472: std::unique_ptr NewIterator( 20472: const Slice* lower_bound = nullptr, const Slice* upper_bound = nullptr, 20472: bool upper_bound_inclusive = false); 20472: 20472: private: 20472: std::vector> parent_iters_; 20472: std::map reps_; 20472: 20472: const std::vector* snapshots_; 20472: }; 20472: 20472: } 20472: # 15 "./db/merge_helper.h" 2 20472: # 1 "./db/snapshot_checker.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: namespace rocksdb { 20472: 20472: enum class SnapshotCheckerResult : int { 20472: kInSnapshot = 0, 20472: kNotInSnapshot = 1, 20472: 20472: 20472: kSnapshotReleased = 2, 20472: }; 20472: 20472: 20472: class SnapshotChecker { 20472: public: 20472: virtual ~SnapshotChecker() {} 20472: virtual SnapshotCheckerResult CheckInSnapshot( 20472: SequenceNumber sequence, SequenceNumber snapshot_sequence) const = 0; 20472: }; 20472: 20472: class DisableGCSnapshotChecker : public SnapshotChecker { 20472: public: 20472: virtual ~DisableGCSnapshotChecker() {} 20472: virtual SnapshotCheckerResult CheckInSnapshot( 20472: SequenceNumber , 20472: SequenceNumber ) const override { 20472: 20472: return SnapshotCheckerResult::kNotInSnapshot; 20472: } 20472: static DisableGCSnapshotChecker* Instance() { return &instance_; } 20472: 20472: protected: 20472: static DisableGCSnapshotChecker instance_; 20472: explicit DisableGCSnapshotChecker() {} 20472: }; 20472: 20472: class WritePreparedTxnDB; 20472: 20472: 20472: 20472: class WritePreparedSnapshotChecker : public SnapshotChecker { 20472: public: 20472: explicit WritePreparedSnapshotChecker(WritePreparedTxnDB* txn_db); 20472: virtual ~WritePreparedSnapshotChecker() {} 20472: 20472: virtual SnapshotCheckerResult CheckInSnapshot( 20472: SequenceNumber sequence, SequenceNumber snapshot_sequence) const override; 20472: 20472: private: 20472: 20472: const WritePreparedTxnDB* const txn_db_; 20472: 20472: }; 20472: 20472: } 20472: # 16 "./db/merge_helper.h" 2 20472: # 1 "./include/rocksdb/compaction_filter.h" 1 20472: # 9 "./include/rocksdb/compaction_filter.h" 20472: 20472: 20472: # 1 "/usr/include/c++/10/cassert" 1 3 20472: # 41 "/usr/include/c++/10/cassert" 3 20472: 20472: # 42 "/usr/include/c++/10/cassert" 3 20472: 20472: 20472: # 1 "/usr/include/assert.h" 1 3 4 20472: # 45 "/usr/include/c++/10/cassert" 2 3 20472: # 12 "./include/rocksdb/compaction_filter.h" 2 20472: 20472: 20472: 20472: 20472: 20472: 20472: namespace rocksdb { 20472: 20472: class Slice; 20472: class SliceTransform; 20472: 20472: 20472: struct CompactionFilterContext { 20472: 20472: bool is_full_compaction; 20472: 20472: 20472: bool is_manual_compaction; 20472: }; 20472: 20472: 20472: 20472: 20472: class CompactionFilter { 20472: public: 20472: enum ValueType { 20472: kValue, 20472: kMergeOperand, 20472: kBlobIndex, 20472: }; 20472: 20472: enum class Decision { 20472: kKeep, 20472: kRemove, 20472: kChangeValue, 20472: kRemoveAndSkipUntil, 20472: }; 20472: 20472: enum class BlobDecision { kKeep, kChangeValue, kCorruption, kIOError }; 20472: 20472: 20472: struct Context { 20472: 20472: bool is_full_compaction; 20472: 20472: 20472: bool is_manual_compaction; 20472: 20472: uint32_t column_family_id; 20472: }; 20472: 20472: virtual ~CompactionFilter() {} 20472: # 97 "./include/rocksdb/compaction_filter.h" 20472: virtual bool Filter(int , const Slice& , 20472: const Slice& , 20472: std::string* , 20472: bool* ) const { 20472: return false; 20472: } 20472: # 113 "./include/rocksdb/compaction_filter.h" 20472: virtual bool FilterMergeOperand(int , const Slice& , 20472: const Slice& ) const { 20472: return false; 20472: } 20472: # 157 "./include/rocksdb/compaction_filter.h" 20472: virtual Decision FilterV2(int level, const Slice& key, ValueType value_type, 20472: const Slice& existing_value, std::string* new_value, 20472: std::string* ) const { 20472: switch (value_type) { 20472: case ValueType::kValue: { 20472: bool value_changed = false; 20472: bool rv = Filter(level, key, existing_value, new_value, &value_changed); 20472: if (rv) { 20472: return Decision::kRemove; 20472: } 20472: return value_changed ? Decision::kChangeValue : Decision::kKeep; 20472: } 20472: case ValueType::kMergeOperand: { 20472: bool rv = FilterMergeOperand(level, key, existing_value); 20472: return rv ? Decision::kRemove : Decision::kKeep; 20472: } 20472: case ValueType::kBlobIndex: 20472: return Decision::kKeep; 20472: } 20472: 20472: # 176 "./include/rocksdb/compaction_filter.h" 3 4 20472: (static_cast ( 20472: # 176 "./include/rocksdb/compaction_filter.h" 20472: false 20472: # 176 "./include/rocksdb/compaction_filter.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 176 "./include/rocksdb/compaction_filter.h" 20472: "false" 20472: # 176 "./include/rocksdb/compaction_filter.h" 3 4 20472: , "./include/rocksdb/compaction_filter.h", 176, __extension__ __PRETTY_FUNCTION__)) 20472: # 176 "./include/rocksdb/compaction_filter.h" 20472: ; 20472: return Decision::kKeep; 20472: } 20472: 20472: 20472: virtual BlobDecision PrepareBlobOutput(const Slice& , 20472: const Slice& , 20472: std::string* ) const { 20472: return BlobDecision::kKeep; 20472: } 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual bool IgnoreSnapshots() const { return true; } 20472: 20472: 20472: 20472: virtual const char* Name() const = 0; 20472: }; 20472: 20472: 20472: 20472: class CompactionFilterFactory { 20472: public: 20472: virtual ~CompactionFilterFactory() {} 20472: 20472: virtual std::unique_ptr CreateCompactionFilter( 20472: const CompactionFilter::Context& context) = 0; 20472: 20472: 20472: virtual const char* Name() const = 0; 20472: }; 20472: 20472: } 20472: # 17 "./db/merge_helper.h" 2 20472: 20472: 20472: 20472: 20472: namespace rocksdb { 20472: 20472: class Comparator; 20472: class Iterator; 20472: class Logger; 20472: class MergeOperator; 20472: class Statistics; 20472: 20472: class MergeHelper { 20472: public: 20472: MergeHelper(Env* env, const Comparator* user_comparator, 20472: const MergeOperator* user_merge_operator, 20472: const CompactionFilter* compaction_filter, Logger* logger, 20472: bool assert_valid_internal_key, SequenceNumber latest_snapshot, 20472: const SnapshotChecker* snapshot_checker = nullptr, int level = 0, 20472: Statistics* stats = nullptr, 20472: const std::atomic* shutting_down = nullptr); 20472: # 47 "./db/merge_helper.h" 20472: static Status TimedFullMerge(const MergeOperator* merge_operator, 20472: const Slice& key, const Slice* value, 20472: const std::vector& operands, 20472: std::string* result, Logger* logger, 20472: Statistics* statistics, Env* env, 20472: Slice* result_operand = nullptr, 20472: bool update_num_ops_stats = false); 20472: # 80 "./db/merge_helper.h" 20472: Status MergeUntil(InternalIterator* iter, 20472: CompactionRangeDelAggregator* range_del_agg = nullptr, 20472: const SequenceNumber stop_before = 0, 20472: const bool at_bottom = false); 20472: 20472: 20472: 20472: 20472: 20472: CompactionFilter::Decision FilterMerge(const Slice& user_key, 20472: const Slice& value_slice); 20472: # 117 "./db/merge_helper.h" 20472: const std::deque& keys() const { return keys_; } 20472: const std::vector& values() const { 20472: return merge_context_.GetOperands(); 20472: } 20472: uint64_t TotalFilterTime() const { return total_filter_time_; } 20472: bool HasOperator() const { return user_merge_operator_ != nullptr; } 20472: 20472: 20472: 20472: 20472: bool FilteredUntil(Slice* skip_until) const { 20472: if (!has_compaction_filter_skip_until_) { 20472: return false; 20472: } 20472: 20472: # 131 "./db/merge_helper.h" 3 4 20472: (static_cast ( 20472: # 131 "./db/merge_helper.h" 20472: compaction_filter_ != nullptr 20472: # 131 "./db/merge_helper.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 131 "./db/merge_helper.h" 20472: "compaction_filter_ != nullptr" 20472: # 131 "./db/merge_helper.h" 3 4 20472: , "./db/merge_helper.h", 131, __extension__ __PRETTY_FUNCTION__)) 20472: # 131 "./db/merge_helper.h" 20472: ; 20472: 20472: # 132 "./db/merge_helper.h" 3 4 20472: (static_cast ( 20472: # 132 "./db/merge_helper.h" 20472: skip_until != nullptr 20472: # 132 "./db/merge_helper.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 132 "./db/merge_helper.h" 20472: "skip_until != nullptr" 20472: # 132 "./db/merge_helper.h" 3 4 20472: , "./db/merge_helper.h", 132, __extension__ __PRETTY_FUNCTION__)) 20472: # 132 "./db/merge_helper.h" 20472: ; 20472: 20472: # 133 "./db/merge_helper.h" 3 4 20472: (static_cast ( 20472: # 133 "./db/merge_helper.h" 20472: compaction_filter_skip_until_.Valid() 20472: # 133 "./db/merge_helper.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 133 "./db/merge_helper.h" 20472: "compaction_filter_skip_until_.Valid()" 20472: # 133 "./db/merge_helper.h" 3 4 20472: , "./db/merge_helper.h", 133, __extension__ __PRETTY_FUNCTION__)) 20472: # 133 "./db/merge_helper.h" 20472: ; 20472: *skip_until = compaction_filter_skip_until_.Encode(); 20472: return true; 20472: } 20472: 20472: private: 20472: Env* env_; 20472: const Comparator* user_comparator_; 20472: const MergeOperator* user_merge_operator_; 20472: const CompactionFilter* compaction_filter_; 20472: const std::atomic* shutting_down_; 20472: Logger* logger_; 20472: bool assert_valid_internal_key_; 20472: bool allow_single_operand_; 20472: SequenceNumber latest_snapshot_; 20472: const SnapshotChecker* const snapshot_checker_; 20472: int level_; 20472: 20472: 20472: 20472: 20472: 20472: std::deque keys_; 20472: 20472: mutable MergeContext merge_context_; 20472: 20472: StopWatchNano filter_timer_; 20472: uint64_t total_filter_time_; 20472: Statistics* stats_; 20472: 20472: bool has_compaction_filter_skip_until_ = false; 20472: std::string compaction_filter_value_; 20472: InternalKey compaction_filter_skip_until_; 20472: 20472: bool IsShuttingDown() { 20472: 20472: return shutting_down_ && shutting_down_->load(std::memory_order_relaxed); 20472: } 20472: }; 20472: 20472: 20472: class MergeOutputIterator { 20472: public: 20472: 20472: explicit MergeOutputIterator(const MergeHelper* merge_helper); 20472: 20472: 20472: void SeekToFirst(); 20472: 20472: void Next(); 20472: 20472: Slice key() { return Slice(*it_keys_); } 20472: Slice value() { return Slice(*it_values_); } 20472: bool Valid() { return it_keys_ != merge_helper_->keys().rend(); } 20472: 20472: private: 20472: const MergeHelper* merge_helper_; 20472: std::deque::const_reverse_iterator it_keys_; 20472: std::vector::const_reverse_iterator it_values_; 20472: }; 20472: 20472: } 20472: # 19 "db/memtable.cc" 2 20472: 20472: 20472: 20472: 20472: # 1 "./memory/memory_usage.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: namespace rocksdb { 20472: 20472: 20472: 20472: template 20472: size_t ApproximateMemoryUsage( 20472: const std::unordered_map& umap) { 20472: typedef std::unordered_map Map; 20472: return sizeof(umap) + 20472: 20472: (sizeof(typename Map::value_type) + sizeof(void*)) * umap.size() + 20472: 20472: umap.bucket_count() * sizeof(void*); 20472: } 20472: 20472: } 20472: # 24 "db/memtable.cc" 2 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 1 "./include/rocksdb/merge_operator.h" 1 20472: 20472: 20472: 20472: 20472: 20472: 20472: # 15 "./include/rocksdb/merge_operator.h" 20472: namespace rocksdb { 20472: 20472: class Slice; 20472: class Logger; 20472: # 46 "./include/rocksdb/merge_operator.h" 20472: class MergeOperator { 20472: public: 20472: virtual ~MergeOperator() {} 20472: static const char* Type() { return "MergeOperator"; } 20472: # 69 "./include/rocksdb/merge_operator.h" 20472: virtual bool FullMerge(const Slice& , const Slice* , 20472: const std::deque& , 20472: std::string* , Logger* ) const { 20472: 20472: 20472: # 73 "./include/rocksdb/merge_operator.h" 3 4 20472: (static_cast ( 20472: # 73 "./include/rocksdb/merge_operator.h" 20472: false 20472: # 73 "./include/rocksdb/merge_operator.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 73 "./include/rocksdb/merge_operator.h" 20472: "false" 20472: # 73 "./include/rocksdb/merge_operator.h" 3 4 20472: , "./include/rocksdb/merge_operator.h", 73, __extension__ __PRETTY_FUNCTION__)) 20472: # 73 "./include/rocksdb/merge_operator.h" 20472: ; 20472: return false; 20472: } 20472: 20472: struct MergeOperationInput { 20472: explicit MergeOperationInput(const Slice& _key, 20472: const Slice* _existing_value, 20472: const std::vector& _operand_list, 20472: Logger* _logger) 20472: : key(_key), 20472: existing_value(_existing_value), 20472: operand_list(_operand_list), 20472: logger(_logger) {} 20472: 20472: 20472: const Slice& key; 20472: 20472: 20472: const Slice* existing_value; 20472: 20472: const std::vector& operand_list; 20472: 20472: 20472: Logger* logger; 20472: }; 20472: 20472: struct MergeOperationOutput { 20472: explicit MergeOperationOutput(std::string& _new_value, 20472: Slice& _existing_operand) 20472: : new_value(_new_value), existing_operand(_existing_operand) {} 20472: 20472: 20472: std::string& new_value; 20472: 20472: 20472: 20472: Slice& existing_operand; 20472: }; 20472: # 129 "./include/rocksdb/merge_operator.h" 20472: virtual bool FullMergeV2(const MergeOperationInput& merge_in, 20472: MergeOperationOutput* merge_out) const; 20472: # 163 "./include/rocksdb/merge_operator.h" 20472: virtual bool PartialMerge(const Slice& , const Slice& , 20472: const Slice& , 20472: std::string* , 20472: Logger* ) const { 20472: return false; 20472: } 20472: # 191 "./include/rocksdb/merge_operator.h" 20472: virtual bool PartialMergeMulti(const Slice& key, 20472: const std::deque& operand_list, 20472: std::string* new_value, Logger* logger) const; 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual const char* Name() const = 0; 20472: 20472: 20472: 20472: 20472: 20472: 20472: virtual bool AllowSingleOperand() const { return false; } 20472: # 220 "./include/rocksdb/merge_operator.h" 20472: virtual bool ShouldMerge(const std::vector& ) const { 20472: return false; 20472: } 20472: }; 20472: 20472: 20472: class AssociativeMergeOperator : public MergeOperator { 20472: public: 20472: ~AssociativeMergeOperator() override {} 20472: # 243 "./include/rocksdb/merge_operator.h" 20472: virtual bool Merge(const Slice& key, const Slice* existing_value, 20472: const Slice& value, std::string* new_value, 20472: Logger* logger) const = 0; 20472: 20472: private: 20472: 20472: bool FullMergeV2(const MergeOperationInput& merge_in, 20472: MergeOperationOutput* merge_out) const override; 20472: 20472: bool PartialMerge(const Slice& key, const Slice& left_operand, 20472: const Slice& right_operand, std::string* new_value, 20472: Logger* logger) const override; 20472: }; 20472: 20472: } 20472: # 32 "db/memtable.cc" 2 20472: 20472: 20472: 20472: # 1 "./table/iterator_wrapper.h" 1 20472: # 10 "./table/iterator_wrapper.h" 20472: 20472: 20472: 20472: 20472: 20472: 20472: 20472: namespace rocksdb { 20472: 20472: 20472: 20472: 20472: 20472: template 20472: class IteratorWrapperBase { 20472: public: 20472: IteratorWrapperBase() : iter_(nullptr), valid_(false) {} 20472: explicit IteratorWrapperBase(InternalIteratorBase* _iter) 20472: : iter_(nullptr) { 20472: Set(_iter); 20472: } 20472: ~IteratorWrapperBase() {} 20472: InternalIteratorBase* iter() const { return iter_; } 20472: 20472: 20472: 20472: InternalIteratorBase* Set(InternalIteratorBase* _iter) { 20472: InternalIteratorBase* old_iter = iter_; 20472: 20472: iter_ = _iter; 20472: if (iter_ == nullptr) { 20472: valid_ = false; 20472: } else { 20472: Update(); 20472: } 20472: return old_iter; 20472: } 20472: 20472: void DeleteIter(bool is_arena_mode) { 20472: if (iter_) { 20472: if (!is_arena_mode) { 20472: delete iter_; 20472: } else { 20472: iter_->~InternalIteratorBase(); 20472: } 20472: } 20472: } 20472: 20472: 20472: bool Valid() const { return valid_; } 20472: Slice key() const { 20472: 20472: # 61 "./table/iterator_wrapper.h" 3 4 20472: (static_cast ( 20472: # 61 "./table/iterator_wrapper.h" 20472: Valid() 20472: # 61 "./table/iterator_wrapper.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 61 "./table/iterator_wrapper.h" 20472: "Valid()" 20472: # 61 "./table/iterator_wrapper.h" 3 4 20472: , "./table/iterator_wrapper.h", 61, __extension__ __PRETTY_FUNCTION__)) 20472: # 61 "./table/iterator_wrapper.h" 20472: ; 20472: return result_.key; 20472: } 20472: TValue value() const { 20472: 20472: # 65 "./table/iterator_wrapper.h" 3 4 20472: (static_cast ( 20472: # 65 "./table/iterator_wrapper.h" 20472: Valid() 20472: # 65 "./table/iterator_wrapper.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 65 "./table/iterator_wrapper.h" 20472: "Valid()" 20472: # 65 "./table/iterator_wrapper.h" 3 4 20472: , "./table/iterator_wrapper.h", 65, __extension__ __PRETTY_FUNCTION__)) 20472: # 65 "./table/iterator_wrapper.h" 20472: ; 20472: return iter_->value(); 20472: } 20472: 20472: Status status() const { 20472: 20472: # 70 "./table/iterator_wrapper.h" 3 4 20472: (static_cast ( 20472: # 70 "./table/iterator_wrapper.h" 20472: iter_ 20472: # 70 "./table/iterator_wrapper.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 70 "./table/iterator_wrapper.h" 20472: "iter_" 20472: # 70 "./table/iterator_wrapper.h" 3 4 20472: , "./table/iterator_wrapper.h", 70, __extension__ __PRETTY_FUNCTION__)) 20472: # 70 "./table/iterator_wrapper.h" 20472: ; 20472: return iter_->status(); 20472: } 20472: bool PrepareValue() { 20472: 20472: # 74 "./table/iterator_wrapper.h" 3 4 20472: (static_cast ( 20472: # 74 "./table/iterator_wrapper.h" 20472: Valid() 20472: # 74 "./table/iterator_wrapper.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 74 "./table/iterator_wrapper.h" 20472: "Valid()" 20472: # 74 "./table/iterator_wrapper.h" 3 4 20472: , "./table/iterator_wrapper.h", 74, __extension__ __PRETTY_FUNCTION__)) 20472: # 74 "./table/iterator_wrapper.h" 20472: ; 20472: if (result_.value_prepared) { 20472: return true; 20472: } 20472: if (iter_->PrepareValue()) { 20472: result_.value_prepared = true; 20472: return true; 20472: } 20472: 20472: 20472: # 83 "./table/iterator_wrapper.h" 3 4 20472: (static_cast ( 20472: # 83 "./table/iterator_wrapper.h" 20472: !iter_->Valid() 20472: # 83 "./table/iterator_wrapper.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 83 "./table/iterator_wrapper.h" 20472: "!iter_->Valid()" 20472: # 83 "./table/iterator_wrapper.h" 3 4 20472: , "./table/iterator_wrapper.h", 83, __extension__ __PRETTY_FUNCTION__)) 20472: # 83 "./table/iterator_wrapper.h" 20472: ; 20472: valid_ = false; 20472: return false; 20472: } 20472: void Next() { 20472: 20472: # 88 "./table/iterator_wrapper.h" 3 4 20472: (static_cast ( 20472: # 88 "./table/iterator_wrapper.h" 20472: iter_ 20472: # 88 "./table/iterator_wrapper.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 88 "./table/iterator_wrapper.h" 20472: "iter_" 20472: # 88 "./table/iterator_wrapper.h" 3 4 20472: , "./table/iterator_wrapper.h", 88, __extension__ __PRETTY_FUNCTION__)) 20472: # 88 "./table/iterator_wrapper.h" 20472: ; 20472: valid_ = iter_->NextAndGetResult(&result_); 20472: 20472: # 90 "./table/iterator_wrapper.h" 3 4 20472: (static_cast ( 20472: # 90 "./table/iterator_wrapper.h" 20472: !valid_ || iter_->status().ok() 20472: # 90 "./table/iterator_wrapper.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 90 "./table/iterator_wrapper.h" 20472: "!valid_ || iter_->status().ok()" 20472: # 90 "./table/iterator_wrapper.h" 3 4 20472: , "./table/iterator_wrapper.h", 90, __extension__ __PRETTY_FUNCTION__)) 20472: # 90 "./table/iterator_wrapper.h" 20472: ; 20472: } 20472: void Prev() { 20472: 20472: # 93 "./table/iterator_wrapper.h" 3 4 20472: (static_cast ( 20472: # 93 "./table/iterator_wrapper.h" 20472: iter_ 20472: # 93 "./table/iterator_wrapper.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 93 "./table/iterator_wrapper.h" 20472: "iter_" 20472: # 93 "./table/iterator_wrapper.h" 3 4 20472: , "./table/iterator_wrapper.h", 93, __extension__ __PRETTY_FUNCTION__)) 20472: # 93 "./table/iterator_wrapper.h" 20472: ; 20472: iter_->Prev(); 20472: Update(); 20472: } 20472: void Seek(const Slice& k) { 20472: 20472: # 98 "./table/iterator_wrapper.h" 3 4 20472: (static_cast ( 20472: # 98 "./table/iterator_wrapper.h" 20472: iter_ 20472: # 98 "./table/iterator_wrapper.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 98 "./table/iterator_wrapper.h" 20472: "iter_" 20472: # 98 "./table/iterator_wrapper.h" 3 4 20472: , "./table/iterator_wrapper.h", 98, __extension__ __PRETTY_FUNCTION__)) 20472: # 98 "./table/iterator_wrapper.h" 20472: ; 20472: iter_->Seek(k); 20472: Update(); 20472: } 20472: void SeekForPrev(const Slice& k) { 20472: 20472: # 103 "./table/iterator_wrapper.h" 3 4 20472: (static_cast ( 20472: # 103 "./table/iterator_wrapper.h" 20472: iter_ 20472: # 103 "./table/iterator_wrapper.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 103 "./table/iterator_wrapper.h" 20472: "iter_" 20472: # 103 "./table/iterator_wrapper.h" 3 4 20472: , "./table/iterator_wrapper.h", 103, __extension__ __PRETTY_FUNCTION__)) 20472: # 103 "./table/iterator_wrapper.h" 20472: ; 20472: iter_->SeekForPrev(k); 20472: Update(); 20472: } 20472: void SeekToFirst() { 20472: 20472: # 108 "./table/iterator_wrapper.h" 3 4 20472: (static_cast ( 20472: # 108 "./table/iterator_wrapper.h" 20472: iter_ 20472: # 108 "./table/iterator_wrapper.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 108 "./table/iterator_wrapper.h" 20472: "iter_" 20472: # 108 "./table/iterator_wrapper.h" 3 4 20472: , "./table/iterator_wrapper.h", 108, __extension__ __PRETTY_FUNCTION__)) 20472: # 108 "./table/iterator_wrapper.h" 20472: ; 20472: iter_->SeekToFirst(); 20472: Update(); 20472: } 20472: void SeekToLast() { 20472: 20472: # 113 "./table/iterator_wrapper.h" 3 4 20472: (static_cast ( 20472: # 113 "./table/iterator_wrapper.h" 20472: iter_ 20472: # 113 "./table/iterator_wrapper.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 113 "./table/iterator_wrapper.h" 20472: "iter_" 20472: # 113 "./table/iterator_wrapper.h" 3 4 20472: , "./table/iterator_wrapper.h", 113, __extension__ __PRETTY_FUNCTION__)) 20472: # 113 "./table/iterator_wrapper.h" 20472: ; 20472: iter_->SeekToLast(); 20472: Update(); 20472: } 20472: 20472: bool MayBeOutOfLowerBound() { 20472: 20472: # 119 "./table/iterator_wrapper.h" 3 4 20472: (static_cast ( 20472: # 119 "./table/iterator_wrapper.h" 20472: Valid() 20472: # 119 "./table/iterator_wrapper.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 119 "./table/iterator_wrapper.h" 20472: "Valid()" 20472: # 119 "./table/iterator_wrapper.h" 3 4 20472: , "./table/iterator_wrapper.h", 119, __extension__ __PRETTY_FUNCTION__)) 20472: # 119 "./table/iterator_wrapper.h" 20472: ; 20472: return iter_->MayBeOutOfLowerBound(); 20472: } 20472: 20472: bool MayBeOutOfUpperBound() { 20472: 20472: # 124 "./table/iterator_wrapper.h" 3 4 20472: (static_cast ( 20472: # 124 "./table/iterator_wrapper.h" 20472: Valid() 20472: # 124 "./table/iterator_wrapper.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 124 "./table/iterator_wrapper.h" 20472: "Valid()" 20472: # 124 "./table/iterator_wrapper.h" 3 4 20472: , "./table/iterator_wrapper.h", 124, __extension__ __PRETTY_FUNCTION__)) 20472: # 124 "./table/iterator_wrapper.h" 20472: ; 20472: return result_.may_be_out_of_upper_bound; 20472: } 20472: 20472: void SetPinnedItersMgr(PinnedIteratorsManager* pinned_iters_mgr) { 20472: 20472: # 129 "./table/iterator_wrapper.h" 3 4 20472: (static_cast ( 20472: # 129 "./table/iterator_wrapper.h" 20472: iter_ 20472: # 129 "./table/iterator_wrapper.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 129 "./table/iterator_wrapper.h" 20472: "iter_" 20472: # 129 "./table/iterator_wrapper.h" 3 4 20472: , "./table/iterator_wrapper.h", 129, __extension__ __PRETTY_FUNCTION__)) 20472: # 129 "./table/iterator_wrapper.h" 20472: ; 20472: iter_->SetPinnedItersMgr(pinned_iters_mgr); 20472: } 20472: bool IsKeyPinned() const { 20472: 20472: # 133 "./table/iterator_wrapper.h" 3 4 20472: (static_cast ( 20472: # 133 "./table/iterator_wrapper.h" 20472: Valid() 20472: # 133 "./table/iterator_wrapper.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 133 "./table/iterator_wrapper.h" 20472: "Valid()" 20472: # 133 "./table/iterator_wrapper.h" 3 4 20472: , "./table/iterator_wrapper.h", 133, __extension__ __PRETTY_FUNCTION__)) 20472: # 133 "./table/iterator_wrapper.h" 20472: ; 20472: return iter_->IsKeyPinned(); 20472: } 20472: bool IsValuePinned() const { 20472: 20472: # 137 "./table/iterator_wrapper.h" 3 4 20472: (static_cast ( 20472: # 137 "./table/iterator_wrapper.h" 20472: Valid() 20472: # 137 "./table/iterator_wrapper.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 137 "./table/iterator_wrapper.h" 20472: "Valid()" 20472: # 137 "./table/iterator_wrapper.h" 3 4 20472: , "./table/iterator_wrapper.h", 137, __extension__ __PRETTY_FUNCTION__)) 20472: # 137 "./table/iterator_wrapper.h" 20472: ; 20472: return iter_->IsValuePinned(); 20472: } 20472: 20472: bool IsValuePrepared() const { 20472: return result_.value_prepared; 20472: } 20472: 20472: private: 20472: void Update() { 20472: valid_ = iter_->Valid(); 20472: if (valid_) { 20472: 20472: # 149 "./table/iterator_wrapper.h" 3 4 20472: (static_cast ( 20472: # 149 "./table/iterator_wrapper.h" 20472: iter_->status().ok() 20472: # 149 "./table/iterator_wrapper.h" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 149 "./table/iterator_wrapper.h" 20472: "iter_->status().ok()" 20472: # 149 "./table/iterator_wrapper.h" 3 4 20472: , "./table/iterator_wrapper.h", 149, __extension__ __PRETTY_FUNCTION__)) 20472: # 149 "./table/iterator_wrapper.h" 20472: ; 20472: result_.key = iter_->key(); 20472: result_.may_be_out_of_upper_bound = true; 20472: result_.value_prepared = false; 20472: } 20472: } 20472: 20472: InternalIteratorBase* iter_; 20472: IterateResult result_; 20472: bool valid_; 20472: }; 20472: 20472: using IteratorWrapper = IteratorWrapperBase; 20472: 20472: class Arena; 20472: 20472: template 20472: extern InternalIteratorBase* NewEmptyInternalIterator(Arena* arena); 20472: 20472: } 20472: # 36 "db/memtable.cc" 2 20472: # 1 "./table/merging_iterator.h" 1 20472: # 10 "./table/merging_iterator.h" 20472: 20472: 20472: 20472: 20472: 20472: namespace rocksdb { 20472: 20472: class Comparator; 20472: class Env; 20472: class Arena; 20472: template 20472: class InternalIteratorBase; 20472: using InternalIterator = InternalIteratorBase; 20472: # 32 "./table/merging_iterator.h" 20472: extern InternalIterator* NewMergingIterator( 20472: const InternalKeyComparator* comparator, InternalIterator** children, int n, 20472: Arena* arena = nullptr, bool prefix_seek_mode = false); 20472: 20472: class MergingIterator; 20472: 20472: 20472: class MergeIteratorBuilder { 20472: public: 20472: 20472: 20472: explicit MergeIteratorBuilder(const InternalKeyComparator* comparator, 20472: Arena* arena, bool prefix_seek_mode = false); 20472: ~MergeIteratorBuilder(); 20472: 20472: 20472: void AddIterator(InternalIterator* iter); 20472: 20472: 20472: 20472: Arena* GetArena() { return arena; } 20472: 20472: 20472: InternalIterator* Finish(); 20472: 20472: private: 20472: MergingIterator* merge_iter; 20472: InternalIterator* first_iter; 20472: bool use_merging_iter; 20472: Arena* arena; 20472: }; 20472: 20472: } 20472: # 37 "db/memtable.cc" 2 20472: 20472: 20472: 20472: 20472: namespace rocksdb { 20472: 20472: ImmutableMemTableOptions::ImmutableMemTableOptions( 20472: const ImmutableCFOptions& ioptions, 20472: const MutableCFOptions& mutable_cf_options) 20472: : arena_block_size(mutable_cf_options.arena_block_size), 20472: memtable_prefix_bloom_bits( 20472: static_cast( 20472: static_cast(mutable_cf_options.write_buffer_size) * 20472: mutable_cf_options.memtable_prefix_bloom_size_ratio) * 20472: 8u), 20472: memtable_huge_page_size(mutable_cf_options.memtable_huge_page_size), 20472: memtable_whole_key_filtering( 20472: mutable_cf_options.memtable_whole_key_filtering), 20472: inplace_update_support(ioptions.inplace_update_support), 20472: inplace_update_num_locks(mutable_cf_options.inplace_update_num_locks), 20472: inplace_callback(ioptions.inplace_callback), 20472: max_successive_merges(mutable_cf_options.max_successive_merges), 20472: statistics(ioptions.statistics), 20472: merge_operator(ioptions.merge_operator), 20472: info_log(ioptions.info_log) {} 20472: 20472: MemTable::MemTable(const InternalKeyComparator& cmp, 20472: const ImmutableCFOptions& ioptions, 20472: const MutableCFOptions& mutable_cf_options, 20472: WriteBufferManager* write_buffer_manager, 20472: SequenceNumber latest_seq, uint32_t column_family_id) 20472: : comparator_(cmp), 20472: moptions_(ioptions, mutable_cf_options), 20472: refs_(0), 20472: kArenaBlockSize(OptimizeBlockSize(moptions_.arena_block_size)), 20472: mem_tracker_(write_buffer_manager), 20472: arena_(moptions_.arena_block_size, 20472: (write_buffer_manager != nullptr && 20472: (write_buffer_manager->enabled() || 20472: write_buffer_manager->cost_to_cache())) 20472: ? &mem_tracker_ 20472: : nullptr, 20472: mutable_cf_options.memtable_huge_page_size), 20472: table_(ioptions.memtable_factory->CreateMemTableRep( 20472: comparator_, &arena_, mutable_cf_options.prefix_extractor.get(), 20472: ioptions.info_log, column_family_id)), 20472: range_del_table_(SkipListFactory().CreateMemTableRep( 20472: comparator_, &arena_, nullptr , ioptions.info_log, 20472: column_family_id)), 20472: is_range_del_table_empty_(true), 20472: data_size_(0), 20472: num_entries_(0), 20472: num_deletes_(0), 20472: write_buffer_size_(mutable_cf_options.write_buffer_size), 20472: flush_in_progress_(false), 20472: flush_completed_(false), 20472: file_number_(0), 20472: first_seqno_(0), 20472: earliest_seqno_(latest_seq), 20472: creation_seq_(latest_seq), 20472: mem_next_logfile_number_(0), 20472: min_prep_log_referenced_(0), 20472: locks_(moptions_.inplace_update_support 20472: ? moptions_.inplace_update_num_locks 20472: : 0), 20472: prefix_extractor_(mutable_cf_options.prefix_extractor.get()), 20472: flush_state_(FLUSH_NOT_REQUESTED), 20472: env_(ioptions.env), 20472: insert_with_hint_prefix_extractor_( 20472: ioptions.memtable_insert_with_hint_prefix_extractor), 20472: oldest_key_time_(std::numeric_limits::max()), 20472: atomic_flush_seqno_(kMaxSequenceNumber), 20472: approximate_memory_usage_(0) { 20472: UpdateFlushState(); 20472: 20472: 20472: # 112 "db/memtable.cc" 3 4 20472: (static_cast ( 20472: # 112 "db/memtable.cc" 20472: !ShouldScheduleFlush() 20472: # 112 "db/memtable.cc" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 112 "db/memtable.cc" 20472: "!ShouldScheduleFlush()" 20472: # 112 "db/memtable.cc" 3 4 20472: , "db/memtable.cc", 112, __extension__ __PRETTY_FUNCTION__)) 20472: # 112 "db/memtable.cc" 20472: ; 20472: 20472: 20472: if ((prefix_extractor_ || moptions_.memtable_whole_key_filtering) && 20472: moptions_.memtable_prefix_bloom_bits > 0) { 20472: bloom_filter_.reset( 20472: new DynamicBloom(&arena_, moptions_.memtable_prefix_bloom_bits, 20472: 6 , 20472: moptions_.memtable_huge_page_size, ioptions.info_log)); 20472: } 20472: } 20472: 20472: MemTable::~MemTable() { 20472: mem_tracker_.FreeMem(); 20472: 20472: # 126 "db/memtable.cc" 3 4 20472: (static_cast ( 20472: # 126 "db/memtable.cc" 20472: refs_ == 0 20472: # 126 "db/memtable.cc" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 126 "db/memtable.cc" 20472: "refs_ == 0" 20472: # 126 "db/memtable.cc" 3 4 20472: , "db/memtable.cc", 126, __extension__ __PRETTY_FUNCTION__)) 20472: # 126 "db/memtable.cc" 20472: ; 20472: } 20472: 20472: size_t MemTable::ApproximateMemoryUsage() { 20472: autovector usages = { 20472: arena_.ApproximateMemoryUsage(), table_->ApproximateMemoryUsage(), 20472: range_del_table_->ApproximateMemoryUsage(), 20472: rocksdb::ApproximateMemoryUsage(insert_hints_)}; 20472: size_t total_usage = 0; 20472: for (size_t usage : usages) { 20472: 20472: 20472: if (usage >= port::kMaxSizet - total_usage) { 20472: return port::kMaxSizet; 20472: } 20472: total_usage += usage; 20472: } 20472: approximate_memory_usage_.store(total_usage, std::memory_order_relaxed); 20472: 20472: return total_usage; 20472: } 20472: 20472: bool MemTable::ShouldFlushNow() { 20472: size_t write_buffer_size = write_buffer_size_.load(std::memory_order_relaxed); 20472: 20472: 20472: 20472: 20472: 20472: 20472: const double kAllowOverAllocationRatio = 0.6; 20472: 20472: 20472: 20472: auto allocated_memory = table_->ApproximateMemoryUsage() + 20472: range_del_table_->ApproximateMemoryUsage() + 20472: arena_.MemoryAllocatedBytes(); 20472: 20472: approximate_memory_usage_.store(allocated_memory, std::memory_order_relaxed); 20472: 20472: 20472: 20472: if (allocated_memory + kArenaBlockSize < 20472: write_buffer_size + kArenaBlockSize * kAllowOverAllocationRatio) { 20472: return false; 20472: } 20472: 20472: 20472: 20472: if (allocated_memory > 20472: write_buffer_size + kArenaBlockSize * kAllowOverAllocationRatio) { 20472: return true; 20472: } 20472: # 205 "db/memtable.cc" 20472: return arena_.AllocatedAndUnused() < kArenaBlockSize / 4; 20472: } 20472: 20472: void MemTable::UpdateFlushState() { 20472: auto state = flush_state_.load(std::memory_order_relaxed); 20472: if (state == FLUSH_NOT_REQUESTED && ShouldFlushNow()) { 20472: 20472: 20472: flush_state_.compare_exchange_strong(state, FLUSH_REQUESTED, 20472: std::memory_order_relaxed, 20472: std::memory_order_relaxed); 20472: } 20472: } 20472: 20472: void MemTable::UpdateOldestKeyTime() { 20472: uint64_t oldest_key_time = oldest_key_time_.load(std::memory_order_relaxed); 20472: if (oldest_key_time == std::numeric_limits::max()) { 20472: int64_t current_time = 0; 20472: auto s = env_->GetCurrentTime(¤t_time); 20472: if (s.ok()) { 20472: 20472: # 225 "db/memtable.cc" 3 4 20472: (static_cast ( 20472: # 225 "db/memtable.cc" 20472: current_time >= 0 20472: # 225 "db/memtable.cc" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 225 "db/memtable.cc" 20472: "current_time >= 0" 20472: # 225 "db/memtable.cc" 3 4 20472: , "db/memtable.cc", 225, __extension__ __PRETTY_FUNCTION__)) 20472: # 225 "db/memtable.cc" 20472: ; 20472: 20472: oldest_key_time_.compare_exchange_strong( 20472: oldest_key_time, static_cast(current_time), 20472: std::memory_order_relaxed, std::memory_order_relaxed); 20472: } 20472: } 20472: } 20472: 20472: int MemTable::KeyComparator::operator()(const char* prefix_len_key1, 20472: const char* prefix_len_key2) const { 20472: 20472: Slice k1 = GetLengthPrefixedSlice(prefix_len_key1); 20472: Slice k2 = GetLengthPrefixedSlice(prefix_len_key2); 20472: return comparator.CompareKeySeq(k1, k2); 20472: } 20472: 20472: int MemTable::KeyComparator::operator()(const char* prefix_len_key, 20472: const KeyComparator::DecodedType& key) 20472: const { 20472: 20472: Slice a = GetLengthPrefixedSlice(prefix_len_key); 20472: return comparator.CompareKeySeq(a, key); 20472: } 20472: 20472: void MemTableRep::InsertConcurrently(KeyHandle ) { 20472: 20472: throw std::runtime_error("concurrent insert not supported"); 20472: 20472: 20472: 20472: } 20472: 20472: Slice MemTableRep::UserKey(const char* key) const { 20472: Slice slice = GetLengthPrefixedSlice(key); 20472: return Slice(slice.data(), slice.size() - 8); 20472: } 20472: 20472: KeyHandle MemTableRep::Allocate(const size_t len, char** buf) { 20472: *buf = allocator_->Allocate(len); 20472: return static_cast(*buf); 20472: } 20472: 20472: 20472: 20472: 20472: const char* EncodeKey(std::string* scratch, const Slice& target) { 20472: scratch->clear(); 20472: PutVarint32(scratch, static_cast(target.size())); 20472: scratch->append(target.data(), target.size()); 20472: return scratch->data(); 20472: } 20472: 20472: class MemTableIterator : public InternalIterator { 20472: public: 20472: MemTableIterator(const MemTable& mem, const ReadOptions& read_options, 20472: Arena* arena, bool use_range_del_table = false) 20472: : bloom_(nullptr), 20472: prefix_extractor_(mem.prefix_extractor_), 20472: comparator_(mem.comparator_), 20472: valid_(false), 20472: arena_mode_(arena != nullptr), 20472: value_pinned_( 20472: !mem.GetImmutableMemTableOptions()->inplace_update_support) { 20472: if (use_range_del_table) { 20472: iter_ = mem.range_del_table_->GetIterator(arena); 20472: } else if (prefix_extractor_ != nullptr && !read_options.total_order_seek && 20472: !read_options.auto_prefix_mode) { 20472: 20472: bloom_ = mem.bloom_filter_.get(); 20472: iter_ = mem.table_->GetDynamicPrefixIterator(arena); 20472: } else { 20472: iter_ = mem.table_->GetIterator(arena); 20472: } 20472: } 20472: 20472: MemTableIterator(const MemTableIterator&) = delete; 20472: void operator=(const MemTableIterator&) = delete; 20472: 20472: ~MemTableIterator() override { 20472: 20472: 20472: 20472: 20472: # 308 "db/memtable.cc" 3 4 20472: (static_cast ( 20472: # 308 "db/memtable.cc" 20472: !pinned_iters_mgr_ || !pinned_iters_mgr_->PinningEnabled() 20472: # 308 "db/memtable.cc" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 308 "db/memtable.cc" 20472: "!pinned_iters_mgr_ || !pinned_iters_mgr_->PinningEnabled()" 20472: # 308 "db/memtable.cc" 3 4 20472: , "db/memtable.cc", 308, __extension__ __PRETTY_FUNCTION__)) 20472: # 308 "db/memtable.cc" 20472: ; 20472: 20472: if (arena_mode_) { 20472: iter_->~Iterator(); 20472: } else { 20472: delete iter_; 20472: } 20472: } 20472: 20472: 20472: void SetPinnedItersMgr(PinnedIteratorsManager* pinned_iters_mgr) override { 20472: pinned_iters_mgr_ = pinned_iters_mgr; 20472: } 20472: PinnedIteratorsManager* pinned_iters_mgr_ = nullptr; 20472: 20472: 20472: bool Valid() const override { return valid_; } 20472: void Seek(const Slice& k) override { 20472: PerfStepTimer perf_step_timer_seek_on_memtable_time(&(perf_context.seek_on_memtable_time)); perf_step_timer_seek_on_memtable_time.Start();; 20472: if (perf_level >= PerfLevel::kEnableCount) { perf_context.seek_on_memtable_count += 1; }; 20472: if (bloom_) { 20472: 20472: Slice user_k(ExtractUserKey(k)); 20472: if (prefix_extractor_->InDomain(user_k) && 20472: !bloom_->MayContain(prefix_extractor_->Transform(user_k))) { 20472: if (perf_level >= PerfLevel::kEnableCount) { perf_context.bloom_memtable_miss_count += 1; }; 20472: valid_ = false; 20472: return; 20472: } else { 20472: if (perf_level >= PerfLevel::kEnableCount) { perf_context.bloom_memtable_hit_count += 1; }; 20472: } 20472: } 20472: iter_->Seek(k, nullptr); 20472: valid_ = iter_->Valid(); 20472: } 20472: void SeekForPrev(const Slice& k) override { 20472: PerfStepTimer perf_step_timer_seek_on_memtable_time(&(perf_context.seek_on_memtable_time)); perf_step_timer_seek_on_memtable_time.Start();; 20472: if (perf_level >= PerfLevel::kEnableCount) { perf_context.seek_on_memtable_count += 1; }; 20472: if (bloom_) { 20472: Slice user_k(ExtractUserKey(k)); 20472: if (prefix_extractor_->InDomain(user_k) && 20472: !bloom_->MayContain(prefix_extractor_->Transform(user_k))) { 20472: if (perf_level >= PerfLevel::kEnableCount) { perf_context.bloom_memtable_miss_count += 1; }; 20472: valid_ = false; 20472: return; 20472: } else { 20472: if (perf_level >= PerfLevel::kEnableCount) { perf_context.bloom_memtable_hit_count += 1; }; 20472: } 20472: } 20472: iter_->Seek(k, nullptr); 20472: valid_ = iter_->Valid(); 20472: if (!Valid()) { 20472: SeekToLast(); 20472: } 20472: while (Valid() && comparator_.comparator.Compare(k, key()) < 0) { 20472: Prev(); 20472: } 20472: } 20472: void SeekToFirst() override { 20472: iter_->SeekToFirst(); 20472: valid_ = iter_->Valid(); 20472: } 20472: void SeekToLast() override { 20472: iter_->SeekToLast(); 20472: valid_ = iter_->Valid(); 20472: } 20472: void Next() override { 20472: if (perf_level >= PerfLevel::kEnableCount) { perf_context.next_on_memtable_count += 1; }; 20472: 20472: # 376 "db/memtable.cc" 3 4 20472: (static_cast ( 20472: # 376 "db/memtable.cc" 20472: Valid() 20472: # 376 "db/memtable.cc" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 376 "db/memtable.cc" 20472: "Valid()" 20472: # 376 "db/memtable.cc" 3 4 20472: , "db/memtable.cc", 376, __extension__ __PRETTY_FUNCTION__)) 20472: # 376 "db/memtable.cc" 20472: ; 20472: iter_->Next(); 20472: valid_ = iter_->Valid(); 20472: } 20472: void Prev() override { 20472: if (perf_level >= PerfLevel::kEnableCount) { perf_context.prev_on_memtable_count += 1; }; 20472: 20472: # 382 "db/memtable.cc" 3 4 20472: (static_cast ( 20472: # 382 "db/memtable.cc" 20472: Valid() 20472: # 382 "db/memtable.cc" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 382 "db/memtable.cc" 20472: "Valid()" 20472: # 382 "db/memtable.cc" 3 4 20472: , "db/memtable.cc", 382, __extension__ __PRETTY_FUNCTION__)) 20472: # 382 "db/memtable.cc" 20472: ; 20472: iter_->Prev(); 20472: valid_ = iter_->Valid(); 20472: } 20472: Slice key() const override { 20472: 20472: # 387 "db/memtable.cc" 3 4 20472: (static_cast ( 20472: # 387 "db/memtable.cc" 20472: Valid() 20472: # 387 "db/memtable.cc" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 387 "db/memtable.cc" 20472: "Valid()" 20472: # 387 "db/memtable.cc" 3 4 20472: , "db/memtable.cc", 387, __extension__ __PRETTY_FUNCTION__)) 20472: # 387 "db/memtable.cc" 20472: ; 20472: return GetLengthPrefixedSlice(iter_->key()); 20472: } 20472: Slice value() const override { 20472: 20472: # 391 "db/memtable.cc" 3 4 20472: (static_cast ( 20472: # 391 "db/memtable.cc" 20472: Valid() 20472: # 391 "db/memtable.cc" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 391 "db/memtable.cc" 20472: "Valid()" 20472: # 391 "db/memtable.cc" 3 4 20472: , "db/memtable.cc", 391, __extension__ __PRETTY_FUNCTION__)) 20472: # 391 "db/memtable.cc" 20472: ; 20472: Slice key_slice = GetLengthPrefixedSlice(iter_->key()); 20472: return GetLengthPrefixedSlice(key_slice.data() + key_slice.size()); 20472: } 20472: 20472: Status status() const override { return Status::OK(); } 20472: 20472: bool IsKeyPinned() const override { 20472: 20472: return true; 20472: } 20472: 20472: bool IsValuePinned() const override { 20472: 20472: return value_pinned_; 20472: } 20472: 20472: private: 20472: DynamicBloom* bloom_; 20472: const SliceTransform* const prefix_extractor_; 20472: const MemTable::KeyComparator comparator_; 20472: MemTableRep::Iterator* iter_; 20472: bool valid_; 20472: bool arena_mode_; 20472: bool value_pinned_; 20472: }; 20472: 20472: InternalIterator* MemTable::NewIterator(const ReadOptions& read_options, 20472: Arena* arena) { 20472: 20472: # 420 "db/memtable.cc" 3 4 20472: (static_cast ( 20472: # 420 "db/memtable.cc" 20472: arena != nullptr 20472: # 420 "db/memtable.cc" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 420 "db/memtable.cc" 20472: "arena != nullptr" 20472: # 420 "db/memtable.cc" 3 4 20472: , "db/memtable.cc", 420, __extension__ __PRETTY_FUNCTION__)) 20472: # 420 "db/memtable.cc" 20472: ; 20472: auto mem = arena->AllocateAligned(sizeof(MemTableIterator)); 20472: return new (mem) MemTableIterator(*this, read_options, arena); 20472: } 20472: 20472: FragmentedRangeTombstoneIterator* MemTable::NewRangeTombstoneIterator( 20472: const ReadOptions& read_options, SequenceNumber read_seq) { 20472: if (read_options.ignore_range_deletions || 20472: is_range_del_table_empty_.load(std::memory_order_relaxed)) { 20472: return nullptr; 20472: } 20472: auto* unfragmented_iter = new MemTableIterator( 20472: *this, read_options, nullptr , true ); 20472: if (unfragmented_iter == nullptr) { 20472: return nullptr; 20472: } 20472: auto fragmented_tombstone_list = 20472: std::make_shared( 20472: std::unique_ptr(unfragmented_iter), 20472: comparator_.comparator); 20472: 20472: auto* fragmented_iter = new FragmentedRangeTombstoneIterator( 20472: fragmented_tombstone_list, comparator_.comparator, read_seq); 20472: return fragmented_iter; 20472: } 20472: 20472: port::RWMutex* MemTable::GetLock(const Slice& key) { 20472: return &locks_[fastrange64(GetSliceNPHash64(key), locks_.size())]; 20472: } 20472: 20472: MemTable::MemTableStats MemTable::ApproximateStats(const Slice& start_ikey, 20472: const Slice& end_ikey) { 20472: uint64_t entry_count = table_->ApproximateNumEntries(start_ikey, end_ikey); 20472: entry_count += range_del_table_->ApproximateNumEntries(start_ikey, end_ikey); 20472: if (entry_count == 0) { 20472: return {0, 0}; 20472: } 20472: uint64_t n = num_entries_.load(std::memory_order_relaxed); 20472: if (n == 0) { 20472: return {0, 0}; 20472: } 20472: if (entry_count > n) { 20472: 20472: 20472: 20472: entry_count = n; 20472: } 20472: uint64_t data_size = data_size_.load(std::memory_order_relaxed); 20472: return {entry_count * (data_size / n), entry_count}; 20472: } 20472: 20472: bool MemTable::Add(SequenceNumber s, ValueType type, 20472: const Slice& key, 20472: const Slice& value, bool allow_concurrent, 20472: MemTablePostProcessInfo* post_process_info, void** hint) { 20472: 20472: 20472: 20472: 20472: 20472: uint32_t key_size = static_cast(key.size()); 20472: uint32_t val_size = static_cast(value.size()); 20472: uint32_t internal_key_size = key_size + 8; 20472: const uint32_t encoded_len = VarintLength(internal_key_size) + 20472: internal_key_size + VarintLength(val_size) + 20472: val_size; 20472: char* buf = nullptr; 20472: std::unique_ptr& table = 20472: type == kTypeRangeDeletion ? range_del_table_ : table_; 20472: KeyHandle handle = table->Allocate(encoded_len, &buf); 20472: 20472: char* p = EncodeVarint32(buf, internal_key_size); 20472: memcpy(p, key.data(), key_size); 20472: Slice key_slice(p, key_size); 20472: p += key_size; 20472: uint64_t packed = PackSequenceAndType(s, type); 20472: EncodeFixed64(p, packed); 20472: p += 8; 20472: p = EncodeVarint32(p, val_size); 20472: memcpy(p, value.data(), val_size); 20472: 20472: # 500 "db/memtable.cc" 3 4 20472: (static_cast ( 20472: # 500 "db/memtable.cc" 20472: (unsigned)(p + val_size - buf) == (unsigned)encoded_len 20472: # 500 "db/memtable.cc" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 500 "db/memtable.cc" 20472: "(unsigned)(p + val_size - buf) == (unsigned)encoded_len" 20472: # 500 "db/memtable.cc" 3 4 20472: , "db/memtable.cc", 500, __extension__ __PRETTY_FUNCTION__)) 20472: # 500 "db/memtable.cc" 20472: ; 20472: size_t ts_sz = GetInternalKeyComparator().user_comparator()->timestamp_size(); 20472: 20472: if (!allow_concurrent) { 20472: 20472: if (insert_with_hint_prefix_extractor_ != nullptr && 20472: insert_with_hint_prefix_extractor_->InDomain(key_slice)) { 20472: Slice prefix = insert_with_hint_prefix_extractor_->Transform(key_slice); 20472: bool res = table->InsertKeyWithHint(handle, &insert_hints_[prefix]); 20472: if ((__builtin_expect((!res), 0))) { 20472: return res; 20472: } 20472: } else { 20472: bool res = table->InsertKey(handle); 20472: if ((__builtin_expect((!res), 0))) { 20472: return res; 20472: } 20472: } 20472: 20472: 20472: 20472: num_entries_.store(num_entries_.load(std::memory_order_relaxed) + 1, 20472: std::memory_order_relaxed); 20472: data_size_.store(data_size_.load(std::memory_order_relaxed) + encoded_len, 20472: std::memory_order_relaxed); 20472: if (type == kTypeDeletion) { 20472: num_deletes_.store(num_deletes_.load(std::memory_order_relaxed) + 1, 20472: std::memory_order_relaxed); 20472: } 20472: 20472: if (bloom_filter_ && prefix_extractor_ && 20472: prefix_extractor_->InDomain(key)) { 20472: bloom_filter_->Add(prefix_extractor_->Transform(key)); 20472: } 20472: if (bloom_filter_ && moptions_.memtable_whole_key_filtering) { 20472: bloom_filter_->Add(StripTimestampFromUserKey(key, ts_sz)); 20472: } 20472: 20472: 20472: 20472: # 539 "db/memtable.cc" 3 4 20472: (static_cast ( 20472: # 539 "db/memtable.cc" 20472: first_seqno_ == 0 || s >= first_seqno_ 20472: # 539 "db/memtable.cc" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 539 "db/memtable.cc" 20472: "first_seqno_ == 0 || s >= first_seqno_" 20472: # 539 "db/memtable.cc" 3 4 20472: , "db/memtable.cc", 539, __extension__ __PRETTY_FUNCTION__)) 20472: # 539 "db/memtable.cc" 20472: ; 20472: if (first_seqno_ == 0) { 20472: first_seqno_.store(s, std::memory_order_relaxed); 20472: 20472: if (earliest_seqno_ == kMaxSequenceNumber) { 20472: earliest_seqno_.store(GetFirstSequenceNumber(), 20472: std::memory_order_relaxed); 20472: } 20472: 20472: # 547 "db/memtable.cc" 3 4 20472: (static_cast ( 20472: # 547 "db/memtable.cc" 20472: first_seqno_.load() >= earliest_seqno_.load() 20472: # 547 "db/memtable.cc" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 547 "db/memtable.cc" 20472: "first_seqno_.load() >= earliest_seqno_.load()" 20472: # 547 "db/memtable.cc" 3 4 20472: , "db/memtable.cc", 547, __extension__ __PRETTY_FUNCTION__)) 20472: # 547 "db/memtable.cc" 20472: ; 20472: } 20472: 20472: # 549 "db/memtable.cc" 3 4 20472: (static_cast ( 20472: # 549 "db/memtable.cc" 20472: post_process_info == nullptr 20472: # 549 "db/memtable.cc" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 549 "db/memtable.cc" 20472: "post_process_info == nullptr" 20472: # 549 "db/memtable.cc" 3 4 20472: , "db/memtable.cc", 549, __extension__ __PRETTY_FUNCTION__)) 20472: # 549 "db/memtable.cc" 20472: ; 20472: UpdateFlushState(); 20472: } else { 20472: bool res = (hint == nullptr) 20472: ? table->InsertKeyConcurrently(handle) 20472: : table->InsertKeyWithHintConcurrently(handle, hint); 20472: if ((__builtin_expect((!res), 0))) { 20472: return res; 20472: } 20472: 20472: 20472: # 559 "db/memtable.cc" 3 4 20472: (static_cast ( 20472: # 559 "db/memtable.cc" 20472: post_process_info != nullptr 20472: # 559 "db/memtable.cc" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 559 "db/memtable.cc" 20472: "post_process_info != nullptr" 20472: # 559 "db/memtable.cc" 3 4 20472: , "db/memtable.cc", 559, __extension__ __PRETTY_FUNCTION__)) 20472: # 559 "db/memtable.cc" 20472: ; 20472: post_process_info->num_entries++; 20472: post_process_info->data_size += encoded_len; 20472: if (type == kTypeDeletion) { 20472: post_process_info->num_deletes++; 20472: } 20472: 20472: if (bloom_filter_ && prefix_extractor_ && 20472: prefix_extractor_->InDomain(key)) { 20472: bloom_filter_->AddConcurrently(prefix_extractor_->Transform(key)); 20472: } 20472: if (bloom_filter_ && moptions_.memtable_whole_key_filtering) { 20472: bloom_filter_->AddConcurrently(StripTimestampFromUserKey(key, ts_sz)); 20472: } 20472: 20472: 20472: uint64_t cur_seq_num = first_seqno_.load(std::memory_order_relaxed); 20472: while ((cur_seq_num == 0 || s < cur_seq_num) && 20472: !first_seqno_.compare_exchange_weak(cur_seq_num, s)) { 20472: } 20472: uint64_t cur_earliest_seqno = 20472: earliest_seqno_.load(std::memory_order_relaxed); 20472: while ( 20472: (cur_earliest_seqno == kMaxSequenceNumber || s < cur_earliest_seqno) && 20472: !first_seqno_.compare_exchange_weak(cur_earliest_seqno, s)) { 20472: } 20472: } 20472: if (type == kTypeRangeDeletion) { 20472: is_range_del_table_empty_.store(false, std::memory_order_relaxed); 20472: } 20472: UpdateOldestKeyTime(); 20472: return true; 20472: } 20472: 20472: 20472: namespace { 20472: 20472: struct Saver { 20472: Status* status; 20472: const LookupKey* key; 20472: bool* found_final_value; 20472: bool* merge_in_progress; 20472: std::string* value; 20472: SequenceNumber seq; 20472: std::string* timestamp; 20472: const MergeOperator* merge_operator; 20472: 20472: MergeContext* merge_context; 20472: SequenceNumber max_covering_tombstone_seq; 20472: MemTable* mem; 20472: Logger* logger; 20472: Statistics* statistics; 20472: bool inplace_update_support; 20472: bool do_merge; 20472: Env* env_; 20472: ReadCallback* callback_; 20472: bool* is_blob_index; 20472: 20472: bool CheckCallback(SequenceNumber _seq) { 20472: if (callback_) { 20472: return callback_->IsVisible(_seq); 20472: } 20472: return true; 20472: } 20472: }; 20472: } 20472: 20472: static bool SaveValue(void* arg, const char* entry) { 20472: Saver* s = reinterpret_cast(arg); 20472: 20472: # 628 "db/memtable.cc" 3 4 20472: (static_cast ( 20472: # 628 "db/memtable.cc" 20472: s != nullptr 20472: # 628 "db/memtable.cc" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 628 "db/memtable.cc" 20472: "s != nullptr" 20472: # 628 "db/memtable.cc" 3 4 20472: , "db/memtable.cc", 628, __extension__ __PRETTY_FUNCTION__)) 20472: # 628 "db/memtable.cc" 20472: ; 20472: MergeContext* merge_context = s->merge_context; 20472: SequenceNumber max_covering_tombstone_seq = s->max_covering_tombstone_seq; 20472: const MergeOperator* merge_operator = s->merge_operator; 20472: 20472: 20472: # 633 "db/memtable.cc" 3 4 20472: (static_cast ( 20472: # 633 "db/memtable.cc" 20472: merge_context != nullptr 20472: # 633 "db/memtable.cc" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 633 "db/memtable.cc" 20472: "merge_context != nullptr" 20472: # 633 "db/memtable.cc" 3 4 20472: , "db/memtable.cc", 633, __extension__ __PRETTY_FUNCTION__)) 20472: # 633 "db/memtable.cc" 20472: ; 20472: # 644 "db/memtable.cc" 20472: uint32_t key_length; 20472: const char* key_ptr = GetVarint32Ptr(entry, entry + 5, &key_length); 20472: Slice user_key_slice = Slice(key_ptr, key_length - 8); 20472: const Comparator* user_comparator = 20472: s->mem->GetInternalKeyComparator().user_comparator(); 20472: size_t ts_sz = user_comparator->timestamp_size(); 20472: if (user_comparator->CompareWithoutTimestamp(user_key_slice, 20472: s->key->user_key()) == 0) { 20472: 20472: const uint64_t tag = DecodeFixed64(key_ptr + key_length - 8); 20472: ValueType type; 20472: SequenceNumber seq; 20472: UnPackSequenceAndType(tag, &seq, &type); 20472: 20472: if (!s->CheckCallback(seq)) { 20472: return true; 20472: } 20472: 20472: s->seq = seq; 20472: 20472: if ((type == kTypeValue || type == kTypeMerge || type == kTypeBlobIndex) && 20472: max_covering_tombstone_seq > seq) { 20472: type = kTypeRangeDeletion; 20472: } 20472: switch (type) { 20472: case kTypeBlobIndex: 20472: if (s->is_blob_index == nullptr) { 20472: rocksdb::Log(InfoLogLevel::ERROR_LEVEL, s->logger, ("[%s:" "671" "] " "Encounter unexpected blob index."), RocksLogShorterFileName("db/memtable.cc")); 20472: *(s->status) = Status::NotSupported( 20472: "Encounter unsupported blob value. Please open DB with " 20472: "ROCKSDB_NAMESPACE::blob_db::BlobDB instead."); 20472: } else if (*(s->merge_in_progress)) { 20472: *(s->status) = 20472: Status::NotSupported("Blob DB does not support merge operator."); 20472: } 20472: if (!s->status->ok()) { 20472: *(s->found_final_value) = true; 20472: return false; 20472: } 20472: [[gnu::fallthrough]]; 20472: case kTypeValue: { 20472: if (s->inplace_update_support) { 20472: s->mem->GetLock(s->key->user_key())->ReadLock(); 20472: } 20472: Slice v = GetLengthPrefixedSlice(key_ptr + key_length); 20472: *(s->status) = Status::OK(); 20472: if (*(s->merge_in_progress)) { 20472: if (s->do_merge) { 20472: if (s->value != nullptr) { 20472: *(s->status) = MergeHelper::TimedFullMerge( 20472: merge_operator, s->key->user_key(), &v, 20472: merge_context->GetOperands(), s->value, s->logger, 20472: s->statistics, s->env_, nullptr , true); 20472: } 20472: } else { 20472: 20472: 20472: merge_context->PushOperand( 20472: v, s->inplace_update_support == false ); 20472: } 20472: } else if (!s->do_merge) { 20472: 20472: 20472: merge_context->PushOperand( 20472: v, s->inplace_update_support == false ); 20472: } else if (s->value != nullptr) { 20472: s->value->assign(v.data(), v.size()); 20472: } 20472: if (s->inplace_update_support) { 20472: s->mem->GetLock(s->key->user_key())->ReadUnlock(); 20472: } 20472: *(s->found_final_value) = true; 20472: if (s->is_blob_index != nullptr) { 20472: *(s->is_blob_index) = (type == kTypeBlobIndex); 20472: } 20472: 20472: if (ts_sz > 0 && s->timestamp != nullptr) { 20472: Slice ts = ExtractTimestampFromUserKey(user_key_slice, ts_sz); 20472: s->timestamp->assign(ts.data(), ts.size()); 20472: } 20472: return false; 20472: } 20472: case kTypeDeletion: 20472: case kTypeDeletionWithTimestamp: 20472: case kTypeSingleDeletion: 20472: case kTypeRangeDeletion: { 20472: if (*(s->merge_in_progress)) { 20472: if (s->value != nullptr) { 20472: *(s->status) = MergeHelper::TimedFullMerge( 20472: merge_operator, s->key->user_key(), nullptr, 20472: merge_context->GetOperands(), s->value, s->logger, 20472: s->statistics, s->env_, nullptr , true); 20472: } 20472: } else { 20472: *(s->status) = Status::NotFound(); 20472: } 20472: *(s->found_final_value) = true; 20472: return false; 20472: } 20472: case kTypeMerge: { 20472: if (!merge_operator) { 20472: *(s->status) = Status::InvalidArgument( 20472: "merge_operator is not properly initialized."); 20472: 20472: 20472: 20472: 20472: *(s->found_final_value) = true; 20472: return false; 20472: } 20472: Slice v = GetLengthPrefixedSlice(key_ptr + key_length); 20472: *(s->merge_in_progress) = true; 20472: merge_context->PushOperand( 20472: v, s->inplace_update_support == false ); 20472: if (s->do_merge && merge_operator->ShouldMerge( 20472: merge_context->GetOperandsDirectionBackward())) { 20472: *(s->status) = MergeHelper::TimedFullMerge( 20472: merge_operator, s->key->user_key(), nullptr, 20472: merge_context->GetOperands(), s->value, s->logger, s->statistics, 20472: s->env_, nullptr , true); 20472: *(s->found_final_value) = true; 20472: return false; 20472: } 20472: return true; 20472: } 20472: default: 20472: 20472: # 770 "db/memtable.cc" 3 4 20472: (static_cast ( 20472: # 770 "db/memtable.cc" 20472: false 20472: # 770 "db/memtable.cc" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 770 "db/memtable.cc" 20472: "false" 20472: # 770 "db/memtable.cc" 3 4 20472: , "db/memtable.cc", 770, __extension__ __PRETTY_FUNCTION__)) 20472: # 770 "db/memtable.cc" 20472: ; 20472: return true; 20472: } 20472: } 20472: 20472: 20472: return false; 20472: } 20472: 20472: bool MemTable::Get(const LookupKey& key, std::string* value, 20472: std::string* timestamp, Status* s, 20472: MergeContext* merge_context, 20472: SequenceNumber* max_covering_tombstone_seq, 20472: SequenceNumber* seq, const ReadOptions& read_opts, 20472: ReadCallback* callback, bool* is_blob_index, bool do_merge) { 20472: 20472: if (IsEmpty()) { 20472: 20472: return false; 20472: } 20472: PerfStepTimer perf_step_timer_get_from_memtable_time(&(perf_context.get_from_memtable_time)); perf_step_timer_get_from_memtable_time.Start();; 20472: 20472: std::unique_ptr range_del_iter( 20472: NewRangeTombstoneIterator(read_opts, 20472: GetInternalKeySeqno(key.internal_key()))); 20472: if (range_del_iter != nullptr) { 20472: *max_covering_tombstone_seq = 20472: std::max(*max_covering_tombstone_seq, 20472: range_del_iter->MaxCoveringTombstoneSeqnum(key.user_key())); 20472: } 20472: 20472: Slice user_key = key.user_key(); 20472: bool found_final_value = false; 20472: bool merge_in_progress = s->IsMergeInProgress(); 20472: bool may_contain = true; 20472: size_t ts_sz = GetInternalKeyComparator().user_comparator()->timestamp_size(); 20472: if (bloom_filter_) { 20472: 20472: 20472: if (moptions_.memtable_whole_key_filtering) { 20472: may_contain = 20472: bloom_filter_->MayContain(StripTimestampFromUserKey(user_key, ts_sz)); 20472: } else { 20472: 20472: # 813 "db/memtable.cc" 3 4 20472: (static_cast ( 20472: # 813 "db/memtable.cc" 20472: prefix_extractor_ 20472: # 813 "db/memtable.cc" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 813 "db/memtable.cc" 20472: "prefix_extractor_" 20472: # 813 "db/memtable.cc" 3 4 20472: , "db/memtable.cc", 813, __extension__ __PRETTY_FUNCTION__)) 20472: # 813 "db/memtable.cc" 20472: ; 20472: may_contain = 20472: !prefix_extractor_->InDomain(user_key) || 20472: bloom_filter_->MayContain(prefix_extractor_->Transform(user_key)); 20472: } 20472: } 20472: 20472: if (bloom_filter_ && !may_contain) { 20472: 20472: if (perf_level >= PerfLevel::kEnableCount) { perf_context.bloom_memtable_miss_count += 1; }; 20472: *seq = kMaxSequenceNumber; 20472: } else { 20472: if (bloom_filter_) { 20472: if (perf_level >= PerfLevel::kEnableCount) { perf_context.bloom_memtable_hit_count += 1; }; 20472: } 20472: GetFromTable(key, *max_covering_tombstone_seq, do_merge, callback, 20472: is_blob_index, value, timestamp, s, merge_context, seq, 20472: &found_final_value, &merge_in_progress); 20472: } 20472: 20472: 20472: if (!found_final_value && merge_in_progress) { 20472: *s = Status::MergeInProgress(); 20472: } 20472: if (perf_level >= PerfLevel::kEnableCount) { perf_context.get_from_memtable_count += 1; }; 20472: return found_final_value; 20472: } 20472: 20472: void MemTable::GetFromTable(const LookupKey& key, 20472: SequenceNumber max_covering_tombstone_seq, 20472: bool do_merge, ReadCallback* callback, 20472: bool* is_blob_index, std::string* value, 20472: std::string* timestamp, Status* s, 20472: MergeContext* merge_context, SequenceNumber* seq, 20472: bool* found_final_value, bool* merge_in_progress) { 20472: Saver saver; 20472: saver.status = s; 20472: saver.found_final_value = found_final_value; 20472: saver.merge_in_progress = merge_in_progress; 20472: saver.key = &key; 20472: saver.value = value; 20472: saver.timestamp = timestamp; 20472: saver.seq = kMaxSequenceNumber; 20472: saver.mem = this; 20472: saver.merge_context = merge_context; 20472: saver.max_covering_tombstone_seq = max_covering_tombstone_seq; 20472: saver.merge_operator = moptions_.merge_operator; 20472: saver.logger = moptions_.info_log; 20472: saver.inplace_update_support = moptions_.inplace_update_support; 20472: saver.statistics = moptions_.statistics; 20472: saver.env_ = env_; 20472: saver.callback_ = callback; 20472: saver.is_blob_index = is_blob_index; 20472: saver.do_merge = do_merge; 20472: table_->Get(key, &saver, SaveValue); 20472: *seq = saver.seq; 20472: } 20472: 20472: void MemTable::MultiGet(const ReadOptions& read_options, MultiGetRange* range, 20472: ReadCallback* callback, bool* is_blob) { 20472: 20472: if (IsEmpty()) { 20472: 20472: return; 20472: } 20472: PerfStepTimer perf_step_timer_get_from_memtable_time(&(perf_context.get_from_memtable_time)); perf_step_timer_get_from_memtable_time.Start();; 20472: 20472: MultiGetRange temp_range(*range, range->begin(), range->end()); 20472: if (bloom_filter_) { 20472: std::array keys; 20472: std::array may_match = {{true}}; 20472: autovector prefixes; 20472: int num_keys = 0; 20472: for (auto iter = temp_range.begin(); iter != temp_range.end(); ++iter) { 20472: if (!prefix_extractor_) { 20472: keys[num_keys++] = &iter->ukey; 20472: } else if (prefix_extractor_->InDomain(iter->ukey)) { 20472: prefixes.emplace_back(prefix_extractor_->Transform(iter->ukey)); 20472: keys[num_keys++] = &prefixes.back(); 20472: } 20472: } 20472: bloom_filter_->MayContain(num_keys, &keys[0], &may_match[0]); 20472: int idx = 0; 20472: for (auto iter = temp_range.begin(); iter != temp_range.end(); ++iter) { 20472: if (prefix_extractor_ && !prefix_extractor_->InDomain(iter->ukey)) { 20472: if (perf_level >= PerfLevel::kEnableCount) { perf_context.bloom_memtable_hit_count += 1; }; 20472: continue; 20472: } 20472: if (!may_match[idx]) { 20472: temp_range.SkipKey(iter); 20472: if (perf_level >= PerfLevel::kEnableCount) { perf_context.bloom_memtable_miss_count += 1; }; 20472: } else { 20472: if (perf_level >= PerfLevel::kEnableCount) { perf_context.bloom_memtable_hit_count += 1; }; 20472: } 20472: idx++; 20472: } 20472: } 20472: for (auto iter = temp_range.begin(); iter != temp_range.end(); ++iter) { 20472: SequenceNumber seq = kMaxSequenceNumber; 20472: bool found_final_value{false}; 20472: bool merge_in_progress = iter->s->IsMergeInProgress(); 20472: std::unique_ptr range_del_iter( 20472: NewRangeTombstoneIterator( 20472: read_options, GetInternalKeySeqno(iter->lkey->internal_key()))); 20472: if (range_del_iter != nullptr) { 20472: iter->max_covering_tombstone_seq = std::max( 20472: iter->max_covering_tombstone_seq, 20472: range_del_iter->MaxCoveringTombstoneSeqnum(iter->lkey->user_key())); 20472: } 20472: GetFromTable(*(iter->lkey), iter->max_covering_tombstone_seq, true, 20472: callback, is_blob, iter->value->GetSelf(), iter->timestamp, 20472: iter->s, &(iter->merge_context), &seq, &found_final_value, 20472: &merge_in_progress); 20472: 20472: if (!found_final_value && merge_in_progress) { 20472: *(iter->s) = Status::MergeInProgress(); 20472: } 20472: 20472: if (found_final_value) { 20472: iter->value->PinSelf(); 20472: range->AddValueSize(iter->value->size()); 20472: range->MarkKeyDone(iter); 20472: RecordTick(moptions_.statistics, MEMTABLE_HIT); 20472: if (range->GetValueSize() > read_options.value_size_soft_limit) { 20472: 20472: for (auto range_iter = range->begin(); range_iter != range->end(); 20472: ++range_iter) { 20472: range->MarkKeyDone(range_iter); 20472: *(range_iter->s) = Status::Aborted(); 20472: } 20472: break; 20472: } 20472: } 20472: } 20472: if (perf_level >= PerfLevel::kEnableCount) { perf_context.get_from_memtable_count += 1; }; 20472: } 20472: 20472: void MemTable::Update(SequenceNumber seq, 20472: const Slice& key, 20472: const Slice& value) { 20472: LookupKey lkey(key, seq); 20472: Slice mem_key = lkey.memtable_key(); 20472: 20472: std::unique_ptr iter( 20472: table_->GetDynamicPrefixIterator()); 20472: iter->Seek(lkey.internal_key(), mem_key.data()); 20472: 20472: if (iter->Valid()) { 20472: # 970 "db/memtable.cc" 20472: const char* entry = iter->key(); 20472: uint32_t key_length = 0; 20472: const char* key_ptr = GetVarint32Ptr(entry, entry + 5, &key_length); 20472: if (comparator_.comparator.user_comparator()->Equal( 20472: Slice(key_ptr, key_length - 8), lkey.user_key())) { 20472: 20472: const uint64_t tag = DecodeFixed64(key_ptr + key_length - 8); 20472: ValueType type; 20472: SequenceNumber existing_seq; 20472: UnPackSequenceAndType(tag, &existing_seq, &type); 20472: 20472: # 980 "db/memtable.cc" 3 4 20472: (static_cast ( 20472: # 980 "db/memtable.cc" 20472: existing_seq != seq 20472: # 980 "db/memtable.cc" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 980 "db/memtable.cc" 20472: "existing_seq != seq" 20472: # 980 "db/memtable.cc" 3 4 20472: , "db/memtable.cc", 980, __extension__ __PRETTY_FUNCTION__)) 20472: # 980 "db/memtable.cc" 20472: ; 20472: if (type == kTypeValue) { 20472: Slice prev_value = GetLengthPrefixedSlice(key_ptr + key_length); 20472: uint32_t prev_size = static_cast(prev_value.size()); 20472: uint32_t new_size = static_cast(value.size()); 20472: 20472: 20472: if (new_size <= prev_size) { 20472: char* p = 20472: EncodeVarint32(const_cast(key_ptr) + key_length, new_size); 20472: WriteLock wl(GetLock(lkey.user_key())); 20472: memcpy(p, value.data(), value.size()); 20472: 20472: # 992 "db/memtable.cc" 3 4 20472: (static_cast ( 20472: # 992 "db/memtable.cc" 20472: (unsigned)((p + value.size()) - entry) == (unsigned)(VarintLength(key_length) + key_length + VarintLength(value.size()) + value.size()) 20472: # 992 "db/memtable.cc" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 992 "db/memtable.cc" 20472: "(unsigned)((p + value.size()) - entry) == (unsigned)(VarintLength(key_length) + key_length + VarintLength(value.size()) + value.size())" 20472: # 992 "db/memtable.cc" 3 4 20472: , "db/memtable.cc", 992, __extension__ __PRETTY_FUNCTION__)) 20472: 20472: 20472: # 994 "db/memtable.cc" 20472: ; 20472: RecordTick(moptions_.statistics, NUMBER_KEYS_UPDATED); 20472: return; 20472: } 20472: } 20472: } 20472: } 20472: 20472: 20472: bool add_res __attribute__((__unused__)); 20472: add_res = Add(seq, kTypeValue, key, value); 20472: 20472: 20472: # 1006 "db/memtable.cc" 3 4 20472: (static_cast ( 20472: # 1006 "db/memtable.cc" 20472: add_res 20472: # 1006 "db/memtable.cc" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 1006 "db/memtable.cc" 20472: "add_res" 20472: # 1006 "db/memtable.cc" 3 4 20472: , "db/memtable.cc", 1006, __extension__ __PRETTY_FUNCTION__)) 20472: # 1006 "db/memtable.cc" 20472: ; 20472: } 20472: 20472: bool MemTable::UpdateCallback(SequenceNumber seq, 20472: const Slice& key, 20472: const Slice& delta) { 20472: LookupKey lkey(key, seq); 20472: Slice memkey = lkey.memtable_key(); 20472: 20472: std::unique_ptr iter( 20472: table_->GetDynamicPrefixIterator()); 20472: iter->Seek(lkey.internal_key(), memkey.data()); 20472: 20472: if (iter->Valid()) { 20472: # 1029 "db/memtable.cc" 20472: const char* entry = iter->key(); 20472: uint32_t key_length = 0; 20472: const char* key_ptr = GetVarint32Ptr(entry, entry + 5, &key_length); 20472: if (comparator_.comparator.user_comparator()->Equal( 20472: Slice(key_ptr, key_length - 8), lkey.user_key())) { 20472: 20472: const uint64_t tag = DecodeFixed64(key_ptr + key_length - 8); 20472: ValueType type; 20472: uint64_t unused; 20472: UnPackSequenceAndType(tag, &unused, &type); 20472: switch (type) { 20472: case kTypeValue: { 20472: Slice prev_value = GetLengthPrefixedSlice(key_ptr + key_length); 20472: uint32_t prev_size = static_cast(prev_value.size()); 20472: 20472: char* prev_buffer = const_cast(prev_value.data()); 20472: uint32_t new_prev_size = prev_size; 20472: 20472: std::string str_value; 20472: WriteLock wl(GetLock(lkey.user_key())); 20472: auto status = moptions_.inplace_callback(prev_buffer, &new_prev_size, 20472: delta, &str_value); 20472: if (status == UpdateStatus::UPDATED_INPLACE) { 20472: 20472: 20472: # 1053 "db/memtable.cc" 3 4 20472: (static_cast ( 20472: # 1053 "db/memtable.cc" 20472: new_prev_size <= prev_size 20472: # 1053 "db/memtable.cc" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 1053 "db/memtable.cc" 20472: "new_prev_size <= prev_size" 20472: # 1053 "db/memtable.cc" 3 4 20472: , "db/memtable.cc", 1053, __extension__ __PRETTY_FUNCTION__)) 20472: # 1053 "db/memtable.cc" 20472: ; 20472: if (new_prev_size < prev_size) { 20472: 20472: char* p = EncodeVarint32(const_cast(key_ptr) + key_length, 20472: new_prev_size); 20472: if (VarintLength(new_prev_size) < VarintLength(prev_size)) { 20472: 20472: memcpy(p, prev_buffer, new_prev_size); 20472: } 20472: } 20472: RecordTick(moptions_.statistics, NUMBER_KEYS_UPDATED); 20472: UpdateFlushState(); 20472: return true; 20472: } else if (status == UpdateStatus::UPDATED) { 20472: Add(seq, kTypeValue, key, Slice(str_value)); 20472: RecordTick(moptions_.statistics, NUMBER_KEYS_WRITTEN); 20472: UpdateFlushState(); 20472: return true; 20472: } else if (status == UpdateStatus::UPDATE_FAILED) { 20472: 20472: UpdateFlushState(); 20472: return true; 20472: } 20472: } 20472: default: 20472: break; 20472: } 20472: } 20472: } 20472: 20472: 20472: return false; 20472: } 20472: 20472: size_t MemTable::CountSuccessiveMergeEntries(const LookupKey& key) { 20472: Slice memkey = key.memtable_key(); 20472: 20472: 20472: 20472: 20472: std::unique_ptr iter( 20472: table_->GetDynamicPrefixIterator()); 20472: iter->Seek(key.internal_key(), memkey.data()); 20472: 20472: size_t num_successive_merges = 0; 20472: 20472: for (; iter->Valid(); iter->Next()) { 20472: const char* entry = iter->key(); 20472: uint32_t key_length = 0; 20472: const char* iter_key_ptr = GetVarint32Ptr(entry, entry + 5, &key_length); 20472: if (!comparator_.comparator.user_comparator()->Equal( 20472: Slice(iter_key_ptr, key_length - 8), key.user_key())) { 20472: break; 20472: } 20472: 20472: const uint64_t tag = DecodeFixed64(iter_key_ptr + key_length - 8); 20472: ValueType type; 20472: uint64_t unused; 20472: UnPackSequenceAndType(tag, &unused, &type); 20472: if (type != kTypeMerge) { 20472: break; 20472: } 20472: 20472: ++num_successive_merges; 20472: } 20472: 20472: return num_successive_merges; 20472: } 20472: 20472: void MemTableRep::Get(const LookupKey& k, void* callback_args, 20472: bool (*callback_func)(void* arg, const char* entry)) { 20472: auto iter = GetDynamicPrefixIterator(); 20472: for (iter->Seek(k.internal_key(), k.memtable_key().data()); 20472: iter->Valid() && callback_func(callback_args, iter->key()); 20472: iter->Next()) { 20472: } 20472: } 20472: 20472: void MemTable::RefLogContainingPrepSection(uint64_t log) { 20472: 20472: # 1132 "db/memtable.cc" 3 4 20472: (static_cast ( 20472: # 1132 "db/memtable.cc" 20472: log > 0 20472: # 1132 "db/memtable.cc" 3 4 20472: ) ? void (0) : __assert_fail ( 20472: # 1132 "db/memtable.cc" 20472: "log > 0" 20472: # 1132 "db/memtable.cc" 3 4 20472: , "db/memtable.cc", 1132, __extension__ __PRETTY_FUNCTION__)) 20472: # 1132 "db/memtable.cc" 20472: ; 20472: auto cur = min_prep_log_referenced_.load(); 20472: while ((log < cur || cur == 0) && 20472: !min_prep_log_referenced_.compare_exchange_strong(cur, log)) { 20472: cur = min_prep_log_referenced_.load(); 20472: } 20472: } 20472: 20472: uint64_t MemTable::GetMinLogContainingPrepSection() { 20472: return min_prep_log_referenced_.load(); 20472: } 20472: 20472: } === END GCC DUMP === make[2]: *** [Makefile:2288: db/memtable.o] Error 1 make[2]: *** Waiting for unfinished jobs.... In file included from /usr/include/c++/10/vector:72, from ./db/builder.h:11, from db/repair.cc:65: /usr/include/c++/10/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {const long long unsigned int&}; _Tp = long long unsigned int; _Alloc = std::allocator]': /usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type 'std::vector::iterator' changed in GCC 7.1 426 | vector<_Tp, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {rocksdb::ReadRequest&}; _Tp = rocksdb::ReadRequest; _Alloc = std::allocator]': /usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type 'std::vector::iterator' changed in GCC 7.1 /usr/include/c++/10/bits/vector.tcc: In member function 'virtual rocksdb::IOStatus rocksdb::LegacyRandomAccessFileWrapper::MultiRead(rocksdb::FSReadRequest*, size_t, const rocksdb::IOOptions&, rocksdb::IODebugContext*)': /usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 121 | _M_realloc_insert(end(), std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {long long unsigned int&, unsigned int, int}; _Tp = rocksdb::FileDescriptor; _Alloc = std::allocator]': /usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type 'std::vector::iterator' changed in GCC 7.1 426 | vector<_Tp, _Alloc>:: | ^~~~~~~~~~~~~~~~~~~ /usr/include/c++/10/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {const rocksdb::FileDescriptor&}; _Tp = rocksdb::FileDescriptor; _Alloc = std::allocator]': /usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type 'std::vector::iterator' changed in GCC 7.1 /usr/include/c++/10/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {int&, rocksdb::FileMetaData}; _Tp = std::pair; _Alloc = std::allocator >]': /usr/include/c++/10/bits/vector.tcc:426:7: note: parameter passing for argument of type 'std::vector >::iterator' changed in GCC 7.1 In file included from /usr/include/c++/10/vector:67, from ./db/builder.h:11, from db/repair.cc:65: /usr/include/c++/10/bits/stl_vector.h: In member function 'rocksdb::Status rocksdb::{anonymous}::Repairer::Run()': /usr/include/c++/10/bits/stl_vector.h:1198:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 1198 | _M_realloc_insert(end(), __x); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/10/vector:72, from ./db/builder.h:11, from db/repair.cc:65: /usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 121 | _M_realloc_insert(end(), std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/10/vector:67, from ./db/builder.h:11, from db/repair.cc:65: /usr/include/c++/10/bits/stl_vector.h:1198:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator >' changed in GCC 7.1 1198 | _M_realloc_insert(end(), __x); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/10/vector:72, from ./db/builder.h:11, from db/repair.cc:65: /usr/include/c++/10/bits/vector.tcc:121:21: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator*, std::vector > >' changed in GCC 7.1 121 | _M_realloc_insert(end(), std::forward<_Args>(__args)...); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ make[2]: Leaving directory '/build/reproducible-path/rocksdb-6.11.4' dh_auto_build: error: make -j3 "INSTALL=install --strip-program=true" all returned exit code 2 make[1]: *** [debian/rules:19: override_dh_auto_build] Error 25 make[1]: Leaving directory '/build/reproducible-path/rocksdb-6.11.4' make: *** [debian/rules:29: build] Error 2 dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 I: copying local configuration E: Failed autobuilding of package I: unmounting dev/ptmx filesystem I: unmounting dev/pts filesystem I: unmounting dev/shm filesystem I: unmounting proc filesystem I: unmounting sys filesystem I: cleaning the build env I: removing directory /srv/workspace/pbuilder/3813 and its subdirectories Mon Jan 8 08:15:38 UTC 2024 W: No second build log, what happened?