Thanks for using Compiler Explorer
Sponsors
Jakt
C++
Ada
Algol68
Analysis
Android Java
Android Kotlin
Assembly
C
C3
Carbon
C with Coccinelle
C++ with Coccinelle
C++ (Circle)
CIRCT
Clean
Clojure
CMake
CMakeScript
COBOL
C++ for OpenCL
MLIR
Cppx
Cppx-Blue
Cppx-Gold
Cpp2-cppfront
Crystal
C#
CUDA C++
D
Dart
Elixir
Erlang
Fortran
F#
GLSL
Go
Haskell
HLSL
Helion
Hook
Hylo
IL
ispc
Java
Julia
Kotlin
LLVM IR
LLVM MIR
Modula-2
Mojo
Nim
Numba
Nix
Objective-C
Objective-C++
OCaml
Odin
OpenCL C
Pascal
Pony
PTX
Python
Racket
Raku
Ruby
Rust
Sail
Snowball
Scala
Slang
Solidity
Spice
SPIR-V
Swift
LLVM TableGen
Toit
Triton
TypeScript Native
V
Vala
Visual Basic
Vyper
WASM
Yul (Solidity IR)
Zig
Javascript
GIMPLE
Ygen
sway
c++ source #1
Output
Compile to binary object
Link to binary
Execute the code
Intel asm syntax
Demangle identifiers
Verbose demangling
Filters
Unused labels
Library functions
Directives
Comments
Horizontal whitespace
Debug intrinsics
Compiler
6502-c++ 11.1.0
ARM GCC 10.2.0
ARM GCC 10.3.0
ARM GCC 10.4.0
ARM GCC 10.5.0
ARM GCC 11.1.0
ARM GCC 11.2.0
ARM GCC 11.3.0
ARM GCC 11.4.0
ARM GCC 12.1.0
ARM GCC 12.2.0
ARM GCC 12.3.0
ARM GCC 12.4.0
ARM GCC 12.5.0
ARM GCC 13.1.0
ARM GCC 13.2.0
ARM GCC 13.2.0 (unknown-eabi)
ARM GCC 13.3.0
ARM GCC 13.3.0 (unknown-eabi)
ARM GCC 13.4.0
ARM GCC 13.4.0 (unknown-eabi)
ARM GCC 14.1.0
ARM GCC 14.1.0 (unknown-eabi)
ARM GCC 14.2.0
ARM GCC 14.2.0 (unknown-eabi)
ARM GCC 14.3.0
ARM GCC 14.3.0 (unknown-eabi)
ARM GCC 15.1.0
ARM GCC 15.1.0 (unknown-eabi)
ARM GCC 15.2.0
ARM GCC 15.2.0 (unknown-eabi)
ARM GCC 4.5.4
ARM GCC 4.6.4
ARM GCC 5.4
ARM GCC 6.3.0
ARM GCC 6.4.0
ARM GCC 7.3.0
ARM GCC 7.5.0
ARM GCC 8.2.0
ARM GCC 8.5.0
ARM GCC 9.3.0
ARM GCC 9.4.0
ARM GCC 9.5.0
ARM GCC trunk
ARM gcc 10.2.1 (none)
ARM gcc 10.3.1 (2021.07 none)
ARM gcc 10.3.1 (2021.10 none)
ARM gcc 11.2.1 (none)
ARM gcc 5.4.1 (none)
ARM gcc 7.2.1 (none)
ARM gcc 8.2 (WinCE)
ARM gcc 8.3.1 (none)
ARM gcc 9.2.1 (none)
ARM msvc v19.0 (ex-WINE)
ARM msvc v19.10 (ex-WINE)
ARM msvc v19.14 (ex-WINE)
ARM64 Morello gcc 10.1 Alpha 2
ARM64 gcc 10.2
ARM64 gcc 10.3
ARM64 gcc 10.4
ARM64 gcc 10.5.0
ARM64 gcc 11.1
ARM64 gcc 11.2
ARM64 gcc 11.3
ARM64 gcc 11.4.0
ARM64 gcc 12.1
ARM64 gcc 12.2.0
ARM64 gcc 12.3.0
ARM64 gcc 12.4.0
ARM64 gcc 12.5.0
ARM64 gcc 13.1.0
ARM64 gcc 13.2.0
ARM64 gcc 13.3.0
ARM64 gcc 13.4.0
ARM64 gcc 14.1.0
ARM64 gcc 14.2.0
ARM64 gcc 14.3.0
ARM64 gcc 15.1.0
ARM64 gcc 15.2.0
ARM64 gcc 4.9.4
ARM64 gcc 5.4
ARM64 gcc 5.5.0
ARM64 gcc 6.3
ARM64 gcc 6.4
ARM64 gcc 7.3
ARM64 gcc 7.5
ARM64 gcc 8.2
ARM64 gcc 8.5
ARM64 gcc 9.3
ARM64 gcc 9.4
ARM64 gcc 9.5
ARM64 gcc trunk
ARM64 msvc v19.14 (ex-WINE)
AVR gcc 10.3.0
AVR gcc 11.1.0
AVR gcc 12.1.0
AVR gcc 12.2.0
AVR gcc 12.3.0
AVR gcc 12.4.0
AVR gcc 12.5.0
AVR gcc 13.1.0
AVR gcc 13.2.0
AVR gcc 13.3.0
AVR gcc 13.4.0
AVR gcc 14.1.0
AVR gcc 14.2.0
AVR gcc 14.3.0
AVR gcc 15.1.0
AVR gcc 15.2.0
AVR gcc 4.5.4
AVR gcc 4.6.4
AVR gcc 5.4.0
AVR gcc 9.2.0
AVR gcc 9.3.0
Arduino Mega (1.8.9)
Arduino Uno (1.8.9)
BPF clang (trunk)
BPF clang 13.0.0
BPF clang 14.0.0
BPF clang 15.0.0
BPF clang 16.0.0
BPF clang 17.0.1
BPF clang 18.1.0
BPF clang 19.1.0
BPF clang 20.1.0
BPF clang 21.1.0
EDG (experimental reflection)
EDG 6.5
EDG 6.5 (GNU mode gcc 13)
EDG 6.6
EDG 6.6 (GNU mode gcc 13)
EDG 6.7
EDG 6.7 (GNU mode gcc 14)
EDG 6.8
EDG 6.8 (GNU mode gcc 15)
FRC 2019
FRC 2020
FRC 2023
HPPA gcc 14.2.0
HPPA gcc 14.3.0
HPPA gcc 15.1.0
HPPA gcc 15.2.0
KVX ACB 4.1.0 (GCC 7.5.0)
KVX ACB 4.1.0-cd1 (GCC 7.5.0)
KVX ACB 4.10.0 (GCC 10.3.1)
KVX ACB 4.11.1 (GCC 10.3.1)
KVX ACB 4.12.0 (GCC 11.3.0)
KVX ACB 4.2.0 (GCC 7.5.0)
KVX ACB 4.3.0 (GCC 7.5.0)
KVX ACB 4.4.0 (GCC 7.5.0)
KVX ACB 4.6.0 (GCC 9.4.1)
KVX ACB 4.8.0 (GCC 9.4.1)
KVX ACB 4.9.0 (GCC 9.4.1)
KVX ACB 5.0.0 (GCC 12.2.1)
KVX ACB 5.2.0 (GCC 13.2.1)
LoongArch64 clang (trunk)
LoongArch64 clang 17.0.1
LoongArch64 clang 18.1.0
LoongArch64 clang 19.1.0
LoongArch64 clang 20.1.0
LoongArch64 clang 21.1.0
M68K gcc 13.1.0
M68K gcc 13.2.0
M68K gcc 13.3.0
M68K gcc 13.4.0
M68K gcc 14.1.0
M68K gcc 14.2.0
M68K gcc 14.3.0
M68K gcc 15.1.0
M68K gcc 15.2.0
M68k clang (trunk)
MRISC32 gcc (trunk)
MSP430 gcc 4.5.3
MSP430 gcc 5.3.0
MSP430 gcc 6.2.1
MinGW clang 14.0.3
MinGW clang 14.0.6
MinGW clang 15.0.7
MinGW clang 16.0.0
MinGW clang 16.0.2
MinGW gcc 11.3.0
MinGW gcc 12.1.0
MinGW gcc 12.2.0
MinGW gcc 13.1.0
MinGW gcc 14.3.0
MinGW gcc 15.2.0
RISC-V (32-bits) gcc (trunk)
RISC-V (32-bits) gcc 10.2.0
RISC-V (32-bits) gcc 10.3.0
RISC-V (32-bits) gcc 11.2.0
RISC-V (32-bits) gcc 11.3.0
RISC-V (32-bits) gcc 11.4.0
RISC-V (32-bits) gcc 12.1.0
RISC-V (32-bits) gcc 12.2.0
RISC-V (32-bits) gcc 12.3.0
RISC-V (32-bits) gcc 12.4.0
RISC-V (32-bits) gcc 12.5.0
RISC-V (32-bits) gcc 13.1.0
RISC-V (32-bits) gcc 13.2.0
RISC-V (32-bits) gcc 13.3.0
RISC-V (32-bits) gcc 13.4.0
RISC-V (32-bits) gcc 14.1.0
RISC-V (32-bits) gcc 14.2.0
RISC-V (32-bits) gcc 14.3.0
RISC-V (32-bits) gcc 15.1.0
RISC-V (32-bits) gcc 15.2.0
RISC-V (32-bits) gcc 8.2.0
RISC-V (32-bits) gcc 8.5.0
RISC-V (32-bits) gcc 9.4.0
RISC-V (64-bits) gcc (trunk)
RISC-V (64-bits) gcc 10.2.0
RISC-V (64-bits) gcc 10.3.0
RISC-V (64-bits) gcc 11.2.0
RISC-V (64-bits) gcc 11.3.0
RISC-V (64-bits) gcc 11.4.0
RISC-V (64-bits) gcc 12.1.0
RISC-V (64-bits) gcc 12.2.0
RISC-V (64-bits) gcc 12.3.0
RISC-V (64-bits) gcc 12.4.0
RISC-V (64-bits) gcc 12.5.0
RISC-V (64-bits) gcc 13.1.0
RISC-V (64-bits) gcc 13.2.0
RISC-V (64-bits) gcc 13.3.0
RISC-V (64-bits) gcc 13.4.0
RISC-V (64-bits) gcc 14.1.0
RISC-V (64-bits) gcc 14.2.0
RISC-V (64-bits) gcc 14.3.0
RISC-V (64-bits) gcc 15.1.0
RISC-V (64-bits) gcc 15.2.0
RISC-V (64-bits) gcc 8.2.0
RISC-V (64-bits) gcc 8.5.0
RISC-V (64-bits) gcc 9.4.0
RISC-V rv32gc clang (trunk)
RISC-V rv32gc clang 10.0.0
RISC-V rv32gc clang 10.0.1
RISC-V rv32gc clang 11.0.0
RISC-V rv32gc clang 11.0.1
RISC-V rv32gc clang 12.0.0
RISC-V rv32gc clang 12.0.1
RISC-V rv32gc clang 13.0.0
RISC-V rv32gc clang 13.0.1
RISC-V rv32gc clang 14.0.0
RISC-V rv32gc clang 15.0.0
RISC-V rv32gc clang 16.0.0
RISC-V rv32gc clang 17.0.1
RISC-V rv32gc clang 18.1.0
RISC-V rv32gc clang 19.1.0
RISC-V rv32gc clang 20.1.0
RISC-V rv32gc clang 21.1.0
RISC-V rv32gc clang 9.0.0
RISC-V rv32gc clang 9.0.1
RISC-V rv64gc clang (trunk)
RISC-V rv64gc clang 10.0.0
RISC-V rv64gc clang 10.0.1
RISC-V rv64gc clang 11.0.0
RISC-V rv64gc clang 11.0.1
RISC-V rv64gc clang 12.0.0
RISC-V rv64gc clang 12.0.1
RISC-V rv64gc clang 13.0.0
RISC-V rv64gc clang 13.0.1
RISC-V rv64gc clang 14.0.0
RISC-V rv64gc clang 15.0.0
RISC-V rv64gc clang 16.0.0
RISC-V rv64gc clang 17.0.1
RISC-V rv64gc clang 18.1.0
RISC-V rv64gc clang 19.1.0
RISC-V rv64gc clang 20.1.0
RISC-V rv64gc clang 21.1.0
RISC-V rv64gc clang 9.0.0
RISC-V rv64gc clang 9.0.1
Raspbian Buster
Raspbian Stretch
SPARC LEON gcc 12.2.0
SPARC LEON gcc 12.3.0
SPARC LEON gcc 12.4.0
SPARC LEON gcc 12.5.0
SPARC LEON gcc 13.1.0
SPARC LEON gcc 13.2.0
SPARC LEON gcc 13.3.0
SPARC LEON gcc 13.4.0
SPARC LEON gcc 14.1.0
SPARC LEON gcc 14.2.0
SPARC LEON gcc 14.3.0
SPARC LEON gcc 15.1.0
SPARC LEON gcc 15.2.0
SPARC gcc 12.2.0
SPARC gcc 12.3.0
SPARC gcc 12.4.0
SPARC gcc 12.5.0
SPARC gcc 13.1.0
SPARC gcc 13.2.0
SPARC gcc 13.3.0
SPARC gcc 13.4.0
SPARC gcc 14.1.0
SPARC gcc 14.2.0
SPARC gcc 14.3.0
SPARC gcc 15.1.0
SPARC gcc 15.2.0
SPARC64 gcc 12.2.0
SPARC64 gcc 12.3.0
SPARC64 gcc 12.4.0
SPARC64 gcc 12.5.0
SPARC64 gcc 13.1.0
SPARC64 gcc 13.2.0
SPARC64 gcc 13.3.0
SPARC64 gcc 13.4.0
SPARC64 gcc 14.1.0
SPARC64 gcc 14.2.0
SPARC64 gcc 14.3.0
SPARC64 gcc 15.1.0
SPARC64 gcc 15.2.0
TI C6x gcc 12.2.0
TI C6x gcc 12.3.0
TI C6x gcc 12.4.0
TI C6x gcc 12.5.0
TI C6x gcc 13.1.0
TI C6x gcc 13.2.0
TI C6x gcc 13.3.0
TI C6x gcc 13.4.0
TI C6x gcc 14.1.0
TI C6x gcc 14.2.0
TI C6x gcc 14.3.0
TI C6x gcc 15.1.0
TI C6x gcc 15.2.0
TI CL430 21.6.1
Tricore gcc 11.3.0 (EEESlab)
VAX gcc NetBSDELF 10.4.0
VAX gcc NetBSDELF 10.5.0 (Nov 15 03:50:22 2023)
VAX gcc NetBSDELF 12.4.0 (Apr 16 05:27 2025)
WebAssembly clang (trunk)
Xtensa ESP32 gcc 11.2.0 (2022r1)
Xtensa ESP32 gcc 12.2.0 (20230208)
Xtensa ESP32 gcc 14.2.0 (20241119)
Xtensa ESP32 gcc 8.2.0 (2019r2)
Xtensa ESP32 gcc 8.2.0 (2020r1)
Xtensa ESP32 gcc 8.2.0 (2020r2)
Xtensa ESP32 gcc 8.4.0 (2020r3)
Xtensa ESP32 gcc 8.4.0 (2021r1)
Xtensa ESP32 gcc 8.4.0 (2021r2)
Xtensa ESP32-S2 gcc 11.2.0 (2022r1)
Xtensa ESP32-S2 gcc 12.2.0 (20230208)
Xtensa ESP32-S2 gcc 14.2.0 (20241119)
Xtensa ESP32-S2 gcc 8.2.0 (2019r2)
Xtensa ESP32-S2 gcc 8.2.0 (2020r1)
Xtensa ESP32-S2 gcc 8.2.0 (2020r2)
Xtensa ESP32-S2 gcc 8.4.0 (2020r3)
Xtensa ESP32-S2 gcc 8.4.0 (2021r1)
Xtensa ESP32-S2 gcc 8.4.0 (2021r2)
Xtensa ESP32-S3 gcc 11.2.0 (2022r1)
Xtensa ESP32-S3 gcc 12.2.0 (20230208)
Xtensa ESP32-S3 gcc 14.2.0 (20241119)
Xtensa ESP32-S3 gcc 8.4.0 (2020r3)
Xtensa ESP32-S3 gcc 8.4.0 (2021r1)
Xtensa ESP32-S3 gcc 8.4.0 (2021r2)
arm64 msvc v19.20 VS16.0
arm64 msvc v19.21 VS16.1
arm64 msvc v19.22 VS16.2
arm64 msvc v19.23 VS16.3
arm64 msvc v19.24 VS16.4
arm64 msvc v19.25 VS16.5
arm64 msvc v19.27 VS16.7
arm64 msvc v19.28 VS16.8
arm64 msvc v19.28 VS16.9
arm64 msvc v19.29 VS16.10
arm64 msvc v19.29 VS16.11
arm64 msvc v19.30 VS17.0
arm64 msvc v19.31 VS17.1
arm64 msvc v19.32 VS17.2
arm64 msvc v19.33 VS17.3
arm64 msvc v19.34 VS17.4
arm64 msvc v19.35 VS17.5
arm64 msvc v19.36 VS17.6
arm64 msvc v19.37 VS17.7
arm64 msvc v19.38 VS17.8
arm64 msvc v19.39 VS17.9
arm64 msvc v19.40 VS17.10
arm64 msvc v19.41 VS17.11
arm64 msvc v19.42 VS17.12
arm64 msvc v19.43 VS17.13
arm64 msvc v19.44 VS17.14
arm64 msvc v19.latest
armv7-a clang (trunk)
armv7-a clang 10.0.0
armv7-a clang 10.0.1
armv7-a clang 11.0.0
armv7-a clang 11.0.1
armv7-a clang 12.0.0
armv7-a clang 12.0.1
armv7-a clang 13.0.0
armv7-a clang 13.0.1
armv7-a clang 14.0.0
armv7-a clang 15.0.0
armv7-a clang 16.0.0
armv7-a clang 17.0.1
armv7-a clang 18.1.0
armv7-a clang 19.1.0
armv7-a clang 20.1.0
armv7-a clang 21.1.0
armv7-a clang 9.0.0
armv7-a clang 9.0.1
armv8-a clang (all architectural features, trunk)
armv8-a clang (trunk)
armv8-a clang 10.0.0
armv8-a clang 10.0.1
armv8-a clang 11.0.0
armv8-a clang 11.0.1
armv8-a clang 12.0.0
armv8-a clang 13.0.0
armv8-a clang 14.0.0
armv8-a clang 15.0.0
armv8-a clang 16.0.0
armv8-a clang 17.0.1
armv8-a clang 18.1.0
armv8-a clang 19.1.0
armv8-a clang 20.1.0
armv8-a clang 21.1.0
armv8-a clang 9.0.0
armv8-a clang 9.0.1
clad trunk (clang 21.1.0)
clad v1.10 (clang 20.1.0)
clad v1.8 (clang 18.1.0)
clad v1.9 (clang 19.1.0)
clad v2.00 (clang 20.1.0)
clad v2.1 (clang 21.1.0)
clad v2.2 (clang 21.1.0)
clang-cl 18.1.0
ellcc 0.1.33
ellcc 0.1.34
ellcc 2017-07-16
ez80-clang 15.0.0
ez80-clang 15.0.7
hexagon-clang 16.0.5
llvm-mos atari2600-3e
llvm-mos atari2600-4k
llvm-mos atari2600-common
llvm-mos atari5200-supercart
llvm-mos atari8-cart-megacart
llvm-mos atari8-cart-std
llvm-mos atari8-cart-xegs
llvm-mos atari8-common
llvm-mos atari8-dos
llvm-mos c128
llvm-mos c64
llvm-mos commodore
llvm-mos cpm65
llvm-mos cx16
llvm-mos dodo
llvm-mos eater
llvm-mos mega65
llvm-mos nes
llvm-mos nes-action53
llvm-mos nes-cnrom
llvm-mos nes-gtrom
llvm-mos nes-mmc1
llvm-mos nes-mmc3
llvm-mos nes-nrom
llvm-mos nes-unrom
llvm-mos nes-unrom-512
llvm-mos osi-c1p
llvm-mos pce
llvm-mos pce-cd
llvm-mos pce-common
llvm-mos pet
llvm-mos rp6502
llvm-mos rpc8e
llvm-mos supervision
llvm-mos vic20
loongarch64 gcc 12.2.0
loongarch64 gcc 12.3.0
loongarch64 gcc 12.4.0
loongarch64 gcc 12.5.0
loongarch64 gcc 13.1.0
loongarch64 gcc 13.2.0
loongarch64 gcc 13.3.0
loongarch64 gcc 13.4.0
loongarch64 gcc 14.1.0
loongarch64 gcc 14.2.0
loongarch64 gcc 14.3.0
loongarch64 gcc 15.1.0
loongarch64 gcc 15.2.0
mips clang 13.0.0
mips clang 14.0.0
mips clang 15.0.0
mips clang 16.0.0
mips clang 17.0.1
mips clang 18.1.0
mips clang 19.1.0
mips clang 20.1.0
mips clang 21.1.0
mips gcc 11.2.0
mips gcc 12.1.0
mips gcc 12.2.0
mips gcc 12.3.0
mips gcc 12.4.0
mips gcc 12.5.0
mips gcc 13.1.0
mips gcc 13.2.0
mips gcc 13.3.0
mips gcc 13.4.0
mips gcc 14.1.0
mips gcc 14.2.0
mips gcc 14.3.0
mips gcc 15.1.0
mips gcc 15.2.0
mips gcc 4.9.4
mips gcc 5.4
mips gcc 5.5.0
mips gcc 9.3.0 (codescape)
mips gcc 9.5.0
mips64 (el) gcc 12.1.0
mips64 (el) gcc 12.2.0
mips64 (el) gcc 12.3.0
mips64 (el) gcc 12.4.0
mips64 (el) gcc 12.5.0
mips64 (el) gcc 13.1.0
mips64 (el) gcc 13.2.0
mips64 (el) gcc 13.3.0
mips64 (el) gcc 13.4.0
mips64 (el) gcc 14.1.0
mips64 (el) gcc 14.2.0
mips64 (el) gcc 14.3.0
mips64 (el) gcc 15.1.0
mips64 (el) gcc 15.2.0
mips64 (el) gcc 4.9.4
mips64 (el) gcc 5.4.0
mips64 (el) gcc 5.5.0
mips64 (el) gcc 9.5.0
mips64 clang 13.0.0
mips64 clang 14.0.0
mips64 clang 15.0.0
mips64 clang 16.0.0
mips64 clang 17.0.1
mips64 clang 18.1.0
mips64 clang 19.1.0
mips64 clang 20.1.0
mips64 clang 21.1.0
mips64 gcc 11.2.0
mips64 gcc 12.1.0
mips64 gcc 12.2.0
mips64 gcc 12.3.0
mips64 gcc 12.4.0
mips64 gcc 12.5.0
mips64 gcc 13.1.0
mips64 gcc 13.2.0
mips64 gcc 13.3.0
mips64 gcc 13.4.0
mips64 gcc 14.1.0
mips64 gcc 14.2.0
mips64 gcc 14.3.0
mips64 gcc 15.1.0
mips64 gcc 15.2.0
mips64 gcc 4.9.4
mips64 gcc 5.4.0
mips64 gcc 5.5.0
mips64 gcc 9.5.0
mips64el clang 13.0.0
mips64el clang 14.0.0
mips64el clang 15.0.0
mips64el clang 16.0.0
mips64el clang 17.0.1
mips64el clang 18.1.0
mips64el clang 19.1.0
mips64el clang 20.1.0
mips64el clang 21.1.0
mipsel clang 13.0.0
mipsel clang 14.0.0
mipsel clang 15.0.0
mipsel clang 16.0.0
mipsel clang 17.0.1
mipsel clang 18.1.0
mipsel clang 19.1.0
mipsel clang 20.1.0
mipsel clang 21.1.0
mipsel gcc 12.1.0
mipsel gcc 12.2.0
mipsel gcc 12.3.0
mipsel gcc 12.4.0
mipsel gcc 12.5.0
mipsel gcc 13.1.0
mipsel gcc 13.2.0
mipsel gcc 13.3.0
mipsel gcc 13.4.0
mipsel gcc 14.1.0
mipsel gcc 14.2.0
mipsel gcc 14.3.0
mipsel gcc 15.1.0
mipsel gcc 15.2.0
mipsel gcc 4.9.4
mipsel gcc 5.4.0
mipsel gcc 5.5.0
mipsel gcc 9.5.0
nanoMIPS gcc 6.3.0 (mtk)
power gcc 11.2.0
power gcc 12.1.0
power gcc 12.2.0
power gcc 12.3.0
power gcc 12.4.0
power gcc 12.5.0
power gcc 13.1.0
power gcc 13.2.0
power gcc 13.3.0
power gcc 13.4.0
power gcc 14.1.0
power gcc 14.2.0
power gcc 14.3.0
power gcc 15.1.0
power gcc 15.2.0
power gcc 4.8.5
power64 AT12.0 (gcc8)
power64 AT13.0 (gcc9)
power64 gcc 11.2.0
power64 gcc 12.1.0
power64 gcc 12.2.0
power64 gcc 12.3.0
power64 gcc 12.4.0
power64 gcc 12.5.0
power64 gcc 13.1.0
power64 gcc 13.2.0
power64 gcc 13.3.0
power64 gcc 13.4.0
power64 gcc 14.1.0
power64 gcc 14.2.0
power64 gcc 14.3.0
power64 gcc 15.1.0
power64 gcc 15.2.0
power64 gcc trunk
power64le AT12.0 (gcc8)
power64le AT13.0 (gcc9)
power64le clang (trunk)
power64le gcc 11.2.0
power64le gcc 12.1.0
power64le gcc 12.2.0
power64le gcc 12.3.0
power64le gcc 12.4.0
power64le gcc 12.5.0
power64le gcc 13.1.0
power64le gcc 13.2.0
power64le gcc 13.3.0
power64le gcc 13.4.0
power64le gcc 14.1.0
power64le gcc 14.2.0
power64le gcc 14.3.0
power64le gcc 15.1.0
power64le gcc 15.2.0
power64le gcc 6.3.0
power64le gcc trunk
powerpc64 clang (trunk)
qnx 8.0.0
s390x gcc 11.2.0
s390x gcc 12.1.0
s390x gcc 12.2.0
s390x gcc 12.3.0
s390x gcc 12.4.0
s390x gcc 12.5.0
s390x gcc 13.1.0
s390x gcc 13.2.0
s390x gcc 13.3.0
s390x gcc 13.4.0
s390x gcc 14.1.0
s390x gcc 14.2.0
s390x gcc 14.3.0
s390x gcc 15.1.0
s390x gcc 15.2.0
sh gcc 12.2.0
sh gcc 12.3.0
sh gcc 12.4.0
sh gcc 12.5.0
sh gcc 13.1.0
sh gcc 13.2.0
sh gcc 13.3.0
sh gcc 13.4.0
sh gcc 14.1.0
sh gcc 14.2.0
sh gcc 14.3.0
sh gcc 15.1.0
sh gcc 15.2.0
sh gcc 4.9.4
sh gcc 9.5.0
vast (trunk)
x64 msvc v19.0 (ex-WINE)
x64 msvc v19.10 (ex-WINE)
x64 msvc v19.14 (ex-WINE)
x64 msvc v19.20 VS16.0
x64 msvc v19.21 VS16.1
x64 msvc v19.22 VS16.2
x64 msvc v19.23 VS16.3
x64 msvc v19.24 VS16.4
x64 msvc v19.25 VS16.5
x64 msvc v19.27 VS16.7
x64 msvc v19.28 VS16.8
x64 msvc v19.28 VS16.9
x64 msvc v19.29 VS16.10
x64 msvc v19.29 VS16.11
x64 msvc v19.30 VS17.0
x64 msvc v19.31 VS17.1
x64 msvc v19.32 VS17.2
x64 msvc v19.33 VS17.3
x64 msvc v19.34 VS17.4
x64 msvc v19.35 VS17.5
x64 msvc v19.36 VS17.6
x64 msvc v19.37 VS17.7
x64 msvc v19.38 VS17.8
x64 msvc v19.39 VS17.9
x64 msvc v19.40 VS17.10
x64 msvc v19.41 VS17.11
x64 msvc v19.42 VS17.12
x64 msvc v19.43 VS17.13
x64 msvc v19.44 VS17.14
x64 msvc v19.latest
x86 djgpp 4.9.4
x86 djgpp 5.5.0
x86 djgpp 6.4.0
x86 djgpp 7.2.0
x86 g++ 1.27
x86 msvc v19.0 (ex-WINE)
x86 msvc v19.10 (ex-WINE)
x86 msvc v19.14 (ex-WINE)
x86 msvc v19.20 VS16.0
x86 msvc v19.21 VS16.1
x86 msvc v19.22 VS16.2
x86 msvc v19.23 VS16.3
x86 msvc v19.24 VS16.4
x86 msvc v19.25 VS16.5
x86 msvc v19.27 VS16.7
x86 msvc v19.28 VS16.8
x86 msvc v19.28 VS16.9
x86 msvc v19.29 VS16.10
x86 msvc v19.29 VS16.11
x86 msvc v19.30 VS17.0
x86 msvc v19.31 VS17.1
x86 msvc v19.32 VS17.2
x86 msvc v19.33 VS17.3
x86 msvc v19.34 VS17.4
x86 msvc v19.35 VS17.5
x86 msvc v19.36 VS17.6
x86 msvc v19.37 VS17.7
x86 msvc v19.38 VS17.8
x86 msvc v19.39 VS17.9
x86 msvc v19.40 VS17.10
x86 msvc v19.41 VS17.11
x86 msvc v19.42 VS17.12
x86 msvc v19.43 VS17.13
x86 msvc v19.44 VS17.14
x86 msvc v19.latest
x86 nvc++ 22.11
x86 nvc++ 22.7
x86 nvc++ 22.9
x86 nvc++ 23.1
x86 nvc++ 23.11
x86 nvc++ 23.3
x86 nvc++ 23.5
x86 nvc++ 23.7
x86 nvc++ 23.9
x86 nvc++ 24.1
x86 nvc++ 24.11
x86 nvc++ 24.3
x86 nvc++ 24.5
x86 nvc++ 24.7
x86 nvc++ 24.9
x86 nvc++ 25.1
x86 nvc++ 25.11
x86 nvc++ 25.3
x86 nvc++ 25.5
x86 nvc++ 25.7
x86 nvc++ 25.9
x86-64 Zapcc 190308
x86-64 clang (-fimplicit-constexpr)
x86-64 clang (Chris Bazley N3089)
x86-64 clang (EricWF contracts)
x86-64 clang (amd-staging)
x86-64 clang (assertions trunk)
x86-64 clang (clangir)
x86-64 clang (experimental -Wlifetime)
x86-64 clang (experimental P1061)
x86-64 clang (experimental P1144)
x86-64 clang (experimental P1221)
x86-64 clang (experimental P2561)
x86-64 clang (experimental P2998)
x86-64 clang (experimental P3068)
x86-64 clang (experimental P3309)
x86-64 clang (experimental P3334)
x86-64 clang (experimental P3367)
x86-64 clang (experimental P3372)
x86-64 clang (experimental P3385)
x86-64 clang (experimental P3776)
x86-64 clang (experimental metaprogramming - P2632)
x86-64 clang (old concepts branch)
x86-64 clang (p1974)
x86-64 clang (pattern matching - P2688)
x86-64 clang (reflection - C++26)
x86-64 clang (reflection - TS)
x86-64 clang (resugar)
x86-64 clang (string interpolation - P3412)
x86-64 clang (thephd.dev)
x86-64 clang (trunk)
x86-64 clang (variadic friends - P2893)
x86-64 clang (widberg)
x86-64 clang 10.0.0
x86-64 clang 10.0.0 (assertions)
x86-64 clang 10.0.1
x86-64 clang 11.0.0
x86-64 clang 11.0.0 (assertions)
x86-64 clang 11.0.1
x86-64 clang 12.0.0
x86-64 clang 12.0.0 (assertions)
x86-64 clang 12.0.1
x86-64 clang 13.0.0
x86-64 clang 13.0.0 (assertions)
x86-64 clang 13.0.1
x86-64 clang 14.0.0
x86-64 clang 14.0.0 (assertions)
x86-64 clang 15.0.0
x86-64 clang 15.0.0 (assertions)
x86-64 clang 16.0.0
x86-64 clang 16.0.0 (assertions)
x86-64 clang 17.0.1
x86-64 clang 17.0.1 (assertions)
x86-64 clang 18.1.0
x86-64 clang 18.1.0 (assertions)
x86-64 clang 19.1.0
x86-64 clang 19.1.0 (assertions)
x86-64 clang 2.6.0 (assertions)
x86-64 clang 2.7.0 (assertions)
x86-64 clang 2.8.0 (assertions)
x86-64 clang 2.9.0 (assertions)
x86-64 clang 20.1.0
x86-64 clang 20.1.0 (assertions)
x86-64 clang 21.1.0
x86-64 clang 21.1.0 (assertions)
x86-64 clang 3.0.0
x86-64 clang 3.0.0 (assertions)
x86-64 clang 3.1
x86-64 clang 3.1 (assertions)
x86-64 clang 3.2
x86-64 clang 3.2 (assertions)
x86-64 clang 3.3
x86-64 clang 3.3 (assertions)
x86-64 clang 3.4 (assertions)
x86-64 clang 3.4.1
x86-64 clang 3.5
x86-64 clang 3.5 (assertions)
x86-64 clang 3.5.1
x86-64 clang 3.5.2
x86-64 clang 3.6
x86-64 clang 3.6 (assertions)
x86-64 clang 3.7
x86-64 clang 3.7 (assertions)
x86-64 clang 3.7.1
x86-64 clang 3.8
x86-64 clang 3.8 (assertions)
x86-64 clang 3.8.1
x86-64 clang 3.9.0
x86-64 clang 3.9.0 (assertions)
x86-64 clang 3.9.1
x86-64 clang 4.0.0
x86-64 clang 4.0.0 (assertions)
x86-64 clang 4.0.1
x86-64 clang 5.0.0
x86-64 clang 5.0.0 (assertions)
x86-64 clang 5.0.1
x86-64 clang 5.0.2
x86-64 clang 6.0.0
x86-64 clang 6.0.0 (assertions)
x86-64 clang 6.0.1
x86-64 clang 7.0.0
x86-64 clang 7.0.0 (assertions)
x86-64 clang 7.0.1
x86-64 clang 7.1.0
x86-64 clang 8.0.0
x86-64 clang 8.0.0 (assertions)
x86-64 clang 8.0.1
x86-64 clang 9.0.0
x86-64 clang 9.0.0 (assertions)
x86-64 clang 9.0.1
x86-64 clang rocm-4.5.2
x86-64 clang rocm-5.0.2
x86-64 clang rocm-5.1.3
x86-64 clang rocm-5.2.3
x86-64 clang rocm-5.3.3
x86-64 clang rocm-5.7.0
x86-64 clang rocm-6.0.2
x86-64 clang rocm-6.1.2
x86-64 clang rocm-6.2.4
x86-64 clang rocm-6.3.3
x86-64 clang rocm-6.4.0
x86-64 clang rocm-7.0.1
x86-64 gcc (C++26 contracts + GNU extensions)
x86-64 gcc (C++26 contracts)
x86-64 gcc (C++26 reflection)
x86-64 gcc (P2034 lambdas)
x86-64 gcc (Thomas Healy)
x86-64 gcc (contract labels)
x86-64 gcc (contracts natural syntax)
x86-64 gcc (contracts)
x86-64 gcc (coroutines)
x86-64 gcc (modules)
x86-64 gcc (trunk)
x86-64 gcc 10.1
x86-64 gcc 10.2
x86-64 gcc 10.3
x86-64 gcc 10.3 (assertions)
x86-64 gcc 10.4
x86-64 gcc 10.4 (assertions)
x86-64 gcc 10.5
x86-64 gcc 10.5 (assertions)
x86-64 gcc 11.1
x86-64 gcc 11.1 (assertions)
x86-64 gcc 11.2
x86-64 gcc 11.2 (assertions)
x86-64 gcc 11.3
x86-64 gcc 11.3 (assertions)
x86-64 gcc 11.4
x86-64 gcc 11.4 (assertions)
x86-64 gcc 12.1
x86-64 gcc 12.1 (assertions)
x86-64 gcc 12.2
x86-64 gcc 12.2 (assertions)
x86-64 gcc 12.3
x86-64 gcc 12.3 (assertions)
x86-64 gcc 12.4
x86-64 gcc 12.4 (assertions)
x86-64 gcc 12.5
x86-64 gcc 12.5 (assertions)
x86-64 gcc 13.1
x86-64 gcc 13.1 (assertions)
x86-64 gcc 13.2
x86-64 gcc 13.2 (assertions)
x86-64 gcc 13.3
x86-64 gcc 13.3 (assertions)
x86-64 gcc 13.4
x86-64 gcc 13.4 (assertions)
x86-64 gcc 14.1
x86-64 gcc 14.1 (assertions)
x86-64 gcc 14.2
x86-64 gcc 14.2 (assertions)
x86-64 gcc 14.3
x86-64 gcc 14.3 (assertions)
x86-64 gcc 15.1
x86-64 gcc 15.1 (assertions)
x86-64 gcc 15.2
x86-64 gcc 15.2 (assertions)
x86-64 gcc 3.4.6
x86-64 gcc 4.0.4
x86-64 gcc 4.1.2
x86-64 gcc 4.4.7
x86-64 gcc 4.5.3
x86-64 gcc 4.6.4
x86-64 gcc 4.7.1
x86-64 gcc 4.7.2
x86-64 gcc 4.7.3
x86-64 gcc 4.7.4
x86-64 gcc 4.8.1
x86-64 gcc 4.8.2
x86-64 gcc 4.8.3
x86-64 gcc 4.8.4
x86-64 gcc 4.8.5
x86-64 gcc 4.9.0
x86-64 gcc 4.9.1
x86-64 gcc 4.9.2
x86-64 gcc 4.9.3
x86-64 gcc 4.9.4
x86-64 gcc 5.1
x86-64 gcc 5.2
x86-64 gcc 5.3
x86-64 gcc 5.4
x86-64 gcc 5.5
x86-64 gcc 6.1
x86-64 gcc 6.2
x86-64 gcc 6.3
x86-64 gcc 6.4
x86-64 gcc 6.5
x86-64 gcc 7.1
x86-64 gcc 7.2
x86-64 gcc 7.3
x86-64 gcc 7.4
x86-64 gcc 7.5
x86-64 gcc 8.1
x86-64 gcc 8.2
x86-64 gcc 8.3
x86-64 gcc 8.4
x86-64 gcc 8.5
x86-64 gcc 9.1
x86-64 gcc 9.2
x86-64 gcc 9.3
x86-64 gcc 9.4
x86-64 gcc 9.5
x86-64 icc 13.0.1
x86-64 icc 16.0.3
x86-64 icc 17.0.0
x86-64 icc 18.0.0
x86-64 icc 19.0.0
x86-64 icc 19.0.1
x86-64 icc 2021.1.2
x86-64 icc 2021.10.0
x86-64 icc 2021.2.0
x86-64 icc 2021.3.0
x86-64 icc 2021.4.0
x86-64 icc 2021.5.0
x86-64 icc 2021.6.0
x86-64 icc 2021.7.0
x86-64 icc 2021.7.1
x86-64 icc 2021.8.0
x86-64 icc 2021.9.0
x86-64 icx 2021.1.2
x86-64 icx 2021.2.0
x86-64 icx 2021.3.0
x86-64 icx 2021.4.0
x86-64 icx 2022.0.0
x86-64 icx 2022.1.0
x86-64 icx 2022.2.0
x86-64 icx 2022.2.1
x86-64 icx 2023.0.0
x86-64 icx 2023.1.0
x86-64 icx 2023.2.1
x86-64 icx 2024.0.0
x86-64 icx 2024.1.0
x86-64 icx 2024.2.0
x86-64 icx 2024.2.1
x86-64 icx 2025.0.0
x86-64 icx 2025.0.1
x86-64 icx 2025.0.3
x86-64 icx 2025.0.4
x86-64 icx 2025.1.0
x86-64 icx 2025.1.1
x86-64 icx 2025.2.0
x86-64 icx 2025.2.1
x86-64 icx 2025.3.0
x86-64 icx 2025.3.1
x86-64 icx 2025.3.1
z180-clang 15.0.0
z180-clang 15.0.7
z80-clang 15.0.0
z80-clang 15.0.7
zig c++ 0.10.0
zig c++ 0.11.0
zig c++ 0.12.0
zig c++ 0.12.1
zig c++ 0.13.0
zig c++ 0.14.0
zig c++ 0.14.1
zig c++ 0.15.1
zig c++ 0.15.2
zig c++ 0.6.0
zig c++ 0.7.0
zig c++ 0.7.1
zig c++ 0.8.0
zig c++ 0.9.0
zig c++ trunk
Options
Source code
# 1 "<built-in>" # 1 "blah.cpp" #if 0 /* expanded by -frewrite-includes */ #include <cassert> #endif /* expanded by -frewrite-includes */ # 1 "blah.cpp" # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cassert" 1 3 // -*- C++ -*- forwarding header. // Copyright (C) 1997-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file cassert * This is a Standard C++ Library file. You should @c \#include this file * in your programs, rather than any of the @a *.h implementation files. * * This is the C++ version of the Standard C Library header @c assert.h, * and its contents are (mostly) the same as that header, but are all * contained in the namespace @c std (except for names which are defined * as macros in C). */ // // ISO C++ 14882: 19.2 Assertions // // No include guards on this header... #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 42 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cassert" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/c++config.h> #endif /* expanded by -frewrite-includes */ # 43 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cassert" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 1 3 // Predefined symbols and macros -*- C++ -*- // Copyright (C) 1997-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file bits/c++config.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{version} */ #ifndef _GLIBCXX_CXX_CONFIG_H #define _GLIBCXX_CXX_CONFIG_H 1 // The major release number for the GCC release the C++ library belongs to. #define _GLIBCXX_RELEASE 9 // The datestamp of the C++ library in compressed ISO date format. #define __GLIBCXX__ 20210601 // Macros for various attributes. // _GLIBCXX_PURE // _GLIBCXX_CONST // _GLIBCXX_NORETURN // _GLIBCXX_NOTHROW // _GLIBCXX_VISIBILITY #ifndef _GLIBCXX_PURE # define _GLIBCXX_PURE __attribute__ ((__pure__)) #endif # 48 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #ifndef _GLIBCXX_CONST # define _GLIBCXX_CONST __attribute__ ((__const__)) #endif # 52 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #ifndef _GLIBCXX_NORETURN # define _GLIBCXX_NORETURN __attribute__ ((__noreturn__)) #endif # 56 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 // See below for C++ #ifndef _GLIBCXX_NOTHROW # ifndef __cplusplus # define _GLIBCXX_NOTHROW __attribute__((__nothrow__)) # endif # 62 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #endif # 63 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 // Macros for visibility attributes. // _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY // _GLIBCXX_VISIBILITY # define _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY 1 #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 70 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_VISIBILITY(V) __attribute__ ((__visibility__ (#V))) #else # 72 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 // If this is not supplied by the OS-specific or CPU-specific // headers included below, it will be defined to an empty default. # define _GLIBCXX_VISIBILITY(V) _GLIBCXX_PSEUDO_VISIBILITY(V) #endif # 76 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 // Macros for deprecated attributes. // _GLIBCXX_USE_DEPRECATED // _GLIBCXX_DEPRECATED // _GLIBCXX_DEPRECATED_SUGGEST // _GLIBCXX17_DEPRECATED #ifndef _GLIBCXX_USE_DEPRECATED # define _GLIBCXX_USE_DEPRECATED 1 #endif # 85 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined(__DEPRECATED) && (__cplusplus >= 201103L) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 87 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_DEPRECATED __attribute__ ((__deprecated__)) # define _GLIBCXX_DEPRECATED_SUGGEST(ALT) \ __attribute__ ((__deprecated__ ("use '" ALT "' instead"))) #else # 91 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_DEPRECATED # define _GLIBCXX_DEPRECATED_SUGGEST(ALT) #endif # 94 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined(__DEPRECATED) && (__cplusplus >= 201703L) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 96 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX17_DEPRECATED [[__deprecated__]] #else # 98 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX17_DEPRECATED #endif # 100 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 // Macros for ABI tag attributes. #ifndef _GLIBCXX_ABI_TAG_CXX11 # define _GLIBCXX_ABI_TAG_CXX11 __attribute ((__abi_tag__ ("cxx11"))) #endif # 105 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 // Macro to warn about unused results. #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 108 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_NODISCARD [[__nodiscard__]] #else # 110 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_NODISCARD #endif # 112 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 116 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 // Macro for constexpr, to support in mixed 03/0x mode. #ifndef _GLIBCXX_CONSTEXPR #if 0 /* disabled by -frewrite-includes */ # if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 120 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_CONSTEXPR constexpr # define _GLIBCXX_USE_CONSTEXPR constexpr # else # 123 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_CONSTEXPR # define _GLIBCXX_USE_CONSTEXPR const # endif # 126 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #endif # 127 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #ifndef _GLIBCXX14_CONSTEXPR #if 0 /* disabled by -frewrite-includes */ # if __cplusplus >= 201402L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 130 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX14_CONSTEXPR constexpr # else # 132 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX14_CONSTEXPR # endif # 134 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #endif # 135 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #ifndef _GLIBCXX17_CONSTEXPR #if 0 /* disabled by -frewrite-includes */ # if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 138 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX17_CONSTEXPR constexpr # else # 140 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX17_CONSTEXPR # endif # 142 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #endif # 143 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #ifndef _GLIBCXX20_CONSTEXPR #if 0 /* disabled by -frewrite-includes */ # if __cplusplus > 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 146 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX20_CONSTEXPR constexpr # else # 148 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX20_CONSTEXPR # endif # 150 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #endif # 151 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #ifndef _GLIBCXX17_INLINE #if 0 /* disabled by -frewrite-includes */ # if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 154 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX17_INLINE inline # else # 156 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX17_INLINE # endif # 158 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #endif # 159 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 // Macro for noexcept, to support in mixed 03/0x mode. #ifndef _GLIBCXX_NOEXCEPT #if 0 /* disabled by -frewrite-includes */ # if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 163 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_NOEXCEPT noexcept # define _GLIBCXX_NOEXCEPT_IF(_COND) noexcept(_COND) # define _GLIBCXX_USE_NOEXCEPT noexcept # define _GLIBCXX_THROW(_EXC) # else # 168 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_NOEXCEPT # define _GLIBCXX_NOEXCEPT_IF(_COND) # define _GLIBCXX_USE_NOEXCEPT throw() # define _GLIBCXX_THROW(_EXC) throw(_EXC) # endif # 173 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #endif # 174 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #ifndef _GLIBCXX_NOTHROW # define _GLIBCXX_NOTHROW _GLIBCXX_USE_NOEXCEPT #endif # 178 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #ifndef _GLIBCXX_THROW_OR_ABORT #if 0 /* disabled by -frewrite-includes */ # if __cpp_exceptions #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 181 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_THROW_OR_ABORT(_EXC) (throw (_EXC)) # else # 183 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_THROW_OR_ABORT(_EXC) (__builtin_abort()) # endif # 185 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #endif # 186 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cpp_noexcept_function_type #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 188 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #define _GLIBCXX_NOEXCEPT_PARM , bool _NE #define _GLIBCXX_NOEXCEPT_QUAL noexcept (_NE) #else # 191 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #define _GLIBCXX_NOEXCEPT_PARM #define _GLIBCXX_NOEXCEPT_QUAL #endif # 194 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 // Macro for extern template, ie controlling template linkage via use // of extern keyword on template declaration. As documented in the g++ // manual, it inhibits all implicit instantiations and is used // throughout the library to avoid multiple weak definitions for // required types that are already explicitly instantiated in the // library binary. This substantially reduces the binary size of // resulting executables. // Special case: _GLIBCXX_EXTERN_TEMPLATE == -1 disallows extern // templates only in basic_string, thus activating its debug-mode // checks even at -O0. # define _GLIBCXX_EXTERN_TEMPLATE 1 /* Outline of libstdc++ namespaces. namespace std { namespace __debug { } namespace __parallel { } namespace __profile { } namespace __cxx1998 { } namespace __detail { namespace __variant { } // C++17 } namespace rel_ops { } namespace tr1 { namespace placeholders { } namespace regex_constants { } namespace __detail { } } namespace tr2 { } namespace decimal { } namespace chrono { } // C++11 namespace placeholders { } // C++11 namespace regex_constants { } // C++11 namespace this_thread { } // C++11 inline namespace literals { // C++14 inline namespace chrono_literals { } // C++14 inline namespace complex_literals { } // C++14 inline namespace string_literals { } // C++14 inline namespace string_view_literals { } // C++17 } } namespace abi { } namespace __gnu_cxx { namespace __detail { } } For full details see: http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/namespaces.html */ namespace std { typedef __SIZE_TYPE__ size_t; typedef __PTRDIFF_TYPE__ ptrdiff_t; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 262 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 typedef decltype(nullptr) nullptr_t; #endif # 264 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 } # define _GLIBCXX_USE_DUAL_ABI 1 #if 0 /* disabled by -frewrite-includes */ #if ! _GLIBCXX_USE_DUAL_ABI #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 269 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 // Ignore any pre-defined value of _GLIBCXX_USE_CXX11_ABI # undef _GLIBCXX_USE_CXX11_ABI #endif # 272 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #ifndef _GLIBCXX_USE_CXX11_ABI # define _GLIBCXX_USE_CXX11_ABI 1 #endif # 276 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_USE_CXX11_ABI #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 278 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 namespace std { inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { } } namespace __gnu_cxx { inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { } } # define _GLIBCXX_NAMESPACE_CXX11 __cxx11:: # define _GLIBCXX_BEGIN_NAMESPACE_CXX11 namespace __cxx11 { # define _GLIBCXX_END_NAMESPACE_CXX11 } # define _GLIBCXX_DEFAULT_ABI_TAG _GLIBCXX_ABI_TAG_CXX11 #else # 291 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_NAMESPACE_CXX11 # define _GLIBCXX_BEGIN_NAMESPACE_CXX11 # define _GLIBCXX_END_NAMESPACE_CXX11 # define _GLIBCXX_DEFAULT_ABI_TAG #endif # 296 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 // Defined if inline namespaces are used for versioning. # define _GLIBCXX_INLINE_VERSION 0 // Inline namespace for symbol versioning. #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_INLINE_VERSION #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 302 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_BEGIN_NAMESPACE_VERSION namespace __8 { # define _GLIBCXX_END_NAMESPACE_VERSION } namespace std { inline _GLIBCXX_BEGIN_NAMESPACE_VERSION #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201402L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 309 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 inline namespace literals { inline namespace chrono_literals { } inline namespace complex_literals { } inline namespace string_literals { } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201402L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 314 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 inline namespace string_view_literals { } #endif // C++17 # 316 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 } #endif // C++14 # 318 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 _GLIBCXX_END_NAMESPACE_VERSION } namespace __gnu_cxx { inline _GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_END_NAMESPACE_VERSION } #else # 328 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_BEGIN_NAMESPACE_VERSION # define _GLIBCXX_END_NAMESPACE_VERSION #endif # 331 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 // Inline namespaces for special modes: debug, parallel, profile. #if 0 /* disabled by -frewrite-includes */ #if defined(_GLIBCXX_DEBUG) || defined(_GLIBCXX_PARALLEL) \ || defined(_GLIBCXX_PROFILE) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 335 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 namespace std { _GLIBCXX_BEGIN_NAMESPACE_VERSION // Non-inline namespace for components replaced by alternates in active mode. namespace __cxx1998 { #if 0 /* disabled by -frewrite-includes */ # if _GLIBCXX_USE_CXX11_ABI #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 343 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { } # endif # 345 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 } _GLIBCXX_END_NAMESPACE_VERSION // Inline namespace for debug mode. # ifdef _GLIBCXX_DEBUG inline namespace __debug { } # endif # 353 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 // Inline namespaces for parallel mode. # ifdef _GLIBCXX_PARALLEL inline namespace __parallel { } # endif # 358 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 // Inline namespaces for profile mode # ifdef _GLIBCXX_PROFILE inline namespace __profile { } # endif # 363 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 } // Check for invalid usage and unsupported mixed-mode use. #if 0 /* disabled by -frewrite-includes */ # if defined(_GLIBCXX_DEBUG) && defined(_GLIBCXX_PARALLEL) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 367 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # error illegal use of multiple inlined namespaces # endif # 369 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ # if defined(_GLIBCXX_PROFILE) && defined(_GLIBCXX_DEBUG) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 370 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # error illegal use of multiple inlined namespaces # endif # 372 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ # if defined(_GLIBCXX_PROFILE) && defined(_GLIBCXX_PARALLEL) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 373 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # error illegal use of multiple inlined namespaces # endif # 375 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 // Check for invalid use due to lack for weak symbols. #if 0 /* disabled by -frewrite-includes */ # if __NO_INLINE__ && !__GXX_WEAK__ #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 378 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # warning currently using inlined namespace mode which may fail \ without inlining due to lack of weak symbols # endif # 381 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #endif # 382 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 // Macros for namespace scope. Either namespace std:: or the name // of some nested namespace within it corresponding to the active mode. // _GLIBCXX_STD_A // _GLIBCXX_STD_C // // Macros for opening/closing conditional namespaces. // _GLIBCXX_BEGIN_NAMESPACE_ALGO // _GLIBCXX_END_NAMESPACE_ALGO // _GLIBCXX_BEGIN_NAMESPACE_CONTAINER // _GLIBCXX_END_NAMESPACE_CONTAINER #if 0 /* disabled by -frewrite-includes */ #if defined(_GLIBCXX_DEBUG) || defined(_GLIBCXX_PROFILE) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 394 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_STD_C __cxx1998 # define _GLIBCXX_BEGIN_NAMESPACE_CONTAINER \ namespace _GLIBCXX_STD_C { # define _GLIBCXX_END_NAMESPACE_CONTAINER } #else # 399 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_STD_C std # define _GLIBCXX_BEGIN_NAMESPACE_CONTAINER # define _GLIBCXX_END_NAMESPACE_CONTAINER #endif # 403 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #ifdef _GLIBCXX_PARALLEL # define _GLIBCXX_STD_A __cxx1998 # define _GLIBCXX_BEGIN_NAMESPACE_ALGO \ namespace _GLIBCXX_STD_A { # define _GLIBCXX_END_NAMESPACE_ALGO } #else # 410 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_STD_A std # define _GLIBCXX_BEGIN_NAMESPACE_ALGO # define _GLIBCXX_END_NAMESPACE_ALGO #endif # 414 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 // GLIBCXX_ABI Deprecated // Define if compatibility should be provided for -mlong-double-64. #undef _GLIBCXX_LONG_DOUBLE_COMPAT // Inline namespace for long double 128 mode. #if 0 /* disabled by -frewrite-includes */ #if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__ #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 421 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 namespace std { inline namespace __gnu_cxx_ldbl128 { } } # define _GLIBCXX_NAMESPACE_LDBL __gnu_cxx_ldbl128:: # define _GLIBCXX_BEGIN_NAMESPACE_LDBL namespace __gnu_cxx_ldbl128 { # define _GLIBCXX_END_NAMESPACE_LDBL } #else # 429 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_NAMESPACE_LDBL # define _GLIBCXX_BEGIN_NAMESPACE_LDBL # define _GLIBCXX_END_NAMESPACE_LDBL #endif # 433 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_USE_CXX11_ABI #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 434 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_NAMESPACE_LDBL_OR_CXX11 _GLIBCXX_NAMESPACE_CXX11 # define _GLIBCXX_BEGIN_NAMESPACE_LDBL_OR_CXX11 _GLIBCXX_BEGIN_NAMESPACE_CXX11 # define _GLIBCXX_END_NAMESPACE_LDBL_OR_CXX11 _GLIBCXX_END_NAMESPACE_CXX11 #else # 438 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_NAMESPACE_LDBL_OR_CXX11 _GLIBCXX_NAMESPACE_LDBL # define _GLIBCXX_BEGIN_NAMESPACE_LDBL_OR_CXX11 _GLIBCXX_BEGIN_NAMESPACE_LDBL # define _GLIBCXX_END_NAMESPACE_LDBL_OR_CXX11 _GLIBCXX_END_NAMESPACE_LDBL #endif # 442 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 // Debug Mode implies checking assertions. #if 0 /* disabled by -frewrite-includes */ #if defined(_GLIBCXX_DEBUG) && !defined(_GLIBCXX_ASSERTIONS) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 445 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_ASSERTIONS 1 #endif # 447 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 // Disable std::string explicit instantiation declarations in order to assert. #ifdef _GLIBCXX_ASSERTIONS # undef _GLIBCXX_EXTERN_TEMPLATE # define _GLIBCXX_EXTERN_TEMPLATE -1 #endif # 453 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 // Assert. #if 0 /* disabled by -frewrite-includes */ #if defined(_GLIBCXX_ASSERTIONS) \ || defined(_GLIBCXX_PARALLEL) || defined(_GLIBCXX_PARALLEL_ASSERTIONS) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 457 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 namespace std { // Avoid the use of assert, because we're trying to keep the <cassert> // include out of the mix. extern "C++" inline void __replacement_assert(const char* __file, int __line, const char* __function, const char* __condition) { __builtin_printf("%s:%d: %s: Assertion '%s' failed.\n", __file, __line, __function, __condition); __builtin_abort(); } } #define __glibcxx_assert_impl(_Condition) \ do \ { \ if (! (_Condition)) \ std::__replacement_assert(__FILE__, __LINE__, __PRETTY_FUNCTION__, \ #_Condition); \ } while (false) #endif # 478 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined(_GLIBCXX_ASSERTIONS) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 480 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define __glibcxx_assert(_Condition) __glibcxx_assert_impl(_Condition) #else # 482 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define __glibcxx_assert(_Condition) #endif # 484 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 // Macros for race detectors. // _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(A) and // _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(A) should be used to explain // atomic (lock-free) synchronization to race detectors: // the race detector will infer a happens-before arc from the former to the // latter when they share the same argument pointer. // // The most frequent use case for these macros (and the only case in the // current implementation of the library) is atomic reference counting: // void _M_remove_reference() // { // _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&this->_M_refcount); // if (__gnu_cxx::__exchange_and_add_dispatch(&this->_M_refcount, -1) <= 0) // { // _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&this->_M_refcount); // _M_destroy(__a); // } // } // The annotations in this example tell the race detector that all memory // accesses occurred when the refcount was positive do not race with // memory accesses which occurred after the refcount became zero. #ifndef _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE # define _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(A) #endif # 509 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #ifndef _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER # define _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(A) #endif # 512 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 // Macros for C linkage: define extern "C" linkage only when using C++. # define _GLIBCXX_BEGIN_EXTERN_C extern "C" { # define _GLIBCXX_END_EXTERN_C } # define _GLIBCXX_USE_ALLOCATOR_NEW 1 #else // !__cplusplus # 520 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_BEGIN_EXTERN_C # define _GLIBCXX_END_EXTERN_C #endif # 523 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 // First includes. // Pick up any OS-specific definitions. #if 0 /* expanded by -frewrite-includes */ #include <bits/os_defines.h> #endif /* expanded by -frewrite-includes */ # 528 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/os_defines.h" 1 3 // Specific definitions for GNU/Linux -*- C++ -*- // Copyright (C) 2000-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file bits/os_defines.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{iosfwd} */ #ifndef _GLIBCXX_OS_DEFINES #define _GLIBCXX_OS_DEFINES 1 // System-specific #define, typedefs, corrections, etc, go here. This // file will come before all others. // This keeps isanum, et al from being propagated as macros. #define __NO_CTYPE 1 #if 0 /* expanded by -frewrite-includes */ #include <features.h> #endif /* expanded by -frewrite-includes */ # 39 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/os_defines.h" 3 # 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ #ifndef _FEATURES_H #define _FEATURES_H 1 /* These are defined by the user (or the compiler) to specify the desired environment: __STRICT_ANSI__ ISO Standard C. _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X. __STDC_WANT_LIB_EXT2__ Extensions to ISO C99 from TR 27431-2:2010. __STDC_WANT_IEC_60559_BFP_EXT__ Extensions to ISO C11 from TS 18661-1:2014. __STDC_WANT_IEC_60559_FUNCS_EXT__ Extensions to ISO C11 from TS 18661-4:2015. __STDC_WANT_IEC_60559_TYPES_EXT__ Extensions to ISO C11 from TS 18661-3:2015. _POSIX_SOURCE IEEE Std 1003.1. _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; if >=199309L, add IEEE Std 1003.1b-1993; if >=199506L, add IEEE Std 1003.1c-1995; if >=200112L, all of IEEE 1003.1-2004 if >=200809L, all of IEEE 1003.1-2008 _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if Single Unix conformance is wanted, to 600 for the sixth revision, to 700 for the seventh revision. _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. _LARGEFILE_SOURCE Some more functions for correct standard I/O. _LARGEFILE64_SOURCE Additional functionality from LFS for large files. _FILE_OFFSET_BITS=N Select default filesystem interface. _ATFILE_SOURCE Additional *at interfaces. _GNU_SOURCE All of the above, plus GNU extensions. _DEFAULT_SOURCE The default set of features (taking precedence over __STRICT_ANSI__). _FORTIFY_SOURCE Add security hardening to many library functions. Set to 1 or 2; 2 performs stricter checks than 1. _REENTRANT, _THREAD_SAFE Obsolete; equivalent to _POSIX_C_SOURCE=199506L. The `-ansi' switch to the GNU C compiler, and standards conformance options such as `-std=c99', define __STRICT_ANSI__. If none of these are defined, or if _DEFAULT_SOURCE is defined, the default is to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to 200809L, as well as enabling miscellaneous functions from BSD and SVID. If more than one of these are defined, they accumulate. For example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together give you ISO C, 1003.1, and 1003.2, but nothing else. These are defined by this file and are used by the header files to decide what to declare or define: __GLIBC_USE (F) Define things from feature set F. This is defined to 1 or 0; the subsequent macros are either defined or undefined, and those tests should be moved to __GLIBC_USE. __USE_ISOC11 Define ISO C11 things. __USE_ISOC99 Define ISO C99 things. __USE_ISOC95 Define ISO C90 AMD1 (C95) things. __USE_ISOCXX11 Define ISO C++11 things. __USE_POSIX Define IEEE Std 1003.1 things. __USE_POSIX2 Define IEEE Std 1003.2 things. __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. __USE_XOPEN Define XPG things. __USE_XOPEN_EXTENDED Define X/Open Unix things. __USE_UNIX98 Define Single Unix V2 things. __USE_XOPEN2K Define XPG6 things. __USE_XOPEN2KXSI Define XPG6 XSI things. __USE_XOPEN2K8 Define XPG7 things. __USE_XOPEN2K8XSI Define XPG7 XSI things. __USE_LARGEFILE Define correct standard I/O things. __USE_LARGEFILE64 Define LFS things with separate names. __USE_FILE_OFFSET64 Define 64bit interface as default. __USE_MISC Define things from 4.3BSD or System V Unix. __USE_ATFILE Define *at interfaces and AT_* constants for them. __USE_GNU Define GNU extensions. __USE_FORTIFY_LEVEL Additional security measures used, according to level. The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are defined by this file unconditionally. `__GNU_LIBRARY__' is provided only for compatibility. All new code should use the other symbols to test for features. All macros listed above as possibly being defined by this file are explicitly undefined if they are not explicitly defined. Feature-test macros that are not defined by the user or compiler but are implied by the other feature-test macros defined (or by the lack of any definitions) are defined by the file. ISO C feature test macros depend on the definition of the macro when an affected header is included, not when the first system header is included, and so they are handled in <bits/libc-header-start.h>, which does not have a multiple include guard. Feature test macros that can be handled from the first system header included are handled here. */ /* Undefine everything, so we get a clean slate. */ #undef __USE_ISOC11 #undef __USE_ISOC99 #undef __USE_ISOC95 #undef __USE_ISOCXX11 #undef __USE_POSIX #undef __USE_POSIX2 #undef __USE_POSIX199309 #undef __USE_POSIX199506 #undef __USE_XOPEN #undef __USE_XOPEN_EXTENDED #undef __USE_UNIX98 #undef __USE_XOPEN2K #undef __USE_XOPEN2KXSI #undef __USE_XOPEN2K8 #undef __USE_XOPEN2K8XSI #undef __USE_LARGEFILE #undef __USE_LARGEFILE64 #undef __USE_FILE_OFFSET64 #undef __USE_MISC #undef __USE_ATFILE #undef __USE_GNU #undef __USE_FORTIFY_LEVEL #undef __KERNEL_STRICT_NAMES #undef __GLIBC_USE_ISOC2X #undef __GLIBC_USE_DEPRECATED_GETS #undef __GLIBC_USE_DEPRECATED_SCANF /* Suppress kernel-name space pollution unless user expressedly asks for it. */ #ifndef _LOOSE_KERNEL_NAMES # define __KERNEL_STRICT_NAMES #endif # 152 "/usr/include/features.h" 3 4 /* Convenience macro to test the version of gcc. Use like this: #if __GNUC_PREREQ (2,8) ... code requiring gcc 2.8 or later ... #endif Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was added in 2.0. */ #if 0 /* disabled by -frewrite-includes */ #if defined __GNUC__ && defined __GNUC_MINOR__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 161 "/usr/include/features.h" 3 4 # define __GNUC_PREREQ(maj, min) \ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) #else # 164 "/usr/include/features.h" 3 4 # define __GNUC_PREREQ(maj, min) 0 #endif # 166 "/usr/include/features.h" 3 4 /* Similarly for clang. Features added to GCC after version 4.2 may or may not also be available in clang, and clang's definitions of __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such features can be queried via __has_extension/__has_feature. */ #if 0 /* disabled by -frewrite-includes */ #if defined __clang_major__ && defined __clang_minor__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 172 "/usr/include/features.h" 3 4 # define __glibc_clang_prereq(maj, min) \ ((__clang_major__ << 16) + __clang_minor__ >= ((maj) << 16) + (min)) #else # 175 "/usr/include/features.h" 3 4 # define __glibc_clang_prereq(maj, min) 0 #endif # 177 "/usr/include/features.h" 3 4 /* Whether to use feature set F. */ #define __GLIBC_USE(F) __GLIBC_USE_ ## F /* _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not issue a warning; the expectation is that the source is being transitioned to use the new macro. */ #if 0 /* disabled by -frewrite-includes */ #if (defined _BSD_SOURCE || defined _SVID_SOURCE) \ && !defined _DEFAULT_SOURCE #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 187 "/usr/include/features.h" 3 4 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" # undef _DEFAULT_SOURCE # define _DEFAULT_SOURCE 1 #endif # 191 "/usr/include/features.h" 3 4 /* If _GNU_SOURCE was defined by the user, turn on all the other features. */ #ifdef _GNU_SOURCE # undef _ISOC95_SOURCE # define _ISOC95_SOURCE 1 # undef _ISOC99_SOURCE # define _ISOC99_SOURCE 1 # undef _ISOC11_SOURCE # define _ISOC11_SOURCE 1 # undef _ISOC2X_SOURCE # define _ISOC2X_SOURCE 1 # undef _POSIX_SOURCE # define _POSIX_SOURCE 1 # undef _POSIX_C_SOURCE # define _POSIX_C_SOURCE 200809L # undef _XOPEN_SOURCE # define _XOPEN_SOURCE 700 # undef _XOPEN_SOURCE_EXTENDED # define _XOPEN_SOURCE_EXTENDED 1 # undef _LARGEFILE64_SOURCE # define _LARGEFILE64_SOURCE 1 # undef _DEFAULT_SOURCE # define _DEFAULT_SOURCE 1 # undef _ATFILE_SOURCE # define _ATFILE_SOURCE 1 #endif # 217 "/usr/include/features.h" 3 4 /* If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined, define _DEFAULT_SOURCE. */ #if 0 /* disabled by -frewrite-includes */ #if (defined _DEFAULT_SOURCE \ || (!defined __STRICT_ANSI__ \ && !defined _ISOC99_SOURCE && !defined _ISOC11_SOURCE \ && !defined _ISOC2X_SOURCE \ && !defined _POSIX_SOURCE && !defined _POSIX_C_SOURCE \ && !defined _XOPEN_SOURCE)) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 226 "/usr/include/features.h" 3 4 # undef _DEFAULT_SOURCE # define _DEFAULT_SOURCE 1 #endif # 229 "/usr/include/features.h" 3 4 /* This is to enable the ISO C2X extension. */ #if 0 /* disabled by -frewrite-includes */ #if (defined _ISOC2X_SOURCE \ || (defined __STDC_VERSION__ && __STDC_VERSION__ > 201710L)) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 233 "/usr/include/features.h" 3 4 # define __GLIBC_USE_ISOC2X 1 #else # 235 "/usr/include/features.h" 3 4 # define __GLIBC_USE_ISOC2X 0 #endif # 237 "/usr/include/features.h" 3 4 /* This is to enable the ISO C11 extension. */ #if 0 /* disabled by -frewrite-includes */ #if (defined _ISOC11_SOURCE || defined _ISOC2X_SOURCE \ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L)) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 241 "/usr/include/features.h" 3 4 # define __USE_ISOC11 1 #endif # 243 "/usr/include/features.h" 3 4 /* This is to enable the ISO C99 extension. */ #if 0 /* disabled by -frewrite-includes */ #if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \ || defined _ISOC2X_SOURCE \ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 248 "/usr/include/features.h" 3 4 # define __USE_ISOC99 1 #endif # 250 "/usr/include/features.h" 3 4 /* This is to enable the ISO C90 Amendment 1:1995 extension. */ #if 0 /* disabled by -frewrite-includes */ #if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \ || defined _ISOC2X_SOURCE \ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199409L)) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 255 "/usr/include/features.h" 3 4 # define __USE_ISOC95 1 #endif # 257 "/usr/include/features.h" 3 4 #ifdef __cplusplus /* This is to enable compatibility for ISO C++17. */ #if 0 /* disabled by -frewrite-includes */ # if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 261 "/usr/include/features.h" 3 4 # define __USE_ISOC11 1 # endif # 263 "/usr/include/features.h" 3 4 /* This is to enable compatibility for ISO C++11. Check the temporary macro for now, too. */ #if 0 /* disabled by -frewrite-includes */ # if __cplusplus >= 201103L || defined __GXX_EXPERIMENTAL_CXX0X__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 266 "/usr/include/features.h" 3 4 # define __USE_ISOCXX11 1 # define __USE_ISOC99 1 # endif # 269 "/usr/include/features.h" 3 4 #endif # 270 "/usr/include/features.h" 3 4 /* If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE is defined, use POSIX.1-2008 (or another version depending on _XOPEN_SOURCE). */ #ifdef _DEFAULT_SOURCE #if 0 /* disabled by -frewrite-includes */ # if !defined _POSIX_SOURCE && !defined _POSIX_C_SOURCE #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 276 "/usr/include/features.h" 3 4 # define __USE_POSIX_IMPLICITLY 1 # endif # 278 "/usr/include/features.h" 3 4 # undef _POSIX_SOURCE # define _POSIX_SOURCE 1 # undef _POSIX_C_SOURCE # define _POSIX_C_SOURCE 200809L #endif # 283 "/usr/include/features.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if ((!defined __STRICT_ANSI__ \ || (defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) >= 500)) \ && !defined _POSIX_SOURCE && !defined _POSIX_C_SOURCE) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 287 "/usr/include/features.h" 3 4 # define _POSIX_SOURCE 1 #if 0 /* disabled by -frewrite-includes */ # if defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 500 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 289 "/usr/include/features.h" 3 4 # define _POSIX_C_SOURCE 2 #if 0 /* disabled by -frewrite-includes */ #if 0 # elif defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 600 #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 291 "/usr/include/features.h" 3 4 # define _POSIX_C_SOURCE 199506L #if 0 /* disabled by -frewrite-includes */ #if 0 # elif defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 700 #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 293 "/usr/include/features.h" 3 4 # define _POSIX_C_SOURCE 200112L # else # 295 "/usr/include/features.h" 3 4 # define _POSIX_C_SOURCE 200809L # endif # 297 "/usr/include/features.h" 3 4 # define __USE_POSIX_IMPLICITLY 1 #endif # 299 "/usr/include/features.h" 3 4 /* Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be defined in all multithreaded code. GNU libc has not required this for many years. We now treat them as compatibility synonyms for _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with comprehensive support for multithreaded code. Using them never lowers the selected level of POSIX conformance, only raises it. */ #if 0 /* disabled by -frewrite-includes */ #if ((!defined _POSIX_C_SOURCE || (_POSIX_C_SOURCE - 0) < 199506L) \ && (defined _REENTRANT || defined _THREAD_SAFE)) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 308 "/usr/include/features.h" 3 4 # define _POSIX_SOURCE 1 # undef _POSIX_C_SOURCE # define _POSIX_C_SOURCE 199506L #endif # 312 "/usr/include/features.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if (defined _POSIX_SOURCE \ || (defined _POSIX_C_SOURCE && _POSIX_C_SOURCE >= 1) \ || defined _XOPEN_SOURCE) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 316 "/usr/include/features.h" 3 4 # define __USE_POSIX 1 #endif # 318 "/usr/include/features.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined _POSIX_C_SOURCE && _POSIX_C_SOURCE >= 2 || defined _XOPEN_SOURCE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 320 "/usr/include/features.h" 3 4 # define __USE_POSIX2 1 #endif # 322 "/usr/include/features.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined _POSIX_C_SOURCE && (_POSIX_C_SOURCE - 0) >= 199309L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 324 "/usr/include/features.h" 3 4 # define __USE_POSIX199309 1 #endif # 326 "/usr/include/features.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined _POSIX_C_SOURCE && (_POSIX_C_SOURCE - 0) >= 199506L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 328 "/usr/include/features.h" 3 4 # define __USE_POSIX199506 1 #endif # 330 "/usr/include/features.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined _POSIX_C_SOURCE && (_POSIX_C_SOURCE - 0) >= 200112L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 332 "/usr/include/features.h" 3 4 # define __USE_XOPEN2K 1 # undef __USE_ISOC95 # define __USE_ISOC95 1 # undef __USE_ISOC99 # define __USE_ISOC99 1 #endif # 338 "/usr/include/features.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined _POSIX_C_SOURCE && (_POSIX_C_SOURCE - 0) >= 200809L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 340 "/usr/include/features.h" 3 4 # define __USE_XOPEN2K8 1 # undef _ATFILE_SOURCE # define _ATFILE_SOURCE 1 #endif # 344 "/usr/include/features.h" 3 4 #ifdef _XOPEN_SOURCE # define __USE_XOPEN 1 #if 0 /* disabled by -frewrite-includes */ # if (_XOPEN_SOURCE - 0) >= 500 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 348 "/usr/include/features.h" 3 4 # define __USE_XOPEN_EXTENDED 1 # define __USE_UNIX98 1 # undef _LARGEFILE_SOURCE # define _LARGEFILE_SOURCE 1 #if 0 /* disabled by -frewrite-includes */ # if (_XOPEN_SOURCE - 0) >= 600 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 353 "/usr/include/features.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if (_XOPEN_SOURCE - 0) >= 700 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 354 "/usr/include/features.h" 3 4 # define __USE_XOPEN2K8 1 # define __USE_XOPEN2K8XSI 1 # endif # 357 "/usr/include/features.h" 3 4 # define __USE_XOPEN2K 1 # define __USE_XOPEN2KXSI 1 # undef __USE_ISOC95 # define __USE_ISOC95 1 # undef __USE_ISOC99 # define __USE_ISOC99 1 # endif # 364 "/usr/include/features.h" 3 4 # else # 365 "/usr/include/features.h" 3 4 # ifdef _XOPEN_SOURCE_EXTENDED # define __USE_XOPEN_EXTENDED 1 # endif # 368 "/usr/include/features.h" 3 4 # endif # 369 "/usr/include/features.h" 3 4 #endif # 370 "/usr/include/features.h" 3 4 #ifdef _LARGEFILE_SOURCE # define __USE_LARGEFILE 1 #endif # 374 "/usr/include/features.h" 3 4 #ifdef _LARGEFILE64_SOURCE # define __USE_LARGEFILE64 1 #endif # 378 "/usr/include/features.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS == 64 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 380 "/usr/include/features.h" 3 4 # define __USE_FILE_OFFSET64 1 #endif # 382 "/usr/include/features.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined _DEFAULT_SOURCE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 384 "/usr/include/features.h" 3 4 # define __USE_MISC 1 #endif # 386 "/usr/include/features.h" 3 4 #ifdef _ATFILE_SOURCE # define __USE_ATFILE 1 #endif # 390 "/usr/include/features.h" 3 4 #ifdef _GNU_SOURCE # define __USE_GNU 1 #endif # 394 "/usr/include/features.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0 \ && __GNUC_PREREQ (4, 1) && defined __OPTIMIZE__ && __OPTIMIZE__ > 0 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 397 "/usr/include/features.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if _FORTIFY_SOURCE > 1 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 398 "/usr/include/features.h" 3 4 # define __USE_FORTIFY_LEVEL 2 # else # 400 "/usr/include/features.h" 3 4 # define __USE_FORTIFY_LEVEL 1 # endif # 402 "/usr/include/features.h" 3 4 #else # 403 "/usr/include/features.h" 3 4 # define __USE_FORTIFY_LEVEL 0 #endif # 405 "/usr/include/features.h" 3 4 /* The function 'gets' existed in C89, but is impossible to use safely. It has been removed from ISO C11 and ISO C++14. Note: for compatibility with various implementations of <cstdio>, this test must consider only the value of __cplusplus when compiling C++. */ #if 0 /* disabled by -frewrite-includes */ #if defined __cplusplus ? __cplusplus >= 201402L : defined __USE_ISOC11 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 411 "/usr/include/features.h" 3 4 # define __GLIBC_USE_DEPRECATED_GETS 0 #else # 413 "/usr/include/features.h" 3 4 # define __GLIBC_USE_DEPRECATED_GETS 1 #endif # 415 "/usr/include/features.h" 3 4 /* GNU formerly extended the scanf functions with modified format specifiers %as, %aS, and %a[...] that allocate a buffer for the input using malloc. This extension conflicts with ISO C99, which defines %a as a standalone format specifier that reads a floating- point number; moreover, POSIX.1-2008 provides the same feature using the modifier letter 'm' instead (%ms, %mS, %m[...]). We now follow C99 unless GNU extensions are active and the compiler is specifically in C89 or C++98 mode (strict or not). For instance, with GCC, -std=gnu11 will have C99-compliant scanf with or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the old extension. */ #if 0 /* disabled by -frewrite-includes */ #if (defined __USE_GNU \ && (defined __cplusplus \ ? (__cplusplus < 201103L && !defined __GXX_EXPERIMENTAL_CXX0X__) \ : (!defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L))) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 432 "/usr/include/features.h" 3 4 # define __GLIBC_USE_DEPRECATED_SCANF 1 #else # 434 "/usr/include/features.h" 3 4 # define __GLIBC_USE_DEPRECATED_SCANF 0 #endif # 436 "/usr/include/features.h" 3 4 /* Get definitions of __STDC_* predefined macros, if the compiler has not preincluded this header automatically. */ #if 0 /* expanded by -frewrite-includes */ #include <stdc-predef.h> #endif /* expanded by -frewrite-includes */ # 439 "/usr/include/features.h" 3 4 # 1 "/usr/include/stdc-predef.h" 1 3 4 /* Copyright (C) 1991-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ #ifndef _STDC_PREDEF_H #define _STDC_PREDEF_H 1 /* This header is separate from features.h so that the compiler can include it implicitly at the start of every compilation. It must not itself include <features.h> or any other header that includes <features.h> because the implicit include comes before any feature test macros that may be defined in a source file before it first explicitly includes a system header. GCC knows the name of this header in order to preinclude it. */ /* glibc's intent is to support the IEC 559 math functionality, real and complex. If the GCC (4.9 and later) predefined macros specifying compiler intent are available, use them to determine whether the overall intent is to support these features; otherwise, presume an older compiler has intent to support these features and define these macros by default. */ #ifdef __GCC_IEC_559 #if 0 /* disabled by -frewrite-includes */ # if __GCC_IEC_559 > 0 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 38 "/usr/include/stdc-predef.h" 3 4 # define __STDC_IEC_559__ 1 # endif # 40 "/usr/include/stdc-predef.h" 3 4 #else # 41 "/usr/include/stdc-predef.h" 3 4 # define __STDC_IEC_559__ 1 #endif # 43 "/usr/include/stdc-predef.h" 3 4 #ifdef __GCC_IEC_559_COMPLEX #if 0 /* disabled by -frewrite-includes */ # if __GCC_IEC_559_COMPLEX > 0 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 46 "/usr/include/stdc-predef.h" 3 4 # define __STDC_IEC_559_COMPLEX__ 1 # endif # 48 "/usr/include/stdc-predef.h" 3 4 #else # 49 "/usr/include/stdc-predef.h" 3 4 # define __STDC_IEC_559_COMPLEX__ 1 #endif # 51 "/usr/include/stdc-predef.h" 3 4 /* wchar_t uses Unicode 10.0.0. Version 10.0 of the Unicode Standard is synchronized with ISO/IEC 10646:2017, fifth edition, plus the following additions from Amendment 1 to the fifth edition: - 56 emoji characters - 285 hentaigana - 3 additional Zanabazar Square characters */ #define __STDC_ISO_10646__ 201706L #endif # 61 "/usr/include/stdc-predef.h" 3 4 # 440 "/usr/include/features.h" 2 3 4 /* This macro indicates that the installed library is the GNU C Library. For historic reasons the value now is 6 and this will stay from now on. The use of this variable is deprecated. Use __GLIBC__ and __GLIBC_MINOR__ now (see below) when you want to test for a specific GNU C library version and use the values in <gnu/lib-names.h> to get the sonames of the shared libraries. */ #undef __GNU_LIBRARY__ #define __GNU_LIBRARY__ 6 /* Major and minor version number of the GNU C library package. Use these macros to test for features in specific releases. */ #define __GLIBC__ 2 #define __GLIBC_MINOR__ 31 #define __GLIBC_PREREQ(maj, min) \ ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min)) /* This is here only because every header file already includes this one. */ #ifndef __ASSEMBLER__ # ifndef _SYS_CDEFS_H #if 0 /* expanded by -frewrite-includes */ # include <sys/cdefs.h> #endif /* expanded by -frewrite-includes */ # 461 "/usr/include/features.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 1 3 4 /* Copyright (C) 1992-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ #ifndef _SYS_CDEFS_H #define _SYS_CDEFS_H 1 /* We are almost always included from features.h. */ #ifndef _FEATURES_H #if 0 /* expanded by -frewrite-includes */ # include <features.h> #endif /* expanded by -frewrite-includes */ # 23 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # 24 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 #endif # 25 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* The GNU libc does not support any K&R compilers or the traditional mode of ISO C compilers anymore. Check for some of the combinations not anymore supported. */ #if 0 /* disabled by -frewrite-includes */ #if defined __GNUC__ && !defined __STDC__ #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 30 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # error "You need a ISO C conforming compiler to use the glibc headers" #endif # 32 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* Some user header file might have defined this before. */ #undef __P #undef __PMT #ifdef __GNUC__ /* All functions, except those with callbacks or those that synchronize memory, are leaf functions. */ #if 0 /* disabled by -frewrite-includes */ # if __GNUC_PREREQ (4, 6) && !defined _LIBC #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 42 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __LEAF , __leaf__ # define __LEAF_ATTR __attribute__ ((__leaf__)) # else # 45 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __LEAF # define __LEAF_ATTR # endif # 48 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* GCC can always grok prototypes. For C++ programs we add throw() to help it optimize the function calls. But this works only with gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions as non-throwing using a function attribute since programs can use the -fexceptions options for C code as well. */ #if 0 /* disabled by -frewrite-includes */ # if !defined __cplusplus && __GNUC_PREREQ (3, 3) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 55 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __THROW __attribute__ ((__nothrow__ __LEAF)) # define __THROWNL __attribute__ ((__nothrow__)) # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct # define __NTHNL(fct) __attribute__ ((__nothrow__)) fct # else # 60 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if defined __cplusplus && __GNUC_PREREQ (2,8) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 61 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __THROW throw () # define __THROWNL throw () # define __NTH(fct) __LEAF_ATTR fct throw () # define __NTHNL(fct) fct throw () # else # 66 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __THROW # define __THROWNL # define __NTH(fct) fct # define __NTHNL(fct) fct # endif # 71 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # endif # 72 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 #else /* Not GCC. */ # 74 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if (defined __cplusplus \ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 77 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __inline inline # else # 79 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __inline /* No inline functions. */ # endif # 81 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __THROW # define __THROWNL # define __NTH(fct) fct #endif /* GCC. */ # 87 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* Compilers that are not clang may object to #if defined __clang__ && __has_extension(...) even though they do not need to evaluate the right-hand side of the &&. */ #if 0 /* disabled by -frewrite-includes */ #if defined __clang__ && defined __has_extension #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 92 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __glibc_clang_has_extension(ext) __has_extension (ext) #else # 94 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __glibc_clang_has_extension(ext) 0 #endif # 96 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* These two macros are not used in glibc anymore. They are kept here only because some other projects expect the macros to be defined. */ #define __P(args) args #define __PMT(args) args /* For these things, GCC behaves the ANSI way normally, and the non-ANSI way under -traditional. */ #define __CONCAT(x,y) x ## y #define __STRING(x) #x /* This is not a typedef so `const __ptr_t' does the right thing. */ #define __ptr_t void * /* C++ needs to know that types and declarations are C, not C++. */ #ifdef __cplusplus # define __BEGIN_DECLS extern "C" { # define __END_DECLS } #else # 117 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __BEGIN_DECLS # define __END_DECLS #endif # 120 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* Fortify support. */ #define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1) #define __bos0(ptr) __builtin_object_size (ptr, 0) #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (4,3) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 127 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __warndecl(name, msg) \ extern void name (void) __attribute__((__warning__ (msg))) # define __warnattr(msg) __attribute__((__warning__ (msg))) # define __errordecl(name, msg) \ extern void name (void) __attribute__((__error__ (msg))) #else # 133 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __warndecl(name, msg) extern void name (void) # define __warnattr(msg) # define __errordecl(name, msg) extern void name (void) #endif # 137 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* Support for flexible arrays. Headers that should use flexible arrays only if they're "real" (e.g. only if they won't affect sizeof()) should test #if __glibc_c99_flexarr_available. */ #if 0 /* disabled by -frewrite-includes */ #if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 143 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __flexarr [] # define __glibc_c99_flexarr_available 1 #if 0 /* disabled by -frewrite-includes */ #if 0 #elif __GNUC_PREREQ (2,97) #endif #endif /* disabled by -frewrite-includes */ #elif 1 /* evaluated by -frewrite-includes */ # 146 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* GCC 2.97 supports C99 flexible array members as an extension, even when in C89 mode or compiling C++ (any version). */ # define __flexarr [] # define __glibc_c99_flexarr_available 1 #if 0 /* disabled by -frewrite-includes */ #if 0 #elif defined __GNUC__ #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 151 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* Pre-2.97 GCC did not support C99 flexible arrays but did have an equivalent extension with slightly different notation. */ # define __flexarr [0] # define __glibc_c99_flexarr_available 1 #else # 156 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* Some other non-C99 compiler. Approximate with [1]. */ # define __flexarr [1] # define __glibc_c99_flexarr_available 0 #endif # 160 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* __asm__ ("xyz") is used throughout the headers to rename functions at the assembly language level. This is wrapped by the __REDIRECT macro, in order to support compilers that can do this some other way. When compilers don't support asm-names at all, we have to do preprocessor tricks instead (which don't have exactly the right semantics, but it's the best we can do). Example: int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); */ #if 0 /* disabled by -frewrite-includes */ #if defined __GNUC__ && __GNUC__ >= 2 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 173 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __REDIRECT(name, proto, alias) name proto __asm__ (__ASMNAME (#alias)) # ifdef __cplusplus # define __REDIRECT_NTH(name, proto, alias) \ name proto __THROW __asm__ (__ASMNAME (#alias)) # define __REDIRECT_NTHNL(name, proto, alias) \ name proto __THROWNL __asm__ (__ASMNAME (#alias)) # else # 181 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __REDIRECT_NTH(name, proto, alias) \ name proto __asm__ (__ASMNAME (#alias)) __THROW # define __REDIRECT_NTHNL(name, proto, alias) \ name proto __asm__ (__ASMNAME (#alias)) __THROWNL # endif # 186 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __ASMNAME(cname) __ASMNAME2 (__USER_LABEL_PREFIX__, cname) # define __ASMNAME2(prefix, cname) __STRING (prefix) cname /* #elif __SOME_OTHER_COMPILER__ # define __REDIRECT(name, proto, alias) name proto; \ _Pragma("let " #name " = " #alias) */ #endif # 196 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* GCC has various useful declarations that can be made with the `__attribute__' syntax. All of the ways we use this do fine if they are omitted for compilers that don't understand it. */ #if 0 /* disabled by -frewrite-includes */ #if !defined __GNUC__ || __GNUC__ < 2 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 201 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __attribute__(xyz) /* Ignore */ #endif # 203 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* At some point during the gcc 2.96 development the `malloc' attribute for functions was introduced. We don't want to use it unconditionally (although this would be possible) since it generates warnings. */ #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (2,96) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 208 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __attribute_malloc__ __attribute__ ((__malloc__)) #else # 210 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __attribute_malloc__ /* Ignore */ #endif # 212 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* Tell the compiler which arguments to an allocation function indicate the size of the allocation. */ #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (4, 3) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 216 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __attribute_alloc_size__(params) \ __attribute__ ((__alloc_size__ params)) #else # 219 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __attribute_alloc_size__(params) /* Ignore. */ #endif # 221 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* At some point during the gcc 2.96 development the `pure' attribute for functions was introduced. We don't want to use it unconditionally (although this would be possible) since it generates warnings. */ #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (2,96) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 226 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __attribute_pure__ __attribute__ ((__pure__)) #else # 228 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __attribute_pure__ /* Ignore */ #endif # 230 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* This declaration tells the compiler that the value is constant. */ #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (2,5) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 233 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __attribute_const__ __attribute__ ((__const__)) #else # 235 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __attribute_const__ /* Ignore */ #endif # 237 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* At some point during the gcc 3.1 development the `used' attribute for functions was introduced. We don't want to use it unconditionally (although this would be possible) since it generates warnings. */ #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (3,1) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 242 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __attribute_used__ __attribute__ ((__used__)) # define __attribute_noinline__ __attribute__ ((__noinline__)) #else # 245 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __attribute_used__ __attribute__ ((__unused__)) # define __attribute_noinline__ /* Ignore */ #endif # 248 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* Since version 3.2, gcc allows marking deprecated functions. */ #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (3,2) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 251 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __attribute_deprecated__ __attribute__ ((__deprecated__)) #else # 253 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __attribute_deprecated__ /* Ignore */ #endif # 255 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* Since version 4.5, gcc also allows one to specify the message printed when a deprecated function is used. clang claims to be gcc 4.2, but may also support this feature. */ #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (4,5) \ || __glibc_clang_has_extension (__attribute_deprecated_with_message__) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 261 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __attribute_deprecated_msg__(msg) \ __attribute__ ((__deprecated__ (msg))) #else # 264 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __attribute_deprecated_msg__(msg) __attribute_deprecated__ #endif # 266 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* At some point during the gcc 2.8 development the `format_arg' attribute for functions was introduced. We don't want to use it unconditionally (although this would be possible) since it generates warnings. If several `format_arg' attributes are given for the same function, in gcc-3.0 and older, all but the last one are ignored. In newer gccs, all designated arguments are considered. */ #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (2,8) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 274 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __attribute_format_arg__(x) __attribute__ ((__format_arg__ (x))) #else # 276 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __attribute_format_arg__(x) /* Ignore */ #endif # 278 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* At some point during the gcc 2.97 development the `strfmon' format attribute for functions was introduced. We don't want to use it unconditionally (although this would be possible) since it generates warnings. */ #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (2,97) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 284 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __attribute_format_strfmon__(a,b) \ __attribute__ ((__format__ (__strfmon__, a, b))) #else # 287 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __attribute_format_strfmon__(a,b) /* Ignore */ #endif # 289 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* The nonull function attribute allows to mark pointer parameters which must not be NULL. */ #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (3,3) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 293 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __nonnull(params) __attribute__ ((__nonnull__ params)) #else # 295 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __nonnull(params) #endif # 297 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* If fortification mode, we warn about unused results of certain function calls which can lead to problems. */ #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (3,4) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 301 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __attribute_warn_unused_result__ \ __attribute__ ((__warn_unused_result__)) #if 0 /* disabled by -frewrite-includes */ # if __USE_FORTIFY_LEVEL > 0 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 304 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __wur __attribute_warn_unused_result__ # endif # 306 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 #else # 307 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __attribute_warn_unused_result__ /* empty */ #endif # 309 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 #ifndef __wur # define __wur /* Ignore */ #endif # 312 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* Forces a function to be always inlined. */ #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (3,2) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 315 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* The Linux kernel defines __always_inline in stddef.h (283d7573), and it conflicts with this definition. Therefore undefine it first to allow either header to be included first. */ # undef __always_inline # define __always_inline __inline __attribute__ ((__always_inline__)) #else # 321 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # undef __always_inline # define __always_inline __inline #endif # 324 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* Associate error messages with the source location of the call site rather than with the source location inside the function. */ #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (4,3) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 328 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __attribute_artificial__ __attribute__ ((__artificial__)) #else # 330 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __attribute_artificial__ /* Ignore */ #endif # 332 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions older than 4.3 may define these macros and still not guarantee GNU inlining semantics. clang++ identifies itself as gcc-4.2, but has support for GNU inlining semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and __GNUC_GNU_INLINE__ macro definitions. */ #if 0 /* disabled by -frewrite-includes */ #if (!defined __cplusplus || __GNUC_PREREQ (4,3) \ || (defined __clang__ && (defined __GNUC_STDC_INLINE__ \ || defined __GNUC_GNU_INLINE__))) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 345 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if defined __GNUC_STDC_INLINE__ || defined __cplusplus #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 346 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __extern_inline extern __inline __attribute__ ((__gnu_inline__)) # define __extern_always_inline \ extern __always_inline __attribute__ ((__gnu_inline__)) # else # 350 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __extern_inline extern __inline # define __extern_always_inline extern __always_inline # endif # 353 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 #endif # 354 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 #ifdef __extern_always_inline # define __fortify_function __extern_always_inline __attribute_artificial__ #endif # 358 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* GCC 4.3 and above allow passing all anonymous arguments of an __extern_always_inline function to some other vararg function. */ #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (4,3) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 362 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __va_arg_pack() __builtin_va_arg_pack () # define __va_arg_pack_len() __builtin_va_arg_pack_len () #endif # 365 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* It is possible to compile containing GCC extensions even if GCC is run in pedantic mode if the uses are carefully marked using the `__extension__' keyword. But this is not generally available before version 2.8. */ #if 0 /* disabled by -frewrite-includes */ #if !__GNUC_PREREQ (2,8) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 371 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __extension__ /* Ignore */ #endif # 373 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* __restrict is known in EGCS 1.2 and above. */ #if 0 /* disabled by -frewrite-includes */ #if !__GNUC_PREREQ (2,92) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 376 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 377 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __restrict restrict # else # 379 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __restrict /* Ignore */ # endif # 381 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 #endif # 382 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* ISO C99 also allows to declare arrays as non-overlapping. The syntax is array_name[restrict] GCC 3.1 supports this. */ #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (3,1) && !defined __GNUG__ #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 387 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __restrict_arr __restrict #else # 389 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # ifdef __GNUC__ # define __restrict_arr /* Not supported in old GCC. */ # else # 392 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 393 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __restrict_arr restrict # else # 395 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* Some other non-C99 compiler. */ # define __restrict_arr /* Not supported. */ # endif # 398 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # endif # 399 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 #endif # 400 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __GNUC__ >= 3 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 402 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __glibc_unlikely(cond) __builtin_expect ((cond), 0) # define __glibc_likely(cond) __builtin_expect ((cond), 1) #else # 405 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __glibc_unlikely(cond) (cond) # define __glibc_likely(cond) (cond) #endif # 408 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 #ifdef __has_attribute # define __glibc_has_attribute(attr) __has_attribute (attr) #else # 412 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __glibc_has_attribute(attr) 0 #endif # 414 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if (!defined _Noreturn \ && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \ && !__GNUC_PREREQ (4,7)) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 418 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __GNUC_PREREQ (2,8) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 419 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define _Noreturn __attribute__ ((__noreturn__)) # else # 421 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define _Noreturn # endif # 423 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 #endif # 424 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (8, 0) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 426 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* Describes a char array whose address can safely be passed as the first argument to strncpy and strncat, as the char array is not necessarily a NUL-terminated string. */ # define __attribute_nonstring__ __attribute__ ((__nonstring__)) #else # 431 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __attribute_nonstring__ #endif # 433 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* Undefine (also defined in libc-symbols.h). */ #undef __attribute_copy__ #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (9, 0) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 437 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* Copies attributes from the declaration or type referenced by the argument. */ # define __attribute_copy__(arg) __attribute__ ((__copy__ (arg))) #else # 441 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __attribute_copy__(arg) #endif # 443 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if (!defined _Static_assert && !defined __cplusplus \ && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \ && (!__GNUC_PREREQ (4, 6) || defined __STRICT_ANSI__)) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 447 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define _Static_assert(expr, diagnostic) \ extern int (*__Static_assert_function (void)) \ [!!sizeof (struct { int __error_if_negative: (expr) ? 2 : -1; })] #endif # 451 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <bits/wordsize.h> #endif /* expanded by -frewrite-includes */ # 452 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 /* Determine the wordsize from the preprocessor defines. */ #if 0 /* disabled by -frewrite-includes */ #if defined __x86_64__ && !defined __ILP32__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 4 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 # define __WORDSIZE 64 #else # 6 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 # define __WORDSIZE 32 #define __WORDSIZE32_SIZE_ULONG 0 #define __WORDSIZE32_PTRDIFF_LONG 0 #endif # 10 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 #ifdef __x86_64__ # define __WORDSIZE_TIME64_COMPAT32 1 /* Both x86-64 and x32 use the 64-bit system call interface. */ # define __SYSCALL_WORDSIZE 64 #else # 16 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 # define __WORDSIZE_TIME64_COMPAT32 0 #endif # 18 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 # 453 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include <bits/long-double.h> #endif /* expanded by -frewrite-includes */ # 453 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/long-double.h" 1 3 4 /* Properties of long double type. ldbl-96 version. Copyright (C) 2016-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ /* long double is distinct from double, so there is nothing to define here. */ #define __LONG_DOUBLE_USES_FLOAT128 0 # 454 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 2 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __LONG_DOUBLE_MATH_OPTIONAL && defined __NO_LONG_DOUBLE_MATH #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 456 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __LDBL_COMPAT 1 # ifdef __REDIRECT # define __LDBL_REDIR1(name, proto, alias) __REDIRECT (name, proto, alias) # define __LDBL_REDIR(name, proto) \ __LDBL_REDIR1 (name, proto, __nldbl_##name) # define __LDBL_REDIR1_NTH(name, proto, alias) __REDIRECT_NTH (name, proto, alias) # define __LDBL_REDIR_NTH(name, proto) \ __LDBL_REDIR1_NTH (name, proto, __nldbl_##name) # define __LDBL_REDIR1_DECL(name, alias) \ extern __typeof (name) name __asm (__ASMNAME (#alias)); # define __LDBL_REDIR_DECL(name) \ extern __typeof (name) name __asm (__ASMNAME ("__nldbl_" #name)); # define __REDIRECT_LDBL(name, proto, alias) \ __LDBL_REDIR1 (name, proto, __nldbl_##alias) # define __REDIRECT_NTH_LDBL(name, proto, alias) \ __LDBL_REDIR1_NTH (name, proto, __nldbl_##alias) # endif # 473 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 #endif # 474 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !defined __LDBL_COMPAT || !defined __REDIRECT #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 475 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __LDBL_REDIR1(name, proto, alias) name proto # define __LDBL_REDIR(name, proto) name proto # define __LDBL_REDIR1_NTH(name, proto, alias) name proto __THROW # define __LDBL_REDIR_NTH(name, proto) name proto __THROW # define __LDBL_REDIR_DECL(name) # ifdef __REDIRECT # define __REDIRECT_LDBL(name, proto, alias) __REDIRECT (name, proto, alias) # define __REDIRECT_NTH_LDBL(name, proto, alias) \ __REDIRECT_NTH (name, proto, alias) # endif # 485 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 #endif # 486 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is intended for use in preprocessor macros. Note: MESSAGE must be a _single_ string; concatenation of string literals is not supported. */ #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (4,8) || __glibc_clang_prereq (3,5) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 493 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __glibc_macro_warning1(message) _Pragma (#message) # define __glibc_macro_warning(message) \ __glibc_macro_warning1 (GCC warning message) #else # 497 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __glibc_macro_warning(msg) #endif # 499 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* Generic selection (ISO C11) is a C-only feature, available in GCC since version 4.9. Previous versions do not provide generic selection, even though they might set __STDC_VERSION__ to 201112L, when in -std=c11 mode. Thus, we must check for !defined __GNUC__ when testing __STDC_VERSION__ for generic selection support. On the other hand, Clang also defines __GNUC__, so a clang-specific check is required to enable the use of generic selection. */ #if 0 /* disabled by -frewrite-includes */ #if !defined __cplusplus \ && (__GNUC_PREREQ (4, 9) \ || __glibc_clang_has_extension (c_generic_selections) \ || (!defined __GNUC__ && defined __STDC_VERSION__ \ && __STDC_VERSION__ >= 201112L)) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 512 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __HAVE_GENERIC_SELECTION 1 #else # 514 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # define __HAVE_GENERIC_SELECTION 0 #endif # 516 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 #endif /* sys/cdefs.h */ # 518 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # 462 "/usr/include/features.h" 2 3 4 # endif # 463 "/usr/include/features.h" 3 4 /* If we don't have __REDIRECT, prototypes will be missing if __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. */ #if 0 /* disabled by -frewrite-includes */ # if defined __USE_FILE_OFFSET64 && !defined __REDIRECT #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 467 "/usr/include/features.h" 3 4 # define __USE_LARGEFILE 1 # define __USE_LARGEFILE64 1 # endif # 470 "/usr/include/features.h" 3 4 #endif /* !ASSEMBLER */ # 472 "/usr/include/features.h" 3 4 /* Decide whether we can define 'extern inline' functions in headers. */ #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (2, 7) && defined __OPTIMIZE__ \ && !defined __OPTIMIZE_SIZE__ && !defined __NO_INLINE__ \ && defined __extern_inline #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 477 "/usr/include/features.h" 3 4 # define __USE_EXTERN_INLINES 1 #endif # 479 "/usr/include/features.h" 3 4 /* This is here only because every header file already includes this one. Get the definitions of all the appropriate `__stub_FUNCTION' symbols. <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub that will always return failure (and set errno to ENOSYS). */ #if 0 /* expanded by -frewrite-includes */ #include <gnu/stubs.h> #endif /* expanded by -frewrite-includes */ # 485 "/usr/include/features.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 1 3 4 /* This file is automatically generated. This file selects the right generated file of `__stub_FUNCTION' macros based on the architecture being compiled for. */ #if 0 /* disabled by -frewrite-includes */ #if !defined __x86_64__ #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 7 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 3 4 #if 0 /* expanded by -frewrite-includes */ # include <gnu/stubs-32.h> #endif /* expanded by -frewrite-includes */ # 7 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 3 4 # 8 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 3 4 #endif # 9 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __x86_64__ && defined __LP64__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 10 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 3 4 #if 0 /* expanded by -frewrite-includes */ # include <gnu/stubs-64.h> #endif /* expanded by -frewrite-includes */ # 10 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/gnu/stubs-64.h" 1 3 4 /* This file is automatically generated. It defines a symbol `__stub_FUNCTION' for each function in the C library which is a stub, meaning it will fail every time called, usually setting errno to ENOSYS. */ #ifdef _LIBC # error Applications may not define the macro _LIBC #endif # 9 "/usr/include/x86_64-linux-gnu/gnu/stubs-64.h" 3 4 #define __stub___compat_bdflush #define __stub_chflags #define __stub_fchflags #define __stub_gtty #define __stub_lchmod #define __stub_revoke #define __stub_setlogin #define __stub_sigreturn #define __stub_sstk #define __stub_stty # 11 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 2 3 4 #endif # 12 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __x86_64__ && defined __ILP32__ #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 13 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 3 4 #if 0 /* expanded by -frewrite-includes */ # include <gnu/stubs-x32.h> #endif /* expanded by -frewrite-includes */ # 13 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 3 4 # 14 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 3 4 #endif # 15 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 3 4 # 486 "/usr/include/features.h" 2 3 4 #endif /* features.h */ # 489 "/usr/include/features.h" 3 4 # 40 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/os_defines.h" 2 3 // Provide a declaration for the possibly deprecated gets function, as // glibc 2.15 and later does not declare gets for ISO C11 when // __GNU_SOURCE is defined. #if 0 /* disabled by -frewrite-includes */ #if __GLIBC_PREREQ(2,15) && defined(_GNU_SOURCE) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 45 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/os_defines.h" 3 # undef _GLIBCXX_HAVE_GETS #endif # 47 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/os_defines.h" 3 // Glibc 2.23 removed the obsolete isinf and isnan declarations. Check the // version dynamically in case it has changed since libstdc++ was configured. #define _GLIBCXX_NO_OBSOLETE_ISINF_ISNAN_DYNAMIC __GLIBC_PREREQ(2,23) #endif # 53 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/os_defines.h" 3 # 529 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 2 3 // Pick up any CPU-specific definitions. #if 0 /* expanded by -frewrite-includes */ #include <bits/cpu_defines.h> #endif /* expanded by -frewrite-includes */ # 531 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/cpu_defines.h" 1 3 // Specific definitions for generic platforms -*- C++ -*- // Copyright (C) 2005-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file bits/cpu_defines.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{iosfwd} */ #ifndef _GLIBCXX_CPU_DEFINES #define _GLIBCXX_CPU_DEFINES 1 #endif # 34 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/cpu_defines.h" 3 # 532 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 2 3 // If platform uses neither visibility nor psuedo-visibility, // specify empty default for namespace annotation macros. #ifndef _GLIBCXX_PSEUDO_VISIBILITY # define _GLIBCXX_PSEUDO_VISIBILITY(V) #endif # 538 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 // Certain function definitions that are meant to be overridable from // user code are decorated with this macro. For some targets, this // macro causes these definitions to be weak. #ifndef _GLIBCXX_WEAK_DEFINITION # define _GLIBCXX_WEAK_DEFINITION #endif # 545 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 // By default, we assume that __GXX_WEAK__ also means that there is support // for declaring functions as weak while not defining such functions. This // allows for referring to functions provided by other libraries (e.g., // libitm) without depending on them if the respective features are not used. #ifndef _GLIBCXX_USE_WEAK_REF # define _GLIBCXX_USE_WEAK_REF __GXX_WEAK__ #endif # 553 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 // Conditionally enable annotations for the Transactional Memory TS on C++11. // Most of the following conditions are due to limitations in the current // implementation. #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L && _GLIBCXX_USE_CXX11_ABI \ && _GLIBCXX_USE_DUAL_ABI && __cpp_transactional_memory >= 201500L \ && !_GLIBCXX_FULLY_DYNAMIC_STRING && _GLIBCXX_USE_WEAK_REF \ && _GLIBCXX_USE_ALLOCATOR_NEW #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 561 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #define _GLIBCXX_TXN_SAFE transaction_safe #define _GLIBCXX_TXN_SAFE_DYN transaction_safe_dynamic #else # 564 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #define _GLIBCXX_TXN_SAFE #define _GLIBCXX_TXN_SAFE_DYN #endif # 567 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201402L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 569 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 // In C++17 mathematical special functions are in namespace std. # define _GLIBCXX_USE_STD_SPEC_FUNCS 1 #if 0 /* disabled by -frewrite-includes */ #if 0 #elif __cplusplus >= 201103L && __STDCPP_WANT_MATH_SPEC_FUNCS__ != 0 #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 572 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 // For C++11 and C++14 they are in namespace std when requested. # define _GLIBCXX_USE_STD_SPEC_FUNCS 1 #endif # 575 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 // The remainder of the prewritten config is automatic; all the // user hooks are listed above. // Create a boolean flag to be used to determine if --fast-math is set. #ifdef __FAST_MATH__ # define _GLIBCXX_FAST_MATH 1 #else # 583 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_FAST_MATH 0 #endif # 585 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 // This marks string literals in header files to be extracted for eventual // translation. It is primarily used for messages in thrown exceptions; see // src/functexcept.cc. We use __N because the more traditional _N is used // for something else under certain OSes (see BADNAMES). #define __N(msgid) (msgid) // For example, <windows.h> is known to #define min and max as macros... #undef min #undef max // N.B. these _GLIBCXX_USE_C99_XXX macros are defined unconditionally // so they should be tested with #if not with #ifdef. #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 599 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # ifndef _GLIBCXX_USE_C99_MATH # define _GLIBCXX_USE_C99_MATH _GLIBCXX11_USE_C99_MATH # endif # 602 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # ifndef _GLIBCXX_USE_C99_COMPLEX # define _GLIBCXX_USE_C99_COMPLEX _GLIBCXX11_USE_C99_COMPLEX # endif # 605 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # ifndef _GLIBCXX_USE_C99_STDIO # define _GLIBCXX_USE_C99_STDIO _GLIBCXX11_USE_C99_STDIO # endif # 608 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # ifndef _GLIBCXX_USE_C99_STDLIB # define _GLIBCXX_USE_C99_STDLIB _GLIBCXX11_USE_C99_STDLIB # endif # 611 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # ifndef _GLIBCXX_USE_C99_WCHAR # define _GLIBCXX_USE_C99_WCHAR _GLIBCXX11_USE_C99_WCHAR # endif # 614 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #else # 615 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # ifndef _GLIBCXX_USE_C99_MATH # define _GLIBCXX_USE_C99_MATH _GLIBCXX98_USE_C99_MATH # endif # 618 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # ifndef _GLIBCXX_USE_C99_COMPLEX # define _GLIBCXX_USE_C99_COMPLEX _GLIBCXX98_USE_C99_COMPLEX # endif # 621 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # ifndef _GLIBCXX_USE_C99_STDIO # define _GLIBCXX_USE_C99_STDIO _GLIBCXX98_USE_C99_STDIO # endif # 624 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # ifndef _GLIBCXX_USE_C99_STDLIB # define _GLIBCXX_USE_C99_STDLIB _GLIBCXX98_USE_C99_STDLIB # endif # 627 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # ifndef _GLIBCXX_USE_C99_WCHAR # define _GLIBCXX_USE_C99_WCHAR _GLIBCXX98_USE_C99_WCHAR # endif # 630 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #endif # 631 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 // Unless explicitly specified, enable char8_t extensions only if the core // language char8_t feature macro is defined. #ifndef _GLIBCXX_USE_CHAR8_T # ifdef __cpp_char8_t # define _GLIBCXX_USE_CHAR8_T 1 # endif # 638 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #endif # 639 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #ifdef _GLIBCXX_USE_CHAR8_T # define __cpp_lib_char8_t 201811L #endif # 642 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 /* Define if __float128 is supported on this host. */ #if 0 /* disabled by -frewrite-includes */ #if defined(__FLOAT128__) || defined(__SIZEOF_FLOAT128__) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 645 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #define _GLIBCXX_USE_FLOAT128 1 #endif # 647 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __GNUC__ >= 7 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 649 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 // Assume these are available if the compiler claims to be a recent GCC: # define _GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP 1 # define _GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE 1 # define _GLIBCXX_HAVE_BUILTIN_LAUNDER 1 #if 0 /* disabled by -frewrite-includes */ # if __GNUC__ >= 9 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 654 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED 1 # endif # 656 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if 0 #elif defined(__is_identifier) && defined(__has_builtin) #endif #endif /* disabled by -frewrite-includes */ #elif 1 /* evaluated by -frewrite-includes */ # 657 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 // For non-GNU compilers: #if 0 /* disabled by -frewrite-includes */ # if ! __is_identifier(__has_unique_object_representations) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 659 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP 1 # endif # 661 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ # if ! __is_identifier(__is_aggregate) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 662 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE 1 # endif # 664 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ # if __has_builtin(__builtin_launder) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 665 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_BUILTIN_LAUNDER 1 # endif # 667 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ # if __has_builtin(__builtin_is_constant_evaluated) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 668 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED 1 # endif # 670 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #endif // GCC # 671 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 // PSTL configuration #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 675 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 // This header is not installed for freestanding: #if 0 /* disabled by -frewrite-includes */ #if __has_include(<pstl/pstl_config.h>) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 677 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 // Preserved here so we have some idea which version of upstream we've pulled in // #define PSTL_VERSION 104 // #define PSTL_VERSION_MAJOR (PSTL_VERSION/100) // #define PSTL_VERSION_MINOR (PSTL_VERSION - PSTL_VERSION_MAJOR * 100) // For now this defaults to being based on the presence of Thread Building Blocks # ifndef _GLIBCXX_USE_TBB_PAR_BACKEND # define _GLIBCXX_USE_TBB_PAR_BACKEND __has_include(<tbb/tbb.h>) # endif # 686 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 // This section will need some rework when a new (default) backend type is added #if 0 /* disabled by -frewrite-includes */ # if _GLIBCXX_USE_TBB_PAR_BACKEND #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 688 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define __PSTL_USE_PAR_POLICIES 1 # endif # 690 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define __PSTL_ASSERT(_Condition) __glibcxx_assert(_Condition) # define __PSTL_ASSERT_MSG(_Condition, _Message) __glibcxx_assert(_Condition) #if 0 /* expanded by -frewrite-includes */ #include <pstl/pstl_config.h> #endif /* expanded by -frewrite-includes */ # 694 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # 695 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #endif // __has_include # 696 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #endif // C++17 # 697 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 // End of prewritten config; the settings discovered at configure time follow. /* config.h. Generated from config.h.in by configure. */ /* config.h.in. Generated from configure.ac by autoheader. */ /* Define to 1 if you have the `acosf' function. */ #define _GLIBCXX_HAVE_ACOSF 1 /* Define to 1 if you have the `acosl' function. */ #define _GLIBCXX_HAVE_ACOSL 1 /* Define to 1 if you have the `aligned_alloc' function. */ #define _GLIBCXX_HAVE_ALIGNED_ALLOC 1 /* Define to 1 if you have the <arpa/inet.h> header file. */ #define _GLIBCXX_HAVE_ARPA_INET_H 1 /* Define to 1 if you have the `asinf' function. */ #define _GLIBCXX_HAVE_ASINF 1 /* Define to 1 if you have the `asinl' function. */ #define _GLIBCXX_HAVE_ASINL 1 /* Define to 1 if the target assembler supports .symver directive. */ #define _GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE 1 /* Define to 1 if you have the `atan2f' function. */ #define _GLIBCXX_HAVE_ATAN2F 1 /* Define to 1 if you have the `atan2l' function. */ #define _GLIBCXX_HAVE_ATAN2L 1 /* Define to 1 if you have the `atanf' function. */ #define _GLIBCXX_HAVE_ATANF 1 /* Define to 1 if you have the `atanl' function. */ #define _GLIBCXX_HAVE_ATANL 1 /* Defined if shared_ptr reference counting should use atomic operations. */ #define _GLIBCXX_HAVE_ATOMIC_LOCK_POLICY 1 /* Define to 1 if you have the `at_quick_exit' function. */ #define _GLIBCXX_HAVE_AT_QUICK_EXIT 1 /* Define to 1 if the target assembler supports thread-local storage. */ /* #undef _GLIBCXX_HAVE_CC_TLS */ /* Define to 1 if you have the `ceilf' function. */ #define _GLIBCXX_HAVE_CEILF 1 /* Define to 1 if you have the `ceill' function. */ #define _GLIBCXX_HAVE_CEILL 1 /* Define to 1 if you have the <complex.h> header file. */ #define _GLIBCXX_HAVE_COMPLEX_H 1 /* Define to 1 if you have the `cosf' function. */ #define _GLIBCXX_HAVE_COSF 1 /* Define to 1 if you have the `coshf' function. */ #define _GLIBCXX_HAVE_COSHF 1 /* Define to 1 if you have the `coshl' function. */ #define _GLIBCXX_HAVE_COSHL 1 /* Define to 1 if you have the `cosl' function. */ #define _GLIBCXX_HAVE_COSL 1 /* Define to 1 if you have the <dirent.h> header file. */ #define _GLIBCXX_HAVE_DIRENT_H 1 /* Define to 1 if you have the <dlfcn.h> header file. */ #define _GLIBCXX_HAVE_DLFCN_H 1 /* Define if EBADMSG exists. */ #define _GLIBCXX_HAVE_EBADMSG 1 /* Define if ECANCELED exists. */ #define _GLIBCXX_HAVE_ECANCELED 1 /* Define if ECHILD exists. */ #define _GLIBCXX_HAVE_ECHILD 1 /* Define if EIDRM exists. */ #define _GLIBCXX_HAVE_EIDRM 1 /* Define to 1 if you have the <endian.h> header file. */ #define _GLIBCXX_HAVE_ENDIAN_H 1 /* Define if ENODATA exists. */ #define _GLIBCXX_HAVE_ENODATA 1 /* Define if ENOLINK exists. */ #define _GLIBCXX_HAVE_ENOLINK 1 /* Define if ENOSPC exists. */ #define _GLIBCXX_HAVE_ENOSPC 1 /* Define if ENOSR exists. */ #define _GLIBCXX_HAVE_ENOSR 1 /* Define if ENOSTR exists. */ #define _GLIBCXX_HAVE_ENOSTR 1 /* Define if ENOTRECOVERABLE exists. */ #define _GLIBCXX_HAVE_ENOTRECOVERABLE 1 /* Define if ENOTSUP exists. */ #define _GLIBCXX_HAVE_ENOTSUP 1 /* Define if EOVERFLOW exists. */ #define _GLIBCXX_HAVE_EOVERFLOW 1 /* Define if EOWNERDEAD exists. */ #define _GLIBCXX_HAVE_EOWNERDEAD 1 /* Define if EPERM exists. */ #define _GLIBCXX_HAVE_EPERM 1 /* Define if EPROTO exists. */ #define _GLIBCXX_HAVE_EPROTO 1 /* Define if ETIME exists. */ #define _GLIBCXX_HAVE_ETIME 1 /* Define if ETIMEDOUT exists. */ #define _GLIBCXX_HAVE_ETIMEDOUT 1 /* Define if ETXTBSY exists. */ #define _GLIBCXX_HAVE_ETXTBSY 1 /* Define if EWOULDBLOCK exists. */ #define _GLIBCXX_HAVE_EWOULDBLOCK 1 /* Define to 1 if GCC 4.6 supported std::exception_ptr for the target */ #define _GLIBCXX_HAVE_EXCEPTION_PTR_SINCE_GCC46 1 /* Define to 1 if you have the <execinfo.h> header file. */ #define _GLIBCXX_HAVE_EXECINFO_H 1 /* Define to 1 if you have the `expf' function. */ #define _GLIBCXX_HAVE_EXPF 1 /* Define to 1 if you have the `expl' function. */ #define _GLIBCXX_HAVE_EXPL 1 /* Define to 1 if you have the `fabsf' function. */ #define _GLIBCXX_HAVE_FABSF 1 /* Define to 1 if you have the `fabsl' function. */ #define _GLIBCXX_HAVE_FABSL 1 /* Define to 1 if you have the <fcntl.h> header file. */ #define _GLIBCXX_HAVE_FCNTL_H 1 /* Define to 1 if you have the <fenv.h> header file. */ #define _GLIBCXX_HAVE_FENV_H 1 /* Define to 1 if you have the `finite' function. */ #define _GLIBCXX_HAVE_FINITE 1 /* Define to 1 if you have the `finitef' function. */ #define _GLIBCXX_HAVE_FINITEF 1 /* Define to 1 if you have the `finitel' function. */ #define _GLIBCXX_HAVE_FINITEL 1 /* Define to 1 if you have the <float.h> header file. */ #define _GLIBCXX_HAVE_FLOAT_H 1 /* Define to 1 if you have the `floorf' function. */ #define _GLIBCXX_HAVE_FLOORF 1 /* Define to 1 if you have the `floorl' function. */ #define _GLIBCXX_HAVE_FLOORL 1 /* Define to 1 if you have the `fmodf' function. */ #define _GLIBCXX_HAVE_FMODF 1 /* Define to 1 if you have the `fmodl' function. */ #define _GLIBCXX_HAVE_FMODL 1 /* Define to 1 if you have the `fpclass' function. */ /* #undef _GLIBCXX_HAVE_FPCLASS */ /* Define to 1 if you have the <fp.h> header file. */ /* #undef _GLIBCXX_HAVE_FP_H */ /* Define to 1 if you have the `frexpf' function. */ #define _GLIBCXX_HAVE_FREXPF 1 /* Define to 1 if you have the `frexpl' function. */ #define _GLIBCXX_HAVE_FREXPL 1 /* Define if _Unwind_GetIPInfo is available. */ #define _GLIBCXX_HAVE_GETIPINFO 1 /* Define if gets is available in <stdio.h> before C++14. */ #define _GLIBCXX_HAVE_GETS 1 /* Define to 1 if you have the `hypot' function. */ #define _GLIBCXX_HAVE_HYPOT 1 /* Define to 1 if you have the `hypotf' function. */ #define _GLIBCXX_HAVE_HYPOTF 1 /* Define to 1 if you have the `hypotl' function. */ #define _GLIBCXX_HAVE_HYPOTL 1 /* Define if you have the iconv() function. */ #define _GLIBCXX_HAVE_ICONV 1 /* Define to 1 if you have the <ieeefp.h> header file. */ /* #undef _GLIBCXX_HAVE_IEEEFP_H */ /* Define if int64_t is available in <stdint.h>. */ #define _GLIBCXX_HAVE_INT64_T 1 /* Define if int64_t is a long. */ #define _GLIBCXX_HAVE_INT64_T_LONG 1 /* Define if int64_t is a long long. */ /* #undef _GLIBCXX_HAVE_INT64_T_LONG_LONG */ /* Define to 1 if you have the <inttypes.h> header file. */ #define _GLIBCXX_HAVE_INTTYPES_H 1 /* Define to 1 if you have the `isinf' function. */ /* #undef _GLIBCXX_HAVE_ISINF */ /* Define to 1 if you have the `isinff' function. */ #define _GLIBCXX_HAVE_ISINFF 1 /* Define to 1 if you have the `isinfl' function. */ #define _GLIBCXX_HAVE_ISINFL 1 /* Define to 1 if you have the `isnan' function. */ /* #undef _GLIBCXX_HAVE_ISNAN */ /* Define to 1 if you have the `isnanf' function. */ #define _GLIBCXX_HAVE_ISNANF 1 /* Define to 1 if you have the `isnanl' function. */ #define _GLIBCXX_HAVE_ISNANL 1 /* Defined if iswblank exists. */ #define _GLIBCXX_HAVE_ISWBLANK 1 /* Define if LC_MESSAGES is available in <locale.h>. */ #define _GLIBCXX_HAVE_LC_MESSAGES 1 /* Define to 1 if you have the `ldexpf' function. */ #define _GLIBCXX_HAVE_LDEXPF 1 /* Define to 1 if you have the `ldexpl' function. */ #define _GLIBCXX_HAVE_LDEXPL 1 /* Define to 1 if you have the <libintl.h> header file. */ #define _GLIBCXX_HAVE_LIBINTL_H 1 /* Only used in build directory testsuite_hooks.h. */ #define _GLIBCXX_HAVE_LIMIT_AS 1 /* Only used in build directory testsuite_hooks.h. */ #define _GLIBCXX_HAVE_LIMIT_DATA 1 /* Only used in build directory testsuite_hooks.h. */ #define _GLIBCXX_HAVE_LIMIT_FSIZE 1 /* Only used in build directory testsuite_hooks.h. */ #define _GLIBCXX_HAVE_LIMIT_RSS 1 /* Only used in build directory testsuite_hooks.h. */ #define _GLIBCXX_HAVE_LIMIT_VMEM 0 /* Define if link is available in <unistd.h>. */ #define _GLIBCXX_HAVE_LINK 1 /* Define if futex syscall is available. */ #define _GLIBCXX_HAVE_LINUX_FUTEX 1 /* Define to 1 if you have the <linux/random.h> header file. */ #define _GLIBCXX_HAVE_LINUX_RANDOM_H 1 /* Define to 1 if you have the <linux/types.h> header file. */ #define _GLIBCXX_HAVE_LINUX_TYPES_H 1 /* Define to 1 if you have the <locale.h> header file. */ #define _GLIBCXX_HAVE_LOCALE_H 1 /* Define to 1 if you have the `log10f' function. */ #define _GLIBCXX_HAVE_LOG10F 1 /* Define to 1 if you have the `log10l' function. */ #define _GLIBCXX_HAVE_LOG10L 1 /* Define to 1 if you have the `logf' function. */ #define _GLIBCXX_HAVE_LOGF 1 /* Define to 1 if you have the `logl' function. */ #define _GLIBCXX_HAVE_LOGL 1 /* Define to 1 if you have the <machine/endian.h> header file. */ /* #undef _GLIBCXX_HAVE_MACHINE_ENDIAN_H */ /* Define to 1 if you have the <machine/param.h> header file. */ /* #undef _GLIBCXX_HAVE_MACHINE_PARAM_H */ /* Define if mbstate_t exists in wchar.h. */ #define _GLIBCXX_HAVE_MBSTATE_T 1 /* Define to 1 if you have the `memalign' function. */ #define _GLIBCXX_HAVE_MEMALIGN 1 /* Define to 1 if you have the <memory.h> header file. */ #define _GLIBCXX_HAVE_MEMORY_H 1 /* Define to 1 if you have the `modf' function. */ #define _GLIBCXX_HAVE_MODF 1 /* Define to 1 if you have the `modff' function. */ #define _GLIBCXX_HAVE_MODFF 1 /* Define to 1 if you have the `modfl' function. */ #define _GLIBCXX_HAVE_MODFL 1 /* Define to 1 if you have the <nan.h> header file. */ /* #undef _GLIBCXX_HAVE_NAN_H */ /* Define to 1 if you have the <netdb.h> header file. */ #define _GLIBCXX_HAVE_NETDB_H 1 /* Define to 1 if you have the <netinet/in.h> header file. */ #define _GLIBCXX_HAVE_NETINET_IN_H 1 /* Define to 1 if you have the <netinet/tcp.h> header file. */ #define _GLIBCXX_HAVE_NETINET_TCP_H 1 /* Define if <math.h> defines obsolete isinf function. */ /* #undef _GLIBCXX_HAVE_OBSOLETE_ISINF */ /* Define if <math.h> defines obsolete isnan function. */ /* #undef _GLIBCXX_HAVE_OBSOLETE_ISNAN */ /* Define if poll is available in <poll.h>. */ #define _GLIBCXX_HAVE_POLL 1 /* Define to 1 if you have the <poll.h> header file. */ #define _GLIBCXX_HAVE_POLL_H 1 /* Define to 1 if you have the `posix_memalign' function. */ #define _GLIBCXX_HAVE_POSIX_MEMALIGN 1 /* Define to 1 if you have the `powf' function. */ #define _GLIBCXX_HAVE_POWF 1 /* Define to 1 if you have the `powl' function. */ #define _GLIBCXX_HAVE_POWL 1 /* Define to 1 if you have the `qfpclass' function. */ /* #undef _GLIBCXX_HAVE_QFPCLASS */ /* Define to 1 if you have the `quick_exit' function. */ #define _GLIBCXX_HAVE_QUICK_EXIT 1 /* Define if readlink is available in <unistd.h>. */ #define _GLIBCXX_HAVE_READLINK 1 /* Define to 1 if you have the `setenv' function. */ #define _GLIBCXX_HAVE_SETENV 1 /* Define to 1 if you have the `sincos' function. */ #define _GLIBCXX_HAVE_SINCOS 1 /* Define to 1 if you have the `sincosf' function. */ #define _GLIBCXX_HAVE_SINCOSF 1 /* Define to 1 if you have the `sincosl' function. */ #define _GLIBCXX_HAVE_SINCOSL 1 /* Define to 1 if you have the `sinf' function. */ #define _GLIBCXX_HAVE_SINF 1 /* Define to 1 if you have the `sinhf' function. */ #define _GLIBCXX_HAVE_SINHF 1 /* Define to 1 if you have the `sinhl' function. */ #define _GLIBCXX_HAVE_SINHL 1 /* Define to 1 if you have the `sinl' function. */ #define _GLIBCXX_HAVE_SINL 1 /* Defined if sleep exists. */ /* #undef _GLIBCXX_HAVE_SLEEP */ /* Define to 1 if you have the `sockatmark' function. */ #define _GLIBCXX_HAVE_SOCKATMARK 1 /* Define to 1 if you have the `sqrtf' function. */ #define _GLIBCXX_HAVE_SQRTF 1 /* Define to 1 if you have the `sqrtl' function. */ #define _GLIBCXX_HAVE_SQRTL 1 /* Define to 1 if you have the <stdalign.h> header file. */ #define _GLIBCXX_HAVE_STDALIGN_H 1 /* Define to 1 if you have the <stdbool.h> header file. */ #define _GLIBCXX_HAVE_STDBOOL_H 1 /* Define to 1 if you have the <stdint.h> header file. */ #define _GLIBCXX_HAVE_STDINT_H 1 /* Define to 1 if you have the <stdlib.h> header file. */ #define _GLIBCXX_HAVE_STDLIB_H 1 /* Define if strerror_l is available in <string.h>. */ #define _GLIBCXX_HAVE_STRERROR_L 1 /* Define if strerror_r is available in <string.h>. */ #define _GLIBCXX_HAVE_STRERROR_R 1 /* Define to 1 if you have the <strings.h> header file. */ #define _GLIBCXX_HAVE_STRINGS_H 1 /* Define to 1 if you have the <string.h> header file. */ #define _GLIBCXX_HAVE_STRING_H 1 /* Define to 1 if you have the `strtof' function. */ #define _GLIBCXX_HAVE_STRTOF 1 /* Define to 1 if you have the `strtold' function. */ #define _GLIBCXX_HAVE_STRTOLD 1 /* Define to 1 if `d_type' is a member of `struct dirent'. */ #define _GLIBCXX_HAVE_STRUCT_DIRENT_D_TYPE 1 /* Define if strxfrm_l is available in <string.h>. */ #define _GLIBCXX_HAVE_STRXFRM_L 1 /* Define if symlink is available in <unistd.h>. */ #define _GLIBCXX_HAVE_SYMLINK 1 /* Define to 1 if the target runtime linker supports binding the same symbol to different versions. */ #define _GLIBCXX_HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT 1 /* Define to 1 if you have the <sys/filio.h> header file. */ /* #undef _GLIBCXX_HAVE_SYS_FILIO_H */ /* Define to 1 if you have the <sys/ioctl.h> header file. */ #define _GLIBCXX_HAVE_SYS_IOCTL_H 1 /* Define to 1 if you have the <sys/ipc.h> header file. */ #define _GLIBCXX_HAVE_SYS_IPC_H 1 /* Define to 1 if you have the <sys/isa_defs.h> header file. */ /* #undef _GLIBCXX_HAVE_SYS_ISA_DEFS_H */ /* Define to 1 if you have the <sys/machine.h> header file. */ /* #undef _GLIBCXX_HAVE_SYS_MACHINE_H */ /* Define to 1 if you have the <sys/param.h> header file. */ #define _GLIBCXX_HAVE_SYS_PARAM_H 1 /* Define to 1 if you have the <sys/resource.h> header file. */ #define _GLIBCXX_HAVE_SYS_RESOURCE_H 1 /* Define to 1 if you have a suitable <sys/sdt.h> header file */ #define _GLIBCXX_HAVE_SYS_SDT_H 1 /* Define to 1 if you have the <sys/sem.h> header file. */ #define _GLIBCXX_HAVE_SYS_SEM_H 1 /* Define to 1 if you have the <sys/socket.h> header file. */ #define _GLIBCXX_HAVE_SYS_SOCKET_H 1 /* Define to 1 if you have the <sys/statvfs.h> header file. */ #define _GLIBCXX_HAVE_SYS_STATVFS_H 1 /* Define to 1 if you have the <sys/stat.h> header file. */ #define _GLIBCXX_HAVE_SYS_STAT_H 1 /* Define to 1 if you have the <sys/sysinfo.h> header file. */ #define _GLIBCXX_HAVE_SYS_SYSINFO_H 1 /* Define to 1 if you have the <sys/time.h> header file. */ #define _GLIBCXX_HAVE_SYS_TIME_H 1 /* Define to 1 if you have the <sys/types.h> header file. */ #define _GLIBCXX_HAVE_SYS_TYPES_H 1 /* Define to 1 if you have the <sys/uio.h> header file. */ #define _GLIBCXX_HAVE_SYS_UIO_H 1 /* Define if S_IFREG is available in <sys/stat.h>. */ /* #undef _GLIBCXX_HAVE_S_IFREG */ /* Define if S_ISREG is available in <sys/stat.h>. */ #define _GLIBCXX_HAVE_S_ISREG 1 /* Define to 1 if you have the `tanf' function. */ #define _GLIBCXX_HAVE_TANF 1 /* Define to 1 if you have the `tanhf' function. */ #define _GLIBCXX_HAVE_TANHF 1 /* Define to 1 if you have the `tanhl' function. */ #define _GLIBCXX_HAVE_TANHL 1 /* Define to 1 if you have the `tanl' function. */ #define _GLIBCXX_HAVE_TANL 1 /* Define to 1 if you have the <tgmath.h> header file. */ #define _GLIBCXX_HAVE_TGMATH_H 1 /* Define to 1 if you have the `timespec_get' function. */ #define _GLIBCXX_HAVE_TIMESPEC_GET 1 /* Define to 1 if the target supports thread-local storage. */ #define _GLIBCXX_HAVE_TLS 1 /* Define if truncate is available in <unistd.h>. */ #define _GLIBCXX_HAVE_TRUNCATE 1 /* Define to 1 if you have the <uchar.h> header file. */ #define _GLIBCXX_HAVE_UCHAR_H 1 /* Define to 1 if you have the <unistd.h> header file. */ #define _GLIBCXX_HAVE_UNISTD_H 1 /* Defined if usleep exists. */ /* #undef _GLIBCXX_HAVE_USLEEP */ /* Define to 1 if you have the <utime.h> header file. */ #define _GLIBCXX_HAVE_UTIME_H 1 /* Defined if vfwscanf exists. */ #define _GLIBCXX_HAVE_VFWSCANF 1 /* Defined if vswscanf exists. */ #define _GLIBCXX_HAVE_VSWSCANF 1 /* Defined if vwscanf exists. */ #define _GLIBCXX_HAVE_VWSCANF 1 /* Define to 1 if you have the <wchar.h> header file. */ #define _GLIBCXX_HAVE_WCHAR_H 1 /* Defined if wcstof exists. */ #define _GLIBCXX_HAVE_WCSTOF 1 /* Define to 1 if you have the <wctype.h> header file. */ #define _GLIBCXX_HAVE_WCTYPE_H 1 /* Defined if Sleep exists. */ /* #undef _GLIBCXX_HAVE_WIN32_SLEEP */ /* Define if writev is available in <sys/uio.h>. */ #define _GLIBCXX_HAVE_WRITEV 1 /* Define to 1 if you have the `_acosf' function. */ /* #undef _GLIBCXX_HAVE__ACOSF */ /* Define to 1 if you have the `_acosl' function. */ /* #undef _GLIBCXX_HAVE__ACOSL */ /* Define to 1 if you have the `_aligned_malloc' function. */ /* #undef _GLIBCXX_HAVE__ALIGNED_MALLOC */ /* Define to 1 if you have the `_asinf' function. */ /* #undef _GLIBCXX_HAVE__ASINF */ /* Define to 1 if you have the `_asinl' function. */ /* #undef _GLIBCXX_HAVE__ASINL */ /* Define to 1 if you have the `_atan2f' function. */ /* #undef _GLIBCXX_HAVE__ATAN2F */ /* Define to 1 if you have the `_atan2l' function. */ /* #undef _GLIBCXX_HAVE__ATAN2L */ /* Define to 1 if you have the `_atanf' function. */ /* #undef _GLIBCXX_HAVE__ATANF */ /* Define to 1 if you have the `_atanl' function. */ /* #undef _GLIBCXX_HAVE__ATANL */ /* Define to 1 if you have the `_ceilf' function. */ /* #undef _GLIBCXX_HAVE__CEILF */ /* Define to 1 if you have the `_ceill' function. */ /* #undef _GLIBCXX_HAVE__CEILL */ /* Define to 1 if you have the `_cosf' function. */ /* #undef _GLIBCXX_HAVE__COSF */ /* Define to 1 if you have the `_coshf' function. */ /* #undef _GLIBCXX_HAVE__COSHF */ /* Define to 1 if you have the `_coshl' function. */ /* #undef _GLIBCXX_HAVE__COSHL */ /* Define to 1 if you have the `_cosl' function. */ /* #undef _GLIBCXX_HAVE__COSL */ /* Define to 1 if you have the `_expf' function. */ /* #undef _GLIBCXX_HAVE__EXPF */ /* Define to 1 if you have the `_expl' function. */ /* #undef _GLIBCXX_HAVE__EXPL */ /* Define to 1 if you have the `_fabsf' function. */ /* #undef _GLIBCXX_HAVE__FABSF */ /* Define to 1 if you have the `_fabsl' function. */ /* #undef _GLIBCXX_HAVE__FABSL */ /* Define to 1 if you have the `_finite' function. */ /* #undef _GLIBCXX_HAVE__FINITE */ /* Define to 1 if you have the `_finitef' function. */ /* #undef _GLIBCXX_HAVE__FINITEF */ /* Define to 1 if you have the `_finitel' function. */ /* #undef _GLIBCXX_HAVE__FINITEL */ /* Define to 1 if you have the `_floorf' function. */ /* #undef _GLIBCXX_HAVE__FLOORF */ /* Define to 1 if you have the `_floorl' function. */ /* #undef _GLIBCXX_HAVE__FLOORL */ /* Define to 1 if you have the `_fmodf' function. */ /* #undef _GLIBCXX_HAVE__FMODF */ /* Define to 1 if you have the `_fmodl' function. */ /* #undef _GLIBCXX_HAVE__FMODL */ /* Define to 1 if you have the `_fpclass' function. */ /* #undef _GLIBCXX_HAVE__FPCLASS */ /* Define to 1 if you have the `_frexpf' function. */ /* #undef _GLIBCXX_HAVE__FREXPF */ /* Define to 1 if you have the `_frexpl' function. */ /* #undef _GLIBCXX_HAVE__FREXPL */ /* Define to 1 if you have the `_hypot' function. */ /* #undef _GLIBCXX_HAVE__HYPOT */ /* Define to 1 if you have the `_hypotf' function. */ /* #undef _GLIBCXX_HAVE__HYPOTF */ /* Define to 1 if you have the `_hypotl' function. */ /* #undef _GLIBCXX_HAVE__HYPOTL */ /* Define to 1 if you have the `_isinf' function. */ /* #undef _GLIBCXX_HAVE__ISINF */ /* Define to 1 if you have the `_isinff' function. */ /* #undef _GLIBCXX_HAVE__ISINFF */ /* Define to 1 if you have the `_isinfl' function. */ /* #undef _GLIBCXX_HAVE__ISINFL */ /* Define to 1 if you have the `_isnan' function. */ /* #undef _GLIBCXX_HAVE__ISNAN */ /* Define to 1 if you have the `_isnanf' function. */ /* #undef _GLIBCXX_HAVE__ISNANF */ /* Define to 1 if you have the `_isnanl' function. */ /* #undef _GLIBCXX_HAVE__ISNANL */ /* Define to 1 if you have the `_ldexpf' function. */ /* #undef _GLIBCXX_HAVE__LDEXPF */ /* Define to 1 if you have the `_ldexpl' function. */ /* #undef _GLIBCXX_HAVE__LDEXPL */ /* Define to 1 if you have the `_log10f' function. */ /* #undef _GLIBCXX_HAVE__LOG10F */ /* Define to 1 if you have the `_log10l' function. */ /* #undef _GLIBCXX_HAVE__LOG10L */ /* Define to 1 if you have the `_logf' function. */ /* #undef _GLIBCXX_HAVE__LOGF */ /* Define to 1 if you have the `_logl' function. */ /* #undef _GLIBCXX_HAVE__LOGL */ /* Define to 1 if you have the `_modf' function. */ /* #undef _GLIBCXX_HAVE__MODF */ /* Define to 1 if you have the `_modff' function. */ /* #undef _GLIBCXX_HAVE__MODFF */ /* Define to 1 if you have the `_modfl' function. */ /* #undef _GLIBCXX_HAVE__MODFL */ /* Define to 1 if you have the `_powf' function. */ /* #undef _GLIBCXX_HAVE__POWF */ /* Define to 1 if you have the `_powl' function. */ /* #undef _GLIBCXX_HAVE__POWL */ /* Define to 1 if you have the `_qfpclass' function. */ /* #undef _GLIBCXX_HAVE__QFPCLASS */ /* Define to 1 if you have the `_sincos' function. */ /* #undef _GLIBCXX_HAVE__SINCOS */ /* Define to 1 if you have the `_sincosf' function. */ /* #undef _GLIBCXX_HAVE__SINCOSF */ /* Define to 1 if you have the `_sincosl' function. */ /* #undef _GLIBCXX_HAVE__SINCOSL */ /* Define to 1 if you have the `_sinf' function. */ /* #undef _GLIBCXX_HAVE__SINF */ /* Define to 1 if you have the `_sinhf' function. */ /* #undef _GLIBCXX_HAVE__SINHF */ /* Define to 1 if you have the `_sinhl' function. */ /* #undef _GLIBCXX_HAVE__SINHL */ /* Define to 1 if you have the `_sinl' function. */ /* #undef _GLIBCXX_HAVE__SINL */ /* Define to 1 if you have the `_sqrtf' function. */ /* #undef _GLIBCXX_HAVE__SQRTF */ /* Define to 1 if you have the `_sqrtl' function. */ /* #undef _GLIBCXX_HAVE__SQRTL */ /* Define to 1 if you have the `_tanf' function. */ /* #undef _GLIBCXX_HAVE__TANF */ /* Define to 1 if you have the `_tanhf' function. */ /* #undef _GLIBCXX_HAVE__TANHF */ /* Define to 1 if you have the `_tanhl' function. */ /* #undef _GLIBCXX_HAVE__TANHL */ /* Define to 1 if you have the `_tanl' function. */ /* #undef _GLIBCXX_HAVE__TANL */ /* Define to 1 if you have the `_wfopen' function. */ /* #undef _GLIBCXX_HAVE__WFOPEN */ /* Define to 1 if you have the `__cxa_thread_atexit' function. */ /* #undef _GLIBCXX_HAVE___CXA_THREAD_ATEXIT */ /* Define to 1 if you have the `__cxa_thread_atexit_impl' function. */ #define _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL 1 /* Define as const if the declaration of iconv() needs const. */ #define _GLIBCXX_ICONV_CONST /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" /* Name of package */ /* #undef _GLIBCXX_PACKAGE */ /* Define to the address where bug reports for this package should be sent. */ #define _GLIBCXX_PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ #define _GLIBCXX_PACKAGE_NAME "package-unused" /* Define to the full name and version of this package. */ #define _GLIBCXX_PACKAGE_STRING "package-unused version-unused" /* Define to the one symbol short name of this package. */ #define _GLIBCXX_PACKAGE_TARNAME "libstdc++" /* Define to the home page for this package. */ #define _GLIBCXX_PACKAGE_URL "" /* Define to the version of this package. */ #define _GLIBCXX_PACKAGE__GLIBCXX_VERSION "version-unused" /* The size of `char', as computed by sizeof. */ /* #undef SIZEOF_CHAR */ /* The size of `int', as computed by sizeof. */ /* #undef SIZEOF_INT */ /* The size of `long', as computed by sizeof. */ /* #undef SIZEOF_LONG */ /* The size of `short', as computed by sizeof. */ /* #undef SIZEOF_SHORT */ /* The size of `void *', as computed by sizeof. */ /* #undef SIZEOF_VOID_P */ /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Version number of package */ /* #undef _GLIBCXX_VERSION */ /* Enable large inode numbers on Mac OS X 10.5. */ #ifndef _GLIBCXX_DARWIN_USE_64_BIT_INODE # define _GLIBCXX_DARWIN_USE_64_BIT_INODE 1 #endif # 1509 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _GLIBCXX_FILE_OFFSET_BITS */ /* Define if C99 functions in <complex.h> should be used in <complex> for C++11. Using compiler builtins for these functions requires corresponding C99 library functions to be present. */ #define _GLIBCXX11_USE_C99_COMPLEX 1 /* Define if C99 functions or macros in <math.h> should be imported in <cmath> in namespace std for C++11. */ #define _GLIBCXX11_USE_C99_MATH 1 /* Define if C99 functions or macros in <stdio.h> should be imported in <cstdio> in namespace std for C++11. */ #define _GLIBCXX11_USE_C99_STDIO 1 /* Define if C99 functions or macros in <stdlib.h> should be imported in <cstdlib> in namespace std for C++11. */ #define _GLIBCXX11_USE_C99_STDLIB 1 /* Define if C99 functions or macros in <wchar.h> should be imported in <cwchar> in namespace std for C++11. */ #define _GLIBCXX11_USE_C99_WCHAR 1 /* Define if C99 functions in <complex.h> should be used in <complex> for C++98. Using compiler builtins for these functions requires corresponding C99 library functions to be present. */ #define _GLIBCXX98_USE_C99_COMPLEX 1 /* Define if C99 functions or macros in <math.h> should be imported in <cmath> in namespace std for C++98. */ #define _GLIBCXX98_USE_C99_MATH 1 /* Define if C99 functions or macros in <stdio.h> should be imported in <cstdio> in namespace std for C++98. */ #define _GLIBCXX98_USE_C99_STDIO 1 /* Define if C99 functions or macros in <stdlib.h> should be imported in <cstdlib> in namespace std for C++98. */ #define _GLIBCXX98_USE_C99_STDLIB 1 /* Define if C99 functions or macros in <wchar.h> should be imported in <cwchar> in namespace std for C++98. */ #define _GLIBCXX98_USE_C99_WCHAR 1 /* Define if the compiler supports C++11 atomics. */ #define _GLIBCXX_ATOMIC_BUILTINS 1 /* Define to use concept checking code from the boost libraries. */ /* #undef _GLIBCXX_CONCEPT_CHECKS */ /* Define to 1 if a fully dynamic basic_string is wanted, 0 to disable, undefined for platform defaults */ #define _GLIBCXX_FULLY_DYNAMIC_STRING 0 /* Define if gthreads library is available. */ #define _GLIBCXX_HAS_GTHREADS 1 /* Define to 1 if a full hosted library is built, or 0 if freestanding. */ #define _GLIBCXX_HOSTED 1 /* Define if compatibility should be provided for -mlong-double-64. */ /* Define to the letter to which size_t is mangled. */ #define _GLIBCXX_MANGLE_SIZE_T m /* Define if C99 llrint and llround functions are missing from <math.h>. */ /* #undef _GLIBCXX_NO_C99_ROUNDING_FUNCS */ /* Define if ptrdiff_t is int. */ /* #undef _GLIBCXX_PTRDIFF_T_IS_INT */ /* Define if using setrlimit to set resource limits during "make check" */ #define _GLIBCXX_RES_LIMITS 1 /* Define if size_t is unsigned int. */ /* #undef _GLIBCXX_SIZE_T_IS_UINT */ /* Define to the value of the EOF integer constant. */ #define _GLIBCXX_STDIO_EOF -1 /* Define to the value of the SEEK_CUR integer constant. */ #define _GLIBCXX_STDIO_SEEK_CUR 1 /* Define to the value of the SEEK_END integer constant. */ #define _GLIBCXX_STDIO_SEEK_END 2 /* Define to use symbol versioning in the shared library. */ #define _GLIBCXX_SYMVER 1 /* Define to use darwin versioning in the shared library. */ /* #undef _GLIBCXX_SYMVER_DARWIN */ /* Define to use GNU versioning in the shared library. */ #define _GLIBCXX_SYMVER_GNU 1 /* Define to use GNU namespace versioning in the shared library. */ /* #undef _GLIBCXX_SYMVER_GNU_NAMESPACE */ /* Define to use Sun versioning in the shared library. */ /* #undef _GLIBCXX_SYMVER_SUN */ /* Define if C11 functions in <uchar.h> should be imported into namespace std in <cuchar>. */ #define _GLIBCXX_USE_C11_UCHAR_CXX11 1 /* Define if C99 functions or macros from <wchar.h>, <math.h>, <complex.h>, <stdio.h>, and <stdlib.h> can be used or exposed. */ #define _GLIBCXX_USE_C99 1 /* Define if C99 functions in <complex.h> should be used in <tr1/complex>. Using compiler builtins for these functions requires corresponding C99 library functions to be present. */ #define _GLIBCXX_USE_C99_COMPLEX_TR1 1 /* Define if C99 functions in <ctype.h> should be imported in <tr1/cctype> in namespace std::tr1. */ #define _GLIBCXX_USE_C99_CTYPE_TR1 1 /* Define if C99 functions in <fenv.h> should be imported in <tr1/cfenv> in namespace std::tr1. */ #define _GLIBCXX_USE_C99_FENV_TR1 1 /* Define if C99 functions in <inttypes.h> should be imported in <tr1/cinttypes> in namespace std::tr1. */ #define _GLIBCXX_USE_C99_INTTYPES_TR1 1 /* Define if wchar_t C99 functions in <inttypes.h> should be imported in <tr1/cinttypes> in namespace std::tr1. */ #define _GLIBCXX_USE_C99_INTTYPES_WCHAR_T_TR1 1 /* Define if C99 functions or macros in <math.h> should be imported in <tr1/cmath> in namespace std::tr1. */ #define _GLIBCXX_USE_C99_MATH_TR1 1 /* Define if C99 types in <stdint.h> should be imported in <tr1/cstdint> in namespace std::tr1. */ #define _GLIBCXX_USE_C99_STDINT_TR1 1 /* Defined if clock_gettime syscall has monotonic and realtime clock support. */ /* #undef _GLIBCXX_USE_CLOCK_GETTIME_SYSCALL */ /* Defined if clock_gettime has monotonic clock support. */ #define _GLIBCXX_USE_CLOCK_MONOTONIC 1 /* Defined if clock_gettime has realtime clock support. */ #define _GLIBCXX_USE_CLOCK_REALTIME 1 /* Define if ISO/IEC TR 24733 decimal floating point types are supported on this host. */ #define _GLIBCXX_USE_DECIMAL_FLOAT 1 /* Define if /dev/random and /dev/urandom are available for std::random_device. */ #define _GLIBCXX_USE_DEV_RANDOM 1 /* Define if fchmod is available in <sys/stat.h>. */ #define _GLIBCXX_USE_FCHMOD 1 /* Define if fchmodat is available in <sys/stat.h>. */ #define _GLIBCXX_USE_FCHMODAT 1 /* Defined if gettimeofday is available. */ #define _GLIBCXX_USE_GETTIMEOFDAY 1 /* Define if get_nprocs is available in <sys/sysinfo.h>. */ #define _GLIBCXX_USE_GET_NPROCS 1 /* Define if __int128 is supported on this host. */ #define _GLIBCXX_USE_INT128 1 /* Define if LFS support is available. */ #define _GLIBCXX_USE_LFS 1 /* Define if code specialized for long long should be used. */ #define _GLIBCXX_USE_LONG_LONG 1 /* Define if lstat is available in <sys/stat.h>. */ #define _GLIBCXX_USE_LSTAT 1 /* Defined if nanosleep is available. */ #define _GLIBCXX_USE_NANOSLEEP 1 /* Define if NLS translations are to be used. */ #define _GLIBCXX_USE_NLS 1 /* Define if pthreads_num_processors_np is available in <pthread.h>. */ /* #undef _GLIBCXX_USE_PTHREADS_NUM_PROCESSORS_NP */ /* Define if POSIX read/write locks are available in <gthr.h>. */ #define _GLIBCXX_USE_PTHREAD_RWLOCK_T 1 /* Define if /dev/random and /dev/urandom are available for the random_device of TR1 (Chapter 5.1). */ #define _GLIBCXX_USE_RANDOM_TR1 1 /* Define if usable realpath is available in <stdlib.h>. */ #define _GLIBCXX_USE_REALPATH 1 /* Defined if sched_yield is available. */ #define _GLIBCXX_USE_SCHED_YIELD 1 /* Define if _SC_NPROCESSORS_ONLN is available in <unistd.h>. */ #define _GLIBCXX_USE_SC_NPROCESSORS_ONLN 1 /* Define if _SC_NPROC_ONLN is available in <unistd.h>. */ /* #undef _GLIBCXX_USE_SC_NPROC_ONLN */ /* Define if sendfile is available in <sys/sendfile.h>. */ #define _GLIBCXX_USE_SENDFILE 1 /* Define if struct stat has timespec members. */ #define _GLIBCXX_USE_ST_MTIM 1 /* Define if sysctl(), CTL_HW and HW_NCPU are available in <sys/sysctl.h>. */ /* #undef _GLIBCXX_USE_SYSCTL_HW_NCPU */ /* Define if obsolescent tmpnam is available in <stdio.h>. */ #define _GLIBCXX_USE_TMPNAM 1 /* Define if utime is available in <utime.h>. */ #define _GLIBCXX_USE_UTIME 1 /* Define if utimensat and UTIME_OMIT are available in <sys/stat.h> and AT_FDCWD in <fcntl.h>. */ #define _GLIBCXX_USE_UTIMENSAT 1 /* Define if code specialized for wchar_t should be used. */ #define _GLIBCXX_USE_WCHAR_T 1 /* Define to 1 if a verbose library is built, or 0 otherwise. */ #define _GLIBCXX_VERBOSE 1 /* Defined if as can handle rdrand. */ #define _GLIBCXX_X86_RDRAND 1 /* Define to 1 if mutex_timedlock is available. */ #define _GTHREAD_USE_MUTEX_TIMEDLOCK 1 /* Define for large files, on AIX-style hosts. */ /* #undef _GLIBCXX_LARGE_FILES */ /* Define if all C++11 floating point overloads are available in <math.h>. */ #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1755 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 /* #undef __CORRECT_ISO_CPP11_MATH_H_PROTO_FP */ #endif # 1757 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 /* Define if all C++11 integral type overloads are available in <math.h>. */ #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1760 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 /* #undef __CORRECT_ISO_CPP11_MATH_H_PROTO_INT */ #endif # 1762 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__ACOSF) && ! defined (_GLIBCXX_HAVE_ACOSF) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1764 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_ACOSF 1 # define acosf _acosf #endif # 1767 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__ACOSL) && ! defined (_GLIBCXX_HAVE_ACOSL) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1769 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_ACOSL 1 # define acosl _acosl #endif # 1772 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__ASINF) && ! defined (_GLIBCXX_HAVE_ASINF) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1774 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_ASINF 1 # define asinf _asinf #endif # 1777 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__ASINL) && ! defined (_GLIBCXX_HAVE_ASINL) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1779 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_ASINL 1 # define asinl _asinl #endif # 1782 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__ATAN2F) && ! defined (_GLIBCXX_HAVE_ATAN2F) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1784 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_ATAN2F 1 # define atan2f _atan2f #endif # 1787 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__ATAN2L) && ! defined (_GLIBCXX_HAVE_ATAN2L) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1789 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_ATAN2L 1 # define atan2l _atan2l #endif # 1792 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__ATANF) && ! defined (_GLIBCXX_HAVE_ATANF) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1794 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_ATANF 1 # define atanf _atanf #endif # 1797 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__ATANL) && ! defined (_GLIBCXX_HAVE_ATANL) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1799 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_ATANL 1 # define atanl _atanl #endif # 1802 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__CEILF) && ! defined (_GLIBCXX_HAVE_CEILF) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1804 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_CEILF 1 # define ceilf _ceilf #endif # 1807 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__CEILL) && ! defined (_GLIBCXX_HAVE_CEILL) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1809 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_CEILL 1 # define ceill _ceill #endif # 1812 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__COSF) && ! defined (_GLIBCXX_HAVE_COSF) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1814 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_COSF 1 # define cosf _cosf #endif # 1817 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__COSHF) && ! defined (_GLIBCXX_HAVE_COSHF) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1819 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_COSHF 1 # define coshf _coshf #endif # 1822 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__COSHL) && ! defined (_GLIBCXX_HAVE_COSHL) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1824 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_COSHL 1 # define coshl _coshl #endif # 1827 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__COSL) && ! defined (_GLIBCXX_HAVE_COSL) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1829 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_COSL 1 # define cosl _cosl #endif # 1832 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__EXPF) && ! defined (_GLIBCXX_HAVE_EXPF) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1834 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_EXPF 1 # define expf _expf #endif # 1837 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__EXPL) && ! defined (_GLIBCXX_HAVE_EXPL) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1839 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_EXPL 1 # define expl _expl #endif # 1842 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__FABSF) && ! defined (_GLIBCXX_HAVE_FABSF) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1844 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_FABSF 1 # define fabsf _fabsf #endif # 1847 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__FABSL) && ! defined (_GLIBCXX_HAVE_FABSL) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1849 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_FABSL 1 # define fabsl _fabsl #endif # 1852 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__FINITE) && ! defined (_GLIBCXX_HAVE_FINITE) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1854 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_FINITE 1 # define finite _finite #endif # 1857 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__FINITEF) && ! defined (_GLIBCXX_HAVE_FINITEF) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1859 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_FINITEF 1 # define finitef _finitef #endif # 1862 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__FINITEL) && ! defined (_GLIBCXX_HAVE_FINITEL) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1864 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_FINITEL 1 # define finitel _finitel #endif # 1867 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__FLOORF) && ! defined (_GLIBCXX_HAVE_FLOORF) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1869 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_FLOORF 1 # define floorf _floorf #endif # 1872 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__FLOORL) && ! defined (_GLIBCXX_HAVE_FLOORL) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1874 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_FLOORL 1 # define floorl _floorl #endif # 1877 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__FMODF) && ! defined (_GLIBCXX_HAVE_FMODF) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1879 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_FMODF 1 # define fmodf _fmodf #endif # 1882 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__FMODL) && ! defined (_GLIBCXX_HAVE_FMODL) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1884 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_FMODL 1 # define fmodl _fmodl #endif # 1887 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__FPCLASS) && ! defined (_GLIBCXX_HAVE_FPCLASS) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1889 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_FPCLASS 1 # define fpclass _fpclass #endif # 1892 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__FREXPF) && ! defined (_GLIBCXX_HAVE_FREXPF) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1894 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_FREXPF 1 # define frexpf _frexpf #endif # 1897 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__FREXPL) && ! defined (_GLIBCXX_HAVE_FREXPL) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1899 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_FREXPL 1 # define frexpl _frexpl #endif # 1902 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__HYPOT) && ! defined (_GLIBCXX_HAVE_HYPOT) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1904 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_HYPOT 1 # define hypot _hypot #endif # 1907 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__HYPOTF) && ! defined (_GLIBCXX_HAVE_HYPOTF) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1909 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_HYPOTF 1 # define hypotf _hypotf #endif # 1912 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__HYPOTL) && ! defined (_GLIBCXX_HAVE_HYPOTL) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1914 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_HYPOTL 1 # define hypotl _hypotl #endif # 1917 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__ISINF) && ! defined (_GLIBCXX_HAVE_ISINF) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1919 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_ISINF 1 # define isinf _isinf #endif # 1922 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__ISINFF) && ! defined (_GLIBCXX_HAVE_ISINFF) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1924 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_ISINFF 1 # define isinff _isinff #endif # 1927 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__ISINFL) && ! defined (_GLIBCXX_HAVE_ISINFL) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1929 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_ISINFL 1 # define isinfl _isinfl #endif # 1932 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__ISNAN) && ! defined (_GLIBCXX_HAVE_ISNAN) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1934 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_ISNAN 1 # define isnan _isnan #endif # 1937 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__ISNANF) && ! defined (_GLIBCXX_HAVE_ISNANF) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1939 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_ISNANF 1 # define isnanf _isnanf #endif # 1942 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__ISNANL) && ! defined (_GLIBCXX_HAVE_ISNANL) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1944 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_ISNANL 1 # define isnanl _isnanl #endif # 1947 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__LDEXPF) && ! defined (_GLIBCXX_HAVE_LDEXPF) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1949 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_LDEXPF 1 # define ldexpf _ldexpf #endif # 1952 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__LDEXPL) && ! defined (_GLIBCXX_HAVE_LDEXPL) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1954 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_LDEXPL 1 # define ldexpl _ldexpl #endif # 1957 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__LOG10F) && ! defined (_GLIBCXX_HAVE_LOG10F) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1959 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_LOG10F 1 # define log10f _log10f #endif # 1962 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__LOG10L) && ! defined (_GLIBCXX_HAVE_LOG10L) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1964 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_LOG10L 1 # define log10l _log10l #endif # 1967 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__LOGF) && ! defined (_GLIBCXX_HAVE_LOGF) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1969 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_LOGF 1 # define logf _logf #endif # 1972 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__LOGL) && ! defined (_GLIBCXX_HAVE_LOGL) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1974 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_LOGL 1 # define logl _logl #endif # 1977 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__MODF) && ! defined (_GLIBCXX_HAVE_MODF) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1979 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_MODF 1 # define modf _modf #endif # 1982 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__MODFF) && ! defined (_GLIBCXX_HAVE_MODFF) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1984 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_MODFF 1 # define modff _modff #endif # 1987 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__MODFL) && ! defined (_GLIBCXX_HAVE_MODFL) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1989 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_MODFL 1 # define modfl _modfl #endif # 1992 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__POWF) && ! defined (_GLIBCXX_HAVE_POWF) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1994 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_POWF 1 # define powf _powf #endif # 1997 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__POWL) && ! defined (_GLIBCXX_HAVE_POWL) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1999 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_POWL 1 # define powl _powl #endif # 2002 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__QFPCLASS) && ! defined (_GLIBCXX_HAVE_QFPCLASS) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 2004 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_QFPCLASS 1 # define qfpclass _qfpclass #endif # 2007 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__SINCOS) && ! defined (_GLIBCXX_HAVE_SINCOS) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 2009 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_SINCOS 1 # define sincos _sincos #endif # 2012 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__SINCOSF) && ! defined (_GLIBCXX_HAVE_SINCOSF) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 2014 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_SINCOSF 1 # define sincosf _sincosf #endif # 2017 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__SINCOSL) && ! defined (_GLIBCXX_HAVE_SINCOSL) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 2019 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_SINCOSL 1 # define sincosl _sincosl #endif # 2022 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__SINF) && ! defined (_GLIBCXX_HAVE_SINF) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 2024 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_SINF 1 # define sinf _sinf #endif # 2027 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__SINHF) && ! defined (_GLIBCXX_HAVE_SINHF) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 2029 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_SINHF 1 # define sinhf _sinhf #endif # 2032 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__SINHL) && ! defined (_GLIBCXX_HAVE_SINHL) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 2034 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_SINHL 1 # define sinhl _sinhl #endif # 2037 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__SINL) && ! defined (_GLIBCXX_HAVE_SINL) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 2039 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_SINL 1 # define sinl _sinl #endif # 2042 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__SQRTF) && ! defined (_GLIBCXX_HAVE_SQRTF) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 2044 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_SQRTF 1 # define sqrtf _sqrtf #endif # 2047 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__SQRTL) && ! defined (_GLIBCXX_HAVE_SQRTL) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 2049 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_SQRTL 1 # define sqrtl _sqrtl #endif # 2052 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__STRTOF) && ! defined (_GLIBCXX_HAVE_STRTOF) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 2054 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_STRTOF 1 # define strtof _strtof #endif # 2057 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__STRTOLD) && ! defined (_GLIBCXX_HAVE_STRTOLD) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 2059 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_STRTOLD 1 # define strtold _strtold #endif # 2062 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__TANF) && ! defined (_GLIBCXX_HAVE_TANF) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 2064 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_TANF 1 # define tanf _tanf #endif # 2067 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__TANHF) && ! defined (_GLIBCXX_HAVE_TANHF) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 2069 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_TANHF 1 # define tanhf _tanhf #endif # 2072 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__TANHL) && ! defined (_GLIBCXX_HAVE_TANHL) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 2074 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_TANHL 1 # define tanhl _tanhl #endif # 2077 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined (_GLIBCXX_HAVE__TANL) && ! defined (_GLIBCXX_HAVE_TANL) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 2079 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # define _GLIBCXX_HAVE_TANL 1 # define tanl _tanl #endif # 2082 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 #endif // _GLIBCXX_CXX_CONFIG_H # 2084 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++config.h" 3 # 44 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cassert" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <assert.h> #endif /* expanded by -frewrite-includes */ # 44 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 /* Copyright (C) 1991-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ /* * ISO C99 Standard: 7.2 Diagnostics <assert.h> */ #ifdef _ASSERT_H # undef _ASSERT_H # undef assert # undef __ASSERT_VOID_CAST # ifdef __USE_GNU # undef assert_perror # endif # 31 "/usr/include/assert.h" 3 4 #endif /* assert.h */ # 33 "/usr/include/assert.h" 3 4 #define _ASSERT_H 1 #if 0 /* expanded by -frewrite-includes */ #include <features.h> #endif /* expanded by -frewrite-includes */ # 35 "/usr/include/assert.h" 3 4 # 36 "/usr/include/assert.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __cplusplus && __GNUC_PREREQ (2,95) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 38 "/usr/include/assert.h" 3 4 # define __ASSERT_VOID_CAST static_cast<void> #else # 40 "/usr/include/assert.h" 3 4 # define __ASSERT_VOID_CAST (void) #endif # 42 "/usr/include/assert.h" 3 4 /* void assert (int expression); If NDEBUG is defined, do nothing. If not, and EXPRESSION is zero, print an error message and abort. */ #ifdef NDEBUG # define assert(expr) (__ASSERT_VOID_CAST (0)) /* void assert_perror (int errnum); If NDEBUG is defined, do nothing. If not, and ERRNUM is not zero, print an error message with the error text for ERRNUM and abort. (This is a GNU extension.) */ # ifdef __USE_GNU # define assert_perror(errnum) (__ASSERT_VOID_CAST (0)) # endif # 61 "/usr/include/assert.h" 3 4 #else /* Not NDEBUG. */ # 63 "/usr/include/assert.h" 3 4 #ifndef _ASSERT_H_DECLS #define _ASSERT_H_DECLS __BEGIN_DECLS /* This prints an "Assertion failed" message and aborts. */ extern void __assert_fail (const char *__assertion, const char *__file, unsigned int __line, const char *__function) __THROW __attribute__ ((__noreturn__)); /* Likewise, but prints the error text for ERRNUM. */ extern void __assert_perror_fail (int __errnum, const char *__file, unsigned int __line, const char *__function) __THROW __attribute__ ((__noreturn__)); /* The following is not at all used here but needed for standard compliance. */ extern void __assert (const char *__assertion, const char *__file, int __line) __THROW __attribute__ ((__noreturn__)); __END_DECLS #endif /* Not _ASSERT_H_DECLS */ # 87 "/usr/include/assert.h" 3 4 /* When possible, define assert so that it does not add extra parentheses around EXPR. Otherwise, those added parentheses would suppress warnings we'd expect to be detected by gcc's -Wparentheses. */ #if 0 /* disabled by -frewrite-includes */ # if defined __cplusplus #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 92 "/usr/include/assert.h" 3 4 # define assert(expr) \ (static_cast <bool> (expr) \ ? void (0) \ : __assert_fail (#expr, __FILE__, __LINE__, __ASSERT_FUNCTION)) #if 0 /* disabled by -frewrite-includes */ #if 0 # elif !defined __GNUC__ || defined __STRICT_ANSI__ #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 97 "/usr/include/assert.h" 3 4 # define assert(expr) \ ((expr) \ ? __ASSERT_VOID_CAST (0) \ : __assert_fail (#expr, __FILE__, __LINE__, __ASSERT_FUNCTION)) # else # 102 "/usr/include/assert.h" 3 4 /* The first occurrence of EXPR is not evaluated due to the sizeof, but will trigger any pedantic warnings masked by the __extension__ for the second occurrence. The ternary operator is required to support function pointers and bit fields in this context, and to suppress the evaluation of variable length arrays. */ # define assert(expr) \ ((void) sizeof ((expr) ? 1 : 0), __extension__ ({ \ if (expr) \ ; /* empty */ \ else \ __assert_fail (#expr, __FILE__, __LINE__, __ASSERT_FUNCTION); \ })) # endif # 115 "/usr/include/assert.h" 3 4 # ifdef __USE_GNU # define assert_perror(errnum) \ (!(errnum) \ ? __ASSERT_VOID_CAST (0) \ : __assert_perror_fail ((errnum), __FILE__, __LINE__, __ASSERT_FUNCTION)) # endif # 122 "/usr/include/assert.h" 3 4 /* Version 2.4 and later of GCC define a magical variable `__PRETTY_FUNCTION__' which contains the name of the function currently being defined. This is broken in G++ before version 2.6. C9x has a similar variable called __func__, but prefer the GCC one since it demangles C++ function names. */ #if 0 /* disabled by -frewrite-includes */ # if defined __cplusplus ? __GNUC_PREREQ (2, 6) : __GNUC_PREREQ (2, 4) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 129 "/usr/include/assert.h" 3 4 # define __ASSERT_FUNCTION __extension__ __PRETTY_FUNCTION__ # else # 131 "/usr/include/assert.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 132 "/usr/include/assert.h" 3 4 # define __ASSERT_FUNCTION __func__ # else # 134 "/usr/include/assert.h" 3 4 # define __ASSERT_FUNCTION ((const char *) 0) # endif # 136 "/usr/include/assert.h" 3 4 # endif # 137 "/usr/include/assert.h" 3 4 #endif /* NDEBUG. */ # 139 "/usr/include/assert.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_ISOC11 && !defined __cplusplus #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 142 "/usr/include/assert.h" 3 4 # undef static_assert # define static_assert _Static_assert #endif # 145 "/usr/include/assert.h" 3 4 # 45 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cassert" 2 3 # 2 "blah.cpp" 2 #if 0 /* expanded by -frewrite-includes */ #include <queue> #endif /* expanded by -frewrite-includes */ # 2 "blah.cpp" # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/queue" 1 3 // <queue> -*- C++ -*- // Copyright (C) 2001-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /* * * Copyright (c) 1994 * Hewlett-Packard Company * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Hewlett-Packard Company makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. * * * Copyright (c) 1996,1997 * Silicon Graphics Computer Systems, Inc. * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Silicon Graphics makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. */ /** @file include/queue * This is a Standard C++ Library header. */ #ifndef _GLIBCXX_QUEUE #define _GLIBCXX_QUEUE 1 #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 59 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/queue" 3 #if 0 /* expanded by -frewrite-includes */ #include <deque> #endif /* expanded by -frewrite-includes */ # 60 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/queue" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/deque" 1 3 // <deque> -*- C++ -*- // Copyright (C) 2001-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /* * * Copyright (c) 1994 * Hewlett-Packard Company * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Hewlett-Packard Company makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. * * * Copyright (c) 1997 * Silicon Graphics Computer Systems, Inc. * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Silicon Graphics makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. */ /** @file include/deque * This is a Standard C++ Library header. */ #ifndef _GLIBCXX_DEQUE #define _GLIBCXX_DEQUE 1 #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 59 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/deque" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/stl_algobase.h> #endif /* expanded by -frewrite-includes */ # 60 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/deque" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 1 3 // Core algorithmic facilities -*- C++ -*- // Copyright (C) 2001-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /* * * Copyright (c) 1994 * Hewlett-Packard Company * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Hewlett-Packard Company makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. * * * Copyright (c) 1996-1998 * Silicon Graphics Computer Systems, Inc. * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Silicon Graphics makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. */ /** @file bits/stl_algobase.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{algorithm} */ #ifndef _STL_ALGOBASE_H #define _STL_ALGOBASE_H 1 #if 0 /* expanded by -frewrite-includes */ #include <bits/c++config.h> #endif /* expanded by -frewrite-includes */ # 59 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 # 60 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/functexcept.h> #endif /* expanded by -frewrite-includes */ # 60 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/functexcept.h" 1 3 // Function-Based Exception Support -*- C++ -*- // Copyright (C) 2001-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file bits/functexcept.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{exception} * * This header provides support for -fno-exceptions. */ // // ISO C++ 14882: 19.1 Exception classes // #ifndef _FUNCTEXCEPT_H #define _FUNCTEXCEPT_H 1 #if 0 /* expanded by -frewrite-includes */ #include <bits/c++config.h> #endif /* expanded by -frewrite-includes */ # 39 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/functexcept.h" 3 # 40 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/functexcept.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/exception_defines.h> #endif /* expanded by -frewrite-includes */ # 40 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/functexcept.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/exception_defines.h" 1 3 // -fno-exceptions Support -*- C++ -*- // Copyright (C) 2001-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file bits/exception_defines.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{exception} */ #ifndef _EXCEPTION_DEFINES_H #define _EXCEPTION_DEFINES_H 1 #if 0 /* disabled by -frewrite-includes */ #if ! __cpp_exceptions #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 34 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/exception_defines.h" 3 // Iff -fno-exceptions, transform error handling code to work without it. # define __try if (true) # define __catch(X) if (false) # define __throw_exception_again #else # 39 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/exception_defines.h" 3 // Else proceed normally. # define __try try # define __catch(X) catch(X) # define __throw_exception_again throw #endif # 44 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/exception_defines.h" 3 #endif # 46 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/exception_defines.h" 3 # 41 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/functexcept.h" 2 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION // Helper for exception objects in <except> void __throw_bad_exception(void) __attribute__((__noreturn__)); // Helper for exception objects in <new> void __throw_bad_alloc(void) __attribute__((__noreturn__)); // Helper for exception objects in <typeinfo> void __throw_bad_cast(void) __attribute__((__noreturn__)); void __throw_bad_typeid(void) __attribute__((__noreturn__)); // Helpers for exception objects in <stdexcept> void __throw_logic_error(const char*) __attribute__((__noreturn__)); void __throw_domain_error(const char*) __attribute__((__noreturn__)); void __throw_invalid_argument(const char*) __attribute__((__noreturn__)); void __throw_length_error(const char*) __attribute__((__noreturn__)); void __throw_out_of_range(const char*) __attribute__((__noreturn__)); void __throw_out_of_range_fmt(const char*, ...) __attribute__((__noreturn__)) __attribute__((__format__(__gnu_printf__, 1, 2))); void __throw_runtime_error(const char*) __attribute__((__noreturn__)); void __throw_range_error(const char*) __attribute__((__noreturn__)); void __throw_overflow_error(const char*) __attribute__((__noreturn__)); void __throw_underflow_error(const char*) __attribute__((__noreturn__)); // Helpers for exception objects in <ios> void __throw_ios_failure(const char*) __attribute__((__noreturn__)); void __throw_ios_failure(const char*, int) __attribute__((__noreturn__)); // Helpers for exception objects in <system_error> void __throw_system_error(int) __attribute__((__noreturn__)); // Helpers for exception objects in <future> void __throw_future_error(int) __attribute__((__noreturn__)); // Helpers for exception objects in <functional> void __throw_bad_function_call() __attribute__((__noreturn__)); _GLIBCXX_END_NAMESPACE_VERSION } // namespace #endif # 116 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/functexcept.h" 3 # 61 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/cpp_type_traits.h> #endif /* expanded by -frewrite-includes */ # 61 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/cpp_type_traits.h" 1 3 // The -*- C++ -*- type traits classes for internal use in libstdc++ // Copyright (C) 2000-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file bits/cpp_type_traits.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{ext/type_traits} */ // Written by Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr> #ifndef _CPP_TYPE_TRAITS_H #define _CPP_TYPE_TRAITS_H 1 #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 36 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/cpp_type_traits.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/c++config.h> #endif /* expanded by -frewrite-includes */ # 37 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/cpp_type_traits.h" 3 # 38 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/cpp_type_traits.h" 3 // // This file provides some compile-time information about various types. // These representations were designed, on purpose, to be constant-expressions // and not types as found in <bits/type_traits.h>. In particular, they // can be used in control structures and the optimizer hopefully will do // the obvious thing. // // Why integral expressions, and not functions nor types? // Firstly, these compile-time entities are used as template-arguments // so function return values won't work: We need compile-time entities. // We're left with types and constant integral expressions. // Secondly, from the point of view of ease of use, type-based compile-time // information is -not- *that* convenient. One has to write lots of // overloaded functions and to hope that the compiler will select the right // one. As a net effect, the overall structure isn't very clear at first // glance. // Thirdly, partial ordering and overload resolution (of function templates) // is highly costly in terms of compiler-resource. It is a Good Thing to // keep these resource consumption as least as possible. // // See valarray_array.h for a case use. // // -- Gaby (dosreis@cmla.ens-cachan.fr) 2000-03-06. // // Update 2005: types are also provided and <bits/type_traits.h> has been // removed. // extern "C++" { namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION struct __true_type { }; struct __false_type { }; template<bool> struct __truth_type { typedef __false_type __type; }; template<> struct __truth_type<true> { typedef __true_type __type; }; // N.B. The conversions to bool are needed due to the issue // explained in c++/19404. template<class _Sp, class _Tp> struct __traitor { enum { __value = bool(_Sp::__value) || bool(_Tp::__value) }; typedef typename __truth_type<__value>::__type __type; }; // Compare for equality of types. template<typename, typename> struct __are_same { enum { __value = 0 }; typedef __false_type __type; }; template<typename _Tp> struct __are_same<_Tp, _Tp> { enum { __value = 1 }; typedef __true_type __type; }; // Holds if the template-argument is a void type. template<typename _Tp> struct __is_void { enum { __value = 0 }; typedef __false_type __type; }; template<> struct __is_void<void> { enum { __value = 1 }; typedef __true_type __type; }; // // Integer types // template<typename _Tp> struct __is_integer { enum { __value = 0 }; typedef __false_type __type; }; // Thirteen specializations (yes there are eleven standard integer // types; <em>long long</em> and <em>unsigned long long</em> are // supported as extensions). Up to four target-specific __int<N> // types are supported as well. template<> struct __is_integer<bool> { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer<char> { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer<signed char> { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer<unsigned char> { enum { __value = 1 }; typedef __true_type __type; }; # ifdef _GLIBCXX_USE_WCHAR_T template<> struct __is_integer<wchar_t> { enum { __value = 1 }; typedef __true_type __type; }; # endif # 173 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/cpp_type_traits.h" 3 #ifdef _GLIBCXX_USE_CHAR8_T template<> struct __is_integer<char8_t> { enum { __value = 1 }; typedef __true_type __type; }; #endif # 182 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/cpp_type_traits.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 184 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/cpp_type_traits.h" 3 template<> struct __is_integer<char16_t> { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer<char32_t> { enum { __value = 1 }; typedef __true_type __type; }; #endif # 198 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/cpp_type_traits.h" 3 template<> struct __is_integer<short> { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer<unsigned short> { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer<int> { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer<unsigned int> { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer<long> { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer<unsigned long> { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer<long long> { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer<unsigned long long> { enum { __value = 1 }; typedef __true_type __type; }; #define __INT_N(TYPE) \ template<> \ struct __is_integer<TYPE> \ { \ enum { __value = 1 }; \ typedef __true_type __type; \ }; \ template<> \ struct __is_integer<unsigned TYPE> \ { \ enum { __value = 1 }; \ typedef __true_type __type; \ }; #ifdef __GLIBCXX_TYPE_INT_N_0 __INT_N(__GLIBCXX_TYPE_INT_N_0) #endif # 272 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/cpp_type_traits.h" 3 #ifdef __GLIBCXX_TYPE_INT_N_1 __INT_N(__GLIBCXX_TYPE_INT_N_1) #endif # 275 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/cpp_type_traits.h" 3 #ifdef __GLIBCXX_TYPE_INT_N_2 __INT_N(__GLIBCXX_TYPE_INT_N_2) #endif # 278 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/cpp_type_traits.h" 3 #ifdef __GLIBCXX_TYPE_INT_N_3 __INT_N(__GLIBCXX_TYPE_INT_N_3) #endif # 281 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/cpp_type_traits.h" 3 #undef __INT_N // // Floating point types // template<typename _Tp> struct __is_floating { enum { __value = 0 }; typedef __false_type __type; }; // three specializations (float, double and 'long double') template<> struct __is_floating<float> { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_floating<double> { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_floating<long double> { enum { __value = 1 }; typedef __true_type __type; }; // // Pointer types // template<typename _Tp> struct __is_pointer { enum { __value = 0 }; typedef __false_type __type; }; template<typename _Tp> struct __is_pointer<_Tp*> { enum { __value = 1 }; typedef __true_type __type; }; // // An arithmetic type is an integer type or a floating point type // template<typename _Tp> struct __is_arithmetic : public __traitor<__is_integer<_Tp>, __is_floating<_Tp> > { }; // // A scalar type is an arithmetic type or a pointer type // template<typename _Tp> struct __is_scalar : public __traitor<__is_arithmetic<_Tp>, __is_pointer<_Tp> > { }; // // For use in std::copy and std::find overloads for streambuf iterators. // template<typename _Tp> struct __is_char { enum { __value = 0 }; typedef __false_type __type; }; template<> struct __is_char<char> { enum { __value = 1 }; typedef __true_type __type; }; #ifdef _GLIBCXX_USE_WCHAR_T template<> struct __is_char<wchar_t> { enum { __value = 1 }; typedef __true_type __type; }; #endif # 374 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/cpp_type_traits.h" 3 template<typename _Tp> struct __is_byte { enum { __value = 0 }; typedef __false_type __type; }; template<> struct __is_byte<char> { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_byte<signed char> { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_byte<unsigned char> { enum { __value = 1 }; typedef __true_type __type; }; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 404 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/cpp_type_traits.h" 3 enum class byte : unsigned char; template<> struct __is_byte<byte> { enum { __value = 1 }; typedef __true_type __type; }; #endif // C++17 # 413 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/cpp_type_traits.h" 3 // // Move iterator type // template<typename _Tp> struct __is_move_iterator { enum { __value = 0 }; typedef __false_type __type; }; // Fallback implementation of the function in bits/stl_iterator.h used to // remove the move_iterator wrapper. template<typename _Iterator> inline _Iterator __miter_base(_Iterator __it) { return __it; } _GLIBCXX_END_NAMESPACE_VERSION } // namespace } // extern "C++" #endif //_CPP_TYPE_TRAITS_H # 436 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/cpp_type_traits.h" 3 # 62 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <ext/type_traits.h> #endif /* expanded by -frewrite-includes */ # 62 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/type_traits.h" 1 3 // -*- C++ -*- // Copyright (C) 2005-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms // of the GNU General Public License as published by the Free Software // Foundation; either version 3, or (at your option) any later // version. // This library is distributed in the hope that it will be useful, but // WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file ext/type_traits.h * This file is a GNU extension to the Standard C++ Library. */ #ifndef _EXT_TYPE_TRAITS #define _EXT_TYPE_TRAITS 1 #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 33 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/type_traits.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/c++config.h> #endif /* expanded by -frewrite-includes */ # 34 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/type_traits.h" 3 # 35 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/type_traits.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/cpp_type_traits.h> #endif /* expanded by -frewrite-includes */ # 35 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/type_traits.h" 3 # 36 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/type_traits.h" 3 extern "C++" { namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION // Define a nested type if some predicate holds. template<bool, typename> struct __enable_if { }; template<typename _Tp> struct __enable_if<true, _Tp> { typedef _Tp __type; }; // Conditional expression for types. If true, first, if false, second. template<bool _Cond, typename _Iftrue, typename _Iffalse> struct __conditional_type { typedef _Iftrue __type; }; template<typename _Iftrue, typename _Iffalse> struct __conditional_type<false, _Iftrue, _Iffalse> { typedef _Iffalse __type; }; // Given an integral builtin type, return the corresponding unsigned type. template<typename _Tp> struct __add_unsigned { private: typedef __enable_if<std::__is_integer<_Tp>::__value, _Tp> __if_type; public: typedef typename __if_type::__type __type; }; template<> struct __add_unsigned<char> { typedef unsigned char __type; }; template<> struct __add_unsigned<signed char> { typedef unsigned char __type; }; template<> struct __add_unsigned<short> { typedef unsigned short __type; }; template<> struct __add_unsigned<int> { typedef unsigned int __type; }; template<> struct __add_unsigned<long> { typedef unsigned long __type; }; template<> struct __add_unsigned<long long> { typedef unsigned long long __type; }; // Declare but don't define. template<> struct __add_unsigned<bool>; template<> struct __add_unsigned<wchar_t>; // Given an integral builtin type, return the corresponding signed type. template<typename _Tp> struct __remove_unsigned { private: typedef __enable_if<std::__is_integer<_Tp>::__value, _Tp> __if_type; public: typedef typename __if_type::__type __type; }; template<> struct __remove_unsigned<char> { typedef signed char __type; }; template<> struct __remove_unsigned<unsigned char> { typedef signed char __type; }; template<> struct __remove_unsigned<unsigned short> { typedef short __type; }; template<> struct __remove_unsigned<unsigned int> { typedef int __type; }; template<> struct __remove_unsigned<unsigned long> { typedef long __type; }; template<> struct __remove_unsigned<unsigned long long> { typedef long long __type; }; // Declare but don't define. template<> struct __remove_unsigned<bool>; template<> struct __remove_unsigned<wchar_t>; // For use in string and vstring. template<typename _Type> inline bool __is_null_pointer(_Type* __ptr) { return __ptr == 0; } template<typename _Type> inline bool __is_null_pointer(_Type) { return false; } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 161 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/type_traits.h" 3 inline bool __is_null_pointer(std::nullptr_t) { return true; } #endif # 165 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/type_traits.h" 3 // For complex and cmath template<typename _Tp, bool = std::__is_integer<_Tp>::__value> struct __promote { typedef double __type; }; // No nested __type member for non-integer non-floating point types, // allows this type to be used for SFINAE to constrain overloads in // <cmath> and <complex> to only the intended types. template<typename _Tp> struct __promote<_Tp, false> { }; template<> struct __promote<long double> { typedef long double __type; }; template<> struct __promote<double> { typedef double __type; }; template<> struct __promote<float> { typedef float __type; }; template<typename _Tp, typename _Up, typename _Tp2 = typename __promote<_Tp>::__type, typename _Up2 = typename __promote<_Up>::__type> struct __promote_2 { typedef __typeof__(_Tp2() + _Up2()) __type; }; template<typename _Tp, typename _Up, typename _Vp, typename _Tp2 = typename __promote<_Tp>::__type, typename _Up2 = typename __promote<_Up>::__type, typename _Vp2 = typename __promote<_Vp>::__type> struct __promote_3 { typedef __typeof__(_Tp2() + _Up2() + _Vp2()) __type; }; template<typename _Tp, typename _Up, typename _Vp, typename _Wp, typename _Tp2 = typename __promote<_Tp>::__type, typename _Up2 = typename __promote<_Up>::__type, typename _Vp2 = typename __promote<_Vp>::__type, typename _Wp2 = typename __promote<_Wp>::__type> struct __promote_4 { typedef __typeof__(_Tp2() + _Up2() + _Vp2() + _Wp2()) __type; }; _GLIBCXX_END_NAMESPACE_VERSION } // namespace } // extern "C++" #endif # 222 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/type_traits.h" 3 # 63 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <ext/numeric_traits.h> #endif /* expanded by -frewrite-includes */ # 63 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/numeric_traits.h" 1 3 // -*- C++ -*- // Copyright (C) 2007-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms // of the GNU General Public License as published by the Free Software // Foundation; either version 3, or (at your option) any later // version. // This library is distributed in the hope that it will be useful, but // WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file ext/numeric_traits.h * This file is a GNU extension to the Standard C++ Library. */ #ifndef _EXT_NUMERIC_TRAITS #define _EXT_NUMERIC_TRAITS 1 #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 33 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/numeric_traits.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/cpp_type_traits.h> #endif /* expanded by -frewrite-includes */ # 34 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/numeric_traits.h" 3 # 35 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/numeric_traits.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <ext/type_traits.h> #endif /* expanded by -frewrite-includes */ # 35 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/numeric_traits.h" 3 # 36 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/numeric_traits.h" 3 namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION // Compile time constants for builtin types. // In C++98 std::numeric_limits member functions are not constant expressions // (that changed in C++11 with the addition of 'constexpr'). // Even for C++11, this header is smaller than <limits> and can be used // when only is_signed, digits, min, or max values are needed for integers, // or is_signed, digits10, max_digits10, or max_exponent10 for floats. // Unlike __is_integer (and std::is_integral) this trait is true for // non-standard built-in integer types such as __int128 and __int20. template<typename _Tp> struct __is_integer_nonstrict : public std::__is_integer<_Tp> { using std::__is_integer<_Tp>::__value; // The number of bits in the value representation. enum { __width = __value ? sizeof(_Tp) * __CHAR_BIT__ : 0 }; }; template<typename _Value> struct __numeric_traits_integer { #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 64 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/numeric_traits.h" 3 static_assert(__is_integer_nonstrict<_Value>::__value, "invalid specialization"); #endif # 67 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/numeric_traits.h" 3 // NB: these two are also available in std::numeric_limits as compile // time constants, but <limits> is big and we can avoid including it. static const bool __is_signed = (_Value)(-1) < 0; static const int __digits = __is_integer_nonstrict<_Value>::__width - __is_signed; // The initializers must be constants so that __max and __min are too. static const _Value __max = __is_signed ? (((((_Value)1 << (__digits - 1)) - 1) << 1) + 1) : ~(_Value)0; static const _Value __min = __is_signed ? -__max - 1 : (_Value)0; }; template<typename _Value> const _Value __numeric_traits_integer<_Value>::__min; template<typename _Value> const _Value __numeric_traits_integer<_Value>::__max; template<typename _Value> const bool __numeric_traits_integer<_Value>::__is_signed; template<typename _Value> const int __numeric_traits_integer<_Value>::__digits; // Enable __numeric_traits_integer for types where the __is_integer_nonstrict // primary template doesn't give the right answer. #define _GLIBCXX_INT_N_TRAITS(T, WIDTH) \ template<> struct __is_integer_nonstrict<T> \ { \ enum { __value = 1 }; \ typedef std::__true_type __type; \ enum { __width = WIDTH }; \ }; \ template<> struct __is_integer_nonstrict<unsigned T> \ { \ enum { __value = 1 }; \ typedef std::__true_type __type; \ enum { __width = WIDTH }; \ }; // We need to specify the width for some __intNN types because they // have padding bits, e.g. the object representation of __int20 has 32 bits, // but its width (number of bits in the value representation) is only 20. #if 0 /* disabled by -frewrite-includes */ #if defined __GLIBCXX_TYPE_INT_N_0 && __GLIBCXX_BITSIZE_INT_N_0 % __CHAR_BIT__ #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 113 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/numeric_traits.h" 3 _GLIBCXX_INT_N_TRAITS(__GLIBCXX_TYPE_INT_N_0, __GLIBCXX_BITSIZE_INT_N_0) #endif # 115 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/numeric_traits.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined __GLIBCXX_TYPE_INT_N_1 && __GLIBCXX_BITSIZE_INT_N_1 % __CHAR_BIT__ #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 116 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/numeric_traits.h" 3 _GLIBCXX_INT_N_TRAITS(__GLIBCXX_TYPE_INT_N_1, __GLIBCXX_BITSIZE_INT_N_1) #endif # 118 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/numeric_traits.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined __GLIBCXX_TYPE_INT_N_2 && __GLIBCXX_BITSIZE_INT_N_2 % __CHAR_BIT__ #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 119 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/numeric_traits.h" 3 _GLIBCXX_INT_N_TRAITS(__GLIBCXX_TYPE_INT_N_2, __GLIBCXX_BITSIZE_INT_N_2) #endif # 121 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/numeric_traits.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined __GLIBCXX_TYPE_INT_N_3 && __GLIBCXX_BITSIZE_INT_N_3 % __CHAR_BIT__ #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 122 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/numeric_traits.h" 3 _GLIBCXX_INT_N_TRAITS(__GLIBCXX_TYPE_INT_N_3, __GLIBCXX_BITSIZE_INT_N_3) #endif # 124 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/numeric_traits.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined __STRICT_ANSI__ && defined __SIZEOF_INT128__ #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 126 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/numeric_traits.h" 3 // In strict modes __is_integer<__int128> is false, // but we still want to define __numeric_traits_integer<__int128>. _GLIBCXX_INT_N_TRAITS(__int128, 128) #endif # 130 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/numeric_traits.h" 3 #undef _GLIBCXX_INT_N_TRAITS #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 134 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/numeric_traits.h" 3 /// Convenience alias for __numeric_traits<integer-type>. template<typename _Tp> using __int_traits = __numeric_traits_integer<_Tp>; #endif # 138 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/numeric_traits.h" 3 #define __glibcxx_floating(_Tp, _Fval, _Dval, _LDval) \ (std::__are_same<_Tp, float>::__value ? _Fval \ : std::__are_same<_Tp, double>::__value ? _Dval : _LDval) #define __glibcxx_max_digits10(_Tp) \ (2 + __glibcxx_floating(_Tp, __FLT_MANT_DIG__, __DBL_MANT_DIG__, \ __LDBL_MANT_DIG__) * 643L / 2136) #define __glibcxx_digits10(_Tp) \ __glibcxx_floating(_Tp, __FLT_DIG__, __DBL_DIG__, __LDBL_DIG__) #define __glibcxx_max_exponent10(_Tp) \ __glibcxx_floating(_Tp, __FLT_MAX_10_EXP__, __DBL_MAX_10_EXP__, \ __LDBL_MAX_10_EXP__) // N.B. this only supports float, double and long double (no __float128 etc.) template<typename _Value> struct __numeric_traits_floating { // Only floating point types. See N1822. static const int __max_digits10 = __glibcxx_max_digits10(_Value); // See above comment... static const bool __is_signed = true; static const int __digits10 = __glibcxx_digits10(_Value); static const int __max_exponent10 = __glibcxx_max_exponent10(_Value); }; template<typename _Value> const int __numeric_traits_floating<_Value>::__max_digits10; template<typename _Value> const bool __numeric_traits_floating<_Value>::__is_signed; template<typename _Value> const int __numeric_traits_floating<_Value>::__digits10; template<typename _Value> const int __numeric_traits_floating<_Value>::__max_exponent10; template<typename _Value> struct __numeric_traits : public __conditional_type<std::__is_integer<_Value>::__value, __numeric_traits_integer<_Value>, __numeric_traits_floating<_Value> >::__type { }; _GLIBCXX_END_NAMESPACE_VERSION } // namespace #undef __glibcxx_floating #undef __glibcxx_max_digits10 #undef __glibcxx_digits10 #undef __glibcxx_max_exponent10 #endif # 195 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/numeric_traits.h" 3 # 64 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/stl_pair.h> #endif /* expanded by -frewrite-includes */ # 64 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_pair.h" 1 3 // Pair implementation -*- C++ -*- // Copyright (C) 2001-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /* * * Copyright (c) 1994 * Hewlett-Packard Company * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Hewlett-Packard Company makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. * * * Copyright (c) 1996,1997 * Silicon Graphics Computer Systems, Inc. * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Silicon Graphics makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. */ /** @file bits/stl_pair.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{utility} */ #ifndef _STL_PAIR_H #define _STL_PAIR_H 1 #if 0 /* expanded by -frewrite-includes */ #include <bits/move.h> // for std::move / std::forward, and std::swap #endif /* expanded by -frewrite-includes */ # 59 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_pair.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/move.h" 1 3 // Move, forward and identity for C++11 + swap -*- C++ -*- // Copyright (C) 2007-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file bits/move.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{utility} */ #ifndef _MOVE_H #define _MOVE_H 1 #if 0 /* expanded by -frewrite-includes */ #include <bits/c++config.h> #endif /* expanded by -frewrite-includes */ # 33 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/move.h" 3 # 34 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/move.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/concept_check.h> #endif /* expanded by -frewrite-includes */ # 34 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/move.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/concept_check.h" 1 3 // Concept-checking control -*- C++ -*- // Copyright (C) 2001-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file bits/concept_check.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{iterator} */ #ifndef _CONCEPT_CHECK_H #define _CONCEPT_CHECK_H 1 #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 34 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/concept_check.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/c++config.h> #endif /* expanded by -frewrite-includes */ # 35 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/concept_check.h" 3 # 36 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/concept_check.h" 3 // All places in libstdc++-v3 where these are used, or /might/ be used, or // don't need to be used, or perhaps /should/ be used, are commented with // "concept requirements" (and maybe some more text). So grep like crazy // if you're looking for additional places to use these. // Concept-checking code is off by default unless users turn it on via // configure options or editing c++config.h. // It is not supported for freestanding implementations. #if 0 /* disabled by -frewrite-includes */ #if !defined(_GLIBCXX_CONCEPT_CHECKS) || !_GLIBCXX_HOSTED #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 47 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/concept_check.h" 3 #define __glibcxx_function_requires(...) #define __glibcxx_class_requires(_a,_b) #define __glibcxx_class_requires2(_a,_b,_c) #define __glibcxx_class_requires3(_a,_b,_c,_d) #define __glibcxx_class_requires4(_a,_b,_c,_d,_e) #else // the checks are on # 55 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/concept_check.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/boost_concept_check.h> #endif /* expanded by -frewrite-includes */ # 56 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/concept_check.h" 3 # 57 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/concept_check.h" 3 // Note that the obvious and elegant approach of // //#define glibcxx_function_requires(C) debug::function_requires< debug::C >() // // won't work due to concept templates with more than one parameter, e.g., // BinaryPredicateConcept. The preprocessor tries to split things up on // the commas in the template argument list. We can't use an inner pair of // parenthesis to hide the commas, because "debug::(Temp<Foo,Bar>)" isn't // a valid instantiation pattern. Thus, we steal a feature from C99. #define __glibcxx_function_requires(...) \ __gnu_cxx::__function_requires< __gnu_cxx::__VA_ARGS__ >(); #define __glibcxx_class_requires(_a,_C) \ _GLIBCXX_CLASS_REQUIRES(_a, __gnu_cxx, _C); #define __glibcxx_class_requires2(_a,_b,_C) \ _GLIBCXX_CLASS_REQUIRES2(_a, _b, __gnu_cxx, _C); #define __glibcxx_class_requires3(_a,_b,_c,_C) \ _GLIBCXX_CLASS_REQUIRES3(_a, _b, _c, __gnu_cxx, _C); #define __glibcxx_class_requires4(_a,_b,_c,_d,_C) \ _GLIBCXX_CLASS_REQUIRES4(_a, _b, _c, _d, __gnu_cxx, _C); #endif // enable/disable # 80 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/concept_check.h" 3 #endif // _GLIBCXX_CONCEPT_CHECK # 82 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/concept_check.h" 3 # 35 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/move.h" 2 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION // Used, in C++03 mode too, by allocators, etc. /** * @brief Same as C++11 std::addressof * @ingroup utilities */ template<typename _Tp> inline _GLIBCXX_CONSTEXPR _Tp* __addressof(_Tp& __r) _GLIBCXX_NOEXCEPT { return __builtin_addressof(__r); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 51 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/move.h" 3 _GLIBCXX_END_NAMESPACE_VERSION } // namespace #if 0 /* expanded by -frewrite-includes */ #include <type_traits> // Brings in std::declval too. #endif /* expanded by -frewrite-includes */ # 55 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/move.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 1 3 // C++11 <type_traits> -*- C++ -*- // Copyright (C) 2007-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file include/type_traits * This is a Standard C++ Library header. */ #ifndef _GLIBCXX_TYPE_TRAITS #define _GLIBCXX_TYPE_TRAITS 1 #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 33 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus < 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 35 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 #if 0 /* expanded by -frewrite-includes */ # include <bits/c++0x_warning.h> #endif /* expanded by -frewrite-includes */ # 35 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 # 36 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 #else # 37 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/c++config.h> #endif /* expanded by -frewrite-includes */ # 38 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 # 39 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @defgroup metaprogramming Metaprogramming * @ingroup utilities * * Template utilities for compile-time introspection and modification, * including type classification traits, type property inspection traits * and type transformation traits. * * @{ */ /// integral_constant template<typename _Tp, _Tp __v> struct integral_constant { static constexpr _Tp value = __v; typedef _Tp value_type; typedef integral_constant<_Tp, __v> type; constexpr operator value_type() const noexcept { return value; } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 64 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 #define __cpp_lib_integral_constant_callable 201304 constexpr value_type operator()() const noexcept { return value; } #endif # 69 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 }; template<typename _Tp, _Tp __v> constexpr _Tp integral_constant<_Tp, __v>::value; /// The type used as a compile-time boolean with true value. typedef integral_constant<bool, true> true_type; /// The type used as a compile-time boolean with false value. typedef integral_constant<bool, false> false_type; template<bool __v> using __bool_constant = integral_constant<bool, __v>; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201402L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 84 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 # define __cpp_lib_bool_constant 201505 template<bool __v> using bool_constant = integral_constant<bool, __v>; #endif # 88 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 // Meta programming helper types. template<bool, typename, typename> struct conditional; template<typename...> struct __or_; template<> struct __or_<> : public false_type { }; template<typename _B1> struct __or_<_B1> : public _B1 { }; template<typename _B1, typename _B2> struct __or_<_B1, _B2> : public conditional<_B1::value, _B1, _B2>::type { }; template<typename _B1, typename _B2, typename _B3, typename... _Bn> struct __or_<_B1, _B2, _B3, _Bn...> : public conditional<_B1::value, _B1, __or_<_B2, _B3, _Bn...>>::type { }; template<typename...> struct __and_; template<> struct __and_<> : public true_type { }; template<typename _B1> struct __and_<_B1> : public _B1 { }; template<typename _B1, typename _B2> struct __and_<_B1, _B2> : public conditional<_B1::value, _B2, _B1>::type { }; template<typename _B1, typename _B2, typename _B3, typename... _Bn> struct __and_<_B1, _B2, _B3, _Bn...> : public conditional<_B1::value, __and_<_B2, _B3, _Bn...>, _B1>::type { }; template<typename _Pp> struct __not_ : public __bool_constant<!bool(_Pp::value)> { }; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 146 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 template<typename... _Bn> inline constexpr bool __or_v = __or_<_Bn...>::value; template<typename... _Bn> inline constexpr bool __and_v = __and_<_Bn...>::value; #define __cpp_lib_logical_traits 201510 template<typename... _Bn> struct conjunction : __and_<_Bn...> { }; template<typename... _Bn> struct disjunction : __or_<_Bn...> { }; template<typename _Pp> struct negation : __not_<_Pp> { }; template<typename... _Bn> inline constexpr bool conjunction_v = conjunction<_Bn...>::value; template<typename... _Bn> inline constexpr bool disjunction_v = disjunction<_Bn...>::value; template<typename _Pp> inline constexpr bool negation_v = negation<_Pp>::value; #endif // C++17 # 179 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 // For several sfinae-friendly trait implementations we transport both the // result information (as the member type) and the failure information (no // member type). This is very similar to std::enable_if, but we cannot use // them, because we need to derive from them as an implementation detail. template<typename _Tp> struct __success_type { typedef _Tp type; }; struct __failure_type { }; // Primary type categories. template<typename> struct remove_cv; template<typename> struct __is_void_helper : public false_type { }; template<> struct __is_void_helper<void> : public true_type { }; /// is_void template<typename _Tp> struct is_void : public __is_void_helper<typename remove_cv<_Tp>::type>::type { }; template<typename> struct __is_integral_helper : public false_type { }; template<> struct __is_integral_helper<bool> : public true_type { }; template<> struct __is_integral_helper<char> : public true_type { }; template<> struct __is_integral_helper<signed char> : public true_type { }; template<> struct __is_integral_helper<unsigned char> : public true_type { }; #ifdef _GLIBCXX_USE_WCHAR_T template<> struct __is_integral_helper<wchar_t> : public true_type { }; #endif # 236 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 #ifdef _GLIBCXX_USE_CHAR8_T template<> struct __is_integral_helper<char8_t> : public true_type { }; #endif # 242 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 template<> struct __is_integral_helper<char16_t> : public true_type { }; template<> struct __is_integral_helper<char32_t> : public true_type { }; template<> struct __is_integral_helper<short> : public true_type { }; template<> struct __is_integral_helper<unsigned short> : public true_type { }; template<> struct __is_integral_helper<int> : public true_type { }; template<> struct __is_integral_helper<unsigned int> : public true_type { }; template<> struct __is_integral_helper<long> : public true_type { }; template<> struct __is_integral_helper<unsigned long> : public true_type { }; template<> struct __is_integral_helper<long long> : public true_type { }; template<> struct __is_integral_helper<unsigned long long> : public true_type { }; // Conditionalizing on __STRICT_ANSI__ here will break any port that // uses one of these types for size_t. #if 0 /* disabled by -frewrite-includes */ #if defined(__GLIBCXX_TYPE_INT_N_0) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 286 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 template<> struct __is_integral_helper<__GLIBCXX_TYPE_INT_N_0> : public true_type { }; template<> struct __is_integral_helper<unsigned __GLIBCXX_TYPE_INT_N_0> : public true_type { }; #endif # 294 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 #if 0 /* disabled by -frewrite-includes */ #if defined(__GLIBCXX_TYPE_INT_N_1) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 295 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 template<> struct __is_integral_helper<__GLIBCXX_TYPE_INT_N_1> : public true_type { }; template<> struct __is_integral_helper<unsigned __GLIBCXX_TYPE_INT_N_1> : public true_type { }; #endif # 303 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 #if 0 /* disabled by -frewrite-includes */ #if defined(__GLIBCXX_TYPE_INT_N_2) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 304 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 template<> struct __is_integral_helper<__GLIBCXX_TYPE_INT_N_2> : public true_type { }; template<> struct __is_integral_helper<unsigned __GLIBCXX_TYPE_INT_N_2> : public true_type { }; #endif # 312 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 #if 0 /* disabled by -frewrite-includes */ #if defined(__GLIBCXX_TYPE_INT_N_3) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 313 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 template<> struct __is_integral_helper<__GLIBCXX_TYPE_INT_N_3> : public true_type { }; template<> struct __is_integral_helper<unsigned __GLIBCXX_TYPE_INT_N_3> : public true_type { }; #endif # 321 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 /// is_integral template<typename _Tp> struct is_integral : public __is_integral_helper<typename remove_cv<_Tp>::type>::type { }; template<typename> struct __is_floating_point_helper : public false_type { }; template<> struct __is_floating_point_helper<float> : public true_type { }; template<> struct __is_floating_point_helper<double> : public true_type { }; template<> struct __is_floating_point_helper<long double> : public true_type { }; #if 0 /* disabled by -frewrite-includes */ #if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_FLOAT128) && !defined(__CUDACC__) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 345 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 template<> struct __is_floating_point_helper<__float128> : public true_type { }; #endif # 349 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 /// is_floating_point template<typename _Tp> struct is_floating_point : public __is_floating_point_helper<typename remove_cv<_Tp>::type>::type { }; /// is_array template<typename> struct is_array : public false_type { }; template<typename _Tp, std::size_t _Size> struct is_array<_Tp[_Size]> : public true_type { }; template<typename _Tp> struct is_array<_Tp[]> : public true_type { }; template<typename> struct __is_pointer_helper : public false_type { }; template<typename _Tp> struct __is_pointer_helper<_Tp*> : public true_type { }; /// is_pointer template<typename _Tp> struct is_pointer : public __is_pointer_helper<typename remove_cv<_Tp>::type>::type { }; /// is_lvalue_reference template<typename> struct is_lvalue_reference : public false_type { }; template<typename _Tp> struct is_lvalue_reference<_Tp&> : public true_type { }; /// is_rvalue_reference template<typename> struct is_rvalue_reference : public false_type { }; template<typename _Tp> struct is_rvalue_reference<_Tp&&> : public true_type { }; template<typename> struct is_function; template<typename> struct __is_member_object_pointer_helper : public false_type { }; template<typename _Tp, typename _Cp> struct __is_member_object_pointer_helper<_Tp _Cp::*> : public __not_<is_function<_Tp>>::type { }; /// is_member_object_pointer template<typename _Tp> struct is_member_object_pointer : public __is_member_object_pointer_helper< typename remove_cv<_Tp>::type>::type { }; template<typename> struct __is_member_function_pointer_helper : public false_type { }; template<typename _Tp, typename _Cp> struct __is_member_function_pointer_helper<_Tp _Cp::*> : public is_function<_Tp>::type { }; /// is_member_function_pointer template<typename _Tp> struct is_member_function_pointer : public __is_member_function_pointer_helper< typename remove_cv<_Tp>::type>::type { }; /// is_enum template<typename _Tp> struct is_enum : public integral_constant<bool, __is_enum(_Tp)> { }; /// is_union template<typename _Tp> struct is_union : public integral_constant<bool, __is_union(_Tp)> { }; /// is_class template<typename _Tp> struct is_class : public integral_constant<bool, __is_class(_Tp)> { }; /// is_function template<typename> struct is_function : public false_type { }; template<typename _Res, typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM> struct is_function<_Res(_ArgTypes...) _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; template<typename _Res, typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM> struct is_function<_Res(_ArgTypes...) & _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; template<typename _Res, typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM> struct is_function<_Res(_ArgTypes...) && _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; template<typename _Res, typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM> struct is_function<_Res(_ArgTypes......) _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; template<typename _Res, typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM> struct is_function<_Res(_ArgTypes......) & _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; template<typename _Res, typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM> struct is_function<_Res(_ArgTypes......) && _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; template<typename _Res, typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM> struct is_function<_Res(_ArgTypes...) const _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; template<typename _Res, typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM> struct is_function<_Res(_ArgTypes...) const & _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; template<typename _Res, typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM> struct is_function<_Res(_ArgTypes...) const && _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; template<typename _Res, typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM> struct is_function<_Res(_ArgTypes......) const _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; template<typename _Res, typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM> struct is_function<_Res(_ArgTypes......) const & _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; template<typename _Res, typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM> struct is_function<_Res(_ArgTypes......) const && _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; template<typename _Res, typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM> struct is_function<_Res(_ArgTypes...) volatile _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; template<typename _Res, typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM> struct is_function<_Res(_ArgTypes...) volatile & _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; template<typename _Res, typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM> struct is_function<_Res(_ArgTypes...) volatile && _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; template<typename _Res, typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM> struct is_function<_Res(_ArgTypes......) volatile _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; template<typename _Res, typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM> struct is_function<_Res(_ArgTypes......) volatile & _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; template<typename _Res, typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM> struct is_function<_Res(_ArgTypes......) volatile && _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; template<typename _Res, typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM> struct is_function<_Res(_ArgTypes...) const volatile _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; template<typename _Res, typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM> struct is_function<_Res(_ArgTypes...) const volatile & _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; template<typename _Res, typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM> struct is_function<_Res(_ArgTypes...) const volatile && _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; template<typename _Res, typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM> struct is_function<_Res(_ArgTypes......) const volatile _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; template<typename _Res, typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM> struct is_function<_Res(_ArgTypes......) const volatile & _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; template<typename _Res, typename... _ArgTypes _GLIBCXX_NOEXCEPT_PARM> struct is_function<_Res(_ArgTypes......) const volatile && _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; #define __cpp_lib_is_null_pointer 201309 template<typename> struct __is_null_pointer_helper : public false_type { }; template<> struct __is_null_pointer_helper<std::nullptr_t> : public true_type { }; /// is_null_pointer (LWG 2247). template<typename _Tp> struct is_null_pointer : public __is_null_pointer_helper<typename remove_cv<_Tp>::type>::type { }; /// __is_nullptr_t (extension). template<typename _Tp> struct __is_nullptr_t : public is_null_pointer<_Tp> { }; // Composite type categories. /// is_reference template<typename _Tp> struct is_reference : public __or_<is_lvalue_reference<_Tp>, is_rvalue_reference<_Tp>>::type { }; /// is_arithmetic template<typename _Tp> struct is_arithmetic : public __or_<is_integral<_Tp>, is_floating_point<_Tp>>::type { }; /// is_fundamental template<typename _Tp> struct is_fundamental : public __or_<is_arithmetic<_Tp>, is_void<_Tp>, is_null_pointer<_Tp>>::type { }; /// is_object template<typename _Tp> struct is_object : public __not_<__or_<is_function<_Tp>, is_reference<_Tp>, is_void<_Tp>>>::type { }; template<typename> struct is_member_pointer; /// is_scalar template<typename _Tp> struct is_scalar : public __or_<is_arithmetic<_Tp>, is_enum<_Tp>, is_pointer<_Tp>, is_member_pointer<_Tp>, is_null_pointer<_Tp>>::type { }; /// is_compound template<typename _Tp> struct is_compound : public __not_<is_fundamental<_Tp>>::type { }; template<typename _Tp> struct __is_member_pointer_helper : public false_type { }; template<typename _Tp, typename _Cp> struct __is_member_pointer_helper<_Tp _Cp::*> : public true_type { }; /// is_member_pointer template<typename _Tp> struct is_member_pointer : public __is_member_pointer_helper<typename remove_cv<_Tp>::type>::type { }; // Utility to detect referenceable types ([defns.referenceable]). template<typename _Tp> struct __is_referenceable : public __or_<is_object<_Tp>, is_reference<_Tp>>::type { }; template<typename _Res, typename... _Args _GLIBCXX_NOEXCEPT_PARM> struct __is_referenceable<_Res(_Args...) _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; template<typename _Res, typename... _Args _GLIBCXX_NOEXCEPT_PARM> struct __is_referenceable<_Res(_Args......) _GLIBCXX_NOEXCEPT_QUAL> : public true_type { }; // Type properties. /// is_const template<typename> struct is_const : public false_type { }; template<typename _Tp> struct is_const<_Tp const> : public true_type { }; /// is_volatile template<typename> struct is_volatile : public false_type { }; template<typename _Tp> struct is_volatile<_Tp volatile> : public true_type { }; /// is_trivial template<typename _Tp> struct is_trivial : public integral_constant<bool, __is_trivial(_Tp)> { }; // is_trivially_copyable template<typename _Tp> struct is_trivially_copyable : public integral_constant<bool, __is_trivially_copyable(_Tp)> { }; /// is_standard_layout template<typename _Tp> struct is_standard_layout : public integral_constant<bool, __is_standard_layout(_Tp)> { }; /// is_pod // Could use is_standard_layout && is_trivial instead of the builtin. template<typename _Tp> struct is_pod : public integral_constant<bool, __is_pod(_Tp)> { }; /// is_literal_type template<typename _Tp> struct is_literal_type : public integral_constant<bool, __is_literal_type(_Tp)> { }; /// is_empty template<typename _Tp> struct is_empty : public integral_constant<bool, __is_empty(_Tp)> { }; /// is_polymorphic template<typename _Tp> struct is_polymorphic : public integral_constant<bool, __is_polymorphic(_Tp)> { }; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201402L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 714 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 #define __cpp_lib_is_final 201402L /// is_final template<typename _Tp> struct is_final : public integral_constant<bool, __is_final(_Tp)> { }; #endif # 721 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 /// is_abstract template<typename _Tp> struct is_abstract : public integral_constant<bool, __is_abstract(_Tp)> { }; template<typename _Tp, bool = is_arithmetic<_Tp>::value> struct __is_signed_helper : public false_type { }; template<typename _Tp> struct __is_signed_helper<_Tp, true> : public integral_constant<bool, _Tp(-1) < _Tp(0)> { }; /// is_signed template<typename _Tp> struct is_signed : public __is_signed_helper<_Tp>::type { }; /// is_unsigned template<typename _Tp> struct is_unsigned : public __and_<is_arithmetic<_Tp>, __not_<is_signed<_Tp>>> { }; // Destructible and constructible type properties. /** * @brief Utility to simplify expressions used in unevaluated operands * @ingroup utilities */ template<typename _Tp, typename _Up = _Tp&&> _Up __declval(int); template<typename _Tp> _Tp __declval(long); template<typename _Tp> auto declval() noexcept -> decltype(__declval<_Tp>(0)); template<typename, unsigned = 0> struct extent; template<typename> struct remove_all_extents; template<typename _Tp> struct __is_array_known_bounds : public integral_constant<bool, (extent<_Tp>::value > 0)> { }; template<typename _Tp> struct __is_array_unknown_bounds : public __and_<is_array<_Tp>, __not_<extent<_Tp>>> { }; // In N3290 is_destructible does not say anything about function // types and abstract types, see LWG 2049. This implementation // describes function types as non-destructible and all complete // object types as destructible, iff the explicit destructor // call expression is wellformed. struct __do_is_destructible_impl { template<typename _Tp, typename = decltype(declval<_Tp&>().~_Tp())> static true_type __test(int); template<typename> static false_type __test(...); }; template<typename _Tp> struct __is_destructible_impl : public __do_is_destructible_impl { typedef decltype(__test<_Tp>(0)) type; }; template<typename _Tp, bool = __or_<is_void<_Tp>, __is_array_unknown_bounds<_Tp>, is_function<_Tp>>::value, bool = __or_<is_reference<_Tp>, is_scalar<_Tp>>::value> struct __is_destructible_safe; template<typename _Tp> struct __is_destructible_safe<_Tp, false, false> : public __is_destructible_impl<typename remove_all_extents<_Tp>::type>::type { }; template<typename _Tp> struct __is_destructible_safe<_Tp, true, false> : public false_type { }; template<typename _Tp> struct __is_destructible_safe<_Tp, false, true> : public true_type { }; /// is_destructible template<typename _Tp> struct is_destructible : public __is_destructible_safe<_Tp>::type { }; // is_nothrow_destructible requires that is_destructible is // satisfied as well. We realize that by mimicing the // implementation of is_destructible but refer to noexcept(expr) // instead of decltype(expr). struct __do_is_nt_destructible_impl { template<typename _Tp> static __bool_constant<noexcept(declval<_Tp&>().~_Tp())> __test(int); template<typename> static false_type __test(...); }; template<typename _Tp> struct __is_nt_destructible_impl : public __do_is_nt_destructible_impl { typedef decltype(__test<_Tp>(0)) type; }; template<typename _Tp, bool = __or_<is_void<_Tp>, __is_array_unknown_bounds<_Tp>, is_function<_Tp>>::value, bool = __or_<is_reference<_Tp>, is_scalar<_Tp>>::value> struct __is_nt_destructible_safe; template<typename _Tp> struct __is_nt_destructible_safe<_Tp, false, false> : public __is_nt_destructible_impl<typename remove_all_extents<_Tp>::type>::type { }; template<typename _Tp> struct __is_nt_destructible_safe<_Tp, true, false> : public false_type { }; template<typename _Tp> struct __is_nt_destructible_safe<_Tp, false, true> : public true_type { }; /// is_nothrow_destructible template<typename _Tp> struct is_nothrow_destructible : public __is_nt_destructible_safe<_Tp>::type { }; /// is_constructible template<typename _Tp, typename... _Args> struct is_constructible : public __bool_constant<__is_constructible(_Tp, _Args...)> { }; /// is_default_constructible template<typename _Tp> struct is_default_constructible : public is_constructible<_Tp>::type { }; template<typename _Tp, bool = __is_referenceable<_Tp>::value> struct __is_copy_constructible_impl; template<typename _Tp> struct __is_copy_constructible_impl<_Tp, false> : public false_type { }; template<typename _Tp> struct __is_copy_constructible_impl<_Tp, true> : public is_constructible<_Tp, const _Tp&> { }; /// is_copy_constructible template<typename _Tp> struct is_copy_constructible : public __is_copy_constructible_impl<_Tp> { }; template<typename _Tp, bool = __is_referenceable<_Tp>::value> struct __is_move_constructible_impl; template<typename _Tp> struct __is_move_constructible_impl<_Tp, false> : public false_type { }; template<typename _Tp> struct __is_move_constructible_impl<_Tp, true> : public is_constructible<_Tp, _Tp&&> { }; /// is_move_constructible template<typename _Tp> struct is_move_constructible : public __is_move_constructible_impl<_Tp> { }; template<bool, typename _Tp, typename... _Args> struct __is_nt_constructible_impl : public false_type { }; template<typename _Tp, typename... _Args> struct __is_nt_constructible_impl<true, _Tp, _Args...> : public __bool_constant<noexcept(_Tp(std::declval<_Args>()...))> { }; template<typename _Tp, typename _Arg> struct __is_nt_constructible_impl<true, _Tp, _Arg> : public __bool_constant<noexcept(static_cast<_Tp>(std::declval<_Arg>()))> { }; template<typename _Tp> struct __is_nt_constructible_impl<true, _Tp> : public __bool_constant<noexcept(_Tp())> { }; template<typename _Tp, size_t _Num> struct __is_nt_constructible_impl<true, _Tp[_Num]> : public __bool_constant<noexcept(typename remove_all_extents<_Tp>::type())> { }; template<typename _Tp, typename... _Args> using __is_nothrow_constructible_impl = __is_nt_constructible_impl<__is_constructible(_Tp, _Args...), _Tp, _Args...>; /// is_nothrow_constructible template<typename _Tp, typename... _Args> struct is_nothrow_constructible : public __is_nothrow_constructible_impl<_Tp, _Args...>::type { }; /// is_nothrow_default_constructible template<typename _Tp> struct is_nothrow_default_constructible : public __is_nothrow_constructible_impl<_Tp>::type { }; template<typename _Tp, bool = __is_referenceable<_Tp>::value> struct __is_nothrow_copy_constructible_impl; template<typename _Tp> struct __is_nothrow_copy_constructible_impl<_Tp, false> : public false_type { }; template<typename _Tp> struct __is_nothrow_copy_constructible_impl<_Tp, true> : public is_nothrow_constructible<_Tp, const _Tp&> { }; /// is_nothrow_copy_constructible template<typename _Tp> struct is_nothrow_copy_constructible : public __is_nothrow_copy_constructible_impl<_Tp> { }; template<typename _Tp, bool = __is_referenceable<_Tp>::value> struct __is_nothrow_move_constructible_impl; template<typename _Tp> struct __is_nothrow_move_constructible_impl<_Tp, false> : public false_type { }; template<typename _Tp> struct __is_nothrow_move_constructible_impl<_Tp, true> : public is_nothrow_constructible<_Tp, _Tp&&> { }; /// is_nothrow_move_constructible template<typename _Tp> struct is_nothrow_move_constructible : public __is_nothrow_move_constructible_impl<_Tp> { }; /// is_assignable template<typename _Tp, typename _Up> struct is_assignable : public __bool_constant<__is_assignable(_Tp, _Up)> { }; template<typename _Tp, bool = __is_referenceable<_Tp>::value> struct __is_copy_assignable_impl; template<typename _Tp> struct __is_copy_assignable_impl<_Tp, false> : public false_type { }; template<typename _Tp> struct __is_copy_assignable_impl<_Tp, true> : public is_assignable<_Tp&, const _Tp&> { }; /// is_copy_assignable template<typename _Tp> struct is_copy_assignable : public __is_copy_assignable_impl<_Tp> { }; template<typename _Tp, bool = __is_referenceable<_Tp>::value> struct __is_move_assignable_impl; template<typename _Tp> struct __is_move_assignable_impl<_Tp, false> : public false_type { }; template<typename _Tp> struct __is_move_assignable_impl<_Tp, true> : public is_assignable<_Tp&, _Tp&&> { }; /// is_move_assignable template<typename _Tp> struct is_move_assignable : public __is_move_assignable_impl<_Tp> { }; template<typename _Tp, typename _Up> struct __is_nt_assignable_impl : public integral_constant<bool, noexcept(declval<_Tp>() = declval<_Up>())> { }; /// is_nothrow_assignable template<typename _Tp, typename _Up> struct is_nothrow_assignable : public __and_<is_assignable<_Tp, _Up>, __is_nt_assignable_impl<_Tp, _Up>> { }; template<typename _Tp, bool = __is_referenceable<_Tp>::value> struct __is_nt_copy_assignable_impl; template<typename _Tp> struct __is_nt_copy_assignable_impl<_Tp, false> : public false_type { }; template<typename _Tp> struct __is_nt_copy_assignable_impl<_Tp, true> : public is_nothrow_assignable<_Tp&, const _Tp&> { }; /// is_nothrow_copy_assignable template<typename _Tp> struct is_nothrow_copy_assignable : public __is_nt_copy_assignable_impl<_Tp> { }; template<typename _Tp, bool = __is_referenceable<_Tp>::value> struct __is_nt_move_assignable_impl; template<typename _Tp> struct __is_nt_move_assignable_impl<_Tp, false> : public false_type { }; template<typename _Tp> struct __is_nt_move_assignable_impl<_Tp, true> : public is_nothrow_assignable<_Tp&, _Tp&&> { }; /// is_nothrow_move_assignable template<typename _Tp> struct is_nothrow_move_assignable : public __is_nt_move_assignable_impl<_Tp> { }; /// is_trivially_constructible template<typename _Tp, typename... _Args> struct is_trivially_constructible : public __bool_constant<__is_trivially_constructible(_Tp, _Args...)> { }; /// is_trivially_default_constructible template<typename _Tp> struct is_trivially_default_constructible : public is_trivially_constructible<_Tp>::type { }; struct __do_is_implicitly_default_constructible_impl { template <typename _Tp> static void __helper(const _Tp&); template <typename _Tp> static true_type __test(const _Tp&, decltype(__helper<const _Tp&>({}))* = 0); static false_type __test(...); }; template<typename _Tp> struct __is_implicitly_default_constructible_impl : public __do_is_implicitly_default_constructible_impl { typedef decltype(__test(declval<_Tp>())) type; }; template<typename _Tp> struct __is_implicitly_default_constructible_safe : public __is_implicitly_default_constructible_impl<_Tp>::type { }; template <typename _Tp> struct __is_implicitly_default_constructible : public __and_<is_default_constructible<_Tp>, __is_implicitly_default_constructible_safe<_Tp>> { }; /// is_trivially_copy_constructible template<typename _Tp, bool = __is_referenceable<_Tp>::value> struct __is_trivially_copy_constructible_impl; template<typename _Tp> struct __is_trivially_copy_constructible_impl<_Tp, false> : public false_type { }; template<typename _Tp> struct __is_trivially_copy_constructible_impl<_Tp, true> : public __and_<is_copy_constructible<_Tp>, integral_constant<bool, __is_trivially_constructible(_Tp, const _Tp&)>> { }; template<typename _Tp> struct is_trivially_copy_constructible : public __is_trivially_copy_constructible_impl<_Tp> { }; /// is_trivially_move_constructible template<typename _Tp, bool = __is_referenceable<_Tp>::value> struct __is_trivially_move_constructible_impl; template<typename _Tp> struct __is_trivially_move_constructible_impl<_Tp, false> : public false_type { }; template<typename _Tp> struct __is_trivially_move_constructible_impl<_Tp, true> : public __and_<is_move_constructible<_Tp>, integral_constant<bool, __is_trivially_constructible(_Tp, _Tp&&)>> { }; template<typename _Tp> struct is_trivially_move_constructible : public __is_trivially_move_constructible_impl<_Tp> { }; /// is_trivially_assignable template<typename _Tp, typename _Up> struct is_trivially_assignable : public __bool_constant<__is_trivially_assignable(_Tp, _Up)> { }; /// is_trivially_copy_assignable template<typename _Tp, bool = __is_referenceable<_Tp>::value> struct __is_trivially_copy_assignable_impl; template<typename _Tp> struct __is_trivially_copy_assignable_impl<_Tp, false> : public false_type { }; template<typename _Tp> struct __is_trivially_copy_assignable_impl<_Tp, true> : public __bool_constant<__is_trivially_assignable(_Tp&, const _Tp&)> { }; template<typename _Tp> struct is_trivially_copy_assignable : public __is_trivially_copy_assignable_impl<_Tp> { }; /// is_trivially_move_assignable template<typename _Tp, bool = __is_referenceable<_Tp>::value> struct __is_trivially_move_assignable_impl; template<typename _Tp> struct __is_trivially_move_assignable_impl<_Tp, false> : public false_type { }; template<typename _Tp> struct __is_trivially_move_assignable_impl<_Tp, true> : public __bool_constant<__is_trivially_assignable(_Tp&, _Tp&&)> { }; template<typename _Tp> struct is_trivially_move_assignable : public __is_trivially_move_assignable_impl<_Tp> { }; /// is_trivially_destructible template<typename _Tp> struct is_trivially_destructible : public __and_<is_destructible<_Tp>, __bool_constant<__has_trivial_destructor(_Tp)>> { }; /// has_virtual_destructor template<typename _Tp> struct has_virtual_destructor : public integral_constant<bool, __has_virtual_destructor(_Tp)> { }; // type property queries. /// alignment_of template<typename _Tp> struct alignment_of : public integral_constant<std::size_t, alignof(_Tp)> { }; /// rank template<typename> struct rank : public integral_constant<std::size_t, 0> { }; template<typename _Tp, std::size_t _Size> struct rank<_Tp[_Size]> : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; template<typename _Tp> struct rank<_Tp[]> : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; /// extent template<typename, unsigned _Uint> struct extent : public integral_constant<std::size_t, 0> { }; template<typename _Tp, unsigned _Uint, std::size_t _Size> struct extent<_Tp[_Size], _Uint> : public integral_constant<std::size_t, _Uint == 0 ? _Size : extent<_Tp, _Uint - 1>::value> { }; template<typename _Tp, unsigned _Uint> struct extent<_Tp[], _Uint> : public integral_constant<std::size_t, _Uint == 0 ? 0 : extent<_Tp, _Uint - 1>::value> { }; // Type relations. /// is_same template<typename, typename> struct is_same : public false_type { }; template<typename _Tp> struct is_same<_Tp, _Tp> : public true_type { }; /// is_base_of template<typename _Base, typename _Derived> struct is_base_of : public integral_constant<bool, __is_base_of(_Base, _Derived)> { }; template<typename _From, typename _To, bool = __or_<is_void<_From>, is_function<_To>, is_array<_To>>::value> struct __is_convertible_helper { typedef typename is_void<_To>::type type; }; template<typename _From, typename _To> class __is_convertible_helper<_From, _To, false> { template<typename _To1> static void __test_aux(_To1) noexcept; template<typename _From1, typename _To1, typename = decltype(__test_aux<_To1>(std::declval<_From1>()))> static true_type __test(int); template<typename, typename> static false_type __test(...); public: typedef decltype(__test<_From, _To>(0)) type; }; /// is_convertible template<typename _From, typename _To> struct is_convertible : public __is_convertible_helper<_From, _To>::type { }; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1333 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 template<typename _From, typename _To, bool = __or_<is_void<_From>, is_function<_To>, is_array<_To>>::value> struct __is_nt_convertible_helper : is_void<_To> { }; template<typename _From, typename _To> class __is_nt_convertible_helper<_From, _To, false> { template<typename _To1> static void __test_aux(_To1) noexcept; template<typename _From1, typename _To1> static bool_constant<noexcept(__test_aux<_To1>(std::declval<_From1>()))> __test(int); template<typename, typename> static false_type __test(...); public: using type = decltype(__test<_From, _To>(0)); }; #define __cpp_lib_is_nothrow_convertible 201806L /// is_nothrow_convertible template<typename _From, typename _To> struct is_nothrow_convertible : public __is_nt_convertible_helper<_From, _To>::type { }; /// is_nothrow_convertible_v template<typename _From, typename _To> inline constexpr bool is_nothrow_convertible_v = is_nothrow_convertible<_From, _To>::value; #endif // C++2a # 1370 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 // Const-volatile modifications. /// remove_const template<typename _Tp> struct remove_const { typedef _Tp type; }; template<typename _Tp> struct remove_const<_Tp const> { typedef _Tp type; }; /// remove_volatile template<typename _Tp> struct remove_volatile { typedef _Tp type; }; template<typename _Tp> struct remove_volatile<_Tp volatile> { typedef _Tp type; }; /// remove_cv template<typename _Tp> struct remove_cv { typedef typename remove_const<typename remove_volatile<_Tp>::type>::type type; }; /// add_const template<typename _Tp> struct add_const { typedef _Tp const type; }; /// add_volatile template<typename _Tp> struct add_volatile { typedef _Tp volatile type; }; /// add_cv template<typename _Tp> struct add_cv { typedef typename add_const<typename add_volatile<_Tp>::type>::type type; }; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1418 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 #define __cpp_lib_transformation_trait_aliases 201304 /// Alias template for remove_const template<typename _Tp> using remove_const_t = typename remove_const<_Tp>::type; /// Alias template for remove_volatile template<typename _Tp> using remove_volatile_t = typename remove_volatile<_Tp>::type; /// Alias template for remove_cv template<typename _Tp> using remove_cv_t = typename remove_cv<_Tp>::type; /// Alias template for add_const template<typename _Tp> using add_const_t = typename add_const<_Tp>::type; /// Alias template for add_volatile template<typename _Tp> using add_volatile_t = typename add_volatile<_Tp>::type; /// Alias template for add_cv template<typename _Tp> using add_cv_t = typename add_cv<_Tp>::type; #endif # 1445 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 // Reference transformations. /// remove_reference template<typename _Tp> struct remove_reference { typedef _Tp type; }; template<typename _Tp> struct remove_reference<_Tp&> { typedef _Tp type; }; template<typename _Tp> struct remove_reference<_Tp&&> { typedef _Tp type; }; template<typename _Tp, bool = __is_referenceable<_Tp>::value> struct __add_lvalue_reference_helper { typedef _Tp type; }; template<typename _Tp> struct __add_lvalue_reference_helper<_Tp, true> { typedef _Tp& type; }; /// add_lvalue_reference template<typename _Tp> struct add_lvalue_reference : public __add_lvalue_reference_helper<_Tp> { }; template<typename _Tp, bool = __is_referenceable<_Tp>::value> struct __add_rvalue_reference_helper { typedef _Tp type; }; template<typename _Tp> struct __add_rvalue_reference_helper<_Tp, true> { typedef _Tp&& type; }; /// add_rvalue_reference template<typename _Tp> struct add_rvalue_reference : public __add_rvalue_reference_helper<_Tp> { }; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1490 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 /// Alias template for remove_reference template<typename _Tp> using remove_reference_t = typename remove_reference<_Tp>::type; /// Alias template for add_lvalue_reference template<typename _Tp> using add_lvalue_reference_t = typename add_lvalue_reference<_Tp>::type; /// Alias template for add_rvalue_reference template<typename _Tp> using add_rvalue_reference_t = typename add_rvalue_reference<_Tp>::type; #endif # 1502 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 // Sign modifications. // Utility for constructing identically cv-qualified types. template<typename _Unqualified, bool _IsConst, bool _IsVol> struct __cv_selector; template<typename _Unqualified> struct __cv_selector<_Unqualified, false, false> { typedef _Unqualified __type; }; template<typename _Unqualified> struct __cv_selector<_Unqualified, false, true> { typedef volatile _Unqualified __type; }; template<typename _Unqualified> struct __cv_selector<_Unqualified, true, false> { typedef const _Unqualified __type; }; template<typename _Unqualified> struct __cv_selector<_Unqualified, true, true> { typedef const volatile _Unqualified __type; }; template<typename _Qualified, typename _Unqualified, bool _IsConst = is_const<_Qualified>::value, bool _IsVol = is_volatile<_Qualified>::value> class __match_cv_qualifiers { typedef __cv_selector<_Unqualified, _IsConst, _IsVol> __match; public: typedef typename __match::__type __type; }; // Utility for finding the unsigned versions of signed integral types. template<typename _Tp> struct __make_unsigned { typedef _Tp __type; }; template<> struct __make_unsigned<char> { typedef unsigned char __type; }; template<> struct __make_unsigned<signed char> { typedef unsigned char __type; }; template<> struct __make_unsigned<short> { typedef unsigned short __type; }; template<> struct __make_unsigned<int> { typedef unsigned int __type; }; template<> struct __make_unsigned<long> { typedef unsigned long __type; }; template<> struct __make_unsigned<long long> { typedef unsigned long long __type; }; #if 0 /* disabled by -frewrite-includes */ #if defined(__GLIBCXX_TYPE_INT_N_0) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1566 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 template<> struct __make_unsigned<__GLIBCXX_TYPE_INT_N_0> { typedef unsigned __GLIBCXX_TYPE_INT_N_0 __type; }; #endif # 1570 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 #if 0 /* disabled by -frewrite-includes */ #if defined(__GLIBCXX_TYPE_INT_N_1) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1571 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 template<> struct __make_unsigned<__GLIBCXX_TYPE_INT_N_1> { typedef unsigned __GLIBCXX_TYPE_INT_N_1 __type; }; #endif # 1575 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 #if 0 /* disabled by -frewrite-includes */ #if defined(__GLIBCXX_TYPE_INT_N_2) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1576 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 template<> struct __make_unsigned<__GLIBCXX_TYPE_INT_N_2> { typedef unsigned __GLIBCXX_TYPE_INT_N_2 __type; }; #endif # 1580 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 #if 0 /* disabled by -frewrite-includes */ #if defined(__GLIBCXX_TYPE_INT_N_3) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1581 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 template<> struct __make_unsigned<__GLIBCXX_TYPE_INT_N_3> { typedef unsigned __GLIBCXX_TYPE_INT_N_3 __type; }; #endif # 1585 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 // Select between integral and enum: not possible to be both. template<typename _Tp, bool _IsInt = is_integral<_Tp>::value, bool _IsEnum = is_enum<_Tp>::value> class __make_unsigned_selector; template<typename _Tp> class __make_unsigned_selector<_Tp, true, false> { using __unsigned_type = typename __make_unsigned<typename remove_cv<_Tp>::type>::__type; public: using __type = typename __match_cv_qualifiers<_Tp, __unsigned_type>::__type; }; class __make_unsigned_selector_base { protected: template<typename...> struct _List { }; template<typename _Tp, typename... _Up> struct _List<_Tp, _Up...> : _List<_Up...> { static constexpr size_t __size = sizeof(_Tp); }; template<size_t _Sz, typename _Tp, bool = (_Sz <= _Tp::__size)> struct __select; template<size_t _Sz, typename _Uint, typename... _UInts> struct __select<_Sz, _List<_Uint, _UInts...>, true> { using __type = _Uint; }; template<size_t _Sz, typename _Uint, typename... _UInts> struct __select<_Sz, _List<_Uint, _UInts...>, false> : __select<_Sz, _List<_UInts...>> { }; }; // Choose unsigned integer type with the smallest rank and same size as _Tp template<typename _Tp> class __make_unsigned_selector<_Tp, false, true> : __make_unsigned_selector_base { // With -fshort-enums, an enum may be as small as a char. using _UInts = _List<unsigned char, unsigned short, unsigned int, unsigned long, unsigned long long>; using __unsigned_type = typename __select<sizeof(_Tp), _UInts>::__type; public: using __type = typename __match_cv_qualifiers<_Tp, __unsigned_type>::__type; }; // wchar_t, char8_t, char16_t and char32_t are integral types but are // neither signed integer types nor unsigned integer types, so must be // transformed to the unsigned integer type with the smallest rank. // Use the partial specialization for enumeration types to do that. #if 0 /* disabled by -frewrite-includes */ #if defined(_GLIBCXX_USE_WCHAR_T) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1646 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 template<> struct __make_unsigned<wchar_t> { using __type = typename __make_unsigned_selector<wchar_t, false, true>::__type; }; #endif # 1653 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 #ifdef _GLIBCXX_USE_CHAR8_T template<> struct __make_unsigned<char8_t> { using __type = typename __make_unsigned_selector<char8_t, false, true>::__type; }; #endif # 1662 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 template<> struct __make_unsigned<char16_t> { using __type = typename __make_unsigned_selector<char16_t, false, true>::__type; }; template<> struct __make_unsigned<char32_t> { using __type = typename __make_unsigned_selector<char32_t, false, true>::__type; }; // Given an integral/enum type, return the corresponding unsigned // integer type. // Primary template. /// make_unsigned template<typename _Tp> struct make_unsigned { typedef typename __make_unsigned_selector<_Tp>::__type type; }; // Integral, but don't define. template<> struct make_unsigned<bool>; // Utility for finding the signed versions of unsigned integral types. template<typename _Tp> struct __make_signed { typedef _Tp __type; }; template<> struct __make_signed<char> { typedef signed char __type; }; template<> struct __make_signed<unsigned char> { typedef signed char __type; }; template<> struct __make_signed<unsigned short> { typedef signed short __type; }; template<> struct __make_signed<unsigned int> { typedef signed int __type; }; template<> struct __make_signed<unsigned long> { typedef signed long __type; }; template<> struct __make_signed<unsigned long long> { typedef signed long long __type; }; #if 0 /* disabled by -frewrite-includes */ #if defined(__GLIBCXX_TYPE_INT_N_0) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1720 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 template<> struct __make_signed<unsigned __GLIBCXX_TYPE_INT_N_0> { typedef __GLIBCXX_TYPE_INT_N_0 __type; }; #endif # 1724 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 #if 0 /* disabled by -frewrite-includes */ #if defined(__GLIBCXX_TYPE_INT_N_1) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1725 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 template<> struct __make_signed<unsigned __GLIBCXX_TYPE_INT_N_1> { typedef __GLIBCXX_TYPE_INT_N_1 __type; }; #endif # 1729 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 #if 0 /* disabled by -frewrite-includes */ #if defined(__GLIBCXX_TYPE_INT_N_2) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1730 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 template<> struct __make_signed<unsigned __GLIBCXX_TYPE_INT_N_2> { typedef __GLIBCXX_TYPE_INT_N_2 __type; }; #endif # 1734 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 #if 0 /* disabled by -frewrite-includes */ #if defined(__GLIBCXX_TYPE_INT_N_3) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1735 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 template<> struct __make_signed<unsigned __GLIBCXX_TYPE_INT_N_3> { typedef __GLIBCXX_TYPE_INT_N_3 __type; }; #endif # 1739 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 // Select between integral and enum: not possible to be both. template<typename _Tp, bool _IsInt = is_integral<_Tp>::value, bool _IsEnum = is_enum<_Tp>::value> class __make_signed_selector; template<typename _Tp> class __make_signed_selector<_Tp, true, false> { using __signed_type = typename __make_signed<typename remove_cv<_Tp>::type>::__type; public: using __type = typename __match_cv_qualifiers<_Tp, __signed_type>::__type; }; // Choose signed integer type with the smallest rank and same size as _Tp template<typename _Tp> class __make_signed_selector<_Tp, false, true> { typedef typename __make_unsigned_selector<_Tp>::__type __unsigned_type; public: typedef typename __make_signed_selector<__unsigned_type>::__type __type; }; // wchar_t, char16_t and char32_t are integral types but are neither // signed integer types nor unsigned integer types, so must be // transformed to the signed integer type with the smallest rank. // Use the partial specialization for enumeration types to do that. #if 0 /* disabled by -frewrite-includes */ #if defined(_GLIBCXX_USE_WCHAR_T) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1772 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 template<> struct __make_signed<wchar_t> { using __type = typename __make_signed_selector<wchar_t, false, true>::__type; }; #endif # 1779 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 #if 0 /* disabled by -frewrite-includes */ #if defined(_GLIBCXX_USE_CHAR8_T) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1781 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 template<> struct __make_signed<char8_t> { using __type = typename __make_signed_selector<char8_t, false, true>::__type; }; #endif # 1788 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 template<> struct __make_signed<char16_t> { using __type = typename __make_signed_selector<char16_t, false, true>::__type; }; template<> struct __make_signed<char32_t> { using __type = typename __make_signed_selector<char32_t, false, true>::__type; }; // Given an integral/enum type, return the corresponding signed // integer type. // Primary template. /// make_signed template<typename _Tp> struct make_signed { typedef typename __make_signed_selector<_Tp>::__type type; }; // Integral, but don't define. template<> struct make_signed<bool>; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1816 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 /// Alias template for make_signed template<typename _Tp> using make_signed_t = typename make_signed<_Tp>::type; /// Alias template for make_unsigned template<typename _Tp> using make_unsigned_t = typename make_unsigned<_Tp>::type; #endif # 1824 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 // Array modifications. /// remove_extent template<typename _Tp> struct remove_extent { typedef _Tp type; }; template<typename _Tp, std::size_t _Size> struct remove_extent<_Tp[_Size]> { typedef _Tp type; }; template<typename _Tp> struct remove_extent<_Tp[]> { typedef _Tp type; }; /// remove_all_extents template<typename _Tp> struct remove_all_extents { typedef _Tp type; }; template<typename _Tp, std::size_t _Size> struct remove_all_extents<_Tp[_Size]> { typedef typename remove_all_extents<_Tp>::type type; }; template<typename _Tp> struct remove_all_extents<_Tp[]> { typedef typename remove_all_extents<_Tp>::type type; }; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1854 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 /// Alias template for remove_extent template<typename _Tp> using remove_extent_t = typename remove_extent<_Tp>::type; /// Alias template for remove_all_extents template<typename _Tp> using remove_all_extents_t = typename remove_all_extents<_Tp>::type; #endif # 1862 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 // Pointer modifications. template<typename _Tp, typename> struct __remove_pointer_helper { typedef _Tp type; }; template<typename _Tp, typename _Up> struct __remove_pointer_helper<_Tp, _Up*> { typedef _Up type; }; /// remove_pointer template<typename _Tp> struct remove_pointer : public __remove_pointer_helper<_Tp, typename remove_cv<_Tp>::type> { }; /// add_pointer template<typename _Tp, bool = __or_<__is_referenceable<_Tp>, is_void<_Tp>>::value> struct __add_pointer_helper { typedef _Tp type; }; template<typename _Tp> struct __add_pointer_helper<_Tp, true> { typedef typename remove_reference<_Tp>::type* type; }; template<typename _Tp> struct add_pointer : public __add_pointer_helper<_Tp> { }; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1895 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 /// Alias template for remove_pointer template<typename _Tp> using remove_pointer_t = typename remove_pointer<_Tp>::type; /// Alias template for add_pointer template<typename _Tp> using add_pointer_t = typename add_pointer<_Tp>::type; #endif # 1903 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 template<std::size_t _Len> struct __aligned_storage_msa { union __type { unsigned char __data[_Len]; struct __attribute__((__aligned__)) { } __align; }; }; /** * @brief Alignment type. * * The value of _Align is a default-alignment which shall be the * most stringent alignment requirement for any C++ object type * whose size is no greater than _Len (3.9). The member typedef * type shall be a POD type suitable for use as uninitialized * storage for any object whose size is at most _Len and whose * alignment is a divisor of _Align. */ template<std::size_t _Len, std::size_t _Align = __alignof__(typename __aligned_storage_msa<_Len>::__type)> struct aligned_storage { union type { unsigned char __data[_Len]; struct __attribute__((__aligned__((_Align)))) { } __align; }; }; template <typename... _Types> struct __strictest_alignment { static const size_t _S_alignment = 0; static const size_t _S_size = 0; }; template <typename _Tp, typename... _Types> struct __strictest_alignment<_Tp, _Types...> { static const size_t _S_alignment = alignof(_Tp) > __strictest_alignment<_Types...>::_S_alignment ? alignof(_Tp) : __strictest_alignment<_Types...>::_S_alignment; static const size_t _S_size = sizeof(_Tp) > __strictest_alignment<_Types...>::_S_size ? sizeof(_Tp) : __strictest_alignment<_Types...>::_S_size; }; /** * @brief Provide aligned storage for types. * * [meta.trans.other] * * Provides aligned storage for any of the provided types of at * least size _Len. * * @see aligned_storage */ template <size_t _Len, typename... _Types> struct aligned_union { private: static_assert(sizeof...(_Types) != 0, "At least one type is required"); using __strictest = __strictest_alignment<_Types...>; static const size_t _S_len = _Len > __strictest::_S_size ? _Len : __strictest::_S_size; public: /// The value of the strictest alignment of _Types. static const size_t alignment_value = __strictest::_S_alignment; /// The storage. typedef typename aligned_storage<_S_len, alignment_value>::type type; }; template <size_t _Len, typename... _Types> const size_t aligned_union<_Len, _Types...>::alignment_value; // Decay trait for arrays and functions, used for perfect forwarding // in make_pair, make_tuple, etc. template<typename _Up, bool _IsArray = is_array<_Up>::value, bool _IsFunction = is_function<_Up>::value> struct __decay_selector; // NB: DR 705. template<typename _Up> struct __decay_selector<_Up, false, false> { typedef typename remove_cv<_Up>::type __type; }; template<typename _Up> struct __decay_selector<_Up, true, false> { typedef typename remove_extent<_Up>::type* __type; }; template<typename _Up> struct __decay_selector<_Up, false, true> { typedef typename add_pointer<_Up>::type __type; }; /// decay template<typename _Tp> class decay { typedef typename remove_reference<_Tp>::type __remove_type; public: typedef typename __decay_selector<__remove_type>::__type type; }; template<typename _Tp> class reference_wrapper; // Helper which adds a reference to a type when given a reference_wrapper template<typename _Tp> struct __strip_reference_wrapper { typedef _Tp __type; }; template<typename _Tp> struct __strip_reference_wrapper<reference_wrapper<_Tp> > { typedef _Tp& __type; }; template<typename _Tp> struct __decay_and_strip { typedef typename __strip_reference_wrapper< typename decay<_Tp>::type>::__type __type; }; // Primary template. /// Define a member typedef @c type only if a boolean constant is true. template<bool, typename _Tp = void> struct enable_if { }; // Partial specialization for true. template<typename _Tp> struct enable_if<true, _Tp> { typedef _Tp type; }; template<typename... _Cond> using _Require = typename enable_if<__and_<_Cond...>::value>::type; // Primary template. /// Define a member typedef @c type to one of two argument types. template<bool _Cond, typename _Iftrue, typename _Iffalse> struct conditional { typedef _Iftrue type; }; // Partial specialization for false. template<typename _Iftrue, typename _Iffalse> struct conditional<false, _Iftrue, _Iffalse> { typedef _Iffalse type; }; /// common_type template<typename... _Tp> struct common_type; // Sfinae-friendly common_type implementation: struct __do_common_type_impl { template<typename _Tp, typename _Up> static __success_type<typename decay<decltype (true ? std::declval<_Tp>() : std::declval<_Up>())>::type> _S_test(int); template<typename, typename> static __failure_type _S_test(...); }; template<typename _Tp, typename _Up> struct __common_type_impl : private __do_common_type_impl { typedef decltype(_S_test<_Tp, _Up>(0)) type; }; struct __do_member_type_wrapper { template<typename _Tp> static __success_type<typename _Tp::type> _S_test(int); template<typename> static __failure_type _S_test(...); }; template<typename _Tp> struct __member_type_wrapper : private __do_member_type_wrapper { typedef decltype(_S_test<_Tp>(0)) type; }; template<typename _CTp, typename... _Args> struct __expanded_common_type_wrapper { typedef common_type<typename _CTp::type, _Args...> type; }; template<typename... _Args> struct __expanded_common_type_wrapper<__failure_type, _Args...> { typedef __failure_type type; }; template<> struct common_type<> { }; template<typename _Tp> struct common_type<_Tp> : common_type<_Tp, _Tp> { }; template<typename _Tp, typename _Up> struct common_type<_Tp, _Up> : public __common_type_impl<_Tp, _Up>::type { }; template<typename _Tp, typename _Up, typename... _Vp> struct common_type<_Tp, _Up, _Vp...> : public __expanded_common_type_wrapper<typename __member_type_wrapper< common_type<_Tp, _Up>>::type, _Vp...>::type { }; template<typename _Tp, bool = is_enum<_Tp>::value> struct __underlying_type_impl { using type = __underlying_type(_Tp); }; template<typename _Tp> struct __underlying_type_impl<_Tp, false> { }; /// The underlying type of an enum. template<typename _Tp> struct underlying_type : public __underlying_type_impl<_Tp> { }; template<typename _Tp> struct __declval_protector { static const bool __stop = false; }; template<typename _Tp> auto declval() noexcept -> decltype(__declval<_Tp>(0)) { static_assert(__declval_protector<_Tp>::__stop, "declval() must not be used!"); return __declval<_Tp>(0); } // __remove_cvref_t (std::remove_cvref_t for C++11). template<typename _Tp> using __remove_cvref_t = typename remove_cv<typename remove_reference<_Tp>::type>::type; /// result_of template<typename _Signature> class result_of; // Sfinae-friendly result_of implementation: #define __cpp_lib_result_of_sfinae 201210 struct __invoke_memfun_ref { }; struct __invoke_memfun_deref { }; struct __invoke_memobj_ref { }; struct __invoke_memobj_deref { }; struct __invoke_other { }; // Associate a tag type with a specialization of __success_type. template<typename _Tp, typename _Tag> struct __result_of_success : __success_type<_Tp> { using __invoke_type = _Tag; }; // [func.require] paragraph 1 bullet 1: struct __result_of_memfun_ref_impl { template<typename _Fp, typename _Tp1, typename... _Args> static __result_of_success<decltype( (std::declval<_Tp1>().*std::declval<_Fp>())(std::declval<_Args>()...) ), __invoke_memfun_ref> _S_test(int); template<typename...> static __failure_type _S_test(...); }; template<typename _MemPtr, typename _Arg, typename... _Args> struct __result_of_memfun_ref : private __result_of_memfun_ref_impl { typedef decltype(_S_test<_MemPtr, _Arg, _Args...>(0)) type; }; // [func.require] paragraph 1 bullet 2: struct __result_of_memfun_deref_impl { template<typename _Fp, typename _Tp1, typename... _Args> static __result_of_success<decltype( ((*std::declval<_Tp1>()).*std::declval<_Fp>())(std::declval<_Args>()...) ), __invoke_memfun_deref> _S_test(int); template<typename...> static __failure_type _S_test(...); }; template<typename _MemPtr, typename _Arg, typename... _Args> struct __result_of_memfun_deref : private __result_of_memfun_deref_impl { typedef decltype(_S_test<_MemPtr, _Arg, _Args...>(0)) type; }; // [func.require] paragraph 1 bullet 3: struct __result_of_memobj_ref_impl { template<typename _Fp, typename _Tp1> static __result_of_success<decltype( std::declval<_Tp1>().*std::declval<_Fp>() ), __invoke_memobj_ref> _S_test(int); template<typename, typename> static __failure_type _S_test(...); }; template<typename _MemPtr, typename _Arg> struct __result_of_memobj_ref : private __result_of_memobj_ref_impl { typedef decltype(_S_test<_MemPtr, _Arg>(0)) type; }; // [func.require] paragraph 1 bullet 4: struct __result_of_memobj_deref_impl { template<typename _Fp, typename _Tp1> static __result_of_success<decltype( (*std::declval<_Tp1>()).*std::declval<_Fp>() ), __invoke_memobj_deref> _S_test(int); template<typename, typename> static __failure_type _S_test(...); }; template<typename _MemPtr, typename _Arg> struct __result_of_memobj_deref : private __result_of_memobj_deref_impl { typedef decltype(_S_test<_MemPtr, _Arg>(0)) type; }; template<typename _MemPtr, typename _Arg> struct __result_of_memobj; template<typename _Res, typename _Class, typename _Arg> struct __result_of_memobj<_Res _Class::*, _Arg> { typedef __remove_cvref_t<_Arg> _Argval; typedef _Res _Class::* _MemPtr; typedef typename conditional<__or_<is_same<_Argval, _Class>, is_base_of<_Class, _Argval>>::value, __result_of_memobj_ref<_MemPtr, _Arg>, __result_of_memobj_deref<_MemPtr, _Arg> >::type::type type; }; template<typename _MemPtr, typename _Arg, typename... _Args> struct __result_of_memfun; template<typename _Res, typename _Class, typename _Arg, typename... _Args> struct __result_of_memfun<_Res _Class::*, _Arg, _Args...> { typedef typename remove_reference<_Arg>::type _Argval; typedef _Res _Class::* _MemPtr; typedef typename conditional<is_base_of<_Class, _Argval>::value, __result_of_memfun_ref<_MemPtr, _Arg, _Args...>, __result_of_memfun_deref<_MemPtr, _Arg, _Args...> >::type::type type; }; // _GLIBCXX_RESOLVE_LIB_DEFECTS // 2219. INVOKE-ing a pointer to member with a reference_wrapper // as the object expression // Used by result_of, invoke etc. to unwrap a reference_wrapper. template<typename _Tp, typename _Up = __remove_cvref_t<_Tp>> struct __inv_unwrap { using type = _Tp; }; template<typename _Tp, typename _Up> struct __inv_unwrap<_Tp, reference_wrapper<_Up>> { using type = _Up&; }; template<bool, bool, typename _Functor, typename... _ArgTypes> struct __result_of_impl { typedef __failure_type type; }; template<typename _MemPtr, typename _Arg> struct __result_of_impl<true, false, _MemPtr, _Arg> : public __result_of_memobj<typename decay<_MemPtr>::type, typename __inv_unwrap<_Arg>::type> { }; template<typename _MemPtr, typename _Arg, typename... _Args> struct __result_of_impl<false, true, _MemPtr, _Arg, _Args...> : public __result_of_memfun<typename decay<_MemPtr>::type, typename __inv_unwrap<_Arg>::type, _Args...> { }; // [func.require] paragraph 1 bullet 5: struct __result_of_other_impl { template<typename _Fn, typename... _Args> static __result_of_success<decltype( std::declval<_Fn>()(std::declval<_Args>()...) ), __invoke_other> _S_test(int); template<typename...> static __failure_type _S_test(...); }; template<typename _Functor, typename... _ArgTypes> struct __result_of_impl<false, false, _Functor, _ArgTypes...> : private __result_of_other_impl { typedef decltype(_S_test<_Functor, _ArgTypes...>(0)) type; }; // __invoke_result (std::invoke_result for C++11) template<typename _Functor, typename... _ArgTypes> struct __invoke_result : public __result_of_impl< is_member_object_pointer< typename remove_reference<_Functor>::type >::value, is_member_function_pointer< typename remove_reference<_Functor>::type >::value, _Functor, _ArgTypes... >::type { }; template<typename _Functor, typename... _ArgTypes> struct result_of<_Functor(_ArgTypes...)> : public __invoke_result<_Functor, _ArgTypes...> { }; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201402L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 2364 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 /// Alias template for aligned_storage template<size_t _Len, size_t _Align = __alignof__(typename __aligned_storage_msa<_Len>::__type)> using aligned_storage_t = typename aligned_storage<_Len, _Align>::type; template <size_t _Len, typename... _Types> using aligned_union_t = typename aligned_union<_Len, _Types...>::type; /// Alias template for decay template<typename _Tp> using decay_t = typename decay<_Tp>::type; /// Alias template for enable_if template<bool _Cond, typename _Tp = void> using enable_if_t = typename enable_if<_Cond, _Tp>::type; /// Alias template for conditional template<bool _Cond, typename _Iftrue, typename _Iffalse> using conditional_t = typename conditional<_Cond, _Iftrue, _Iffalse>::type; /// Alias template for common_type template<typename... _Tp> using common_type_t = typename common_type<_Tp...>::type; /// Alias template for underlying_type template<typename _Tp> using underlying_type_t = typename underlying_type<_Tp>::type; /// Alias template for result_of template<typename _Tp> using result_of_t = typename result_of<_Tp>::type; #endif // C++14 # 2396 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 // __enable_if_t (std::enable_if_t for C++11) template<bool _Cond, typename _Tp = void> using __enable_if_t = typename enable_if<_Cond, _Tp>::type; // __void_t (std::void_t for C++11) template<typename...> using __void_t = void; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L || !defined(__STRICT_ANSI__) // c++17 or gnu++11 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 2405 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 #define __cpp_lib_void_t 201411 /// A metafunction that always yields void, used for detecting valid types. template<typename...> using void_t = void; #endif # 2409 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 /// Implementation of the detection idiom (negative case). template<typename _Default, typename _AlwaysVoid, template<typename...> class _Op, typename... _Args> struct __detector { using value_t = false_type; using type = _Default; }; /// Implementation of the detection idiom (positive case). template<typename _Default, template<typename...> class _Op, typename... _Args> struct __detector<_Default, __void_t<_Op<_Args...>>, _Op, _Args...> { using value_t = true_type; using type = _Op<_Args...>; }; // Detect whether _Op<_Args...> is a valid type, use _Default if not. template<typename _Default, template<typename...> class _Op, typename... _Args> using __detected_or = __detector<_Default, void, _Op, _Args...>; // _Op<_Args...> if that is a valid type, otherwise _Default. template<typename _Default, template<typename...> class _Op, typename... _Args> using __detected_or_t = typename __detected_or<_Default, _Op, _Args...>::type; /// @} group metaprogramming /** * Use SFINAE to determine if the type _Tp has a publicly-accessible * member type _NTYPE. */ #define _GLIBCXX_HAS_NESTED_TYPE(_NTYPE) \ template<typename _Tp, typename = __void_t<>> \ struct __has_##_NTYPE \ : false_type \ { }; \ template<typename _Tp> \ struct __has_##_NTYPE<_Tp, __void_t<typename _Tp::_NTYPE>> \ : true_type \ { }; template <typename _Tp> struct __is_swappable; template <typename _Tp> struct __is_nothrow_swappable; template<typename... _Elements> class tuple; template<typename> struct __is_tuple_like_impl : false_type { }; template<typename... _Tps> struct __is_tuple_like_impl<tuple<_Tps...>> : true_type { }; // Internal type trait that allows us to sfinae-protect tuple_cat. template<typename _Tp> struct __is_tuple_like : public __is_tuple_like_impl<__remove_cvref_t<_Tp>>::type { }; template<typename _Tp> inline typename enable_if<__and_<__not_<__is_tuple_like<_Tp>>, is_move_constructible<_Tp>, is_move_assignable<_Tp>>::value>::type swap(_Tp&, _Tp&) noexcept(__and_<is_nothrow_move_constructible<_Tp>, is_nothrow_move_assignable<_Tp>>::value); template<typename _Tp, size_t _Nm> inline typename enable_if<__is_swappable<_Tp>::value>::type swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) noexcept(__is_nothrow_swappable<_Tp>::value); namespace __swappable_details { using std::swap; struct __do_is_swappable_impl { template<typename _Tp, typename = decltype(swap(std::declval<_Tp&>(), std::declval<_Tp&>()))> static true_type __test(int); template<typename> static false_type __test(...); }; struct __do_is_nothrow_swappable_impl { template<typename _Tp> static __bool_constant< noexcept(swap(std::declval<_Tp&>(), std::declval<_Tp&>())) > __test(int); template<typename> static false_type __test(...); }; } // namespace __swappable_details template<typename _Tp> struct __is_swappable_impl : public __swappable_details::__do_is_swappable_impl { typedef decltype(__test<_Tp>(0)) type; }; template<typename _Tp> struct __is_nothrow_swappable_impl : public __swappable_details::__do_is_nothrow_swappable_impl { typedef decltype(__test<_Tp>(0)) type; }; template<typename _Tp> struct __is_swappable : public __is_swappable_impl<_Tp>::type { }; template<typename _Tp> struct __is_nothrow_swappable : public __is_nothrow_swappable_impl<_Tp>::type { }; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 2544 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 #define __cpp_lib_is_swappable 201603 /// Metafunctions used for detecting swappable types: p0185r1 /// is_swappable template<typename _Tp> struct is_swappable : public __is_swappable_impl<_Tp>::type { }; /// is_nothrow_swappable template<typename _Tp> struct is_nothrow_swappable : public __is_nothrow_swappable_impl<_Tp>::type { }; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201402L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 2560 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 /// is_swappable_v template<typename _Tp> _GLIBCXX17_INLINE constexpr bool is_swappable_v = is_swappable<_Tp>::value; /// is_nothrow_swappable_v template<typename _Tp> _GLIBCXX17_INLINE constexpr bool is_nothrow_swappable_v = is_nothrow_swappable<_Tp>::value; #endif // __cplusplus >= 201402L # 2570 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 namespace __swappable_with_details { using std::swap; struct __do_is_swappable_with_impl { template<typename _Tp, typename _Up, typename = decltype(swap(std::declval<_Tp>(), std::declval<_Up>())), typename = decltype(swap(std::declval<_Up>(), std::declval<_Tp>()))> static true_type __test(int); template<typename, typename> static false_type __test(...); }; struct __do_is_nothrow_swappable_with_impl { template<typename _Tp, typename _Up> static __bool_constant< noexcept(swap(std::declval<_Tp>(), std::declval<_Up>())) && noexcept(swap(std::declval<_Up>(), std::declval<_Tp>())) > __test(int); template<typename, typename> static false_type __test(...); }; } // namespace __swappable_with_details template<typename _Tp, typename _Up> struct __is_swappable_with_impl : public __swappable_with_details::__do_is_swappable_with_impl { typedef decltype(__test<_Tp, _Up>(0)) type; }; // Optimization for the homogenous lvalue case, not required: template<typename _Tp> struct __is_swappable_with_impl<_Tp&, _Tp&> : public __swappable_details::__do_is_swappable_impl { typedef decltype(__test<_Tp&>(0)) type; }; template<typename _Tp, typename _Up> struct __is_nothrow_swappable_with_impl : public __swappable_with_details::__do_is_nothrow_swappable_with_impl { typedef decltype(__test<_Tp, _Up>(0)) type; }; // Optimization for the homogenous lvalue case, not required: template<typename _Tp> struct __is_nothrow_swappable_with_impl<_Tp&, _Tp&> : public __swappable_details::__do_is_nothrow_swappable_impl { typedef decltype(__test<_Tp&>(0)) type; }; /// is_swappable_with template<typename _Tp, typename _Up> struct is_swappable_with : public __is_swappable_with_impl<_Tp, _Up>::type { }; /// is_nothrow_swappable_with template<typename _Tp, typename _Up> struct is_nothrow_swappable_with : public __is_nothrow_swappable_with_impl<_Tp, _Up>::type { }; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201402L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 2644 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 /// is_swappable_with_v template<typename _Tp, typename _Up> _GLIBCXX17_INLINE constexpr bool is_swappable_with_v = is_swappable_with<_Tp, _Up>::value; /// is_nothrow_swappable_with_v template<typename _Tp, typename _Up> _GLIBCXX17_INLINE constexpr bool is_nothrow_swappable_with_v = is_nothrow_swappable_with<_Tp, _Up>::value; #endif // __cplusplus >= 201402L # 2654 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 #endif// c++1z or gnu++11 # 2656 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 // __is_invocable (std::is_invocable for C++11) // The primary template is used for invalid INVOKE expressions. template<typename _Result, typename _Ret, bool = is_void<_Ret>::value, typename = void> struct __is_invocable_impl : false_type { }; // Used for valid INVOKE and INVOKE<void> expressions. template<typename _Result, typename _Ret> struct __is_invocable_impl<_Result, _Ret, /* is_void<_Ret> = */ true, __void_t<typename _Result::type>> : true_type { }; #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wctor-dtor-privacy" // Used for INVOKE<R> expressions to check the implicit conversion to R. template<typename _Result, typename _Ret> struct __is_invocable_impl<_Result, _Ret, /* is_void<_Ret> = */ false, __void_t<typename _Result::type>> { private: // The type of the INVOKE expression. // Unlike declval, this doesn't add_rvalue_reference. static typename _Result::type _S_get(); template<typename _Tp> static void _S_conv(_Tp); // This overload is viable if INVOKE(f, args...) can convert to _Tp. template<typename _Tp, typename = decltype(_S_conv<_Tp>(_S_get()))> static true_type _S_test(int); template<typename _Tp> static false_type _S_test(...); public: using type = decltype(_S_test<_Ret>(1)); }; #pragma GCC diagnostic pop template<typename _Fn, typename... _ArgTypes> struct __is_invocable : __is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, void>::type { }; template<typename _Fn, typename _Tp, typename... _Args> constexpr bool __call_is_nt(__invoke_memfun_ref) { using _Up = typename __inv_unwrap<_Tp>::type; return noexcept((std::declval<_Up>().*std::declval<_Fn>())( std::declval<_Args>()...)); } template<typename _Fn, typename _Tp, typename... _Args> constexpr bool __call_is_nt(__invoke_memfun_deref) { return noexcept(((*std::declval<_Tp>()).*std::declval<_Fn>())( std::declval<_Args>()...)); } template<typename _Fn, typename _Tp> constexpr bool __call_is_nt(__invoke_memobj_ref) { using _Up = typename __inv_unwrap<_Tp>::type; return noexcept(std::declval<_Up>().*std::declval<_Fn>()); } template<typename _Fn, typename _Tp> constexpr bool __call_is_nt(__invoke_memobj_deref) { return noexcept((*std::declval<_Tp>()).*std::declval<_Fn>()); } template<typename _Fn, typename... _Args> constexpr bool __call_is_nt(__invoke_other) { return noexcept(std::declval<_Fn>()(std::declval<_Args>()...)); } template<typename _Result, typename _Fn, typename... _Args> struct __call_is_nothrow : __bool_constant< std::__call_is_nt<_Fn, _Args...>(typename _Result::__invoke_type{}) > { }; template<typename _Fn, typename... _Args> using __call_is_nothrow_ = __call_is_nothrow<__invoke_result<_Fn, _Args...>, _Fn, _Args...>; // __is_nothrow_invocable (std::is_nothrow_invocable for C++11) template<typename _Fn, typename... _Args> struct __is_nothrow_invocable : __and_<__is_invocable<_Fn, _Args...>, __call_is_nothrow_<_Fn, _Args...>>::type { }; struct __nonesuch { __nonesuch() = delete; ~__nonesuch() = delete; __nonesuch(__nonesuch const&) = delete; void operator=(__nonesuch const&) = delete; }; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 2767 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 # define __cpp_lib_is_invocable 201703 /// std::invoke_result template<typename _Functor, typename... _ArgTypes> struct invoke_result : public __invoke_result<_Functor, _ArgTypes...> { }; /// std::invoke_result_t template<typename _Fn, typename... _Args> using invoke_result_t = typename invoke_result<_Fn, _Args...>::type; /// std::is_invocable template<typename _Fn, typename... _ArgTypes> struct is_invocable : __is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, void>::type { }; /// std::is_invocable_r template<typename _Ret, typename _Fn, typename... _ArgTypes> struct is_invocable_r : __is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, _Ret>::type { }; /// std::is_nothrow_invocable template<typename _Fn, typename... _ArgTypes> struct is_nothrow_invocable : __and_<__is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, void>, __call_is_nothrow_<_Fn, _ArgTypes...>>::type { }; template<typename _Result, typename _Ret, typename = void> struct __is_nt_invocable_impl : false_type { }; template<typename _Result, typename _Ret> struct __is_nt_invocable_impl<_Result, _Ret, __void_t<typename _Result::type>> : __or_<is_void<_Ret>, __and_<is_convertible<typename _Result::type, _Ret>, is_nothrow_constructible<_Ret, typename _Result::type>>> { }; /// std::is_nothrow_invocable_r template<typename _Ret, typename _Fn, typename... _ArgTypes> struct is_nothrow_invocable_r : __and_<__is_nt_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, _Ret>, __call_is_nothrow_<_Fn, _ArgTypes...>>::type { }; /// std::is_invocable_v template<typename _Fn, typename... _Args> inline constexpr bool is_invocable_v = is_invocable<_Fn, _Args...>::value; /// std::is_nothrow_invocable_v template<typename _Fn, typename... _Args> inline constexpr bool is_nothrow_invocable_v = is_nothrow_invocable<_Fn, _Args...>::value; /// std::is_invocable_r_v template<typename _Fn, typename... _Args> inline constexpr bool is_invocable_r_v = is_invocable_r<_Fn, _Args...>::value; /// std::is_nothrow_invocable_r_v template<typename _Fn, typename... _Args> inline constexpr bool is_nothrow_invocable_r_v = is_nothrow_invocable_r<_Fn, _Args...>::value; #endif // C++17 # 2835 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 2837 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 # define __cpp_lib_type_trait_variable_templates 201510L template <typename _Tp> inline constexpr bool is_void_v = is_void<_Tp>::value; template <typename _Tp> inline constexpr bool is_null_pointer_v = is_null_pointer<_Tp>::value; template <typename _Tp> inline constexpr bool is_integral_v = is_integral<_Tp>::value; template <typename _Tp> inline constexpr bool is_floating_point_v = is_floating_point<_Tp>::value; template <typename _Tp> inline constexpr bool is_array_v = is_array<_Tp>::value; template <typename _Tp> inline constexpr bool is_pointer_v = is_pointer<_Tp>::value; template <typename _Tp> inline constexpr bool is_lvalue_reference_v = is_lvalue_reference<_Tp>::value; template <typename _Tp> inline constexpr bool is_rvalue_reference_v = is_rvalue_reference<_Tp>::value; template <typename _Tp> inline constexpr bool is_member_object_pointer_v = is_member_object_pointer<_Tp>::value; template <typename _Tp> inline constexpr bool is_member_function_pointer_v = is_member_function_pointer<_Tp>::value; template <typename _Tp> inline constexpr bool is_enum_v = is_enum<_Tp>::value; template <typename _Tp> inline constexpr bool is_union_v = is_union<_Tp>::value; template <typename _Tp> inline constexpr bool is_class_v = is_class<_Tp>::value; template <typename _Tp> inline constexpr bool is_function_v = is_function<_Tp>::value; template <typename _Tp> inline constexpr bool is_reference_v = is_reference<_Tp>::value; template <typename _Tp> inline constexpr bool is_arithmetic_v = is_arithmetic<_Tp>::value; template <typename _Tp> inline constexpr bool is_fundamental_v = is_fundamental<_Tp>::value; template <typename _Tp> inline constexpr bool is_object_v = is_object<_Tp>::value; template <typename _Tp> inline constexpr bool is_scalar_v = is_scalar<_Tp>::value; template <typename _Tp> inline constexpr bool is_compound_v = is_compound<_Tp>::value; template <typename _Tp> inline constexpr bool is_member_pointer_v = is_member_pointer<_Tp>::value; template <typename _Tp> inline constexpr bool is_const_v = is_const<_Tp>::value; template <typename _Tp> inline constexpr bool is_volatile_v = is_volatile<_Tp>::value; template <typename _Tp> inline constexpr bool is_trivial_v = is_trivial<_Tp>::value; template <typename _Tp> inline constexpr bool is_trivially_copyable_v = is_trivially_copyable<_Tp>::value; template <typename _Tp> inline constexpr bool is_standard_layout_v = is_standard_layout<_Tp>::value; template <typename _Tp> inline constexpr bool is_pod_v = is_pod<_Tp>::value; template <typename _Tp> inline constexpr bool is_literal_type_v = is_literal_type<_Tp>::value; template <typename _Tp> inline constexpr bool is_empty_v = is_empty<_Tp>::value; template <typename _Tp> inline constexpr bool is_polymorphic_v = is_polymorphic<_Tp>::value; template <typename _Tp> inline constexpr bool is_abstract_v = is_abstract<_Tp>::value; template <typename _Tp> inline constexpr bool is_final_v = is_final<_Tp>::value; template <typename _Tp> inline constexpr bool is_signed_v = is_signed<_Tp>::value; template <typename _Tp> inline constexpr bool is_unsigned_v = is_unsigned<_Tp>::value; template <typename _Tp, typename... _Args> inline constexpr bool is_constructible_v = is_constructible<_Tp, _Args...>::value; template <typename _Tp> inline constexpr bool is_default_constructible_v = is_default_constructible<_Tp>::value; template <typename _Tp> inline constexpr bool is_copy_constructible_v = is_copy_constructible<_Tp>::value; template <typename _Tp> inline constexpr bool is_move_constructible_v = is_move_constructible<_Tp>::value; template <typename _Tp, typename _Up> inline constexpr bool is_assignable_v = is_assignable<_Tp, _Up>::value; template <typename _Tp> inline constexpr bool is_copy_assignable_v = is_copy_assignable<_Tp>::value; template <typename _Tp> inline constexpr bool is_move_assignable_v = is_move_assignable<_Tp>::value; template <typename _Tp> inline constexpr bool is_destructible_v = is_destructible<_Tp>::value; template <typename _Tp, typename... _Args> inline constexpr bool is_trivially_constructible_v = is_trivially_constructible<_Tp, _Args...>::value; template <typename _Tp> inline constexpr bool is_trivially_default_constructible_v = is_trivially_default_constructible<_Tp>::value; template <typename _Tp> inline constexpr bool is_trivially_copy_constructible_v = is_trivially_copy_constructible<_Tp>::value; template <typename _Tp> inline constexpr bool is_trivially_move_constructible_v = is_trivially_move_constructible<_Tp>::value; template <typename _Tp, typename _Up> inline constexpr bool is_trivially_assignable_v = is_trivially_assignable<_Tp, _Up>::value; template <typename _Tp> inline constexpr bool is_trivially_copy_assignable_v = is_trivially_copy_assignable<_Tp>::value; template <typename _Tp> inline constexpr bool is_trivially_move_assignable_v = is_trivially_move_assignable<_Tp>::value; template <typename _Tp> inline constexpr bool is_trivially_destructible_v = is_trivially_destructible<_Tp>::value; template <typename _Tp, typename... _Args> inline constexpr bool is_nothrow_constructible_v = is_nothrow_constructible<_Tp, _Args...>::value; template <typename _Tp> inline constexpr bool is_nothrow_default_constructible_v = is_nothrow_default_constructible<_Tp>::value; template <typename _Tp> inline constexpr bool is_nothrow_copy_constructible_v = is_nothrow_copy_constructible<_Tp>::value; template <typename _Tp> inline constexpr bool is_nothrow_move_constructible_v = is_nothrow_move_constructible<_Tp>::value; template <typename _Tp, typename _Up> inline constexpr bool is_nothrow_assignable_v = is_nothrow_assignable<_Tp, _Up>::value; template <typename _Tp> inline constexpr bool is_nothrow_copy_assignable_v = is_nothrow_copy_assignable<_Tp>::value; template <typename _Tp> inline constexpr bool is_nothrow_move_assignable_v = is_nothrow_move_assignable<_Tp>::value; template <typename _Tp> inline constexpr bool is_nothrow_destructible_v = is_nothrow_destructible<_Tp>::value; template <typename _Tp> inline constexpr bool has_virtual_destructor_v = has_virtual_destructor<_Tp>::value; template <typename _Tp> inline constexpr size_t alignment_of_v = alignment_of<_Tp>::value; template <typename _Tp> inline constexpr size_t rank_v = rank<_Tp>::value; template <typename _Tp, unsigned _Idx = 0> inline constexpr size_t extent_v = extent<_Tp, _Idx>::value; template <typename _Tp, typename _Up> inline constexpr bool is_same_v = is_same<_Tp, _Up>::value; template <typename _Base, typename _Derived> inline constexpr bool is_base_of_v = is_base_of<_Base, _Derived>::value; template <typename _From, typename _To> inline constexpr bool is_convertible_v = is_convertible<_From, _To>::value; #ifdef _GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP # define __cpp_lib_has_unique_object_representations 201606 /// has_unique_object_representations template<typename _Tp> struct has_unique_object_representations : bool_constant<__has_unique_object_representations( remove_cv_t<remove_all_extents_t<_Tp>> )> { }; template<typename _Tp> inline constexpr bool has_unique_object_representations_v = has_unique_object_representations<_Tp>::value; #endif # 3009 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 #ifdef _GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE # define __cpp_lib_is_aggregate 201703 /// is_aggregate template<typename _Tp> struct is_aggregate : bool_constant<__is_aggregate(remove_cv_t<_Tp>)> { }; /// is_aggregate_v template<typename _Tp> inline constexpr bool is_aggregate_v = is_aggregate<_Tp>::value; #endif # 3021 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 #endif // C++17 # 3022 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 3024 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 #define __cpp_lib_remove_cvref 201711L /// Remove references and cv-qualifiers. template<typename _Tp> struct remove_cvref { using type = __remove_cvref_t<_Tp>; }; template<typename _Tp> using remove_cvref_t = __remove_cvref_t<_Tp>; #define __cpp_lib_type_identity 201806L /// Identity metafunction. template<typename _Tp> struct type_identity { using type = _Tp; }; template<typename _Tp> using type_identity_t = typename type_identity<_Tp>::type; #define __cpp_lib_unwrap_ref 201811L /// Unwrap a reference_wrapper template<typename _Tp> struct unwrap_reference { using type = _Tp; }; template<typename _Tp> struct unwrap_reference<reference_wrapper<_Tp>> { using type = _Tp&; }; template<typename _Tp> using unwrap_reference_t = typename unwrap_reference<_Tp>::type; /// Decay type and if it's a reference_wrapper, unwrap it template<typename _Tp> struct unwrap_ref_decay { using type = unwrap_reference_t<decay_t<_Tp>>; }; template<typename _Tp> using unwrap_ref_decay_t = typename unwrap_ref_decay<_Tp>::type; #define __cpp_lib_bounded_array_traits 201902L /// True for a type that is an array of known bound. template<typename _Tp> struct is_bounded_array : public __is_array_known_bounds<_Tp> { }; /// True for a type that is an array of unknown bound. template<typename _Tp> struct is_unbounded_array : public __is_array_unknown_bounds<_Tp> { }; template<typename _Tp> inline constexpr bool is_bounded_array_v = is_bounded_array<_Tp>::value; template<typename _Tp> inline constexpr bool is_unbounded_array_v = is_unbounded_array<_Tp>::value; #ifdef _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED #define __cpp_lib_is_constant_evaluated 201811L constexpr inline bool is_constant_evaluated() noexcept { return __builtin_is_constant_evaluated(); } #endif # 3093 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 #endif // C++2a # 3095 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 _GLIBCXX_END_NAMESPACE_VERSION } // namespace std #endif // C++11 # 3100 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 #endif // _GLIBCXX_TYPE_TRAITS # 3102 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits" 3 # 56 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/move.h" 2 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @addtogroup utilities * @{ */ /** * @brief Forward an lvalue. * @return The parameter cast to the specified type. * * This function is used to implement "perfect forwarding". */ template<typename _Tp> constexpr _Tp&& forward(typename std::remove_reference<_Tp>::type& __t) noexcept { return static_cast<_Tp&&>(__t); } /** * @brief Forward an rvalue. * @return The parameter cast to the specified type. * * This function is used to implement "perfect forwarding". */ template<typename _Tp> constexpr _Tp&& forward(typename std::remove_reference<_Tp>::type&& __t) noexcept { static_assert(!std::is_lvalue_reference<_Tp>::value, "template argument" " substituting _Tp is an lvalue reference type"); return static_cast<_Tp&&>(__t); } /** * @brief Convert a value to an rvalue. * @param __t A thing of arbitrary type. * @return The parameter cast to an rvalue-reference to allow moving it. */ template<typename _Tp> constexpr typename std::remove_reference<_Tp>::type&& move(_Tp&& __t) noexcept { return static_cast<typename std::remove_reference<_Tp>::type&&>(__t); } template<typename _Tp> struct __move_if_noexcept_cond : public __and_<__not_<is_nothrow_move_constructible<_Tp>>, is_copy_constructible<_Tp>>::type { }; /** * @brief Conditionally convert a value to an rvalue. * @param __x A thing of arbitrary type. * @return The parameter, possibly cast to an rvalue-reference. * * Same as std::move unless the type's move constructor could throw and the * type is copyable, in which case an lvalue-reference is returned instead. */ template<typename _Tp> constexpr typename conditional<__move_if_noexcept_cond<_Tp>::value, const _Tp&, _Tp&&>::type move_if_noexcept(_Tp& __x) noexcept { return std::move(__x); } // declval, from type_traits. #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201402L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 125 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/move.h" 3 // _GLIBCXX_RESOLVE_LIB_DEFECTS // 2296. std::addressof should be constexpr # define __cpp_lib_addressof_constexpr 201603 #endif # 129 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/move.h" 3 /** * @brief Returns the actual address of the object or function * referenced by r, even in the presence of an overloaded * operator&. * @param __r Reference to an object or function. * @return The actual address. */ template<typename _Tp> inline _GLIBCXX17_CONSTEXPR _Tp* addressof(_Tp& __r) noexcept { return std::__addressof(__r); } // _GLIBCXX_RESOLVE_LIB_DEFECTS // 2598. addressof works on temporaries template<typename _Tp> const _Tp* addressof(const _Tp&&) = delete; // C++11 version of std::exchange for internal use. template <typename _Tp, typename _Up = _Tp> inline _Tp __exchange(_Tp& __obj, _Up&& __new_val) { _Tp __old_val = std::move(__obj); __obj = std::forward<_Up>(__new_val); return __old_val; } /// @} group utilities #define _GLIBCXX_MOVE(__val) std::move(__val) #define _GLIBCXX_FORWARD(_Tp, __val) std::forward<_Tp>(__val) #else # 161 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/move.h" 3 #define _GLIBCXX_MOVE(__val) (__val) #define _GLIBCXX_FORWARD(_Tp, __val) (__val) #endif # 164 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/move.h" 3 /** * @addtogroup utilities * @{ */ /** * @brief Swaps two values. * @param __a A thing of arbitrary type. * @param __b Another thing of arbitrary type. * @return Nothing. */ template<typename _Tp> inline #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 179 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/move.h" 3 typename enable_if<__and_<__not_<__is_tuple_like<_Tp>>, is_move_constructible<_Tp>, is_move_assignable<_Tp>>::value>::type swap(_Tp& __a, _Tp& __b) noexcept(__and_<is_nothrow_move_constructible<_Tp>, is_nothrow_move_assignable<_Tp>>::value) #else # 186 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/move.h" 3 void swap(_Tp& __a, _Tp& __b) #endif # 189 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/move.h" 3 { // concept requirements __glibcxx_function_requires(_SGIAssignableConcept<_Tp>) _Tp __tmp = _GLIBCXX_MOVE(__a); __a = _GLIBCXX_MOVE(__b); __b = _GLIBCXX_MOVE(__tmp); } // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR 809. std::swap should be overloaded for array types. /// Swap the contents of two arrays. template<typename _Tp, size_t _Nm> inline #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 204 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/move.h" 3 typename enable_if<__is_swappable<_Tp>::value>::type swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) noexcept(__is_nothrow_swappable<_Tp>::value) #else # 208 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/move.h" 3 void swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) #endif # 211 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/move.h" 3 { for (size_t __n = 0; __n < _Nm; ++__n) swap(__a[__n], __b[__n]); } /// @} group utilities _GLIBCXX_END_NAMESPACE_VERSION } // namespace #endif /* _MOVE_H */ # 221 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/move.h" 3 # 60 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_pair.h" 2 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 62 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_pair.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <type_traits> // for std::__decay_and_strip too #endif /* expanded by -frewrite-includes */ # 62 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_pair.h" 3 # 63 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_pair.h" 3 #endif # 64 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_pair.h" 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @addtogroup utilities * @{ */ #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 75 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_pair.h" 3 /// piecewise_construct_t struct piecewise_construct_t { explicit piecewise_construct_t() = default; }; /// piecewise_construct _GLIBCXX17_INLINE constexpr piecewise_construct_t piecewise_construct = piecewise_construct_t(); // Forward declarations. template<typename...> class tuple; template<std::size_t...> struct _Index_tuple; // Concept utility functions, reused in conditionally-explicit // constructors. // See PR 70437, don't look at is_constructible or // is_convertible if the types are the same to // avoid querying those properties for incomplete types. template <bool, typename _T1, typename _T2> struct _PCC { template <typename _U1, typename _U2> static constexpr bool _ConstructiblePair() { return __and_<is_constructible<_T1, const _U1&>, is_constructible<_T2, const _U2&>>::value; } template <typename _U1, typename _U2> static constexpr bool _ImplicitlyConvertiblePair() { return __and_<is_convertible<const _U1&, _T1>, is_convertible<const _U2&, _T2>>::value; } template <typename _U1, typename _U2> static constexpr bool _MoveConstructiblePair() { return __and_<is_constructible<_T1, _U1&&>, is_constructible<_T2, _U2&&>>::value; } template <typename _U1, typename _U2> static constexpr bool _ImplicitlyMoveConvertiblePair() { return __and_<is_convertible<_U1&&, _T1>, is_convertible<_U2&&, _T2>>::value; } template <bool __implicit, typename _U1, typename _U2> static constexpr bool _CopyMovePair() { using __do_converts = __and_<is_convertible<const _U1&, _T1>, is_convertible<_U2&&, _T2>>; using __converts = typename conditional<__implicit, __do_converts, __not_<__do_converts>>::type; return __and_<is_constructible<_T1, const _U1&>, is_constructible<_T2, _U2&&>, __converts >::value; } template <bool __implicit, typename _U1, typename _U2> static constexpr bool _MoveCopyPair() { using __do_converts = __and_<is_convertible<_U1&&, _T1>, is_convertible<const _U2&, _T2>>; using __converts = typename conditional<__implicit, __do_converts, __not_<__do_converts>>::type; return __and_<is_constructible<_T1, _U1&&>, is_constructible<_T2, const _U2&&>, __converts >::value; } }; template <typename _T1, typename _T2> struct _PCC<false, _T1, _T2> { template <typename _U1, typename _U2> static constexpr bool _ConstructiblePair() { return false; } template <typename _U1, typename _U2> static constexpr bool _ImplicitlyConvertiblePair() { return false; } template <typename _U1, typename _U2> static constexpr bool _MoveConstructiblePair() { return false; } template <typename _U1, typename _U2> static constexpr bool _ImplicitlyMoveConvertiblePair() { return false; } }; // PR libstdc++/79141, a utility type for preventing // initialization of an argument of a disabled assignment // operator from a pair of empty braces. struct __nonesuch_no_braces : std::__nonesuch { explicit __nonesuch_no_braces(const __nonesuch&) = delete; }; #endif // C++11 # 189 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_pair.h" 3 template<typename _U1, typename _U2> class __pair_base { #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 193 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_pair.h" 3 template<typename _T1, typename _T2> friend struct pair; __pair_base() = default; ~__pair_base() = default; __pair_base(const __pair_base&) = default; __pair_base& operator=(const __pair_base&) = delete; #endif // C++11 # 199 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_pair.h" 3 }; /** * @brief Struct holding two objects of arbitrary type. * * @tparam _T1 Type of first object. * @tparam _T2 Type of second object. */ template<typename _T1, typename _T2> struct pair : private __pair_base<_T1, _T2> { typedef _T1 first_type; /// @c first_type is the first bound type typedef _T2 second_type; /// @c second_type is the second bound type _T1 first; /// @c first is a copy of the first object _T2 second; /// @c second is a copy of the second object // _GLIBCXX_RESOLVE_LIB_DEFECTS // 265. std::pair::pair() effects overly restrictive /** The default constructor creates @c first and @c second using their * respective default constructors. */ #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 222 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_pair.h" 3 template <typename _U1 = _T1, typename _U2 = _T2, typename enable_if<__and_< __is_implicitly_default_constructible<_U1>, __is_implicitly_default_constructible<_U2>> ::value, bool>::type = true> #endif # 229 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_pair.h" 3 _GLIBCXX_CONSTEXPR pair() : first(), second() { } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 233 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_pair.h" 3 template <typename _U1 = _T1, typename _U2 = _T2, typename enable_if<__and_< is_default_constructible<_U1>, is_default_constructible<_U2>, __not_< __and_<__is_implicitly_default_constructible<_U1>, __is_implicitly_default_constructible<_U2>>>> ::value, bool>::type = false> explicit constexpr pair() : first(), second() { } #endif # 245 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_pair.h" 3 /** Two objects may be passed to a @c pair constructor to be copied. */ #if 0 /* disabled by -frewrite-includes */ #if __cplusplus < 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 248 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_pair.h" 3 pair(const _T1& __a, const _T2& __b) : first(__a), second(__b) { } #else # 251 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_pair.h" 3 // Shortcut for constraining the templates that don't take pairs. using _PCCP = _PCC<true, _T1, _T2>; template<typename _U1 = _T1, typename _U2=_T2, typename enable_if<_PCCP::template _ConstructiblePair<_U1, _U2>() && _PCCP::template _ImplicitlyConvertiblePair<_U1, _U2>(), bool>::type=true> constexpr pair(const _T1& __a, const _T2& __b) : first(__a), second(__b) { } template<typename _U1 = _T1, typename _U2=_T2, typename enable_if<_PCCP::template _ConstructiblePair<_U1, _U2>() && !_PCCP::template _ImplicitlyConvertiblePair<_U1, _U2>(), bool>::type=false> explicit constexpr pair(const _T1& __a, const _T2& __b) : first(__a), second(__b) { } #endif # 272 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_pair.h" 3 /** There is also a templated copy ctor for the @c pair class itself. */ #if 0 /* disabled by -frewrite-includes */ #if __cplusplus < 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 275 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_pair.h" 3 template<typename _U1, typename _U2> pair(const pair<_U1, _U2>& __p) : first(__p.first), second(__p.second) { } #else # 279 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_pair.h" 3 // Shortcut for constraining the templates that take pairs. template <typename _U1, typename _U2> using _PCCFP = _PCC<!is_same<_T1, _U1>::value || !is_same<_T2, _U2>::value, _T1, _T2>; template<typename _U1, typename _U2, typename enable_if<_PCCFP<_U1, _U2>::template _ConstructiblePair<_U1, _U2>() && _PCCFP<_U1, _U2>::template _ImplicitlyConvertiblePair<_U1, _U2>(), bool>::type=true> constexpr pair(const pair<_U1, _U2>& __p) : first(__p.first), second(__p.second) { } template<typename _U1, typename _U2, typename enable_if<_PCCFP<_U1, _U2>::template _ConstructiblePair<_U1, _U2>() && !_PCCFP<_U1, _U2>::template _ImplicitlyConvertiblePair<_U1, _U2>(), bool>::type=false> explicit constexpr pair(const pair<_U1, _U2>& __p) : first(__p.first), second(__p.second) { } constexpr pair(const pair&) = default; constexpr pair(pair&&) = default; // DR 811. template<typename _U1, typename enable_if<_PCCP::template _MoveCopyPair<true, _U1, _T2>(), bool>::type=true> constexpr pair(_U1&& __x, const _T2& __y) : first(std::forward<_U1>(__x)), second(__y) { } template<typename _U1, typename enable_if<_PCCP::template _MoveCopyPair<false, _U1, _T2>(), bool>::type=false> explicit constexpr pair(_U1&& __x, const _T2& __y) : first(std::forward<_U1>(__x)), second(__y) { } template<typename _U2, typename enable_if<_PCCP::template _CopyMovePair<true, _T1, _U2>(), bool>::type=true> constexpr pair(const _T1& __x, _U2&& __y) : first(__x), second(std::forward<_U2>(__y)) { } template<typename _U2, typename enable_if<_PCCP::template _CopyMovePair<false, _T1, _U2>(), bool>::type=false> explicit pair(const _T1& __x, _U2&& __y) : first(__x), second(std::forward<_U2>(__y)) { } template<typename _U1, typename _U2, typename enable_if<_PCCP::template _MoveConstructiblePair<_U1, _U2>() && _PCCP::template _ImplicitlyMoveConvertiblePair<_U1, _U2>(), bool>::type=true> constexpr pair(_U1&& __x, _U2&& __y) : first(std::forward<_U1>(__x)), second(std::forward<_U2>(__y)) { } template<typename _U1, typename _U2, typename enable_if<_PCCP::template _MoveConstructiblePair<_U1, _U2>() && !_PCCP::template _ImplicitlyMoveConvertiblePair<_U1, _U2>(), bool>::type=false> explicit constexpr pair(_U1&& __x, _U2&& __y) : first(std::forward<_U1>(__x)), second(std::forward<_U2>(__y)) { } template<typename _U1, typename _U2, typename enable_if<_PCCFP<_U1, _U2>::template _MoveConstructiblePair<_U1, _U2>() && _PCCFP<_U1, _U2>::template _ImplicitlyMoveConvertiblePair<_U1, _U2>(), bool>::type=true> constexpr pair(pair<_U1, _U2>&& __p) : first(std::forward<_U1>(__p.first)), second(std::forward<_U2>(__p.second)) { } template<typename _U1, typename _U2, typename enable_if<_PCCFP<_U1, _U2>::template _MoveConstructiblePair<_U1, _U2>() && !_PCCFP<_U1, _U2>::template _ImplicitlyMoveConvertiblePair<_U1, _U2>(), bool>::type=false> explicit constexpr pair(pair<_U1, _U2>&& __p) : first(std::forward<_U1>(__p.first)), second(std::forward<_U2>(__p.second)) { } template<typename... _Args1, typename... _Args2> pair(piecewise_construct_t, tuple<_Args1...>, tuple<_Args2...>); pair& operator=(typename conditional< __and_<is_copy_assignable<_T1>, is_copy_assignable<_T2>>::value, const pair&, const __nonesuch_no_braces&>::type __p) { first = __p.first; second = __p.second; return *this; } pair& operator=(typename conditional< __and_<is_move_assignable<_T1>, is_move_assignable<_T2>>::value, pair&&, __nonesuch_no_braces&&>::type __p) noexcept(__and_<is_nothrow_move_assignable<_T1>, is_nothrow_move_assignable<_T2>>::value) { first = std::forward<first_type>(__p.first); second = std::forward<second_type>(__p.second); return *this; } template<typename _U1, typename _U2> typename enable_if<__and_<is_assignable<_T1&, const _U1&>, is_assignable<_T2&, const _U2&>>::value, pair&>::type operator=(const pair<_U1, _U2>& __p) { first = __p.first; second = __p.second; return *this; } template<typename _U1, typename _U2> typename enable_if<__and_<is_assignable<_T1&, _U1&&>, is_assignable<_T2&, _U2&&>>::value, pair&>::type operator=(pair<_U1, _U2>&& __p) { first = std::forward<_U1>(__p.first); second = std::forward<_U2>(__p.second); return *this; } void swap(pair& __p) noexcept(__and_<__is_nothrow_swappable<_T1>, __is_nothrow_swappable<_T2>>::value) { using std::swap; swap(first, __p.first); swap(second, __p.second); } private: template<typename... _Args1, std::size_t... _Indexes1, typename... _Args2, std::size_t... _Indexes2> pair(tuple<_Args1...>&, tuple<_Args2...>&, _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>); #endif # 439 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_pair.h" 3 }; #if 0 /* disabled by -frewrite-includes */ #if __cpp_deduction_guides >= 201606 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 442 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_pair.h" 3 template<typename _T1, typename _T2> pair(_T1, _T2) -> pair<_T1, _T2>; #endif # 444 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_pair.h" 3 /// Two pairs of the same type are equal iff their members are equal. template<typename _T1, typename _T2> inline _GLIBCXX_CONSTEXPR bool operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { return __x.first == __y.first && __x.second == __y.second; } /// <http://gcc.gnu.org/onlinedocs/libstdc++/manual/utilities.html> template<typename _T1, typename _T2> inline _GLIBCXX_CONSTEXPR bool operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { return __x.first < __y.first || (!(__y.first < __x.first) && __x.second < __y.second); } /// Uses @c operator== to find the result. template<typename _T1, typename _T2> inline _GLIBCXX_CONSTEXPR bool operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { return !(__x == __y); } /// Uses @c operator< to find the result. template<typename _T1, typename _T2> inline _GLIBCXX_CONSTEXPR bool operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { return __y < __x; } /// Uses @c operator< to find the result. template<typename _T1, typename _T2> inline _GLIBCXX_CONSTEXPR bool operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { return !(__y < __x); } /// Uses @c operator< to find the result. template<typename _T1, typename _T2> inline _GLIBCXX_CONSTEXPR bool operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { return !(__x < __y); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 483 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_pair.h" 3 /// See std::pair::swap(). // Note: no std::swap overloads in C++03 mode, this has performance // implications, see, eg, libstdc++/38466. template<typename _T1, typename _T2> inline #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 489 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_pair.h" 3 // Constrained free swap overload, see p0185r1 typename enable_if<__and_<__is_swappable<_T1>, __is_swappable<_T2>>::value>::type #else # 493 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_pair.h" 3 void #endif # 495 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_pair.h" 3 swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y) noexcept(noexcept(__x.swap(__y))) { __x.swap(__y); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 500 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_pair.h" 3 template<typename _T1, typename _T2> typename enable_if<!__and_<__is_swappable<_T1>, __is_swappable<_T2>>::value>::type swap(pair<_T1, _T2>&, pair<_T1, _T2>&) = delete; #endif # 505 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_pair.h" 3 #endif // __cplusplus >= 201103L # 506 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_pair.h" 3 /** * @brief A convenience wrapper for creating a pair from two objects. * @param __x The first object. * @param __y The second object. * @return A newly-constructed pair<> object of the appropriate type. * * The standard requires that the objects be passed by reference-to-const, * but LWG issue #181 says they should be passed by const value. We follow * the LWG by default. */ // _GLIBCXX_RESOLVE_LIB_DEFECTS // 181. make_pair() unintended behavior #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 520 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_pair.h" 3 // NB: DR 706. template<typename _T1, typename _T2> constexpr pair<typename __decay_and_strip<_T1>::__type, typename __decay_and_strip<_T2>::__type> make_pair(_T1&& __x, _T2&& __y) { typedef typename __decay_and_strip<_T1>::__type __ds_type1; typedef typename __decay_and_strip<_T2>::__type __ds_type2; typedef pair<__ds_type1, __ds_type2> __pair_type; return __pair_type(std::forward<_T1>(__x), std::forward<_T2>(__y)); } #else # 532 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_pair.h" 3 template<typename _T1, typename _T2> inline pair<_T1, _T2> make_pair(_T1 __x, _T2 __y) { return pair<_T1, _T2>(__x, __y); } #endif # 537 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_pair.h" 3 /// @} _GLIBCXX_END_NAMESPACE_VERSION } // namespace std #endif /* _STL_PAIR_H */ # 544 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_pair.h" 3 # 65 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/stl_iterator_base_types.h> #endif /* expanded by -frewrite-includes */ # 65 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator_base_types.h" 1 3 // Types used in iterator implementation -*- C++ -*- // Copyright (C) 2001-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /* * * Copyright (c) 1994 * Hewlett-Packard Company * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Hewlett-Packard Company makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. * * * Copyright (c) 1996-1998 * Silicon Graphics Computer Systems, Inc. * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Silicon Graphics makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. */ /** @file bits/stl_iterator_base_types.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{iterator} * * This file contains all of the general iterator-related utility types, * such as iterator_traits and struct iterator. */ #ifndef _STL_ITERATOR_BASE_TYPES_H #define _STL_ITERATOR_BASE_TYPES_H 1 #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 63 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator_base_types.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/c++config.h> #endif /* expanded by -frewrite-includes */ # 64 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator_base_types.h" 3 # 65 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator_base_types.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 67 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator_base_types.h" 3 #if 0 /* expanded by -frewrite-includes */ # include <type_traits> // For __void_t, is_convertible #endif /* expanded by -frewrite-includes */ # 67 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator_base_types.h" 3 # 68 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator_base_types.h" 3 #endif # 69 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator_base_types.h" 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @defgroup iterators Iterators * Abstractions for uniform iterating through various underlying types. */ ///@{ /** * @defgroup iterator_tags Iterator Tags * These are empty types, used to distinguish different iterators. The * distinction is not made by what they contain, but simply by what they * are. Different underlying algorithms can then be used based on the * different operations supported by different iterator types. */ ///@{ /// Marking input iterators. struct input_iterator_tag { }; /// Marking output iterators. struct output_iterator_tag { }; /// Forward iterators support a superset of input iterator operations. struct forward_iterator_tag : public input_iterator_tag { }; /// Bidirectional iterators support a superset of forward iterator /// operations. struct bidirectional_iterator_tag : public forward_iterator_tag { }; /// Random-access iterators support a superset of bidirectional /// iterator operations. struct random_access_iterator_tag : public bidirectional_iterator_tag { }; ///@} /** * @brief Common %iterator class. * * This class does nothing but define nested typedefs. %Iterator classes * can inherit from this class to save some work. The typedefs are then * used in specializations and overloading. * * In particular, there are no default implementations of requirements * such as @c operator++ and the like. (How could there be?) */ template<typename _Category, typename _Tp, typename _Distance = ptrdiff_t, typename _Pointer = _Tp*, typename _Reference = _Tp&> struct iterator { /// One of the @link iterator_tags tag types@endlink. typedef _Category iterator_category; /// The type "pointed to" by the iterator. typedef _Tp value_type; /// Distance between iterators is represented as this type. typedef _Distance difference_type; /// This type represents a pointer-to-value_type. typedef _Pointer pointer; /// This type represents a reference-to-value_type. typedef _Reference reference; }; /** * @brief Traits class for iterators. * * This class does nothing but define nested typedefs. The general * version simply @a forwards the nested typedefs from the Iterator * argument. Specialized versions for pointers and pointers-to-const * provide tighter, more correct semantics. */ #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 141 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator_base_types.h" 3 // _GLIBCXX_RESOLVE_LIB_DEFECTS // 2408. SFINAE-friendly common_type/iterator_traits is missing in C++14 template<typename _Iterator, typename = __void_t<>> struct __iterator_traits { }; template<typename _Iterator> struct __iterator_traits<_Iterator, __void_t<typename _Iterator::iterator_category, typename _Iterator::value_type, typename _Iterator::difference_type, typename _Iterator::pointer, typename _Iterator::reference>> { typedef typename _Iterator::iterator_category iterator_category; typedef typename _Iterator::value_type value_type; typedef typename _Iterator::difference_type difference_type; typedef typename _Iterator::pointer pointer; typedef typename _Iterator::reference reference; }; template<typename _Iterator> struct iterator_traits : public __iterator_traits<_Iterator> { }; #else # 165 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator_base_types.h" 3 template<typename _Iterator> struct iterator_traits { typedef typename _Iterator::iterator_category iterator_category; typedef typename _Iterator::value_type value_type; typedef typename _Iterator::difference_type difference_type; typedef typename _Iterator::pointer pointer; typedef typename _Iterator::reference reference; }; #endif # 175 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator_base_types.h" 3 /// Partial specialization for pointer types. template<typename _Tp> struct iterator_traits<_Tp*> { typedef random_access_iterator_tag iterator_category; typedef _Tp value_type; typedef ptrdiff_t difference_type; typedef _Tp* pointer; typedef _Tp& reference; }; /// Partial specialization for const pointer types. template<typename _Tp> struct iterator_traits<const _Tp*> { typedef random_access_iterator_tag iterator_category; typedef _Tp value_type; typedef ptrdiff_t difference_type; typedef const _Tp* pointer; typedef const _Tp& reference; }; /** * This function is not a part of the C++ standard but is syntactic * sugar for internal library use only. */ template<typename _Iter> inline _GLIBCXX_CONSTEXPR typename iterator_traits<_Iter>::iterator_category __iterator_category(const _Iter&) { return typename iterator_traits<_Iter>::iterator_category(); } ///@} #if 0 /* disabled by -frewrite-includes */ #if __cplusplus < 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 211 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator_base_types.h" 3 // If _Iterator has a base returns it otherwise _Iterator is returned // untouched template<typename _Iterator, bool _HasBase> struct _Iter_base { typedef _Iterator iterator_type; static iterator_type _S_base(_Iterator __it) { return __it; } }; template<typename _Iterator> struct _Iter_base<_Iterator, true> { typedef typename _Iterator::iterator_type iterator_type; static iterator_type _S_base(_Iterator __it) { return __it.base(); } }; #endif # 229 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator_base_types.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 231 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator_base_types.h" 3 template<typename _InIter> using _RequireInputIter = typename enable_if<is_convertible<typename iterator_traits<_InIter>::iterator_category, input_iterator_tag>::value>::type; #endif # 237 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator_base_types.h" 3 _GLIBCXX_END_NAMESPACE_VERSION } // namespace #endif /* _STL_ITERATOR_BASE_TYPES_H */ # 242 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator_base_types.h" 3 # 66 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/stl_iterator_base_funcs.h> #endif /* expanded by -frewrite-includes */ # 66 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator_base_funcs.h" 1 3 // Functions used by iterators -*- C++ -*- // Copyright (C) 2001-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /* * * Copyright (c) 1994 * Hewlett-Packard Company * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Hewlett-Packard Company makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. * * * Copyright (c) 1996-1998 * Silicon Graphics Computer Systems, Inc. * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Silicon Graphics makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. */ /** @file bits/stl_iterator_base_funcs.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{iterator} * * This file contains all of the general iterator-related utility * functions, such as distance() and advance(). */ #ifndef _STL_ITERATOR_BASE_FUNCS_H #define _STL_ITERATOR_BASE_FUNCS_H 1 #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 63 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator_base_funcs.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/concept_check.h> #endif /* expanded by -frewrite-includes */ # 64 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator_base_funcs.h" 3 # 65 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator_base_funcs.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <debug/assertions.h> #endif /* expanded by -frewrite-includes */ # 65 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator_base_funcs.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/debug/assertions.h" 1 3 // Debugging support implementation -*- C++ -*- // Copyright (C) 2003-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file debug/assertions.h * This file is a GNU debug extension to the Standard C++ Library. */ #ifndef _GLIBCXX_DEBUG_ASSERTIONS_H #define _GLIBCXX_DEBUG_ASSERTIONS_H 1 #ifndef _GLIBCXX_DEBUG # define _GLIBCXX_DEBUG_ASSERT(_Condition) # define _GLIBCXX_DEBUG_PEDASSERT(_Condition) # define _GLIBCXX_DEBUG_ONLY(_Statement) #endif # 39 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/debug/assertions.h" 3 #ifndef _GLIBCXX_ASSERTIONS # define __glibcxx_requires_non_empty_range(_First,_Last) # define __glibcxx_requires_nonempty() # define __glibcxx_requires_subscript(_N) #else # 45 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/debug/assertions.h" 3 // Verify that [_First, _Last) forms a non-empty iterator range. # define __glibcxx_requires_non_empty_range(_First,_Last) \ __glibcxx_assert(__builtin_expect(_First != _Last, true)) # define __glibcxx_requires_subscript(_N) \ __glibcxx_assert(__builtin_expect(_N < this->size(), true)) // Verify that the container is nonempty # define __glibcxx_requires_nonempty() \ __glibcxx_assert(__builtin_expect(!this->empty(), true)) #endif # 55 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/debug/assertions.h" 3 #ifdef _GLIBCXX_DEBUG # define _GLIBCXX_DEBUG_ASSERT(_Condition) __glibcxx_assert(_Condition) # ifdef _GLIBCXX_DEBUG_PEDANTIC # define _GLIBCXX_DEBUG_PEDASSERT(_Condition) _GLIBCXX_DEBUG_ASSERT(_Condition) # else # 62 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/debug/assertions.h" 3 # define _GLIBCXX_DEBUG_PEDASSERT(_Condition) # endif # 64 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/debug/assertions.h" 3 # define _GLIBCXX_DEBUG_ONLY(_Statement) _Statement #endif # 67 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/debug/assertions.h" 3 #endif // _GLIBCXX_DEBUG_ASSERTIONS # 69 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/debug/assertions.h" 3 # 66 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator_base_funcs.h" 2 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_BEGIN_NAMESPACE_CONTAINER // Forward declaration for the overloads of __distance. template <typename> struct _List_iterator; template <typename> struct _List_const_iterator; _GLIBCXX_END_NAMESPACE_CONTAINER template<typename _InputIterator> inline _GLIBCXX14_CONSTEXPR typename iterator_traits<_InputIterator>::difference_type __distance(_InputIterator __first, _InputIterator __last, input_iterator_tag) { // concept requirements __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>) typename iterator_traits<_InputIterator>::difference_type __n = 0; while (__first != __last) { ++__first; ++__n; } return __n; } template<typename _RandomAccessIterator> inline _GLIBCXX14_CONSTEXPR typename iterator_traits<_RandomAccessIterator>::difference_type __distance(_RandomAccessIterator __first, _RandomAccessIterator __last, random_access_iterator_tag) { // concept requirements __glibcxx_function_requires(_RandomAccessIteratorConcept< _RandomAccessIterator>) return __last - __first; } #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_USE_CXX11_ABI #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 108 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator_base_funcs.h" 3 // Forward declaration because of the qualified call in distance. template<typename _Tp> ptrdiff_t __distance(_GLIBCXX_STD_C::_List_iterator<_Tp>, _GLIBCXX_STD_C::_List_iterator<_Tp>, input_iterator_tag); template<typename _Tp> ptrdiff_t __distance(_GLIBCXX_STD_C::_List_const_iterator<_Tp>, _GLIBCXX_STD_C::_List_const_iterator<_Tp>, input_iterator_tag); #endif # 121 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator_base_funcs.h" 3 /** * @brief A generalization of pointer arithmetic. * @param __first An input iterator. * @param __last An input iterator. * @return The distance between them. * * Returns @c n such that __first + n == __last. This requires * that @p __last must be reachable from @p __first. Note that @c * n may be negative. * * For random access iterators, this uses their @c + and @c - operations * and are constant time. For other %iterator classes they are linear time. */ template<typename _InputIterator> inline _GLIBCXX17_CONSTEXPR typename iterator_traits<_InputIterator>::difference_type distance(_InputIterator __first, _InputIterator __last) { // concept requirements -- taken care of in __distance return std::__distance(__first, __last, std::__iterator_category(__first)); } template<typename _InputIterator, typename _Distance> inline _GLIBCXX14_CONSTEXPR void __advance(_InputIterator& __i, _Distance __n, input_iterator_tag) { // concept requirements __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>) __glibcxx_assert(__n >= 0); while (__n--) ++__i; } template<typename _BidirectionalIterator, typename _Distance> inline _GLIBCXX14_CONSTEXPR void __advance(_BidirectionalIterator& __i, _Distance __n, bidirectional_iterator_tag) { // concept requirements __glibcxx_function_requires(_BidirectionalIteratorConcept< _BidirectionalIterator>) if (__n > 0) while (__n--) ++__i; else while (__n++) --__i; } template<typename _RandomAccessIterator, typename _Distance> inline _GLIBCXX14_CONSTEXPR void __advance(_RandomAccessIterator& __i, _Distance __n, random_access_iterator_tag) { // concept requirements __glibcxx_function_requires(_RandomAccessIteratorConcept< _RandomAccessIterator>) if (__builtin_constant_p(__n) && __n == 1) ++__i; else if (__builtin_constant_p(__n) && __n == -1) --__i; else __i += __n; } /** * @brief A generalization of pointer arithmetic. * @param __i An input iterator. * @param __n The @a delta by which to change @p __i. * @return Nothing. * * This increments @p i by @p n. For bidirectional and random access * iterators, @p __n may be negative, in which case @p __i is decremented. * * For random access iterators, this uses their @c + and @c - operations * and are constant time. For other %iterator classes they are linear time. */ template<typename _InputIterator, typename _Distance> inline _GLIBCXX17_CONSTEXPR void advance(_InputIterator& __i, _Distance __n) { // concept requirements -- taken care of in __advance typename iterator_traits<_InputIterator>::difference_type __d = __n; std::__advance(__i, __d, std::__iterator_category(__i)); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 210 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator_base_funcs.h" 3 template<typename _InputIterator> inline _GLIBCXX17_CONSTEXPR _InputIterator next(_InputIterator __x, typename iterator_traits<_InputIterator>::difference_type __n = 1) { // concept requirements __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>) std::advance(__x, __n); return __x; } template<typename _BidirectionalIterator> inline _GLIBCXX17_CONSTEXPR _BidirectionalIterator prev(_BidirectionalIterator __x, typename iterator_traits<_BidirectionalIterator>::difference_type __n = 1) { // concept requirements __glibcxx_function_requires(_BidirectionalIteratorConcept< _BidirectionalIterator>) std::advance(__x, -__n); return __x; } #endif // C++11 # 235 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator_base_funcs.h" 3 _GLIBCXX_END_NAMESPACE_VERSION } // namespace #endif /* _STL_ITERATOR_BASE_FUNCS_H */ # 240 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator_base_funcs.h" 3 # 67 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/stl_iterator.h> #endif /* expanded by -frewrite-includes */ # 67 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator.h" 1 3 // Iterators -*- C++ -*- // Copyright (C) 2001-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /* * * Copyright (c) 1994 * Hewlett-Packard Company * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Hewlett-Packard Company makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. * * * Copyright (c) 1996-1998 * Silicon Graphics Computer Systems, Inc. * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Silicon Graphics makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. */ /** @file bits/stl_iterator.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{iterator} * * This file implements reverse_iterator, back_insert_iterator, * front_insert_iterator, insert_iterator, __normal_iterator, and their * supporting functions and overloaded operators. */ #ifndef _STL_ITERATOR_H #define _STL_ITERATOR_H 1 #if 0 /* expanded by -frewrite-includes */ #include <bits/cpp_type_traits.h> #endif /* expanded by -frewrite-includes */ # 63 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator.h" 3 # 64 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <ext/type_traits.h> #endif /* expanded by -frewrite-includes */ # 64 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator.h" 3 # 65 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/move.h> #endif /* expanded by -frewrite-includes */ # 65 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator.h" 3 # 66 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/ptr_traits.h> #endif /* expanded by -frewrite-includes */ # 66 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/ptr_traits.h" 1 3 // Pointer Traits -*- C++ -*- // Copyright (C) 2011-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file bits/ptr_traits.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{memory} */ #ifndef _PTR_TRAITS_H #define _PTR_TRAITS_H 1 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 34 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/ptr_traits.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/move.h> #endif /* expanded by -frewrite-includes */ # 35 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/ptr_traits.h" 3 # 36 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/ptr_traits.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 38 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/ptr_traits.h" 3 #define __cpp_lib_constexpr_memory 201811L namespace __gnu_debug { struct _Safe_iterator_base; } #endif # 41 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/ptr_traits.h" 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION class __undefined; // Given Template<T, ...> return T, otherwise invalid. template<typename _Tp> struct __get_first_arg { using type = __undefined; }; template<template<typename, typename...> class _Template, typename _Tp, typename... _Types> struct __get_first_arg<_Template<_Tp, _Types...>> { using type = _Tp; }; template<typename _Tp> using __get_first_arg_t = typename __get_first_arg<_Tp>::type; // Given Template<T, ...> and U return Template<U, ...>, otherwise invalid. template<typename _Tp, typename _Up> struct __replace_first_arg { }; template<template<typename, typename...> class _Template, typename _Up, typename _Tp, typename... _Types> struct __replace_first_arg<_Template<_Tp, _Types...>, _Up> { using type = _Template<_Up, _Types...>; }; template<typename _Tp, typename _Up> using __replace_first_arg_t = typename __replace_first_arg<_Tp, _Up>::type; template<typename _Tp> using __make_not_void = typename conditional<is_void<_Tp>::value, __undefined, _Tp>::type; /** * @brief Uniform interface to all pointer-like types * @ingroup pointer_abstractions */ template<typename _Ptr> struct pointer_traits { private: template<typename _Tp> using __element_type = typename _Tp::element_type; template<typename _Tp> using __difference_type = typename _Tp::difference_type; template<typename _Tp, typename _Up, typename = void> struct __rebind : __replace_first_arg<_Tp, _Up> { }; template<typename _Tp, typename _Up> struct __rebind<_Tp, _Up, __void_t<typename _Tp::template rebind<_Up>>> { using type = typename _Tp::template rebind<_Up>; }; public: /// The pointer type. using pointer = _Ptr; /// The type pointed to. using element_type = __detected_or_t<__get_first_arg_t<_Ptr>, __element_type, _Ptr>; /// The type used to represent the difference between two pointers. using difference_type = __detected_or_t<ptrdiff_t, __difference_type, _Ptr>; /// A pointer to a different type. template<typename _Up> using rebind = typename __rebind<_Ptr, _Up>::type; static _Ptr pointer_to(__make_not_void<element_type>& __e) { return _Ptr::pointer_to(__e); } static_assert(!is_same<element_type, __undefined>::value, "pointer type defines element_type or is like SomePointer<T, Args>"); }; /** * @brief Partial specialization for built-in pointers. * @ingroup pointer_abstractions */ template<typename _Tp> struct pointer_traits<_Tp*> { /// The pointer type typedef _Tp* pointer; /// The type pointed to typedef _Tp element_type; /// Type used to represent the difference between two pointers typedef ptrdiff_t difference_type; template<typename _Up> using rebind = _Up*; /** * @brief Obtain a pointer to an object * @param __r A reference to an object of type @c element_type * @return @c addressof(__r) */ static _GLIBCXX20_CONSTEXPR pointer pointer_to(__make_not_void<element_type>& __r) noexcept { return std::addressof(__r); } }; /// Convenience alias for rebinding pointers. template<typename _Ptr, typename _Tp> using __ptr_rebind = typename pointer_traits<_Ptr>::template rebind<_Tp>; template<typename _Tp> constexpr _Tp* __to_address(_Tp* __ptr) noexcept { static_assert(!std::is_function<_Tp>::value, "not a function pointer"); return __ptr; } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus <= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 163 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/ptr_traits.h" 3 template<typename _Ptr> constexpr typename std::pointer_traits<_Ptr>::element_type* __to_address(const _Ptr& __ptr) { return std::__to_address(__ptr.operator->()); } #else # 168 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/ptr_traits.h" 3 template<typename _Ptr> constexpr auto __to_address(const _Ptr& __ptr) noexcept -> decltype(std::pointer_traits<_Ptr>::to_address(__ptr)) { return std::pointer_traits<_Ptr>::to_address(__ptr); } template<typename _Ptr, typename... _None> constexpr auto __to_address(const _Ptr& __ptr, _None...) noexcept { if constexpr (is_base_of_v<__gnu_debug::_Safe_iterator_base, _Ptr>) return std::__to_address(__ptr.base().operator->()); else return std::__to_address(__ptr.operator->()); } #define __cpp_lib_to_address 201711L /** * @brief Obtain address referenced by a pointer to an object * @param __ptr A pointer to an object * @return @c __ptr * @ingroup pointer_abstractions */ template<typename _Tp> constexpr _Tp* to_address(_Tp* __ptr) noexcept { return std::__to_address(__ptr); } /** * @brief Obtain address referenced by a pointer to an object * @param __ptr A pointer to an object * @return @c pointer_traits<_Ptr>::to_address(__ptr) if that expression is well-formed, otherwise @c to_address(__ptr.operator->()) * @ingroup pointer_abstractions */ template<typename _Ptr> constexpr auto to_address(const _Ptr& __ptr) noexcept { return std::__to_address(__ptr); } #endif // C++2a # 209 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/ptr_traits.h" 3 _GLIBCXX_END_NAMESPACE_VERSION } // namespace std #endif # 214 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/ptr_traits.h" 3 #endif # 216 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/ptr_traits.h" 3 # 67 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator.h" 2 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 69 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator.h" 3 #if 0 /* expanded by -frewrite-includes */ # include <type_traits> #endif /* expanded by -frewrite-includes */ # 69 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator.h" 3 # 70 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator.h" 3 #endif # 71 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 73 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator.h" 3 # define __cpp_lib_array_constexpr 201803L #endif # 75 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator.h" 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @addtogroup iterators * @{ */ // 24.4.1 Reverse iterators /** * Bidirectional and random access iterators have corresponding reverse * %iterator adaptors that iterate through the data structure in the * opposite direction. They have the same signatures as the corresponding * iterators. The fundamental relation between a reverse %iterator and its * corresponding %iterator @c i is established by the identity: * @code * &*(reverse_iterator(i)) == &*(i - 1) * @endcode * * <em>This mapping is dictated by the fact that while there is always a * pointer past the end of an array, there might not be a valid pointer * before the beginning of an array.</em> [24.4.1]/1,2 * * Reverse iterators can be tricky and surprising at first. Their * semantics make sense, however, and the trickiness is a side effect of * the requirement that the iterators must be safe. */ template<typename _Iterator> class reverse_iterator : public iterator<typename iterator_traits<_Iterator>::iterator_category, typename iterator_traits<_Iterator>::value_type, typename iterator_traits<_Iterator>::difference_type, typename iterator_traits<_Iterator>::pointer, typename iterator_traits<_Iterator>::reference> { protected: _Iterator current; typedef iterator_traits<_Iterator> __traits_type; public: typedef _Iterator iterator_type; typedef typename __traits_type::difference_type difference_type; typedef typename __traits_type::pointer pointer; typedef typename __traits_type::reference reference; /** * The default constructor value-initializes member @p current. * If it is a pointer, that means it is zero-initialized. */ // _GLIBCXX_RESOLVE_LIB_DEFECTS // 235 No specification of default ctor for reverse_iterator // 1012. reverse_iterator default ctor should value initialize _GLIBCXX17_CONSTEXPR reverse_iterator() : current() { } /** * This %iterator will move in the opposite direction that @p x does. */ explicit _GLIBCXX17_CONSTEXPR reverse_iterator(iterator_type __x) : current(__x) { } /** * The copy constructor is normal. */ _GLIBCXX17_CONSTEXPR reverse_iterator(const reverse_iterator& __x) : current(__x.current) { } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 147 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator.h" 3 reverse_iterator& operator=(const reverse_iterator&) = default; #endif # 149 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator.h" 3 /** * A %reverse_iterator across other types can be copied if the * underlying %iterator can be converted to the type of @c current. */ template<typename _Iter> _GLIBCXX17_CONSTEXPR reverse_iterator(const reverse_iterator<_Iter>& __x) : current(__x.base()) { } /** * @return @c current, the %iterator used for underlying work. */ _GLIBCXX17_CONSTEXPR iterator_type base() const { return current; } /** * @return A reference to the value at @c --current * * This requires that @c --current is dereferenceable. * * @warning This implementation requires that for an iterator of the * underlying iterator type, @c x, a reference obtained by * @c *x remains valid after @c x has been modified or * destroyed. This is a bug: http://gcc.gnu.org/PR51823 */ _GLIBCXX17_CONSTEXPR reference operator*() const { _Iterator __tmp = current; return *--__tmp; } /** * @return A pointer to the value at @c --current * * This requires that @c --current is dereferenceable. */ _GLIBCXX17_CONSTEXPR pointer operator->() const { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 1052. operator-> should also support smart pointers _Iterator __tmp = current; --__tmp; return _S_to_pointer(__tmp); } /** * @return @c *this * * Decrements the underlying iterator. */ _GLIBCXX17_CONSTEXPR reverse_iterator& operator++() { --current; return *this; } /** * @return The original value of @c *this * * Decrements the underlying iterator. */ _GLIBCXX17_CONSTEXPR reverse_iterator operator++(int) { reverse_iterator __tmp = *this; --current; return __tmp; } /** * @return @c *this * * Increments the underlying iterator. */ _GLIBCXX17_CONSTEXPR reverse_iterator& operator--() { ++current; return *this; } /** * @return A reverse_iterator with the previous value of @c *this * * Increments the underlying iterator. */ _GLIBCXX17_CONSTEXPR reverse_iterator operator--(int) { reverse_iterator __tmp = *this; ++current; return __tmp; } /** * @return A reverse_iterator that refers to @c current - @a __n * * The underlying iterator must be a Random Access Iterator. */ _GLIBCXX17_CONSTEXPR reverse_iterator operator+(difference_type __n) const { return reverse_iterator(current - __n); } /** * @return *this * * Moves the underlying iterator backwards @a __n steps. * The underlying iterator must be a Random Access Iterator. */ _GLIBCXX17_CONSTEXPR reverse_iterator& operator+=(difference_type __n) { current -= __n; return *this; } /** * @return A reverse_iterator that refers to @c current - @a __n * * The underlying iterator must be a Random Access Iterator. */ _GLIBCXX17_CONSTEXPR reverse_iterator operator-(difference_type __n) const { return reverse_iterator(current + __n); } /** * @return *this * * Moves the underlying iterator forwards @a __n steps. * The underlying iterator must be a Random Access Iterator. */ _GLIBCXX17_CONSTEXPR reverse_iterator& operator-=(difference_type __n) { current += __n; return *this; } /** * @return The value at @c current - @a __n - 1 * * The underlying iterator must be a Random Access Iterator. */ _GLIBCXX17_CONSTEXPR reference operator[](difference_type __n) const { return *(*this + __n); } private: template<typename _Tp> static _GLIBCXX17_CONSTEXPR _Tp* _S_to_pointer(_Tp* __p) { return __p; } template<typename _Tp> static _GLIBCXX17_CONSTEXPR pointer _S_to_pointer(_Tp __t) { return __t.operator->(); } }; ///@{ /** * @param __x A %reverse_iterator. * @param __y A %reverse_iterator. * @return A simple bool. * * Reverse iterators forward many operations to their underlying base() * iterators. Others are implemented in terms of one another. * */ template<typename _Iterator> inline _GLIBCXX17_CONSTEXPR bool operator==(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return __x.base() == __y.base(); } template<typename _Iterator> inline _GLIBCXX17_CONSTEXPR bool operator<(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return __y.base() < __x.base(); } template<typename _Iterator> inline _GLIBCXX17_CONSTEXPR bool operator!=(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return !(__x == __y); } template<typename _Iterator> inline _GLIBCXX17_CONSTEXPR bool operator>(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return __y < __x; } template<typename _Iterator> inline _GLIBCXX17_CONSTEXPR bool operator<=(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return !(__y < __x); } template<typename _Iterator> inline _GLIBCXX17_CONSTEXPR bool operator>=(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return !(__x < __y); } // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR 280. Comparison of reverse_iterator to const reverse_iterator. template<typename _IteratorL, typename _IteratorR> inline _GLIBCXX17_CONSTEXPR bool operator==(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) { return __x.base() == __y.base(); } template<typename _IteratorL, typename _IteratorR> inline _GLIBCXX17_CONSTEXPR bool operator<(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) { return __y.base() < __x.base(); } template<typename _IteratorL, typename _IteratorR> inline _GLIBCXX17_CONSTEXPR bool operator!=(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) { return !(__x == __y); } template<typename _IteratorL, typename _IteratorR> inline _GLIBCXX17_CONSTEXPR bool operator>(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) { return __y < __x; } template<typename _IteratorL, typename _IteratorR> inline _GLIBCXX17_CONSTEXPR bool operator<=(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) { return !(__y < __x); } template<typename _IteratorL, typename _IteratorR> inline _GLIBCXX17_CONSTEXPR bool operator>=(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) { return !(__x < __y); } ///@} #if 0 /* disabled by -frewrite-includes */ #if __cplusplus < 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 399 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator.h" 3 template<typename _Iterator> inline typename reverse_iterator<_Iterator>::difference_type operator-(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return __y.base() - __x.base(); } template<typename _IteratorL, typename _IteratorR> inline typename reverse_iterator<_IteratorL>::difference_type operator-(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) { return __y.base() - __x.base(); } #else # 411 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator.h" 3 // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR 685. reverse_iterator/move_iterator difference has invalid signatures template<typename _IteratorL, typename _IteratorR> inline _GLIBCXX17_CONSTEXPR auto operator-(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) -> decltype(__y.base() - __x.base()) { return __y.base() - __x.base(); } #endif # 420 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator.h" 3 template<typename _Iterator> inline _GLIBCXX17_CONSTEXPR reverse_iterator<_Iterator> operator+(typename reverse_iterator<_Iterator>::difference_type __n, const reverse_iterator<_Iterator>& __x) { return reverse_iterator<_Iterator>(__x.base() - __n); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 428 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator.h" 3 // Same as C++14 make_reverse_iterator but used in C++11 mode too. template<typename _Iterator> inline _GLIBCXX17_CONSTEXPR reverse_iterator<_Iterator> __make_reverse_iterator(_Iterator __i) { return reverse_iterator<_Iterator>(__i); } #if 0 /* disabled by -frewrite-includes */ # if __cplusplus > 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 435 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator.h" 3 # define __cpp_lib_make_reverse_iterator 201402 // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR 2285. make_reverse_iterator /// Generator function for reverse_iterator. template<typename _Iterator> inline _GLIBCXX17_CONSTEXPR reverse_iterator<_Iterator> make_reverse_iterator(_Iterator __i) { return reverse_iterator<_Iterator>(__i); } # endif # 445 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator.h" 3 #endif # 446 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 448 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator.h" 3 template<typename _Iterator> auto __niter_base(reverse_iterator<_Iterator> __it) -> decltype(__make_reverse_iterator(__niter_base(__it.base()))) { return __make_reverse_iterator(__niter_base(__it.base())); } template<typename _Iterator> struct __is_move_iterator<reverse_iterator<_Iterator> > : __is_move_iterator<_Iterator> { }; template<typename _Iterator> auto __miter_base(reverse_iterator<_Iterator> __it) -> decltype(__make_reverse_iterator(__miter_base(__it.base()))) { return __make_reverse_iterator(__miter_base(__it.base())); } #endif # 465 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator.h" 3 // 24.4.2.2.1 back_insert_iterator /** * @brief Turns assignment into insertion. * * These are output iterators, constructed from a container-of-T. * Assigning a T to the iterator appends it to the container using * push_back. * * Tip: Using the back_inserter function to create these iterators can * save typing. */ template<typename _Container> class back_insert_iterator : public iterator<output_iterator_tag, void, void, void, void> { protected: _Container* container; public: /// A nested typedef for the type of whatever container you used. typedef _Container container_type; /// The only way to create this %iterator is with a container. explicit back_insert_iterator(_Container& __x) : container(std::__addressof(__x)) { } /** * @param __value An instance of whatever type * container_type::const_reference is; presumably a * reference-to-const T for container<T>. * @return This %iterator, for chained operations. * * This kind of %iterator doesn't really have a @a position in the * container (you can think of the position as being permanently at * the end, if you like). Assigning a value to the %iterator will * always append the value to the end of the container. */ #if 0 /* disabled by -frewrite-includes */ #if __cplusplus < 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 505 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator.h" 3 back_insert_iterator& operator=(typename _Container::const_reference __value) { container->push_back(__value); return *this; } #else # 512 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator.h" 3 back_insert_iterator& operator=(const typename _Container::value_type& __value) { container->push_back(__value); return *this; } back_insert_iterator& operator=(typename _Container::value_type&& __value) { container->push_back(std::move(__value)); return *this; } #endif # 526 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator.h" 3 /// Simply returns *this. back_insert_iterator& operator*() { return *this; } /// Simply returns *this. (This %iterator does not @a move.) back_insert_iterator& operator++() { return *this; } /// Simply returns *this. (This %iterator does not @a move.) back_insert_iterator operator++(int) { return *this; } }; /** * @param __x A container of arbitrary type. * @return An instance of back_insert_iterator working on @p __x. * * This wrapper function helps in creating back_insert_iterator instances. * Typing the name of the %iterator requires knowing the precise full * type of the container, which can be tedious and impedes generic * programming. Using this function lets you take advantage of automatic * template parameter deduction, making the compiler match the correct * types for you. */ template<typename _Container> inline back_insert_iterator<_Container> back_inserter(_Container& __x) { return back_insert_iterator<_Container>(__x); } /** * @brief Turns assignment into insertion. * * These are output iterators, constructed from a container-of-T. * Assigning a T to the iterator prepends it to the container using * push_front. * * Tip: Using the front_inserter function to create these iterators can * save typing. */ template<typename _Container> class front_insert_iterator : public iterator<output_iterator_tag, void, void, void, void> { protected: _Container* container; public: /// A nested typedef for the type of whatever container you used. typedef _Container container_type; /// The only way to create this %iterator is with a container. explicit front_insert_iterator(_Container& __x) : container(std::__addressof(__x)) { } /** * @param __value An instance of whatever type * container_type::const_reference is; presumably a * reference-to-const T for container<T>. * @return This %iterator, for chained operations. * * This kind of %iterator doesn't really have a @a position in the * container (you can think of the position as being permanently at * the front, if you like). Assigning a value to the %iterator will * always prepend the value to the front of the container. */ #if 0 /* disabled by -frewrite-includes */ #if __cplusplus < 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 596 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator.h" 3 front_insert_iterator& operator=(typename _Container::const_reference __value) { container->push_front(__value); return *this; } #else # 603 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator.h" 3 front_insert_iterator& operator=(const typename _Container::value_type& __value) { container->push_front(__value); return *this; } front_insert_iterator& operator=(typename _Container::value_type&& __value) { container->push_front(std::move(__value)); return *this; } #endif # 617 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator.h" 3 /// Simply returns *this. front_insert_iterator& operator*() { return *this; } /// Simply returns *this. (This %iterator does not @a move.) front_insert_iterator& operator++() { return *this; } /// Simply returns *this. (This %iterator does not @a move.) front_insert_iterator operator++(int) { return *this; } }; /** * @param __x A container of arbitrary type. * @return An instance of front_insert_iterator working on @p x. * * This wrapper function helps in creating front_insert_iterator instances. * Typing the name of the %iterator requires knowing the precise full * type of the container, which can be tedious and impedes generic * programming. Using this function lets you take advantage of automatic * template parameter deduction, making the compiler match the correct * types for you. */ template<typename _Container> inline front_insert_iterator<_Container> front_inserter(_Container& __x) { return front_insert_iterator<_Container>(__x); } /** * @brief Turns assignment into insertion. * * These are output iterators, constructed from a container-of-T. * Assigning a T to the iterator inserts it in the container at the * %iterator's position, rather than overwriting the value at that * position. * * (Sequences will actually insert a @e copy of the value before the * %iterator's position.) * * Tip: Using the inserter function to create these iterators can * save typing. */ template<typename _Container> class insert_iterator : public iterator<output_iterator_tag, void, void, void, void> { protected: _Container* container; typename _Container::iterator iter; public: /// A nested typedef for the type of whatever container you used. typedef _Container container_type; /** * The only way to create this %iterator is with a container and an * initial position (a normal %iterator into the container). */ insert_iterator(_Container& __x, typename _Container::iterator __i) : container(std::__addressof(__x)), iter(__i) {} /** * @param __value An instance of whatever type * container_type::const_reference is; presumably a * reference-to-const T for container<T>. * @return This %iterator, for chained operations. * * This kind of %iterator maintains its own position in the * container. Assigning a value to the %iterator will insert the * value into the container at the place before the %iterator. * * The position is maintained such that subsequent assignments will * insert values immediately after one another. For example, * @code * // vector v contains A and Z * * insert_iterator i (v, ++v.begin()); * i = 1; * i = 2; * i = 3; * * // vector v contains A, 1, 2, 3, and Z * @endcode */ #if 0 /* disabled by -frewrite-includes */ #if __cplusplus < 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 707 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator.h" 3 insert_iterator& operator=(typename _Container::const_reference __value) { iter = container->insert(iter, __value); ++iter; return *this; } #else # 715 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator.h" 3 insert_iterator& operator=(const typename _Container::value_type& __value) { iter = container->insert(iter, __value); ++iter; return *this; } insert_iterator& operator=(typename _Container::value_type&& __value) { iter = container->insert(iter, std::move(__value)); ++iter; return *this; } #endif # 731 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator.h" 3 /// Simply returns *this. insert_iterator& operator*() { return *this; } /// Simply returns *this. (This %iterator does not @a move.) insert_iterator& operator++() { return *this; } /// Simply returns *this. (This %iterator does not @a move.) insert_iterator& operator++(int) { return *this; } }; /** * @param __x A container of arbitrary type. * @param __i An iterator into the container. * @return An instance of insert_iterator working on @p __x. * * This wrapper function helps in creating insert_iterator instances. * Typing the name of the %iterator requires knowing the precise full * type of the container, which can be tedious and impedes generic * programming. Using this function lets you take advantage of automatic * template parameter deduction, making the compiler match the correct * types for you. */ template<typename _Container> inline insert_iterator<_Container> inserter(_Container& __x, typename _Container::iterator __i) { return insert_iterator<_Container>(__x, __i); } /// @} group iterators _GLIBCXX_END_NAMESPACE_VERSION } // namespace namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION // This iterator adapter is @a normal in the sense that it does not // change the semantics of any of the operators of its iterator // parameter. Its primary purpose is to convert an iterator that is // not a class, e.g. a pointer, into an iterator that is a class. // The _Container parameter exists solely so that different containers // using this template can instantiate different types, even if the // _Iterator parameter is the same. using std::iterator_traits; using std::iterator; template<typename _Iterator, typename _Container> class __normal_iterator { protected: _Iterator _M_current; typedef iterator_traits<_Iterator> __traits_type; public: typedef _Iterator iterator_type; typedef typename __traits_type::iterator_category iterator_category; typedef typename __traits_type::value_type value_type; typedef typename __traits_type::difference_type difference_type; typedef typename __traits_type::reference reference; typedef typename __traits_type::pointer pointer; _GLIBCXX_CONSTEXPR __normal_iterator() _GLIBCXX_NOEXCEPT : _M_current(_Iterator()) { } explicit __normal_iterator(const _Iterator& __i) _GLIBCXX_NOEXCEPT : _M_current(__i) { } // Allow iterator to const_iterator conversion template<typename _Iter> __normal_iterator(const __normal_iterator<_Iter, typename __enable_if< (std::__are_same<_Iter, typename _Container::pointer>::__value), _Container>::__type>& __i) _GLIBCXX_NOEXCEPT : _M_current(__i.base()) { } // Forward iterator requirements reference operator*() const _GLIBCXX_NOEXCEPT { return *_M_current; } pointer operator->() const _GLIBCXX_NOEXCEPT { return _M_current; } __normal_iterator& operator++() _GLIBCXX_NOEXCEPT { ++_M_current; return *this; } __normal_iterator operator++(int) _GLIBCXX_NOEXCEPT { return __normal_iterator(_M_current++); } // Bidirectional iterator requirements __normal_iterator& operator--() _GLIBCXX_NOEXCEPT { --_M_current; return *this; } __normal_iterator operator--(int) _GLIBCXX_NOEXCEPT { return __normal_iterator(_M_current--); } // Random access iterator requirements reference operator[](difference_type __n) const _GLIBCXX_NOEXCEPT { return _M_current[__n]; } __normal_iterator& operator+=(difference_type __n) _GLIBCXX_NOEXCEPT { _M_current += __n; return *this; } __normal_iterator operator+(difference_type __n) const _GLIBCXX_NOEXCEPT { return __normal_iterator(_M_current + __n); } __normal_iterator& operator-=(difference_type __n) _GLIBCXX_NOEXCEPT { _M_current -= __n; return *this; } __normal_iterator operator-(difference_type __n) const _GLIBCXX_NOEXCEPT { return __normal_iterator(_M_current - __n); } const _Iterator& base() const _GLIBCXX_NOEXCEPT { return _M_current; } }; // Note: In what follows, the left- and right-hand-side iterators are // allowed to vary in types (conceptually in cv-qualification) so that // comparison between cv-qualified and non-cv-qualified iterators be // valid. However, the greedy and unfriendly operators in std::rel_ops // will make overload resolution ambiguous (when in scope) if we don't // provide overloads whose operands are of the same type. Can someone // remind me what generic programming is about? -- Gaby // Forward iterator requirements template<typename _IteratorL, typename _IteratorR, typename _Container> inline bool operator==(const __normal_iterator<_IteratorL, _Container>& __lhs, const __normal_iterator<_IteratorR, _Container>& __rhs) _GLIBCXX_NOEXCEPT { return __lhs.base() == __rhs.base(); } template<typename _Iterator, typename _Container> inline bool operator==(const __normal_iterator<_Iterator, _Container>& __lhs, const __normal_iterator<_Iterator, _Container>& __rhs) _GLIBCXX_NOEXCEPT { return __lhs.base() == __rhs.base(); } template<typename _IteratorL, typename _IteratorR, typename _Container> inline bool operator!=(const __normal_iterator<_IteratorL, _Container>& __lhs, const __normal_iterator<_IteratorR, _Container>& __rhs) _GLIBCXX_NOEXCEPT { return __lhs.base() != __rhs.base(); } template<typename _Iterator, typename _Container> inline bool operator!=(const __normal_iterator<_Iterator, _Container>& __lhs, const __normal_iterator<_Iterator, _Container>& __rhs) _GLIBCXX_NOEXCEPT { return __lhs.base() != __rhs.base(); } // Random access iterator requirements template<typename _IteratorL, typename _IteratorR, typename _Container> inline bool operator<(const __normal_iterator<_IteratorL, _Container>& __lhs, const __normal_iterator<_IteratorR, _Container>& __rhs) _GLIBCXX_NOEXCEPT { return __lhs.base() < __rhs.base(); } template<typename _Iterator, typename _Container> inline bool operator<(const __normal_iterator<_Iterator, _Container>& __lhs, const __normal_iterator<_Iterator, _Container>& __rhs) _GLIBCXX_NOEXCEPT { return __lhs.base() < __rhs.base(); } template<typename _IteratorL, typename _IteratorR, typename _Container> inline bool operator>(const __normal_iterator<_IteratorL, _Container>& __lhs, const __normal_iterator<_IteratorR, _Container>& __rhs) _GLIBCXX_NOEXCEPT { return __lhs.base() > __rhs.base(); } template<typename _Iterator, typename _Container> inline bool operator>(const __normal_iterator<_Iterator, _Container>& __lhs, const __normal_iterator<_Iterator, _Container>& __rhs) _GLIBCXX_NOEXCEPT { return __lhs.base() > __rhs.base(); } template<typename _IteratorL, typename _IteratorR, typename _Container> inline bool operator<=(const __normal_iterator<_IteratorL, _Container>& __lhs, const __normal_iterator<_IteratorR, _Container>& __rhs) _GLIBCXX_NOEXCEPT { return __lhs.base() <= __rhs.base(); } template<typename _Iterator, typename _Container> inline bool operator<=(const __normal_iterator<_Iterator, _Container>& __lhs, const __normal_iterator<_Iterator, _Container>& __rhs) _GLIBCXX_NOEXCEPT { return __lhs.base() <= __rhs.base(); } template<typename _IteratorL, typename _IteratorR, typename _Container> inline bool operator>=(const __normal_iterator<_IteratorL, _Container>& __lhs, const __normal_iterator<_IteratorR, _Container>& __rhs) _GLIBCXX_NOEXCEPT { return __lhs.base() >= __rhs.base(); } template<typename _Iterator, typename _Container> inline bool operator>=(const __normal_iterator<_Iterator, _Container>& __lhs, const __normal_iterator<_Iterator, _Container>& __rhs) _GLIBCXX_NOEXCEPT { return __lhs.base() >= __rhs.base(); } // _GLIBCXX_RESOLVE_LIB_DEFECTS // According to the resolution of DR179 not only the various comparison // operators but also operator- must accept mixed iterator/const_iterator // parameters. template<typename _IteratorL, typename _IteratorR, typename _Container> #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 972 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator.h" 3 // DR 685. inline auto operator-(const __normal_iterator<_IteratorL, _Container>& __lhs, const __normal_iterator<_IteratorR, _Container>& __rhs) noexcept -> decltype(__lhs.base() - __rhs.base()) #else # 978 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator.h" 3 inline typename __normal_iterator<_IteratorL, _Container>::difference_type operator-(const __normal_iterator<_IteratorL, _Container>& __lhs, const __normal_iterator<_IteratorR, _Container>& __rhs) #endif # 982 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator.h" 3 { return __lhs.base() - __rhs.base(); } template<typename _Iterator, typename _Container> inline typename __normal_iterator<_Iterator, _Container>::difference_type operator-(const __normal_iterator<_Iterator, _Container>& __lhs, const __normal_iterator<_Iterator, _Container>& __rhs) _GLIBCXX_NOEXCEPT { return __lhs.base() - __rhs.base(); } template<typename _Iterator, typename _Container> inline __normal_iterator<_Iterator, _Container> operator+(typename __normal_iterator<_Iterator, _Container>::difference_type __n, const __normal_iterator<_Iterator, _Container>& __i) _GLIBCXX_NOEXCEPT { return __normal_iterator<_Iterator, _Container>(__i.base() + __n); } _GLIBCXX_END_NAMESPACE_VERSION } // namespace namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION template<typename _Iterator, typename _Container> _Iterator __niter_base(__gnu_cxx::__normal_iterator<_Iterator, _Container> __it) _GLIBCXX_NOEXCEPT_IF(std::is_nothrow_copy_constructible<_Iterator>::value) { return __it.base(); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1012 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator.h" 3 /** * @addtogroup iterators * @{ */ // 24.4.3 Move iterators /** * Class template move_iterator is an iterator adapter with the same * behavior as the underlying iterator except that its dereference * operator implicitly converts the value returned by the underlying * iterator's dereference operator to an rvalue reference. Some * generic algorithms can be called with move iterators to replace * copying with moving. */ template<typename _Iterator> class move_iterator { protected: _Iterator _M_current; typedef iterator_traits<_Iterator> __traits_type; typedef typename __traits_type::reference __base_ref; public: typedef _Iterator iterator_type; typedef typename __traits_type::iterator_category iterator_category; typedef typename __traits_type::value_type value_type; typedef typename __traits_type::difference_type difference_type; // NB: DR 680. typedef _Iterator pointer; // _GLIBCXX_RESOLVE_LIB_DEFECTS // 2106. move_iterator wrapping iterators returning prvalues typedef typename conditional<is_reference<__base_ref>::value, typename remove_reference<__base_ref>::type&&, __base_ref>::type reference; _GLIBCXX17_CONSTEXPR move_iterator() : _M_current() { } explicit _GLIBCXX17_CONSTEXPR move_iterator(iterator_type __i) : _M_current(__i) { } template<typename _Iter> _GLIBCXX17_CONSTEXPR move_iterator(const move_iterator<_Iter>& __i) : _M_current(__i.base()) { } _GLIBCXX17_CONSTEXPR iterator_type base() const { return _M_current; } _GLIBCXX17_CONSTEXPR reference operator*() const { return static_cast<reference>(*_M_current); } _GLIBCXX17_CONSTEXPR pointer operator->() const { return _M_current; } _GLIBCXX17_CONSTEXPR move_iterator& operator++() { ++_M_current; return *this; } _GLIBCXX17_CONSTEXPR move_iterator operator++(int) { move_iterator __tmp = *this; ++_M_current; return __tmp; } _GLIBCXX17_CONSTEXPR move_iterator& operator--() { --_M_current; return *this; } _GLIBCXX17_CONSTEXPR move_iterator operator--(int) { move_iterator __tmp = *this; --_M_current; return __tmp; } _GLIBCXX17_CONSTEXPR move_iterator operator+(difference_type __n) const { return move_iterator(_M_current + __n); } _GLIBCXX17_CONSTEXPR move_iterator& operator+=(difference_type __n) { _M_current += __n; return *this; } _GLIBCXX17_CONSTEXPR move_iterator operator-(difference_type __n) const { return move_iterator(_M_current - __n); } _GLIBCXX17_CONSTEXPR move_iterator& operator-=(difference_type __n) { _M_current -= __n; return *this; } _GLIBCXX17_CONSTEXPR reference operator[](difference_type __n) const { return std::move(_M_current[__n]); } }; // Note: See __normal_iterator operators note from Gaby to understand // why there are always 2 versions for most of the move_iterator // operators. template<typename _IteratorL, typename _IteratorR> inline _GLIBCXX17_CONSTEXPR bool operator==(const move_iterator<_IteratorL>& __x, const move_iterator<_IteratorR>& __y) { return __x.base() == __y.base(); } template<typename _Iterator> inline _GLIBCXX17_CONSTEXPR bool operator==(const move_iterator<_Iterator>& __x, const move_iterator<_Iterator>& __y) { return __x.base() == __y.base(); } template<typename _IteratorL, typename _IteratorR> inline _GLIBCXX17_CONSTEXPR bool operator!=(const move_iterator<_IteratorL>& __x, const move_iterator<_IteratorR>& __y) { return !(__x == __y); } template<typename _Iterator> inline _GLIBCXX17_CONSTEXPR bool operator!=(const move_iterator<_Iterator>& __x, const move_iterator<_Iterator>& __y) { return !(__x == __y); } template<typename _IteratorL, typename _IteratorR> inline _GLIBCXX17_CONSTEXPR bool operator<(const move_iterator<_IteratorL>& __x, const move_iterator<_IteratorR>& __y) { return __x.base() < __y.base(); } template<typename _Iterator> inline _GLIBCXX17_CONSTEXPR bool operator<(const move_iterator<_Iterator>& __x, const move_iterator<_Iterator>& __y) { return __x.base() < __y.base(); } template<typename _IteratorL, typename _IteratorR> inline _GLIBCXX17_CONSTEXPR bool operator<=(const move_iterator<_IteratorL>& __x, const move_iterator<_IteratorR>& __y) { return !(__y < __x); } template<typename _Iterator> inline _GLIBCXX17_CONSTEXPR bool operator<=(const move_iterator<_Iterator>& __x, const move_iterator<_Iterator>& __y) { return !(__y < __x); } template<typename _IteratorL, typename _IteratorR> inline _GLIBCXX17_CONSTEXPR bool operator>(const move_iterator<_IteratorL>& __x, const move_iterator<_IteratorR>& __y) { return __y < __x; } template<typename _Iterator> inline _GLIBCXX17_CONSTEXPR bool operator>(const move_iterator<_Iterator>& __x, const move_iterator<_Iterator>& __y) { return __y < __x; } template<typename _IteratorL, typename _IteratorR> inline _GLIBCXX17_CONSTEXPR bool operator>=(const move_iterator<_IteratorL>& __x, const move_iterator<_IteratorR>& __y) { return !(__x < __y); } template<typename _Iterator> inline _GLIBCXX17_CONSTEXPR bool operator>=(const move_iterator<_Iterator>& __x, const move_iterator<_Iterator>& __y) { return !(__x < __y); } // DR 685. template<typename _IteratorL, typename _IteratorR> inline _GLIBCXX17_CONSTEXPR auto operator-(const move_iterator<_IteratorL>& __x, const move_iterator<_IteratorR>& __y) -> decltype(__x.base() - __y.base()) { return __x.base() - __y.base(); } template<typename _Iterator> inline _GLIBCXX17_CONSTEXPR move_iterator<_Iterator> operator+(typename move_iterator<_Iterator>::difference_type __n, const move_iterator<_Iterator>& __x) { return __x + __n; } template<typename _Iterator> inline _GLIBCXX17_CONSTEXPR move_iterator<_Iterator> make_move_iterator(_Iterator __i) { return move_iterator<_Iterator>(__i); } template<typename _Iterator, typename _ReturnType = typename conditional<__move_if_noexcept_cond <typename iterator_traits<_Iterator>::value_type>::value, _Iterator, move_iterator<_Iterator>>::type> inline _GLIBCXX17_CONSTEXPR _ReturnType __make_move_if_noexcept_iterator(_Iterator __i) { return _ReturnType(__i); } // Overload for pointers that matches std::move_if_noexcept more closely, // returning a constant iterator when we don't want to move. template<typename _Tp, typename _ReturnType = typename conditional<__move_if_noexcept_cond<_Tp>::value, const _Tp*, move_iterator<_Tp*>>::type> inline _GLIBCXX17_CONSTEXPR _ReturnType __make_move_if_noexcept_iterator(_Tp* __i) { return _ReturnType(__i); } /// @} group iterators template<typename _Iterator> auto __niter_base(move_iterator<_Iterator> __it) -> decltype(make_move_iterator(__niter_base(__it.base()))) { return make_move_iterator(__niter_base(__it.base())); } template<typename _Iterator> struct __is_move_iterator<move_iterator<_Iterator> > { enum { __value = 1 }; typedef __true_type __type; }; template<typename _Iterator> auto __miter_base(move_iterator<_Iterator> __it) -> decltype(__miter_base(__it.base())) { return __miter_base(__it.base()); } #define _GLIBCXX_MAKE_MOVE_ITERATOR(_Iter) std::make_move_iterator(_Iter) #define _GLIBCXX_MAKE_MOVE_IF_NOEXCEPT_ITERATOR(_Iter) \ std::__make_move_if_noexcept_iterator(_Iter) #else # 1267 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator.h" 3 #define _GLIBCXX_MAKE_MOVE_ITERATOR(_Iter) (_Iter) #define _GLIBCXX_MAKE_MOVE_IF_NOEXCEPT_ITERATOR(_Iter) (_Iter) #endif // C++11 # 1270 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cpp_deduction_guides >= 201606 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1272 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator.h" 3 // These helper traits are used for deduction guides // of associative containers. template<typename _InputIterator> using __iter_key_t = remove_const_t< typename iterator_traits<_InputIterator>::value_type::first_type>; template<typename _InputIterator> using __iter_val_t = typename iterator_traits<_InputIterator>::value_type::second_type; template<typename _T1, typename _T2> struct pair; template<typename _InputIterator> using __iter_to_alloc_t = pair<add_const_t<__iter_key_t<_InputIterator>>, __iter_val_t<_InputIterator>>; #endif # 1291 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator.h" 3 _GLIBCXX_END_NAMESPACE_VERSION } // namespace #ifdef _GLIBCXX_DEBUG #if 0 /* expanded by -frewrite-includes */ # include <debug/stl_iterator.h> #endif /* expanded by -frewrite-includes */ # 1296 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator.h" 3 # 1297 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator.h" 3 #endif # 1298 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator.h" 3 #endif # 1300 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_iterator.h" 3 # 68 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/concept_check.h> #endif /* expanded by -frewrite-includes */ # 68 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 # 69 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <debug/debug.h> #endif /* expanded by -frewrite-includes */ # 69 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/debug/debug.h" 1 3 // Debugging support implementation -*- C++ -*- // Copyright (C) 2003-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file debug/debug.h * This file is a GNU debug extension to the Standard C++ Library. */ #ifndef _GLIBCXX_DEBUG_MACRO_SWITCH_H #define _GLIBCXX_DEBUG_MACRO_SWITCH_H 1 /** Macros and namespaces used by the implementation outside of debug * wrappers to verify certain properties. The __glibcxx_requires_xxx * macros are merely wrappers around the __glibcxx_check_xxx wrappers * when we are compiling with debug mode, but disappear when we are * in release mode so that there is no checking performed in, e.g., * the standard library algorithms. */ #if 0 /* expanded by -frewrite-includes */ #include <debug/assertions.h> #endif /* expanded by -frewrite-includes */ # 40 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/debug/debug.h" 3 # 41 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/debug/debug.h" 3 // Debug mode namespaces. /** * @namespace std::__debug * @brief GNU debug code, replaces standard behavior with debug behavior. */ namespace std { namespace __debug { } } /** @namespace __gnu_debug * @brief GNU debug classes for public use. */ namespace __gnu_debug { using namespace std::__debug; } #ifndef _GLIBCXX_DEBUG # define __glibcxx_requires_cond(_Cond,_Msg) # define __glibcxx_requires_valid_range(_First,_Last) # define __glibcxx_requires_can_increment(_First,_Size) # define __glibcxx_requires_can_increment_range(_First1,_Last1,_First2) # define __glibcxx_requires_can_decrement_range(_First1,_Last1,_First2) # define __glibcxx_requires_sorted(_First,_Last) # define __glibcxx_requires_sorted_pred(_First,_Last,_Pred) # define __glibcxx_requires_sorted_set(_First1,_Last1,_First2) # define __glibcxx_requires_sorted_set_pred(_First1,_Last1,_First2,_Pred) # define __glibcxx_requires_partitioned_lower(_First,_Last,_Value) # define __glibcxx_requires_partitioned_upper(_First,_Last,_Value) # define __glibcxx_requires_partitioned_lower_pred(_First,_Last,_Value,_Pred) # define __glibcxx_requires_partitioned_upper_pred(_First,_Last,_Value,_Pred) # define __glibcxx_requires_heap(_First,_Last) # define __glibcxx_requires_heap_pred(_First,_Last,_Pred) # define __glibcxx_requires_string(_String) # define __glibcxx_requires_string_len(_String,_Len) # define __glibcxx_requires_irreflexive(_First,_Last) # define __glibcxx_requires_irreflexive2(_First,_Last) # define __glibcxx_requires_irreflexive_pred(_First,_Last,_Pred) # define __glibcxx_requires_irreflexive_pred2(_First,_Last,_Pred) #else # 86 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/debug/debug.h" 3 #if 0 /* expanded by -frewrite-includes */ # include <debug/macros.h> #endif /* expanded by -frewrite-includes */ # 87 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/debug/debug.h" 3 # 88 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/debug/debug.h" 3 # define __glibcxx_requires_cond(_Cond,_Msg) _GLIBCXX_DEBUG_VERIFY(_Cond,_Msg) # define __glibcxx_requires_valid_range(_First,_Last) \ __glibcxx_check_valid_range(_First,_Last) # define __glibcxx_requires_can_increment(_First,_Size) \ __glibcxx_check_can_increment(_First,_Size) # define __glibcxx_requires_can_increment_range(_First1,_Last1,_First2) \ __glibcxx_check_can_increment_range(_First1,_Last1,_First2) # define __glibcxx_requires_can_decrement_range(_First1,_Last1,_First2) \ __glibcxx_check_can_decrement_range(_First1,_Last1,_First2) # define __glibcxx_requires_sorted(_First,_Last) \ __glibcxx_check_sorted(_First,_Last) # define __glibcxx_requires_sorted_pred(_First,_Last,_Pred) \ __glibcxx_check_sorted_pred(_First,_Last,_Pred) # define __glibcxx_requires_sorted_set(_First1,_Last1,_First2) \ __glibcxx_check_sorted_set(_First1,_Last1,_First2) # define __glibcxx_requires_sorted_set_pred(_First1,_Last1,_First2,_Pred) \ __glibcxx_check_sorted_set_pred(_First1,_Last1,_First2,_Pred) # define __glibcxx_requires_partitioned_lower(_First,_Last,_Value) \ __glibcxx_check_partitioned_lower(_First,_Last,_Value) # define __glibcxx_requires_partitioned_upper(_First,_Last,_Value) \ __glibcxx_check_partitioned_upper(_First,_Last,_Value) # define __glibcxx_requires_partitioned_lower_pred(_First,_Last,_Value,_Pred) \ __glibcxx_check_partitioned_lower_pred(_First,_Last,_Value,_Pred) # define __glibcxx_requires_partitioned_upper_pred(_First,_Last,_Value,_Pred) \ __glibcxx_check_partitioned_upper_pred(_First,_Last,_Value,_Pred) # define __glibcxx_requires_heap(_First,_Last) \ __glibcxx_check_heap(_First,_Last) # define __glibcxx_requires_heap_pred(_First,_Last,_Pred) \ __glibcxx_check_heap_pred(_First,_Last,_Pred) # define __glibcxx_requires_string(_String) __glibcxx_check_string(_String) # define __glibcxx_requires_string_len(_String,_Len) \ __glibcxx_check_string_len(_String,_Len) # define __glibcxx_requires_irreflexive(_First,_Last) \ __glibcxx_check_irreflexive(_First,_Last) # define __glibcxx_requires_irreflexive2(_First,_Last) \ __glibcxx_check_irreflexive2(_First,_Last) # define __glibcxx_requires_irreflexive_pred(_First,_Last,_Pred) \ __glibcxx_check_irreflexive_pred(_First,_Last,_Pred) # define __glibcxx_requires_irreflexive_pred2(_First,_Last,_Pred) \ __glibcxx_check_irreflexive_pred2(_First,_Last,_Pred) #if 0 /* expanded by -frewrite-includes */ # include <debug/functions.h> #endif /* expanded by -frewrite-includes */ # 130 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/debug/debug.h" 3 # 131 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/debug/debug.h" 3 #endif # 133 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/debug/debug.h" 3 #endif // _GLIBCXX_DEBUG_MACRO_SWITCH_H # 135 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/debug/debug.h" 3 # 70 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/move.h> // For std::swap #endif /* expanded by -frewrite-includes */ # 70 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 # 71 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/predefined_ops.h> #endif /* expanded by -frewrite-includes */ # 71 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/predefined_ops.h" 1 3 // Default predicates for internal use -*- C++ -*- // Copyright (C) 2013-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file predefined_ops.h * This is an internal header file, included by other library headers. * You should not attempt to use it directly. @headername{algorithm} */ #ifndef _GLIBCXX_PREDEFINED_OPS_H #define _GLIBCXX_PREDEFINED_OPS_H 1 namespace __gnu_cxx { namespace __ops { struct _Iter_less_iter { template<typename _Iterator1, typename _Iterator2> _GLIBCXX14_CONSTEXPR bool operator()(_Iterator1 __it1, _Iterator2 __it2) const { return *__it1 < *__it2; } }; _GLIBCXX14_CONSTEXPR inline _Iter_less_iter __iter_less_iter() { return _Iter_less_iter(); } struct _Iter_less_val { #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 54 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/predefined_ops.h" 3 constexpr _Iter_less_val() = default; #else # 56 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/predefined_ops.h" 3 _Iter_less_val() { } #endif # 58 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/predefined_ops.h" 3 explicit _Iter_less_val(_Iter_less_iter) { } template<typename _Iterator, typename _Value> bool operator()(_Iterator __it, _Value& __val) const { return *__it < __val; } }; inline _Iter_less_val __iter_less_val() { return _Iter_less_val(); } inline _Iter_less_val __iter_comp_val(_Iter_less_iter) { return _Iter_less_val(); } struct _Val_less_iter { #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 79 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/predefined_ops.h" 3 constexpr _Val_less_iter() = default; #else # 81 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/predefined_ops.h" 3 _Val_less_iter() { } #endif # 83 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/predefined_ops.h" 3 explicit _Val_less_iter(_Iter_less_iter) { } template<typename _Value, typename _Iterator> bool operator()(_Value& __val, _Iterator __it) const { return __val < *__it; } }; inline _Val_less_iter __val_less_iter() { return _Val_less_iter(); } inline _Val_less_iter __val_comp_iter(_Iter_less_iter) { return _Val_less_iter(); } struct _Iter_equal_to_iter { template<typename _Iterator1, typename _Iterator2> bool operator()(_Iterator1 __it1, _Iterator2 __it2) const { return *__it1 == *__it2; } }; inline _Iter_equal_to_iter __iter_equal_to_iter() { return _Iter_equal_to_iter(); } struct _Iter_equal_to_val { template<typename _Iterator, typename _Value> bool operator()(_Iterator __it, _Value& __val) const { return *__it == __val; } }; inline _Iter_equal_to_val __iter_equal_to_val() { return _Iter_equal_to_val(); } inline _Iter_equal_to_val __iter_comp_val(_Iter_equal_to_iter) { return _Iter_equal_to_val(); } template<typename _Compare> struct _Iter_comp_iter { _Compare _M_comp; explicit _GLIBCXX14_CONSTEXPR _Iter_comp_iter(_Compare __comp) : _M_comp(_GLIBCXX_MOVE(__comp)) { } template<typename _Iterator1, typename _Iterator2> _GLIBCXX14_CONSTEXPR bool operator()(_Iterator1 __it1, _Iterator2 __it2) { return bool(_M_comp(*__it1, *__it2)); } }; template<typename _Compare> _GLIBCXX14_CONSTEXPR inline _Iter_comp_iter<_Compare> __iter_comp_iter(_Compare __comp) { return _Iter_comp_iter<_Compare>(_GLIBCXX_MOVE(__comp)); } template<typename _Compare> struct _Iter_comp_val { _Compare _M_comp; explicit _Iter_comp_val(_Compare __comp) : _M_comp(_GLIBCXX_MOVE(__comp)) { } explicit _Iter_comp_val(const _Iter_comp_iter<_Compare>& __comp) : _M_comp(__comp._M_comp) { } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 168 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/predefined_ops.h" 3 explicit _Iter_comp_val(_Iter_comp_iter<_Compare>&& __comp) : _M_comp(std::move(__comp._M_comp)) { } #endif # 173 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/predefined_ops.h" 3 template<typename _Iterator, typename _Value> bool operator()(_Iterator __it, _Value& __val) { return bool(_M_comp(*__it, __val)); } }; template<typename _Compare> inline _Iter_comp_val<_Compare> __iter_comp_val(_Compare __comp) { return _Iter_comp_val<_Compare>(_GLIBCXX_MOVE(__comp)); } template<typename _Compare> inline _Iter_comp_val<_Compare> __iter_comp_val(_Iter_comp_iter<_Compare> __comp) { return _Iter_comp_val<_Compare>(_GLIBCXX_MOVE(__comp)); } template<typename _Compare> struct _Val_comp_iter { _Compare _M_comp; explicit _Val_comp_iter(_Compare __comp) : _M_comp(_GLIBCXX_MOVE(__comp)) { } explicit _Val_comp_iter(const _Iter_comp_iter<_Compare>& __comp) : _M_comp(__comp._M_comp) { } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 206 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/predefined_ops.h" 3 explicit _Val_comp_iter(_Iter_comp_iter<_Compare>&& __comp) : _M_comp(std::move(__comp._M_comp)) { } #endif # 211 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/predefined_ops.h" 3 template<typename _Value, typename _Iterator> bool operator()(_Value& __val, _Iterator __it) { return bool(_M_comp(__val, *__it)); } }; template<typename _Compare> inline _Val_comp_iter<_Compare> __val_comp_iter(_Compare __comp) { return _Val_comp_iter<_Compare>(_GLIBCXX_MOVE(__comp)); } template<typename _Compare> inline _Val_comp_iter<_Compare> __val_comp_iter(_Iter_comp_iter<_Compare> __comp) { return _Val_comp_iter<_Compare>(_GLIBCXX_MOVE(__comp)); } template<typename _Value> struct _Iter_equals_val { _Value& _M_value; explicit _Iter_equals_val(_Value& __value) : _M_value(__value) { } template<typename _Iterator> bool operator()(_Iterator __it) { return *__it == _M_value; } }; template<typename _Value> inline _Iter_equals_val<_Value> __iter_equals_val(_Value& __val) { return _Iter_equals_val<_Value>(__val); } template<typename _Iterator1> struct _Iter_equals_iter { _Iterator1 _M_it1; explicit _Iter_equals_iter(_Iterator1 __it1) : _M_it1(__it1) { } template<typename _Iterator2> bool operator()(_Iterator2 __it2) { return *__it2 == *_M_it1; } }; template<typename _Iterator> inline _Iter_equals_iter<_Iterator> __iter_comp_iter(_Iter_equal_to_iter, _Iterator __it) { return _Iter_equals_iter<_Iterator>(__it); } template<typename _Predicate> struct _Iter_pred { _Predicate _M_pred; explicit _Iter_pred(_Predicate __pred) : _M_pred(_GLIBCXX_MOVE(__pred)) { } template<typename _Iterator> bool operator()(_Iterator __it) { return bool(_M_pred(*__it)); } }; template<typename _Predicate> inline _Iter_pred<_Predicate> __pred_iter(_Predicate __pred) { return _Iter_pred<_Predicate>(_GLIBCXX_MOVE(__pred)); } template<typename _Compare, typename _Value> struct _Iter_comp_to_val { _Compare _M_comp; _Value& _M_value; _Iter_comp_to_val(_Compare __comp, _Value& __value) : _M_comp(_GLIBCXX_MOVE(__comp)), _M_value(__value) { } template<typename _Iterator> bool operator()(_Iterator __it) { return bool(_M_comp(*__it, _M_value)); } }; template<typename _Compare, typename _Value> _Iter_comp_to_val<_Compare, _Value> __iter_comp_val(_Compare __comp, _Value &__val) { return _Iter_comp_to_val<_Compare, _Value>(_GLIBCXX_MOVE(__comp), __val); } template<typename _Compare, typename _Iterator1> struct _Iter_comp_to_iter { _Compare _M_comp; _Iterator1 _M_it1; _Iter_comp_to_iter(_Compare __comp, _Iterator1 __it1) : _M_comp(_GLIBCXX_MOVE(__comp)), _M_it1(__it1) { } template<typename _Iterator2> bool operator()(_Iterator2 __it2) { return bool(_M_comp(*__it2, *_M_it1)); } }; template<typename _Compare, typename _Iterator> inline _Iter_comp_to_iter<_Compare, _Iterator> __iter_comp_iter(_Iter_comp_iter<_Compare> __comp, _Iterator __it) { return _Iter_comp_to_iter<_Compare, _Iterator>( _GLIBCXX_MOVE(__comp._M_comp), __it); } template<typename _Predicate> struct _Iter_negate { _Predicate _M_pred; explicit _Iter_negate(_Predicate __pred) : _M_pred(_GLIBCXX_MOVE(__pred)) { } template<typename _Iterator> bool operator()(_Iterator __it) { return !bool(_M_pred(*__it)); } }; template<typename _Predicate> inline _Iter_negate<_Predicate> __negate(_Iter_pred<_Predicate> __pred) { return _Iter_negate<_Predicate>(_GLIBCXX_MOVE(__pred._M_pred)); } } // namespace __ops } // namespace __gnu_cxx #endif # 363 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/predefined_ops.h" 3 # 72 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 2 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 73 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 #if 0 /* expanded by -frewrite-includes */ # include <type_traits> #endif /* expanded by -frewrite-includes */ # 73 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 # 74 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 #endif # 75 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION #if 0 /* disabled by -frewrite-includes */ #if __cplusplus < 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 81 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 // See http://gcc.gnu.org/ml/libstdc++/2004-08/msg00167.html: in a // nutshell, we are partially implementing the resolution of DR 187, // when it's safe, i.e., the value_types are equal. template<bool _BoolType> struct __iter_swap { template<typename _ForwardIterator1, typename _ForwardIterator2> static void iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) { typedef typename iterator_traits<_ForwardIterator1>::value_type _ValueType1; _ValueType1 __tmp = *__a; *__a = *__b; *__b = __tmp; } }; template<> struct __iter_swap<true> { template<typename _ForwardIterator1, typename _ForwardIterator2> static void iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) { swap(*__a, *__b); } }; #endif # 110 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 /** * @brief Swaps the contents of two iterators. * @ingroup mutating_algorithms * @param __a An iterator. * @param __b Another iterator. * @return Nothing. * * This function swaps the values pointed to by two iterators, not the * iterators themselves. */ template<typename _ForwardIterator1, typename _ForwardIterator2> inline void iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) { // concept requirements __glibcxx_function_requires(_Mutable_ForwardIteratorConcept< _ForwardIterator1>) __glibcxx_function_requires(_Mutable_ForwardIteratorConcept< _ForwardIterator2>) #if 0 /* disabled by -frewrite-includes */ #if __cplusplus < 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 132 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 typedef typename iterator_traits<_ForwardIterator1>::value_type _ValueType1; typedef typename iterator_traits<_ForwardIterator2>::value_type _ValueType2; __glibcxx_function_requires(_ConvertibleConcept<_ValueType1, _ValueType2>) __glibcxx_function_requires(_ConvertibleConcept<_ValueType2, _ValueType1>) typedef typename iterator_traits<_ForwardIterator1>::reference _ReferenceType1; typedef typename iterator_traits<_ForwardIterator2>::reference _ReferenceType2; std::__iter_swap<__are_same<_ValueType1, _ValueType2>::__value && __are_same<_ValueType1&, _ReferenceType1>::__value && __are_same<_ValueType2&, _ReferenceType2>::__value>:: iter_swap(__a, __b); #else # 151 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 swap(*__a, *__b); #endif # 153 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 } /** * @brief Swap the elements of two sequences. * @ingroup mutating_algorithms * @param __first1 A forward iterator. * @param __last1 A forward iterator. * @param __first2 A forward iterator. * @return An iterator equal to @p first2+(last1-first1). * * Swaps each element in the range @p [first1,last1) with the * corresponding element in the range @p [first2,(last1-first1)). * The ranges must not overlap. */ template<typename _ForwardIterator1, typename _ForwardIterator2> _ForwardIterator2 swap_ranges(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2) { // concept requirements __glibcxx_function_requires(_Mutable_ForwardIteratorConcept< _ForwardIterator1>) __glibcxx_function_requires(_Mutable_ForwardIteratorConcept< _ForwardIterator2>) __glibcxx_requires_valid_range(__first1, __last1); for (; __first1 != __last1; ++__first1, (void)++__first2) std::iter_swap(__first1, __first2); return __first2; } /** * @brief This does what you think it does. * @ingroup sorting_algorithms * @param __a A thing of arbitrary type. * @param __b Another thing of arbitrary type. * @return The lesser of the parameters. * * This is the simple classic generic implementation. It will work on * temporary expressions, since they are only evaluated once, unlike a * preprocessor macro. */ template<typename _Tp> _GLIBCXX14_CONSTEXPR inline const _Tp& min(const _Tp& __a, const _Tp& __b) { // concept requirements __glibcxx_function_requires(_LessThanComparableConcept<_Tp>) //return __b < __a ? __b : __a; if (__b < __a) return __b; return __a; } /** * @brief This does what you think it does. * @ingroup sorting_algorithms * @param __a A thing of arbitrary type. * @param __b Another thing of arbitrary type. * @return The greater of the parameters. * * This is the simple classic generic implementation. It will work on * temporary expressions, since they are only evaluated once, unlike a * preprocessor macro. */ template<typename _Tp> _GLIBCXX14_CONSTEXPR inline const _Tp& max(const _Tp& __a, const _Tp& __b) { // concept requirements __glibcxx_function_requires(_LessThanComparableConcept<_Tp>) //return __a < __b ? __b : __a; if (__a < __b) return __b; return __a; } /** * @brief This does what you think it does. * @ingroup sorting_algorithms * @param __a A thing of arbitrary type. * @param __b Another thing of arbitrary type. * @param __comp A @link comparison_functors comparison functor@endlink. * @return The lesser of the parameters. * * This will work on temporary expressions, since they are only evaluated * once, unlike a preprocessor macro. */ template<typename _Tp, typename _Compare> _GLIBCXX14_CONSTEXPR inline const _Tp& min(const _Tp& __a, const _Tp& __b, _Compare __comp) { //return __comp(__b, __a) ? __b : __a; if (__comp(__b, __a)) return __b; return __a; } /** * @brief This does what you think it does. * @ingroup sorting_algorithms * @param __a A thing of arbitrary type. * @param __b Another thing of arbitrary type. * @param __comp A @link comparison_functors comparison functor@endlink. * @return The greater of the parameters. * * This will work on temporary expressions, since they are only evaluated * once, unlike a preprocessor macro. */ template<typename _Tp, typename _Compare> _GLIBCXX14_CONSTEXPR inline const _Tp& max(const _Tp& __a, const _Tp& __b, _Compare __comp) { //return __comp(__a, __b) ? __b : __a; if (__comp(__a, __b)) return __b; return __a; } // Fallback implementation of the function in bits/stl_iterator.h used to // remove the __normal_iterator wrapper. See copy, fill, ... template<typename _Iterator> inline _Iterator __niter_base(_Iterator __it) _GLIBCXX_NOEXCEPT_IF(std::is_nothrow_copy_constructible<_Iterator>::value) { return __it; } // Reverse the __niter_base transformation to get a // __normal_iterator back again (this assumes that __normal_iterator // is only used to wrap random access iterators, like pointers). template<typename _From, typename _To> inline _From __niter_wrap(_From __from, _To __res) { return __from + (__res - std::__niter_base(__from)); } // No need to wrap, iterator already has the right type. template<typename _Iterator> inline _Iterator __niter_wrap(const _Iterator&, _Iterator __res) { return __res; } // All of these auxiliary structs serve two purposes. (1) Replace // calls to copy with memmove whenever possible. (Memmove, not memcpy, // because the input and output ranges are permitted to overlap.) // (2) If we're using random access iterators, then write the loop as // a for loop with an explicit count. template<bool _IsMove, bool _IsSimple, typename _Category> struct __copy_move { template<typename _II, typename _OI> static _OI __copy_m(_II __first, _II __last, _OI __result) { for (; __first != __last; ++__result, (void)++__first) *__result = *__first; return __result; } }; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 318 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 template<typename _Category> struct __copy_move<true, false, _Category> { template<typename _II, typename _OI> static _OI __copy_m(_II __first, _II __last, _OI __result) { for (; __first != __last; ++__result, (void)++__first) *__result = std::move(*__first); return __result; } }; #endif # 331 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 template<> struct __copy_move<false, false, random_access_iterator_tag> { template<typename _II, typename _OI> static _OI __copy_m(_II __first, _II __last, _OI __result) { typedef typename iterator_traits<_II>::difference_type _Distance; for(_Distance __n = __last - __first; __n > 0; --__n) { *__result = *__first; ++__first; ++__result; } return __result; } }; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 351 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 template<> struct __copy_move<true, false, random_access_iterator_tag> { template<typename _II, typename _OI> static _OI __copy_m(_II __first, _II __last, _OI __result) { typedef typename iterator_traits<_II>::difference_type _Distance; for(_Distance __n = __last - __first; __n > 0; --__n) { *__result = std::move(*__first); ++__first; ++__result; } return __result; } }; #endif # 369 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 template<bool _IsMove> struct __copy_move<_IsMove, true, random_access_iterator_tag> { template<typename _Tp> static _Tp* __copy_m(const _Tp* __first, const _Tp* __last, _Tp* __result) { #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 378 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 using __assignable = conditional<_IsMove, is_move_assignable<_Tp>, is_copy_assignable<_Tp>>; // trivial types can have deleted assignment static_assert( __assignable::type::value, "type is not assignable" ); #endif # 384 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 const ptrdiff_t _Num = __last - __first; if (_Num) __builtin_memmove(__result, __first, sizeof(_Tp) * _Num); return __result + _Num; } }; template<bool _IsMove, typename _II, typename _OI> inline _OI __copy_move_a(_II __first, _II __last, _OI __result) { typedef typename iterator_traits<_II>::value_type _ValueTypeI; typedef typename iterator_traits<_OI>::value_type _ValueTypeO; typedef typename iterator_traits<_II>::iterator_category _Category; const bool __simple = (__is_trivially_copyable(_ValueTypeI) && __is_pointer<_II>::__value && __is_pointer<_OI>::__value && __are_same<_ValueTypeI, _ValueTypeO>::__value); return std::__copy_move<_IsMove, __simple, _Category>::__copy_m(__first, __last, __result); } // Helpers for streambuf iterators (either istream or ostream). // NB: avoid including <iosfwd>, relatively large. template<typename _CharT> struct char_traits; template<typename _CharT, typename _Traits> class istreambuf_iterator; template<typename _CharT, typename _Traits> class ostreambuf_iterator; template<bool _IsMove, typename _CharT> typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type __copy_move_a2(_CharT*, _CharT*, ostreambuf_iterator<_CharT, char_traits<_CharT> >); template<bool _IsMove, typename _CharT> typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type __copy_move_a2(const _CharT*, const _CharT*, ostreambuf_iterator<_CharT, char_traits<_CharT> >); template<bool _IsMove, typename _CharT> typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, _CharT*>::__type __copy_move_a2(istreambuf_iterator<_CharT, char_traits<_CharT> >, istreambuf_iterator<_CharT, char_traits<_CharT> >, _CharT*); template<bool _IsMove, typename _II, typename _OI> inline _OI __copy_move_a2(_II __first, _II __last, _OI __result) { return std::__niter_wrap(__result, std::__copy_move_a<_IsMove>(std::__niter_base(__first), std::__niter_base(__last), std::__niter_base(__result))); } /** * @brief Copies the range [first,last) into result. * @ingroup mutating_algorithms * @param __first An input iterator. * @param __last An input iterator. * @param __result An output iterator. * @return result + (last - first) * * This inline function will boil down to a call to @c memmove whenever * possible. Failing that, if random access iterators are passed, then the * loop count will be known (and therefore a candidate for compiler * optimizations such as unrolling). Result may not be contained within * [first,last); the copy_backward function should be used instead. * * Note that the end of the output range is permitted to be contained * within [first,last). */ template<typename _II, typename _OI> inline _OI copy(_II __first, _II __last, _OI __result) { // concept requirements __glibcxx_function_requires(_InputIteratorConcept<_II>) __glibcxx_function_requires(_OutputIteratorConcept<_OI, typename iterator_traits<_II>::value_type>) __glibcxx_requires_can_increment_range(__first, __last, __result); return std::__copy_move_a2<__is_move_iterator<_II>::__value> (std::__miter_base(__first), std::__miter_base(__last), __result); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 478 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 /** * @brief Moves the range [first,last) into result. * @ingroup mutating_algorithms * @param __first An input iterator. * @param __last An input iterator. * @param __result An output iterator. * @return result + (last - first) * * This inline function will boil down to a call to @c memmove whenever * possible. Failing that, if random access iterators are passed, then the * loop count will be known (and therefore a candidate for compiler * optimizations such as unrolling). Result may not be contained within * [first,last); the move_backward function should be used instead. * * Note that the end of the output range is permitted to be contained * within [first,last). */ template<typename _II, typename _OI> inline _OI move(_II __first, _II __last, _OI __result) { // concept requirements __glibcxx_function_requires(_InputIteratorConcept<_II>) __glibcxx_function_requires(_OutputIteratorConcept<_OI, typename iterator_traits<_II>::value_type>) __glibcxx_requires_can_increment_range(__first, __last, __result); return std::__copy_move_a2<true>(std::__miter_base(__first), std::__miter_base(__last), __result); } #define _GLIBCXX_MOVE3(_Tp, _Up, _Vp) std::move(_Tp, _Up, _Vp) #else # 511 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 #define _GLIBCXX_MOVE3(_Tp, _Up, _Vp) std::copy(_Tp, _Up, _Vp) #endif # 513 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 template<bool, bool, typename> struct __copy_move_backward { template<typename _BI1, typename _BI2> static _BI2 __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) { while (__first != __last) *--__result = *--__last; return __result; } }; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 528 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 template<typename _Category> struct __copy_move_backward<true, false, _Category> { template<typename _BI1, typename _BI2> static _BI2 __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) { while (__first != __last) *--__result = std::move(*--__last); return __result; } }; #endif # 541 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 template<> struct __copy_move_backward<false, false, random_access_iterator_tag> { template<typename _BI1, typename _BI2> static _BI2 __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) { typename iterator_traits<_BI1>::difference_type __n; for (__n = __last - __first; __n > 0; --__n) *--__result = *--__last; return __result; } }; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 557 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 template<> struct __copy_move_backward<true, false, random_access_iterator_tag> { template<typename _BI1, typename _BI2> static _BI2 __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) { typename iterator_traits<_BI1>::difference_type __n; for (__n = __last - __first; __n > 0; --__n) *--__result = std::move(*--__last); return __result; } }; #endif # 571 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 template<bool _IsMove> struct __copy_move_backward<_IsMove, true, random_access_iterator_tag> { template<typename _Tp> static _Tp* __copy_move_b(const _Tp* __first, const _Tp* __last, _Tp* __result) { #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 580 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 using __assignable = conditional<_IsMove, is_move_assignable<_Tp>, is_copy_assignable<_Tp>>; // trivial types can have deleted assignment static_assert( __assignable::type::value, "type is not assignable" ); #endif # 586 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 const ptrdiff_t _Num = __last - __first; if (_Num) __builtin_memmove(__result - _Num, __first, sizeof(_Tp) * _Num); return __result - _Num; } }; template<bool _IsMove, typename _BI1, typename _BI2> inline _BI2 __copy_move_backward_a(_BI1 __first, _BI1 __last, _BI2 __result) { typedef typename iterator_traits<_BI1>::value_type _ValueType1; typedef typename iterator_traits<_BI2>::value_type _ValueType2; typedef typename iterator_traits<_BI1>::iterator_category _Category; const bool __simple = (__is_trivially_copyable(_ValueType1) && __is_pointer<_BI1>::__value && __is_pointer<_BI2>::__value && __are_same<_ValueType1, _ValueType2>::__value); return std::__copy_move_backward<_IsMove, __simple, _Category>::__copy_move_b(__first, __last, __result); } template<bool _IsMove, typename _BI1, typename _BI2> inline _BI2 __copy_move_backward_a2(_BI1 __first, _BI1 __last, _BI2 __result) { return std::__niter_wrap(__result, std::__copy_move_backward_a<_IsMove> (std::__niter_base(__first), std::__niter_base(__last), std::__niter_base(__result))); } /** * @brief Copies the range [first,last) into result. * @ingroup mutating_algorithms * @param __first A bidirectional iterator. * @param __last A bidirectional iterator. * @param __result A bidirectional iterator. * @return result - (last - first) * * The function has the same effect as copy, but starts at the end of the * range and works its way to the start, returning the start of the result. * This inline function will boil down to a call to @c memmove whenever * possible. Failing that, if random access iterators are passed, then the * loop count will be known (and therefore a candidate for compiler * optimizations such as unrolling). * * Result may not be in the range (first,last]. Use copy instead. Note * that the start of the output range may overlap [first,last). */ template<typename _BI1, typename _BI2> inline _BI2 copy_backward(_BI1 __first, _BI1 __last, _BI2 __result) { // concept requirements __glibcxx_function_requires(_BidirectionalIteratorConcept<_BI1>) __glibcxx_function_requires(_Mutable_BidirectionalIteratorConcept<_BI2>) __glibcxx_function_requires(_ConvertibleConcept< typename iterator_traits<_BI1>::value_type, typename iterator_traits<_BI2>::value_type>) __glibcxx_requires_can_decrement_range(__first, __last, __result); return std::__copy_move_backward_a2<__is_move_iterator<_BI1>::__value> (std::__miter_base(__first), std::__miter_base(__last), __result); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 656 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 /** * @brief Moves the range [first,last) into result. * @ingroup mutating_algorithms * @param __first A bidirectional iterator. * @param __last A bidirectional iterator. * @param __result A bidirectional iterator. * @return result - (last - first) * * The function has the same effect as move, but starts at the end of the * range and works its way to the start, returning the start of the result. * This inline function will boil down to a call to @c memmove whenever * possible. Failing that, if random access iterators are passed, then the * loop count will be known (and therefore a candidate for compiler * optimizations such as unrolling). * * Result may not be in the range (first,last]. Use move instead. Note * that the start of the output range may overlap [first,last). */ template<typename _BI1, typename _BI2> inline _BI2 move_backward(_BI1 __first, _BI1 __last, _BI2 __result) { // concept requirements __glibcxx_function_requires(_BidirectionalIteratorConcept<_BI1>) __glibcxx_function_requires(_Mutable_BidirectionalIteratorConcept<_BI2>) __glibcxx_function_requires(_ConvertibleConcept< typename iterator_traits<_BI1>::value_type, typename iterator_traits<_BI2>::value_type>) __glibcxx_requires_can_decrement_range(__first, __last, __result); return std::__copy_move_backward_a2<true>(std::__miter_base(__first), std::__miter_base(__last), __result); } #define _GLIBCXX_MOVE_BACKWARD3(_Tp, _Up, _Vp) std::move_backward(_Tp, _Up, _Vp) #else # 693 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 #define _GLIBCXX_MOVE_BACKWARD3(_Tp, _Up, _Vp) std::copy_backward(_Tp, _Up, _Vp) #endif # 695 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 template<typename _ForwardIterator, typename _Tp> inline typename __gnu_cxx::__enable_if<!__is_scalar<_Tp>::__value, void>::__type __fill_a(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) { for (; __first != __last; ++__first) *__first = __value; } template<typename _ForwardIterator, typename _Tp> inline typename __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, void>::__type __fill_a(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) { const _Tp __tmp = __value; for (; __first != __last; ++__first) *__first = __tmp; } // Specialization: for char types we can use memset. template<typename _Tp> inline typename __gnu_cxx::__enable_if<__is_byte<_Tp>::__value, void>::__type __fill_a(_Tp* __first, _Tp* __last, const _Tp& __c) { const _Tp __tmp = __c; if (const size_t __len = __last - __first) __builtin_memset(__first, static_cast<unsigned char>(__tmp), __len); } /** * @brief Fills the range [first,last) with copies of value. * @ingroup mutating_algorithms * @param __first A forward iterator. * @param __last A forward iterator. * @param __value A reference-to-const of arbitrary type. * @return Nothing. * * This function fills a range with copies of the same value. For char * types filling contiguous areas of memory, this becomes an inline call * to @c memset or @c wmemset. */ template<typename _ForwardIterator, typename _Tp> inline void fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) { // concept requirements __glibcxx_function_requires(_Mutable_ForwardIteratorConcept< _ForwardIterator>) __glibcxx_requires_valid_range(__first, __last); std::__fill_a(std::__niter_base(__first), std::__niter_base(__last), __value); } template<typename _OutputIterator, typename _Size, typename _Tp> inline typename __gnu_cxx::__enable_if<!__is_scalar<_Tp>::__value, _OutputIterator>::__type __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value) { for (__decltype(__n + 0) __niter = __n; __niter > 0; --__niter, (void) ++__first) *__first = __value; return __first; } template<typename _OutputIterator, typename _Size, typename _Tp> inline typename __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, _OutputIterator>::__type __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value) { const _Tp __tmp = __value; for (__decltype(__n + 0) __niter = __n; __niter > 0; --__niter, (void) ++__first) *__first = __tmp; return __first; } template<typename _Size, typename _Tp> inline typename __gnu_cxx::__enable_if<__is_byte<_Tp>::__value, _Tp*>::__type __fill_n_a(_Tp* __first, _Size __n, const _Tp& __c) { std::__fill_a(__first, __first + __n, __c); return __first + __n; } /** * @brief Fills the range [first,first+n) with copies of value. * @ingroup mutating_algorithms * @param __first An output iterator. * @param __n The count of copies to perform. * @param __value A reference-to-const of arbitrary type. * @return The iterator at first+n. * * This function fills a range with copies of the same value. For char * types filling contiguous areas of memory, this becomes an inline call * to @c memset or @ wmemset. * * _GLIBCXX_RESOLVE_LIB_DEFECTS * DR 865. More algorithms that throw away information */ template<typename _OI, typename _Size, typename _Tp> inline _OI fill_n(_OI __first, _Size __n, const _Tp& __value) { // concept requirements __glibcxx_function_requires(_OutputIteratorConcept<_OI, _Tp>) __glibcxx_requires_can_increment(__first, __n); return std::__niter_wrap(__first, std::__fill_n_a(std::__niter_base(__first), __n, __value)); } template<bool _BoolType> struct __equal { template<typename _II1, typename _II2> static bool equal(_II1 __first1, _II1 __last1, _II2 __first2) { for (; __first1 != __last1; ++__first1, (void) ++__first2) if (!(*__first1 == *__first2)) return false; return true; } }; template<> struct __equal<true> { template<typename _Tp> static bool equal(const _Tp* __first1, const _Tp* __last1, const _Tp* __first2) { if (const size_t __len = (__last1 - __first1)) return !__builtin_memcmp(__first1, __first2, sizeof(_Tp) * __len); return true; } }; template<typename _II1, typename _II2> inline bool __equal_aux(_II1 __first1, _II1 __last1, _II2 __first2) { typedef typename iterator_traits<_II1>::value_type _ValueType1; typedef typename iterator_traits<_II2>::value_type _ValueType2; const bool __simple = ((__is_integer<_ValueType1>::__value || __is_pointer<_ValueType1>::__value) && __is_pointer<_II1>::__value && __is_pointer<_II2>::__value && __are_same<_ValueType1, _ValueType2>::__value); return std::__equal<__simple>::equal(__first1, __last1, __first2); } template<typename, typename> struct __lc_rai { template<typename _II1, typename _II2> static _II1 __newlast1(_II1, _II1 __last1, _II2, _II2) { return __last1; } template<typename _II> static bool __cnd2(_II __first, _II __last) { return __first != __last; } }; template<> struct __lc_rai<random_access_iterator_tag, random_access_iterator_tag> { template<typename _RAI1, typename _RAI2> static _RAI1 __newlast1(_RAI1 __first1, _RAI1 __last1, _RAI2 __first2, _RAI2 __last2) { const typename iterator_traits<_RAI1>::difference_type __diff1 = __last1 - __first1; const typename iterator_traits<_RAI2>::difference_type __diff2 = __last2 - __first2; return __diff2 < __diff1 ? __first1 + __diff2 : __last1; } template<typename _RAI> static bool __cnd2(_RAI, _RAI) { return true; } }; template<typename _II1, typename _II2, typename _Compare> bool __lexicographical_compare_impl(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2, _Compare __comp) { typedef typename iterator_traits<_II1>::iterator_category _Category1; typedef typename iterator_traits<_II2>::iterator_category _Category2; typedef std::__lc_rai<_Category1, _Category2> __rai_type; __last1 = __rai_type::__newlast1(__first1, __last1, __first2, __last2); for (; __first1 != __last1 && __rai_type::__cnd2(__first2, __last2); ++__first1, (void)++__first2) { if (__comp(__first1, __first2)) return true; if (__comp(__first2, __first1)) return false; } return __first1 == __last1 && __first2 != __last2; } template<bool _BoolType> struct __lexicographical_compare { template<typename _II1, typename _II2> static bool __lc(_II1, _II1, _II2, _II2); }; template<bool _BoolType> template<typename _II1, typename _II2> bool __lexicographical_compare<_BoolType>:: __lc(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) { return std::__lexicographical_compare_impl(__first1, __last1, __first2, __last2, __gnu_cxx::__ops::__iter_less_iter()); } template<> struct __lexicographical_compare<true> { template<typename _Tp, typename _Up> static bool __lc(const _Tp* __first1, const _Tp* __last1, const _Up* __first2, const _Up* __last2) { const size_t __len1 = __last1 - __first1; const size_t __len2 = __last2 - __first2; if (const size_t __len = std::min(__len1, __len2)) if (int __result = __builtin_memcmp(__first1, __first2, __len)) return __result < 0; return __len1 < __len2; } }; template<typename _II1, typename _II2> inline bool __lexicographical_compare_aux(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) { typedef typename iterator_traits<_II1>::value_type _ValueType1; typedef typename iterator_traits<_II2>::value_type _ValueType2; const bool __simple = (__is_byte<_ValueType1>::__value && __is_byte<_ValueType2>::__value && !__gnu_cxx::__numeric_traits<_ValueType1>::__is_signed && !__gnu_cxx::__numeric_traits<_ValueType2>::__is_signed && __is_pointer<_II1>::__value && __is_pointer<_II2>::__value); return std::__lexicographical_compare<__simple>::__lc(__first1, __last1, __first2, __last2); } template<typename _ForwardIterator, typename _Tp, typename _Compare> _ForwardIterator __lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __val, _Compare __comp) { typedef typename iterator_traits<_ForwardIterator>::difference_type _DistanceType; _DistanceType __len = std::distance(__first, __last); while (__len > 0) { _DistanceType __half = __len >> 1; _ForwardIterator __middle = __first; std::advance(__middle, __half); if (__comp(__middle, __val)) { __first = __middle; ++__first; __len = __len - __half - 1; } else __len = __half; } return __first; } /** * @brief Finds the first position in which @a val could be inserted * without changing the ordering. * @param __first An iterator. * @param __last Another iterator. * @param __val The search term. * @return An iterator pointing to the first element <em>not less * than</em> @a val, or end() if every element is less than * @a val. * @ingroup binary_search_algorithms */ template<typename _ForwardIterator, typename _Tp> inline _ForwardIterator lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __val) { // concept requirements __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>) __glibcxx_function_requires(_LessThanOpConcept< typename iterator_traits<_ForwardIterator>::value_type, _Tp>) __glibcxx_requires_partitioned_lower(__first, __last, __val); return std::__lower_bound(__first, __last, __val, __gnu_cxx::__ops::__iter_less_val()); } /// This is a helper function for the sort routines and for random.tcc. // Precondition: __n > 0. inline _GLIBCXX_CONSTEXPR int __lg(int __n) { return (int)sizeof(int) * __CHAR_BIT__ - 1 - __builtin_clz(__n); } inline _GLIBCXX_CONSTEXPR unsigned __lg(unsigned __n) { return (int)sizeof(int) * __CHAR_BIT__ - 1 - __builtin_clz(__n); } inline _GLIBCXX_CONSTEXPR long __lg(long __n) { return (int)sizeof(long) * __CHAR_BIT__ - 1 - __builtin_clzl(__n); } inline _GLIBCXX_CONSTEXPR unsigned long __lg(unsigned long __n) { return (int)sizeof(long) * __CHAR_BIT__ - 1 - __builtin_clzl(__n); } inline _GLIBCXX_CONSTEXPR long long __lg(long long __n) { return (int)sizeof(long long) * __CHAR_BIT__ - 1 - __builtin_clzll(__n); } inline _GLIBCXX_CONSTEXPR unsigned long long __lg(unsigned long long __n) { return (int)sizeof(long long) * __CHAR_BIT__ - 1 - __builtin_clzll(__n); } _GLIBCXX_BEGIN_NAMESPACE_ALGO /** * @brief Tests a range for element-wise equality. * @ingroup non_mutating_algorithms * @param __first1 An input iterator. * @param __last1 An input iterator. * @param __first2 An input iterator. * @return A boolean true or false. * * This compares the elements of two ranges using @c == and returns true or * false depending on whether all of the corresponding elements of the * ranges are equal. */ template<typename _II1, typename _II2> inline bool equal(_II1 __first1, _II1 __last1, _II2 __first2) { // concept requirements __glibcxx_function_requires(_InputIteratorConcept<_II1>) __glibcxx_function_requires(_InputIteratorConcept<_II2>) __glibcxx_function_requires(_EqualOpConcept< typename iterator_traits<_II1>::value_type, typename iterator_traits<_II2>::value_type>) __glibcxx_requires_can_increment_range(__first1, __last1, __first2); return std::__equal_aux(std::__niter_base(__first1), std::__niter_base(__last1), std::__niter_base(__first2)); } /** * @brief Tests a range for element-wise equality. * @ingroup non_mutating_algorithms * @param __first1 An input iterator. * @param __last1 An input iterator. * @param __first2 An input iterator. * @param __binary_pred A binary predicate @link functors * functor@endlink. * @return A boolean true or false. * * This compares the elements of two ranges using the binary_pred * parameter, and returns true or * false depending on whether all of the corresponding elements of the * ranges are equal. */ template<typename _IIter1, typename _IIter2, typename _BinaryPredicate> inline bool equal(_IIter1 __first1, _IIter1 __last1, _IIter2 __first2, _BinaryPredicate __binary_pred) { // concept requirements __glibcxx_function_requires(_InputIteratorConcept<_IIter1>) __glibcxx_function_requires(_InputIteratorConcept<_IIter2>) __glibcxx_requires_valid_range(__first1, __last1); for (; __first1 != __last1; ++__first1, (void)++__first2) if (!bool(__binary_pred(*__first1, *__first2))) return false; return true; } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1106 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 // 4-iterator version of std::equal<It1, It2> for use in C++11. template<typename _II1, typename _II2> inline bool __equal4(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) { using _RATag = random_access_iterator_tag; using _Cat1 = typename iterator_traits<_II1>::iterator_category; using _Cat2 = typename iterator_traits<_II2>::iterator_category; using _RAIters = __and_<is_same<_Cat1, _RATag>, is_same<_Cat2, _RATag>>; if (_RAIters()) { auto __d1 = std::distance(__first1, __last1); auto __d2 = std::distance(__first2, __last2); if (__d1 != __d2) return false; return _GLIBCXX_STD_A::equal(__first1, __last1, __first2); } for (; __first1 != __last1 && __first2 != __last2; ++__first1, (void)++__first2) if (!(*__first1 == *__first2)) return false; return __first1 == __last1 && __first2 == __last2; } // 4-iterator version of std::equal<It1, It2, BinaryPred> for use in C++11. template<typename _II1, typename _II2, typename _BinaryPredicate> inline bool __equal4(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2, _BinaryPredicate __binary_pred) { using _RATag = random_access_iterator_tag; using _Cat1 = typename iterator_traits<_II1>::iterator_category; using _Cat2 = typename iterator_traits<_II2>::iterator_category; using _RAIters = __and_<is_same<_Cat1, _RATag>, is_same<_Cat2, _RATag>>; if (_RAIters()) { auto __d1 = std::distance(__first1, __last1); auto __d2 = std::distance(__first2, __last2); if (__d1 != __d2) return false; return _GLIBCXX_STD_A::equal(__first1, __last1, __first2, __binary_pred); } for (; __first1 != __last1 && __first2 != __last2; ++__first1, (void)++__first2) if (!bool(__binary_pred(*__first1, *__first2))) return false; return __first1 == __last1 && __first2 == __last2; } #endif // C++11 # 1158 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1160 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 #define __cpp_lib_robust_nonmodifying_seq_ops 201304 /** * @brief Tests a range for element-wise equality. * @ingroup non_mutating_algorithms * @param __first1 An input iterator. * @param __last1 An input iterator. * @param __first2 An input iterator. * @param __last2 An input iterator. * @return A boolean true or false. * * This compares the elements of two ranges using @c == and returns true or * false depending on whether all of the corresponding elements of the * ranges are equal. */ template<typename _II1, typename _II2> inline bool equal(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) { // concept requirements __glibcxx_function_requires(_InputIteratorConcept<_II1>) __glibcxx_function_requires(_InputIteratorConcept<_II2>) __glibcxx_function_requires(_EqualOpConcept< typename iterator_traits<_II1>::value_type, typename iterator_traits<_II2>::value_type>) __glibcxx_requires_valid_range(__first1, __last1); __glibcxx_requires_valid_range(__first2, __last2); return _GLIBCXX_STD_A::__equal4(__first1, __last1, __first2, __last2); } /** * @brief Tests a range for element-wise equality. * @ingroup non_mutating_algorithms * @param __first1 An input iterator. * @param __last1 An input iterator. * @param __first2 An input iterator. * @param __last2 An input iterator. * @param __binary_pred A binary predicate @link functors * functor@endlink. * @return A boolean true or false. * * This compares the elements of two ranges using the binary_pred * parameter, and returns true or * false depending on whether all of the corresponding elements of the * ranges are equal. */ template<typename _IIter1, typename _IIter2, typename _BinaryPredicate> inline bool equal(_IIter1 __first1, _IIter1 __last1, _IIter2 __first2, _IIter2 __last2, _BinaryPredicate __binary_pred) { // concept requirements __glibcxx_function_requires(_InputIteratorConcept<_IIter1>) __glibcxx_function_requires(_InputIteratorConcept<_IIter2>) __glibcxx_requires_valid_range(__first1, __last1); __glibcxx_requires_valid_range(__first2, __last2); return _GLIBCXX_STD_A::__equal4(__first1, __last1, __first2, __last2, __binary_pred); } #endif // C++14 # 1223 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 /** * @brief Performs @b dictionary comparison on ranges. * @ingroup sorting_algorithms * @param __first1 An input iterator. * @param __last1 An input iterator. * @param __first2 An input iterator. * @param __last2 An input iterator. * @return A boolean true or false. * * <em>Returns true if the sequence of elements defined by the range * [first1,last1) is lexicographically less than the sequence of elements * defined by the range [first2,last2). Returns false otherwise.</em> * (Quoted from [25.3.8]/1.) If the iterators are all character pointers, * then this is an inline call to @c memcmp. */ template<typename _II1, typename _II2> inline bool lexicographical_compare(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) { #ifdef _GLIBCXX_CONCEPT_CHECKS // concept requirements typedef typename iterator_traits<_II1>::value_type _ValueType1; typedef typename iterator_traits<_II2>::value_type _ValueType2; #endif # 1249 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 __glibcxx_function_requires(_InputIteratorConcept<_II1>) __glibcxx_function_requires(_InputIteratorConcept<_II2>) __glibcxx_function_requires(_LessThanOpConcept<_ValueType1, _ValueType2>) __glibcxx_function_requires(_LessThanOpConcept<_ValueType2, _ValueType1>) __glibcxx_requires_valid_range(__first1, __last1); __glibcxx_requires_valid_range(__first2, __last2); return std::__lexicographical_compare_aux(std::__niter_base(__first1), std::__niter_base(__last1), std::__niter_base(__first2), std::__niter_base(__last2)); } /** * @brief Performs @b dictionary comparison on ranges. * @ingroup sorting_algorithms * @param __first1 An input iterator. * @param __last1 An input iterator. * @param __first2 An input iterator. * @param __last2 An input iterator. * @param __comp A @link comparison_functors comparison functor@endlink. * @return A boolean true or false. * * The same as the four-parameter @c lexicographical_compare, but uses the * comp parameter instead of @c <. */ template<typename _II1, typename _II2, typename _Compare> inline bool lexicographical_compare(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2, _Compare __comp) { // concept requirements __glibcxx_function_requires(_InputIteratorConcept<_II1>) __glibcxx_function_requires(_InputIteratorConcept<_II2>) __glibcxx_requires_valid_range(__first1, __last1); __glibcxx_requires_valid_range(__first2, __last2); return std::__lexicographical_compare_impl (__first1, __last1, __first2, __last2, __gnu_cxx::__ops::__iter_comp_iter(__comp)); } template<typename _InputIterator1, typename _InputIterator2, typename _BinaryPredicate> pair<_InputIterator1, _InputIterator2> __mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _BinaryPredicate __binary_pred) { while (__first1 != __last1 && __binary_pred(__first1, __first2)) { ++__first1; ++__first2; } return pair<_InputIterator1, _InputIterator2>(__first1, __first2); } /** * @brief Finds the places in ranges which don't match. * @ingroup non_mutating_algorithms * @param __first1 An input iterator. * @param __last1 An input iterator. * @param __first2 An input iterator. * @return A pair of iterators pointing to the first mismatch. * * This compares the elements of two ranges using @c == and returns a pair * of iterators. The first iterator points into the first range, the * second iterator points into the second range, and the elements pointed * to by the iterators are not equal. */ template<typename _InputIterator1, typename _InputIterator2> inline pair<_InputIterator1, _InputIterator2> mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2) { // concept requirements __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>) __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>) __glibcxx_function_requires(_EqualOpConcept< typename iterator_traits<_InputIterator1>::value_type, typename iterator_traits<_InputIterator2>::value_type>) __glibcxx_requires_valid_range(__first1, __last1); return _GLIBCXX_STD_A::__mismatch(__first1, __last1, __first2, __gnu_cxx::__ops::__iter_equal_to_iter()); } /** * @brief Finds the places in ranges which don't match. * @ingroup non_mutating_algorithms * @param __first1 An input iterator. * @param __last1 An input iterator. * @param __first2 An input iterator. * @param __binary_pred A binary predicate @link functors * functor@endlink. * @return A pair of iterators pointing to the first mismatch. * * This compares the elements of two ranges using the binary_pred * parameter, and returns a pair * of iterators. The first iterator points into the first range, the * second iterator points into the second range, and the elements pointed * to by the iterators are not equal. */ template<typename _InputIterator1, typename _InputIterator2, typename _BinaryPredicate> inline pair<_InputIterator1, _InputIterator2> mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _BinaryPredicate __binary_pred) { // concept requirements __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>) __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>) __glibcxx_requires_valid_range(__first1, __last1); return _GLIBCXX_STD_A::__mismatch(__first1, __last1, __first2, __gnu_cxx::__ops::__iter_comp_iter(__binary_pred)); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1367 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 template<typename _InputIterator1, typename _InputIterator2, typename _BinaryPredicate> pair<_InputIterator1, _InputIterator2> __mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _BinaryPredicate __binary_pred) { while (__first1 != __last1 && __first2 != __last2 && __binary_pred(__first1, __first2)) { ++__first1; ++__first2; } return pair<_InputIterator1, _InputIterator2>(__first1, __first2); } /** * @brief Finds the places in ranges which don't match. * @ingroup non_mutating_algorithms * @param __first1 An input iterator. * @param __last1 An input iterator. * @param __first2 An input iterator. * @param __last2 An input iterator. * @return A pair of iterators pointing to the first mismatch. * * This compares the elements of two ranges using @c == and returns a pair * of iterators. The first iterator points into the first range, the * second iterator points into the second range, and the elements pointed * to by the iterators are not equal. */ template<typename _InputIterator1, typename _InputIterator2> inline pair<_InputIterator1, _InputIterator2> mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2) { // concept requirements __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>) __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>) __glibcxx_function_requires(_EqualOpConcept< typename iterator_traits<_InputIterator1>::value_type, typename iterator_traits<_InputIterator2>::value_type>) __glibcxx_requires_valid_range(__first1, __last1); __glibcxx_requires_valid_range(__first2, __last2); return _GLIBCXX_STD_A::__mismatch(__first1, __last1, __first2, __last2, __gnu_cxx::__ops::__iter_equal_to_iter()); } /** * @brief Finds the places in ranges which don't match. * @ingroup non_mutating_algorithms * @param __first1 An input iterator. * @param __last1 An input iterator. * @param __first2 An input iterator. * @param __last2 An input iterator. * @param __binary_pred A binary predicate @link functors * functor@endlink. * @return A pair of iterators pointing to the first mismatch. * * This compares the elements of two ranges using the binary_pred * parameter, and returns a pair * of iterators. The first iterator points into the first range, the * second iterator points into the second range, and the elements pointed * to by the iterators are not equal. */ template<typename _InputIterator1, typename _InputIterator2, typename _BinaryPredicate> inline pair<_InputIterator1, _InputIterator2> mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _BinaryPredicate __binary_pred) { // concept requirements __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>) __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>) __glibcxx_requires_valid_range(__first1, __last1); __glibcxx_requires_valid_range(__first2, __last2); return _GLIBCXX_STD_A::__mismatch(__first1, __last1, __first2, __last2, __gnu_cxx::__ops::__iter_comp_iter(__binary_pred)); } #endif # 1450 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 _GLIBCXX_END_NAMESPACE_ALGO _GLIBCXX_END_NAMESPACE_VERSION } // namespace std // NB: This file is included within many other C++ includes, as a way // of getting the base algorithms. So, make sure that parallel bits // come in too if requested. #ifdef _GLIBCXX_PARALLEL #if 0 /* expanded by -frewrite-includes */ # include <parallel/algobase.h> #endif /* expanded by -frewrite-includes */ # 1459 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 # 1460 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 #endif # 1461 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 #endif # 1463 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_algobase.h" 3 # 61 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/deque" 2 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 62 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/deque" 3 #if 0 /* expanded by -frewrite-includes */ # include <bits/stl_algo.h> // For remove and remove_if #endif /* expanded by -frewrite-includes */ # 62 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/deque" 3 # 63 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/deque" 3 #endif // C++20 # 64 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/deque" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/allocator.h> #endif /* expanded by -frewrite-includes */ # 64 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/deque" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/allocator.h" 1 3 // Allocators -*- C++ -*- // Copyright (C) 2001-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /* * Copyright (c) 1996-1997 * Silicon Graphics Computer Systems, Inc. * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Silicon Graphics makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. */ /** @file bits/allocator.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{memory} */ #ifndef _ALLOCATOR_H #define _ALLOCATOR_H 1 #if 0 /* expanded by -frewrite-includes */ #include <bits/c++allocator.h> // Define the base class to std::allocator. #endif /* expanded by -frewrite-includes */ # 46 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/allocator.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++allocator.h" 1 3 // Base to std::allocator -*- C++ -*- // Copyright (C) 2004-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file bits/c++allocator.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{memory} */ #ifndef _GLIBCXX_CXX_ALLOCATOR_H #define _GLIBCXX_CXX_ALLOCATOR_H 1 #if 0 /* expanded by -frewrite-includes */ #include <ext/new_allocator.h> #endif /* expanded by -frewrite-includes */ # 33 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++allocator.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/new_allocator.h" 1 3 // Allocator that wraps operator new -*- C++ -*- // Copyright (C) 2001-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file ext/new_allocator.h * This file is a GNU extension to the Standard C++ Library. */ #ifndef _NEW_ALLOCATOR_H #define _NEW_ALLOCATOR_H 1 #if 0 /* expanded by -frewrite-includes */ #include <bits/c++config.h> #endif /* expanded by -frewrite-includes */ # 32 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/new_allocator.h" 3 # 33 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/new_allocator.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <new> #endif /* expanded by -frewrite-includes */ # 33 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/new_allocator.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 1 3 // The -*- C++ -*- dynamic memory management header. // Copyright (C) 1994-2019 Free Software Foundation, Inc. // This file is part of GCC. // // GCC is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3, or (at your option) // any later version. // // GCC is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file new * This is a Standard C++ Library header. * * The header @c new defines several functions to manage dynamic memory and * handling memory allocation errors; see * http://gcc.gnu.org/onlinedocs/libstdc++/18_support/howto.html#4 for more. */ #ifndef _NEW #define _NEW #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 38 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/c++config.h> #endif /* expanded by -frewrite-includes */ # 39 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 # 40 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 #if 0 /* expanded by -frewrite-includes */ #include <exception> #endif /* expanded by -frewrite-includes */ # 40 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/exception" 1 3 // Exception Handling support header for -*- C++ -*- // Copyright (C) 1995-2019 Free Software Foundation, Inc. // // This file is part of GCC. // // GCC is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3, or (at your option) // any later version. // // GCC is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file exception * This is a Standard C++ Library header. */ #ifndef __EXCEPTION__ #define __EXCEPTION__ #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 34 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/exception" 3 #pragma GCC visibility push(default) #if 0 /* expanded by -frewrite-includes */ #include <bits/c++config.h> #endif /* expanded by -frewrite-includes */ # 37 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/exception" 3 # 38 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/exception" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/exception.h> #endif /* expanded by -frewrite-includes */ # 38 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/exception" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/exception.h" 1 3 // Exception Handling support header for -*- C++ -*- // Copyright (C) 2016-2019 Free Software Foundation, Inc. // // This file is part of GCC. // // GCC is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3, or (at your option) // any later version. // // GCC is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file bits/exception.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. */ #ifndef __EXCEPTION_H #define __EXCEPTION_H 1 #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 35 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/exception.h" 3 #pragma GCC visibility push(default) #if 0 /* expanded by -frewrite-includes */ #include <bits/c++config.h> #endif /* expanded by -frewrite-includes */ # 38 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/exception.h" 3 # 39 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/exception.h" 3 extern "C++" { namespace std { /** * @defgroup exceptions Exceptions * @ingroup diagnostics * * Classes and functions for reporting errors via exceptions. * @{ */ /** * @brief Base class for all library exceptions. * * This is the base class for all exceptions thrown by the standard * library, and by certain language expressions. You are free to derive * your own %exception classes, or use a different hierarchy, or to * throw non-class data (e.g., fundamental types). */ class exception { public: exception() _GLIBCXX_NOTHROW { } virtual ~exception() _GLIBCXX_TXN_SAFE_DYN _GLIBCXX_NOTHROW; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 66 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/exception.h" 3 exception(const exception&) = default; exception& operator=(const exception&) = default; exception(exception&&) = default; exception& operator=(exception&&) = default; #endif # 71 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/exception.h" 3 /** Returns a C-style character string describing the general cause * of the current error. */ virtual const char* what() const _GLIBCXX_TXN_SAFE_DYN _GLIBCXX_NOTHROW; }; /// @} } // namespace std } #pragma GCC visibility pop #endif # 87 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/exception.h" 3 # 39 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/exception" 2 3 extern "C++" { namespace std { /** If an %exception is thrown which is not listed in a function's * %exception specification, one of these may be thrown. */ class bad_exception : public exception { public: bad_exception() _GLIBCXX_USE_NOEXCEPT { } // This declaration is not useless: // http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_6.html#SEC118 virtual ~bad_exception() _GLIBCXX_TXN_SAFE_DYN _GLIBCXX_USE_NOEXCEPT; // See comment in eh_exception.cc. virtual const char* what() const _GLIBCXX_TXN_SAFE_DYN _GLIBCXX_USE_NOEXCEPT; }; /// If you write a replacement %terminate handler, it must be of this type. typedef void (*terminate_handler) (); /// If you write a replacement %unexpected handler, it must be of this type. typedef void (*unexpected_handler) (); /// Takes a new handler function as an argument, returns the old function. terminate_handler set_terminate(terminate_handler) _GLIBCXX_USE_NOEXCEPT; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 70 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/exception" 3 /// Return the current terminate handler. terminate_handler get_terminate() noexcept; #endif # 73 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/exception" 3 /** The runtime will call this function if %exception handling must be * abandoned for any reason. It can also be called by the user. */ void terminate() _GLIBCXX_USE_NOEXCEPT __attribute__ ((__noreturn__)); /// Takes a new handler function as an argument, returns the old function. unexpected_handler set_unexpected(unexpected_handler) _GLIBCXX_USE_NOEXCEPT; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 82 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/exception" 3 /// Return the current unexpected handler. unexpected_handler get_unexpected() noexcept; #endif # 85 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/exception" 3 /** The runtime will call this function if an %exception is thrown which * violates the function's %exception specification. */ void unexpected() __attribute__ ((__noreturn__)); /** [18.6.4]/1: 'Returns true after completing evaluation of a * throw-expression until either completing initialization of the * exception-declaration in the matching handler or entering @c unexpected() * due to the throw; or after entering @c terminate() for any reason * other than an explicit call to @c terminate(). [Note: This includes * stack unwinding [15.2]. end note]' * * 2: 'When @c uncaught_exception() is true, throwing an * %exception can result in a call of @c terminate() * (15.5.1).' */ _GLIBCXX17_DEPRECATED bool uncaught_exception() _GLIBCXX_USE_NOEXCEPT __attribute__ ((__pure__)); #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L || !defined(__STRICT_ANSI__) // c++17 or gnu++98 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 105 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/exception" 3 #define __cpp_lib_uncaught_exceptions 201411L /// The number of uncaught exceptions. int uncaught_exceptions() _GLIBCXX_USE_NOEXCEPT __attribute__ ((__pure__)); #endif # 109 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/exception" 3 /// @} group exceptions } // namespace std namespace __gnu_cxx { _GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @brief A replacement for the standard terminate_handler which * prints more information about the terminating exception (if any) * on stderr. * * @ingroup exceptions * * Call * @code * std::set_terminate(__gnu_cxx::__verbose_terminate_handler) * @endcode * to use. For more info, see * http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt02ch06s02.html * * In 3.4 and later, this is on by default. */ void __verbose_terminate_handler(); _GLIBCXX_END_NAMESPACE_VERSION } // namespace } // extern "C++" #pragma GCC visibility pop #if 0 /* disabled by -frewrite-includes */ #if (__cplusplus >= 201103L) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 143 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/exception" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/exception_ptr.h> #endif /* expanded by -frewrite-includes */ # 143 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/exception" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/exception_ptr.h" 1 3 // Exception Handling support header (exception_ptr class) for -*- C++ -*- // Copyright (C) 2008-2019 Free Software Foundation, Inc. // // This file is part of GCC. // // GCC is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3, or (at your option) // any later version. // // GCC is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file bits/exception_ptr.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{exception} */ #ifndef _EXCEPTION_PTR_H #define _EXCEPTION_PTR_H #pragma GCC visibility push(default) #if 0 /* expanded by -frewrite-includes */ #include <bits/c++config.h> #endif /* expanded by -frewrite-includes */ # 36 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/exception_ptr.h" 3 # 37 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/exception_ptr.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/exception_defines.h> #endif /* expanded by -frewrite-includes */ # 37 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/exception_ptr.h" 3 # 38 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/exception_ptr.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/cxxabi_init_exception.h> #endif /* expanded by -frewrite-includes */ # 38 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/exception_ptr.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/cxxabi_init_exception.h" 1 3 // ABI Support -*- C++ -*- // Copyright (C) 2016-2019 Free Software Foundation, Inc. // // This file is part of GCC. // // GCC is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3, or (at your option) // any later version. // // GCC is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file bits/cxxabi_init_exception.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. */ #ifndef _CXXABI_INIT_EXCEPTION_H #define _CXXABI_INIT_EXCEPTION_H 1 #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 35 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/cxxabi_init_exception.h" 3 #pragma GCC visibility push(default) #if 0 /* expanded by -frewrite-includes */ #include <stddef.h> #endif /* expanded by -frewrite-includes */ # 38 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/cxxabi_init_exception.h" 3 # 1 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 1 3 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ #if 0 /* disabled by -frewrite-includes */ #if !defined(__STDDEF_H) || defined(__need_ptrdiff_t) || \ defined(__need_size_t) || defined(__need_wchar_t) || \ defined(__need_NULL) || defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 13 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 #if 0 /* disabled by -frewrite-includes */ #if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \ !defined(__need_wchar_t) && !defined(__need_NULL) && \ !defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 17 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 /* Always define miscellaneous pieces when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 19 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 #define __STDDEF_H #endif # 21 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 #define __need_ptrdiff_t #define __need_size_t #define __need_wchar_t #define __need_NULL #define __need_STDDEF_H_misc /* __need_wint_t is intentionally not defined here. */ #endif # 28 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_ptrdiff_t) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 30 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 #if 0 /* disabled by -frewrite-includes */ #if !defined(_PTRDIFF_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 31 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 /* Always define ptrdiff_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 33 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 #define _PTRDIFF_T #endif # 35 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 typedef __PTRDIFF_TYPE__ ptrdiff_t; #endif # 37 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 #undef __need_ptrdiff_t #endif /* defined(__need_ptrdiff_t) */ # 39 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_size_t) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 41 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 #if 0 /* disabled by -frewrite-includes */ #if !defined(_SIZE_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 42 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 /* Always define size_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 44 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 #define _SIZE_T #endif # 46 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 typedef __SIZE_TYPE__ size_t; #endif # 48 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 #undef __need_size_t #endif /*defined(__need_size_t) */ # 50 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_STDDEF_H_misc) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 52 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 /* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is * enabled. */ #if 0 /* disabled by -frewrite-includes */ #if (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 && \ !defined(_RSIZE_T)) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 56 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 /* Always define rsize_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 58 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 #define _RSIZE_T #endif # 60 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 typedef __SIZE_TYPE__ rsize_t; #endif # 62 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 #endif /* defined(__need_STDDEF_H_misc) */ # 63 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_wchar_t) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 65 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 #ifndef __cplusplus /* Always define wchar_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(_WCHAR_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 68 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 69 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 #define _WCHAR_T #if 0 /* disabled by -frewrite-includes */ #if defined(_MSC_EXTENSIONS) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 71 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 #define _WCHAR_T_DEFINED #endif # 73 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 #endif # 74 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 typedef __WCHAR_TYPE__ wchar_t; #endif # 76 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 #endif # 77 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 #undef __need_wchar_t #endif /* defined(__need_wchar_t) */ # 79 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_NULL) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 81 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 #undef NULL #ifdef __cplusplus #if 0 /* disabled by -frewrite-includes */ # if !defined(__MINGW32__) && !defined(_MSC_VER) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 84 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 # define NULL __null # else # 86 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 # define NULL 0 # endif # 88 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 #else # 89 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 # define NULL ((void*)0) #endif # 91 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 #ifdef __cplusplus #if 0 /* disabled by -frewrite-includes */ #if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 93 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 namespace std { typedef decltype(nullptr) nullptr_t; } using ::std::nullptr_t; #endif # 96 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 #endif # 97 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 #undef __need_NULL #endif /* defined(__need_NULL) */ # 99 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_STDDEF_H_misc) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 101 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 102 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 #if 0 /* expanded by -frewrite-includes */ #include "__stddef_max_align_t.h" #endif /* expanded by -frewrite-includes */ # 102 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 # 1 "/usr/lib/llvm-10/lib/clang/10.0.0/include/__stddef_max_align_t.h" 1 3 /*===---- __stddef_max_align_t.h - Definition of max_align_t for modules ---=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ #ifndef __CLANG_MAX_ALIGN_T_DEFINED #define __CLANG_MAX_ALIGN_T_DEFINED #if 0 /* disabled by -frewrite-includes */ #if defined(_MSC_VER) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 14 "/usr/lib/llvm-10/lib/clang/10.0.0/include/__stddef_max_align_t.h" 3 typedef double max_align_t; #if 0 /* disabled by -frewrite-includes */ #if 0 #elif defined(__APPLE__) #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 16 "/usr/lib/llvm-10/lib/clang/10.0.0/include/__stddef_max_align_t.h" 3 typedef long double max_align_t; #else # 18 "/usr/lib/llvm-10/lib/clang/10.0.0/include/__stddef_max_align_t.h" 3 // Define 'max_align_t' to match the GCC definition. typedef struct { long long __clang_max_align_nonce1 __attribute__((__aligned__(__alignof__(long long)))); long double __clang_max_align_nonce2 __attribute__((__aligned__(__alignof__(long double)))); } max_align_t; #endif # 26 "/usr/lib/llvm-10/lib/clang/10.0.0/include/__stddef_max_align_t.h" 3 #endif # 28 "/usr/lib/llvm-10/lib/clang/10.0.0/include/__stddef_max_align_t.h" 3 # 103 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 2 3 #endif # 104 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 #define offsetof(t, d) __builtin_offsetof(t, d) #undef __need_STDDEF_H_misc #endif /* defined(__need_STDDEF_H_misc) */ # 107 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */ #if 0 /* disabled by -frewrite-includes */ #if defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 111 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 /* Always define wint_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(_WINT_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 113 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 114 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 #define _WINT_T #endif # 116 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 typedef __WINT_TYPE__ wint_t; #endif # 118 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 #undef __need_wint_t #endif /* __need_wint_t */ # 120 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 #endif # 122 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 # 39 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/cxxabi_init_exception.h" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/c++config.h> #endif /* expanded by -frewrite-includes */ # 39 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/cxxabi_init_exception.h" 3 # 40 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/cxxabi_init_exception.h" 3 #ifndef _GLIBCXX_CDTOR_CALLABI #define _GLIBCXX_CDTOR_CALLABI #define _GLIBCXX_HAVE_CDTOR_CALLABI 0 #else # 45 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/cxxabi_init_exception.h" 3 #define _GLIBCXX_HAVE_CDTOR_CALLABI 1 #endif # 47 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/cxxabi_init_exception.h" 3 #ifdef __cplusplus namespace std { class type_info; } namespace __cxxabiv1 { struct __cxa_refcounted_exception; extern "C" { // Allocate memory for the primary exception plus the thrown object. void* __cxa_allocate_exception(size_t) _GLIBCXX_NOTHROW; void __cxa_free_exception(void*) _GLIBCXX_NOTHROW; // Initialize exception (this is a GNU extension) __cxa_refcounted_exception* __cxa_init_primary_exception(void *object, std::type_info *tinfo, void (_GLIBCXX_CDTOR_CALLABI *dest) (void *)) _GLIBCXX_NOTHROW; } } // namespace __cxxabiv1 #endif # 77 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/cxxabi_init_exception.h" 3 #pragma GCC visibility pop #endif // _CXXABI_INIT_EXCEPTION_H # 81 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/cxxabi_init_exception.h" 3 # 39 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/exception_ptr.h" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <typeinfo> #endif /* expanded by -frewrite-includes */ # 39 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/exception_ptr.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/typeinfo" 1 3 // RTTI support for -*- C++ -*- // Copyright (C) 1994-2019 Free Software Foundation, Inc. // // This file is part of GCC. // // GCC is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3, or (at your option) // any later version. // // GCC is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file typeinfo * This is a Standard C++ Library header. */ #ifndef _TYPEINFO #define _TYPEINFO #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 33 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/typeinfo" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/exception.h> #endif /* expanded by -frewrite-includes */ # 34 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/typeinfo" 3 # 35 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/typeinfo" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 36 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/typeinfo" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/hash_bytes.h> #endif /* expanded by -frewrite-includes */ # 36 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/typeinfo" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/hash_bytes.h" 1 3 // Declarations for hash functions. -*- C++ -*- // Copyright (C) 2010-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file bits/hash_bytes.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{functional} */ #ifndef _HASH_BYTES_H #define _HASH_BYTES_H 1 #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 34 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/hash_bytes.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/c++config.h> #endif /* expanded by -frewrite-includes */ # 35 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/hash_bytes.h" 3 # 36 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/hash_bytes.h" 3 namespace std { _GLIBCXX_BEGIN_NAMESPACE_VERSION // Hash function implementation for the nontrivial specialization. // All of them are based on a primitive that hashes a pointer to a // byte array. The actual hash algorithm is not guaranteed to stay // the same from release to release -- it may be updated or tuned to // improve hash quality or speed. size_t _Hash_bytes(const void* __ptr, size_t __len, size_t __seed); // A similar hash primitive, using the FNV hash algorithm. This // algorithm is guaranteed to stay the same from release to release. // (although it might not produce the same values on different // machines.) size_t _Fnv_hash_bytes(const void* __ptr, size_t __len, size_t __seed); _GLIBCXX_END_NAMESPACE_VERSION } // namespace #endif # 60 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/hash_bytes.h" 3 # 37 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/typeinfo" 2 3 #endif # 38 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/typeinfo" 3 #pragma GCC visibility push(default) extern "C++" { namespace __cxxabiv1 { class __class_type_info; } // namespace __cxxabiv1 // Determine whether typeinfo names for the same type are merged (in which // case comparison can just compare pointers) or not (in which case strings // must be compared), and whether comparison is to be implemented inline or // not. We used to do inline pointer comparison by default if weak symbols // are available, but even with weak symbols sometimes names are not merged // when objects are loaded with RTLD_LOCAL, so now we always use strcmp by // default. For ABI compatibility, we do the strcmp inline if weak symbols // are available, and out-of-line if not. Out-of-line pointer comparison // is used where the object files are to be portable to multiple systems, // some of which may not be able to use pointer comparison, but the // particular system for which libstdc++ is being built can use pointer // comparison; in particular for most ARM EABI systems, where the ABI // specifies out-of-line comparison. The compiler's target configuration // can override the defaults by defining __GXX_TYPEINFO_EQUALITY_INLINE to // 1 or 0 to indicate whether or not comparison is inline, and // __GXX_MERGED_TYPEINFO_NAMES to 1 or 0 to indicate whether or not pointer // comparison can be used. #ifndef __GXX_MERGED_TYPEINFO_NAMES // By default, typeinfo names are not merged. #define __GXX_MERGED_TYPEINFO_NAMES 0 #endif # 70 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/typeinfo" 3 // By default follow the old inline rules to avoid ABI changes. #ifndef __GXX_TYPEINFO_EQUALITY_INLINE #if 0 /* disabled by -frewrite-includes */ #if !__GXX_WEAK__ #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 74 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/typeinfo" 3 #define __GXX_TYPEINFO_EQUALITY_INLINE 0 #else # 76 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/typeinfo" 3 #define __GXX_TYPEINFO_EQUALITY_INLINE 1 #endif # 78 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/typeinfo" 3 #endif # 79 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/typeinfo" 3 namespace std { /** * @brief Part of RTTI. * * The @c type_info class describes type information generated by * an implementation. */ class type_info { public: /** Destructor first. Being the first non-inline virtual function, this * controls in which translation unit the vtable is emitted. The * compiler makes use of that information to know where to emit * the runtime-mandated type_info structures in the new-abi. */ virtual ~type_info(); /** Returns an @e implementation-defined byte string; this is not * portable between compilers! */ const char* name() const _GLIBCXX_NOEXCEPT { return __name[0] == '*' ? __name + 1 : __name; } #if 0 /* disabled by -frewrite-includes */ #if !__GXX_TYPEINFO_EQUALITY_INLINE #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 103 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/typeinfo" 3 // In old abi, or when weak symbols are not supported, there can // be multiple instances of a type_info object for one // type. Uniqueness must use the _name value, not object address. bool before(const type_info& __arg) const _GLIBCXX_NOEXCEPT; bool operator==(const type_info& __arg) const _GLIBCXX_NOEXCEPT; #else # 109 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/typeinfo" 3 #if 0 /* disabled by -frewrite-includes */ #if !__GXX_MERGED_TYPEINFO_NAMES #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 110 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/typeinfo" 3 /** Returns true if @c *this precedes @c __arg in the implementation's * collation order. */ // Even with the new abi, on systems that support dlopen // we can run into cases where type_info names aren't merged, // so we still need to do string comparison. bool before(const type_info& __arg) const _GLIBCXX_NOEXCEPT { return (__name[0] == '*' && __arg.__name[0] == '*') ? __name < __arg.__name : __builtin_strcmp (__name, __arg.__name) < 0; } bool operator==(const type_info& __arg) const _GLIBCXX_NOEXCEPT { return ((__name == __arg.__name) || (__name[0] != '*' && __builtin_strcmp (__name, __arg.__name) == 0)); } #else # 127 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/typeinfo" 3 // On some targets we can rely on type_info's NTBS being unique, // and therefore address comparisons are sufficient. bool before(const type_info& __arg) const _GLIBCXX_NOEXCEPT { return __name < __arg.__name; } bool operator==(const type_info& __arg) const _GLIBCXX_NOEXCEPT { return __name == __arg.__name; } #endif # 135 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/typeinfo" 3 #endif # 136 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/typeinfo" 3 bool operator!=(const type_info& __arg) const _GLIBCXX_NOEXCEPT { return !operator==(__arg); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 140 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/typeinfo" 3 size_t hash_code() const noexcept { #if 0 /* disabled by -frewrite-includes */ # if !__GXX_MERGED_TYPEINFO_NAMES #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 143 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/typeinfo" 3 return _Hash_bytes(name(), __builtin_strlen(name()), static_cast<size_t>(0xc70f6907UL)); # else # 146 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/typeinfo" 3 return reinterpret_cast<size_t>(__name); # endif # 148 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/typeinfo" 3 } #endif // C++11 # 150 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/typeinfo" 3 // Return true if this is a pointer type of some kind virtual bool __is_pointer_p() const; // Return true if this is a function type virtual bool __is_function_p() const; // Try and catch a thrown type. Store an adjusted pointer to the // caught type in THR_OBJ. If THR_TYPE is not a pointer type, then // THR_OBJ points to the thrown object. If THR_TYPE is a pointer // type, then THR_OBJ is the pointer itself. OUTER indicates the // number of outer pointers, and whether they were const // qualified. virtual bool __do_catch(const type_info *__thr_type, void **__thr_obj, unsigned __outer) const; // Internally used during catch matching virtual bool __do_upcast(const __cxxabiv1::__class_type_info *__target, void **__obj_ptr) const; protected: const char *__name; explicit type_info(const char *__n): __name(__n) { } private: /// Assigning type_info is not supported. type_info& operator=(const type_info&); type_info(const type_info&); }; /** * @brief Thrown during incorrect typecasting. * @ingroup exceptions * * If you attempt an invalid @c dynamic_cast expression, an instance of * this class (or something derived from this class) is thrown. */ class bad_cast : public exception { public: bad_cast() _GLIBCXX_USE_NOEXCEPT { } // This declaration is not useless: // http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_6.html#SEC118 virtual ~bad_cast() _GLIBCXX_USE_NOEXCEPT; // See comment in eh_exception.cc. virtual const char* what() const _GLIBCXX_USE_NOEXCEPT; }; /** * @brief Thrown when a NULL pointer in a @c typeid expression is used. * @ingroup exceptions */ class bad_typeid : public exception { public: bad_typeid () _GLIBCXX_USE_NOEXCEPT { } // This declaration is not useless: // http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_6.html#SEC118 virtual ~bad_typeid() _GLIBCXX_USE_NOEXCEPT; // See comment in eh_exception.cc. virtual const char* what() const _GLIBCXX_USE_NOEXCEPT; }; } // namespace std } // extern "C++" #pragma GCC visibility pop #endif # 223 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/typeinfo" 3 # 40 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/exception_ptr.h" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <new> #endif /* expanded by -frewrite-includes */ # 40 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/exception_ptr.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 1 3 // The -*- C++ -*- dynamic memory management header. // Copyright (C) 1994-2019 Free Software Foundation, Inc. // This file is part of GCC. // // GCC is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3, or (at your option) // any later version. // // GCC is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file new * This is a Standard C++ Library header. * * The header @c new defines several functions to manage dynamic memory and * handling memory allocation errors; see * http://gcc.gnu.org/onlinedocs/libstdc++/18_support/howto.html#4 for more. */ #ifndef _NEW #define _NEW #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 38 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/c++config.h> #endif /* expanded by -frewrite-includes */ # 39 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 # 40 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 #if 0 /* expanded by -frewrite-includes */ #include <exception> #endif /* expanded by -frewrite-includes */ # 40 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 # 41 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 #pragma GCC visibility push(default) extern "C++" { namespace std { /** * @brief Exception possibly thrown by @c new. * @ingroup exceptions * * @c bad_alloc (or classes derived from it) is used to report allocation * errors from the throwing forms of @c new. */ class bad_alloc : public exception { public: bad_alloc() throw() { } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 60 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 bad_alloc(const bad_alloc&) = default; bad_alloc& operator=(const bad_alloc&) = default; #endif # 63 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 // This declaration is not useless: // http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_6.html#SEC118 virtual ~bad_alloc() throw(); // See comment in eh_exception.cc. virtual const char* what() const throw(); }; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 73 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 class bad_array_new_length : public bad_alloc { public: bad_array_new_length() throw() { } // This declaration is not useless: // http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_6.html#SEC118 virtual ~bad_array_new_length() throw(); // See comment in eh_exception.cc. virtual const char* what() const throw(); }; #endif # 86 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 #if 0 /* disabled by -frewrite-includes */ #if __cpp_aligned_new #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 88 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 enum class align_val_t: size_t {}; #endif # 90 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 struct nothrow_t { #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 94 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 explicit nothrow_t() = default; #endif # 96 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 }; extern const nothrow_t nothrow; /** If you write your own error handler to be called by @c new, it must * be of this type. */ typedef void (*new_handler)(); /// Takes a replacement handler as the argument, returns the /// previous handler. new_handler set_new_handler(new_handler) throw(); #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 109 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 /// Return the current new handler. new_handler get_new_handler() noexcept; #endif # 112 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 } // namespace std //@{ /** These are replaceable signatures: * - normal single new and delete (no arguments, throw @c bad_alloc on error) * - normal array new and delete (same) * - @c nothrow single new and delete (take a @c nothrow argument, return * @c NULL on error) * - @c nothrow array new and delete (same) * * Placement new and delete signatures (take a memory address argument, * does nothing) may not be replaced by a user's program. */ _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc) __attribute__((__externally_visible__)); _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) __attribute__((__externally_visible__)); void operator delete(void*) _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__)); void operator delete[](void*) _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__)); #if 0 /* disabled by -frewrite-includes */ #if __cpp_sized_deallocation #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 134 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 void operator delete(void*, std::size_t) _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__)); void operator delete[](void*, std::size_t) _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__)); #endif # 139 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__, __malloc__)); _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__, __malloc__)); void operator delete(void*, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__)); void operator delete[](void*, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__)); #if 0 /* disabled by -frewrite-includes */ #if __cpp_aligned_new #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 148 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t) __attribute__((__externally_visible__)); _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__, __malloc__)); void operator delete(void*, std::align_val_t) _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__)); void operator delete(void*, std::align_val_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__)); _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t) __attribute__((__externally_visible__)); _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__, __malloc__)); void operator delete[](void*, std::align_val_t) _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__)); void operator delete[](void*, std::align_val_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__)); #if 0 /* disabled by -frewrite-includes */ #if __cpp_sized_deallocation #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 165 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 void operator delete(void*, std::size_t, std::align_val_t) _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__)); void operator delete[](void*, std::size_t, std::align_val_t) _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__)); #endif // __cpp_sized_deallocation # 170 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 #endif // __cpp_aligned_new # 171 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 // Default placement versions of operator new. _GLIBCXX_NODISCARD inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT { return __p; } _GLIBCXX_NODISCARD inline void* operator new[](std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT { return __p; } // Default placement versions of operator delete. inline void operator delete (void*, void*) _GLIBCXX_USE_NOEXCEPT { } inline void operator delete[](void*, void*) _GLIBCXX_USE_NOEXCEPT { } //@} } // extern "C++" #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 185 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 #ifdef _GLIBCXX_HAVE_BUILTIN_LAUNDER namespace std { #define __cpp_lib_launder 201606 /// Pointer optimization barrier [ptr.launder] template<typename _Tp> [[nodiscard]] constexpr _Tp* launder(_Tp* __p) noexcept { return __builtin_launder(__p); } // The program is ill-formed if T is a function type or // (possibly cv-qualified) void. template<typename _Ret, typename... _Args _GLIBCXX_NOEXCEPT_PARM> void launder(_Ret (*)(_Args...) _GLIBCXX_NOEXCEPT_QUAL) = delete; template<typename _Ret, typename... _Args _GLIBCXX_NOEXCEPT_PARM> void launder(_Ret (*)(_Args......) _GLIBCXX_NOEXCEPT_QUAL) = delete; void launder(void*) = delete; void launder(const void*) = delete; void launder(volatile void*) = delete; void launder(const volatile void*) = delete; } #endif // _GLIBCXX_HAVE_BUILTIN_LAUNDER # 209 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 #endif // C++17 # 210 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 212 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 namespace std { struct destroying_delete_t { explicit destroying_delete_t() = default; }; inline constexpr destroying_delete_t destroying_delete{}; } // Only define the feature test macro if the compiler supports the feature: #if 0 /* disabled by -frewrite-includes */ #if __cpp_impl_destroying_delete #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 222 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 # define __cpp_lib_destroying_delete 201806L #endif # 224 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 #endif // C++20 # 225 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 #pragma GCC visibility pop #endif # 229 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 # 41 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/exception_ptr.h" 2 3 extern "C++" { namespace std { class type_info; /** * @addtogroup exceptions * @{ */ namespace __exception_ptr { class exception_ptr; } using __exception_ptr::exception_ptr; /** Obtain an exception_ptr to the currently handled exception. If there * is none, or the currently handled exception is foreign, return the null * value. */ exception_ptr current_exception() _GLIBCXX_USE_NOEXCEPT; template<typename _Ex> exception_ptr make_exception_ptr(_Ex) _GLIBCXX_USE_NOEXCEPT; /// Throw the object pointed to by the exception_ptr. void rethrow_exception(exception_ptr) __attribute__ ((__noreturn__)); namespace __exception_ptr { using std::rethrow_exception; /** * @brief An opaque pointer to an arbitrary exception. * @ingroup exceptions */ class exception_ptr { void* _M_exception_object; explicit exception_ptr(void* __e) _GLIBCXX_USE_NOEXCEPT; void _M_addref() _GLIBCXX_USE_NOEXCEPT; void _M_release() _GLIBCXX_USE_NOEXCEPT; void *_M_get() const _GLIBCXX_NOEXCEPT __attribute__ ((__pure__)); friend exception_ptr std::current_exception() _GLIBCXX_USE_NOEXCEPT; friend void std::rethrow_exception(exception_ptr); template<typename _Ex> friend exception_ptr std::make_exception_ptr(_Ex) _GLIBCXX_USE_NOEXCEPT; public: exception_ptr() _GLIBCXX_USE_NOEXCEPT; exception_ptr(const exception_ptr&) _GLIBCXX_USE_NOEXCEPT; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 101 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/exception_ptr.h" 3 exception_ptr(nullptr_t) noexcept : _M_exception_object(0) { } exception_ptr(exception_ptr&& __o) noexcept : _M_exception_object(__o._M_exception_object) { __o._M_exception_object = 0; } #endif # 109 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/exception_ptr.h" 3 #if 0 /* disabled by -frewrite-includes */ #if (__cplusplus < 201103L) || defined (_GLIBCXX_EH_PTR_COMPAT) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 111 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/exception_ptr.h" 3 typedef void (exception_ptr::*__safe_bool)(); // For construction from nullptr or 0. exception_ptr(__safe_bool) _GLIBCXX_USE_NOEXCEPT; #endif # 116 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/exception_ptr.h" 3 exception_ptr& operator=(const exception_ptr&) _GLIBCXX_USE_NOEXCEPT; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 121 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/exception_ptr.h" 3 exception_ptr& operator=(exception_ptr&& __o) noexcept { exception_ptr(static_cast<exception_ptr&&>(__o)).swap(*this); return *this; } #endif # 128 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/exception_ptr.h" 3 ~exception_ptr() _GLIBCXX_USE_NOEXCEPT; void swap(exception_ptr&) _GLIBCXX_USE_NOEXCEPT; #ifdef _GLIBCXX_EH_PTR_COMPAT // Retained for compatibility with CXXABI_1.3. void _M_safe_bool_dummy() _GLIBCXX_USE_NOEXCEPT __attribute__ ((__const__)); bool operator!() const _GLIBCXX_USE_NOEXCEPT __attribute__ ((__pure__)); operator __safe_bool() const _GLIBCXX_USE_NOEXCEPT; #endif # 142 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/exception_ptr.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 144 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/exception_ptr.h" 3 explicit operator bool() const { return _M_exception_object; } #endif # 147 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/exception_ptr.h" 3 friend bool operator==(const exception_ptr&, const exception_ptr&) _GLIBCXX_USE_NOEXCEPT __attribute__ ((__pure__)); const class std::type_info* __cxa_exception_type() const _GLIBCXX_USE_NOEXCEPT __attribute__ ((__pure__)); }; bool operator==(const exception_ptr&, const exception_ptr&) _GLIBCXX_USE_NOEXCEPT __attribute__ ((__pure__)); bool operator!=(const exception_ptr&, const exception_ptr&) _GLIBCXX_USE_NOEXCEPT __attribute__ ((__pure__)); inline void swap(exception_ptr& __lhs, exception_ptr& __rhs) { __lhs.swap(__rhs); } template<typename _Ex> inline void __dest_thunk(void* __x) { static_cast<_Ex*>(__x)->~_Ex(); } } // namespace __exception_ptr /// Obtain an exception_ptr pointing to a copy of the supplied object. template<typename _Ex> exception_ptr make_exception_ptr(_Ex __ex) _GLIBCXX_USE_NOEXCEPT { #if 0 /* disabled by -frewrite-includes */ #if __cpp_exceptions && __cpp_rtti && !_GLIBCXX_HAVE_CDTOR_CALLABI #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 182 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/exception_ptr.h" 3 void* __e = __cxxabiv1::__cxa_allocate_exception(sizeof(_Ex)); (void) __cxxabiv1::__cxa_init_primary_exception( __e, const_cast<std::type_info*>(&typeid(__ex)), __exception_ptr::__dest_thunk<_Ex>); try { ::new (__e) _Ex(__ex); return exception_ptr(__e); } catch(...) { __cxxabiv1::__cxa_free_exception(__e); return current_exception(); } #if 0 /* disabled by -frewrite-includes */ #if 0 #elif __cpp_exceptions #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 197 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/exception_ptr.h" 3 try { throw __ex; } catch(...) { return current_exception(); } #else // no RTTI and no exceptions # 206 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/exception_ptr.h" 3 return exception_ptr(); #endif # 208 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/exception_ptr.h" 3 } /// @} group exceptions } // namespace std } // extern "C++" #pragma GCC visibility pop #endif # 218 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/exception_ptr.h" 3 # 144 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/exception" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/nested_exception.h> #endif /* expanded by -frewrite-includes */ # 144 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/exception" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/nested_exception.h" 1 3 // Nested Exception support header (nested_exception class) for -*- C++ -*- // Copyright (C) 2009-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file bits/nested_exception.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{exception} */ #ifndef _GLIBCXX_NESTED_EXCEPTION_H #define _GLIBCXX_NESTED_EXCEPTION_H 1 #pragma GCC visibility push(default) #if 0 /* disabled by -frewrite-includes */ #if __cplusplus < 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 36 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/nested_exception.h" 3 #if 0 /* expanded by -frewrite-includes */ # include <bits/c++0x_warning.h> #endif /* expanded by -frewrite-includes */ # 36 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/nested_exception.h" 3 # 37 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/nested_exception.h" 3 #else # 38 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/nested_exception.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/c++config.h> #endif /* expanded by -frewrite-includes */ # 39 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/nested_exception.h" 3 # 40 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/nested_exception.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/move.h> #endif /* expanded by -frewrite-includes */ # 40 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/nested_exception.h" 3 # 41 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/nested_exception.h" 3 extern "C++" { namespace std { /** * @addtogroup exceptions * @{ */ /// Exception class with exception_ptr data member. class nested_exception { exception_ptr _M_ptr; public: nested_exception() noexcept : _M_ptr(current_exception()) { } nested_exception(const nested_exception&) noexcept = default; nested_exception& operator=(const nested_exception&) noexcept = default; virtual ~nested_exception() noexcept; [[noreturn]] void rethrow_nested() const { if (_M_ptr) rethrow_exception(_M_ptr); std::terminate(); } exception_ptr nested_ptr() const noexcept { return _M_ptr; } }; template<typename _Except> struct _Nested_exception : public _Except, public nested_exception { explicit _Nested_exception(const _Except& __ex) : _Except(__ex) { } explicit _Nested_exception(_Except&& __ex) : _Except(static_cast<_Except&&>(__ex)) { } }; // [except.nested]/8 // Throw an exception of unspecified type that is publicly derived from // both remove_reference_t<_Tp> and nested_exception. template<typename _Tp> [[noreturn]] inline void __throw_with_nested_impl(_Tp&& __t, true_type) { using _Up = typename remove_reference<_Tp>::type; throw _Nested_exception<_Up>{std::forward<_Tp>(__t)}; } template<typename _Tp> [[noreturn]] inline void __throw_with_nested_impl(_Tp&& __t, false_type) { throw std::forward<_Tp>(__t); } /// If @p __t is derived from nested_exception, throws @p __t. /// Else, throws an implementation-defined object derived from both. template<typename _Tp> [[noreturn]] inline void throw_with_nested(_Tp&& __t) { using _Up = typename decay<_Tp>::type; using _CopyConstructible = __and_<is_copy_constructible<_Up>, is_move_constructible<_Up>>; static_assert(_CopyConstructible::value, "throw_with_nested argument must be CopyConstructible"); using __nest = __and_<is_class<_Up>, __bool_constant<!__is_final(_Up)>, __not_<is_base_of<nested_exception, _Up>>>; std::__throw_with_nested_impl(std::forward<_Tp>(__t), __nest{}); } // Determine if dynamic_cast<const nested_exception&> would be well-formed. template<typename _Tp> using __rethrow_if_nested_cond = typename enable_if< __and_<is_polymorphic<_Tp>, __or_<__not_<is_base_of<nested_exception, _Tp>>, is_convertible<_Tp*, nested_exception*>>>::value >::type; // Attempt dynamic_cast to nested_exception and call rethrow_nested(). template<typename _Ex> inline __rethrow_if_nested_cond<_Ex> __rethrow_if_nested_impl(const _Ex* __ptr) { if (auto __ne_ptr = dynamic_cast<const nested_exception*>(__ptr)) __ne_ptr->rethrow_nested(); } // Otherwise, no effects. inline void __rethrow_if_nested_impl(const void*) { } /// If @p __ex is derived from nested_exception, @p __ex.rethrow_nested(). template<typename _Ex> inline void rethrow_if_nested(const _Ex& __ex) { std::__rethrow_if_nested_impl(std::__addressof(__ex)); } /// @} group exceptions } // namespace std } // extern "C++" #endif // C++11 # 160 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/nested_exception.h" 3 #pragma GCC visibility pop #endif // _GLIBCXX_NESTED_EXCEPTION_H # 164 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/nested_exception.h" 3 # 145 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/exception" 2 3 #endif # 146 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/exception" 3 #endif # 148 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/exception" 3 # 41 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 2 3 #pragma GCC visibility push(default) extern "C++" { namespace std { /** * @brief Exception possibly thrown by @c new. * @ingroup exceptions * * @c bad_alloc (or classes derived from it) is used to report allocation * errors from the throwing forms of @c new. */ class bad_alloc : public exception { public: bad_alloc() throw() { } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 60 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 bad_alloc(const bad_alloc&) = default; bad_alloc& operator=(const bad_alloc&) = default; #endif # 63 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 // This declaration is not useless: // http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_6.html#SEC118 virtual ~bad_alloc() throw(); // See comment in eh_exception.cc. virtual const char* what() const throw(); }; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 73 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 class bad_array_new_length : public bad_alloc { public: bad_array_new_length() throw() { } // This declaration is not useless: // http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_6.html#SEC118 virtual ~bad_array_new_length() throw(); // See comment in eh_exception.cc. virtual const char* what() const throw(); }; #endif # 86 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 #if 0 /* disabled by -frewrite-includes */ #if __cpp_aligned_new #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 88 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 enum class align_val_t: size_t {}; #endif # 90 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 struct nothrow_t { #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 94 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 explicit nothrow_t() = default; #endif # 96 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 }; extern const nothrow_t nothrow; /** If you write your own error handler to be called by @c new, it must * be of this type. */ typedef void (*new_handler)(); /// Takes a replacement handler as the argument, returns the /// previous handler. new_handler set_new_handler(new_handler) throw(); #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 109 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 /// Return the current new handler. new_handler get_new_handler() noexcept; #endif # 112 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 } // namespace std //@{ /** These are replaceable signatures: * - normal single new and delete (no arguments, throw @c bad_alloc on error) * - normal array new and delete (same) * - @c nothrow single new and delete (take a @c nothrow argument, return * @c NULL on error) * - @c nothrow array new and delete (same) * * Placement new and delete signatures (take a memory address argument, * does nothing) may not be replaced by a user's program. */ _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc) __attribute__((__externally_visible__)); _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) __attribute__((__externally_visible__)); void operator delete(void*) _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__)); void operator delete[](void*) _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__)); #if 0 /* disabled by -frewrite-includes */ #if __cpp_sized_deallocation #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 134 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 void operator delete(void*, std::size_t) _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__)); void operator delete[](void*, std::size_t) _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__)); #endif # 139 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__, __malloc__)); _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__, __malloc__)); void operator delete(void*, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__)); void operator delete[](void*, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__)); #if 0 /* disabled by -frewrite-includes */ #if __cpp_aligned_new #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 148 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t) __attribute__((__externally_visible__)); _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__, __malloc__)); void operator delete(void*, std::align_val_t) _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__)); void operator delete(void*, std::align_val_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__)); _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t) __attribute__((__externally_visible__)); _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__, __malloc__)); void operator delete[](void*, std::align_val_t) _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__)); void operator delete[](void*, std::align_val_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__)); #if 0 /* disabled by -frewrite-includes */ #if __cpp_sized_deallocation #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 165 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 void operator delete(void*, std::size_t, std::align_val_t) _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__)); void operator delete[](void*, std::size_t, std::align_val_t) _GLIBCXX_USE_NOEXCEPT __attribute__((__externally_visible__)); #endif // __cpp_sized_deallocation # 170 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 #endif // __cpp_aligned_new # 171 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 // Default placement versions of operator new. _GLIBCXX_NODISCARD inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT { return __p; } _GLIBCXX_NODISCARD inline void* operator new[](std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT { return __p; } // Default placement versions of operator delete. inline void operator delete (void*, void*) _GLIBCXX_USE_NOEXCEPT { } inline void operator delete[](void*, void*) _GLIBCXX_USE_NOEXCEPT { } //@} } // extern "C++" #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 185 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 #ifdef _GLIBCXX_HAVE_BUILTIN_LAUNDER namespace std { #define __cpp_lib_launder 201606 /// Pointer optimization barrier [ptr.launder] template<typename _Tp> [[nodiscard]] constexpr _Tp* launder(_Tp* __p) noexcept { return __builtin_launder(__p); } // The program is ill-formed if T is a function type or // (possibly cv-qualified) void. template<typename _Ret, typename... _Args _GLIBCXX_NOEXCEPT_PARM> void launder(_Ret (*)(_Args...) _GLIBCXX_NOEXCEPT_QUAL) = delete; template<typename _Ret, typename... _Args _GLIBCXX_NOEXCEPT_PARM> void launder(_Ret (*)(_Args......) _GLIBCXX_NOEXCEPT_QUAL) = delete; void launder(void*) = delete; void launder(const void*) = delete; void launder(volatile void*) = delete; void launder(const volatile void*) = delete; } #endif // _GLIBCXX_HAVE_BUILTIN_LAUNDER # 209 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 #endif // C++17 # 210 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 212 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 namespace std { struct destroying_delete_t { explicit destroying_delete_t() = default; }; inline constexpr destroying_delete_t destroying_delete{}; } // Only define the feature test macro if the compiler supports the feature: #if 0 /* disabled by -frewrite-includes */ #if __cpp_impl_destroying_delete #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 222 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 # define __cpp_lib_destroying_delete 201806L #endif # 224 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 #endif // C++20 # 225 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 #pragma GCC visibility pop #endif # 229 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/new" 3 # 34 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/new_allocator.h" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/functexcept.h> #endif /* expanded by -frewrite-includes */ # 34 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/new_allocator.h" 3 # 35 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/new_allocator.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/move.h> #endif /* expanded by -frewrite-includes */ # 35 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/new_allocator.h" 3 # 36 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/new_allocator.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 37 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/new_allocator.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <type_traits> #endif /* expanded by -frewrite-includes */ # 37 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/new_allocator.h" 3 # 38 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/new_allocator.h" 3 #endif # 39 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/new_allocator.h" 3 namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION using std::size_t; using std::ptrdiff_t; /** * @brief An allocator that uses global new, as per [20.4]. * @ingroup allocators * * This is precisely the allocator defined in the C++ Standard. * - all allocation calls operator new * - all deallocation calls operator delete * * @tparam _Tp Type of allocated object. */ template<typename _Tp> class new_allocator { public: typedef size_t size_type; typedef ptrdiff_t difference_type; typedef _Tp* pointer; typedef const _Tp* const_pointer; typedef _Tp& reference; typedef const _Tp& const_reference; typedef _Tp value_type; template<typename _Tp1> struct rebind { typedef new_allocator<_Tp1> other; }; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 74 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/new_allocator.h" 3 // _GLIBCXX_RESOLVE_LIB_DEFECTS // 2103. propagate_on_container_move_assignment typedef std::true_type propagate_on_container_move_assignment; #endif # 78 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/new_allocator.h" 3 _GLIBCXX20_CONSTEXPR new_allocator() _GLIBCXX_USE_NOEXCEPT { } _GLIBCXX20_CONSTEXPR new_allocator(const new_allocator&) _GLIBCXX_USE_NOEXCEPT { } template<typename _Tp1> _GLIBCXX20_CONSTEXPR new_allocator(const new_allocator<_Tp1>&) _GLIBCXX_USE_NOEXCEPT { } ~new_allocator() _GLIBCXX_USE_NOEXCEPT { } pointer address(reference __x) const _GLIBCXX_NOEXCEPT { return std::__addressof(__x); } const_pointer address(const_reference __x) const _GLIBCXX_NOEXCEPT { return std::__addressof(__x); } // NB: __n is permitted to be 0. The C++ standard says nothing // about what the return value is when __n == 0. _GLIBCXX_NODISCARD pointer allocate(size_type __n, const void* = static_cast<const void*>(0)) { if (__n > this->max_size()) std::__throw_bad_alloc(); #if 0 /* disabled by -frewrite-includes */ #if __cpp_aligned_new #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 108 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/new_allocator.h" 3 if (alignof(_Tp) > __STDCPP_DEFAULT_NEW_ALIGNMENT__) { std::align_val_t __al = std::align_val_t(alignof(_Tp)); return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp), __al)); } #endif # 114 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/new_allocator.h" 3 return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp))); } // __p is not permitted to be a null pointer. void deallocate(pointer __p, size_type) { #if 0 /* disabled by -frewrite-includes */ #if __cpp_aligned_new #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 122 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/new_allocator.h" 3 if (alignof(_Tp) > __STDCPP_DEFAULT_NEW_ALIGNMENT__) { ::operator delete(__p, std::align_val_t(alignof(_Tp))); return; } #endif # 128 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/new_allocator.h" 3 ::operator delete(__p); } size_type max_size() const _GLIBCXX_USE_NOEXCEPT { #if 0 /* disabled by -frewrite-includes */ #if __PTRDIFF_MAX__ < __SIZE_MAX__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 135 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/new_allocator.h" 3 return size_t(__PTRDIFF_MAX__) / sizeof(_Tp); #else # 137 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/new_allocator.h" 3 return size_t(-1) / sizeof(_Tp); #endif # 139 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/new_allocator.h" 3 } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 142 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/new_allocator.h" 3 template<typename _Up, typename... _Args> void construct(_Up* __p, _Args&&... __args) noexcept(std::is_nothrow_constructible<_Up, _Args...>::value) { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); } template<typename _Up> void destroy(_Up* __p) noexcept(std::is_nothrow_destructible<_Up>::value) { __p->~_Up(); } #else # 154 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/new_allocator.h" 3 // _GLIBCXX_RESOLVE_LIB_DEFECTS // 402. wrong new expression in [some_] allocator::construct void construct(pointer __p, const _Tp& __val) { ::new((void *)__p) _Tp(__val); } void destroy(pointer __p) { __p->~_Tp(); } #endif # 163 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/new_allocator.h" 3 template<typename _Up> friend bool operator==(const new_allocator&, const new_allocator<_Up>&) _GLIBCXX_NOTHROW { return true; } template<typename _Up> friend bool operator!=(const new_allocator&, const new_allocator<_Up>&) _GLIBCXX_NOTHROW { return false; } }; _GLIBCXX_END_NAMESPACE_VERSION } // namespace #endif # 181 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/new_allocator.h" 3 # 34 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++allocator.h" 2 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 36 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++allocator.h" 3 namespace std { /** * @brief An alias to the base class for std::allocator. * @ingroup allocators * * Used to set the std::allocator base class to * __gnu_cxx::new_allocator. * * @tparam _Tp Type of allocated object. */ template<typename _Tp> using __allocator_base = __gnu_cxx::new_allocator<_Tp>; } #else # 51 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++allocator.h" 3 // Define new_allocator as the base class to std::allocator. # define __allocator_base __gnu_cxx::new_allocator #endif # 54 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++allocator.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined(__SANITIZE_ADDRESS__) && !defined(_GLIBCXX_SANITIZE_STD_ALLOCATOR) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 56 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++allocator.h" 3 # define _GLIBCXX_SANITIZE_STD_ALLOCATOR 1 #endif # 58 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++allocator.h" 3 #endif # 60 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++allocator.h" 3 # 47 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/allocator.h" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/memoryfwd.h> #endif /* expanded by -frewrite-includes */ # 47 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/allocator.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/memoryfwd.h" 1 3 // <memory> Forward declarations -*- C++ -*- // Copyright (C) 2001-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /* * Copyright (c) 1996-1997 * Silicon Graphics Computer Systems, Inc. * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Silicon Graphics makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. */ /** @file bits/memoryfwd.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{memory} */ #ifndef _MEMORYFWD_H #define _MEMORYFWD_H 1 #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 47 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/memoryfwd.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/c++config.h> #endif /* expanded by -frewrite-includes */ # 48 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/memoryfwd.h" 3 # 49 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/memoryfwd.h" 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @defgroup allocators Allocators * @ingroup memory * * Classes encapsulating memory operations. * * @{ */ template<typename> class allocator; template<> class allocator<void>; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 70 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/memoryfwd.h" 3 /// Declare uses_allocator so it can be specialized in \<queue\> etc. template<typename, typename> struct uses_allocator; #endif # 74 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/memoryfwd.h" 3 /// @} group memory _GLIBCXX_END_NAMESPACE_VERSION } // namespace std #endif # 81 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/memoryfwd.h" 3 # 48 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/allocator.h" 2 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 49 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/allocator.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <type_traits> #endif /* expanded by -frewrite-includes */ # 49 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/allocator.h" 3 # 50 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/allocator.h" 3 #endif # 51 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/allocator.h" 3 #define __cpp_lib_incomplete_container_elements 201505 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 54 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/allocator.h" 3 # define __cpp_lib_allocator_is_always_equal 201411 #endif # 56 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/allocator.h" 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @addtogroup allocators * @{ */ /// allocator<void> specialization. template<> class allocator<void> { public: typedef size_t size_type; typedef ptrdiff_t difference_type; typedef void* pointer; typedef const void* const_pointer; typedef void value_type; template<typename _Tp1> struct rebind { typedef allocator<_Tp1> other; }; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 82 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/allocator.h" 3 // _GLIBCXX_RESOLVE_LIB_DEFECTS // 2103. std::allocator propagate_on_container_move_assignment typedef true_type propagate_on_container_move_assignment; typedef true_type is_always_equal; template<typename _Up, typename... _Args> void construct(_Up* __p, _Args&&... __args) noexcept(std::is_nothrow_constructible<_Up, _Args...>::value) { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); } template<typename _Up> void destroy(_Up* __p) noexcept(std::is_nothrow_destructible<_Up>::value) { __p->~_Up(); } #endif # 100 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/allocator.h" 3 }; /** * @brief The @a standard allocator, as per [20.4]. * * See https://gcc.gnu.org/onlinedocs/libstdc++/manual/memory.html#std.util.memory.allocator * for further details. * * @tparam _Tp Type of allocated object. */ template<typename _Tp> class allocator : public __allocator_base<_Tp> { public: typedef size_t size_type; typedef ptrdiff_t difference_type; typedef _Tp* pointer; typedef const _Tp* const_pointer; typedef _Tp& reference; typedef const _Tp& const_reference; typedef _Tp value_type; template<typename _Tp1> struct rebind { typedef allocator<_Tp1> other; }; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 127 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/allocator.h" 3 // _GLIBCXX_RESOLVE_LIB_DEFECTS // 2103. std::allocator propagate_on_container_move_assignment typedef true_type propagate_on_container_move_assignment; typedef true_type is_always_equal; #endif # 133 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/allocator.h" 3 // _GLIBCXX_RESOLVE_LIB_DEFECTS // 3035. std::allocator's constructors should be constexpr _GLIBCXX20_CONSTEXPR allocator() _GLIBCXX_NOTHROW { } _GLIBCXX20_CONSTEXPR allocator(const allocator& __a) _GLIBCXX_NOTHROW : __allocator_base<_Tp>(__a) { } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 144 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/allocator.h" 3 // Avoid implicit deprecation. allocator& operator=(const allocator&) = default; #endif # 147 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/allocator.h" 3 template<typename _Tp1> _GLIBCXX20_CONSTEXPR allocator(const allocator<_Tp1>&) _GLIBCXX_NOTHROW { } ~allocator() _GLIBCXX_NOTHROW { } friend bool operator==(const allocator&, const allocator&) _GLIBCXX_NOTHROW { return true; } friend bool operator!=(const allocator&, const allocator&) _GLIBCXX_NOTHROW { return false; } // Inherit everything else. }; template<typename _T1, typename _T2> inline bool operator==(const allocator<_T1>&, const allocator<_T2>&) _GLIBCXX_NOTHROW { return true; } template<typename _T1, typename _T2> inline bool operator!=(const allocator<_T1>&, const allocator<_T2>&) _GLIBCXX_NOTHROW { return false; } // Invalid allocator<cv T> partial specializations. // allocator_traits::rebind_alloc can be used to form a valid allocator type. template<typename _Tp> class allocator<const _Tp> { public: typedef _Tp value_type; template<typename _Up> allocator(const allocator<_Up>&) { } }; template<typename _Tp> class allocator<volatile _Tp> { public: typedef _Tp value_type; template<typename _Up> allocator(const allocator<_Up>&) { } }; template<typename _Tp> class allocator<const volatile _Tp> { public: typedef _Tp value_type; template<typename _Up> allocator(const allocator<_Up>&) { } }; /// @} group allocator // Inhibit implicit instantiations for required instantiations, // which are defined via explicit instantiations elsewhere. #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_EXTERN_TEMPLATE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 208 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/allocator.h" 3 extern template class allocator<char>; extern template class allocator<wchar_t>; #endif # 211 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/allocator.h" 3 // Undefine. #undef __allocator_base // To implement Option 3 of DR 431. template<typename _Alloc, bool = __is_empty(_Alloc)> struct __alloc_swap { static void _S_do_it(_Alloc&, _Alloc&) _GLIBCXX_NOEXCEPT { } }; template<typename _Alloc> struct __alloc_swap<_Alloc, false> { static void _S_do_it(_Alloc& __one, _Alloc& __two) _GLIBCXX_NOEXCEPT { // Precondition: swappable allocators. if (__one != __two) swap(__one, __two); } }; // Optimize for stateless allocators. template<typename _Alloc, bool = __is_empty(_Alloc)> struct __alloc_neq { static bool _S_do_it(const _Alloc&, const _Alloc&) { return false; } }; template<typename _Alloc> struct __alloc_neq<_Alloc, false> { static bool _S_do_it(const _Alloc& __one, const _Alloc& __two) { return __one != __two; } }; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 250 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/allocator.h" 3 template<typename _Tp, bool = __or_<is_copy_constructible<typename _Tp::value_type>, is_nothrow_move_constructible<typename _Tp::value_type>>::value> struct __shrink_to_fit_aux { static bool _S_do_it(_Tp&) noexcept { return false; } }; template<typename _Tp> struct __shrink_to_fit_aux<_Tp, true> { static bool _S_do_it(_Tp& __c) noexcept { #if 0 /* disabled by -frewrite-includes */ #if __cpp_exceptions #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 263 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/allocator.h" 3 try { _Tp(__make_move_if_noexcept_iterator(__c.begin()), __make_move_if_noexcept_iterator(__c.end()), __c.get_allocator()).swap(__c); return true; } catch(...) { return false; } #else # 273 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/allocator.h" 3 return false; #endif # 275 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/allocator.h" 3 } }; #endif # 278 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/allocator.h" 3 _GLIBCXX_END_NAMESPACE_VERSION } // namespace std #endif # 283 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/allocator.h" 3 # 65 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/deque" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/stl_construct.h> #endif /* expanded by -frewrite-includes */ # 65 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/deque" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_construct.h" 1 3 // nonstandard construct and destroy functions -*- C++ -*- // Copyright (C) 2001-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /* * * Copyright (c) 1994 * Hewlett-Packard Company * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Hewlett-Packard Company makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. * * * Copyright (c) 1996,1997 * Silicon Graphics Computer Systems, Inc. * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Silicon Graphics makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. */ /** @file bits/stl_construct.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{memory} */ #ifndef _STL_CONSTRUCT_H #define _STL_CONSTRUCT_H 1 #if 0 /* expanded by -frewrite-includes */ #include <new> #endif /* expanded by -frewrite-includes */ # 59 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_construct.h" 3 # 60 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_construct.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/move.h> #endif /* expanded by -frewrite-includes */ # 60 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_construct.h" 3 # 61 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_construct.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <ext/alloc_traits.h> #endif /* expanded by -frewrite-includes */ # 61 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_construct.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/alloc_traits.h" 1 3 // Allocator traits -*- C++ -*- // Copyright (C) 2011-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file ext/alloc_traits.h * This file is a GNU extension to the Standard C++ Library. */ #ifndef _EXT_ALLOC_TRAITS_H #define _EXT_ALLOC_TRAITS_H 1 #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 33 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/alloc_traits.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 35 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/alloc_traits.h" 3 #if 0 /* expanded by -frewrite-includes */ # include <bits/move.h> #endif /* expanded by -frewrite-includes */ # 35 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/alloc_traits.h" 3 # 36 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/alloc_traits.h" 3 #if 0 /* expanded by -frewrite-includes */ # include <bits/alloc_traits.h> #endif /* expanded by -frewrite-includes */ # 36 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/alloc_traits.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/alloc_traits.h" 1 3 // Allocator traits -*- C++ -*- // Copyright (C) 2011-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file bits/alloc_traits.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{memory} */ #ifndef _ALLOC_TRAITS_H #define _ALLOC_TRAITS_H 1 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 34 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/alloc_traits.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/memoryfwd.h> #endif /* expanded by -frewrite-includes */ # 35 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/alloc_traits.h" 3 # 36 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/alloc_traits.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/ptr_traits.h> #endif /* expanded by -frewrite-includes */ # 36 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/alloc_traits.h" 3 # 37 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/alloc_traits.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <ext/numeric_traits.h> #endif /* expanded by -frewrite-includes */ # 37 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/alloc_traits.h" 3 # 38 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/alloc_traits.h" 3 #define __cpp_lib_allocator_traits_is_always_equal 201411 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION struct __allocator_traits_base { template<typename _Tp, typename _Up, typename = void> struct __rebind : __replace_first_arg<_Tp, _Up> { }; template<typename _Tp, typename _Up> struct __rebind<_Tp, _Up, __void_t<typename _Tp::template rebind<_Up>::other>> { using type = typename _Tp::template rebind<_Up>::other; }; protected: template<typename _Tp> using __pointer = typename _Tp::pointer; template<typename _Tp> using __c_pointer = typename _Tp::const_pointer; template<typename _Tp> using __v_pointer = typename _Tp::void_pointer; template<typename _Tp> using __cv_pointer = typename _Tp::const_void_pointer; template<typename _Tp> using __pocca = typename _Tp::propagate_on_container_copy_assignment; template<typename _Tp> using __pocma = typename _Tp::propagate_on_container_move_assignment; template<typename _Tp> using __pocs = typename _Tp::propagate_on_container_swap; template<typename _Tp> using __equal = typename _Tp::is_always_equal; }; template<typename _Alloc, typename _Up> using __alloc_rebind = typename __allocator_traits_base::template __rebind<_Alloc, _Up>::type; /** * @brief Uniform interface to all allocator types. * @ingroup allocators */ template<typename _Alloc> struct allocator_traits : __allocator_traits_base { /// The allocator type typedef _Alloc allocator_type; /// The allocated type typedef typename _Alloc::value_type value_type; /** * @brief The allocator's pointer type. * * @c Alloc::pointer if that type exists, otherwise @c value_type* */ using pointer = __detected_or_t<value_type*, __pointer, _Alloc>; private: // Select _Func<_Alloc> or pointer_traits<pointer>::rebind<_Tp> template<template<typename> class _Func, typename _Tp, typename = void> struct _Ptr { using type = typename pointer_traits<pointer>::template rebind<_Tp>; }; template<template<typename> class _Func, typename _Tp> struct _Ptr<_Func, _Tp, __void_t<_Func<_Alloc>>> { using type = _Func<_Alloc>; }; // Select _A2::difference_type or pointer_traits<_Ptr>::difference_type template<typename _A2, typename _PtrT, typename = void> struct _Diff { using type = typename pointer_traits<_PtrT>::difference_type; }; template<typename _A2, typename _PtrT> struct _Diff<_A2, _PtrT, __void_t<typename _A2::difference_type>> { using type = typename _A2::difference_type; }; // Select _A2::size_type or make_unsigned<_DiffT>::type template<typename _A2, typename _DiffT, typename = void> struct _Size : make_unsigned<_DiffT> { }; template<typename _A2, typename _DiffT> struct _Size<_A2, _DiffT, __void_t<typename _A2::size_type>> { using type = typename _A2::size_type; }; public: /** * @brief The allocator's const pointer type. * * @c Alloc::const_pointer if that type exists, otherwise * <tt> pointer_traits<pointer>::rebind<const value_type> </tt> */ using const_pointer = typename _Ptr<__c_pointer, const value_type>::type; /** * @brief The allocator's void pointer type. * * @c Alloc::void_pointer if that type exists, otherwise * <tt> pointer_traits<pointer>::rebind<void> </tt> */ using void_pointer = typename _Ptr<__v_pointer, void>::type; /** * @brief The allocator's const void pointer type. * * @c Alloc::const_void_pointer if that type exists, otherwise * <tt> pointer_traits<pointer>::rebind<const void> </tt> */ using const_void_pointer = typename _Ptr<__cv_pointer, const void>::type; /** * @brief The allocator's difference type * * @c Alloc::difference_type if that type exists, otherwise * <tt> pointer_traits<pointer>::difference_type </tt> */ using difference_type = typename _Diff<_Alloc, pointer>::type; /** * @brief The allocator's size type * * @c Alloc::size_type if that type exists, otherwise * <tt> make_unsigned<difference_type>::type </tt> */ using size_type = typename _Size<_Alloc, difference_type>::type; /** * @brief How the allocator is propagated on copy assignment * * @c Alloc::propagate_on_container_copy_assignment if that type exists, * otherwise @c false_type */ using propagate_on_container_copy_assignment = __detected_or_t<false_type, __pocca, _Alloc>; /** * @brief How the allocator is propagated on move assignment * * @c Alloc::propagate_on_container_move_assignment if that type exists, * otherwise @c false_type */ using propagate_on_container_move_assignment = __detected_or_t<false_type, __pocma, _Alloc>; /** * @brief How the allocator is propagated on swap * * @c Alloc::propagate_on_container_swap if that type exists, * otherwise @c false_type */ using propagate_on_container_swap = __detected_or_t<false_type, __pocs, _Alloc>; /** * @brief Whether all instances of the allocator type compare equal. * * @c Alloc::is_always_equal if that type exists, * otherwise @c is_empty<Alloc>::type */ using is_always_equal = __detected_or_t<typename is_empty<_Alloc>::type, __equal, _Alloc>; template<typename _Tp> using rebind_alloc = __alloc_rebind<_Alloc, _Tp>; template<typename _Tp> using rebind_traits = allocator_traits<rebind_alloc<_Tp>>; private: template<typename _Alloc2> static auto _S_allocate(_Alloc2& __a, size_type __n, const_void_pointer __hint, int) -> decltype(__a.allocate(__n, __hint)) { return __a.allocate(__n, __hint); } template<typename _Alloc2> static pointer _S_allocate(_Alloc2& __a, size_type __n, const_void_pointer, ...) { return __a.allocate(__n); } template<typename _Tp, typename... _Args> struct __construct_helper { template<typename _Alloc2, typename = decltype(std::declval<_Alloc2*>()->construct( std::declval<_Tp*>(), std::declval<_Args>()...))> static true_type __test(int); template<typename> static false_type __test(...); using type = decltype(__test<_Alloc>(0)); }; template<typename _Tp, typename... _Args> using __has_construct = typename __construct_helper<_Tp, _Args...>::type; template<typename _Tp, typename... _Args> static _Require<__has_construct<_Tp, _Args...>> _S_construct(_Alloc& __a, _Tp* __p, _Args&&... __args) noexcept(noexcept(__a.construct(__p, std::forward<_Args>(__args)...))) { __a.construct(__p, std::forward<_Args>(__args)...); } template<typename _Tp, typename... _Args> static _Require<__and_<__not_<__has_construct<_Tp, _Args...>>, is_constructible<_Tp, _Args...>>> _S_construct(_Alloc&, _Tp* __p, _Args&&... __args) noexcept(std::is_nothrow_constructible<_Tp, _Args...>::value) { ::new((void*)__p) _Tp(std::forward<_Args>(__args)...); } template<typename _Alloc2, typename _Tp> static auto _S_destroy(_Alloc2& __a, _Tp* __p, int) noexcept(noexcept(__a.destroy(__p))) -> decltype(__a.destroy(__p)) { __a.destroy(__p); } template<typename _Alloc2, typename _Tp> static void _S_destroy(_Alloc2&, _Tp* __p, ...) noexcept(std::is_nothrow_destructible<_Tp>::value) { __p->~_Tp(); } template<typename _Alloc2> static auto _S_max_size(_Alloc2& __a, int) -> decltype(__a.max_size()) { return __a.max_size(); } template<typename _Alloc2> static size_type _S_max_size(_Alloc2&, ...) { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 2466. allocator_traits::max_size() default behavior is incorrect return __gnu_cxx::__numeric_traits<size_type>::__max / sizeof(value_type); } template<typename _Alloc2> static auto _S_select(_Alloc2& __a, int) -> decltype(__a.select_on_container_copy_construction()) { return __a.select_on_container_copy_construction(); } template<typename _Alloc2> static _Alloc2 _S_select(_Alloc2& __a, ...) { return __a; } public: /** * @brief Allocate memory. * @param __a An allocator. * @param __n The number of objects to allocate space for. * * Calls @c a.allocate(n) */ _GLIBCXX_NODISCARD static pointer allocate(_Alloc& __a, size_type __n) { return __a.allocate(__n); } /** * @brief Allocate memory. * @param __a An allocator. * @param __n The number of objects to allocate space for. * @param __hint Aid to locality. * @return Memory of suitable size and alignment for @a n objects * of type @c value_type * * Returns <tt> a.allocate(n, hint) </tt> if that expression is * well-formed, otherwise returns @c a.allocate(n) */ _GLIBCXX_NODISCARD static pointer allocate(_Alloc& __a, size_type __n, const_void_pointer __hint) { return _S_allocate(__a, __n, __hint, 0); } /** * @brief Deallocate memory. * @param __a An allocator. * @param __p Pointer to the memory to deallocate. * @param __n The number of objects space was allocated for. * * Calls <tt> a.deallocate(p, n) </tt> */ static void deallocate(_Alloc& __a, pointer __p, size_type __n) { __a.deallocate(__p, __n); } /** * @brief Construct an object of type `_Tp` * @param __a An allocator. * @param __p Pointer to memory of suitable size and alignment for Tp * @param __args Constructor arguments. * * Calls <tt> __a.construct(__p, std::forward<Args>(__args)...) </tt> * if that expression is well-formed, otherwise uses placement-new * to construct an object of type @a _Tp at location @a __p from the * arguments @a __args... */ template<typename _Tp, typename... _Args> static auto construct(_Alloc& __a, _Tp* __p, _Args&&... __args) noexcept(noexcept(_S_construct(__a, __p, std::forward<_Args>(__args)...))) -> decltype(_S_construct(__a, __p, std::forward<_Args>(__args)...)) { _S_construct(__a, __p, std::forward<_Args>(__args)...); } /** * @brief Destroy an object of type @a _Tp * @param __a An allocator. * @param __p Pointer to the object to destroy * * Calls @c __a.destroy(__p) if that expression is well-formed, * otherwise calls @c __p->~_Tp() */ template<typename _Tp> static void destroy(_Alloc& __a, _Tp* __p) noexcept(noexcept(_S_destroy(__a, __p, 0))) { _S_destroy(__a, __p, 0); } /** * @brief The maximum supported allocation size * @param __a An allocator. * @return @c __a.max_size() or @c numeric_limits<size_type>::max() * * Returns @c __a.max_size() if that expression is well-formed, * otherwise returns @c numeric_limits<size_type>::max() */ static size_type max_size(const _Alloc& __a) noexcept { return _S_max_size(__a, 0); } /** * @brief Obtain an allocator to use when copying a container. * @param __rhs An allocator. * @return @c __rhs.select_on_container_copy_construction() or @a __rhs * * Returns @c __rhs.select_on_container_copy_construction() if that * expression is well-formed, otherwise returns @a __rhs */ static _Alloc select_on_container_copy_construction(const _Alloc& __rhs) { return _S_select(__rhs, 0); } }; /// Partial specialization for std::allocator. template<typename _Tp> struct allocator_traits<allocator<_Tp>> { /// The allocator type using allocator_type = allocator<_Tp>; /// The allocated type using value_type = _Tp; /// The allocator's pointer type. using pointer = _Tp*; /// The allocator's const pointer type. using const_pointer = const _Tp*; /// The allocator's void pointer type. using void_pointer = void*; /// The allocator's const void pointer type. using const_void_pointer = const void*; /// The allocator's difference type using difference_type = std::ptrdiff_t; /// The allocator's size type using size_type = std::size_t; /// How the allocator is propagated on copy assignment using propagate_on_container_copy_assignment = false_type; /// How the allocator is propagated on move assignment using propagate_on_container_move_assignment = true_type; /// How the allocator is propagated on swap using propagate_on_container_swap = false_type; /// Whether all instances of the allocator type compare equal. using is_always_equal = true_type; template<typename _Up> using rebind_alloc = allocator<_Up>; template<typename _Up> using rebind_traits = allocator_traits<allocator<_Up>>; /** * @brief Allocate memory. * @param __a An allocator. * @param __n The number of objects to allocate space for. * * Calls @c a.allocate(n) */ _GLIBCXX_NODISCARD static pointer allocate(allocator_type& __a, size_type __n) { return __a.allocate(__n); } /** * @brief Allocate memory. * @param __a An allocator. * @param __n The number of objects to allocate space for. * @param __hint Aid to locality. * @return Memory of suitable size and alignment for @a n objects * of type @c value_type * * Returns <tt> a.allocate(n, hint) </tt> */ _GLIBCXX_NODISCARD static pointer allocate(allocator_type& __a, size_type __n, const_void_pointer __hint) { return __a.allocate(__n, __hint); } /** * @brief Deallocate memory. * @param __a An allocator. * @param __p Pointer to the memory to deallocate. * @param __n The number of objects space was allocated for. * * Calls <tt> a.deallocate(p, n) </tt> */ static void deallocate(allocator_type& __a, pointer __p, size_type __n) { __a.deallocate(__p, __n); } /** * @brief Construct an object of type @a _Up * @param __a An allocator. * @param __p Pointer to memory of suitable size and alignment for Tp * @param __args Constructor arguments. * * Calls <tt> __a.construct(__p, std::forward<Args>(__args)...) </tt> */ template<typename _Up, typename... _Args> static void construct(allocator_type& __a, _Up* __p, _Args&&... __args) noexcept(std::is_nothrow_constructible<_Up, _Args...>::value) { __a.construct(__p, std::forward<_Args>(__args)...); } /** * @brief Destroy an object of type @a _Up * @param __a An allocator. * @param __p Pointer to the object to destroy * * Calls @c __a.destroy(__p). */ template<typename _Up> static void destroy(allocator_type& __a, _Up* __p) noexcept(noexcept(__a.destroy(__p))) { __a.destroy(__p); } /** * @brief The maximum supported allocation size * @param __a An allocator. * @return @c __a.max_size() */ static size_type max_size(const allocator_type& __a) noexcept { return __a.max_size(); } /** * @brief Obtain an allocator to use when copying a container. * @param __rhs An allocator. * @return @c __rhs */ static allocator_type select_on_container_copy_construction(const allocator_type& __rhs) { return __rhs; } }; template<typename _Alloc> inline void __do_alloc_on_copy(_Alloc& __one, const _Alloc& __two, true_type) { __one = __two; } template<typename _Alloc> inline void __do_alloc_on_copy(_Alloc&, const _Alloc&, false_type) { } template<typename _Alloc> inline void __alloc_on_copy(_Alloc& __one, const _Alloc& __two) { typedef allocator_traits<_Alloc> __traits; typedef typename __traits::propagate_on_container_copy_assignment __pocca; __do_alloc_on_copy(__one, __two, __pocca()); } template<typename _Alloc> inline _Alloc __alloc_on_copy(const _Alloc& __a) { typedef allocator_traits<_Alloc> __traits; return __traits::select_on_container_copy_construction(__a); } template<typename _Alloc> inline void __do_alloc_on_move(_Alloc& __one, _Alloc& __two, true_type) { __one = std::move(__two); } template<typename _Alloc> inline void __do_alloc_on_move(_Alloc&, _Alloc&, false_type) { } template<typename _Alloc> inline void __alloc_on_move(_Alloc& __one, _Alloc& __two) { typedef allocator_traits<_Alloc> __traits; typedef typename __traits::propagate_on_container_move_assignment __pocma; __do_alloc_on_move(__one, __two, __pocma()); } template<typename _Alloc> inline void __do_alloc_on_swap(_Alloc& __one, _Alloc& __two, true_type) { using std::swap; swap(__one, __two); } template<typename _Alloc> inline void __do_alloc_on_swap(_Alloc&, _Alloc&, false_type) { } template<typename _Alloc> inline void __alloc_on_swap(_Alloc& __one, _Alloc& __two) { typedef allocator_traits<_Alloc> __traits; typedef typename __traits::propagate_on_container_swap __pocs; __do_alloc_on_swap(__one, __two, __pocs()); } template<typename _Alloc, typename _Tp, typename _ValueT = __remove_cvref_t<typename _Alloc::value_type>, typename = void> struct __is_alloc_insertable_impl : false_type { }; template<typename _Alloc, typename _Tp, typename _ValueT> struct __is_alloc_insertable_impl<_Alloc, _Tp, _ValueT, __void_t<decltype(allocator_traits<_Alloc>::construct( std::declval<_Alloc&>(), std::declval<_ValueT*>(), std::declval<_Tp>()))>> : true_type { }; // true if _Alloc::value_type is CopyInsertable into containers using _Alloc // (might be wrong if _Alloc::construct exists but is not constrained, // i.e. actually trying to use it would still be invalid. Use with caution.) template<typename _Alloc> struct __is_copy_insertable : __is_alloc_insertable_impl<_Alloc, typename _Alloc::value_type const&>::type { }; // std::allocator<_Tp> just requires CopyConstructible template<typename _Tp> struct __is_copy_insertable<allocator<_Tp>> : is_copy_constructible<_Tp> { }; // true if _Alloc::value_type is MoveInsertable into containers using _Alloc // (might be wrong if _Alloc::construct exists but is not constrained, // i.e. actually trying to use it would still be invalid. Use with caution.) template<typename _Alloc> struct __is_move_insertable : __is_alloc_insertable_impl<_Alloc, typename _Alloc::value_type>::type { }; // std::allocator<_Tp> just requires MoveConstructible template<typename _Tp> struct __is_move_insertable<allocator<_Tp>> : is_move_constructible<_Tp> { }; // Trait to detect Allocator-like types. template<typename _Alloc, typename = void> struct __is_allocator : false_type { }; template<typename _Alloc> struct __is_allocator<_Alloc, __void_t<typename _Alloc::value_type, decltype(std::declval<_Alloc&>().allocate(size_t{}))>> : true_type { }; template<typename _Alloc> using _RequireAllocator = typename enable_if<__is_allocator<_Alloc>::value, _Alloc>::type; template<typename _Alloc> using _RequireNotAllocator = typename enable_if<!__is_allocator<_Alloc>::value, _Alloc>::type; _GLIBCXX_END_NAMESPACE_VERSION } // namespace std #endif // C++11 # 643 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/alloc_traits.h" 3 #endif // _ALLOC_TRAITS_H # 644 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/alloc_traits.h" 3 # 37 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/alloc_traits.h" 2 3 #else # 38 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/alloc_traits.h" 3 #if 0 /* expanded by -frewrite-includes */ # include <bits/allocator.h> // for __alloc_swap #endif /* expanded by -frewrite-includes */ # 38 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/alloc_traits.h" 3 # 39 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/alloc_traits.h" 3 #endif # 40 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/alloc_traits.h" 3 namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @brief Uniform interface to C++98 and C++11 allocators. * @ingroup allocators */ template<typename _Alloc, typename = typename _Alloc::value_type> struct __alloc_traits #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 52 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/alloc_traits.h" 3 : std::allocator_traits<_Alloc> #endif # 54 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/alloc_traits.h" 3 { typedef _Alloc allocator_type; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 57 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/alloc_traits.h" 3 typedef std::allocator_traits<_Alloc> _Base_type; typedef typename _Base_type::value_type value_type; typedef typename _Base_type::pointer pointer; typedef typename _Base_type::const_pointer const_pointer; typedef typename _Base_type::size_type size_type; typedef typename _Base_type::difference_type difference_type; // C++11 allocators do not define reference or const_reference typedef value_type& reference; typedef const value_type& const_reference; using _Base_type::allocate; using _Base_type::deallocate; using _Base_type::construct; using _Base_type::destroy; using _Base_type::max_size; private: template<typename _Ptr> using __is_custom_pointer = std::__and_<std::is_same<pointer, _Ptr>, std::__not_<std::is_pointer<_Ptr>>>; public: // overload construct for non-standard pointer types template<typename _Ptr, typename... _Args> static typename std::enable_if<__is_custom_pointer<_Ptr>::value>::type construct(_Alloc& __a, _Ptr __p, _Args&&... __args) noexcept(noexcept(_Base_type::construct(__a, std::__to_address(__p), std::forward<_Args>(__args)...))) { _Base_type::construct(__a, std::__to_address(__p), std::forward<_Args>(__args)...); } // overload destroy for non-standard pointer types template<typename _Ptr> static typename std::enable_if<__is_custom_pointer<_Ptr>::value>::type destroy(_Alloc& __a, _Ptr __p) noexcept(noexcept(_Base_type::destroy(__a, std::__to_address(__p)))) { _Base_type::destroy(__a, std::__to_address(__p)); } static _Alloc _S_select_on_copy(const _Alloc& __a) { return _Base_type::select_on_container_copy_construction(__a); } static void _S_on_swap(_Alloc& __a, _Alloc& __b) { std::__alloc_on_swap(__a, __b); } static constexpr bool _S_propagate_on_copy_assign() { return _Base_type::propagate_on_container_copy_assignment::value; } static constexpr bool _S_propagate_on_move_assign() { return _Base_type::propagate_on_container_move_assignment::value; } static constexpr bool _S_propagate_on_swap() { return _Base_type::propagate_on_container_swap::value; } static constexpr bool _S_always_equal() { return _Base_type::is_always_equal::value; } static constexpr bool _S_nothrow_move() { return _S_propagate_on_move_assign() || _S_always_equal(); } template<typename _Tp> struct rebind { typedef typename _Base_type::template rebind_alloc<_Tp> other; }; #else # 122 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/alloc_traits.h" 3 typedef typename _Alloc::pointer pointer; typedef typename _Alloc::const_pointer const_pointer; typedef typename _Alloc::value_type value_type; typedef typename _Alloc::reference reference; typedef typename _Alloc::const_reference const_reference; typedef typename _Alloc::size_type size_type; typedef typename _Alloc::difference_type difference_type; _GLIBCXX_NODISCARD static pointer allocate(_Alloc& __a, size_type __n) { return __a.allocate(__n); } static void deallocate(_Alloc& __a, pointer __p, size_type __n) { __a.deallocate(__p, __n); } template<typename _Tp> static void construct(_Alloc& __a, pointer __p, const _Tp& __arg) { __a.construct(__p, __arg); } static void destroy(_Alloc& __a, pointer __p) { __a.destroy(__p); } static size_type max_size(const _Alloc& __a) { return __a.max_size(); } static const _Alloc& _S_select_on_copy(const _Alloc& __a) { return __a; } static void _S_on_swap(_Alloc& __a, _Alloc& __b) { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 431. Swapping containers with unequal allocators. std::__alloc_swap<_Alloc>::_S_do_it(__a, __b); } template<typename _Tp> struct rebind { typedef typename _Alloc::template rebind<_Tp>::other other; }; #endif # 161 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/alloc_traits.h" 3 }; _GLIBCXX_END_NAMESPACE_VERSION } // namespace __gnu_cxx #endif # 167 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/alloc_traits.h" 3 # 62 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_construct.h" 2 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION /** * Constructs an object in existing memory by invoking an allocated * object's constructor with an initializer. */ #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 72 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_construct.h" 3 template<typename _T1, typename... _Args> inline void _Construct(_T1* __p, _Args&&... __args) { ::new(static_cast<void*>(__p)) _T1(std::forward<_Args>(__args)...); } #else # 77 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_construct.h" 3 template<typename _T1, typename _T2> inline void _Construct(_T1* __p, const _T2& __value) { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 402. wrong new expression in [some_]allocator::construct ::new(static_cast<void*>(__p)) _T1(__value); } #endif # 86 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_construct.h" 3 template<typename _T1> inline void _Construct_novalue(_T1* __p) { ::new(static_cast<void*>(__p)) _T1; } /** * Destroy the object pointed to by a pointer type. */ template<typename _Tp> inline void _Destroy(_Tp* __pointer) { __pointer->~_Tp(); } template<bool> struct _Destroy_aux { template<typename _ForwardIterator> static void __destroy(_ForwardIterator __first, _ForwardIterator __last) { for (; __first != __last; ++__first) std::_Destroy(std::__addressof(*__first)); } }; template<> struct _Destroy_aux<true> { template<typename _ForwardIterator> static void __destroy(_ForwardIterator, _ForwardIterator) { } }; /** * Destroy a range of objects. If the value_type of the object has * a trivial destructor, the compiler should optimize all of this * away, otherwise the objects' destructors must be invoked. */ template<typename _ForwardIterator> inline void _Destroy(_ForwardIterator __first, _ForwardIterator __last) { typedef typename iterator_traits<_ForwardIterator>::value_type _Value_type; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 132 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_construct.h" 3 // A deleted destructor is trivial, this ensures we reject such types: static_assert(is_destructible<_Value_type>::value, "value type is destructible"); #endif # 136 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_construct.h" 3 std::_Destroy_aux<__has_trivial_destructor(_Value_type)>:: __destroy(__first, __last); } template<bool> struct _Destroy_n_aux { template<typename _ForwardIterator, typename _Size> static _ForwardIterator __destroy_n(_ForwardIterator __first, _Size __count) { for (; __count > 0; (void)++__first, --__count) std::_Destroy(std::__addressof(*__first)); return __first; } }; template<> struct _Destroy_n_aux<true> { template<typename _ForwardIterator, typename _Size> static _ForwardIterator __destroy_n(_ForwardIterator __first, _Size __count) { std::advance(__first, __count); return __first; } }; /** * Destroy a range of objects. If the value_type of the object has * a trivial destructor, the compiler should optimize all of this * away, otherwise the objects' destructors must be invoked. */ template<typename _ForwardIterator, typename _Size> inline _ForwardIterator _Destroy_n(_ForwardIterator __first, _Size __count) { typedef typename iterator_traits<_ForwardIterator>::value_type _Value_type; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 177 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_construct.h" 3 // A deleted destructor is trivial, this ensures we reject such types: static_assert(is_destructible<_Value_type>::value, "value type is destructible"); #endif # 181 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_construct.h" 3 return std::_Destroy_n_aux<__has_trivial_destructor(_Value_type)>:: __destroy_n(__first, __count); } /** * Destroy a range of objects using the supplied allocator. For * nondefault allocators we do not optimize away invocation of * destroy() even if _Tp has a trivial destructor. */ template<typename _ForwardIterator, typename _Allocator> void _Destroy(_ForwardIterator __first, _ForwardIterator __last, _Allocator& __alloc) { typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; for (; __first != __last; ++__first) __traits::destroy(__alloc, std::__addressof(*__first)); } template<typename _ForwardIterator, typename _Tp> inline void _Destroy(_ForwardIterator __first, _ForwardIterator __last, allocator<_Tp>&) { _Destroy(__first, __last); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201402L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 210 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_construct.h" 3 template <typename _Tp> inline void destroy_at(_Tp* __location) { std::_Destroy(__location); } template <typename _ForwardIterator> inline void destroy(_ForwardIterator __first, _ForwardIterator __last) { std::_Destroy(__first, __last); } template <typename _ForwardIterator, typename _Size> inline _ForwardIterator destroy_n(_ForwardIterator __first, _Size __count) { return std::_Destroy_n(__first, __count); } #endif # 231 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_construct.h" 3 _GLIBCXX_END_NAMESPACE_VERSION } // namespace std #endif /* _STL_CONSTRUCT_H */ # 236 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_construct.h" 3 # 66 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/deque" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/stl_uninitialized.h> #endif /* expanded by -frewrite-includes */ # 66 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/deque" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_uninitialized.h" 1 3 // Raw memory manipulators -*- C++ -*- // Copyright (C) 2001-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /* * * Copyright (c) 1994 * Hewlett-Packard Company * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Hewlett-Packard Company makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. * * * Copyright (c) 1996,1997 * Silicon Graphics Computer Systems, Inc. * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Silicon Graphics makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. */ /** @file bits/stl_uninitialized.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{memory} */ #ifndef _STL_UNINITIALIZED_H #define _STL_UNINITIALIZED_H 1 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201402L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 60 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_uninitialized.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <utility> #endif /* expanded by -frewrite-includes */ # 60 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_uninitialized.h" 3 # 61 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_uninitialized.h" 3 #endif # 62 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_uninitialized.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 64 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_uninitialized.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <type_traits> #endif /* expanded by -frewrite-includes */ # 64 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_uninitialized.h" 3 # 65 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_uninitialized.h" 3 #endif # 66 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_uninitialized.h" 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION template<bool _TrivialValueTypes> struct __uninitialized_copy { template<typename _InputIterator, typename _ForwardIterator> static _ForwardIterator __uninit_copy(_InputIterator __first, _InputIterator __last, _ForwardIterator __result) { _ForwardIterator __cur = __result; __try { for (; __first != __last; ++__first, (void)++__cur) std::_Construct(std::__addressof(*__cur), *__first); return __cur; } __catch(...) { std::_Destroy(__result, __cur); __throw_exception_again; } } }; template<> struct __uninitialized_copy<true> { template<typename _InputIterator, typename _ForwardIterator> static _ForwardIterator __uninit_copy(_InputIterator __first, _InputIterator __last, _ForwardIterator __result) { return std::copy(__first, __last, __result); } }; /** * @brief Copies the range [first,last) into result. * @param __first An input iterator. * @param __last An input iterator. * @param __result An output iterator. * @return __result + (__first - __last) * * Like copy(), but does not require an initialized output range. */ template<typename _InputIterator, typename _ForwardIterator> inline _ForwardIterator uninitialized_copy(_InputIterator __first, _InputIterator __last, _ForwardIterator __result) { typedef typename iterator_traits<_InputIterator>::value_type _ValueType1; typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType2; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus < 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 123 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_uninitialized.h" 3 const bool __assignable = true; #else # 125 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_uninitialized.h" 3 // Trivial types can have deleted copy constructor, but the std::copy // optimization that uses memmove would happily "copy" them anyway. static_assert(is_constructible<_ValueType2, decltype(*__first)>::value, "result type must be constructible from value type of input range"); typedef typename iterator_traits<_InputIterator>::reference _RefType1; typedef typename iterator_traits<_ForwardIterator>::reference _RefType2; // Trivial types can have deleted assignment, so using std::copy // would be ill-formed. Require assignability before using std::copy: const bool __assignable = is_assignable<_RefType2, _RefType1>::value; #endif # 136 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_uninitialized.h" 3 return std::__uninitialized_copy<__is_trivial(_ValueType1) && __is_trivial(_ValueType2) && __assignable>:: __uninit_copy(__first, __last, __result); } template<bool _TrivialValueType> struct __uninitialized_fill { template<typename _ForwardIterator, typename _Tp> static void __uninit_fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __x) { _ForwardIterator __cur = __first; __try { for (; __cur != __last; ++__cur) std::_Construct(std::__addressof(*__cur), __x); } __catch(...) { std::_Destroy(__first, __cur); __throw_exception_again; } } }; template<> struct __uninitialized_fill<true> { template<typename _ForwardIterator, typename _Tp> static void __uninit_fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __x) { std::fill(__first, __last, __x); } }; /** * @brief Copies the value x into the range [first,last). * @param __first An input iterator. * @param __last An input iterator. * @param __x The source value. * @return Nothing. * * Like fill(), but does not require an initialized output range. */ template<typename _ForwardIterator, typename _Tp> inline void uninitialized_fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __x) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus < 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 193 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_uninitialized.h" 3 const bool __assignable = true; #else # 195 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_uninitialized.h" 3 // Trivial types can have deleted copy constructor, but the std::fill // optimization that uses memmove would happily "copy" them anyway. static_assert(is_constructible<_ValueType, const _Tp&>::value, "result type must be constructible from input type"); // Trivial types can have deleted assignment, so using std::fill // would be ill-formed. Require assignability before using std::fill: const bool __assignable = is_copy_assignable<_ValueType>::value; #endif # 204 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_uninitialized.h" 3 std::__uninitialized_fill<__is_trivial(_ValueType) && __assignable>:: __uninit_fill(__first, __last, __x); } template<bool _TrivialValueType> struct __uninitialized_fill_n { template<typename _ForwardIterator, typename _Size, typename _Tp> static _ForwardIterator __uninit_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __x) { _ForwardIterator __cur = __first; __try { for (; __n > 0; --__n, (void) ++__cur) std::_Construct(std::__addressof(*__cur), __x); return __cur; } __catch(...) { std::_Destroy(__first, __cur); __throw_exception_again; } } }; template<> struct __uninitialized_fill_n<true> { template<typename _ForwardIterator, typename _Size, typename _Tp> static _ForwardIterator __uninit_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __x) { return std::fill_n(__first, __n, __x); } }; // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR 1339. uninitialized_fill_n should return the end of its range /** * @brief Copies the value x into the range [first,first+n). * @param __first An input iterator. * @param __n The number of copies to make. * @param __x The source value. * @return Nothing. * * Like fill_n(), but does not require an initialized output range. */ template<typename _ForwardIterator, typename _Size, typename _Tp> inline _ForwardIterator uninitialized_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __x) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus < 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 261 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_uninitialized.h" 3 const bool __assignable = true; #else # 263 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_uninitialized.h" 3 // Trivial types can have deleted copy constructor, but the std::fill // optimization that uses memmove would happily "copy" them anyway. static_assert(is_constructible<_ValueType, const _Tp&>::value, "result type must be constructible from input type"); // Trivial types can have deleted assignment, so using std::fill // would be ill-formed. Require assignability before using std::fill: const bool __assignable = is_copy_assignable<_ValueType>::value; #endif # 272 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_uninitialized.h" 3 return __uninitialized_fill_n<__is_trivial(_ValueType) && __assignable>:: __uninit_fill_n(__first, __n, __x); } // Extensions: versions of uninitialized_copy, uninitialized_fill, // and uninitialized_fill_n that take an allocator parameter. // We dispatch back to the standard versions when we're given the // default allocator. For nondefault allocators we do not use // any of the POD optimizations. template<typename _InputIterator, typename _ForwardIterator, typename _Allocator> _ForwardIterator __uninitialized_copy_a(_InputIterator __first, _InputIterator __last, _ForwardIterator __result, _Allocator& __alloc) { _ForwardIterator __cur = __result; __try { typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; for (; __first != __last; ++__first, (void)++__cur) __traits::construct(__alloc, std::__addressof(*__cur), *__first); return __cur; } __catch(...) { std::_Destroy(__result, __cur, __alloc); __throw_exception_again; } } template<typename _InputIterator, typename _ForwardIterator, typename _Tp> inline _ForwardIterator __uninitialized_copy_a(_InputIterator __first, _InputIterator __last, _ForwardIterator __result, allocator<_Tp>&) { return std::uninitialized_copy(__first, __last, __result); } template<typename _InputIterator, typename _ForwardIterator, typename _Allocator> inline _ForwardIterator __uninitialized_move_a(_InputIterator __first, _InputIterator __last, _ForwardIterator __result, _Allocator& __alloc) { return std::__uninitialized_copy_a(_GLIBCXX_MAKE_MOVE_ITERATOR(__first), _GLIBCXX_MAKE_MOVE_ITERATOR(__last), __result, __alloc); } template<typename _InputIterator, typename _ForwardIterator, typename _Allocator> inline _ForwardIterator __uninitialized_move_if_noexcept_a(_InputIterator __first, _InputIterator __last, _ForwardIterator __result, _Allocator& __alloc) { return std::__uninitialized_copy_a (_GLIBCXX_MAKE_MOVE_IF_NOEXCEPT_ITERATOR(__first), _GLIBCXX_MAKE_MOVE_IF_NOEXCEPT_ITERATOR(__last), __result, __alloc); } template<typename _ForwardIterator, typename _Tp, typename _Allocator> void __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __x, _Allocator& __alloc) { _ForwardIterator __cur = __first; __try { typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; for (; __cur != __last; ++__cur) __traits::construct(__alloc, std::__addressof(*__cur), __x); } __catch(...) { std::_Destroy(__first, __cur, __alloc); __throw_exception_again; } } template<typename _ForwardIterator, typename _Tp, typename _Tp2> inline void __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __x, allocator<_Tp2>&) { std::uninitialized_fill(__first, __last, __x); } template<typename _ForwardIterator, typename _Size, typename _Tp, typename _Allocator> _ForwardIterator __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n, const _Tp& __x, _Allocator& __alloc) { _ForwardIterator __cur = __first; __try { typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; for (; __n > 0; --__n, (void) ++__cur) __traits::construct(__alloc, std::__addressof(*__cur), __x); return __cur; } __catch(...) { std::_Destroy(__first, __cur, __alloc); __throw_exception_again; } } template<typename _ForwardIterator, typename _Size, typename _Tp, typename _Tp2> inline _ForwardIterator __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n, const _Tp& __x, allocator<_Tp2>&) { return std::uninitialized_fill_n(__first, __n, __x); } // Extensions: __uninitialized_copy_move, __uninitialized_move_copy, // __uninitialized_fill_move, __uninitialized_move_fill. // All of these algorithms take a user-supplied allocator, which is used // for construction and destruction. // __uninitialized_copy_move // Copies [first1, last1) into [result, result + (last1 - first1)), and // move [first2, last2) into // [result, result + (last1 - first1) + (last2 - first2)). template<typename _InputIterator1, typename _InputIterator2, typename _ForwardIterator, typename _Allocator> inline _ForwardIterator __uninitialized_copy_move(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _ForwardIterator __result, _Allocator& __alloc) { _ForwardIterator __mid = std::__uninitialized_copy_a(__first1, __last1, __result, __alloc); __try { return std::__uninitialized_move_a(__first2, __last2, __mid, __alloc); } __catch(...) { std::_Destroy(__result, __mid, __alloc); __throw_exception_again; } } // __uninitialized_move_copy // Moves [first1, last1) into [result, result + (last1 - first1)), and // copies [first2, last2) into // [result, result + (last1 - first1) + (last2 - first2)). template<typename _InputIterator1, typename _InputIterator2, typename _ForwardIterator, typename _Allocator> inline _ForwardIterator __uninitialized_move_copy(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _ForwardIterator __result, _Allocator& __alloc) { _ForwardIterator __mid = std::__uninitialized_move_a(__first1, __last1, __result, __alloc); __try { return std::__uninitialized_copy_a(__first2, __last2, __mid, __alloc); } __catch(...) { std::_Destroy(__result, __mid, __alloc); __throw_exception_again; } } // __uninitialized_fill_move // Fills [result, mid) with x, and moves [first, last) into // [mid, mid + (last - first)). template<typename _ForwardIterator, typename _Tp, typename _InputIterator, typename _Allocator> inline _ForwardIterator __uninitialized_fill_move(_ForwardIterator __result, _ForwardIterator __mid, const _Tp& __x, _InputIterator __first, _InputIterator __last, _Allocator& __alloc) { std::__uninitialized_fill_a(__result, __mid, __x, __alloc); __try { return std::__uninitialized_move_a(__first, __last, __mid, __alloc); } __catch(...) { std::_Destroy(__result, __mid, __alloc); __throw_exception_again; } } // __uninitialized_move_fill // Moves [first1, last1) into [first2, first2 + (last1 - first1)), and // fills [first2 + (last1 - first1), last2) with x. template<typename _InputIterator, typename _ForwardIterator, typename _Tp, typename _Allocator> inline void __uninitialized_move_fill(_InputIterator __first1, _InputIterator __last1, _ForwardIterator __first2, _ForwardIterator __last2, const _Tp& __x, _Allocator& __alloc) { _ForwardIterator __mid2 = std::__uninitialized_move_a(__first1, __last1, __first2, __alloc); __try { std::__uninitialized_fill_a(__mid2, __last2, __x, __alloc); } __catch(...) { std::_Destroy(__first2, __mid2, __alloc); __throw_exception_again; } } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 496 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_uninitialized.h" 3 // Extensions: __uninitialized_default, __uninitialized_default_n, // __uninitialized_default_a, __uninitialized_default_n_a. template<bool _TrivialValueType> struct __uninitialized_default_1 { template<typename _ForwardIterator> static void __uninit_default(_ForwardIterator __first, _ForwardIterator __last) { _ForwardIterator __cur = __first; __try { for (; __cur != __last; ++__cur) std::_Construct(std::__addressof(*__cur)); } __catch(...) { std::_Destroy(__first, __cur); __throw_exception_again; } } }; template<> struct __uninitialized_default_1<true> { template<typename _ForwardIterator> static void __uninit_default(_ForwardIterator __first, _ForwardIterator __last) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; std::fill(__first, __last, _ValueType()); } }; template<bool _TrivialValueType> struct __uninitialized_default_n_1 { template<typename _ForwardIterator, typename _Size> static _ForwardIterator __uninit_default_n(_ForwardIterator __first, _Size __n) { _ForwardIterator __cur = __first; __try { for (; __n > 0; --__n, (void) ++__cur) std::_Construct(std::__addressof(*__cur)); return __cur; } __catch(...) { std::_Destroy(__first, __cur); __throw_exception_again; } } }; template<> struct __uninitialized_default_n_1<true> { template<typename _ForwardIterator, typename _Size> static _ForwardIterator __uninit_default_n(_ForwardIterator __first, _Size __n) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; return std::fill_n(__first, __n, _ValueType()); } }; // __uninitialized_default // Fills [first, last) with std::distance(first, last) default // constructed value_types(s). template<typename _ForwardIterator> inline void __uninitialized_default(_ForwardIterator __first, _ForwardIterator __last) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; // trivial types can have deleted assignment const bool __assignable = is_copy_assignable<_ValueType>::value; std::__uninitialized_default_1<__is_trivial(_ValueType) && __assignable>:: __uninit_default(__first, __last); } // __uninitialized_default_n // Fills [first, first + n) with n default constructed value_type(s). template<typename _ForwardIterator, typename _Size> inline _ForwardIterator __uninitialized_default_n(_ForwardIterator __first, _Size __n) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; // trivial types can have deleted assignment const bool __assignable = is_copy_assignable<_ValueType>::value; return __uninitialized_default_n_1<__is_trivial(_ValueType) && __assignable>:: __uninit_default_n(__first, __n); } // __uninitialized_default_a // Fills [first, last) with std::distance(first, last) default // constructed value_types(s), constructed with the allocator alloc. template<typename _ForwardIterator, typename _Allocator> void __uninitialized_default_a(_ForwardIterator __first, _ForwardIterator __last, _Allocator& __alloc) { _ForwardIterator __cur = __first; __try { typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; for (; __cur != __last; ++__cur) __traits::construct(__alloc, std::__addressof(*__cur)); } __catch(...) { std::_Destroy(__first, __cur, __alloc); __throw_exception_again; } } template<typename _ForwardIterator, typename _Tp> inline void __uninitialized_default_a(_ForwardIterator __first, _ForwardIterator __last, allocator<_Tp>&) { std::__uninitialized_default(__first, __last); } // __uninitialized_default_n_a // Fills [first, first + n) with n default constructed value_types(s), // constructed with the allocator alloc. template<typename _ForwardIterator, typename _Size, typename _Allocator> _ForwardIterator __uninitialized_default_n_a(_ForwardIterator __first, _Size __n, _Allocator& __alloc) { _ForwardIterator __cur = __first; __try { typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; for (; __n > 0; --__n, (void) ++__cur) __traits::construct(__alloc, std::__addressof(*__cur)); return __cur; } __catch(...) { std::_Destroy(__first, __cur, __alloc); __throw_exception_again; } } template<typename _ForwardIterator, typename _Size, typename _Tp> inline _ForwardIterator __uninitialized_default_n_a(_ForwardIterator __first, _Size __n, allocator<_Tp>&) { return std::__uninitialized_default_n(__first, __n); } template<bool _TrivialValueType> struct __uninitialized_default_novalue_1 { template<typename _ForwardIterator> static void __uninit_default_novalue(_ForwardIterator __first, _ForwardIterator __last) { _ForwardIterator __cur = __first; __try { for (; __cur != __last; ++__cur) std::_Construct_novalue(std::__addressof(*__cur)); } __catch(...) { std::_Destroy(__first, __cur); __throw_exception_again; } } }; template<> struct __uninitialized_default_novalue_1<true> { template<typename _ForwardIterator> static void __uninit_default_novalue(_ForwardIterator __first, _ForwardIterator __last) { } }; template<bool _TrivialValueType> struct __uninitialized_default_novalue_n_1 { template<typename _ForwardIterator, typename _Size> static _ForwardIterator __uninit_default_novalue_n(_ForwardIterator __first, _Size __n) { _ForwardIterator __cur = __first; __try { for (; __n > 0; --__n, (void) ++__cur) std::_Construct_novalue(std::__addressof(*__cur)); return __cur; } __catch(...) { std::_Destroy(__first, __cur); __throw_exception_again; } } }; template<> struct __uninitialized_default_novalue_n_1<true> { template<typename _ForwardIterator, typename _Size> static _ForwardIterator __uninit_default_novalue_n(_ForwardIterator __first, _Size __n) { return std::next(__first, __n); } }; // __uninitialized_default_novalue // Fills [first, last) with std::distance(first, last) default-initialized // value_types(s). template<typename _ForwardIterator> inline void __uninitialized_default_novalue(_ForwardIterator __first, _ForwardIterator __last) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; std::__uninitialized_default_novalue_1< is_trivially_default_constructible<_ValueType>::value>:: __uninit_default_novalue(__first, __last); } // __uninitialized_default_n // Fills [first, first + n) with n default-initialized value_type(s). template<typename _ForwardIterator, typename _Size> inline _ForwardIterator __uninitialized_default_novalue_n(_ForwardIterator __first, _Size __n) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; return __uninitialized_default_novalue_n_1< is_trivially_default_constructible<_ValueType>::value>:: __uninit_default_novalue_n(__first, __n); } template<typename _InputIterator, typename _Size, typename _ForwardIterator> _ForwardIterator __uninitialized_copy_n(_InputIterator __first, _Size __n, _ForwardIterator __result, input_iterator_tag) { _ForwardIterator __cur = __result; __try { for (; __n > 0; --__n, (void) ++__first, ++__cur) std::_Construct(std::__addressof(*__cur), *__first); return __cur; } __catch(...) { std::_Destroy(__result, __cur); __throw_exception_again; } } template<typename _RandomAccessIterator, typename _Size, typename _ForwardIterator> inline _ForwardIterator __uninitialized_copy_n(_RandomAccessIterator __first, _Size __n, _ForwardIterator __result, random_access_iterator_tag) { return std::uninitialized_copy(__first, __first + __n, __result); } template<typename _InputIterator, typename _Size, typename _ForwardIterator> pair<_InputIterator, _ForwardIterator> __uninitialized_copy_n_pair(_InputIterator __first, _Size __n, _ForwardIterator __result, input_iterator_tag) { _ForwardIterator __cur = __result; __try { for (; __n > 0; --__n, (void) ++__first, ++__cur) std::_Construct(std::__addressof(*__cur), *__first); return {__first, __cur}; } __catch(...) { std::_Destroy(__result, __cur); __throw_exception_again; } } template<typename _RandomAccessIterator, typename _Size, typename _ForwardIterator> inline pair<_RandomAccessIterator, _ForwardIterator> __uninitialized_copy_n_pair(_RandomAccessIterator __first, _Size __n, _ForwardIterator __result, random_access_iterator_tag) { auto __second_res = uninitialized_copy(__first, __first + __n, __result); auto __first_res = std::next(__first, __n); return {__first_res, __second_res}; } /** * @brief Copies the range [first,first+n) into result. * @param __first An input iterator. * @param __n The number of elements to copy. * @param __result An output iterator. * @return __result + __n * * Like copy_n(), but does not require an initialized output range. */ template<typename _InputIterator, typename _Size, typename _ForwardIterator> inline _ForwardIterator uninitialized_copy_n(_InputIterator __first, _Size __n, _ForwardIterator __result) { return std::__uninitialized_copy_n(__first, __n, __result, std::__iterator_category(__first)); } template<typename _InputIterator, typename _Size, typename _ForwardIterator> inline pair<_InputIterator, _ForwardIterator> __uninitialized_copy_n_pair(_InputIterator __first, _Size __n, _ForwardIterator __result) { return std::__uninitialized_copy_n_pair(__first, __n, __result, std::__iterator_category(__first)); } #endif # 846 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_uninitialized.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 848 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_uninitialized.h" 3 # define __cpp_lib_raw_memory_algorithms 201606L template <typename _ForwardIterator> inline void uninitialized_default_construct(_ForwardIterator __first, _ForwardIterator __last) { __uninitialized_default_novalue(__first, __last); } template <typename _ForwardIterator, typename _Size> inline _ForwardIterator uninitialized_default_construct_n(_ForwardIterator __first, _Size __count) { return __uninitialized_default_novalue_n(__first, __count); } template <typename _ForwardIterator> inline void uninitialized_value_construct(_ForwardIterator __first, _ForwardIterator __last) { return __uninitialized_default(__first, __last); } template <typename _ForwardIterator, typename _Size> inline _ForwardIterator uninitialized_value_construct_n(_ForwardIterator __first, _Size __count) { return __uninitialized_default_n(__first, __count); } template <typename _InputIterator, typename _ForwardIterator> inline _ForwardIterator uninitialized_move(_InputIterator __first, _InputIterator __last, _ForwardIterator __result) { return std::uninitialized_copy (_GLIBCXX_MAKE_MOVE_ITERATOR(__first), _GLIBCXX_MAKE_MOVE_ITERATOR(__last), __result); } template <typename _InputIterator, typename _Size, typename _ForwardIterator> inline pair<_InputIterator, _ForwardIterator> uninitialized_move_n(_InputIterator __first, _Size __count, _ForwardIterator __result) { auto __res = std::__uninitialized_copy_n_pair (_GLIBCXX_MAKE_MOVE_ITERATOR(__first), __count, __result); return {__res.first.base(), __res.second}; } #endif // C++17 # 901 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_uninitialized.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 903 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_uninitialized.h" 3 template<typename _Tp, typename _Up, typename _Allocator> inline void __relocate_object_a(_Tp* __dest, _Up* __orig, _Allocator& __alloc) noexcept(noexcept(std::allocator_traits<_Allocator>::construct(__alloc, __dest, std::move(*__orig))) && noexcept(std::allocator_traits<_Allocator>::destroy( __alloc, std::__addressof(*__orig)))) { typedef std::allocator_traits<_Allocator> __traits; __traits::construct(__alloc, __dest, std::move(*__orig)); __traits::destroy(__alloc, std::__addressof(*__orig)); } // This class may be specialized for specific types. // Also known as is_trivially_relocatable. template<typename _Tp, typename = void> struct __is_bitwise_relocatable : is_trivial<_Tp> { }; template <typename _Tp, typename _Up> inline __enable_if_t<std::__is_bitwise_relocatable<_Tp>::value, _Tp*> __relocate_a_1(_Tp* __first, _Tp* __last, _Tp* __result, allocator<_Up>&) noexcept { ptrdiff_t __count = __last - __first; if (__count > 0) __builtin_memmove(__result, __first, __count * sizeof(_Tp)); return __result + __count; } template <typename _InputIterator, typename _ForwardIterator, typename _Allocator> inline _ForwardIterator __relocate_a_1(_InputIterator __first, _InputIterator __last, _ForwardIterator __result, _Allocator& __alloc) noexcept(noexcept(std::__relocate_object_a(std::addressof(*__result), std::addressof(*__first), __alloc))) { typedef typename iterator_traits<_InputIterator>::value_type _ValueType; typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType2; static_assert(std::is_same<_ValueType, _ValueType2>::value, "relocation is only possible for values of the same type"); _ForwardIterator __cur = __result; for (; __first != __last; ++__first, (void)++__cur) std::__relocate_object_a(std::__addressof(*__cur), std::__addressof(*__first), __alloc); return __cur; } template <typename _InputIterator, typename _ForwardIterator, typename _Allocator> inline _ForwardIterator __relocate_a(_InputIterator __first, _InputIterator __last, _ForwardIterator __result, _Allocator& __alloc) noexcept(noexcept(__relocate_a_1(std::__niter_base(__first), std::__niter_base(__last), std::__niter_base(__result), __alloc))) { return __relocate_a_1(std::__niter_base(__first), std::__niter_base(__last), std::__niter_base(__result), __alloc); } #endif # 969 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_uninitialized.h" 3 _GLIBCXX_END_NAMESPACE_VERSION } // namespace #endif /* _STL_UNINITIALIZED_H */ # 974 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_uninitialized.h" 3 # 67 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/deque" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/stl_deque.h> #endif /* expanded by -frewrite-includes */ # 67 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/deque" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 1 3 // Deque implementation -*- C++ -*- // Copyright (C) 2001-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /* * * Copyright (c) 1994 * Hewlett-Packard Company * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Hewlett-Packard Company makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. * * * Copyright (c) 1997 * Silicon Graphics Computer Systems, Inc. * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Silicon Graphics makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. */ /** @file bits/stl_deque.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{deque} */ #ifndef _STL_DEQUE_H #define _STL_DEQUE_H 1 #if 0 /* expanded by -frewrite-includes */ #include <bits/concept_check.h> #endif /* expanded by -frewrite-includes */ # 59 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 # 60 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/stl_iterator_base_types.h> #endif /* expanded by -frewrite-includes */ # 60 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 # 61 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/stl_iterator_base_funcs.h> #endif /* expanded by -frewrite-includes */ # 61 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 # 62 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 63 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <initializer_list> #endif /* expanded by -frewrite-includes */ # 63 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/initializer_list" 1 3 // std::initializer_list support -*- C++ -*- // Copyright (C) 2008-2019 Free Software Foundation, Inc. // // This file is part of GCC. // // GCC is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3, or (at your option) // any later version. // // GCC is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file initializer_list * This is a Standard C++ Library header. */ #ifndef _INITIALIZER_LIST #define _INITIALIZER_LIST #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 34 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/initializer_list" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus < 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 36 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/initializer_list" 3 #if 0 /* expanded by -frewrite-includes */ # include <bits/c++0x_warning.h> #endif /* expanded by -frewrite-includes */ # 36 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/initializer_list" 3 # 37 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/initializer_list" 3 #else // C++0x # 38 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/initializer_list" 3 #pragma GCC visibility push(default) #if 0 /* expanded by -frewrite-includes */ #include <bits/c++config.h> #endif /* expanded by -frewrite-includes */ # 41 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/initializer_list" 3 # 42 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/initializer_list" 3 namespace std { /// initializer_list template<class _E> class initializer_list { public: typedef _E value_type; typedef const _E& reference; typedef const _E& const_reference; typedef size_t size_type; typedef const _E* iterator; typedef const _E* const_iterator; private: iterator _M_array; size_type _M_len; // The compiler can call a private constructor. constexpr initializer_list(const_iterator __a, size_type __l) : _M_array(__a), _M_len(__l) { } public: constexpr initializer_list() noexcept : _M_array(0), _M_len(0) { } // Number of elements. constexpr size_type size() const noexcept { return _M_len; } // First element. constexpr const_iterator begin() const noexcept { return _M_array; } // One past the last element. constexpr const_iterator end() const noexcept { return begin() + size(); } }; /** * @brief Return an iterator pointing to the first element of * the initializer_list. * @param __ils Initializer list. */ template<class _Tp> constexpr const _Tp* begin(initializer_list<_Tp> __ils) noexcept { return __ils.begin(); } /** * @brief Return an iterator pointing to one past the last element * of the initializer_list. * @param __ils Initializer list. */ template<class _Tp> constexpr const _Tp* end(initializer_list<_Tp> __ils) noexcept { return __ils.end(); } } #pragma GCC visibility pop #endif // C++11 # 106 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/initializer_list" 3 #endif // _INITIALIZER_LIST # 108 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/initializer_list" 3 # 64 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/stl_uninitialized.h> // for __is_bitwise_relocatable #endif /* expanded by -frewrite-includes */ # 64 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 # 65 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 #endif # 66 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <debug/assertions.h> #endif /* expanded by -frewrite-includes */ # 67 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 # 68 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_BEGIN_NAMESPACE_CONTAINER /** * @brief This function controls the size of memory nodes. * @param __size The size of an element. * @return The number (not byte size) of elements per node. * * This function started off as a compiler kludge from SGI, but * seems to be a useful wrapper around a repeated constant * expression. The @b 512 is tunable (and no other code needs to * change), but no investigation has been done since inheriting the * SGI code. Touch _GLIBCXX_DEQUE_BUF_SIZE only if you know what * you are doing, however: changing it breaks the binary * compatibility!! */ #ifndef _GLIBCXX_DEQUE_BUF_SIZE #define _GLIBCXX_DEQUE_BUF_SIZE 512 #endif # 91 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 _GLIBCXX_CONSTEXPR inline size_t __deque_buf_size(size_t __size) { return (__size < _GLIBCXX_DEQUE_BUF_SIZE ? size_t(_GLIBCXX_DEQUE_BUF_SIZE / __size) : size_t(1)); } /** * @brief A deque::iterator. * * Quite a bit of intelligence here. Much of the functionality of * deque is actually passed off to this class. A deque holds two * of these internally, marking its valid range. Access to * elements is done as offsets of either of those two, relying on * operator overloading in this class. * * All the functions are op overloads except for _M_set_node. */ template<typename _Tp, typename _Ref, typename _Ptr> struct _Deque_iterator { #if 0 /* disabled by -frewrite-includes */ #if __cplusplus < 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 113 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 typedef _Deque_iterator<_Tp, _Tp&, _Tp*> iterator; typedef _Deque_iterator<_Tp, const _Tp&, const _Tp*> const_iterator; typedef _Tp* _Elt_pointer; typedef _Tp** _Map_pointer; #else # 118 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 private: template<typename _Up> using __ptr_to = typename pointer_traits<_Ptr>::template rebind<_Up>; template<typename _CvTp> using __iter = _Deque_iterator<_Tp, _CvTp&, __ptr_to<_CvTp>>; public: typedef __iter<_Tp> iterator; typedef __iter<const _Tp> const_iterator; typedef __ptr_to<_Tp> _Elt_pointer; typedef __ptr_to<_Elt_pointer> _Map_pointer; #endif # 129 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 static size_t _S_buffer_size() _GLIBCXX_NOEXCEPT { return __deque_buf_size(sizeof(_Tp)); } typedef std::random_access_iterator_tag iterator_category; typedef _Tp value_type; typedef _Ptr pointer; typedef _Ref reference; typedef size_t size_type; typedef ptrdiff_t difference_type; typedef _Deque_iterator _Self; _Elt_pointer _M_cur; _Elt_pointer _M_first; _Elt_pointer _M_last; _Map_pointer _M_node; _Deque_iterator(_Elt_pointer __x, _Map_pointer __y) _GLIBCXX_NOEXCEPT : _M_cur(__x), _M_first(*__y), _M_last(*__y + _S_buffer_size()), _M_node(__y) { } _Deque_iterator() _GLIBCXX_NOEXCEPT : _M_cur(), _M_first(), _M_last(), _M_node() { } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus < 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 154 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 // Conversion from iterator to const_iterator. _Deque_iterator(const iterator& __x) _GLIBCXX_NOEXCEPT : _M_cur(__x._M_cur), _M_first(__x._M_first), _M_last(__x._M_last), _M_node(__x._M_node) { } #else # 159 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 // Conversion from iterator to const_iterator. template<typename _Iter, typename = _Require<is_same<_Self, const_iterator>, is_same<_Iter, iterator>>> _Deque_iterator(const _Iter& __x) noexcept : _M_cur(__x._M_cur), _M_first(__x._M_first), _M_last(__x._M_last), _M_node(__x._M_node) { } _Deque_iterator(const _Deque_iterator& __x) noexcept : _M_cur(__x._M_cur), _M_first(__x._M_first), _M_last(__x._M_last), _M_node(__x._M_node) { } _Deque_iterator& operator=(const _Deque_iterator&) = default; #endif # 173 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 iterator _M_const_cast() const _GLIBCXX_NOEXCEPT { return iterator(_M_cur, _M_node); } reference operator*() const _GLIBCXX_NOEXCEPT { return *_M_cur; } pointer operator->() const _GLIBCXX_NOEXCEPT { return _M_cur; } _Self& operator++() _GLIBCXX_NOEXCEPT { ++_M_cur; if (_M_cur == _M_last) { _M_set_node(_M_node + 1); _M_cur = _M_first; } return *this; } _Self operator++(int) _GLIBCXX_NOEXCEPT { _Self __tmp = *this; ++*this; return __tmp; } _Self& operator--() _GLIBCXX_NOEXCEPT { if (_M_cur == _M_first) { _M_set_node(_M_node - 1); _M_cur = _M_last; } --_M_cur; return *this; } _Self operator--(int) _GLIBCXX_NOEXCEPT { _Self __tmp = *this; --*this; return __tmp; } _Self& operator+=(difference_type __n) _GLIBCXX_NOEXCEPT { const difference_type __offset = __n + (_M_cur - _M_first); if (__offset >= 0 && __offset < difference_type(_S_buffer_size())) _M_cur += __n; else { const difference_type __node_offset = __offset > 0 ? __offset / difference_type(_S_buffer_size()) : -difference_type((-__offset - 1) / _S_buffer_size()) - 1; _M_set_node(_M_node + __node_offset); _M_cur = _M_first + (__offset - __node_offset * difference_type(_S_buffer_size())); } return *this; } _Self operator+(difference_type __n) const _GLIBCXX_NOEXCEPT { _Self __tmp = *this; return __tmp += __n; } _Self& operator-=(difference_type __n) _GLIBCXX_NOEXCEPT { return *this += -__n; } _Self operator-(difference_type __n) const _GLIBCXX_NOEXCEPT { _Self __tmp = *this; return __tmp -= __n; } reference operator[](difference_type __n) const _GLIBCXX_NOEXCEPT { return *(*this + __n); } /** * Prepares to traverse new_node. Sets everything except * _M_cur, which should therefore be set by the caller * immediately afterwards, based on _M_first and _M_last. */ void _M_set_node(_Map_pointer __new_node) _GLIBCXX_NOEXCEPT { _M_node = __new_node; _M_first = *__new_node; _M_last = _M_first + difference_type(_S_buffer_size()); } }; // Note: we also provide overloads whose operands are of the same type in // order to avoid ambiguous overload resolution when std::rel_ops operators // are in scope (for additional details, see libstdc++/3628) template<typename _Tp, typename _Ref, typename _Ptr> inline bool operator==(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) _GLIBCXX_NOEXCEPT { return __x._M_cur == __y._M_cur; } template<typename _Tp, typename _RefL, typename _PtrL, typename _RefR, typename _PtrR> inline bool operator==(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) _GLIBCXX_NOEXCEPT { return __x._M_cur == __y._M_cur; } template<typename _Tp, typename _Ref, typename _Ptr> inline bool operator!=(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) _GLIBCXX_NOEXCEPT { return !(__x == __y); } template<typename _Tp, typename _RefL, typename _PtrL, typename _RefR, typename _PtrR> inline bool operator!=(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) _GLIBCXX_NOEXCEPT { return !(__x == __y); } template<typename _Tp, typename _Ref, typename _Ptr> inline bool operator<(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) _GLIBCXX_NOEXCEPT { return (__x._M_node == __y._M_node) ? (__x._M_cur < __y._M_cur) : (__x._M_node < __y._M_node); } template<typename _Tp, typename _RefL, typename _PtrL, typename _RefR, typename _PtrR> inline bool operator<(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) _GLIBCXX_NOEXCEPT { return (__x._M_node == __y._M_node) ? (__x._M_cur < __y._M_cur) : (__x._M_node < __y._M_node); } template<typename _Tp, typename _Ref, typename _Ptr> inline bool operator>(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) _GLIBCXX_NOEXCEPT { return __y < __x; } template<typename _Tp, typename _RefL, typename _PtrL, typename _RefR, typename _PtrR> inline bool operator>(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) _GLIBCXX_NOEXCEPT { return __y < __x; } template<typename _Tp, typename _Ref, typename _Ptr> inline bool operator<=(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) _GLIBCXX_NOEXCEPT { return !(__y < __x); } template<typename _Tp, typename _RefL, typename _PtrL, typename _RefR, typename _PtrR> inline bool operator<=(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) _GLIBCXX_NOEXCEPT { return !(__y < __x); } template<typename _Tp, typename _Ref, typename _Ptr> inline bool operator>=(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) _GLIBCXX_NOEXCEPT { return !(__x < __y); } template<typename _Tp, typename _RefL, typename _PtrL, typename _RefR, typename _PtrR> inline bool operator>=(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) _GLIBCXX_NOEXCEPT { return !(__x < __y); } // _GLIBCXX_RESOLVE_LIB_DEFECTS // According to the resolution of DR179 not only the various comparison // operators but also operator- must accept mixed iterator/const_iterator // parameters. template<typename _Tp, typename _Ref, typename _Ptr> inline typename _Deque_iterator<_Tp, _Ref, _Ptr>::difference_type operator-(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) _GLIBCXX_NOEXCEPT { return typename _Deque_iterator<_Tp, _Ref, _Ptr>::difference_type (_Deque_iterator<_Tp, _Ref, _Ptr>::_S_buffer_size()) * (__x._M_node - __y._M_node - 1) + (__x._M_cur - __x._M_first) + (__y._M_last - __y._M_cur); } template<typename _Tp, typename _RefL, typename _PtrL, typename _RefR, typename _PtrR> inline typename _Deque_iterator<_Tp, _RefL, _PtrL>::difference_type operator-(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) _GLIBCXX_NOEXCEPT { return typename _Deque_iterator<_Tp, _RefL, _PtrL>::difference_type (_Deque_iterator<_Tp, _RefL, _PtrL>::_S_buffer_size()) * (__x._M_node - __y._M_node - 1) + (__x._M_cur - __x._M_first) + (__y._M_last - __y._M_cur); } template<typename _Tp, typename _Ref, typename _Ptr> inline _Deque_iterator<_Tp, _Ref, _Ptr> operator+(ptrdiff_t __n, const _Deque_iterator<_Tp, _Ref, _Ptr>& __x) _GLIBCXX_NOEXCEPT { return __x + __n; } template<typename _Tp> void fill(const _Deque_iterator<_Tp, _Tp&, _Tp*>&, const _Deque_iterator<_Tp, _Tp&, _Tp*>&, const _Tp&); template<typename _Tp> _Deque_iterator<_Tp, _Tp&, _Tp*> copy(_Deque_iterator<_Tp, const _Tp&, const _Tp*>, _Deque_iterator<_Tp, const _Tp&, const _Tp*>, _Deque_iterator<_Tp, _Tp&, _Tp*>); template<typename _Tp> inline _Deque_iterator<_Tp, _Tp&, _Tp*> copy(_Deque_iterator<_Tp, _Tp&, _Tp*> __first, _Deque_iterator<_Tp, _Tp&, _Tp*> __last, _Deque_iterator<_Tp, _Tp&, _Tp*> __result) { return std::copy(_Deque_iterator<_Tp, const _Tp&, const _Tp*>(__first), _Deque_iterator<_Tp, const _Tp&, const _Tp*>(__last), __result); } template<typename _Tp> _Deque_iterator<_Tp, _Tp&, _Tp*> copy_backward(_Deque_iterator<_Tp, const _Tp&, const _Tp*>, _Deque_iterator<_Tp, const _Tp&, const _Tp*>, _Deque_iterator<_Tp, _Tp&, _Tp*>); template<typename _Tp> inline _Deque_iterator<_Tp, _Tp&, _Tp*> copy_backward(_Deque_iterator<_Tp, _Tp&, _Tp*> __first, _Deque_iterator<_Tp, _Tp&, _Tp*> __last, _Deque_iterator<_Tp, _Tp&, _Tp*> __result) { return std::copy_backward(_Deque_iterator<_Tp, const _Tp&, const _Tp*>(__first), _Deque_iterator<_Tp, const _Tp&, const _Tp*>(__last), __result); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 435 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 template<typename _Tp> _Deque_iterator<_Tp, _Tp&, _Tp*> move(_Deque_iterator<_Tp, const _Tp&, const _Tp*>, _Deque_iterator<_Tp, const _Tp&, const _Tp*>, _Deque_iterator<_Tp, _Tp&, _Tp*>); template<typename _Tp> inline _Deque_iterator<_Tp, _Tp&, _Tp*> move(_Deque_iterator<_Tp, _Tp&, _Tp*> __first, _Deque_iterator<_Tp, _Tp&, _Tp*> __last, _Deque_iterator<_Tp, _Tp&, _Tp*> __result) { return std::move(_Deque_iterator<_Tp, const _Tp&, const _Tp*>(__first), _Deque_iterator<_Tp, const _Tp&, const _Tp*>(__last), __result); } template<typename _Tp> _Deque_iterator<_Tp, _Tp&, _Tp*> move_backward(_Deque_iterator<_Tp, const _Tp&, const _Tp*>, _Deque_iterator<_Tp, const _Tp&, const _Tp*>, _Deque_iterator<_Tp, _Tp&, _Tp*>); template<typename _Tp> inline _Deque_iterator<_Tp, _Tp&, _Tp*> move_backward(_Deque_iterator<_Tp, _Tp&, _Tp*> __first, _Deque_iterator<_Tp, _Tp&, _Tp*> __last, _Deque_iterator<_Tp, _Tp&, _Tp*> __result) { return std::move_backward(_Deque_iterator<_Tp, const _Tp&, const _Tp*>(__first), _Deque_iterator<_Tp, const _Tp&, const _Tp*>(__last), __result); } #endif # 467 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 /** * Deque base class. This class provides the unified face for %deque's * allocation. This class's constructor and destructor allocate and * deallocate (but do not initialize) storage. This makes %exception * safety easier. * * Nothing in this class ever constructs or destroys an actual Tp element. * (Deque handles that itself.) Only/All memory management is performed * here. */ template<typename _Tp, typename _Alloc> class _Deque_base { protected: typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template rebind<_Tp>::other _Tp_alloc_type; typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Alloc_traits; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus < 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 487 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 typedef _Tp* _Ptr; typedef const _Tp* _Ptr_const; #else # 490 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 typedef typename _Alloc_traits::pointer _Ptr; typedef typename _Alloc_traits::const_pointer _Ptr_const; #endif # 493 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 typedef typename _Alloc_traits::template rebind<_Ptr>::other _Map_alloc_type; typedef __gnu_cxx::__alloc_traits<_Map_alloc_type> _Map_alloc_traits; public: typedef _Alloc allocator_type; allocator_type get_allocator() const _GLIBCXX_NOEXCEPT { return allocator_type(_M_get_Tp_allocator()); } typedef _Deque_iterator<_Tp, _Tp&, _Ptr> iterator; typedef _Deque_iterator<_Tp, const _Tp&, _Ptr_const> const_iterator; _Deque_base() : _M_impl() { _M_initialize_map(0); } _Deque_base(size_t __num_elements) : _M_impl() { _M_initialize_map(__num_elements); } _Deque_base(const allocator_type& __a, size_t __num_elements) : _M_impl(__a) { _M_initialize_map(__num_elements); } _Deque_base(const allocator_type& __a) : _M_impl(__a) { /* Caller must initialize map. */ } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 525 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 _Deque_base(_Deque_base&& __x, false_type) : _M_impl(__x._M_move_impl()) { } _Deque_base(_Deque_base&& __x, true_type) : _M_impl(std::move(__x._M_get_Tp_allocator())) { _M_initialize_map(0); if (__x._M_impl._M_map) this->_M_impl._M_swap_data(__x._M_impl); } _Deque_base(_Deque_base&& __x) : _Deque_base(std::move(__x), typename _Alloc_traits::is_always_equal{}) { } _Deque_base(_Deque_base&& __x, const allocator_type& __a, size_t __n) : _M_impl(__a) { if (__x.get_allocator() == __a) { if (__x._M_impl._M_map) { _M_initialize_map(0); this->_M_impl._M_swap_data(__x._M_impl); } } else { _M_initialize_map(__n); } } #endif # 558 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 ~_Deque_base() _GLIBCXX_NOEXCEPT; protected: typedef typename iterator::_Map_pointer _Map_pointer; //This struct encapsulates the implementation of the std::deque //standard container and at the same time makes use of the EBO //for empty allocators. struct _Deque_impl : public _Tp_alloc_type { _Map_pointer _M_map; size_t _M_map_size; iterator _M_start; iterator _M_finish; _Deque_impl() : _Tp_alloc_type(), _M_map(), _M_map_size(0), _M_start(), _M_finish() { } _Deque_impl(const _Tp_alloc_type& __a) _GLIBCXX_NOEXCEPT : _Tp_alloc_type(__a), _M_map(), _M_map_size(0), _M_start(), _M_finish() { } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 586 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 _Deque_impl(_Deque_impl&&) = default; _Deque_impl(_Tp_alloc_type&& __a) noexcept : _Tp_alloc_type(std::move(__a)), _M_map(), _M_map_size(0), _M_start(), _M_finish() { } #endif # 593 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 void _M_swap_data(_Deque_impl& __x) _GLIBCXX_NOEXCEPT { using std::swap; swap(this->_M_start, __x._M_start); swap(this->_M_finish, __x._M_finish); swap(this->_M_map, __x._M_map); swap(this->_M_map_size, __x._M_map_size); } }; _Tp_alloc_type& _M_get_Tp_allocator() _GLIBCXX_NOEXCEPT { return *static_cast<_Tp_alloc_type*>(&this->_M_impl); } const _Tp_alloc_type& _M_get_Tp_allocator() const _GLIBCXX_NOEXCEPT { return *static_cast<const _Tp_alloc_type*>(&this->_M_impl); } _Map_alloc_type _M_get_map_allocator() const _GLIBCXX_NOEXCEPT { return _Map_alloc_type(_M_get_Tp_allocator()); } _Ptr _M_allocate_node() { typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Traits; return _Traits::allocate(_M_impl, __deque_buf_size(sizeof(_Tp))); } void _M_deallocate_node(_Ptr __p) _GLIBCXX_NOEXCEPT { typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Traits; _Traits::deallocate(_M_impl, __p, __deque_buf_size(sizeof(_Tp))); } _Map_pointer _M_allocate_map(size_t __n) { _Map_alloc_type __map_alloc = _M_get_map_allocator(); return _Map_alloc_traits::allocate(__map_alloc, __n); } void _M_deallocate_map(_Map_pointer __p, size_t __n) _GLIBCXX_NOEXCEPT { _Map_alloc_type __map_alloc = _M_get_map_allocator(); _Map_alloc_traits::deallocate(__map_alloc, __p, __n); } protected: void _M_initialize_map(size_t); void _M_create_nodes(_Map_pointer __nstart, _Map_pointer __nfinish); void _M_destroy_nodes(_Map_pointer __nstart, _Map_pointer __nfinish) _GLIBCXX_NOEXCEPT; enum { _S_initial_map_size = 8 }; _Deque_impl _M_impl; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 654 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 private: _Deque_impl _M_move_impl() { if (!_M_impl._M_map) return std::move(_M_impl); // Create a copy of the current allocator. _Tp_alloc_type __alloc{_M_get_Tp_allocator()}; // Put that copy in a moved-from state. _Tp_alloc_type __sink __attribute((__unused__)) {std::move(__alloc)}; // Create an empty map that allocates using the moved-from allocator. _Deque_base __empty{__alloc}; __empty._M_initialize_map(0); // Now safe to modify current allocator and perform non-throwing swaps. _Deque_impl __ret{std::move(_M_get_Tp_allocator())}; _M_impl._M_swap_data(__ret); _M_impl._M_swap_data(__empty._M_impl); return __ret; } #endif # 675 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 }; template<typename _Tp, typename _Alloc> _Deque_base<_Tp, _Alloc>:: ~_Deque_base() _GLIBCXX_NOEXCEPT { if (this->_M_impl._M_map) { _M_destroy_nodes(this->_M_impl._M_start._M_node, this->_M_impl._M_finish._M_node + 1); _M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size); } } /** * @brief Layout storage. * @param __num_elements The count of T's for which to allocate space * at first. * @return Nothing. * * The initial underlying memory layout is a bit complicated... */ template<typename _Tp, typename _Alloc> void _Deque_base<_Tp, _Alloc>:: _M_initialize_map(size_t __num_elements) { const size_t __num_nodes = (__num_elements/ __deque_buf_size(sizeof(_Tp)) + 1); this->_M_impl._M_map_size = std::max((size_t) _S_initial_map_size, size_t(__num_nodes + 2)); this->_M_impl._M_map = _M_allocate_map(this->_M_impl._M_map_size); // For "small" maps (needing less than _M_map_size nodes), allocation // starts in the middle elements and grows outwards. So nstart may be // the beginning of _M_map, but for small maps it may be as far in as // _M_map+3. _Map_pointer __nstart = (this->_M_impl._M_map + (this->_M_impl._M_map_size - __num_nodes) / 2); _Map_pointer __nfinish = __nstart + __num_nodes; __try { _M_create_nodes(__nstart, __nfinish); } __catch(...) { _M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size); this->_M_impl._M_map = _Map_pointer(); this->_M_impl._M_map_size = 0; __throw_exception_again; } this->_M_impl._M_start._M_set_node(__nstart); this->_M_impl._M_finish._M_set_node(__nfinish - 1); this->_M_impl._M_start._M_cur = _M_impl._M_start._M_first; this->_M_impl._M_finish._M_cur = (this->_M_impl._M_finish._M_first + __num_elements % __deque_buf_size(sizeof(_Tp))); } template<typename _Tp, typename _Alloc> void _Deque_base<_Tp, _Alloc>:: _M_create_nodes(_Map_pointer __nstart, _Map_pointer __nfinish) { _Map_pointer __cur; __try { for (__cur = __nstart; __cur < __nfinish; ++__cur) *__cur = this->_M_allocate_node(); } __catch(...) { _M_destroy_nodes(__nstart, __cur); __throw_exception_again; } } template<typename _Tp, typename _Alloc> void _Deque_base<_Tp, _Alloc>:: _M_destroy_nodes(_Map_pointer __nstart, _Map_pointer __nfinish) _GLIBCXX_NOEXCEPT { for (_Map_pointer __n = __nstart; __n < __nfinish; ++__n) _M_deallocate_node(*__n); } /** * @brief A standard container using fixed-size memory allocation and * constant-time manipulation of elements at either end. * * @ingroup sequences * * @tparam _Tp Type of element. * @tparam _Alloc Allocator type, defaults to allocator<_Tp>. * * Meets the requirements of a <a href="tables.html#65">container</a>, a * <a href="tables.html#66">reversible container</a>, and a * <a href="tables.html#67">sequence</a>, including the * <a href="tables.html#68">optional sequence requirements</a>. * * In previous HP/SGI versions of deque, there was an extra template * parameter so users could control the node size. This extension turned * out to violate the C++ standard (it can be detected using template * template parameters), and it was removed. * * Here's how a deque<Tp> manages memory. Each deque has 4 members: * * - Tp** _M_map * - size_t _M_map_size * - iterator _M_start, _M_finish * * map_size is at least 8. %map is an array of map_size * pointers-to-@a nodes. (The name %map has nothing to do with the * std::map class, and @b nodes should not be confused with * std::list's usage of @a node.) * * A @a node has no specific type name as such, but it is referred * to as @a node in this file. It is a simple array-of-Tp. If Tp * is very large, there will be one Tp element per node (i.e., an * @a array of one). For non-huge Tp's, node size is inversely * related to Tp size: the larger the Tp, the fewer Tp's will fit * in a node. The goal here is to keep the total size of a node * relatively small and constant over different Tp's, to improve * allocator efficiency. * * Not every pointer in the %map array will point to a node. If * the initial number of elements in the deque is small, the * /middle/ %map pointers will be valid, and the ones at the edges * will be unused. This same situation will arise as the %map * grows: available %map pointers, if any, will be on the ends. As * new nodes are created, only a subset of the %map's pointers need * to be copied @a outward. * * Class invariants: * - For any nonsingular iterator i: * - i.node points to a member of the %map array. (Yes, you read that * correctly: i.node does not actually point to a node.) The member of * the %map array is what actually points to the node. * - i.first == *(i.node) (This points to the node (first Tp element).) * - i.last == i.first + node_size * - i.cur is a pointer in the range [i.first, i.last). NOTE: * the implication of this is that i.cur is always a dereferenceable * pointer, even if i is a past-the-end iterator. * - Start and Finish are always nonsingular iterators. NOTE: this * means that an empty deque must have one node, a deque with <N * elements (where N is the node buffer size) must have one node, a * deque with N through (2N-1) elements must have two nodes, etc. * - For every node other than start.node and finish.node, every * element in the node is an initialized object. If start.node == * finish.node, then [start.cur, finish.cur) are initialized * objects, and the elements outside that range are uninitialized * storage. Otherwise, [start.cur, start.last) and [finish.first, * finish.cur) are initialized objects, and [start.first, start.cur) * and [finish.cur, finish.last) are uninitialized storage. * - [%map, %map + map_size) is a valid, non-empty range. * - [start.node, finish.node] is a valid range contained within * [%map, %map + map_size). * - A pointer in the range [%map, %map + map_size) points to an allocated * node if and only if the pointer is in the range * [start.node, finish.node]. * * Here's the magic: nothing in deque is @b aware of the discontiguous * storage! * * The memory setup and layout occurs in the parent, _Base, and the iterator * class is entirely responsible for @a leaping from one node to the next. * All the implementation routines for deque itself work only through the * start and finish iterators. This keeps the routines simple and sane, * and we can use other standard algorithms as well. */ template<typename _Tp, typename _Alloc = std::allocator<_Tp> > class deque : protected _Deque_base<_Tp, _Alloc> { #ifdef _GLIBCXX_CONCEPT_CHECKS // concept requirements typedef typename _Alloc::value_type _Alloc_value_type; #if 0 /* disabled by -frewrite-includes */ # if __cplusplus < 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 855 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 __glibcxx_class_requires(_Tp, _SGIAssignableConcept) # endif # 857 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 __glibcxx_class_requires2(_Tp, _Alloc_value_type, _SameTypeConcept) #endif # 859 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 861 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 static_assert(is_same<typename remove_cv<_Tp>::type, _Tp>::value, "std::deque must have a non-const, non-volatile value_type"); # ifdef __STRICT_ANSI__ static_assert(is_same<typename _Alloc::value_type, _Tp>::value, "std::deque must have the same value_type as its allocator"); # endif # 867 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 #endif # 868 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 typedef _Deque_base<_Tp, _Alloc> _Base; typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; typedef typename _Base::_Alloc_traits _Alloc_traits; typedef typename _Base::_Map_pointer _Map_pointer; public: typedef _Tp value_type; typedef typename _Alloc_traits::pointer pointer; typedef typename _Alloc_traits::const_pointer const_pointer; typedef typename _Alloc_traits::reference reference; typedef typename _Alloc_traits::const_reference const_reference; typedef typename _Base::iterator iterator; typedef typename _Base::const_iterator const_iterator; typedef std::reverse_iterator<const_iterator> const_reverse_iterator; typedef std::reverse_iterator<iterator> reverse_iterator; typedef size_t size_type; typedef ptrdiff_t difference_type; typedef _Alloc allocator_type; protected: static size_t _S_buffer_size() _GLIBCXX_NOEXCEPT { return __deque_buf_size(sizeof(_Tp)); } // Functions controlling memory layout, and nothing else. using _Base::_M_initialize_map; using _Base::_M_create_nodes; using _Base::_M_destroy_nodes; using _Base::_M_allocate_node; using _Base::_M_deallocate_node; using _Base::_M_allocate_map; using _Base::_M_deallocate_map; using _Base::_M_get_Tp_allocator; /** * A total of four data members accumulated down the hierarchy. * May be accessed via _M_impl.* */ using _Base::_M_impl; public: // [23.2.1.1] construct/copy/destroy // (assign() and get_allocator() are also listed in this section) /** * @brief Creates a %deque with no elements. */ deque() : _Base() { } /** * @brief Creates a %deque with no elements. * @param __a An allocator object. */ explicit deque(const allocator_type& __a) : _Base(__a, 0) { } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 926 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 /** * @brief Creates a %deque with default constructed elements. * @param __n The number of elements to initially create. * @param __a An allocator. * * This constructor fills the %deque with @a n default * constructed elements. */ explicit deque(size_type __n, const allocator_type& __a = allocator_type()) : _Base(__a, _S_check_init_len(__n, __a)) { _M_default_initialize(); } /** * @brief Creates a %deque with copies of an exemplar element. * @param __n The number of elements to initially create. * @param __value An element to copy. * @param __a An allocator. * * This constructor fills the %deque with @a __n copies of @a __value. */ deque(size_type __n, const value_type& __value, const allocator_type& __a = allocator_type()) : _Base(__a, _S_check_init_len(__n, __a)) { _M_fill_initialize(__value); } #else # 952 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 /** * @brief Creates a %deque with copies of an exemplar element. * @param __n The number of elements to initially create. * @param __value An element to copy. * @param __a An allocator. * * This constructor fills the %deque with @a __n copies of @a __value. */ explicit deque(size_type __n, const value_type& __value = value_type(), const allocator_type& __a = allocator_type()) : _Base(__a, _S_check_init_len(__n, __a)) { _M_fill_initialize(__value); } #endif # 966 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 /** * @brief %Deque copy constructor. * @param __x A %deque of identical element and allocator types. * * The newly-created %deque uses a copy of the allocator object used * by @a __x (unless the allocator traits dictate a different object). */ deque(const deque& __x) : _Base(_Alloc_traits::_S_select_on_copy(__x._M_get_Tp_allocator()), __x.size()) { std::__uninitialized_copy_a(__x.begin(), __x.end(), this->_M_impl._M_start, _M_get_Tp_allocator()); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 982 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 /** * @brief %Deque move constructor. * @param __x A %deque of identical element and allocator types. * * The newly-created %deque contains the exact contents of @a __x. * The contents of @a __x are a valid, but unspecified %deque. */ deque(deque&& __x) : _Base(std::move(__x)) { } /// Copy constructor with alternative allocator deque(const deque& __x, const allocator_type& __a) : _Base(__a, __x.size()) { std::__uninitialized_copy_a(__x.begin(), __x.end(), this->_M_impl._M_start, _M_get_Tp_allocator()); } /// Move constructor with alternative allocator deque(deque&& __x, const allocator_type& __a) : _Base(std::move(__x), __a, __x.size()) { if (__x.get_allocator() != __a) { std::__uninitialized_move_a(__x.begin(), __x.end(), this->_M_impl._M_start, _M_get_Tp_allocator()); __x.clear(); } } /** * @brief Builds a %deque from an initializer list. * @param __l An initializer_list. * @param __a An allocator object. * * Create a %deque consisting of copies of the elements in the * initializer_list @a __l. * * This will call the element type's copy constructor N times * (where N is __l.size()) and do no memory reallocation. */ deque(initializer_list<value_type> __l, const allocator_type& __a = allocator_type()) : _Base(__a) { _M_range_initialize(__l.begin(), __l.end(), random_access_iterator_tag()); } #endif # 1031 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 /** * @brief Builds a %deque from a range. * @param __first An input iterator. * @param __last An input iterator. * @param __a An allocator object. * * Create a %deque consisting of copies of the elements from [__first, * __last). * * If the iterators are forward, bidirectional, or random-access, then * this will call the elements' copy constructor N times (where N is * distance(__first,__last)) and do no memory reallocation. But if only * input iterators are used, then this will do at most 2N calls to the * copy constructor, and logN memory reallocations. */ #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1048 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 template<typename _InputIterator, typename = std::_RequireInputIter<_InputIterator>> deque(_InputIterator __first, _InputIterator __last, const allocator_type& __a = allocator_type()) : _Base(__a) { _M_initialize_dispatch(__first, __last, __false_type()); } #else # 1055 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 template<typename _InputIterator> deque(_InputIterator __first, _InputIterator __last, const allocator_type& __a = allocator_type()) : _Base(__a) { // Check whether it's an integral type. If so, it's not an iterator. typedef typename std::__is_integer<_InputIterator>::__type _Integral; _M_initialize_dispatch(__first, __last, _Integral()); } #endif # 1065 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 /** * The dtor only erases the elements, and note that if the elements * themselves are pointers, the pointed-to memory is not touched in any * way. Managing the pointer is the user's responsibility. */ ~deque() { _M_destroy_data(begin(), end(), _M_get_Tp_allocator()); } /** * @brief %Deque assignment operator. * @param __x A %deque of identical element and allocator types. * * All the elements of @a x are copied. * * The newly-created %deque uses a copy of the allocator object used * by @a __x (unless the allocator traits dictate a different object). */ deque& operator=(const deque& __x); #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1087 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 /** * @brief %Deque move assignment operator. * @param __x A %deque of identical element and allocator types. * * The contents of @a __x are moved into this deque (without copying, * if the allocators permit it). * @a __x is a valid, but unspecified %deque. */ deque& operator=(deque&& __x) noexcept(_Alloc_traits::_S_always_equal()) { using __always_equal = typename _Alloc_traits::is_always_equal; _M_move_assign1(std::move(__x), __always_equal{}); return *this; } /** * @brief Assigns an initializer list to a %deque. * @param __l An initializer_list. * * This function fills a %deque with copies of the elements in the * initializer_list @a __l. * * Note that the assignment completely changes the %deque and that the * resulting %deque's size is the same as the number of elements * assigned. */ deque& operator=(initializer_list<value_type> __l) { _M_assign_aux(__l.begin(), __l.end(), random_access_iterator_tag()); return *this; } #endif # 1122 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 /** * @brief Assigns a given value to a %deque. * @param __n Number of elements to be assigned. * @param __val Value to be assigned. * * This function fills a %deque with @a n copies of the given * value. Note that the assignment completely changes the * %deque and that the resulting %deque's size is the same as * the number of elements assigned. */ void assign(size_type __n, const value_type& __val) { _M_fill_assign(__n, __val); } /** * @brief Assigns a range to a %deque. * @param __first An input iterator. * @param __last An input iterator. * * This function fills a %deque with copies of the elements in the * range [__first,__last). * * Note that the assignment completely changes the %deque and that the * resulting %deque's size is the same as the number of elements * assigned. */ #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1150 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 template<typename _InputIterator, typename = std::_RequireInputIter<_InputIterator>> void assign(_InputIterator __first, _InputIterator __last) { _M_assign_dispatch(__first, __last, __false_type()); } #else # 1156 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 template<typename _InputIterator> void assign(_InputIterator __first, _InputIterator __last) { typedef typename std::__is_integer<_InputIterator>::__type _Integral; _M_assign_dispatch(__first, __last, _Integral()); } #endif # 1164 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1166 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 /** * @brief Assigns an initializer list to a %deque. * @param __l An initializer_list. * * This function fills a %deque with copies of the elements in the * initializer_list @a __l. * * Note that the assignment completely changes the %deque and that the * resulting %deque's size is the same as the number of elements * assigned. */ void assign(initializer_list<value_type> __l) { _M_assign_aux(__l.begin(), __l.end(), random_access_iterator_tag()); } #endif # 1181 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 /// Get a copy of the memory allocation object. allocator_type get_allocator() const _GLIBCXX_NOEXCEPT { return _Base::get_allocator(); } // iterators /** * Returns a read/write iterator that points to the first element in the * %deque. Iteration is done in ordinary element order. */ iterator begin() _GLIBCXX_NOEXCEPT { return this->_M_impl._M_start; } /** * Returns a read-only (constant) iterator that points to the first * element in the %deque. Iteration is done in ordinary element order. */ const_iterator begin() const _GLIBCXX_NOEXCEPT { return this->_M_impl._M_start; } /** * Returns a read/write iterator that points one past the last * element in the %deque. Iteration is done in ordinary * element order. */ iterator end() _GLIBCXX_NOEXCEPT { return this->_M_impl._M_finish; } /** * Returns a read-only (constant) iterator that points one past * the last element in the %deque. Iteration is done in * ordinary element order. */ const_iterator end() const _GLIBCXX_NOEXCEPT { return this->_M_impl._M_finish; } /** * Returns a read/write reverse iterator that points to the * last element in the %deque. Iteration is done in reverse * element order. */ reverse_iterator rbegin() _GLIBCXX_NOEXCEPT { return reverse_iterator(this->_M_impl._M_finish); } /** * Returns a read-only (constant) reverse iterator that points * to the last element in the %deque. Iteration is done in * reverse element order. */ const_reverse_iterator rbegin() const _GLIBCXX_NOEXCEPT { return const_reverse_iterator(this->_M_impl._M_finish); } /** * Returns a read/write reverse iterator that points to one * before the first element in the %deque. Iteration is done * in reverse element order. */ reverse_iterator rend() _GLIBCXX_NOEXCEPT { return reverse_iterator(this->_M_impl._M_start); } /** * Returns a read-only (constant) reverse iterator that points * to one before the first element in the %deque. Iteration is * done in reverse element order. */ const_reverse_iterator rend() const _GLIBCXX_NOEXCEPT { return const_reverse_iterator(this->_M_impl._M_start); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1259 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 /** * Returns a read-only (constant) iterator that points to the first * element in the %deque. Iteration is done in ordinary element order. */ const_iterator cbegin() const noexcept { return this->_M_impl._M_start; } /** * Returns a read-only (constant) iterator that points one past * the last element in the %deque. Iteration is done in * ordinary element order. */ const_iterator cend() const noexcept { return this->_M_impl._M_finish; } /** * Returns a read-only (constant) reverse iterator that points * to the last element in the %deque. Iteration is done in * reverse element order. */ const_reverse_iterator crbegin() const noexcept { return const_reverse_iterator(this->_M_impl._M_finish); } /** * Returns a read-only (constant) reverse iterator that points * to one before the first element in the %deque. Iteration is * done in reverse element order. */ const_reverse_iterator crend() const noexcept { return const_reverse_iterator(this->_M_impl._M_start); } #endif # 1294 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 // [23.2.1.2] capacity /** Returns the number of elements in the %deque. */ size_type size() const _GLIBCXX_NOEXCEPT { return this->_M_impl._M_finish - this->_M_impl._M_start; } /** Returns the size() of the largest possible %deque. */ size_type max_size() const _GLIBCXX_NOEXCEPT { return _S_max_size(_M_get_Tp_allocator()); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1307 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 /** * @brief Resizes the %deque to the specified number of elements. * @param __new_size Number of elements the %deque should contain. * * This function will %resize the %deque to the specified * number of elements. If the number is smaller than the * %deque's current size the %deque is truncated, otherwise * default constructed elements are appended. */ void resize(size_type __new_size) { const size_type __len = size(); if (__new_size > __len) _M_default_append(__new_size - __len); else if (__new_size < __len) _M_erase_at_end(this->_M_impl._M_start + difference_type(__new_size)); } /** * @brief Resizes the %deque to the specified number of elements. * @param __new_size Number of elements the %deque should contain. * @param __x Data with which new elements should be populated. * * This function will %resize the %deque to the specified * number of elements. If the number is smaller than the * %deque's current size the %deque is truncated, otherwise the * %deque is extended and new elements are populated with given * data. */ void resize(size_type __new_size, const value_type& __x) { const size_type __len = size(); if (__new_size > __len) _M_fill_insert(this->_M_impl._M_finish, __new_size - __len, __x); else if (__new_size < __len) _M_erase_at_end(this->_M_impl._M_start + difference_type(__new_size)); } #else # 1349 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 /** * @brief Resizes the %deque to the specified number of elements. * @param __new_size Number of elements the %deque should contain. * @param __x Data with which new elements should be populated. * * This function will %resize the %deque to the specified * number of elements. If the number is smaller than the * %deque's current size the %deque is truncated, otherwise the * %deque is extended and new elements are populated with given * data. */ void resize(size_type __new_size, value_type __x = value_type()) { const size_type __len = size(); if (__new_size > __len) _M_fill_insert(this->_M_impl._M_finish, __new_size - __len, __x); else if (__new_size < __len) _M_erase_at_end(this->_M_impl._M_start + difference_type(__new_size)); } #endif # 1371 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1373 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 /** A non-binding request to reduce memory use. */ void shrink_to_fit() noexcept { _M_shrink_to_fit(); } #endif # 1378 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 /** * Returns true if the %deque is empty. (Thus begin() would * equal end().) */ _GLIBCXX_NODISCARD bool empty() const _GLIBCXX_NOEXCEPT { return this->_M_impl._M_finish == this->_M_impl._M_start; } // element access /** * @brief Subscript access to the data contained in the %deque. * @param __n The index of the element for which data should be * accessed. * @return Read/write reference to data. * * This operator allows for easy, array-style, data access. * Note that data access with this operator is unchecked and * out_of_range lookups are not defined. (For checked lookups * see at().) */ reference operator[](size_type __n) _GLIBCXX_NOEXCEPT { __glibcxx_requires_subscript(__n); return this->_M_impl._M_start[difference_type(__n)]; } /** * @brief Subscript access to the data contained in the %deque. * @param __n The index of the element for which data should be * accessed. * @return Read-only (constant) reference to data. * * This operator allows for easy, array-style, data access. * Note that data access with this operator is unchecked and * out_of_range lookups are not defined. (For checked lookups * see at().) */ const_reference operator[](size_type __n) const _GLIBCXX_NOEXCEPT { __glibcxx_requires_subscript(__n); return this->_M_impl._M_start[difference_type(__n)]; } protected: /// Safety check used only from at(). void _M_range_check(size_type __n) const { if (__n >= this->size()) __throw_out_of_range_fmt(__N("deque::_M_range_check: __n " "(which is %zu)>= this->size() " "(which is %zu)"), __n, this->size()); } public: /** * @brief Provides access to the data contained in the %deque. * @param __n The index of the element for which data should be * accessed. * @return Read/write reference to data. * @throw std::out_of_range If @a __n is an invalid index. * * This function provides for safer data access. The parameter * is first checked that it is in the range of the deque. The * function throws out_of_range if the check fails. */ reference at(size_type __n) { _M_range_check(__n); return (*this)[__n]; } /** * @brief Provides access to the data contained in the %deque. * @param __n The index of the element for which data should be * accessed. * @return Read-only (constant) reference to data. * @throw std::out_of_range If @a __n is an invalid index. * * This function provides for safer data access. The parameter is first * checked that it is in the range of the deque. The function throws * out_of_range if the check fails. */ const_reference at(size_type __n) const { _M_range_check(__n); return (*this)[__n]; } /** * Returns a read/write reference to the data at the first * element of the %deque. */ reference front() _GLIBCXX_NOEXCEPT { __glibcxx_requires_nonempty(); return *begin(); } /** * Returns a read-only (constant) reference to the data at the first * element of the %deque. */ const_reference front() const _GLIBCXX_NOEXCEPT { __glibcxx_requires_nonempty(); return *begin(); } /** * Returns a read/write reference to the data at the last element of the * %deque. */ reference back() _GLIBCXX_NOEXCEPT { __glibcxx_requires_nonempty(); iterator __tmp = end(); --__tmp; return *__tmp; } /** * Returns a read-only (constant) reference to the data at the last * element of the %deque. */ const_reference back() const _GLIBCXX_NOEXCEPT { __glibcxx_requires_nonempty(); const_iterator __tmp = end(); --__tmp; return *__tmp; } // [23.2.1.2] modifiers /** * @brief Add data to the front of the %deque. * @param __x Data to be added. * * This is a typical stack operation. The function creates an * element at the front of the %deque and assigns the given * data to it. Due to the nature of a %deque this operation * can be done in constant time. */ void push_front(const value_type& __x) { if (this->_M_impl._M_start._M_cur != this->_M_impl._M_start._M_first) { _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_start._M_cur - 1, __x); --this->_M_impl._M_start._M_cur; } else _M_push_front_aux(__x); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1546 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 void push_front(value_type&& __x) { emplace_front(std::move(__x)); } template<typename... _Args> #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201402L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1552 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 reference #else # 1554 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 void #endif # 1556 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 emplace_front(_Args&&... __args); #endif # 1558 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 /** * @brief Add data to the end of the %deque. * @param __x Data to be added. * * This is a typical stack operation. The function creates an * element at the end of the %deque and assigns the given data * to it. Due to the nature of a %deque this operation can be * done in constant time. */ void push_back(const value_type& __x) { if (this->_M_impl._M_finish._M_cur != this->_M_impl._M_finish._M_last - 1) { _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish._M_cur, __x); ++this->_M_impl._M_finish._M_cur; } else _M_push_back_aux(__x); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1583 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 void push_back(value_type&& __x) { emplace_back(std::move(__x)); } template<typename... _Args> #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201402L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1589 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 reference #else # 1591 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 void #endif # 1593 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 emplace_back(_Args&&... __args); #endif # 1595 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 /** * @brief Removes first element. * * This is a typical stack operation. It shrinks the %deque by one. * * Note that no data is returned, and if the first element's data is * needed, it should be retrieved before pop_front() is called. */ void pop_front() _GLIBCXX_NOEXCEPT { __glibcxx_requires_nonempty(); if (this->_M_impl._M_start._M_cur != this->_M_impl._M_start._M_last - 1) { _Alloc_traits::destroy(this->_M_impl, this->_M_impl._M_start._M_cur); ++this->_M_impl._M_start._M_cur; } else _M_pop_front_aux(); } /** * @brief Removes last element. * * This is a typical stack operation. It shrinks the %deque by one. * * Note that no data is returned, and if the last element's data is * needed, it should be retrieved before pop_back() is called. */ void pop_back() _GLIBCXX_NOEXCEPT { __glibcxx_requires_nonempty(); if (this->_M_impl._M_finish._M_cur != this->_M_impl._M_finish._M_first) { --this->_M_impl._M_finish._M_cur; _Alloc_traits::destroy(this->_M_impl, this->_M_impl._M_finish._M_cur); } else _M_pop_back_aux(); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1643 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 /** * @brief Inserts an object in %deque before specified iterator. * @param __position A const_iterator into the %deque. * @param __args Arguments. * @return An iterator that points to the inserted data. * * This function will insert an object of type T constructed * with T(std::forward<Args>(args)...) before the specified location. */ template<typename... _Args> iterator emplace(const_iterator __position, _Args&&... __args); /** * @brief Inserts given value into %deque before specified iterator. * @param __position A const_iterator into the %deque. * @param __x Data to be inserted. * @return An iterator that points to the inserted data. * * This function will insert a copy of the given value before the * specified location. */ iterator insert(const_iterator __position, const value_type& __x); #else # 1668 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 /** * @brief Inserts given value into %deque before specified iterator. * @param __position An iterator into the %deque. * @param __x Data to be inserted. * @return An iterator that points to the inserted data. * * This function will insert a copy of the given value before the * specified location. */ iterator insert(iterator __position, const value_type& __x); #endif # 1680 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1682 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 /** * @brief Inserts given rvalue into %deque before specified iterator. * @param __position A const_iterator into the %deque. * @param __x Data to be inserted. * @return An iterator that points to the inserted data. * * This function will insert a copy of the given rvalue before the * specified location. */ iterator insert(const_iterator __position, value_type&& __x) { return emplace(__position, std::move(__x)); } /** * @brief Inserts an initializer list into the %deque. * @param __p An iterator into the %deque. * @param __l An initializer_list. * * This function will insert copies of the data in the * initializer_list @a __l into the %deque before the location * specified by @a __p. This is known as <em>list insert</em>. */ iterator insert(const_iterator __p, initializer_list<value_type> __l) { auto __offset = __p - cbegin(); _M_range_insert_aux(__p._M_const_cast(), __l.begin(), __l.end(), std::random_access_iterator_tag()); return begin() + __offset; } #endif # 1713 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1715 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 /** * @brief Inserts a number of copies of given data into the %deque. * @param __position A const_iterator into the %deque. * @param __n Number of elements to be inserted. * @param __x Data to be inserted. * @return An iterator that points to the inserted data. * * This function will insert a specified number of copies of the given * data before the location specified by @a __position. */ iterator insert(const_iterator __position, size_type __n, const value_type& __x) { difference_type __offset = __position - cbegin(); _M_fill_insert(__position._M_const_cast(), __n, __x); return begin() + __offset; } #else # 1733 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 /** * @brief Inserts a number of copies of given data into the %deque. * @param __position An iterator into the %deque. * @param __n Number of elements to be inserted. * @param __x Data to be inserted. * * This function will insert a specified number of copies of the given * data before the location specified by @a __position. */ void insert(iterator __position, size_type __n, const value_type& __x) { _M_fill_insert(__position, __n, __x); } #endif # 1746 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1748 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 /** * @brief Inserts a range into the %deque. * @param __position A const_iterator into the %deque. * @param __first An input iterator. * @param __last An input iterator. * @return An iterator that points to the inserted data. * * This function will insert copies of the data in the range * [__first,__last) into the %deque before the location specified * by @a __position. This is known as <em>range insert</em>. */ template<typename _InputIterator, typename = std::_RequireInputIter<_InputIterator>> iterator insert(const_iterator __position, _InputIterator __first, _InputIterator __last) { difference_type __offset = __position - cbegin(); _M_insert_dispatch(__position._M_const_cast(), __first, __last, __false_type()); return begin() + __offset; } #else # 1771 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 /** * @brief Inserts a range into the %deque. * @param __position An iterator into the %deque. * @param __first An input iterator. * @param __last An input iterator. * * This function will insert copies of the data in the range * [__first,__last) into the %deque before the location specified * by @a __position. This is known as <em>range insert</em>. */ template<typename _InputIterator> void insert(iterator __position, _InputIterator __first, _InputIterator __last) { // Check whether it's an integral type. If so, it's not an iterator. typedef typename std::__is_integer<_InputIterator>::__type _Integral; _M_insert_dispatch(__position, __first, __last, _Integral()); } #endif # 1791 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 /** * @brief Remove element at given position. * @param __position Iterator pointing to element to be erased. * @return An iterator pointing to the next element (or end()). * * This function will erase the element at the given position and thus * shorten the %deque by one. * * The user is cautioned that * this function only erases the element, and that if the element is * itself a pointer, the pointed-to memory is not touched in any way. * Managing the pointer is the user's responsibility. */ iterator #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1807 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 erase(const_iterator __position) #else # 1809 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 erase(iterator __position) #endif # 1811 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 { return _M_erase(__position._M_const_cast()); } /** * @brief Remove a range of elements. * @param __first Iterator pointing to the first element to be erased. * @param __last Iterator pointing to one past the last element to be * erased. * @return An iterator pointing to the element pointed to by @a last * prior to erasing (or end()). * * This function will erase the elements in the range * [__first,__last) and shorten the %deque accordingly. * * The user is cautioned that * this function only erases the elements, and that if the elements * themselves are pointers, the pointed-to memory is not touched in any * way. Managing the pointer is the user's responsibility. */ iterator #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1831 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 erase(const_iterator __first, const_iterator __last) #else # 1833 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 erase(iterator __first, iterator __last) #endif # 1835 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 { return _M_erase(__first._M_const_cast(), __last._M_const_cast()); } /** * @brief Swaps data with another %deque. * @param __x A %deque of the same element and allocator types. * * This exchanges the elements between two deques in constant time. * (Four pointers, so it should be quite fast.) * Note that the global std::swap() function is specialized such that * std::swap(d1,d2) will feed to this function. * * Whether the allocators are swapped depends on the allocator traits. */ void swap(deque& __x) _GLIBCXX_NOEXCEPT { #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1852 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 __glibcxx_assert(_Alloc_traits::propagate_on_container_swap::value || _M_get_Tp_allocator() == __x._M_get_Tp_allocator()); #endif # 1855 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 _M_impl._M_swap_data(__x._M_impl); _Alloc_traits::_S_on_swap(_M_get_Tp_allocator(), __x._M_get_Tp_allocator()); } /** * Erases all the elements. Note that this function only erases the * elements, and that if the elements themselves are pointers, the * pointed-to memory is not touched in any way. Managing the pointer is * the user's responsibility. */ void clear() _GLIBCXX_NOEXCEPT { _M_erase_at_end(begin()); } protected: // Internal constructor functions follow. // called by the range constructor to implement [23.1.1]/9 // _GLIBCXX_RESOLVE_LIB_DEFECTS // 438. Ambiguity in the "do the right thing" clause template<typename _Integer> void _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type) { _M_initialize_map(_S_check_init_len(static_cast<size_type>(__n), _M_get_Tp_allocator())); _M_fill_initialize(__x); } static size_t _S_check_init_len(size_t __n, const allocator_type& __a) { if (__n > _S_max_size(__a)) __throw_length_error( __N("cannot create std::deque larger than max_size()")); return __n; } static size_type _S_max_size(const _Tp_alloc_type& __a) _GLIBCXX_NOEXCEPT { const size_t __diffmax = __gnu_cxx::__numeric_traits<ptrdiff_t>::__max; const size_t __allocmax = _Alloc_traits::max_size(__a); return (std::min)(__diffmax, __allocmax); } // called by the range constructor to implement [23.1.1]/9 template<typename _InputIterator> void _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, __false_type) { _M_range_initialize(__first, __last, std::__iterator_category(__first)); } // called by the second initialize_dispatch above ///@{ /** * @brief Fills the deque with whatever is in [first,last). * @param __first An input iterator. * @param __last An input iterator. * @return Nothing. * * If the iterators are actually forward iterators (or better), then the * memory layout can be done all at once. Else we move forward using * push_back on each value from the iterator. */ template<typename _InputIterator> void _M_range_initialize(_InputIterator __first, _InputIterator __last, std::input_iterator_tag); // called by the second initialize_dispatch above template<typename _ForwardIterator> void _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag); ///@} /** * @brief Fills the %deque with copies of value. * @param __value Initial value. * @return Nothing. * @pre _M_start and _M_finish have already been initialized, * but none of the %deque's elements have yet been constructed. * * This function is called only when the user provides an explicit size * (with or without an explicit exemplar value). */ void _M_fill_initialize(const value_type& __value); #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1951 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 // called by deque(n). void _M_default_initialize(); #endif # 1955 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 // Internal assign functions follow. The *_aux functions do the actual // assignment work for the range versions. // called by the range assign to implement [23.1.1]/9 // _GLIBCXX_RESOLVE_LIB_DEFECTS // 438. Ambiguity in the "do the right thing" clause template<typename _Integer> void _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) { _M_fill_assign(__n, __val); } // called by the range assign to implement [23.1.1]/9 template<typename _InputIterator> void _M_assign_dispatch(_InputIterator __first, _InputIterator __last, __false_type) { _M_assign_aux(__first, __last, std::__iterator_category(__first)); } // called by the second assign_dispatch above template<typename _InputIterator> void _M_assign_aux(_InputIterator __first, _InputIterator __last, std::input_iterator_tag); // called by the second assign_dispatch above template<typename _ForwardIterator> void _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag) { const size_type __len = std::distance(__first, __last); if (__len > size()) { _ForwardIterator __mid = __first; std::advance(__mid, size()); std::copy(__first, __mid, begin()); _M_range_insert_aux(end(), __mid, __last, std::__iterator_category(__first)); } else _M_erase_at_end(std::copy(__first, __last, begin())); } // Called by assign(n,t), and the range assign when it turns out // to be the same thing. void _M_fill_assign(size_type __n, const value_type& __val) { if (__n > size()) { std::fill(begin(), end(), __val); _M_fill_insert(end(), __n - size(), __val); } else { _M_erase_at_end(begin() + difference_type(__n)); std::fill(begin(), end(), __val); } } ///@{ /// Helper functions for push_* and pop_*. #if 0 /* disabled by -frewrite-includes */ #if __cplusplus < 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 2020 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 void _M_push_back_aux(const value_type&); void _M_push_front_aux(const value_type&); #else # 2024 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 template<typename... _Args> void _M_push_back_aux(_Args&&... __args); template<typename... _Args> void _M_push_front_aux(_Args&&... __args); #endif # 2030 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 void _M_pop_back_aux(); void _M_pop_front_aux(); ///@} // Internal insert functions follow. The *_aux functions do the actual // insertion work when all shortcuts fail. // called by the range insert to implement [23.1.1]/9 // _GLIBCXX_RESOLVE_LIB_DEFECTS // 438. Ambiguity in the "do the right thing" clause template<typename _Integer> void _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x, __true_type) { _M_fill_insert(__pos, __n, __x); } // called by the range insert to implement [23.1.1]/9 template<typename _InputIterator> void _M_insert_dispatch(iterator __pos, _InputIterator __first, _InputIterator __last, __false_type) { _M_range_insert_aux(__pos, __first, __last, std::__iterator_category(__first)); } // called by the second insert_dispatch above template<typename _InputIterator> void _M_range_insert_aux(iterator __pos, _InputIterator __first, _InputIterator __last, std::input_iterator_tag); // called by the second insert_dispatch above template<typename _ForwardIterator> void _M_range_insert_aux(iterator __pos, _ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag); // Called by insert(p,n,x), and the range insert when it turns out to be // the same thing. Can use fill functions in optimal situations, // otherwise passes off to insert_aux(p,n,x). void _M_fill_insert(iterator __pos, size_type __n, const value_type& __x); // called by insert(p,x) #if 0 /* disabled by -frewrite-includes */ #if __cplusplus < 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 2080 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 iterator _M_insert_aux(iterator __pos, const value_type& __x); #else # 2083 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 template<typename... _Args> iterator _M_insert_aux(iterator __pos, _Args&&... __args); #endif # 2087 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 // called by insert(p,n,x) via fill_insert void _M_insert_aux(iterator __pos, size_type __n, const value_type& __x); // called by range_insert_aux for forward iterators template<typename _ForwardIterator> void _M_insert_aux(iterator __pos, _ForwardIterator __first, _ForwardIterator __last, size_type __n); // Internal erase functions follow. void _M_destroy_data_aux(iterator __first, iterator __last); // Called by ~deque(). // NB: Doesn't deallocate the nodes. template<typename _Alloc1> void _M_destroy_data(iterator __first, iterator __last, const _Alloc1&) { _M_destroy_data_aux(__first, __last); } void _M_destroy_data(iterator __first, iterator __last, const std::allocator<_Tp>&) { if (!__has_trivial_destructor(value_type)) _M_destroy_data_aux(__first, __last); } // Called by erase(q1, q2). void _M_erase_at_begin(iterator __pos) { _M_destroy_data(begin(), __pos, _M_get_Tp_allocator()); _M_destroy_nodes(this->_M_impl._M_start._M_node, __pos._M_node); this->_M_impl._M_start = __pos; } // Called by erase(q1, q2), resize(), clear(), _M_assign_aux, // _M_fill_assign, operator=. void _M_erase_at_end(iterator __pos) { _M_destroy_data(__pos, end(), _M_get_Tp_allocator()); _M_destroy_nodes(__pos._M_node + 1, this->_M_impl._M_finish._M_node + 1); this->_M_impl._M_finish = __pos; } iterator _M_erase(iterator __pos); iterator _M_erase(iterator __first, iterator __last); #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 2147 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 // Called by resize(sz). void _M_default_append(size_type __n); bool _M_shrink_to_fit(); #endif # 2154 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 ///@{ /// Memory-handling helpers for the previous internal insert functions. iterator _M_reserve_elements_at_front(size_type __n) { const size_type __vacancies = this->_M_impl._M_start._M_cur - this->_M_impl._M_start._M_first; if (__n > __vacancies) _M_new_elements_at_front(__n - __vacancies); return this->_M_impl._M_start - difference_type(__n); } iterator _M_reserve_elements_at_back(size_type __n) { const size_type __vacancies = (this->_M_impl._M_finish._M_last - this->_M_impl._M_finish._M_cur) - 1; if (__n > __vacancies) _M_new_elements_at_back(__n - __vacancies); return this->_M_impl._M_finish + difference_type(__n); } void _M_new_elements_at_front(size_type __new_elements); void _M_new_elements_at_back(size_type __new_elements); ///@} ///@{ /** * @brief Memory-handling helpers for the major %map. * * Makes sure the _M_map has space for new nodes. Does not * actually add the nodes. Can invalidate _M_map pointers. * (And consequently, %deque iterators.) */ void _M_reserve_map_at_back(size_type __nodes_to_add = 1) { if (__nodes_to_add + 1 > this->_M_impl._M_map_size - (this->_M_impl._M_finish._M_node - this->_M_impl._M_map)) _M_reallocate_map(__nodes_to_add, false); } void _M_reserve_map_at_front(size_type __nodes_to_add = 1) { if (__nodes_to_add > size_type(this->_M_impl._M_start._M_node - this->_M_impl._M_map)) _M_reallocate_map(__nodes_to_add, true); } void _M_reallocate_map(size_type __nodes_to_add, bool __add_at_front); ///@} #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 2214 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 // Constant-time, nothrow move assignment when source object's memory // can be moved because the allocators are equal. void _M_move_assign1(deque&& __x, /* always equal: */ true_type) noexcept { this->_M_impl._M_swap_data(__x._M_impl); __x.clear(); std::__alloc_on_move(_M_get_Tp_allocator(), __x._M_get_Tp_allocator()); } // When the allocators are not equal the operation could throw, because // we might need to allocate a new map for __x after moving from it // or we might need to allocate new elements for *this. void _M_move_assign1(deque&& __x, /* always equal: */ false_type) { constexpr bool __move_storage = _Alloc_traits::_S_propagate_on_move_assign(); _M_move_assign2(std::move(__x), __bool_constant<__move_storage>()); } // Destroy all elements and deallocate all memory, then replace // with elements created from __args. template<typename... _Args> void _M_replace_map(_Args&&... __args) { // Create new data first, so if allocation fails there are no effects. deque __newobj(std::forward<_Args>(__args)...); // Free existing storage using existing allocator. clear(); _M_deallocate_node(*begin()._M_node); // one node left after clear() _M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size); this->_M_impl._M_map = nullptr; this->_M_impl._M_map_size = 0; // Take ownership of replacement memory. this->_M_impl._M_swap_data(__newobj._M_impl); } // Do move assignment when the allocator propagates. void _M_move_assign2(deque&& __x, /* propagate: */ true_type) { // Make a copy of the original allocator state. auto __alloc = __x._M_get_Tp_allocator(); // The allocator propagates so storage can be moved from __x, // leaving __x in a valid empty state with a moved-from allocator. _M_replace_map(std::move(__x)); // Move the corresponding allocator state too. _M_get_Tp_allocator() = std::move(__alloc); } // Do move assignment when it may not be possible to move source // object's memory, resulting in a linear-time operation. void _M_move_assign2(deque&& __x, /* propagate: */ false_type) { if (__x._M_get_Tp_allocator() == this->_M_get_Tp_allocator()) { // The allocators are equal so storage can be moved from __x, // leaving __x in a valid empty state with its current allocator. _M_replace_map(std::move(__x), __x.get_allocator()); } else { // The rvalue's allocator cannot be moved and is not equal, // so we need to individually move each element. _M_assign_aux(std::__make_move_if_noexcept_iterator(__x.begin()), std::__make_move_if_noexcept_iterator(__x.end()), std::random_access_iterator_tag()); __x.clear(); } } #endif # 2288 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 }; #if 0 /* disabled by -frewrite-includes */ #if __cpp_deduction_guides >= 201606 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 2291 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 template<typename _InputIterator, typename _ValT = typename iterator_traits<_InputIterator>::value_type, typename _Allocator = allocator<_ValT>, typename = _RequireInputIter<_InputIterator>, typename = _RequireAllocator<_Allocator>> deque(_InputIterator, _InputIterator, _Allocator = _Allocator()) -> deque<_ValT, _Allocator>; #endif # 2299 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 /** * @brief Deque equality comparison. * @param __x A %deque. * @param __y A %deque of the same type as @a __x. * @return True iff the size and elements of the deques are equal. * * This is an equivalence relation. It is linear in the size of the * deques. Deques are considered equivalent if their sizes are equal, * and if corresponding elements compare equal. */ template<typename _Tp, typename _Alloc> inline bool operator==(const deque<_Tp, _Alloc>& __x, const deque<_Tp, _Alloc>& __y) { return __x.size() == __y.size() && std::equal(__x.begin(), __x.end(), __y.begin()); } /** * @brief Deque ordering relation. * @param __x A %deque. * @param __y A %deque of the same type as @a __x. * @return True iff @a x is lexicographically less than @a __y. * * This is a total ordering relation. It is linear in the size of the * deques. The elements must be comparable with @c <. * * See std::lexicographical_compare() for how the determination is made. */ template<typename _Tp, typename _Alloc> inline bool operator<(const deque<_Tp, _Alloc>& __x, const deque<_Tp, _Alloc>& __y) { return std::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end()); } /// Based on operator== template<typename _Tp, typename _Alloc> inline bool operator!=(const deque<_Tp, _Alloc>& __x, const deque<_Tp, _Alloc>& __y) { return !(__x == __y); } /// Based on operator< template<typename _Tp, typename _Alloc> inline bool operator>(const deque<_Tp, _Alloc>& __x, const deque<_Tp, _Alloc>& __y) { return __y < __x; } /// Based on operator< template<typename _Tp, typename _Alloc> inline bool operator<=(const deque<_Tp, _Alloc>& __x, const deque<_Tp, _Alloc>& __y) { return !(__y < __x); } /// Based on operator< template<typename _Tp, typename _Alloc> inline bool operator>=(const deque<_Tp, _Alloc>& __x, const deque<_Tp, _Alloc>& __y) { return !(__x < __y); } /// See std::deque::swap(). template<typename _Tp, typename _Alloc> inline void swap(deque<_Tp,_Alloc>& __x, deque<_Tp,_Alloc>& __y) _GLIBCXX_NOEXCEPT_IF(noexcept(__x.swap(__y))) { __x.swap(__y); } #undef _GLIBCXX_DEQUE_BUF_SIZE _GLIBCXX_END_NAMESPACE_CONTAINER #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 2375 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 // std::allocator is safe, but it is not the only allocator // for which this is valid. template<class _Tp> struct __is_bitwise_relocatable<_GLIBCXX_STD_C::deque<_Tp>> : true_type { }; #endif # 2381 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 _GLIBCXX_END_NAMESPACE_VERSION } // namespace std #endif /* _STL_DEQUE_H */ # 2386 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_deque.h" 3 # 68 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/deque" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/range_access.h> #endif /* expanded by -frewrite-includes */ # 68 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/deque" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/range_access.h" 1 3 // <range_access.h> -*- C++ -*- // Copyright (C) 2010-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file bits/range_access.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{iterator} */ #ifndef _GLIBCXX_RANGE_ACCESS_H #define _GLIBCXX_RANGE_ACCESS_H 1 #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 34 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/range_access.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 36 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/range_access.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <initializer_list> #endif /* expanded by -frewrite-includes */ # 36 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/range_access.h" 3 # 37 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/range_access.h" 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @brief Return an iterator pointing to the first element of * the container. * @param __cont Container. */ template<typename _Container> inline _GLIBCXX17_CONSTEXPR auto begin(_Container& __cont) -> decltype(__cont.begin()) { return __cont.begin(); } /** * @brief Return an iterator pointing to the first element of * the const container. * @param __cont Container. */ template<typename _Container> inline _GLIBCXX17_CONSTEXPR auto begin(const _Container& __cont) -> decltype(__cont.begin()) { return __cont.begin(); } /** * @brief Return an iterator pointing to one past the last element of * the container. * @param __cont Container. */ template<typename _Container> inline _GLIBCXX17_CONSTEXPR auto end(_Container& __cont) -> decltype(__cont.end()) { return __cont.end(); } /** * @brief Return an iterator pointing to one past the last element of * the const container. * @param __cont Container. */ template<typename _Container> inline _GLIBCXX17_CONSTEXPR auto end(const _Container& __cont) -> decltype(__cont.end()) { return __cont.end(); } /** * @brief Return an iterator pointing to the first element of the array. * @param __arr Array. */ template<typename _Tp, size_t _Nm> inline _GLIBCXX14_CONSTEXPR _Tp* begin(_Tp (&__arr)[_Nm]) noexcept { return __arr; } /** * @brief Return an iterator pointing to one past the last element * of the array. * @param __arr Array. */ template<typename _Tp, size_t _Nm> inline _GLIBCXX14_CONSTEXPR _Tp* end(_Tp (&__arr)[_Nm]) noexcept { return __arr + _Nm; } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201402L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 101 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/range_access.h" 3 template<typename _Tp> class valarray; // These overloads must be declared for cbegin and cend to use them. template<typename _Tp> _Tp* begin(valarray<_Tp>&); template<typename _Tp> const _Tp* begin(const valarray<_Tp>&); template<typename _Tp> _Tp* end(valarray<_Tp>&); template<typename _Tp> const _Tp* end(const valarray<_Tp>&); /** * @brief Return an iterator pointing to the first element of * the const container. * @param __cont Container. */ template<typename _Container> inline constexpr auto cbegin(const _Container& __cont) noexcept(noexcept(std::begin(__cont))) -> decltype(std::begin(__cont)) { return std::begin(__cont); } /** * @brief Return an iterator pointing to one past the last element of * the const container. * @param __cont Container. */ template<typename _Container> inline constexpr auto cend(const _Container& __cont) noexcept(noexcept(std::end(__cont))) -> decltype(std::end(__cont)) { return std::end(__cont); } /** * @brief Return a reverse iterator pointing to the last element of * the container. * @param __cont Container. */ template<typename _Container> inline _GLIBCXX17_CONSTEXPR auto rbegin(_Container& __cont) -> decltype(__cont.rbegin()) { return __cont.rbegin(); } /** * @brief Return a reverse iterator pointing to the last element of * the const container. * @param __cont Container. */ template<typename _Container> inline _GLIBCXX17_CONSTEXPR auto rbegin(const _Container& __cont) -> decltype(__cont.rbegin()) { return __cont.rbegin(); } /** * @brief Return a reverse iterator pointing one past the first element of * the container. * @param __cont Container. */ template<typename _Container> inline _GLIBCXX17_CONSTEXPR auto rend(_Container& __cont) -> decltype(__cont.rend()) { return __cont.rend(); } /** * @brief Return a reverse iterator pointing one past the first element of * the const container. * @param __cont Container. */ template<typename _Container> inline _GLIBCXX17_CONSTEXPR auto rend(const _Container& __cont) -> decltype(__cont.rend()) { return __cont.rend(); } /** * @brief Return a reverse iterator pointing to the last element of * the array. * @param __arr Array. */ template<typename _Tp, size_t _Nm> inline _GLIBCXX17_CONSTEXPR reverse_iterator<_Tp*> rbegin(_Tp (&__arr)[_Nm]) noexcept { return reverse_iterator<_Tp*>(__arr + _Nm); } /** * @brief Return a reverse iterator pointing one past the first element of * the array. * @param __arr Array. */ template<typename _Tp, size_t _Nm> inline _GLIBCXX17_CONSTEXPR reverse_iterator<_Tp*> rend(_Tp (&__arr)[_Nm]) noexcept { return reverse_iterator<_Tp*>(__arr); } /** * @brief Return a reverse iterator pointing to the last element of * the initializer_list. * @param __il initializer_list. */ template<typename _Tp> inline _GLIBCXX17_CONSTEXPR reverse_iterator<const _Tp*> rbegin(initializer_list<_Tp> __il) noexcept { return reverse_iterator<const _Tp*>(__il.end()); } /** * @brief Return a reverse iterator pointing one past the first element of * the initializer_list. * @param __il initializer_list. */ template<typename _Tp> inline _GLIBCXX17_CONSTEXPR reverse_iterator<const _Tp*> rend(initializer_list<_Tp> __il) noexcept { return reverse_iterator<const _Tp*>(__il.begin()); } /** * @brief Return a reverse iterator pointing to the last element of * the const container. * @param __cont Container. */ template<typename _Container> inline _GLIBCXX17_CONSTEXPR auto crbegin(const _Container& __cont) -> decltype(std::rbegin(__cont)) { return std::rbegin(__cont); } /** * @brief Return a reverse iterator pointing one past the first element of * the const container. * @param __cont Container. */ template<typename _Container> inline _GLIBCXX17_CONSTEXPR auto crend(const _Container& __cont) -> decltype(std::rend(__cont)) { return std::rend(__cont); } #endif // C++14 # 232 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/range_access.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 234 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/range_access.h" 3 #define __cpp_lib_nonmember_container_access 201411 /** * @brief Return the size of a container. * @param __cont Container. */ template <typename _Container> constexpr auto size(const _Container& __cont) noexcept(noexcept(__cont.size())) -> decltype(__cont.size()) { return __cont.size(); } /** * @brief Return the size of an array. * @param __array Array. */ template <typename _Tp, size_t _Nm> constexpr size_t size(const _Tp (&/*__array*/)[_Nm]) noexcept { return _Nm; } /** * @brief Return whether a container is empty. * @param __cont Container. */ template <typename _Container> [[nodiscard]] constexpr auto empty(const _Container& __cont) noexcept(noexcept(__cont.empty())) -> decltype(__cont.empty()) { return __cont.empty(); } /** * @brief Return whether an array is empty (always false). * @param __array Container. */ template <typename _Tp, size_t _Nm> [[nodiscard]] constexpr bool empty(const _Tp (&/*__array*/)[_Nm]) noexcept { return false; } /** * @brief Return whether an initializer_list is empty. * @param __il Initializer list. */ template <typename _Tp> [[nodiscard]] constexpr bool empty(initializer_list<_Tp> __il) noexcept { return __il.size() == 0;} /** * @brief Return the data pointer of a container. * @param __cont Container. */ template <typename _Container> constexpr auto data(_Container& __cont) noexcept(noexcept(__cont.data())) -> decltype(__cont.data()) { return __cont.data(); } /** * @brief Return the data pointer of a const container. * @param __cont Container. */ template <typename _Container> constexpr auto data(const _Container& __cont) noexcept(noexcept(__cont.data())) -> decltype(__cont.data()) { return __cont.data(); } /** * @brief Return the data pointer of an array. * @param __array Array. */ template <typename _Tp, size_t _Nm> constexpr _Tp* data(_Tp (&__array)[_Nm]) noexcept { return __array; } /** * @brief Return the data pointer of an initializer list. * @param __il Initializer list. */ template <typename _Tp> constexpr const _Tp* data(initializer_list<_Tp> __il) noexcept { return __il.begin(); } #endif // C++17 # 322 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/range_access.h" 3 _GLIBCXX_END_NAMESPACE_VERSION } // namespace #endif // C++11 # 327 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/range_access.h" 3 #endif // _GLIBCXX_RANGE_ACCESS_H # 329 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/range_access.h" 3 # 69 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/deque" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/deque.tcc> #endif /* expanded by -frewrite-includes */ # 69 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/deque" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/deque.tcc" 1 3 // Deque implementation (out of line) -*- C++ -*- // Copyright (C) 2001-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /* * * Copyright (c) 1994 * Hewlett-Packard Company * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Hewlett-Packard Company makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. * * * Copyright (c) 1997 * Silicon Graphics Computer Systems, Inc. * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Silicon Graphics makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. */ /** @file bits/deque.tcc * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{deque} */ #ifndef _DEQUE_TCC #define _DEQUE_TCC 1 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_BEGIN_NAMESPACE_CONTAINER #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 65 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/deque.tcc" 3 template <typename _Tp, typename _Alloc> void deque<_Tp, _Alloc>:: _M_default_initialize() { _Map_pointer __cur; __try { for (__cur = this->_M_impl._M_start._M_node; __cur < this->_M_impl._M_finish._M_node; ++__cur) std::__uninitialized_default_a(*__cur, *__cur + _S_buffer_size(), _M_get_Tp_allocator()); std::__uninitialized_default_a(this->_M_impl._M_finish._M_first, this->_M_impl._M_finish._M_cur, _M_get_Tp_allocator()); } __catch(...) { std::_Destroy(this->_M_impl._M_start, iterator(*__cur, __cur), _M_get_Tp_allocator()); __throw_exception_again; } } #endif # 90 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/deque.tcc" 3 template <typename _Tp, typename _Alloc> deque<_Tp, _Alloc>& deque<_Tp, _Alloc>:: operator=(const deque& __x) { if (&__x != this) { #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 99 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/deque.tcc" 3 if (_Alloc_traits::_S_propagate_on_copy_assign()) { if (!_Alloc_traits::_S_always_equal() && _M_get_Tp_allocator() != __x._M_get_Tp_allocator()) { // Replacement allocator cannot free existing storage, // so deallocate everything and take copy of __x's data. _M_replace_map(__x, __x.get_allocator()); std::__alloc_on_copy(_M_get_Tp_allocator(), __x._M_get_Tp_allocator()); return *this; } std::__alloc_on_copy(_M_get_Tp_allocator(), __x._M_get_Tp_allocator()); } #endif # 115 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/deque.tcc" 3 const size_type __len = size(); if (__len >= __x.size()) _M_erase_at_end(std::copy(__x.begin(), __x.end(), this->_M_impl._M_start)); else { const_iterator __mid = __x.begin() + difference_type(__len); std::copy(__x.begin(), __mid, this->_M_impl._M_start); _M_range_insert_aux(this->_M_impl._M_finish, __mid, __x.end(), std::random_access_iterator_tag()); } } return *this; } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 131 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/deque.tcc" 3 template<typename _Tp, typename _Alloc> template<typename... _Args> #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201402L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 134 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/deque.tcc" 3 typename deque<_Tp, _Alloc>::reference #else # 136 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/deque.tcc" 3 void #endif # 138 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/deque.tcc" 3 deque<_Tp, _Alloc>:: emplace_front(_Args&&... __args) { if (this->_M_impl._M_start._M_cur != this->_M_impl._M_start._M_first) { _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_start._M_cur - 1, std::forward<_Args>(__args)...); --this->_M_impl._M_start._M_cur; } else _M_push_front_aux(std::forward<_Args>(__args)...); #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201402L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 151 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/deque.tcc" 3 return front(); #endif # 153 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/deque.tcc" 3 } template<typename _Tp, typename _Alloc> template<typename... _Args> #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201402L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 158 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/deque.tcc" 3 typename deque<_Tp, _Alloc>::reference #else # 160 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/deque.tcc" 3 void #endif # 162 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/deque.tcc" 3 deque<_Tp, _Alloc>:: emplace_back(_Args&&... __args) { if (this->_M_impl._M_finish._M_cur != this->_M_impl._M_finish._M_last - 1) { _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish._M_cur, std::forward<_Args>(__args)...); ++this->_M_impl._M_finish._M_cur; } else _M_push_back_aux(std::forward<_Args>(__args)...); #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201402L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 176 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/deque.tcc" 3 return back(); #endif # 178 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/deque.tcc" 3 } #endif # 180 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/deque.tcc" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 182 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/deque.tcc" 3 template<typename _Tp, typename _Alloc> template<typename... _Args> typename deque<_Tp, _Alloc>::iterator deque<_Tp, _Alloc>:: emplace(const_iterator __position, _Args&&... __args) { if (__position._M_cur == this->_M_impl._M_start._M_cur) { emplace_front(std::forward<_Args>(__args)...); return this->_M_impl._M_start; } else if (__position._M_cur == this->_M_impl._M_finish._M_cur) { emplace_back(std::forward<_Args>(__args)...); iterator __tmp = this->_M_impl._M_finish; --__tmp; return __tmp; } else return _M_insert_aux(__position._M_const_cast(), std::forward<_Args>(__args)...); } #endif # 205 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/deque.tcc" 3 template <typename _Tp, typename _Alloc> typename deque<_Tp, _Alloc>::iterator deque<_Tp, _Alloc>:: #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 210 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/deque.tcc" 3 insert(const_iterator __position, const value_type& __x) #else # 212 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/deque.tcc" 3 insert(iterator __position, const value_type& __x) #endif # 214 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/deque.tcc" 3 { if (__position._M_cur == this->_M_impl._M_start._M_cur) { push_front(__x); return this->_M_impl._M_start; } else if (__position._M_cur == this->_M_impl._M_finish._M_cur) { push_back(__x); iterator __tmp = this->_M_impl._M_finish; --__tmp; return __tmp; } else return _M_insert_aux(__position._M_const_cast(), __x); } template <typename _Tp, typename _Alloc> typename deque<_Tp, _Alloc>::iterator deque<_Tp, _Alloc>:: _M_erase(iterator __position) { iterator __next = __position; ++__next; const difference_type __index = __position - begin(); if (static_cast<size_type>(__index) < (size() >> 1)) { if (__position != begin()) _GLIBCXX_MOVE_BACKWARD3(begin(), __position, __next); pop_front(); } else { if (__next != end()) _GLIBCXX_MOVE3(__next, end(), __position); pop_back(); } return begin() + __index; } template <typename _Tp, typename _Alloc> typename deque<_Tp, _Alloc>::iterator deque<_Tp, _Alloc>:: _M_erase(iterator __first, iterator __last) { if (__first == __last) return __first; else if (__first == begin() && __last == end()) { clear(); return end(); } else { const difference_type __n = __last - __first; const difference_type __elems_before = __first - begin(); if (static_cast<size_type>(__elems_before) <= (size() - __n) / 2) { if (__first != begin()) _GLIBCXX_MOVE_BACKWARD3(begin(), __first, __last); _M_erase_at_begin(begin() + __n); } else { if (__last != end()) _GLIBCXX_MOVE3(__last, end(), __first); _M_erase_at_end(end() - __n); } return begin() + __elems_before; } } template <typename _Tp, class _Alloc> template <typename _InputIterator> void deque<_Tp, _Alloc>:: _M_assign_aux(_InputIterator __first, _InputIterator __last, std::input_iterator_tag) { iterator __cur = begin(); for (; __first != __last && __cur != end(); ++__cur, (void)++__first) *__cur = *__first; if (__first == __last) _M_erase_at_end(__cur); else _M_range_insert_aux(end(), __first, __last, std::__iterator_category(__first)); } template <typename _Tp, typename _Alloc> void deque<_Tp, _Alloc>:: _M_fill_insert(iterator __pos, size_type __n, const value_type& __x) { if (__pos._M_cur == this->_M_impl._M_start._M_cur) { iterator __new_start = _M_reserve_elements_at_front(__n); __try { std::__uninitialized_fill_a(__new_start, this->_M_impl._M_start, __x, _M_get_Tp_allocator()); this->_M_impl._M_start = __new_start; } __catch(...) { _M_destroy_nodes(__new_start._M_node, this->_M_impl._M_start._M_node); __throw_exception_again; } } else if (__pos._M_cur == this->_M_impl._M_finish._M_cur) { iterator __new_finish = _M_reserve_elements_at_back(__n); __try { std::__uninitialized_fill_a(this->_M_impl._M_finish, __new_finish, __x, _M_get_Tp_allocator()); this->_M_impl._M_finish = __new_finish; } __catch(...) { _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, __new_finish._M_node + 1); __throw_exception_again; } } else _M_insert_aux(__pos, __n, __x); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 346 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/deque.tcc" 3 template <typename _Tp, typename _Alloc> void deque<_Tp, _Alloc>:: _M_default_append(size_type __n) { if (__n) { iterator __new_finish = _M_reserve_elements_at_back(__n); __try { std::__uninitialized_default_a(this->_M_impl._M_finish, __new_finish, _M_get_Tp_allocator()); this->_M_impl._M_finish = __new_finish; } __catch(...) { _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, __new_finish._M_node + 1); __throw_exception_again; } } } template <typename _Tp, typename _Alloc> bool deque<_Tp, _Alloc>:: _M_shrink_to_fit() { const difference_type __front_capacity = (this->_M_impl._M_start._M_cur - this->_M_impl._M_start._M_first); if (__front_capacity == 0) return false; const difference_type __back_capacity = (this->_M_impl._M_finish._M_last - this->_M_impl._M_finish._M_cur); if (__front_capacity + __back_capacity < _S_buffer_size()) return false; return std::__shrink_to_fit_aux<deque>::_S_do_it(*this); } #endif # 388 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/deque.tcc" 3 template <typename _Tp, typename _Alloc> void deque<_Tp, _Alloc>:: _M_fill_initialize(const value_type& __value) { _Map_pointer __cur; __try { for (__cur = this->_M_impl._M_start._M_node; __cur < this->_M_impl._M_finish._M_node; ++__cur) std::__uninitialized_fill_a(*__cur, *__cur + _S_buffer_size(), __value, _M_get_Tp_allocator()); std::__uninitialized_fill_a(this->_M_impl._M_finish._M_first, this->_M_impl._M_finish._M_cur, __value, _M_get_Tp_allocator()); } __catch(...) { std::_Destroy(this->_M_impl._M_start, iterator(*__cur, __cur), _M_get_Tp_allocator()); __throw_exception_again; } } template <typename _Tp, typename _Alloc> template <typename _InputIterator> void deque<_Tp, _Alloc>:: _M_range_initialize(_InputIterator __first, _InputIterator __last, std::input_iterator_tag) { this->_M_initialize_map(0); __try { for (; __first != __last; ++__first) #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 426 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/deque.tcc" 3 emplace_back(*__first); #else # 428 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/deque.tcc" 3 push_back(*__first); #endif # 430 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/deque.tcc" 3 } __catch(...) { clear(); __throw_exception_again; } } template <typename _Tp, typename _Alloc> template <typename _ForwardIterator> void deque<_Tp, _Alloc>:: _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag) { const size_type __n = std::distance(__first, __last); this->_M_initialize_map(_S_check_init_len(__n, _M_get_Tp_allocator())); _Map_pointer __cur_node; __try { for (__cur_node = this->_M_impl._M_start._M_node; __cur_node < this->_M_impl._M_finish._M_node; ++__cur_node) { _ForwardIterator __mid = __first; std::advance(__mid, _S_buffer_size()); std::__uninitialized_copy_a(__first, __mid, *__cur_node, _M_get_Tp_allocator()); __first = __mid; } std::__uninitialized_copy_a(__first, __last, this->_M_impl._M_finish._M_first, _M_get_Tp_allocator()); } __catch(...) { std::_Destroy(this->_M_impl._M_start, iterator(*__cur_node, __cur_node), _M_get_Tp_allocator()); __throw_exception_again; } } // Called only if _M_impl._M_finish._M_cur == _M_impl._M_finish._M_last - 1. template<typename _Tp, typename _Alloc> #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 477 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/deque.tcc" 3 template<typename... _Args> void deque<_Tp, _Alloc>:: _M_push_back_aux(_Args&&... __args) #else # 482 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/deque.tcc" 3 void deque<_Tp, _Alloc>:: _M_push_back_aux(const value_type& __t) #endif # 486 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/deque.tcc" 3 { if (size() == max_size()) __throw_length_error( __N("cannot create std::deque larger than max_size()")); _M_reserve_map_at_back(); *(this->_M_impl._M_finish._M_node + 1) = this->_M_allocate_node(); __try { #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 496 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/deque.tcc" 3 _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish._M_cur, std::forward<_Args>(__args)...); #else # 500 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/deque.tcc" 3 this->_M_impl.construct(this->_M_impl._M_finish._M_cur, __t); #endif # 502 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/deque.tcc" 3 this->_M_impl._M_finish._M_set_node(this->_M_impl._M_finish._M_node + 1); this->_M_impl._M_finish._M_cur = this->_M_impl._M_finish._M_first; } __catch(...) { _M_deallocate_node(*(this->_M_impl._M_finish._M_node + 1)); __throw_exception_again; } } // Called only if _M_impl._M_start._M_cur == _M_impl._M_start._M_first. template<typename _Tp, typename _Alloc> #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 516 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/deque.tcc" 3 template<typename... _Args> void deque<_Tp, _Alloc>:: _M_push_front_aux(_Args&&... __args) #else # 521 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/deque.tcc" 3 void deque<_Tp, _Alloc>:: _M_push_front_aux(const value_type& __t) #endif # 525 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/deque.tcc" 3 { if (size() == max_size()) __throw_length_error( __N("cannot create std::deque larger than max_size()")); _M_reserve_map_at_front(); *(this->_M_impl._M_start._M_node - 1) = this->_M_allocate_node(); __try { this->_M_impl._M_start._M_set_node(this->_M_impl._M_start._M_node - 1); this->_M_impl._M_start._M_cur = this->_M_impl._M_start._M_last - 1; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 538 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/deque.tcc" 3 _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_start._M_cur, std::forward<_Args>(__args)...); #else # 542 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/deque.tcc" 3 this->_M_impl.construct(this->_M_impl._M_start._M_cur, __t); #endif # 544 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/deque.tcc" 3 } __catch(...) { ++this->_M_impl._M_start; _M_deallocate_node(*(this->_M_impl._M_start._M_node - 1)); __throw_exception_again; } } // Called only if _M_impl._M_finish._M_cur == _M_impl._M_finish._M_first. template <typename _Tp, typename _Alloc> void deque<_Tp, _Alloc>:: _M_pop_back_aux() { _M_deallocate_node(this->_M_impl._M_finish._M_first); this->_M_impl._M_finish._M_set_node(this->_M_impl._M_finish._M_node - 1); this->_M_impl._M_finish._M_cur = this->_M_impl._M_finish._M_last - 1; _Alloc_traits::destroy(_M_get_Tp_allocator(), this->_M_impl._M_finish._M_cur); } // Called only if _M_impl._M_start._M_cur == _M_impl._M_start._M_last - 1. // Note that if the deque has at least one element (a precondition for this // member function), and if // _M_impl._M_start._M_cur == _M_impl._M_start._M_last, // then the deque must have at least two nodes. template <typename _Tp, typename _Alloc> void deque<_Tp, _Alloc>:: _M_pop_front_aux() { _Alloc_traits::destroy(_M_get_Tp_allocator(), this->_M_impl._M_start._M_cur); _M_deallocate_node(this->_M_impl._M_start._M_first); this->_M_impl._M_start._M_set_node(this->_M_impl._M_start._M_node + 1); this->_M_impl._M_start._M_cur = this->_M_impl._M_start._M_first; } template <typename _Tp, typename _Alloc> template <typename _InputIterator> void deque<_Tp, _Alloc>:: _M_range_insert_aux(iterator __pos, _InputIterator __first, _InputIterator __last, std::input_iterator_tag) { std::copy(__first, __last, std::inserter(*this, __pos)); } template <typename _Tp, typename _Alloc> template <typename _ForwardIterator> void deque<_Tp, _Alloc>:: _M_range_insert_aux(iterator __pos, _ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag) { const size_type __n = std::distance(__first, __last); if (__pos._M_cur == this->_M_impl._M_start._M_cur) { iterator __new_start = _M_reserve_elements_at_front(__n); __try { std::__uninitialized_copy_a(__first, __last, __new_start, _M_get_Tp_allocator()); this->_M_impl._M_start = __new_start; } __catch(...) { _M_destroy_nodes(__new_start._M_node, this->_M_impl._M_start._M_node); __throw_exception_again; } } else if (__pos._M_cur == this->_M_impl._M_finish._M_cur) { iterator __new_finish = _M_reserve_elements_at_back(__n); __try { std::__uninitialized_copy_a(__first, __last, this->_M_impl._M_finish, _M_get_Tp_allocator()); this->_M_impl._M_finish = __new_finish; } __catch(...) { _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, __new_finish._M_node + 1); __throw_exception_again; } } else _M_insert_aux(__pos, __first, __last, __n); } template<typename _Tp, typename _Alloc> #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 638 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/deque.tcc" 3 template<typename... _Args> typename deque<_Tp, _Alloc>::iterator deque<_Tp, _Alloc>:: _M_insert_aux(iterator __pos, _Args&&... __args) { value_type __x_copy(std::forward<_Args>(__args)...); // XXX copy #else # 645 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/deque.tcc" 3 typename deque<_Tp, _Alloc>::iterator deque<_Tp, _Alloc>:: _M_insert_aux(iterator __pos, const value_type& __x) { value_type __x_copy = __x; // XXX copy #endif # 651 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/deque.tcc" 3 difference_type __index = __pos - this->_M_impl._M_start; if (static_cast<size_type>(__index) < size() / 2) { push_front(_GLIBCXX_MOVE(front())); iterator __front1 = this->_M_impl._M_start; ++__front1; iterator __front2 = __front1; ++__front2; __pos = this->_M_impl._M_start + __index; iterator __pos1 = __pos; ++__pos1; _GLIBCXX_MOVE3(__front2, __pos1, __front1); } else { push_back(_GLIBCXX_MOVE(back())); iterator __back1 = this->_M_impl._M_finish; --__back1; iterator __back2 = __back1; --__back2; __pos = this->_M_impl._M_start + __index; _GLIBCXX_MOVE_BACKWARD3(__pos, __back2, __back1); } *__pos = _GLIBCXX_MOVE(__x_copy); return __pos; } template <typename _Tp, typename _Alloc> void deque<_Tp, _Alloc>:: _M_insert_aux(iterator __pos, size_type __n, const value_type& __x) { const difference_type __elems_before = __pos - this->_M_impl._M_start; const size_type __length = this->size(); value_type __x_copy = __x; if (__elems_before < difference_type(__length / 2)) { iterator __new_start = _M_reserve_elements_at_front(__n); iterator __old_start = this->_M_impl._M_start; __pos = this->_M_impl._M_start + __elems_before; __try { if (__elems_before >= difference_type(__n)) { iterator __start_n = (this->_M_impl._M_start + difference_type(__n)); std::__uninitialized_move_a(this->_M_impl._M_start, __start_n, __new_start, _M_get_Tp_allocator()); this->_M_impl._M_start = __new_start; _GLIBCXX_MOVE3(__start_n, __pos, __old_start); std::fill(__pos - difference_type(__n), __pos, __x_copy); } else { std::__uninitialized_move_fill(this->_M_impl._M_start, __pos, __new_start, this->_M_impl._M_start, __x_copy, _M_get_Tp_allocator()); this->_M_impl._M_start = __new_start; std::fill(__old_start, __pos, __x_copy); } } __catch(...) { _M_destroy_nodes(__new_start._M_node, this->_M_impl._M_start._M_node); __throw_exception_again; } } else { iterator __new_finish = _M_reserve_elements_at_back(__n); iterator __old_finish = this->_M_impl._M_finish; const difference_type __elems_after = difference_type(__length) - __elems_before; __pos = this->_M_impl._M_finish - __elems_after; __try { if (__elems_after > difference_type(__n)) { iterator __finish_n = (this->_M_impl._M_finish - difference_type(__n)); std::__uninitialized_move_a(__finish_n, this->_M_impl._M_finish, this->_M_impl._M_finish, _M_get_Tp_allocator()); this->_M_impl._M_finish = __new_finish; _GLIBCXX_MOVE_BACKWARD3(__pos, __finish_n, __old_finish); std::fill(__pos, __pos + difference_type(__n), __x_copy); } else { std::__uninitialized_fill_move(this->_M_impl._M_finish, __pos + difference_type(__n), __x_copy, __pos, this->_M_impl._M_finish, _M_get_Tp_allocator()); this->_M_impl._M_finish = __new_finish; std::fill(__pos, __old_finish, __x_copy); } } __catch(...) { _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, __new_finish._M_node + 1); __throw_exception_again; } } } template <typename _Tp, typename _Alloc> template <typename _ForwardIterator> void deque<_Tp, _Alloc>:: _M_insert_aux(iterator __pos, _ForwardIterator __first, _ForwardIterator __last, size_type __n) { const difference_type __elemsbefore = __pos - this->_M_impl._M_start; const size_type __length = size(); if (static_cast<size_type>(__elemsbefore) < __length / 2) { iterator __new_start = _M_reserve_elements_at_front(__n); iterator __old_start = this->_M_impl._M_start; __pos = this->_M_impl._M_start + __elemsbefore; __try { if (__elemsbefore >= difference_type(__n)) { iterator __start_n = (this->_M_impl._M_start + difference_type(__n)); std::__uninitialized_move_a(this->_M_impl._M_start, __start_n, __new_start, _M_get_Tp_allocator()); this->_M_impl._M_start = __new_start; _GLIBCXX_MOVE3(__start_n, __pos, __old_start); std::copy(__first, __last, __pos - difference_type(__n)); } else { _ForwardIterator __mid = __first; std::advance(__mid, difference_type(__n) - __elemsbefore); std::__uninitialized_move_copy(this->_M_impl._M_start, __pos, __first, __mid, __new_start, _M_get_Tp_allocator()); this->_M_impl._M_start = __new_start; std::copy(__mid, __last, __old_start); } } __catch(...) { _M_destroy_nodes(__new_start._M_node, this->_M_impl._M_start._M_node); __throw_exception_again; } } else { iterator __new_finish = _M_reserve_elements_at_back(__n); iterator __old_finish = this->_M_impl._M_finish; const difference_type __elemsafter = difference_type(__length) - __elemsbefore; __pos = this->_M_impl._M_finish - __elemsafter; __try { if (__elemsafter > difference_type(__n)) { iterator __finish_n = (this->_M_impl._M_finish - difference_type(__n)); std::__uninitialized_move_a(__finish_n, this->_M_impl._M_finish, this->_M_impl._M_finish, _M_get_Tp_allocator()); this->_M_impl._M_finish = __new_finish; _GLIBCXX_MOVE_BACKWARD3(__pos, __finish_n, __old_finish); std::copy(__first, __last, __pos); } else { _ForwardIterator __mid = __first; std::advance(__mid, __elemsafter); std::__uninitialized_copy_move(__mid, __last, __pos, this->_M_impl._M_finish, this->_M_impl._M_finish, _M_get_Tp_allocator()); this->_M_impl._M_finish = __new_finish; std::copy(__first, __mid, __pos); } } __catch(...) { _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, __new_finish._M_node + 1); __throw_exception_again; } } } template<typename _Tp, typename _Alloc> void deque<_Tp, _Alloc>:: _M_destroy_data_aux(iterator __first, iterator __last) { for (_Map_pointer __node = __first._M_node + 1; __node < __last._M_node; ++__node) std::_Destroy(*__node, *__node + _S_buffer_size(), _M_get_Tp_allocator()); if (__first._M_node != __last._M_node) { std::_Destroy(__first._M_cur, __first._M_last, _M_get_Tp_allocator()); std::_Destroy(__last._M_first, __last._M_cur, _M_get_Tp_allocator()); } else std::_Destroy(__first._M_cur, __last._M_cur, _M_get_Tp_allocator()); } template <typename _Tp, typename _Alloc> void deque<_Tp, _Alloc>:: _M_new_elements_at_front(size_type __new_elems) { if (this->max_size() - this->size() < __new_elems) __throw_length_error(__N("deque::_M_new_elements_at_front")); const size_type __new_nodes = ((__new_elems + _S_buffer_size() - 1) / _S_buffer_size()); _M_reserve_map_at_front(__new_nodes); size_type __i; __try { for (__i = 1; __i <= __new_nodes; ++__i) *(this->_M_impl._M_start._M_node - __i) = this->_M_allocate_node(); } __catch(...) { for (size_type __j = 1; __j < __i; ++__j) _M_deallocate_node(*(this->_M_impl._M_start._M_node - __j)); __throw_exception_again; } } template <typename _Tp, typename _Alloc> void deque<_Tp, _Alloc>:: _M_new_elements_at_back(size_type __new_elems) { if (this->max_size() - this->size() < __new_elems) __throw_length_error(__N("deque::_M_new_elements_at_back")); const size_type __new_nodes = ((__new_elems + _S_buffer_size() - 1) / _S_buffer_size()); _M_reserve_map_at_back(__new_nodes); size_type __i; __try { for (__i = 1; __i <= __new_nodes; ++__i) *(this->_M_impl._M_finish._M_node + __i) = this->_M_allocate_node(); } __catch(...) { for (size_type __j = 1; __j < __i; ++__j) _M_deallocate_node(*(this->_M_impl._M_finish._M_node + __j)); __throw_exception_again; } } template <typename _Tp, typename _Alloc> void deque<_Tp, _Alloc>:: _M_reallocate_map(size_type __nodes_to_add, bool __add_at_front) { const size_type __old_num_nodes = this->_M_impl._M_finish._M_node - this->_M_impl._M_start._M_node + 1; const size_type __new_num_nodes = __old_num_nodes + __nodes_to_add; _Map_pointer __new_nstart; if (this->_M_impl._M_map_size > 2 * __new_num_nodes) { __new_nstart = this->_M_impl._M_map + (this->_M_impl._M_map_size - __new_num_nodes) / 2 + (__add_at_front ? __nodes_to_add : 0); if (__new_nstart < this->_M_impl._M_start._M_node) std::copy(this->_M_impl._M_start._M_node, this->_M_impl._M_finish._M_node + 1, __new_nstart); else std::copy_backward(this->_M_impl._M_start._M_node, this->_M_impl._M_finish._M_node + 1, __new_nstart + __old_num_nodes); } else { size_type __new_map_size = this->_M_impl._M_map_size + std::max(this->_M_impl._M_map_size, __nodes_to_add) + 2; _Map_pointer __new_map = this->_M_allocate_map(__new_map_size); __new_nstart = __new_map + (__new_map_size - __new_num_nodes) / 2 + (__add_at_front ? __nodes_to_add : 0); std::copy(this->_M_impl._M_start._M_node, this->_M_impl._M_finish._M_node + 1, __new_nstart); _M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size); this->_M_impl._M_map = __new_map; this->_M_impl._M_map_size = __new_map_size; } this->_M_impl._M_start._M_set_node(__new_nstart); this->_M_impl._M_finish._M_set_node(__new_nstart + __old_num_nodes - 1); } // Overload for deque::iterators, exploiting the "segmented-iterator // optimization". template<typename _Tp> void fill(const _Deque_iterator<_Tp, _Tp&, _Tp*>& __first, const _Deque_iterator<_Tp, _Tp&, _Tp*>& __last, const _Tp& __value) { typedef typename _Deque_iterator<_Tp, _Tp&, _Tp*>::_Self _Self; for (typename _Self::_Map_pointer __node = __first._M_node + 1; __node < __last._M_node; ++__node) std::fill(*__node, *__node + _Self::_S_buffer_size(), __value); if (__first._M_node != __last._M_node) { std::fill(__first._M_cur, __first._M_last, __value); std::fill(__last._M_first, __last._M_cur, __value); } else std::fill(__first._M_cur, __last._M_cur, __value); } template<typename _Tp> _Deque_iterator<_Tp, _Tp&, _Tp*> copy(_Deque_iterator<_Tp, const _Tp&, const _Tp*> __first, _Deque_iterator<_Tp, const _Tp&, const _Tp*> __last, _Deque_iterator<_Tp, _Tp&, _Tp*> __result) { typedef typename _Deque_iterator<_Tp, _Tp&, _Tp*>::_Self _Self; typedef typename _Self::difference_type difference_type; difference_type __len = __last - __first; while (__len > 0) { const difference_type __clen = std::min(__len, std::min(__first._M_last - __first._M_cur, __result._M_last - __result._M_cur)); std::copy(__first._M_cur, __first._M_cur + __clen, __result._M_cur); __first += __clen; __result += __clen; __len -= __clen; } return __result; } template<typename _Tp> _Deque_iterator<_Tp, _Tp&, _Tp*> copy_backward(_Deque_iterator<_Tp, const _Tp&, const _Tp*> __first, _Deque_iterator<_Tp, const _Tp&, const _Tp*> __last, _Deque_iterator<_Tp, _Tp&, _Tp*> __result) { typedef typename _Deque_iterator<_Tp, _Tp&, _Tp*>::_Self _Self; typedef typename _Self::difference_type difference_type; difference_type __len = __last - __first; while (__len > 0) { difference_type __llen = __last._M_cur - __last._M_first; _Tp* __lend = __last._M_cur; difference_type __rlen = __result._M_cur - __result._M_first; _Tp* __rend = __result._M_cur; if (!__llen) { __llen = _Self::_S_buffer_size(); __lend = *(__last._M_node - 1) + __llen; } if (!__rlen) { __rlen = _Self::_S_buffer_size(); __rend = *(__result._M_node - 1) + __rlen; } const difference_type __clen = std::min(__len, std::min(__llen, __rlen)); std::copy_backward(__lend - __clen, __lend, __rend); __last -= __clen; __result -= __clen; __len -= __clen; } return __result; } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1055 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/deque.tcc" 3 template<typename _Tp> _Deque_iterator<_Tp, _Tp&, _Tp*> move(_Deque_iterator<_Tp, const _Tp&, const _Tp*> __first, _Deque_iterator<_Tp, const _Tp&, const _Tp*> __last, _Deque_iterator<_Tp, _Tp&, _Tp*> __result) { typedef typename _Deque_iterator<_Tp, _Tp&, _Tp*>::_Self _Self; typedef typename _Self::difference_type difference_type; difference_type __len = __last - __first; while (__len > 0) { const difference_type __clen = std::min(__len, std::min(__first._M_last - __first._M_cur, __result._M_last - __result._M_cur)); std::move(__first._M_cur, __first._M_cur + __clen, __result._M_cur); __first += __clen; __result += __clen; __len -= __clen; } return __result; } template<typename _Tp> _Deque_iterator<_Tp, _Tp&, _Tp*> move_backward(_Deque_iterator<_Tp, const _Tp&, const _Tp*> __first, _Deque_iterator<_Tp, const _Tp&, const _Tp*> __last, _Deque_iterator<_Tp, _Tp&, _Tp*> __result) { typedef typename _Deque_iterator<_Tp, _Tp&, _Tp*>::_Self _Self; typedef typename _Self::difference_type difference_type; difference_type __len = __last - __first; while (__len > 0) { difference_type __llen = __last._M_cur - __last._M_first; _Tp* __lend = __last._M_cur; difference_type __rlen = __result._M_cur - __result._M_first; _Tp* __rend = __result._M_cur; if (!__llen) { __llen = _Self::_S_buffer_size(); __lend = *(__last._M_node - 1) + __llen; } if (!__rlen) { __rlen = _Self::_S_buffer_size(); __rend = *(__result._M_node - 1) + __rlen; } const difference_type __clen = std::min(__len, std::min(__llen, __rlen)); std::move_backward(__lend - __clen, __lend, __rend); __last -= __clen; __result -= __clen; __len -= __clen; } return __result; } #endif # 1117 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/deque.tcc" 3 _GLIBCXX_END_NAMESPACE_CONTAINER _GLIBCXX_END_NAMESPACE_VERSION } // namespace std #endif # 1123 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/deque.tcc" 3 # 70 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/deque" 2 3 #ifdef _GLIBCXX_DEBUG #if 0 /* expanded by -frewrite-includes */ # include <debug/deque> #endif /* expanded by -frewrite-includes */ # 72 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/deque" 3 # 73 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/deque" 3 #endif # 74 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/deque" 3 #ifdef _GLIBCXX_PROFILE #if 0 /* expanded by -frewrite-includes */ # include <profile/deque> #endif /* expanded by -frewrite-includes */ # 76 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/deque" 3 # 77 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/deque" 3 #endif # 78 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/deque" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 80 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/deque" 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION namespace pmr { template<typename _Tp> class polymorphic_allocator; template<typename _Tp> using deque = std::deque<_Tp, polymorphic_allocator<_Tp>>; } // namespace pmr _GLIBCXX_END_NAMESPACE_VERSION } // namespace std #endif // C++17 # 92 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/deque" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 94 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/deque" 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION #define __cpp_lib_erase_if 202002L template<typename _Tp, typename _Alloc, typename _Predicate> inline typename deque<_Tp, _Alloc>::size_type erase_if(deque<_Tp, _Alloc>& __cont, _Predicate __pred) { const auto __osz = __cont.size(); __cont.erase(std::remove_if(__cont.begin(), __cont.end(), __pred), __cont.end()); return __osz - __cont.size(); } template<typename _Tp, typename _Alloc, typename _Up> inline typename deque<_Tp, _Alloc>::size_type erase(deque<_Tp, _Alloc>& __cont, const _Up& __value) { const auto __osz = __cont.size(); __cont.erase(std::remove(__cont.begin(), __cont.end(), __value), __cont.end()); return __osz - __cont.size(); } _GLIBCXX_END_NAMESPACE_VERSION } // namespace std #endif // C++20 # 122 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/deque" 3 #endif /* _GLIBCXX_DEQUE */ # 124 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/deque" 3 # 61 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/queue" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <vector> #endif /* expanded by -frewrite-includes */ # 61 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/queue" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/vector" 1 3 // <vector> -*- C++ -*- // Copyright (C) 2001-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /* * * Copyright (c) 1994 * Hewlett-Packard Company * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Hewlett-Packard Company makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. * * * Copyright (c) 1996 * Silicon Graphics Computer Systems, Inc. * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Silicon Graphics makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. */ /** @file include/vector * This is a Standard C++ Library header. */ #ifndef _GLIBCXX_VECTOR #define _GLIBCXX_VECTOR 1 #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 59 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/vector" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/stl_algobase.h> #endif /* expanded by -frewrite-includes */ # 60 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/vector" 3 # 61 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/vector" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 62 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/vector" 3 #if 0 /* expanded by -frewrite-includes */ # include <bits/stl_algo.h> // For remove and remove_if #endif /* expanded by -frewrite-includes */ # 62 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/vector" 3 # 63 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/vector" 3 #endif // C++20 # 64 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/vector" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/allocator.h> #endif /* expanded by -frewrite-includes */ # 64 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/vector" 3 # 65 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/vector" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/stl_construct.h> #endif /* expanded by -frewrite-includes */ # 65 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/vector" 3 # 66 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/vector" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/stl_uninitialized.h> #endif /* expanded by -frewrite-includes */ # 66 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/vector" 3 # 67 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/vector" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/stl_vector.h> #endif /* expanded by -frewrite-includes */ # 67 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/vector" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 1 3 // Vector implementation -*- C++ -*- // Copyright (C) 2001-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /* * * Copyright (c) 1994 * Hewlett-Packard Company * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Hewlett-Packard Company makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. * * * Copyright (c) 1996 * Silicon Graphics Computer Systems, Inc. * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Silicon Graphics makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. */ /** @file bits/stl_vector.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{vector} */ #ifndef _STL_VECTOR_H #define _STL_VECTOR_H 1 #if 0 /* expanded by -frewrite-includes */ #include <bits/stl_iterator_base_funcs.h> #endif /* expanded by -frewrite-includes */ # 59 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 # 60 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/functexcept.h> #endif /* expanded by -frewrite-includes */ # 60 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 # 61 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/concept_check.h> #endif /* expanded by -frewrite-includes */ # 61 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 # 62 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 63 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <initializer_list> #endif /* expanded by -frewrite-includes */ # 63 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 # 64 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 #endif # 65 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <debug/assertions.h> #endif /* expanded by -frewrite-includes */ # 66 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 # 67 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_SANITIZE_STD_ALLOCATOR && _GLIBCXX_SANITIZE_VECTOR #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 69 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 extern "C" void __sanitizer_annotate_contiguous_container(const void*, const void*, const void*, const void*); #endif # 73 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_BEGIN_NAMESPACE_CONTAINER /// See bits/stl_deque.h's _Deque_base for an explanation. template<typename _Tp, typename _Alloc> struct _Vector_base { typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template rebind<_Tp>::other _Tp_alloc_type; typedef typename __gnu_cxx::__alloc_traits<_Tp_alloc_type>::pointer pointer; struct _Vector_impl_data { pointer _M_start; pointer _M_finish; pointer _M_end_of_storage; _Vector_impl_data() _GLIBCXX_NOEXCEPT : _M_start(), _M_finish(), _M_end_of_storage() { } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 99 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 _Vector_impl_data(_Vector_impl_data&& __x) noexcept : _M_start(__x._M_start), _M_finish(__x._M_finish), _M_end_of_storage(__x._M_end_of_storage) { __x._M_start = __x._M_finish = __x._M_end_of_storage = pointer(); } #endif # 104 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 void _M_copy_data(_Vector_impl_data const& __x) _GLIBCXX_NOEXCEPT { _M_start = __x._M_start; _M_finish = __x._M_finish; _M_end_of_storage = __x._M_end_of_storage; } void _M_swap_data(_Vector_impl_data& __x) _GLIBCXX_NOEXCEPT { // Do not use std::swap(_M_start, __x._M_start), etc as it loses // information used by TBAA. _Vector_impl_data __tmp; __tmp._M_copy_data(*this); _M_copy_data(__x); __x._M_copy_data(__tmp); } }; struct _Vector_impl : public _Tp_alloc_type, public _Vector_impl_data { _Vector_impl() _GLIBCXX_NOEXCEPT_IF( is_nothrow_default_constructible<_Tp_alloc_type>::value) : _Tp_alloc_type() { } _Vector_impl(_Tp_alloc_type const& __a) _GLIBCXX_NOEXCEPT : _Tp_alloc_type(__a) { } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 138 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 // Not defaulted, to enforce noexcept(true) even when // !is_nothrow_move_constructible<_Tp_alloc_type>. _Vector_impl(_Vector_impl&& __x) noexcept : _Tp_alloc_type(std::move(__x)), _Vector_impl_data(std::move(__x)) { } _Vector_impl(_Tp_alloc_type&& __a) noexcept : _Tp_alloc_type(std::move(__a)) { } _Vector_impl(_Tp_alloc_type&& __a, _Vector_impl&& __rv) noexcept : _Tp_alloc_type(std::move(__a)), _Vector_impl_data(std::move(__rv)) { } #endif # 152 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_SANITIZE_STD_ALLOCATOR && _GLIBCXX_SANITIZE_VECTOR #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 154 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 template<typename = _Tp_alloc_type> struct _Asan { typedef typename __gnu_cxx::__alloc_traits<_Tp_alloc_type> ::size_type size_type; static void _S_shrink(_Vector_impl&, size_type) { } static void _S_on_dealloc(_Vector_impl&) { } typedef _Vector_impl& _Reinit; struct _Grow { _Grow(_Vector_impl&, size_type) { } void _M_grew(size_type) { } }; }; // Enable ASan annotations for memory obtained from std::allocator. template<typename _Up> struct _Asan<allocator<_Up> > { typedef typename __gnu_cxx::__alloc_traits<_Tp_alloc_type> ::size_type size_type; // Adjust ASan annotation for [_M_start, _M_end_of_storage) to // mark end of valid region as __curr instead of __prev. static void _S_adjust(_Vector_impl& __impl, pointer __prev, pointer __curr) { __sanitizer_annotate_contiguous_container(__impl._M_start, __impl._M_end_of_storage, __prev, __curr); } static void _S_grow(_Vector_impl& __impl, size_type __n) { _S_adjust(__impl, __impl._M_finish, __impl._M_finish + __n); } static void _S_shrink(_Vector_impl& __impl, size_type __n) { _S_adjust(__impl, __impl._M_finish + __n, __impl._M_finish); } static void _S_on_dealloc(_Vector_impl& __impl) { if (__impl._M_start) _S_adjust(__impl, __impl._M_finish, __impl._M_end_of_storage); } // Used on reallocation to tell ASan unused capacity is invalid. struct _Reinit { explicit _Reinit(_Vector_impl& __impl) : _M_impl(__impl) { // Mark unused capacity as valid again before deallocating it. _S_on_dealloc(_M_impl); } ~_Reinit() { // Mark unused capacity as invalid after reallocation. if (_M_impl._M_start) _S_adjust(_M_impl, _M_impl._M_end_of_storage, _M_impl._M_finish); } _Vector_impl& _M_impl; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 223 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 _Reinit(const _Reinit&) = delete; _Reinit& operator=(const _Reinit&) = delete; #endif # 226 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 }; // Tell ASan when unused capacity is initialized to be valid. struct _Grow { _Grow(_Vector_impl& __impl, size_type __n) : _M_impl(__impl), _M_n(__n) { _S_grow(_M_impl, __n); } ~_Grow() { if (_M_n) _S_shrink(_M_impl, _M_n); } void _M_grew(size_type __n) { _M_n -= __n; } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 240 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 _Grow(const _Grow&) = delete; _Grow& operator=(const _Grow&) = delete; #endif # 243 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 private: _Vector_impl& _M_impl; size_type _M_n; }; }; #define _GLIBCXX_ASAN_ANNOTATE_REINIT \ typename _Base::_Vector_impl::template _Asan<>::_Reinit const \ __attribute__((__unused__)) __reinit_guard(this->_M_impl) #define _GLIBCXX_ASAN_ANNOTATE_GROW(n) \ typename _Base::_Vector_impl::template _Asan<>::_Grow \ __attribute__((__unused__)) __grow_guard(this->_M_impl, (n)) #define _GLIBCXX_ASAN_ANNOTATE_GREW(n) __grow_guard._M_grew(n) #define _GLIBCXX_ASAN_ANNOTATE_SHRINK(n) \ _Base::_Vector_impl::template _Asan<>::_S_shrink(this->_M_impl, n) #define _GLIBCXX_ASAN_ANNOTATE_BEFORE_DEALLOC \ _Base::_Vector_impl::template _Asan<>::_S_on_dealloc(this->_M_impl) #else // ! (_GLIBCXX_SANITIZE_STD_ALLOCATOR && _GLIBCXX_SANITIZE_VECTOR) # 261 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 #define _GLIBCXX_ASAN_ANNOTATE_REINIT #define _GLIBCXX_ASAN_ANNOTATE_GROW(n) #define _GLIBCXX_ASAN_ANNOTATE_GREW(n) #define _GLIBCXX_ASAN_ANNOTATE_SHRINK(n) #define _GLIBCXX_ASAN_ANNOTATE_BEFORE_DEALLOC #endif // _GLIBCXX_SANITIZE_STD_ALLOCATOR && _GLIBCXX_SANITIZE_VECTOR # 267 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 }; public: typedef _Alloc allocator_type; _Tp_alloc_type& _M_get_Tp_allocator() _GLIBCXX_NOEXCEPT { return this->_M_impl; } const _Tp_alloc_type& _M_get_Tp_allocator() const _GLIBCXX_NOEXCEPT { return this->_M_impl; } allocator_type get_allocator() const _GLIBCXX_NOEXCEPT { return allocator_type(_M_get_Tp_allocator()); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 285 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 _Vector_base() = default; #else # 287 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 _Vector_base() { } #endif # 289 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 _Vector_base(const allocator_type& __a) _GLIBCXX_NOEXCEPT : _M_impl(__a) { } // Kept for ABI compatibility. #if 0 /* disabled by -frewrite-includes */ #if !_GLIBCXX_INLINE_VERSION #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 295 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 _Vector_base(size_t __n) : _M_impl() { _M_create_storage(__n); } #endif # 299 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 _Vector_base(size_t __n, const allocator_type& __a) : _M_impl(__a) { _M_create_storage(__n); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 305 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 _Vector_base(_Vector_base&&) = default; // Kept for ABI compatibility. #if 0 /* disabled by -frewrite-includes */ # if !_GLIBCXX_INLINE_VERSION #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 309 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 _Vector_base(_Tp_alloc_type&& __a) noexcept : _M_impl(std::move(__a)) { } _Vector_base(_Vector_base&& __x, const allocator_type& __a) : _M_impl(__a) { if (__x.get_allocator() == __a) this->_M_impl._M_swap_data(__x._M_impl); else { size_t __n = __x._M_impl._M_finish - __x._M_impl._M_start; _M_create_storage(__n); } } # endif # 324 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 _Vector_base(const allocator_type& __a, _Vector_base&& __x) : _M_impl(_Tp_alloc_type(__a), std::move(__x._M_impl)) { } #endif # 329 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 ~_Vector_base() _GLIBCXX_NOEXCEPT { _M_deallocate(_M_impl._M_start, _M_impl._M_end_of_storage - _M_impl._M_start); } public: _Vector_impl _M_impl; pointer _M_allocate(size_t __n) { typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Tr; return __n != 0 ? _Tr::allocate(_M_impl, __n) : pointer(); } void _M_deallocate(pointer __p, size_t __n) { typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Tr; if (__p) _Tr::deallocate(_M_impl, __p, __n); } protected: void _M_create_storage(size_t __n) { this->_M_impl._M_start = this->_M_allocate(__n); this->_M_impl._M_finish = this->_M_impl._M_start; this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; } }; /** * @brief A standard container which offers fixed time access to * individual elements in any order. * * @ingroup sequences * * @tparam _Tp Type of element. * @tparam _Alloc Allocator type, defaults to allocator<_Tp>. * * Meets the requirements of a <a href="tables.html#65">container</a>, a * <a href="tables.html#66">reversible container</a>, and a * <a href="tables.html#67">sequence</a>, including the * <a href="tables.html#68">optional sequence requirements</a> with the * %exception of @c push_front and @c pop_front. * * In some terminology a %vector can be described as a dynamic * C-style array, it offers fast and efficient access to individual * elements in any order and saves the user from worrying about * memory and size allocation. Subscripting ( @c [] ) access is * also provided as with C-style arrays. */ template<typename _Tp, typename _Alloc = std::allocator<_Tp> > class vector : protected _Vector_base<_Tp, _Alloc> { #ifdef _GLIBCXX_CONCEPT_CHECKS // Concept requirements. typedef typename _Alloc::value_type _Alloc_value_type; #if 0 /* disabled by -frewrite-includes */ # if __cplusplus < 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 392 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 __glibcxx_class_requires(_Tp, _SGIAssignableConcept) # endif # 394 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 __glibcxx_class_requires2(_Tp, _Alloc_value_type, _SameTypeConcept) #endif # 396 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 398 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 static_assert(is_same<typename remove_cv<_Tp>::type, _Tp>::value, "std::vector must have a non-const, non-volatile value_type"); # ifdef __STRICT_ANSI__ static_assert(is_same<typename _Alloc::value_type, _Tp>::value, "std::vector must have the same value_type as its allocator"); # endif # 404 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 #endif # 405 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 typedef _Vector_base<_Tp, _Alloc> _Base; typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Alloc_traits; public: typedef _Tp value_type; typedef typename _Base::pointer pointer; typedef typename _Alloc_traits::const_pointer const_pointer; typedef typename _Alloc_traits::reference reference; typedef typename _Alloc_traits::const_reference const_reference; typedef __gnu_cxx::__normal_iterator<pointer, vector> iterator; typedef __gnu_cxx::__normal_iterator<const_pointer, vector> const_iterator; typedef std::reverse_iterator<const_iterator> const_reverse_iterator; typedef std::reverse_iterator<iterator> reverse_iterator; typedef size_t size_type; typedef ptrdiff_t difference_type; typedef _Alloc allocator_type; private: #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 427 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 static constexpr bool _S_nothrow_relocate(true_type) { return noexcept(std::__relocate_a(std::declval<pointer>(), std::declval<pointer>(), std::declval<pointer>(), std::declval<_Tp_alloc_type&>())); } static constexpr bool _S_nothrow_relocate(false_type) { return false; } static constexpr bool _S_use_relocate() { // Instantiating std::__relocate_a might cause an error outside the // immediate context (in __relocate_object_a's noexcept-specifier), // so only do it if we know the type can be move-inserted into *this. return _S_nothrow_relocate(__is_move_insertable<_Tp_alloc_type>{}); } static pointer _S_do_relocate(pointer __first, pointer __last, pointer __result, _Tp_alloc_type& __alloc, true_type) noexcept { return std::__relocate_a(__first, __last, __result, __alloc); } static pointer _S_do_relocate(pointer, pointer, pointer __result, _Tp_alloc_type&, false_type) noexcept { return __result; } static pointer _S_relocate(pointer __first, pointer __last, pointer __result, _Tp_alloc_type& __alloc) noexcept { using __do_it = __bool_constant<_S_use_relocate()>; return _S_do_relocate(__first, __last, __result, __alloc, __do_it{}); } #endif // C++11 # 469 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 protected: using _Base::_M_allocate; using _Base::_M_deallocate; using _Base::_M_impl; using _Base::_M_get_Tp_allocator; public: // [23.2.4.1] construct/copy/destroy // (assign() and get_allocator() are also listed in this section) /** * @brief Creates a %vector with no elements. */ #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 484 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 vector() = default; #else # 486 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 vector() { } #endif # 488 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 /** * @brief Creates a %vector with no elements. * @param __a An allocator object. */ explicit vector(const allocator_type& __a) _GLIBCXX_NOEXCEPT : _Base(__a) { } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 498 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 /** * @brief Creates a %vector with default constructed elements. * @param __n The number of elements to initially create. * @param __a An allocator. * * This constructor fills the %vector with @a __n default * constructed elements. */ explicit vector(size_type __n, const allocator_type& __a = allocator_type()) : _Base(_S_check_init_len(__n, __a), __a) { _M_default_initialize(__n); } /** * @brief Creates a %vector with copies of an exemplar element. * @param __n The number of elements to initially create. * @param __value An element to copy. * @param __a An allocator. * * This constructor fills the %vector with @a __n copies of @a __value. */ vector(size_type __n, const value_type& __value, const allocator_type& __a = allocator_type()) : _Base(_S_check_init_len(__n, __a), __a) { _M_fill_initialize(__n, __value); } #else # 524 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 /** * @brief Creates a %vector with copies of an exemplar element. * @param __n The number of elements to initially create. * @param __value An element to copy. * @param __a An allocator. * * This constructor fills the %vector with @a __n copies of @a __value. */ explicit vector(size_type __n, const value_type& __value = value_type(), const allocator_type& __a = allocator_type()) : _Base(_S_check_init_len(__n, __a), __a) { _M_fill_initialize(__n, __value); } #endif # 538 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 /** * @brief %Vector copy constructor. * @param __x A %vector of identical element and allocator types. * * All the elements of @a __x are copied, but any unused capacity in * @a __x will not be copied * (i.e. capacity() == size() in the new %vector). * * The newly-created %vector uses a copy of the allocator object used * by @a __x (unless the allocator traits dictate a different object). */ vector(const vector& __x) : _Base(__x.size(), _Alloc_traits::_S_select_on_copy(__x._M_get_Tp_allocator())) { this->_M_impl._M_finish = std::__uninitialized_copy_a(__x.begin(), __x.end(), this->_M_impl._M_start, _M_get_Tp_allocator()); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 561 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 /** * @brief %Vector move constructor. * * The newly-created %vector contains the exact contents of the * moved instance. * The contents of the moved instance are a valid, but unspecified * %vector. */ vector(vector&&) noexcept = default; /// Copy constructor with alternative allocator vector(const vector& __x, const allocator_type& __a) : _Base(__x.size(), __a) { this->_M_impl._M_finish = std::__uninitialized_copy_a(__x.begin(), __x.end(), this->_M_impl._M_start, _M_get_Tp_allocator()); } private: vector(vector&& __rv, const allocator_type& __m, true_type) noexcept : _Base(__m, std::move(__rv)) { } vector(vector&& __rv, const allocator_type& __m, false_type) : _Base(__m) { if (__rv.get_allocator() == __m) this->_M_impl._M_swap_data(__rv._M_impl); else if (!__rv.empty()) { this->_M_create_storage(__rv.size()); this->_M_impl._M_finish = std::__uninitialized_move_a(__rv.begin(), __rv.end(), this->_M_impl._M_start, _M_get_Tp_allocator()); __rv.clear(); } } public: /// Move constructor with alternative allocator vector(vector&& __rv, const allocator_type& __m) noexcept( noexcept( vector(std::declval<vector&&>(), std::declval<const allocator_type&>(), std::declval<typename _Alloc_traits::is_always_equal>())) ) : vector(std::move(__rv), __m, typename _Alloc_traits::is_always_equal{}) { } /** * @brief Builds a %vector from an initializer list. * @param __l An initializer_list. * @param __a An allocator. * * Create a %vector consisting of copies of the elements in the * initializer_list @a __l. * * This will call the element type's copy constructor N times * (where N is @a __l.size()) and do no memory reallocation. */ vector(initializer_list<value_type> __l, const allocator_type& __a = allocator_type()) : _Base(__a) { _M_range_initialize(__l.begin(), __l.end(), random_access_iterator_tag()); } #endif # 630 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 /** * @brief Builds a %vector from a range. * @param __first An input iterator. * @param __last An input iterator. * @param __a An allocator. * * Create a %vector consisting of copies of the elements from * [first,last). * * If the iterators are forward, bidirectional, or * random-access, then this will call the elements' copy * constructor N times (where N is distance(first,last)) and do * no memory reallocation. But if only input iterators are * used, then this will do at most 2N calls to the copy * constructor, and logN memory reallocations. */ #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 648 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 template<typename _InputIterator, typename = std::_RequireInputIter<_InputIterator>> vector(_InputIterator __first, _InputIterator __last, const allocator_type& __a = allocator_type()) : _Base(__a) { _M_range_initialize(__first, __last, std::__iterator_category(__first)); } #else # 658 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 template<typename _InputIterator> vector(_InputIterator __first, _InputIterator __last, const allocator_type& __a = allocator_type()) : _Base(__a) { // Check whether it's an integral type. If so, it's not an iterator. typedef typename std::__is_integer<_InputIterator>::__type _Integral; _M_initialize_dispatch(__first, __last, _Integral()); } #endif # 668 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 /** * The dtor only erases the elements, and note that if the * elements themselves are pointers, the pointed-to memory is * not touched in any way. Managing the pointer is the user's * responsibility. */ ~vector() _GLIBCXX_NOEXCEPT { std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, _M_get_Tp_allocator()); _GLIBCXX_ASAN_ANNOTATE_BEFORE_DEALLOC; } /** * @brief %Vector assignment operator. * @param __x A %vector of identical element and allocator types. * * All the elements of @a __x are copied, but any unused capacity in * @a __x will not be copied. * * Whether the allocator is copied depends on the allocator traits. */ vector& operator=(const vector& __x); #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 695 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 /** * @brief %Vector move assignment operator. * @param __x A %vector of identical element and allocator types. * * The contents of @a __x are moved into this %vector (without copying, * if the allocators permit it). * Afterwards @a __x is a valid, but unspecified %vector. * * Whether the allocator is moved depends on the allocator traits. */ vector& operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move()) { constexpr bool __move_storage = _Alloc_traits::_S_propagate_on_move_assign() || _Alloc_traits::_S_always_equal(); _M_move_assign(std::move(__x), __bool_constant<__move_storage>()); return *this; } /** * @brief %Vector list assignment operator. * @param __l An initializer_list. * * This function fills a %vector with copies of the elements in the * initializer list @a __l. * * Note that the assignment completely changes the %vector and * that the resulting %vector's size is the same as the number * of elements assigned. */ vector& operator=(initializer_list<value_type> __l) { this->_M_assign_aux(__l.begin(), __l.end(), random_access_iterator_tag()); return *this; } #endif # 734 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 /** * @brief Assigns a given value to a %vector. * @param __n Number of elements to be assigned. * @param __val Value to be assigned. * * This function fills a %vector with @a __n copies of the given * value. Note that the assignment completely changes the * %vector and that the resulting %vector's size is the same as * the number of elements assigned. */ void assign(size_type __n, const value_type& __val) { _M_fill_assign(__n, __val); } /** * @brief Assigns a range to a %vector. * @param __first An input iterator. * @param __last An input iterator. * * This function fills a %vector with copies of the elements in the * range [__first,__last). * * Note that the assignment completely changes the %vector and * that the resulting %vector's size is the same as the number * of elements assigned. */ #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 762 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 template<typename _InputIterator, typename = std::_RequireInputIter<_InputIterator>> void assign(_InputIterator __first, _InputIterator __last) { _M_assign_dispatch(__first, __last, __false_type()); } #else # 768 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 template<typename _InputIterator> void assign(_InputIterator __first, _InputIterator __last) { // Check whether it's an integral type. If so, it's not an iterator. typedef typename std::__is_integer<_InputIterator>::__type _Integral; _M_assign_dispatch(__first, __last, _Integral()); } #endif # 777 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 779 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 /** * @brief Assigns an initializer list to a %vector. * @param __l An initializer_list. * * This function fills a %vector with copies of the elements in the * initializer list @a __l. * * Note that the assignment completely changes the %vector and * that the resulting %vector's size is the same as the number * of elements assigned. */ void assign(initializer_list<value_type> __l) { this->_M_assign_aux(__l.begin(), __l.end(), random_access_iterator_tag()); } #endif # 797 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 /// Get a copy of the memory allocation object. using _Base::get_allocator; // iterators /** * Returns a read/write iterator that points to the first * element in the %vector. Iteration is done in ordinary * element order. */ iterator begin() _GLIBCXX_NOEXCEPT { return iterator(this->_M_impl._M_start); } /** * Returns a read-only (constant) iterator that points to the * first element in the %vector. Iteration is done in ordinary * element order. */ const_iterator begin() const _GLIBCXX_NOEXCEPT { return const_iterator(this->_M_impl._M_start); } /** * Returns a read/write iterator that points one past the last * element in the %vector. Iteration is done in ordinary * element order. */ iterator end() _GLIBCXX_NOEXCEPT { return iterator(this->_M_impl._M_finish); } /** * Returns a read-only (constant) iterator that points one past * the last element in the %vector. Iteration is done in * ordinary element order. */ const_iterator end() const _GLIBCXX_NOEXCEPT { return const_iterator(this->_M_impl._M_finish); } /** * Returns a read/write reverse iterator that points to the * last element in the %vector. Iteration is done in reverse * element order. */ reverse_iterator rbegin() _GLIBCXX_NOEXCEPT { return reverse_iterator(end()); } /** * Returns a read-only (constant) reverse iterator that points * to the last element in the %vector. Iteration is done in * reverse element order. */ const_reverse_iterator rbegin() const _GLIBCXX_NOEXCEPT { return const_reverse_iterator(end()); } /** * Returns a read/write reverse iterator that points to one * before the first element in the %vector. Iteration is done * in reverse element order. */ reverse_iterator rend() _GLIBCXX_NOEXCEPT { return reverse_iterator(begin()); } /** * Returns a read-only (constant) reverse iterator that points * to one before the first element in the %vector. Iteration * is done in reverse element order. */ const_reverse_iterator rend() const _GLIBCXX_NOEXCEPT { return const_reverse_iterator(begin()); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 875 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 /** * Returns a read-only (constant) iterator that points to the * first element in the %vector. Iteration is done in ordinary * element order. */ const_iterator cbegin() const noexcept { return const_iterator(this->_M_impl._M_start); } /** * Returns a read-only (constant) iterator that points one past * the last element in the %vector. Iteration is done in * ordinary element order. */ const_iterator cend() const noexcept { return const_iterator(this->_M_impl._M_finish); } /** * Returns a read-only (constant) reverse iterator that points * to the last element in the %vector. Iteration is done in * reverse element order. */ const_reverse_iterator crbegin() const noexcept { return const_reverse_iterator(end()); } /** * Returns a read-only (constant) reverse iterator that points * to one before the first element in the %vector. Iteration * is done in reverse element order. */ const_reverse_iterator crend() const noexcept { return const_reverse_iterator(begin()); } #endif # 911 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 // [23.2.4.2] capacity /** Returns the number of elements in the %vector. */ size_type size() const _GLIBCXX_NOEXCEPT { return size_type(this->_M_impl._M_finish - this->_M_impl._M_start); } /** Returns the size() of the largest possible %vector. */ size_type max_size() const _GLIBCXX_NOEXCEPT { return _S_max_size(_M_get_Tp_allocator()); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 924 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 /** * @brief Resizes the %vector to the specified number of elements. * @param __new_size Number of elements the %vector should contain. * * This function will %resize the %vector to the specified * number of elements. If the number is smaller than the * %vector's current size the %vector is truncated, otherwise * default constructed elements are appended. */ void resize(size_type __new_size) { if (__new_size > size()) _M_default_append(__new_size - size()); else if (__new_size < size()) _M_erase_at_end(this->_M_impl._M_start + __new_size); } /** * @brief Resizes the %vector to the specified number of elements. * @param __new_size Number of elements the %vector should contain. * @param __x Data with which new elements should be populated. * * This function will %resize the %vector to the specified * number of elements. If the number is smaller than the * %vector's current size the %vector is truncated, otherwise * the %vector is extended and new elements are populated with * given data. */ void resize(size_type __new_size, const value_type& __x) { if (__new_size > size()) _M_fill_insert(end(), __new_size - size(), __x); else if (__new_size < size()) _M_erase_at_end(this->_M_impl._M_start + __new_size); } #else # 962 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 /** * @brief Resizes the %vector to the specified number of elements. * @param __new_size Number of elements the %vector should contain. * @param __x Data with which new elements should be populated. * * This function will %resize the %vector to the specified * number of elements. If the number is smaller than the * %vector's current size the %vector is truncated, otherwise * the %vector is extended and new elements are populated with * given data. */ void resize(size_type __new_size, value_type __x = value_type()) { if (__new_size > size()) _M_fill_insert(end(), __new_size - size(), __x); else if (__new_size < size()) _M_erase_at_end(this->_M_impl._M_start + __new_size); } #endif # 982 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 984 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 /** A non-binding request to reduce capacity() to size(). */ void shrink_to_fit() { _M_shrink_to_fit(); } #endif # 989 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 /** * Returns the total number of elements that the %vector can * hold before needing to allocate more memory. */ size_type capacity() const _GLIBCXX_NOEXCEPT { return size_type(this->_M_impl._M_end_of_storage - this->_M_impl._M_start); } /** * Returns true if the %vector is empty. (Thus begin() would * equal end().) */ _GLIBCXX_NODISCARD bool empty() const _GLIBCXX_NOEXCEPT { return begin() == end(); } /** * @brief Attempt to preallocate enough memory for specified number of * elements. * @param __n Number of elements required. * @throw std::length_error If @a n exceeds @c max_size(). * * This function attempts to reserve enough memory for the * %vector to hold the specified number of elements. If the * number requested is more than max_size(), length_error is * thrown. * * The advantage of this function is that if optimal code is a * necessity and the user can determine the number of elements * that will be required, the user can reserve the memory in * %advance, and thus prevent a possible reallocation of memory * and copying of %vector data. */ void reserve(size_type __n); // element access /** * @brief Subscript access to the data contained in the %vector. * @param __n The index of the element for which data should be * accessed. * @return Read/write reference to data. * * This operator allows for easy, array-style, data access. * Note that data access with this operator is unchecked and * out_of_range lookups are not defined. (For checked lookups * see at().) */ reference operator[](size_type __n) _GLIBCXX_NOEXCEPT { __glibcxx_requires_subscript(__n); return *(this->_M_impl._M_start + __n); } /** * @brief Subscript access to the data contained in the %vector. * @param __n The index of the element for which data should be * accessed. * @return Read-only (constant) reference to data. * * This operator allows for easy, array-style, data access. * Note that data access with this operator is unchecked and * out_of_range lookups are not defined. (For checked lookups * see at().) */ const_reference operator[](size_type __n) const _GLIBCXX_NOEXCEPT { __glibcxx_requires_subscript(__n); return *(this->_M_impl._M_start + __n); } protected: /// Safety check used only from at(). void _M_range_check(size_type __n) const { if (__n >= this->size()) __throw_out_of_range_fmt(__N("vector::_M_range_check: __n " "(which is %zu) >= this->size() " "(which is %zu)"), __n, this->size()); } public: /** * @brief Provides access to the data contained in the %vector. * @param __n The index of the element for which data should be * accessed. * @return Read/write reference to data. * @throw std::out_of_range If @a __n is an invalid index. * * This function provides for safer data access. The parameter * is first checked that it is in the range of the vector. The * function throws out_of_range if the check fails. */ reference at(size_type __n) { _M_range_check(__n); return (*this)[__n]; } /** * @brief Provides access to the data contained in the %vector. * @param __n The index of the element for which data should be * accessed. * @return Read-only (constant) reference to data. * @throw std::out_of_range If @a __n is an invalid index. * * This function provides for safer data access. The parameter * is first checked that it is in the range of the vector. The * function throws out_of_range if the check fails. */ const_reference at(size_type __n) const { _M_range_check(__n); return (*this)[__n]; } /** * Returns a read/write reference to the data at the first * element of the %vector. */ reference front() _GLIBCXX_NOEXCEPT { __glibcxx_requires_nonempty(); return *begin(); } /** * Returns a read-only (constant) reference to the data at the first * element of the %vector. */ const_reference front() const _GLIBCXX_NOEXCEPT { __glibcxx_requires_nonempty(); return *begin(); } /** * Returns a read/write reference to the data at the last * element of the %vector. */ reference back() _GLIBCXX_NOEXCEPT { __glibcxx_requires_nonempty(); return *(end() - 1); } /** * Returns a read-only (constant) reference to the data at the * last element of the %vector. */ const_reference back() const _GLIBCXX_NOEXCEPT { __glibcxx_requires_nonempty(); return *(end() - 1); } // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR 464. Suggestion for new member functions in standard containers. // data access /** * Returns a pointer such that [data(), data() + size()) is a valid * range. For a non-empty %vector, data() == &front(). */ _Tp* data() _GLIBCXX_NOEXCEPT { return _M_data_ptr(this->_M_impl._M_start); } const _Tp* data() const _GLIBCXX_NOEXCEPT { return _M_data_ptr(this->_M_impl._M_start); } // [23.2.4.3] modifiers /** * @brief Add data to the end of the %vector. * @param __x Data to be added. * * This is a typical stack operation. The function creates an * element at the end of the %vector and assigns the given data * to it. Due to the nature of a %vector this operation can be * done in constant time if the %vector has preallocated space * available. */ void push_back(const value_type& __x) { if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) { _GLIBCXX_ASAN_ANNOTATE_GROW(1); _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, __x); ++this->_M_impl._M_finish; _GLIBCXX_ASAN_ANNOTATE_GREW(1); } else _M_realloc_insert(end(), __x); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1199 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 void push_back(value_type&& __x) { emplace_back(std::move(__x)); } template<typename... _Args> #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201402L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1205 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 reference #else # 1207 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 void #endif # 1209 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 emplace_back(_Args&&... __args); #endif # 1211 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 /** * @brief Removes last element. * * This is a typical stack operation. It shrinks the %vector by one. * * Note that no data is returned, and if the last element's * data is needed, it should be retrieved before pop_back() is * called. */ void pop_back() _GLIBCXX_NOEXCEPT { __glibcxx_requires_nonempty(); --this->_M_impl._M_finish; _Alloc_traits::destroy(this->_M_impl, this->_M_impl._M_finish); _GLIBCXX_ASAN_ANNOTATE_SHRINK(1); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1231 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 /** * @brief Inserts an object in %vector before specified iterator. * @param __position A const_iterator into the %vector. * @param __args Arguments. * @return An iterator that points to the inserted data. * * This function will insert an object of type T constructed * with T(std::forward<Args>(args)...) before the specified location. * Note that this kind of operation could be expensive for a %vector * and if it is frequently used the user should consider using * std::list. */ template<typename... _Args> iterator emplace(const_iterator __position, _Args&&... __args) { return _M_emplace_aux(__position, std::forward<_Args>(__args)...); } /** * @brief Inserts given value into %vector before specified iterator. * @param __position A const_iterator into the %vector. * @param __x Data to be inserted. * @return An iterator that points to the inserted data. * * This function will insert a copy of the given value before * the specified location. Note that this kind of operation * could be expensive for a %vector and if it is frequently * used the user should consider using std::list. */ iterator insert(const_iterator __position, const value_type& __x); #else # 1262 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 /** * @brief Inserts given value into %vector before specified iterator. * @param __position An iterator into the %vector. * @param __x Data to be inserted. * @return An iterator that points to the inserted data. * * This function will insert a copy of the given value before * the specified location. Note that this kind of operation * could be expensive for a %vector and if it is frequently * used the user should consider using std::list. */ iterator insert(iterator __position, const value_type& __x); #endif # 1276 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1278 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 /** * @brief Inserts given rvalue into %vector before specified iterator. * @param __position A const_iterator into the %vector. * @param __x Data to be inserted. * @return An iterator that points to the inserted data. * * This function will insert a copy of the given rvalue before * the specified location. Note that this kind of operation * could be expensive for a %vector and if it is frequently * used the user should consider using std::list. */ iterator insert(const_iterator __position, value_type&& __x) { return _M_insert_rval(__position, std::move(__x)); } /** * @brief Inserts an initializer_list into the %vector. * @param __position An iterator into the %vector. * @param __l An initializer_list. * * This function will insert copies of the data in the * initializer_list @a l into the %vector before the location * specified by @a position. * * Note that this kind of operation could be expensive for a * %vector and if it is frequently used the user should * consider using std::list. */ iterator insert(const_iterator __position, initializer_list<value_type> __l) { auto __offset = __position - cbegin(); _M_range_insert(begin() + __offset, __l.begin(), __l.end(), std::random_access_iterator_tag()); return begin() + __offset; } #endif # 1315 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1317 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 /** * @brief Inserts a number of copies of given data into the %vector. * @param __position A const_iterator into the %vector. * @param __n Number of elements to be inserted. * @param __x Data to be inserted. * @return An iterator that points to the inserted data. * * This function will insert a specified number of copies of * the given data before the location specified by @a position. * * Note that this kind of operation could be expensive for a * %vector and if it is frequently used the user should * consider using std::list. */ iterator insert(const_iterator __position, size_type __n, const value_type& __x) { difference_type __offset = __position - cbegin(); _M_fill_insert(begin() + __offset, __n, __x); return begin() + __offset; } #else # 1339 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 /** * @brief Inserts a number of copies of given data into the %vector. * @param __position An iterator into the %vector. * @param __n Number of elements to be inserted. * @param __x Data to be inserted. * * This function will insert a specified number of copies of * the given data before the location specified by @a position. * * Note that this kind of operation could be expensive for a * %vector and if it is frequently used the user should * consider using std::list. */ void insert(iterator __position, size_type __n, const value_type& __x) { _M_fill_insert(__position, __n, __x); } #endif # 1356 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1358 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 /** * @brief Inserts a range into the %vector. * @param __position A const_iterator into the %vector. * @param __first An input iterator. * @param __last An input iterator. * @return An iterator that points to the inserted data. * * This function will insert copies of the data in the range * [__first,__last) into the %vector before the location specified * by @a pos. * * Note that this kind of operation could be expensive for a * %vector and if it is frequently used the user should * consider using std::list. */ template<typename _InputIterator, typename = std::_RequireInputIter<_InputIterator>> iterator insert(const_iterator __position, _InputIterator __first, _InputIterator __last) { difference_type __offset = __position - cbegin(); _M_insert_dispatch(begin() + __offset, __first, __last, __false_type()); return begin() + __offset; } #else # 1385 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 /** * @brief Inserts a range into the %vector. * @param __position An iterator into the %vector. * @param __first An input iterator. * @param __last An input iterator. * * This function will insert copies of the data in the range * [__first,__last) into the %vector before the location specified * by @a pos. * * Note that this kind of operation could be expensive for a * %vector and if it is frequently used the user should * consider using std::list. */ template<typename _InputIterator> void insert(iterator __position, _InputIterator __first, _InputIterator __last) { // Check whether it's an integral type. If so, it's not an iterator. typedef typename std::__is_integer<_InputIterator>::__type _Integral; _M_insert_dispatch(__position, __first, __last, _Integral()); } #endif # 1409 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 /** * @brief Remove element at given position. * @param __position Iterator pointing to element to be erased. * @return An iterator pointing to the next element (or end()). * * This function will erase the element at the given position and thus * shorten the %vector by one. * * Note This operation could be expensive and if it is * frequently used the user should consider using std::list. * The user is also cautioned that this function only erases * the element, and that if the element is itself a pointer, * the pointed-to memory is not touched in any way. Managing * the pointer is the user's responsibility. */ iterator #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1427 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 erase(const_iterator __position) { return _M_erase(begin() + (__position - cbegin())); } #else # 1430 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 erase(iterator __position) { return _M_erase(__position); } #endif # 1433 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 /** * @brief Remove a range of elements. * @param __first Iterator pointing to the first element to be erased. * @param __last Iterator pointing to one past the last element to be * erased. * @return An iterator pointing to the element pointed to by @a __last * prior to erasing (or end()). * * This function will erase the elements in the range * [__first,__last) and shorten the %vector accordingly. * * Note This operation could be expensive and if it is * frequently used the user should consider using std::list. * The user is also cautioned that this function only erases * the elements, and that if the elements themselves are * pointers, the pointed-to memory is not touched in any way. * Managing the pointer is the user's responsibility. */ iterator #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1454 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 erase(const_iterator __first, const_iterator __last) { const auto __beg = begin(); const auto __cbeg = cbegin(); return _M_erase(__beg + (__first - __cbeg), __beg + (__last - __cbeg)); } #else # 1461 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 erase(iterator __first, iterator __last) { return _M_erase(__first, __last); } #endif # 1464 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 /** * @brief Swaps data with another %vector. * @param __x A %vector of the same element and allocator types. * * This exchanges the elements between two vectors in constant time. * (Three pointers, so it should be quite fast.) * Note that the global std::swap() function is specialized such that * std::swap(v1,v2) will feed to this function. * * Whether the allocators are swapped depends on the allocator traits. */ void swap(vector& __x) _GLIBCXX_NOEXCEPT { #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1480 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 __glibcxx_assert(_Alloc_traits::propagate_on_container_swap::value || _M_get_Tp_allocator() == __x._M_get_Tp_allocator()); #endif # 1483 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 this->_M_impl._M_swap_data(__x._M_impl); _Alloc_traits::_S_on_swap(_M_get_Tp_allocator(), __x._M_get_Tp_allocator()); } /** * Erases all the elements. Note that this function only erases the * elements, and that if the elements themselves are pointers, the * pointed-to memory is not touched in any way. Managing the pointer is * the user's responsibility. */ void clear() _GLIBCXX_NOEXCEPT { _M_erase_at_end(this->_M_impl._M_start); } protected: /** * Memory expansion handler. Uses the member allocation function to * obtain @a n bytes of memory, and then copies [first,last) into it. */ template<typename _ForwardIterator> pointer _M_allocate_and_copy(size_type __n, _ForwardIterator __first, _ForwardIterator __last) { pointer __result = this->_M_allocate(__n); __try { std::__uninitialized_copy_a(__first, __last, __result, _M_get_Tp_allocator()); return __result; } __catch(...) { _M_deallocate(__result, __n); __throw_exception_again; } } // Internal constructor functions follow. // Called by the range constructor to implement [23.1.1]/9 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus < 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1528 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 // _GLIBCXX_RESOLVE_LIB_DEFECTS // 438. Ambiguity in the "do the right thing" clause template<typename _Integer> void _M_initialize_dispatch(_Integer __n, _Integer __value, __true_type) { this->_M_impl._M_start = _M_allocate(_S_check_init_len( static_cast<size_type>(__n), _M_get_Tp_allocator())); this->_M_impl._M_end_of_storage = this->_M_impl._M_start + static_cast<size_type>(__n); _M_fill_initialize(static_cast<size_type>(__n), __value); } // Called by the range constructor to implement [23.1.1]/9 template<typename _InputIterator> void _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, __false_type) { _M_range_initialize(__first, __last, std::__iterator_category(__first)); } #endif # 1551 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 // Called by the second initialize_dispatch above template<typename _InputIterator> void _M_range_initialize(_InputIterator __first, _InputIterator __last, std::input_iterator_tag) { __try { for (; __first != __last; ++__first) #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1561 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 emplace_back(*__first); #else # 1563 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 push_back(*__first); #endif # 1565 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 } __catch(...) { clear(); __throw_exception_again; } } // Called by the second initialize_dispatch above template<typename _ForwardIterator> void _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag) { const size_type __n = std::distance(__first, __last); this->_M_impl._M_start = this->_M_allocate(_S_check_init_len(__n, _M_get_Tp_allocator())); this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; this->_M_impl._M_finish = std::__uninitialized_copy_a(__first, __last, this->_M_impl._M_start, _M_get_Tp_allocator()); } // Called by the first initialize_dispatch above and by the // vector(n,value,a) constructor. void _M_fill_initialize(size_type __n, const value_type& __value) { this->_M_impl._M_finish = std::__uninitialized_fill_n_a(this->_M_impl._M_start, __n, __value, _M_get_Tp_allocator()); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1598 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 // Called by the vector(n) constructor. void _M_default_initialize(size_type __n) { this->_M_impl._M_finish = std::__uninitialized_default_n_a(this->_M_impl._M_start, __n, _M_get_Tp_allocator()); } #endif # 1607 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 // Internal assign functions follow. The *_aux functions do the actual // assignment work for the range versions. // Called by the range assign to implement [23.1.1]/9 // _GLIBCXX_RESOLVE_LIB_DEFECTS // 438. Ambiguity in the "do the right thing" clause template<typename _Integer> void _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) { _M_fill_assign(__n, __val); } // Called by the range assign to implement [23.1.1]/9 template<typename _InputIterator> void _M_assign_dispatch(_InputIterator __first, _InputIterator __last, __false_type) { _M_assign_aux(__first, __last, std::__iterator_category(__first)); } // Called by the second assign_dispatch above template<typename _InputIterator> void _M_assign_aux(_InputIterator __first, _InputIterator __last, std::input_iterator_tag); // Called by the second assign_dispatch above template<typename _ForwardIterator> void _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag); // Called by assign(n,t), and the range assign when it turns out // to be the same thing. void _M_fill_assign(size_type __n, const value_type& __val); // Internal insert functions follow. // Called by the range insert to implement [23.1.1]/9 // _GLIBCXX_RESOLVE_LIB_DEFECTS // 438. Ambiguity in the "do the right thing" clause template<typename _Integer> void _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __val, __true_type) { _M_fill_insert(__pos, __n, __val); } // Called by the range insert to implement [23.1.1]/9 template<typename _InputIterator> void _M_insert_dispatch(iterator __pos, _InputIterator __first, _InputIterator __last, __false_type) { _M_range_insert(__pos, __first, __last, std::__iterator_category(__first)); } // Called by the second insert_dispatch above template<typename _InputIterator> void _M_range_insert(iterator __pos, _InputIterator __first, _InputIterator __last, std::input_iterator_tag); // Called by the second insert_dispatch above template<typename _ForwardIterator> void _M_range_insert(iterator __pos, _ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag); // Called by insert(p,n,x), and the range insert when it turns out to be // the same thing. void _M_fill_insert(iterator __pos, size_type __n, const value_type& __x); #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1684 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 // Called by resize(n). void _M_default_append(size_type __n); bool _M_shrink_to_fit(); #endif # 1691 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus < 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1693 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 // Called by insert(p,x) void _M_insert_aux(iterator __position, const value_type& __x); void _M_realloc_insert(iterator __position, const value_type& __x); #else # 1700 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 // A value_type object constructed with _Alloc_traits::construct() // and destroyed with _Alloc_traits::destroy(). struct _Temporary_value { template<typename... _Args> explicit _Temporary_value(vector* __vec, _Args&&... __args) : _M_this(__vec) { _Alloc_traits::construct(_M_this->_M_impl, _M_ptr(), std::forward<_Args>(__args)...); } ~_Temporary_value() { _Alloc_traits::destroy(_M_this->_M_impl, _M_ptr()); } value_type& _M_val() { return *_M_ptr(); } private: _Tp* _M_ptr() { return reinterpret_cast<_Tp*>(&__buf); } vector* _M_this; typename aligned_storage<sizeof(_Tp), alignof(_Tp)>::type __buf; }; // Called by insert(p,x) and other functions when insertion needs to // reallocate or move existing elements. _Arg is either _Tp& or _Tp. template<typename _Arg> void _M_insert_aux(iterator __position, _Arg&& __arg); template<typename... _Args> void _M_realloc_insert(iterator __position, _Args&&... __args); // Either move-construct at the end, or forward to _M_insert_aux. iterator _M_insert_rval(const_iterator __position, value_type&& __v); // Try to emplace at the end, otherwise forward to _M_insert_aux. template<typename... _Args> iterator _M_emplace_aux(const_iterator __position, _Args&&... __args); // Emplacing an rvalue of the correct type can use _M_insert_rval. iterator _M_emplace_aux(const_iterator __position, value_type&& __v) { return _M_insert_rval(__position, std::move(__v)); } #endif # 1750 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 // Called by _M_fill_insert, _M_insert_aux etc. size_type _M_check_len(size_type __n, const char* __s) const { if (max_size() - size() < __n) __throw_length_error(__N(__s)); const size_type __len = size() + (std::max)(size(), __n); return (__len < size() || __len > max_size()) ? max_size() : __len; } // Called by constructors to check initial size. static size_type _S_check_init_len(size_type __n, const allocator_type& __a) { if (__n > _S_max_size(_Tp_alloc_type(__a))) __throw_length_error( __N("cannot create std::vector larger than max_size()")); return __n; } static size_type _S_max_size(const _Tp_alloc_type& __a) _GLIBCXX_NOEXCEPT { // std::distance(begin(), end()) cannot be greater than PTRDIFF_MAX, // and realistically we can't store more than PTRDIFF_MAX/sizeof(T) // (even if std::allocator_traits::max_size says we can). const size_t __diffmax = __gnu_cxx::__numeric_traits<ptrdiff_t>::__max / sizeof(_Tp); const size_t __allocmax = _Alloc_traits::max_size(__a); return (std::min)(__diffmax, __allocmax); } // Internal erase functions follow. // Called by erase(q1,q2), clear(), resize(), _M_fill_assign, // _M_assign_aux. void _M_erase_at_end(pointer __pos) _GLIBCXX_NOEXCEPT { if (size_type __n = this->_M_impl._M_finish - __pos) { std::_Destroy(__pos, this->_M_impl._M_finish, _M_get_Tp_allocator()); this->_M_impl._M_finish = __pos; _GLIBCXX_ASAN_ANNOTATE_SHRINK(__n); } } iterator _M_erase(iterator __position); iterator _M_erase(iterator __first, iterator __last); #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1807 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 private: // Constant-time move assignment when source object's memory can be // moved, either because the source's allocator will move too // or because the allocators are equal. void _M_move_assign(vector&& __x, true_type) noexcept { vector __tmp(get_allocator()); this->_M_impl._M_swap_data(__x._M_impl); __tmp._M_impl._M_swap_data(__x._M_impl); std::__alloc_on_move(_M_get_Tp_allocator(), __x._M_get_Tp_allocator()); } // Do move assignment when it might not be possible to move source // object's memory, resulting in a linear-time operation. void _M_move_assign(vector&& __x, false_type) { if (__x._M_get_Tp_allocator() == this->_M_get_Tp_allocator()) _M_move_assign(std::move(__x), true_type()); else { // The rvalue's allocator cannot be moved and is not equal, // so we need to individually move each element. this->assign(std::__make_move_if_noexcept_iterator(__x.begin()), std::__make_move_if_noexcept_iterator(__x.end())); __x.clear(); } } #endif # 1837 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 template<typename _Up> _Up* _M_data_ptr(_Up* __ptr) const _GLIBCXX_NOEXCEPT { return __ptr; } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1844 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 template<typename _Ptr> typename std::pointer_traits<_Ptr>::element_type* _M_data_ptr(_Ptr __ptr) const { return empty() ? nullptr : std::__to_address(__ptr); } #else # 1849 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 template<typename _Up> _Up* _M_data_ptr(_Up* __ptr) _GLIBCXX_NOEXCEPT { return __ptr; } template<typename _Ptr> value_type* _M_data_ptr(_Ptr __ptr) { return empty() ? (value_type*)0 : __ptr.operator->(); } template<typename _Ptr> const value_type* _M_data_ptr(_Ptr __ptr) const { return empty() ? (const value_type*)0 : __ptr.operator->(); } #endif # 1864 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 }; #if 0 /* disabled by -frewrite-includes */ #if __cpp_deduction_guides >= 201606 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1867 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 template<typename _InputIterator, typename _ValT = typename iterator_traits<_InputIterator>::value_type, typename _Allocator = allocator<_ValT>, typename = _RequireInputIter<_InputIterator>, typename = _RequireAllocator<_Allocator>> vector(_InputIterator, _InputIterator, _Allocator = _Allocator()) -> vector<_ValT, _Allocator>; #endif # 1875 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 /** * @brief Vector equality comparison. * @param __x A %vector. * @param __y A %vector of the same type as @a __x. * @return True iff the size and elements of the vectors are equal. * * This is an equivalence relation. It is linear in the size of the * vectors. Vectors are considered equivalent if their sizes are equal, * and if corresponding elements compare equal. */ template<typename _Tp, typename _Alloc> inline bool operator==(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) { return (__x.size() == __y.size() && std::equal(__x.begin(), __x.end(), __y.begin())); } /** * @brief Vector ordering relation. * @param __x A %vector. * @param __y A %vector of the same type as @a __x. * @return True iff @a __x is lexicographically less than @a __y. * * This is a total ordering relation. It is linear in the size of the * vectors. The elements must be comparable with @c <. * * See std::lexicographical_compare() for how the determination is made. */ template<typename _Tp, typename _Alloc> inline bool operator<(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) { return std::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end()); } /// Based on operator== template<typename _Tp, typename _Alloc> inline bool operator!=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) { return !(__x == __y); } /// Based on operator< template<typename _Tp, typename _Alloc> inline bool operator>(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) { return __y < __x; } /// Based on operator< template<typename _Tp, typename _Alloc> inline bool operator<=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) { return !(__y < __x); } /// Based on operator< template<typename _Tp, typename _Alloc> inline bool operator>=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) { return !(__x < __y); } /// See std::vector::swap(). template<typename _Tp, typename _Alloc> inline void swap(vector<_Tp, _Alloc>& __x, vector<_Tp, _Alloc>& __y) _GLIBCXX_NOEXCEPT_IF(noexcept(__x.swap(__y))) { __x.swap(__y); } _GLIBCXX_END_NAMESPACE_CONTAINER #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1943 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 namespace __detail::__variant { template<typename> struct _Never_valueless_alt; // see <variant> // Provide the strong exception-safety guarantee when emplacing a // vector into a variant, but only if move assignment cannot throw. template<typename _Tp, typename _Alloc> struct _Never_valueless_alt<_GLIBCXX_STD_C::vector<_Tp, _Alloc>> : std::is_nothrow_move_assignable<_GLIBCXX_STD_C::vector<_Tp, _Alloc>> { }; } // namespace __detail::__variant #endif // C++17 # 1955 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 _GLIBCXX_END_NAMESPACE_VERSION } // namespace std #endif /* _STL_VECTOR_H */ # 1960 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h" 3 # 68 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/vector" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/stl_bvector.h> #endif /* expanded by -frewrite-includes */ # 68 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/vector" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 1 3 // vector<bool> specialization -*- C++ -*- // Copyright (C) 2001-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /* * * Copyright (c) 1994 * Hewlett-Packard Company * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Hewlett-Packard Company makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. * * * Copyright (c) 1996-1999 * Silicon Graphics Computer Systems, Inc. * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Silicon Graphics makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. */ /** @file bits/stl_bvector.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{vector} */ #ifndef _STL_BVECTOR_H #define _STL_BVECTOR_H 1 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 60 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <initializer_list> #endif /* expanded by -frewrite-includes */ # 60 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 # 61 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/functional_hash.h> #endif /* expanded by -frewrite-includes */ # 61 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/functional_hash.h" 1 3 // functional_hash.h header -*- C++ -*- // Copyright (C) 2007-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file bits/functional_hash.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{functional} */ #ifndef _FUNCTIONAL_HASH_H #define _FUNCTIONAL_HASH_H 1 #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 34 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/functional_hash.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/hash_bytes.h> #endif /* expanded by -frewrite-includes */ # 35 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/functional_hash.h" 3 # 36 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/functional_hash.h" 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION /** @defgroup hashes Hashes * @ingroup functors * * Hashing functors taking a variable type and returning a @c std::size_t. * * @{ */ template<typename _Result, typename _Arg> struct __hash_base { typedef _Result result_type _GLIBCXX17_DEPRECATED; typedef _Arg argument_type _GLIBCXX17_DEPRECATED; }; /// Primary class template hash. template<typename _Tp> struct hash; template<typename _Tp, typename = void> struct __poison_hash { static constexpr bool __enable_hash_call = false; private: // Private rather than deleted to be non-trivially-copyable. __poison_hash(__poison_hash&&); ~__poison_hash(); }; template<typename _Tp> struct __poison_hash<_Tp, __void_t<decltype(hash<_Tp>()(declval<_Tp>()))>> { static constexpr bool __enable_hash_call = true; }; // Helper struct for SFINAE-poisoning non-enum types. template<typename _Tp, bool = is_enum<_Tp>::value> struct __hash_enum { private: // Private rather than deleted to be non-trivially-copyable. __hash_enum(__hash_enum&&); ~__hash_enum(); }; // Helper struct for hash with enum types. template<typename _Tp> struct __hash_enum<_Tp, true> : public __hash_base<size_t, _Tp> { size_t operator()(_Tp __val) const noexcept { using __type = typename underlying_type<_Tp>::type; return hash<__type>{}(static_cast<__type>(__val)); } }; /// Primary class template hash, usable for enum types only. // Use with non-enum types still SFINAES. template<typename _Tp> struct hash : __hash_enum<_Tp> { }; /// Partial specializations for pointer types. template<typename _Tp> struct hash<_Tp*> : public __hash_base<size_t, _Tp*> { size_t operator()(_Tp* __p) const noexcept { return reinterpret_cast<size_t>(__p); } }; // Explicit specializations for integer types. #define _Cxx_hashtable_define_trivial_hash(_Tp) \ template<> \ struct hash<_Tp> : public __hash_base<size_t, _Tp> \ { \ size_t \ operator()(_Tp __val) const noexcept \ { return static_cast<size_t>(__val); } \ }; /// Explicit specialization for bool. _Cxx_hashtable_define_trivial_hash(bool) /// Explicit specialization for char. _Cxx_hashtable_define_trivial_hash(char) /// Explicit specialization for signed char. _Cxx_hashtable_define_trivial_hash(signed char) /// Explicit specialization for unsigned char. _Cxx_hashtable_define_trivial_hash(unsigned char) /// Explicit specialization for wchar_t. _Cxx_hashtable_define_trivial_hash(wchar_t) #ifdef _GLIBCXX_USE_CHAR8_T /// Explicit specialization for char8_t. _Cxx_hashtable_define_trivial_hash(char8_t) #endif # 142 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/functional_hash.h" 3 /// Explicit specialization for char16_t. _Cxx_hashtable_define_trivial_hash(char16_t) /// Explicit specialization for char32_t. _Cxx_hashtable_define_trivial_hash(char32_t) /// Explicit specialization for short. _Cxx_hashtable_define_trivial_hash(short) /// Explicit specialization for int. _Cxx_hashtable_define_trivial_hash(int) /// Explicit specialization for long. _Cxx_hashtable_define_trivial_hash(long) /// Explicit specialization for long long. _Cxx_hashtable_define_trivial_hash(long long) /// Explicit specialization for unsigned short. _Cxx_hashtable_define_trivial_hash(unsigned short) /// Explicit specialization for unsigned int. _Cxx_hashtable_define_trivial_hash(unsigned int) /// Explicit specialization for unsigned long. _Cxx_hashtable_define_trivial_hash(unsigned long) /// Explicit specialization for unsigned long long. _Cxx_hashtable_define_trivial_hash(unsigned long long) #ifdef __GLIBCXX_TYPE_INT_N_0 _Cxx_hashtable_define_trivial_hash(__GLIBCXX_TYPE_INT_N_0) _Cxx_hashtable_define_trivial_hash(__GLIBCXX_TYPE_INT_N_0 unsigned) #endif # 177 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/functional_hash.h" 3 #ifdef __GLIBCXX_TYPE_INT_N_1 _Cxx_hashtable_define_trivial_hash(__GLIBCXX_TYPE_INT_N_1) _Cxx_hashtable_define_trivial_hash(__GLIBCXX_TYPE_INT_N_1 unsigned) #endif # 181 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/functional_hash.h" 3 #ifdef __GLIBCXX_TYPE_INT_N_2 _Cxx_hashtable_define_trivial_hash(__GLIBCXX_TYPE_INT_N_2) _Cxx_hashtable_define_trivial_hash(__GLIBCXX_TYPE_INT_N_2 unsigned) #endif # 185 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/functional_hash.h" 3 #ifdef __GLIBCXX_TYPE_INT_N_3 _Cxx_hashtable_define_trivial_hash(__GLIBCXX_TYPE_INT_N_3) _Cxx_hashtable_define_trivial_hash(__GLIBCXX_TYPE_INT_N_3 unsigned) #endif # 189 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/functional_hash.h" 3 #undef _Cxx_hashtable_define_trivial_hash struct _Hash_impl { static size_t hash(const void* __ptr, size_t __clength, size_t __seed = static_cast<size_t>(0xc70f6907UL)) { return _Hash_bytes(__ptr, __clength, __seed); } template<typename _Tp> static size_t hash(const _Tp& __val) { return hash(&__val, sizeof(__val)); } template<typename _Tp> static size_t __hash_combine(const _Tp& __val, size_t __hash) { return hash(&__val, sizeof(__val), __hash); } }; // A hash function similar to FNV-1a (see PR59406 for how it differs). struct _Fnv_hash_impl { static size_t hash(const void* __ptr, size_t __clength, size_t __seed = static_cast<size_t>(2166136261UL)) { return _Fnv_hash_bytes(__ptr, __clength, __seed); } template<typename _Tp> static size_t hash(const _Tp& __val) { return hash(&__val, sizeof(__val)); } template<typename _Tp> static size_t __hash_combine(const _Tp& __val, size_t __hash) { return hash(&__val, sizeof(__val), __hash); } }; /// Specialization for float. template<> struct hash<float> : public __hash_base<size_t, float> { size_t operator()(float __val) const noexcept { // 0 and -0 both hash to zero. return __val != 0.0f ? std::_Hash_impl::hash(__val) : 0; } }; /// Specialization for double. template<> struct hash<double> : public __hash_base<size_t, double> { size_t operator()(double __val) const noexcept { // 0 and -0 both hash to zero. return __val != 0.0 ? std::_Hash_impl::hash(__val) : 0; } }; /// Specialization for long double. template<> struct hash<long double> : public __hash_base<size_t, long double> { _GLIBCXX_PURE size_t operator()(long double __val) const noexcept; }; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 263 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/functional_hash.h" 3 template<> struct hash<nullptr_t> : public __hash_base<size_t, nullptr_t> { size_t operator()(nullptr_t) const noexcept { return 0; } }; #endif # 271 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/functional_hash.h" 3 /// @} group hashes // Hint about performance of hash functor. If not fast the hash-based // containers will cache the hash code. // Default behavior is to consider that hashers are fast unless specified // otherwise. template<typename _Hash> struct __is_fast_hash : public std::true_type { }; template<> struct __is_fast_hash<hash<long double>> : public std::false_type { }; _GLIBCXX_END_NAMESPACE_VERSION } // namespace #endif // _FUNCTIONAL_HASH_H # 290 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/functional_hash.h" 3 # 62 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 2 3 #endif # 63 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_BEGIN_NAMESPACE_CONTAINER typedef unsigned long _Bit_type; enum { _S_word_bit = int(__CHAR_BIT__ * sizeof(_Bit_type)) }; struct _Bit_reference { _Bit_type * _M_p; _Bit_type _M_mask; _Bit_reference(_Bit_type * __x, _Bit_type __y) : _M_p(__x), _M_mask(__y) { } _Bit_reference() _GLIBCXX_NOEXCEPT : _M_p(0), _M_mask(0) { } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 83 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 _Bit_reference(const _Bit_reference&) = default; #endif # 85 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 operator bool() const _GLIBCXX_NOEXCEPT { return !!(*_M_p & _M_mask); } _Bit_reference& operator=(bool __x) _GLIBCXX_NOEXCEPT { if (__x) *_M_p |= _M_mask; else *_M_p &= ~_M_mask; return *this; } _Bit_reference& operator=(const _Bit_reference& __x) _GLIBCXX_NOEXCEPT { return *this = bool(__x); } bool operator==(const _Bit_reference& __x) const { return bool(*this) == bool(__x); } bool operator<(const _Bit_reference& __x) const { return !bool(*this) && bool(__x); } void flip() _GLIBCXX_NOEXCEPT { *_M_p ^= _M_mask; } }; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 117 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 inline void swap(_Bit_reference __x, _Bit_reference __y) noexcept { bool __tmp = __x; __x = __y; __y = __tmp; } inline void swap(_Bit_reference __x, bool& __y) noexcept { bool __tmp = __x; __x = __y; __y = __tmp; } inline void swap(bool& __x, _Bit_reference __y) noexcept { bool __tmp = __x; __x = __y; __y = __tmp; } #endif # 141 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 struct _Bit_iterator_base : public std::iterator<std::random_access_iterator_tag, bool> { _Bit_type * _M_p; unsigned int _M_offset; _Bit_iterator_base(_Bit_type * __x, unsigned int __y) : _M_p(__x), _M_offset(__y) { } void _M_bump_up() { if (_M_offset++ == int(_S_word_bit) - 1) { _M_offset = 0; ++_M_p; } } void _M_bump_down() { if (_M_offset-- == 0) { _M_offset = int(_S_word_bit) - 1; --_M_p; } } void _M_incr(ptrdiff_t __i) { difference_type __n = __i + _M_offset; _M_p += __n / int(_S_word_bit); __n = __n % int(_S_word_bit); if (__n < 0) { __n += int(_S_word_bit); --_M_p; } _M_offset = static_cast<unsigned int>(__n); } bool operator==(const _Bit_iterator_base& __i) const { return _M_p == __i._M_p && _M_offset == __i._M_offset; } bool operator<(const _Bit_iterator_base& __i) const { return _M_p < __i._M_p || (_M_p == __i._M_p && _M_offset < __i._M_offset); } bool operator!=(const _Bit_iterator_base& __i) const { return !(*this == __i); } bool operator>(const _Bit_iterator_base& __i) const { return __i < *this; } bool operator<=(const _Bit_iterator_base& __i) const { return !(__i < *this); } bool operator>=(const _Bit_iterator_base& __i) const { return !(*this < __i); } }; inline ptrdiff_t operator-(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) { return (int(_S_word_bit) * (__x._M_p - __y._M_p) + __x._M_offset - __y._M_offset); } struct _Bit_iterator : public _Bit_iterator_base { typedef _Bit_reference reference; typedef _Bit_reference* pointer; typedef _Bit_iterator iterator; _Bit_iterator() : _Bit_iterator_base(0, 0) { } _Bit_iterator(_Bit_type * __x, unsigned int __y) : _Bit_iterator_base(__x, __y) { } iterator _M_const_cast() const { return *this; } reference operator*() const { return reference(_M_p, 1UL << _M_offset); } iterator& operator++() { _M_bump_up(); return *this; } iterator operator++(int) { iterator __tmp = *this; _M_bump_up(); return __tmp; } iterator& operator--() { _M_bump_down(); return *this; } iterator operator--(int) { iterator __tmp = *this; _M_bump_down(); return __tmp; } iterator& operator+=(difference_type __i) { _M_incr(__i); return *this; } iterator& operator-=(difference_type __i) { *this += -__i; return *this; } iterator operator+(difference_type __i) const { iterator __tmp = *this; return __tmp += __i; } iterator operator-(difference_type __i) const { iterator __tmp = *this; return __tmp -= __i; } reference operator[](difference_type __i) const { return *(*this + __i); } }; inline _Bit_iterator operator+(ptrdiff_t __n, const _Bit_iterator& __x) { return __x + __n; } struct _Bit_const_iterator : public _Bit_iterator_base { typedef bool reference; typedef bool const_reference; typedef const bool* pointer; typedef _Bit_const_iterator const_iterator; _Bit_const_iterator() : _Bit_iterator_base(0, 0) { } _Bit_const_iterator(_Bit_type * __x, unsigned int __y) : _Bit_iterator_base(__x, __y) { } _Bit_const_iterator(const _Bit_iterator& __x) : _Bit_iterator_base(__x._M_p, __x._M_offset) { } _Bit_iterator _M_const_cast() const { return _Bit_iterator(_M_p, _M_offset); } const_reference operator*() const { return _Bit_reference(_M_p, 1UL << _M_offset); } const_iterator& operator++() { _M_bump_up(); return *this; } const_iterator operator++(int) { const_iterator __tmp = *this; _M_bump_up(); return __tmp; } const_iterator& operator--() { _M_bump_down(); return *this; } const_iterator operator--(int) { const_iterator __tmp = *this; _M_bump_down(); return __tmp; } const_iterator& operator+=(difference_type __i) { _M_incr(__i); return *this; } const_iterator& operator-=(difference_type __i) { *this += -__i; return *this; } const_iterator operator+(difference_type __i) const { const_iterator __tmp = *this; return __tmp += __i; } const_iterator operator-(difference_type __i) const { const_iterator __tmp = *this; return __tmp -= __i; } const_reference operator[](difference_type __i) const { return *(*this + __i); } }; inline _Bit_const_iterator operator+(ptrdiff_t __n, const _Bit_const_iterator& __x) { return __x + __n; } inline void __fill_bvector(_Bit_type * __v, unsigned int __first, unsigned int __last, bool __x) { const _Bit_type __fmask = ~0ul << __first; const _Bit_type __lmask = ~0ul >> (_S_word_bit - __last); const _Bit_type __mask = __fmask & __lmask; if (__x) *__v |= __mask; else *__v &= ~__mask; } inline void fill(_Bit_iterator __first, _Bit_iterator __last, const bool& __x) { if (__first._M_p != __last._M_p) { _Bit_type* __first_p = __first._M_p; if (__first._M_offset != 0) __fill_bvector(__first_p++, __first._M_offset, _S_word_bit, __x); __builtin_memset(__first_p, __x ? ~0 : 0, (__last._M_p - __first_p) * sizeof(_Bit_type)); if (__last._M_offset != 0) __fill_bvector(__last._M_p, 0, __last._M_offset, __x); } else if (__first._M_offset != __last._M_offset) __fill_bvector(__first._M_p, __first._M_offset, __last._M_offset, __x); } template<typename _Alloc> struct _Bvector_base { typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template rebind<_Bit_type>::other _Bit_alloc_type; typedef typename __gnu_cxx::__alloc_traits<_Bit_alloc_type> _Bit_alloc_traits; typedef typename _Bit_alloc_traits::pointer _Bit_pointer; struct _Bvector_impl_data { _Bit_iterator _M_start; _Bit_iterator _M_finish; _Bit_pointer _M_end_of_storage; _Bvector_impl_data() _GLIBCXX_NOEXCEPT : _M_start(), _M_finish(), _M_end_of_storage() { } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 449 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 _Bvector_impl_data(_Bvector_impl_data&& __x) noexcept : _M_start(__x._M_start), _M_finish(__x._M_finish) , _M_end_of_storage(__x._M_end_of_storage) { __x._M_reset(); } void _M_move_data(_Bvector_impl_data&& __x) noexcept { this->_M_start = __x._M_start; this->_M_finish = __x._M_finish; this->_M_end_of_storage = __x._M_end_of_storage; __x._M_reset(); } #endif # 463 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 void _M_reset() _GLIBCXX_NOEXCEPT { _M_start = _M_finish = _Bit_iterator(); _M_end_of_storage = _Bit_pointer(); } }; struct _Bvector_impl : public _Bit_alloc_type, public _Bvector_impl_data { public: _Bvector_impl() _GLIBCXX_NOEXCEPT_IF( is_nothrow_default_constructible<_Bit_alloc_type>::value) : _Bit_alloc_type() { } _Bvector_impl(const _Bit_alloc_type& __a) _GLIBCXX_NOEXCEPT : _Bit_alloc_type(__a) { } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 486 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 _Bvector_impl(_Bvector_impl&&) = default; #endif # 488 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 _Bit_type* _M_end_addr() const _GLIBCXX_NOEXCEPT { if (this->_M_end_of_storage) return std::__addressof(this->_M_end_of_storage[-1]) + 1; return 0; } }; public: typedef _Alloc allocator_type; _Bit_alloc_type& _M_get_Bit_allocator() _GLIBCXX_NOEXCEPT { return this->_M_impl; } const _Bit_alloc_type& _M_get_Bit_allocator() const _GLIBCXX_NOEXCEPT { return this->_M_impl; } allocator_type get_allocator() const _GLIBCXX_NOEXCEPT { return allocator_type(_M_get_Bit_allocator()); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 514 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 _Bvector_base() = default; #else # 516 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 _Bvector_base() { } #endif # 518 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 _Bvector_base(const allocator_type& __a) : _M_impl(__a) { } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 523 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 _Bvector_base(_Bvector_base&&) = default; #endif # 525 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 ~_Bvector_base() { this->_M_deallocate(); } protected: _Bvector_impl _M_impl; _Bit_pointer _M_allocate(size_t __n) { return _Bit_alloc_traits::allocate(_M_impl, _S_nword(__n)); } void _M_deallocate() { if (_M_impl._M_start._M_p) { const size_t __n = _M_impl._M_end_addr() - _M_impl._M_start._M_p; _Bit_alloc_traits::deallocate(_M_impl, _M_impl._M_end_of_storage - __n, __n); _M_impl._M_reset(); } } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 550 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 void _M_move_data(_Bvector_base&& __x) noexcept { _M_impl._M_move_data(std::move(__x._M_impl)); } #endif # 554 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 static size_t _S_nword(size_t __n) { return (__n + int(_S_word_bit) - 1) / int(_S_word_bit); } }; _GLIBCXX_END_NAMESPACE_CONTAINER _GLIBCXX_END_NAMESPACE_VERSION } // namespace std // Declare a partial specialization of vector<T, Alloc>. #if 0 /* expanded by -frewrite-includes */ #include <bits/stl_vector.h> #endif /* expanded by -frewrite-includes */ # 565 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 # 566 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_BEGIN_NAMESPACE_CONTAINER /** * @brief A specialization of vector for booleans which offers fixed time * access to individual elements in any order. * * @ingroup sequences * * @tparam _Alloc Allocator type. * * Note that vector<bool> does not actually meet the requirements for being * a container. This is because the reference and pointer types are not * really references and pointers to bool. See DR96 for details. @see * vector for function documentation. * * In some terminology a %vector can be described as a dynamic * C-style array, it offers fast and efficient access to individual * elements in any order and saves the user from worrying about * memory and size allocation. Subscripting ( @c [] ) access is * also provided as with C-style arrays. */ template<typename _Alloc> class vector<bool, _Alloc> : protected _Bvector_base<_Alloc> { typedef _Bvector_base<_Alloc> _Base; typedef typename _Base::_Bit_pointer _Bit_pointer; typedef typename _Base::_Bit_alloc_traits _Bit_alloc_traits; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 599 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 friend struct std::hash<vector>; #endif # 601 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 public: typedef bool value_type; typedef size_t size_type; typedef ptrdiff_t difference_type; typedef _Bit_reference reference; typedef bool const_reference; typedef _Bit_reference* pointer; typedef const bool* const_pointer; typedef _Bit_iterator iterator; typedef _Bit_const_iterator const_iterator; typedef std::reverse_iterator<const_iterator> const_reverse_iterator; typedef std::reverse_iterator<iterator> reverse_iterator; typedef _Alloc allocator_type; allocator_type get_allocator() const { return _Base::get_allocator(); } protected: using _Base::_M_allocate; using _Base::_M_deallocate; using _Base::_S_nword; using _Base::_M_get_Bit_allocator; public: #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 628 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 vector() = default; #else # 630 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 vector() { } #endif # 632 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 explicit vector(const allocator_type& __a) : _Base(__a) { } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 638 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 explicit vector(size_type __n, const allocator_type& __a = allocator_type()) : vector(__n, false, __a) { } vector(size_type __n, const bool& __value, const allocator_type& __a = allocator_type()) #else # 646 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 explicit vector(size_type __n, const bool& __value = bool(), const allocator_type& __a = allocator_type()) #endif # 650 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 : _Base(__a) { _M_initialize(__n); _M_initialize_value(__value); } vector(const vector& __x) : _Base(_Bit_alloc_traits::_S_select_on_copy(__x._M_get_Bit_allocator())) { _M_initialize(__x.size()); _M_copy_aligned(__x.begin(), __x.end(), this->_M_impl._M_start); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 664 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 vector(vector&&) = default; vector(vector&& __x, const allocator_type& __a) noexcept(_Bit_alloc_traits::_S_always_equal()) : _Base(__a) { if (__x.get_allocator() == __a) this->_M_move_data(std::move(__x)); else { _M_initialize(__x.size()); _M_copy_aligned(__x.begin(), __x.end(), begin()); __x.clear(); } } vector(const vector& __x, const allocator_type& __a) : _Base(__a) { _M_initialize(__x.size()); _M_copy_aligned(__x.begin(), __x.end(), this->_M_impl._M_start); } vector(initializer_list<bool> __l, const allocator_type& __a = allocator_type()) : _Base(__a) { _M_initialize_range(__l.begin(), __l.end(), random_access_iterator_tag()); } #endif # 695 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 697 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 template<typename _InputIterator, typename = std::_RequireInputIter<_InputIterator>> vector(_InputIterator __first, _InputIterator __last, const allocator_type& __a = allocator_type()) : _Base(__a) { _M_initialize_dispatch(__first, __last, __false_type()); } #else # 704 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 template<typename _InputIterator> vector(_InputIterator __first, _InputIterator __last, const allocator_type& __a = allocator_type()) : _Base(__a) { typedef typename std::__is_integer<_InputIterator>::__type _Integral; _M_initialize_dispatch(__first, __last, _Integral()); } #endif # 713 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 ~vector() _GLIBCXX_NOEXCEPT { } vector& operator=(const vector& __x) { if (&__x == this) return *this; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 722 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 if (_Bit_alloc_traits::_S_propagate_on_copy_assign()) { if (this->_M_get_Bit_allocator() != __x._M_get_Bit_allocator()) { this->_M_deallocate(); std::__alloc_on_copy(_M_get_Bit_allocator(), __x._M_get_Bit_allocator()); _M_initialize(__x.size()); } else std::__alloc_on_copy(_M_get_Bit_allocator(), __x._M_get_Bit_allocator()); } #endif # 736 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 if (__x.size() > capacity()) { this->_M_deallocate(); _M_initialize(__x.size()); } this->_M_impl._M_finish = _M_copy_aligned(__x.begin(), __x.end(), begin()); return *this; } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 747 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 vector& operator=(vector&& __x) noexcept(_Bit_alloc_traits::_S_nothrow_move()) { if (_Bit_alloc_traits::_S_propagate_on_move_assign() || this->_M_get_Bit_allocator() == __x._M_get_Bit_allocator()) { this->_M_deallocate(); this->_M_move_data(std::move(__x)); std::__alloc_on_move(_M_get_Bit_allocator(), __x._M_get_Bit_allocator()); } else { if (__x.size() > capacity()) { this->_M_deallocate(); _M_initialize(__x.size()); } this->_M_impl._M_finish = _M_copy_aligned(__x.begin(), __x.end(), begin()); __x.clear(); } return *this; } vector& operator=(initializer_list<bool> __l) { this->assign (__l.begin(), __l.end()); return *this; } #endif # 779 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 // assign(), a generalized assignment member function. Two // versions: one that takes a count, and one that takes a range. // The range version is a member template, so we dispatch on whether // or not the type is an integer. void assign(size_type __n, const bool& __x) { _M_fill_assign(__n, __x); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 789 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 template<typename _InputIterator, typename = std::_RequireInputIter<_InputIterator>> void assign(_InputIterator __first, _InputIterator __last) { _M_assign_aux(__first, __last, std::__iterator_category(__first)); } #else # 795 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 template<typename _InputIterator> void assign(_InputIterator __first, _InputIterator __last) { typedef typename std::__is_integer<_InputIterator>::__type _Integral; _M_assign_dispatch(__first, __last, _Integral()); } #endif # 803 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 805 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 void assign(initializer_list<bool> __l) { _M_assign_aux(__l.begin(), __l.end(), random_access_iterator_tag()); } #endif # 809 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 iterator begin() _GLIBCXX_NOEXCEPT { return iterator(this->_M_impl._M_start._M_p, 0); } const_iterator begin() const _GLIBCXX_NOEXCEPT { return const_iterator(this->_M_impl._M_start._M_p, 0); } iterator end() _GLIBCXX_NOEXCEPT { return this->_M_impl._M_finish; } const_iterator end() const _GLIBCXX_NOEXCEPT { return this->_M_impl._M_finish; } reverse_iterator rbegin() _GLIBCXX_NOEXCEPT { return reverse_iterator(end()); } const_reverse_iterator rbegin() const _GLIBCXX_NOEXCEPT { return const_reverse_iterator(end()); } reverse_iterator rend() _GLIBCXX_NOEXCEPT { return reverse_iterator(begin()); } const_reverse_iterator rend() const _GLIBCXX_NOEXCEPT { return const_reverse_iterator(begin()); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 843 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 const_iterator cbegin() const noexcept { return const_iterator(this->_M_impl._M_start._M_p, 0); } const_iterator cend() const noexcept { return this->_M_impl._M_finish; } const_reverse_iterator crbegin() const noexcept { return const_reverse_iterator(end()); } const_reverse_iterator crend() const noexcept { return const_reverse_iterator(begin()); } #endif # 859 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 size_type size() const _GLIBCXX_NOEXCEPT { return size_type(end() - begin()); } size_type max_size() const _GLIBCXX_NOEXCEPT { const size_type __isize = __gnu_cxx::__numeric_traits<difference_type>::__max - int(_S_word_bit) + 1; const size_type __asize = _Bit_alloc_traits::max_size(_M_get_Bit_allocator()); return (__asize <= __isize / int(_S_word_bit) ? __asize * int(_S_word_bit) : __isize); } size_type capacity() const _GLIBCXX_NOEXCEPT { return size_type(const_iterator(this->_M_impl._M_end_addr(), 0) - begin()); } bool empty() const _GLIBCXX_NOEXCEPT { return begin() == end(); } reference operator[](size_type __n) { return *iterator(this->_M_impl._M_start._M_p + __n / int(_S_word_bit), __n % int(_S_word_bit)); } const_reference operator[](size_type __n) const { return *const_iterator(this->_M_impl._M_start._M_p + __n / int(_S_word_bit), __n % int(_S_word_bit)); } protected: void _M_range_check(size_type __n) const { if (__n >= this->size()) __throw_out_of_range_fmt(__N("vector<bool>::_M_range_check: __n " "(which is %zu) >= this->size() " "(which is %zu)"), __n, this->size()); } public: reference at(size_type __n) { _M_range_check(__n); return (*this)[__n]; } const_reference at(size_type __n) const { _M_range_check(__n); return (*this)[__n]; } void reserve(size_type __n) { if (__n > max_size()) __throw_length_error(__N("vector::reserve")); if (capacity() < __n) _M_reallocate(__n); } reference front() { return *begin(); } const_reference front() const { return *begin(); } reference back() { return *(end() - 1); } const_reference back() const { return *(end() - 1); } // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR 464. Suggestion for new member functions in standard containers. // N.B. DR 464 says nothing about vector<bool> but we need something // here due to the way we are implementing DR 464 in the debug-mode // vector class. void data() _GLIBCXX_NOEXCEPT { } void push_back(bool __x) { if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_addr()) *this->_M_impl._M_finish++ = __x; else _M_insert_aux(end(), __x); } void swap(vector& __x) _GLIBCXX_NOEXCEPT { std::swap(this->_M_impl._M_start, __x._M_impl._M_start); std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish); std::swap(this->_M_impl._M_end_of_storage, __x._M_impl._M_end_of_storage); _Bit_alloc_traits::_S_on_swap(_M_get_Bit_allocator(), __x._M_get_Bit_allocator()); } // [23.2.5]/1, third-to-last entry in synopsis listing static void swap(reference __x, reference __y) _GLIBCXX_NOEXCEPT { bool __tmp = __x; __x = __y; __y = __tmp; } iterator #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 983 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 insert(const_iterator __position, const bool& __x = bool()) #else # 985 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 insert(iterator __position, const bool& __x = bool()) #endif # 987 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 { const difference_type __n = __position - begin(); if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_addr() && __position == end()) *this->_M_impl._M_finish++ = __x; else _M_insert_aux(__position._M_const_cast(), __x); return begin() + __n; } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 998 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 template<typename _InputIterator, typename = std::_RequireInputIter<_InputIterator>> iterator insert(const_iterator __position, _InputIterator __first, _InputIterator __last) { difference_type __offset = __position - cbegin(); _M_insert_dispatch(__position._M_const_cast(), __first, __last, __false_type()); return begin() + __offset; } #else # 1010 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 template<typename _InputIterator> void insert(iterator __position, _InputIterator __first, _InputIterator __last) { typedef typename std::__is_integer<_InputIterator>::__type _Integral; _M_insert_dispatch(__position, __first, __last, _Integral()); } #endif # 1019 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1021 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 iterator insert(const_iterator __position, size_type __n, const bool& __x) { difference_type __offset = __position - cbegin(); _M_fill_insert(__position._M_const_cast(), __n, __x); return begin() + __offset; } #else # 1029 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 void insert(iterator __position, size_type __n, const bool& __x) { _M_fill_insert(__position, __n, __x); } #endif # 1033 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1035 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 iterator insert(const_iterator __p, initializer_list<bool> __l) { return this->insert(__p, __l.begin(), __l.end()); } #endif # 1039 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 void pop_back() { --this->_M_impl._M_finish; } iterator #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1046 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 erase(const_iterator __position) #else # 1048 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 erase(iterator __position) #endif # 1050 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 { return _M_erase(__position._M_const_cast()); } iterator #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1054 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 erase(const_iterator __first, const_iterator __last) #else # 1056 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 erase(iterator __first, iterator __last) #endif # 1058 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 { return _M_erase(__first._M_const_cast(), __last._M_const_cast()); } void resize(size_type __new_size, bool __x = bool()) { if (__new_size < size()) _M_erase_at_end(begin() + difference_type(__new_size)); else insert(end(), __new_size - size(), __x); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1070 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 void shrink_to_fit() { _M_shrink_to_fit(); } #endif # 1074 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 void flip() _GLIBCXX_NOEXCEPT { _Bit_type * const __end = this->_M_impl._M_end_addr(); for (_Bit_type * __p = this->_M_impl._M_start._M_p; __p != __end; ++__p) *__p = ~*__p; } void clear() _GLIBCXX_NOEXCEPT { _M_erase_at_end(begin()); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1088 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 template<typename... _Args> #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201402L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1090 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 reference #else # 1092 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 void #endif # 1094 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 emplace_back(_Args&&... __args) { push_back(bool(__args...)); #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201402L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1098 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 return back(); #endif # 1100 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 } template<typename... _Args> iterator emplace(const_iterator __pos, _Args&&... __args) { return insert(__pos, bool(__args...)); } #endif # 1107 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 protected: // Precondition: __first._M_offset == 0 && __result._M_offset == 0. iterator _M_copy_aligned(const_iterator __first, const_iterator __last, iterator __result) { _Bit_type* __q = std::copy(__first._M_p, __last._M_p, __result._M_p); return std::copy(const_iterator(__last._M_p, 0), __last, iterator(__q, 0)); } void _M_initialize(size_type __n) { if (__n) { _Bit_pointer __q = this->_M_allocate(__n); this->_M_impl._M_end_of_storage = __q + _S_nword(__n); this->_M_impl._M_start = iterator(std::__addressof(*__q), 0); } else { this->_M_impl._M_end_of_storage = _Bit_pointer(); this->_M_impl._M_start = iterator(0, 0); } this->_M_impl._M_finish = this->_M_impl._M_start + difference_type(__n); } void _M_initialize_value(bool __x) { if (_Bit_type* __p = this->_M_impl._M_start._M_p) __builtin_memset(__p, __x ? ~0 : 0, (this->_M_impl._M_end_addr() - __p) * sizeof(_Bit_type)); } void _M_reallocate(size_type __n); #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1150 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 bool _M_shrink_to_fit(); #endif # 1153 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 // Check whether it's an integral type. If so, it's not an iterator. // _GLIBCXX_RESOLVE_LIB_DEFECTS // 438. Ambiguity in the "do the right thing" clause template<typename _Integer> void _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type) { _M_initialize(static_cast<size_type>(__n)); _M_initialize_value(__x); } template<typename _InputIterator> void _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, __false_type) { _M_initialize_range(__first, __last, std::__iterator_category(__first)); } template<typename _InputIterator> void _M_initialize_range(_InputIterator __first, _InputIterator __last, std::input_iterator_tag) { for (; __first != __last; ++__first) push_back(*__first); } template<typename _ForwardIterator> void _M_initialize_range(_ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag) { const size_type __n = std::distance(__first, __last); _M_initialize(__n); std::copy(__first, __last, this->_M_impl._M_start); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus < 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1193 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 // _GLIBCXX_RESOLVE_LIB_DEFECTS // 438. Ambiguity in the "do the right thing" clause template<typename _Integer> void _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) { _M_fill_assign(__n, __val); } template<class _InputIterator> void _M_assign_dispatch(_InputIterator __first, _InputIterator __last, __false_type) { _M_assign_aux(__first, __last, std::__iterator_category(__first)); } #endif # 1206 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 void _M_fill_assign(size_t __n, bool __x) { if (__n > size()) { _M_initialize_value(__x); insert(end(), __n - size(), __x); } else { _M_erase_at_end(begin() + __n); _M_initialize_value(__x); } } template<typename _InputIterator> void _M_assign_aux(_InputIterator __first, _InputIterator __last, std::input_iterator_tag) { iterator __cur = begin(); for (; __first != __last && __cur != end(); ++__cur, (void)++__first) *__cur = *__first; if (__first == __last) _M_erase_at_end(__cur); else insert(end(), __first, __last); } template<typename _ForwardIterator> void _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag) { const size_type __len = std::distance(__first, __last); if (__len < size()) _M_erase_at_end(std::copy(__first, __last, begin())); else { _ForwardIterator __mid = __first; std::advance(__mid, size()); std::copy(__first, __mid, begin()); insert(end(), __mid, __last); } } // Check whether it's an integral type. If so, it's not an iterator. // _GLIBCXX_RESOLVE_LIB_DEFECTS // 438. Ambiguity in the "do the right thing" clause template<typename _Integer> void _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x, __true_type) { _M_fill_insert(__pos, __n, __x); } template<typename _InputIterator> void _M_insert_dispatch(iterator __pos, _InputIterator __first, _InputIterator __last, __false_type) { _M_insert_range(__pos, __first, __last, std::__iterator_category(__first)); } void _M_fill_insert(iterator __position, size_type __n, bool __x); template<typename _InputIterator> void _M_insert_range(iterator __pos, _InputIterator __first, _InputIterator __last, std::input_iterator_tag) { for (; __first != __last; ++__first) { __pos = insert(__pos, *__first); ++__pos; } } template<typename _ForwardIterator> void _M_insert_range(iterator __position, _ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag); void _M_insert_aux(iterator __position, bool __x); size_type _M_check_len(size_type __n, const char* __s) const { if (max_size() - size() < __n) __throw_length_error(__N(__s)); const size_type __len = size() + std::max(size(), __n); return (__len < size() || __len > max_size()) ? max_size() : __len; } void _M_erase_at_end(iterator __pos) { this->_M_impl._M_finish = __pos; } iterator _M_erase(iterator __pos); iterator _M_erase(iterator __first, iterator __last); }; _GLIBCXX_END_NAMESPACE_CONTAINER _GLIBCXX_END_NAMESPACE_VERSION } // namespace std #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1320 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION // DR 1182. /// std::hash specialization for vector<bool>. template<typename _Alloc> struct hash<_GLIBCXX_STD_C::vector<bool, _Alloc>> : public __hash_base<size_t, _GLIBCXX_STD_C::vector<bool, _Alloc>> { size_t operator()(const _GLIBCXX_STD_C::vector<bool, _Alloc>&) const noexcept; }; _GLIBCXX_END_NAMESPACE_VERSION }// namespace std #endif // C++11 # 1339 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 #endif # 1341 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_bvector.h" 3 # 69 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/vector" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/range_access.h> #endif /* expanded by -frewrite-includes */ # 69 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/vector" 3 # 70 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/vector" 3 #ifndef _GLIBCXX_EXPORT_TEMPLATE #if 0 /* expanded by -frewrite-includes */ # include <bits/vector.tcc> #endif /* expanded by -frewrite-includes */ # 72 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/vector" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/vector.tcc" 1 3 // Vector implementation (out of line) -*- C++ -*- // Copyright (C) 2001-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /* * * Copyright (c) 1994 * Hewlett-Packard Company * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Hewlett-Packard Company makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. * * * Copyright (c) 1996 * Silicon Graphics Computer Systems, Inc. * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Silicon Graphics makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. */ /** @file bits/vector.tcc * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{vector} */ #ifndef _VECTOR_TCC #define _VECTOR_TCC 1 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template<typename _Tp, typename _Alloc> void vector<_Tp, _Alloc>:: reserve(size_type __n) { if (__n > this->max_size()) __throw_length_error(__N("vector::reserve")); if (this->capacity() < __n) { const size_type __old_size = size(); pointer __tmp; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 76 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/vector.tcc" 3 if _GLIBCXX17_CONSTEXPR (_S_use_relocate()) { __tmp = this->_M_allocate(__n); _S_relocate(this->_M_impl._M_start, this->_M_impl._M_finish, __tmp, _M_get_Tp_allocator()); } else #endif # 84 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/vector.tcc" 3 { __tmp = _M_allocate_and_copy(__n, _GLIBCXX_MAKE_MOVE_IF_NOEXCEPT_ITERATOR(this->_M_impl._M_start), _GLIBCXX_MAKE_MOVE_IF_NOEXCEPT_ITERATOR(this->_M_impl._M_finish)); std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, _M_get_Tp_allocator()); } _GLIBCXX_ASAN_ANNOTATE_REINIT; _M_deallocate(this->_M_impl._M_start, this->_M_impl._M_end_of_storage - this->_M_impl._M_start); this->_M_impl._M_start = __tmp; this->_M_impl._M_finish = __tmp + __old_size; this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; } } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 102 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/vector.tcc" 3 template<typename _Tp, typename _Alloc> template<typename... _Args> #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201402L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 105 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/vector.tcc" 3 typename vector<_Tp, _Alloc>::reference #else # 107 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/vector.tcc" 3 void #endif # 109 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/vector.tcc" 3 vector<_Tp, _Alloc>:: emplace_back(_Args&&... __args) { if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) { _GLIBCXX_ASAN_ANNOTATE_GROW(1); _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, std::forward<_Args>(__args)...); ++this->_M_impl._M_finish; _GLIBCXX_ASAN_ANNOTATE_GREW(1); } else _M_realloc_insert(end(), std::forward<_Args>(__args)...); #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201402L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 123 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/vector.tcc" 3 return back(); #endif # 125 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/vector.tcc" 3 } #endif # 127 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/vector.tcc" 3 template<typename _Tp, typename _Alloc> typename vector<_Tp, _Alloc>::iterator vector<_Tp, _Alloc>:: #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 132 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/vector.tcc" 3 insert(const_iterator __position, const value_type& __x) #else # 134 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/vector.tcc" 3 insert(iterator __position, const value_type& __x) #endif # 136 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/vector.tcc" 3 { const size_type __n = __position - begin(); if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) if (__position == end()) { _GLIBCXX_ASAN_ANNOTATE_GROW(1); _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, __x); ++this->_M_impl._M_finish; _GLIBCXX_ASAN_ANNOTATE_GREW(1); } else { #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 150 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/vector.tcc" 3 const auto __pos = begin() + (__position - cbegin()); // __x could be an existing element of this vector, so make a // copy of it before _M_insert_aux moves elements around. _Temporary_value __x_copy(this, __x); _M_insert_aux(__pos, std::move(__x_copy._M_val())); #else # 156 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/vector.tcc" 3 _M_insert_aux(__position, __x); #endif # 158 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/vector.tcc" 3 } else #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 161 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/vector.tcc" 3 _M_realloc_insert(begin() + (__position - cbegin()), __x); #else # 163 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/vector.tcc" 3 _M_realloc_insert(__position, __x); #endif # 165 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/vector.tcc" 3 return iterator(this->_M_impl._M_start + __n); } template<typename _Tp, typename _Alloc> typename vector<_Tp, _Alloc>::iterator vector<_Tp, _Alloc>:: _M_erase(iterator __position) { if (__position + 1 != end()) _GLIBCXX_MOVE3(__position + 1, end(), __position); --this->_M_impl._M_finish; _Alloc_traits::destroy(this->_M_impl, this->_M_impl._M_finish); _GLIBCXX_ASAN_ANNOTATE_SHRINK(1); return __position; } template<typename _Tp, typename _Alloc> typename vector<_Tp, _Alloc>::iterator vector<_Tp, _Alloc>:: _M_erase(iterator __first, iterator __last) { if (__first != __last) { if (__last != end()) _GLIBCXX_MOVE3(__last, end(), __first); _M_erase_at_end(__first.base() + (end() - __last)); } return __first; } template<typename _Tp, typename _Alloc> vector<_Tp, _Alloc>& vector<_Tp, _Alloc>:: operator=(const vector<_Tp, _Alloc>& __x) { if (&__x != this) { _GLIBCXX_ASAN_ANNOTATE_REINIT; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 205 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/vector.tcc" 3 if (_Alloc_traits::_S_propagate_on_copy_assign()) { if (!_Alloc_traits::_S_always_equal() && _M_get_Tp_allocator() != __x._M_get_Tp_allocator()) { // replacement allocator cannot free existing storage this->clear(); _M_deallocate(this->_M_impl._M_start, this->_M_impl._M_end_of_storage - this->_M_impl._M_start); this->_M_impl._M_start = nullptr; this->_M_impl._M_finish = nullptr; this->_M_impl._M_end_of_storage = nullptr; } std::__alloc_on_copy(_M_get_Tp_allocator(), __x._M_get_Tp_allocator()); } #endif # 223 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/vector.tcc" 3 const size_type __xlen = __x.size(); if (__xlen > capacity()) { pointer __tmp = _M_allocate_and_copy(__xlen, __x.begin(), __x.end()); std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, _M_get_Tp_allocator()); _M_deallocate(this->_M_impl._M_start, this->_M_impl._M_end_of_storage - this->_M_impl._M_start); this->_M_impl._M_start = __tmp; this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __xlen; } else if (size() >= __xlen) { std::_Destroy(std::copy(__x.begin(), __x.end(), begin()), end(), _M_get_Tp_allocator()); } else { std::copy(__x._M_impl._M_start, __x._M_impl._M_start + size(), this->_M_impl._M_start); std::__uninitialized_copy_a(__x._M_impl._M_start + size(), __x._M_impl._M_finish, this->_M_impl._M_finish, _M_get_Tp_allocator()); } this->_M_impl._M_finish = this->_M_impl._M_start + __xlen; } return *this; } template<typename _Tp, typename _Alloc> void vector<_Tp, _Alloc>:: _M_fill_assign(size_t __n, const value_type& __val) { if (__n > capacity()) { vector __tmp(__n, __val, _M_get_Tp_allocator()); __tmp._M_impl._M_swap_data(this->_M_impl); } else if (__n > size()) { std::fill(begin(), end(), __val); const size_type __add = __n - size(); _GLIBCXX_ASAN_ANNOTATE_GROW(__add); this->_M_impl._M_finish = std::__uninitialized_fill_n_a(this->_M_impl._M_finish, __add, __val, _M_get_Tp_allocator()); _GLIBCXX_ASAN_ANNOTATE_GREW(__add); } else _M_erase_at_end(std::fill_n(this->_M_impl._M_start, __n, __val)); } template<typename _Tp, typename _Alloc> template<typename _InputIterator> void vector<_Tp, _Alloc>:: _M_assign_aux(_InputIterator __first, _InputIterator __last, std::input_iterator_tag) { pointer __cur(this->_M_impl._M_start); for (; __first != __last && __cur != this->_M_impl._M_finish; ++__cur, (void)++__first) *__cur = *__first; if (__first == __last) _M_erase_at_end(__cur); else _M_range_insert(end(), __first, __last, std::__iterator_category(__first)); } template<typename _Tp, typename _Alloc> template<typename _ForwardIterator> void vector<_Tp, _Alloc>:: _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag) { const size_type __len = std::distance(__first, __last); if (__len > capacity()) { _S_check_init_len(__len, _M_get_Tp_allocator()); pointer __tmp(_M_allocate_and_copy(__len, __first, __last)); std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, _M_get_Tp_allocator()); _GLIBCXX_ASAN_ANNOTATE_REINIT; _M_deallocate(this->_M_impl._M_start, this->_M_impl._M_end_of_storage - this->_M_impl._M_start); this->_M_impl._M_start = __tmp; this->_M_impl._M_finish = this->_M_impl._M_start + __len; this->_M_impl._M_end_of_storage = this->_M_impl._M_finish; } else if (size() >= __len) _M_erase_at_end(std::copy(__first, __last, this->_M_impl._M_start)); else { _ForwardIterator __mid = __first; std::advance(__mid, size()); std::copy(__first, __mid, this->_M_impl._M_start); const size_type __attribute__((__unused__)) __n = __len - size(); _GLIBCXX_ASAN_ANNOTATE_GROW(__n); this->_M_impl._M_finish = std::__uninitialized_copy_a(__mid, __last, this->_M_impl._M_finish, _M_get_Tp_allocator()); _GLIBCXX_ASAN_ANNOTATE_GREW(__n); } } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 338 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/vector.tcc" 3 template<typename _Tp, typename _Alloc> auto vector<_Tp, _Alloc>:: _M_insert_rval(const_iterator __position, value_type&& __v) -> iterator { const auto __n = __position - cbegin(); if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) if (__position == cend()) { _GLIBCXX_ASAN_ANNOTATE_GROW(1); _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, std::move(__v)); ++this->_M_impl._M_finish; _GLIBCXX_ASAN_ANNOTATE_GREW(1); } else _M_insert_aux(begin() + __n, std::move(__v)); else _M_realloc_insert(begin() + __n, std::move(__v)); return iterator(this->_M_impl._M_start + __n); } template<typename _Tp, typename _Alloc> template<typename... _Args> auto vector<_Tp, _Alloc>:: _M_emplace_aux(const_iterator __position, _Args&&... __args) -> iterator { const auto __n = __position - cbegin(); if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) if (__position == cend()) { _GLIBCXX_ASAN_ANNOTATE_GROW(1); _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, std::forward<_Args>(__args)...); ++this->_M_impl._M_finish; _GLIBCXX_ASAN_ANNOTATE_GREW(1); } else { // We need to construct a temporary because something in __args... // could alias one of the elements of the container and so we // need to use it before _M_insert_aux moves elements around. _Temporary_value __tmp(this, std::forward<_Args>(__args)...); _M_insert_aux(begin() + __n, std::move(__tmp._M_val())); } else _M_realloc_insert(begin() + __n, std::forward<_Args>(__args)...); return iterator(this->_M_impl._M_start + __n); } template<typename _Tp, typename _Alloc> template<typename _Arg> void vector<_Tp, _Alloc>:: _M_insert_aux(iterator __position, _Arg&& __arg) #else # 398 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/vector.tcc" 3 template<typename _Tp, typename _Alloc> void vector<_Tp, _Alloc>:: _M_insert_aux(iterator __position, const _Tp& __x) #endif # 403 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/vector.tcc" 3 { _GLIBCXX_ASAN_ANNOTATE_GROW(1); _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, _GLIBCXX_MOVE(*(this->_M_impl._M_finish - 1))); ++this->_M_impl._M_finish; _GLIBCXX_ASAN_ANNOTATE_GREW(1); #if 0 /* disabled by -frewrite-includes */ #if __cplusplus < 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 410 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/vector.tcc" 3 _Tp __x_copy = __x; #endif # 412 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/vector.tcc" 3 _GLIBCXX_MOVE_BACKWARD3(__position.base(), this->_M_impl._M_finish - 2, this->_M_impl._M_finish - 1); #if 0 /* disabled by -frewrite-includes */ #if __cplusplus < 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 416 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/vector.tcc" 3 *__position = __x_copy; #else # 418 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/vector.tcc" 3 *__position = std::forward<_Arg>(__arg); #endif # 420 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/vector.tcc" 3 } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 423 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/vector.tcc" 3 template<typename _Tp, typename _Alloc> template<typename... _Args> void vector<_Tp, _Alloc>:: _M_realloc_insert(iterator __position, _Args&&... __args) #else # 429 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/vector.tcc" 3 template<typename _Tp, typename _Alloc> void vector<_Tp, _Alloc>:: _M_realloc_insert(iterator __position, const _Tp& __x) #endif # 434 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/vector.tcc" 3 { const size_type __len = _M_check_len(size_type(1), "vector::_M_realloc_insert"); pointer __old_start = this->_M_impl._M_start; pointer __old_finish = this->_M_impl._M_finish; const size_type __elems_before = __position - begin(); pointer __new_start(this->_M_allocate(__len)); pointer __new_finish(__new_start); __try { // The order of the three operations is dictated by the C++11 // case, where the moves could alter a new element belonging // to the existing vector. This is an issue only for callers // taking the element by lvalue ref (see last bullet of C++11 // [res.on.arguments]). _Alloc_traits::construct(this->_M_impl, __new_start + __elems_before, #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 452 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/vector.tcc" 3 std::forward<_Args>(__args)...); #else # 454 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/vector.tcc" 3 __x); #endif # 456 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/vector.tcc" 3 __new_finish = pointer(); #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 459 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/vector.tcc" 3 if _GLIBCXX17_CONSTEXPR (_S_use_relocate()) { __new_finish = _S_relocate(__old_start, __position.base(), __new_start, _M_get_Tp_allocator()); ++__new_finish; __new_finish = _S_relocate(__position.base(), __old_finish, __new_finish, _M_get_Tp_allocator()); } else #endif # 471 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/vector.tcc" 3 { __new_finish = std::__uninitialized_move_if_noexcept_a (__old_start, __position.base(), __new_start, _M_get_Tp_allocator()); ++__new_finish; __new_finish = std::__uninitialized_move_if_noexcept_a (__position.base(), __old_finish, __new_finish, _M_get_Tp_allocator()); } } __catch(...) { if (!__new_finish) _Alloc_traits::destroy(this->_M_impl, __new_start + __elems_before); else std::_Destroy(__new_start, __new_finish, _M_get_Tp_allocator()); _M_deallocate(__new_start, __len); __throw_exception_again; } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 496 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/vector.tcc" 3 if _GLIBCXX17_CONSTEXPR (!_S_use_relocate()) #endif # 498 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/vector.tcc" 3 std::_Destroy(__old_start, __old_finish, _M_get_Tp_allocator()); _GLIBCXX_ASAN_ANNOTATE_REINIT; _M_deallocate(__old_start, this->_M_impl._M_end_of_storage - __old_start); this->_M_impl._M_start = __new_start; this->_M_impl._M_finish = __new_finish; this->_M_impl._M_end_of_storage = __new_start + __len; } template<typename _Tp, typename _Alloc> void vector<_Tp, _Alloc>:: _M_fill_insert(iterator __position, size_type __n, const value_type& __x) { if (__n != 0) { if (size_type(this->_M_impl._M_end_of_storage - this->_M_impl._M_finish) >= __n) { #if 0 /* disabled by -frewrite-includes */ #if __cplusplus < 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 518 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/vector.tcc" 3 value_type __x_copy = __x; #else # 520 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/vector.tcc" 3 _Temporary_value __tmp(this, __x); value_type& __x_copy = __tmp._M_val(); #endif # 523 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/vector.tcc" 3 const size_type __elems_after = end() - __position; pointer __old_finish(this->_M_impl._M_finish); if (__elems_after > __n) { _GLIBCXX_ASAN_ANNOTATE_GROW(__n); std::__uninitialized_move_a(this->_M_impl._M_finish - __n, this->_M_impl._M_finish, this->_M_impl._M_finish, _M_get_Tp_allocator()); this->_M_impl._M_finish += __n; _GLIBCXX_ASAN_ANNOTATE_GREW(__n); _GLIBCXX_MOVE_BACKWARD3(__position.base(), __old_finish - __n, __old_finish); std::fill(__position.base(), __position.base() + __n, __x_copy); } else { _GLIBCXX_ASAN_ANNOTATE_GROW(__n); this->_M_impl._M_finish = std::__uninitialized_fill_n_a(this->_M_impl._M_finish, __n - __elems_after, __x_copy, _M_get_Tp_allocator()); _GLIBCXX_ASAN_ANNOTATE_GREW(__n - __elems_after); std::__uninitialized_move_a(__position.base(), __old_finish, this->_M_impl._M_finish, _M_get_Tp_allocator()); this->_M_impl._M_finish += __elems_after; _GLIBCXX_ASAN_ANNOTATE_GREW(__elems_after); std::fill(__position.base(), __old_finish, __x_copy); } } else { const size_type __len = _M_check_len(__n, "vector::_M_fill_insert"); const size_type __elems_before = __position - begin(); pointer __new_start(this->_M_allocate(__len)); pointer __new_finish(__new_start); __try { // See _M_realloc_insert above. std::__uninitialized_fill_n_a(__new_start + __elems_before, __n, __x, _M_get_Tp_allocator()); __new_finish = pointer(); __new_finish = std::__uninitialized_move_if_noexcept_a (this->_M_impl._M_start, __position.base(), __new_start, _M_get_Tp_allocator()); __new_finish += __n; __new_finish = std::__uninitialized_move_if_noexcept_a (__position.base(), this->_M_impl._M_finish, __new_finish, _M_get_Tp_allocator()); } __catch(...) { if (!__new_finish) std::_Destroy(__new_start + __elems_before, __new_start + __elems_before + __n, _M_get_Tp_allocator()); else std::_Destroy(__new_start, __new_finish, _M_get_Tp_allocator()); _M_deallocate(__new_start, __len); __throw_exception_again; } std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, _M_get_Tp_allocator()); _GLIBCXX_ASAN_ANNOTATE_REINIT; _M_deallocate(this->_M_impl._M_start, this->_M_impl._M_end_of_storage - this->_M_impl._M_start); this->_M_impl._M_start = __new_start; this->_M_impl._M_finish = __new_finish; this->_M_impl._M_end_of_storage = __new_start + __len; } } } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 609 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/vector.tcc" 3 template<typename _Tp, typename _Alloc> void vector<_Tp, _Alloc>:: _M_default_append(size_type __n) { if (__n != 0) { const size_type __size = size(); size_type __navail = size_type(this->_M_impl._M_end_of_storage - this->_M_impl._M_finish); if (__size > max_size() || __navail > max_size() - __size) __builtin_unreachable(); if (__navail >= __n) { _GLIBCXX_ASAN_ANNOTATE_GROW(__n); this->_M_impl._M_finish = std::__uninitialized_default_n_a(this->_M_impl._M_finish, __n, _M_get_Tp_allocator()); _GLIBCXX_ASAN_ANNOTATE_GREW(__n); } else { const size_type __len = _M_check_len(__n, "vector::_M_default_append"); pointer __new_start(this->_M_allocate(__len)); if _GLIBCXX17_CONSTEXPR (_S_use_relocate()) { __try { std::__uninitialized_default_n_a(__new_start + __size, __n, _M_get_Tp_allocator()); } __catch(...) { _M_deallocate(__new_start, __len); __throw_exception_again; } _S_relocate(this->_M_impl._M_start, this->_M_impl._M_finish, __new_start, _M_get_Tp_allocator()); } else { pointer __destroy_from = pointer(); __try { std::__uninitialized_default_n_a(__new_start + __size, __n, _M_get_Tp_allocator()); __destroy_from = __new_start + __size; std::__uninitialized_move_if_noexcept_a( this->_M_impl._M_start, this->_M_impl._M_finish, __new_start, _M_get_Tp_allocator()); } __catch(...) { if (__destroy_from) std::_Destroy(__destroy_from, __destroy_from + __n, _M_get_Tp_allocator()); _M_deallocate(__new_start, __len); __throw_exception_again; } std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, _M_get_Tp_allocator()); } _GLIBCXX_ASAN_ANNOTATE_REINIT; _M_deallocate(this->_M_impl._M_start, this->_M_impl._M_end_of_storage - this->_M_impl._M_start); this->_M_impl._M_start = __new_start; this->_M_impl._M_finish = __new_start + __size + __n; this->_M_impl._M_end_of_storage = __new_start + __len; } } } template<typename _Tp, typename _Alloc> bool vector<_Tp, _Alloc>:: _M_shrink_to_fit() { if (capacity() == size()) return false; _GLIBCXX_ASAN_ANNOTATE_REINIT; return std::__shrink_to_fit_aux<vector>::_S_do_it(*this); } #endif # 696 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/vector.tcc" 3 template<typename _Tp, typename _Alloc> template<typename _InputIterator> void vector<_Tp, _Alloc>:: _M_range_insert(iterator __pos, _InputIterator __first, _InputIterator __last, std::input_iterator_tag) { if (__pos == end()) { for (; __first != __last; ++__first) insert(end(), *__first); } else if (__first != __last) { vector __tmp(__first, __last, _M_get_Tp_allocator()); insert(__pos, _GLIBCXX_MAKE_MOVE_ITERATOR(__tmp.begin()), _GLIBCXX_MAKE_MOVE_ITERATOR(__tmp.end())); } } template<typename _Tp, typename _Alloc> template<typename _ForwardIterator> void vector<_Tp, _Alloc>:: _M_range_insert(iterator __position, _ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag) { if (__first != __last) { const size_type __n = std::distance(__first, __last); if (size_type(this->_M_impl._M_end_of_storage - this->_M_impl._M_finish) >= __n) { const size_type __elems_after = end() - __position; pointer __old_finish(this->_M_impl._M_finish); if (__elems_after > __n) { _GLIBCXX_ASAN_ANNOTATE_GROW(__n); std::__uninitialized_move_a(this->_M_impl._M_finish - __n, this->_M_impl._M_finish, this->_M_impl._M_finish, _M_get_Tp_allocator()); this->_M_impl._M_finish += __n; _GLIBCXX_ASAN_ANNOTATE_GREW(__n); _GLIBCXX_MOVE_BACKWARD3(__position.base(), __old_finish - __n, __old_finish); std::copy(__first, __last, __position); } else { _ForwardIterator __mid = __first; std::advance(__mid, __elems_after); _GLIBCXX_ASAN_ANNOTATE_GROW(__n); std::__uninitialized_copy_a(__mid, __last, this->_M_impl._M_finish, _M_get_Tp_allocator()); this->_M_impl._M_finish += __n - __elems_after; _GLIBCXX_ASAN_ANNOTATE_GREW(__n - __elems_after); std::__uninitialized_move_a(__position.base(), __old_finish, this->_M_impl._M_finish, _M_get_Tp_allocator()); this->_M_impl._M_finish += __elems_after; _GLIBCXX_ASAN_ANNOTATE_GREW(__elems_after); std::copy(__first, __mid, __position); } } else { const size_type __len = _M_check_len(__n, "vector::_M_range_insert"); pointer __new_start(this->_M_allocate(__len)); pointer __new_finish(__new_start); __try { __new_finish = std::__uninitialized_move_if_noexcept_a (this->_M_impl._M_start, __position.base(), __new_start, _M_get_Tp_allocator()); __new_finish = std::__uninitialized_copy_a(__first, __last, __new_finish, _M_get_Tp_allocator()); __new_finish = std::__uninitialized_move_if_noexcept_a (__position.base(), this->_M_impl._M_finish, __new_finish, _M_get_Tp_allocator()); } __catch(...) { std::_Destroy(__new_start, __new_finish, _M_get_Tp_allocator()); _M_deallocate(__new_start, __len); __throw_exception_again; } std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, _M_get_Tp_allocator()); _GLIBCXX_ASAN_ANNOTATE_REINIT; _M_deallocate(this->_M_impl._M_start, this->_M_impl._M_end_of_storage - this->_M_impl._M_start); this->_M_impl._M_start = __new_start; this->_M_impl._M_finish = __new_finish; this->_M_impl._M_end_of_storage = __new_start + __len; } } } // vector<bool> template<typename _Alloc> void vector<bool, _Alloc>:: _M_reallocate(size_type __n) { _Bit_pointer __q = this->_M_allocate(__n); iterator __start(std::__addressof(*__q), 0); iterator __finish(_M_copy_aligned(begin(), end(), __start)); this->_M_deallocate(); this->_M_impl._M_start = __start; this->_M_impl._M_finish = __finish; this->_M_impl._M_end_of_storage = __q + _S_nword(__n); } template<typename _Alloc> void vector<bool, _Alloc>:: _M_fill_insert(iterator __position, size_type __n, bool __x) { if (__n == 0) return; if (capacity() - size() >= __n) { std::copy_backward(__position, end(), this->_M_impl._M_finish + difference_type(__n)); std::fill(__position, __position + difference_type(__n), __x); this->_M_impl._M_finish += difference_type(__n); } else { const size_type __len = _M_check_len(__n, "vector<bool>::_M_fill_insert"); _Bit_pointer __q = this->_M_allocate(__len); iterator __start(std::__addressof(*__q), 0); iterator __i = _M_copy_aligned(begin(), __position, __start); std::fill(__i, __i + difference_type(__n), __x); iterator __finish = std::copy(__position, end(), __i + difference_type(__n)); this->_M_deallocate(); this->_M_impl._M_end_of_storage = __q + _S_nword(__len); this->_M_impl._M_start = __start; this->_M_impl._M_finish = __finish; } } template<typename _Alloc> template<typename _ForwardIterator> void vector<bool, _Alloc>:: _M_insert_range(iterator __position, _ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag) { if (__first != __last) { size_type __n = std::distance(__first, __last); if (capacity() - size() >= __n) { std::copy_backward(__position, end(), this->_M_impl._M_finish + difference_type(__n)); std::copy(__first, __last, __position); this->_M_impl._M_finish += difference_type(__n); } else { const size_type __len = _M_check_len(__n, "vector<bool>::_M_insert_range"); _Bit_pointer __q = this->_M_allocate(__len); iterator __start(std::__addressof(*__q), 0); iterator __i = _M_copy_aligned(begin(), __position, __start); __i = std::copy(__first, __last, __i); iterator __finish = std::copy(__position, end(), __i); this->_M_deallocate(); this->_M_impl._M_end_of_storage = __q + _S_nword(__len); this->_M_impl._M_start = __start; this->_M_impl._M_finish = __finish; } } } template<typename _Alloc> void vector<bool, _Alloc>:: _M_insert_aux(iterator __position, bool __x) { if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_addr()) { std::copy_backward(__position, this->_M_impl._M_finish, this->_M_impl._M_finish + 1); *__position = __x; ++this->_M_impl._M_finish; } else { const size_type __len = _M_check_len(size_type(1), "vector<bool>::_M_insert_aux"); _Bit_pointer __q = this->_M_allocate(__len); iterator __start(std::__addressof(*__q), 0); iterator __i = _M_copy_aligned(begin(), __position, __start); *__i++ = __x; iterator __finish = std::copy(__position, end(), __i); this->_M_deallocate(); this->_M_impl._M_end_of_storage = __q + _S_nword(__len); this->_M_impl._M_start = __start; this->_M_impl._M_finish = __finish; } } template<typename _Alloc> typename vector<bool, _Alloc>::iterator vector<bool, _Alloc>:: _M_erase(iterator __position) { if (__position + 1 != end()) std::copy(__position + 1, end(), __position); --this->_M_impl._M_finish; return __position; } template<typename _Alloc> typename vector<bool, _Alloc>::iterator vector<bool, _Alloc>:: _M_erase(iterator __first, iterator __last) { if (__first != __last) _M_erase_at_end(std::copy(__last, end(), __first)); return __first; } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 938 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/vector.tcc" 3 template<typename _Alloc> bool vector<bool, _Alloc>:: _M_shrink_to_fit() { if (capacity() - size() < int(_S_word_bit)) return false; __try { _M_reallocate(size()); return true; } __catch(...) { return false; } } #endif # 954 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/vector.tcc" 3 _GLIBCXX_END_NAMESPACE_CONTAINER _GLIBCXX_END_NAMESPACE_VERSION } // namespace std #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 960 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/vector.tcc" 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION template<typename _Alloc> size_t hash<_GLIBCXX_STD_C::vector<bool, _Alloc>>:: operator()(const _GLIBCXX_STD_C::vector<bool, _Alloc>& __b) const noexcept { size_t __hash = 0; using _GLIBCXX_STD_C::_S_word_bit; using _GLIBCXX_STD_C::_Bit_type; const size_t __words = __b.size() / _S_word_bit; if (__words) { const size_t __clength = __words * sizeof(_Bit_type); __hash = std::_Hash_impl::hash(__b._M_impl._M_start._M_p, __clength); } const size_t __extrabits = __b.size() % _S_word_bit; if (__extrabits) { _Bit_type __hiword = *__b._M_impl._M_finish._M_p; __hiword &= ~((~static_cast<_Bit_type>(0)) << __extrabits); const size_t __clength = (__extrabits + __CHAR_BIT__ - 1) / __CHAR_BIT__; if (__words) __hash = std::_Hash_impl::hash(&__hiword, __clength, __hash); else __hash = std::_Hash_impl::hash(&__hiword, __clength); } return __hash; } _GLIBCXX_END_NAMESPACE_VERSION } // namespace std #endif // C++11 # 1002 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/vector.tcc" 3 #undef _GLIBCXX_ASAN_ANNOTATE_REINIT #undef _GLIBCXX_ASAN_ANNOTATE_GROW #undef _GLIBCXX_ASAN_ANNOTATE_GREW #undef _GLIBCXX_ASAN_ANNOTATE_SHRINK #endif /* _VECTOR_TCC */ # 1009 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/vector.tcc" 3 # 73 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/vector" 2 3 #endif # 74 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/vector" 3 #ifdef _GLIBCXX_DEBUG #if 0 /* expanded by -frewrite-includes */ # include <debug/vector> #endif /* expanded by -frewrite-includes */ # 76 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/vector" 3 # 77 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/vector" 3 #endif # 78 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/vector" 3 #ifdef _GLIBCXX_PROFILE #if 0 /* expanded by -frewrite-includes */ # include <profile/vector> #endif /* expanded by -frewrite-includes */ # 80 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/vector" 3 # 81 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/vector" 3 #endif # 82 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/vector" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 84 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/vector" 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION namespace pmr { template<typename _Tp> class polymorphic_allocator; template<typename _Tp> using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>; } // namespace pmr # ifdef _GLIBCXX_DEBUG namespace _GLIBCXX_STD_C::pmr { template<typename _Tp> using vector = _GLIBCXX_STD_C::vector<_Tp, std::pmr::polymorphic_allocator<_Tp>>; } // namespace _GLIBCXX_STD_C::pmr # endif # 99 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/vector" 3 _GLIBCXX_END_NAMESPACE_VERSION } // namespace std #endif // C++17 # 102 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/vector" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 104 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/vector" 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION #define __cpp_lib_erase_if 202002L template<typename _Tp, typename _Alloc, typename _Predicate> inline typename vector<_Tp, _Alloc>::size_type erase_if(vector<_Tp, _Alloc>& __cont, _Predicate __pred) { const auto __osz = __cont.size(); __cont.erase(std::remove_if(__cont.begin(), __cont.end(), __pred), __cont.end()); return __osz - __cont.size(); } template<typename _Tp, typename _Alloc, typename _Up> inline typename vector<_Tp, _Alloc>::size_type erase(vector<_Tp, _Alloc>& __cont, const _Up& __value) { const auto __osz = __cont.size(); __cont.erase(std::remove(__cont.begin(), __cont.end(), __value), __cont.end()); return __osz - __cont.size(); } _GLIBCXX_END_NAMESPACE_VERSION } // namespace std #endif // C++20 # 132 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/vector" 3 #endif /* _GLIBCXX_VECTOR */ # 134 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/vector" 3 # 62 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/queue" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/stl_heap.h> #endif /* expanded by -frewrite-includes */ # 62 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/queue" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_heap.h" 1 3 // Heap implementation -*- C++ -*- // Copyright (C) 2001-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /* * * Copyright (c) 1994 * Hewlett-Packard Company * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Hewlett-Packard Company makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. * * Copyright (c) 1997 * Silicon Graphics Computer Systems, Inc. * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Silicon Graphics makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. */ /** @file bits/stl_heap.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{queue} */ #ifndef _STL_HEAP_H #define _STL_HEAP_H 1 #if 0 /* expanded by -frewrite-includes */ #include <debug/debug.h> #endif /* expanded by -frewrite-includes */ # 58 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_heap.h" 3 # 59 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_heap.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/move.h> #endif /* expanded by -frewrite-includes */ # 59 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_heap.h" 3 # 60 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_heap.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/predefined_ops.h> #endif /* expanded by -frewrite-includes */ # 60 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_heap.h" 3 # 61 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_heap.h" 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @defgroup heap_algorithms Heap * @ingroup sorting_algorithms */ template<typename _RandomAccessIterator, typename _Distance, typename _Compare> _Distance __is_heap_until(_RandomAccessIterator __first, _Distance __n, _Compare& __comp) { _Distance __parent = 0; for (_Distance __child = 1; __child < __n; ++__child) { if (__comp(__first + __parent, __first + __child)) return __child; if ((__child & 1) == 0) ++__parent; } return __n; } // __is_heap, a predicate testing whether or not a range is a heap. // This function is an extension, not part of the C++ standard. template<typename _RandomAccessIterator, typename _Distance> inline bool __is_heap(_RandomAccessIterator __first, _Distance __n) { __gnu_cxx::__ops::_Iter_less_iter __comp; return std::__is_heap_until(__first, __n, __comp) == __n; } template<typename _RandomAccessIterator, typename _Compare, typename _Distance> inline bool __is_heap(_RandomAccessIterator __first, _Compare __comp, _Distance __n) { typedef __decltype(__comp) _Cmp; __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(_GLIBCXX_MOVE(__comp)); return std::__is_heap_until(__first, __n, __cmp) == __n; } template<typename _RandomAccessIterator> inline bool __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) { return std::__is_heap(__first, std::distance(__first, __last)); } template<typename _RandomAccessIterator, typename _Compare> inline bool __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { return std::__is_heap(__first, _GLIBCXX_MOVE(__comp), std::distance(__first, __last)); } // Heap-manipulation functions: push_heap, pop_heap, make_heap, sort_heap, // + is_heap and is_heap_until in C++0x. template<typename _RandomAccessIterator, typename _Distance, typename _Tp, typename _Compare> void __push_heap(_RandomAccessIterator __first, _Distance __holeIndex, _Distance __topIndex, _Tp __value, _Compare& __comp) { _Distance __parent = (__holeIndex - 1) / 2; while (__holeIndex > __topIndex && __comp(__first + __parent, __value)) { *(__first + __holeIndex) = _GLIBCXX_MOVE(*(__first + __parent)); __holeIndex = __parent; __parent = (__holeIndex - 1) / 2; } *(__first + __holeIndex) = _GLIBCXX_MOVE(__value); } /** * @brief Push an element onto a heap. * @param __first Start of heap. * @param __last End of heap + element. * @ingroup heap_algorithms * * This operation pushes the element at last-1 onto the valid heap * over the range [__first,__last-1). After completion, * [__first,__last) is a valid heap. */ template<typename _RandomAccessIterator> inline void push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; typedef typename iterator_traits<_RandomAccessIterator>::difference_type _DistanceType; // concept requirements __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept< _RandomAccessIterator>) __glibcxx_function_requires(_LessThanComparableConcept<_ValueType>) __glibcxx_requires_valid_range(__first, __last); __glibcxx_requires_irreflexive(__first, __last); __glibcxx_requires_heap(__first, __last - 1); __gnu_cxx::__ops::_Iter_less_val __comp; _ValueType __value = _GLIBCXX_MOVE(*(__last - 1)); std::__push_heap(__first, _DistanceType((__last - __first) - 1), _DistanceType(0), _GLIBCXX_MOVE(__value), __comp); } /** * @brief Push an element onto a heap using comparison functor. * @param __first Start of heap. * @param __last End of heap + element. * @param __comp Comparison functor. * @ingroup heap_algorithms * * This operation pushes the element at __last-1 onto the valid * heap over the range [__first,__last-1). After completion, * [__first,__last) is a valid heap. Compare operations are * performed using comp. */ template<typename _RandomAccessIterator, typename _Compare> inline void push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; typedef typename iterator_traits<_RandomAccessIterator>::difference_type _DistanceType; // concept requirements __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept< _RandomAccessIterator>) __glibcxx_requires_valid_range(__first, __last); __glibcxx_requires_irreflexive_pred(__first, __last, __comp); __glibcxx_requires_heap_pred(__first, __last - 1, __comp); __decltype(__gnu_cxx::__ops::__iter_comp_val(_GLIBCXX_MOVE(__comp))) __cmp(_GLIBCXX_MOVE(__comp)); _ValueType __value = _GLIBCXX_MOVE(*(__last - 1)); std::__push_heap(__first, _DistanceType((__last - __first) - 1), _DistanceType(0), _GLIBCXX_MOVE(__value), __cmp); } template<typename _RandomAccessIterator, typename _Distance, typename _Tp, typename _Compare> void __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex, _Distance __len, _Tp __value, _Compare __comp) { const _Distance __topIndex = __holeIndex; _Distance __secondChild = __holeIndex; while (__secondChild < (__len - 1) / 2) { __secondChild = 2 * (__secondChild + 1); if (__comp(__first + __secondChild, __first + (__secondChild - 1))) __secondChild--; *(__first + __holeIndex) = _GLIBCXX_MOVE(*(__first + __secondChild)); __holeIndex = __secondChild; } if ((__len & 1) == 0 && __secondChild == (__len - 2) / 2) { __secondChild = 2 * (__secondChild + 1); *(__first + __holeIndex) = _GLIBCXX_MOVE(*(__first + (__secondChild - 1))); __holeIndex = __secondChild - 1; } __decltype(__gnu_cxx::__ops::__iter_comp_val(_GLIBCXX_MOVE(__comp))) __cmp(_GLIBCXX_MOVE(__comp)); std::__push_heap(__first, __holeIndex, __topIndex, _GLIBCXX_MOVE(__value), __cmp); } template<typename _RandomAccessIterator, typename _Compare> inline void __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _RandomAccessIterator __result, _Compare& __comp) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; typedef typename iterator_traits<_RandomAccessIterator>::difference_type _DistanceType; _ValueType __value = _GLIBCXX_MOVE(*__result); *__result = _GLIBCXX_MOVE(*__first); std::__adjust_heap(__first, _DistanceType(0), _DistanceType(__last - __first), _GLIBCXX_MOVE(__value), __comp); } /** * @brief Pop an element off a heap. * @param __first Start of heap. * @param __last End of heap. * @pre [__first, __last) is a valid, non-empty range. * @ingroup heap_algorithms * * This operation pops the top of the heap. The elements __first * and __last-1 are swapped and [__first,__last-1) is made into a * heap. */ template<typename _RandomAccessIterator> inline void pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) { // concept requirements __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept< _RandomAccessIterator>) __glibcxx_function_requires(_LessThanComparableConcept< typename iterator_traits<_RandomAccessIterator>::value_type>) __glibcxx_requires_non_empty_range(__first, __last); __glibcxx_requires_valid_range(__first, __last); __glibcxx_requires_irreflexive(__first, __last); __glibcxx_requires_heap(__first, __last); if (__last - __first > 1) { --__last; __gnu_cxx::__ops::_Iter_less_iter __comp; std::__pop_heap(__first, __last, __last, __comp); } } /** * @brief Pop an element off a heap using comparison functor. * @param __first Start of heap. * @param __last End of heap. * @param __comp Comparison functor to use. * @ingroup heap_algorithms * * This operation pops the top of the heap. The elements __first * and __last-1 are swapped and [__first,__last-1) is made into a * heap. Comparisons are made using comp. */ template<typename _RandomAccessIterator, typename _Compare> inline void pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { // concept requirements __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept< _RandomAccessIterator>) __glibcxx_requires_valid_range(__first, __last); __glibcxx_requires_irreflexive_pred(__first, __last, __comp); __glibcxx_requires_non_empty_range(__first, __last); __glibcxx_requires_heap_pred(__first, __last, __comp); if (__last - __first > 1) { typedef __decltype(__comp) _Cmp; __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(_GLIBCXX_MOVE(__comp)); --__last; std::__pop_heap(__first, __last, __last, __cmp); } } template<typename _RandomAccessIterator, typename _Compare> void __make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare& __comp) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; typedef typename iterator_traits<_RandomAccessIterator>::difference_type _DistanceType; if (__last - __first < 2) return; const _DistanceType __len = __last - __first; _DistanceType __parent = (__len - 2) / 2; while (true) { _ValueType __value = _GLIBCXX_MOVE(*(__first + __parent)); std::__adjust_heap(__first, __parent, __len, _GLIBCXX_MOVE(__value), __comp); if (__parent == 0) return; __parent--; } } /** * @brief Construct a heap over a range. * @param __first Start of heap. * @param __last End of heap. * @ingroup heap_algorithms * * This operation makes the elements in [__first,__last) into a heap. */ template<typename _RandomAccessIterator> inline void make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) { // concept requirements __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept< _RandomAccessIterator>) __glibcxx_function_requires(_LessThanComparableConcept< typename iterator_traits<_RandomAccessIterator>::value_type>) __glibcxx_requires_valid_range(__first, __last); __glibcxx_requires_irreflexive(__first, __last); __gnu_cxx::__ops::_Iter_less_iter __comp; std::__make_heap(__first, __last, __comp); } /** * @brief Construct a heap over a range using comparison functor. * @param __first Start of heap. * @param __last End of heap. * @param __comp Comparison functor to use. * @ingroup heap_algorithms * * This operation makes the elements in [__first,__last) into a heap. * Comparisons are made using __comp. */ template<typename _RandomAccessIterator, typename _Compare> inline void make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { // concept requirements __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept< _RandomAccessIterator>) __glibcxx_requires_valid_range(__first, __last); __glibcxx_requires_irreflexive_pred(__first, __last, __comp); typedef __decltype(__comp) _Cmp; __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(_GLIBCXX_MOVE(__comp)); std::__make_heap(__first, __last, __cmp); } template<typename _RandomAccessIterator, typename _Compare> void __sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare& __comp) { while (__last - __first > 1) { --__last; std::__pop_heap(__first, __last, __last, __comp); } } /** * @brief Sort a heap. * @param __first Start of heap. * @param __last End of heap. * @ingroup heap_algorithms * * This operation sorts the valid heap in the range [__first,__last). */ template<typename _RandomAccessIterator> inline void sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) { // concept requirements __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept< _RandomAccessIterator>) __glibcxx_function_requires(_LessThanComparableConcept< typename iterator_traits<_RandomAccessIterator>::value_type>) __glibcxx_requires_valid_range(__first, __last); __glibcxx_requires_irreflexive(__first, __last); __glibcxx_requires_heap(__first, __last); __gnu_cxx::__ops::_Iter_less_iter __comp; std::__sort_heap(__first, __last, __comp); } /** * @brief Sort a heap using comparison functor. * @param __first Start of heap. * @param __last End of heap. * @param __comp Comparison functor to use. * @ingroup heap_algorithms * * This operation sorts the valid heap in the range [__first,__last). * Comparisons are made using __comp. */ template<typename _RandomAccessIterator, typename _Compare> inline void sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { // concept requirements __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept< _RandomAccessIterator>) __glibcxx_requires_valid_range(__first, __last); __glibcxx_requires_irreflexive_pred(__first, __last, __comp); __glibcxx_requires_heap_pred(__first, __last, __comp); typedef __decltype(__comp) _Cmp; __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(_GLIBCXX_MOVE(__comp)); std::__sort_heap(__first, __last, __cmp); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 465 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_heap.h" 3 /** * @brief Search the end of a heap. * @param __first Start of range. * @param __last End of range. * @return An iterator pointing to the first element not in the heap. * @ingroup heap_algorithms * * This operation returns the last iterator i in [__first, __last) for which * the range [__first, i) is a heap. */ template<typename _RandomAccessIterator> inline _RandomAccessIterator is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last) { // concept requirements __glibcxx_function_requires(_RandomAccessIteratorConcept< _RandomAccessIterator>) __glibcxx_function_requires(_LessThanComparableConcept< typename iterator_traits<_RandomAccessIterator>::value_type>) __glibcxx_requires_valid_range(__first, __last); __glibcxx_requires_irreflexive(__first, __last); __gnu_cxx::__ops::_Iter_less_iter __comp; return __first + std::__is_heap_until(__first, std::distance(__first, __last), __comp); } /** * @brief Search the end of a heap using comparison functor. * @param __first Start of range. * @param __last End of range. * @param __comp Comparison functor to use. * @return An iterator pointing to the first element not in the heap. * @ingroup heap_algorithms * * This operation returns the last iterator i in [__first, __last) for which * the range [__first, i) is a heap. Comparisons are made using __comp. */ template<typename _RandomAccessIterator, typename _Compare> inline _RandomAccessIterator is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { // concept requirements __glibcxx_function_requires(_RandomAccessIteratorConcept< _RandomAccessIterator>) __glibcxx_requires_valid_range(__first, __last); __glibcxx_requires_irreflexive_pred(__first, __last, __comp); typedef __decltype(__comp) _Cmp; __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(_GLIBCXX_MOVE(__comp)); return __first + std::__is_heap_until(__first, std::distance(__first, __last), __cmp); } /** * @brief Determines whether a range is a heap. * @param __first Start of range. * @param __last End of range. * @return True if range is a heap, false otherwise. * @ingroup heap_algorithms */ template<typename _RandomAccessIterator> inline bool is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) { return std::is_heap_until(__first, __last) == __last; } /** * @brief Determines whether a range is a heap using comparison functor. * @param __first Start of range. * @param __last End of range. * @param __comp Comparison functor to use. * @return True if range is a heap, false otherwise. * @ingroup heap_algorithms */ template<typename _RandomAccessIterator, typename _Compare> inline bool is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { // concept requirements __glibcxx_function_requires(_RandomAccessIteratorConcept< _RandomAccessIterator>) __glibcxx_requires_valid_range(__first, __last); __glibcxx_requires_irreflexive_pred(__first, __last, __comp); const auto __dist = std::distance(__first, __last); typedef __decltype(__comp) _Cmp; __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(_GLIBCXX_MOVE(__comp)); return std::__is_heap_until(__first, __dist, __cmp) == __dist; } #endif # 557 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_heap.h" 3 _GLIBCXX_END_NAMESPACE_VERSION } // namespace #endif /* _STL_HEAP_H */ # 562 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_heap.h" 3 # 63 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/queue" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/stl_function.h> #endif /* expanded by -frewrite-includes */ # 63 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/queue" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_function.h" 1 3 // Functor implementations -*- C++ -*- // Copyright (C) 2001-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /* * * Copyright (c) 1994 * Hewlett-Packard Company * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Hewlett-Packard Company makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. * * * Copyright (c) 1996-1998 * Silicon Graphics Computer Systems, Inc. * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Silicon Graphics makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. */ /** @file bits/stl_function.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{functional} */ #ifndef _STL_FUNCTION_H #define _STL_FUNCTION_H 1 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 60 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_function.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/move.h> #endif /* expanded by -frewrite-includes */ # 60 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_function.h" 3 # 61 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_function.h" 3 #endif # 62 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_function.h" 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION // 20.3.1 base classes /** @defgroup functors Function Objects * @ingroup utilities * * Function objects, or @e functors, are objects with an @c operator() * defined and accessible. They can be passed as arguments to algorithm * templates and used in place of a function pointer. Not only is the * resulting expressiveness of the library increased, but the generated * code can be more efficient than what you might write by hand. When we * refer to @a functors, then, generally we include function pointers in * the description as well. * * Often, functors are only created as temporaries passed to algorithm * calls, rather than being created as named variables. * * Two examples taken from the standard itself follow. To perform a * by-element addition of two vectors @c a and @c b containing @c double, * and put the result in @c a, use * \code * transform (a.begin(), a.end(), b.begin(), a.begin(), plus<double>()); * \endcode * To negate every element in @c a, use * \code * transform(a.begin(), a.end(), a.begin(), negate<double>()); * \endcode * The addition and negation functions will be inlined directly. * * The standard functors are derived from structs named @c unary_function * and @c binary_function. These two classes contain nothing but typedefs, * to aid in generic (template) programming. If you write your own * functors, you might consider doing the same. * * @{ */ /** * This is one of the @link functors functor base classes@endlink. */ template<typename _Arg, typename _Result> struct unary_function { /// @c argument_type is the type of the argument typedef _Arg argument_type; /// @c result_type is the return type typedef _Result result_type; }; /** * This is one of the @link functors functor base classes@endlink. */ template<typename _Arg1, typename _Arg2, typename _Result> struct binary_function { /// @c first_argument_type is the type of the first argument typedef _Arg1 first_argument_type; /// @c second_argument_type is the type of the second argument typedef _Arg2 second_argument_type; /// @c result_type is the return type typedef _Result result_type; }; /** @} */ // 20.3.2 arithmetic /** @defgroup arithmetic_functors Arithmetic Classes * @ingroup functors * * Because basic math often needs to be done during an algorithm, * the library provides functors for those operations. See the * documentation for @link functors the base classes@endlink * for examples of their use. * * @{ */ #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 144 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_function.h" 3 struct __is_transparent; // undefined template<typename _Tp = void> struct plus; template<typename _Tp = void> struct minus; template<typename _Tp = void> struct multiplies; template<typename _Tp = void> struct divides; template<typename _Tp = void> struct modulus; template<typename _Tp = void> struct negate; #endif # 164 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_function.h" 3 /// One of the @link arithmetic_functors math functors@endlink. template<typename _Tp> struct plus : public binary_function<_Tp, _Tp, _Tp> { _GLIBCXX14_CONSTEXPR _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x + __y; } }; /// One of the @link arithmetic_functors math functors@endlink. template<typename _Tp> struct minus : public binary_function<_Tp, _Tp, _Tp> { _GLIBCXX14_CONSTEXPR _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x - __y; } }; /// One of the @link arithmetic_functors math functors@endlink. template<typename _Tp> struct multiplies : public binary_function<_Tp, _Tp, _Tp> { _GLIBCXX14_CONSTEXPR _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x * __y; } }; /// One of the @link arithmetic_functors math functors@endlink. template<typename _Tp> struct divides : public binary_function<_Tp, _Tp, _Tp> { _GLIBCXX14_CONSTEXPR _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x / __y; } }; /// One of the @link arithmetic_functors math functors@endlink. template<typename _Tp> struct modulus : public binary_function<_Tp, _Tp, _Tp> { _GLIBCXX14_CONSTEXPR _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x % __y; } }; /// One of the @link arithmetic_functors math functors@endlink. template<typename _Tp> struct negate : public unary_function<_Tp, _Tp> { _GLIBCXX14_CONSTEXPR _Tp operator()(const _Tp& __x) const { return -__x; } }; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 226 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_function.h" 3 #define __cpp_lib_transparent_operators 201510 template<> struct plus<void> { template <typename _Tp, typename _Up> _GLIBCXX14_CONSTEXPR auto operator()(_Tp&& __t, _Up&& __u) const noexcept(noexcept(std::forward<_Tp>(__t) + std::forward<_Up>(__u))) -> decltype(std::forward<_Tp>(__t) + std::forward<_Up>(__u)) { return std::forward<_Tp>(__t) + std::forward<_Up>(__u); } typedef __is_transparent is_transparent; }; /// One of the @link arithmetic_functors math functors@endlink. template<> struct minus<void> { template <typename _Tp, typename _Up> _GLIBCXX14_CONSTEXPR auto operator()(_Tp&& __t, _Up&& __u) const noexcept(noexcept(std::forward<_Tp>(__t) - std::forward<_Up>(__u))) -> decltype(std::forward<_Tp>(__t) - std::forward<_Up>(__u)) { return std::forward<_Tp>(__t) - std::forward<_Up>(__u); } typedef __is_transparent is_transparent; }; /// One of the @link arithmetic_functors math functors@endlink. template<> struct multiplies<void> { template <typename _Tp, typename _Up> _GLIBCXX14_CONSTEXPR auto operator()(_Tp&& __t, _Up&& __u) const noexcept(noexcept(std::forward<_Tp>(__t) * std::forward<_Up>(__u))) -> decltype(std::forward<_Tp>(__t) * std::forward<_Up>(__u)) { return std::forward<_Tp>(__t) * std::forward<_Up>(__u); } typedef __is_transparent is_transparent; }; /// One of the @link arithmetic_functors math functors@endlink. template<> struct divides<void> { template <typename _Tp, typename _Up> _GLIBCXX14_CONSTEXPR auto operator()(_Tp&& __t, _Up&& __u) const noexcept(noexcept(std::forward<_Tp>(__t) / std::forward<_Up>(__u))) -> decltype(std::forward<_Tp>(__t) / std::forward<_Up>(__u)) { return std::forward<_Tp>(__t) / std::forward<_Up>(__u); } typedef __is_transparent is_transparent; }; /// One of the @link arithmetic_functors math functors@endlink. template<> struct modulus<void> { template <typename _Tp, typename _Up> _GLIBCXX14_CONSTEXPR auto operator()(_Tp&& __t, _Up&& __u) const noexcept(noexcept(std::forward<_Tp>(__t) % std::forward<_Up>(__u))) -> decltype(std::forward<_Tp>(__t) % std::forward<_Up>(__u)) { return std::forward<_Tp>(__t) % std::forward<_Up>(__u); } typedef __is_transparent is_transparent; }; /// One of the @link arithmetic_functors math functors@endlink. template<> struct negate<void> { template <typename _Tp> _GLIBCXX14_CONSTEXPR auto operator()(_Tp&& __t) const noexcept(noexcept(-std::forward<_Tp>(__t))) -> decltype(-std::forward<_Tp>(__t)) { return -std::forward<_Tp>(__t); } typedef __is_transparent is_transparent; }; #endif # 318 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_function.h" 3 /** @} */ // 20.3.3 comparisons /** @defgroup comparison_functors Comparison Classes * @ingroup functors * * The library provides six wrapper functors for all the basic comparisons * in C++, like @c <. * * @{ */ #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 330 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_function.h" 3 template<typename _Tp = void> struct equal_to; template<typename _Tp = void> struct not_equal_to; template<typename _Tp = void> struct greater; template<typename _Tp = void> struct less; template<typename _Tp = void> struct greater_equal; template<typename _Tp = void> struct less_equal; #endif # 348 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_function.h" 3 /// One of the @link comparison_functors comparison functors@endlink. template<typename _Tp> struct equal_to : public binary_function<_Tp, _Tp, bool> { _GLIBCXX14_CONSTEXPR bool operator()(const _Tp& __x, const _Tp& __y) const { return __x == __y; } }; /// One of the @link comparison_functors comparison functors@endlink. template<typename _Tp> struct not_equal_to : public binary_function<_Tp, _Tp, bool> { _GLIBCXX14_CONSTEXPR bool operator()(const _Tp& __x, const _Tp& __y) const { return __x != __y; } }; /// One of the @link comparison_functors comparison functors@endlink. template<typename _Tp> struct greater : public binary_function<_Tp, _Tp, bool> { _GLIBCXX14_CONSTEXPR bool operator()(const _Tp& __x, const _Tp& __y) const { return __x > __y; } }; /// One of the @link comparison_functors comparison functors@endlink. template<typename _Tp> struct less : public binary_function<_Tp, _Tp, bool> { _GLIBCXX14_CONSTEXPR bool operator()(const _Tp& __x, const _Tp& __y) const { return __x < __y; } }; /// One of the @link comparison_functors comparison functors@endlink. template<typename _Tp> struct greater_equal : public binary_function<_Tp, _Tp, bool> { _GLIBCXX14_CONSTEXPR bool operator()(const _Tp& __x, const _Tp& __y) const { return __x >= __y; } }; /// One of the @link comparison_functors comparison functors@endlink. template<typename _Tp> struct less_equal : public binary_function<_Tp, _Tp, bool> { _GLIBCXX14_CONSTEXPR bool operator()(const _Tp& __x, const _Tp& __y) const { return __x <= __y; } }; // Partial specialization of std::greater for pointers. template<typename _Tp> struct greater<_Tp*> : public binary_function<_Tp*, _Tp*, bool> { _GLIBCXX14_CONSTEXPR bool operator()(_Tp* __x, _Tp* __y) const _GLIBCXX_NOTHROW { #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201402L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 417 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_function.h" 3 #ifdef _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED if (__builtin_is_constant_evaluated()) #else # 420 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_function.h" 3 if (__builtin_constant_p(__x > __y)) #endif # 422 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_function.h" 3 return __x > __y; #endif # 424 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_function.h" 3 return (__UINTPTR_TYPE__)__x > (__UINTPTR_TYPE__)__y; } }; // Partial specialization of std::less for pointers. template<typename _Tp> struct less<_Tp*> : public binary_function<_Tp*, _Tp*, bool> { _GLIBCXX14_CONSTEXPR bool operator()(_Tp* __x, _Tp* __y) const _GLIBCXX_NOTHROW { #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201402L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 436 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_function.h" 3 #ifdef _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED if (__builtin_is_constant_evaluated()) #else # 439 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_function.h" 3 if (__builtin_constant_p(__x < __y)) #endif # 441 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_function.h" 3 return __x < __y; #endif # 443 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_function.h" 3 return (__UINTPTR_TYPE__)__x < (__UINTPTR_TYPE__)__y; } }; // Partial specialization of std::greater_equal for pointers. template<typename _Tp> struct greater_equal<_Tp*> : public binary_function<_Tp*, _Tp*, bool> { _GLIBCXX14_CONSTEXPR bool operator()(_Tp* __x, _Tp* __y) const _GLIBCXX_NOTHROW { #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201402L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 455 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_function.h" 3 #ifdef _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED if (__builtin_is_constant_evaluated()) #else # 458 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_function.h" 3 if (__builtin_constant_p(__x >= __y)) #endif # 460 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_function.h" 3 return __x >= __y; #endif # 462 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_function.h" 3 return (__UINTPTR_TYPE__)__x >= (__UINTPTR_TYPE__)__y; } }; // Partial specialization of std::less_equal for pointers. template<typename _Tp> struct less_equal<_Tp*> : public binary_function<_Tp*, _Tp*, bool> { _GLIBCXX14_CONSTEXPR bool operator()(_Tp* __x, _Tp* __y) const _GLIBCXX_NOTHROW { #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201402L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 474 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_function.h" 3 #ifdef _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED if (__builtin_is_constant_evaluated()) #else # 477 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_function.h" 3 if (__builtin_constant_p(__x <= __y)) #endif # 479 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_function.h" 3 return __x <= __y; #endif # 481 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_function.h" 3 return (__UINTPTR_TYPE__)__x <= (__UINTPTR_TYPE__)__y; } }; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201402L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 486 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_function.h" 3 /// One of the @link comparison_functors comparison functors@endlink. template<> struct equal_to<void> { template <typename _Tp, typename _Up> constexpr auto operator()(_Tp&& __t, _Up&& __u) const noexcept(noexcept(std::forward<_Tp>(__t) == std::forward<_Up>(__u))) -> decltype(std::forward<_Tp>(__t) == std::forward<_Up>(__u)) { return std::forward<_Tp>(__t) == std::forward<_Up>(__u); } typedef __is_transparent is_transparent; }; /// One of the @link comparison_functors comparison functors@endlink. template<> struct not_equal_to<void> { template <typename _Tp, typename _Up> constexpr auto operator()(_Tp&& __t, _Up&& __u) const noexcept(noexcept(std::forward<_Tp>(__t) != std::forward<_Up>(__u))) -> decltype(std::forward<_Tp>(__t) != std::forward<_Up>(__u)) { return std::forward<_Tp>(__t) != std::forward<_Up>(__u); } typedef __is_transparent is_transparent; }; /// One of the @link comparison_functors comparison functors@endlink. template<> struct greater<void> { template <typename _Tp, typename _Up> constexpr auto operator()(_Tp&& __t, _Up&& __u) const noexcept(noexcept(std::forward<_Tp>(__t) > std::forward<_Up>(__u))) -> decltype(std::forward<_Tp>(__t) > std::forward<_Up>(__u)) { return _S_cmp(std::forward<_Tp>(__t), std::forward<_Up>(__u), __ptr_cmp<_Tp, _Up>{}); } template<typename _Tp, typename _Up> constexpr bool operator()(_Tp* __t, _Up* __u) const noexcept { return greater<common_type_t<_Tp*, _Up*>>{}(__t, __u); } typedef __is_transparent is_transparent; private: template <typename _Tp, typename _Up> static constexpr decltype(auto) _S_cmp(_Tp&& __t, _Up&& __u, false_type) { return std::forward<_Tp>(__t) > std::forward<_Up>(__u); } template <typename _Tp, typename _Up> static constexpr bool _S_cmp(_Tp&& __t, _Up&& __u, true_type) noexcept { return greater<const volatile void*>{}( static_cast<const volatile void*>(std::forward<_Tp>(__t)), static_cast<const volatile void*>(std::forward<_Up>(__u))); } // True if there is no viable operator> member function. template<typename _Tp, typename _Up, typename = void> struct __not_overloaded2 : true_type { }; // False if we can call T.operator>(U) template<typename _Tp, typename _Up> struct __not_overloaded2<_Tp, _Up, __void_t< decltype(std::declval<_Tp>().operator>(std::declval<_Up>()))>> : false_type { }; // True if there is no overloaded operator> for these operands. template<typename _Tp, typename _Up, typename = void> struct __not_overloaded : __not_overloaded2<_Tp, _Up> { }; // False if we can call operator>(T,U) template<typename _Tp, typename _Up> struct __not_overloaded<_Tp, _Up, __void_t< decltype(operator>(std::declval<_Tp>(), std::declval<_Up>()))>> : false_type { }; template<typename _Tp, typename _Up> using __ptr_cmp = __and_<__not_overloaded<_Tp, _Up>, is_convertible<_Tp, const volatile void*>, is_convertible<_Up, const volatile void*>>; }; /// One of the @link comparison_functors comparison functors@endlink. template<> struct less<void> { template <typename _Tp, typename _Up> constexpr auto operator()(_Tp&& __t, _Up&& __u) const noexcept(noexcept(std::forward<_Tp>(__t) < std::forward<_Up>(__u))) -> decltype(std::forward<_Tp>(__t) < std::forward<_Up>(__u)) { return _S_cmp(std::forward<_Tp>(__t), std::forward<_Up>(__u), __ptr_cmp<_Tp, _Up>{}); } template<typename _Tp, typename _Up> constexpr bool operator()(_Tp* __t, _Up* __u) const noexcept { return less<common_type_t<_Tp*, _Up*>>{}(__t, __u); } typedef __is_transparent is_transparent; private: template <typename _Tp, typename _Up> static constexpr decltype(auto) _S_cmp(_Tp&& __t, _Up&& __u, false_type) { return std::forward<_Tp>(__t) < std::forward<_Up>(__u); } template <typename _Tp, typename _Up> static constexpr bool _S_cmp(_Tp&& __t, _Up&& __u, true_type) noexcept { return less<const volatile void*>{}( static_cast<const volatile void*>(std::forward<_Tp>(__t)), static_cast<const volatile void*>(std::forward<_Up>(__u))); } // True if there is no viable operator< member function. template<typename _Tp, typename _Up, typename = void> struct __not_overloaded2 : true_type { }; // False if we can call T.operator<(U) template<typename _Tp, typename _Up> struct __not_overloaded2<_Tp, _Up, __void_t< decltype(std::declval<_Tp>().operator<(std::declval<_Up>()))>> : false_type { }; // True if there is no overloaded operator< for these operands. template<typename _Tp, typename _Up, typename = void> struct __not_overloaded : __not_overloaded2<_Tp, _Up> { }; // False if we can call operator<(T,U) template<typename _Tp, typename _Up> struct __not_overloaded<_Tp, _Up, __void_t< decltype(operator<(std::declval<_Tp>(), std::declval<_Up>()))>> : false_type { }; template<typename _Tp, typename _Up> using __ptr_cmp = __and_<__not_overloaded<_Tp, _Up>, is_convertible<_Tp, const volatile void*>, is_convertible<_Up, const volatile void*>>; }; /// One of the @link comparison_functors comparison functors@endlink. template<> struct greater_equal<void> { template <typename _Tp, typename _Up> constexpr auto operator()(_Tp&& __t, _Up&& __u) const noexcept(noexcept(std::forward<_Tp>(__t) >= std::forward<_Up>(__u))) -> decltype(std::forward<_Tp>(__t) >= std::forward<_Up>(__u)) { return _S_cmp(std::forward<_Tp>(__t), std::forward<_Up>(__u), __ptr_cmp<_Tp, _Up>{}); } template<typename _Tp, typename _Up> constexpr bool operator()(_Tp* __t, _Up* __u) const noexcept { return greater_equal<common_type_t<_Tp*, _Up*>>{}(__t, __u); } typedef __is_transparent is_transparent; private: template <typename _Tp, typename _Up> static constexpr decltype(auto) _S_cmp(_Tp&& __t, _Up&& __u, false_type) { return std::forward<_Tp>(__t) >= std::forward<_Up>(__u); } template <typename _Tp, typename _Up> static constexpr bool _S_cmp(_Tp&& __t, _Up&& __u, true_type) noexcept { return greater_equal<const volatile void*>{}( static_cast<const volatile void*>(std::forward<_Tp>(__t)), static_cast<const volatile void*>(std::forward<_Up>(__u))); } // True if there is no viable operator>= member function. template<typename _Tp, typename _Up, typename = void> struct __not_overloaded2 : true_type { }; // False if we can call T.operator>=(U) template<typename _Tp, typename _Up> struct __not_overloaded2<_Tp, _Up, __void_t< decltype(std::declval<_Tp>().operator>=(std::declval<_Up>()))>> : false_type { }; // True if there is no overloaded operator>= for these operands. template<typename _Tp, typename _Up, typename = void> struct __not_overloaded : __not_overloaded2<_Tp, _Up> { }; // False if we can call operator>=(T,U) template<typename _Tp, typename _Up> struct __not_overloaded<_Tp, _Up, __void_t< decltype(operator>=(std::declval<_Tp>(), std::declval<_Up>()))>> : false_type { }; template<typename _Tp, typename _Up> using __ptr_cmp = __and_<__not_overloaded<_Tp, _Up>, is_convertible<_Tp, const volatile void*>, is_convertible<_Up, const volatile void*>>; }; /// One of the @link comparison_functors comparison functors@endlink. template<> struct less_equal<void> { template <typename _Tp, typename _Up> constexpr auto operator()(_Tp&& __t, _Up&& __u) const noexcept(noexcept(std::forward<_Tp>(__t) <= std::forward<_Up>(__u))) -> decltype(std::forward<_Tp>(__t) <= std::forward<_Up>(__u)) { return _S_cmp(std::forward<_Tp>(__t), std::forward<_Up>(__u), __ptr_cmp<_Tp, _Up>{}); } template<typename _Tp, typename _Up> constexpr bool operator()(_Tp* __t, _Up* __u) const noexcept { return less_equal<common_type_t<_Tp*, _Up*>>{}(__t, __u); } typedef __is_transparent is_transparent; private: template <typename _Tp, typename _Up> static constexpr decltype(auto) _S_cmp(_Tp&& __t, _Up&& __u, false_type) { return std::forward<_Tp>(__t) <= std::forward<_Up>(__u); } template <typename _Tp, typename _Up> static constexpr bool _S_cmp(_Tp&& __t, _Up&& __u, true_type) noexcept { return less_equal<const volatile void*>{}( static_cast<const volatile void*>(std::forward<_Tp>(__t)), static_cast<const volatile void*>(std::forward<_Up>(__u))); } // True if there is no viable operator<= member function. template<typename _Tp, typename _Up, typename = void> struct __not_overloaded2 : true_type { }; // False if we can call T.operator<=(U) template<typename _Tp, typename _Up> struct __not_overloaded2<_Tp, _Up, __void_t< decltype(std::declval<_Tp>().operator<=(std::declval<_Up>()))>> : false_type { }; // True if there is no overloaded operator<= for these operands. template<typename _Tp, typename _Up, typename = void> struct __not_overloaded : __not_overloaded2<_Tp, _Up> { }; // False if we can call operator<=(T,U) template<typename _Tp, typename _Up> struct __not_overloaded<_Tp, _Up, __void_t< decltype(operator<=(std::declval<_Tp>(), std::declval<_Up>()))>> : false_type { }; template<typename _Tp, typename _Up> using __ptr_cmp = __and_<__not_overloaded<_Tp, _Up>, is_convertible<_Tp, const volatile void*>, is_convertible<_Up, const volatile void*>>; }; #endif // C++14 # 762 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_function.h" 3 /** @} */ // 20.3.4 logical operations /** @defgroup logical_functors Boolean Operations Classes * @ingroup functors * * Here are wrapper functors for Boolean operations: @c &&, @c ||, * and @c !. * * @{ */ #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 774 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_function.h" 3 template<typename _Tp = void> struct logical_and; template<typename _Tp = void> struct logical_or; template<typename _Tp = void> struct logical_not; #endif # 783 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_function.h" 3 /// One of the @link logical_functors Boolean operations functors@endlink. template<typename _Tp> struct logical_and : public binary_function<_Tp, _Tp, bool> { _GLIBCXX14_CONSTEXPR bool operator()(const _Tp& __x, const _Tp& __y) const { return __x && __y; } }; /// One of the @link logical_functors Boolean operations functors@endlink. template<typename _Tp> struct logical_or : public binary_function<_Tp, _Tp, bool> { _GLIBCXX14_CONSTEXPR bool operator()(const _Tp& __x, const _Tp& __y) const { return __x || __y; } }; /// One of the @link logical_functors Boolean operations functors@endlink. template<typename _Tp> struct logical_not : public unary_function<_Tp, bool> { _GLIBCXX14_CONSTEXPR bool operator()(const _Tp& __x) const { return !__x; } }; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 815 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_function.h" 3 /// One of the @link logical_functors Boolean operations functors@endlink. template<> struct logical_and<void> { template <typename _Tp, typename _Up> _GLIBCXX14_CONSTEXPR auto operator()(_Tp&& __t, _Up&& __u) const noexcept(noexcept(std::forward<_Tp>(__t) && std::forward<_Up>(__u))) -> decltype(std::forward<_Tp>(__t) && std::forward<_Up>(__u)) { return std::forward<_Tp>(__t) && std::forward<_Up>(__u); } typedef __is_transparent is_transparent; }; /// One of the @link logical_functors Boolean operations functors@endlink. template<> struct logical_or<void> { template <typename _Tp, typename _Up> _GLIBCXX14_CONSTEXPR auto operator()(_Tp&& __t, _Up&& __u) const noexcept(noexcept(std::forward<_Tp>(__t) || std::forward<_Up>(__u))) -> decltype(std::forward<_Tp>(__t) || std::forward<_Up>(__u)) { return std::forward<_Tp>(__t) || std::forward<_Up>(__u); } typedef __is_transparent is_transparent; }; /// One of the @link logical_functors Boolean operations functors@endlink. template<> struct logical_not<void> { template <typename _Tp> _GLIBCXX14_CONSTEXPR auto operator()(_Tp&& __t) const noexcept(noexcept(!std::forward<_Tp>(__t))) -> decltype(!std::forward<_Tp>(__t)) { return !std::forward<_Tp>(__t); } typedef __is_transparent is_transparent; }; #endif # 860 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_function.h" 3 /** @} */ #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 863 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_function.h" 3 template<typename _Tp = void> struct bit_and; template<typename _Tp = void> struct bit_or; template<typename _Tp = void> struct bit_xor; template<typename _Tp = void> struct bit_not; #endif # 875 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_function.h" 3 // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR 660. Missing Bitwise Operations. template<typename _Tp> struct bit_and : public binary_function<_Tp, _Tp, _Tp> { _GLIBCXX14_CONSTEXPR _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x & __y; } }; template<typename _Tp> struct bit_or : public binary_function<_Tp, _Tp, _Tp> { _GLIBCXX14_CONSTEXPR _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x | __y; } }; template<typename _Tp> struct bit_xor : public binary_function<_Tp, _Tp, _Tp> { _GLIBCXX14_CONSTEXPR _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x ^ __y; } }; template<typename _Tp> struct bit_not : public unary_function<_Tp, _Tp> { _GLIBCXX14_CONSTEXPR _Tp operator()(const _Tp& __x) const { return ~__x; } }; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 915 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_function.h" 3 template <> struct bit_and<void> { template <typename _Tp, typename _Up> _GLIBCXX14_CONSTEXPR auto operator()(_Tp&& __t, _Up&& __u) const noexcept(noexcept(std::forward<_Tp>(__t) & std::forward<_Up>(__u))) -> decltype(std::forward<_Tp>(__t) & std::forward<_Up>(__u)) { return std::forward<_Tp>(__t) & std::forward<_Up>(__u); } typedef __is_transparent is_transparent; }; template <> struct bit_or<void> { template <typename _Tp, typename _Up> _GLIBCXX14_CONSTEXPR auto operator()(_Tp&& __t, _Up&& __u) const noexcept(noexcept(std::forward<_Tp>(__t) | std::forward<_Up>(__u))) -> decltype(std::forward<_Tp>(__t) | std::forward<_Up>(__u)) { return std::forward<_Tp>(__t) | std::forward<_Up>(__u); } typedef __is_transparent is_transparent; }; template <> struct bit_xor<void> { template <typename _Tp, typename _Up> _GLIBCXX14_CONSTEXPR auto operator()(_Tp&& __t, _Up&& __u) const noexcept(noexcept(std::forward<_Tp>(__t) ^ std::forward<_Up>(__u))) -> decltype(std::forward<_Tp>(__t) ^ std::forward<_Up>(__u)) { return std::forward<_Tp>(__t) ^ std::forward<_Up>(__u); } typedef __is_transparent is_transparent; }; template <> struct bit_not<void> { template <typename _Tp> _GLIBCXX14_CONSTEXPR auto operator()(_Tp&& __t) const noexcept(noexcept(~std::forward<_Tp>(__t))) -> decltype(~std::forward<_Tp>(__t)) { return ~std::forward<_Tp>(__t); } typedef __is_transparent is_transparent; }; #endif # 971 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_function.h" 3 // 20.3.5 negators /** @defgroup negators Negators * @ingroup functors * * The functions @c not1 and @c not2 each take a predicate functor * and return an instance of @c unary_negate or * @c binary_negate, respectively. These classes are functors whose * @c operator() performs the stored predicate function and then returns * the negation of the result. * * For example, given a vector of integers and a trivial predicate, * \code * struct IntGreaterThanThree * : public std::unary_function<int, bool> * { * bool operator() (int x) { return x > 3; } * }; * * std::find_if (v.begin(), v.end(), not1(IntGreaterThanThree())); * \endcode * The call to @c find_if will locate the first index (i) of @c v for which * <code>!(v[i] > 3)</code> is true. * * The not1/unary_negate combination works on predicates taking a single * argument. The not2/binary_negate combination works on predicates which * take two arguments. * * @{ */ /// One of the @link negators negation functors@endlink. template<typename _Predicate> class unary_negate : public unary_function<typename _Predicate::argument_type, bool> { protected: _Predicate _M_pred; public: _GLIBCXX14_CONSTEXPR explicit unary_negate(const _Predicate& __x) : _M_pred(__x) { } _GLIBCXX14_CONSTEXPR bool operator()(const typename _Predicate::argument_type& __x) const { return !_M_pred(__x); } }; /// One of the @link negators negation functors@endlink. template<typename _Predicate> _GLIBCXX14_CONSTEXPR inline unary_negate<_Predicate> not1(const _Predicate& __pred) { return unary_negate<_Predicate>(__pred); } /// One of the @link negators negation functors@endlink. template<typename _Predicate> class binary_negate : public binary_function<typename _Predicate::first_argument_type, typename _Predicate::second_argument_type, bool> { protected: _Predicate _M_pred; public: _GLIBCXX14_CONSTEXPR explicit binary_negate(const _Predicate& __x) : _M_pred(__x) { } _GLIBCXX14_CONSTEXPR bool operator()(const typename _Predicate::first_argument_type& __x, const typename _Predicate::second_argument_type& __y) const { return !_M_pred(__x, __y); } }; /// One of the @link negators negation functors@endlink. template<typename _Predicate> _GLIBCXX14_CONSTEXPR inline binary_negate<_Predicate> not2(const _Predicate& __pred) { return binary_negate<_Predicate>(__pred); } /** @} */ // 20.3.7 adaptors pointers functions /** @defgroup pointer_adaptors Adaptors for pointers to functions * @ingroup functors * * The advantage of function objects over pointers to functions is that * the objects in the standard library declare nested typedefs describing * their argument and result types with uniform names (e.g., @c result_type * from the base classes @c unary_function and @c binary_function). * Sometimes those typedefs are required, not just optional. * * Adaptors are provided to turn pointers to unary (single-argument) and * binary (double-argument) functions into function objects. The * long-winded functor @c pointer_to_unary_function is constructed with a * function pointer @c f, and its @c operator() called with argument @c x * returns @c f(x). The functor @c pointer_to_binary_function does the same * thing, but with a double-argument @c f and @c operator(). * * The function @c ptr_fun takes a pointer-to-function @c f and constructs * an instance of the appropriate functor. * * @{ */ /// One of the @link pointer_adaptors adaptors for function pointers@endlink. template<typename _Arg, typename _Result> class pointer_to_unary_function : public unary_function<_Arg, _Result> { protected: _Result (*_M_ptr)(_Arg); public: pointer_to_unary_function() { } explicit pointer_to_unary_function(_Result (*__x)(_Arg)) : _M_ptr(__x) { } _Result operator()(_Arg __x) const { return _M_ptr(__x); } }; /// One of the @link pointer_adaptors adaptors for function pointers@endlink. template<typename _Arg, typename _Result> inline pointer_to_unary_function<_Arg, _Result> ptr_fun(_Result (*__x)(_Arg)) { return pointer_to_unary_function<_Arg, _Result>(__x); } /// One of the @link pointer_adaptors adaptors for function pointers@endlink. template<typename _Arg1, typename _Arg2, typename _Result> class pointer_to_binary_function : public binary_function<_Arg1, _Arg2, _Result> { protected: _Result (*_M_ptr)(_Arg1, _Arg2); public: pointer_to_binary_function() { } explicit pointer_to_binary_function(_Result (*__x)(_Arg1, _Arg2)) : _M_ptr(__x) { } _Result operator()(_Arg1 __x, _Arg2 __y) const { return _M_ptr(__x, __y); } }; /// One of the @link pointer_adaptors adaptors for function pointers@endlink. template<typename _Arg1, typename _Arg2, typename _Result> inline pointer_to_binary_function<_Arg1, _Arg2, _Result> ptr_fun(_Result (*__x)(_Arg1, _Arg2)) { return pointer_to_binary_function<_Arg1, _Arg2, _Result>(__x); } /** @} */ template<typename _Tp> struct _Identity : public unary_function<_Tp, _Tp> { _Tp& operator()(_Tp& __x) const { return __x; } const _Tp& operator()(const _Tp& __x) const { return __x; } }; // Partial specialization, avoids confusing errors in e.g. std::set<const T>. template<typename _Tp> struct _Identity<const _Tp> : _Identity<_Tp> { }; template<typename _Pair> struct _Select1st : public unary_function<_Pair, typename _Pair::first_type> { typename _Pair::first_type& operator()(_Pair& __x) const { return __x.first; } const typename _Pair::first_type& operator()(const _Pair& __x) const { return __x.first; } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1159 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_function.h" 3 template<typename _Pair2> typename _Pair2::first_type& operator()(_Pair2& __x) const { return __x.first; } template<typename _Pair2> const typename _Pair2::first_type& operator()(const _Pair2& __x) const { return __x.first; } #endif # 1169 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_function.h" 3 }; template<typename _Pair> struct _Select2nd : public unary_function<_Pair, typename _Pair::second_type> { typename _Pair::second_type& operator()(_Pair& __x) const { return __x.second; } const typename _Pair::second_type& operator()(const _Pair& __x) const { return __x.second; } }; // 20.3.8 adaptors pointers members /** @defgroup memory_adaptors Adaptors for pointers to members * @ingroup functors * * There are a total of 8 = 2^3 function objects in this family. * (1) Member functions taking no arguments vs member functions taking * one argument. * (2) Call through pointer vs call through reference. * (3) Const vs non-const member function. * * All of this complexity is in the function objects themselves. You can * ignore it by using the helper function mem_fun and mem_fun_ref, * which create whichever type of adaptor is appropriate. * * @{ */ /// One of the @link memory_adaptors adaptors for member /// pointers@endlink. template<typename _Ret, typename _Tp> class mem_fun_t : public unary_function<_Tp*, _Ret> { public: explicit mem_fun_t(_Ret (_Tp::*__pf)()) : _M_f(__pf) { } _Ret operator()(_Tp* __p) const { return (__p->*_M_f)(); } private: _Ret (_Tp::*_M_f)(); }; /// One of the @link memory_adaptors adaptors for member /// pointers@endlink. template<typename _Ret, typename _Tp> class const_mem_fun_t : public unary_function<const _Tp*, _Ret> { public: explicit const_mem_fun_t(_Ret (_Tp::*__pf)() const) : _M_f(__pf) { } _Ret operator()(const _Tp* __p) const { return (__p->*_M_f)(); } private: _Ret (_Tp::*_M_f)() const; }; /// One of the @link memory_adaptors adaptors for member /// pointers@endlink. template<typename _Ret, typename _Tp> class mem_fun_ref_t : public unary_function<_Tp, _Ret> { public: explicit mem_fun_ref_t(_Ret (_Tp::*__pf)()) : _M_f(__pf) { } _Ret operator()(_Tp& __r) const { return (__r.*_M_f)(); } private: _Ret (_Tp::*_M_f)(); }; /// One of the @link memory_adaptors adaptors for member /// pointers@endlink. template<typename _Ret, typename _Tp> class const_mem_fun_ref_t : public unary_function<_Tp, _Ret> { public: explicit const_mem_fun_ref_t(_Ret (_Tp::*__pf)() const) : _M_f(__pf) { } _Ret operator()(const _Tp& __r) const { return (__r.*_M_f)(); } private: _Ret (_Tp::*_M_f)() const; }; /// One of the @link memory_adaptors adaptors for member /// pointers@endlink. template<typename _Ret, typename _Tp, typename _Arg> class mem_fun1_t : public binary_function<_Tp*, _Arg, _Ret> { public: explicit mem_fun1_t(_Ret (_Tp::*__pf)(_Arg)) : _M_f(__pf) { } _Ret operator()(_Tp* __p, _Arg __x) const { return (__p->*_M_f)(__x); } private: _Ret (_Tp::*_M_f)(_Arg); }; /// One of the @link memory_adaptors adaptors for member /// pointers@endlink. template<typename _Ret, typename _Tp, typename _Arg> class const_mem_fun1_t : public binary_function<const _Tp*, _Arg, _Ret> { public: explicit const_mem_fun1_t(_Ret (_Tp::*__pf)(_Arg) const) : _M_f(__pf) { } _Ret operator()(const _Tp* __p, _Arg __x) const { return (__p->*_M_f)(__x); } private: _Ret (_Tp::*_M_f)(_Arg) const; }; /// One of the @link memory_adaptors adaptors for member /// pointers@endlink. template<typename _Ret, typename _Tp, typename _Arg> class mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret> { public: explicit mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg)) : _M_f(__pf) { } _Ret operator()(_Tp& __r, _Arg __x) const { return (__r.*_M_f)(__x); } private: _Ret (_Tp::*_M_f)(_Arg); }; /// One of the @link memory_adaptors adaptors for member /// pointers@endlink. template<typename _Ret, typename _Tp, typename _Arg> class const_mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret> { public: explicit const_mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg) const) : _M_f(__pf) { } _Ret operator()(const _Tp& __r, _Arg __x) const { return (__r.*_M_f)(__x); } private: _Ret (_Tp::*_M_f)(_Arg) const; }; // Mem_fun adaptor helper functions. There are only two: // mem_fun and mem_fun_ref. template<typename _Ret, typename _Tp> inline mem_fun_t<_Ret, _Tp> mem_fun(_Ret (_Tp::*__f)()) { return mem_fun_t<_Ret, _Tp>(__f); } template<typename _Ret, typename _Tp> inline const_mem_fun_t<_Ret, _Tp> mem_fun(_Ret (_Tp::*__f)() const) { return const_mem_fun_t<_Ret, _Tp>(__f); } template<typename _Ret, typename _Tp> inline mem_fun_ref_t<_Ret, _Tp> mem_fun_ref(_Ret (_Tp::*__f)()) { return mem_fun_ref_t<_Ret, _Tp>(__f); } template<typename _Ret, typename _Tp> inline const_mem_fun_ref_t<_Ret, _Tp> mem_fun_ref(_Ret (_Tp::*__f)() const) { return const_mem_fun_ref_t<_Ret, _Tp>(__f); } template<typename _Ret, typename _Tp, typename _Arg> inline mem_fun1_t<_Ret, _Tp, _Arg> mem_fun(_Ret (_Tp::*__f)(_Arg)) { return mem_fun1_t<_Ret, _Tp, _Arg>(__f); } template<typename _Ret, typename _Tp, typename _Arg> inline const_mem_fun1_t<_Ret, _Tp, _Arg> mem_fun(_Ret (_Tp::*__f)(_Arg) const) { return const_mem_fun1_t<_Ret, _Tp, _Arg>(__f); } template<typename _Ret, typename _Tp, typename _Arg> inline mem_fun1_ref_t<_Ret, _Tp, _Arg> mem_fun_ref(_Ret (_Tp::*__f)(_Arg)) { return mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); } template<typename _Ret, typename _Tp, typename _Arg> inline const_mem_fun1_ref_t<_Ret, _Tp, _Arg> mem_fun_ref(_Ret (_Tp::*__f)(_Arg) const) { return const_mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); } /** @} */ _GLIBCXX_END_NAMESPACE_VERSION } // namespace #if 0 /* disabled by -frewrite-includes */ #if (__cplusplus < 201103L) || _GLIBCXX_USE_DEPRECATED #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1392 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_function.h" 3 #if 0 /* expanded by -frewrite-includes */ # include <backward/binders.h> #endif /* expanded by -frewrite-includes */ # 1392 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_function.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/backward/binders.h" 1 3 // Functor implementations -*- C++ -*- // Copyright (C) 2001-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /* * * Copyright (c) 1994 * Hewlett-Packard Company * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Hewlett-Packard Company makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. * * * Copyright (c) 1996-1998 * Silicon Graphics Computer Systems, Inc. * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Silicon Graphics makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. */ /** @file backward/binders.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{functional} */ #ifndef _BACKWARD_BINDERS_H #define _BACKWARD_BINDERS_H 1 // Suppress deprecated warning for this file. #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION // 20.3.6 binders /** @defgroup binders Binder Classes * @ingroup functors * * Binders turn functions/functors with two arguments into functors * with a single argument, storing an argument to be applied later. * For example, a variable @c B of type @c binder1st is constructed * from a functor @c f and an argument @c x. Later, B's @c * operator() is called with a single argument @c y. The return * value is the value of @c f(x,y). @c B can be @a called with * various arguments (y1, y2, ...) and will in turn call @c * f(x,y1), @c f(x,y2), ... * * The function @c bind1st is provided to save some typing. It takes the * function and an argument as parameters, and returns an instance of * @c binder1st. * * The type @c binder2nd and its creator function @c bind2nd do the same * thing, but the stored argument is passed as the second parameter instead * of the first, e.g., @c bind2nd(std::minus<float>(),1.3) will create a * functor whose @c operator() accepts a floating-point number, subtracts * 1.3 from it, and returns the result. (If @c bind1st had been used, * the functor would perform <em>1.3 - x</em> instead. * * Creator-wrapper functions like @c bind1st are intended to be used in * calling algorithms. Their return values will be temporary objects. * (The goal is to not require you to type names like * @c std::binder1st<std::plus<int>> for declaring a variable to hold the * return value from @c bind1st(std::plus<int>(),5). * * These become more useful when combined with the composition functions. * * These functions are deprecated in C++11 and can be replaced by * @c std::bind (or @c std::tr1::bind) which is more powerful and flexible, * supporting functions with any number of arguments. Uses of @c bind1st * can be replaced by @c std::bind(f, x, std::placeholders::_1) and * @c bind2nd by @c std::bind(f, std::placeholders::_1, x). * @{ */ /// One of the @link binders binder functors@endlink. template<typename _Operation> class binder1st : public unary_function<typename _Operation::second_argument_type, typename _Operation::result_type> { protected: _Operation op; typename _Operation::first_argument_type value; public: binder1st(const _Operation& __x, const typename _Operation::first_argument_type& __y) : op(__x), value(__y) { } typename _Operation::result_type operator()(const typename _Operation::second_argument_type& __x) const { return op(value, __x); } // _GLIBCXX_RESOLVE_LIB_DEFECTS // 109. Missing binders for non-const sequence elements typename _Operation::result_type operator()(typename _Operation::second_argument_type& __x) const { return op(value, __x); } } _GLIBCXX_DEPRECATED; /// One of the @link binders binder functors@endlink. template<typename _Operation, typename _Tp> inline binder1st<_Operation> bind1st(const _Operation& __fn, const _Tp& __x) { typedef typename _Operation::first_argument_type _Arg1_type; return binder1st<_Operation>(__fn, _Arg1_type(__x)); } /// One of the @link binders binder functors@endlink. template<typename _Operation> class binder2nd : public unary_function<typename _Operation::first_argument_type, typename _Operation::result_type> { protected: _Operation op; typename _Operation::second_argument_type value; public: binder2nd(const _Operation& __x, const typename _Operation::second_argument_type& __y) : op(__x), value(__y) { } typename _Operation::result_type operator()(const typename _Operation::first_argument_type& __x) const { return op(__x, value); } // _GLIBCXX_RESOLVE_LIB_DEFECTS // 109. Missing binders for non-const sequence elements typename _Operation::result_type operator()(typename _Operation::first_argument_type& __x) const { return op(__x, value); } } _GLIBCXX_DEPRECATED; /// One of the @link binders binder functors@endlink. template<typename _Operation, typename _Tp> inline binder2nd<_Operation> bind2nd(const _Operation& __fn, const _Tp& __x) { typedef typename _Operation::second_argument_type _Arg2_type; return binder2nd<_Operation>(__fn, _Arg2_type(__x)); } /** @} */ _GLIBCXX_END_NAMESPACE_VERSION } // namespace #pragma GCC diagnostic pop #endif /* _BACKWARD_BINDERS_H */ # 183 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/backward/binders.h" 3 # 1393 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_function.h" 2 3 #endif # 1394 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_function.h" 3 #endif /* _STL_FUNCTION_H */ # 1396 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_function.h" 3 # 64 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/queue" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/stl_queue.h> #endif /* expanded by -frewrite-includes */ # 64 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/queue" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 1 3 // Queue implementation -*- C++ -*- // Copyright (C) 2001-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /* * * Copyright (c) 1994 * Hewlett-Packard Company * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Hewlett-Packard Company makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. * * * Copyright (c) 1996,1997 * Silicon Graphics Computer Systems, Inc. * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Silicon Graphics makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. */ /** @file bits/stl_queue.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{queue} */ #ifndef _STL_QUEUE_H #define _STL_QUEUE_H 1 #if 0 /* expanded by -frewrite-includes */ #include <bits/concept_check.h> #endif /* expanded by -frewrite-includes */ # 59 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 # 60 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <debug/debug.h> #endif /* expanded by -frewrite-includes */ # 60 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 # 61 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 62 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 #if 0 /* expanded by -frewrite-includes */ # include <bits/uses_allocator.h> #endif /* expanded by -frewrite-includes */ # 62 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/uses_allocator.h" 1 3 // Uses-allocator Construction -*- C++ -*- // Copyright (C) 2010-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #ifndef _USES_ALLOCATOR_H #define _USES_ALLOCATOR_H 1 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus < 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 29 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/uses_allocator.h" 3 #if 0 /* expanded by -frewrite-includes */ # include <bits/c++0x_warning.h> #endif /* expanded by -frewrite-includes */ # 29 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/uses_allocator.h" 3 # 30 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/uses_allocator.h" 3 #else # 31 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/uses_allocator.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <type_traits> #endif /* expanded by -frewrite-includes */ # 32 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/uses_allocator.h" 3 # 33 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/uses_allocator.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/move.h> #endif /* expanded by -frewrite-includes */ # 33 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/uses_allocator.h" 3 # 34 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/uses_allocator.h" 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION // This is used for std::experimental::erased_type from Library Fundamentals. struct __erased_type { }; // This also supports the "type-erased allocator" protocol from the // Library Fundamentals TS, where allocator_type is erased_type. // The second condition will always be false for types not using the TS. template<typename _Alloc, typename _Tp> using __is_erased_or_convertible = __or_<is_convertible<_Alloc, _Tp>, is_same<_Tp, __erased_type>>; /// [allocator.tag] struct allocator_arg_t { explicit allocator_arg_t() = default; }; _GLIBCXX17_INLINE constexpr allocator_arg_t allocator_arg = allocator_arg_t(); template<typename _Tp, typename _Alloc, typename = __void_t<>> struct __uses_allocator_helper : false_type { }; template<typename _Tp, typename _Alloc> struct __uses_allocator_helper<_Tp, _Alloc, __void_t<typename _Tp::allocator_type>> : __is_erased_or_convertible<_Alloc, typename _Tp::allocator_type>::type { }; /// [allocator.uses.trait] template<typename _Tp, typename _Alloc> struct uses_allocator : __uses_allocator_helper<_Tp, _Alloc>::type { }; struct __uses_alloc_base { }; struct __uses_alloc0 : __uses_alloc_base { struct _Sink { void operator=(const void*) { } } _M_a; }; template<typename _Alloc> struct __uses_alloc1 : __uses_alloc_base { const _Alloc* _M_a; }; template<typename _Alloc> struct __uses_alloc2 : __uses_alloc_base { const _Alloc* _M_a; }; template<bool, typename _Tp, typename _Alloc, typename... _Args> struct __uses_alloc; template<typename _Tp, typename _Alloc, typename... _Args> struct __uses_alloc<true, _Tp, _Alloc, _Args...> : conditional< is_constructible<_Tp, allocator_arg_t, const _Alloc&, _Args...>::value, __uses_alloc1<_Alloc>, __uses_alloc2<_Alloc>>::type { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 2586. Wrong value category used in scoped_allocator_adaptor::construct static_assert(__or_< is_constructible<_Tp, allocator_arg_t, const _Alloc&, _Args...>, is_constructible<_Tp, _Args..., const _Alloc&>>::value, "construction with an allocator must be possible" " if uses_allocator is true"); }; template<typename _Tp, typename _Alloc, typename... _Args> struct __uses_alloc<false, _Tp, _Alloc, _Args...> : __uses_alloc0 { }; template<typename _Tp, typename _Alloc, typename... _Args> using __uses_alloc_t = __uses_alloc<uses_allocator<_Tp, _Alloc>::value, _Tp, _Alloc, _Args...>; template<typename _Tp, typename _Alloc, typename... _Args> inline __uses_alloc_t<_Tp, _Alloc, _Args...> __use_alloc(const _Alloc& __a) { __uses_alloc_t<_Tp, _Alloc, _Args...> __ret; __ret._M_a = std::__addressof(__a); return __ret; } template<typename _Tp, typename _Alloc, typename... _Args> void __use_alloc(const _Alloc&&) = delete; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201402L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 125 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/uses_allocator.h" 3 template <typename _Tp, typename _Alloc> inline constexpr bool uses_allocator_v = uses_allocator<_Tp, _Alloc>::value; #endif // C++17 # 129 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/uses_allocator.h" 3 template<template<typename...> class _Predicate, typename _Tp, typename _Alloc, typename... _Args> struct __is_uses_allocator_predicate : conditional<uses_allocator<_Tp, _Alloc>::value, __or_<_Predicate<_Tp, allocator_arg_t, _Alloc, _Args...>, _Predicate<_Tp, _Args..., _Alloc>>, _Predicate<_Tp, _Args...>>::type { }; template<typename _Tp, typename _Alloc, typename... _Args> struct __is_uses_allocator_constructible : __is_uses_allocator_predicate<is_constructible, _Tp, _Alloc, _Args...> { }; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201402L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 144 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/uses_allocator.h" 3 template<typename _Tp, typename _Alloc, typename... _Args> _GLIBCXX17_INLINE constexpr bool __is_uses_allocator_constructible_v = __is_uses_allocator_constructible<_Tp, _Alloc, _Args...>::value; #endif // C++14 # 148 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/uses_allocator.h" 3 template<typename _Tp, typename _Alloc, typename... _Args> struct __is_nothrow_uses_allocator_constructible : __is_uses_allocator_predicate<is_nothrow_constructible, _Tp, _Alloc, _Args...> { }; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201402L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 157 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/uses_allocator.h" 3 template<typename _Tp, typename _Alloc, typename... _Args> _GLIBCXX17_INLINE constexpr bool __is_nothrow_uses_allocator_constructible_v = __is_nothrow_uses_allocator_constructible<_Tp, _Alloc, _Args...>::value; #endif // C++14 # 162 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/uses_allocator.h" 3 template<typename _Tp, typename... _Args> void __uses_allocator_construct_impl(__uses_alloc0 __a, _Tp* __ptr, _Args&&... __args) { ::new ((void*)__ptr) _Tp(std::forward<_Args>(__args)...); } template<typename _Tp, typename _Alloc, typename... _Args> void __uses_allocator_construct_impl(__uses_alloc1<_Alloc> __a, _Tp* __ptr, _Args&&... __args) { ::new ((void*)__ptr) _Tp(allocator_arg, *__a._M_a, std::forward<_Args>(__args)...); } template<typename _Tp, typename _Alloc, typename... _Args> void __uses_allocator_construct_impl(__uses_alloc2<_Alloc> __a, _Tp* __ptr, _Args&&... __args) { ::new ((void*)__ptr) _Tp(std::forward<_Args>(__args)..., *__a._M_a); } template<typename _Tp, typename _Alloc, typename... _Args> void __uses_allocator_construct(const _Alloc& __a, _Tp* __ptr, _Args&&... __args) { std::__uses_allocator_construct_impl( std::__use_alloc<_Tp, _Alloc, _Args...>(__a), __ptr, std::forward<_Args>(__args)...); } _GLIBCXX_END_NAMESPACE_VERSION } // namespace std #endif # 194 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/uses_allocator.h" 3 #endif # 195 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/uses_allocator.h" 3 # 63 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 2 3 #endif # 64 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @brief A standard container giving FIFO behavior. * * @ingroup sequences * * @tparam _Tp Type of element. * @tparam _Sequence Type of underlying sequence, defaults to deque<_Tp>. * * Meets many of the requirements of a * <a href="tables.html#65">container</a>, * but does not define anything to do with iterators. Very few of the * other standard container interfaces are defined. * * This is not a true container, but an @e adaptor. It holds another * container, and provides a wrapper interface to that container. The * wrapper is what enforces strict first-in-first-out %queue behavior. * * The second template parameter defines the type of the underlying * sequence/container. It defaults to std::deque, but it can be any type * that supports @c front, @c back, @c push_back, and @c pop_front, * such as std::list or an appropriate user-defined type. * * Members not found in @a normal containers are @c container_type, * which is a typedef for the second Sequence parameter, and @c push and * @c pop, which are standard %queue/FIFO operations. */ template<typename _Tp, typename _Sequence = deque<_Tp> > class queue { #ifdef _GLIBCXX_CONCEPT_CHECKS // concept requirements typedef typename _Sequence::value_type _Sequence_value_type; #if 0 /* disabled by -frewrite-includes */ # if __cplusplus < 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 102 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 __glibcxx_class_requires(_Tp, _SGIAssignableConcept) # endif # 104 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 __glibcxx_class_requires(_Sequence, _FrontInsertionSequenceConcept) __glibcxx_class_requires(_Sequence, _BackInsertionSequenceConcept) __glibcxx_class_requires2(_Tp, _Sequence_value_type, _SameTypeConcept) #endif # 108 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 template<typename _Tp1, typename _Seq1> friend bool operator==(const queue<_Tp1, _Seq1>&, const queue<_Tp1, _Seq1>&); template<typename _Tp1, typename _Seq1> friend bool operator<(const queue<_Tp1, _Seq1>&, const queue<_Tp1, _Seq1>&); #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 118 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 template<typename _Alloc> using _Uses = typename enable_if<uses_allocator<_Sequence, _Alloc>::value>::type; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 123 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 // _GLIBCXX_RESOLVE_LIB_DEFECTS // 2566. Requirements on the first template parameter of container // adaptors static_assert(is_same<_Tp, typename _Sequence::value_type>::value, "value_type must be the same as the underlying container"); #endif // C++17 # 129 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 #endif // C++11 # 130 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 public: typedef typename _Sequence::value_type value_type; typedef typename _Sequence::reference reference; typedef typename _Sequence::const_reference const_reference; typedef typename _Sequence::size_type size_type; typedef _Sequence container_type; protected: /* Maintainers wondering why this isn't uglified as per style * guidelines should note that this name is specified in the standard, * C++98 [23.2.3.1]. * (Why? Presumably for the same reason that it's protected instead * of private: to allow derivation. But none of the other * containers allow for derivation. Odd.) */ /// @c c is the underlying container. _Sequence c; public: /** * @brief Default constructor creates no elements. */ #if 0 /* disabled by -frewrite-includes */ #if __cplusplus < 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 154 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 explicit queue(const _Sequence& __c = _Sequence()) : c(__c) { } #else # 158 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 template<typename _Seq = _Sequence, typename _Requires = typename enable_if<is_default_constructible<_Seq>::value>::type> queue() : c() { } explicit queue(const _Sequence& __c) : c(__c) { } explicit queue(_Sequence&& __c) : c(std::move(__c)) { } template<typename _Alloc, typename _Requires = _Uses<_Alloc>> explicit queue(const _Alloc& __a) : c(__a) { } template<typename _Alloc, typename _Requires = _Uses<_Alloc>> queue(const _Sequence& __c, const _Alloc& __a) : c(__c, __a) { } template<typename _Alloc, typename _Requires = _Uses<_Alloc>> queue(_Sequence&& __c, const _Alloc& __a) : c(std::move(__c), __a) { } template<typename _Alloc, typename _Requires = _Uses<_Alloc>> queue(const queue& __q, const _Alloc& __a) : c(__q.c, __a) { } template<typename _Alloc, typename _Requires = _Uses<_Alloc>> queue(queue&& __q, const _Alloc& __a) : c(std::move(__q.c), __a) { } #endif # 192 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 /** * Returns true if the %queue is empty. */ _GLIBCXX_NODISCARD bool empty() const { return c.empty(); } /** Returns the number of elements in the %queue. */ size_type size() const { return c.size(); } /** * Returns a read/write reference to the data at the first * element of the %queue. */ reference front() { __glibcxx_requires_nonempty(); return c.front(); } /** * Returns a read-only (constant) reference to the data at the first * element of the %queue. */ const_reference front() const { __glibcxx_requires_nonempty(); return c.front(); } /** * Returns a read/write reference to the data at the last * element of the %queue. */ reference back() { __glibcxx_requires_nonempty(); return c.back(); } /** * Returns a read-only (constant) reference to the data at the last * element of the %queue. */ const_reference back() const { __glibcxx_requires_nonempty(); return c.back(); } /** * @brief Add data to the end of the %queue. * @param __x Data to be added. * * This is a typical %queue operation. The function creates an * element at the end of the %queue and assigns the given data * to it. The time complexity of the operation depends on the * underlying sequence. */ void push(const value_type& __x) { c.push_back(__x); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 263 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 void push(value_type&& __x) { c.push_back(std::move(__x)); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201402L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 268 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 template<typename... _Args> decltype(auto) emplace(_Args&&... __args) { return c.emplace_back(std::forward<_Args>(__args)...); } #else # 273 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 template<typename... _Args> void emplace(_Args&&... __args) { c.emplace_back(std::forward<_Args>(__args)...); } #endif # 278 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 #endif # 279 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 /** * @brief Removes first element. * * This is a typical %queue operation. It shrinks the %queue by one. * The time complexity of the operation depends on the underlying * sequence. * * Note that no data is returned, and if the first element's * data is needed, it should be retrieved before pop() is * called. */ void pop() { __glibcxx_requires_nonempty(); c.pop_front(); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 299 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 void swap(queue& __q) #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 302 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 noexcept(__is_nothrow_swappable<_Sequence>::value) #else # 304 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 noexcept(__is_nothrow_swappable<_Tp>::value) #endif # 306 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 { using std::swap; swap(c, __q.c); } #endif // __cplusplus >= 201103L # 311 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 }; #if 0 /* disabled by -frewrite-includes */ #if __cpp_deduction_guides >= 201606 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 314 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 template<typename _Container, typename = _RequireNotAllocator<_Container>> queue(_Container) -> queue<typename _Container::value_type, _Container>; template<typename _Container, typename _Allocator, typename = _RequireNotAllocator<_Container>, typename = _RequireAllocator<_Allocator>> queue(_Container, _Allocator) -> queue<typename _Container::value_type, _Container>; #endif # 324 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 /** * @brief Queue equality comparison. * @param __x A %queue. * @param __y A %queue of the same type as @a __x. * @return True iff the size and elements of the queues are equal. * * This is an equivalence relation. Complexity and semantics depend on the * underlying sequence type, but the expected rules are: this relation is * linear in the size of the sequences, and queues are considered equivalent * if their sequences compare equal. */ template<typename _Tp, typename _Seq> inline bool operator==(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y) { return __x.c == __y.c; } /** * @brief Queue ordering relation. * @param __x A %queue. * @param __y A %queue of the same type as @a x. * @return True iff @a __x is lexicographically less than @a __y. * * This is an total ordering relation. Complexity and semantics * depend on the underlying sequence type, but the expected rules * are: this relation is linear in the size of the sequences, the * elements must be comparable with @c <, and * std::lexicographical_compare() is usually used to make the * determination. */ template<typename _Tp, typename _Seq> inline bool operator<(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y) { return __x.c < __y.c; } /// Based on operator== template<typename _Tp, typename _Seq> inline bool operator!=(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y) { return !(__x == __y); } /// Based on operator< template<typename _Tp, typename _Seq> inline bool operator>(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y) { return __y < __x; } /// Based on operator< template<typename _Tp, typename _Seq> inline bool operator<=(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y) { return !(__y < __x); } /// Based on operator< template<typename _Tp, typename _Seq> inline bool operator>=(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y) { return !(__x < __y); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 384 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 template<typename _Tp, typename _Seq> inline #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 387 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 // Constrained free swap overload, see p0185r1 typename enable_if<__is_swappable<_Seq>::value>::type #else # 390 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 void #endif # 392 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 swap(queue<_Tp, _Seq>& __x, queue<_Tp, _Seq>& __y) noexcept(noexcept(__x.swap(__y))) { __x.swap(__y); } template<typename _Tp, typename _Seq, typename _Alloc> struct uses_allocator<queue<_Tp, _Seq>, _Alloc> : public uses_allocator<_Seq, _Alloc>::type { }; #endif // __cplusplus >= 201103L # 400 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 /** * @brief A standard container automatically sorting its contents. * * @ingroup sequences * * @tparam _Tp Type of element. * @tparam _Sequence Type of underlying sequence, defaults to vector<_Tp>. * @tparam _Compare Comparison function object type, defaults to * less<_Sequence::value_type>. * * This is not a true container, but an @e adaptor. It holds * another container, and provides a wrapper interface to that * container. The wrapper is what enforces priority-based sorting * and %queue behavior. Very few of the standard container/sequence * interface requirements are met (e.g., iterators). * * The second template parameter defines the type of the underlying * sequence/container. It defaults to std::vector, but it can be * any type that supports @c front(), @c push_back, @c pop_back, * and random-access iterators, such as std::deque or an * appropriate user-defined type. * * The third template parameter supplies the means of making * priority comparisons. It defaults to @c less<value_type> but * can be anything defining a strict weak ordering. * * Members not found in @a normal containers are @c container_type, * which is a typedef for the second Sequence parameter, and @c * push, @c pop, and @c top, which are standard %queue operations. * * @note No equality/comparison operators are provided for * %priority_queue. * * @note Sorting of the elements takes place as they are added to, * and removed from, the %priority_queue using the * %priority_queue's member functions. If you access the elements * by other means, and change their data such that the sorting * order would be different, the %priority_queue will not re-sort * the elements for you. (How could it know to do so?) */ template<typename _Tp, typename _Sequence = vector<_Tp>, typename _Compare = less<typename _Sequence::value_type> > class priority_queue { #ifdef _GLIBCXX_CONCEPT_CHECKS // concept requirements typedef typename _Sequence::value_type _Sequence_value_type; #if 0 /* disabled by -frewrite-includes */ # if __cplusplus < 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 449 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 __glibcxx_class_requires(_Tp, _SGIAssignableConcept) # endif # 451 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 __glibcxx_class_requires(_Sequence, _SequenceConcept) __glibcxx_class_requires(_Sequence, _RandomAccessContainerConcept) __glibcxx_class_requires2(_Tp, _Sequence_value_type, _SameTypeConcept) __glibcxx_class_requires4(_Compare, bool, _Tp, _Tp, _BinaryFunctionConcept) #endif # 457 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 459 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 template<typename _Alloc> using _Uses = typename enable_if<uses_allocator<_Sequence, _Alloc>::value>::type; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 464 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 // _GLIBCXX_RESOLVE_LIB_DEFECTS // 2566. Requirements on the first template parameter of container // adaptors static_assert(is_same<_Tp, typename _Sequence::value_type>::value, "value_type must be the same as the underlying container"); #endif // C++17 # 470 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 #endif // C++11 # 471 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 public: typedef typename _Sequence::value_type value_type; typedef typename _Sequence::reference reference; typedef typename _Sequence::const_reference const_reference; typedef typename _Sequence::size_type size_type; typedef _Sequence container_type; // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR 2684. priority_queue lacking comparator typedef typedef _Compare value_compare; protected: // See queue::c for notes on these names. _Sequence c; _Compare comp; public: /** * @brief Default constructor creates no elements. */ #if 0 /* disabled by -frewrite-includes */ #if __cplusplus < 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 492 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 explicit priority_queue(const _Compare& __x = _Compare(), const _Sequence& __s = _Sequence()) : c(__s), comp(__x) { std::make_heap(c.begin(), c.end(), comp); } #else # 498 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 template<typename _Seq = _Sequence, typename _Requires = typename enable_if<__and_<is_default_constructible<_Compare>, is_default_constructible<_Seq>>::value>::type> priority_queue() : c(), comp() { } explicit priority_queue(const _Compare& __x, const _Sequence& __s) : c(__s), comp(__x) { std::make_heap(c.begin(), c.end(), comp); } explicit priority_queue(const _Compare& __x, _Sequence&& __s = _Sequence()) : c(std::move(__s)), comp(__x) { std::make_heap(c.begin(), c.end(), comp); } template<typename _Alloc, typename _Requires = _Uses<_Alloc>> explicit priority_queue(const _Alloc& __a) : c(__a), comp() { } template<typename _Alloc, typename _Requires = _Uses<_Alloc>> priority_queue(const _Compare& __x, const _Alloc& __a) : c(__a), comp(__x) { } // _GLIBCXX_RESOLVE_LIB_DEFECTS // 2537. Constructors [...] taking allocators should call make_heap template<typename _Alloc, typename _Requires = _Uses<_Alloc>> priority_queue(const _Compare& __x, const _Sequence& __c, const _Alloc& __a) : c(__c, __a), comp(__x) { std::make_heap(c.begin(), c.end(), comp); } template<typename _Alloc, typename _Requires = _Uses<_Alloc>> priority_queue(const _Compare& __x, _Sequence&& __c, const _Alloc& __a) : c(std::move(__c), __a), comp(__x) { std::make_heap(c.begin(), c.end(), comp); } template<typename _Alloc, typename _Requires = _Uses<_Alloc>> priority_queue(const priority_queue& __q, const _Alloc& __a) : c(__q.c, __a), comp(__q.comp) { } template<typename _Alloc, typename _Requires = _Uses<_Alloc>> priority_queue(priority_queue&& __q, const _Alloc& __a) : c(std::move(__q.c), __a), comp(std::move(__q.comp)) { } #endif # 544 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 /** * @brief Builds a %queue from a range. * @param __first An input iterator. * @param __last An input iterator. * @param __x A comparison functor describing a strict weak ordering. * @param __s An initial sequence with which to start. * * Begins by copying @a __s, inserting a copy of the elements * from @a [first,last) into the copy of @a __s, then ordering * the copy according to @a __x. * * For more information on function objects, see the * documentation on @link functors functor base * classes@endlink. */ #if 0 /* disabled by -frewrite-includes */ #if __cplusplus < 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 561 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 template<typename _InputIterator> priority_queue(_InputIterator __first, _InputIterator __last, const _Compare& __x = _Compare(), const _Sequence& __s = _Sequence()) : c(__s), comp(__x) { __glibcxx_requires_valid_range(__first, __last); c.insert(c.end(), __first, __last); std::make_heap(c.begin(), c.end(), comp); } #else # 572 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 template<typename _InputIterator> priority_queue(_InputIterator __first, _InputIterator __last, const _Compare& __x, const _Sequence& __s) : c(__s), comp(__x) { __glibcxx_requires_valid_range(__first, __last); c.insert(c.end(), __first, __last); std::make_heap(c.begin(), c.end(), comp); } template<typename _InputIterator> priority_queue(_InputIterator __first, _InputIterator __last, const _Compare& __x = _Compare(), _Sequence&& __s = _Sequence()) : c(std::move(__s)), comp(__x) { __glibcxx_requires_valid_range(__first, __last); c.insert(c.end(), __first, __last); std::make_heap(c.begin(), c.end(), comp); } #endif # 594 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 /** * Returns true if the %queue is empty. */ _GLIBCXX_NODISCARD bool empty() const { return c.empty(); } /** Returns the number of elements in the %queue. */ size_type size() const { return c.size(); } /** * Returns a read-only (constant) reference to the data at the first * element of the %queue. */ const_reference top() const { __glibcxx_requires_nonempty(); return c.front(); } /** * @brief Add data to the %queue. * @param __x Data to be added. * * This is a typical %queue operation. * The time complexity of the operation depends on the underlying * sequence. */ void push(const value_type& __x) { c.push_back(__x); std::push_heap(c.begin(), c.end(), comp); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 634 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 void push(value_type&& __x) { c.push_back(std::move(__x)); std::push_heap(c.begin(), c.end(), comp); } template<typename... _Args> void emplace(_Args&&... __args) { c.emplace_back(std::forward<_Args>(__args)...); std::push_heap(c.begin(), c.end(), comp); } #endif # 649 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 /** * @brief Removes first element. * * This is a typical %queue operation. It shrinks the %queue * by one. The time complexity of the operation depends on the * underlying sequence. * * Note that no data is returned, and if the first element's * data is needed, it should be retrieved before pop() is * called. */ void pop() { __glibcxx_requires_nonempty(); std::pop_heap(c.begin(), c.end(), comp); c.pop_back(); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 670 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 void swap(priority_queue& __pq) noexcept(__and_< #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 674 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 __is_nothrow_swappable<_Sequence>, #else # 676 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 __is_nothrow_swappable<_Tp>, #endif # 678 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 __is_nothrow_swappable<_Compare> >::value) { using std::swap; swap(c, __pq.c); swap(comp, __pq.comp); } #endif // __cplusplus >= 201103L # 686 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 }; #if 0 /* disabled by -frewrite-includes */ #if __cpp_deduction_guides >= 201606 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 689 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 template<typename _Compare, typename _Container, typename = _RequireNotAllocator<_Compare>, typename = _RequireNotAllocator<_Container>> priority_queue(_Compare, _Container) -> priority_queue<typename _Container::value_type, _Container, _Compare>; template<typename _InputIterator, typename _ValT = typename iterator_traits<_InputIterator>::value_type, typename _Compare = less<_ValT>, typename _Container = vector<_ValT>, typename = _RequireInputIter<_InputIterator>, typename = _RequireNotAllocator<_Compare>, typename = _RequireNotAllocator<_Container>> priority_queue(_InputIterator, _InputIterator, _Compare = _Compare(), _Container = _Container()) -> priority_queue<_ValT, _Container, _Compare>; template<typename _Compare, typename _Container, typename _Allocator, typename = _RequireNotAllocator<_Compare>, typename = _RequireNotAllocator<_Container>, typename = _RequireAllocator<_Allocator>> priority_queue(_Compare, _Container, _Allocator) -> priority_queue<typename _Container::value_type, _Container, _Compare>; #endif # 713 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 // No equality/comparison operators are provided for priority_queue. #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 717 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 template<typename _Tp, typename _Sequence, typename _Compare> inline #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 720 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 // Constrained free swap overload, see p0185r1 typename enable_if<__and_<__is_swappable<_Sequence>, __is_swappable<_Compare>>::value>::type #else # 724 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 void #endif # 726 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 swap(priority_queue<_Tp, _Sequence, _Compare>& __x, priority_queue<_Tp, _Sequence, _Compare>& __y) noexcept(noexcept(__x.swap(__y))) { __x.swap(__y); } template<typename _Tp, typename _Sequence, typename _Compare, typename _Alloc> struct uses_allocator<priority_queue<_Tp, _Sequence, _Compare>, _Alloc> : public uses_allocator<_Sequence, _Alloc>::type { }; #endif // __cplusplus >= 201103L # 736 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 _GLIBCXX_END_NAMESPACE_VERSION } // namespace #endif /* _STL_QUEUE_H */ # 741 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_queue.h" 3 # 65 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/queue" 2 3 #endif /* _GLIBCXX_QUEUE */ # 67 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/queue" 3 # 3 "blah.cpp" 2 #if 0 /* expanded by -frewrite-includes */ #include <unordered_set> #endif /* expanded by -frewrite-includes */ # 3 "blah.cpp" # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/unordered_set" 1 3 // <unordered_set> -*- C++ -*- // Copyright (C) 2007-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file include/unordered_set * This is a Standard C++ Library header. */ #ifndef _GLIBCXX_UNORDERED_SET #define _GLIBCXX_UNORDERED_SET 1 #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 33 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/unordered_set" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus < 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 35 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/unordered_set" 3 #if 0 /* expanded by -frewrite-includes */ # include <bits/c++0x_warning.h> #endif /* expanded by -frewrite-includes */ # 35 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/unordered_set" 3 # 36 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/unordered_set" 3 #else # 37 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/unordered_set" 3 #if 0 /* expanded by -frewrite-includes */ #include <type_traits> #endif /* expanded by -frewrite-includes */ # 38 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/unordered_set" 3 # 39 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/unordered_set" 3 #if 0 /* expanded by -frewrite-includes */ #include <initializer_list> #endif /* expanded by -frewrite-includes */ # 39 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/unordered_set" 3 # 40 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/unordered_set" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/allocator.h> #endif /* expanded by -frewrite-includes */ # 40 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/unordered_set" 3 # 41 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/unordered_set" 3 #if 0 /* expanded by -frewrite-includes */ #include <ext/alloc_traits.h> #endif /* expanded by -frewrite-includes */ # 41 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/unordered_set" 3 # 42 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/unordered_set" 3 #if 0 /* expanded by -frewrite-includes */ #include <ext/aligned_buffer.h> #endif /* expanded by -frewrite-includes */ # 42 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/unordered_set" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/aligned_buffer.h" 1 3 // Aligned memory buffer -*- C++ -*- // Copyright (C) 2013-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file ext/aligned_buffer.h * This file is a GNU extension to the Standard C++ Library. */ #ifndef _ALIGNED_BUFFER_H #define _ALIGNED_BUFFER_H 1 #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 33 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/aligned_buffer.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 35 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/aligned_buffer.h" 3 #if 0 /* expanded by -frewrite-includes */ # include <type_traits> #endif /* expanded by -frewrite-includes */ # 35 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/aligned_buffer.h" 3 # 36 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/aligned_buffer.h" 3 #else # 37 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/aligned_buffer.h" 3 #if 0 /* expanded by -frewrite-includes */ # include <bits/c++0x_warning.h> #endif /* expanded by -frewrite-includes */ # 37 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/aligned_buffer.h" 3 # 38 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/aligned_buffer.h" 3 #endif # 39 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/aligned_buffer.h" 3 namespace __gnu_cxx { // A utility type containing a POD object that can hold an object of type // _Tp initialized via placement new or allocator_traits::construct. // Intended for use as a data member subobject, use __aligned_buffer for // complete objects. template<typename _Tp> struct __aligned_membuf { // Target macro ADJUST_FIELD_ALIGN can produce different alignment for // types when used as class members. __aligned_membuf is intended // for use as a class member, so align the buffer as for a class member. // Since GCC 8 we could just use alignof(_Tp) instead, but older // versions of non-GNU compilers might still need this trick. struct _Tp2 { _Tp _M_t; }; alignas(__alignof__(_Tp2::_M_t)) unsigned char _M_storage[sizeof(_Tp)]; __aligned_membuf() = default; // Can be used to avoid value-initialization zeroing _M_storage. __aligned_membuf(std::nullptr_t) { } void* _M_addr() noexcept { return static_cast<void*>(&_M_storage); } const void* _M_addr() const noexcept { return static_cast<const void*>(&_M_storage); } _Tp* _M_ptr() noexcept { return static_cast<_Tp*>(_M_addr()); } const _Tp* _M_ptr() const noexcept { return static_cast<const _Tp*>(_M_addr()); } }; #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_INLINE_VERSION #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 81 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/aligned_buffer.h" 3 template<typename _Tp> using __aligned_buffer = __aligned_membuf<_Tp>; #else # 84 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/aligned_buffer.h" 3 // Similar to __aligned_membuf but aligned for complete objects, not members. // This type is used in <forward_list>, <future>, <bits/shared_ptr_base.h> // and <bits/hashtable_policy.h>, but ideally they would use __aligned_membuf // instead, as it has smaller size for some types on some targets. // This type is still used to avoid an ABI change. template<typename _Tp> struct __aligned_buffer : std::aligned_storage<sizeof(_Tp), __alignof__(_Tp)> { typename std::aligned_storage<sizeof(_Tp), __alignof__(_Tp)>::type _M_storage; __aligned_buffer() = default; // Can be used to avoid value-initialization __aligned_buffer(std::nullptr_t) { } void* _M_addr() noexcept { return static_cast<void*>(&_M_storage); } const void* _M_addr() const noexcept { return static_cast<const void*>(&_M_storage); } _Tp* _M_ptr() noexcept { return static_cast<_Tp*>(_M_addr()); } const _Tp* _M_ptr() const noexcept { return static_cast<const _Tp*>(_M_addr()); } }; #endif # 122 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/aligned_buffer.h" 3 } // namespace #endif /* _ALIGNED_BUFFER_H */ # 126 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/aligned_buffer.h" 3 # 43 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/unordered_set" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/stl_pair.h> #endif /* expanded by -frewrite-includes */ # 43 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/unordered_set" 3 # 44 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/unordered_set" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/stl_function.h> // equal_to, _Identity, _Select1st #endif /* expanded by -frewrite-includes */ # 44 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/unordered_set" 3 # 45 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/unordered_set" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/functional_hash.h> #endif /* expanded by -frewrite-includes */ # 45 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/unordered_set" 3 # 46 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/unordered_set" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/hashtable.h> #endif /* expanded by -frewrite-includes */ # 46 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/unordered_set" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/hashtable.h" 1 3 // hashtable.h header -*- C++ -*- // Copyright (C) 2007-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file bits/hashtable.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{unordered_map, unordered_set} */ #ifndef _HASHTABLE_H #define _HASHTABLE_H 1 #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 34 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/hashtable.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/hashtable_policy.h> #endif /* expanded by -frewrite-includes */ # 35 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/hashtable.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/hashtable_policy.h" 1 3 // Internal policy header for unordered_set and unordered_map -*- C++ -*- // Copyright (C) 2010-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file bits/hashtable_policy.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. * @headername{unordered_map,unordered_set} */ #ifndef _HASHTABLE_POLICY_H #define _HASHTABLE_POLICY_H 1 #if 0 /* expanded by -frewrite-includes */ #include <tuple> // for std::tuple, std::forward_as_tuple #endif /* expanded by -frewrite-includes */ # 34 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/hashtable_policy.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/tuple" 1 3 // <tuple> -*- C++ -*- // Copyright (C) 2007-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file include/tuple * This is a Standard C++ Library header. */ #ifndef _GLIBCXX_TUPLE #define _GLIBCXX_TUPLE 1 #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 33 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/tuple" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus < 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 35 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/tuple" 3 #if 0 /* expanded by -frewrite-includes */ # include <bits/c++0x_warning.h> #endif /* expanded by -frewrite-includes */ # 35 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/tuple" 3 # 36 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/tuple" 3 #else # 37 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/tuple" 3 #if 0 /* expanded by -frewrite-includes */ #include <utility> #endif /* expanded by -frewrite-includes */ # 38 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/tuple" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/utility" 1 3 // <utility> -*- C++ -*- // Copyright (C) 2001-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /* * * Copyright (c) 1994 * Hewlett-Packard Company * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Hewlett-Packard Company makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. * * * Copyright (c) 1996,1997 * Silicon Graphics Computer Systems, Inc. * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Silicon Graphics makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. */ /** @file include/utility * This is a Standard C++ Library header. */ #ifndef _GLIBCXX_UTILITY #define _GLIBCXX_UTILITY 1 #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 59 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/utility" 3 /** * @defgroup utilities Utilities * * Components deemed generally useful. Includes pair, tuple, * forward/move helpers, ratio, function object, metaprogramming and * type traits, time, date, and memory functions. */ #if 0 /* expanded by -frewrite-includes */ #include <bits/c++config.h> #endif /* expanded by -frewrite-includes */ # 68 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/utility" 3 # 69 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/utility" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/stl_relops.h> #endif /* expanded by -frewrite-includes */ # 69 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/utility" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_relops.h" 1 3 // std::rel_ops implementation -*- C++ -*- // Copyright (C) 2001-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the, 2009 Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /* * * Copyright (c) 1994 * Hewlett-Packard Company * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Hewlett-Packard Company makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. * * Copyright (c) 1996,1997 * Silicon Graphics * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Silicon Graphics makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. * */ /** @file bits/stl_relops.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{utility} * * Inclusion of this file has been removed from * all of the other STL headers for safety reasons, except std_utility.h. * For more information, see the thread of about twenty messages starting * with http://gcc.gnu.org/ml/libstdc++/2001-01/msg00223.html, or * http://gcc.gnu.org/onlinedocs/libstdc++/faq.html#faq.ambiguous_overloads * * Short summary: the rel_ops operators should be avoided for the present. */ #ifndef _STL_RELOPS_H #define _STL_RELOPS_H 1 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION namespace rel_ops { /** @namespace std::rel_ops * @brief The generated relational operators are sequestered here. */ /** * @brief Defines @c != for arbitrary types, in terms of @c ==. * @param __x A thing. * @param __y Another thing. * @return __x != __y * * This function uses @c == to determine its result. */ template <class _Tp> inline bool operator!=(const _Tp& __x, const _Tp& __y) { return !(__x == __y); } /** * @brief Defines @c > for arbitrary types, in terms of @c <. * @param __x A thing. * @param __y Another thing. * @return __x > __y * * This function uses @c < to determine its result. */ template <class _Tp> inline bool operator>(const _Tp& __x, const _Tp& __y) { return __y < __x; } /** * @brief Defines @c <= for arbitrary types, in terms of @c <. * @param __x A thing. * @param __y Another thing. * @return __x <= __y * * This function uses @c < to determine its result. */ template <class _Tp> inline bool operator<=(const _Tp& __x, const _Tp& __y) { return !(__y < __x); } /** * @brief Defines @c >= for arbitrary types, in terms of @c <. * @param __x A thing. * @param __y Another thing. * @return __x >= __y * * This function uses @c < to determine its result. */ template <class _Tp> inline bool operator>=(const _Tp& __x, const _Tp& __y) { return !(__x < __y); } } // namespace rel_ops _GLIBCXX_END_NAMESPACE_VERSION } // namespace std #endif /* _STL_RELOPS_H */ # 134 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_relops.h" 3 # 70 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/utility" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/stl_pair.h> #endif /* expanded by -frewrite-includes */ # 70 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/utility" 3 # 71 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/utility" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 73 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/utility" 3 #if 0 /* expanded by -frewrite-includes */ #include <type_traits> #endif /* expanded by -frewrite-includes */ # 74 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/utility" 3 # 75 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/utility" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/move.h> #endif /* expanded by -frewrite-includes */ # 75 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/utility" 3 # 76 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/utility" 3 #if 0 /* expanded by -frewrite-includes */ #include <initializer_list> #endif /* expanded by -frewrite-includes */ # 76 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/utility" 3 # 77 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/utility" 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION /// Finds the size of a given tuple type. template<typename _Tp> struct tuple_size; // _GLIBCXX_RESOLVE_LIB_DEFECTS // 2313. tuple_size should always derive from integral_constant<size_t, N> // 2770. tuple_size<const T> specialization is not SFINAE compatible template<typename _Tp, typename _Up = typename remove_cv<_Tp>::type, typename = typename enable_if<is_same<_Tp, _Up>::value>::type, size_t = tuple_size<_Tp>::value> using __enable_if_has_tuple_size = _Tp; template<typename _Tp> struct tuple_size<const __enable_if_has_tuple_size<_Tp>> : public tuple_size<_Tp> { }; template<typename _Tp> struct tuple_size<volatile __enable_if_has_tuple_size<_Tp>> : public tuple_size<_Tp> { }; template<typename _Tp> struct tuple_size<const volatile __enable_if_has_tuple_size<_Tp>> : public tuple_size<_Tp> { }; /// Gives the type of the ith element of a given tuple type. template<std::size_t __i, typename _Tp> struct tuple_element; // Duplicate of C++14's tuple_element_t for internal use in C++11 mode template<std::size_t __i, typename _Tp> using __tuple_element_t = typename tuple_element<__i, _Tp>::type; template<std::size_t __i, typename _Tp> struct tuple_element<__i, const _Tp> { typedef typename add_const<__tuple_element_t<__i, _Tp>>::type type; }; template<std::size_t __i, typename _Tp> struct tuple_element<__i, volatile _Tp> { typedef typename add_volatile<__tuple_element_t<__i, _Tp>>::type type; }; template<std::size_t __i, typename _Tp> struct tuple_element<__i, const volatile _Tp> { typedef typename add_cv<__tuple_element_t<__i, _Tp>>::type type; }; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201402L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 135 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/utility" 3 // The standard says this macro and alias template should be in <tuple> // but we define them here, to be available when the partial specializations // of tuple_element<pair<T,U>> and tuple_element<array<T,N>> are defined. #define __cpp_lib_tuple_element_t 201402L template<std::size_t __i, typename _Tp> using tuple_element_t = typename tuple_element<__i, _Tp>::type; #endif # 143 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/utility" 3 // Various functions which give std::pair a tuple-like interface. /// Partial specialization for std::pair template<typename _T1, typename _T2> struct __is_tuple_like_impl<std::pair<_T1, _T2>> : true_type { }; /// Partial specialization for std::pair template<class _Tp1, class _Tp2> struct tuple_size<std::pair<_Tp1, _Tp2>> : public integral_constant<std::size_t, 2> { }; /// Partial specialization for std::pair template<class _Tp1, class _Tp2> struct tuple_element<0, std::pair<_Tp1, _Tp2>> { typedef _Tp1 type; }; /// Partial specialization for std::pair template<class _Tp1, class _Tp2> struct tuple_element<1, std::pair<_Tp1, _Tp2>> { typedef _Tp2 type; }; template<std::size_t _Int> struct __pair_get; template<> struct __pair_get<0> { template<typename _Tp1, typename _Tp2> static constexpr _Tp1& __get(std::pair<_Tp1, _Tp2>& __pair) noexcept { return __pair.first; } template<typename _Tp1, typename _Tp2> static constexpr _Tp1&& __move_get(std::pair<_Tp1, _Tp2>&& __pair) noexcept { return std::forward<_Tp1>(__pair.first); } template<typename _Tp1, typename _Tp2> static constexpr const _Tp1& __const_get(const std::pair<_Tp1, _Tp2>& __pair) noexcept { return __pair.first; } template<typename _Tp1, typename _Tp2> static constexpr const _Tp1&& __const_move_get(const std::pair<_Tp1, _Tp2>&& __pair) noexcept { return std::forward<const _Tp1>(__pair.first); } }; template<> struct __pair_get<1> { template<typename _Tp1, typename _Tp2> static constexpr _Tp2& __get(std::pair<_Tp1, _Tp2>& __pair) noexcept { return __pair.second; } template<typename _Tp1, typename _Tp2> static constexpr _Tp2&& __move_get(std::pair<_Tp1, _Tp2>&& __pair) noexcept { return std::forward<_Tp2>(__pair.second); } template<typename _Tp1, typename _Tp2> static constexpr const _Tp2& __const_get(const std::pair<_Tp1, _Tp2>& __pair) noexcept { return __pair.second; } template<typename _Tp1, typename _Tp2> static constexpr const _Tp2&& __const_move_get(const std::pair<_Tp1, _Tp2>&& __pair) noexcept { return std::forward<const _Tp2>(__pair.second); } }; template<std::size_t _Int, class _Tp1, class _Tp2> constexpr typename tuple_element<_Int, std::pair<_Tp1, _Tp2>>::type& get(std::pair<_Tp1, _Tp2>& __in) noexcept { return __pair_get<_Int>::__get(__in); } template<std::size_t _Int, class _Tp1, class _Tp2> constexpr typename tuple_element<_Int, std::pair<_Tp1, _Tp2>>::type&& get(std::pair<_Tp1, _Tp2>&& __in) noexcept { return __pair_get<_Int>::__move_get(std::move(__in)); } template<std::size_t _Int, class _Tp1, class _Tp2> constexpr const typename tuple_element<_Int, std::pair<_Tp1, _Tp2>>::type& get(const std::pair<_Tp1, _Tp2>& __in) noexcept { return __pair_get<_Int>::__const_get(__in); } template<std::size_t _Int, class _Tp1, class _Tp2> constexpr const typename tuple_element<_Int, std::pair<_Tp1, _Tp2>>::type&& get(const std::pair<_Tp1, _Tp2>&& __in) noexcept { return __pair_get<_Int>::__const_move_get(std::move(__in)); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 238 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/utility" 3 #define __cpp_lib_tuples_by_type 201304 template <typename _Tp, typename _Up> constexpr _Tp& get(pair<_Tp, _Up>& __p) noexcept { return __p.first; } template <typename _Tp, typename _Up> constexpr const _Tp& get(const pair<_Tp, _Up>& __p) noexcept { return __p.first; } template <typename _Tp, typename _Up> constexpr _Tp&& get(pair<_Tp, _Up>&& __p) noexcept { return std::move(__p.first); } template <typename _Tp, typename _Up> constexpr const _Tp&& get(const pair<_Tp, _Up>&& __p) noexcept { return std::move(__p.first); } template <typename _Tp, typename _Up> constexpr _Tp& get(pair<_Up, _Tp>& __p) noexcept { return __p.second; } template <typename _Tp, typename _Up> constexpr const _Tp& get(const pair<_Up, _Tp>& __p) noexcept { return __p.second; } template <typename _Tp, typename _Up> constexpr _Tp&& get(pair<_Up, _Tp>&& __p) noexcept { return std::move(__p.second); } template <typename _Tp, typename _Up> constexpr const _Tp&& get(const pair<_Up, _Tp>&& __p) noexcept { return std::move(__p.second); } #define __cpp_lib_exchange_function 201304 /// Assign @p __new_val to @p __obj and return its previous value. template <typename _Tp, typename _Up = _Tp> inline _Tp exchange(_Tp& __obj, _Up&& __new_val) { return std::__exchange(__obj, std::forward<_Up>(__new_val)); } #endif # 289 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/utility" 3 // Stores a tuple of indices. Used by tuple and pair, and by bind() to // extract the elements in a tuple. template<size_t... _Indexes> struct _Index_tuple { }; #ifdef __has_builtin #if 0 /* disabled by -frewrite-includes */ # if __has_builtin(__make_integer_seq) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 296 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/utility" 3 # define _GLIBCXX_USE_MAKE_INTEGER_SEQ 1 # endif # 298 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/utility" 3 #endif # 299 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/utility" 3 // Builds an _Index_tuple<0, 1, 2, ..., _Num-1>. template<size_t _Num> struct _Build_index_tuple { #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_USE_MAKE_INTEGER_SEQ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 305 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/utility" 3 template<typename, size_t... _Indices> using _IdxTuple = _Index_tuple<_Indices...>; using __type = __make_integer_seq<_IdxTuple, size_t, _Num>; #else # 310 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/utility" 3 using __type = _Index_tuple<__integer_pack(_Num)...>; #endif # 312 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/utility" 3 }; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 315 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/utility" 3 #define __cpp_lib_integer_sequence 201304 /// Class template integer_sequence template<typename _Tp, _Tp... _Idx> struct integer_sequence { typedef _Tp value_type; static constexpr size_t size() noexcept { return sizeof...(_Idx); } }; /// Alias template make_integer_sequence template<typename _Tp, _Tp _Num> using make_integer_sequence #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_USE_MAKE_INTEGER_SEQ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 330 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/utility" 3 = __make_integer_seq<integer_sequence, _Tp, _Num>; #else # 332 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/utility" 3 = integer_sequence<_Tp, __integer_pack(_Num)...>; #endif # 334 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/utility" 3 #undef _GLIBCXX_USE_MAKE_INTEGER_SEQ /// Alias template index_sequence template<size_t... _Idx> using index_sequence = integer_sequence<size_t, _Idx...>; /// Alias template make_index_sequence template<size_t _Num> using make_index_sequence = make_integer_sequence<size_t, _Num>; /// Alias template index_sequence_for template<typename... _Types> using index_sequence_for = make_index_sequence<sizeof...(_Types)>; #endif # 349 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/utility" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201402L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 351 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/utility" 3 struct in_place_t { explicit in_place_t() = default; }; inline constexpr in_place_t in_place{}; template<typename _Tp> struct in_place_type_t { explicit in_place_type_t() = default; }; template<typename _Tp> inline constexpr in_place_type_t<_Tp> in_place_type{}; template<size_t _Idx> struct in_place_index_t { explicit in_place_index_t() = default; }; template<size_t _Idx> inline constexpr in_place_index_t<_Idx> in_place_index{}; template<typename> struct __is_in_place_type_impl : false_type { }; template<typename _Tp> struct __is_in_place_type_impl<in_place_type_t<_Tp>> : true_type { }; template<typename _Tp> struct __is_in_place_type : public __is_in_place_type_impl<_Tp> { }; #define __cpp_lib_as_const 201510 template<typename _Tp> constexpr add_const_t<_Tp>& as_const(_Tp& __t) noexcept { return __t; } template<typename _Tp> void as_const(const _Tp&&) = delete; #endif // C++17 # 395 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/utility" 3 _GLIBCXX_END_NAMESPACE_VERSION } // namespace #endif # 400 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/utility" 3 #endif /* _GLIBCXX_UTILITY */ # 402 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/utility" 3 # 39 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/tuple" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <array> #endif /* expanded by -frewrite-includes */ # 39 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/tuple" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/array" 1 3 // <array> -*- C++ -*- // Copyright (C) 2007-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file include/array * This is a Standard C++ Library header. */ #ifndef _GLIBCXX_ARRAY #define _GLIBCXX_ARRAY 1 #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 33 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/array" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus < 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 35 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/array" 3 #if 0 /* expanded by -frewrite-includes */ # include <bits/c++0x_warning.h> #endif /* expanded by -frewrite-includes */ # 35 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/array" 3 # 36 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/array" 3 #else # 37 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/array" 3 #if 0 /* expanded by -frewrite-includes */ #include <utility> #endif /* expanded by -frewrite-includes */ # 38 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/array" 3 # 39 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/array" 3 #if 0 /* expanded by -frewrite-includes */ #include <stdexcept> #endif /* expanded by -frewrite-includes */ # 39 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/array" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/stdexcept" 1 3 // Standard exception classes -*- C++ -*- // Copyright (C) 2001-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file include/stdexcept * This is a Standard C++ Library header. */ // // ISO C++ 19.1 Exception classes // #ifndef _GLIBCXX_STDEXCEPT #define _GLIBCXX_STDEXCEPT 1 #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 37 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/stdexcept" 3 #if 0 /* expanded by -frewrite-includes */ #include <exception> #endif /* expanded by -frewrite-includes */ # 38 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/stdexcept" 3 # 39 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/stdexcept" 3 #if 0 /* expanded by -frewrite-includes */ #include <string> #endif /* expanded by -frewrite-includes */ # 39 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/stdexcept" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/string" 1 3 // Components for manipulating sequences of characters -*- C++ -*- // Copyright (C) 1997-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file include/string * This is a Standard C++ Library header. */ // // ISO C++ 14882: 21 Strings library // #ifndef _GLIBCXX_STRING #define _GLIBCXX_STRING 1 #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 37 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/string" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/c++config.h> #endif /* expanded by -frewrite-includes */ # 38 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/string" 3 # 39 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/string" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/stringfwd.h> #endif /* expanded by -frewrite-includes */ # 39 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/string" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stringfwd.h" 1 3 // <string> Forward declarations -*- C++ -*- // Copyright (C) 2001-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file bits/stringfwd.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{string} */ // // ISO C++ 14882: 21 Strings library // #ifndef _STRINGFWD_H #define _STRINGFWD_H 1 #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 38 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stringfwd.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/c++config.h> #endif /* expanded by -frewrite-includes */ # 39 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stringfwd.h" 3 # 40 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stringfwd.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/memoryfwd.h> #endif /* expanded by -frewrite-includes */ # 40 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stringfwd.h" 3 # 41 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stringfwd.h" 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @defgroup strings Strings * * @{ */ template<class _CharT> struct char_traits; template<> struct char_traits<char>; #ifdef _GLIBCXX_USE_WCHAR_T template<> struct char_traits<wchar_t>; #endif # 60 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stringfwd.h" 3 #ifdef _GLIBCXX_USE_CHAR8_T template<> struct char_traits<char8_t>; #endif # 64 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stringfwd.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 66 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stringfwd.h" 3 template<> struct char_traits<char16_t>; template<> struct char_traits<char32_t>; #endif # 69 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stringfwd.h" 3 _GLIBCXX_BEGIN_NAMESPACE_CXX11 template<typename _CharT, typename _Traits = char_traits<_CharT>, typename _Alloc = allocator<_CharT> > class basic_string; _GLIBCXX_END_NAMESPACE_CXX11 /// A string of @c char typedef basic_string<char> string; #ifdef _GLIBCXX_USE_WCHAR_T /// A string of @c wchar_t typedef basic_string<wchar_t> wstring; #endif # 85 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stringfwd.h" 3 #ifdef _GLIBCXX_USE_CHAR8_T /// A string of @c char8_t typedef basic_string<char8_t> u8string; #endif # 90 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stringfwd.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 92 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stringfwd.h" 3 /// A string of @c char16_t typedef basic_string<char16_t> u16string; /// A string of @c char32_t typedef basic_string<char32_t> u32string; #endif # 98 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stringfwd.h" 3 /** @} */ _GLIBCXX_END_NAMESPACE_VERSION } // namespace std #endif // _STRINGFWD_H # 105 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stringfwd.h" 3 # 40 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/string" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/char_traits.h> // NB: In turn includes stl_algobase.h #endif /* expanded by -frewrite-includes */ # 40 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/string" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/char_traits.h" 1 3 // Character Traits for use by standard string and iostream -*- C++ -*- // Copyright (C) 1997-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file bits/char_traits.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{string} */ // // ISO C++ 14882: 21 Strings library // #ifndef _CHAR_TRAITS_H #define _CHAR_TRAITS_H 1 #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 38 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/char_traits.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/stl_algobase.h> // std::copy, std::fill_n #endif /* expanded by -frewrite-includes */ # 39 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/char_traits.h" 3 # 40 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/char_traits.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/postypes.h> // For streampos #endif /* expanded by -frewrite-includes */ # 40 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/char_traits.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/postypes.h" 1 3 // Position types -*- C++ -*- // Copyright (C) 1997-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file bits/postypes.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{iosfwd} */ // // ISO C++ 14882: 27.4.1 - Types // ISO C++ 14882: 27.4.3 - Template class fpos // #ifndef _GLIBCXX_POSTYPES_H #define _GLIBCXX_POSTYPES_H 1 #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 39 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/postypes.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <cwchar> // For mbstate_t #endif /* expanded by -frewrite-includes */ # 40 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/postypes.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 1 3 // -*- C++ -*- forwarding header. // Copyright (C) 1997-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file include/cwchar * This is a Standard C++ Library file. You should @c \#include this file * in your programs, rather than any of the @a *.h implementation files. * * This is the C++ version of the Standard C Library header @c wchar.h, * and its contents are (mostly) the same as that header, but are all * contained in the namespace @c std (except for names which are defined * as macros in C). */ // // ISO C++ 14882: 21.4 // #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 40 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/c++config.h> #endif /* expanded by -frewrite-includes */ # 41 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 # 42 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_HAVE_WCHAR_H #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 44 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #if 0 /* expanded by -frewrite-includes */ #include <wchar.h> #endif /* expanded by -frewrite-includes */ # 44 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 # 1 "/usr/include/wchar.h" 1 3 4 /* Copyright (C) 1995-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ /* * ISO C99 Standard: 7.24 * Extended multibyte and wide character utilities <wchar.h> */ #ifndef _WCHAR_H #define _WCHAR_H 1 #define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION #if 0 /* expanded by -frewrite-includes */ #include <bits/libc-header-start.h> #endif /* expanded by -frewrite-includes */ # 27 "/usr/include/wchar.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 1 3 4 /* Handle feature test macros at the start of a header. Copyright (C) 2016-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ /* This header is internal to glibc and should not be included outside of glibc headers. Headers including it must define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION first. This header cannot have multiple include guards because ISO C feature test macros depend on the definition of the macro when an affected header is included, not when the first system header is included. */ #ifndef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION # error "Never include <bits/libc-header-start.h> directly." #endif # 30 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 #undef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION #if 0 /* expanded by -frewrite-includes */ #include <features.h> #endif /* expanded by -frewrite-includes */ # 33 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # 34 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 /* ISO/IEC TR 24731-2:2010 defines the __STDC_WANT_LIB_EXT2__ macro. */ #undef __GLIBC_USE_LIB_EXT2 #if 0 /* disabled by -frewrite-includes */ #if (defined __USE_GNU \ || (defined __STDC_WANT_LIB_EXT2__ && __STDC_WANT_LIB_EXT2__ > 0)) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 40 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_LIB_EXT2 1 #else # 42 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_LIB_EXT2 0 #endif # 44 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 /* ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__ macro. Most but not all symbols enabled by that macro in TS 18661-1 are enabled unconditionally in C2X; the symbols in Annex F still require that macro in C2X. */ #undef __GLIBC_USE_IEC_60559_BFP_EXT #if 0 /* disabled by -frewrite-includes */ #if defined __USE_GNU || defined __STDC_WANT_IEC_60559_BFP_EXT__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 51 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_BFP_EXT 1 #else # 53 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_BFP_EXT 0 #endif # 55 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 #undef __GLIBC_USE_IEC_60559_BFP_EXT_C2X #if 0 /* disabled by -frewrite-includes */ #if __GLIBC_USE (IEC_60559_BFP_EXT) || __GLIBC_USE (ISOC2X) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 57 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 1 #else # 59 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 0 #endif # 61 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 /* ISO/IEC TS 18661-4:2015 defines the __STDC_WANT_IEC_60559_FUNCS_EXT__ macro. Other than the reduction functions, the symbols from this TS are enabled unconditionally in C2X. */ #undef __GLIBC_USE_IEC_60559_FUNCS_EXT #if 0 /* disabled by -frewrite-includes */ #if defined __USE_GNU || defined __STDC_WANT_IEC_60559_FUNCS_EXT__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 68 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_FUNCS_EXT 1 #else # 70 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_FUNCS_EXT 0 #endif # 72 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 #undef __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X #if 0 /* disabled by -frewrite-includes */ #if __GLIBC_USE (IEC_60559_FUNCS_EXT) || __GLIBC_USE (ISOC2X) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 74 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 1 #else # 76 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 0 #endif # 78 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 /* ISO/IEC TS 18661-3:2015 defines the __STDC_WANT_IEC_60559_TYPES_EXT__ macro. */ #undef __GLIBC_USE_IEC_60559_TYPES_EXT #if 0 /* disabled by -frewrite-includes */ #if defined __USE_GNU || defined __STDC_WANT_IEC_60559_TYPES_EXT__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 83 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_TYPES_EXT 1 #else # 85 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_TYPES_EXT 0 #endif # 87 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # 28 "/usr/include/wchar.h" 2 3 4 /* Gather machine dependent type support. */ #if 0 /* expanded by -frewrite-includes */ #include <bits/floatn.h> #endif /* expanded by -frewrite-includes */ # 30 "/usr/include/wchar.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 1 3 4 /* Macros to control TS 18661-3 glibc features on x86. Copyright (C) 2017-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ #ifndef _BITS_FLOATN_H #define _BITS_FLOATN_H #if 0 /* expanded by -frewrite-includes */ #include <features.h> #endif /* expanded by -frewrite-includes */ # 22 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 3 4 # 23 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 3 4 /* Defined to 1 if the current compiler invocation provides a floating-point type with the IEEE 754 binary128 format, and this glibc includes corresponding *f128 interfaces for it. The required libgcc support was added some time after the basic compiler support, for x86_64 and x86. */ #if 0 /* disabled by -frewrite-includes */ #if (defined __x86_64__ \ ? __GNUC_PREREQ (4, 3) \ : (defined __GNU__ ? __GNUC_PREREQ (4, 5) : __GNUC_PREREQ (4, 4))) \ && !defined(__CUDACC__) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 33 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 3 4 # define __HAVE_FLOAT128 1 #else # 35 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 3 4 # define __HAVE_FLOAT128 0 #endif # 37 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 3 4 /* Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct from the default float, double and long double types in this glibc. */ #if 0 /* disabled by -frewrite-includes */ #if __HAVE_FLOAT128 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 41 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 3 4 # define __HAVE_DISTINCT_FLOAT128 1 #else # 43 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 3 4 # define __HAVE_DISTINCT_FLOAT128 0 #endif # 45 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 3 4 /* Defined to 1 if the current compiler invocation provides a floating-point type with the right format for _Float64x, and this glibc includes corresponding *f64x interfaces for it. */ #define __HAVE_FLOAT64X 1 /* Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has the format of _Float128, which must be different from that of long double. */ #define __HAVE_FLOAT64X_LONG_DOUBLE 1 #ifndef __ASSEMBLER__ /* Defined to concatenate the literal suffix to be used with _Float128 types, if __HAVE_FLOAT128 is 1. */ #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT128 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 62 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || defined __cplusplus #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 63 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 3 4 /* The literal suffix f128 exists only since GCC 7.0. */ # define __f128(x) x##q # else # 66 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 3 4 # define __f128(x) x##f128 # endif # 68 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 3 4 # endif # 69 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 3 4 /* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */ #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT128 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 72 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || defined __cplusplus #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 73 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 3 4 /* Add a typedef for older GCC compilers which don't natively support _Complex _Float128. */ typedef _Complex float __cfloat128 __attribute__ ((__mode__ (__TC__))); # define __CFLOAT128 __cfloat128 # else # 78 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 3 4 # define __CFLOAT128 _Complex _Float128 # endif # 80 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 3 4 # endif # 81 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 3 4 /* The remaining of this file provides support for older compilers. */ #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT128 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 84 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 3 4 /* The type _Float128 exists only since GCC 7.0. */ #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || defined __cplusplus #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 87 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 3 4 typedef __float128 _Float128; # endif # 89 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 3 4 /* __builtin_huge_valf128 doesn't exist before GCC 7.0. */ #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 92 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 3 4 # define __builtin_huge_valf128() ((_Float128) __builtin_huge_val ()) # endif # 94 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 3 4 /* Older GCC has only a subset of built-in functions for _Float128 on x86, and __builtin_infq is not usable in static initializers. Converting a narrower sNaN to _Float128 produces a quiet NaN, so attempts to use _Float128 sNaNs will not work properly with older compilers. */ #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 101 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 3 4 # define __builtin_copysignf128 __builtin_copysignq # define __builtin_fabsf128 __builtin_fabsq # define __builtin_inff128() ((_Float128) __builtin_inf ()) # define __builtin_nanf128(x) ((_Float128) __builtin_nan (x)) # define __builtin_nansf128(x) ((_Float128) __builtin_nans (x)) # endif # 107 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 3 4 /* In math/math.h, __MATH_TG will expand signbit to __builtin_signbit*, e.g.: __builtin_signbitf128, before GCC 6. However, there has never been a __builtin_signbitf128 in GCC and the type-generic builtin is only available since GCC 6. */ #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (6, 0) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 113 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 3 4 # define __builtin_signbitf128 __signbitf128 # endif # 115 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 3 4 # endif # 117 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 3 4 #endif /* !__ASSEMBLER__. */ # 119 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <bits/floatn-common.h> #endif /* expanded by -frewrite-includes */ # 120 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 1 3 4 /* Macros to control TS 18661-3 glibc features where the same definitions are appropriate for all platforms. Copyright (C) 2017-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ #ifndef _BITS_FLOATN_COMMON_H #define _BITS_FLOATN_COMMON_H #if 0 /* expanded by -frewrite-includes */ #include <features.h> #endif /* expanded by -frewrite-includes */ # 23 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # 24 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <bits/long-double.h> #endif /* expanded by -frewrite-includes */ # 24 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/long-double.h" 1 3 4 /* Properties of long double type. ldbl-96 version. Copyright (C) 2016-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ /* long double is distinct from double, so there is nothing to define here. */ #define __LONG_DOUBLE_USES_FLOAT128 0 # 25 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 2 3 4 /* This header should be included at the bottom of each bits/floatn.h. It defines the following macros for each _FloatN and _FloatNx type, where the same definitions, or definitions based only on the macros in bits/floatn.h, are appropriate for all glibc configurations. */ /* Defined to 1 if the current compiler invocation provides a floating-point type with the right format for this type, and this glibc includes corresponding *fN or *fNx interfaces for it. */ #define __HAVE_FLOAT16 0 #define __HAVE_FLOAT32 1 #define __HAVE_FLOAT64 1 #define __HAVE_FLOAT32X 1 #define __HAVE_FLOAT128X 0 /* Defined to 1 if the corresponding __HAVE_<type> macro is 1 and the type is the first with its format in the sequence of (the default choices for) float, double, long double, _Float16, _Float32, _Float64, _Float128, _Float32x, _Float64x, _Float128x for this glibc; that is, if functions present once per floating-point format rather than once per type are present for this type. All configurations supported by glibc have _Float32 the same format as float, _Float64 and _Float32x the same format as double, the _Float64x the same format as either long double or _Float128. No configurations support _Float128x or, as of GCC 7, have compiler support for a type meeting the requirements for _Float128x. */ #define __HAVE_DISTINCT_FLOAT16 __HAVE_FLOAT16 #define __HAVE_DISTINCT_FLOAT32 0 #define __HAVE_DISTINCT_FLOAT64 0 #define __HAVE_DISTINCT_FLOAT32X 0 #define __HAVE_DISTINCT_FLOAT64X 0 #define __HAVE_DISTINCT_FLOAT128X __HAVE_FLOAT128X /* Defined to 1 if the corresponding _FloatN type is not binary compatible with the corresponding ISO C type in the current compilation unit as opposed to __HAVE_DISTINCT_FLOATN, which indicates the default types built in glibc. */ #define __HAVE_FLOAT128_UNLIKE_LDBL (__HAVE_DISTINCT_FLOAT128 \ && __LDBL_MANT_DIG__ != 113) /* Defined to 1 if any _FloatN or _FloatNx types that are not ABI-distinct are however distinct types at the C language level (so for the purposes of __builtin_types_compatible_p and _Generic). */ #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (7, 0) && !defined __cplusplus #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 70 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # define __HAVE_FLOATN_NOT_TYPEDEF 1 #else # 72 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # define __HAVE_FLOATN_NOT_TYPEDEF 0 #endif # 74 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 #ifndef __ASSEMBLER__ /* Defined to concatenate the literal suffix to be used with _FloatN or _FloatNx types, if __HAVE_<type> is 1. The corresponding literal suffixes exist since GCC 7, for C only. */ #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT16 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 81 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || defined __cplusplus #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 82 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 /* No corresponding suffix available for this type. */ # define __f16(x) ((_Float16) x##f) # else # 85 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # define __f16(x) x##f16 # endif # 87 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # endif # 88 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT32 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 90 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || defined __cplusplus #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 91 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # define __f32(x) x##f # else # 93 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # define __f32(x) x##f32 # endif # 95 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # endif # 96 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT64 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 98 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || defined __cplusplus #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 99 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # ifdef __NO_LONG_DOUBLE_MATH # define __f64(x) x##l # else # 102 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # define __f64(x) x # endif # 104 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # else # 105 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # define __f64(x) x##f64 # endif # 107 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # endif # 108 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT32X #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 110 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || defined __cplusplus #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 111 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # define __f32x(x) x # else # 113 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # define __f32x(x) x##f32x # endif # 115 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # endif # 116 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT64X #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 118 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || defined __cplusplus #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 119 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT64X_LONG_DOUBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 120 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # define __f64x(x) x##l # else # 122 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # define __f64x(x) __f128 (x) # endif # 124 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # else # 125 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # define __f64x(x) x##f64x # endif # 127 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # endif # 128 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT128X #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 130 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || defined __cplusplus #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 131 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # error "_Float128X supported but no constant suffix" # else # 133 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # define __f128x(x) x##f128x # endif # 135 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # endif # 136 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 /* Defined to a complex type if __HAVE_<type> is 1. */ #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT16 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 139 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || defined __cplusplus #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 140 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 typedef _Complex float __cfloat16 __attribute__ ((__mode__ (__HC__))); # define __CFLOAT16 __cfloat16 # else # 143 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # define __CFLOAT16 _Complex _Float16 # endif # 145 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # endif # 146 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT32 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 148 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || defined __cplusplus #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 149 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # define __CFLOAT32 _Complex float # else # 151 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # define __CFLOAT32 _Complex _Float32 # endif # 153 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # endif # 154 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT64 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 156 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || defined __cplusplus #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 157 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # ifdef __NO_LONG_DOUBLE_MATH # define __CFLOAT64 _Complex long double # else # 160 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # define __CFLOAT64 _Complex double # endif # 162 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # else # 163 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # define __CFLOAT64 _Complex _Float64 # endif # 165 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # endif # 166 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT32X #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 168 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || defined __cplusplus #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 169 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # define __CFLOAT32X _Complex double # else # 171 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # define __CFLOAT32X _Complex _Float32x # endif # 173 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # endif # 174 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT64X #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 176 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || defined __cplusplus #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 177 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT64X_LONG_DOUBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 178 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # define __CFLOAT64X _Complex long double # else # 180 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # define __CFLOAT64X __CFLOAT128 # endif # 182 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # else # 183 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # define __CFLOAT64X _Complex _Float64x # endif # 185 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # endif # 186 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT128X #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 188 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || defined __cplusplus #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 189 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # error "_Float128X supported but no complex type" # else # 191 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # define __CFLOAT128X _Complex _Float128x # endif # 193 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # endif # 194 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 /* The remaining of this file provides support for older compilers. */ #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT16 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 197 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || defined __cplusplus #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 199 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 typedef float _Float16 __attribute__ ((__mode__ (__HF__))); # endif # 201 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 203 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # define __builtin_huge_valf16() ((_Float16) __builtin_huge_val ()) # define __builtin_inff16() ((_Float16) __builtin_inf ()) # define __builtin_nanf16(x) ((_Float16) __builtin_nan (x)) # define __builtin_nansf16(x) ((_Float16) __builtin_nans (x)) # endif # 208 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # endif # 210 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT32 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 212 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || defined __cplusplus #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 214 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 typedef float _Float32; # endif # 216 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 218 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # define __builtin_huge_valf32() (__builtin_huge_valf ()) # define __builtin_inff32() (__builtin_inff ()) # define __builtin_nanf32(x) (__builtin_nanf (x)) # define __builtin_nansf32(x) (__builtin_nansf (x)) # endif # 223 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # endif # 225 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT64 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 227 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 /* If double, long double and _Float64 all have the same set of values, TS 18661-3 requires the usual arithmetic conversions on long double and _Float64 to produce _Float64. For this to be the case when building with a compiler without a distinct _Float64 type, _Float64 must be a typedef for long double, not for double. */ # ifdef __NO_LONG_DOUBLE_MATH #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || defined __cplusplus #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 238 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 typedef long double _Float64; # endif # 240 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 242 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # define __builtin_huge_valf64() (__builtin_huge_vall ()) # define __builtin_inff64() (__builtin_infl ()) # define __builtin_nanf64(x) (__builtin_nanl (x)) # define __builtin_nansf64(x) (__builtin_nansl (x)) # endif # 247 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # else # 249 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || defined __cplusplus #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 251 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 typedef double _Float64; # endif # 253 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 255 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # define __builtin_huge_valf64() (__builtin_huge_val ()) # define __builtin_inff64() (__builtin_inf ()) # define __builtin_nanf64(x) (__builtin_nan (x)) # define __builtin_nansf64(x) (__builtin_nans (x)) # endif # 260 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # endif # 262 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # endif # 264 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT32X #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 266 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || defined __cplusplus #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 268 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 typedef double _Float32x; # endif # 270 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 272 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # define __builtin_huge_valf32x() (__builtin_huge_val ()) # define __builtin_inff32x() (__builtin_inf ()) # define __builtin_nanf32x(x) (__builtin_nan (x)) # define __builtin_nansf32x(x) (__builtin_nans (x)) # endif # 277 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # endif # 279 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT64X #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 281 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT64X_LONG_DOUBLE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 283 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || defined __cplusplus #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 285 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 typedef long double _Float64x; # endif # 287 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 289 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # define __builtin_huge_valf64x() (__builtin_huge_vall ()) # define __builtin_inff64x() (__builtin_infl ()) # define __builtin_nanf64x(x) (__builtin_nanl (x)) # define __builtin_nansf64x(x) (__builtin_nansl (x)) # endif # 294 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # else # 296 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || defined __cplusplus #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 298 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 typedef _Float128 _Float64x; # endif # 300 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 302 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # define __builtin_huge_valf64x() (__builtin_huge_valf128 ()) # define __builtin_inff64x() (__builtin_inff128 ()) # define __builtin_nanf64x(x) (__builtin_nanf128 (x)) # define __builtin_nansf64x(x) (__builtin_nansf128 (x)) # endif # 307 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # endif # 309 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # endif # 311 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT128X #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 313 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) || defined __cplusplus #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 315 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # error "_Float128x supported but no type" # endif # 317 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if !__GNUC_PREREQ (7, 0) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 319 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # define __builtin_huge_valf128x() ((_Float128x) __builtin_huge_val ()) # define __builtin_inff128x() ((_Float128x) __builtin_inf ()) # define __builtin_nanf128x(x) ((_Float128x) __builtin_nan (x)) # define __builtin_nansf128x(x) ((_Float128x) __builtin_nans (x)) # endif # 324 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # endif # 326 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 #endif /* !__ASSEMBLER__. */ # 328 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 #endif /* _BITS_FLOATN_COMMON_H */ # 330 "/usr/include/x86_64-linux-gnu/bits/floatn-common.h" 3 4 # 121 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 2 3 4 #endif /* _BITS_FLOATN_H */ # 123 "/usr/include/x86_64-linux-gnu/bits/floatn.h" 3 4 # 31 "/usr/include/wchar.h" 2 3 4 #define __need_size_t #define __need_wchar_t #define __need_NULL #if 0 /* expanded by -frewrite-includes */ #include <stddef.h> #endif /* expanded by -frewrite-includes */ # 35 "/usr/include/wchar.h" 3 4 # 1 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 1 3 4 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ #if 0 /* disabled by -frewrite-includes */ #if !defined(__STDDEF_H) || defined(__need_ptrdiff_t) || \ defined(__need_size_t) || defined(__need_wchar_t) || \ defined(__need_NULL) || defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 13 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \ !defined(__need_wchar_t) && !defined(__need_NULL) && \ !defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 17 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define miscellaneous pieces when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 19 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define __STDDEF_H #endif # 21 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define __need_ptrdiff_t #define __need_size_t #define __need_wchar_t #define __need_NULL #define __need_STDDEF_H_misc /* __need_wint_t is intentionally not defined here. */ #endif # 28 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_ptrdiff_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 30 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !defined(_PTRDIFF_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 31 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define ptrdiff_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 33 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define _PTRDIFF_T #endif # 35 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __PTRDIFF_TYPE__ ptrdiff_t; #endif # 37 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_ptrdiff_t #endif /* defined(__need_ptrdiff_t) */ # 39 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_size_t) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 41 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !defined(_SIZE_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 42 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define size_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 44 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define _SIZE_T #endif # 46 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __SIZE_TYPE__ size_t; #endif # 48 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_size_t #endif /*defined(__need_size_t) */ # 50 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_STDDEF_H_misc) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 52 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is * enabled. */ #if 0 /* disabled by -frewrite-includes */ #if (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 && \ !defined(_RSIZE_T)) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 56 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define rsize_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 58 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define _RSIZE_T #endif # 60 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __SIZE_TYPE__ rsize_t; #endif # 62 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #endif /* defined(__need_STDDEF_H_misc) */ # 63 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_wchar_t) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 65 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #ifndef __cplusplus /* Always define wchar_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(_WCHAR_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 68 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 69 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define _WCHAR_T #if 0 /* disabled by -frewrite-includes */ #if defined(_MSC_EXTENSIONS) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 71 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define _WCHAR_T_DEFINED #endif # 73 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 74 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __WCHAR_TYPE__ wchar_t; #endif # 76 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 77 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_wchar_t #endif /* defined(__need_wchar_t) */ # 79 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_NULL) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 81 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #undef NULL #ifdef __cplusplus #if 0 /* disabled by -frewrite-includes */ # if !defined(__MINGW32__) && !defined(_MSC_VER) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 84 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 # define NULL __null # else # 86 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 # define NULL 0 # endif # 88 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #else # 89 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 # define NULL ((void*)0) #endif # 91 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #ifdef __cplusplus #if 0 /* disabled by -frewrite-includes */ #if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 93 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 namespace std { typedef decltype(nullptr) nullptr_t; } using ::std::nullptr_t; #endif # 96 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 97 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_NULL #endif /* defined(__need_NULL) */ # 99 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_STDDEF_H_misc) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 101 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 102 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include "__stddef_max_align_t.h" #endif /* expanded by -frewrite-includes */ # 102 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 # 103 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 104 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define offsetof(t, d) __builtin_offsetof(t, d) #undef __need_STDDEF_H_misc #endif /* defined(__need_STDDEF_H_misc) */ # 107 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */ #if 0 /* disabled by -frewrite-includes */ #if defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 111 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define wint_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(_WINT_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 113 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 114 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define _WINT_T #endif # 116 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __WINT_TYPE__ wint_t; #endif # 118 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_wint_t #endif /* __need_wint_t */ # 120 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 122 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 # 36 "/usr/include/wchar.h" 2 3 4 #define __need___va_list #if 0 /* expanded by -frewrite-includes */ #include <stdarg.h> #endif /* expanded by -frewrite-includes */ # 38 "/usr/include/wchar.h" 3 4 # 1 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdarg.h" 1 3 4 /*===---- stdarg.h - Variable argument handling ----------------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ #ifndef __STDARG_H #define __STDARG_H #ifndef _VA_LIST typedef __builtin_va_list va_list; #define _VA_LIST #endif # 17 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdarg.h" 3 4 #define va_start(ap, param) __builtin_va_start(ap, param) #define va_end(ap) __builtin_va_end(ap) #define va_arg(ap, type) __builtin_va_arg(ap, type) /* GCC always defines __va_copy, but does not define va_copy unless in c99 mode * or -ansi is not specified, since it was not part of C90. */ #define __va_copy(d,s) __builtin_va_copy(d,s) #if 0 /* disabled by -frewrite-includes */ #if __STDC_VERSION__ >= 199901L || __cplusplus >= 201103L || !defined(__STRICT_ANSI__) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 27 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdarg.h" 3 4 #define va_copy(dest, src) __builtin_va_copy(dest, src) #endif # 29 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdarg.h" 3 4 #ifndef __GNUC_VA_LIST #define __GNUC_VA_LIST 1 typedef __builtin_va_list __gnuc_va_list; #endif # 34 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdarg.h" 3 4 #endif /* __STDARG_H */ # 36 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdarg.h" 3 4 # 39 "/usr/include/wchar.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include <bits/wchar.h> #endif /* expanded by -frewrite-includes */ # 40 "/usr/include/wchar.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wchar.h" 1 3 4 /* wchar_t type related definitions. Copyright (C) 2000-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ #ifndef _BITS_WCHAR_H #define _BITS_WCHAR_H 1 /* The fallback definitions, for when __WCHAR_MAX__ or __WCHAR_MIN__ are not defined, give the right value and type as long as both int and wchar_t are 32-bit types. Adding L'\0' to a constant value ensures that the type is correct; it is necessary to use (L'\0' + 0) rather than just L'\0' so that the type in C++ is the promoted version of wchar_t rather than the distinct wchar_t type itself. Because wchar_t in preprocessor #if expressions is treated as intmax_t or uintmax_t, the expression (L'\0' - 1) would have the wrong value for WCHAR_MAX in such expressions and so cannot be used to define __WCHAR_MAX in the unsigned case. */ #ifdef __WCHAR_MAX__ # define __WCHAR_MAX __WCHAR_MAX__ #if 0 /* disabled by -frewrite-includes */ #if 0 #elif L'\0' - 1 > 0 #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 36 "/usr/include/x86_64-linux-gnu/bits/wchar.h" 3 4 # define __WCHAR_MAX (0xffffffffu + L'\0') #else # 38 "/usr/include/x86_64-linux-gnu/bits/wchar.h" 3 4 # define __WCHAR_MAX (0x7fffffff + L'\0') #endif # 40 "/usr/include/x86_64-linux-gnu/bits/wchar.h" 3 4 #ifdef __WCHAR_MIN__ # define __WCHAR_MIN __WCHAR_MIN__ #if 0 /* disabled by -frewrite-includes */ #if 0 #elif L'\0' - 1 > 0 #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 44 "/usr/include/x86_64-linux-gnu/bits/wchar.h" 3 4 # define __WCHAR_MIN (L'\0' + 0) #else # 46 "/usr/include/x86_64-linux-gnu/bits/wchar.h" 3 4 # define __WCHAR_MIN (-__WCHAR_MAX - 1) #endif # 48 "/usr/include/x86_64-linux-gnu/bits/wchar.h" 3 4 #endif /* bits/wchar.h */ # 50 "/usr/include/x86_64-linux-gnu/bits/wchar.h" 3 4 # 41 "/usr/include/wchar.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include <bits/types/wint_t.h> #endif /* expanded by -frewrite-includes */ # 41 "/usr/include/wchar.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/wint_t.h" 1 3 4 #ifndef __wint_t_defined #define __wint_t_defined 1 /* Some versions of stddef.h provide wint_t, even though neither the C nor C++ standards, nor POSIX, specifies this. We assume that stddef.h will define the macro _WINT_T if and only if it provides wint_t, and conversely, that it will avoid providing wint_t if _WINT_T is already defined. */ #ifndef _WINT_T #define _WINT_T 1 /* Integral type unchanged by default argument promotions that can hold any value corresponding to members of the extended character set, as well as at least one value that does not correspond to any member of the extended character set. */ #ifndef __WINT_TYPE__ # define __WINT_TYPE__ unsigned int #endif # 19 "/usr/include/x86_64-linux-gnu/bits/types/wint_t.h" 3 4 typedef __WINT_TYPE__ wint_t; #endif /* _WINT_T */ # 23 "/usr/include/x86_64-linux-gnu/bits/types/wint_t.h" 3 4 #endif /* bits/types/wint_t.h */ # 24 "/usr/include/x86_64-linux-gnu/bits/types/wint_t.h" 3 4 # 42 "/usr/include/wchar.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include <bits/types/mbstate_t.h> #endif /* expanded by -frewrite-includes */ # 42 "/usr/include/wchar.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h" 1 3 4 #ifndef __mbstate_t_defined #define __mbstate_t_defined 1 #if 0 /* expanded by -frewrite-includes */ #include <bits/types/__mbstate_t.h> #endif /* expanded by -frewrite-includes */ # 4 "/usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h" 1 3 4 #ifndef ____mbstate_t_defined #define ____mbstate_t_defined 1 /* Integral type unchanged by default argument promotions that can hold any value corresponding to members of the extended character set, as well as at least one value that does not correspond to any member of the extended character set. */ #ifndef __WINT_TYPE__ # define __WINT_TYPE__ unsigned int #endif # 11 "/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h" 3 4 /* Conversion state information. */ typedef struct { int __count; union { __WINT_TYPE__ __wch; char __wchb[4]; } __value; /* Value so far. */ } __mbstate_t; #endif # 24 "/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h" 3 4 # 5 "/usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h" 2 3 4 typedef __mbstate_t mbstate_t; #endif # 9 "/usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h" 3 4 # 43 "/usr/include/wchar.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include <bits/types/__FILE.h> #endif /* expanded by -frewrite-includes */ # 43 "/usr/include/wchar.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/__FILE.h" 1 3 4 #ifndef ____FILE_defined #define ____FILE_defined 1 struct _IO_FILE; typedef struct _IO_FILE __FILE; #endif # 8 "/usr/include/x86_64-linux-gnu/bits/types/__FILE.h" 3 4 # 44 "/usr/include/wchar.h" 2 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_UNIX98 || defined __USE_XOPEN2K #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 46 "/usr/include/wchar.h" 3 4 #if 0 /* expanded by -frewrite-includes */ # include <bits/types/FILE.h> #endif /* expanded by -frewrite-includes */ # 46 "/usr/include/wchar.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/FILE.h" 1 3 4 #ifndef __FILE_defined #define __FILE_defined 1 struct _IO_FILE; /* The opaque type of streams. This is the definition used elsewhere. */ typedef struct _IO_FILE FILE; #endif # 10 "/usr/include/x86_64-linux-gnu/bits/types/FILE.h" 3 4 # 47 "/usr/include/wchar.h" 2 3 4 #endif # 48 "/usr/include/wchar.h" 3 4 #ifdef __USE_XOPEN2K8 #if 0 /* expanded by -frewrite-includes */ # include <bits/types/locale_t.h> #endif /* expanded by -frewrite-includes */ # 49 "/usr/include/wchar.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/locale_t.h" 1 3 4 /* Definition of locale_t. Copyright (C) 2017-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ #ifndef _BITS_TYPES_LOCALE_T_H #define _BITS_TYPES_LOCALE_T_H 1 #if 0 /* expanded by -frewrite-includes */ #include <bits/types/__locale_t.h> #endif /* expanded by -frewrite-includes */ # 22 "/usr/include/x86_64-linux-gnu/bits/types/locale_t.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h" 1 3 4 /* Definition of struct __locale_struct and __locale_t. Copyright (C) 1997-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ #ifndef _BITS_TYPES___LOCALE_T_H #define _BITS_TYPES___LOCALE_T_H 1 /* POSIX.1-2008: the locale_t type, representing a locale context (implementation-namespace version). This type should be treated as opaque by applications; some details are exposed for the sake of efficiency in e.g. ctype functions. */ struct __locale_struct { /* Note: LC_ALL is not a valid index into this array. */ struct __locale_data *__locales[13]; /* 13 = __LC_LAST. */ /* To increase the speed of this solution we add some special members. */ const unsigned short int *__ctype_b; const int *__ctype_tolower; const int *__ctype_toupper; /* Note: LC_ALL is not a valid index into this array. */ const char *__names[13]; }; typedef struct __locale_struct *__locale_t; #endif /* bits/types/__locale_t.h */ # 45 "/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h" 3 4 # 23 "/usr/include/x86_64-linux-gnu/bits/types/locale_t.h" 2 3 4 typedef __locale_t locale_t; #endif /* bits/types/locale_t.h */ # 27 "/usr/include/x86_64-linux-gnu/bits/types/locale_t.h" 3 4 # 50 "/usr/include/wchar.h" 2 3 4 #endif # 51 "/usr/include/wchar.h" 3 4 /* Tell the caller that we provide correct C++ prototypes. */ #if 0 /* disabled by -frewrite-includes */ #if defined __cplusplus && __GNUC_PREREQ (4, 4) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 54 "/usr/include/wchar.h" 3 4 # define __CORRECT_ISO_CPP_WCHAR_H_PROTO #endif # 56 "/usr/include/wchar.h" 3 4 #ifndef WCHAR_MIN /* These constants might also be defined in <inttypes.h>. */ # define WCHAR_MIN __WCHAR_MIN # define WCHAR_MAX __WCHAR_MAX #endif # 62 "/usr/include/wchar.h" 3 4 #ifndef WEOF # define WEOF (0xffffffffu) #endif # 66 "/usr/include/wchar.h" 3 4 /* All versions of XPG prior to the publication of ISO C99 required the bulk of <wctype.h>'s declarations to appear in this header (because <wctype.h> did not exist prior to C99). In POSIX.1-2001 those declarations were marked as XSI extensions; in -2008 they were additionally marked as obsolescent. _GNU_SOURCE mode anticipates the removal of these declarations in the next revision of POSIX. */ #if 0 /* disabled by -frewrite-includes */ #if (defined __USE_XOPEN && !defined __USE_GNU \ && !(defined __USE_XOPEN2K && !defined __USE_XOPEN2KXSI)) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 76 "/usr/include/wchar.h" 3 4 #if 0 /* expanded by -frewrite-includes */ # include <bits/wctype-wchar.h> #endif /* expanded by -frewrite-includes */ # 76 "/usr/include/wchar.h" 3 4 # 77 "/usr/include/wchar.h" 3 4 #endif # 78 "/usr/include/wchar.h" 3 4 __BEGIN_DECLS /* This incomplete type is defined in <time.h> but needed here because of `wcsftime'. */ struct tm; /* Copy SRC to DEST. */ extern wchar_t *wcscpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src) __THROW __nonnull ((1, 2)); /* Copy no more than N wide-characters of SRC to DEST. */ extern wchar_t *wcsncpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n) __THROW __nonnull ((1, 2)); /* Append SRC onto DEST. */ extern wchar_t *wcscat (wchar_t *__restrict __dest, const wchar_t *__restrict __src) __THROW __nonnull ((1, 2)); /* Append no more than N wide-characters of SRC onto DEST. */ extern wchar_t *wcsncat (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n) __THROW __nonnull ((1, 2)); /* Compare S1 and S2. */ extern int wcscmp (const wchar_t *__s1, const wchar_t *__s2) __THROW __attribute_pure__ __nonnull ((1, 2)); /* Compare N wide-characters of S1 and S2. */ extern int wcsncmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) __THROW __attribute_pure__ __nonnull ((1, 2)); #ifdef __USE_XOPEN2K8 /* Compare S1 and S2, ignoring case. */ extern int wcscasecmp (const wchar_t *__s1, const wchar_t *__s2) __THROW; /* Compare no more than N chars of S1 and S2, ignoring case. */ extern int wcsncasecmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) __THROW; /* Similar to the two functions above but take the information from the provided locale and not the global locale. */ extern int wcscasecmp_l (const wchar_t *__s1, const wchar_t *__s2, locale_t __loc) __THROW; extern int wcsncasecmp_l (const wchar_t *__s1, const wchar_t *__s2, size_t __n, locale_t __loc) __THROW; #endif # 128 "/usr/include/wchar.h" 3 4 /* Compare S1 and S2, both interpreted as appropriate to the LC_COLLATE category of the current locale. */ extern int wcscoll (const wchar_t *__s1, const wchar_t *__s2) __THROW; /* Transform S2 into array pointed to by S1 such that if wcscmp is applied to two transformed strings the result is the as applying `wcscoll' to the original strings. */ extern size_t wcsxfrm (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n) __THROW; #ifdef __USE_XOPEN2K8 /* Similar to the two functions above but take the information from the provided locale and not the global locale. */ /* Compare S1 and S2, both interpreted as appropriate to the LC_COLLATE category of the given locale. */ extern int wcscoll_l (const wchar_t *__s1, const wchar_t *__s2, locale_t __loc) __THROW; /* Transform S2 into array pointed to by S1 such that if wcscmp is applied to two transformed strings the result is the as applying `wcscoll' to the original strings. */ extern size_t wcsxfrm_l (wchar_t *__s1, const wchar_t *__s2, size_t __n, locale_t __loc) __THROW; /* Duplicate S, returning an identical malloc'd string. */ extern wchar_t *wcsdup (const wchar_t *__s) __THROW __attribute_malloc__; #endif # 156 "/usr/include/wchar.h" 3 4 /* Find the first occurrence of WC in WCS. */ #ifdef __CORRECT_ISO_CPP_WCHAR_H_PROTO extern "C++" wchar_t *wcschr (wchar_t *__wcs, wchar_t __wc) __THROW __asm ("wcschr") __attribute_pure__; extern "C++" const wchar_t *wcschr (const wchar_t *__wcs, wchar_t __wc) __THROW __asm ("wcschr") __attribute_pure__; #else # 164 "/usr/include/wchar.h" 3 4 extern wchar_t *wcschr (const wchar_t *__wcs, wchar_t __wc) __THROW __attribute_pure__; #endif # 167 "/usr/include/wchar.h" 3 4 /* Find the last occurrence of WC in WCS. */ #ifdef __CORRECT_ISO_CPP_WCHAR_H_PROTO extern "C++" wchar_t *wcsrchr (wchar_t *__wcs, wchar_t __wc) __THROW __asm ("wcsrchr") __attribute_pure__; extern "C++" const wchar_t *wcsrchr (const wchar_t *__wcs, wchar_t __wc) __THROW __asm ("wcsrchr") __attribute_pure__; #else # 174 "/usr/include/wchar.h" 3 4 extern wchar_t *wcsrchr (const wchar_t *__wcs, wchar_t __wc) __THROW __attribute_pure__; #endif # 177 "/usr/include/wchar.h" 3 4 #ifdef __USE_GNU /* This function is similar to `wcschr'. But it returns a pointer to the closing NUL wide character in case C is not found in S. */ extern wchar_t *wcschrnul (const wchar_t *__s, wchar_t __wc) __THROW __attribute_pure__; #endif # 184 "/usr/include/wchar.h" 3 4 /* Return the length of the initial segmet of WCS which consists entirely of wide characters not in REJECT. */ extern size_t wcscspn (const wchar_t *__wcs, const wchar_t *__reject) __THROW __attribute_pure__; /* Return the length of the initial segmet of WCS which consists entirely of wide characters in ACCEPT. */ extern size_t wcsspn (const wchar_t *__wcs, const wchar_t *__accept) __THROW __attribute_pure__; /* Find the first occurrence in WCS of any character in ACCEPT. */ #ifdef __CORRECT_ISO_CPP_WCHAR_H_PROTO extern "C++" wchar_t *wcspbrk (wchar_t *__wcs, const wchar_t *__accept) __THROW __asm ("wcspbrk") __attribute_pure__; extern "C++" const wchar_t *wcspbrk (const wchar_t *__wcs, const wchar_t *__accept) __THROW __asm ("wcspbrk") __attribute_pure__; #else # 201 "/usr/include/wchar.h" 3 4 extern wchar_t *wcspbrk (const wchar_t *__wcs, const wchar_t *__accept) __THROW __attribute_pure__; #endif # 204 "/usr/include/wchar.h" 3 4 /* Find the first occurrence of NEEDLE in HAYSTACK. */ #ifdef __CORRECT_ISO_CPP_WCHAR_H_PROTO extern "C++" wchar_t *wcsstr (wchar_t *__haystack, const wchar_t *__needle) __THROW __asm ("wcsstr") __attribute_pure__; extern "C++" const wchar_t *wcsstr (const wchar_t *__haystack, const wchar_t *__needle) __THROW __asm ("wcsstr") __attribute_pure__; #else # 212 "/usr/include/wchar.h" 3 4 extern wchar_t *wcsstr (const wchar_t *__haystack, const wchar_t *__needle) __THROW __attribute_pure__; #endif # 215 "/usr/include/wchar.h" 3 4 /* Divide WCS into tokens separated by characters in DELIM. */ extern wchar_t *wcstok (wchar_t *__restrict __s, const wchar_t *__restrict __delim, wchar_t **__restrict __ptr) __THROW; /* Return the number of wide characters in S. */ extern size_t wcslen (const wchar_t *__s) __THROW __attribute_pure__; #ifdef __USE_XOPEN /* Another name for `wcsstr' from XPG4. */ # ifdef __CORRECT_ISO_CPP_WCHAR_H_PROTO extern "C++" wchar_t *wcswcs (wchar_t *__haystack, const wchar_t *__needle) __THROW __asm ("wcswcs") __attribute_pure__; extern "C++" const wchar_t *wcswcs (const wchar_t *__haystack, const wchar_t *__needle) __THROW __asm ("wcswcs") __attribute_pure__; # else # 233 "/usr/include/wchar.h" 3 4 extern wchar_t *wcswcs (const wchar_t *__haystack, const wchar_t *__needle) __THROW __attribute_pure__; # endif # 236 "/usr/include/wchar.h" 3 4 #endif # 237 "/usr/include/wchar.h" 3 4 #ifdef __USE_XOPEN2K8 /* Return the number of wide characters in S, but at most MAXLEN. */ extern size_t wcsnlen (const wchar_t *__s, size_t __maxlen) __THROW __attribute_pure__; #endif # 243 "/usr/include/wchar.h" 3 4 /* Search N wide characters of S for C. */ #ifdef __CORRECT_ISO_CPP_WCHAR_H_PROTO extern "C++" wchar_t *wmemchr (wchar_t *__s, wchar_t __c, size_t __n) __THROW __asm ("wmemchr") __attribute_pure__; extern "C++" const wchar_t *wmemchr (const wchar_t *__s, wchar_t __c, size_t __n) __THROW __asm ("wmemchr") __attribute_pure__; #else # 253 "/usr/include/wchar.h" 3 4 extern wchar_t *wmemchr (const wchar_t *__s, wchar_t __c, size_t __n) __THROW __attribute_pure__; #endif # 256 "/usr/include/wchar.h" 3 4 /* Compare N wide characters of S1 and S2. */ extern int wmemcmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) __THROW __attribute_pure__; /* Copy N wide characters of SRC to DEST. */ extern wchar_t *wmemcpy (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n) __THROW; /* Copy N wide characters of SRC to DEST, guaranteeing correct behavior for overlapping strings. */ extern wchar_t *wmemmove (wchar_t *__s1, const wchar_t *__s2, size_t __n) __THROW; /* Set N wide characters of S to C. */ extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW; #ifdef __USE_GNU /* Copy N wide characters of SRC to DEST and return pointer to following wide character. */ extern wchar_t *wmempcpy (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n) __THROW; #endif # 280 "/usr/include/wchar.h" 3 4 /* Determine whether C constitutes a valid (one-byte) multibyte character. */ extern wint_t btowc (int __c) __THROW; /* Determine whether C corresponds to a member of the extended character set whose multibyte representation is a single byte. */ extern int wctob (wint_t __c) __THROW; /* Determine whether PS points to an object representing the initial state. */ extern int mbsinit (const mbstate_t *__ps) __THROW __attribute_pure__; /* Write wide character representation of multibyte character pointed to by S to PWC. */ extern size_t mbrtowc (wchar_t *__restrict __pwc, const char *__restrict __s, size_t __n, mbstate_t *__restrict __p) __THROW; /* Write multibyte representation of wide character WC to S. */ extern size_t wcrtomb (char *__restrict __s, wchar_t __wc, mbstate_t *__restrict __ps) __THROW; /* Return number of bytes in multibyte character pointed to by S. */ extern size_t __mbrlen (const char *__restrict __s, size_t __n, mbstate_t *__restrict __ps) __THROW; extern size_t mbrlen (const char *__restrict __s, size_t __n, mbstate_t *__restrict __ps) __THROW; #ifdef __USE_EXTERN_INLINES /* Define inline function as optimization. */ /* We can use the BTOWC and WCTOB optimizations since we know that all locales must use ASCII encoding for the values in the ASCII range and because the wchar_t encoding is always ISO 10646. */ extern wint_t __btowc_alias (int __c) __asm ("btowc"); __extern_inline wint_t __NTH (btowc (int __c)) { return (__builtin_constant_p (__c) && __c >= '\0' && __c <= '\x7f' ? (wint_t) __c : __btowc_alias (__c)); } extern int __wctob_alias (wint_t __c) __asm ("wctob"); __extern_inline int __NTH (wctob (wint_t __wc)) { return (__builtin_constant_p (__wc) && __wc >= L'\0' && __wc <= L'\x7f' ? (int) __wc : __wctob_alias (__wc)); } __extern_inline size_t __NTH (mbrlen (const char *__restrict __s, size_t __n, mbstate_t *__restrict __ps)) { return (__ps != NULL ? mbrtowc (NULL, __s, __n, __ps) : __mbrlen (__s, __n, NULL)); } #endif # 334 "/usr/include/wchar.h" 3 4 /* Write wide character representation of multibyte character string SRC to DST. */ extern size_t mbsrtowcs (wchar_t *__restrict __dst, const char **__restrict __src, size_t __len, mbstate_t *__restrict __ps) __THROW; /* Write multibyte character representation of wide character string SRC to DST. */ extern size_t wcsrtombs (char *__restrict __dst, const wchar_t **__restrict __src, size_t __len, mbstate_t *__restrict __ps) __THROW; #ifdef __USE_XOPEN2K8 /* Write wide character representation of at most NMC bytes of the multibyte character string SRC to DST. */ extern size_t mbsnrtowcs (wchar_t *__restrict __dst, const char **__restrict __src, size_t __nmc, size_t __len, mbstate_t *__restrict __ps) __THROW; /* Write multibyte character representation of at most NWC characters from the wide character string SRC to DST. */ extern size_t wcsnrtombs (char *__restrict __dst, const wchar_t **__restrict __src, size_t __nwc, size_t __len, mbstate_t *__restrict __ps) __THROW; #endif /* use POSIX 2008 */ # 362 "/usr/include/wchar.h" 3 4 /* The following functions are extensions found in X/Open CAE. */ #ifdef __USE_XOPEN /* Determine number of column positions required for C. */ extern int wcwidth (wchar_t __c) __THROW; /* Determine number of column positions required for first N wide characters (or fewer if S ends before this) in S. */ extern int wcswidth (const wchar_t *__s, size_t __n) __THROW; #endif /* Use X/Open. */ # 373 "/usr/include/wchar.h" 3 4 /* Convert initial portion of the wide string NPTR to `double' representation. */ extern double wcstod (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __THROW; #ifdef __USE_ISOC99 /* Likewise for `float' and `long double' sizes of floating-point numbers. */ extern float wcstof (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __THROW; extern long double wcstold (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __THROW; #endif /* C99 */ # 387 "/usr/include/wchar.h" 3 4 /* Likewise for `_FloatN' and `_FloatNx' when support is enabled. */ #if 0 /* disabled by -frewrite-includes */ #if __HAVE_FLOAT16 && defined __USE_GNU #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 391 "/usr/include/wchar.h" 3 4 extern _Float16 wcstof16 (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __THROW; #endif # 394 "/usr/include/wchar.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __HAVE_FLOAT32 && defined __USE_GNU #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 396 "/usr/include/wchar.h" 3 4 extern _Float32 wcstof32 (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __THROW; #endif # 399 "/usr/include/wchar.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __HAVE_FLOAT64 && defined __USE_GNU #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 401 "/usr/include/wchar.h" 3 4 extern _Float64 wcstof64 (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __THROW; #endif # 404 "/usr/include/wchar.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __HAVE_FLOAT128 && defined __USE_GNU #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 406 "/usr/include/wchar.h" 3 4 extern _Float128 wcstof128 (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __THROW; #endif # 409 "/usr/include/wchar.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __HAVE_FLOAT32X && defined __USE_GNU #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 411 "/usr/include/wchar.h" 3 4 extern _Float32x wcstof32x (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __THROW; #endif # 414 "/usr/include/wchar.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __HAVE_FLOAT64X && defined __USE_GNU #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 416 "/usr/include/wchar.h" 3 4 extern _Float64x wcstof64x (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __THROW; #endif # 419 "/usr/include/wchar.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __HAVE_FLOAT128X && defined __USE_GNU #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 421 "/usr/include/wchar.h" 3 4 extern _Float128x wcstof128x (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __THROW; #endif # 424 "/usr/include/wchar.h" 3 4 /* Convert initial portion of wide string NPTR to `long int' representation. */ extern long int wcstol (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) __THROW; /* Convert initial portion of wide string NPTR to `unsigned long int' representation. */ extern unsigned long int wcstoul (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) __THROW; #ifdef __USE_ISOC99 /* Convert initial portion of wide string NPTR to `long long int' representation. */ __extension__ extern long long int wcstoll (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) __THROW; /* Convert initial portion of wide string NPTR to `unsigned long long int' representation. */ __extension__ extern unsigned long long int wcstoull (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) __THROW; #endif /* ISO C99. */ # 452 "/usr/include/wchar.h" 3 4 #ifdef __USE_GNU /* Convert initial portion of wide string NPTR to `long long int' representation. */ __extension__ extern long long int wcstoq (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) __THROW; /* Convert initial portion of wide string NPTR to `unsigned long long int' representation. */ __extension__ extern unsigned long long int wcstouq (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) __THROW; #endif /* Use GNU. */ # 468 "/usr/include/wchar.h" 3 4 #ifdef __USE_GNU /* Parallel versions of the functions above which take the locale to use as an additional parameter. These are GNU extensions inspired by the POSIX.1-2008 extended locale API. */ extern long int wcstol_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base, locale_t __loc) __THROW; extern unsigned long int wcstoul_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base, locale_t __loc) __THROW; __extension__ extern long long int wcstoll_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base, locale_t __loc) __THROW; __extension__ extern unsigned long long int wcstoull_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base, locale_t __loc) __THROW; extern double wcstod_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, locale_t __loc) __THROW; extern float wcstof_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, locale_t __loc) __THROW; extern long double wcstold_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, locale_t __loc) __THROW; #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT16 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 505 "/usr/include/wchar.h" 3 4 extern _Float16 wcstof16_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, locale_t __loc) __THROW; # endif # 509 "/usr/include/wchar.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT32 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 511 "/usr/include/wchar.h" 3 4 extern _Float32 wcstof32_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, locale_t __loc) __THROW; # endif # 515 "/usr/include/wchar.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT64 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 517 "/usr/include/wchar.h" 3 4 extern _Float64 wcstof64_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, locale_t __loc) __THROW; # endif # 521 "/usr/include/wchar.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT128 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 523 "/usr/include/wchar.h" 3 4 extern _Float128 wcstof128_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, locale_t __loc) __THROW; # endif # 527 "/usr/include/wchar.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT32X #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 529 "/usr/include/wchar.h" 3 4 extern _Float32x wcstof32x_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, locale_t __loc) __THROW; # endif # 533 "/usr/include/wchar.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT64X #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 535 "/usr/include/wchar.h" 3 4 extern _Float64x wcstof64x_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, locale_t __loc) __THROW; # endif # 539 "/usr/include/wchar.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT128X #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 541 "/usr/include/wchar.h" 3 4 extern _Float128x wcstof128x_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, locale_t __loc) __THROW; # endif # 545 "/usr/include/wchar.h" 3 4 #endif /* use GNU */ # 546 "/usr/include/wchar.h" 3 4 #ifdef __USE_XOPEN2K8 /* Copy SRC to DEST, returning the address of the terminating L'\0' in DEST. */ extern wchar_t *wcpcpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src) __THROW; /* Copy no more than N characters of SRC to DEST, returning the address of the last character written into DEST. */ extern wchar_t *wcpncpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n) __THROW; #endif # 560 "/usr/include/wchar.h" 3 4 /* Wide character I/O functions. */ #if 0 /* disabled by -frewrite-includes */ #if defined __USE_XOPEN2K8 || __GLIBC_USE (LIB_EXT2) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 565 "/usr/include/wchar.h" 3 4 /* Like OPEN_MEMSTREAM, but the stream is wide oriented and produces a wide character string. */ extern __FILE *open_wmemstream (wchar_t **__bufloc, size_t *__sizeloc) __THROW; #endif # 569 "/usr/include/wchar.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_ISOC95 || defined __USE_UNIX98 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 571 "/usr/include/wchar.h" 3 4 /* Select orientation for stream. */ extern int fwide (__FILE *__fp, int __mode) __THROW; /* Write formatted output to STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fwprintf (__FILE *__restrict __stream, const wchar_t *__restrict __format, ...) /* __attribute__ ((__format__ (__wprintf__, 2, 3))) */; /* Write formatted output to stdout. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int wprintf (const wchar_t *__restrict __format, ...) /* __attribute__ ((__format__ (__wprintf__, 1, 2))) */; /* Write formatted output of at most N characters to S. */ extern int swprintf (wchar_t *__restrict __s, size_t __n, const wchar_t *__restrict __format, ...) __THROW /* __attribute__ ((__format__ (__wprintf__, 3, 4))) */; /* Write formatted output to S from argument list ARG. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int vfwprintf (__FILE *__restrict __s, const wchar_t *__restrict __format, __gnuc_va_list __arg) /* __attribute__ ((__format__ (__wprintf__, 2, 0))) */; /* Write formatted output to stdout from argument list ARG. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int vwprintf (const wchar_t *__restrict __format, __gnuc_va_list __arg) /* __attribute__ ((__format__ (__wprintf__, 1, 0))) */; /* Write formatted output of at most N character to S from argument list ARG. */ extern int vswprintf (wchar_t *__restrict __s, size_t __n, const wchar_t *__restrict __format, __gnuc_va_list __arg) __THROW /* __attribute__ ((__format__ (__wprintf__, 3, 0))) */; /* Read formatted input from STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fwscanf (__FILE *__restrict __stream, const wchar_t *__restrict __format, ...) /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */; /* Read formatted input from stdin. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int wscanf (const wchar_t *__restrict __format, ...) /* __attribute__ ((__format__ (__wscanf__, 1, 2))) */; /* Read formatted input from S. */ extern int swscanf (const wchar_t *__restrict __s, const wchar_t *__restrict __format, ...) __THROW /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */; /* For historical reasons, the C99-compliant versions of the scanf functions are at alternative names. When __LDBL_COMPAT is in effect, this is handled in bits/wchar-ldbl.h. */ #if 0 /* disabled by -frewrite-includes */ #if !__GLIBC_USE (DEPRECATED_SCANF) && !defined __LDBL_COMPAT #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 639 "/usr/include/wchar.h" 3 4 # ifdef __REDIRECT extern int __REDIRECT (fwscanf, (__FILE *__restrict __stream, const wchar_t *__restrict __format, ...), __isoc99_fwscanf) /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */; extern int __REDIRECT (wscanf, (const wchar_t *__restrict __format, ...), __isoc99_wscanf) /* __attribute__ ((__format__ (__wscanf__, 1, 2))) */; extern int __REDIRECT_NTH (swscanf, (const wchar_t *__restrict __s, const wchar_t *__restrict __format, ...), __isoc99_swscanf) /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */; # else # 652 "/usr/include/wchar.h" 3 4 extern int __isoc99_fwscanf (__FILE *__restrict __stream, const wchar_t *__restrict __format, ...); extern int __isoc99_wscanf (const wchar_t *__restrict __format, ...); extern int __isoc99_swscanf (const wchar_t *__restrict __s, const wchar_t *__restrict __format, ...) __THROW; # define fwscanf __isoc99_fwscanf # define wscanf __isoc99_wscanf # define swscanf __isoc99_swscanf # endif # 662 "/usr/include/wchar.h" 3 4 # endif # 663 "/usr/include/wchar.h" 3 4 #endif /* Use ISO C95, C99 and Unix98. */ # 665 "/usr/include/wchar.h" 3 4 #ifdef __USE_ISOC99 /* Read formatted input from S into argument list ARG. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int vfwscanf (__FILE *__restrict __s, const wchar_t *__restrict __format, __gnuc_va_list __arg) /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */; /* Read formatted input from stdin into argument list ARG. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int vwscanf (const wchar_t *__restrict __format, __gnuc_va_list __arg) /* __attribute__ ((__format__ (__wscanf__, 1, 0))) */; /* Read formatted input from S into argument list ARG. */ extern int vswscanf (const wchar_t *__restrict __s, const wchar_t *__restrict __format, __gnuc_va_list __arg) __THROW /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */; /* Same redirection as above for the v*wscanf family. */ #if 0 /* disabled by -frewrite-includes */ # if !__GLIBC_USE (DEPRECATED_SCANF) \ && (!defined __LDBL_COMPAT || !defined __REDIRECT) \ && (defined __STRICT_ANSI__ || defined __USE_XOPEN2K) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 692 "/usr/include/wchar.h" 3 4 # ifdef __REDIRECT extern int __REDIRECT (vfwscanf, (__FILE *__restrict __s, const wchar_t *__restrict __format, __gnuc_va_list __arg), __isoc99_vfwscanf) /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */; extern int __REDIRECT (vwscanf, (const wchar_t *__restrict __format, __gnuc_va_list __arg), __isoc99_vwscanf) /* __attribute__ ((__format__ (__wscanf__, 1, 0))) */; extern int __REDIRECT_NTH (vswscanf, (const wchar_t *__restrict __s, const wchar_t *__restrict __format, __gnuc_va_list __arg), __isoc99_vswscanf) /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */; # else # 705 "/usr/include/wchar.h" 3 4 extern int __isoc99_vfwscanf (__FILE *__restrict __s, const wchar_t *__restrict __format, __gnuc_va_list __arg); extern int __isoc99_vwscanf (const wchar_t *__restrict __format, __gnuc_va_list __arg); extern int __isoc99_vswscanf (const wchar_t *__restrict __s, const wchar_t *__restrict __format, __gnuc_va_list __arg) __THROW; # define vfwscanf __isoc99_vfwscanf # define vwscanf __isoc99_vwscanf # define vswscanf __isoc99_vswscanf # endif # 717 "/usr/include/wchar.h" 3 4 # endif # 718 "/usr/include/wchar.h" 3 4 #endif /* Use ISO C99. */ # 720 "/usr/include/wchar.h" 3 4 /* Read a character from STREAM. These functions are possible cancellation points and therefore not marked with __THROW. */ extern wint_t fgetwc (__FILE *__stream); extern wint_t getwc (__FILE *__stream); /* Read a character from stdin. This function is a possible cancellation point and therefore not marked with __THROW. */ extern wint_t getwchar (void); /* Write a character to STREAM. These functions are possible cancellation points and therefore not marked with __THROW. */ extern wint_t fputwc (wchar_t __wc, __FILE *__stream); extern wint_t putwc (wchar_t __wc, __FILE *__stream); /* Write a character to stdout. This function is a possible cancellation point and therefore not marked with __THROW. */ extern wint_t putwchar (wchar_t __wc); /* Get a newline-terminated wide character string of finite length from STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern wchar_t *fgetws (wchar_t *__restrict __ws, int __n, __FILE *__restrict __stream); /* Write a string to STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fputws (const wchar_t *__restrict __ws, __FILE *__restrict __stream); /* Push a character back onto the input buffer of STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern wint_t ungetwc (wint_t __wc, __FILE *__stream); #ifdef __USE_GNU /* These are defined to be equivalent to the `char' functions defined in POSIX.1:1996. These functions are not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation they are cancellation points and therefore not marked with __THROW. */ extern wint_t getwc_unlocked (__FILE *__stream); extern wint_t getwchar_unlocked (void); /* This is the wide character version of a GNU extension. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern wint_t fgetwc_unlocked (__FILE *__stream); /* Faster version when locking is not necessary. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern wint_t fputwc_unlocked (wchar_t __wc, __FILE *__stream); /* These are defined to be equivalent to the `char' functions defined in POSIX.1:1996. These functions are not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation they are cancellation points and therefore not marked with __THROW. */ extern wint_t putwc_unlocked (wchar_t __wc, __FILE *__stream); extern wint_t putwchar_unlocked (wchar_t __wc); /* This function does the same as `fgetws' but does not lock the stream. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern wchar_t *fgetws_unlocked (wchar_t *__restrict __ws, int __n, __FILE *__restrict __stream); /* This function does the same as `fputws' but does not lock the stream. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int fputws_unlocked (const wchar_t *__restrict __ws, __FILE *__restrict __stream); #endif # 829 "/usr/include/wchar.h" 3 4 /* Format TP into S according to FORMAT. Write no more than MAXSIZE wide characters and return the number of wide characters written, or 0 if it would exceed MAXSIZE. */ extern size_t wcsftime (wchar_t *__restrict __s, size_t __maxsize, const wchar_t *__restrict __format, const struct tm *__restrict __tp) __THROW; # ifdef __USE_GNU /* Similar to `wcsftime' but takes the information from the provided locale and not the global locale. */ extern size_t wcsftime_l (wchar_t *__restrict __s, size_t __maxsize, const wchar_t *__restrict __format, const struct tm *__restrict __tp, locale_t __loc) __THROW; # endif # 846 "/usr/include/wchar.h" 3 4 /* Define some macros helping to catch buffer overflows. */ #if 0 /* disabled by -frewrite-includes */ #if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 849 "/usr/include/wchar.h" 3 4 #if 0 /* expanded by -frewrite-includes */ # include <bits/wchar2.h> #endif /* expanded by -frewrite-includes */ # 849 "/usr/include/wchar.h" 3 4 # 850 "/usr/include/wchar.h" 3 4 #endif # 851 "/usr/include/wchar.h" 3 4 #ifdef __LDBL_COMPAT #if 0 /* expanded by -frewrite-includes */ # include <bits/wchar-ldbl.h> #endif /* expanded by -frewrite-includes */ # 853 "/usr/include/wchar.h" 3 4 # 854 "/usr/include/wchar.h" 3 4 #endif # 855 "/usr/include/wchar.h" 3 4 __END_DECLS #endif /* wchar.h */ # 859 "/usr/include/wchar.h" 3 4 # 45 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 2 3 #endif # 46 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #ifndef _GLIBCXX_CWCHAR #define _GLIBCXX_CWCHAR 1 // Need to do a bit of trickery here with mbstate_t as char_traits // assumes it is in wchar.h, regardless of wchar_t specializations. #ifndef _GLIBCXX_HAVE_MBSTATE_T extern "C" { typedef struct { int __fill[6]; } mbstate_t; } #endif # 61 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 namespace std { using ::mbstate_t; } // namespace std // Get rid of those macros defined in <wchar.h> in lieu of real functions. #undef btowc #undef fgetwc #undef fgetws #undef fputwc #undef fputws #undef fwide #undef fwprintf #undef fwscanf #undef getwc #undef getwchar #undef mbrlen #undef mbrtowc #undef mbsinit #undef mbsrtowcs #undef putwc #undef putwchar #undef swprintf #undef swscanf #undef ungetwc #undef vfwprintf #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_HAVE_VFWSCANF #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 89 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 # undef vfwscanf #endif # 91 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #undef vswprintf #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_HAVE_VSWSCANF #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 93 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 # undef vswscanf #endif # 95 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #undef vwprintf #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_HAVE_VWSCANF #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 97 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 # undef vwscanf #endif # 99 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #undef wcrtomb #undef wcscat #undef wcschr #undef wcscmp #undef wcscoll #undef wcscpy #undef wcscspn #undef wcsftime #undef wcslen #undef wcsncat #undef wcsncmp #undef wcsncpy #undef wcspbrk #undef wcsrchr #undef wcsrtombs #undef wcsspn #undef wcsstr #undef wcstod #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_HAVE_WCSTOF #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 118 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 # undef wcstof #endif # 120 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #undef wcstok #undef wcstol #undef wcstoul #undef wcsxfrm #undef wctob #undef wmemchr #undef wmemcmp #undef wmemcpy #undef wmemmove #undef wmemset #undef wprintf #undef wscanf #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_USE_WCHAR_T #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 134 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 extern "C++" { namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION using ::wint_t; using ::btowc; using ::fgetwc; using ::fgetws; using ::fputwc; using ::fputws; using ::fwide; using ::fwprintf; using ::fwscanf; using ::getwc; using ::getwchar; using ::mbrlen; using ::mbrtowc; using ::mbsinit; using ::mbsrtowcs; using ::putwc; using ::putwchar; #ifndef _GLIBCXX_HAVE_BROKEN_VSWPRINTF using ::swprintf; #endif # 162 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 using ::swscanf; using ::ungetwc; using ::vfwprintf; #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_HAVE_VFWSCANF #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 166 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 using ::vfwscanf; #endif # 168 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #ifndef _GLIBCXX_HAVE_BROKEN_VSWPRINTF using ::vswprintf; #endif # 171 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_HAVE_VSWSCANF #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 172 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 using ::vswscanf; #endif # 174 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 using ::vwprintf; #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_HAVE_VWSCANF #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 176 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 using ::vwscanf; #endif # 178 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 using ::wcrtomb; using ::wcscat; using ::wcscmp; using ::wcscoll; using ::wcscpy; using ::wcscspn; using ::wcsftime; using ::wcslen; using ::wcsncat; using ::wcsncmp; using ::wcsncpy; using ::wcsrtombs; using ::wcsspn; using ::wcstod; #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_HAVE_WCSTOF #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 193 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 using ::wcstof; #endif # 195 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 using ::wcstok; using ::wcstol; using ::wcstoul; using ::wcsxfrm; using ::wctob; using ::wmemcmp; using ::wmemcpy; using ::wmemmove; using ::wmemset; using ::wprintf; using ::wscanf; using ::wcschr; using ::wcspbrk; using ::wcsrchr; using ::wcsstr; using ::wmemchr; #ifndef __CORRECT_ISO_CPP_WCHAR_H_PROTO inline wchar_t* wcschr(wchar_t* __p, wchar_t __c) { return wcschr(const_cast<const wchar_t*>(__p), __c); } inline wchar_t* wcspbrk(wchar_t* __s1, const wchar_t* __s2) { return wcspbrk(const_cast<const wchar_t*>(__s1), __s2); } inline wchar_t* wcsrchr(wchar_t* __p, wchar_t __c) { return wcsrchr(const_cast<const wchar_t*>(__p), __c); } inline wchar_t* wcsstr(wchar_t* __s1, const wchar_t* __s2) { return wcsstr(const_cast<const wchar_t*>(__s1), __s2); } inline wchar_t* wmemchr(wchar_t* __p, wchar_t __c, size_t __n) { return wmemchr(const_cast<const wchar_t*>(__p), __c, __n); } #endif # 233 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 _GLIBCXX_END_NAMESPACE_VERSION } // namespace } // extern "C++" #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_USE_C99_WCHAR #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 239 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #undef wcstold #undef wcstoll #undef wcstoull namespace __gnu_cxx { #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 247 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 extern "C" long double (wcstold)(const wchar_t * __restrict, wchar_t ** __restrict) throw (); #endif # 250 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #if 0 /* disabled by -frewrite-includes */ #if !_GLIBCXX_USE_C99_DYNAMIC #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 251 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 using ::wcstold; #endif # 253 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_USE_C99_LONG_LONG_CHECK || _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 254 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 extern "C" long long int (wcstoll)(const wchar_t * __restrict, wchar_t ** __restrict, int) throw (); extern "C" unsigned long long int (wcstoull)(const wchar_t * __restrict, wchar_t ** __restrict, int) throw (); #endif # 259 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #if 0 /* disabled by -frewrite-includes */ #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 260 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 using ::wcstoll; using ::wcstoull; #endif # 263 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 } // namespace __gnu_cxx namespace std { using ::__gnu_cxx::wcstold; using ::__gnu_cxx::wcstoll; using ::__gnu_cxx::wcstoull; } // namespace #endif # 273 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #endif //_GLIBCXX_USE_WCHAR_T # 275 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 277 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #ifdef _GLIBCXX_USE_WCHAR_T namespace std { #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_HAVE_WCSTOF #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 283 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 using std::wcstof; #endif # 285 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_HAVE_VFWSCANF #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 286 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 using std::vfwscanf; #endif # 288 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_HAVE_VSWSCANF #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 289 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 using std::vswscanf; #endif # 291 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_HAVE_VWSCANF #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 292 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 using std::vwscanf; #endif # 294 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_USE_C99_WCHAR #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 296 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 using std::wcstold; using std::wcstoll; using std::wcstoull; #endif # 300 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 } // namespace #endif // _GLIBCXX_USE_WCHAR_T # 303 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #endif // C++11 # 305 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #endif # 307 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 # 41 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/postypes.h" 2 3 // XXX If <stdint.h> is really needed, make sure to define the macros // before including it, in order not to break <tr1/cstdint> (and <cstdint> // in C++11). Reconsider all this as soon as possible... #if 0 /* disabled by -frewrite-includes */ #if (defined(_GLIBCXX_HAVE_INT64_T) && !defined(_GLIBCXX_HAVE_INT64_T_LONG) \ && !defined(_GLIBCXX_HAVE_INT64_T_LONG_LONG)) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 47 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/postypes.h" 3 #ifndef __STDC_LIMIT_MACROS # define _UNDEF__STDC_LIMIT_MACROS # define __STDC_LIMIT_MACROS #endif # 52 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/postypes.h" 3 #ifndef __STDC_CONSTANT_MACROS # define _UNDEF__STDC_CONSTANT_MACROS # define __STDC_CONSTANT_MACROS #endif # 56 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/postypes.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <stdint.h> // For int64_t #endif /* expanded by -frewrite-includes */ # 56 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/postypes.h" 3 # 57 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/postypes.h" 3 #ifdef _UNDEF__STDC_LIMIT_MACROS # undef __STDC_LIMIT_MACROS # undef _UNDEF__STDC_LIMIT_MACROS #endif # 61 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/postypes.h" 3 #ifdef _UNDEF__STDC_CONSTANT_MACROS # undef __STDC_CONSTANT_MACROS # undef _UNDEF__STDC_CONSTANT_MACROS #endif # 65 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/postypes.h" 3 #endif # 67 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/postypes.h" 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION // The types streamoff, streampos and wstreampos and the class // template fpos<> are described in clauses 21.1.2, 21.1.3, 27.1.2, // 27.2, 27.4.1, 27.4.3 and D.6. Despite all this verbiage, the // behaviour of these types is mostly implementation defined or // unspecified. The behaviour in this implementation is as noted // below. /** * @brief Type used by fpos, char_traits<char>, and char_traits<wchar_t>. * * In clauses 21.1.3.1 and 27.4.1 streamoff is described as an * implementation defined type. * Note: In versions of GCC up to and including GCC 3.3, streamoff * was typedef long. */ #ifdef _GLIBCXX_HAVE_INT64_T_LONG typedef long streamoff; #if 0 /* disabled by -frewrite-includes */ #if 0 #elif defined(_GLIBCXX_HAVE_INT64_T_LONG_LONG) #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 90 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/postypes.h" 3 typedef long long streamoff; #if 0 /* disabled by -frewrite-includes */ #if 0 #elif defined(_GLIBCXX_HAVE_INT64_T) #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 92 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/postypes.h" 3 typedef int64_t streamoff; #else # 94 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/postypes.h" 3 typedef long long streamoff; #endif # 96 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/postypes.h" 3 /// Integral type for I/O operation counts and buffer sizes. typedef ptrdiff_t streamsize; // Signed integral type /** * @brief Class representing stream positions. * * The standard places no requirements upon the template parameter StateT. * In this implementation StateT must be DefaultConstructible, * CopyConstructible and Assignable. The standard only requires that fpos * should contain a member of type StateT. In this implementation it also * contains an offset stored as a signed integer. * * @param StateT Type passed to and returned from state(). */ template<typename _StateT> class fpos { private: streamoff _M_off; _StateT _M_state; public: // The standard doesn't require that fpos objects can be default // constructed. This implementation provides a default // constructor that initializes the offset to 0 and default // constructs the state. fpos() : _M_off(0), _M_state() { } // The standard requires that fpos objects can be constructed // from streamoff objects using the constructor syntax, and // fails to give any meaningful semantics. In this // implementation implicit conversion is also allowed, and this // constructor stores the streamoff as the offset and default // constructs the state. /// Construct position from offset. fpos(streamoff __off) : _M_off(__off), _M_state() { } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 137 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/postypes.h" 3 fpos(const fpos&) = default; fpos& operator=(const fpos&) = default; ~fpos() = default; #endif # 141 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/postypes.h" 3 /// Convert to streamoff. operator streamoff() const { return _M_off; } /// Remember the value of @a st. void state(_StateT __st) { _M_state = __st; } /// Return the last set value of @a st. _StateT state() const { return _M_state; } // The standard requires that this operator must be defined, but // gives no semantics. In this implementation it just adds its // argument to the stored offset and returns *this. /// Add offset to this position. fpos& operator+=(streamoff __off) { _M_off += __off; return *this; } // The standard requires that this operator must be defined, but // gives no semantics. In this implementation it just subtracts // its argument from the stored offset and returns *this. /// Subtract offset from this position. fpos& operator-=(streamoff __off) { _M_off -= __off; return *this; } // The standard requires that this operator must be defined, but // defines its semantics only in terms of operator-. In this // implementation it constructs a copy of *this, adds the // argument to that copy using operator+= and then returns the // copy. /// Add position and offset. fpos operator+(streamoff __off) const { fpos __pos(*this); __pos += __off; return __pos; } // The standard requires that this operator must be defined, but // defines its semantics only in terms of operator+. In this // implementation it constructs a copy of *this, subtracts the // argument from that copy using operator-= and then returns the // copy. /// Subtract offset from position. fpos operator-(streamoff __off) const { fpos __pos(*this); __pos -= __off; return __pos; } // The standard requires that this operator must be defined, but // defines its semantics only in terms of operator+. In this // implementation it returns the difference between the offset // stored in *this and in the argument. /// Subtract position to return offset. streamoff operator-(const fpos& __other) const { return _M_off - __other._M_off; } }; // The standard only requires that operator== must be an // equivalence relation. In this implementation two fpos<StateT> // objects belong to the same equivalence class if the contained // offsets compare equal. /// Test if equivalent to another position. template<typename _StateT> inline bool operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) { return streamoff(__lhs) == streamoff(__rhs); } template<typename _StateT> inline bool operator!=(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) { return streamoff(__lhs) != streamoff(__rhs); } // Clauses 21.1.3.1 and 21.1.3.2 describe streampos and wstreampos // as implementation defined types, but clause 27.2 requires that // they must both be typedefs for fpos<mbstate_t> /// File position for char streams. typedef fpos<mbstate_t> streampos; /// File position for wchar_t streams. typedef fpos<mbstate_t> wstreampos; #ifdef _GLIBCXX_USE_CHAR8_T /// File position for char8_t streams. typedef fpos<mbstate_t> u8streampos; #endif # 242 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/postypes.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 244 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/postypes.h" 3 /// File position for char16_t streams. typedef fpos<mbstate_t> u16streampos; /// File position for char32_t streams. typedef fpos<mbstate_t> u32streampos; #endif # 249 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/postypes.h" 3 _GLIBCXX_END_NAMESPACE_VERSION } // namespace #endif # 254 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/postypes.h" 3 # 41 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/char_traits.h" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <cwchar> // For WEOF, wmemmove, wmemset, etc. #endif /* expanded by -frewrite-includes */ # 41 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/char_traits.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 1 3 // -*- C++ -*- forwarding header. // Copyright (C) 1997-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file include/cwchar * This is a Standard C++ Library file. You should @c \#include this file * in your programs, rather than any of the @a *.h implementation files. * * This is the C++ version of the Standard C Library header @c wchar.h, * and its contents are (mostly) the same as that header, but are all * contained in the namespace @c std (except for names which are defined * as macros in C). */ // // ISO C++ 14882: 21.4 // #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 40 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/c++config.h> #endif /* expanded by -frewrite-includes */ # 41 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 # 42 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_HAVE_WCHAR_H #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 44 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #if 0 /* expanded by -frewrite-includes */ #include <wchar.h> #endif /* expanded by -frewrite-includes */ # 44 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 # 45 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #endif # 46 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #ifndef _GLIBCXX_CWCHAR #define _GLIBCXX_CWCHAR 1 // Need to do a bit of trickery here with mbstate_t as char_traits // assumes it is in wchar.h, regardless of wchar_t specializations. #ifndef _GLIBCXX_HAVE_MBSTATE_T extern "C" { typedef struct { int __fill[6]; } mbstate_t; } #endif # 61 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 namespace std { using ::mbstate_t; } // namespace std // Get rid of those macros defined in <wchar.h> in lieu of real functions. #undef btowc #undef fgetwc #undef fgetws #undef fputwc #undef fputws #undef fwide #undef fwprintf #undef fwscanf #undef getwc #undef getwchar #undef mbrlen #undef mbrtowc #undef mbsinit #undef mbsrtowcs #undef putwc #undef putwchar #undef swprintf #undef swscanf #undef ungetwc #undef vfwprintf #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_HAVE_VFWSCANF #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 89 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 # undef vfwscanf #endif # 91 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #undef vswprintf #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_HAVE_VSWSCANF #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 93 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 # undef vswscanf #endif # 95 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #undef vwprintf #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_HAVE_VWSCANF #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 97 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 # undef vwscanf #endif # 99 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #undef wcrtomb #undef wcscat #undef wcschr #undef wcscmp #undef wcscoll #undef wcscpy #undef wcscspn #undef wcsftime #undef wcslen #undef wcsncat #undef wcsncmp #undef wcsncpy #undef wcspbrk #undef wcsrchr #undef wcsrtombs #undef wcsspn #undef wcsstr #undef wcstod #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_HAVE_WCSTOF #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 118 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 # undef wcstof #endif # 120 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #undef wcstok #undef wcstol #undef wcstoul #undef wcsxfrm #undef wctob #undef wmemchr #undef wmemcmp #undef wmemcpy #undef wmemmove #undef wmemset #undef wprintf #undef wscanf #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_USE_WCHAR_T #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 134 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 extern "C++" { namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION using ::wint_t; using ::btowc; using ::fgetwc; using ::fgetws; using ::fputwc; using ::fputws; using ::fwide; using ::fwprintf; using ::fwscanf; using ::getwc; using ::getwchar; using ::mbrlen; using ::mbrtowc; using ::mbsinit; using ::mbsrtowcs; using ::putwc; using ::putwchar; #ifndef _GLIBCXX_HAVE_BROKEN_VSWPRINTF using ::swprintf; #endif # 162 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 using ::swscanf; using ::ungetwc; using ::vfwprintf; #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_HAVE_VFWSCANF #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 166 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 using ::vfwscanf; #endif # 168 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #ifndef _GLIBCXX_HAVE_BROKEN_VSWPRINTF using ::vswprintf; #endif # 171 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_HAVE_VSWSCANF #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 172 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 using ::vswscanf; #endif # 174 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 using ::vwprintf; #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_HAVE_VWSCANF #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 176 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 using ::vwscanf; #endif # 178 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 using ::wcrtomb; using ::wcscat; using ::wcscmp; using ::wcscoll; using ::wcscpy; using ::wcscspn; using ::wcsftime; using ::wcslen; using ::wcsncat; using ::wcsncmp; using ::wcsncpy; using ::wcsrtombs; using ::wcsspn; using ::wcstod; #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_HAVE_WCSTOF #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 193 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 using ::wcstof; #endif # 195 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 using ::wcstok; using ::wcstol; using ::wcstoul; using ::wcsxfrm; using ::wctob; using ::wmemcmp; using ::wmemcpy; using ::wmemmove; using ::wmemset; using ::wprintf; using ::wscanf; using ::wcschr; using ::wcspbrk; using ::wcsrchr; using ::wcsstr; using ::wmemchr; #ifndef __CORRECT_ISO_CPP_WCHAR_H_PROTO inline wchar_t* wcschr(wchar_t* __p, wchar_t __c) { return wcschr(const_cast<const wchar_t*>(__p), __c); } inline wchar_t* wcspbrk(wchar_t* __s1, const wchar_t* __s2) { return wcspbrk(const_cast<const wchar_t*>(__s1), __s2); } inline wchar_t* wcsrchr(wchar_t* __p, wchar_t __c) { return wcsrchr(const_cast<const wchar_t*>(__p), __c); } inline wchar_t* wcsstr(wchar_t* __s1, const wchar_t* __s2) { return wcsstr(const_cast<const wchar_t*>(__s1), __s2); } inline wchar_t* wmemchr(wchar_t* __p, wchar_t __c, size_t __n) { return wmemchr(const_cast<const wchar_t*>(__p), __c, __n); } #endif # 233 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 _GLIBCXX_END_NAMESPACE_VERSION } // namespace } // extern "C++" #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_USE_C99_WCHAR #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 239 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #undef wcstold #undef wcstoll #undef wcstoull namespace __gnu_cxx { #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 247 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 extern "C" long double (wcstold)(const wchar_t * __restrict, wchar_t ** __restrict) throw (); #endif # 250 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #if 0 /* disabled by -frewrite-includes */ #if !_GLIBCXX_USE_C99_DYNAMIC #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 251 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 using ::wcstold; #endif # 253 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_USE_C99_LONG_LONG_CHECK || _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 254 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 extern "C" long long int (wcstoll)(const wchar_t * __restrict, wchar_t ** __restrict, int) throw (); extern "C" unsigned long long int (wcstoull)(const wchar_t * __restrict, wchar_t ** __restrict, int) throw (); #endif # 259 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #if 0 /* disabled by -frewrite-includes */ #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 260 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 using ::wcstoll; using ::wcstoull; #endif # 263 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 } // namespace __gnu_cxx namespace std { using ::__gnu_cxx::wcstold; using ::__gnu_cxx::wcstoll; using ::__gnu_cxx::wcstoull; } // namespace #endif # 273 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #endif //_GLIBCXX_USE_WCHAR_T # 275 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 277 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #ifdef _GLIBCXX_USE_WCHAR_T namespace std { #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_HAVE_WCSTOF #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 283 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 using std::wcstof; #endif # 285 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_HAVE_VFWSCANF #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 286 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 using std::vfwscanf; #endif # 288 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_HAVE_VSWSCANF #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 289 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 using std::vswscanf; #endif # 291 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_HAVE_VWSCANF #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 292 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 using std::vwscanf; #endif # 294 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_USE_C99_WCHAR #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 296 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 using std::wcstold; using std::wcstoll; using std::wcstoull; #endif # 300 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 } // namespace #endif // _GLIBCXX_USE_WCHAR_T # 303 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #endif // C++11 # 305 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #endif # 307 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 # 42 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/char_traits.h" 2 3 #ifndef _GLIBCXX_ALWAYS_INLINE # define _GLIBCXX_ALWAYS_INLINE inline __attribute__((__always_inline__)) #endif # 46 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/char_traits.h" 3 namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @brief Mapping from character type to associated types. * * @note This is an implementation class for the generic version * of char_traits. It defines int_type, off_type, pos_type, and * state_type. By default these are unsigned long, streamoff, * streampos, and mbstate_t. Users who need a different set of * types, but who don't need to change the definitions of any function * defined in char_traits, can specialize __gnu_cxx::_Char_types * while leaving __gnu_cxx::char_traits alone. */ template<typename _CharT> struct _Char_types { typedef unsigned long int_type; typedef std::streampos pos_type; typedef std::streamoff off_type; typedef std::mbstate_t state_type; }; /** * @brief Base class used to implement std::char_traits. * * @note For any given actual character type, this definition is * probably wrong. (Most of the member functions are likely to be * right, but the int_type and state_type typedefs, and the eof() * member function, are likely to be wrong.) The reason this class * exists is so users can specialize it. Classes in namespace std * may not be specialized for fundamental types, but classes in * namespace __gnu_cxx may be. * * See https://gcc.gnu.org/onlinedocs/libstdc++/manual/strings.html#strings.string.character_types * for advice on how to make use of this class for @a unusual character * types. Also, check out include/ext/pod_char_traits.h. */ template<typename _CharT> struct char_traits { typedef _CharT char_type; typedef typename _Char_types<_CharT>::int_type int_type; typedef typename _Char_types<_CharT>::pos_type pos_type; typedef typename _Char_types<_CharT>::off_type off_type; typedef typename _Char_types<_CharT>::state_type state_type; static _GLIBCXX14_CONSTEXPR void assign(char_type& __c1, const char_type& __c2) { __c1 = __c2; } static _GLIBCXX_CONSTEXPR bool eq(const char_type& __c1, const char_type& __c2) { return __c1 == __c2; } static _GLIBCXX_CONSTEXPR bool lt(const char_type& __c1, const char_type& __c2) { return __c1 < __c2; } static _GLIBCXX14_CONSTEXPR int compare(const char_type* __s1, const char_type* __s2, std::size_t __n); static _GLIBCXX14_CONSTEXPR std::size_t length(const char_type* __s); static _GLIBCXX14_CONSTEXPR const char_type* find(const char_type* __s, std::size_t __n, const char_type& __a); static char_type* move(char_type* __s1, const char_type* __s2, std::size_t __n); static char_type* copy(char_type* __s1, const char_type* __s2, std::size_t __n); static char_type* assign(char_type* __s, std::size_t __n, char_type __a); static _GLIBCXX_CONSTEXPR char_type to_char_type(const int_type& __c) { return static_cast<char_type>(__c); } static _GLIBCXX_CONSTEXPR int_type to_int_type(const char_type& __c) { return static_cast<int_type>(__c); } static _GLIBCXX_CONSTEXPR bool eq_int_type(const int_type& __c1, const int_type& __c2) { return __c1 == __c2; } static _GLIBCXX_CONSTEXPR int_type eof() { return static_cast<int_type>(_GLIBCXX_STDIO_EOF); } static _GLIBCXX_CONSTEXPR int_type not_eof(const int_type& __c) { return !eq_int_type(__c, eof()) ? __c : to_int_type(char_type()); } }; template<typename _CharT> _GLIBCXX14_CONSTEXPR int char_traits<_CharT>:: compare(const char_type* __s1, const char_type* __s2, std::size_t __n) { for (std::size_t __i = 0; __i < __n; ++__i) if (lt(__s1[__i], __s2[__i])) return -1; else if (lt(__s2[__i], __s1[__i])) return 1; return 0; } template<typename _CharT> _GLIBCXX14_CONSTEXPR std::size_t char_traits<_CharT>:: length(const char_type* __p) { std::size_t __i = 0; while (!eq(__p[__i], char_type())) ++__i; return __i; } template<typename _CharT> _GLIBCXX14_CONSTEXPR const typename char_traits<_CharT>::char_type* char_traits<_CharT>:: find(const char_type* __s, std::size_t __n, const char_type& __a) { for (std::size_t __i = 0; __i < __n; ++__i) if (eq(__s[__i], __a)) return __s + __i; return 0; } template<typename _CharT> typename char_traits<_CharT>::char_type* char_traits<_CharT>:: move(char_type* __s1, const char_type* __s2, std::size_t __n) { if (__n == 0) return __s1; return static_cast<_CharT*>(__builtin_memmove(__s1, __s2, __n * sizeof(char_type))); } template<typename _CharT> typename char_traits<_CharT>::char_type* char_traits<_CharT>:: copy(char_type* __s1, const char_type* __s2, std::size_t __n) { // NB: Inline std::copy so no recursive dependencies. std::copy(__s2, __s2 + __n, __s1); return __s1; } template<typename _CharT> typename char_traits<_CharT>::char_type* char_traits<_CharT>:: assign(char_type* __s, std::size_t __n, char_type __a) { // NB: Inline std::fill_n so no recursive dependencies. std::fill_n(__s, __n, __a); return __s; } _GLIBCXX_END_NAMESPACE_VERSION } // namespace namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 220 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/char_traits.h" 3 #define __cpp_lib_constexpr_char_traits 201611 /** * @brief Determine whether the characters of a NULL-terminated * string are known at compile time. * @param __s The string. * * Assumes that _CharT is a built-in character type. */ template<typename _CharT> static _GLIBCXX_ALWAYS_INLINE constexpr bool __constant_string_p(const _CharT* __s) { #ifdef _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED (void) __s; // In constexpr contexts all strings should be constant. return __builtin_is_constant_evaluated(); #else # 238 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/char_traits.h" 3 while (__builtin_constant_p(*__s) && *__s) __s++; return __builtin_constant_p(*__s); #endif # 242 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/char_traits.h" 3 } /** * @brief Determine whether the characters of a character array are * known at compile time. * @param __a The character array. * @param __n Number of characters. * * Assumes that _CharT is a built-in character type. */ template<typename _CharT> static _GLIBCXX_ALWAYS_INLINE constexpr bool __constant_char_array_p(const _CharT* __a, size_t __n) { #ifdef _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED (void) __a; (void) __n; // In constexpr contexts all character arrays should be constant. return __builtin_is_constant_evaluated(); #else # 262 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/char_traits.h" 3 size_t __i = 0; while (__i < __n && __builtin_constant_p(__a[__i])) __i++; return __i == __n; #endif # 267 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/char_traits.h" 3 } #endif # 269 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/char_traits.h" 3 // 21.1 /** * @brief Basis for explicit traits specializations. * * @note For any given actual character type, this definition is * probably wrong. Since this is just a thin wrapper around * __gnu_cxx::char_traits, it is possible to achieve a more * appropriate definition by specializing __gnu_cxx::char_traits. * * See https://gcc.gnu.org/onlinedocs/libstdc++/manual/strings.html#strings.string.character_types * for advice on how to make use of this class for @a unusual character * types. Also, check out include/ext/pod_char_traits.h. */ template<class _CharT> struct char_traits : public __gnu_cxx::char_traits<_CharT> { }; /// 21.1.3.1 char_traits specializations template<> struct char_traits<char> { typedef char char_type; typedef int int_type; typedef streampos pos_type; typedef streamoff off_type; typedef mbstate_t state_type; static _GLIBCXX17_CONSTEXPR void assign(char_type& __c1, const char_type& __c2) _GLIBCXX_NOEXCEPT { __c1 = __c2; } static _GLIBCXX_CONSTEXPR bool eq(const char_type& __c1, const char_type& __c2) _GLIBCXX_NOEXCEPT { return __c1 == __c2; } static _GLIBCXX_CONSTEXPR bool lt(const char_type& __c1, const char_type& __c2) _GLIBCXX_NOEXCEPT { // LWG 467. return (static_cast<unsigned char>(__c1) < static_cast<unsigned char>(__c2)); } static _GLIBCXX17_CONSTEXPR int compare(const char_type* __s1, const char_type* __s2, size_t __n) { if (__n == 0) return 0; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 320 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/char_traits.h" 3 if (__builtin_constant_p(__n) && __constant_char_array_p(__s1, __n) && __constant_char_array_p(__s2, __n)) { for (size_t __i = 0; __i < __n; ++__i) if (lt(__s1[__i], __s2[__i])) return -1; else if (lt(__s2[__i], __s1[__i])) return 1; return 0; } #endif # 332 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/char_traits.h" 3 return __builtin_memcmp(__s1, __s2, __n); } static _GLIBCXX17_CONSTEXPR size_t length(const char_type* __s) { #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 339 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/char_traits.h" 3 if (__constant_string_p(__s)) return __gnu_cxx::char_traits<char_type>::length(__s); #endif # 342 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/char_traits.h" 3 return __builtin_strlen(__s); } static _GLIBCXX17_CONSTEXPR const char_type* find(const char_type* __s, size_t __n, const char_type& __a) { if (__n == 0) return 0; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 351 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/char_traits.h" 3 if (__builtin_constant_p(__n) && __builtin_constant_p(__a) && __constant_char_array_p(__s, __n)) return __gnu_cxx::char_traits<char_type>::find(__s, __n, __a); #endif # 356 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/char_traits.h" 3 return static_cast<const char_type*>(__builtin_memchr(__s, __a, __n)); } static char_type* move(char_type* __s1, const char_type* __s2, size_t __n) { if (__n == 0) return __s1; return static_cast<char_type*>(__builtin_memmove(__s1, __s2, __n)); } static char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) { if (__n == 0) return __s1; return static_cast<char_type*>(__builtin_memcpy(__s1, __s2, __n)); } static char_type* assign(char_type* __s, size_t __n, char_type __a) { if (__n == 0) return __s; return static_cast<char_type*>(__builtin_memset(__s, __a, __n)); } static _GLIBCXX_CONSTEXPR char_type to_char_type(const int_type& __c) _GLIBCXX_NOEXCEPT { return static_cast<char_type>(__c); } // To keep both the byte 0xff and the eof symbol 0xffffffff // from ending up as 0xffffffff. static _GLIBCXX_CONSTEXPR int_type to_int_type(const char_type& __c) _GLIBCXX_NOEXCEPT { return static_cast<int_type>(static_cast<unsigned char>(__c)); } static _GLIBCXX_CONSTEXPR bool eq_int_type(const int_type& __c1, const int_type& __c2) _GLIBCXX_NOEXCEPT { return __c1 == __c2; } static _GLIBCXX_CONSTEXPR int_type eof() _GLIBCXX_NOEXCEPT { return static_cast<int_type>(_GLIBCXX_STDIO_EOF); } static _GLIBCXX_CONSTEXPR int_type not_eof(const int_type& __c) _GLIBCXX_NOEXCEPT { return (__c == eof()) ? 0 : __c; } }; #ifdef _GLIBCXX_USE_WCHAR_T /// 21.1.3.2 char_traits specializations template<> struct char_traits<wchar_t> { typedef wchar_t char_type; typedef wint_t int_type; typedef streamoff off_type; typedef wstreampos pos_type; typedef mbstate_t state_type; static _GLIBCXX17_CONSTEXPR void assign(char_type& __c1, const char_type& __c2) _GLIBCXX_NOEXCEPT { __c1 = __c2; } static _GLIBCXX_CONSTEXPR bool eq(const char_type& __c1, const char_type& __c2) _GLIBCXX_NOEXCEPT { return __c1 == __c2; } static _GLIBCXX_CONSTEXPR bool lt(const char_type& __c1, const char_type& __c2) _GLIBCXX_NOEXCEPT { return __c1 < __c2; } static _GLIBCXX17_CONSTEXPR int compare(const char_type* __s1, const char_type* __s2, size_t __n) { if (__n == 0) return 0; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 436 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/char_traits.h" 3 if (__builtin_constant_p(__n) && __constant_char_array_p(__s1, __n) && __constant_char_array_p(__s2, __n)) return __gnu_cxx::char_traits<char_type>::compare(__s1, __s2, __n); #endif # 441 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/char_traits.h" 3 return wmemcmp(__s1, __s2, __n); } static _GLIBCXX17_CONSTEXPR size_t length(const char_type* __s) { #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 448 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/char_traits.h" 3 if (__constant_string_p(__s)) return __gnu_cxx::char_traits<char_type>::length(__s); #endif # 451 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/char_traits.h" 3 return wcslen(__s); } static _GLIBCXX17_CONSTEXPR const char_type* find(const char_type* __s, size_t __n, const char_type& __a) { if (__n == 0) return 0; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 460 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/char_traits.h" 3 if (__builtin_constant_p(__n) && __builtin_constant_p(__a) && __constant_char_array_p(__s, __n)) return __gnu_cxx::char_traits<char_type>::find(__s, __n, __a); #endif # 465 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/char_traits.h" 3 return wmemchr(__s, __a, __n); } static char_type* move(char_type* __s1, const char_type* __s2, size_t __n) { if (__n == 0) return __s1; return wmemmove(__s1, __s2, __n); } static char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) { if (__n == 0) return __s1; return wmemcpy(__s1, __s2, __n); } static char_type* assign(char_type* __s, size_t __n, char_type __a) { if (__n == 0) return __s; return wmemset(__s, __a, __n); } static _GLIBCXX_CONSTEXPR char_type to_char_type(const int_type& __c) _GLIBCXX_NOEXCEPT { return char_type(__c); } static _GLIBCXX_CONSTEXPR int_type to_int_type(const char_type& __c) _GLIBCXX_NOEXCEPT { return int_type(__c); } static _GLIBCXX_CONSTEXPR bool eq_int_type(const int_type& __c1, const int_type& __c2) _GLIBCXX_NOEXCEPT { return __c1 == __c2; } static _GLIBCXX_CONSTEXPR int_type eof() _GLIBCXX_NOEXCEPT { return static_cast<int_type>(WEOF); } static _GLIBCXX_CONSTEXPR int_type not_eof(const int_type& __c) _GLIBCXX_NOEXCEPT { return eq_int_type(__c, eof()) ? 0 : __c; } }; #endif //_GLIBCXX_USE_WCHAR_T # 513 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/char_traits.h" 3 #ifdef _GLIBCXX_USE_CHAR8_T template<> struct char_traits<char8_t> { typedef char8_t char_type; typedef unsigned int int_type; typedef u8streampos pos_type; typedef streamoff off_type; typedef mbstate_t state_type; static _GLIBCXX17_CONSTEXPR void assign(char_type& __c1, const char_type& __c2) _GLIBCXX_NOEXCEPT { __c1 = __c2; } static _GLIBCXX_CONSTEXPR bool eq(const char_type& __c1, const char_type& __c2) _GLIBCXX_NOEXCEPT { return __c1 == __c2; } static _GLIBCXX_CONSTEXPR bool lt(const char_type& __c1, const char_type& __c2) _GLIBCXX_NOEXCEPT { return __c1 < __c2; } static _GLIBCXX17_CONSTEXPR int compare(const char_type* __s1, const char_type* __s2, size_t __n) { if (__n == 0) return 0; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201402 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 542 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/char_traits.h" 3 if (__builtin_constant_p(__n) && __constant_char_array_p(__s1, __n) && __constant_char_array_p(__s2, __n)) return __gnu_cxx::char_traits<char_type>::compare(__s1, __s2, __n); #endif # 547 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/char_traits.h" 3 return __builtin_memcmp(__s1, __s2, __n); } static _GLIBCXX17_CONSTEXPR size_t length(const char_type* __s) { #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201402 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 554 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/char_traits.h" 3 if (__constant_string_p(__s)) return __gnu_cxx::char_traits<char_type>::length(__s); #endif # 557 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/char_traits.h" 3 size_t __i = 0; while (!eq(__s[__i], char_type())) ++__i; return __i; } static _GLIBCXX17_CONSTEXPR const char_type* find(const char_type* __s, size_t __n, const char_type& __a) { if (__n == 0) return 0; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201402 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 569 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/char_traits.h" 3 if (__builtin_constant_p(__n) && __builtin_constant_p(__a) && __constant_char_array_p(__s, __n)) return __gnu_cxx::char_traits<char_type>::find(__s, __n, __a); #endif # 574 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/char_traits.h" 3 return static_cast<const char_type*>(__builtin_memchr(__s, __a, __n)); } static char_type* move(char_type* __s1, const char_type* __s2, size_t __n) { if (__n == 0) return __s1; return static_cast<char_type*>(__builtin_memmove(__s1, __s2, __n)); } static char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) { if (__n == 0) return __s1; return static_cast<char_type*>(__builtin_memcpy(__s1, __s2, __n)); } static char_type* assign(char_type* __s, size_t __n, char_type __a) { if (__n == 0) return __s; return static_cast<char_type*>(__builtin_memset(__s, __a, __n)); } static _GLIBCXX_CONSTEXPR char_type to_char_type(const int_type& __c) _GLIBCXX_NOEXCEPT { return char_type(__c); } static _GLIBCXX_CONSTEXPR int_type to_int_type(const char_type& __c) _GLIBCXX_NOEXCEPT { return int_type(__c); } static _GLIBCXX_CONSTEXPR bool eq_int_type(const int_type& __c1, const int_type& __c2) _GLIBCXX_NOEXCEPT { return __c1 == __c2; } static _GLIBCXX_CONSTEXPR int_type eof() _GLIBCXX_NOEXCEPT { return static_cast<int_type>(-1); } static _GLIBCXX_CONSTEXPR int_type not_eof(const int_type& __c) _GLIBCXX_NOEXCEPT { return eq_int_type(__c, eof()) ? 0 : __c; } }; #endif //_GLIBCXX_USE_CHAR8_T # 622 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/char_traits.h" 3 _GLIBCXX_END_NAMESPACE_VERSION } // namespace #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 627 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/char_traits.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <cstdint> #endif /* expanded by -frewrite-includes */ # 628 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/char_traits.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdint" 1 3 // <cstdint> -*- C++ -*- // Copyright (C) 2007-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file include/cstdint * This is a Standard C++ Library header. */ #ifndef _GLIBCXX_CSTDINT #define _GLIBCXX_CSTDINT 1 #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 33 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdint" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus < 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 35 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdint" 3 #if 0 /* expanded by -frewrite-includes */ # include <bits/c++0x_warning.h> #endif /* expanded by -frewrite-includes */ # 35 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdint" 3 # 36 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdint" 3 #else # 37 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdint" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/c++config.h> #endif /* expanded by -frewrite-includes */ # 38 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdint" 3 # 39 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdint" 3 #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_HAVE_STDINT_H #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 41 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdint" 3 #if 0 /* expanded by -frewrite-includes */ # include <stdint.h> #endif /* expanded by -frewrite-includes */ # 41 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdint" 3 # 1 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 1 3 /*===---- stdint.h - Standard header for sized integer types --------------===*\ * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * \*===----------------------------------------------------------------------===*/ #ifndef __CLANG_STDINT_H // AIX system headers need stdint.h to be re-enterable while _STD_TYPES_T // is defined until an inclusion of it without _STD_TYPES_T occurs, in which // case the header guard macro is defined. #if 0 /* disabled by -frewrite-includes */ #if !defined(_AIX) || !defined(_STD_TYPES_T) || !defined(__STDC_HOSTED__) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 14 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #define __CLANG_STDINT_H #endif # 16 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 /* If we're hosted, fall back to the system's stdint.h, which might have * additional definitions. */ #if 0 /* disabled by -frewrite-includes */ #if __STDC_HOSTED__ && __has_include_next(<stdint.h>) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 21 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 // C99 7.18.3 Limits of other integer types // // Footnote 219, 220: C++ implementations should define these macros only when // __STDC_LIMIT_MACROS is defined before <stdint.h> is included. // // Footnote 222: C++ implementations should define these macros only when // __STDC_CONSTANT_MACROS is defined before <stdint.h> is included. // // C++11 [cstdint.syn]p2: // // The macros defined by <cstdint> are provided unconditionally. In particular, // the symbols __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS (mentioned in // footnotes 219, 220, and 222 in the C standard) play no role in C++. // // C11 removed the problematic footnotes. // // Work around this inconsistency by always defining those macros in C++ mode, // so that a C library implementation which follows the C99 standard can be // used in C++. # ifdef __cplusplus #if 0 /* disabled by -frewrite-includes */ # if !defined(__STDC_LIMIT_MACROS) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 43 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 # define __STDC_LIMIT_MACROS # define __STDC_LIMIT_MACROS_DEFINED_BY_CLANG # endif # 46 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #if 0 /* disabled by -frewrite-includes */ # if !defined(__STDC_CONSTANT_MACROS) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 47 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 # define __STDC_CONSTANT_MACROS # define __STDC_CONSTANT_MACROS_DEFINED_BY_CLANG # endif # 50 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 # endif # 51 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #if 0 /* expanded by -frewrite-includes */ # include_next <stdint.h> #endif /* expanded by -frewrite-includes */ # 52 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 # 1 "/usr/include/stdint.h" 1 3 4 /* Copyright (C) 1997-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ /* * ISO C99: 7.18 Integer types <stdint.h> */ #ifndef _STDINT_H #define _STDINT_H 1 #define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION #if 0 /* expanded by -frewrite-includes */ #include <bits/libc-header-start.h> #endif /* expanded by -frewrite-includes */ # 26 "/usr/include/stdint.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 1 3 4 /* Handle feature test macros at the start of a header. Copyright (C) 2016-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ /* This header is internal to glibc and should not be included outside of glibc headers. Headers including it must define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION first. This header cannot have multiple include guards because ISO C feature test macros depend on the definition of the macro when an affected header is included, not when the first system header is included. */ #ifndef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION # error "Never include <bits/libc-header-start.h> directly." #endif # 30 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 #undef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION #if 0 /* expanded by -frewrite-includes */ #include <features.h> #endif /* expanded by -frewrite-includes */ # 33 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # 34 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 /* ISO/IEC TR 24731-2:2010 defines the __STDC_WANT_LIB_EXT2__ macro. */ #undef __GLIBC_USE_LIB_EXT2 #if 0 /* disabled by -frewrite-includes */ #if (defined __USE_GNU \ || (defined __STDC_WANT_LIB_EXT2__ && __STDC_WANT_LIB_EXT2__ > 0)) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 40 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_LIB_EXT2 1 #else # 42 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_LIB_EXT2 0 #endif # 44 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 /* ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__ macro. Most but not all symbols enabled by that macro in TS 18661-1 are enabled unconditionally in C2X; the symbols in Annex F still require that macro in C2X. */ #undef __GLIBC_USE_IEC_60559_BFP_EXT #if 0 /* disabled by -frewrite-includes */ #if defined __USE_GNU || defined __STDC_WANT_IEC_60559_BFP_EXT__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 51 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_BFP_EXT 1 #else # 53 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_BFP_EXT 0 #endif # 55 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 #undef __GLIBC_USE_IEC_60559_BFP_EXT_C2X #if 0 /* disabled by -frewrite-includes */ #if __GLIBC_USE (IEC_60559_BFP_EXT) || __GLIBC_USE (ISOC2X) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 57 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 1 #else # 59 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 0 #endif # 61 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 /* ISO/IEC TS 18661-4:2015 defines the __STDC_WANT_IEC_60559_FUNCS_EXT__ macro. Other than the reduction functions, the symbols from this TS are enabled unconditionally in C2X. */ #undef __GLIBC_USE_IEC_60559_FUNCS_EXT #if 0 /* disabled by -frewrite-includes */ #if defined __USE_GNU || defined __STDC_WANT_IEC_60559_FUNCS_EXT__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 68 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_FUNCS_EXT 1 #else # 70 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_FUNCS_EXT 0 #endif # 72 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 #undef __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X #if 0 /* disabled by -frewrite-includes */ #if __GLIBC_USE (IEC_60559_FUNCS_EXT) || __GLIBC_USE (ISOC2X) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 74 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 1 #else # 76 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 0 #endif # 78 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 /* ISO/IEC TS 18661-3:2015 defines the __STDC_WANT_IEC_60559_TYPES_EXT__ macro. */ #undef __GLIBC_USE_IEC_60559_TYPES_EXT #if 0 /* disabled by -frewrite-includes */ #if defined __USE_GNU || defined __STDC_WANT_IEC_60559_TYPES_EXT__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 83 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_TYPES_EXT 1 #else # 85 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_TYPES_EXT 0 #endif # 87 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # 27 "/usr/include/stdint.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include <bits/types.h> #endif /* expanded by -frewrite-includes */ # 27 "/usr/include/stdint.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4 /* bits/types.h -- definitions of __*_t types underlying *_t types. Copyright (C) 2002-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ /* * Never include this file directly; use <sys/types.h> instead. */ #ifndef _BITS_TYPES_H #define _BITS_TYPES_H 1 #if 0 /* expanded by -frewrite-includes */ #include <features.h> #endif /* expanded by -frewrite-includes */ # 26 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4 # 27 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <bits/wordsize.h> #endif /* expanded by -frewrite-includes */ # 27 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 /* Determine the wordsize from the preprocessor defines. */ #if 0 /* disabled by -frewrite-includes */ #if defined __x86_64__ && !defined __ILP32__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 4 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 # define __WORDSIZE 64 #else # 6 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 # define __WORDSIZE 32 #define __WORDSIZE32_SIZE_ULONG 0 #define __WORDSIZE32_PTRDIFF_LONG 0 #endif # 10 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 #ifdef __x86_64__ # define __WORDSIZE_TIME64_COMPAT32 1 /* Both x86-64 and x32 use the 64-bit system call interface. */ # define __SYSCALL_WORDSIZE 64 #else # 16 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 # define __WORDSIZE_TIME64_COMPAT32 0 #endif # 18 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 # 28 "/usr/include/x86_64-linux-gnu/bits/types.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include <bits/timesize.h> #endif /* expanded by -frewrite-includes */ # 28 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/timesize.h" 1 3 4 /* Bit size of the time_t type at glibc build time, x86-64 and x32 case. Copyright (C) 2018-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ #if 0 /* disabled by -frewrite-includes */ #if defined __x86_64__ && defined __ILP32__ #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 20 "/usr/include/x86_64-linux-gnu/bits/timesize.h" 3 4 /* For x32, time is 64-bit even though word size is 32-bit. */ # define __TIMESIZE 64 #else # 23 "/usr/include/x86_64-linux-gnu/bits/timesize.h" 3 4 /* For others, time size is word size. */ # define __TIMESIZE __WORDSIZE #endif # 26 "/usr/include/x86_64-linux-gnu/bits/timesize.h" 3 4 # 29 "/usr/include/x86_64-linux-gnu/bits/types.h" 2 3 4 /* Convenience types. */ typedef unsigned char __u_char; typedef unsigned short int __u_short; typedef unsigned int __u_int; typedef unsigned long int __u_long; /* Fixed-size types, underlying types depend on word size and compiler. */ typedef signed char __int8_t; typedef unsigned char __uint8_t; typedef signed short int __int16_t; typedef unsigned short int __uint16_t; typedef signed int __int32_t; typedef unsigned int __uint32_t; #if 0 /* disabled by -frewrite-includes */ #if __WORDSIZE == 64 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 44 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4 typedef signed long int __int64_t; typedef unsigned long int __uint64_t; #else # 47 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4 __extension__ typedef signed long long int __int64_t; __extension__ typedef unsigned long long int __uint64_t; #endif # 50 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4 /* Smallest types with at least a given width. */ typedef __int8_t __int_least8_t; typedef __uint8_t __uint_least8_t; typedef __int16_t __int_least16_t; typedef __uint16_t __uint_least16_t; typedef __int32_t __int_least32_t; typedef __uint32_t __uint_least32_t; typedef __int64_t __int_least64_t; typedef __uint64_t __uint_least64_t; /* quad_t is also 64 bits. */ #if 0 /* disabled by -frewrite-includes */ #if __WORDSIZE == 64 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 63 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4 typedef long int __quad_t; typedef unsigned long int __u_quad_t; #else # 66 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4 __extension__ typedef long long int __quad_t; __extension__ typedef unsigned long long int __u_quad_t; #endif # 69 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4 /* Largest integral types. */ #if 0 /* disabled by -frewrite-includes */ #if __WORDSIZE == 64 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 72 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4 typedef long int __intmax_t; typedef unsigned long int __uintmax_t; #else # 75 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4 __extension__ typedef long long int __intmax_t; __extension__ typedef unsigned long long int __uintmax_t; #endif # 78 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4 /* The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE macros for each of the OS types we define below. The definitions of those macros must use the following macros for underlying types. We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned variants of each of the following integer types on this machine. 16 -- "natural" 16-bit type (always short) 32 -- "natural" 32-bit type (always int) 64 -- "natural" 64-bit type (long or long long) LONG32 -- 32-bit type, traditionally long QUAD -- 64-bit type, traditionally long long WORD -- natural type of __WORDSIZE bits (int or long) LONGWORD -- type of __WORDSIZE bits, traditionally long We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the conventional uses of `long' or `long long' type modifiers match the types we define, even when a less-adorned type would be the same size. This matters for (somewhat) portably writing printf/scanf formats for these types, where using the appropriate l or ll format modifiers can make the typedefs and the formats match up across all GNU platforms. If we used `long' when it's 64 bits where `long long' is expected, then the compiler would warn about the formats not matching the argument types, and the programmer changing them to shut up the compiler would break the program's portability. Here we assume what is presently the case in all the GCC configurations we support: long long is always 64 bits, long is always word/address size, and int is always 32 bits. */ #define __S16_TYPE short int #define __U16_TYPE unsigned short int #define __S32_TYPE int #define __U32_TYPE unsigned int #define __SLONGWORD_TYPE long int #define __ULONGWORD_TYPE unsigned long int #if 0 /* disabled by -frewrite-includes */ #if __WORDSIZE == 32 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 116 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4 # define __SQUAD_TYPE __int64_t # define __UQUAD_TYPE __uint64_t # define __SWORD_TYPE int # define __UWORD_TYPE unsigned int # define __SLONG32_TYPE long int # define __ULONG32_TYPE unsigned long int # define __S64_TYPE __int64_t # define __U64_TYPE __uint64_t /* We want __extension__ before typedef's that use nonstandard base types such as `long long' in C89 mode. */ # define __STD_TYPE __extension__ typedef #if 0 /* disabled by -frewrite-includes */ #if 0 #elif __WORDSIZE == 64 #endif #endif /* disabled by -frewrite-includes */ #elif 1 /* evaluated by -frewrite-includes */ # 128 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4 # define __SQUAD_TYPE long int # define __UQUAD_TYPE unsigned long int # define __SWORD_TYPE long int # define __UWORD_TYPE unsigned long int # define __SLONG32_TYPE int # define __ULONG32_TYPE unsigned int # define __S64_TYPE long int # define __U64_TYPE unsigned long int /* No need to mark the typedef with __extension__. */ # define __STD_TYPE typedef #else # 139 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4 # error #endif # 141 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <bits/typesizes.h> /* Defines __*_T_TYPE macros. */ #endif /* expanded by -frewrite-includes */ # 141 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/typesizes.h" 1 3 4 /* bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version. Copyright (C) 2012-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ #ifndef _BITS_TYPES_H # error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead." #endif # 22 "/usr/include/x86_64-linux-gnu/bits/typesizes.h" 3 4 #ifndef _BITS_TYPESIZES_H #define _BITS_TYPESIZES_H 1 /* See <bits/types.h> for the meaning of these macros. This file exists so that <bits/types.h> need not vary across different GNU platforms. */ /* X32 kernel interface is 64-bit. */ #if 0 /* disabled by -frewrite-includes */ #if defined __x86_64__ && defined __ILP32__ #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 31 "/usr/include/x86_64-linux-gnu/bits/typesizes.h" 3 4 # define __SYSCALL_SLONG_TYPE __SQUAD_TYPE # define __SYSCALL_ULONG_TYPE __UQUAD_TYPE #else # 34 "/usr/include/x86_64-linux-gnu/bits/typesizes.h" 3 4 # define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE # define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE #endif # 37 "/usr/include/x86_64-linux-gnu/bits/typesizes.h" 3 4 #define __DEV_T_TYPE __UQUAD_TYPE #define __UID_T_TYPE __U32_TYPE #define __GID_T_TYPE __U32_TYPE #define __INO_T_TYPE __SYSCALL_ULONG_TYPE #define __INO64_T_TYPE __UQUAD_TYPE #define __MODE_T_TYPE __U32_TYPE #ifdef __x86_64__ # define __NLINK_T_TYPE __SYSCALL_ULONG_TYPE # define __FSWORD_T_TYPE __SYSCALL_SLONG_TYPE #else # 48 "/usr/include/x86_64-linux-gnu/bits/typesizes.h" 3 4 # define __NLINK_T_TYPE __UWORD_TYPE # define __FSWORD_T_TYPE __SWORD_TYPE #endif # 51 "/usr/include/x86_64-linux-gnu/bits/typesizes.h" 3 4 #define __OFF_T_TYPE __SYSCALL_SLONG_TYPE #define __OFF64_T_TYPE __SQUAD_TYPE #define __PID_T_TYPE __S32_TYPE #define __RLIM_T_TYPE __SYSCALL_ULONG_TYPE #define __RLIM64_T_TYPE __UQUAD_TYPE #define __BLKCNT_T_TYPE __SYSCALL_SLONG_TYPE #define __BLKCNT64_T_TYPE __SQUAD_TYPE #define __FSBLKCNT_T_TYPE __SYSCALL_ULONG_TYPE #define __FSBLKCNT64_T_TYPE __UQUAD_TYPE #define __FSFILCNT_T_TYPE __SYSCALL_ULONG_TYPE #define __FSFILCNT64_T_TYPE __UQUAD_TYPE #define __ID_T_TYPE __U32_TYPE #define __CLOCK_T_TYPE __SYSCALL_SLONG_TYPE #define __TIME_T_TYPE __SYSCALL_SLONG_TYPE #define __USECONDS_T_TYPE __U32_TYPE #define __SUSECONDS_T_TYPE __SYSCALL_SLONG_TYPE #define __DADDR_T_TYPE __S32_TYPE #define __KEY_T_TYPE __S32_TYPE #define __CLOCKID_T_TYPE __S32_TYPE #define __TIMER_T_TYPE void * #define __BLKSIZE_T_TYPE __SYSCALL_SLONG_TYPE #define __FSID_T_TYPE struct { int __val[2]; } #define __SSIZE_T_TYPE __SWORD_TYPE #define __CPU_MASK_TYPE __SYSCALL_ULONG_TYPE #ifdef __x86_64__ /* Tell the libc code that off_t and off64_t are actually the same type for all ABI purposes, even if possibly expressed as different base types for C type-checking purposes. */ # define __OFF_T_MATCHES_OFF64_T 1 /* Same for ino_t and ino64_t. */ # define __INO_T_MATCHES_INO64_T 1 /* And for __rlim_t and __rlim64_t. */ # define __RLIM_T_MATCHES_RLIM64_T 1 /* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */ # define __STATFS_MATCHES_STATFS64 1 #else # 91 "/usr/include/x86_64-linux-gnu/bits/typesizes.h" 3 4 # define __RLIM_T_MATCHES_RLIM64_T 0 # define __STATFS_MATCHES_STATFS64 0 #endif # 95 "/usr/include/x86_64-linux-gnu/bits/typesizes.h" 3 4 /* Number of descriptors that can fit in an `fd_set'. */ #define __FD_SETSIZE 1024 #endif /* bits/typesizes.h */ # 101 "/usr/include/x86_64-linux-gnu/bits/typesizes.h" 3 4 # 142 "/usr/include/x86_64-linux-gnu/bits/types.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include <bits/time64.h> /* Defines __TIME*_T_TYPE macros. */ #endif /* expanded by -frewrite-includes */ # 142 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/time64.h" 1 3 4 /* bits/time64.h -- underlying types for __time64_t. Generic version. Copyright (C) 2018-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ #ifndef _BITS_TYPES_H # error "Never include <bits/time64.h> directly; use <sys/types.h> instead." #endif # 22 "/usr/include/x86_64-linux-gnu/bits/time64.h" 3 4 #ifndef _BITS_TIME64_H #define _BITS_TIME64_H 1 /* Define __TIME64_T_TYPE so that it is always a 64-bit type. */ #if 0 /* disabled by -frewrite-includes */ #if __TIMESIZE == 64 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 29 "/usr/include/x86_64-linux-gnu/bits/time64.h" 3 4 /* If we already have 64-bit time type then use it. */ # define __TIME64_T_TYPE __TIME_T_TYPE #else # 32 "/usr/include/x86_64-linux-gnu/bits/time64.h" 3 4 /* Define a 64-bit time type alongsize the 32-bit one. */ # define __TIME64_T_TYPE __SQUAD_TYPE #endif # 35 "/usr/include/x86_64-linux-gnu/bits/time64.h" 3 4 #endif /* bits/time64.h */ # 37 "/usr/include/x86_64-linux-gnu/bits/time64.h" 3 4 # 143 "/usr/include/x86_64-linux-gnu/bits/types.h" 2 3 4 __STD_TYPE __DEV_T_TYPE __dev_t; /* Type of device numbers. */ __STD_TYPE __UID_T_TYPE __uid_t; /* Type of user identifications. */ __STD_TYPE __GID_T_TYPE __gid_t; /* Type of group identifications. */ __STD_TYPE __INO_T_TYPE __ino_t; /* Type of file serial numbers. */ __STD_TYPE __INO64_T_TYPE __ino64_t; /* Type of file serial numbers (LFS).*/ __STD_TYPE __MODE_T_TYPE __mode_t; /* Type of file attribute bitmasks. */ __STD_TYPE __NLINK_T_TYPE __nlink_t; /* Type of file link counts. */ __STD_TYPE __OFF_T_TYPE __off_t; /* Type of file sizes and offsets. */ __STD_TYPE __OFF64_T_TYPE __off64_t; /* Type of file sizes and offsets (LFS). */ __STD_TYPE __PID_T_TYPE __pid_t; /* Type of process identifications. */ __STD_TYPE __FSID_T_TYPE __fsid_t; /* Type of file system IDs. */ __STD_TYPE __CLOCK_T_TYPE __clock_t; /* Type of CPU usage counts. */ __STD_TYPE __RLIM_T_TYPE __rlim_t; /* Type for resource measurement. */ __STD_TYPE __RLIM64_T_TYPE __rlim64_t; /* Type for resource measurement (LFS). */ __STD_TYPE __ID_T_TYPE __id_t; /* General type for IDs. */ __STD_TYPE __TIME_T_TYPE __time_t; /* Seconds since the Epoch. */ __STD_TYPE __USECONDS_T_TYPE __useconds_t; /* Count of microseconds. */ __STD_TYPE __SUSECONDS_T_TYPE __suseconds_t; /* Signed count of microseconds. */ __STD_TYPE __DADDR_T_TYPE __daddr_t; /* The type of a disk address. */ __STD_TYPE __KEY_T_TYPE __key_t; /* Type of an IPC key. */ /* Clock ID used in clock and timer functions. */ __STD_TYPE __CLOCKID_T_TYPE __clockid_t; /* Timer ID returned by `timer_create'. */ __STD_TYPE __TIMER_T_TYPE __timer_t; /* Type to represent block size. */ __STD_TYPE __BLKSIZE_T_TYPE __blksize_t; /* Types from the Large File Support interface. */ /* Type to count number of disk blocks. */ __STD_TYPE __BLKCNT_T_TYPE __blkcnt_t; __STD_TYPE __BLKCNT64_T_TYPE __blkcnt64_t; /* Type to count file system blocks. */ __STD_TYPE __FSBLKCNT_T_TYPE __fsblkcnt_t; __STD_TYPE __FSBLKCNT64_T_TYPE __fsblkcnt64_t; /* Type to count file system nodes. */ __STD_TYPE __FSFILCNT_T_TYPE __fsfilcnt_t; __STD_TYPE __FSFILCNT64_T_TYPE __fsfilcnt64_t; /* Type of miscellaneous file system fields. */ __STD_TYPE __FSWORD_T_TYPE __fsword_t; __STD_TYPE __SSIZE_T_TYPE __ssize_t; /* Type of a byte count, or error. */ /* Signed long type used in system calls. */ __STD_TYPE __SYSCALL_SLONG_TYPE __syscall_slong_t; /* Unsigned long type used in system calls. */ __STD_TYPE __SYSCALL_ULONG_TYPE __syscall_ulong_t; /* These few don't really vary by system, they always correspond to one of the other defined types. */ typedef __off64_t __loff_t; /* Type of file sizes and offsets (LFS). */ typedef char *__caddr_t; /* Duplicates info from stdint.h but this is used in unistd.h. */ __STD_TYPE __SWORD_TYPE __intptr_t; /* Duplicate info from sys/socket.h. */ __STD_TYPE __U32_TYPE __socklen_t; /* C99: An integer type that can be accessed as an atomic entity, even in the presence of asynchronous interrupts. It is not currently necessary for this to be machine-specific. */ typedef int __sig_atomic_t; /* Seconds since the Epoch, visible to user code when time_t is too narrow only for consistency with the old way of widening too-narrow types. User code should never use __time64_t. */ #if 0 /* disabled by -frewrite-includes */ #if __TIMESIZE == 64 && defined __LIBC #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 220 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4 # define __time64_t __time_t #if 0 /* disabled by -frewrite-includes */ #if 0 #elif __TIMESIZE != 64 #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 222 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4 __STD_TYPE __TIME64_T_TYPE __time64_t; #endif # 224 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4 #undef __STD_TYPE #endif /* bits/types.h */ # 228 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4 # 28 "/usr/include/stdint.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include <bits/wchar.h> #endif /* expanded by -frewrite-includes */ # 28 "/usr/include/stdint.h" 3 4 # 29 "/usr/include/stdint.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <bits/wordsize.h> #endif /* expanded by -frewrite-includes */ # 29 "/usr/include/stdint.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 /* Determine the wordsize from the preprocessor defines. */ #if 0 /* disabled by -frewrite-includes */ #if defined __x86_64__ && !defined __ILP32__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 4 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 # define __WORDSIZE 64 #else # 6 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 # define __WORDSIZE 32 #define __WORDSIZE32_SIZE_ULONG 0 #define __WORDSIZE32_PTRDIFF_LONG 0 #endif # 10 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 #ifdef __x86_64__ # define __WORDSIZE_TIME64_COMPAT32 1 /* Both x86-64 and x32 use the 64-bit system call interface. */ # define __SYSCALL_WORDSIZE 64 #else # 16 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 # define __WORDSIZE_TIME64_COMPAT32 0 #endif # 18 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 # 30 "/usr/include/stdint.h" 2 3 4 /* Exact integral types. */ /* Signed. */ #if 0 /* expanded by -frewrite-includes */ #include <bits/stdint-intn.h> #endif /* expanded by -frewrite-includes */ # 34 "/usr/include/stdint.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/stdint-intn.h" 1 3 4 /* Define intN_t types. Copyright (C) 2017-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ #ifndef _BITS_STDINT_INTN_H #define _BITS_STDINT_INTN_H 1 #if 0 /* expanded by -frewrite-includes */ #include <bits/types.h> #endif /* expanded by -frewrite-includes */ # 22 "/usr/include/x86_64-linux-gnu/bits/stdint-intn.h" 3 4 # 23 "/usr/include/x86_64-linux-gnu/bits/stdint-intn.h" 3 4 typedef __int8_t int8_t; typedef __int16_t int16_t; typedef __int32_t int32_t; typedef __int64_t int64_t; #endif /* bits/stdint-intn.h */ # 30 "/usr/include/x86_64-linux-gnu/bits/stdint-intn.h" 3 4 # 35 "/usr/include/stdint.h" 2 3 4 /* Unsigned. */ #if 0 /* expanded by -frewrite-includes */ #include <bits/stdint-uintn.h> #endif /* expanded by -frewrite-includes */ # 37 "/usr/include/stdint.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/stdint-uintn.h" 1 3 4 /* Define uintN_t types. Copyright (C) 2017-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ #ifndef _BITS_STDINT_UINTN_H #define _BITS_STDINT_UINTN_H 1 #if 0 /* expanded by -frewrite-includes */ #include <bits/types.h> #endif /* expanded by -frewrite-includes */ # 22 "/usr/include/x86_64-linux-gnu/bits/stdint-uintn.h" 3 4 # 23 "/usr/include/x86_64-linux-gnu/bits/stdint-uintn.h" 3 4 typedef __uint8_t uint8_t; typedef __uint16_t uint16_t; typedef __uint32_t uint32_t; typedef __uint64_t uint64_t; #endif /* bits/stdint-uintn.h */ # 30 "/usr/include/x86_64-linux-gnu/bits/stdint-uintn.h" 3 4 # 38 "/usr/include/stdint.h" 2 3 4 /* Small types. */ /* Signed. */ typedef __int_least8_t int_least8_t; typedef __int_least16_t int_least16_t; typedef __int_least32_t int_least32_t; typedef __int_least64_t int_least64_t; /* Unsigned. */ typedef __uint_least8_t uint_least8_t; typedef __uint_least16_t uint_least16_t; typedef __uint_least32_t uint_least32_t; typedef __uint_least64_t uint_least64_t; /* Fast types. */ /* Signed. */ typedef signed char int_fast8_t; #if 0 /* disabled by -frewrite-includes */ #if __WORDSIZE == 64 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 60 "/usr/include/stdint.h" 3 4 typedef long int int_fast16_t; typedef long int int_fast32_t; typedef long int int_fast64_t; #else # 64 "/usr/include/stdint.h" 3 4 typedef int int_fast16_t; typedef int int_fast32_t; __extension__ typedef long long int int_fast64_t; #endif # 69 "/usr/include/stdint.h" 3 4 /* Unsigned. */ typedef unsigned char uint_fast8_t; #if 0 /* disabled by -frewrite-includes */ #if __WORDSIZE == 64 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 73 "/usr/include/stdint.h" 3 4 typedef unsigned long int uint_fast16_t; typedef unsigned long int uint_fast32_t; typedef unsigned long int uint_fast64_t; #else # 77 "/usr/include/stdint.h" 3 4 typedef unsigned int uint_fast16_t; typedef unsigned int uint_fast32_t; __extension__ typedef unsigned long long int uint_fast64_t; #endif # 82 "/usr/include/stdint.h" 3 4 /* Types for `void *' pointers. */ #if 0 /* disabled by -frewrite-includes */ #if __WORDSIZE == 64 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 86 "/usr/include/stdint.h" 3 4 # ifndef __intptr_t_defined typedef long int intptr_t; # define __intptr_t_defined # endif # 90 "/usr/include/stdint.h" 3 4 typedef unsigned long int uintptr_t; #else # 92 "/usr/include/stdint.h" 3 4 # ifndef __intptr_t_defined typedef int intptr_t; # define __intptr_t_defined # endif # 96 "/usr/include/stdint.h" 3 4 typedef unsigned int uintptr_t; #endif # 98 "/usr/include/stdint.h" 3 4 /* Largest integral types. */ typedef __intmax_t intmax_t; typedef __uintmax_t uintmax_t; #if 0 /* disabled by -frewrite-includes */ # if __WORDSIZE == 64 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 106 "/usr/include/stdint.h" 3 4 # define __INT64_C(c) c ## L # define __UINT64_C(c) c ## UL # else # 109 "/usr/include/stdint.h" 3 4 # define __INT64_C(c) c ## LL # define __UINT64_C(c) c ## ULL # endif # 112 "/usr/include/stdint.h" 3 4 /* Limits of integral types. */ /* Minimum of signed integral types. */ # define INT8_MIN (-128) # define INT16_MIN (-32767-1) # define INT32_MIN (-2147483647-1) # define INT64_MIN (-__INT64_C(9223372036854775807)-1) /* Maximum of signed integral types. */ # define INT8_MAX (127) # define INT16_MAX (32767) # define INT32_MAX (2147483647) # define INT64_MAX (__INT64_C(9223372036854775807)) /* Maximum of unsigned integral types. */ # define UINT8_MAX (255) # define UINT16_MAX (65535) # define UINT32_MAX (4294967295U) # define UINT64_MAX (__UINT64_C(18446744073709551615)) /* Minimum of signed integral types having a minimum size. */ # define INT_LEAST8_MIN (-128) # define INT_LEAST16_MIN (-32767-1) # define INT_LEAST32_MIN (-2147483647-1) # define INT_LEAST64_MIN (-__INT64_C(9223372036854775807)-1) /* Maximum of signed integral types having a minimum size. */ # define INT_LEAST8_MAX (127) # define INT_LEAST16_MAX (32767) # define INT_LEAST32_MAX (2147483647) # define INT_LEAST64_MAX (__INT64_C(9223372036854775807)) /* Maximum of unsigned integral types having a minimum size. */ # define UINT_LEAST8_MAX (255) # define UINT_LEAST16_MAX (65535) # define UINT_LEAST32_MAX (4294967295U) # define UINT_LEAST64_MAX (__UINT64_C(18446744073709551615)) /* Minimum of fast signed integral types having a minimum size. */ # define INT_FAST8_MIN (-128) #if 0 /* disabled by -frewrite-includes */ # if __WORDSIZE == 64 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 154 "/usr/include/stdint.h" 3 4 # define INT_FAST16_MIN (-9223372036854775807L-1) # define INT_FAST32_MIN (-9223372036854775807L-1) # else # 157 "/usr/include/stdint.h" 3 4 # define INT_FAST16_MIN (-2147483647-1) # define INT_FAST32_MIN (-2147483647-1) # endif # 160 "/usr/include/stdint.h" 3 4 # define INT_FAST64_MIN (-__INT64_C(9223372036854775807)-1) /* Maximum of fast signed integral types having a minimum size. */ # define INT_FAST8_MAX (127) #if 0 /* disabled by -frewrite-includes */ # if __WORDSIZE == 64 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 164 "/usr/include/stdint.h" 3 4 # define INT_FAST16_MAX (9223372036854775807L) # define INT_FAST32_MAX (9223372036854775807L) # else # 167 "/usr/include/stdint.h" 3 4 # define INT_FAST16_MAX (2147483647) # define INT_FAST32_MAX (2147483647) # endif # 170 "/usr/include/stdint.h" 3 4 # define INT_FAST64_MAX (__INT64_C(9223372036854775807)) /* Maximum of fast unsigned integral types having a minimum size. */ # define UINT_FAST8_MAX (255) #if 0 /* disabled by -frewrite-includes */ # if __WORDSIZE == 64 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 175 "/usr/include/stdint.h" 3 4 # define UINT_FAST16_MAX (18446744073709551615UL) # define UINT_FAST32_MAX (18446744073709551615UL) # else # 178 "/usr/include/stdint.h" 3 4 # define UINT_FAST16_MAX (4294967295U) # define UINT_FAST32_MAX (4294967295U) # endif # 181 "/usr/include/stdint.h" 3 4 # define UINT_FAST64_MAX (__UINT64_C(18446744073709551615)) /* Values to test for integral types holding `void *' pointer. */ #if 0 /* disabled by -frewrite-includes */ # if __WORDSIZE == 64 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 186 "/usr/include/stdint.h" 3 4 # define INTPTR_MIN (-9223372036854775807L-1) # define INTPTR_MAX (9223372036854775807L) # define UINTPTR_MAX (18446744073709551615UL) # else # 190 "/usr/include/stdint.h" 3 4 # define INTPTR_MIN (-2147483647-1) # define INTPTR_MAX (2147483647) # define UINTPTR_MAX (4294967295U) # endif # 194 "/usr/include/stdint.h" 3 4 /* Minimum for largest signed integral type. */ # define INTMAX_MIN (-__INT64_C(9223372036854775807)-1) /* Maximum for largest signed integral type. */ # define INTMAX_MAX (__INT64_C(9223372036854775807)) /* Maximum for largest unsigned integral type. */ # define UINTMAX_MAX (__UINT64_C(18446744073709551615)) /* Limits of other integer types. */ /* Limits of `ptrdiff_t' type. */ #if 0 /* disabled by -frewrite-includes */ # if __WORDSIZE == 64 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 209 "/usr/include/stdint.h" 3 4 # define PTRDIFF_MIN (-9223372036854775807L-1) # define PTRDIFF_MAX (9223372036854775807L) # else # 212 "/usr/include/stdint.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __WORDSIZE32_PTRDIFF_LONG #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 213 "/usr/include/stdint.h" 3 4 # define PTRDIFF_MIN (-2147483647L-1) # define PTRDIFF_MAX (2147483647L) # else # 216 "/usr/include/stdint.h" 3 4 # define PTRDIFF_MIN (-2147483647-1) # define PTRDIFF_MAX (2147483647) # endif # 219 "/usr/include/stdint.h" 3 4 # endif # 220 "/usr/include/stdint.h" 3 4 /* Limits of `sig_atomic_t'. */ # define SIG_ATOMIC_MIN (-2147483647-1) # define SIG_ATOMIC_MAX (2147483647) /* Limit of `size_t' type. */ #if 0 /* disabled by -frewrite-includes */ # if __WORDSIZE == 64 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 227 "/usr/include/stdint.h" 3 4 # define SIZE_MAX (18446744073709551615UL) # else # 229 "/usr/include/stdint.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __WORDSIZE32_SIZE_ULONG #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 230 "/usr/include/stdint.h" 3 4 # define SIZE_MAX (4294967295UL) # else # 232 "/usr/include/stdint.h" 3 4 # define SIZE_MAX (4294967295U) # endif # 234 "/usr/include/stdint.h" 3 4 # endif # 235 "/usr/include/stdint.h" 3 4 /* Limits of `wchar_t'. */ # ifndef WCHAR_MIN /* These constants might also be defined in <wchar.h>. */ # define WCHAR_MIN __WCHAR_MIN # define WCHAR_MAX __WCHAR_MAX # endif # 242 "/usr/include/stdint.h" 3 4 /* Limits of `wint_t'. */ # define WINT_MIN (0u) # define WINT_MAX (4294967295u) /* Signed. */ # define INT8_C(c) c # define INT16_C(c) c # define INT32_C(c) c #if 0 /* disabled by -frewrite-includes */ # if __WORDSIZE == 64 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 252 "/usr/include/stdint.h" 3 4 # define INT64_C(c) c ## L # else # 254 "/usr/include/stdint.h" 3 4 # define INT64_C(c) c ## LL # endif # 256 "/usr/include/stdint.h" 3 4 /* Unsigned. */ # define UINT8_C(c) c # define UINT16_C(c) c # define UINT32_C(c) c ## U #if 0 /* disabled by -frewrite-includes */ # if __WORDSIZE == 64 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 262 "/usr/include/stdint.h" 3 4 # define UINT64_C(c) c ## UL # else # 264 "/usr/include/stdint.h" 3 4 # define UINT64_C(c) c ## ULL # endif # 266 "/usr/include/stdint.h" 3 4 /* Maximal type. */ #if 0 /* disabled by -frewrite-includes */ # if __WORDSIZE == 64 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 269 "/usr/include/stdint.h" 3 4 # define INTMAX_C(c) c ## L # define UINTMAX_C(c) c ## UL # else # 272 "/usr/include/stdint.h" 3 4 # define INTMAX_C(c) c ## LL # define UINTMAX_C(c) c ## ULL # endif # 275 "/usr/include/stdint.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 277 "/usr/include/stdint.h" 3 4 # define INT8_WIDTH 8 # define UINT8_WIDTH 8 # define INT16_WIDTH 16 # define UINT16_WIDTH 16 # define INT32_WIDTH 32 # define UINT32_WIDTH 32 # define INT64_WIDTH 64 # define UINT64_WIDTH 64 # define INT_LEAST8_WIDTH 8 # define UINT_LEAST8_WIDTH 8 # define INT_LEAST16_WIDTH 16 # define UINT_LEAST16_WIDTH 16 # define INT_LEAST32_WIDTH 32 # define UINT_LEAST32_WIDTH 32 # define INT_LEAST64_WIDTH 64 # define UINT_LEAST64_WIDTH 64 # define INT_FAST8_WIDTH 8 # define UINT_FAST8_WIDTH 8 # define INT_FAST16_WIDTH __WORDSIZE # define UINT_FAST16_WIDTH __WORDSIZE # define INT_FAST32_WIDTH __WORDSIZE # define UINT_FAST32_WIDTH __WORDSIZE # define INT_FAST64_WIDTH 64 # define UINT_FAST64_WIDTH 64 # define INTPTR_WIDTH __WORDSIZE # define UINTPTR_WIDTH __WORDSIZE # define INTMAX_WIDTH 64 # define UINTMAX_WIDTH 64 # define PTRDIFF_WIDTH __WORDSIZE # define SIG_ATOMIC_WIDTH 32 # define SIZE_WIDTH __WORDSIZE # define WCHAR_WIDTH 32 # define WINT_WIDTH 32 #endif # 318 "/usr/include/stdint.h" 3 4 #endif /* stdint.h */ # 320 "/usr/include/stdint.h" 3 4 # 53 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 2 3 # ifdef __STDC_LIMIT_MACROS_DEFINED_BY_CLANG # undef __STDC_LIMIT_MACROS # undef __STDC_LIMIT_MACROS_DEFINED_BY_CLANG # endif # 58 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 # ifdef __STDC_CONSTANT_MACROS_DEFINED_BY_CLANG # undef __STDC_CONSTANT_MACROS # undef __STDC_CONSTANT_MACROS_DEFINED_BY_CLANG # endif # 62 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #else # 64 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 /* C99 7.18.1.1 Exact-width integer types. * C99 7.18.1.2 Minimum-width integer types. * C99 7.18.1.3 Fastest minimum-width integer types. * * The standard requires that exact-width type be defined for 8-, 16-, 32-, and * 64-bit types if they are implemented. Other exact width types are optional. * This implementation defines an exact-width types for every integer width * that is represented in the standard integer types. * * The standard also requires minimum-width types be defined for 8-, 16-, 32-, * and 64-bit widths regardless of whether there are corresponding exact-width * types. * * To accommodate targets that are missing types that are exactly 8, 16, 32, or * 64 bits wide, this implementation takes an approach of cascading * redefinitions, redefining __int_leastN_t to successively smaller exact-width * types. It is therefore important that the types are defined in order of * descending widths. * * We currently assume that the minimum-width types and the fastest * minimum-width types are the same. This is allowed by the standard, but is * suboptimal. * * In violation of the standard, some targets do not implement a type that is * wide enough to represent all of the required widths (8-, 16-, 32-, 64-bit). * To accommodate these targets, a required minimum-width type is only * defined if there exists an exact-width type of equal or greater width. */ #ifdef __INT64_TYPE__ # ifndef __int8_t_defined /* glibc sys/types.h also defines int64_t*/ typedef __INT64_TYPE__ int64_t; # endif /* __int8_t_defined */ # 98 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 typedef __UINT64_TYPE__ uint64_t; # define __int_least64_t int64_t # define __uint_least64_t uint64_t # define __int_least32_t int64_t # define __uint_least32_t uint64_t # define __int_least16_t int64_t # define __uint_least16_t uint64_t # define __int_least8_t int64_t # define __uint_least8_t uint64_t #endif /* __INT64_TYPE__ */ # 108 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #ifdef __int_least64_t typedef __int_least64_t int_least64_t; typedef __uint_least64_t uint_least64_t; typedef __int_least64_t int_fast64_t; typedef __uint_least64_t uint_fast64_t; #endif /* __int_least64_t */ # 115 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #ifdef __INT56_TYPE__ typedef __INT56_TYPE__ int56_t; typedef __UINT56_TYPE__ uint56_t; typedef int56_t int_least56_t; typedef uint56_t uint_least56_t; typedef int56_t int_fast56_t; typedef uint56_t uint_fast56_t; # define __int_least32_t int56_t # define __uint_least32_t uint56_t # define __int_least16_t int56_t # define __uint_least16_t uint56_t # define __int_least8_t int56_t # define __uint_least8_t uint56_t #endif /* __INT56_TYPE__ */ # 130 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #ifdef __INT48_TYPE__ typedef __INT48_TYPE__ int48_t; typedef __UINT48_TYPE__ uint48_t; typedef int48_t int_least48_t; typedef uint48_t uint_least48_t; typedef int48_t int_fast48_t; typedef uint48_t uint_fast48_t; # define __int_least32_t int48_t # define __uint_least32_t uint48_t # define __int_least16_t int48_t # define __uint_least16_t uint48_t # define __int_least8_t int48_t # define __uint_least8_t uint48_t #endif /* __INT48_TYPE__ */ # 146 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #ifdef __INT40_TYPE__ typedef __INT40_TYPE__ int40_t; typedef __UINT40_TYPE__ uint40_t; typedef int40_t int_least40_t; typedef uint40_t uint_least40_t; typedef int40_t int_fast40_t; typedef uint40_t uint_fast40_t; # define __int_least32_t int40_t # define __uint_least32_t uint40_t # define __int_least16_t int40_t # define __uint_least16_t uint40_t # define __int_least8_t int40_t # define __uint_least8_t uint40_t #endif /* __INT40_TYPE__ */ # 162 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #ifdef __INT32_TYPE__ # ifndef __int8_t_defined /* glibc sys/types.h also defines int32_t*/ typedef __INT32_TYPE__ int32_t; # endif /* __int8_t_defined */ # 169 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 # ifndef __uint32_t_defined /* more glibc compatibility */ # define __uint32_t_defined typedef __UINT32_TYPE__ uint32_t; # endif /* __uint32_t_defined */ # 174 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 # define __int_least32_t int32_t # define __uint_least32_t uint32_t # define __int_least16_t int32_t # define __uint_least16_t uint32_t # define __int_least8_t int32_t # define __uint_least8_t uint32_t #endif /* __INT32_TYPE__ */ # 182 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #ifdef __int_least32_t typedef __int_least32_t int_least32_t; typedef __uint_least32_t uint_least32_t; typedef __int_least32_t int_fast32_t; typedef __uint_least32_t uint_fast32_t; #endif /* __int_least32_t */ # 189 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #ifdef __INT24_TYPE__ typedef __INT24_TYPE__ int24_t; typedef __UINT24_TYPE__ uint24_t; typedef int24_t int_least24_t; typedef uint24_t uint_least24_t; typedef int24_t int_fast24_t; typedef uint24_t uint_fast24_t; # define __int_least16_t int24_t # define __uint_least16_t uint24_t # define __int_least8_t int24_t # define __uint_least8_t uint24_t #endif /* __INT24_TYPE__ */ # 202 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #ifdef __INT16_TYPE__ #ifndef __int8_t_defined /* glibc sys/types.h also defines int16_t*/ typedef __INT16_TYPE__ int16_t; #endif /* __int8_t_defined */ # 207 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 typedef __UINT16_TYPE__ uint16_t; # define __int_least16_t int16_t # define __uint_least16_t uint16_t # define __int_least8_t int16_t # define __uint_least8_t uint16_t #endif /* __INT16_TYPE__ */ # 213 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #ifdef __int_least16_t typedef __int_least16_t int_least16_t; typedef __uint_least16_t uint_least16_t; typedef __int_least16_t int_fast16_t; typedef __uint_least16_t uint_fast16_t; #endif /* __int_least16_t */ # 220 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #ifdef __INT8_TYPE__ #ifndef __int8_t_defined /* glibc sys/types.h also defines int8_t*/ typedef __INT8_TYPE__ int8_t; #endif /* __int8_t_defined */ # 226 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 typedef __UINT8_TYPE__ uint8_t; # define __int_least8_t int8_t # define __uint_least8_t uint8_t #endif /* __INT8_TYPE__ */ # 230 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #ifdef __int_least8_t typedef __int_least8_t int_least8_t; typedef __uint_least8_t uint_least8_t; typedef __int_least8_t int_fast8_t; typedef __uint_least8_t uint_fast8_t; #endif /* __int_least8_t */ # 237 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 /* prevent glibc sys/types.h from defining conflicting types */ #ifndef __int8_t_defined # define __int8_t_defined #endif /* __int8_t_defined */ # 242 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 /* C99 7.18.1.4 Integer types capable of holding object pointers. */ #define __stdint_join3(a,b,c) a ## b ## c #ifndef _INTPTR_T #ifndef __intptr_t_defined typedef __INTPTR_TYPE__ intptr_t; #define __intptr_t_defined #define _INTPTR_T #endif # 253 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #endif # 254 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #ifndef _UINTPTR_T typedef __UINTPTR_TYPE__ uintptr_t; #define _UINTPTR_T #endif # 259 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 /* C99 7.18.1.5 Greatest-width integer types. */ typedef __INTMAX_TYPE__ intmax_t; typedef __UINTMAX_TYPE__ uintmax_t; /* C99 7.18.4 Macros for minimum-width integer constants. * * The standard requires that integer constant macros be defined for all the * minimum-width types defined above. As 8-, 16-, 32-, and 64-bit minimum-width * types are required, the corresponding integer constant macros are defined * here. This implementation also defines minimum-width types for every other * integer width that the target implements, so corresponding macros are * defined below, too. * * These macros are defined using the same successive-shrinking approach as * the type definitions above. It is likewise important that macros are defined * in order of decending width. * * Note that C++ should not check __STDC_CONSTANT_MACROS here, contrary to the * claims of the C standard (see C++ 18.3.1p2, [cstdint.syn]). */ #define __int_c_join(a, b) a ## b #define __int_c(v, suffix) __int_c_join(v, suffix) #define __uint_c(v, suffix) __int_c_join(v##U, suffix) #ifdef __INT64_TYPE__ # ifdef __INT64_C_SUFFIX__ # define __int64_c_suffix __INT64_C_SUFFIX__ # define __int32_c_suffix __INT64_C_SUFFIX__ # define __int16_c_suffix __INT64_C_SUFFIX__ # define __int8_c_suffix __INT64_C_SUFFIX__ # else # 294 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 # undef __int64_c_suffix # undef __int32_c_suffix # undef __int16_c_suffix # undef __int8_c_suffix # endif /* __INT64_C_SUFFIX__ */ # 299 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #endif /* __INT64_TYPE__ */ # 300 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #ifdef __int_least64_t # ifdef __int64_c_suffix # define INT64_C(v) __int_c(v, __int64_c_suffix) # define UINT64_C(v) __uint_c(v, __int64_c_suffix) # else # 306 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 # define INT64_C(v) v # define UINT64_C(v) v ## U # endif /* __int64_c_suffix */ # 309 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #endif /* __int_least64_t */ # 310 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #ifdef __INT56_TYPE__ # ifdef __INT56_C_SUFFIX__ # define INT56_C(v) __int_c(v, __INT56_C_SUFFIX__) # define UINT56_C(v) __uint_c(v, __INT56_C_SUFFIX__) # define __int32_c_suffix __INT56_C_SUFFIX__ # define __int16_c_suffix __INT56_C_SUFFIX__ # define __int8_c_suffix __INT56_C_SUFFIX__ # else # 320 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 # define INT56_C(v) v # define UINT56_C(v) v ## U # undef __int32_c_suffix # undef __int16_c_suffix # undef __int8_c_suffix # endif /* __INT56_C_SUFFIX__ */ # 326 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #endif /* __INT56_TYPE__ */ # 327 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #ifdef __INT48_TYPE__ # ifdef __INT48_C_SUFFIX__ # define INT48_C(v) __int_c(v, __INT48_C_SUFFIX__) # define UINT48_C(v) __uint_c(v, __INT48_C_SUFFIX__) # define __int32_c_suffix __INT48_C_SUFFIX__ # define __int16_c_suffix __INT48_C_SUFFIX__ # define __int8_c_suffix __INT48_C_SUFFIX__ # else # 337 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 # define INT48_C(v) v # define UINT48_C(v) v ## U # undef __int32_c_suffix # undef __int16_c_suffix # undef __int8_c_suffix # endif /* __INT48_C_SUFFIX__ */ # 343 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #endif /* __INT48_TYPE__ */ # 344 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #ifdef __INT40_TYPE__ # ifdef __INT40_C_SUFFIX__ # define INT40_C(v) __int_c(v, __INT40_C_SUFFIX__) # define UINT40_C(v) __uint_c(v, __INT40_C_SUFFIX__) # define __int32_c_suffix __INT40_C_SUFFIX__ # define __int16_c_suffix __INT40_C_SUFFIX__ # define __int8_c_suffix __INT40_C_SUFFIX__ # else # 354 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 # define INT40_C(v) v # define UINT40_C(v) v ## U # undef __int32_c_suffix # undef __int16_c_suffix # undef __int8_c_suffix # endif /* __INT40_C_SUFFIX__ */ # 360 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #endif /* __INT40_TYPE__ */ # 361 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #ifdef __INT32_TYPE__ # ifdef __INT32_C_SUFFIX__ # define __int32_c_suffix __INT32_C_SUFFIX__ # define __int16_c_suffix __INT32_C_SUFFIX__ # define __int8_c_suffix __INT32_C_SUFFIX__ #else # 369 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 # undef __int32_c_suffix # undef __int16_c_suffix # undef __int8_c_suffix # endif /* __INT32_C_SUFFIX__ */ # 373 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #endif /* __INT32_TYPE__ */ # 374 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #ifdef __int_least32_t # ifdef __int32_c_suffix # define INT32_C(v) __int_c(v, __int32_c_suffix) # define UINT32_C(v) __uint_c(v, __int32_c_suffix) # else # 380 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 # define INT32_C(v) v # define UINT32_C(v) v ## U # endif /* __int32_c_suffix */ # 383 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #endif /* __int_least32_t */ # 384 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #ifdef __INT24_TYPE__ # ifdef __INT24_C_SUFFIX__ # define INT24_C(v) __int_c(v, __INT24_C_SUFFIX__) # define UINT24_C(v) __uint_c(v, __INT24_C_SUFFIX__) # define __int16_c_suffix __INT24_C_SUFFIX__ # define __int8_c_suffix __INT24_C_SUFFIX__ # else # 393 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 # define INT24_C(v) v # define UINT24_C(v) v ## U # undef __int16_c_suffix # undef __int8_c_suffix # endif /* __INT24_C_SUFFIX__ */ # 398 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #endif /* __INT24_TYPE__ */ # 399 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #ifdef __INT16_TYPE__ # ifdef __INT16_C_SUFFIX__ # define __int16_c_suffix __INT16_C_SUFFIX__ # define __int8_c_suffix __INT16_C_SUFFIX__ #else # 406 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 # undef __int16_c_suffix # undef __int8_c_suffix # endif /* __INT16_C_SUFFIX__ */ # 409 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #endif /* __INT16_TYPE__ */ # 410 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #ifdef __int_least16_t # ifdef __int16_c_suffix # define INT16_C(v) __int_c(v, __int16_c_suffix) # define UINT16_C(v) __uint_c(v, __int16_c_suffix) # else # 416 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 # define INT16_C(v) v # define UINT16_C(v) v ## U # endif /* __int16_c_suffix */ # 419 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #endif /* __int_least16_t */ # 420 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #ifdef __INT8_TYPE__ # ifdef __INT8_C_SUFFIX__ # define __int8_c_suffix __INT8_C_SUFFIX__ #else # 426 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 # undef __int8_c_suffix # endif /* __INT8_C_SUFFIX__ */ # 428 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #endif /* __INT8_TYPE__ */ # 429 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #ifdef __int_least8_t # ifdef __int8_c_suffix # define INT8_C(v) __int_c(v, __int8_c_suffix) # define UINT8_C(v) __uint_c(v, __int8_c_suffix) # else # 435 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 # define INT8_C(v) v # define UINT8_C(v) v ## U # endif /* __int8_c_suffix */ # 438 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #endif /* __int_least8_t */ # 439 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 /* C99 7.18.2.1 Limits of exact-width integer types. * C99 7.18.2.2 Limits of minimum-width integer types. * C99 7.18.2.3 Limits of fastest minimum-width integer types. * * The presence of limit macros are completely optional in C99. This * implementation defines limits for all of the types (exact- and * minimum-width) that it defines above, using the limits of the minimum-width * type for any types that do not have exact-width representations. * * As in the type definitions, this section takes an approach of * successive-shrinking to determine which limits to use for the standard (8, * 16, 32, 64) bit widths when they don't have exact representations. It is * therefore important that the definitions be kept in order of decending * widths. * * Note that C++ should not check __STDC_LIMIT_MACROS here, contrary to the * claims of the C standard (see C++ 18.3.1p2, [cstdint.syn]). */ #ifdef __INT64_TYPE__ # define INT64_MAX INT64_C( 9223372036854775807) # define INT64_MIN (-INT64_C( 9223372036854775807)-1) # define UINT64_MAX UINT64_C(18446744073709551615) # define __INT_LEAST64_MIN INT64_MIN # define __INT_LEAST64_MAX INT64_MAX # define __UINT_LEAST64_MAX UINT64_MAX # define __INT_LEAST32_MIN INT64_MIN # define __INT_LEAST32_MAX INT64_MAX # define __UINT_LEAST32_MAX UINT64_MAX # define __INT_LEAST16_MIN INT64_MIN # define __INT_LEAST16_MAX INT64_MAX # define __UINT_LEAST16_MAX UINT64_MAX # define __INT_LEAST8_MIN INT64_MIN # define __INT_LEAST8_MAX INT64_MAX # define __UINT_LEAST8_MAX UINT64_MAX #endif /* __INT64_TYPE__ */ # 477 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #ifdef __INT_LEAST64_MIN # define INT_LEAST64_MIN __INT_LEAST64_MIN # define INT_LEAST64_MAX __INT_LEAST64_MAX # define UINT_LEAST64_MAX __UINT_LEAST64_MAX # define INT_FAST64_MIN __INT_LEAST64_MIN # define INT_FAST64_MAX __INT_LEAST64_MAX # define UINT_FAST64_MAX __UINT_LEAST64_MAX #endif /* __INT_LEAST64_MIN */ # 486 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #ifdef __INT56_TYPE__ # define INT56_MAX INT56_C(36028797018963967) # define INT56_MIN (-INT56_C(36028797018963967)-1) # define UINT56_MAX UINT56_C(72057594037927935) # define INT_LEAST56_MIN INT56_MIN # define INT_LEAST56_MAX INT56_MAX # define UINT_LEAST56_MAX UINT56_MAX # define INT_FAST56_MIN INT56_MIN # define INT_FAST56_MAX INT56_MAX # define UINT_FAST56_MAX UINT56_MAX # define __INT_LEAST32_MIN INT56_MIN # define __INT_LEAST32_MAX INT56_MAX # define __UINT_LEAST32_MAX UINT56_MAX # define __INT_LEAST16_MIN INT56_MIN # define __INT_LEAST16_MAX INT56_MAX # define __UINT_LEAST16_MAX UINT56_MAX # define __INT_LEAST8_MIN INT56_MIN # define __INT_LEAST8_MAX INT56_MAX # define __UINT_LEAST8_MAX UINT56_MAX #endif /* __INT56_TYPE__ */ # 508 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #ifdef __INT48_TYPE__ # define INT48_MAX INT48_C(140737488355327) # define INT48_MIN (-INT48_C(140737488355327)-1) # define UINT48_MAX UINT48_C(281474976710655) # define INT_LEAST48_MIN INT48_MIN # define INT_LEAST48_MAX INT48_MAX # define UINT_LEAST48_MAX UINT48_MAX # define INT_FAST48_MIN INT48_MIN # define INT_FAST48_MAX INT48_MAX # define UINT_FAST48_MAX UINT48_MAX # define __INT_LEAST32_MIN INT48_MIN # define __INT_LEAST32_MAX INT48_MAX # define __UINT_LEAST32_MAX UINT48_MAX # define __INT_LEAST16_MIN INT48_MIN # define __INT_LEAST16_MAX INT48_MAX # define __UINT_LEAST16_MAX UINT48_MAX # define __INT_LEAST8_MIN INT48_MIN # define __INT_LEAST8_MAX INT48_MAX # define __UINT_LEAST8_MAX UINT48_MAX #endif /* __INT48_TYPE__ */ # 530 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #ifdef __INT40_TYPE__ # define INT40_MAX INT40_C(549755813887) # define INT40_MIN (-INT40_C(549755813887)-1) # define UINT40_MAX UINT40_C(1099511627775) # define INT_LEAST40_MIN INT40_MIN # define INT_LEAST40_MAX INT40_MAX # define UINT_LEAST40_MAX UINT40_MAX # define INT_FAST40_MIN INT40_MIN # define INT_FAST40_MAX INT40_MAX # define UINT_FAST40_MAX UINT40_MAX # define __INT_LEAST32_MIN INT40_MIN # define __INT_LEAST32_MAX INT40_MAX # define __UINT_LEAST32_MAX UINT40_MAX # define __INT_LEAST16_MIN INT40_MIN # define __INT_LEAST16_MAX INT40_MAX # define __UINT_LEAST16_MAX UINT40_MAX # define __INT_LEAST8_MIN INT40_MIN # define __INT_LEAST8_MAX INT40_MAX # define __UINT_LEAST8_MAX UINT40_MAX #endif /* __INT40_TYPE__ */ # 552 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #ifdef __INT32_TYPE__ # define INT32_MAX INT32_C(2147483647) # define INT32_MIN (-INT32_C(2147483647)-1) # define UINT32_MAX UINT32_C(4294967295) # define __INT_LEAST32_MIN INT32_MIN # define __INT_LEAST32_MAX INT32_MAX # define __UINT_LEAST32_MAX UINT32_MAX # define __INT_LEAST16_MIN INT32_MIN # define __INT_LEAST16_MAX INT32_MAX # define __UINT_LEAST16_MAX UINT32_MAX # define __INT_LEAST8_MIN INT32_MIN # define __INT_LEAST8_MAX INT32_MAX # define __UINT_LEAST8_MAX UINT32_MAX #endif /* __INT32_TYPE__ */ # 568 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #ifdef __INT_LEAST32_MIN # define INT_LEAST32_MIN __INT_LEAST32_MIN # define INT_LEAST32_MAX __INT_LEAST32_MAX # define UINT_LEAST32_MAX __UINT_LEAST32_MAX # define INT_FAST32_MIN __INT_LEAST32_MIN # define INT_FAST32_MAX __INT_LEAST32_MAX # define UINT_FAST32_MAX __UINT_LEAST32_MAX #endif /* __INT_LEAST32_MIN */ # 577 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #ifdef __INT24_TYPE__ # define INT24_MAX INT24_C(8388607) # define INT24_MIN (-INT24_C(8388607)-1) # define UINT24_MAX UINT24_C(16777215) # define INT_LEAST24_MIN INT24_MIN # define INT_LEAST24_MAX INT24_MAX # define UINT_LEAST24_MAX UINT24_MAX # define INT_FAST24_MIN INT24_MIN # define INT_FAST24_MAX INT24_MAX # define UINT_FAST24_MAX UINT24_MAX # define __INT_LEAST16_MIN INT24_MIN # define __INT_LEAST16_MAX INT24_MAX # define __UINT_LEAST16_MAX UINT24_MAX # define __INT_LEAST8_MIN INT24_MIN # define __INT_LEAST8_MAX INT24_MAX # define __UINT_LEAST8_MAX UINT24_MAX #endif /* __INT24_TYPE__ */ # 596 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #ifdef __INT16_TYPE__ #define INT16_MAX INT16_C(32767) #define INT16_MIN (-INT16_C(32767)-1) #define UINT16_MAX UINT16_C(65535) # define __INT_LEAST16_MIN INT16_MIN # define __INT_LEAST16_MAX INT16_MAX # define __UINT_LEAST16_MAX UINT16_MAX # define __INT_LEAST8_MIN INT16_MIN # define __INT_LEAST8_MAX INT16_MAX # define __UINT_LEAST8_MAX UINT16_MAX #endif /* __INT16_TYPE__ */ # 609 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #ifdef __INT_LEAST16_MIN # define INT_LEAST16_MIN __INT_LEAST16_MIN # define INT_LEAST16_MAX __INT_LEAST16_MAX # define UINT_LEAST16_MAX __UINT_LEAST16_MAX # define INT_FAST16_MIN __INT_LEAST16_MIN # define INT_FAST16_MAX __INT_LEAST16_MAX # define UINT_FAST16_MAX __UINT_LEAST16_MAX #endif /* __INT_LEAST16_MIN */ # 618 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #ifdef __INT8_TYPE__ # define INT8_MAX INT8_C(127) # define INT8_MIN (-INT8_C(127)-1) # define UINT8_MAX UINT8_C(255) # define __INT_LEAST8_MIN INT8_MIN # define __INT_LEAST8_MAX INT8_MAX # define __UINT_LEAST8_MAX UINT8_MAX #endif /* __INT8_TYPE__ */ # 628 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #ifdef __INT_LEAST8_MIN # define INT_LEAST8_MIN __INT_LEAST8_MIN # define INT_LEAST8_MAX __INT_LEAST8_MAX # define UINT_LEAST8_MAX __UINT_LEAST8_MAX # define INT_FAST8_MIN __INT_LEAST8_MIN # define INT_FAST8_MAX __INT_LEAST8_MAX # define UINT_FAST8_MAX __UINT_LEAST8_MAX #endif /* __INT_LEAST8_MIN */ # 637 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 /* Some utility macros */ #define __INTN_MIN(n) __stdint_join3( INT, n, _MIN) #define __INTN_MAX(n) __stdint_join3( INT, n, _MAX) #define __UINTN_MAX(n) __stdint_join3(UINT, n, _MAX) #define __INTN_C(n, v) __stdint_join3( INT, n, _C(v)) #define __UINTN_C(n, v) __stdint_join3(UINT, n, _C(v)) /* C99 7.18.2.4 Limits of integer types capable of holding object pointers. */ /* C99 7.18.3 Limits of other integer types. */ #define INTPTR_MIN (-__INTPTR_MAX__-1) #define INTPTR_MAX __INTPTR_MAX__ #define UINTPTR_MAX __UINTPTR_MAX__ #define PTRDIFF_MIN (-__PTRDIFF_MAX__-1) #define PTRDIFF_MAX __PTRDIFF_MAX__ #define SIZE_MAX __SIZE_MAX__ /* ISO9899:2011 7.20 (C11 Annex K): Define RSIZE_MAX if __STDC_WANT_LIB_EXT1__ * is enabled. */ #if 0 /* disabled by -frewrite-includes */ #if defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 658 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #define RSIZE_MAX (SIZE_MAX >> 1) #endif # 660 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 /* C99 7.18.2.5 Limits of greatest-width integer types. */ #define INTMAX_MIN (-__INTMAX_MAX__-1) #define INTMAX_MAX __INTMAX_MAX__ #define UINTMAX_MAX __UINTMAX_MAX__ /* C99 7.18.3 Limits of other integer types. */ #define SIG_ATOMIC_MIN __INTN_MIN(__SIG_ATOMIC_WIDTH__) #define SIG_ATOMIC_MAX __INTN_MAX(__SIG_ATOMIC_WIDTH__) #ifdef __WINT_UNSIGNED__ # define WINT_MIN __UINTN_C(__WINT_WIDTH__, 0) # define WINT_MAX __UINTN_MAX(__WINT_WIDTH__) #else # 673 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 # define WINT_MIN __INTN_MIN(__WINT_WIDTH__) # define WINT_MAX __INTN_MAX(__WINT_WIDTH__) #endif # 676 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #ifndef WCHAR_MAX # define WCHAR_MAX __WCHAR_MAX__ #endif # 680 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #ifndef WCHAR_MIN #if 0 /* disabled by -frewrite-includes */ # if __WCHAR_MAX__ == __INTN_MAX(__WCHAR_WIDTH__) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 682 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 # define WCHAR_MIN __INTN_MIN(__WCHAR_WIDTH__) # else # 684 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 # define WCHAR_MIN __UINTN_C(__WCHAR_WIDTH__, 0) # endif # 686 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #endif # 687 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 /* 7.18.4.2 Macros for greatest-width integer constants. */ #define INTMAX_C(v) __int_c(v, __INTMAX_C_SUFFIX__) #define UINTMAX_C(v) __int_c(v, __UINTMAX_C_SUFFIX__) #endif /* __STDC_HOSTED__ */ # 693 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 #endif /* __CLANG_STDINT_H */ # 694 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stdint.h" 3 # 42 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdint" 2 3 #endif # 43 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdint" 3 namespace std { #ifdef _GLIBCXX_USE_C99_STDINT_TR1 using ::int8_t; using ::int16_t; using ::int32_t; using ::int64_t; using ::int_fast8_t; using ::int_fast16_t; using ::int_fast32_t; using ::int_fast64_t; using ::int_least8_t; using ::int_least16_t; using ::int_least32_t; using ::int_least64_t; using ::intmax_t; using ::intptr_t; using ::uint8_t; using ::uint16_t; using ::uint32_t; using ::uint64_t; using ::uint_fast8_t; using ::uint_fast16_t; using ::uint_fast32_t; using ::uint_fast64_t; using ::uint_least8_t; using ::uint_least16_t; using ::uint_least32_t; using ::uint_least64_t; using ::uintmax_t; using ::uintptr_t; #else // !_GLIBCXX_USE_C99_STDINT_TR1 # 83 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdint" 3 // Define the minimum needed for <ratio>, <chrono> etc. using intmax_t = __INTMAX_TYPE__; using uintmax_t = __UINTMAX_TYPE__; #endif // _GLIBCXX_USE_C99_STDINT_TR1 # 87 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdint" 3 } // namespace std #endif // C++11 # 90 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdint" 3 #endif // _GLIBCXX_CSTDINT # 92 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdint" 3 # 629 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/char_traits.h" 2 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION template<> struct char_traits<char16_t> { typedef char16_t char_type; #ifdef _GLIBCXX_USE_C99_STDINT_TR1 typedef uint_least16_t int_type; #if 0 /* disabled by -frewrite-includes */ #if 0 #elif defined __UINT_LEAST16_TYPE__ #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 641 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/char_traits.h" 3 typedef __UINT_LEAST16_TYPE__ int_type; #else # 643 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/char_traits.h" 3 typedef make_unsigned<char16_t>::type int_type; #endif # 645 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/char_traits.h" 3 typedef streamoff off_type; typedef u16streampos pos_type; typedef mbstate_t state_type; static _GLIBCXX17_CONSTEXPR void assign(char_type& __c1, const char_type& __c2) noexcept { __c1 = __c2; } static constexpr bool eq(const char_type& __c1, const char_type& __c2) noexcept { return __c1 == __c2; } static constexpr bool lt(const char_type& __c1, const char_type& __c2) noexcept { return __c1 < __c2; } static _GLIBCXX17_CONSTEXPR int compare(const char_type* __s1, const char_type* __s2, size_t __n) { for (size_t __i = 0; __i < __n; ++__i) if (lt(__s1[__i], __s2[__i])) return -1; else if (lt(__s2[__i], __s1[__i])) return 1; return 0; } static _GLIBCXX17_CONSTEXPR size_t length(const char_type* __s) { size_t __i = 0; while (!eq(__s[__i], char_type())) ++__i; return __i; } static _GLIBCXX17_CONSTEXPR const char_type* find(const char_type* __s, size_t __n, const char_type& __a) { for (size_t __i = 0; __i < __n; ++__i) if (eq(__s[__i], __a)) return __s + __i; return 0; } static char_type* move(char_type* __s1, const char_type* __s2, size_t __n) { if (__n == 0) return __s1; return (static_cast<char_type*> (__builtin_memmove(__s1, __s2, __n * sizeof(char_type)))); } static char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) { if (__n == 0) return __s1; return (static_cast<char_type*> (__builtin_memcpy(__s1, __s2, __n * sizeof(char_type)))); } static char_type* assign(char_type* __s, size_t __n, char_type __a) { for (size_t __i = 0; __i < __n; ++__i) assign(__s[__i], __a); return __s; } static constexpr char_type to_char_type(const int_type& __c) noexcept { return char_type(__c); } static constexpr int_type to_int_type(const char_type& __c) noexcept { return __c == eof() ? int_type(0xfffd) : int_type(__c); } static constexpr bool eq_int_type(const int_type& __c1, const int_type& __c2) noexcept { return __c1 == __c2; } static constexpr int_type eof() noexcept { return static_cast<int_type>(-1); } static constexpr int_type not_eof(const int_type& __c) noexcept { return eq_int_type(__c, eof()) ? 0 : __c; } }; template<> struct char_traits<char32_t> { typedef char32_t char_type; #ifdef _GLIBCXX_USE_C99_STDINT_TR1 typedef uint_least32_t int_type; #if 0 /* disabled by -frewrite-includes */ #if 0 #elif defined __UINT_LEAST32_TYPE__ #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 744 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/char_traits.h" 3 typedef __UINT_LEAST32_TYPE__ int_type; #else # 746 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/char_traits.h" 3 typedef make_unsigned<char32_t>::type int_type; #endif # 748 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/char_traits.h" 3 typedef streamoff off_type; typedef u32streampos pos_type; typedef mbstate_t state_type; static _GLIBCXX17_CONSTEXPR void assign(char_type& __c1, const char_type& __c2) noexcept { __c1 = __c2; } static constexpr bool eq(const char_type& __c1, const char_type& __c2) noexcept { return __c1 == __c2; } static constexpr bool lt(const char_type& __c1, const char_type& __c2) noexcept { return __c1 < __c2; } static _GLIBCXX17_CONSTEXPR int compare(const char_type* __s1, const char_type* __s2, size_t __n) { for (size_t __i = 0; __i < __n; ++__i) if (lt(__s1[__i], __s2[__i])) return -1; else if (lt(__s2[__i], __s1[__i])) return 1; return 0; } static _GLIBCXX17_CONSTEXPR size_t length(const char_type* __s) { size_t __i = 0; while (!eq(__s[__i], char_type())) ++__i; return __i; } static _GLIBCXX17_CONSTEXPR const char_type* find(const char_type* __s, size_t __n, const char_type& __a) { for (size_t __i = 0; __i < __n; ++__i) if (eq(__s[__i], __a)) return __s + __i; return 0; } static char_type* move(char_type* __s1, const char_type* __s2, size_t __n) { if (__n == 0) return __s1; return (static_cast<char_type*> (__builtin_memmove(__s1, __s2, __n * sizeof(char_type)))); } static char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) { if (__n == 0) return __s1; return (static_cast<char_type*> (__builtin_memcpy(__s1, __s2, __n * sizeof(char_type)))); } static char_type* assign(char_type* __s, size_t __n, char_type __a) { for (size_t __i = 0; __i < __n; ++__i) assign(__s[__i], __a); return __s; } static constexpr char_type to_char_type(const int_type& __c) noexcept { return char_type(__c); } static constexpr int_type to_int_type(const char_type& __c) noexcept { return int_type(__c); } static constexpr bool eq_int_type(const int_type& __c1, const int_type& __c2) noexcept { return __c1 == __c2; } static constexpr int_type eof() noexcept { return static_cast<int_type>(-1); } static constexpr int_type not_eof(const int_type& __c) noexcept { return eq_int_type(__c, eof()) ? 0 : __c; } }; _GLIBCXX_END_NAMESPACE_VERSION } // namespace #endif // C++11 # 844 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/char_traits.h" 3 #endif // _CHAR_TRAITS_H # 846 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/char_traits.h" 3 # 41 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/string" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/allocator.h> #endif /* expanded by -frewrite-includes */ # 41 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/string" 3 # 42 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/string" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/cpp_type_traits.h> #endif /* expanded by -frewrite-includes */ # 42 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/string" 3 # 43 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/string" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/localefwd.h> // For operators >>, <<, and getline. #endif /* expanded by -frewrite-includes */ # 43 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/string" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/localefwd.h" 1 3 // <locale> Forward declarations -*- C++ -*- // Copyright (C) 1997-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file bits/localefwd.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{locale} */ // // ISO C++ 14882: 22.1 Locales // #ifndef _LOCALE_FWD_H #define _LOCALE_FWD_H 1 #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 38 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/localefwd.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/c++config.h> #endif /* expanded by -frewrite-includes */ # 39 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/localefwd.h" 3 # 40 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/localefwd.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/c++locale.h> // Defines __c_locale, config-specific include #endif /* expanded by -frewrite-includes */ # 40 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/localefwd.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++locale.h" 1 3 // Wrapper for underlying C-language localization -*- C++ -*- // Copyright (C) 2001-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file bits/c++locale.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{locale} */ // // ISO C++ 14882: 22.8 Standard locale categories. // // Written by Benjamin Kosnik <bkoz@redhat.com> #ifndef _GLIBCXX_CXX_LOCALE_H #define _GLIBCXX_CXX_LOCALE_H 1 #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 40 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++locale.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <clocale> #endif /* expanded by -frewrite-includes */ # 41 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++locale.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/clocale" 1 3 // -*- C++ -*- forwarding header. // Copyright (C) 1997-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file clocale * This is a Standard C++ Library file. You should @c \#include this file * in your programs, rather than any of the @a *.h implementation files. * * This is the C++ version of the Standard C Library header @c locale.h, * and its contents are (mostly) the same as that header, but are all * contained in the namespace @c std (except for names which are defined * as macros in C). */ // // ISO C++ 14882: 18.2.2 Implementation properties: C library // #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 40 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/clocale" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/c++config.h> #endif /* expanded by -frewrite-includes */ # 41 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/clocale" 3 # 42 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/clocale" 3 #if 0 /* expanded by -frewrite-includes */ #include <locale.h> #endif /* expanded by -frewrite-includes */ # 42 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/clocale" 3 # 1 "/usr/include/locale.h" 1 3 4 /* Copyright (C) 1991-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ /* * ISO C99 Standard: 7.11 Localization <locale.h> */ #ifndef _LOCALE_H #define _LOCALE_H 1 #if 0 /* expanded by -frewrite-includes */ #include <features.h> #endif /* expanded by -frewrite-includes */ # 25 "/usr/include/locale.h" 3 4 # 26 "/usr/include/locale.h" 3 4 #define __need_NULL #if 0 /* expanded by -frewrite-includes */ #include <stddef.h> #endif /* expanded by -frewrite-includes */ # 28 "/usr/include/locale.h" 3 4 # 1 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 1 3 4 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ #if 0 /* disabled by -frewrite-includes */ #if !defined(__STDDEF_H) || defined(__need_ptrdiff_t) || \ defined(__need_size_t) || defined(__need_wchar_t) || \ defined(__need_NULL) || defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 13 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \ !defined(__need_wchar_t) && !defined(__need_NULL) && \ !defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 17 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define miscellaneous pieces when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 19 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define __STDDEF_H #endif # 21 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define __need_ptrdiff_t #define __need_size_t #define __need_wchar_t #define __need_NULL #define __need_STDDEF_H_misc /* __need_wint_t is intentionally not defined here. */ #endif # 28 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_ptrdiff_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 30 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !defined(_PTRDIFF_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 31 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define ptrdiff_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 33 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define _PTRDIFF_T #endif # 35 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __PTRDIFF_TYPE__ ptrdiff_t; #endif # 37 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_ptrdiff_t #endif /* defined(__need_ptrdiff_t) */ # 39 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_size_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 41 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !defined(_SIZE_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 42 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define size_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 44 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define _SIZE_T #endif # 46 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __SIZE_TYPE__ size_t; #endif # 48 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_size_t #endif /*defined(__need_size_t) */ # 50 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_STDDEF_H_misc) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 52 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is * enabled. */ #if 0 /* disabled by -frewrite-includes */ #if (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 && \ !defined(_RSIZE_T)) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 56 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define rsize_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 58 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define _RSIZE_T #endif # 60 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __SIZE_TYPE__ rsize_t; #endif # 62 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #endif /* defined(__need_STDDEF_H_misc) */ # 63 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_wchar_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 65 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #ifndef __cplusplus /* Always define wchar_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(_WCHAR_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 68 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 69 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define _WCHAR_T #if 0 /* disabled by -frewrite-includes */ #if defined(_MSC_EXTENSIONS) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 71 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define _WCHAR_T_DEFINED #endif # 73 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 74 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __WCHAR_TYPE__ wchar_t; #endif # 76 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 77 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_wchar_t #endif /* defined(__need_wchar_t) */ # 79 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_NULL) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 81 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #undef NULL #ifdef __cplusplus #if 0 /* disabled by -frewrite-includes */ # if !defined(__MINGW32__) && !defined(_MSC_VER) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 84 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 # define NULL __null # else # 86 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 # define NULL 0 # endif # 88 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #else # 89 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 # define NULL ((void*)0) #endif # 91 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #ifdef __cplusplus #if 0 /* disabled by -frewrite-includes */ #if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 93 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 namespace std { typedef decltype(nullptr) nullptr_t; } using ::std::nullptr_t; #endif # 96 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 97 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_NULL #endif /* defined(__need_NULL) */ # 99 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_STDDEF_H_misc) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 101 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 102 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include "__stddef_max_align_t.h" #endif /* expanded by -frewrite-includes */ # 102 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 # 103 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 104 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define offsetof(t, d) __builtin_offsetof(t, d) #undef __need_STDDEF_H_misc #endif /* defined(__need_STDDEF_H_misc) */ # 107 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */ #if 0 /* disabled by -frewrite-includes */ #if defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 111 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define wint_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(_WINT_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 113 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 114 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define _WINT_T #endif # 116 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __WINT_TYPE__ wint_t; #endif # 118 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_wint_t #endif /* __need_wint_t */ # 120 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 122 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 # 29 "/usr/include/locale.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include <bits/locale.h> #endif /* expanded by -frewrite-includes */ # 29 "/usr/include/locale.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/locale.h" 1 3 4 /* Definition of locale category symbol values. Copyright (C) 2001-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ #if 0 /* disabled by -frewrite-includes */ #if !defined _LOCALE_H && !defined _LANGINFO_H #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 20 "/usr/include/x86_64-linux-gnu/bits/locale.h" 3 4 # error "Never use <bits/locale.h> directly; include <locale.h> instead." #endif # 22 "/usr/include/x86_64-linux-gnu/bits/locale.h" 3 4 #ifndef _BITS_LOCALE_H #define _BITS_LOCALE_H 1 #define __LC_CTYPE 0 #define __LC_NUMERIC 1 #define __LC_TIME 2 #define __LC_COLLATE 3 #define __LC_MONETARY 4 #define __LC_MESSAGES 5 #define __LC_ALL 6 #define __LC_PAPER 7 #define __LC_NAME 8 #define __LC_ADDRESS 9 #define __LC_TELEPHONE 10 #define __LC_MEASUREMENT 11 #define __LC_IDENTIFICATION 12 #endif /* bits/locale.h */ # 41 "/usr/include/x86_64-linux-gnu/bits/locale.h" 3 4 # 30 "/usr/include/locale.h" 2 3 4 __BEGIN_DECLS /* These are the possibilities for the first argument to setlocale. The code assumes that the lowest LC_* symbol has the value zero. */ #define LC_CTYPE __LC_CTYPE #define LC_NUMERIC __LC_NUMERIC #define LC_TIME __LC_TIME #define LC_COLLATE __LC_COLLATE #define LC_MONETARY __LC_MONETARY #define LC_MESSAGES __LC_MESSAGES #define LC_ALL __LC_ALL #define LC_PAPER __LC_PAPER #define LC_NAME __LC_NAME #define LC_ADDRESS __LC_ADDRESS #define LC_TELEPHONE __LC_TELEPHONE #define LC_MEASUREMENT __LC_MEASUREMENT #define LC_IDENTIFICATION __LC_IDENTIFICATION /* Structure giving information about numeric and monetary notation. */ struct lconv { /* Numeric (non-monetary) information. */ char *decimal_point; /* Decimal point character. */ char *thousands_sep; /* Thousands separator. */ /* Each element is the number of digits in each group; elements with higher indices are farther left. An element with value CHAR_MAX means that no further grouping is done. An element with value 0 means that the previous element is used for all groups farther left. */ char *grouping; /* Monetary information. */ /* First three chars are a currency symbol from ISO 4217. Fourth char is the separator. Fifth char is '\0'. */ char *int_curr_symbol; char *currency_symbol; /* Local currency symbol. */ char *mon_decimal_point; /* Decimal point character. */ char *mon_thousands_sep; /* Thousands separator. */ char *mon_grouping; /* Like `grouping' element (above). */ char *positive_sign; /* Sign for positive values. */ char *negative_sign; /* Sign for negative values. */ char int_frac_digits; /* Int'l fractional digits. */ char frac_digits; /* Local fractional digits. */ /* 1 if currency_symbol precedes a positive value, 0 if succeeds. */ char p_cs_precedes; /* 1 iff a space separates currency_symbol from a positive value. */ char p_sep_by_space; /* 1 if currency_symbol precedes a negative value, 0 if succeeds. */ char n_cs_precedes; /* 1 iff a space separates currency_symbol from a negative value. */ char n_sep_by_space; /* Positive and negative sign positions: 0 Parentheses surround the quantity and currency_symbol. 1 The sign string precedes the quantity and currency_symbol. 2 The sign string follows the quantity and currency_symbol. 3 The sign string immediately precedes the currency_symbol. 4 The sign string immediately follows the currency_symbol. */ char p_sign_posn; char n_sign_posn; #ifdef __USE_ISOC99 /* 1 if int_curr_symbol precedes a positive value, 0 if succeeds. */ char int_p_cs_precedes; /* 1 iff a space separates int_curr_symbol from a positive value. */ char int_p_sep_by_space; /* 1 if int_curr_symbol precedes a negative value, 0 if succeeds. */ char int_n_cs_precedes; /* 1 iff a space separates int_curr_symbol from a negative value. */ char int_n_sep_by_space; /* Positive and negative sign positions: 0 Parentheses surround the quantity and int_curr_symbol. 1 The sign string precedes the quantity and int_curr_symbol. 2 The sign string follows the quantity and int_curr_symbol. 3 The sign string immediately precedes the int_curr_symbol. 4 The sign string immediately follows the int_curr_symbol. */ char int_p_sign_posn; char int_n_sign_posn; #else # 111 "/usr/include/locale.h" 3 4 char __int_p_cs_precedes; char __int_p_sep_by_space; char __int_n_cs_precedes; char __int_n_sep_by_space; char __int_p_sign_posn; char __int_n_sign_posn; #endif # 118 "/usr/include/locale.h" 3 4 }; /* Set and/or return the current locale. */ extern char *setlocale (int __category, const char *__locale) __THROW; /* Return the numeric/monetary information for the current locale. */ extern struct lconv *localeconv (void) __THROW; #ifdef __USE_XOPEN2K8 /* POSIX.1-2008 extends the locale interface with functions for explicit creation and manipulation of 'locale_t' objects representing locale contexts, and a set of parallel locale-sensitive text processing functions that take a locale_t argument. This enables applications to work with data from multiple locales simultaneously and thread-safely. */ #if 0 /* expanded by -frewrite-includes */ # include <bits/types/locale_t.h> #endif /* expanded by -frewrite-includes */ # 135 "/usr/include/locale.h" 3 4 # 136 "/usr/include/locale.h" 3 4 /* Return a reference to a data structure representing a set of locale datasets. Unlike for the CATEGORY parameter for `setlocale' the CATEGORY_MASK parameter here uses a single bit for each category, made by OR'ing together LC_*_MASK bits above. */ extern locale_t newlocale (int __category_mask, const char *__locale, locale_t __base) __THROW; /* These are the bits that can be set in the CATEGORY_MASK argument to `newlocale'. In the GNU implementation, LC_FOO_MASK has the value of (1 << LC_FOO), but this is not a part of the interface that callers can assume will be true. */ # define LC_CTYPE_MASK (1 << __LC_CTYPE) # define LC_NUMERIC_MASK (1 << __LC_NUMERIC) # define LC_TIME_MASK (1 << __LC_TIME) # define LC_COLLATE_MASK (1 << __LC_COLLATE) # define LC_MONETARY_MASK (1 << __LC_MONETARY) # define LC_MESSAGES_MASK (1 << __LC_MESSAGES) # define LC_PAPER_MASK (1 << __LC_PAPER) # define LC_NAME_MASK (1 << __LC_NAME) # define LC_ADDRESS_MASK (1 << __LC_ADDRESS) # define LC_TELEPHONE_MASK (1 << __LC_TELEPHONE) # define LC_MEASUREMENT_MASK (1 << __LC_MEASUREMENT) # define LC_IDENTIFICATION_MASK (1 << __LC_IDENTIFICATION) # define LC_ALL_MASK (LC_CTYPE_MASK \ | LC_NUMERIC_MASK \ | LC_TIME_MASK \ | LC_COLLATE_MASK \ | LC_MONETARY_MASK \ | LC_MESSAGES_MASK \ | LC_PAPER_MASK \ | LC_NAME_MASK \ | LC_ADDRESS_MASK \ | LC_TELEPHONE_MASK \ | LC_MEASUREMENT_MASK \ | LC_IDENTIFICATION_MASK \ ) /* Return a duplicate of the set of locale in DATASET. All usage counters are increased if necessary. */ extern locale_t duplocale (locale_t __dataset) __THROW; /* Free the data associated with a locale dataset previously returned by a call to `setlocale_r'. */ extern void freelocale (locale_t __dataset) __THROW; /* Switch the current thread's locale to DATASET. If DATASET is null, instead just return the current setting. The special value LC_GLOBAL_LOCALE is the initial setting for all threads and can also be installed any time, meaning the thread uses the global settings controlled by `setlocale'. */ extern locale_t uselocale (locale_t __dataset) __THROW; /* This value can be passed to `uselocale' and may be returned by it. Passing this value to any other function has undefined behavior. */ # define LC_GLOBAL_LOCALE ((locale_t) -1L) #endif # 194 "/usr/include/locale.h" 3 4 __END_DECLS #endif /* locale.h */ # 198 "/usr/include/locale.h" 3 4 # 43 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/clocale" 2 3 #ifndef _GLIBCXX_CLOCALE #define _GLIBCXX_CLOCALE 1 // Get rid of those macros defined in <locale.h> in lieu of real functions. #undef setlocale #undef localeconv namespace std { using ::lconv; using ::setlocale; using ::localeconv; } // namespace std #endif # 59 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/clocale" 3 # 42 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++locale.h" 2 3 #define _GLIBCXX_C_LOCALE_GNU 1 #define _GLIBCXX_NUM_CATEGORIES 6 #if 0 /* disabled by -frewrite-includes */ #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 48 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++locale.h" 3 namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION extern "C" __typeof(uselocale) __uselocale; _GLIBCXX_END_NAMESPACE_VERSION } // namespace #endif # 57 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++locale.h" 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef __locale_t __c_locale; // Convert numeric value of type double and long double to string and // return length of string. If vsnprintf is available use it, otherwise // fall back to the unsafe vsprintf which, in general, can be dangerous // and should be avoided. inline int __convert_from_v(const __c_locale& __cloc __attribute__ ((__unused__)), char* __out, const int __size __attribute__ ((__unused__)), const char* __fmt, ...) { #if 0 /* disabled by -frewrite-includes */ #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 75 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++locale.h" 3 __c_locale __old = __gnu_cxx::__uselocale(__cloc); #else # 77 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++locale.h" 3 char* __old = std::setlocale(LC_NUMERIC, 0); char* __sav = 0; if (__builtin_strcmp(__old, "C")) { const size_t __len = __builtin_strlen(__old) + 1; __sav = new char[__len]; __builtin_memcpy(__sav, __old, __len); std::setlocale(LC_NUMERIC, "C"); } #endif # 87 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++locale.h" 3 __builtin_va_list __args; __builtin_va_start(__args, __fmt); #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_USE_C99_STDIO #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 92 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++locale.h" 3 const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args); #else # 94 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++locale.h" 3 const int __ret = __builtin_vsprintf(__out, __fmt, __args); #endif # 96 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++locale.h" 3 __builtin_va_end(__args); #if 0 /* disabled by -frewrite-includes */ #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 100 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++locale.h" 3 __gnu_cxx::__uselocale(__old); #else # 102 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++locale.h" 3 if (__sav) { std::setlocale(LC_NUMERIC, __sav); delete [] __sav; } #endif # 108 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++locale.h" 3 return __ret; } _GLIBCXX_END_NAMESPACE_VERSION } // namespace #endif # 115 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/c++locale.h" 3 # 41 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/localefwd.h" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <iosfwd> // For ostreambuf_iterator, istreambuf_iterator #endif /* expanded by -frewrite-includes */ # 41 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/localefwd.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/iosfwd" 1 3 // <iosfwd> Forward declarations -*- C++ -*- // Copyright (C) 1997-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file include/iosfwd * This is a Standard C++ Library header. */ // // ISO C++ 14882: 27.2 Forward declarations // #ifndef _GLIBCXX_IOSFWD #define _GLIBCXX_IOSFWD 1 #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 37 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/iosfwd" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/c++config.h> #endif /* expanded by -frewrite-includes */ # 38 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/iosfwd" 3 # 39 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/iosfwd" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/stringfwd.h> // For string forward declarations. #endif /* expanded by -frewrite-includes */ # 39 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/iosfwd" 3 # 40 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/iosfwd" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/postypes.h> #endif /* expanded by -frewrite-includes */ # 40 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/iosfwd" 3 # 41 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/iosfwd" 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @defgroup io I/O * * Nearly all of the I/O classes are parameterized on the type of * characters they read and write. (The major exception is ios_base at * the top of the hierarchy.) This is a change from pre-Standard * streams, which were not templates. * * For ease of use and compatibility, all of the basic_* I/O-related * classes are given typedef names for both of the builtin character * widths (wide and narrow). The typedefs are the same as the * pre-Standard names, for example: * * @code * typedef basic_ifstream<char> ifstream; * @endcode * * Because properly forward-declaring these classes can be difficult, you * should not do it yourself. Instead, include the <iosfwd> * header, which contains only declarations of all the I/O classes as * well as the typedefs. Trying to forward-declare the typedefs * themselves (e.g., <code>class ostream;</code>) is not valid ISO C++. * * For more specific declarations, see * https://gcc.gnu.org/onlinedocs/libstdc++/manual/io.html#std.io.objects * * @{ */ class ios_base; template<typename _CharT, typename _Traits = char_traits<_CharT> > class basic_ios; template<typename _CharT, typename _Traits = char_traits<_CharT> > class basic_streambuf; template<typename _CharT, typename _Traits = char_traits<_CharT> > class basic_istream; template<typename _CharT, typename _Traits = char_traits<_CharT> > class basic_ostream; template<typename _CharT, typename _Traits = char_traits<_CharT> > class basic_iostream; _GLIBCXX_BEGIN_NAMESPACE_CXX11 template<typename _CharT, typename _Traits = char_traits<_CharT>, typename _Alloc = allocator<_CharT> > class basic_stringbuf; template<typename _CharT, typename _Traits = char_traits<_CharT>, typename _Alloc = allocator<_CharT> > class basic_istringstream; template<typename _CharT, typename _Traits = char_traits<_CharT>, typename _Alloc = allocator<_CharT> > class basic_ostringstream; template<typename _CharT, typename _Traits = char_traits<_CharT>, typename _Alloc = allocator<_CharT> > class basic_stringstream; _GLIBCXX_END_NAMESPACE_CXX11 template<typename _CharT, typename _Traits = char_traits<_CharT> > class basic_filebuf; template<typename _CharT, typename _Traits = char_traits<_CharT> > class basic_ifstream; template<typename _CharT, typename _Traits = char_traits<_CharT> > class basic_ofstream; template<typename _CharT, typename _Traits = char_traits<_CharT> > class basic_fstream; template<typename _CharT, typename _Traits = char_traits<_CharT> > class istreambuf_iterator; template<typename _CharT, typename _Traits = char_traits<_CharT> > class ostreambuf_iterator; /// Base class for @c char streams. typedef basic_ios<char> ios; /// Base class for @c char buffers. typedef basic_streambuf<char> streambuf; /// Base class for @c char input streams. typedef basic_istream<char> istream; /// Base class for @c char output streams. typedef basic_ostream<char> ostream; /// Base class for @c char mixed input and output streams. typedef basic_iostream<char> iostream; /// Class for @c char memory buffers. typedef basic_stringbuf<char> stringbuf; /// Class for @c char input memory streams. typedef basic_istringstream<char> istringstream; /// Class for @c char output memory streams. typedef basic_ostringstream<char> ostringstream; /// Class for @c char mixed input and output memory streams. typedef basic_stringstream<char> stringstream; /// Class for @c char file buffers. typedef basic_filebuf<char> filebuf; /// Class for @c char input file streams. typedef basic_ifstream<char> ifstream; /// Class for @c char output file streams. typedef basic_ofstream<char> ofstream; /// Class for @c char mixed input and output file streams. typedef basic_fstream<char> fstream; #ifdef _GLIBCXX_USE_WCHAR_T /// Base class for @c wchar_t streams. typedef basic_ios<wchar_t> wios; /// Base class for @c wchar_t buffers. typedef basic_streambuf<wchar_t> wstreambuf; /// Base class for @c wchar_t input streams. typedef basic_istream<wchar_t> wistream; /// Base class for @c wchar_t output streams. typedef basic_ostream<wchar_t> wostream; /// Base class for @c wchar_t mixed input and output streams. typedef basic_iostream<wchar_t> wiostream; /// Class for @c wchar_t memory buffers. typedef basic_stringbuf<wchar_t> wstringbuf; /// Class for @c wchar_t input memory streams. typedef basic_istringstream<wchar_t> wistringstream; /// Class for @c wchar_t output memory streams. typedef basic_ostringstream<wchar_t> wostringstream; /// Class for @c wchar_t mixed input and output memory streams. typedef basic_stringstream<wchar_t> wstringstream; /// Class for @c wchar_t file buffers. typedef basic_filebuf<wchar_t> wfilebuf; /// Class for @c wchar_t input file streams. typedef basic_ifstream<wchar_t> wifstream; /// Class for @c wchar_t output file streams. typedef basic_ofstream<wchar_t> wofstream; /// Class for @c wchar_t mixed input and output file streams. typedef basic_fstream<wchar_t> wfstream; #endif # 210 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/iosfwd" 3 /** @} */ _GLIBCXX_END_NAMESPACE_VERSION } // namespace #endif /* _GLIBCXX_IOSFWD */ # 216 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/iosfwd" 3 # 42 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/localefwd.h" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <cctype> #endif /* expanded by -frewrite-includes */ # 42 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/localefwd.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cctype" 1 3 // -*- C++ -*- forwarding header. // Copyright (C) 1997-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file include/cctype * This is a Standard C++ Library file. You should @c \#include this file * in your programs, rather than any of the @a *.h implementation files. * * This is the C++ version of the Standard C Library header @c ctype.h, * and its contents are (mostly) the same as that header, but are all * contained in the namespace @c std (except for names which are defined * as macros in C). */ // // ISO C++ 14882: <ccytpe> // #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 40 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cctype" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/c++config.h> #endif /* expanded by -frewrite-includes */ # 41 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cctype" 3 # 42 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cctype" 3 #if 0 /* expanded by -frewrite-includes */ #include <ctype.h> #endif /* expanded by -frewrite-includes */ # 42 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cctype" 3 # 1 "/usr/include/ctype.h" 1 3 4 /* Copyright (C) 1991-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ /* * ISO C99 Standard 7.4: Character handling <ctype.h> */ #ifndef _CTYPE_H #define _CTYPE_H 1 #if 0 /* expanded by -frewrite-includes */ #include <features.h> #endif /* expanded by -frewrite-includes */ # 25 "/usr/include/ctype.h" 3 4 # 26 "/usr/include/ctype.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <bits/types.h> #endif /* expanded by -frewrite-includes */ # 26 "/usr/include/ctype.h" 3 4 # 27 "/usr/include/ctype.h" 3 4 __BEGIN_DECLS #ifndef _ISbit /* These are all the characteristics of characters. If there get to be more than 16 distinct characteristics, many things must be changed that use `unsigned short int's. The characteristics are stored always in network byte order (big endian). We define the bit value interpretations here dependent on the machine's byte order. */ #if 0 /* expanded by -frewrite-includes */ # include <bits/endian.h> #endif /* expanded by -frewrite-includes */ # 39 "/usr/include/ctype.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/endian.h" 1 3 4 /* Endian macros for string.h functions Copyright (C) 1992-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #ifndef _BITS_ENDIAN_H #define _BITS_ENDIAN_H 1 /* Definitions for byte order, according to significance of bytes, from low addresses to high addresses. The value is what you get by putting '4' in the most significant byte, '3' in the second most significant byte, '2' in the second least significant byte, and '1' in the least significant byte, and then writing down one digit for each byte, starting with the byte at the lowest address at the left, and proceeding to the byte with the highest address at the right. */ #define __LITTLE_ENDIAN 1234 #define __BIG_ENDIAN 4321 #define __PDP_ENDIAN 3412 /* This file defines `__BYTE_ORDER' for the particular machine. */ #if 0 /* expanded by -frewrite-includes */ #include <bits/endianness.h> #endif /* expanded by -frewrite-includes */ # 35 "/usr/include/x86_64-linux-gnu/bits/endian.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/endianness.h" 1 3 4 #ifndef _BITS_ENDIANNESS_H #define _BITS_ENDIANNESS_H 1 #ifndef _BITS_ENDIAN_H # error "Never use <bits/endianness.h> directly; include <endian.h> instead." #endif # 7 "/usr/include/x86_64-linux-gnu/bits/endianness.h" 3 4 /* i386/x86_64 are little-endian. */ #define __BYTE_ORDER __LITTLE_ENDIAN #endif /* bits/endianness.h */ # 12 "/usr/include/x86_64-linux-gnu/bits/endianness.h" 3 4 # 36 "/usr/include/x86_64-linux-gnu/bits/endian.h" 2 3 4 /* Some machines may need to use a different endianness for floating point values. */ #ifndef __FLOAT_WORD_ORDER # define __FLOAT_WORD_ORDER __BYTE_ORDER #endif # 42 "/usr/include/x86_64-linux-gnu/bits/endian.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __BYTE_ORDER == __LITTLE_ENDIAN #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 44 "/usr/include/x86_64-linux-gnu/bits/endian.h" 3 4 # define __LONG_LONG_PAIR(HI, LO) LO, HI #if 0 /* disabled by -frewrite-includes */ #if 0 #elif __BYTE_ORDER == __BIG_ENDIAN #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 46 "/usr/include/x86_64-linux-gnu/bits/endian.h" 3 4 # define __LONG_LONG_PAIR(HI, LO) HI, LO #endif # 48 "/usr/include/x86_64-linux-gnu/bits/endian.h" 3 4 #endif /* bits/endian.h */ # 50 "/usr/include/x86_64-linux-gnu/bits/endian.h" 3 4 # 40 "/usr/include/ctype.h" 2 3 4 #if 0 /* disabled by -frewrite-includes */ # if __BYTE_ORDER == __BIG_ENDIAN #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 41 "/usr/include/ctype.h" 3 4 # define _ISbit(bit) (1 << (bit)) # else /* __BYTE_ORDER == __LITTLE_ENDIAN */ # 43 "/usr/include/ctype.h" 3 4 # define _ISbit(bit) ((bit) < 8 ? ((1 << (bit)) << 8) : ((1 << (bit)) >> 8)) # endif # 45 "/usr/include/ctype.h" 3 4 enum { _ISupper = _ISbit (0), /* UPPERCASE. */ _ISlower = _ISbit (1), /* lowercase. */ _ISalpha = _ISbit (2), /* Alphabetic. */ _ISdigit = _ISbit (3), /* Numeric. */ _ISxdigit = _ISbit (4), /* Hexadecimal numeric. */ _ISspace = _ISbit (5), /* Whitespace. */ _ISprint = _ISbit (6), /* Printing. */ _ISgraph = _ISbit (7), /* Graphical. */ _ISblank = _ISbit (8), /* Blank (usually SPC and TAB). */ _IScntrl = _ISbit (9), /* Control character. */ _ISpunct = _ISbit (10), /* Punctuation. */ _ISalnum = _ISbit (11) /* Alphanumeric. */ }; #endif /* ! _ISbit */ # 62 "/usr/include/ctype.h" 3 4 /* These are defined in ctype-info.c. The declarations here must match those in localeinfo.h. In the thread-specific locale model (see `uselocale' in <locale.h>) we cannot use global variables for these as was done in the past. Instead, the following accessor functions return the address of each variable, which is local to the current thread if multithreaded. These point into arrays of 384, so they can be indexed by any `unsigned char' value [0,255]; by EOF (-1); or by any `signed char' value [-128,-1). ISO C requires that the ctype functions work for `unsigned char' values and for EOF; we also support negative `signed char' values for broken old programs. The case conversion arrays are of `int's rather than `unsigned char's because tolower (EOF) must be EOF, which doesn't fit into an `unsigned char'. But today more important is that the arrays are also used for multi-byte character sets. */ extern const unsigned short int **__ctype_b_loc (void) __THROW __attribute__ ((__const__)); extern const __int32_t **__ctype_tolower_loc (void) __THROW __attribute__ ((__const__)); extern const __int32_t **__ctype_toupper_loc (void) __THROW __attribute__ ((__const__)); #ifndef __cplusplus # define __isctype(c, type) \ ((*__ctype_b_loc ())[(int) (c)] & (unsigned short int) type) #if 0 /* disabled by -frewrite-includes */ #if 0 #elif defined __USE_EXTERN_INLINES #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 91 "/usr/include/ctype.h" 3 4 # define __isctype_f(type) \ __extern_inline int \ is##type (int __c) __THROW \ { \ return (*__ctype_b_loc ())[(int) (__c)] & (unsigned short int) _IS##type; \ } #endif # 98 "/usr/include/ctype.h" 3 4 #define __isascii(c) (((c) & ~0x7f) == 0) /* If C is a 7 bit value. */ #define __toascii(c) ((c) & 0x7f) /* Mask off high bits. */ #define __exctype(name) extern int name (int) __THROW /* The following names are all functions: int isCHARACTERISTIC(int c); which return nonzero iff C has CHARACTERISTIC. For the meaning of the characteristic names, see the `enum' above. */ __exctype (isalnum); __exctype (isalpha); __exctype (iscntrl); __exctype (isdigit); __exctype (islower); __exctype (isgraph); __exctype (isprint); __exctype (ispunct); __exctype (isspace); __exctype (isupper); __exctype (isxdigit); /* Return the lowercase version of C. */ extern int tolower (int __c) __THROW; /* Return the uppercase version of C. */ extern int toupper (int __c) __THROW; /* ISO C99 introduced one new function. */ #ifdef __USE_ISOC99 __exctype (isblank); #endif # 132 "/usr/include/ctype.h" 3 4 #ifdef __USE_GNU /* Test C for a set of character classes according to MASK. */ extern int isctype (int __c, int __mask) __THROW; #endif # 137 "/usr/include/ctype.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_MISC || defined __USE_XOPEN #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 139 "/usr/include/ctype.h" 3 4 /* Return nonzero iff C is in the ASCII set (i.e., is no more than 7 bits wide). */ extern int isascii (int __c) __THROW; /* Return the part of C that is in the ASCII set (i.e., the low-order 7 bits of C). */ extern int toascii (int __c) __THROW; /* These are the same as `toupper' and `tolower' except that they do not check the argument for being in the range of a `char'. */ __exctype (_toupper); __exctype (_tolower); #endif /* Use X/Open or use misc. */ # 153 "/usr/include/ctype.h" 3 4 /* This code is needed for the optimized mapping functions. */ #define __tobody(c, f, a, args) \ (__extension__ \ ({ int __res; \ if (sizeof (c) > 1) \ { \ if (__builtin_constant_p (c)) \ { \ int __c = (c); \ __res = __c < -128 || __c > 255 ? __c : (a)[__c]; \ } \ else \ __res = f args; \ } \ else \ __res = (a)[(int) (c)]; \ __res; })) #if 0 /* disabled by -frewrite-includes */ #if !defined __NO_CTYPE #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 173 "/usr/include/ctype.h" 3 4 # ifdef __isctype_f __isctype_f (alnum) __isctype_f (alpha) __isctype_f (cntrl) __isctype_f (digit) __isctype_f (lower) __isctype_f (graph) __isctype_f (print) __isctype_f (punct) __isctype_f (space) __isctype_f (upper) __isctype_f (xdigit) # ifdef __USE_ISOC99 __isctype_f (blank) # endif # 188 "/usr/include/ctype.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if 0 # elif defined __isctype #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 189 "/usr/include/ctype.h" 3 4 # define isalnum(c) __isctype((c), _ISalnum) # define isalpha(c) __isctype((c), _ISalpha) # define iscntrl(c) __isctype((c), _IScntrl) # define isdigit(c) __isctype((c), _ISdigit) # define islower(c) __isctype((c), _ISlower) # define isgraph(c) __isctype((c), _ISgraph) # define isprint(c) __isctype((c), _ISprint) # define ispunct(c) __isctype((c), _ISpunct) # define isspace(c) __isctype((c), _ISspace) # define isupper(c) __isctype((c), _ISupper) # define isxdigit(c) __isctype((c), _ISxdigit) # ifdef __USE_ISOC99 # define isblank(c) __isctype((c), _ISblank) # endif # 203 "/usr/include/ctype.h" 3 4 # endif # 204 "/usr/include/ctype.h" 3 4 # ifdef __USE_EXTERN_INLINES __extern_inline int __NTH (tolower (int __c)) { return __c >= -128 && __c < 256 ? (*__ctype_tolower_loc ())[__c] : __c; } __extern_inline int __NTH (toupper (int __c)) { return __c >= -128 && __c < 256 ? (*__ctype_toupper_loc ())[__c] : __c; } # endif # 218 "/usr/include/ctype.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __GNUC__ >= 2 && defined __OPTIMIZE__ && !defined __cplusplus #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 220 "/usr/include/ctype.h" 3 4 # define tolower(c) __tobody (c, tolower, *__ctype_tolower_loc (), (c)) # define toupper(c) __tobody (c, toupper, *__ctype_toupper_loc (), (c)) # endif /* Optimizing gcc */ # 223 "/usr/include/ctype.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if defined __USE_MISC || defined __USE_XOPEN #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 225 "/usr/include/ctype.h" 3 4 # define isascii(c) __isascii (c) # define toascii(c) __toascii (c) # define _tolower(c) ((int) (*__ctype_tolower_loc ())[(int) (c)]) # define _toupper(c) ((int) (*__ctype_toupper_loc ())[(int) (c)]) # endif # 231 "/usr/include/ctype.h" 3 4 #endif /* Not __NO_CTYPE. */ # 233 "/usr/include/ctype.h" 3 4 #ifdef __USE_XOPEN2K8 /* POSIX.1-2008 extended locale interface (see locale.h). */ #if 0 /* expanded by -frewrite-includes */ # include <bits/types/locale_t.h> #endif /* expanded by -frewrite-includes */ # 237 "/usr/include/ctype.h" 3 4 # 238 "/usr/include/ctype.h" 3 4 /* These definitions are similar to the ones above but all functions take as an argument a handle for the locale which shall be used. */ # define __isctype_l(c, type, locale) \ ((locale)->__ctype_b[(int) (c)] & (unsigned short int) type) # define __exctype_l(name) \ extern int name (int, locale_t) __THROW /* The following names are all functions: int isCHARACTERISTIC(int c, locale_t *locale); which return nonzero iff C has CHARACTERISTIC. For the meaning of the characteristic names, see the `enum' above. */ __exctype_l (isalnum_l); __exctype_l (isalpha_l); __exctype_l (iscntrl_l); __exctype_l (isdigit_l); __exctype_l (islower_l); __exctype_l (isgraph_l); __exctype_l (isprint_l); __exctype_l (ispunct_l); __exctype_l (isspace_l); __exctype_l (isupper_l); __exctype_l (isxdigit_l); __exctype_l (isblank_l); /* Return the lowercase version of C in locale L. */ extern int __tolower_l (int __c, locale_t __l) __THROW; extern int tolower_l (int __c, locale_t __l) __THROW; /* Return the uppercase version of C. */ extern int __toupper_l (int __c, locale_t __l) __THROW; extern int toupper_l (int __c, locale_t __l) __THROW; #if 0 /* disabled by -frewrite-includes */ # if __GNUC__ >= 2 && defined __OPTIMIZE__ && !defined __cplusplus #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 275 "/usr/include/ctype.h" 3 4 # define __tolower_l(c, locale) \ __tobody (c, __tolower_l, (locale)->__ctype_tolower, (c, locale)) # define __toupper_l(c, locale) \ __tobody (c, __toupper_l, (locale)->__ctype_toupper, (c, locale)) # define tolower_l(c, locale) __tolower_l ((c), (locale)) # define toupper_l(c, locale) __toupper_l ((c), (locale)) # endif /* Optimizing gcc */ # 282 "/usr/include/ctype.h" 3 4 # ifndef __NO_CTYPE # define __isalnum_l(c,l) __isctype_l((c), _ISalnum, (l)) # define __isalpha_l(c,l) __isctype_l((c), _ISalpha, (l)) # define __iscntrl_l(c,l) __isctype_l((c), _IScntrl, (l)) # define __isdigit_l(c,l) __isctype_l((c), _ISdigit, (l)) # define __islower_l(c,l) __isctype_l((c), _ISlower, (l)) # define __isgraph_l(c,l) __isctype_l((c), _ISgraph, (l)) # define __isprint_l(c,l) __isctype_l((c), _ISprint, (l)) # define __ispunct_l(c,l) __isctype_l((c), _ISpunct, (l)) # define __isspace_l(c,l) __isctype_l((c), _ISspace, (l)) # define __isupper_l(c,l) __isctype_l((c), _ISupper, (l)) # define __isxdigit_l(c,l) __isctype_l((c), _ISxdigit, (l)) # define __isblank_l(c,l) __isctype_l((c), _ISblank, (l)) # ifdef __USE_MISC # define __isascii_l(c,l) ((l), __isascii (c)) # define __toascii_l(c,l) ((l), __toascii (c)) # endif # 303 "/usr/include/ctype.h" 3 4 # define isalnum_l(c,l) __isalnum_l ((c), (l)) # define isalpha_l(c,l) __isalpha_l ((c), (l)) # define iscntrl_l(c,l) __iscntrl_l ((c), (l)) # define isdigit_l(c,l) __isdigit_l ((c), (l)) # define islower_l(c,l) __islower_l ((c), (l)) # define isgraph_l(c,l) __isgraph_l ((c), (l)) # define isprint_l(c,l) __isprint_l ((c), (l)) # define ispunct_l(c,l) __ispunct_l ((c), (l)) # define isspace_l(c,l) __isspace_l ((c), (l)) # define isupper_l(c,l) __isupper_l ((c), (l)) # define isxdigit_l(c,l) __isxdigit_l ((c), (l)) # define isblank_l(c,l) __isblank_l ((c), (l)) # ifdef __USE_MISC # define isascii_l(c,l) __isascii_l ((c), (l)) # define toascii_l(c,l) __toascii_l ((c), (l)) # endif # 322 "/usr/include/ctype.h" 3 4 # endif /* Not __NO_CTYPE. */ # 324 "/usr/include/ctype.h" 3 4 #endif /* Use POSIX 2008. */ # 326 "/usr/include/ctype.h" 3 4 __END_DECLS #endif /* ctype.h */ # 330 "/usr/include/ctype.h" 3 4 # 43 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cctype" 2 3 #ifndef _GLIBCXX_CCTYPE #define _GLIBCXX_CCTYPE 1 // Get rid of those macros defined in <ctype.h> in lieu of real functions. #undef isalnum #undef isalpha #undef iscntrl #undef isdigit #undef isgraph #undef islower #undef isprint #undef ispunct #undef isspace #undef isupper #undef isxdigit #undef tolower #undef toupper namespace std { using ::isalnum; using ::isalpha; using ::iscntrl; using ::isdigit; using ::isgraph; using ::islower; using ::isprint; using ::ispunct; using ::isspace; using ::isupper; using ::isxdigit; using ::tolower; using ::toupper; } // namespace std #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 80 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cctype" 3 #ifdef _GLIBCXX_USE_C99_CTYPE_TR1 #undef isblank namespace std { using ::isblank; } // namespace std #endif // _GLIBCXX_USE_C99_CTYPE_TR1 # 91 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cctype" 3 #endif // C++11 # 93 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cctype" 3 #endif # 95 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cctype" 3 # 43 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/localefwd.h" 2 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @defgroup locales Locales * * Classes and functions for internationalization and localization. */ // 22.1.1 Locale class locale; template<typename _Facet> bool has_facet(const locale&) throw(); template<typename _Facet> const _Facet& use_facet(const locale&); // 22.1.3 Convenience interfaces template<typename _CharT> bool isspace(_CharT, const locale&); template<typename _CharT> bool isprint(_CharT, const locale&); template<typename _CharT> bool iscntrl(_CharT, const locale&); template<typename _CharT> bool isupper(_CharT, const locale&); template<typename _CharT> bool islower(_CharT, const locale&); template<typename _CharT> bool isalpha(_CharT, const locale&); template<typename _CharT> bool isdigit(_CharT, const locale&); template<typename _CharT> bool ispunct(_CharT, const locale&); template<typename _CharT> bool isxdigit(_CharT, const locale&); template<typename _CharT> bool isalnum(_CharT, const locale&); template<typename _CharT> bool isgraph(_CharT, const locale&); #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 111 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/localefwd.h" 3 template<typename _CharT> bool isblank(_CharT, const locale&); #endif # 115 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/localefwd.h" 3 template<typename _CharT> _CharT toupper(_CharT, const locale&); template<typename _CharT> _CharT tolower(_CharT, const locale&); // 22.2.1 and 22.2.1.3 ctype class ctype_base; template<typename _CharT> class ctype; template<> class ctype<char>; #ifdef _GLIBCXX_USE_WCHAR_T template<> class ctype<wchar_t>; #endif # 132 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/localefwd.h" 3 template<typename _CharT> class ctype_byname; // NB: Specialized for char and wchar_t in locale_facets.h. class codecvt_base; template<typename _InternT, typename _ExternT, typename _StateT> class codecvt; template<> class codecvt<char, char, mbstate_t>; #ifdef _GLIBCXX_USE_WCHAR_T template<> class codecvt<wchar_t, char, mbstate_t>; #endif # 143 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/localefwd.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 144 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/localefwd.h" 3 template<> class codecvt<char16_t, char, mbstate_t>; template<> class codecvt<char32_t, char, mbstate_t>; #ifdef _GLIBCXX_USE_CHAR8_T template<> class codecvt<char16_t, char8_t, mbstate_t>; template<> class codecvt<char32_t, char8_t, mbstate_t>; #endif # 150 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/localefwd.h" 3 #endif # 151 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/localefwd.h" 3 template<typename _InternT, typename _ExternT, typename _StateT> class codecvt_byname; // 22.2.2 and 22.2.3 numeric _GLIBCXX_BEGIN_NAMESPACE_LDBL template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> > class num_get; template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> > class num_put; _GLIBCXX_END_NAMESPACE_LDBL _GLIBCXX_BEGIN_NAMESPACE_CXX11 template<typename _CharT> class numpunct; template<typename _CharT> class numpunct_byname; _GLIBCXX_END_NAMESPACE_CXX11 _GLIBCXX_BEGIN_NAMESPACE_CXX11 // 22.2.4 collation template<typename _CharT> class collate; template<typename _CharT> class collate_byname; _GLIBCXX_END_NAMESPACE_CXX11 // 22.2.5 date and time class time_base; _GLIBCXX_BEGIN_NAMESPACE_CXX11 template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> > class time_get; template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> > class time_get_byname; _GLIBCXX_END_NAMESPACE_CXX11 template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> > class time_put; template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> > class time_put_byname; // 22.2.6 money class money_base; _GLIBCXX_BEGIN_NAMESPACE_LDBL_OR_CXX11 template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> > class money_get; template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> > class money_put; _GLIBCXX_END_NAMESPACE_LDBL_OR_CXX11 _GLIBCXX_BEGIN_NAMESPACE_CXX11 template<typename _CharT, bool _Intl = false> class moneypunct; template<typename _CharT, bool _Intl = false> class moneypunct_byname; _GLIBCXX_END_NAMESPACE_CXX11 // 22.2.7 message retrieval class messages_base; _GLIBCXX_BEGIN_NAMESPACE_CXX11 template<typename _CharT> class messages; template<typename _CharT> class messages_byname; _GLIBCXX_END_NAMESPACE_CXX11 _GLIBCXX_END_NAMESPACE_VERSION } // namespace std #endif # 215 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/localefwd.h" 3 # 44 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/string" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/ostream_insert.h> #endif /* expanded by -frewrite-includes */ # 44 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/string" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/ostream_insert.h" 1 3 // Helpers for ostream inserters -*- C++ -*- // Copyright (C) 2007-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file bits/ostream_insert.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{ostream} */ #ifndef _OSTREAM_INSERT_H #define _OSTREAM_INSERT_H 1 #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 34 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/ostream_insert.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <iosfwd> #endif /* expanded by -frewrite-includes */ # 35 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/ostream_insert.h" 3 # 36 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/ostream_insert.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/cxxabi_forced.h> #endif /* expanded by -frewrite-includes */ # 36 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/ostream_insert.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/cxxabi_forced.h" 1 3 // cxxabi.h subset for cancellation -*- C++ -*- // Copyright (C) 2007-2019 Free Software Foundation, Inc. // // This file is part of GCC. // // GCC is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3, or (at your option) // any later version. // // GCC is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file bits/cxxabi_forced.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{cxxabi.h} */ #ifndef _CXXABI_FORCED_H #define _CXXABI_FORCED_H 1 #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 35 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/cxxabi_forced.h" 3 #pragma GCC visibility push(default) #ifdef __cplusplus namespace __cxxabiv1 { /** * @brief Thrown as part of forced unwinding. * @ingroup exceptions * * A magic placeholder class that can be caught by reference to * recognize forced unwinding. */ class __forced_unwind { virtual ~__forced_unwind() throw(); // Prevent catch by value. virtual void __pure_dummy() = 0; }; } #endif // __cplusplus # 57 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/cxxabi_forced.h" 3 #pragma GCC visibility pop #endif // __CXXABI_FORCED_H # 61 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/cxxabi_forced.h" 3 # 37 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/ostream_insert.h" 2 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION template<typename _CharT, typename _Traits> inline void __ostream_write(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s, streamsize __n) { typedef basic_ostream<_CharT, _Traits> __ostream_type; typedef typename __ostream_type::ios_base __ios_base; const streamsize __put = __out.rdbuf()->sputn(__s, __n); if (__put != __n) __out.setstate(__ios_base::badbit); } template<typename _CharT, typename _Traits> inline void __ostream_fill(basic_ostream<_CharT, _Traits>& __out, streamsize __n) { typedef basic_ostream<_CharT, _Traits> __ostream_type; typedef typename __ostream_type::ios_base __ios_base; const _CharT __c = __out.fill(); for (; __n > 0; --__n) { const typename _Traits::int_type __put = __out.rdbuf()->sputc(__c); if (_Traits::eq_int_type(__put, _Traits::eof())) { __out.setstate(__ios_base::badbit); break; } } } template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& __ostream_insert(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s, streamsize __n) { typedef basic_ostream<_CharT, _Traits> __ostream_type; typedef typename __ostream_type::ios_base __ios_base; typename __ostream_type::sentry __cerb(__out); if (__cerb) { __try { const streamsize __w = __out.width(); if (__w > __n) { const bool __left = ((__out.flags() & __ios_base::adjustfield) == __ios_base::left); if (!__left) __ostream_fill(__out, __w - __n); if (__out.good()) __ostream_write(__out, __s, __n); if (__left && __out.good()) __ostream_fill(__out, __w - __n); } else __ostream_write(__out, __s, __n); __out.width(0); } __catch(__cxxabiv1::__forced_unwind&) { __out._M_setstate(__ios_base::badbit); __throw_exception_again; } __catch(...) { __out._M_setstate(__ios_base::badbit); } } return __out; } // Inhibit implicit instantiations for required instantiations, // which are defined via explicit instantiations elsewhere. #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_EXTERN_TEMPLATE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 118 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/ostream_insert.h" 3 extern template ostream& __ostream_insert(ostream&, const char*, streamsize); #ifdef _GLIBCXX_USE_WCHAR_T extern template wostream& __ostream_insert(wostream&, const wchar_t*, streamsize); #endif # 124 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/ostream_insert.h" 3 #endif # 125 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/ostream_insert.h" 3 _GLIBCXX_END_NAMESPACE_VERSION } // namespace std #endif /* _OSTREAM_INSERT_H */ # 130 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/ostream_insert.h" 3 # 45 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/string" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/stl_iterator_base_types.h> #endif /* expanded by -frewrite-includes */ # 45 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/string" 3 # 46 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/string" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/stl_iterator_base_funcs.h> #endif /* expanded by -frewrite-includes */ # 46 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/string" 3 # 47 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/string" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/stl_iterator.h> #endif /* expanded by -frewrite-includes */ # 47 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/string" 3 # 48 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/string" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/stl_function.h> // For less #endif /* expanded by -frewrite-includes */ # 48 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/string" 3 # 49 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/string" 3 #if 0 /* expanded by -frewrite-includes */ #include <ext/numeric_traits.h> #endif /* expanded by -frewrite-includes */ # 49 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/string" 3 # 50 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/string" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/stl_algobase.h> #endif /* expanded by -frewrite-includes */ # 50 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/string" 3 # 51 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/string" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 52 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/string" 3 #if 0 /* expanded by -frewrite-includes */ # include <bits/stl_algo.h> // For remove and remove_if #endif /* expanded by -frewrite-includes */ # 52 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/string" 3 # 53 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/string" 3 #endif // C++20 # 54 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/string" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/range_access.h> #endif /* expanded by -frewrite-includes */ # 54 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/string" 3 # 55 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/string" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/basic_string.h> #endif /* expanded by -frewrite-includes */ # 55 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/string" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 1 3 // Components for manipulating sequences of characters -*- C++ -*- // Copyright (C) 1997-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file bits/basic_string.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{string} */ // // ISO C++ 14882: 21 Strings library // #ifndef _BASIC_STRING_H #define _BASIC_STRING_H 1 #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 38 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <ext/atomicity.h> #endif /* expanded by -frewrite-includes */ # 39 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/atomicity.h" 1 3 // Support for atomic operations -*- C++ -*- // Copyright (C) 2004-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file ext/atomicity.h * This file is a GNU extension to the Standard C++ Library. */ #ifndef _GLIBCXX_ATOMICITY_H #define _GLIBCXX_ATOMICITY_H 1 #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 33 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/atomicity.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/c++config.h> #endif /* expanded by -frewrite-includes */ # 34 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/atomicity.h" 3 # 35 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/atomicity.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/gthr.h> #endif /* expanded by -frewrite-includes */ # 35 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/atomicity.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr.h" 1 3 /* Threads compatibility routines for libgcc2. */ /* Compile this one with gcc. */ /* Copyright (C) 1997-2019 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation. You should have received a copy of the GNU General Public License and a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #ifndef _GLIBCXX_GCC_GTHR_H #define _GLIBCXX_GCC_GTHR_H #ifndef _GLIBCXX_HIDE_EXPORTS #pragma GCC visibility push(default) #endif # 32 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr.h" 3 /* If this file is compiled with threads support, it must #define __GTHREADS 1 to indicate that threads support is present. Also it has define function int __gthread_active_p () that returns 1 if thread system is active, 0 if not. The threads interface must define the following types: __gthread_key_t __gthread_once_t __gthread_mutex_t __gthread_recursive_mutex_t The threads interface must define the following macros: __GTHREAD_ONCE_INIT to initialize __gthread_once_t __GTHREAD_MUTEX_INIT to initialize __gthread_mutex_t to get a fast non-recursive mutex. __GTHREAD_MUTEX_INIT_FUNCTION to initialize __gthread_mutex_t to get a fast non-recursive mutex. Define this to a function which looks like this: void __GTHREAD_MUTEX_INIT_FUNCTION (__gthread_mutex_t *) Some systems can't initialize a mutex without a function call. Don't define __GTHREAD_MUTEX_INIT in this case. __GTHREAD_RECURSIVE_MUTEX_INIT __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION as above, but for a recursive mutex. The threads interface must define the following static functions: int __gthread_once (__gthread_once_t *once, void (*func) ()) int __gthread_key_create (__gthread_key_t *keyp, void (*dtor) (void *)) int __gthread_key_delete (__gthread_key_t key) void *__gthread_getspecific (__gthread_key_t key) int __gthread_setspecific (__gthread_key_t key, const void *ptr) int __gthread_mutex_destroy (__gthread_mutex_t *mutex); int __gthread_recursive_mutex_destroy (__gthread_recursive_mutex_t *mutex); int __gthread_mutex_lock (__gthread_mutex_t *mutex); int __gthread_mutex_trylock (__gthread_mutex_t *mutex); int __gthread_mutex_unlock (__gthread_mutex_t *mutex); int __gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *mutex); int __gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *mutex); int __gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *mutex); The following are supported in POSIX threads only. They are required to fix a deadlock in static initialization inside libsupc++. The header file gthr-posix.h defines a symbol __GTHREAD_HAS_COND to signify that these extra features are supported. Types: __gthread_cond_t Macros: __GTHREAD_COND_INIT __GTHREAD_COND_INIT_FUNCTION Interface: int __gthread_cond_broadcast (__gthread_cond_t *cond); int __gthread_cond_wait (__gthread_cond_t *cond, __gthread_mutex_t *mutex); int __gthread_cond_wait_recursive (__gthread_cond_t *cond, __gthread_recursive_mutex_t *mutex); All functions returning int should return zero on success or the error number. If the operation is not supported, -1 is returned. If the following are also defined, you should #define __GTHREADS_CXX0X 1 to enable the c++0x thread library. Types: __gthread_t __gthread_time_t Interface: int __gthread_create (__gthread_t *thread, void *(*func) (void*), void *args); int __gthread_join (__gthread_t thread, void **value_ptr); int __gthread_detach (__gthread_t thread); int __gthread_equal (__gthread_t t1, __gthread_t t2); __gthread_t __gthread_self (void); int __gthread_yield (void); int __gthread_mutex_timedlock (__gthread_mutex_t *m, const __gthread_time_t *abs_timeout); int __gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *m, const __gthread_time_t *abs_time); int __gthread_cond_signal (__gthread_cond_t *cond); int __gthread_cond_timedwait (__gthread_cond_t *cond, __gthread_mutex_t *mutex, const __gthread_time_t *abs_timeout); */ #if 0 /* disabled by -frewrite-includes */ #if __GXX_WEAK__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 136 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr.h" 3 /* The pe-coff weak support isn't fully compatible to ELF's weak. For static libraries it might would work, but as we need to deal with shared versions too, we disable it for mingw-targets. */ #ifdef __MINGW32__ #undef _GLIBCXX_GTHREAD_USE_WEAK #define _GLIBCXX_GTHREAD_USE_WEAK 0 #endif # 143 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr.h" 3 #ifndef _GLIBCXX_GTHREAD_USE_WEAK #define _GLIBCXX_GTHREAD_USE_WEAK 1 #endif # 147 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr.h" 3 #endif # 148 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/gthr-default.h> #endif /* expanded by -frewrite-includes */ # 148 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 1 3 /* Threads compatibility routines for libgcc2 and libobjc. */ /* Compile this one with gcc. */ /* Copyright (C) 1997-2019 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation. You should have received a copy of the GNU General Public License and a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #ifndef _GLIBCXX_GCC_GTHR_POSIX_H #define _GLIBCXX_GCC_GTHR_POSIX_H /* POSIX threads specific definitions. Easy, since the interface is just one-to-one mapping. */ #define __GTHREADS 1 #define __GTHREADS_CXX0X 1 #if 0 /* expanded by -frewrite-includes */ #include <pthread.h> #endif /* expanded by -frewrite-includes */ # 35 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 # 1 "/usr/include/pthread.h" 1 3 4 /* Copyright (C) 2002-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ #ifndef _PTHREAD_H #define _PTHREAD_H 1 #if 0 /* expanded by -frewrite-includes */ #include <features.h> #endif /* expanded by -frewrite-includes */ # 21 "/usr/include/pthread.h" 3 4 # 22 "/usr/include/pthread.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <sched.h> #endif /* expanded by -frewrite-includes */ # 22 "/usr/include/pthread.h" 3 4 # 1 "/usr/include/sched.h" 1 3 4 /* Definitions for POSIX 1003.1b-1993 (aka POSIX.4) scheduling interface. Copyright (C) 1996-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ #ifndef _SCHED_H #define _SCHED_H 1 #if 0 /* expanded by -frewrite-includes */ #include <features.h> #endif /* expanded by -frewrite-includes */ # 22 "/usr/include/sched.h" 3 4 # 23 "/usr/include/sched.h" 3 4 /* Get type definitions. */ #if 0 /* expanded by -frewrite-includes */ #include <bits/types.h> #endif /* expanded by -frewrite-includes */ # 25 "/usr/include/sched.h" 3 4 # 26 "/usr/include/sched.h" 3 4 #define __need_size_t #define __need_NULL #if 0 /* expanded by -frewrite-includes */ #include <stddef.h> #endif /* expanded by -frewrite-includes */ # 29 "/usr/include/sched.h" 3 4 # 1 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 1 3 4 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ #if 0 /* disabled by -frewrite-includes */ #if !defined(__STDDEF_H) || defined(__need_ptrdiff_t) || \ defined(__need_size_t) || defined(__need_wchar_t) || \ defined(__need_NULL) || defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 13 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \ !defined(__need_wchar_t) && !defined(__need_NULL) && \ !defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 17 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define miscellaneous pieces when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 19 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define __STDDEF_H #endif # 21 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define __need_ptrdiff_t #define __need_size_t #define __need_wchar_t #define __need_NULL #define __need_STDDEF_H_misc /* __need_wint_t is intentionally not defined here. */ #endif # 28 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_ptrdiff_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 30 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !defined(_PTRDIFF_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 31 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define ptrdiff_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 33 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define _PTRDIFF_T #endif # 35 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __PTRDIFF_TYPE__ ptrdiff_t; #endif # 37 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_ptrdiff_t #endif /* defined(__need_ptrdiff_t) */ # 39 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_size_t) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 41 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !defined(_SIZE_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 42 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define size_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 44 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define _SIZE_T #endif # 46 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __SIZE_TYPE__ size_t; #endif # 48 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_size_t #endif /*defined(__need_size_t) */ # 50 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_STDDEF_H_misc) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 52 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is * enabled. */ #if 0 /* disabled by -frewrite-includes */ #if (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 && \ !defined(_RSIZE_T)) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 56 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define rsize_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 58 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define _RSIZE_T #endif # 60 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __SIZE_TYPE__ rsize_t; #endif # 62 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #endif /* defined(__need_STDDEF_H_misc) */ # 63 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_wchar_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 65 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #ifndef __cplusplus /* Always define wchar_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(_WCHAR_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 68 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 69 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define _WCHAR_T #if 0 /* disabled by -frewrite-includes */ #if defined(_MSC_EXTENSIONS) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 71 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define _WCHAR_T_DEFINED #endif # 73 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 74 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __WCHAR_TYPE__ wchar_t; #endif # 76 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 77 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_wchar_t #endif /* defined(__need_wchar_t) */ # 79 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_NULL) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 81 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #undef NULL #ifdef __cplusplus #if 0 /* disabled by -frewrite-includes */ # if !defined(__MINGW32__) && !defined(_MSC_VER) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 84 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 # define NULL __null # else # 86 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 # define NULL 0 # endif # 88 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #else # 89 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 # define NULL ((void*)0) #endif # 91 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #ifdef __cplusplus #if 0 /* disabled by -frewrite-includes */ #if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 93 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 namespace std { typedef decltype(nullptr) nullptr_t; } using ::std::nullptr_t; #endif # 96 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 97 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_NULL #endif /* defined(__need_NULL) */ # 99 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_STDDEF_H_misc) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 101 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 102 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include "__stddef_max_align_t.h" #endif /* expanded by -frewrite-includes */ # 102 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 # 103 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 104 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define offsetof(t, d) __builtin_offsetof(t, d) #undef __need_STDDEF_H_misc #endif /* defined(__need_STDDEF_H_misc) */ # 107 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */ #if 0 /* disabled by -frewrite-includes */ #if defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 111 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define wint_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(_WINT_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 113 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 114 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define _WINT_T #endif # 116 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __WINT_TYPE__ wint_t; #endif # 118 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_wint_t #endif /* __need_wint_t */ # 120 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 122 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 # 30 "/usr/include/sched.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include <bits/types/time_t.h> #endif /* expanded by -frewrite-includes */ # 31 "/usr/include/sched.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/time_t.h" 1 3 4 #ifndef __time_t_defined #define __time_t_defined 1 #if 0 /* expanded by -frewrite-includes */ #include <bits/types.h> #endif /* expanded by -frewrite-includes */ # 4 "/usr/include/x86_64-linux-gnu/bits/types/time_t.h" 3 4 # 5 "/usr/include/x86_64-linux-gnu/bits/types/time_t.h" 3 4 /* Returned by `time'. */ typedef __time_t time_t; #endif # 10 "/usr/include/x86_64-linux-gnu/bits/types/time_t.h" 3 4 # 32 "/usr/include/sched.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include <bits/types/struct_timespec.h> #endif /* expanded by -frewrite-includes */ # 32 "/usr/include/sched.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h" 1 3 4 /* NB: Include guard matches what <linux/time.h> uses. */ #ifndef _STRUCT_TIMESPEC #define _STRUCT_TIMESPEC 1 #if 0 /* expanded by -frewrite-includes */ #include <bits/types.h> #endif /* expanded by -frewrite-includes */ # 5 "/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h" 3 4 # 6 "/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <bits/endian.h> #endif /* expanded by -frewrite-includes */ # 6 "/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h" 3 4 # 7 "/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h" 3 4 /* POSIX.1b structure for a time value. This is like a `struct timeval' but has nanoseconds instead of microseconds. */ struct timespec { __time_t tv_sec; /* Seconds. */ #if 0 /* disabled by -frewrite-includes */ #if __WORDSIZE == 64 \ || (defined __SYSCALL_WORDSIZE && __SYSCALL_WORDSIZE == 64) \ || __TIMESIZE == 32 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 16 "/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h" 3 4 __syscall_slong_t tv_nsec; /* Nanoseconds. */ #else # 18 "/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __BYTE_ORDER == __BIG_ENDIAN #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 19 "/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h" 3 4 int: 32; /* Padding. */ long int tv_nsec; /* Nanoseconds. */ # else # 22 "/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h" 3 4 long int tv_nsec; /* Nanoseconds. */ int: 32; /* Padding. */ # endif # 25 "/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h" 3 4 #endif # 26 "/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h" 3 4 }; #endif # 29 "/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h" 3 4 # 33 "/usr/include/sched.h" 2 3 4 #ifndef __USE_XOPEN2K #if 0 /* expanded by -frewrite-includes */ # include <time.h> #endif /* expanded by -frewrite-includes */ # 34 "/usr/include/sched.h" 3 4 # 35 "/usr/include/sched.h" 3 4 #endif # 36 "/usr/include/sched.h" 3 4 #ifndef __pid_t_defined typedef __pid_t pid_t; # define __pid_t_defined #endif # 41 "/usr/include/sched.h" 3 4 /* Get system specific constant and data structure definitions. */ #if 0 /* expanded by -frewrite-includes */ #include <bits/sched.h> #endif /* expanded by -frewrite-includes */ # 43 "/usr/include/sched.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/sched.h" 1 3 4 /* Definitions of constants and data structure for POSIX 1003.1b-1993 scheduling interface. Copyright (C) 1996-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ #ifndef _BITS_SCHED_H #define _BITS_SCHED_H 1 #ifndef _SCHED_H # error "Never include <bits/sched.h> directly; use <sched.h> instead." #endif # 26 "/usr/include/x86_64-linux-gnu/bits/sched.h" 3 4 /* Scheduling algorithms. */ #define SCHED_OTHER 0 #define SCHED_FIFO 1 #define SCHED_RR 2 #ifdef __USE_GNU # define SCHED_BATCH 3 # define SCHED_ISO 4 # define SCHED_IDLE 5 # define SCHED_DEADLINE 6 # define SCHED_RESET_ON_FORK 0x40000000 #endif # 39 "/usr/include/x86_64-linux-gnu/bits/sched.h" 3 4 #ifdef __USE_GNU /* Cloning flags. */ # define CSIGNAL 0x000000ff /* Signal mask to be sent at exit. */ # define CLONE_VM 0x00000100 /* Set if VM shared between processes. */ # define CLONE_FS 0x00000200 /* Set if fs info shared between processes. */ # define CLONE_FILES 0x00000400 /* Set if open files shared between processes. */ # define CLONE_SIGHAND 0x00000800 /* Set if signal handlers shared. */ # define CLONE_PIDFD 0x00001000 /* Set if a pidfd should be placed in parent. */ # define CLONE_PTRACE 0x00002000 /* Set if tracing continues on the child. */ # define CLONE_VFORK 0x00004000 /* Set if the parent wants the child to wake it up on mm_release. */ # define CLONE_PARENT 0x00008000 /* Set if we want to have the same parent as the cloner. */ # define CLONE_THREAD 0x00010000 /* Set to add to same thread group. */ # define CLONE_NEWNS 0x00020000 /* Set to create new namespace. */ # define CLONE_SYSVSEM 0x00040000 /* Set to shared SVID SEM_UNDO semantics. */ # define CLONE_SETTLS 0x00080000 /* Set TLS info. */ # define CLONE_PARENT_SETTID 0x00100000 /* Store TID in userlevel buffer before MM copy. */ # define CLONE_CHILD_CLEARTID 0x00200000 /* Register exit futex and memory location to clear. */ # define CLONE_DETACHED 0x00400000 /* Create clone detached. */ # define CLONE_UNTRACED 0x00800000 /* Set if the tracing process can't force CLONE_PTRACE on this clone. */ # define CLONE_CHILD_SETTID 0x01000000 /* Store TID in userlevel buffer in the child. */ # define CLONE_NEWCGROUP 0x02000000 /* New cgroup namespace. */ # define CLONE_NEWUTS 0x04000000 /* New utsname group. */ # define CLONE_NEWIPC 0x08000000 /* New ipcs. */ # define CLONE_NEWUSER 0x10000000 /* New user namespace. */ # define CLONE_NEWPID 0x20000000 /* New pid namespace. */ # define CLONE_NEWNET 0x40000000 /* New network namespace. */ # define CLONE_IO 0x80000000 /* Clone I/O context. */ #endif # 75 "/usr/include/x86_64-linux-gnu/bits/sched.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <bits/types/struct_sched_param.h> #endif /* expanded by -frewrite-includes */ # 76 "/usr/include/x86_64-linux-gnu/bits/sched.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h" 1 3 4 /* Sched parameter structure. Generic version. Copyright (C) 1996-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ #ifndef _BITS_TYPES_STRUCT_SCHED_PARAM #define _BITS_TYPES_STRUCT_SCHED_PARAM 1 /* Data structure to describe a process' schedulability. */ struct sched_param { int sched_priority; }; #endif /* bits/types/struct_sched_param.h */ # 29 "/usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h" 3 4 # 77 "/usr/include/x86_64-linux-gnu/bits/sched.h" 2 3 4 __BEGIN_DECLS #ifdef __USE_GNU /* Clone current process. */ extern int clone (int (*__fn) (void *__arg), void *__child_stack, int __flags, void *__arg, ...) __THROW; /* Unshare the specified resources. */ extern int unshare (int __flags) __THROW; /* Get index of currently used CPU. */ extern int sched_getcpu (void) __THROW; /* Get currently used CPU and NUMA node. */ extern int getcpu (unsigned int *, unsigned int *) __THROW; /* Switch process to namespace of type NSTYPE indicated by FD. */ extern int setns (int __fd, int __nstype) __THROW; #endif # 97 "/usr/include/x86_64-linux-gnu/bits/sched.h" 3 4 __END_DECLS #endif /* bits/sched.h */ # 101 "/usr/include/x86_64-linux-gnu/bits/sched.h" 3 4 # 44 "/usr/include/sched.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include <bits/cpu-set.h> #endif /* expanded by -frewrite-includes */ # 44 "/usr/include/sched.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/cpu-set.h" 1 3 4 /* Definition of the cpu_set_t structure used by the POSIX 1003.1b-1993 scheduling interface. Copyright (C) 1996-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ #ifndef _BITS_CPU_SET_H #define _BITS_CPU_SET_H 1 #ifndef _SCHED_H # error "Never include <bits/cpu-set.h> directly; use <sched.h> instead." #endif # 26 "/usr/include/x86_64-linux-gnu/bits/cpu-set.h" 3 4 /* Size definition for CPU sets. */ #define __CPU_SETSIZE 1024 #define __NCPUBITS (8 * sizeof (__cpu_mask)) /* Type for array elements in 'cpu_set_t'. */ typedef __CPU_MASK_TYPE __cpu_mask; /* Basic access functions. */ #define __CPUELT(cpu) ((cpu) / __NCPUBITS) #define __CPUMASK(cpu) ((__cpu_mask) 1 << ((cpu) % __NCPUBITS)) /* Data structure to describe CPU mask. */ typedef struct { __cpu_mask __bits[__CPU_SETSIZE / __NCPUBITS]; } cpu_set_t; /* Access functions for CPU masks. */ #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (2, 91) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 46 "/usr/include/x86_64-linux-gnu/bits/cpu-set.h" 3 4 # define __CPU_ZERO_S(setsize, cpusetp) \ do __builtin_memset (cpusetp, '\0', setsize); while (0) #else # 49 "/usr/include/x86_64-linux-gnu/bits/cpu-set.h" 3 4 # define __CPU_ZERO_S(setsize, cpusetp) \ do { \ size_t __i; \ size_t __imax = (setsize) / sizeof (__cpu_mask); \ __cpu_mask *__bits = (cpusetp)->__bits; \ for (__i = 0; __i < __imax; ++__i) \ __bits[__i] = 0; \ } while (0) #endif # 58 "/usr/include/x86_64-linux-gnu/bits/cpu-set.h" 3 4 #define __CPU_SET_S(cpu, setsize, cpusetp) \ (__extension__ \ ({ size_t __cpu = (cpu); \ __cpu / 8 < (setsize) \ ? (((__cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] \ |= __CPUMASK (__cpu)) \ : 0; })) #define __CPU_CLR_S(cpu, setsize, cpusetp) \ (__extension__ \ ({ size_t __cpu = (cpu); \ __cpu / 8 < (setsize) \ ? (((__cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] \ &= ~__CPUMASK (__cpu)) \ : 0; })) #define __CPU_ISSET_S(cpu, setsize, cpusetp) \ (__extension__ \ ({ size_t __cpu = (cpu); \ __cpu / 8 < (setsize) \ ? ((((const __cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] \ & __CPUMASK (__cpu))) != 0 \ : 0; })) #define __CPU_COUNT_S(setsize, cpusetp) \ __sched_cpucount (setsize, cpusetp) #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (2, 91) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 84 "/usr/include/x86_64-linux-gnu/bits/cpu-set.h" 3 4 # define __CPU_EQUAL_S(setsize, cpusetp1, cpusetp2) \ (__builtin_memcmp (cpusetp1, cpusetp2, setsize) == 0) #else # 87 "/usr/include/x86_64-linux-gnu/bits/cpu-set.h" 3 4 # define __CPU_EQUAL_S(setsize, cpusetp1, cpusetp2) \ (__extension__ \ ({ const __cpu_mask *__arr1 = (cpusetp1)->__bits; \ const __cpu_mask *__arr2 = (cpusetp2)->__bits; \ size_t __imax = (setsize) / sizeof (__cpu_mask); \ size_t __i; \ for (__i = 0; __i < __imax; ++__i) \ if (__arr1[__i] != __arr2[__i]) \ break; \ __i == __imax; })) #endif # 98 "/usr/include/x86_64-linux-gnu/bits/cpu-set.h" 3 4 #define __CPU_OP_S(setsize, destset, srcset1, srcset2, op) \ (__extension__ \ ({ cpu_set_t *__dest = (destset); \ const __cpu_mask *__arr1 = (srcset1)->__bits; \ const __cpu_mask *__arr2 = (srcset2)->__bits; \ size_t __imax = (setsize) / sizeof (__cpu_mask); \ size_t __i; \ for (__i = 0; __i < __imax; ++__i) \ ((__cpu_mask *) __dest->__bits)[__i] = __arr1[__i] op __arr2[__i]; \ __dest; })) #define __CPU_ALLOC_SIZE(count) \ ((((count) + __NCPUBITS - 1) / __NCPUBITS) * sizeof (__cpu_mask)) #define __CPU_ALLOC(count) __sched_cpualloc (count) #define __CPU_FREE(cpuset) __sched_cpufree (cpuset) __BEGIN_DECLS extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp) __THROW; extern cpu_set_t *__sched_cpualloc (size_t __count) __THROW __wur; extern void __sched_cpufree (cpu_set_t *__set) __THROW; __END_DECLS #endif /* bits/cpu-set.h */ # 125 "/usr/include/x86_64-linux-gnu/bits/cpu-set.h" 3 4 # 45 "/usr/include/sched.h" 2 3 4 /* Backward compatibility. */ #define sched_priority sched_priority #define __sched_priority sched_priority __BEGIN_DECLS /* Set scheduling parameters for a process. */ extern int sched_setparam (__pid_t __pid, const struct sched_param *__param) __THROW; /* Retrieve scheduling parameters for a particular process. */ extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __THROW; /* Set scheduling algorithm and/or parameters for a process. */ extern int sched_setscheduler (__pid_t __pid, int __policy, const struct sched_param *__param) __THROW; /* Retrieve scheduling algorithm for a particular purpose. */ extern int sched_getscheduler (__pid_t __pid) __THROW; /* Yield the processor. */ extern int sched_yield (void) __THROW; /* Get maximum priority value for a scheduler. */ extern int sched_get_priority_max (int __algorithm) __THROW; /* Get minimum priority value for a scheduler. */ extern int sched_get_priority_min (int __algorithm) __THROW; /* Get the SCHED_RR interval for the named process. */ extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __THROW; #ifdef __USE_GNU /* Access macros for `cpu_set'. */ # define CPU_SETSIZE __CPU_SETSIZE # define CPU_SET(cpu, cpusetp) __CPU_SET_S (cpu, sizeof (cpu_set_t), cpusetp) # define CPU_CLR(cpu, cpusetp) __CPU_CLR_S (cpu, sizeof (cpu_set_t), cpusetp) # define CPU_ISSET(cpu, cpusetp) __CPU_ISSET_S (cpu, sizeof (cpu_set_t), \ cpusetp) # define CPU_ZERO(cpusetp) __CPU_ZERO_S (sizeof (cpu_set_t), cpusetp) # define CPU_COUNT(cpusetp) __CPU_COUNT_S (sizeof (cpu_set_t), cpusetp) # define CPU_SET_S(cpu, setsize, cpusetp) __CPU_SET_S (cpu, setsize, cpusetp) # define CPU_CLR_S(cpu, setsize, cpusetp) __CPU_CLR_S (cpu, setsize, cpusetp) # define CPU_ISSET_S(cpu, setsize, cpusetp) __CPU_ISSET_S (cpu, setsize, \ cpusetp) # define CPU_ZERO_S(setsize, cpusetp) __CPU_ZERO_S (setsize, cpusetp) # define CPU_COUNT_S(setsize, cpusetp) __CPU_COUNT_S (setsize, cpusetp) # define CPU_EQUAL(cpusetp1, cpusetp2) \ __CPU_EQUAL_S (sizeof (cpu_set_t), cpusetp1, cpusetp2) # define CPU_EQUAL_S(setsize, cpusetp1, cpusetp2) \ __CPU_EQUAL_S (setsize, cpusetp1, cpusetp2) # define CPU_AND(destset, srcset1, srcset2) \ __CPU_OP_S (sizeof (cpu_set_t), destset, srcset1, srcset2, &) # define CPU_OR(destset, srcset1, srcset2) \ __CPU_OP_S (sizeof (cpu_set_t), destset, srcset1, srcset2, |) # define CPU_XOR(destset, srcset1, srcset2) \ __CPU_OP_S (sizeof (cpu_set_t), destset, srcset1, srcset2, ^) # define CPU_AND_S(setsize, destset, srcset1, srcset2) \ __CPU_OP_S (setsize, destset, srcset1, srcset2, &) # define CPU_OR_S(setsize, destset, srcset1, srcset2) \ __CPU_OP_S (setsize, destset, srcset1, srcset2, |) # define CPU_XOR_S(setsize, destset, srcset1, srcset2) \ __CPU_OP_S (setsize, destset, srcset1, srcset2, ^) # define CPU_ALLOC_SIZE(count) __CPU_ALLOC_SIZE (count) # define CPU_ALLOC(count) __CPU_ALLOC (count) # define CPU_FREE(cpuset) __CPU_FREE (cpuset) /* Set the CPU affinity for a task */ extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize, const cpu_set_t *__cpuset) __THROW; /* Get the CPU affinity for a task */ extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize, cpu_set_t *__cpuset) __THROW; #endif # 128 "/usr/include/sched.h" 3 4 __END_DECLS #endif /* sched.h */ # 132 "/usr/include/sched.h" 3 4 # 23 "/usr/include/pthread.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include <time.h> #endif /* expanded by -frewrite-includes */ # 23 "/usr/include/pthread.h" 3 4 # 1 "/usr/include/time.h" 1 3 4 /* Copyright (C) 1991-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ /* * ISO C99 Standard: 7.23 Date and time <time.h> */ #ifndef _TIME_H #define _TIME_H 1 #if 0 /* expanded by -frewrite-includes */ #include <features.h> #endif /* expanded by -frewrite-includes */ # 25 "/usr/include/time.h" 3 4 # 26 "/usr/include/time.h" 3 4 #define __need_size_t #define __need_NULL #if 0 /* expanded by -frewrite-includes */ #include <stddef.h> #endif /* expanded by -frewrite-includes */ # 29 "/usr/include/time.h" 3 4 # 1 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 1 3 4 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ #if 0 /* disabled by -frewrite-includes */ #if !defined(__STDDEF_H) || defined(__need_ptrdiff_t) || \ defined(__need_size_t) || defined(__need_wchar_t) || \ defined(__need_NULL) || defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 13 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \ !defined(__need_wchar_t) && !defined(__need_NULL) && \ !defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 17 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define miscellaneous pieces when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 19 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define __STDDEF_H #endif # 21 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define __need_ptrdiff_t #define __need_size_t #define __need_wchar_t #define __need_NULL #define __need_STDDEF_H_misc /* __need_wint_t is intentionally not defined here. */ #endif # 28 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_ptrdiff_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 30 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !defined(_PTRDIFF_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 31 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define ptrdiff_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 33 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define _PTRDIFF_T #endif # 35 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __PTRDIFF_TYPE__ ptrdiff_t; #endif # 37 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_ptrdiff_t #endif /* defined(__need_ptrdiff_t) */ # 39 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_size_t) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 41 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !defined(_SIZE_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 42 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define size_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 44 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define _SIZE_T #endif # 46 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __SIZE_TYPE__ size_t; #endif # 48 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_size_t #endif /*defined(__need_size_t) */ # 50 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_STDDEF_H_misc) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 52 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is * enabled. */ #if 0 /* disabled by -frewrite-includes */ #if (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 && \ !defined(_RSIZE_T)) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 56 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define rsize_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 58 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define _RSIZE_T #endif # 60 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __SIZE_TYPE__ rsize_t; #endif # 62 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #endif /* defined(__need_STDDEF_H_misc) */ # 63 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_wchar_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 65 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #ifndef __cplusplus /* Always define wchar_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(_WCHAR_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 68 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 69 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define _WCHAR_T #if 0 /* disabled by -frewrite-includes */ #if defined(_MSC_EXTENSIONS) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 71 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define _WCHAR_T_DEFINED #endif # 73 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 74 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __WCHAR_TYPE__ wchar_t; #endif # 76 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 77 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_wchar_t #endif /* defined(__need_wchar_t) */ # 79 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_NULL) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 81 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #undef NULL #ifdef __cplusplus #if 0 /* disabled by -frewrite-includes */ # if !defined(__MINGW32__) && !defined(_MSC_VER) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 84 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 # define NULL __null # else # 86 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 # define NULL 0 # endif # 88 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #else # 89 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 # define NULL ((void*)0) #endif # 91 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #ifdef __cplusplus #if 0 /* disabled by -frewrite-includes */ #if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 93 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 namespace std { typedef decltype(nullptr) nullptr_t; } using ::std::nullptr_t; #endif # 96 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 97 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_NULL #endif /* defined(__need_NULL) */ # 99 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_STDDEF_H_misc) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 101 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 102 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include "__stddef_max_align_t.h" #endif /* expanded by -frewrite-includes */ # 102 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 # 103 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 104 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define offsetof(t, d) __builtin_offsetof(t, d) #undef __need_STDDEF_H_misc #endif /* defined(__need_STDDEF_H_misc) */ # 107 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */ #if 0 /* disabled by -frewrite-includes */ #if defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 111 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define wint_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(_WINT_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 113 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 114 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define _WINT_T #endif # 116 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __WINT_TYPE__ wint_t; #endif # 118 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_wint_t #endif /* __need_wint_t */ # 120 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 122 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 # 30 "/usr/include/time.h" 2 3 4 /* This defines CLOCKS_PER_SEC, which is the number of processor clock ticks per second, and possibly a number of other constants. */ #if 0 /* expanded by -frewrite-includes */ #include <bits/time.h> #endif /* expanded by -frewrite-includes */ # 33 "/usr/include/time.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/time.h" 1 3 4 /* System-dependent timing definitions. Linux version. Copyright (C) 1996-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ /* * Never include this file directly; use <time.h> instead. */ #ifndef _BITS_TIME_H #define _BITS_TIME_H 1 #if 0 /* expanded by -frewrite-includes */ #include <bits/types.h> #endif /* expanded by -frewrite-includes */ # 26 "/usr/include/x86_64-linux-gnu/bits/time.h" 3 4 # 27 "/usr/include/x86_64-linux-gnu/bits/time.h" 3 4 /* ISO/IEC 9899:1999 7.23.1: Components of time The macro `CLOCKS_PER_SEC' is an expression with type `clock_t' that is the number per second of the value returned by the `clock' function. */ /* CAE XSH, Issue 4, Version 2: <time.h> The value of CLOCKS_PER_SEC is required to be 1 million on all XSI-conformant systems. */ #define CLOCKS_PER_SEC ((__clock_t) 1000000) #if 0 /* disabled by -frewrite-includes */ #if (!defined __STRICT_ANSI__ || defined __USE_POSIX) \ && !defined __USE_XOPEN2K #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 38 "/usr/include/x86_64-linux-gnu/bits/time.h" 3 4 /* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK presents the real value for clock ticks per second for the system. */ extern long int __sysconf (int); # define CLK_TCK ((__clock_t) __sysconf (2)) /* 2 is _SC_CLK_TCK */ #endif # 43 "/usr/include/x86_64-linux-gnu/bits/time.h" 3 4 #ifdef __USE_POSIX199309 /* Identifier for system-wide realtime clock. */ # define CLOCK_REALTIME 0 /* Monotonic system-wide clock. */ # define CLOCK_MONOTONIC 1 /* High-resolution timer from the CPU. */ # define CLOCK_PROCESS_CPUTIME_ID 2 /* Thread-specific CPU-time clock. */ # define CLOCK_THREAD_CPUTIME_ID 3 /* Monotonic system-wide clock, not adjusted for frequency scaling. */ # define CLOCK_MONOTONIC_RAW 4 /* Identifier for system-wide realtime clock, updated only on ticks. */ # define CLOCK_REALTIME_COARSE 5 /* Monotonic system-wide clock, updated only on ticks. */ # define CLOCK_MONOTONIC_COARSE 6 /* Monotonic system-wide clock that includes time spent in suspension. */ # define CLOCK_BOOTTIME 7 /* Like CLOCK_REALTIME but also wakes suspended system. */ # define CLOCK_REALTIME_ALARM 8 /* Like CLOCK_BOOTTIME but also wakes suspended system. */ # define CLOCK_BOOTTIME_ALARM 9 /* Like CLOCK_REALTIME but in International Atomic Time. */ # define CLOCK_TAI 11 /* Flag to indicate time is absolute. */ # define TIMER_ABSTIME 1 #endif # 71 "/usr/include/x86_64-linux-gnu/bits/time.h" 3 4 #ifdef __USE_GNU #if 0 /* expanded by -frewrite-includes */ # include <bits/timex.h> #endif /* expanded by -frewrite-includes */ # 73 "/usr/include/x86_64-linux-gnu/bits/time.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/timex.h" 1 3 4 /* Copyright (C) 1995-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ #ifndef _BITS_TIMEX_H #define _BITS_TIMEX_H 1 #if 0 /* expanded by -frewrite-includes */ #include <bits/types.h> #endif /* expanded by -frewrite-includes */ # 21 "/usr/include/x86_64-linux-gnu/bits/timex.h" 3 4 # 22 "/usr/include/x86_64-linux-gnu/bits/timex.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <bits/types/struct_timeval.h> #endif /* expanded by -frewrite-includes */ # 22 "/usr/include/x86_64-linux-gnu/bits/timex.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h" 1 3 4 #ifndef __timeval_defined #define __timeval_defined 1 #if 0 /* expanded by -frewrite-includes */ #include <bits/types.h> #endif /* expanded by -frewrite-includes */ # 4 "/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h" 3 4 # 5 "/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h" 3 4 /* A time value that is accurate to the nearest microsecond but also has a range of years. */ struct timeval { __time_t tv_sec; /* Seconds. */ __suseconds_t tv_usec; /* Microseconds. */ }; #endif # 14 "/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h" 3 4 # 23 "/usr/include/x86_64-linux-gnu/bits/timex.h" 2 3 4 /* These definitions from linux/timex.h as of 3.18. */ struct timex { unsigned int modes; /* mode selector */ __syscall_slong_t offset; /* time offset (usec) */ __syscall_slong_t freq; /* frequency offset (scaled ppm) */ __syscall_slong_t maxerror; /* maximum error (usec) */ __syscall_slong_t esterror; /* estimated error (usec) */ int status; /* clock command/status */ __syscall_slong_t constant; /* pll time constant */ __syscall_slong_t precision; /* clock precision (usec) (ro) */ __syscall_slong_t tolerance; /* clock frequency tolerance (ppm) (ro) */ struct timeval time; /* (read only, except for ADJ_SETOFFSET) */ __syscall_slong_t tick; /* (modified) usecs between clock ticks */ __syscall_slong_t ppsfreq; /* pps frequency (scaled ppm) (ro) */ __syscall_slong_t jitter; /* pps jitter (us) (ro) */ int shift; /* interval duration (s) (shift) (ro) */ __syscall_slong_t stabil; /* pps stability (scaled ppm) (ro) */ __syscall_slong_t jitcnt; /* jitter limit exceeded (ro) */ __syscall_slong_t calcnt; /* calibration intervals (ro) */ __syscall_slong_t errcnt; /* calibration errors (ro) */ __syscall_slong_t stbcnt; /* stability limit exceeded (ro) */ int tai; /* TAI offset (ro) */ /* ??? */ int :32; int :32; int :32; int :32; int :32; int :32; int :32; int :32; int :32; int :32; int :32; }; /* Mode codes (timex.mode) */ #define ADJ_OFFSET 0x0001 /* time offset */ #define ADJ_FREQUENCY 0x0002 /* frequency offset */ #define ADJ_MAXERROR 0x0004 /* maximum time error */ #define ADJ_ESTERROR 0x0008 /* estimated time error */ #define ADJ_STATUS 0x0010 /* clock status */ #define ADJ_TIMECONST 0x0020 /* pll time constant */ #define ADJ_TAI 0x0080 /* set TAI offset */ #define ADJ_SETOFFSET 0x0100 /* add 'time' to current time */ #define ADJ_MICRO 0x1000 /* select microsecond resolution */ #define ADJ_NANO 0x2000 /* select nanosecond resolution */ #define ADJ_TICK 0x4000 /* tick value */ #define ADJ_OFFSET_SINGLESHOT 0x8001 /* old-fashioned adjtime */ #define ADJ_OFFSET_SS_READ 0xa001 /* read-only adjtime */ /* xntp 3.4 compatibility names */ #define MOD_OFFSET ADJ_OFFSET #define MOD_FREQUENCY ADJ_FREQUENCY #define MOD_MAXERROR ADJ_MAXERROR #define MOD_ESTERROR ADJ_ESTERROR #define MOD_STATUS ADJ_STATUS #define MOD_TIMECONST ADJ_TIMECONST #define MOD_CLKB ADJ_TICK #define MOD_CLKA ADJ_OFFSET_SINGLESHOT /* 0x8000 in original */ #define MOD_TAI ADJ_TAI #define MOD_MICRO ADJ_MICRO #define MOD_NANO ADJ_NANO /* Status codes (timex.status) */ #define STA_PLL 0x0001 /* enable PLL updates (rw) */ #define STA_PPSFREQ 0x0002 /* enable PPS freq discipline (rw) */ #define STA_PPSTIME 0x0004 /* enable PPS time discipline (rw) */ #define STA_FLL 0x0008 /* select frequency-lock mode (rw) */ #define STA_INS 0x0010 /* insert leap (rw) */ #define STA_DEL 0x0020 /* delete leap (rw) */ #define STA_UNSYNC 0x0040 /* clock unsynchronized (rw) */ #define STA_FREQHOLD 0x0080 /* hold frequency (rw) */ #define STA_PPSSIGNAL 0x0100 /* PPS signal present (ro) */ #define STA_PPSJITTER 0x0200 /* PPS signal jitter exceeded (ro) */ #define STA_PPSWANDER 0x0400 /* PPS signal wander exceeded (ro) */ #define STA_PPSERROR 0x0800 /* PPS signal calibration error (ro) */ #define STA_CLOCKERR 0x1000 /* clock hardware fault (ro) */ #define STA_NANO 0x2000 /* resolution (0 = us, 1 = ns) (ro) */ #define STA_MODE 0x4000 /* mode (0 = PLL, 1 = FLL) (ro) */ #define STA_CLK 0x8000 /* clock source (0 = A, 1 = B) (ro) */ /* Read-only bits */ #define STA_RONLY (STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER \ | STA_PPSERROR | STA_CLOCKERR | STA_NANO | STA_MODE | STA_CLK) #endif /* bits/timex.h */ # 111 "/usr/include/x86_64-linux-gnu/bits/timex.h" 3 4 # 74 "/usr/include/x86_64-linux-gnu/bits/time.h" 2 3 4 __BEGIN_DECLS /* Tune a POSIX clock. */ extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) __THROW; __END_DECLS #endif /* use GNU */ # 82 "/usr/include/x86_64-linux-gnu/bits/time.h" 3 4 #endif /* bits/time.h */ # 84 "/usr/include/x86_64-linux-gnu/bits/time.h" 3 4 # 34 "/usr/include/time.h" 2 3 4 /* Many of the typedefs and structs whose official home is this header may also need to be defined by other headers. */ #if 0 /* expanded by -frewrite-includes */ #include <bits/types/clock_t.h> #endif /* expanded by -frewrite-includes */ # 37 "/usr/include/time.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/clock_t.h" 1 3 4 #ifndef __clock_t_defined #define __clock_t_defined 1 #if 0 /* expanded by -frewrite-includes */ #include <bits/types.h> #endif /* expanded by -frewrite-includes */ # 4 "/usr/include/x86_64-linux-gnu/bits/types/clock_t.h" 3 4 # 5 "/usr/include/x86_64-linux-gnu/bits/types/clock_t.h" 3 4 /* Returned by `clock'. */ typedef __clock_t clock_t; #endif # 10 "/usr/include/x86_64-linux-gnu/bits/types/clock_t.h" 3 4 # 38 "/usr/include/time.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include <bits/types/time_t.h> #endif /* expanded by -frewrite-includes */ # 38 "/usr/include/time.h" 3 4 # 39 "/usr/include/time.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <bits/types/struct_tm.h> #endif /* expanded by -frewrite-includes */ # 39 "/usr/include/time.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h" 1 3 4 #ifndef __struct_tm_defined #define __struct_tm_defined 1 #if 0 /* expanded by -frewrite-includes */ #include <bits/types.h> #endif /* expanded by -frewrite-includes */ # 4 "/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h" 3 4 # 5 "/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h" 3 4 /* ISO C `broken-down time' structure. */ struct tm { int tm_sec; /* Seconds. [0-60] (1 leap second) */ int tm_min; /* Minutes. [0-59] */ int tm_hour; /* Hours. [0-23] */ int tm_mday; /* Day. [1-31] */ int tm_mon; /* Month. [0-11] */ int tm_year; /* Year - 1900. */ int tm_wday; /* Day of week. [0-6] */ int tm_yday; /* Days in year.[0-365] */ int tm_isdst; /* DST. [-1/0/1]*/ # ifdef __USE_MISC long int tm_gmtoff; /* Seconds east of UTC. */ const char *tm_zone; /* Timezone abbreviation. */ # else # 23 "/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h" 3 4 long int __tm_gmtoff; /* Seconds east of UTC. */ const char *__tm_zone; /* Timezone abbreviation. */ # endif # 26 "/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h" 3 4 }; #endif # 29 "/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h" 3 4 # 40 "/usr/include/time.h" 2 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_POSIX199309 || defined __USE_ISOC11 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 42 "/usr/include/time.h" 3 4 #if 0 /* expanded by -frewrite-includes */ # include <bits/types/struct_timespec.h> #endif /* expanded by -frewrite-includes */ # 42 "/usr/include/time.h" 3 4 # 43 "/usr/include/time.h" 3 4 #endif # 44 "/usr/include/time.h" 3 4 #ifdef __USE_POSIX199309 #if 0 /* expanded by -frewrite-includes */ # include <bits/types/clockid_t.h> #endif /* expanded by -frewrite-includes */ # 46 "/usr/include/time.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h" 1 3 4 #ifndef __clockid_t_defined #define __clockid_t_defined 1 #if 0 /* expanded by -frewrite-includes */ #include <bits/types.h> #endif /* expanded by -frewrite-includes */ # 4 "/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h" 3 4 # 5 "/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h" 3 4 /* Clock ID used in clock and timer functions. */ typedef __clockid_t clockid_t; #endif # 10 "/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h" 3 4 # 47 "/usr/include/time.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ # include <bits/types/timer_t.h> #endif /* expanded by -frewrite-includes */ # 47 "/usr/include/time.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/timer_t.h" 1 3 4 #ifndef __timer_t_defined #define __timer_t_defined 1 #if 0 /* expanded by -frewrite-includes */ #include <bits/types.h> #endif /* expanded by -frewrite-includes */ # 4 "/usr/include/x86_64-linux-gnu/bits/types/timer_t.h" 3 4 # 5 "/usr/include/x86_64-linux-gnu/bits/types/timer_t.h" 3 4 /* Timer ID returned by `timer_create'. */ typedef __timer_t timer_t; #endif # 10 "/usr/include/x86_64-linux-gnu/bits/types/timer_t.h" 3 4 # 48 "/usr/include/time.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ # include <bits/types/struct_itimerspec.h> #endif /* expanded by -frewrite-includes */ # 48 "/usr/include/time.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h" 1 3 4 #ifndef __itimerspec_defined #define __itimerspec_defined 1 #if 0 /* expanded by -frewrite-includes */ #include <bits/types.h> #endif /* expanded by -frewrite-includes */ # 4 "/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h" 3 4 # 5 "/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <bits/types/struct_timespec.h> #endif /* expanded by -frewrite-includes */ # 5 "/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h" 3 4 # 6 "/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h" 3 4 /* POSIX.1b structure for timer start values and intervals. */ struct itimerspec { struct timespec it_interval; struct timespec it_value; }; #endif # 15 "/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h" 3 4 # 49 "/usr/include/time.h" 2 3 4 struct sigevent; #endif # 51 "/usr/include/time.h" 3 4 #ifdef __USE_XOPEN2K # ifndef __pid_t_defined typedef __pid_t pid_t; # define __pid_t_defined # endif # 57 "/usr/include/time.h" 3 4 #endif # 58 "/usr/include/time.h" 3 4 #ifdef __USE_XOPEN2K8 #if 0 /* expanded by -frewrite-includes */ # include <bits/types/locale_t.h> #endif /* expanded by -frewrite-includes */ # 60 "/usr/include/time.h" 3 4 # 61 "/usr/include/time.h" 3 4 #endif # 62 "/usr/include/time.h" 3 4 #ifdef __USE_ISOC11 /* Time base values for timespec_get. */ # define TIME_UTC 1 #endif # 67 "/usr/include/time.h" 3 4 __BEGIN_DECLS /* Time used by the program so far (user time + system time). The result / CLOCKS_PER_SEC is program time in seconds. */ extern clock_t clock (void) __THROW; /* Return the current time and put it in *TIMER if TIMER is not NULL. */ extern time_t time (time_t *__timer) __THROW; /* Return the difference between TIME1 and TIME0. */ extern double difftime (time_t __time1, time_t __time0) __THROW __attribute__ ((__const__)); /* Return the `time_t' representation of TP and normalize TP. */ extern time_t mktime (struct tm *__tp) __THROW; /* Format TP into S according to FORMAT. Write no more than MAXSIZE characters and return the number of characters written, or 0 if it would exceed MAXSIZE. */ extern size_t strftime (char *__restrict __s, size_t __maxsize, const char *__restrict __format, const struct tm *__restrict __tp) __THROW; #ifdef __USE_XOPEN /* Parse S according to FORMAT and store binary time information in TP. The return value is a pointer to the first unparsed character in S. */ extern char *strptime (const char *__restrict __s, const char *__restrict __fmt, struct tm *__tp) __THROW; #endif # 99 "/usr/include/time.h" 3 4 #ifdef __USE_XOPEN2K8 /* Similar to the two functions above but take the information from the provided locale and not the global locale. */ extern size_t strftime_l (char *__restrict __s, size_t __maxsize, const char *__restrict __format, const struct tm *__restrict __tp, locale_t __loc) __THROW; #endif # 109 "/usr/include/time.h" 3 4 #ifdef __USE_GNU extern char *strptime_l (const char *__restrict __s, const char *__restrict __fmt, struct tm *__tp, locale_t __loc) __THROW; #endif # 115 "/usr/include/time.h" 3 4 /* Return the `struct tm' representation of *TIMER in Universal Coordinated Time (aka Greenwich Mean Time). */ extern struct tm *gmtime (const time_t *__timer) __THROW; /* Return the `struct tm' representation of *TIMER in the local timezone. */ extern struct tm *localtime (const time_t *__timer) __THROW; #if 0 /* disabled by -frewrite-includes */ #if defined __USE_POSIX || __GLIBC_USE (ISOC2X) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 126 "/usr/include/time.h" 3 4 /* Return the `struct tm' representation of *TIMER in UTC, using *TP to store the result. */ extern struct tm *gmtime_r (const time_t *__restrict __timer, struct tm *__restrict __tp) __THROW; /* Return the `struct tm' representation of *TIMER in local time, using *TP to store the result. */ extern struct tm *localtime_r (const time_t *__restrict __timer, struct tm *__restrict __tp) __THROW; #endif /* POSIX || C2X */ # 136 "/usr/include/time.h" 3 4 /* Return a string of the form "Day Mon dd hh:mm:ss yyyy\n" that is the representation of TP in this format. */ extern char *asctime (const struct tm *__tp) __THROW; /* Equivalent to `asctime (localtime (timer))'. */ extern char *ctime (const time_t *__timer) __THROW; #if 0 /* disabled by -frewrite-includes */ #if defined __USE_POSIX || __GLIBC_USE (ISOC2X) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 145 "/usr/include/time.h" 3 4 /* Reentrant versions of the above functions. */ /* Return in BUF a string of the form "Day Mon dd hh:mm:ss yyyy\n" that is the representation of TP in this format. */ extern char *asctime_r (const struct tm *__restrict __tp, char *__restrict __buf) __THROW; /* Equivalent to `asctime_r (localtime_r (timer, *TMP*), buf)'. */ extern char *ctime_r (const time_t *__restrict __timer, char *__restrict __buf) __THROW; #endif /* POSIX || C2X */ # 156 "/usr/include/time.h" 3 4 /* Defined in localtime.c. */ extern char *__tzname[2]; /* Current timezone names. */ extern int __daylight; /* If daylight-saving time is ever in use. */ extern long int __timezone; /* Seconds west of UTC. */ #ifdef __USE_POSIX /* Same as above. */ extern char *tzname[2]; /* Set time conversion information from the TZ environment variable. If TZ is not defined, a locale-dependent default is used. */ extern void tzset (void) __THROW; #endif # 172 "/usr/include/time.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_MISC || defined __USE_XOPEN #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 174 "/usr/include/time.h" 3 4 extern int daylight; extern long int timezone; #endif # 177 "/usr/include/time.h" 3 4 /* Nonzero if YEAR is a leap year (every 4 years, except every 100th isn't, and every 400th is). */ #define __isleap(year) \ ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0)) #ifdef __USE_MISC /* Miscellaneous functions many Unices inherited from the public domain localtime package. These are included only for compatibility. */ /* Like `mktime', but for TP represents Universal Time, not local time. */ extern time_t timegm (struct tm *__tp) __THROW; /* Another name for `mktime'. */ extern time_t timelocal (struct tm *__tp) __THROW; /* Return the number of days in YEAR. */ extern int dysize (int __year) __THROW __attribute__ ((__const__)); #endif # 198 "/usr/include/time.h" 3 4 #ifdef __USE_POSIX199309 /* Pause execution for a number of nanoseconds. This function is a cancellation point and therefore not marked with __THROW. */ extern int nanosleep (const struct timespec *__requested_time, struct timespec *__remaining); /* Get resolution of clock CLOCK_ID. */ extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __THROW; /* Get current value of clock CLOCK_ID and store it in TP. */ extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __THROW; /* Set clock CLOCK_ID to value TP. */ extern int clock_settime (clockid_t __clock_id, const struct timespec *__tp) __THROW; # ifdef __USE_XOPEN2K /* High-resolution sleep with the specified clock. This function is a cancellation point and therefore not marked with __THROW. */ extern int clock_nanosleep (clockid_t __clock_id, int __flags, const struct timespec *__req, struct timespec *__rem); /* Return clock ID for CPU-time clock. */ extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __THROW; # endif # 231 "/usr/include/time.h" 3 4 /* Create new per-process timer using CLOCK_ID. */ extern int timer_create (clockid_t __clock_id, struct sigevent *__restrict __evp, timer_t *__restrict __timerid) __THROW; /* Delete timer TIMERID. */ extern int timer_delete (timer_t __timerid) __THROW; /* Set timer TIMERID to VALUE, returning old value in OVALUE. */ extern int timer_settime (timer_t __timerid, int __flags, const struct itimerspec *__restrict __value, struct itimerspec *__restrict __ovalue) __THROW; /* Get current value of timer TIMERID and store it in VALUE. */ extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) __THROW; /* Get expiration overrun for timer TIMERID. */ extern int timer_getoverrun (timer_t __timerid) __THROW; #endif # 253 "/usr/include/time.h" 3 4 #ifdef __USE_ISOC11 /* Set TS to calendar time based in time base BASE. */ extern int timespec_get (struct timespec *__ts, int __base) __THROW __nonnull ((1)); #endif # 260 "/usr/include/time.h" 3 4 #ifdef __USE_XOPEN_EXTENDED /* Set to one of the following values to indicate an error. 1 the DATEMSK environment variable is null or undefined, 2 the template file cannot be opened for reading, 3 failed to get file status information, 4 the template file is not a regular file, 5 an error is encountered while reading the template file, 6 memory allication failed (not enough memory available), 7 there is no line in the template that matches the input, 8 invalid input specification Example: February 31 or a time is specified that can not be represented in a time_t (representing the time in seconds since 00:00:00 UTC, January 1, 1970) */ extern int getdate_err; /* Parse the given string as a date specification and return a value representing the value. The templates from the file identified by the environment variable DATEMSK are used. In case of an error `getdate_err' is set. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct tm *getdate (const char *__string); #endif # 285 "/usr/include/time.h" 3 4 #ifdef __USE_GNU /* Since `getdate' is not reentrant because of the use of `getdate_err' and the static buffer to return the result in, we provide a thread-safe variant. The functionality is the same. The result is returned in the buffer pointed to by RESBUFP and in case of an error the return value is != 0 with the same values as given above for `getdate_err'. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int getdate_r (const char *__restrict __string, struct tm *__restrict __resbufp); #endif # 300 "/usr/include/time.h" 3 4 __END_DECLS #endif /* time.h. */ # 304 "/usr/include/time.h" 3 4 # 24 "/usr/include/pthread.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include <bits/endian.h> #endif /* expanded by -frewrite-includes */ # 25 "/usr/include/pthread.h" 3 4 # 26 "/usr/include/pthread.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <bits/pthreadtypes.h> #endif /* expanded by -frewrite-includes */ # 26 "/usr/include/pthread.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 1 3 4 /* Declaration of common pthread types for all architectures. Copyright (C) 2017-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ #ifndef _BITS_PTHREADTYPES_COMMON_H # define _BITS_PTHREADTYPES_COMMON_H 1 /* For internal mutex and condition variable definitions. */ #if 0 /* expanded by -frewrite-includes */ #include <bits/thread-shared-types.h> #endif /* expanded by -frewrite-includes */ # 23 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h" 1 3 4 /* Common threading primitives definitions for both POSIX and C11. Copyright (C) 2017-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ #ifndef _THREAD_SHARED_TYPES_H #define _THREAD_SHARED_TYPES_H 1 /* Arch-specific definitions. Each architecture must define the following macros to define the expected sizes of pthread data types: __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. The additional macro defines any constraint for the lock alignment inside the thread structures: __LOCK_ALIGNMENT - for internal lock/futex usage. Same idea but for the once locking primitive: __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. */ #if 0 /* expanded by -frewrite-includes */ #include <bits/pthreadtypes-arch.h> #endif /* expanded by -frewrite-includes */ # 44 "/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h" 1 3 4 /* Copyright (C) 2002-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ #ifndef _BITS_PTHREADTYPES_ARCH_H #define _BITS_PTHREADTYPES_ARCH_H 1 #if 0 /* expanded by -frewrite-includes */ #include <bits/wordsize.h> #endif /* expanded by -frewrite-includes */ # 21 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 /* Determine the wordsize from the preprocessor defines. */ #if 0 /* disabled by -frewrite-includes */ #if defined __x86_64__ && !defined __ILP32__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 4 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 # define __WORDSIZE 64 #else # 6 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 # define __WORDSIZE 32 #define __WORDSIZE32_SIZE_ULONG 0 #define __WORDSIZE32_PTRDIFF_LONG 0 #endif # 10 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 #ifdef __x86_64__ # define __WORDSIZE_TIME64_COMPAT32 1 /* Both x86-64 and x32 use the 64-bit system call interface. */ # define __SYSCALL_WORDSIZE 64 #else # 16 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 # define __WORDSIZE_TIME64_COMPAT32 0 #endif # 18 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 # 22 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h" 2 3 4 #ifdef __x86_64__ #if 0 /* disabled by -frewrite-includes */ # if __WORDSIZE == 64 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 25 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h" 3 4 # define __SIZEOF_PTHREAD_MUTEX_T 40 # define __SIZEOF_PTHREAD_ATTR_T 56 # define __SIZEOF_PTHREAD_RWLOCK_T 56 # define __SIZEOF_PTHREAD_BARRIER_T 32 # else # 30 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h" 3 4 # define __SIZEOF_PTHREAD_MUTEX_T 32 # define __SIZEOF_PTHREAD_ATTR_T 32 # define __SIZEOF_PTHREAD_RWLOCK_T 44 # define __SIZEOF_PTHREAD_BARRIER_T 20 # endif # 35 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h" 3 4 #else # 36 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h" 3 4 # define __SIZEOF_PTHREAD_MUTEX_T 24 # define __SIZEOF_PTHREAD_ATTR_T 36 # define __SIZEOF_PTHREAD_RWLOCK_T 32 # define __SIZEOF_PTHREAD_BARRIER_T 20 #endif # 41 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h" 3 4 #define __SIZEOF_PTHREAD_MUTEXATTR_T 4 #define __SIZEOF_PTHREAD_COND_T 48 #define __SIZEOF_PTHREAD_CONDATTR_T 4 #define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 #define __SIZEOF_PTHREAD_BARRIERATTR_T 4 #define __LOCK_ALIGNMENT #define __ONCE_ALIGNMENT #ifndef __x86_64__ /* Extra attributes for the cleanup functions. */ # define __cleanup_fct_attribute __attribute__ ((__regparm__ (1))) #endif # 54 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h" 3 4 #endif /* bits/pthreadtypes.h */ # 56 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h" 3 4 # 45 "/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h" 2 3 4 /* Common definition of pthread_mutex_t. */ typedef struct __pthread_internal_list { struct __pthread_internal_list *__prev; struct __pthread_internal_list *__next; } __pthread_list_t; typedef struct __pthread_internal_slist { struct __pthread_internal_slist *__next; } __pthread_slist_t; /* Arch-specific mutex definitions. A generic implementation is provided by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture can override it by defining: 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t definition). It should contains at least the internal members defined in the generic version. 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with atomic operations. 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization. It should initialize the mutex internal flag. */ #if 0 /* expanded by -frewrite-includes */ #include <bits/struct_mutex.h> #endif /* expanded by -frewrite-includes */ # 74 "/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/struct_mutex.h" 1 3 4 /* x86 internal mutex struct definitions. Copyright (C) 2019-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #ifndef _THREAD_MUTEX_INTERNAL_H #define _THREAD_MUTEX_INTERNAL_H 1 struct __pthread_mutex_s { int __lock; unsigned int __count; int __owner; #ifdef __x86_64__ unsigned int __nusers; #endif # 30 "/usr/include/x86_64-linux-gnu/bits/struct_mutex.h" 3 4 /* KIND must stay at this position in the structure to maintain binary compatibility with static initializers. */ int __kind; #ifdef __x86_64__ short __spins; short __elision; __pthread_list_t __list; # define __PTHREAD_MUTEX_HAVE_PREV 1 #else # 39 "/usr/include/x86_64-linux-gnu/bits/struct_mutex.h" 3 4 unsigned int __nusers; __extension__ union { struct { short __espins; short __eelision; # define __spins __elision_data.__espins # define __elision __elision_data.__eelision } __elision_data; __pthread_slist_t __list; }; # define __PTHREAD_MUTEX_HAVE_PREV 0 #endif # 53 "/usr/include/x86_64-linux-gnu/bits/struct_mutex.h" 3 4 }; #ifdef __x86_64__ # define __PTHREAD_MUTEX_INITIALIZER(__kind) \ 0, 0, 0, 0, __kind, 0, 0, { 0, 0 } #else # 59 "/usr/include/x86_64-linux-gnu/bits/struct_mutex.h" 3 4 # define __PTHREAD_MUTEX_INITIALIZER(__kind) \ 0, 0, 0, __kind, 0, { { 0, 0 } } #endif # 62 "/usr/include/x86_64-linux-gnu/bits/struct_mutex.h" 3 4 #endif # 64 "/usr/include/x86_64-linux-gnu/bits/struct_mutex.h" 3 4 # 75 "/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h" 2 3 4 /* Arch-sepecific read-write lock definitions. A generic implementation is provided by struct_rwlock.h. If required, an architecture can override it by defining: 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition). It should contain at least the internal members defined in the generic version. 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization. It should initialize the rwlock internal type. */ #if 0 /* expanded by -frewrite-includes */ #include <bits/struct_rwlock.h> #endif /* expanded by -frewrite-includes */ # 87 "/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h" 1 3 4 /* x86 internal rwlock struct definitions. Copyright (C) 2019-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #ifndef _RWLOCK_INTERNAL_H #define _RWLOCK_INTERNAL_H struct __pthread_rwlock_arch_t { unsigned int __readers; unsigned int __writers; unsigned int __wrphase_futex; unsigned int __writers_futex; unsigned int __pad3; unsigned int __pad4; #ifdef __x86_64__ int __cur_writer; int __shared; signed char __rwelision; # ifdef __ILP32__ unsigned char __pad1[3]; # define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0 } # else # 39 "/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h" 3 4 unsigned char __pad1[7]; # define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0, 0, 0, 0, 0 } # endif # 42 "/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h" 3 4 unsigned long int __pad2; /* FLAGS must stay at this position in the structure to maintain binary compatibility. */ unsigned int __flags; #else /* __x86_64__ */ # 47 "/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h" 3 4 /* FLAGS must stay at this position in the structure to maintain binary compatibility. */ unsigned char __flags; unsigned char __shared; signed char __rwelision; unsigned char __pad2; int __cur_writer; #endif # 55 "/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h" 3 4 }; #ifdef __x86_64__ # define __PTHREAD_RWLOCK_INITIALIZER(__flags) \ 0, 0, 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, __flags #else # 61 "/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h" 3 4 # define __PTHREAD_RWLOCK_INITIALIZER(__flags) \ 0, 0, 0, 0, 0, 0, __flags, 0, 0, 0, 0 #endif # 64 "/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h" 3 4 #endif # 66 "/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h" 3 4 # 88 "/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h" 2 3 4 /* Common definition of pthread_cond_t. */ struct __pthread_cond_s { __extension__ union { __extension__ unsigned long long int __wseq; struct { unsigned int __low; unsigned int __high; } __wseq32; }; __extension__ union { __extension__ unsigned long long int __g1_start; struct { unsigned int __low; unsigned int __high; } __g1_start32; }; unsigned int __g_refs[2] __LOCK_ALIGNMENT; unsigned int __g_size[2]; unsigned int __g1_orig_size; unsigned int __wrefs; unsigned int __g_signals[2]; }; #endif /* _THREAD_SHARED_TYPES_H */ # 120 "/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h" 3 4 # 24 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 2 3 4 /* Thread identifiers. The structure of the attribute type is not exposed on purpose. */ typedef unsigned long int pthread_t; /* Data structures for mutex handling. The structure of the attribute type is not exposed on purpose. */ typedef union { char __size[__SIZEOF_PTHREAD_MUTEXATTR_T]; int __align; } pthread_mutexattr_t; /* Data structure for condition variable handling. The structure of the attribute type is not exposed on purpose. */ typedef union { char __size[__SIZEOF_PTHREAD_CONDATTR_T]; int __align; } pthread_condattr_t; /* Keys for thread-specific data */ typedef unsigned int pthread_key_t; /* Once-only execution */ typedef int __ONCE_ALIGNMENT pthread_once_t; union pthread_attr_t { char __size[__SIZEOF_PTHREAD_ATTR_T]; long int __align; }; #ifndef __have_pthread_attr_t typedef union pthread_attr_t pthread_attr_t; # define __have_pthread_attr_t 1 #endif # 65 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4 typedef union { struct __pthread_mutex_s __data; char __size[__SIZEOF_PTHREAD_MUTEX_T]; long int __align; } pthread_mutex_t; typedef union { struct __pthread_cond_s __data; char __size[__SIZEOF_PTHREAD_COND_T]; __extension__ long long int __align; } pthread_cond_t; #if 0 /* disabled by -frewrite-includes */ #if defined __USE_UNIX98 || defined __USE_XOPEN2K #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 84 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4 /* Data structure for reader-writer lock variable handling. The structure of the attribute type is deliberately not exposed. */ typedef union { struct __pthread_rwlock_arch_t __data; char __size[__SIZEOF_PTHREAD_RWLOCK_T]; long int __align; } pthread_rwlock_t; typedef union { char __size[__SIZEOF_PTHREAD_RWLOCKATTR_T]; long int __align; } pthread_rwlockattr_t; #endif # 99 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4 #ifdef __USE_XOPEN2K /* POSIX spinlock data type. */ typedef volatile int pthread_spinlock_t; /* POSIX barriers data type. The structure of the type is deliberately not exposed. */ typedef union { char __size[__SIZEOF_PTHREAD_BARRIER_T]; long int __align; } pthread_barrier_t; typedef union { char __size[__SIZEOF_PTHREAD_BARRIERATTR_T]; int __align; } pthread_barrierattr_t; #endif # 120 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4 #endif # 122 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4 # 27 "/usr/include/pthread.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include <bits/setjmp.h> #endif /* expanded by -frewrite-includes */ # 27 "/usr/include/pthread.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/setjmp.h" 1 3 4 /* Copyright (C) 2001-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ /* Define the machine-dependent type `jmp_buf'. x86-64 version. */ #ifndef _BITS_SETJMP_H #define _BITS_SETJMP_H 1 #if 0 /* disabled by -frewrite-includes */ #if !defined _SETJMP_H && !defined _PTHREAD_H #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 23 "/usr/include/x86_64-linux-gnu/bits/setjmp.h" 3 4 # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead." #endif # 25 "/usr/include/x86_64-linux-gnu/bits/setjmp.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <bits/wordsize.h> #endif /* expanded by -frewrite-includes */ # 26 "/usr/include/x86_64-linux-gnu/bits/setjmp.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 /* Determine the wordsize from the preprocessor defines. */ #if 0 /* disabled by -frewrite-includes */ #if defined __x86_64__ && !defined __ILP32__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 4 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 # define __WORDSIZE 64 #else # 6 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 # define __WORDSIZE 32 #define __WORDSIZE32_SIZE_ULONG 0 #define __WORDSIZE32_PTRDIFF_LONG 0 #endif # 10 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 #ifdef __x86_64__ # define __WORDSIZE_TIME64_COMPAT32 1 /* Both x86-64 and x32 use the 64-bit system call interface. */ # define __SYSCALL_WORDSIZE 64 #else # 16 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 # define __WORDSIZE_TIME64_COMPAT32 0 #endif # 18 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 # 27 "/usr/include/x86_64-linux-gnu/bits/setjmp.h" 2 3 4 #ifndef _ASM #if 0 /* disabled by -frewrite-includes */ # if __WORDSIZE == 64 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 31 "/usr/include/x86_64-linux-gnu/bits/setjmp.h" 3 4 typedef long int __jmp_buf[8]; #if 0 /* disabled by -frewrite-includes */ #if 0 # elif defined __x86_64__ #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 33 "/usr/include/x86_64-linux-gnu/bits/setjmp.h" 3 4 __extension__ typedef long long int __jmp_buf[8]; # else # 35 "/usr/include/x86_64-linux-gnu/bits/setjmp.h" 3 4 typedef int __jmp_buf[6]; # endif # 37 "/usr/include/x86_64-linux-gnu/bits/setjmp.h" 3 4 #endif # 39 "/usr/include/x86_64-linux-gnu/bits/setjmp.h" 3 4 #endif /* bits/setjmp.h */ # 41 "/usr/include/x86_64-linux-gnu/bits/setjmp.h" 3 4 # 28 "/usr/include/pthread.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include <bits/wordsize.h> #endif /* expanded by -frewrite-includes */ # 28 "/usr/include/pthread.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 /* Determine the wordsize from the preprocessor defines. */ #if 0 /* disabled by -frewrite-includes */ #if defined __x86_64__ && !defined __ILP32__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 4 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 # define __WORDSIZE 64 #else # 6 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 # define __WORDSIZE 32 #define __WORDSIZE32_SIZE_ULONG 0 #define __WORDSIZE32_PTRDIFF_LONG 0 #endif # 10 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 #ifdef __x86_64__ # define __WORDSIZE_TIME64_COMPAT32 1 /* Both x86-64 and x32 use the 64-bit system call interface. */ # define __SYSCALL_WORDSIZE 64 #else # 16 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 # define __WORDSIZE_TIME64_COMPAT32 0 #endif # 18 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 # 29 "/usr/include/pthread.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include <bits/types/struct_timespec.h> #endif /* expanded by -frewrite-includes */ # 29 "/usr/include/pthread.h" 3 4 # 30 "/usr/include/pthread.h" 3 4 /* Detach state. */ enum { PTHREAD_CREATE_JOINABLE, #define PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_DETACHED #define PTHREAD_CREATE_DETACHED PTHREAD_CREATE_DETACHED }; /* Mutex types. */ enum { PTHREAD_MUTEX_TIMED_NP, PTHREAD_MUTEX_RECURSIVE_NP, PTHREAD_MUTEX_ERRORCHECK_NP, PTHREAD_MUTEX_ADAPTIVE_NP #if 0 /* disabled by -frewrite-includes */ #if defined __USE_UNIX98 || defined __USE_XOPEN2K8 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 50 "/usr/include/pthread.h" 3 4 , PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP, PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP, PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP, PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL #endif # 56 "/usr/include/pthread.h" 3 4 #ifdef __USE_GNU /* For compatibility. */ , PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_TIMED_NP #endif # 60 "/usr/include/pthread.h" 3 4 }; #ifdef __USE_XOPEN2K /* Robust mutex or not flags. */ enum { PTHREAD_MUTEX_STALLED, PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED, PTHREAD_MUTEX_ROBUST, PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST }; #endif # 73 "/usr/include/pthread.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_POSIX199506 || defined __USE_UNIX98 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 76 "/usr/include/pthread.h" 3 4 /* Mutex protocols. */ enum { PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT, PTHREAD_PRIO_PROTECT }; #endif # 84 "/usr/include/pthread.h" 3 4 #define PTHREAD_MUTEX_INITIALIZER \ { { __PTHREAD_MUTEX_INITIALIZER (PTHREAD_MUTEX_TIMED_NP) } } #ifdef __USE_GNU # define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \ { { __PTHREAD_MUTEX_INITIALIZER (PTHREAD_MUTEX_RECURSIVE_NP) } } # define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \ { { __PTHREAD_MUTEX_INITIALIZER (PTHREAD_MUTEX_ERRORCHECK_NP) } } # define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \ { { __PTHREAD_MUTEX_INITIALIZER (PTHREAD_MUTEX_ADAPTIVE_NP) } } #endif # 96 "/usr/include/pthread.h" 3 4 /* Read-write lock types. */ #if 0 /* disabled by -frewrite-includes */ #if defined __USE_UNIX98 || defined __USE_XOPEN2K #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 100 "/usr/include/pthread.h" 3 4 enum { PTHREAD_RWLOCK_PREFER_READER_NP, PTHREAD_RWLOCK_PREFER_WRITER_NP, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP }; /* Read-write lock initializers. */ # define PTHREAD_RWLOCK_INITIALIZER \ { { __PTHREAD_RWLOCK_INITIALIZER (PTHREAD_RWLOCK_DEFAULT_NP) } } # ifdef __USE_GNU # define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \ { { __PTHREAD_RWLOCK_INITIALIZER (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP) } } # endif # 116 "/usr/include/pthread.h" 3 4 #endif /* Unix98 or XOpen2K */ # 117 "/usr/include/pthread.h" 3 4 /* Scheduler inheritance. */ enum { PTHREAD_INHERIT_SCHED, #define PTHREAD_INHERIT_SCHED PTHREAD_INHERIT_SCHED PTHREAD_EXPLICIT_SCHED #define PTHREAD_EXPLICIT_SCHED PTHREAD_EXPLICIT_SCHED }; /* Scope handling. */ enum { PTHREAD_SCOPE_SYSTEM, #define PTHREAD_SCOPE_SYSTEM PTHREAD_SCOPE_SYSTEM PTHREAD_SCOPE_PROCESS #define PTHREAD_SCOPE_PROCESS PTHREAD_SCOPE_PROCESS }; /* Process shared or private flag. */ enum { PTHREAD_PROCESS_PRIVATE, #define PTHREAD_PROCESS_PRIVATE PTHREAD_PROCESS_PRIVATE PTHREAD_PROCESS_SHARED #define PTHREAD_PROCESS_SHARED PTHREAD_PROCESS_SHARED }; /* Conditional variable handling. */ #define PTHREAD_COND_INITIALIZER { { {0}, {0}, {0, 0}, {0, 0}, 0, 0, {0, 0} } } /* Cleanup buffers */ struct _pthread_cleanup_buffer { void (*__routine) (void *); /* Function to call. */ void *__arg; /* Its argument. */ int __canceltype; /* Saved cancellation type. */ struct _pthread_cleanup_buffer *__prev; /* Chaining of cleanup functions. */ }; /* Cancellation */ enum { PTHREAD_CANCEL_ENABLE, #define PTHREAD_CANCEL_ENABLE PTHREAD_CANCEL_ENABLE PTHREAD_CANCEL_DISABLE #define PTHREAD_CANCEL_DISABLE PTHREAD_CANCEL_DISABLE }; enum { PTHREAD_CANCEL_DEFERRED, #define PTHREAD_CANCEL_DEFERRED PTHREAD_CANCEL_DEFERRED PTHREAD_CANCEL_ASYNCHRONOUS #define PTHREAD_CANCEL_ASYNCHRONOUS PTHREAD_CANCEL_ASYNCHRONOUS }; #define PTHREAD_CANCELED ((void *) -1) /* Single execution handling. */ #define PTHREAD_ONCE_INIT 0 #ifdef __USE_XOPEN2K /* Value returned by 'pthread_barrier_wait' for one of the threads after the required number of threads have called this function. -1 is distinct from 0 and all errno constants */ # define PTHREAD_BARRIER_SERIAL_THREAD -1 #endif # 191 "/usr/include/pthread.h" 3 4 __BEGIN_DECLS /* Create a new thread, starting with execution of START-ROUTINE getting passed ARG. Creation attributed come from ATTR. The new handle is stored in *NEWTHREAD. */ extern int pthread_create (pthread_t *__restrict __newthread, const pthread_attr_t *__restrict __attr, void *(*__start_routine) (void *), void *__restrict __arg) __THROWNL __nonnull ((1, 3)); /* Terminate calling thread. The registered cleanup handlers are called via exception handling so we cannot mark this function with __THROW.*/ extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__)); /* Make calling thread wait for termination of the thread TH. The exit status of the thread is stored in *THREAD_RETURN, if THREAD_RETURN is not NULL. This function is a cancellation point and therefore not marked with __THROW. */ extern int pthread_join (pthread_t __th, void **__thread_return); #ifdef __USE_GNU /* Check whether thread TH has terminated. If yes return the status of the thread in *THREAD_RETURN, if THREAD_RETURN is not NULL. */ extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) __THROW; /* Make calling thread wait for termination of the thread TH, but only until TIMEOUT. The exit status of the thread is stored in *THREAD_RETURN, if THREAD_RETURN is not NULL. This function is a cancellation point and therefore not marked with __THROW. */ extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return, const struct timespec *__abstime); /* Make calling thread wait for termination of the thread TH, but only until TIMEOUT measured against the clock specified by CLOCKID. The exit status of the thread is stored in *THREAD_RETURN, if THREAD_RETURN is not NULL. This function is a cancellation point and therefore not marked with __THROW. */ extern int pthread_clockjoin_np (pthread_t __th, void **__thread_return, clockid_t __clockid, const struct timespec *__abstime); #endif # 242 "/usr/include/pthread.h" 3 4 /* Indicate that the thread TH is never to be joined with PTHREAD_JOIN. The resources of TH will therefore be freed immediately when it terminates, instead of waiting for another thread to perform PTHREAD_JOIN on it. */ extern int pthread_detach (pthread_t __th) __THROW; /* Obtain the identifier of the current thread. */ extern pthread_t pthread_self (void) __THROW __attribute__ ((__const__)); /* Compare two thread identifiers. */ extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) __THROW __attribute__ ((__const__)); /* Thread attribute handling. */ /* Initialize thread attribute *ATTR with default attributes (detachstate is PTHREAD_JOINABLE, scheduling policy is SCHED_OTHER, no user-provided stack). */ extern int pthread_attr_init (pthread_attr_t *__attr) __THROW __nonnull ((1)); /* Destroy thread attribute *ATTR. */ extern int pthread_attr_destroy (pthread_attr_t *__attr) __THROW __nonnull ((1)); /* Get detach state attribute. */ extern int pthread_attr_getdetachstate (const pthread_attr_t *__attr, int *__detachstate) __THROW __nonnull ((1, 2)); /* Set detach state attribute. */ extern int pthread_attr_setdetachstate (pthread_attr_t *__attr, int __detachstate) __THROW __nonnull ((1)); /* Get the size of the guard area created for stack overflow protection. */ extern int pthread_attr_getguardsize (const pthread_attr_t *__attr, size_t *__guardsize) __THROW __nonnull ((1, 2)); /* Set the size of the guard area created for stack overflow protection. */ extern int pthread_attr_setguardsize (pthread_attr_t *__attr, size_t __guardsize) __THROW __nonnull ((1)); /* Return in *PARAM the scheduling parameters of *ATTR. */ extern int pthread_attr_getschedparam (const pthread_attr_t *__restrict __attr, struct sched_param *__restrict __param) __THROW __nonnull ((1, 2)); /* Set scheduling parameters (priority, etc) in *ATTR according to PARAM. */ extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr, const struct sched_param *__restrict __param) __THROW __nonnull ((1, 2)); /* Return in *POLICY the scheduling policy of *ATTR. */ extern int pthread_attr_getschedpolicy (const pthread_attr_t *__restrict __attr, int *__restrict __policy) __THROW __nonnull ((1, 2)); /* Set scheduling policy in *ATTR according to POLICY. */ extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy) __THROW __nonnull ((1)); /* Return in *INHERIT the scheduling inheritance mode of *ATTR. */ extern int pthread_attr_getinheritsched (const pthread_attr_t *__restrict __attr, int *__restrict __inherit) __THROW __nonnull ((1, 2)); /* Set scheduling inheritance mode in *ATTR according to INHERIT. */ extern int pthread_attr_setinheritsched (pthread_attr_t *__attr, int __inherit) __THROW __nonnull ((1)); /* Return in *SCOPE the scheduling contention scope of *ATTR. */ extern int pthread_attr_getscope (const pthread_attr_t *__restrict __attr, int *__restrict __scope) __THROW __nonnull ((1, 2)); /* Set scheduling contention scope in *ATTR according to SCOPE. */ extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope) __THROW __nonnull ((1)); /* Return the previously set address for the stack. */ extern int pthread_attr_getstackaddr (const pthread_attr_t *__restrict __attr, void **__restrict __stackaddr) __THROW __nonnull ((1, 2)) __attribute_deprecated__; /* Set the starting address of the stack of the thread to be created. Depending on whether the stack grows up or down the value must either be higher or lower than all the address in the memory block. The minimal size of the block must be PTHREAD_STACK_MIN. */ extern int pthread_attr_setstackaddr (pthread_attr_t *__attr, void *__stackaddr) __THROW __nonnull ((1)) __attribute_deprecated__; /* Return the currently used minimal stack size. */ extern int pthread_attr_getstacksize (const pthread_attr_t *__restrict __attr, size_t *__restrict __stacksize) __THROW __nonnull ((1, 2)); /* Add information about the minimum stack size needed for the thread to be started. This size must never be less than PTHREAD_STACK_MIN and must also not exceed the system limits. */ extern int pthread_attr_setstacksize (pthread_attr_t *__attr, size_t __stacksize) __THROW __nonnull ((1)); #ifdef __USE_XOPEN2K /* Return the previously set address for the stack. */ extern int pthread_attr_getstack (const pthread_attr_t *__restrict __attr, void **__restrict __stackaddr, size_t *__restrict __stacksize) __THROW __nonnull ((1, 2, 3)); /* The following two interfaces are intended to replace the last two. They require setting the address as well as the size since only setting the address will make the implementation on some architectures impossible. */ extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, size_t __stacksize) __THROW __nonnull ((1)); #endif # 368 "/usr/include/pthread.h" 3 4 #ifdef __USE_GNU /* Thread created with attribute ATTR will be limited to run only on the processors represented in CPUSET. */ extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr, size_t __cpusetsize, const cpu_set_t *__cpuset) __THROW __nonnull ((1, 3)); /* Get bit set in CPUSET representing the processors threads created with ATTR can run on. */ extern int pthread_attr_getaffinity_np (const pthread_attr_t *__attr, size_t __cpusetsize, cpu_set_t *__cpuset) __THROW __nonnull ((1, 3)); /* Get the default attributes used by pthread_create in this process. */ extern int pthread_getattr_default_np (pthread_attr_t *__attr) __THROW __nonnull ((1)); /* Set the default attributes to be used by pthread_create in this process. */ extern int pthread_setattr_default_np (const pthread_attr_t *__attr) __THROW __nonnull ((1)); /* Initialize thread attribute *ATTR with attributes corresponding to the already running thread TH. It shall be called on uninitialized ATTR and destroyed with pthread_attr_destroy when no longer needed. */ extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) __THROW __nonnull ((2)); #endif # 399 "/usr/include/pthread.h" 3 4 /* Functions for scheduling control. */ /* Set the scheduling parameters for TARGET_THREAD according to POLICY and *PARAM. */ extern int pthread_setschedparam (pthread_t __target_thread, int __policy, const struct sched_param *__param) __THROW __nonnull ((3)); /* Return in *POLICY and *PARAM the scheduling parameters for TARGET_THREAD. */ extern int pthread_getschedparam (pthread_t __target_thread, int *__restrict __policy, struct sched_param *__restrict __param) __THROW __nonnull ((2, 3)); /* Set the scheduling priority for TARGET_THREAD. */ extern int pthread_setschedprio (pthread_t __target_thread, int __prio) __THROW; #ifdef __USE_GNU /* Get thread name visible in the kernel and its interfaces. */ extern int pthread_getname_np (pthread_t __target_thread, char *__buf, size_t __buflen) __THROW __nonnull ((2)); /* Set thread name visible in the kernel and its interfaces. */ extern int pthread_setname_np (pthread_t __target_thread, const char *__name) __THROW __nonnull ((2)); #endif # 430 "/usr/include/pthread.h" 3 4 #ifdef __USE_UNIX98 /* Determine level of concurrency. */ extern int pthread_getconcurrency (void) __THROW; /* Set new concurrency level to LEVEL. */ extern int pthread_setconcurrency (int __level) __THROW; #endif # 439 "/usr/include/pthread.h" 3 4 #ifdef __USE_GNU /* Yield the processor to another thread or process. This function is similar to the POSIX `sched_yield' function but might be differently implemented in the case of a m-on-n thread implementation. */ extern int pthread_yield (void) __THROW; /* Limit specified thread TH to run only on the processors represented in CPUSET. */ extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize, const cpu_set_t *__cpuset) __THROW __nonnull ((3)); /* Get bit set in CPUSET representing the processors TH can run on. */ extern int pthread_getaffinity_np (pthread_t __th, size_t __cpusetsize, cpu_set_t *__cpuset) __THROW __nonnull ((3)); #endif # 459 "/usr/include/pthread.h" 3 4 /* Functions for handling initialization. */ /* Guarantee that the initialization function INIT_ROUTINE will be called only once, even if pthread_once is executed several times with the same ONCE_CONTROL argument. ONCE_CONTROL must point to a static or extern variable initialized to PTHREAD_ONCE_INIT. The initialization functions might throw exception which is why this function is not marked with __THROW. */ extern int pthread_once (pthread_once_t *__once_control, void (*__init_routine) (void)) __nonnull ((1, 2)); /* Functions for handling cancellation. Note that these functions are explicitly not marked to not throw an exception in C++ code. If cancellation is implemented by unwinding this is necessary to have the compiler generate the unwind information. */ /* Set cancelability state of current thread to STATE, returning old state in *OLDSTATE if OLDSTATE is not NULL. */ extern int pthread_setcancelstate (int __state, int *__oldstate); /* Set cancellation state of current thread to TYPE, returning the old type in *OLDTYPE if OLDTYPE is not NULL. */ extern int pthread_setcanceltype (int __type, int *__oldtype); /* Cancel THREAD immediately or at the next possibility. */ extern int pthread_cancel (pthread_t __th); /* Test for pending cancellation for the current thread and terminate the thread as per pthread_exit(PTHREAD_CANCELED) if it has been cancelled. */ extern void pthread_testcancel (void); /* Cancellation handling with integration into exception handling. */ typedef struct { struct { __jmp_buf __cancel_jmp_buf; int __mask_was_saved; } __cancel_jmp_buf[1]; void *__pad[4]; } __pthread_unwind_buf_t __attribute__ ((__aligned__)); /* No special attributes by default. */ #ifndef __cleanup_fct_attribute # define __cleanup_fct_attribute #endif # 513 "/usr/include/pthread.h" 3 4 /* Structure to hold the cleanup handler information. */ struct __pthread_cleanup_frame { void (*__cancel_routine) (void *); void *__cancel_arg; int __do_it; int __cancel_type; }; #if 0 /* disabled by -frewrite-includes */ #if defined __GNUC__ && defined __EXCEPTIONS #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 525 "/usr/include/pthread.h" 3 4 # ifdef __cplusplus /* Class to handle cancellation handler invocation. */ class __pthread_cleanup_class { void (*__cancel_routine) (void *); void *__cancel_arg; int __do_it; int __cancel_type; public: __pthread_cleanup_class (void (*__fct) (void *), void *__arg) : __cancel_routine (__fct), __cancel_arg (__arg), __do_it (1) { } ~__pthread_cleanup_class () { if (__do_it) __cancel_routine (__cancel_arg); } void __setdoit (int __newval) { __do_it = __newval; } void __defer () { pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED, &__cancel_type); } void __restore () const { pthread_setcanceltype (__cancel_type, 0); } }; /* Install a cleanup handler: ROUTINE will be called with arguments ARG when the thread is canceled or calls pthread_exit. ROUTINE will also be called with arguments ARG when the matching pthread_cleanup_pop is executed with non-zero EXECUTE argument. pthread_cleanup_push and pthread_cleanup_pop are macros and must always be used in matching pairs at the same nesting level of braces. */ # define pthread_cleanup_push(routine, arg) \ do { \ __pthread_cleanup_class __clframe (routine, arg) /* Remove a cleanup handler installed by the matching pthread_cleanup_push. If EXECUTE is non-zero, the handler function is called. */ # define pthread_cleanup_pop(execute) \ __clframe.__setdoit (execute); \ } while (0) # ifdef __USE_GNU /* Install a cleanup handler as pthread_cleanup_push does, but also saves the current cancellation type and sets it to deferred cancellation. */ # define pthread_cleanup_push_defer_np(routine, arg) \ do { \ __pthread_cleanup_class __clframe (routine, arg); \ __clframe.__defer () /* Remove a cleanup handler as pthread_cleanup_pop does, but also restores the cancellation type that was in effect when the matching pthread_cleanup_push_defer was called. */ # define pthread_cleanup_pop_restore_np(execute) \ __clframe.__restore (); \ __clframe.__setdoit (execute); \ } while (0) # endif # 578 "/usr/include/pthread.h" 3 4 # else # 579 "/usr/include/pthread.h" 3 4 /* Function called to call the cleanup handler. As an extern inline function the compiler is free to decide inlining the change when needed or fall back on the copy which must exist somewhere else. */ __extern_inline void __pthread_cleanup_routine (struct __pthread_cleanup_frame *__frame) { if (__frame->__do_it) __frame->__cancel_routine (__frame->__cancel_arg); } /* Install a cleanup handler: ROUTINE will be called with arguments ARG when the thread is canceled or calls pthread_exit. ROUTINE will also be called with arguments ARG when the matching pthread_cleanup_pop is executed with non-zero EXECUTE argument. pthread_cleanup_push and pthread_cleanup_pop are macros and must always be used in matching pairs at the same nesting level of braces. */ # define pthread_cleanup_push(routine, arg) \ do { \ struct __pthread_cleanup_frame __clframe \ __attribute__ ((__cleanup__ (__pthread_cleanup_routine))) \ = { .__cancel_routine = (routine), .__cancel_arg = (arg), \ .__do_it = 1 }; /* Remove a cleanup handler installed by the matching pthread_cleanup_push. If EXECUTE is non-zero, the handler function is called. */ # define pthread_cleanup_pop(execute) \ __clframe.__do_it = (execute); \ } while (0) # ifdef __USE_GNU /* Install a cleanup handler as pthread_cleanup_push does, but also saves the current cancellation type and sets it to deferred cancellation. */ # define pthread_cleanup_push_defer_np(routine, arg) \ do { \ struct __pthread_cleanup_frame __clframe \ __attribute__ ((__cleanup__ (__pthread_cleanup_routine))) \ = { .__cancel_routine = (routine), .__cancel_arg = (arg), \ .__do_it = 1 }; \ (void) pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED, \ &__clframe.__cancel_type) /* Remove a cleanup handler as pthread_cleanup_pop does, but also restores the cancellation type that was in effect when the matching pthread_cleanup_push_defer was called. */ # define pthread_cleanup_pop_restore_np(execute) \ (void) pthread_setcanceltype (__clframe.__cancel_type, NULL); \ __clframe.__do_it = (execute); \ } while (0) # endif # 631 "/usr/include/pthread.h" 3 4 # endif # 632 "/usr/include/pthread.h" 3 4 #else # 633 "/usr/include/pthread.h" 3 4 /* Install a cleanup handler: ROUTINE will be called with arguments ARG when the thread is canceled or calls pthread_exit. ROUTINE will also be called with arguments ARG when the matching pthread_cleanup_pop is executed with non-zero EXECUTE argument. pthread_cleanup_push and pthread_cleanup_pop are macros and must always be used in matching pairs at the same nesting level of braces. */ # define pthread_cleanup_push(routine, arg) \ do { \ __pthread_unwind_buf_t __cancel_buf; \ void (*__cancel_routine) (void *) = (routine); \ void *__cancel_arg = (arg); \ int __not_first_call = __sigsetjmp ((struct __jmp_buf_tag *) (void *) \ __cancel_buf.__cancel_jmp_buf, 0); \ if (__glibc_unlikely (__not_first_call)) \ { \ __cancel_routine (__cancel_arg); \ __pthread_unwind_next (&__cancel_buf); \ /* NOTREACHED */ \ } \ \ __pthread_register_cancel (&__cancel_buf); \ do { extern void __pthread_register_cancel (__pthread_unwind_buf_t *__buf) __cleanup_fct_attribute; /* Remove a cleanup handler installed by the matching pthread_cleanup_push. If EXECUTE is non-zero, the handler function is called. */ # define pthread_cleanup_pop(execute) \ do { } while (0);/* Empty to allow label before pthread_cleanup_pop. */\ } while (0); \ __pthread_unregister_cancel (&__cancel_buf); \ if (execute) \ __cancel_routine (__cancel_arg); \ } while (0) extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf) __cleanup_fct_attribute; # ifdef __USE_GNU /* Install a cleanup handler as pthread_cleanup_push does, but also saves the current cancellation type and sets it to deferred cancellation. */ # define pthread_cleanup_push_defer_np(routine, arg) \ do { \ __pthread_unwind_buf_t __cancel_buf; \ void (*__cancel_routine) (void *) = (routine); \ void *__cancel_arg = (arg); \ int __not_first_call = __sigsetjmp ((struct __jmp_buf_tag *) (void *) \ __cancel_buf.__cancel_jmp_buf, 0); \ if (__glibc_unlikely (__not_first_call)) \ { \ __cancel_routine (__cancel_arg); \ __pthread_unwind_next (&__cancel_buf); \ /* NOTREACHED */ \ } \ \ __pthread_register_cancel_defer (&__cancel_buf); \ do { extern void __pthread_register_cancel_defer (__pthread_unwind_buf_t *__buf) __cleanup_fct_attribute; /* Remove a cleanup handler as pthread_cleanup_pop does, but also restores the cancellation type that was in effect when the matching pthread_cleanup_push_defer was called. */ # define pthread_cleanup_pop_restore_np(execute) \ do { } while (0);/* Empty to allow label before pthread_cleanup_pop. */\ } while (0); \ __pthread_unregister_cancel_restore (&__cancel_buf); \ if (execute) \ __cancel_routine (__cancel_arg); \ } while (0) extern void __pthread_unregister_cancel_restore (__pthread_unwind_buf_t *__buf) __cleanup_fct_attribute; # endif # 707 "/usr/include/pthread.h" 3 4 /* Internal interface to initiate cleanup. */ extern void __pthread_unwind_next (__pthread_unwind_buf_t *__buf) __cleanup_fct_attribute __attribute__ ((__noreturn__)) # ifndef SHARED __attribute__ ((__weak__)) # endif # 714 "/usr/include/pthread.h" 3 4 ; #endif # 716 "/usr/include/pthread.h" 3 4 /* Function used in the macros. */ struct __jmp_buf_tag; extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __THROWNL; /* Mutex handling. */ /* Initialize a mutex. */ extern int pthread_mutex_init (pthread_mutex_t *__mutex, const pthread_mutexattr_t *__mutexattr) __THROW __nonnull ((1)); /* Destroy a mutex. */ extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) __THROW __nonnull ((1)); /* Try locking a mutex. */ extern int pthread_mutex_trylock (pthread_mutex_t *__mutex) __THROWNL __nonnull ((1)); /* Lock a mutex. */ extern int pthread_mutex_lock (pthread_mutex_t *__mutex) __THROWNL __nonnull ((1)); #ifdef __USE_XOPEN2K /* Wait until lock becomes available, or specified time passes. */ extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex, const struct timespec *__restrict __abstime) __THROWNL __nonnull ((1, 2)); #endif # 747 "/usr/include/pthread.h" 3 4 #ifdef __USE_GNU extern int pthread_mutex_clocklock (pthread_mutex_t *__restrict __mutex, clockid_t __clockid, const struct timespec *__restrict __abstime) __THROWNL __nonnull ((1, 3)); #endif # 754 "/usr/include/pthread.h" 3 4 /* Unlock a mutex. */ extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) __THROWNL __nonnull ((1)); /* Get the priority ceiling of MUTEX. */ extern int pthread_mutex_getprioceiling (const pthread_mutex_t * __restrict __mutex, int *__restrict __prioceiling) __THROW __nonnull ((1, 2)); /* Set the priority ceiling of MUTEX to PRIOCEILING, return old priority ceiling value in *OLD_CEILING. */ extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex, int __prioceiling, int *__restrict __old_ceiling) __THROW __nonnull ((1, 3)); #ifdef __USE_XOPEN2K8 /* Declare the state protected by MUTEX as consistent. */ extern int pthread_mutex_consistent (pthread_mutex_t *__mutex) __THROW __nonnull ((1)); # ifdef __USE_GNU extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex) __THROW __nonnull ((1)); # endif # 782 "/usr/include/pthread.h" 3 4 #endif # 783 "/usr/include/pthread.h" 3 4 /* Functions for handling mutex attributes. */ /* Initialize mutex attribute object ATTR with default attributes (kind is PTHREAD_MUTEX_TIMED_NP). */ extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr) __THROW __nonnull ((1)); /* Destroy mutex attribute object ATTR. */ extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) __THROW __nonnull ((1)); /* Get the process-shared flag of the mutex attribute ATTR. */ extern int pthread_mutexattr_getpshared (const pthread_mutexattr_t * __restrict __attr, int *__restrict __pshared) __THROW __nonnull ((1, 2)); /* Set the process-shared flag of the mutex attribute ATTR. */ extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr, int __pshared) __THROW __nonnull ((1)); #if 0 /* disabled by -frewrite-includes */ #if defined __USE_UNIX98 || defined __USE_XOPEN2K8 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 808 "/usr/include/pthread.h" 3 4 /* Return in *KIND the mutex kind attribute in *ATTR. */ extern int pthread_mutexattr_gettype (const pthread_mutexattr_t *__restrict __attr, int *__restrict __kind) __THROW __nonnull ((1, 2)); /* Set the mutex kind attribute in *ATTR to KIND (either PTHREAD_MUTEX_NORMAL, PTHREAD_MUTEX_RECURSIVE, PTHREAD_MUTEX_ERRORCHECK, or PTHREAD_MUTEX_DEFAULT). */ extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind) __THROW __nonnull ((1)); #endif # 819 "/usr/include/pthread.h" 3 4 /* Return in *PROTOCOL the mutex protocol attribute in *ATTR. */ extern int pthread_mutexattr_getprotocol (const pthread_mutexattr_t * __restrict __attr, int *__restrict __protocol) __THROW __nonnull ((1, 2)); /* Set the mutex protocol attribute in *ATTR to PROTOCOL (either PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT, or PTHREAD_PRIO_PROTECT). */ extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr, int __protocol) __THROW __nonnull ((1)); /* Return in *PRIOCEILING the mutex prioceiling attribute in *ATTR. */ extern int pthread_mutexattr_getprioceiling (const pthread_mutexattr_t * __restrict __attr, int *__restrict __prioceiling) __THROW __nonnull ((1, 2)); /* Set the mutex prioceiling attribute in *ATTR to PRIOCEILING. */ extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr, int __prioceiling) __THROW __nonnull ((1)); #ifdef __USE_XOPEN2K /* Get the robustness flag of the mutex attribute ATTR. */ extern int pthread_mutexattr_getrobust (const pthread_mutexattr_t *__attr, int *__robustness) __THROW __nonnull ((1, 2)); # ifdef __USE_GNU extern int pthread_mutexattr_getrobust_np (const pthread_mutexattr_t *__attr, int *__robustness) __THROW __nonnull ((1, 2)); # endif # 853 "/usr/include/pthread.h" 3 4 /* Set the robustness flag of the mutex attribute ATTR. */ extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr, int __robustness) __THROW __nonnull ((1)); # ifdef __USE_GNU extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr, int __robustness) __THROW __nonnull ((1)); # endif # 863 "/usr/include/pthread.h" 3 4 #endif # 864 "/usr/include/pthread.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_UNIX98 || defined __USE_XOPEN2K #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 867 "/usr/include/pthread.h" 3 4 /* Functions for handling read-write locks. */ /* Initialize read-write lock RWLOCK using attributes ATTR, or use the default values if later is NULL. */ extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock, const pthread_rwlockattr_t *__restrict __attr) __THROW __nonnull ((1)); /* Destroy read-write lock RWLOCK. */ extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock) __THROW __nonnull ((1)); /* Acquire read lock for RWLOCK. */ extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock) __THROWNL __nonnull ((1)); /* Try to acquire read lock for RWLOCK. */ extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) __THROWNL __nonnull ((1)); # ifdef __USE_XOPEN2K /* Try to acquire read lock for RWLOCK or return after specfied time. */ extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock, const struct timespec *__restrict __abstime) __THROWNL __nonnull ((1, 2)); # endif # 893 "/usr/include/pthread.h" 3 4 # ifdef __USE_GNU extern int pthread_rwlock_clockrdlock (pthread_rwlock_t *__restrict __rwlock, clockid_t __clockid, const struct timespec *__restrict __abstime) __THROWNL __nonnull ((1, 3)); # endif # 900 "/usr/include/pthread.h" 3 4 /* Acquire write lock for RWLOCK. */ extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) __THROWNL __nonnull ((1)); /* Try to acquire write lock for RWLOCK. */ extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) __THROWNL __nonnull ((1)); # ifdef __USE_XOPEN2K /* Try to acquire write lock for RWLOCK or return after specfied time. */ extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock, const struct timespec *__restrict __abstime) __THROWNL __nonnull ((1, 2)); # endif # 915 "/usr/include/pthread.h" 3 4 # ifdef __USE_GNU extern int pthread_rwlock_clockwrlock (pthread_rwlock_t *__restrict __rwlock, clockid_t __clockid, const struct timespec *__restrict __abstime) __THROWNL __nonnull ((1, 3)); # endif # 922 "/usr/include/pthread.h" 3 4 /* Unlock RWLOCK. */ extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) __THROWNL __nonnull ((1)); /* Functions for handling read-write lock attributes. */ /* Initialize attribute object ATTR with default values. */ extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr) __THROW __nonnull ((1)); /* Destroy attribute object ATTR. */ extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) __THROW __nonnull ((1)); /* Return current setting of process-shared attribute of ATTR in PSHARED. */ extern int pthread_rwlockattr_getpshared (const pthread_rwlockattr_t * __restrict __attr, int *__restrict __pshared) __THROW __nonnull ((1, 2)); /* Set process-shared attribute of ATTR to PSHARED. */ extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr, int __pshared) __THROW __nonnull ((1)); /* Return current setting of reader/writer preference. */ extern int pthread_rwlockattr_getkind_np (const pthread_rwlockattr_t * __restrict __attr, int *__restrict __pref) __THROW __nonnull ((1, 2)); /* Set reader/write preference. */ extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr, int __pref) __THROW __nonnull ((1)); #endif # 959 "/usr/include/pthread.h" 3 4 /* Functions for handling conditional variables. */ /* Initialize condition variable COND using attributes ATTR, or use the default values if later is NULL. */ extern int pthread_cond_init (pthread_cond_t *__restrict __cond, const pthread_condattr_t *__restrict __cond_attr) __THROW __nonnull ((1)); /* Destroy condition variable COND. */ extern int pthread_cond_destroy (pthread_cond_t *__cond) __THROW __nonnull ((1)); /* Wake up one thread waiting for condition variable COND. */ extern int pthread_cond_signal (pthread_cond_t *__cond) __THROWNL __nonnull ((1)); /* Wake up all threads waiting for condition variables COND. */ extern int pthread_cond_broadcast (pthread_cond_t *__cond) __THROWNL __nonnull ((1)); /* Wait for condition variable COND to be signaled or broadcast. MUTEX is assumed to be locked before. This function is a cancellation point and therefore not marked with __THROW. */ extern int pthread_cond_wait (pthread_cond_t *__restrict __cond, pthread_mutex_t *__restrict __mutex) __nonnull ((1, 2)); /* Wait for condition variable COND to be signaled or broadcast until ABSTIME. MUTEX is assumed to be locked before. ABSTIME is an absolute time specification; zero is the beginning of the epoch (00:00:00 GMT, January 1, 1970). This function is a cancellation point and therefore not marked with __THROW. */ extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond, pthread_mutex_t *__restrict __mutex, const struct timespec *__restrict __abstime) __nonnull ((1, 2, 3)); # ifdef __USE_GNU /* Wait for condition variable COND to be signaled or broadcast until ABSTIME measured by the specified clock. MUTEX is assumed to be locked before. CLOCK is the clock to use. ABSTIME is an absolute time specification against CLOCK's epoch. This function is a cancellation point and therefore not marked with __THROW. */ extern int pthread_cond_clockwait (pthread_cond_t *__restrict __cond, pthread_mutex_t *__restrict __mutex, __clockid_t __clock_id, const struct timespec *__restrict __abstime) __nonnull ((1, 2, 4)); # endif # 1016 "/usr/include/pthread.h" 3 4 /* Functions for handling condition variable attributes. */ /* Initialize condition variable attribute ATTR. */ extern int pthread_condattr_init (pthread_condattr_t *__attr) __THROW __nonnull ((1)); /* Destroy condition variable attribute ATTR. */ extern int pthread_condattr_destroy (pthread_condattr_t *__attr) __THROW __nonnull ((1)); /* Get the process-shared flag of the condition variable attribute ATTR. */ extern int pthread_condattr_getpshared (const pthread_condattr_t * __restrict __attr, int *__restrict __pshared) __THROW __nonnull ((1, 2)); /* Set the process-shared flag of the condition variable attribute ATTR. */ extern int pthread_condattr_setpshared (pthread_condattr_t *__attr, int __pshared) __THROW __nonnull ((1)); #ifdef __USE_XOPEN2K /* Get the clock selected for the condition variable attribute ATTR. */ extern int pthread_condattr_getclock (const pthread_condattr_t * __restrict __attr, __clockid_t *__restrict __clock_id) __THROW __nonnull ((1, 2)); /* Set the clock selected for the condition variable attribute ATTR. */ extern int pthread_condattr_setclock (pthread_condattr_t *__attr, __clockid_t __clock_id) __THROW __nonnull ((1)); #endif # 1049 "/usr/include/pthread.h" 3 4 #ifdef __USE_XOPEN2K /* Functions to handle spinlocks. */ /* Initialize the spinlock LOCK. If PSHARED is nonzero the spinlock can be shared between different processes. */ extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared) __THROW __nonnull ((1)); /* Destroy the spinlock LOCK. */ extern int pthread_spin_destroy (pthread_spinlock_t *__lock) __THROW __nonnull ((1)); /* Wait until spinlock LOCK is retrieved. */ extern int pthread_spin_lock (pthread_spinlock_t *__lock) __THROWNL __nonnull ((1)); /* Try to lock spinlock LOCK. */ extern int pthread_spin_trylock (pthread_spinlock_t *__lock) __THROWNL __nonnull ((1)); /* Release spinlock LOCK. */ extern int pthread_spin_unlock (pthread_spinlock_t *__lock) __THROWNL __nonnull ((1)); /* Functions to handle barriers. */ /* Initialize BARRIER with the attributes in ATTR. The barrier is opened when COUNT waiters arrived. */ extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier, const pthread_barrierattr_t *__restrict __attr, unsigned int __count) __THROW __nonnull ((1)); /* Destroy a previously dynamically initialized barrier BARRIER. */ extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) __THROW __nonnull ((1)); /* Wait on barrier BARRIER. */ extern int pthread_barrier_wait (pthread_barrier_t *__barrier) __THROWNL __nonnull ((1)); /* Initialize barrier attribute ATTR. */ extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr) __THROW __nonnull ((1)); /* Destroy previously dynamically initialized barrier attribute ATTR. */ extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) __THROW __nonnull ((1)); /* Get the process-shared flag of the barrier attribute ATTR. */ extern int pthread_barrierattr_getpshared (const pthread_barrierattr_t * __restrict __attr, int *__restrict __pshared) __THROW __nonnull ((1, 2)); /* Set the process-shared flag of the barrier attribute ATTR. */ extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr, int __pshared) __THROW __nonnull ((1)); #endif # 1113 "/usr/include/pthread.h" 3 4 /* Functions for handling thread-specific data. */ /* Create a key value identifying a location in the thread-specific data area. Each thread maintains a distinct thread-specific data area. DESTR_FUNCTION, if non-NULL, is called with the value associated to that key when the key is destroyed. DESTR_FUNCTION is not called if the value associated is NULL when the key is destroyed. */ extern int pthread_key_create (pthread_key_t *__key, void (*__destr_function) (void *)) __THROW __nonnull ((1)); /* Destroy KEY. */ extern int pthread_key_delete (pthread_key_t __key) __THROW; /* Return current value of the thread-specific data slot identified by KEY. */ extern void *pthread_getspecific (pthread_key_t __key) __THROW; /* Store POINTER in the thread-specific data slot identified by KEY. */ extern int pthread_setspecific (pthread_key_t __key, const void *__pointer) __THROW ; #ifdef __USE_XOPEN2K /* Get ID of CPU-time clock for thread THREAD_ID. */ extern int pthread_getcpuclockid (pthread_t __thread_id, __clockid_t *__clock_id) __THROW __nonnull ((2)); #endif # 1144 "/usr/include/pthread.h" 3 4 /* Install handlers to be called when a new process is created with FORK. The PREPARE handler is called in the parent process just before performing FORK. The PARENT handler is called in the parent process just after FORK. The CHILD handler is called in the child process. Each of the three handlers can be NULL, meaning that no handler needs to be called at that point. PTHREAD_ATFORK can be called several times, in which case the PREPARE handlers are called in LIFO order (last added with PTHREAD_ATFORK, first called before FORK), and the PARENT and CHILD handlers are called in FIFO (first added, first called). */ extern int pthread_atfork (void (*__prepare) (void), void (*__parent) (void), void (*__child) (void)) __THROW; #ifdef __USE_EXTERN_INLINES /* Optimizations. */ __extern_inline int __NTH (pthread_equal (pthread_t __thread1, pthread_t __thread2)) { return __thread1 == __thread2; } #endif # 1170 "/usr/include/pthread.h" 3 4 __END_DECLS #endif /* pthread.h */ # 1174 "/usr/include/pthread.h" 3 4 # 36 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 2 3 #if 0 /* disabled by -frewrite-includes */ #if ((defined(_LIBOBJC) || defined(_LIBOBJC_WEAK)) \ || !defined(_GTHREAD_USE_MUTEX_TIMEDLOCK)) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 39 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 #if 0 /* expanded by -frewrite-includes */ # include <unistd.h> #endif /* expanded by -frewrite-includes */ # 39 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 # 40 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 #if 0 /* disabled by -frewrite-includes */ # if defined(_POSIX_TIMEOUTS) && _POSIX_TIMEOUTS >= 0 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 41 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 # define _GTHREAD_USE_MUTEX_TIMEDLOCK 1 # else # 43 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 # define _GTHREAD_USE_MUTEX_TIMEDLOCK 0 # endif # 45 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 #endif # 46 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 typedef pthread_t __gthread_t; typedef pthread_key_t __gthread_key_t; typedef pthread_once_t __gthread_once_t; typedef pthread_mutex_t __gthread_mutex_t; typedef pthread_mutex_t __gthread_recursive_mutex_t; typedef pthread_cond_t __gthread_cond_t; typedef struct timespec __gthread_time_t; /* POSIX like conditional variables are supported. Please look at comments in gthr.h for details. */ #define __GTHREAD_HAS_COND 1 #define __GTHREAD_MUTEX_INIT PTHREAD_MUTEX_INITIALIZER #define __GTHREAD_MUTEX_INIT_FUNCTION __gthread_mutex_init_function #define __GTHREAD_ONCE_INIT PTHREAD_ONCE_INIT #if 0 /* disabled by -frewrite-includes */ #if defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 63 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 #define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER #if 0 /* disabled by -frewrite-includes */ #if 0 #elif defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP) #endif #endif /* disabled by -frewrite-includes */ #elif 1 /* evaluated by -frewrite-includes */ # 65 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 #define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP #else # 67 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 #define __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION __gthread_recursive_mutex_init_function #endif # 69 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 #define __GTHREAD_COND_INIT PTHREAD_COND_INITIALIZER #define __GTHREAD_TIME_INIT {0,0} #ifdef _GTHREAD_USE_MUTEX_INIT_FUNC # undef __GTHREAD_MUTEX_INIT #endif # 75 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 #ifdef _GTHREAD_USE_RECURSIVE_MUTEX_INIT_FUNC # undef __GTHREAD_RECURSIVE_MUTEX_INIT # undef __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION # define __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION __gthread_recursive_mutex_init_function #endif # 80 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 #ifdef _GTHREAD_USE_COND_INIT_FUNC # undef __GTHREAD_COND_INIT # define __GTHREAD_COND_INIT_FUNCTION __gthread_cond_init_function #endif # 84 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __GXX_WEAK__ && _GLIBCXX_GTHREAD_USE_WEAK #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 86 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 # ifndef __gthrw_pragma # define __gthrw_pragma(pragma) # endif # 89 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 # define __gthrw2(name,name2,type) \ static __typeof(type) name \ __attribute__ ((__weakref__(#name2), __copy__ (type))); \ __gthrw_pragma(weak type) # define __gthrw_(name) __gthrw_ ## name #else # 95 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 # define __gthrw2(name,name2,type) # define __gthrw_(name) name #endif # 98 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 /* Typically, __gthrw_foo is a weak reference to symbol foo. */ #define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name) __gthrw(pthread_once) __gthrw(pthread_getspecific) __gthrw(pthread_setspecific) __gthrw(pthread_create) __gthrw(pthread_join) __gthrw(pthread_equal) __gthrw(pthread_self) __gthrw(pthread_detach) #ifndef __BIONIC__ __gthrw(pthread_cancel) #endif # 114 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 __gthrw(sched_yield) __gthrw(pthread_mutex_lock) __gthrw(pthread_mutex_trylock) #if 0 /* disabled by -frewrite-includes */ #if _GTHREAD_USE_MUTEX_TIMEDLOCK #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 119 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 __gthrw(pthread_mutex_timedlock) #endif # 121 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 __gthrw(pthread_mutex_unlock) __gthrw(pthread_mutex_init) __gthrw(pthread_mutex_destroy) __gthrw(pthread_cond_init) __gthrw(pthread_cond_broadcast) __gthrw(pthread_cond_signal) __gthrw(pthread_cond_wait) __gthrw(pthread_cond_timedwait) __gthrw(pthread_cond_destroy) __gthrw(pthread_key_create) __gthrw(pthread_key_delete) __gthrw(pthread_mutexattr_init) __gthrw(pthread_mutexattr_settype) __gthrw(pthread_mutexattr_destroy) #if 0 /* disabled by -frewrite-includes */ #if defined(_LIBOBJC) || defined(_LIBOBJC_WEAK) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 140 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 /* Objective-C. */ __gthrw(pthread_exit) #ifdef _POSIX_PRIORITY_SCHEDULING #ifdef _POSIX_THREAD_PRIORITY_SCHEDULING __gthrw(sched_get_priority_max) __gthrw(sched_get_priority_min) #endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */ # 147 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 #endif /* _POSIX_PRIORITY_SCHEDULING */ # 148 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 __gthrw(pthread_attr_destroy) __gthrw(pthread_attr_init) __gthrw(pthread_attr_setdetachstate) #ifdef _POSIX_THREAD_PRIORITY_SCHEDULING __gthrw(pthread_getschedparam) __gthrw(pthread_setschedparam) #endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */ # 155 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 #endif /* _LIBOBJC || _LIBOBJC_WEAK */ # 156 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __GXX_WEAK__ && _GLIBCXX_GTHREAD_USE_WEAK #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 158 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 /* On Solaris 2.6 up to 9, the libc exposes a POSIX threads interface even if -pthreads is not specified. The functions are dummies and most return an error value. However pthread_once returns 0 without invoking the routine it is passed so we cannot pretend that the interface is active if -pthreads is not specified. On Solaris 2.5.1, the interface is not exposed at all so we need to play the usual game with weak symbols. On Solaris 10 and up, a working interface is always exposed. On FreeBSD 6 and later, libc also exposes a dummy POSIX threads interface, similar to what Solaris 2.6 up to 9 does. FreeBSD >= 700014 even provides a pthread_cancel stub in libc, which means the alternate __gthread_active_p below cannot be used there. */ #if 0 /* disabled by -frewrite-includes */ #if defined(__FreeBSD__) || (defined(__sun) && defined(__svr4__)) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 171 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 static volatile int __gthread_active = -1; static void __gthread_trigger (void) { __gthread_active = 1; } static inline int __gthread_active_p (void) { static pthread_mutex_t __gthread_active_mutex = PTHREAD_MUTEX_INITIALIZER; static pthread_once_t __gthread_active_once = PTHREAD_ONCE_INIT; /* Avoid reading __gthread_active twice on the main code path. */ int __gthread_active_latest_value = __gthread_active; /* This test is not protected to avoid taking a lock on the main code path so every update of __gthread_active in a threaded program must be atomic with regard to the result of the test. */ if (__builtin_expect (__gthread_active_latest_value < 0, 0)) { if (__gthrw_(pthread_once)) { /* If this really is a threaded program, then we must ensure that __gthread_active has been set to 1 before exiting this block. */ __gthrw_(pthread_mutex_lock) (&__gthread_active_mutex); __gthrw_(pthread_once) (&__gthread_active_once, __gthread_trigger); __gthrw_(pthread_mutex_unlock) (&__gthread_active_mutex); } /* Make sure we'll never enter this block again. */ if (__gthread_active < 0) __gthread_active = 0; __gthread_active_latest_value = __gthread_active; } return __gthread_active_latest_value != 0; } #else /* neither FreeBSD nor Solaris */ # 214 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 /* For a program to be multi-threaded the only thing that it certainly must be using is pthread_create. However, there may be other libraries that intercept pthread_create with their own definitions to wrap pthreads functionality for some purpose. In those cases, pthread_create being defined might not necessarily mean that libpthread is actually linked in. For the GNU C library, we can use a known internal name. This is always available in the ABI, but no other library would define it. That is ideal, since any public pthread function might be intercepted just as pthread_create might be. __pthread_key_create is an "internal" implementation symbol, but it is part of the public exported ABI. Also, it's among the symbols that the static libpthread.a always links in whenever pthread_create is used, so there is no danger of a false negative result in any statically-linked, multi-threaded program. For others, we choose pthread_cancel as a function that seems unlikely to be redefined by an interceptor library. The bionic (Android) C library does not provide pthread_cancel, so we do use pthread_create there (and interceptor libraries lose). */ #ifdef __GLIBC__ __gthrw2(__gthrw_(__pthread_key_create), __pthread_key_create, pthread_key_create) # define GTHR_ACTIVE_PROXY __gthrw_(__pthread_key_create) #if 0 /* disabled by -frewrite-includes */ #if 0 #elif defined (__BIONIC__) #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 242 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 # define GTHR_ACTIVE_PROXY __gthrw_(pthread_create) #else # 244 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 # define GTHR_ACTIVE_PROXY __gthrw_(pthread_cancel) #endif # 246 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 static inline int __gthread_active_p (void) { static void *const __gthread_active_ptr = __extension__ (void *) >HR_ACTIVE_PROXY; return __gthread_active_ptr != 0; } #endif /* FreeBSD or Solaris */ # 256 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 #else /* not __GXX_WEAK__ */ # 258 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 /* Similar to Solaris, HP-UX 11 for PA-RISC provides stubs for pthread calls in shared flavors of the HP-UX C library. Most of the stubs have no functionality. The details are described in the "libc cumulative patch" for each subversion of HP-UX 11. There are two special interfaces provided for checking whether an application is linked to a shared pthread library or not. However, these interfaces aren't available in early libpthread libraries. We also need a test that works for archive libraries. We can't use pthread_once as some libc versions call the init function. We also can't use pthread_create or pthread_attr_init as these create a thread and thereby prevent changing the default stack size. The function pthread_default_stacksize_np is available in both the archive and shared versions of libpthread. It can be used to determine the default pthread stack size. There is a stub in some shared libc versions which returns a zero size if pthreads are not active. We provide an equivalent stub to handle cases where libc doesn't provide one. */ #if 0 /* disabled by -frewrite-includes */ #if defined(__hppa__) && defined(__hpux__) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 277 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 static volatile int __gthread_active = -1; static inline int __gthread_active_p (void) { /* Avoid reading __gthread_active twice on the main code path. */ int __gthread_active_latest_value = __gthread_active; size_t __s; if (__builtin_expect (__gthread_active_latest_value < 0, 0)) { pthread_default_stacksize_np (0, &__s); __gthread_active = __s ? 1 : 0; __gthread_active_latest_value = __gthread_active; } return __gthread_active_latest_value != 0; } #else /* not hppa-hpux */ # 298 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 static inline int __gthread_active_p (void) { return 1; } #endif /* hppa-hpux */ # 306 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 #endif /* __GXX_WEAK__ */ # 308 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 #ifdef _LIBOBJC /* This is the config.h file in libobjc/ */ #if 0 /* expanded by -frewrite-includes */ #include <config.h> #endif /* expanded by -frewrite-includes */ # 312 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 # 313 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 #ifdef HAVE_SCHED_H #if 0 /* expanded by -frewrite-includes */ # include <sched.h> #endif /* expanded by -frewrite-includes */ # 315 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 # 316 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 #endif # 317 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 /* Key structure for maintaining thread specific storage */ static pthread_key_t _objc_thread_storage; static pthread_attr_t _objc_thread_attribs; /* Thread local storage for a single thread */ static void *thread_local_storage = NULL; /* Backend initialization functions */ /* Initialize the threads subsystem. */ static inline int __gthread_objc_init_thread_system (void) { if (__gthread_active_p ()) { /* Initialize the thread storage key. */ if (__gthrw_(pthread_key_create) (&_objc_thread_storage, NULL) == 0) { /* The normal default detach state for threads is * PTHREAD_CREATE_JOINABLE which causes threads to not die * when you think they should. */ if (__gthrw_(pthread_attr_init) (&_objc_thread_attribs) == 0 && __gthrw_(pthread_attr_setdetachstate) (&_objc_thread_attribs, PTHREAD_CREATE_DETACHED) == 0) return 0; } } return -1; } /* Close the threads subsystem. */ static inline int __gthread_objc_close_thread_system (void) { if (__gthread_active_p () && __gthrw_(pthread_key_delete) (_objc_thread_storage) == 0 && __gthrw_(pthread_attr_destroy) (&_objc_thread_attribs) == 0) return 0; return -1; } /* Backend thread functions */ /* Create a new thread of execution. */ static inline objc_thread_t __gthread_objc_thread_detach (void (*func)(void *), void *arg) { objc_thread_t thread_id; pthread_t new_thread_handle; if (!__gthread_active_p ()) return NULL; if (!(__gthrw_(pthread_create) (&new_thread_handle, &_objc_thread_attribs, (void *) func, arg))) thread_id = (objc_thread_t) new_thread_handle; else thread_id = NULL; return thread_id; } /* Set the current thread's priority. */ static inline int __gthread_objc_thread_set_priority (int priority) { if (!__gthread_active_p ()) return -1; else { #ifdef _POSIX_PRIORITY_SCHEDULING #ifdef _POSIX_THREAD_PRIORITY_SCHEDULING pthread_t thread_id = __gthrw_(pthread_self) (); int policy; struct sched_param params; int priority_min, priority_max; if (__gthrw_(pthread_getschedparam) (thread_id, &policy, ¶ms) == 0) { if ((priority_max = __gthrw_(sched_get_priority_max) (policy)) == -1) return -1; if ((priority_min = __gthrw_(sched_get_priority_min) (policy)) == -1) return -1; if (priority > priority_max) priority = priority_max; else if (priority < priority_min) priority = priority_min; params.sched_priority = priority; /* * The solaris 7 and several other man pages incorrectly state that * this should be a pointer to policy but pthread.h is universally * at odds with this. */ if (__gthrw_(pthread_setschedparam) (thread_id, policy, ¶ms) == 0) return 0; } #endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */ # 420 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 #endif /* _POSIX_PRIORITY_SCHEDULING */ # 421 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 return -1; } } /* Return the current thread's priority. */ static inline int __gthread_objc_thread_get_priority (void) { #ifdef _POSIX_PRIORITY_SCHEDULING #ifdef _POSIX_THREAD_PRIORITY_SCHEDULING if (__gthread_active_p ()) { int policy; struct sched_param params; if (__gthrw_(pthread_getschedparam) (__gthrw_(pthread_self) (), &policy, ¶ms) == 0) return params.sched_priority; else return -1; } else #endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */ # 443 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 #endif /* _POSIX_PRIORITY_SCHEDULING */ # 444 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 return OBJC_THREAD_INTERACTIVE_PRIORITY; } /* Yield our process time to another thread. */ static inline void __gthread_objc_thread_yield (void) { if (__gthread_active_p ()) __gthrw_(sched_yield) (); } /* Terminate the current thread. */ static inline int __gthread_objc_thread_exit (void) { if (__gthread_active_p ()) /* exit the thread */ __gthrw_(pthread_exit) (&__objc_thread_exit_status); /* Failed if we reached here */ return -1; } /* Returns an integer value which uniquely describes a thread. */ static inline objc_thread_t __gthread_objc_thread_id (void) { if (__gthread_active_p ()) return (objc_thread_t) __gthrw_(pthread_self) (); else return (objc_thread_t) 1; } /* Sets the thread's local storage pointer. */ static inline int __gthread_objc_thread_set_data (void *value) { if (__gthread_active_p ()) return __gthrw_(pthread_setspecific) (_objc_thread_storage, value); else { thread_local_storage = value; return 0; } } /* Returns the thread's local storage pointer. */ static inline void * __gthread_objc_thread_get_data (void) { if (__gthread_active_p ()) return __gthrw_(pthread_getspecific) (_objc_thread_storage); else return thread_local_storage; } /* Backend mutex functions */ /* Allocate a mutex. */ static inline int __gthread_objc_mutex_allocate (objc_mutex_t mutex) { if (__gthread_active_p ()) { mutex->backend = objc_malloc (sizeof (pthread_mutex_t)); if (__gthrw_(pthread_mutex_init) ((pthread_mutex_t *) mutex->backend, NULL)) { objc_free (mutex->backend); mutex->backend = NULL; return -1; } } return 0; } /* Deallocate a mutex. */ static inline int __gthread_objc_mutex_deallocate (objc_mutex_t mutex) { if (__gthread_active_p ()) { int count; /* * Posix Threads specifically require that the thread be unlocked * for __gthrw_(pthread_mutex_destroy) to work. */ do { count = __gthrw_(pthread_mutex_unlock) ((pthread_mutex_t *) mutex->backend); if (count < 0) return -1; } while (count); if (__gthrw_(pthread_mutex_destroy) ((pthread_mutex_t *) mutex->backend)) return -1; objc_free (mutex->backend); mutex->backend = NULL; } return 0; } /* Grab a lock on a mutex. */ static inline int __gthread_objc_mutex_lock (objc_mutex_t mutex) { if (__gthread_active_p () && __gthrw_(pthread_mutex_lock) ((pthread_mutex_t *) mutex->backend) != 0) { return -1; } return 0; } /* Try to grab a lock on a mutex. */ static inline int __gthread_objc_mutex_trylock (objc_mutex_t mutex) { if (__gthread_active_p () && __gthrw_(pthread_mutex_trylock) ((pthread_mutex_t *) mutex->backend) != 0) { return -1; } return 0; } /* Unlock the mutex */ static inline int __gthread_objc_mutex_unlock (objc_mutex_t mutex) { if (__gthread_active_p () && __gthrw_(pthread_mutex_unlock) ((pthread_mutex_t *) mutex->backend) != 0) { return -1; } return 0; } /* Backend condition mutex functions */ /* Allocate a condition. */ static inline int __gthread_objc_condition_allocate (objc_condition_t condition) { if (__gthread_active_p ()) { condition->backend = objc_malloc (sizeof (pthread_cond_t)); if (__gthrw_(pthread_cond_init) ((pthread_cond_t *) condition->backend, NULL)) { objc_free (condition->backend); condition->backend = NULL; return -1; } } return 0; } /* Deallocate a condition. */ static inline int __gthread_objc_condition_deallocate (objc_condition_t condition) { if (__gthread_active_p ()) { if (__gthrw_(pthread_cond_destroy) ((pthread_cond_t *) condition->backend)) return -1; objc_free (condition->backend); condition->backend = NULL; } return 0; } /* Wait on the condition */ static inline int __gthread_objc_condition_wait (objc_condition_t condition, objc_mutex_t mutex) { if (__gthread_active_p ()) return __gthrw_(pthread_cond_wait) ((pthread_cond_t *) condition->backend, (pthread_mutex_t *) mutex->backend); else return 0; } /* Wake up all threads waiting on this condition. */ static inline int __gthread_objc_condition_broadcast (objc_condition_t condition) { if (__gthread_active_p ()) return __gthrw_(pthread_cond_broadcast) ((pthread_cond_t *) condition->backend); else return 0; } /* Wake up one thread waiting on this condition. */ static inline int __gthread_objc_condition_signal (objc_condition_t condition) { if (__gthread_active_p ()) return __gthrw_(pthread_cond_signal) ((pthread_cond_t *) condition->backend); else return 0; } #else /* _LIBOBJC */ # 658 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 static inline int __gthread_create (__gthread_t *__threadid, void *(*__func) (void*), void *__args) { return __gthrw_(pthread_create) (__threadid, NULL, __func, __args); } static inline int __gthread_join (__gthread_t __threadid, void **__value_ptr) { return __gthrw_(pthread_join) (__threadid, __value_ptr); } static inline int __gthread_detach (__gthread_t __threadid) { return __gthrw_(pthread_detach) (__threadid); } static inline int __gthread_equal (__gthread_t __t1, __gthread_t __t2) { return __gthrw_(pthread_equal) (__t1, __t2); } static inline __gthread_t __gthread_self (void) { return __gthrw_(pthread_self) (); } static inline int __gthread_yield (void) { return __gthrw_(sched_yield) (); } static inline int __gthread_once (__gthread_once_t *__once, void (*__func) (void)) { if (__gthread_active_p ()) return __gthrw_(pthread_once) (__once, __func); else return -1; } static inline int __gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *)) { return __gthrw_(pthread_key_create) (__key, __dtor); } static inline int __gthread_key_delete (__gthread_key_t __key) { return __gthrw_(pthread_key_delete) (__key); } static inline void * __gthread_getspecific (__gthread_key_t __key) { return __gthrw_(pthread_getspecific) (__key); } static inline int __gthread_setspecific (__gthread_key_t __key, const void *__ptr) { return __gthrw_(pthread_setspecific) (__key, __ptr); } static inline void __gthread_mutex_init_function (__gthread_mutex_t *__mutex) { if (__gthread_active_p ()) __gthrw_(pthread_mutex_init) (__mutex, NULL); } static inline int __gthread_mutex_destroy (__gthread_mutex_t *__mutex) { if (__gthread_active_p ()) return __gthrw_(pthread_mutex_destroy) (__mutex); else return 0; } static inline int __gthread_mutex_lock (__gthread_mutex_t *__mutex) { if (__gthread_active_p ()) return __gthrw_(pthread_mutex_lock) (__mutex); else return 0; } static inline int __gthread_mutex_trylock (__gthread_mutex_t *__mutex) { if (__gthread_active_p ()) return __gthrw_(pthread_mutex_trylock) (__mutex); else return 0; } #if 0 /* disabled by -frewrite-includes */ #if _GTHREAD_USE_MUTEX_TIMEDLOCK #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 764 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 static inline int __gthread_mutex_timedlock (__gthread_mutex_t *__mutex, const __gthread_time_t *__abs_timeout) { if (__gthread_active_p ()) return __gthrw_(pthread_mutex_timedlock) (__mutex, __abs_timeout); else return 0; } #endif # 774 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 static inline int __gthread_mutex_unlock (__gthread_mutex_t *__mutex) { if (__gthread_active_p ()) return __gthrw_(pthread_mutex_unlock) (__mutex); else return 0; } #if 0 /* disabled by -frewrite-includes */ #if !defined( PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP) \ || defined(_GTHREAD_USE_RECURSIVE_MUTEX_INIT_FUNC) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 786 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 static inline int __gthread_recursive_mutex_init_function (__gthread_recursive_mutex_t *__mutex) { if (__gthread_active_p ()) { pthread_mutexattr_t __attr; int __r; __r = __gthrw_(pthread_mutexattr_init) (&__attr); if (!__r) __r = __gthrw_(pthread_mutexattr_settype) (&__attr, PTHREAD_MUTEX_RECURSIVE); if (!__r) __r = __gthrw_(pthread_mutex_init) (__mutex, &__attr); if (!__r) __r = __gthrw_(pthread_mutexattr_destroy) (&__attr); return __r; } return 0; } #endif # 807 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 static inline int __gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex) { return __gthread_mutex_lock (__mutex); } static inline int __gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex) { return __gthread_mutex_trylock (__mutex); } #if 0 /* disabled by -frewrite-includes */ #if _GTHREAD_USE_MUTEX_TIMEDLOCK #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 821 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 static inline int __gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *__mutex, const __gthread_time_t *__abs_timeout) { return __gthread_mutex_timedlock (__mutex, __abs_timeout); } #endif # 828 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 static inline int __gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex) { return __gthread_mutex_unlock (__mutex); } static inline int __gthread_recursive_mutex_destroy (__gthread_recursive_mutex_t *__mutex) { return __gthread_mutex_destroy (__mutex); } #ifdef _GTHREAD_USE_COND_INIT_FUNC static inline void __gthread_cond_init_function (__gthread_cond_t *__cond) { if (__gthread_active_p ()) __gthrw_(pthread_cond_init) (__cond, NULL); } #endif # 849 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 static inline int __gthread_cond_broadcast (__gthread_cond_t *__cond) { return __gthrw_(pthread_cond_broadcast) (__cond); } static inline int __gthread_cond_signal (__gthread_cond_t *__cond) { return __gthrw_(pthread_cond_signal) (__cond); } static inline int __gthread_cond_wait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex) { return __gthrw_(pthread_cond_wait) (__cond, __mutex); } static inline int __gthread_cond_timedwait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex, const __gthread_time_t *__abs_timeout) { return __gthrw_(pthread_cond_timedwait) (__cond, __mutex, __abs_timeout); } static inline int __gthread_cond_wait_recursive (__gthread_cond_t *__cond, __gthread_recursive_mutex_t *__mutex) { return __gthread_cond_wait (__cond, __mutex); } static inline int __gthread_cond_destroy (__gthread_cond_t* __cond) { return __gthrw_(pthread_cond_destroy) (__cond); } #endif /* _LIBOBJC */ # 889 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 #endif /* ! _GLIBCXX_GCC_GTHR_POSIX_H */ # 891 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr-default.h" 3 # 149 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr.h" 2 3 #ifndef _GLIBCXX_HIDE_EXPORTS #pragma GCC visibility pop #endif # 153 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr.h" 3 #endif /* ! _GLIBCXX_GCC_GTHR_H */ # 155 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/gthr.h" 3 # 36 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/atomicity.h" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/atomic_word.h> #endif /* expanded by -frewrite-includes */ # 36 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/atomicity.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/atomic_word.h" 1 3 // Low-level type for atomic operations -*- C++ -*- // Copyright (C) 2004-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file atomic_word.h * This file is a GNU extension to the Standard C++ Library. */ #ifndef _GLIBCXX_ATOMIC_WORD_H #define _GLIBCXX_ATOMIC_WORD_H 1 typedef int _Atomic_word; // This is a memory order acquire fence. #define _GLIBCXX_READ_MEM_BARRIER __atomic_thread_fence (__ATOMIC_ACQUIRE) // This is a memory order release fence. #define _GLIBCXX_WRITE_MEM_BARRIER __atomic_thread_fence (__ATOMIC_RELEASE) #endif # 41 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/x86_64-linux-gnu/c++/9/bits/atomic_word.h" 3 # 37 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/atomicity.h" 2 3 namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION // Functions for portable atomic access. // To abstract locking primitives across all thread policies, use: // __exchange_and_add_dispatch // __atomic_add_dispatch #ifdef _GLIBCXX_ATOMIC_BUILTINS static inline _Atomic_word __exchange_and_add(volatile _Atomic_word* __mem, int __val) { return __atomic_fetch_add(__mem, __val, __ATOMIC_ACQ_REL); } static inline void __atomic_add(volatile _Atomic_word* __mem, int __val) { __atomic_fetch_add(__mem, __val, __ATOMIC_ACQ_REL); } #else # 55 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/atomicity.h" 3 _Atomic_word __attribute__ ((__unused__)) __exchange_and_add(volatile _Atomic_word*, int) throw (); void __attribute__ ((__unused__)) __atomic_add(volatile _Atomic_word*, int) throw (); #endif # 63 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/atomicity.h" 3 static inline _Atomic_word __exchange_and_add_single(_Atomic_word* __mem, int __val) { _Atomic_word __result = *__mem; *__mem += __val; return __result; } static inline void __atomic_add_single(_Atomic_word* __mem, int __val) { *__mem += __val; } static inline _Atomic_word __attribute__ ((__unused__)) __exchange_and_add_dispatch(_Atomic_word* __mem, int __val) { #ifdef __GTHREADS if (__gthread_active_p()) return __exchange_and_add(__mem, __val); else return __exchange_and_add_single(__mem, __val); #else # 86 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/atomicity.h" 3 return __exchange_and_add_single(__mem, __val); #endif # 88 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/atomicity.h" 3 } static inline void __attribute__ ((__unused__)) __atomic_add_dispatch(_Atomic_word* __mem, int __val) { #ifdef __GTHREADS if (__gthread_active_p()) __atomic_add(__mem, __val); else __atomic_add_single(__mem, __val); #else # 100 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/atomicity.h" 3 __atomic_add_single(__mem, __val); #endif # 102 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/atomicity.h" 3 } _GLIBCXX_END_NAMESPACE_VERSION } // namespace // Even if the CPU doesn't need a memory barrier, we need to ensure // that the compiler doesn't reorder memory accesses across the // barriers. #ifndef _GLIBCXX_READ_MEM_BARRIER #define _GLIBCXX_READ_MEM_BARRIER __atomic_thread_fence (__ATOMIC_ACQUIRE) #endif # 113 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/atomicity.h" 3 #ifndef _GLIBCXX_WRITE_MEM_BARRIER #define _GLIBCXX_WRITE_MEM_BARRIER __atomic_thread_fence (__ATOMIC_RELEASE) #endif # 116 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/atomicity.h" 3 #endif # 118 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/atomicity.h" 3 # 40 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <ext/alloc_traits.h> #endif /* expanded by -frewrite-includes */ # 40 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 # 41 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <debug/debug.h> #endif /* expanded by -frewrite-includes */ # 41 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 # 42 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 44 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <initializer_list> #endif /* expanded by -frewrite-includes */ # 44 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 # 45 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 #endif # 46 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 48 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 #if 0 /* expanded by -frewrite-includes */ # include <string_view> #endif /* expanded by -frewrite-includes */ # 48 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 # 49 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 #endif # 50 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 56 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 // Support P0426R1 changes to char_traits in C++17. # define __cpp_lib_constexpr_string 201611L #endif # 59 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_USE_CXX11_ABI #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 61 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 _GLIBCXX_BEGIN_NAMESPACE_CXX11 /** * @class basic_string basic_string.h <string> * @brief Managing sequences of characters and character-like objects. * * @ingroup strings * @ingroup sequences * * @tparam _CharT Type of character * @tparam _Traits Traits for character type, defaults to * char_traits<_CharT>. * @tparam _Alloc Allocator type, defaults to allocator<_CharT>. * * Meets the requirements of a <a href="tables.html#65">container</a>, a * <a href="tables.html#66">reversible container</a>, and a * <a href="tables.html#67">sequence</a>. Of the * <a href="tables.html#68">optional sequence requirements</a>, only * @c push_back, @c at, and @c %array access are supported. */ template<typename _CharT, typename _Traits, typename _Alloc> class basic_string { typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template rebind<_CharT>::other _Char_alloc_type; typedef __gnu_cxx::__alloc_traits<_Char_alloc_type> _Alloc_traits; // Types: public: typedef _Traits traits_type; typedef typename _Traits::char_type value_type; typedef _Char_alloc_type allocator_type; typedef typename _Alloc_traits::size_type size_type; typedef typename _Alloc_traits::difference_type difference_type; typedef typename _Alloc_traits::reference reference; typedef typename _Alloc_traits::const_reference const_reference; typedef typename _Alloc_traits::pointer pointer; typedef typename _Alloc_traits::const_pointer const_pointer; typedef __gnu_cxx::__normal_iterator<pointer, basic_string> iterator; typedef __gnu_cxx::__normal_iterator<const_pointer, basic_string> const_iterator; typedef std::reverse_iterator<const_iterator> const_reverse_iterator; typedef std::reverse_iterator<iterator> reverse_iterator; /// Value returned by various member functions when they fail. static const size_type npos = static_cast<size_type>(-1); protected: // type used for positions in insert, erase etc. #if 0 /* disabled by -frewrite-includes */ #if __cplusplus < 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 110 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 typedef iterator __const_iterator; #else # 112 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 typedef const_iterator __const_iterator; #endif # 114 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 private: #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 117 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 // A helper type for avoiding boiler-plate. typedef basic_string_view<_CharT, _Traits> __sv_type; template<typename _Tp, typename _Res> using _If_sv = enable_if_t< __and_<is_convertible<const _Tp&, __sv_type>, __not_<is_convertible<const _Tp*, const basic_string*>>, __not_<is_convertible<const _Tp&, const _CharT*>>>::value, _Res>; // Allows an implicit conversion to __sv_type. static __sv_type _S_to_string_view(__sv_type __svt) noexcept { return __svt; } // Wraps a string_view by explicit conversion and thus // allows to add an internal constructor that does not // participate in overload resolution when a string_view // is provided. struct __sv_wrapper { explicit __sv_wrapper(__sv_type __sv) noexcept : _M_sv(__sv) { } __sv_type _M_sv; }; /** * @brief Only internally used: Construct string from a string view * wrapper. * @param __svw string view wrapper. * @param __a Allocator to use. */ explicit basic_string(__sv_wrapper __svw, const _Alloc& __a) : basic_string(__svw._M_sv.data(), __svw._M_sv.size(), __a) { } #endif # 152 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 // Use empty-base optimization: http://www.cantrip.org/emptyopt.html struct _Alloc_hider : allocator_type // TODO check __is_final { #if 0 /* disabled by -frewrite-includes */ #if __cplusplus < 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 157 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 _Alloc_hider(pointer __dat, const _Alloc& __a = _Alloc()) : allocator_type(__a), _M_p(__dat) { } #else # 160 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 _Alloc_hider(pointer __dat, const _Alloc& __a) : allocator_type(__a), _M_p(__dat) { } _Alloc_hider(pointer __dat, _Alloc&& __a = _Alloc()) : allocator_type(std::move(__a)), _M_p(__dat) { } #endif # 166 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 pointer _M_p; // The actual data. }; _Alloc_hider _M_dataplus; size_type _M_string_length; enum { _S_local_capacity = 15 / sizeof(_CharT) }; union { _CharT _M_local_buf[_S_local_capacity + 1]; size_type _M_allocated_capacity; }; void _M_data(pointer __p) { _M_dataplus._M_p = __p; } void _M_length(size_type __length) { _M_string_length = __length; } pointer _M_data() const { return _M_dataplus._M_p; } pointer _M_local_data() { #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 197 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 return std::pointer_traits<pointer>::pointer_to(*_M_local_buf); #else # 199 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 return pointer(_M_local_buf); #endif # 201 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 } const_pointer _M_local_data() const { #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 207 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 return std::pointer_traits<const_pointer>::pointer_to(*_M_local_buf); #else # 209 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 return const_pointer(_M_local_buf); #endif # 211 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 } void _M_capacity(size_type __capacity) { _M_allocated_capacity = __capacity; } void _M_set_length(size_type __n) { _M_length(__n); traits_type::assign(_M_data()[__n], _CharT()); } bool _M_is_local() const { return _M_data() == _M_local_data(); } // Create & Destroy pointer _M_create(size_type&, size_type); void _M_dispose() { if (!_M_is_local()) _M_destroy(_M_allocated_capacity); } void _M_destroy(size_type __size) throw() { _Alloc_traits::deallocate(_M_get_allocator(), _M_data(), __size + 1); } // _M_construct_aux is used to implement the 21.3.1 para 15 which // requires special behaviour if _InIterator is an integral type template<typename _InIterator> void _M_construct_aux(_InIterator __beg, _InIterator __end, std::__false_type) { typedef typename iterator_traits<_InIterator>::iterator_category _Tag; _M_construct(__beg, __end, _Tag()); } // _GLIBCXX_RESOLVE_LIB_DEFECTS // 438. Ambiguity in the "do the right thing" clause template<typename _Integer> void _M_construct_aux(_Integer __beg, _Integer __end, std::__true_type) { _M_construct_aux_2(static_cast<size_type>(__beg), __end); } void _M_construct_aux_2(size_type __req, _CharT __c) { _M_construct(__req, __c); } template<typename _InIterator> void _M_construct(_InIterator __beg, _InIterator __end) { typedef typename std::__is_integer<_InIterator>::__type _Integral; _M_construct_aux(__beg, __end, _Integral()); } // For Input Iterators, used in istreambuf_iterators, etc. template<typename _InIterator> void _M_construct(_InIterator __beg, _InIterator __end, std::input_iterator_tag); // For forward_iterators up to random_access_iterators, used for // string::iterator, _CharT*, etc. template<typename _FwdIterator> void _M_construct(_FwdIterator __beg, _FwdIterator __end, std::forward_iterator_tag); void _M_construct(size_type __req, _CharT __c); allocator_type& _M_get_allocator() { return _M_dataplus; } const allocator_type& _M_get_allocator() const { return _M_dataplus; } private: #ifdef _GLIBCXX_DISAMBIGUATE_REPLACE_INST // The explicit instantiations in misc-inst.cc require this due to // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64063 template<typename _Tp, bool _Requires = !__are_same<_Tp, _CharT*>::__value && !__are_same<_Tp, const _CharT*>::__value && !__are_same<_Tp, iterator>::__value && !__are_same<_Tp, const_iterator>::__value> struct __enable_if_not_native_iterator { typedef basic_string& __type; }; template<typename _Tp> struct __enable_if_not_native_iterator<_Tp, false> { }; #endif # 312 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 size_type _M_check(size_type __pos, const char* __s) const { if (__pos > this->size()) __throw_out_of_range_fmt(__N("%s: __pos (which is %zu) > " "this->size() (which is %zu)"), __s, __pos, this->size()); return __pos; } void _M_check_length(size_type __n1, size_type __n2, const char* __s) const { if (this->max_size() - (this->size() - __n1) < __n2) __throw_length_error(__N(__s)); } // NB: _M_limit doesn't check for a bad __pos value. size_type _M_limit(size_type __pos, size_type __off) const _GLIBCXX_NOEXCEPT { const bool __testoff = __off < this->size() - __pos; return __testoff ? __off : this->size() - __pos; } // True if _Rep and source do not overlap. bool _M_disjunct(const _CharT* __s) const _GLIBCXX_NOEXCEPT { return (less<const _CharT*>()(__s, _M_data()) || less<const _CharT*>()(_M_data() + this->size(), __s)); } // When __n = 1 way faster than the general multichar // traits_type::copy/move/assign. static void _S_copy(_CharT* __d, const _CharT* __s, size_type __n) { if (__n == 1) traits_type::assign(*__d, *__s); else traits_type::copy(__d, __s, __n); } static void _S_move(_CharT* __d, const _CharT* __s, size_type __n) { if (__n == 1) traits_type::assign(*__d, *__s); else traits_type::move(__d, __s, __n); } static void _S_assign(_CharT* __d, size_type __n, _CharT __c) { if (__n == 1) traits_type::assign(*__d, __c); else traits_type::assign(__d, __n, __c); } // _S_copy_chars is a separate template to permit specialization // to optimize for the common case of pointers as iterators. template<class _Iterator> static void _S_copy_chars(_CharT* __p, _Iterator __k1, _Iterator __k2) { for (; __k1 != __k2; ++__k1, (void)++__p) traits_type::assign(*__p, *__k1); // These types are off. } static void _S_copy_chars(_CharT* __p, iterator __k1, iterator __k2) _GLIBCXX_NOEXCEPT { _S_copy_chars(__p, __k1.base(), __k2.base()); } static void _S_copy_chars(_CharT* __p, const_iterator __k1, const_iterator __k2) _GLIBCXX_NOEXCEPT { _S_copy_chars(__p, __k1.base(), __k2.base()); } static void _S_copy_chars(_CharT* __p, _CharT* __k1, _CharT* __k2) _GLIBCXX_NOEXCEPT { _S_copy(__p, __k1, __k2 - __k1); } static void _S_copy_chars(_CharT* __p, const _CharT* __k1, const _CharT* __k2) _GLIBCXX_NOEXCEPT { _S_copy(__p, __k1, __k2 - __k1); } static int _S_compare(size_type __n1, size_type __n2) _GLIBCXX_NOEXCEPT { const difference_type __d = difference_type(__n1 - __n2); if (__d > __gnu_cxx::__numeric_traits<int>::__max) return __gnu_cxx::__numeric_traits<int>::__max; else if (__d < __gnu_cxx::__numeric_traits<int>::__min) return __gnu_cxx::__numeric_traits<int>::__min; else return int(__d); } void _M_assign(const basic_string&); void _M_mutate(size_type __pos, size_type __len1, const _CharT* __s, size_type __len2); void _M_erase(size_type __pos, size_type __n); public: // Construct/copy/destroy: // NB: We overload ctors in some cases instead of using default // arguments, per 17.4.4.4 para. 2 item 2. /** * @brief Default constructor creates an empty string. */ basic_string() _GLIBCXX_NOEXCEPT_IF(is_nothrow_default_constructible<_Alloc>::value) : _M_dataplus(_M_local_data()) { _M_set_length(0); } /** * @brief Construct an empty string using allocator @a a. */ explicit basic_string(const _Alloc& __a) _GLIBCXX_NOEXCEPT : _M_dataplus(_M_local_data(), __a) { _M_set_length(0); } /** * @brief Construct string with copy of value of @a __str. * @param __str Source string. */ basic_string(const basic_string& __str) : _M_dataplus(_M_local_data(), _Alloc_traits::_S_select_on_copy(__str._M_get_allocator())) { _M_construct(__str._M_data(), __str._M_data() + __str.length()); } // _GLIBCXX_RESOLVE_LIB_DEFECTS // 2583. no way to supply an allocator for basic_string(str, pos) /** * @brief Construct string as copy of a substring. * @param __str Source string. * @param __pos Index of first character to copy from. * @param __a Allocator to use. */ basic_string(const basic_string& __str, size_type __pos, const _Alloc& __a = _Alloc()) : _M_dataplus(_M_local_data(), __a) { const _CharT* __start = __str._M_data() + __str._M_check(__pos, "basic_string::basic_string"); _M_construct(__start, __start + __str._M_limit(__pos, npos)); } /** * @brief Construct string as copy of a substring. * @param __str Source string. * @param __pos Index of first character to copy from. * @param __n Number of characters to copy. */ basic_string(const basic_string& __str, size_type __pos, size_type __n) : _M_dataplus(_M_local_data()) { const _CharT* __start = __str._M_data() + __str._M_check(__pos, "basic_string::basic_string"); _M_construct(__start, __start + __str._M_limit(__pos, __n)); } /** * @brief Construct string as copy of a substring. * @param __str Source string. * @param __pos Index of first character to copy from. * @param __n Number of characters to copy. * @param __a Allocator to use. */ basic_string(const basic_string& __str, size_type __pos, size_type __n, const _Alloc& __a) : _M_dataplus(_M_local_data(), __a) { const _CharT* __start = __str._M_data() + __str._M_check(__pos, "string::string"); _M_construct(__start, __start + __str._M_limit(__pos, __n)); } /** * @brief Construct string initialized by a character %array. * @param __s Source character %array. * @param __n Number of characters to copy. * @param __a Allocator to use (default is default allocator). * * NB: @a __s must have at least @a __n characters, '\\0' * has no special meaning. */ basic_string(const _CharT* __s, size_type __n, const _Alloc& __a = _Alloc()) : _M_dataplus(_M_local_data(), __a) { _M_construct(__s, __s + __n); } /** * @brief Construct string as copy of a C string. * @param __s Source C string. * @param __a Allocator to use (default is default allocator). */ #if 0 /* disabled by -frewrite-includes */ #if __cpp_deduction_guides && ! defined _GLIBCXX_DEFINING_STRING_INSTANTIATIONS #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 525 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 // _GLIBCXX_RESOLVE_LIB_DEFECTS // 3076. basic_string CTAD ambiguity template<typename = _RequireAllocator<_Alloc>> #endif # 529 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()) : _M_dataplus(_M_local_data(), __a) { _M_construct(__s, __s ? __s + traits_type::length(__s) : __s+npos); } /** * @brief Construct string as multiple characters. * @param __n Number of characters. * @param __c Character to use. * @param __a Allocator to use (default is default allocator). */ #if 0 /* disabled by -frewrite-includes */ #if __cpp_deduction_guides && ! defined _GLIBCXX_DEFINING_STRING_INSTANTIATIONS #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 540 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 // _GLIBCXX_RESOLVE_LIB_DEFECTS // 3076. basic_string CTAD ambiguity template<typename = _RequireAllocator<_Alloc>> #endif # 544 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc()) : _M_dataplus(_M_local_data(), __a) { _M_construct(__n, __c); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 549 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Move construct string. * @param __str Source string. * * The newly-created string contains the exact contents of @a __str. * @a __str is a valid, but unspecified string. **/ basic_string(basic_string&& __str) noexcept : _M_dataplus(_M_local_data(), std::move(__str._M_get_allocator())) { if (__str._M_is_local()) { traits_type::copy(_M_local_buf, __str._M_local_buf, _S_local_capacity + 1); } else { _M_data(__str._M_data()); _M_capacity(__str._M_allocated_capacity); } // Must use _M_length() here not _M_set_length() because // basic_stringbuf relies on writing into unallocated capacity so // we mess up the contents if we put a '\0' in the string. _M_length(__str.length()); __str._M_data(__str._M_local_data()); __str._M_set_length(0); } /** * @brief Construct string from an initializer %list. * @param __l std::initializer_list of characters. * @param __a Allocator to use (default is default allocator). */ basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc()) : _M_dataplus(_M_local_data(), __a) { _M_construct(__l.begin(), __l.end()); } basic_string(const basic_string& __str, const _Alloc& __a) : _M_dataplus(_M_local_data(), __a) { _M_construct(__str.begin(), __str.end()); } basic_string(basic_string&& __str, const _Alloc& __a) noexcept(_Alloc_traits::_S_always_equal()) : _M_dataplus(_M_local_data(), __a) { if (__str._M_is_local()) { traits_type::copy(_M_local_buf, __str._M_local_buf, _S_local_capacity + 1); _M_length(__str.length()); __str._M_set_length(0); } else if (_Alloc_traits::_S_always_equal() || __str.get_allocator() == __a) { _M_data(__str._M_data()); _M_length(__str.length()); _M_capacity(__str._M_allocated_capacity); __str._M_data(__str._M_local_buf); __str._M_set_length(0); } else _M_construct(__str.begin(), __str.end()); } #endif // C++11 # 616 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Construct string as copy of a range. * @param __beg Start of range. * @param __end End of range. * @param __a Allocator to use (default is default allocator). */ #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 624 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 template<typename _InputIterator, typename = std::_RequireInputIter<_InputIterator>> #else # 627 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 template<typename _InputIterator> #endif # 629 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 basic_string(_InputIterator __beg, _InputIterator __end, const _Alloc& __a = _Alloc()) : _M_dataplus(_M_local_data(), __a) { _M_construct(__beg, __end); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 635 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Construct string from a substring of a string_view. * @param __t Source object convertible to string view. * @param __pos The index of the first character to copy from __t. * @param __n The number of characters to copy from __t. * @param __a Allocator to use. */ template<typename _Tp, typename = _If_sv<_Tp, void>> basic_string(const _Tp& __t, size_type __pos, size_type __n, const _Alloc& __a = _Alloc()) : basic_string(_S_to_string_view(__t).substr(__pos, __n), __a) { } /** * @brief Construct string from a string_view. * @param __t Source object convertible to string view. * @param __a Allocator to use (default is default allocator). */ template<typename _Tp, typename = _If_sv<_Tp, void>> explicit basic_string(const _Tp& __t, const _Alloc& __a = _Alloc()) : basic_string(__sv_wrapper(_S_to_string_view(__t)), __a) { } #endif // C++17 # 657 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Destroy the string instance. */ ~basic_string() { _M_dispose(); } /** * @brief Assign the value of @a str to this string. * @param __str Source string. */ basic_string& operator=(const basic_string& __str) { #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 672 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 if (_Alloc_traits::_S_propagate_on_copy_assign()) { if (!_Alloc_traits::_S_always_equal() && !_M_is_local() && _M_get_allocator() != __str._M_get_allocator()) { // Propagating allocator cannot free existing storage so must // deallocate it before replacing current allocator. if (__str.size() <= _S_local_capacity) { _M_destroy(_M_allocated_capacity); _M_data(_M_local_data()); _M_set_length(0); } else { const auto __len = __str.size(); auto __alloc = __str._M_get_allocator(); // If this allocation throws there are no effects: auto __ptr = _Alloc_traits::allocate(__alloc, __len + 1); _M_destroy(_M_allocated_capacity); _M_data(__ptr); _M_capacity(__len); _M_set_length(__len); } } std::__alloc_on_copy(_M_get_allocator(), __str._M_get_allocator()); } #endif # 700 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 return this->assign(__str); } /** * @brief Copy contents of @a s into this string. * @param __s Source null-terminated string. */ basic_string& operator=(const _CharT* __s) { return this->assign(__s); } /** * @brief Set value to string of length 1. * @param __c Source character. * * Assigning to a character makes this string length 1 and * (*this)[0] == @a c. */ basic_string& operator=(_CharT __c) { this->assign(1, __c); return *this; } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 726 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Move assign the value of @a str to this string. * @param __str Source string. * * The contents of @a str are moved into this string (without copying). * @a str is a valid, but unspecified string. **/ // _GLIBCXX_RESOLVE_LIB_DEFECTS // 2063. Contradictory requirements for string move assignment basic_string& operator=(basic_string&& __str) noexcept(_Alloc_traits::_S_nothrow_move()) { if (!_M_is_local() && _Alloc_traits::_S_propagate_on_move_assign() && !_Alloc_traits::_S_always_equal() && _M_get_allocator() != __str._M_get_allocator()) { // Destroy existing storage before replacing allocator. _M_destroy(_M_allocated_capacity); _M_data(_M_local_data()); _M_set_length(0); } // Replace allocator if POCMA is true. std::__alloc_on_move(_M_get_allocator(), __str._M_get_allocator()); if (__str._M_is_local()) { // We've always got room for a short string, just copy it. if (__str.size()) this->_S_copy(_M_data(), __str._M_data(), __str.size()); _M_set_length(__str.size()); } else if (_Alloc_traits::_S_propagate_on_move_assign() || _Alloc_traits::_S_always_equal() || _M_get_allocator() == __str._M_get_allocator()) { // Just move the allocated pointer, our allocator can free it. pointer __data = nullptr; size_type __capacity; if (!_M_is_local()) { if (_Alloc_traits::_S_always_equal()) { // __str can reuse our existing storage. __data = _M_data(); __capacity = _M_allocated_capacity; } else // __str can't use it, so free it. _M_destroy(_M_allocated_capacity); } _M_data(__str._M_data()); _M_length(__str.length()); _M_capacity(__str._M_allocated_capacity); if (__data) { __str._M_data(__data); __str._M_capacity(__capacity); } else __str._M_data(__str._M_local_buf); } else // Need to do a deep copy assign(__str); __str.clear(); return *this; } /** * @brief Set value to string constructed from initializer %list. * @param __l std::initializer_list. */ basic_string& operator=(initializer_list<_CharT> __l) { this->assign(__l.begin(), __l.size()); return *this; } #endif // C++11 # 805 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 807 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Set value to string constructed from a string_view. * @param __svt An object convertible to string_view. */ template<typename _Tp> _If_sv<_Tp, basic_string&> operator=(const _Tp& __svt) { return this->assign(__svt); } /** * @brief Convert to a string_view. * @return A string_view. */ operator __sv_type() const noexcept { return __sv_type(data(), size()); } #endif // C++17 # 823 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 // Iterators: /** * Returns a read/write iterator that points to the first character in * the %string. */ iterator begin() _GLIBCXX_NOEXCEPT { return iterator(_M_data()); } /** * Returns a read-only (constant) iterator that points to the first * character in the %string. */ const_iterator begin() const _GLIBCXX_NOEXCEPT { return const_iterator(_M_data()); } /** * Returns a read/write iterator that points one past the last * character in the %string. */ iterator end() _GLIBCXX_NOEXCEPT { return iterator(_M_data() + this->size()); } /** * Returns a read-only (constant) iterator that points one past the * last character in the %string. */ const_iterator end() const _GLIBCXX_NOEXCEPT { return const_iterator(_M_data() + this->size()); } /** * Returns a read/write reverse iterator that points to the last * character in the %string. Iteration is done in reverse element * order. */ reverse_iterator rbegin() _GLIBCXX_NOEXCEPT { return reverse_iterator(this->end()); } /** * Returns a read-only (constant) reverse iterator that points * to the last character in the %string. Iteration is done in * reverse element order. */ const_reverse_iterator rbegin() const _GLIBCXX_NOEXCEPT { return const_reverse_iterator(this->end()); } /** * Returns a read/write reverse iterator that points to one before the * first character in the %string. Iteration is done in reverse * element order. */ reverse_iterator rend() _GLIBCXX_NOEXCEPT { return reverse_iterator(this->begin()); } /** * Returns a read-only (constant) reverse iterator that points * to one before the first character in the %string. Iteration * is done in reverse element order. */ const_reverse_iterator rend() const _GLIBCXX_NOEXCEPT { return const_reverse_iterator(this->begin()); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 894 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * Returns a read-only (constant) iterator that points to the first * character in the %string. */ const_iterator cbegin() const noexcept { return const_iterator(this->_M_data()); } /** * Returns a read-only (constant) iterator that points one past the * last character in the %string. */ const_iterator cend() const noexcept { return const_iterator(this->_M_data() + this->size()); } /** * Returns a read-only (constant) reverse iterator that points * to the last character in the %string. Iteration is done in * reverse element order. */ const_reverse_iterator crbegin() const noexcept { return const_reverse_iterator(this->end()); } /** * Returns a read-only (constant) reverse iterator that points * to one before the first character in the %string. Iteration * is done in reverse element order. */ const_reverse_iterator crend() const noexcept { return const_reverse_iterator(this->begin()); } #endif # 928 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 public: // Capacity: /// Returns the number of characters in the string, not including any /// null-termination. size_type size() const _GLIBCXX_NOEXCEPT { return _M_string_length; } /// Returns the number of characters in the string, not including any /// null-termination. size_type length() const _GLIBCXX_NOEXCEPT { return _M_string_length; } /// Returns the size() of the largest possible %string. size_type max_size() const _GLIBCXX_NOEXCEPT { return (_Alloc_traits::max_size(_M_get_allocator()) - 1) / 2; } /** * @brief Resizes the %string to the specified number of characters. * @param __n Number of characters the %string should contain. * @param __c Character to fill any new elements. * * This function will %resize the %string to the specified * number of characters. If the number is smaller than the * %string's current size the %string is truncated, otherwise * the %string is extended and new elements are %set to @a __c. */ void resize(size_type __n, _CharT __c); /** * @brief Resizes the %string to the specified number of characters. * @param __n Number of characters the %string should contain. * * This function will resize the %string to the specified length. If * the new size is smaller than the %string's current size the %string * is truncated, otherwise the %string is extended and new characters * are default-constructed. For basic types such as char, this means * setting them to 0. */ void resize(size_type __n) { this->resize(__n, _CharT()); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 976 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /// A non-binding request to reduce capacity() to size(). void shrink_to_fit() noexcept { #if 0 /* disabled by -frewrite-includes */ #if __cpp_exceptions #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 981 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 if (capacity() > size()) { try { reserve(0); } catch(...) { } } #endif # 989 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 } #endif # 991 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * Returns the total number of characters that the %string can hold * before needing to allocate more memory. */ size_type capacity() const _GLIBCXX_NOEXCEPT { return _M_is_local() ? size_type(_S_local_capacity) : _M_allocated_capacity; } /** * @brief Attempt to preallocate enough memory for specified number of * characters. * @param __res_arg Number of characters required. * @throw std::length_error If @a __res_arg exceeds @c max_size(). * * This function attempts to reserve enough memory for the * %string to hold the specified number of characters. If the * number requested is more than max_size(), length_error is * thrown. * * The advantage of this function is that if optimal code is a * necessity and the user can determine the string length that will be * required, the user can reserve the memory in %advance, and thus * prevent a possible reallocation of memory and copying of %string * data. */ void reserve(size_type __res_arg = 0); /** * Erases the string, making it empty. */ void clear() _GLIBCXX_NOEXCEPT { _M_set_length(0); } /** * Returns true if the %string is empty. Equivalent to * <code>*this == ""</code>. */ _GLIBCXX_NODISCARD bool empty() const _GLIBCXX_NOEXCEPT { return this->size() == 0; } // Element access: /** * @brief Subscript access to the data contained in the %string. * @param __pos The index of the character to access. * @return Read-only (constant) reference to the character. * * This operator allows for easy, array-style, data access. * Note that data access with this operator is unchecked and * out_of_range lookups are not defined. (For checked lookups * see at().) */ const_reference operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT { __glibcxx_assert(__pos <= size()); return _M_data()[__pos]; } /** * @brief Subscript access to the data contained in the %string. * @param __pos The index of the character to access. * @return Read/write reference to the character. * * This operator allows for easy, array-style, data access. * Note that data access with this operator is unchecked and * out_of_range lookups are not defined. (For checked lookups * see at().) */ reference operator[](size_type __pos) { // Allow pos == size() both in C++98 mode, as v3 extension, // and in C++11 mode. __glibcxx_assert(__pos <= size()); // In pedantic mode be strict in C++98 mode. _GLIBCXX_DEBUG_PEDASSERT(__cplusplus >= 201103L || __pos < size()); return _M_data()[__pos]; } /** * @brief Provides access to the data contained in the %string. * @param __n The index of the character to access. * @return Read-only (const) reference to the character. * @throw std::out_of_range If @a n is an invalid index. * * This function provides for safer data access. The parameter is * first checked that it is in the range of the string. The function * throws out_of_range if the check fails. */ const_reference at(size_type __n) const { if (__n >= this->size()) __throw_out_of_range_fmt(__N("basic_string::at: __n " "(which is %zu) >= this->size() " "(which is %zu)"), __n, this->size()); return _M_data()[__n]; } /** * @brief Provides access to the data contained in the %string. * @param __n The index of the character to access. * @return Read/write reference to the character. * @throw std::out_of_range If @a n is an invalid index. * * This function provides for safer data access. The parameter is * first checked that it is in the range of the string. The function * throws out_of_range if the check fails. */ reference at(size_type __n) { if (__n >= size()) __throw_out_of_range_fmt(__N("basic_string::at: __n " "(which is %zu) >= this->size() " "(which is %zu)"), __n, this->size()); return _M_data()[__n]; } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1120 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * Returns a read/write reference to the data at the first * element of the %string. */ reference front() noexcept { __glibcxx_assert(!empty()); return operator[](0); } /** * Returns a read-only (constant) reference to the data at the first * element of the %string. */ const_reference front() const noexcept { __glibcxx_assert(!empty()); return operator[](0); } /** * Returns a read/write reference to the data at the last * element of the %string. */ reference back() noexcept { __glibcxx_assert(!empty()); return operator[](this->size() - 1); } /** * Returns a read-only (constant) reference to the data at the * last element of the %string. */ const_reference back() const noexcept { __glibcxx_assert(!empty()); return operator[](this->size() - 1); } #endif # 1164 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 // Modifiers: /** * @brief Append a string to this string. * @param __str The string to append. * @return Reference to this string. */ basic_string& operator+=(const basic_string& __str) { return this->append(__str); } /** * @brief Append a C string. * @param __s The C string to append. * @return Reference to this string. */ basic_string& operator+=(const _CharT* __s) { return this->append(__s); } /** * @brief Append a character. * @param __c The character to append. * @return Reference to this string. */ basic_string& operator+=(_CharT __c) { this->push_back(__c); return *this; } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1197 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Append an initializer_list of characters. * @param __l The initializer_list of characters to be appended. * @return Reference to this string. */ basic_string& operator+=(initializer_list<_CharT> __l) { return this->append(__l.begin(), __l.size()); } #endif // C++11 # 1206 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1208 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Append a string_view. * @param __svt An object convertible to string_view to be appended. * @return Reference to this string. */ template<typename _Tp> _If_sv<_Tp, basic_string&> operator+=(const _Tp& __svt) { return this->append(__svt); } #endif // C++17 # 1218 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Append a string to this string. * @param __str The string to append. * @return Reference to this string. */ basic_string& append(const basic_string& __str) { return _M_append(__str._M_data(), __str.size()); } /** * @brief Append a substring. * @param __str The string to append. * @param __pos Index of the first character of str to append. * @param __n The number of characters to append. * @return Reference to this string. * @throw std::out_of_range if @a __pos is not a valid index. * * This function appends @a __n characters from @a __str * starting at @a __pos to this string. If @a __n is is larger * than the number of available characters in @a __str, the * remainder of @a __str is appended. */ basic_string& append(const basic_string& __str, size_type __pos, size_type __n = npos) { return _M_append(__str._M_data() + __str._M_check(__pos, "basic_string::append"), __str._M_limit(__pos, __n)); } /** * @brief Append a C substring. * @param __s The C string to append. * @param __n The number of characters to append. * @return Reference to this string. */ basic_string& append(const _CharT* __s, size_type __n) { __glibcxx_requires_string_len(__s, __n); _M_check_length(size_type(0), __n, "basic_string::append"); return _M_append(__s, __n); } /** * @brief Append a C string. * @param __s The C string to append. * @return Reference to this string. */ basic_string& append(const _CharT* __s) { __glibcxx_requires_string(__s); const size_type __n = traits_type::length(__s); _M_check_length(size_type(0), __n, "basic_string::append"); return _M_append(__s, __n); } /** * @brief Append multiple characters. * @param __n The number of characters to append. * @param __c The character to use. * @return Reference to this string. * * Appends __n copies of __c to this string. */ basic_string& append(size_type __n, _CharT __c) { return _M_replace_aux(this->size(), size_type(0), __n, __c); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1288 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Append an initializer_list of characters. * @param __l The initializer_list of characters to append. * @return Reference to this string. */ basic_string& append(initializer_list<_CharT> __l) { return this->append(__l.begin(), __l.size()); } #endif // C++11 # 1297 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Append a range of characters. * @param __first Iterator referencing the first character to append. * @param __last Iterator marking the end of the range. * @return Reference to this string. * * Appends characters in the range [__first,__last) to this string. */ #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1307 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 template<class _InputIterator, typename = std::_RequireInputIter<_InputIterator>> #else # 1310 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 template<class _InputIterator> #endif # 1312 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 basic_string& append(_InputIterator __first, _InputIterator __last) { return this->replace(end(), end(), __first, __last); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1317 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Append a string_view. * @param __svt An object convertible to string_view to be appended. * @return Reference to this string. */ template<typename _Tp> _If_sv<_Tp, basic_string&> append(const _Tp& __svt) { __sv_type __sv = __svt; return this->append(__sv.data(), __sv.size()); } /** * @brief Append a range of characters from a string_view. * @param __svt An object convertible to string_view to be appended from. * @param __pos The position in the string_view to append from. * @param __n The number of characters to append from the string_view. * @return Reference to this string. */ template<typename _Tp> _If_sv<_Tp, basic_string&> append(const _Tp& __svt, size_type __pos, size_type __n = npos) { __sv_type __sv = __svt; return _M_append(__sv.data() + std::__sv_check(__sv.size(), __pos, "basic_string::append"), std::__sv_limit(__sv.size(), __pos, __n)); } #endif // C++17 # 1347 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Append a single character. * @param __c Character to append. */ void push_back(_CharT __c) { const size_type __size = this->size(); if (__size + 1 > this->capacity()) this->_M_mutate(__size, size_type(0), 0, size_type(1)); traits_type::assign(this->_M_data()[__size], __c); this->_M_set_length(__size + 1); } /** * @brief Set value to contents of another string. * @param __str Source string to use. * @return Reference to this string. */ basic_string& assign(const basic_string& __str) { this->_M_assign(__str); return *this; } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1375 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Set value to contents of another string. * @param __str Source string to use. * @return Reference to this string. * * This function sets this string to the exact contents of @a __str. * @a __str is a valid, but unspecified string. */ basic_string& assign(basic_string&& __str) noexcept(_Alloc_traits::_S_nothrow_move()) { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 2063. Contradictory requirements for string move assignment return *this = std::move(__str); } #endif // C++11 # 1392 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Set value to a substring of a string. * @param __str The string to use. * @param __pos Index of the first character of str. * @param __n Number of characters to use. * @return Reference to this string. * @throw std::out_of_range if @a pos is not a valid index. * * This function sets this string to the substring of @a __str * consisting of @a __n characters at @a __pos. If @a __n is * is larger than the number of available characters in @a * __str, the remainder of @a __str is used. */ basic_string& assign(const basic_string& __str, size_type __pos, size_type __n = npos) { return _M_replace(size_type(0), this->size(), __str._M_data() + __str._M_check(__pos, "basic_string::assign"), __str._M_limit(__pos, __n)); } /** * @brief Set value to a C substring. * @param __s The C string to use. * @param __n Number of characters to use. * @return Reference to this string. * * This function sets the value of this string to the first @a __n * characters of @a __s. If @a __n is is larger than the number of * available characters in @a __s, the remainder of @a __s is used. */ basic_string& assign(const _CharT* __s, size_type __n) { __glibcxx_requires_string_len(__s, __n); return _M_replace(size_type(0), this->size(), __s, __n); } /** * @brief Set value to contents of a C string. * @param __s The C string to use. * @return Reference to this string. * * This function sets the value of this string to the value of @a __s. * The data is copied, so there is no dependence on @a __s once the * function returns. */ basic_string& assign(const _CharT* __s) { __glibcxx_requires_string(__s); return _M_replace(size_type(0), this->size(), __s, traits_type::length(__s)); } /** * @brief Set value to multiple characters. * @param __n Length of the resulting string. * @param __c The character to use. * @return Reference to this string. * * This function sets the value of this string to @a __n copies of * character @a __c. */ basic_string& assign(size_type __n, _CharT __c) { return _M_replace_aux(size_type(0), this->size(), __n, __c); } /** * @brief Set value to a range of characters. * @param __first Iterator referencing the first character to append. * @param __last Iterator marking the end of the range. * @return Reference to this string. * * Sets value of string to characters in the range [__first,__last). */ #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1468 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 template<class _InputIterator, typename = std::_RequireInputIter<_InputIterator>> #else # 1471 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 template<class _InputIterator> #endif # 1473 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 basic_string& assign(_InputIterator __first, _InputIterator __last) { return this->replace(begin(), end(), __first, __last); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1478 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Set value to an initializer_list of characters. * @param __l The initializer_list of characters to assign. * @return Reference to this string. */ basic_string& assign(initializer_list<_CharT> __l) { return this->assign(__l.begin(), __l.size()); } #endif // C++11 # 1487 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1489 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Set value from a string_view. * @param __svt The source object convertible to string_view. * @return Reference to this string. */ template<typename _Tp> _If_sv<_Tp, basic_string&> assign(const _Tp& __svt) { __sv_type __sv = __svt; return this->assign(__sv.data(), __sv.size()); } /** * @brief Set value from a range of characters in a string_view. * @param __svt The source object convertible to string_view. * @param __pos The position in the string_view to assign from. * @param __n The number of characters to assign. * @return Reference to this string. */ template<typename _Tp> _If_sv<_Tp, basic_string&> assign(const _Tp& __svt, size_type __pos, size_type __n = npos) { __sv_type __sv = __svt; return _M_replace(size_type(0), this->size(), __sv.data() + std::__sv_check(__sv.size(), __pos, "basic_string::assign"), std::__sv_limit(__sv.size(), __pos, __n)); } #endif // C++17 # 1520 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1522 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Insert multiple characters. * @param __p Const_iterator referencing location in string to * insert at. * @param __n Number of characters to insert * @param __c The character to insert. * @return Iterator referencing the first inserted char. * @throw std::length_error If new length exceeds @c max_size(). * * Inserts @a __n copies of character @a __c starting at the * position referenced by iterator @a __p. If adding * characters causes the length to exceed max_size(), * length_error is thrown. The value of the string doesn't * change if an error is thrown. */ iterator insert(const_iterator __p, size_type __n, _CharT __c) { _GLIBCXX_DEBUG_PEDASSERT(__p >= begin() && __p <= end()); const size_type __pos = __p - begin(); this->replace(__p, __p, __n, __c); return iterator(this->_M_data() + __pos); } #else # 1546 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Insert multiple characters. * @param __p Iterator referencing location in string to insert at. * @param __n Number of characters to insert * @param __c The character to insert. * @throw std::length_error If new length exceeds @c max_size(). * * Inserts @a __n copies of character @a __c starting at the * position referenced by iterator @a __p. If adding * characters causes the length to exceed max_size(), * length_error is thrown. The value of the string doesn't * change if an error is thrown. */ void insert(iterator __p, size_type __n, _CharT __c) { this->replace(__p, __p, __n, __c); } #endif # 1563 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1565 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Insert a range of characters. * @param __p Const_iterator referencing location in string to * insert at. * @param __beg Start of range. * @param __end End of range. * @return Iterator referencing the first inserted char. * @throw std::length_error If new length exceeds @c max_size(). * * Inserts characters in range [beg,end). If adding characters * causes the length to exceed max_size(), length_error is * thrown. The value of the string doesn't change if an error * is thrown. */ template<class _InputIterator, typename = std::_RequireInputIter<_InputIterator>> iterator insert(const_iterator __p, _InputIterator __beg, _InputIterator __end) { _GLIBCXX_DEBUG_PEDASSERT(__p >= begin() && __p <= end()); const size_type __pos = __p - begin(); this->replace(__p, __p, __beg, __end); return iterator(this->_M_data() + __pos); } #else # 1590 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Insert a range of characters. * @param __p Iterator referencing location in string to insert at. * @param __beg Start of range. * @param __end End of range. * @throw std::length_error If new length exceeds @c max_size(). * * Inserts characters in range [__beg,__end). If adding * characters causes the length to exceed max_size(), * length_error is thrown. The value of the string doesn't * change if an error is thrown. */ template<class _InputIterator> void insert(iterator __p, _InputIterator __beg, _InputIterator __end) { this->replace(__p, __p, __beg, __end); } #endif # 1607 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1609 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Insert an initializer_list of characters. * @param __p Iterator referencing location in string to insert at. * @param __l The initializer_list of characters to insert. * @throw std::length_error If new length exceeds @c max_size(). */ iterator insert(const_iterator __p, initializer_list<_CharT> __l) { return this->insert(__p, __l.begin(), __l.end()); } #ifdef _GLIBCXX_DEFINING_STRING_INSTANTIATIONS // See PR libstdc++/83328 void insert(iterator __p, initializer_list<_CharT> __l) { _GLIBCXX_DEBUG_PEDASSERT(__p >= begin() && __p <= end()); this->insert(__p - begin(), __l.begin(), __l.size()); } #endif # 1628 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 #endif // C++11 # 1629 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Insert value of a string. * @param __pos1 Iterator referencing location in string to insert at. * @param __str The string to insert. * @return Reference to this string. * @throw std::length_error If new length exceeds @c max_size(). * * Inserts value of @a __str starting at @a __pos1. If adding * characters causes the length to exceed max_size(), * length_error is thrown. The value of the string doesn't * change if an error is thrown. */ basic_string& insert(size_type __pos1, const basic_string& __str) { return this->replace(__pos1, size_type(0), __str._M_data(), __str.size()); } /** * @brief Insert a substring. * @param __pos1 Iterator referencing location in string to insert at. * @param __str The string to insert. * @param __pos2 Start of characters in str to insert. * @param __n Number of characters to insert. * @return Reference to this string. * @throw std::length_error If new length exceeds @c max_size(). * @throw std::out_of_range If @a pos1 > size() or * @a __pos2 > @a str.size(). * * Starting at @a pos1, insert @a __n character of @a __str * beginning with @a __pos2. If adding characters causes the * length to exceed max_size(), length_error is thrown. If @a * __pos1 is beyond the end of this string or @a __pos2 is * beyond the end of @a __str, out_of_range is thrown. The * value of the string doesn't change if an error is thrown. */ basic_string& insert(size_type __pos1, const basic_string& __str, size_type __pos2, size_type __n = npos) { return this->replace(__pos1, size_type(0), __str._M_data() + __str._M_check(__pos2, "basic_string::insert"), __str._M_limit(__pos2, __n)); } /** * @brief Insert a C substring. * @param __pos Iterator referencing location in string to insert at. * @param __s The C string to insert. * @param __n The number of characters to insert. * @return Reference to this string. * @throw std::length_error If new length exceeds @c max_size(). * @throw std::out_of_range If @a __pos is beyond the end of this * string. * * Inserts the first @a __n characters of @a __s starting at @a * __pos. If adding characters causes the length to exceed * max_size(), length_error is thrown. If @a __pos is beyond * end(), out_of_range is thrown. The value of the string * doesn't change if an error is thrown. */ basic_string& insert(size_type __pos, const _CharT* __s, size_type __n) { return this->replace(__pos, size_type(0), __s, __n); } /** * @brief Insert a C string. * @param __pos Iterator referencing location in string to insert at. * @param __s The C string to insert. * @return Reference to this string. * @throw std::length_error If new length exceeds @c max_size(). * @throw std::out_of_range If @a pos is beyond the end of this * string. * * Inserts the first @a n characters of @a __s starting at @a __pos. If * adding characters causes the length to exceed max_size(), * length_error is thrown. If @a __pos is beyond end(), out_of_range is * thrown. The value of the string doesn't change if an error is * thrown. */ basic_string& insert(size_type __pos, const _CharT* __s) { __glibcxx_requires_string(__s); return this->replace(__pos, size_type(0), __s, traits_type::length(__s)); } /** * @brief Insert multiple characters. * @param __pos Index in string to insert at. * @param __n Number of characters to insert * @param __c The character to insert. * @return Reference to this string. * @throw std::length_error If new length exceeds @c max_size(). * @throw std::out_of_range If @a __pos is beyond the end of this * string. * * Inserts @a __n copies of character @a __c starting at index * @a __pos. If adding characters causes the length to exceed * max_size(), length_error is thrown. If @a __pos > length(), * out_of_range is thrown. The value of the string doesn't * change if an error is thrown. */ basic_string& insert(size_type __pos, size_type __n, _CharT __c) { return _M_replace_aux(_M_check(__pos, "basic_string::insert"), size_type(0), __n, __c); } /** * @brief Insert one character. * @param __p Iterator referencing position in string to insert at. * @param __c The character to insert. * @return Iterator referencing newly inserted char. * @throw std::length_error If new length exceeds @c max_size(). * * Inserts character @a __c at position referenced by @a __p. * If adding character causes the length to exceed max_size(), * length_error is thrown. If @a __p is beyond end of string, * out_of_range is thrown. The value of the string doesn't * change if an error is thrown. */ iterator insert(__const_iterator __p, _CharT __c) { _GLIBCXX_DEBUG_PEDASSERT(__p >= begin() && __p <= end()); const size_type __pos = __p - begin(); _M_replace_aux(__pos, size_type(0), size_type(1), __c); return iterator(_M_data() + __pos); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1759 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Insert a string_view. * @param __pos Iterator referencing position in string to insert at. * @param __svt The object convertible to string_view to insert. * @return Reference to this string. */ template<typename _Tp> _If_sv<_Tp, basic_string&> insert(size_type __pos, const _Tp& __svt) { __sv_type __sv = __svt; return this->insert(__pos, __sv.data(), __sv.size()); } /** * @brief Insert a string_view. * @param __pos Iterator referencing position in string to insert at. * @param __svt The object convertible to string_view to insert from. * @param __pos Iterator referencing position in string_view to insert * from. * @param __n The number of characters to insert. * @return Reference to this string. */ template<typename _Tp> _If_sv<_Tp, basic_string&> insert(size_type __pos1, const _Tp& __svt, size_type __pos2, size_type __n = npos) { __sv_type __sv = __svt; return this->replace(__pos1, size_type(0), __sv.data() + std::__sv_check(__sv.size(), __pos2, "basic_string::insert"), std::__sv_limit(__sv.size(), __pos2, __n)); } #endif // C++17 # 1794 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Remove characters. * @param __pos Index of first character to remove (default 0). * @param __n Number of characters to remove (default remainder). * @return Reference to this string. * @throw std::out_of_range If @a pos is beyond the end of this * string. * * Removes @a __n characters from this string starting at @a * __pos. The length of the string is reduced by @a __n. If * there are < @a __n characters to remove, the remainder of * the string is truncated. If @a __p is beyond end of string, * out_of_range is thrown. The value of the string doesn't * change if an error is thrown. */ basic_string& erase(size_type __pos = 0, size_type __n = npos) { _M_check(__pos, "basic_string::erase"); if (__n == npos) this->_M_set_length(__pos); else if (__n != 0) this->_M_erase(__pos, _M_limit(__pos, __n)); return *this; } /** * @brief Remove one character. * @param __position Iterator referencing the character to remove. * @return iterator referencing same location after removal. * * Removes the character at @a __position from this string. The value * of the string doesn't change if an error is thrown. */ iterator erase(__const_iterator __position) { _GLIBCXX_DEBUG_PEDASSERT(__position >= begin() && __position < end()); const size_type __pos = __position - begin(); this->_M_erase(__pos, size_type(1)); return iterator(_M_data() + __pos); } /** * @brief Remove a range of characters. * @param __first Iterator referencing the first character to remove. * @param __last Iterator referencing the end of the range. * @return Iterator referencing location of first after removal. * * Removes the characters in the range [first,last) from this string. * The value of the string doesn't change if an error is thrown. */ iterator erase(__const_iterator __first, __const_iterator __last) { _GLIBCXX_DEBUG_PEDASSERT(__first >= begin() && __first <= __last && __last <= end()); const size_type __pos = __first - begin(); if (__last == end()) this->_M_set_length(__pos); else this->_M_erase(__pos, __last - __first); return iterator(this->_M_data() + __pos); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1862 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Remove the last character. * * The string must be non-empty. */ void pop_back() noexcept { __glibcxx_assert(!empty()); _M_erase(size() - 1, 1); } #endif // C++11 # 1874 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Replace characters with value from another string. * @param __pos Index of first character to replace. * @param __n Number of characters to be replaced. * @param __str String to insert. * @return Reference to this string. * @throw std::out_of_range If @a pos is beyond the end of this * string. * @throw std::length_error If new length exceeds @c max_size(). * * Removes the characters in the range [__pos,__pos+__n) from * this string. In place, the value of @a __str is inserted. * If @a __pos is beyond end of string, out_of_range is thrown. * If the length of the result exceeds max_size(), length_error * is thrown. The value of the string doesn't change if an * error is thrown. */ basic_string& replace(size_type __pos, size_type __n, const basic_string& __str) { return this->replace(__pos, __n, __str._M_data(), __str.size()); } /** * @brief Replace characters with value from another string. * @param __pos1 Index of first character to replace. * @param __n1 Number of characters to be replaced. * @param __str String to insert. * @param __pos2 Index of first character of str to use. * @param __n2 Number of characters from str to use. * @return Reference to this string. * @throw std::out_of_range If @a __pos1 > size() or @a __pos2 > * __str.size(). * @throw std::length_error If new length exceeds @c max_size(). * * Removes the characters in the range [__pos1,__pos1 + n) from this * string. In place, the value of @a __str is inserted. If @a __pos is * beyond end of string, out_of_range is thrown. If the length of the * result exceeds max_size(), length_error is thrown. The value of the * string doesn't change if an error is thrown. */ basic_string& replace(size_type __pos1, size_type __n1, const basic_string& __str, size_type __pos2, size_type __n2 = npos) { return this->replace(__pos1, __n1, __str._M_data() + __str._M_check(__pos2, "basic_string::replace"), __str._M_limit(__pos2, __n2)); } /** * @brief Replace characters with value of a C substring. * @param __pos Index of first character to replace. * @param __n1 Number of characters to be replaced. * @param __s C string to insert. * @param __n2 Number of characters from @a s to use. * @return Reference to this string. * @throw std::out_of_range If @a pos1 > size(). * @throw std::length_error If new length exceeds @c max_size(). * * Removes the characters in the range [__pos,__pos + __n1) * from this string. In place, the first @a __n2 characters of * @a __s are inserted, or all of @a __s if @a __n2 is too large. If * @a __pos is beyond end of string, out_of_range is thrown. If * the length of result exceeds max_size(), length_error is * thrown. The value of the string doesn't change if an error * is thrown. */ basic_string& replace(size_type __pos, size_type __n1, const _CharT* __s, size_type __n2) { __glibcxx_requires_string_len(__s, __n2); return _M_replace(_M_check(__pos, "basic_string::replace"), _M_limit(__pos, __n1), __s, __n2); } /** * @brief Replace characters with value of a C string. * @param __pos Index of first character to replace. * @param __n1 Number of characters to be replaced. * @param __s C string to insert. * @return Reference to this string. * @throw std::out_of_range If @a pos > size(). * @throw std::length_error If new length exceeds @c max_size(). * * Removes the characters in the range [__pos,__pos + __n1) * from this string. In place, the characters of @a __s are * inserted. If @a __pos is beyond end of string, out_of_range * is thrown. If the length of result exceeds max_size(), * length_error is thrown. The value of the string doesn't * change if an error is thrown. */ basic_string& replace(size_type __pos, size_type __n1, const _CharT* __s) { __glibcxx_requires_string(__s); return this->replace(__pos, __n1, __s, traits_type::length(__s)); } /** * @brief Replace characters with multiple characters. * @param __pos Index of first character to replace. * @param __n1 Number of characters to be replaced. * @param __n2 Number of characters to insert. * @param __c Character to insert. * @return Reference to this string. * @throw std::out_of_range If @a __pos > size(). * @throw std::length_error If new length exceeds @c max_size(). * * Removes the characters in the range [pos,pos + n1) from this * string. In place, @a __n2 copies of @a __c are inserted. * If @a __pos is beyond end of string, out_of_range is thrown. * If the length of result exceeds max_size(), length_error is * thrown. The value of the string doesn't change if an error * is thrown. */ basic_string& replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c) { return _M_replace_aux(_M_check(__pos, "basic_string::replace"), _M_limit(__pos, __n1), __n2, __c); } /** * @brief Replace range of characters with string. * @param __i1 Iterator referencing start of range to replace. * @param __i2 Iterator referencing end of range to replace. * @param __str String value to insert. * @return Reference to this string. * @throw std::length_error If new length exceeds @c max_size(). * * Removes the characters in the range [__i1,__i2). In place, * the value of @a __str is inserted. If the length of result * exceeds max_size(), length_error is thrown. The value of * the string doesn't change if an error is thrown. */ basic_string& replace(__const_iterator __i1, __const_iterator __i2, const basic_string& __str) { return this->replace(__i1, __i2, __str._M_data(), __str.size()); } /** * @brief Replace range of characters with C substring. * @param __i1 Iterator referencing start of range to replace. * @param __i2 Iterator referencing end of range to replace. * @param __s C string value to insert. * @param __n Number of characters from s to insert. * @return Reference to this string. * @throw std::length_error If new length exceeds @c max_size(). * * Removes the characters in the range [__i1,__i2). In place, * the first @a __n characters of @a __s are inserted. If the * length of result exceeds max_size(), length_error is thrown. * The value of the string doesn't change if an error is * thrown. */ basic_string& replace(__const_iterator __i1, __const_iterator __i2, const _CharT* __s, size_type __n) { _GLIBCXX_DEBUG_PEDASSERT(begin() <= __i1 && __i1 <= __i2 && __i2 <= end()); return this->replace(__i1 - begin(), __i2 - __i1, __s, __n); } /** * @brief Replace range of characters with C string. * @param __i1 Iterator referencing start of range to replace. * @param __i2 Iterator referencing end of range to replace. * @param __s C string value to insert. * @return Reference to this string. * @throw std::length_error If new length exceeds @c max_size(). * * Removes the characters in the range [__i1,__i2). In place, * the characters of @a __s are inserted. If the length of * result exceeds max_size(), length_error is thrown. The * value of the string doesn't change if an error is thrown. */ basic_string& replace(__const_iterator __i1, __const_iterator __i2, const _CharT* __s) { __glibcxx_requires_string(__s); return this->replace(__i1, __i2, __s, traits_type::length(__s)); } /** * @brief Replace range of characters with multiple characters * @param __i1 Iterator referencing start of range to replace. * @param __i2 Iterator referencing end of range to replace. * @param __n Number of characters to insert. * @param __c Character to insert. * @return Reference to this string. * @throw std::length_error If new length exceeds @c max_size(). * * Removes the characters in the range [__i1,__i2). In place, * @a __n copies of @a __c are inserted. If the length of * result exceeds max_size(), length_error is thrown. The * value of the string doesn't change if an error is thrown. */ basic_string& replace(__const_iterator __i1, __const_iterator __i2, size_type __n, _CharT __c) { _GLIBCXX_DEBUG_PEDASSERT(begin() <= __i1 && __i1 <= __i2 && __i2 <= end()); return _M_replace_aux(__i1 - begin(), __i2 - __i1, __n, __c); } /** * @brief Replace range of characters with range. * @param __i1 Iterator referencing start of range to replace. * @param __i2 Iterator referencing end of range to replace. * @param __k1 Iterator referencing start of range to insert. * @param __k2 Iterator referencing end of range to insert. * @return Reference to this string. * @throw std::length_error If new length exceeds @c max_size(). * * Removes the characters in the range [__i1,__i2). In place, * characters in the range [__k1,__k2) are inserted. If the * length of result exceeds max_size(), length_error is thrown. * The value of the string doesn't change if an error is * thrown. */ #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 2094 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 template<class _InputIterator, typename = std::_RequireInputIter<_InputIterator>> basic_string& replace(const_iterator __i1, const_iterator __i2, _InputIterator __k1, _InputIterator __k2) { _GLIBCXX_DEBUG_PEDASSERT(begin() <= __i1 && __i1 <= __i2 && __i2 <= end()); __glibcxx_requires_valid_range(__k1, __k2); return this->_M_replace_dispatch(__i1, __i2, __k1, __k2, std::__false_type()); } #else # 2107 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 template<class _InputIterator> #ifdef _GLIBCXX_DISAMBIGUATE_REPLACE_INST typename __enable_if_not_native_iterator<_InputIterator>::__type #else # 2111 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 basic_string& #endif # 2113 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 replace(iterator __i1, iterator __i2, _InputIterator __k1, _InputIterator __k2) { _GLIBCXX_DEBUG_PEDASSERT(begin() <= __i1 && __i1 <= __i2 && __i2 <= end()); __glibcxx_requires_valid_range(__k1, __k2); typedef typename std::__is_integer<_InputIterator>::__type _Integral; return _M_replace_dispatch(__i1, __i2, __k1, __k2, _Integral()); } #endif # 2123 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 // Specializations for the common case of pointer and iterator: // useful to avoid the overhead of temporary buffering in _M_replace. basic_string& replace(__const_iterator __i1, __const_iterator __i2, _CharT* __k1, _CharT* __k2) { _GLIBCXX_DEBUG_PEDASSERT(begin() <= __i1 && __i1 <= __i2 && __i2 <= end()); __glibcxx_requires_valid_range(__k1, __k2); return this->replace(__i1 - begin(), __i2 - __i1, __k1, __k2 - __k1); } basic_string& replace(__const_iterator __i1, __const_iterator __i2, const _CharT* __k1, const _CharT* __k2) { _GLIBCXX_DEBUG_PEDASSERT(begin() <= __i1 && __i1 <= __i2 && __i2 <= end()); __glibcxx_requires_valid_range(__k1, __k2); return this->replace(__i1 - begin(), __i2 - __i1, __k1, __k2 - __k1); } basic_string& replace(__const_iterator __i1, __const_iterator __i2, iterator __k1, iterator __k2) { _GLIBCXX_DEBUG_PEDASSERT(begin() <= __i1 && __i1 <= __i2 && __i2 <= end()); __glibcxx_requires_valid_range(__k1, __k2); return this->replace(__i1 - begin(), __i2 - __i1, __k1.base(), __k2 - __k1); } basic_string& replace(__const_iterator __i1, __const_iterator __i2, const_iterator __k1, const_iterator __k2) { _GLIBCXX_DEBUG_PEDASSERT(begin() <= __i1 && __i1 <= __i2 && __i2 <= end()); __glibcxx_requires_valid_range(__k1, __k2); return this->replace(__i1 - begin(), __i2 - __i1, __k1.base(), __k2 - __k1); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 2171 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Replace range of characters with initializer_list. * @param __i1 Iterator referencing start of range to replace. * @param __i2 Iterator referencing end of range to replace. * @param __l The initializer_list of characters to insert. * @return Reference to this string. * @throw std::length_error If new length exceeds @c max_size(). * * Removes the characters in the range [__i1,__i2). In place, * characters in the range [__k1,__k2) are inserted. If the * length of result exceeds max_size(), length_error is thrown. * The value of the string doesn't change if an error is * thrown. */ basic_string& replace(const_iterator __i1, const_iterator __i2, initializer_list<_CharT> __l) { return this->replace(__i1, __i2, __l.begin(), __l.size()); } #endif // C++11 # 2189 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 2191 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Replace range of characters with string_view. * @param __pos The position to replace at. * @param __n The number of characters to replace. * @param __svt The object convertible to string_view to insert. * @return Reference to this string. */ template<typename _Tp> _If_sv<_Tp, basic_string&> replace(size_type __pos, size_type __n, const _Tp& __svt) { __sv_type __sv = __svt; return this->replace(__pos, __n, __sv.data(), __sv.size()); } /** * @brief Replace range of characters with string_view. * @param __pos1 The position to replace at. * @param __n1 The number of characters to replace. * @param __svt The object convertible to string_view to insert from. * @param __pos2 The position in the string_view to insert from. * @param __n2 The number of characters to insert. * @return Reference to this string. */ template<typename _Tp> _If_sv<_Tp, basic_string&> replace(size_type __pos1, size_type __n1, const _Tp& __svt, size_type __pos2, size_type __n2 = npos) { __sv_type __sv = __svt; return this->replace(__pos1, __n1, __sv.data() + std::__sv_check(__sv.size(), __pos2, "basic_string::replace"), std::__sv_limit(__sv.size(), __pos2, __n2)); } /** * @brief Replace range of characters with string_view. * @param __i1 An iterator referencing the start position to replace at. * @param __i2 An iterator referencing the end position for the replace. * @param __svt The object convertible to string_view to insert from. * @return Reference to this string. */ template<typename _Tp> _If_sv<_Tp, basic_string&> replace(const_iterator __i1, const_iterator __i2, const _Tp& __svt) { __sv_type __sv = __svt; return this->replace(__i1 - begin(), __i2 - __i1, __sv); } #endif // C++17 # 2244 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 private: template<class _Integer> basic_string& _M_replace_dispatch(const_iterator __i1, const_iterator __i2, _Integer __n, _Integer __val, __true_type) { return _M_replace_aux(__i1 - begin(), __i2 - __i1, __n, __val); } template<class _InputIterator> basic_string& _M_replace_dispatch(const_iterator __i1, const_iterator __i2, _InputIterator __k1, _InputIterator __k2, __false_type); basic_string& _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2, _CharT __c); basic_string& _M_replace(size_type __pos, size_type __len1, const _CharT* __s, const size_type __len2); basic_string& _M_append(const _CharT* __s, size_type __n); public: /** * @brief Copy substring into C string. * @param __s C string to copy value into. * @param __n Number of characters to copy. * @param __pos Index of first character to copy. * @return Number of characters actually copied * @throw std::out_of_range If __pos > size(). * * Copies up to @a __n characters starting at @a __pos into the * C string @a __s. If @a __pos is %greater than size(), * out_of_range is thrown. */ size_type copy(_CharT* __s, size_type __n, size_type __pos = 0) const; /** * @brief Swap contents with another string. * @param __s String to swap with. * * Exchanges the contents of this string with that of @a __s in constant * time. */ void swap(basic_string& __s) _GLIBCXX_NOEXCEPT; // String operations: /** * @brief Return const pointer to null-terminated contents. * * This is a handle to internal data. Do not modify or dire things may * happen. */ const _CharT* c_str() const _GLIBCXX_NOEXCEPT { return _M_data(); } /** * @brief Return const pointer to contents. * * This is a pointer to internal data. It is undefined to modify * the contents through the returned pointer. To get a pointer that * allows modifying the contents use @c &str[0] instead, * (or in C++17 the non-const @c str.data() overload). */ const _CharT* data() const _GLIBCXX_NOEXCEPT { return _M_data(); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 2320 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Return non-const pointer to contents. * * This is a pointer to the character sequence held by the string. * Modifying the characters in the sequence is allowed. */ _CharT* data() noexcept { return _M_data(); } #endif # 2330 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Return copy of allocator used to construct this string. */ allocator_type get_allocator() const _GLIBCXX_NOEXCEPT { return _M_get_allocator(); } /** * @brief Find position of a C substring. * @param __s C string to locate. * @param __pos Index of character to search from. * @param __n Number of characters from @a s to search for. * @return Index of start of first occurrence. * * Starting from @a __pos, searches forward for the first @a * __n characters in @a __s within this string. If found, * returns the index where it begins. If not found, returns * npos. */ size_type find(const _CharT* __s, size_type __pos, size_type __n) const _GLIBCXX_NOEXCEPT; /** * @brief Find position of a string. * @param __str String to locate. * @param __pos Index of character to search from (default 0). * @return Index of start of first occurrence. * * Starting from @a __pos, searches forward for value of @a __str within * this string. If found, returns the index where it begins. If not * found, returns npos. */ size_type find(const basic_string& __str, size_type __pos = 0) const _GLIBCXX_NOEXCEPT { return this->find(__str.data(), __pos, __str.size()); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 2370 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Find position of a string_view. * @param __svt The object convertible to string_view to locate. * @param __pos Index of character to search from (default 0). * @return Index of start of first occurrence. */ template<typename _Tp> _If_sv<_Tp, size_type> find(const _Tp& __svt, size_type __pos = 0) const noexcept(is_same<_Tp, __sv_type>::value) { __sv_type __sv = __svt; return this->find(__sv.data(), __pos, __sv.size()); } #endif // C++17 # 2385 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Find position of a C string. * @param __s C string to locate. * @param __pos Index of character to search from (default 0). * @return Index of start of first occurrence. * * Starting from @a __pos, searches forward for the value of @a * __s within this string. If found, returns the index where * it begins. If not found, returns npos. */ size_type find(const _CharT* __s, size_type __pos = 0) const _GLIBCXX_NOEXCEPT { __glibcxx_requires_string(__s); return this->find(__s, __pos, traits_type::length(__s)); } /** * @brief Find position of a character. * @param __c Character to locate. * @param __pos Index of character to search from (default 0). * @return Index of first occurrence. * * Starting from @a __pos, searches forward for @a __c within * this string. If found, returns the index where it was * found. If not found, returns npos. */ size_type find(_CharT __c, size_type __pos = 0) const _GLIBCXX_NOEXCEPT; /** * @brief Find last position of a string. * @param __str String to locate. * @param __pos Index of character to search back from (default end). * @return Index of start of last occurrence. * * Starting from @a __pos, searches backward for value of @a * __str within this string. If found, returns the index where * it begins. If not found, returns npos. */ size_type rfind(const basic_string& __str, size_type __pos = npos) const _GLIBCXX_NOEXCEPT { return this->rfind(__str.data(), __pos, __str.size()); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 2432 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Find last position of a string_view. * @param __svt The object convertible to string_view to locate. * @param __pos Index of character to search back from (default end). * @return Index of start of last occurrence. */ template<typename _Tp> _If_sv<_Tp, size_type> rfind(const _Tp& __svt, size_type __pos = npos) const noexcept(is_same<_Tp, __sv_type>::value) { __sv_type __sv = __svt; return this->rfind(__sv.data(), __pos, __sv.size()); } #endif // C++17 # 2447 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Find last position of a C substring. * @param __s C string to locate. * @param __pos Index of character to search back from. * @param __n Number of characters from s to search for. * @return Index of start of last occurrence. * * Starting from @a __pos, searches backward for the first @a * __n characters in @a __s within this string. If found, * returns the index where it begins. If not found, returns * npos. */ size_type rfind(const _CharT* __s, size_type __pos, size_type __n) const _GLIBCXX_NOEXCEPT; /** * @brief Find last position of a C string. * @param __s C string to locate. * @param __pos Index of character to start search at (default end). * @return Index of start of last occurrence. * * Starting from @a __pos, searches backward for the value of * @a __s within this string. If found, returns the index * where it begins. If not found, returns npos. */ size_type rfind(const _CharT* __s, size_type __pos = npos) const { __glibcxx_requires_string(__s); return this->rfind(__s, __pos, traits_type::length(__s)); } /** * @brief Find last position of a character. * @param __c Character to locate. * @param __pos Index of character to search back from (default end). * @return Index of last occurrence. * * Starting from @a __pos, searches backward for @a __c within * this string. If found, returns the index where it was * found. If not found, returns npos. */ size_type rfind(_CharT __c, size_type __pos = npos) const _GLIBCXX_NOEXCEPT; /** * @brief Find position of a character of string. * @param __str String containing characters to locate. * @param __pos Index of character to search from (default 0). * @return Index of first occurrence. * * Starting from @a __pos, searches forward for one of the * characters of @a __str within this string. If found, * returns the index where it was found. If not found, returns * npos. */ size_type find_first_of(const basic_string& __str, size_type __pos = 0) const _GLIBCXX_NOEXCEPT { return this->find_first_of(__str.data(), __pos, __str.size()); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 2511 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Find position of a character of a string_view. * @param __svt An object convertible to string_view containing * characters to locate. * @param __pos Index of character to search from (default 0). * @return Index of first occurrence. */ template<typename _Tp> _If_sv<_Tp, size_type> find_first_of(const _Tp& __svt, size_type __pos = 0) const noexcept(is_same<_Tp, __sv_type>::value) { __sv_type __sv = __svt; return this->find_first_of(__sv.data(), __pos, __sv.size()); } #endif // C++17 # 2527 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Find position of a character of C substring. * @param __s String containing characters to locate. * @param __pos Index of character to search from. * @param __n Number of characters from s to search for. * @return Index of first occurrence. * * Starting from @a __pos, searches forward for one of the * first @a __n characters of @a __s within this string. If * found, returns the index where it was found. If not found, * returns npos. */ size_type find_first_of(const _CharT* __s, size_type __pos, size_type __n) const _GLIBCXX_NOEXCEPT; /** * @brief Find position of a character of C string. * @param __s String containing characters to locate. * @param __pos Index of character to search from (default 0). * @return Index of first occurrence. * * Starting from @a __pos, searches forward for one of the * characters of @a __s within this string. If found, returns * the index where it was found. If not found, returns npos. */ size_type find_first_of(const _CharT* __s, size_type __pos = 0) const _GLIBCXX_NOEXCEPT { __glibcxx_requires_string(__s); return this->find_first_of(__s, __pos, traits_type::length(__s)); } /** * @brief Find position of a character. * @param __c Character to locate. * @param __pos Index of character to search from (default 0). * @return Index of first occurrence. * * Starting from @a __pos, searches forward for the character * @a __c within this string. If found, returns the index * where it was found. If not found, returns npos. * * Note: equivalent to find(__c, __pos). */ size_type find_first_of(_CharT __c, size_type __pos = 0) const _GLIBCXX_NOEXCEPT { return this->find(__c, __pos); } /** * @brief Find last position of a character of string. * @param __str String containing characters to locate. * @param __pos Index of character to search back from (default end). * @return Index of last occurrence. * * Starting from @a __pos, searches backward for one of the * characters of @a __str within this string. If found, * returns the index where it was found. If not found, returns * npos. */ size_type find_last_of(const basic_string& __str, size_type __pos = npos) const _GLIBCXX_NOEXCEPT { return this->find_last_of(__str.data(), __pos, __str.size()); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 2595 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Find last position of a character of string. * @param __svt An object convertible to string_view containing * characters to locate. * @param __pos Index of character to search back from (default end). * @return Index of last occurrence. */ template<typename _Tp> _If_sv<_Tp, size_type> find_last_of(const _Tp& __svt, size_type __pos = npos) const noexcept(is_same<_Tp, __sv_type>::value) { __sv_type __sv = __svt; return this->find_last_of(__sv.data(), __pos, __sv.size()); } #endif // C++17 # 2611 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Find last position of a character of C substring. * @param __s C string containing characters to locate. * @param __pos Index of character to search back from. * @param __n Number of characters from s to search for. * @return Index of last occurrence. * * Starting from @a __pos, searches backward for one of the * first @a __n characters of @a __s within this string. If * found, returns the index where it was found. If not found, * returns npos. */ size_type find_last_of(const _CharT* __s, size_type __pos, size_type __n) const _GLIBCXX_NOEXCEPT; /** * @brief Find last position of a character of C string. * @param __s C string containing characters to locate. * @param __pos Index of character to search back from (default end). * @return Index of last occurrence. * * Starting from @a __pos, searches backward for one of the * characters of @a __s within this string. If found, returns * the index where it was found. If not found, returns npos. */ size_type find_last_of(const _CharT* __s, size_type __pos = npos) const _GLIBCXX_NOEXCEPT { __glibcxx_requires_string(__s); return this->find_last_of(__s, __pos, traits_type::length(__s)); } /** * @brief Find last position of a character. * @param __c Character to locate. * @param __pos Index of character to search back from (default end). * @return Index of last occurrence. * * Starting from @a __pos, searches backward for @a __c within * this string. If found, returns the index where it was * found. If not found, returns npos. * * Note: equivalent to rfind(__c, __pos). */ size_type find_last_of(_CharT __c, size_type __pos = npos) const _GLIBCXX_NOEXCEPT { return this->rfind(__c, __pos); } /** * @brief Find position of a character not in string. * @param __str String containing characters to avoid. * @param __pos Index of character to search from (default 0). * @return Index of first occurrence. * * Starting from @a __pos, searches forward for a character not contained * in @a __str within this string. If found, returns the index where it * was found. If not found, returns npos. */ size_type find_first_not_of(const basic_string& __str, size_type __pos = 0) const _GLIBCXX_NOEXCEPT { return this->find_first_not_of(__str.data(), __pos, __str.size()); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 2678 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Find position of a character not in a string_view. * @param __svt A object convertible to string_view containing * characters to avoid. * @param __pos Index of character to search from (default 0). * @return Index of first occurrence. */ template<typename _Tp> _If_sv<_Tp, size_type> find_first_not_of(const _Tp& __svt, size_type __pos = 0) const noexcept(is_same<_Tp, __sv_type>::value) { __sv_type __sv = __svt; return this->find_first_not_of(__sv.data(), __pos, __sv.size()); } #endif // C++17 # 2694 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Find position of a character not in C substring. * @param __s C string containing characters to avoid. * @param __pos Index of character to search from. * @param __n Number of characters from __s to consider. * @return Index of first occurrence. * * Starting from @a __pos, searches forward for a character not * contained in the first @a __n characters of @a __s within * this string. If found, returns the index where it was * found. If not found, returns npos. */ size_type find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const _GLIBCXX_NOEXCEPT; /** * @brief Find position of a character not in C string. * @param __s C string containing characters to avoid. * @param __pos Index of character to search from (default 0). * @return Index of first occurrence. * * Starting from @a __pos, searches forward for a character not * contained in @a __s within this string. If found, returns * the index where it was found. If not found, returns npos. */ size_type find_first_not_of(const _CharT* __s, size_type __pos = 0) const _GLIBCXX_NOEXCEPT { __glibcxx_requires_string(__s); return this->find_first_not_of(__s, __pos, traits_type::length(__s)); } /** * @brief Find position of a different character. * @param __c Character to avoid. * @param __pos Index of character to search from (default 0). * @return Index of first occurrence. * * Starting from @a __pos, searches forward for a character * other than @a __c within this string. If found, returns the * index where it was found. If not found, returns npos. */ size_type find_first_not_of(_CharT __c, size_type __pos = 0) const _GLIBCXX_NOEXCEPT; /** * @brief Find last position of a character not in string. * @param __str String containing characters to avoid. * @param __pos Index of character to search back from (default end). * @return Index of last occurrence. * * Starting from @a __pos, searches backward for a character * not contained in @a __str within this string. If found, * returns the index where it was found. If not found, returns * npos. */ size_type find_last_not_of(const basic_string& __str, size_type __pos = npos) const _GLIBCXX_NOEXCEPT { return this->find_last_not_of(__str.data(), __pos, __str.size()); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 2760 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Find last position of a character not in a string_view. * @param __svt An object convertible to string_view containing * characters to avoid. * @param __pos Index of character to search back from (default end). * @return Index of last occurrence. */ template<typename _Tp> _If_sv<_Tp, size_type> find_last_not_of(const _Tp& __svt, size_type __pos = npos) const noexcept(is_same<_Tp, __sv_type>::value) { __sv_type __sv = __svt; return this->find_last_not_of(__sv.data(), __pos, __sv.size()); } #endif // C++17 # 2776 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Find last position of a character not in C substring. * @param __s C string containing characters to avoid. * @param __pos Index of character to search back from. * @param __n Number of characters from s to consider. * @return Index of last occurrence. * * Starting from @a __pos, searches backward for a character not * contained in the first @a __n characters of @a __s within this string. * If found, returns the index where it was found. If not found, * returns npos. */ size_type find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const _GLIBCXX_NOEXCEPT; /** * @brief Find last position of a character not in C string. * @param __s C string containing characters to avoid. * @param __pos Index of character to search back from (default end). * @return Index of last occurrence. * * Starting from @a __pos, searches backward for a character * not contained in @a __s within this string. If found, * returns the index where it was found. If not found, returns * npos. */ size_type find_last_not_of(const _CharT* __s, size_type __pos = npos) const _GLIBCXX_NOEXCEPT { __glibcxx_requires_string(__s); return this->find_last_not_of(__s, __pos, traits_type::length(__s)); } /** * @brief Find last position of a different character. * @param __c Character to avoid. * @param __pos Index of character to search back from (default end). * @return Index of last occurrence. * * Starting from @a __pos, searches backward for a character other than * @a __c within this string. If found, returns the index where it was * found. If not found, returns npos. */ size_type find_last_not_of(_CharT __c, size_type __pos = npos) const _GLIBCXX_NOEXCEPT; /** * @brief Get a substring. * @param __pos Index of first character (default 0). * @param __n Number of characters in substring (default remainder). * @return The new string. * @throw std::out_of_range If __pos > size(). * * Construct and return a new string using the @a __n * characters starting at @a __pos. If the string is too * short, use the remainder of the characters. If @a __pos is * beyond the end of the string, out_of_range is thrown. */ basic_string substr(size_type __pos = 0, size_type __n = npos) const { return basic_string(*this, _M_check(__pos, "basic_string::substr"), __n); } /** * @brief Compare to a string. * @param __str String to compare against. * @return Integer < 0, 0, or > 0. * * Returns an integer < 0 if this string is ordered before @a * __str, 0 if their values are equivalent, or > 0 if this * string is ordered after @a __str. Determines the effective * length rlen of the strings to compare as the smallest of * size() and str.size(). The function then compares the two * strings by calling traits::compare(data(), str.data(),rlen). * If the result of the comparison is nonzero returns it, * otherwise the shorter one is ordered first. */ int compare(const basic_string& __str) const { const size_type __size = this->size(); const size_type __osize = __str.size(); const size_type __len = std::min(__size, __osize); int __r = traits_type::compare(_M_data(), __str.data(), __len); if (!__r) __r = _S_compare(__size, __osize); return __r; } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 2870 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Compare to a string_view. * @param __svt An object convertible to string_view to compare against. * @return Integer < 0, 0, or > 0. */ template<typename _Tp> _If_sv<_Tp, int> compare(const _Tp& __svt) const noexcept(is_same<_Tp, __sv_type>::value) { __sv_type __sv = __svt; const size_type __size = this->size(); const size_type __osize = __sv.size(); const size_type __len = std::min(__size, __osize); int __r = traits_type::compare(_M_data(), __sv.data(), __len); if (!__r) __r = _S_compare(__size, __osize); return __r; } /** * @brief Compare to a string_view. * @param __pos A position in the string to start comparing from. * @param __n The number of characters to compare. * @param __svt An object convertible to string_view to compare * against. * @return Integer < 0, 0, or > 0. */ template<typename _Tp> _If_sv<_Tp, int> compare(size_type __pos, size_type __n, const _Tp& __svt) const noexcept(is_same<_Tp, __sv_type>::value) { __sv_type __sv = __svt; return __sv_type(*this).substr(__pos, __n).compare(__sv); } /** * @brief Compare to a string_view. * @param __pos1 A position in the string to start comparing from. * @param __n1 The number of characters to compare. * @param __svt An object convertible to string_view to compare * against. * @param __pos2 A position in the string_view to start comparing from. * @param __n2 The number of characters to compare. * @return Integer < 0, 0, or > 0. */ template<typename _Tp> _If_sv<_Tp, int> compare(size_type __pos1, size_type __n1, const _Tp& __svt, size_type __pos2, size_type __n2 = npos) const noexcept(is_same<_Tp, __sv_type>::value) { __sv_type __sv = __svt; return __sv_type(*this) .substr(__pos1, __n1).compare(__sv.substr(__pos2, __n2)); } #endif // C++17 # 2929 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Compare substring to a string. * @param __pos Index of first character of substring. * @param __n Number of characters in substring. * @param __str String to compare against. * @return Integer < 0, 0, or > 0. * * Form the substring of this string from the @a __n characters * starting at @a __pos. Returns an integer < 0 if the * substring is ordered before @a __str, 0 if their values are * equivalent, or > 0 if the substring is ordered after @a * __str. Determines the effective length rlen of the strings * to compare as the smallest of the length of the substring * and @a __str.size(). The function then compares the two * strings by calling * traits::compare(substring.data(),str.data(),rlen). If the * result of the comparison is nonzero returns it, otherwise * the shorter one is ordered first. */ int compare(size_type __pos, size_type __n, const basic_string& __str) const; /** * @brief Compare substring to a substring. * @param __pos1 Index of first character of substring. * @param __n1 Number of characters in substring. * @param __str String to compare against. * @param __pos2 Index of first character of substring of str. * @param __n2 Number of characters in substring of str. * @return Integer < 0, 0, or > 0. * * Form the substring of this string from the @a __n1 * characters starting at @a __pos1. Form the substring of @a * __str from the @a __n2 characters starting at @a __pos2. * Returns an integer < 0 if this substring is ordered before * the substring of @a __str, 0 if their values are equivalent, * or > 0 if this substring is ordered after the substring of * @a __str. Determines the effective length rlen of the * strings to compare as the smallest of the lengths of the * substrings. The function then compares the two strings by * calling * traits::compare(substring.data(),str.substr(pos2,n2).data(),rlen). * If the result of the comparison is nonzero returns it, * otherwise the shorter one is ordered first. */ int compare(size_type __pos1, size_type __n1, const basic_string& __str, size_type __pos2, size_type __n2 = npos) const; /** * @brief Compare to a C string. * @param __s C string to compare against. * @return Integer < 0, 0, or > 0. * * Returns an integer < 0 if this string is ordered before @a __s, 0 if * their values are equivalent, or > 0 if this string is ordered after * @a __s. Determines the effective length rlen of the strings to * compare as the smallest of size() and the length of a string * constructed from @a __s. The function then compares the two strings * by calling traits::compare(data(),s,rlen). If the result of the * comparison is nonzero returns it, otherwise the shorter one is * ordered first. */ int compare(const _CharT* __s) const _GLIBCXX_NOEXCEPT; // _GLIBCXX_RESOLVE_LIB_DEFECTS // 5 String::compare specification questionable /** * @brief Compare substring to a C string. * @param __pos Index of first character of substring. * @param __n1 Number of characters in substring. * @param __s C string to compare against. * @return Integer < 0, 0, or > 0. * * Form the substring of this string from the @a __n1 * characters starting at @a pos. Returns an integer < 0 if * the substring is ordered before @a __s, 0 if their values * are equivalent, or > 0 if the substring is ordered after @a * __s. Determines the effective length rlen of the strings to * compare as the smallest of the length of the substring and * the length of a string constructed from @a __s. The * function then compares the two string by calling * traits::compare(substring.data(),__s,rlen). If the result of * the comparison is nonzero returns it, otherwise the shorter * one is ordered first. */ int compare(size_type __pos, size_type __n1, const _CharT* __s) const; /** * @brief Compare substring against a character %array. * @param __pos Index of first character of substring. * @param __n1 Number of characters in substring. * @param __s character %array to compare against. * @param __n2 Number of characters of s. * @return Integer < 0, 0, or > 0. * * Form the substring of this string from the @a __n1 * characters starting at @a __pos. Form a string from the * first @a __n2 characters of @a __s. Returns an integer < 0 * if this substring is ordered before the string from @a __s, * 0 if their values are equivalent, or > 0 if this substring * is ordered after the string from @a __s. Determines the * effective length rlen of the strings to compare as the * smallest of the length of the substring and @a __n2. The * function then compares the two strings by calling * traits::compare(substring.data(),s,rlen). If the result of * the comparison is nonzero returns it, otherwise the shorter * one is ordered first. * * NB: s must have at least n2 characters, '\\0' has * no special meaning. */ int compare(size_type __pos, size_type __n1, const _CharT* __s, size_type __n2) const; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 3049 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 bool starts_with(basic_string_view<_CharT, _Traits> __x) const noexcept { return __sv_type(this->data(), this->size()).starts_with(__x); } bool starts_with(_CharT __x) const noexcept { return __sv_type(this->data(), this->size()).starts_with(__x); } bool starts_with(const _CharT* __x) const noexcept { return __sv_type(this->data(), this->size()).starts_with(__x); } bool ends_with(basic_string_view<_CharT, _Traits> __x) const noexcept { return __sv_type(this->data(), this->size()).ends_with(__x); } bool ends_with(_CharT __x) const noexcept { return __sv_type(this->data(), this->size()).ends_with(__x); } bool ends_with(const _CharT* __x) const noexcept { return __sv_type(this->data(), this->size()).ends_with(__x); } #endif // C++20 # 3073 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 // Allow basic_stringbuf::__xfer_bufptrs to call _M_length: template<typename, typename, typename> friend class basic_stringbuf; }; _GLIBCXX_END_NAMESPACE_CXX11 #else // !_GLIBCXX_USE_CXX11_ABI # 3079 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 // Reference-counted COW string implentation /** * @class basic_string basic_string.h <string> * @brief Managing sequences of characters and character-like objects. * * @ingroup strings * @ingroup sequences * * @tparam _CharT Type of character * @tparam _Traits Traits for character type, defaults to * char_traits<_CharT>. * @tparam _Alloc Allocator type, defaults to allocator<_CharT>. * * Meets the requirements of a <a href="tables.html#65">container</a>, a * <a href="tables.html#66">reversible container</a>, and a * <a href="tables.html#67">sequence</a>. Of the * <a href="tables.html#68">optional sequence requirements</a>, only * @c push_back, @c at, and @c %array access are supported. * * @doctodo * * * Documentation? What's that? * Nathan Myers <ncm@cantrip.org>. * * A string looks like this: * * @code * [_Rep] * _M_length * [basic_string<char_type>] _M_capacity * _M_dataplus _M_refcount * _M_p ----------------> unnamed array of char_type * @endcode * * Where the _M_p points to the first character in the string, and * you cast it to a pointer-to-_Rep and subtract 1 to get a * pointer to the header. * * This approach has the enormous advantage that a string object * requires only one allocation. All the ugliness is confined * within a single %pair of inline functions, which each compile to * a single @a add instruction: _Rep::_M_data(), and * string::_M_rep(); and the allocation function which gets a * block of raw bytes and with room enough and constructs a _Rep * object at the front. * * The reason you want _M_data pointing to the character %array and * not the _Rep is so that the debugger can see the string * contents. (Probably we should add a non-inline member to get * the _Rep for the debugger to use, so users can check the actual * string length.) * * Note that the _Rep object is a POD so that you can have a * static <em>empty string</em> _Rep object already @a constructed before * static constructors have run. The reference-count encoding is * chosen so that a 0 indicates one reference, so you never try to * destroy the empty-string _Rep object. * * All but the last paragraph is considered pretty conventional * for a C++ string implementation. */ // 21.3 Template class basic_string template<typename _CharT, typename _Traits, typename _Alloc> class basic_string { typedef typename _Alloc::template rebind<_CharT>::other _CharT_alloc_type; // Types: public: typedef _Traits traits_type; typedef typename _Traits::char_type value_type; typedef _Alloc allocator_type; typedef typename _CharT_alloc_type::size_type size_type; typedef typename _CharT_alloc_type::difference_type difference_type; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus < 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 3156 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 typedef typename _CharT_alloc_type::reference reference; typedef typename _CharT_alloc_type::const_reference const_reference; #else # 3159 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 typedef value_type& reference; typedef const value_type& const_reference; #endif # 3162 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 typedef typename _CharT_alloc_type::pointer pointer; typedef typename _CharT_alloc_type::const_pointer const_pointer; typedef __gnu_cxx::__normal_iterator<pointer, basic_string> iterator; typedef __gnu_cxx::__normal_iterator<const_pointer, basic_string> const_iterator; typedef std::reverse_iterator<const_iterator> const_reverse_iterator; typedef std::reverse_iterator<iterator> reverse_iterator; protected: // type used for positions in insert, erase etc. typedef iterator __const_iterator; private: // _Rep: string representation // Invariants: // 1. String really contains _M_length + 1 characters: due to 21.3.4 // must be kept null-terminated. // 2. _M_capacity >= _M_length // Allocated memory is always (_M_capacity + 1) * sizeof(_CharT). // 3. _M_refcount has three states: // -1: leaked, one reference, no ref-copies allowed, non-const. // 0: one reference, non-const. // n>0: n + 1 references, operations require a lock, const. // 4. All fields==0 is an empty string, given the extra storage // beyond-the-end for a null terminator; thus, the shared // empty string representation needs no constructor. struct _Rep_base { size_type _M_length; size_type _M_capacity; _Atomic_word _M_refcount; }; struct _Rep : _Rep_base { // Types: typedef typename _Alloc::template rebind<char>::other _Raw_bytes_alloc; // (Public) Data members: // The maximum number of individual char_type elements of an // individual string is determined by _S_max_size. This is the // value that will be returned by max_size(). (Whereas npos // is the maximum number of bytes the allocator can allocate.) // If one was to divvy up the theoretical largest size string, // with a terminating character and m _CharT elements, it'd // look like this: // npos = sizeof(_Rep) + (m * sizeof(_CharT)) + sizeof(_CharT) // Solving for m: // m = ((npos - sizeof(_Rep))/sizeof(CharT)) - 1 // In addition, this implementation quarters this amount. static const size_type _S_max_size; static const _CharT _S_terminal; // The following storage is init'd to 0 by the linker, resulting // (carefully) in an empty string with one reference. static size_type _S_empty_rep_storage[]; static _Rep& _S_empty_rep() _GLIBCXX_NOEXCEPT { // NB: Mild hack to avoid strict-aliasing warnings. Note that // _S_empty_rep_storage is never modified and the punning should // be reasonably safe in this case. void* __p = reinterpret_cast<void*>(&_S_empty_rep_storage); return *reinterpret_cast<_Rep*>(__p); } bool _M_is_leaked() const _GLIBCXX_NOEXCEPT { #if 0 /* disabled by -frewrite-includes */ #if defined(__GTHREADS) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 3235 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 // _M_refcount is mutated concurrently by _M_refcopy/_M_dispose, // so we need to use an atomic load. However, _M_is_leaked // predicate does not change concurrently (i.e. the string is either // leaked or not), so a relaxed load is enough. return __atomic_load_n(&this->_M_refcount, __ATOMIC_RELAXED) < 0; #else # 3241 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 return this->_M_refcount < 0; #endif # 3243 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 } bool _M_is_shared() const _GLIBCXX_NOEXCEPT { #if 0 /* disabled by -frewrite-includes */ #if defined(__GTHREADS) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 3249 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 // _M_refcount is mutated concurrently by _M_refcopy/_M_dispose, // so we need to use an atomic load. Another thread can drop last // but one reference concurrently with this check, so we need this // load to be acquire to synchronize with release fetch_and_add in // _M_dispose. return __atomic_load_n(&this->_M_refcount, __ATOMIC_ACQUIRE) > 0; #else # 3256 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 return this->_M_refcount > 0; #endif # 3258 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 } void _M_set_leaked() _GLIBCXX_NOEXCEPT { this->_M_refcount = -1; } void _M_set_sharable() _GLIBCXX_NOEXCEPT { this->_M_refcount = 0; } void _M_set_length_and_sharable(size_type __n) _GLIBCXX_NOEXCEPT { #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_FULLY_DYNAMIC_STRING == 0 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 3272 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 if (__builtin_expect(this != &_S_empty_rep(), false)) #endif # 3274 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 { this->_M_set_sharable(); // One reference. this->_M_length = __n; traits_type::assign(this->_M_refdata()[__n], _S_terminal); // grrr. (per 21.3.4) // You cannot leave those LWG people alone for a second. } } _CharT* _M_refdata() throw() { return reinterpret_cast<_CharT*>(this + 1); } _CharT* _M_grab(const _Alloc& __alloc1, const _Alloc& __alloc2) { return (!_M_is_leaked() && __alloc1 == __alloc2) ? _M_refcopy() : _M_clone(__alloc1); } // Create & Destroy static _Rep* _S_create(size_type, size_type, const _Alloc&); void _M_dispose(const _Alloc& __a) _GLIBCXX_NOEXCEPT { #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_FULLY_DYNAMIC_STRING == 0 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 3302 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 if (__builtin_expect(this != &_S_empty_rep(), false)) #endif # 3304 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 { // Be race-detector-friendly. For more info see bits/c++config. _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&this->_M_refcount); // Decrement of _M_refcount is acq_rel, because: // - all but last decrements need to release to synchronize with // the last decrement that will delete the object. // - the last decrement needs to acquire to synchronize with // all the previous decrements. // - last but one decrement needs to release to synchronize with // the acquire load in _M_is_shared that will conclude that // the object is not shared anymore. if (__gnu_cxx::__exchange_and_add_dispatch(&this->_M_refcount, -1) <= 0) { _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&this->_M_refcount); _M_destroy(__a); } } } // XXX MT void _M_destroy(const _Alloc&) throw(); _CharT* _M_refcopy() throw() { #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_FULLY_DYNAMIC_STRING == 0 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 3331 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 if (__builtin_expect(this != &_S_empty_rep(), false)) #endif # 3333 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 __gnu_cxx::__atomic_add_dispatch(&this->_M_refcount, 1); return _M_refdata(); } // XXX MT _CharT* _M_clone(const _Alloc&, size_type __res = 0); }; // Use empty-base optimization: http://www.cantrip.org/emptyopt.html struct _Alloc_hider : _Alloc { _Alloc_hider(_CharT* __dat, const _Alloc& __a) _GLIBCXX_NOEXCEPT : _Alloc(__a), _M_p(__dat) { } _CharT* _M_p; // The actual data. }; public: // Data Members (public): // NB: This is an unsigned type, and thus represents the maximum // size that the allocator can hold. /// Value returned by various member functions when they fail. static const size_type npos = static_cast<size_type>(-1); private: // Data Members (private): mutable _Alloc_hider _M_dataplus; _CharT* _M_data() const _GLIBCXX_NOEXCEPT { return _M_dataplus._M_p; } _CharT* _M_data(_CharT* __p) _GLIBCXX_NOEXCEPT { return (_M_dataplus._M_p = __p); } _Rep* _M_rep() const _GLIBCXX_NOEXCEPT { return &((reinterpret_cast<_Rep*> (_M_data()))[-1]); } // For the internal use we have functions similar to `begin'/`end' // but they do not call _M_leak. iterator _M_ibegin() const _GLIBCXX_NOEXCEPT { return iterator(_M_data()); } iterator _M_iend() const _GLIBCXX_NOEXCEPT { return iterator(_M_data() + this->size()); } void _M_leak() // for use in begin() & non-const op[] { if (!_M_rep()->_M_is_leaked()) _M_leak_hard(); } size_type _M_check(size_type __pos, const char* __s) const { if (__pos > this->size()) __throw_out_of_range_fmt(__N("%s: __pos (which is %zu) > " "this->size() (which is %zu)"), __s, __pos, this->size()); return __pos; } void _M_check_length(size_type __n1, size_type __n2, const char* __s) const { if (this->max_size() - (this->size() - __n1) < __n2) __throw_length_error(__N(__s)); } // NB: _M_limit doesn't check for a bad __pos value. size_type _M_limit(size_type __pos, size_type __off) const _GLIBCXX_NOEXCEPT { const bool __testoff = __off < this->size() - __pos; return __testoff ? __off : this->size() - __pos; } // True if _Rep and source do not overlap. bool _M_disjunct(const _CharT* __s) const _GLIBCXX_NOEXCEPT { return (less<const _CharT*>()(__s, _M_data()) || less<const _CharT*>()(_M_data() + this->size(), __s)); } // When __n = 1 way faster than the general multichar // traits_type::copy/move/assign. static void _M_copy(_CharT* __d, const _CharT* __s, size_type __n) _GLIBCXX_NOEXCEPT { if (__n == 1) traits_type::assign(*__d, *__s); else traits_type::copy(__d, __s, __n); } static void _M_move(_CharT* __d, const _CharT* __s, size_type __n) _GLIBCXX_NOEXCEPT { if (__n == 1) traits_type::assign(*__d, *__s); else traits_type::move(__d, __s, __n); } static void _M_assign(_CharT* __d, size_type __n, _CharT __c) _GLIBCXX_NOEXCEPT { if (__n == 1) traits_type::assign(*__d, __c); else traits_type::assign(__d, __n, __c); } // _S_copy_chars is a separate template to permit specialization // to optimize for the common case of pointers as iterators. template<class _Iterator> static void _S_copy_chars(_CharT* __p, _Iterator __k1, _Iterator __k2) { for (; __k1 != __k2; ++__k1, (void)++__p) traits_type::assign(*__p, *__k1); // These types are off. } static void _S_copy_chars(_CharT* __p, iterator __k1, iterator __k2) _GLIBCXX_NOEXCEPT { _S_copy_chars(__p, __k1.base(), __k2.base()); } static void _S_copy_chars(_CharT* __p, const_iterator __k1, const_iterator __k2) _GLIBCXX_NOEXCEPT { _S_copy_chars(__p, __k1.base(), __k2.base()); } static void _S_copy_chars(_CharT* __p, _CharT* __k1, _CharT* __k2) _GLIBCXX_NOEXCEPT { _M_copy(__p, __k1, __k2 - __k1); } static void _S_copy_chars(_CharT* __p, const _CharT* __k1, const _CharT* __k2) _GLIBCXX_NOEXCEPT { _M_copy(__p, __k1, __k2 - __k1); } static int _S_compare(size_type __n1, size_type __n2) _GLIBCXX_NOEXCEPT { const difference_type __d = difference_type(__n1 - __n2); if (__d > __gnu_cxx::__numeric_traits<int>::__max) return __gnu_cxx::__numeric_traits<int>::__max; else if (__d < __gnu_cxx::__numeric_traits<int>::__min) return __gnu_cxx::__numeric_traits<int>::__min; else return int(__d); } void _M_mutate(size_type __pos, size_type __len1, size_type __len2); void _M_leak_hard(); static _Rep& _S_empty_rep() _GLIBCXX_NOEXCEPT { return _Rep::_S_empty_rep(); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 3504 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 // A helper type for avoiding boiler-plate. typedef basic_string_view<_CharT, _Traits> __sv_type; template<typename _Tp, typename _Res> using _If_sv = enable_if_t< __and_<is_convertible<const _Tp&, __sv_type>, __not_<is_convertible<const _Tp*, const basic_string*>>, __not_<is_convertible<const _Tp&, const _CharT*>>>::value, _Res>; // Allows an implicit conversion to __sv_type. static __sv_type _S_to_string_view(__sv_type __svt) noexcept { return __svt; } // Wraps a string_view by explicit conversion and thus // allows to add an internal constructor that does not // participate in overload resolution when a string_view // is provided. struct __sv_wrapper { explicit __sv_wrapper(__sv_type __sv) noexcept : _M_sv(__sv) { } __sv_type _M_sv; }; /** * @brief Only internally used: Construct string from a string view * wrapper. * @param __svw string view wrapper. * @param __a Allocator to use. */ explicit basic_string(__sv_wrapper __svw, const _Alloc& __a) : basic_string(__svw._M_sv.data(), __svw._M_sv.size(), __a) { } #endif # 3539 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 public: // Construct/copy/destroy: // NB: We overload ctors in some cases instead of using default // arguments, per 17.4.4.4 para. 2 item 2. /** * @brief Default constructor creates an empty string. */ basic_string() #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_FULLY_DYNAMIC_STRING == 0 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 3550 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 _GLIBCXX_NOEXCEPT : _M_dataplus(_S_empty_rep()._M_refdata(), _Alloc()) #else # 3553 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 : _M_dataplus(_S_construct(size_type(), _CharT(), _Alloc()), _Alloc()) #endif # 3555 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 { } /** * @brief Construct an empty string using allocator @a a. */ explicit basic_string(const _Alloc& __a); // NB: per LWG issue 42, semantics different from IS: /** * @brief Construct string with copy of value of @a str. * @param __str Source string. */ basic_string(const basic_string& __str); // _GLIBCXX_RESOLVE_LIB_DEFECTS // 2583. no way to supply an allocator for basic_string(str, pos) /** * @brief Construct string as copy of a substring. * @param __str Source string. * @param __pos Index of first character to copy from. * @param __a Allocator to use. */ basic_string(const basic_string& __str, size_type __pos, const _Alloc& __a = _Alloc()); /** * @brief Construct string as copy of a substring. * @param __str Source string. * @param __pos Index of first character to copy from. * @param __n Number of characters to copy. */ basic_string(const basic_string& __str, size_type __pos, size_type __n); /** * @brief Construct string as copy of a substring. * @param __str Source string. * @param __pos Index of first character to copy from. * @param __n Number of characters to copy. * @param __a Allocator to use. */ basic_string(const basic_string& __str, size_type __pos, size_type __n, const _Alloc& __a); /** * @brief Construct string initialized by a character %array. * @param __s Source character %array. * @param __n Number of characters to copy. * @param __a Allocator to use (default is default allocator). * * NB: @a __s must have at least @a __n characters, '\\0' * has no special meaning. */ basic_string(const _CharT* __s, size_type __n, const _Alloc& __a = _Alloc()); /** * @brief Construct string as copy of a C string. * @param __s Source C string. * @param __a Allocator to use (default is default allocator). */ basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()); /** * @brief Construct string as multiple characters. * @param __n Number of characters. * @param __c Character to use. * @param __a Allocator to use (default is default allocator). */ basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc()); #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 3625 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Move construct string. * @param __str Source string. * * The newly-created string contains the exact contents of @a __str. * @a __str is a valid, but unspecified string. **/ basic_string(basic_string&& __str) #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_FULLY_DYNAMIC_STRING == 0 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 3634 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 noexcept // FIXME C++11: should always be noexcept. #endif # 3636 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 : _M_dataplus(std::move(__str._M_dataplus)) { #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_FULLY_DYNAMIC_STRING == 0 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 3639 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 __str._M_data(_S_empty_rep()._M_refdata()); #else # 3641 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 __str._M_data(_S_construct(size_type(), _CharT(), get_allocator())); #endif # 3643 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 } /** * @brief Construct string from an initializer %list. * @param __l std::initializer_list of characters. * @param __a Allocator to use (default is default allocator). */ basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc()); basic_string(const basic_string& __str, const _Alloc& __a) : _M_dataplus(__str._M_rep()->_M_grab(__a, __str.get_allocator()), __a) { } basic_string(basic_string&& __str, const _Alloc& __a) : _M_dataplus(__str._M_data(), __a) { if (__a == __str.get_allocator()) { #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_FULLY_DYNAMIC_STRING == 0 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 3662 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 __str._M_data(_S_empty_rep()._M_refdata()); #else # 3664 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 __str._M_data(_S_construct(size_type(), _CharT(), __a)); #endif # 3666 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 } else _M_dataplus._M_p = _S_construct(__str.begin(), __str.end(), __a); } #endif // C++11 # 3671 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Construct string as copy of a range. * @param __beg Start of range. * @param __end End of range. * @param __a Allocator to use (default is default allocator). */ template<class _InputIterator> basic_string(_InputIterator __beg, _InputIterator __end, const _Alloc& __a = _Alloc()); #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 3683 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Construct string from a substring of a string_view. * @param __t Source object convertible to string view. * @param __pos The index of the first character to copy from __t. * @param __n The number of characters to copy from __t. * @param __a Allocator to use. */ template<typename _Tp, typename = _If_sv<_Tp, void>> basic_string(const _Tp& __t, size_type __pos, size_type __n, const _Alloc& __a = _Alloc()) : basic_string(_S_to_string_view(__t).substr(__pos, __n), __a) { } /** * @brief Construct string from a string_view. * @param __t Source object convertible to string view. * @param __a Allocator to use (default is default allocator). */ template<typename _Tp, typename = _If_sv<_Tp, void>> explicit basic_string(const _Tp& __t, const _Alloc& __a = _Alloc()) : basic_string(__sv_wrapper(_S_to_string_view(__t)), __a) { } #endif // C++17 # 3705 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Destroy the string instance. */ ~basic_string() _GLIBCXX_NOEXCEPT { _M_rep()->_M_dispose(this->get_allocator()); } /** * @brief Assign the value of @a str to this string. * @param __str Source string. */ basic_string& operator=(const basic_string& __str) { return this->assign(__str); } /** * @brief Copy contents of @a s into this string. * @param __s Source null-terminated string. */ basic_string& operator=(const _CharT* __s) { return this->assign(__s); } /** * @brief Set value to string of length 1. * @param __c Source character. * * Assigning to a character makes this string length 1 and * (*this)[0] == @a c. */ basic_string& operator=(_CharT __c) { this->assign(1, __c); return *this; } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 3743 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Move assign the value of @a str to this string. * @param __str Source string. * * The contents of @a str are moved into this string (without copying). * @a str is a valid, but unspecified string. **/ basic_string& operator=(basic_string&& __str) _GLIBCXX_NOEXCEPT_IF(allocator_traits<_Alloc>::is_always_equal::value) { // NB: DR 1204. this->swap(__str); return *this; } /** * @brief Set value to string constructed from initializer %list. * @param __l std::initializer_list. */ basic_string& operator=(initializer_list<_CharT> __l) { this->assign(__l.begin(), __l.size()); return *this; } #endif // C++11 # 3770 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 3772 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Set value to string constructed from a string_view. * @param __svt An object convertible to string_view. */ template<typename _Tp> _If_sv<_Tp, basic_string&> operator=(const _Tp& __svt) { return this->assign(__svt); } /** * @brief Convert to a string_view. * @return A string_view. */ operator __sv_type() const noexcept { return __sv_type(data(), size()); } #endif // C++17 # 3788 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 // Iterators: /** * Returns a read/write iterator that points to the first character in * the %string. Unshares the string. */ iterator begin() // FIXME C++11: should be noexcept. { _M_leak(); return iterator(_M_data()); } /** * Returns a read-only (constant) iterator that points to the first * character in the %string. */ const_iterator begin() const _GLIBCXX_NOEXCEPT { return const_iterator(_M_data()); } /** * Returns a read/write iterator that points one past the last * character in the %string. Unshares the string. */ iterator end() // FIXME C++11: should be noexcept. { _M_leak(); return iterator(_M_data() + this->size()); } /** * Returns a read-only (constant) iterator that points one past the * last character in the %string. */ const_iterator end() const _GLIBCXX_NOEXCEPT { return const_iterator(_M_data() + this->size()); } /** * Returns a read/write reverse iterator that points to the last * character in the %string. Iteration is done in reverse element * order. Unshares the string. */ reverse_iterator rbegin() // FIXME C++11: should be noexcept. { return reverse_iterator(this->end()); } /** * Returns a read-only (constant) reverse iterator that points * to the last character in the %string. Iteration is done in * reverse element order. */ const_reverse_iterator rbegin() const _GLIBCXX_NOEXCEPT { return const_reverse_iterator(this->end()); } /** * Returns a read/write reverse iterator that points to one before the * first character in the %string. Iteration is done in reverse * element order. Unshares the string. */ reverse_iterator rend() // FIXME C++11: should be noexcept. { return reverse_iterator(this->begin()); } /** * Returns a read-only (constant) reverse iterator that points * to one before the first character in the %string. Iteration * is done in reverse element order. */ const_reverse_iterator rend() const _GLIBCXX_NOEXCEPT { return const_reverse_iterator(this->begin()); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 3865 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * Returns a read-only (constant) iterator that points to the first * character in the %string. */ const_iterator cbegin() const noexcept { return const_iterator(this->_M_data()); } /** * Returns a read-only (constant) iterator that points one past the * last character in the %string. */ const_iterator cend() const noexcept { return const_iterator(this->_M_data() + this->size()); } /** * Returns a read-only (constant) reverse iterator that points * to the last character in the %string. Iteration is done in * reverse element order. */ const_reverse_iterator crbegin() const noexcept { return const_reverse_iterator(this->end()); } /** * Returns a read-only (constant) reverse iterator that points * to one before the first character in the %string. Iteration * is done in reverse element order. */ const_reverse_iterator crend() const noexcept { return const_reverse_iterator(this->begin()); } #endif # 3899 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 public: // Capacity: /// Returns the number of characters in the string, not including any /// null-termination. size_type size() const _GLIBCXX_NOEXCEPT { return _M_rep()->_M_length; } /// Returns the number of characters in the string, not including any /// null-termination. size_type length() const _GLIBCXX_NOEXCEPT { return _M_rep()->_M_length; } /// Returns the size() of the largest possible %string. size_type max_size() const _GLIBCXX_NOEXCEPT { return _Rep::_S_max_size; } /** * @brief Resizes the %string to the specified number of characters. * @param __n Number of characters the %string should contain. * @param __c Character to fill any new elements. * * This function will %resize the %string to the specified * number of characters. If the number is smaller than the * %string's current size the %string is truncated, otherwise * the %string is extended and new elements are %set to @a __c. */ void resize(size_type __n, _CharT __c); /** * @brief Resizes the %string to the specified number of characters. * @param __n Number of characters the %string should contain. * * This function will resize the %string to the specified length. If * the new size is smaller than the %string's current size the %string * is truncated, otherwise the %string is extended and new characters * are default-constructed. For basic types such as char, this means * setting them to 0. */ void resize(size_type __n) { this->resize(__n, _CharT()); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 3947 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /// A non-binding request to reduce capacity() to size(). void shrink_to_fit() _GLIBCXX_NOEXCEPT { #if 0 /* disabled by -frewrite-includes */ #if __cpp_exceptions #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 3952 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 if (capacity() > size()) { try { reserve(0); } catch(...) { } } #endif # 3960 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 } #endif # 3962 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * Returns the total number of characters that the %string can hold * before needing to allocate more memory. */ size_type capacity() const _GLIBCXX_NOEXCEPT { return _M_rep()->_M_capacity; } /** * @brief Attempt to preallocate enough memory for specified number of * characters. * @param __res_arg Number of characters required. * @throw std::length_error If @a __res_arg exceeds @c max_size(). * * This function attempts to reserve enough memory for the * %string to hold the specified number of characters. If the * number requested is more than max_size(), length_error is * thrown. * * The advantage of this function is that if optimal code is a * necessity and the user can determine the string length that will be * required, the user can reserve the memory in %advance, and thus * prevent a possible reallocation of memory and copying of %string * data. */ void reserve(size_type __res_arg = 0); /** * Erases the string, making it empty. */ #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_FULLY_DYNAMIC_STRING == 0 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 3995 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 void clear() _GLIBCXX_NOEXCEPT { if (_M_rep()->_M_is_shared()) { _M_rep()->_M_dispose(this->get_allocator()); _M_data(_S_empty_rep()._M_refdata()); } else _M_rep()->_M_set_length_and_sharable(0); } #else # 4007 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 // PR 56166: this should not throw. void clear() { _M_mutate(0, this->size(), 0); } #endif # 4012 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * Returns true if the %string is empty. Equivalent to * <code>*this == ""</code>. */ _GLIBCXX_NODISCARD bool empty() const _GLIBCXX_NOEXCEPT { return this->size() == 0; } // Element access: /** * @brief Subscript access to the data contained in the %string. * @param __pos The index of the character to access. * @return Read-only (constant) reference to the character. * * This operator allows for easy, array-style, data access. * Note that data access with this operator is unchecked and * out_of_range lookups are not defined. (For checked lookups * see at().) */ const_reference operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT { __glibcxx_assert(__pos <= size()); return _M_data()[__pos]; } /** * @brief Subscript access to the data contained in the %string. * @param __pos The index of the character to access. * @return Read/write reference to the character. * * This operator allows for easy, array-style, data access. * Note that data access with this operator is unchecked and * out_of_range lookups are not defined. (For checked lookups * see at().) Unshares the string. */ reference operator[](size_type __pos) { // Allow pos == size() both in C++98 mode, as v3 extension, // and in C++11 mode. __glibcxx_assert(__pos <= size()); // In pedantic mode be strict in C++98 mode. _GLIBCXX_DEBUG_PEDASSERT(__cplusplus >= 201103L || __pos < size()); _M_leak(); return _M_data()[__pos]; } /** * @brief Provides access to the data contained in the %string. * @param __n The index of the character to access. * @return Read-only (const) reference to the character. * @throw std::out_of_range If @a n is an invalid index. * * This function provides for safer data access. The parameter is * first checked that it is in the range of the string. The function * throws out_of_range if the check fails. */ const_reference at(size_type __n) const { if (__n >= this->size()) __throw_out_of_range_fmt(__N("basic_string::at: __n " "(which is %zu) >= this->size() " "(which is %zu)"), __n, this->size()); return _M_data()[__n]; } /** * @brief Provides access to the data contained in the %string. * @param __n The index of the character to access. * @return Read/write reference to the character. * @throw std::out_of_range If @a n is an invalid index. * * This function provides for safer data access. The parameter is * first checked that it is in the range of the string. The function * throws out_of_range if the check fails. Success results in * unsharing the string. */ reference at(size_type __n) { if (__n >= size()) __throw_out_of_range_fmt(__N("basic_string::at: __n " "(which is %zu) >= this->size() " "(which is %zu)"), __n, this->size()); _M_leak(); return _M_data()[__n]; } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 4106 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * Returns a read/write reference to the data at the first * element of the %string. */ reference front() { __glibcxx_assert(!empty()); return operator[](0); } /** * Returns a read-only (constant) reference to the data at the first * element of the %string. */ const_reference front() const noexcept { __glibcxx_assert(!empty()); return operator[](0); } /** * Returns a read/write reference to the data at the last * element of the %string. */ reference back() { __glibcxx_assert(!empty()); return operator[](this->size() - 1); } /** * Returns a read-only (constant) reference to the data at the * last element of the %string. */ const_reference back() const noexcept { __glibcxx_assert(!empty()); return operator[](this->size() - 1); } #endif # 4150 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 // Modifiers: /** * @brief Append a string to this string. * @param __str The string to append. * @return Reference to this string. */ basic_string& operator+=(const basic_string& __str) { return this->append(__str); } /** * @brief Append a C string. * @param __s The C string to append. * @return Reference to this string. */ basic_string& operator+=(const _CharT* __s) { return this->append(__s); } /** * @brief Append a character. * @param __c The character to append. * @return Reference to this string. */ basic_string& operator+=(_CharT __c) { this->push_back(__c); return *this; } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 4183 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Append an initializer_list of characters. * @param __l The initializer_list of characters to be appended. * @return Reference to this string. */ basic_string& operator+=(initializer_list<_CharT> __l) { return this->append(__l.begin(), __l.size()); } #endif // C++11 # 4192 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 4194 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Append a string_view. * @param __svt The object convertible to string_view to be appended. * @return Reference to this string. */ template<typename _Tp> _If_sv<_Tp, basic_string&> operator+=(const _Tp& __svt) { return this->append(__svt); } #endif // C++17 # 4204 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Append a string to this string. * @param __str The string to append. * @return Reference to this string. */ basic_string& append(const basic_string& __str); /** * @brief Append a substring. * @param __str The string to append. * @param __pos Index of the first character of str to append. * @param __n The number of characters to append. * @return Reference to this string. * @throw std::out_of_range if @a __pos is not a valid index. * * This function appends @a __n characters from @a __str * starting at @a __pos to this string. If @a __n is is larger * than the number of available characters in @a __str, the * remainder of @a __str is appended. */ basic_string& append(const basic_string& __str, size_type __pos, size_type __n = npos); /** * @brief Append a C substring. * @param __s The C string to append. * @param __n The number of characters to append. * @return Reference to this string. */ basic_string& append(const _CharT* __s, size_type __n); /** * @brief Append a C string. * @param __s The C string to append. * @return Reference to this string. */ basic_string& append(const _CharT* __s) { __glibcxx_requires_string(__s); return this->append(__s, traits_type::length(__s)); } /** * @brief Append multiple characters. * @param __n The number of characters to append. * @param __c The character to use. * @return Reference to this string. * * Appends __n copies of __c to this string. */ basic_string& append(size_type __n, _CharT __c); #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 4262 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Append an initializer_list of characters. * @param __l The initializer_list of characters to append. * @return Reference to this string. */ basic_string& append(initializer_list<_CharT> __l) { return this->append(__l.begin(), __l.size()); } #endif // C++11 # 4271 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Append a range of characters. * @param __first Iterator referencing the first character to append. * @param __last Iterator marking the end of the range. * @return Reference to this string. * * Appends characters in the range [__first,__last) to this string. */ template<class _InputIterator> basic_string& append(_InputIterator __first, _InputIterator __last) { return this->replace(_M_iend(), _M_iend(), __first, __last); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 4286 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Append a string_view. * @param __svt The object convertible to string_view to be appended. * @return Reference to this string. */ template<typename _Tp> _If_sv<_Tp, basic_string&> append(const _Tp& __svt) { __sv_type __sv = __svt; return this->append(__sv.data(), __sv.size()); } /** * @brief Append a range of characters from a string_view. * @param __svt The object convertible to string_view to be appended * from. * @param __pos The position in the string_view to append from. * @param __n The number of characters to append from the string_view. * @return Reference to this string. */ template<typename _Tp> _If_sv<_Tp, basic_string&> append(const _Tp& __svt, size_type __pos, size_type __n = npos) { __sv_type __sv = __svt; return append(__sv.data() + std::__sv_check(__sv.size(), __pos, "basic_string::append"), std::__sv_limit(__sv.size(), __pos, __n)); } #endif // C++17 # 4317 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Append a single character. * @param __c Character to append. */ void push_back(_CharT __c) { const size_type __len = 1 + this->size(); if (__len > this->capacity() || _M_rep()->_M_is_shared()) this->reserve(__len); traits_type::assign(_M_data()[this->size()], __c); _M_rep()->_M_set_length_and_sharable(__len); } /** * @brief Set value to contents of another string. * @param __str Source string to use. * @return Reference to this string. */ basic_string& assign(const basic_string& __str); #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 4341 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Set value to contents of another string. * @param __str Source string to use. * @return Reference to this string. * * This function sets this string to the exact contents of @a __str. * @a __str is a valid, but unspecified string. */ basic_string& assign(basic_string&& __str) noexcept(allocator_traits<_Alloc>::is_always_equal::value) { this->swap(__str); return *this; } #endif // C++11 # 4357 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Set value to a substring of a string. * @param __str The string to use. * @param __pos Index of the first character of str. * @param __n Number of characters to use. * @return Reference to this string. * @throw std::out_of_range if @a pos is not a valid index. * * This function sets this string to the substring of @a __str * consisting of @a __n characters at @a __pos. If @a __n is * is larger than the number of available characters in @a * __str, the remainder of @a __str is used. */ basic_string& assign(const basic_string& __str, size_type __pos, size_type __n = npos) { return this->assign(__str._M_data() + __str._M_check(__pos, "basic_string::assign"), __str._M_limit(__pos, __n)); } /** * @brief Set value to a C substring. * @param __s The C string to use. * @param __n Number of characters to use. * @return Reference to this string. * * This function sets the value of this string to the first @a __n * characters of @a __s. If @a __n is is larger than the number of * available characters in @a __s, the remainder of @a __s is used. */ basic_string& assign(const _CharT* __s, size_type __n); /** * @brief Set value to contents of a C string. * @param __s The C string to use. * @return Reference to this string. * * This function sets the value of this string to the value of @a __s. * The data is copied, so there is no dependence on @a __s once the * function returns. */ basic_string& assign(const _CharT* __s) { __glibcxx_requires_string(__s); return this->assign(__s, traits_type::length(__s)); } /** * @brief Set value to multiple characters. * @param __n Length of the resulting string. * @param __c The character to use. * @return Reference to this string. * * This function sets the value of this string to @a __n copies of * character @a __c. */ basic_string& assign(size_type __n, _CharT __c) { return _M_replace_aux(size_type(0), this->size(), __n, __c); } /** * @brief Set value to a range of characters. * @param __first Iterator referencing the first character to append. * @param __last Iterator marking the end of the range. * @return Reference to this string. * * Sets value of string to characters in the range [__first,__last). */ template<class _InputIterator> basic_string& assign(_InputIterator __first, _InputIterator __last) { return this->replace(_M_ibegin(), _M_iend(), __first, __last); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 4433 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Set value to an initializer_list of characters. * @param __l The initializer_list of characters to assign. * @return Reference to this string. */ basic_string& assign(initializer_list<_CharT> __l) { return this->assign(__l.begin(), __l.size()); } #endif // C++11 # 4442 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 4444 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Set value from a string_view. * @param __svt The source object convertible to string_view. * @return Reference to this string. */ template<typename _Tp> _If_sv<_Tp, basic_string&> assign(const _Tp& __svt) { __sv_type __sv = __svt; return this->assign(__sv.data(), __sv.size()); } /** * @brief Set value from a range of characters in a string_view. * @param __svt The source object convertible to string_view. * @param __pos The position in the string_view to assign from. * @param __n The number of characters to assign. * @return Reference to this string. */ template<typename _Tp> _If_sv<_Tp, basic_string&> assign(const _Tp& __svt, size_type __pos, size_type __n = npos) { __sv_type __sv = __svt; return assign(__sv.data() + std::__sv_check(__sv.size(), __pos, "basic_string::assign"), std::__sv_limit(__sv.size(), __pos, __n)); } #endif // C++17 # 4474 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Insert multiple characters. * @param __p Iterator referencing location in string to insert at. * @param __n Number of characters to insert * @param __c The character to insert. * @throw std::length_error If new length exceeds @c max_size(). * * Inserts @a __n copies of character @a __c starting at the * position referenced by iterator @a __p. If adding * characters causes the length to exceed max_size(), * length_error is thrown. The value of the string doesn't * change if an error is thrown. */ void insert(iterator __p, size_type __n, _CharT __c) { this->replace(__p, __p, __n, __c); } /** * @brief Insert a range of characters. * @param __p Iterator referencing location in string to insert at. * @param __beg Start of range. * @param __end End of range. * @throw std::length_error If new length exceeds @c max_size(). * * Inserts characters in range [__beg,__end). If adding * characters causes the length to exceed max_size(), * length_error is thrown. The value of the string doesn't * change if an error is thrown. */ template<class _InputIterator> void insert(iterator __p, _InputIterator __beg, _InputIterator __end) { this->replace(__p, __p, __beg, __end); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 4510 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Insert an initializer_list of characters. * @param __p Iterator referencing location in string to insert at. * @param __l The initializer_list of characters to insert. * @throw std::length_error If new length exceeds @c max_size(). */ void insert(iterator __p, initializer_list<_CharT> __l) { _GLIBCXX_DEBUG_PEDASSERT(__p >= _M_ibegin() && __p <= _M_iend()); this->insert(__p - _M_ibegin(), __l.begin(), __l.size()); } #endif // C++11 # 4523 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Insert value of a string. * @param __pos1 Iterator referencing location in string to insert at. * @param __str The string to insert. * @return Reference to this string. * @throw std::length_error If new length exceeds @c max_size(). * * Inserts value of @a __str starting at @a __pos1. If adding * characters causes the length to exceed max_size(), * length_error is thrown. The value of the string doesn't * change if an error is thrown. */ basic_string& insert(size_type __pos1, const basic_string& __str) { return this->insert(__pos1, __str, size_type(0), __str.size()); } /** * @brief Insert a substring. * @param __pos1 Iterator referencing location in string to insert at. * @param __str The string to insert. * @param __pos2 Start of characters in str to insert. * @param __n Number of characters to insert. * @return Reference to this string. * @throw std::length_error If new length exceeds @c max_size(). * @throw std::out_of_range If @a pos1 > size() or * @a __pos2 > @a str.size(). * * Starting at @a pos1, insert @a __n character of @a __str * beginning with @a __pos2. If adding characters causes the * length to exceed max_size(), length_error is thrown. If @a * __pos1 is beyond the end of this string or @a __pos2 is * beyond the end of @a __str, out_of_range is thrown. The * value of the string doesn't change if an error is thrown. */ basic_string& insert(size_type __pos1, const basic_string& __str, size_type __pos2, size_type __n = npos) { return this->insert(__pos1, __str._M_data() + __str._M_check(__pos2, "basic_string::insert"), __str._M_limit(__pos2, __n)); } /** * @brief Insert a C substring. * @param __pos Iterator referencing location in string to insert at. * @param __s The C string to insert. * @param __n The number of characters to insert. * @return Reference to this string. * @throw std::length_error If new length exceeds @c max_size(). * @throw std::out_of_range If @a __pos is beyond the end of this * string. * * Inserts the first @a __n characters of @a __s starting at @a * __pos. If adding characters causes the length to exceed * max_size(), length_error is thrown. If @a __pos is beyond * end(), out_of_range is thrown. The value of the string * doesn't change if an error is thrown. */ basic_string& insert(size_type __pos, const _CharT* __s, size_type __n); /** * @brief Insert a C string. * @param __pos Iterator referencing location in string to insert at. * @param __s The C string to insert. * @return Reference to this string. * @throw std::length_error If new length exceeds @c max_size(). * @throw std::out_of_range If @a pos is beyond the end of this * string. * * Inserts the first @a n characters of @a __s starting at @a __pos. If * adding characters causes the length to exceed max_size(), * length_error is thrown. If @a __pos is beyond end(), out_of_range is * thrown. The value of the string doesn't change if an error is * thrown. */ basic_string& insert(size_type __pos, const _CharT* __s) { __glibcxx_requires_string(__s); return this->insert(__pos, __s, traits_type::length(__s)); } /** * @brief Insert multiple characters. * @param __pos Index in string to insert at. * @param __n Number of characters to insert * @param __c The character to insert. * @return Reference to this string. * @throw std::length_error If new length exceeds @c max_size(). * @throw std::out_of_range If @a __pos is beyond the end of this * string. * * Inserts @a __n copies of character @a __c starting at index * @a __pos. If adding characters causes the length to exceed * max_size(), length_error is thrown. If @a __pos > length(), * out_of_range is thrown. The value of the string doesn't * change if an error is thrown. */ basic_string& insert(size_type __pos, size_type __n, _CharT __c) { return _M_replace_aux(_M_check(__pos, "basic_string::insert"), size_type(0), __n, __c); } /** * @brief Insert one character. * @param __p Iterator referencing position in string to insert at. * @param __c The character to insert. * @return Iterator referencing newly inserted char. * @throw std::length_error If new length exceeds @c max_size(). * * Inserts character @a __c at position referenced by @a __p. * If adding character causes the length to exceed max_size(), * length_error is thrown. If @a __p is beyond end of string, * out_of_range is thrown. The value of the string doesn't * change if an error is thrown. */ iterator insert(iterator __p, _CharT __c) { _GLIBCXX_DEBUG_PEDASSERT(__p >= _M_ibegin() && __p <= _M_iend()); const size_type __pos = __p - _M_ibegin(); _M_replace_aux(__pos, size_type(0), size_type(1), __c); _M_rep()->_M_set_leaked(); return iterator(_M_data() + __pos); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 4651 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Insert a string_view. * @param __pos Iterator referencing position in string to insert at. * @param __svt The object convertible to string_view to insert. * @return Reference to this string. */ template<typename _Tp> _If_sv<_Tp, basic_string&> insert(size_type __pos, const _Tp& __svt) { __sv_type __sv = __svt; return this->insert(__pos, __sv.data(), __sv.size()); } /** * @brief Insert a string_view. * @param __pos1 Position in string to insert at. * @param __svt The object convertible to string_view to insert from. * @param __pos2 Position in string_view to insert from. * @param __n The number of characters to insert. * @return Reference to this string. */ template<typename _Tp> _If_sv<_Tp, basic_string&> insert(size_type __pos1, const _Tp& __svt, size_type __pos2, size_type __n = npos) { __sv_type __sv = __svt; return this->replace(__pos1, size_type(0), __sv.data() + std::__sv_check(__sv.size(), __pos2, "basic_string::insert"), std::__sv_limit(__sv.size(), __pos2, __n)); } #endif // C++17 # 4684 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Remove characters. * @param __pos Index of first character to remove (default 0). * @param __n Number of characters to remove (default remainder). * @return Reference to this string. * @throw std::out_of_range If @a pos is beyond the end of this * string. * * Removes @a __n characters from this string starting at @a * __pos. The length of the string is reduced by @a __n. If * there are < @a __n characters to remove, the remainder of * the string is truncated. If @a __p is beyond end of string, * out_of_range is thrown. The value of the string doesn't * change if an error is thrown. */ basic_string& erase(size_type __pos = 0, size_type __n = npos) { _M_mutate(_M_check(__pos, "basic_string::erase"), _M_limit(__pos, __n), size_type(0)); return *this; } /** * @brief Remove one character. * @param __position Iterator referencing the character to remove. * @return iterator referencing same location after removal. * * Removes the character at @a __position from this string. The value * of the string doesn't change if an error is thrown. */ iterator erase(iterator __position) { _GLIBCXX_DEBUG_PEDASSERT(__position >= _M_ibegin() && __position < _M_iend()); const size_type __pos = __position - _M_ibegin(); _M_mutate(__pos, size_type(1), size_type(0)); _M_rep()->_M_set_leaked(); return iterator(_M_data() + __pos); } /** * @brief Remove a range of characters. * @param __first Iterator referencing the first character to remove. * @param __last Iterator referencing the end of the range. * @return Iterator referencing location of first after removal. * * Removes the characters in the range [first,last) from this string. * The value of the string doesn't change if an error is thrown. */ iterator erase(iterator __first, iterator __last); #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 4740 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Remove the last character. * * The string must be non-empty. */ void pop_back() // FIXME C++11: should be noexcept. { __glibcxx_assert(!empty()); erase(size() - 1, 1); } #endif // C++11 # 4752 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Replace characters with value from another string. * @param __pos Index of first character to replace. * @param __n Number of characters to be replaced. * @param __str String to insert. * @return Reference to this string. * @throw std::out_of_range If @a pos is beyond the end of this * string. * @throw std::length_error If new length exceeds @c max_size(). * * Removes the characters in the range [__pos,__pos+__n) from * this string. In place, the value of @a __str is inserted. * If @a __pos is beyond end of string, out_of_range is thrown. * If the length of the result exceeds max_size(), length_error * is thrown. The value of the string doesn't change if an * error is thrown. */ basic_string& replace(size_type __pos, size_type __n, const basic_string& __str) { return this->replace(__pos, __n, __str._M_data(), __str.size()); } /** * @brief Replace characters with value from another string. * @param __pos1 Index of first character to replace. * @param __n1 Number of characters to be replaced. * @param __str String to insert. * @param __pos2 Index of first character of str to use. * @param __n2 Number of characters from str to use. * @return Reference to this string. * @throw std::out_of_range If @a __pos1 > size() or @a __pos2 > * __str.size(). * @throw std::length_error If new length exceeds @c max_size(). * * Removes the characters in the range [__pos1,__pos1 + n) from this * string. In place, the value of @a __str is inserted. If @a __pos is * beyond end of string, out_of_range is thrown. If the length of the * result exceeds max_size(), length_error is thrown. The value of the * string doesn't change if an error is thrown. */ basic_string& replace(size_type __pos1, size_type __n1, const basic_string& __str, size_type __pos2, size_type __n2 = npos) { return this->replace(__pos1, __n1, __str._M_data() + __str._M_check(__pos2, "basic_string::replace"), __str._M_limit(__pos2, __n2)); } /** * @brief Replace characters with value of a C substring. * @param __pos Index of first character to replace. * @param __n1 Number of characters to be replaced. * @param __s C string to insert. * @param __n2 Number of characters from @a s to use. * @return Reference to this string. * @throw std::out_of_range If @a pos1 > size(). * @throw std::length_error If new length exceeds @c max_size(). * * Removes the characters in the range [__pos,__pos + __n1) * from this string. In place, the first @a __n2 characters of * @a __s are inserted, or all of @a __s if @a __n2 is too large. If * @a __pos is beyond end of string, out_of_range is thrown. If * the length of result exceeds max_size(), length_error is * thrown. The value of the string doesn't change if an error * is thrown. */ basic_string& replace(size_type __pos, size_type __n1, const _CharT* __s, size_type __n2); /** * @brief Replace characters with value of a C string. * @param __pos Index of first character to replace. * @param __n1 Number of characters to be replaced. * @param __s C string to insert. * @return Reference to this string. * @throw std::out_of_range If @a pos > size(). * @throw std::length_error If new length exceeds @c max_size(). * * Removes the characters in the range [__pos,__pos + __n1) * from this string. In place, the characters of @a __s are * inserted. If @a __pos is beyond end of string, out_of_range * is thrown. If the length of result exceeds max_size(), * length_error is thrown. The value of the string doesn't * change if an error is thrown. */ basic_string& replace(size_type __pos, size_type __n1, const _CharT* __s) { __glibcxx_requires_string(__s); return this->replace(__pos, __n1, __s, traits_type::length(__s)); } /** * @brief Replace characters with multiple characters. * @param __pos Index of first character to replace. * @param __n1 Number of characters to be replaced. * @param __n2 Number of characters to insert. * @param __c Character to insert. * @return Reference to this string. * @throw std::out_of_range If @a __pos > size(). * @throw std::length_error If new length exceeds @c max_size(). * * Removes the characters in the range [pos,pos + n1) from this * string. In place, @a __n2 copies of @a __c are inserted. * If @a __pos is beyond end of string, out_of_range is thrown. * If the length of result exceeds max_size(), length_error is * thrown. The value of the string doesn't change if an error * is thrown. */ basic_string& replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c) { return _M_replace_aux(_M_check(__pos, "basic_string::replace"), _M_limit(__pos, __n1), __n2, __c); } /** * @brief Replace range of characters with string. * @param __i1 Iterator referencing start of range to replace. * @param __i2 Iterator referencing end of range to replace. * @param __str String value to insert. * @return Reference to this string. * @throw std::length_error If new length exceeds @c max_size(). * * Removes the characters in the range [__i1,__i2). In place, * the value of @a __str is inserted. If the length of result * exceeds max_size(), length_error is thrown. The value of * the string doesn't change if an error is thrown. */ basic_string& replace(iterator __i1, iterator __i2, const basic_string& __str) { return this->replace(__i1, __i2, __str._M_data(), __str.size()); } /** * @brief Replace range of characters with C substring. * @param __i1 Iterator referencing start of range to replace. * @param __i2 Iterator referencing end of range to replace. * @param __s C string value to insert. * @param __n Number of characters from s to insert. * @return Reference to this string. * @throw std::length_error If new length exceeds @c max_size(). * * Removes the characters in the range [__i1,__i2). In place, * the first @a __n characters of @a __s are inserted. If the * length of result exceeds max_size(), length_error is thrown. * The value of the string doesn't change if an error is * thrown. */ basic_string& replace(iterator __i1, iterator __i2, const _CharT* __s, size_type __n) { _GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2 && __i2 <= _M_iend()); return this->replace(__i1 - _M_ibegin(), __i2 - __i1, __s, __n); } /** * @brief Replace range of characters with C string. * @param __i1 Iterator referencing start of range to replace. * @param __i2 Iterator referencing end of range to replace. * @param __s C string value to insert. * @return Reference to this string. * @throw std::length_error If new length exceeds @c max_size(). * * Removes the characters in the range [__i1,__i2). In place, * the characters of @a __s are inserted. If the length of * result exceeds max_size(), length_error is thrown. The * value of the string doesn't change if an error is thrown. */ basic_string& replace(iterator __i1, iterator __i2, const _CharT* __s) { __glibcxx_requires_string(__s); return this->replace(__i1, __i2, __s, traits_type::length(__s)); } /** * @brief Replace range of characters with multiple characters * @param __i1 Iterator referencing start of range to replace. * @param __i2 Iterator referencing end of range to replace. * @param __n Number of characters to insert. * @param __c Character to insert. * @return Reference to this string. * @throw std::length_error If new length exceeds @c max_size(). * * Removes the characters in the range [__i1,__i2). In place, * @a __n copies of @a __c are inserted. If the length of * result exceeds max_size(), length_error is thrown. The * value of the string doesn't change if an error is thrown. */ basic_string& replace(iterator __i1, iterator __i2, size_type __n, _CharT __c) { _GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2 && __i2 <= _M_iend()); return _M_replace_aux(__i1 - _M_ibegin(), __i2 - __i1, __n, __c); } /** * @brief Replace range of characters with range. * @param __i1 Iterator referencing start of range to replace. * @param __i2 Iterator referencing end of range to replace. * @param __k1 Iterator referencing start of range to insert. * @param __k2 Iterator referencing end of range to insert. * @return Reference to this string. * @throw std::length_error If new length exceeds @c max_size(). * * Removes the characters in the range [__i1,__i2). In place, * characters in the range [__k1,__k2) are inserted. If the * length of result exceeds max_size(), length_error is thrown. * The value of the string doesn't change if an error is * thrown. */ template<class _InputIterator> basic_string& replace(iterator __i1, iterator __i2, _InputIterator __k1, _InputIterator __k2) { _GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2 && __i2 <= _M_iend()); __glibcxx_requires_valid_range(__k1, __k2); typedef typename std::__is_integer<_InputIterator>::__type _Integral; return _M_replace_dispatch(__i1, __i2, __k1, __k2, _Integral()); } // Specializations for the common case of pointer and iterator: // useful to avoid the overhead of temporary buffering in _M_replace. basic_string& replace(iterator __i1, iterator __i2, _CharT* __k1, _CharT* __k2) { _GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2 && __i2 <= _M_iend()); __glibcxx_requires_valid_range(__k1, __k2); return this->replace(__i1 - _M_ibegin(), __i2 - __i1, __k1, __k2 - __k1); } basic_string& replace(iterator __i1, iterator __i2, const _CharT* __k1, const _CharT* __k2) { _GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2 && __i2 <= _M_iend()); __glibcxx_requires_valid_range(__k1, __k2); return this->replace(__i1 - _M_ibegin(), __i2 - __i1, __k1, __k2 - __k1); } basic_string& replace(iterator __i1, iterator __i2, iterator __k1, iterator __k2) { _GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2 && __i2 <= _M_iend()); __glibcxx_requires_valid_range(__k1, __k2); return this->replace(__i1 - _M_ibegin(), __i2 - __i1, __k1.base(), __k2 - __k1); } basic_string& replace(iterator __i1, iterator __i2, const_iterator __k1, const_iterator __k2) { _GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2 && __i2 <= _M_iend()); __glibcxx_requires_valid_range(__k1, __k2); return this->replace(__i1 - _M_ibegin(), __i2 - __i1, __k1.base(), __k2 - __k1); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 5020 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Replace range of characters with initializer_list. * @param __i1 Iterator referencing start of range to replace. * @param __i2 Iterator referencing end of range to replace. * @param __l The initializer_list of characters to insert. * @return Reference to this string. * @throw std::length_error If new length exceeds @c max_size(). * * Removes the characters in the range [__i1,__i2). In place, * characters in the range [__k1,__k2) are inserted. If the * length of result exceeds max_size(), length_error is thrown. * The value of the string doesn't change if an error is * thrown. */ basic_string& replace(iterator __i1, iterator __i2, initializer_list<_CharT> __l) { return this->replace(__i1, __i2, __l.begin(), __l.end()); } #endif // C++11 # 5038 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 5040 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Replace range of characters with string_view. * @param __pos The position to replace at. * @param __n The number of characters to replace. * @param __svt The object convertible to string_view to insert. * @return Reference to this string. */ template<typename _Tp> _If_sv<_Tp, basic_string&> replace(size_type __pos, size_type __n, const _Tp& __svt) { __sv_type __sv = __svt; return this->replace(__pos, __n, __sv.data(), __sv.size()); } /** * @brief Replace range of characters with string_view. * @param __pos1 The position to replace at. * @param __n1 The number of characters to replace. * @param __svt The object convertible to string_view to insert from. * @param __pos2 The position in the string_view to insert from. * @param __n2 The number of characters to insert. * @return Reference to this string. */ template<typename _Tp> _If_sv<_Tp, basic_string&> replace(size_type __pos1, size_type __n1, const _Tp& __svt, size_type __pos2, size_type __n2 = npos) { __sv_type __sv = __svt; return this->replace(__pos1, __n1, __sv.data() + std::__sv_check(__sv.size(), __pos2, "basic_string::replace"), std::__sv_limit(__sv.size(), __pos2, __n2)); } /** * @brief Replace range of characters with string_view. * @param __i1 An iterator referencing the start position to replace at. * @param __i2 An iterator referencing the end position for the replace. * @param __svt The object convertible to string_view to insert from. * @return Reference to this string. */ template<typename _Tp> _If_sv<_Tp, basic_string&> replace(const_iterator __i1, const_iterator __i2, const _Tp& __svt) { __sv_type __sv = __svt; return this->replace(__i1 - begin(), __i2 - __i1, __sv); } #endif // C++17 # 5093 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 private: template<class _Integer> basic_string& _M_replace_dispatch(iterator __i1, iterator __i2, _Integer __n, _Integer __val, __true_type) { return _M_replace_aux(__i1 - _M_ibegin(), __i2 - __i1, __n, __val); } template<class _InputIterator> basic_string& _M_replace_dispatch(iterator __i1, iterator __i2, _InputIterator __k1, _InputIterator __k2, __false_type); basic_string& _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2, _CharT __c); basic_string& _M_replace_safe(size_type __pos1, size_type __n1, const _CharT* __s, size_type __n2); // _S_construct_aux is used to implement the 21.3.1 para 15 which // requires special behaviour if _InIter is an integral type template<class _InIterator> static _CharT* _S_construct_aux(_InIterator __beg, _InIterator __end, const _Alloc& __a, __false_type) { typedef typename iterator_traits<_InIterator>::iterator_category _Tag; return _S_construct(__beg, __end, __a, _Tag()); } // _GLIBCXX_RESOLVE_LIB_DEFECTS // 438. Ambiguity in the "do the right thing" clause template<class _Integer> static _CharT* _S_construct_aux(_Integer __beg, _Integer __end, const _Alloc& __a, __true_type) { return _S_construct_aux_2(static_cast<size_type>(__beg), __end, __a); } static _CharT* _S_construct_aux_2(size_type __req, _CharT __c, const _Alloc& __a) { return _S_construct(__req, __c, __a); } template<class _InIterator> static _CharT* _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a) { typedef typename std::__is_integer<_InIterator>::__type _Integral; return _S_construct_aux(__beg, __end, __a, _Integral()); } // For Input Iterators, used in istreambuf_iterators, etc. template<class _InIterator> static _CharT* _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a, input_iterator_tag); // For forward_iterators up to random_access_iterators, used for // string::iterator, _CharT*, etc. template<class _FwdIterator> static _CharT* _S_construct(_FwdIterator __beg, _FwdIterator __end, const _Alloc& __a, forward_iterator_tag); static _CharT* _S_construct(size_type __req, _CharT __c, const _Alloc& __a); public: /** * @brief Copy substring into C string. * @param __s C string to copy value into. * @param __n Number of characters to copy. * @param __pos Index of first character to copy. * @return Number of characters actually copied * @throw std::out_of_range If __pos > size(). * * Copies up to @a __n characters starting at @a __pos into the * C string @a __s. If @a __pos is %greater than size(), * out_of_range is thrown. */ size_type copy(_CharT* __s, size_type __n, size_type __pos = 0) const; /** * @brief Swap contents with another string. * @param __s String to swap with. * * Exchanges the contents of this string with that of @a __s in constant * time. */ void swap(basic_string& __s) _GLIBCXX_NOEXCEPT_IF(allocator_traits<_Alloc>::is_always_equal::value); // String operations: /** * @brief Return const pointer to null-terminated contents. * * This is a handle to internal data. Do not modify or dire things may * happen. */ const _CharT* c_str() const _GLIBCXX_NOEXCEPT { return _M_data(); } /** * @brief Return const pointer to contents. * * This is a pointer to internal data. It is undefined to modify * the contents through the returned pointer. To get a pointer that * allows modifying the contents use @c &str[0] instead, * (or in C++17 the non-const @c str.data() overload). */ const _CharT* data() const _GLIBCXX_NOEXCEPT { return _M_data(); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 5214 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Return non-const pointer to contents. * * This is a pointer to the character sequence held by the string. * Modifying the characters in the sequence is allowed. */ _CharT* data() noexcept { _M_leak(); return _M_data(); } #endif # 5227 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Return copy of allocator used to construct this string. */ allocator_type get_allocator() const _GLIBCXX_NOEXCEPT { return _M_dataplus; } /** * @brief Find position of a C substring. * @param __s C string to locate. * @param __pos Index of character to search from. * @param __n Number of characters from @a s to search for. * @return Index of start of first occurrence. * * Starting from @a __pos, searches forward for the first @a * __n characters in @a __s within this string. If found, * returns the index where it begins. If not found, returns * npos. */ size_type find(const _CharT* __s, size_type __pos, size_type __n) const _GLIBCXX_NOEXCEPT; /** * @brief Find position of a string. * @param __str String to locate. * @param __pos Index of character to search from (default 0). * @return Index of start of first occurrence. * * Starting from @a __pos, searches forward for value of @a __str within * this string. If found, returns the index where it begins. If not * found, returns npos. */ size_type find(const basic_string& __str, size_type __pos = 0) const _GLIBCXX_NOEXCEPT { return this->find(__str.data(), __pos, __str.size()); } /** * @brief Find position of a C string. * @param __s C string to locate. * @param __pos Index of character to search from (default 0). * @return Index of start of first occurrence. * * Starting from @a __pos, searches forward for the value of @a * __s within this string. If found, returns the index where * it begins. If not found, returns npos. */ size_type find(const _CharT* __s, size_type __pos = 0) const _GLIBCXX_NOEXCEPT { __glibcxx_requires_string(__s); return this->find(__s, __pos, traits_type::length(__s)); } /** * @brief Find position of a character. * @param __c Character to locate. * @param __pos Index of character to search from (default 0). * @return Index of first occurrence. * * Starting from @a __pos, searches forward for @a __c within * this string. If found, returns the index where it was * found. If not found, returns npos. */ size_type find(_CharT __c, size_type __pos = 0) const _GLIBCXX_NOEXCEPT; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 5297 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Find position of a string_view. * @param __svt The object convertible to string_view to locate. * @param __pos Index of character to search from (default 0). * @return Index of start of first occurrence. */ template<typename _Tp> _If_sv<_Tp, size_type> find(const _Tp& __svt, size_type __pos = 0) const noexcept(is_same<_Tp, __sv_type>::value) { __sv_type __sv = __svt; return this->find(__sv.data(), __pos, __sv.size()); } #endif // C++17 # 5312 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Find last position of a string. * @param __str String to locate. * @param __pos Index of character to search back from (default end). * @return Index of start of last occurrence. * * Starting from @a __pos, searches backward for value of @a * __str within this string. If found, returns the index where * it begins. If not found, returns npos. */ size_type rfind(const basic_string& __str, size_type __pos = npos) const _GLIBCXX_NOEXCEPT { return this->rfind(__str.data(), __pos, __str.size()); } /** * @brief Find last position of a C substring. * @param __s C string to locate. * @param __pos Index of character to search back from. * @param __n Number of characters from s to search for. * @return Index of start of last occurrence. * * Starting from @a __pos, searches backward for the first @a * __n characters in @a __s within this string. If found, * returns the index where it begins. If not found, returns * npos. */ size_type rfind(const _CharT* __s, size_type __pos, size_type __n) const _GLIBCXX_NOEXCEPT; /** * @brief Find last position of a C string. * @param __s C string to locate. * @param __pos Index of character to start search at (default end). * @return Index of start of last occurrence. * * Starting from @a __pos, searches backward for the value of * @a __s within this string. If found, returns the index * where it begins. If not found, returns npos. */ size_type rfind(const _CharT* __s, size_type __pos = npos) const _GLIBCXX_NOEXCEPT { __glibcxx_requires_string(__s); return this->rfind(__s, __pos, traits_type::length(__s)); } /** * @brief Find last position of a character. * @param __c Character to locate. * @param __pos Index of character to search back from (default end). * @return Index of last occurrence. * * Starting from @a __pos, searches backward for @a __c within * this string. If found, returns the index where it was * found. If not found, returns npos. */ size_type rfind(_CharT __c, size_type __pos = npos) const _GLIBCXX_NOEXCEPT; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 5375 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Find last position of a string_view. * @param __svt The object convertible to string_view to locate. * @param __pos Index of character to search back from (default end). * @return Index of start of last occurrence. */ template<typename _Tp> _If_sv<_Tp, size_type> rfind(const _Tp& __svt, size_type __pos = npos) const noexcept(is_same<_Tp, __sv_type>::value) { __sv_type __sv = __svt; return this->rfind(__sv.data(), __pos, __sv.size()); } #endif // C++17 # 5390 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Find position of a character of string. * @param __str String containing characters to locate. * @param __pos Index of character to search from (default 0). * @return Index of first occurrence. * * Starting from @a __pos, searches forward for one of the * characters of @a __str within this string. If found, * returns the index where it was found. If not found, returns * npos. */ size_type find_first_of(const basic_string& __str, size_type __pos = 0) const _GLIBCXX_NOEXCEPT { return this->find_first_of(__str.data(), __pos, __str.size()); } /** * @brief Find position of a character of C substring. * @param __s String containing characters to locate. * @param __pos Index of character to search from. * @param __n Number of characters from s to search for. * @return Index of first occurrence. * * Starting from @a __pos, searches forward for one of the * first @a __n characters of @a __s within this string. If * found, returns the index where it was found. If not found, * returns npos. */ size_type find_first_of(const _CharT* __s, size_type __pos, size_type __n) const _GLIBCXX_NOEXCEPT; /** * @brief Find position of a character of C string. * @param __s String containing characters to locate. * @param __pos Index of character to search from (default 0). * @return Index of first occurrence. * * Starting from @a __pos, searches forward for one of the * characters of @a __s within this string. If found, returns * the index where it was found. If not found, returns npos. */ size_type find_first_of(const _CharT* __s, size_type __pos = 0) const _GLIBCXX_NOEXCEPT { __glibcxx_requires_string(__s); return this->find_first_of(__s, __pos, traits_type::length(__s)); } /** * @brief Find position of a character. * @param __c Character to locate. * @param __pos Index of character to search from (default 0). * @return Index of first occurrence. * * Starting from @a __pos, searches forward for the character * @a __c within this string. If found, returns the index * where it was found. If not found, returns npos. * * Note: equivalent to find(__c, __pos). */ size_type find_first_of(_CharT __c, size_type __pos = 0) const _GLIBCXX_NOEXCEPT { return this->find(__c, __pos); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 5458 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Find position of a character of a string_view. * @param __svt An object convertible to string_view containing * characters to locate. * @param __pos Index of character to search from (default 0). * @return Index of first occurrence. */ template<typename _Tp> _If_sv<_Tp, size_type> find_first_of(const _Tp& __svt, size_type __pos = 0) const noexcept(is_same<_Tp, __sv_type>::value) { __sv_type __sv = __svt; return this->find_first_of(__sv.data(), __pos, __sv.size()); } #endif // C++17 # 5474 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Find last position of a character of string. * @param __str String containing characters to locate. * @param __pos Index of character to search back from (default end). * @return Index of last occurrence. * * Starting from @a __pos, searches backward for one of the * characters of @a __str within this string. If found, * returns the index where it was found. If not found, returns * npos. */ size_type find_last_of(const basic_string& __str, size_type __pos = npos) const _GLIBCXX_NOEXCEPT { return this->find_last_of(__str.data(), __pos, __str.size()); } /** * @brief Find last position of a character of C substring. * @param __s C string containing characters to locate. * @param __pos Index of character to search back from. * @param __n Number of characters from s to search for. * @return Index of last occurrence. * * Starting from @a __pos, searches backward for one of the * first @a __n characters of @a __s within this string. If * found, returns the index where it was found. If not found, * returns npos. */ size_type find_last_of(const _CharT* __s, size_type __pos, size_type __n) const _GLIBCXX_NOEXCEPT; /** * @brief Find last position of a character of C string. * @param __s C string containing characters to locate. * @param __pos Index of character to search back from (default end). * @return Index of last occurrence. * * Starting from @a __pos, searches backward for one of the * characters of @a __s within this string. If found, returns * the index where it was found. If not found, returns npos. */ size_type find_last_of(const _CharT* __s, size_type __pos = npos) const _GLIBCXX_NOEXCEPT { __glibcxx_requires_string(__s); return this->find_last_of(__s, __pos, traits_type::length(__s)); } /** * @brief Find last position of a character. * @param __c Character to locate. * @param __pos Index of character to search back from (default end). * @return Index of last occurrence. * * Starting from @a __pos, searches backward for @a __c within * this string. If found, returns the index where it was * found. If not found, returns npos. * * Note: equivalent to rfind(__c, __pos). */ size_type find_last_of(_CharT __c, size_type __pos = npos) const _GLIBCXX_NOEXCEPT { return this->rfind(__c, __pos); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 5542 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Find last position of a character of string. * @param __svt An object convertible to string_view containing * characters to locate. * @param __pos Index of character to search back from (default end). * @return Index of last occurrence. */ template<typename _Tp> _If_sv<_Tp, size_type> find_last_of(const _Tp& __svt, size_type __pos = npos) const noexcept(is_same<_Tp, __sv_type>::value) { __sv_type __sv = __svt; return this->find_last_of(__sv.data(), __pos, __sv.size()); } #endif // C++17 # 5558 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Find position of a character not in string. * @param __str String containing characters to avoid. * @param __pos Index of character to search from (default 0). * @return Index of first occurrence. * * Starting from @a __pos, searches forward for a character not contained * in @a __str within this string. If found, returns the index where it * was found. If not found, returns npos. */ size_type find_first_not_of(const basic_string& __str, size_type __pos = 0) const _GLIBCXX_NOEXCEPT { return this->find_first_not_of(__str.data(), __pos, __str.size()); } /** * @brief Find position of a character not in C substring. * @param __s C string containing characters to avoid. * @param __pos Index of character to search from. * @param __n Number of characters from __s to consider. * @return Index of first occurrence. * * Starting from @a __pos, searches forward for a character not * contained in the first @a __n characters of @a __s within * this string. If found, returns the index where it was * found. If not found, returns npos. */ size_type find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const _GLIBCXX_NOEXCEPT; /** * @brief Find position of a character not in C string. * @param __s C string containing characters to avoid. * @param __pos Index of character to search from (default 0). * @return Index of first occurrence. * * Starting from @a __pos, searches forward for a character not * contained in @a __s within this string. If found, returns * the index where it was found. If not found, returns npos. */ size_type find_first_not_of(const _CharT* __s, size_type __pos = 0) const _GLIBCXX_NOEXCEPT { __glibcxx_requires_string(__s); return this->find_first_not_of(__s, __pos, traits_type::length(__s)); } /** * @brief Find position of a different character. * @param __c Character to avoid. * @param __pos Index of character to search from (default 0). * @return Index of first occurrence. * * Starting from @a __pos, searches forward for a character * other than @a __c within this string. If found, returns the * index where it was found. If not found, returns npos. */ size_type find_first_not_of(_CharT __c, size_type __pos = 0) const _GLIBCXX_NOEXCEPT; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 5623 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Find position of a character not in a string_view. * @param __svt An object convertible to string_view containing * characters to avoid. * @param __pos Index of character to search from (default 0). * @return Index of first occurrence. */ template<typename _Tp> _If_sv<_Tp, size_type> find_first_not_of(const _Tp& __svt, size_type __pos = 0) const noexcept(is_same<_Tp, __sv_type>::value) { __sv_type __sv = __svt; return this->find_first_not_of(__sv.data(), __pos, __sv.size()); } #endif // C++17 # 5639 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Find last position of a character not in string. * @param __str String containing characters to avoid. * @param __pos Index of character to search back from (default end). * @return Index of last occurrence. * * Starting from @a __pos, searches backward for a character * not contained in @a __str within this string. If found, * returns the index where it was found. If not found, returns * npos. */ size_type find_last_not_of(const basic_string& __str, size_type __pos = npos) const _GLIBCXX_NOEXCEPT { return this->find_last_not_of(__str.data(), __pos, __str.size()); } /** * @brief Find last position of a character not in C substring. * @param __s C string containing characters to avoid. * @param __pos Index of character to search back from. * @param __n Number of characters from s to consider. * @return Index of last occurrence. * * Starting from @a __pos, searches backward for a character not * contained in the first @a __n characters of @a __s within this string. * If found, returns the index where it was found. If not found, * returns npos. */ size_type find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const _GLIBCXX_NOEXCEPT; /** * @brief Find last position of a character not in C string. * @param __s C string containing characters to avoid. * @param __pos Index of character to search back from (default end). * @return Index of last occurrence. * * Starting from @a __pos, searches backward for a character * not contained in @a __s within this string. If found, * returns the index where it was found. If not found, returns * npos. */ size_type find_last_not_of(const _CharT* __s, size_type __pos = npos) const _GLIBCXX_NOEXCEPT { __glibcxx_requires_string(__s); return this->find_last_not_of(__s, __pos, traits_type::length(__s)); } /** * @brief Find last position of a different character. * @param __c Character to avoid. * @param __pos Index of character to search back from (default end). * @return Index of last occurrence. * * Starting from @a __pos, searches backward for a character other than * @a __c within this string. If found, returns the index where it was * found. If not found, returns npos. */ size_type find_last_not_of(_CharT __c, size_type __pos = npos) const _GLIBCXX_NOEXCEPT; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 5705 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Find last position of a character not in a string_view. * @param __svt An object convertible to string_view containing * characters to avoid. * @param __pos Index of character to search back from (default end). * @return Index of last occurrence. */ template<typename _Tp> _If_sv<_Tp, size_type> find_last_not_of(const _Tp& __svt, size_type __pos = npos) const noexcept(is_same<_Tp, __sv_type>::value) { __sv_type __sv = __svt; return this->find_last_not_of(__sv.data(), __pos, __sv.size()); } #endif // C++17 # 5721 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Get a substring. * @param __pos Index of first character (default 0). * @param __n Number of characters in substring (default remainder). * @return The new string. * @throw std::out_of_range If __pos > size(). * * Construct and return a new string using the @a __n * characters starting at @a __pos. If the string is too * short, use the remainder of the characters. If @a __pos is * beyond the end of the string, out_of_range is thrown. */ basic_string substr(size_type __pos = 0, size_type __n = npos) const { return basic_string(*this, _M_check(__pos, "basic_string::substr"), __n); } /** * @brief Compare to a string. * @param __str String to compare against. * @return Integer < 0, 0, or > 0. * * Returns an integer < 0 if this string is ordered before @a * __str, 0 if their values are equivalent, or > 0 if this * string is ordered after @a __str. Determines the effective * length rlen of the strings to compare as the smallest of * size() and str.size(). The function then compares the two * strings by calling traits::compare(data(), str.data(),rlen). * If the result of the comparison is nonzero returns it, * otherwise the shorter one is ordered first. */ int compare(const basic_string& __str) const { const size_type __size = this->size(); const size_type __osize = __str.size(); const size_type __len = std::min(__size, __osize); int __r = traits_type::compare(_M_data(), __str.data(), __len); if (!__r) __r = _S_compare(__size, __osize); return __r; } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 5767 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Compare to a string_view. * @param __svt An object convertible to string_view to compare against. * @return Integer < 0, 0, or > 0. */ template<typename _Tp> _If_sv<_Tp, int> compare(const _Tp& __svt) const noexcept(is_same<_Tp, __sv_type>::value) { __sv_type __sv = __svt; const size_type __size = this->size(); const size_type __osize = __sv.size(); const size_type __len = std::min(__size, __osize); int __r = traits_type::compare(_M_data(), __sv.data(), __len); if (!__r) __r = _S_compare(__size, __osize); return __r; } /** * @brief Compare to a string_view. * @param __pos A position in the string to start comparing from. * @param __n The number of characters to compare. * @param __svt An object convertible to string_view to compare * against. * @return Integer < 0, 0, or > 0. */ template<typename _Tp> _If_sv<_Tp, int> compare(size_type __pos, size_type __n, const _Tp& __svt) const noexcept(is_same<_Tp, __sv_type>::value) { __sv_type __sv = __svt; return __sv_type(*this).substr(__pos, __n).compare(__sv); } /** * @brief Compare to a string_view. * @param __pos1 A position in the string to start comparing from. * @param __n1 The number of characters to compare. * @param __svt An object convertible to string_view to compare * against. * @param __pos2 A position in the string_view to start comparing from. * @param __n2 The number of characters to compare. * @return Integer < 0, 0, or > 0. */ template<typename _Tp> _If_sv<_Tp, int> compare(size_type __pos1, size_type __n1, const _Tp& __svt, size_type __pos2, size_type __n2 = npos) const noexcept(is_same<_Tp, __sv_type>::value) { __sv_type __sv = __svt; return __sv_type(*this) .substr(__pos1, __n1).compare(__sv.substr(__pos2, __n2)); } #endif // C++17 # 5826 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /** * @brief Compare substring to a string. * @param __pos Index of first character of substring. * @param __n Number of characters in substring. * @param __str String to compare against. * @return Integer < 0, 0, or > 0. * * Form the substring of this string from the @a __n characters * starting at @a __pos. Returns an integer < 0 if the * substring is ordered before @a __str, 0 if their values are * equivalent, or > 0 if the substring is ordered after @a * __str. Determines the effective length rlen of the strings * to compare as the smallest of the length of the substring * and @a __str.size(). The function then compares the two * strings by calling * traits::compare(substring.data(),str.data(),rlen). If the * result of the comparison is nonzero returns it, otherwise * the shorter one is ordered first. */ int compare(size_type __pos, size_type __n, const basic_string& __str) const; /** * @brief Compare substring to a substring. * @param __pos1 Index of first character of substring. * @param __n1 Number of characters in substring. * @param __str String to compare against. * @param __pos2 Index of first character of substring of str. * @param __n2 Number of characters in substring of str. * @return Integer < 0, 0, or > 0. * * Form the substring of this string from the @a __n1 * characters starting at @a __pos1. Form the substring of @a * __str from the @a __n2 characters starting at @a __pos2. * Returns an integer < 0 if this substring is ordered before * the substring of @a __str, 0 if their values are equivalent, * or > 0 if this substring is ordered after the substring of * @a __str. Determines the effective length rlen of the * strings to compare as the smallest of the lengths of the * substrings. The function then compares the two strings by * calling * traits::compare(substring.data(),str.substr(pos2,n2).data(),rlen). * If the result of the comparison is nonzero returns it, * otherwise the shorter one is ordered first. */ int compare(size_type __pos1, size_type __n1, const basic_string& __str, size_type __pos2, size_type __n2 = npos) const; /** * @brief Compare to a C string. * @param __s C string to compare against. * @return Integer < 0, 0, or > 0. * * Returns an integer < 0 if this string is ordered before @a __s, 0 if * their values are equivalent, or > 0 if this string is ordered after * @a __s. Determines the effective length rlen of the strings to * compare as the smallest of size() and the length of a string * constructed from @a __s. The function then compares the two strings * by calling traits::compare(data(),s,rlen). If the result of the * comparison is nonzero returns it, otherwise the shorter one is * ordered first. */ int compare(const _CharT* __s) const _GLIBCXX_NOEXCEPT; // _GLIBCXX_RESOLVE_LIB_DEFECTS // 5 String::compare specification questionable /** * @brief Compare substring to a C string. * @param __pos Index of first character of substring. * @param __n1 Number of characters in substring. * @param __s C string to compare against. * @return Integer < 0, 0, or > 0. * * Form the substring of this string from the @a __n1 * characters starting at @a pos. Returns an integer < 0 if * the substring is ordered before @a __s, 0 if their values * are equivalent, or > 0 if the substring is ordered after @a * __s. Determines the effective length rlen of the strings to * compare as the smallest of the length of the substring and * the length of a string constructed from @a __s. The * function then compares the two string by calling * traits::compare(substring.data(),__s,rlen). If the result of * the comparison is nonzero returns it, otherwise the shorter * one is ordered first. */ int compare(size_type __pos, size_type __n1, const _CharT* __s) const; /** * @brief Compare substring against a character %array. * @param __pos Index of first character of substring. * @param __n1 Number of characters in substring. * @param __s character %array to compare against. * @param __n2 Number of characters of s. * @return Integer < 0, 0, or > 0. * * Form the substring of this string from the @a __n1 * characters starting at @a __pos. Form a string from the * first @a __n2 characters of @a __s. Returns an integer < 0 * if this substring is ordered before the string from @a __s, * 0 if their values are equivalent, or > 0 if this substring * is ordered after the string from @a __s. Determines the * effective length rlen of the strings to compare as the * smallest of the length of the substring and @a __n2. The * function then compares the two strings by calling * traits::compare(substring.data(),s,rlen). If the result of * the comparison is nonzero returns it, otherwise the shorter * one is ordered first. * * NB: s must have at least n2 characters, '\\0' has * no special meaning. */ int compare(size_type __pos, size_type __n1, const _CharT* __s, size_type __n2) const; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 5946 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 bool starts_with(basic_string_view<_CharT, _Traits> __x) const noexcept { return __sv_type(this->data(), this->size()).starts_with(__x); } bool starts_with(_CharT __x) const noexcept { return __sv_type(this->data(), this->size()).starts_with(__x); } bool starts_with(const _CharT* __x) const noexcept { return __sv_type(this->data(), this->size()).starts_with(__x); } bool ends_with(basic_string_view<_CharT, _Traits> __x) const noexcept { return __sv_type(this->data(), this->size()).ends_with(__x); } bool ends_with(_CharT __x) const noexcept { return __sv_type(this->data(), this->size()).ends_with(__x); } bool ends_with(const _CharT* __x) const noexcept { return __sv_type(this->data(), this->size()).ends_with(__x); } #endif // C++20 # 5970 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 # ifdef _GLIBCXX_TM_TS_INTERNAL friend void ::_txnal_cow_string_C1_for_exceptions(void* that, const char* s, void* exc); friend const char* ::_txnal_cow_string_c_str(const void *that); friend void ::_txnal_cow_string_D1(void *that); friend void ::_txnal_cow_string_D1_commit(void *that); # endif # 5982 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 }; #endif // !_GLIBCXX_USE_CXX11_ABI # 5984 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cpp_deduction_guides >= 201606 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 5986 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 _GLIBCXX_BEGIN_NAMESPACE_CXX11 template<typename _InputIterator, typename _CharT = typename iterator_traits<_InputIterator>::value_type, typename _Allocator = allocator<_CharT>, typename = _RequireInputIter<_InputIterator>, typename = _RequireAllocator<_Allocator>> basic_string(_InputIterator, _InputIterator, _Allocator = _Allocator()) -> basic_string<_CharT, char_traits<_CharT>, _Allocator>; // _GLIBCXX_RESOLVE_LIB_DEFECTS // 3075. basic_string needs deduction guides from basic_string_view template<typename _CharT, typename _Traits, typename _Allocator = allocator<_CharT>, typename = _RequireAllocator<_Allocator>> basic_string(basic_string_view<_CharT, _Traits>, const _Allocator& = _Allocator()) -> basic_string<_CharT, _Traits, _Allocator>; template<typename _CharT, typename _Traits, typename _Allocator = allocator<_CharT>, typename = _RequireAllocator<_Allocator>> basic_string(basic_string_view<_CharT, _Traits>, typename basic_string<_CharT, _Traits, _Allocator>::size_type, typename basic_string<_CharT, _Traits, _Allocator>::size_type, const _Allocator& = _Allocator()) -> basic_string<_CharT, _Traits, _Allocator>; _GLIBCXX_END_NAMESPACE_CXX11 #endif # 6013 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 // operator+ /** * @brief Concatenate two strings. * @param __lhs First string. * @param __rhs Last string. * @return New string with value of @a __lhs followed by @a __rhs. */ template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc> operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { basic_string<_CharT, _Traits, _Alloc> __str(__lhs); __str.append(__rhs); return __str; } /** * @brief Concatenate C string and string. * @param __lhs First string. * @param __rhs Last string. * @return New string with value of @a __lhs followed by @a __rhs. */ template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT,_Traits,_Alloc> operator+(const _CharT* __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs); /** * @brief Concatenate character and string. * @param __lhs First string. * @param __rhs Last string. * @return New string with @a __lhs followed by @a __rhs. */ template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT,_Traits,_Alloc> operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs); /** * @brief Concatenate string and C string. * @param __lhs First string. * @param __rhs Last string. * @return New string with @a __lhs followed by @a __rhs. */ template<typename _CharT, typename _Traits, typename _Alloc> inline basic_string<_CharT, _Traits, _Alloc> operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const _CharT* __rhs) { basic_string<_CharT, _Traits, _Alloc> __str(__lhs); __str.append(__rhs); return __str; } /** * @brief Concatenate string and character. * @param __lhs First string. * @param __rhs Last string. * @return New string with @a __lhs followed by @a __rhs. */ template<typename _CharT, typename _Traits, typename _Alloc> inline basic_string<_CharT, _Traits, _Alloc> operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs) { typedef basic_string<_CharT, _Traits, _Alloc> __string_type; typedef typename __string_type::size_type __size_type; __string_type __str(__lhs); __str.append(__size_type(1), __rhs); return __str; } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 6086 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 template<typename _CharT, typename _Traits, typename _Alloc> inline basic_string<_CharT, _Traits, _Alloc> operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return std::move(__lhs.append(__rhs)); } template<typename _CharT, typename _Traits, typename _Alloc> inline basic_string<_CharT, _Traits, _Alloc> operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, basic_string<_CharT, _Traits, _Alloc>&& __rhs) { return std::move(__rhs.insert(0, __lhs)); } template<typename _CharT, typename _Traits, typename _Alloc> inline basic_string<_CharT, _Traits, _Alloc> operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, basic_string<_CharT, _Traits, _Alloc>&& __rhs) { const auto __size = __lhs.size() + __rhs.size(); const bool __cond = (__size > __lhs.capacity() && __size <= __rhs.capacity()); return __cond ? std::move(__rhs.insert(0, __lhs)) : std::move(__lhs.append(__rhs)); } template<typename _CharT, typename _Traits, typename _Alloc> inline basic_string<_CharT, _Traits, _Alloc> operator+(const _CharT* __lhs, basic_string<_CharT, _Traits, _Alloc>&& __rhs) { return std::move(__rhs.insert(0, __lhs)); } template<typename _CharT, typename _Traits, typename _Alloc> inline basic_string<_CharT, _Traits, _Alloc> operator+(_CharT __lhs, basic_string<_CharT, _Traits, _Alloc>&& __rhs) { return std::move(__rhs.insert(0, 1, __lhs)); } template<typename _CharT, typename _Traits, typename _Alloc> inline basic_string<_CharT, _Traits, _Alloc> operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, const _CharT* __rhs) { return std::move(__lhs.append(__rhs)); } template<typename _CharT, typename _Traits, typename _Alloc> inline basic_string<_CharT, _Traits, _Alloc> operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, _CharT __rhs) { return std::move(__lhs.append(1, __rhs)); } #endif # 6134 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 // operator == /** * @brief Test equivalence of two strings. * @param __lhs First string. * @param __rhs Second string. * @return True if @a __lhs.compare(@a __rhs) == 0. False otherwise. */ template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) _GLIBCXX_NOEXCEPT { return __lhs.compare(__rhs) == 0; } template<typename _CharT> inline typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, bool>::__type operator==(const basic_string<_CharT>& __lhs, const basic_string<_CharT>& __rhs) _GLIBCXX_NOEXCEPT { return (__lhs.size() == __rhs.size() && !std::char_traits<_CharT>::compare(__lhs.data(), __rhs.data(), __lhs.size())); } /** * @brief Test equivalence of C string and string. * @param __lhs C string. * @param __rhs String. * @return True if @a __rhs.compare(@a __lhs) == 0. False otherwise. */ template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator==(const _CharT* __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __rhs.compare(__lhs) == 0; } /** * @brief Test equivalence of string and C string. * @param __lhs String. * @param __rhs C string. * @return True if @a __lhs.compare(@a __rhs) == 0. False otherwise. */ template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const _CharT* __rhs) { return __lhs.compare(__rhs) == 0; } // operator != /** * @brief Test difference of two strings. * @param __lhs First string. * @param __rhs Second string. * @return True if @a __lhs.compare(@a __rhs) != 0. False otherwise. */ template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) _GLIBCXX_NOEXCEPT { return !(__lhs == __rhs); } /** * @brief Test difference of C string and string. * @param __lhs C string. * @param __rhs String. * @return True if @a __rhs.compare(@a __lhs) != 0. False otherwise. */ template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator!=(const _CharT* __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return !(__lhs == __rhs); } /** * @brief Test difference of string and C string. * @param __lhs String. * @param __rhs C string. * @return True if @a __lhs.compare(@a __rhs) != 0. False otherwise. */ template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const _CharT* __rhs) { return !(__lhs == __rhs); } // operator < /** * @brief Test if string precedes string. * @param __lhs First string. * @param __rhs Second string. * @return True if @a __lhs precedes @a __rhs. False otherwise. */ template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) _GLIBCXX_NOEXCEPT { return __lhs.compare(__rhs) < 0; } /** * @brief Test if string precedes C string. * @param __lhs String. * @param __rhs C string. * @return True if @a __lhs precedes @a __rhs. False otherwise. */ template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const _CharT* __rhs) { return __lhs.compare(__rhs) < 0; } /** * @brief Test if C string precedes string. * @param __lhs C string. * @param __rhs String. * @return True if @a __lhs precedes @a __rhs. False otherwise. */ template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator<(const _CharT* __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __rhs.compare(__lhs) > 0; } // operator > /** * @brief Test if string follows string. * @param __lhs First string. * @param __rhs Second string. * @return True if @a __lhs follows @a __rhs. False otherwise. */ template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) _GLIBCXX_NOEXCEPT { return __lhs.compare(__rhs) > 0; } /** * @brief Test if string follows C string. * @param __lhs String. * @param __rhs C string. * @return True if @a __lhs follows @a __rhs. False otherwise. */ template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const _CharT* __rhs) { return __lhs.compare(__rhs) > 0; } /** * @brief Test if C string follows string. * @param __lhs C string. * @param __rhs String. * @return True if @a __lhs follows @a __rhs. False otherwise. */ template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator>(const _CharT* __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __rhs.compare(__lhs) < 0; } // operator <= /** * @brief Test if string doesn't follow string. * @param __lhs First string. * @param __rhs Second string. * @return True if @a __lhs doesn't follow @a __rhs. False otherwise. */ template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) _GLIBCXX_NOEXCEPT { return __lhs.compare(__rhs) <= 0; } /** * @brief Test if string doesn't follow C string. * @param __lhs String. * @param __rhs C string. * @return True if @a __lhs doesn't follow @a __rhs. False otherwise. */ template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const _CharT* __rhs) { return __lhs.compare(__rhs) <= 0; } /** * @brief Test if C string doesn't follow string. * @param __lhs C string. * @param __rhs String. * @return True if @a __lhs doesn't follow @a __rhs. False otherwise. */ template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator<=(const _CharT* __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __rhs.compare(__lhs) >= 0; } // operator >= /** * @brief Test if string doesn't precede string. * @param __lhs First string. * @param __rhs Second string. * @return True if @a __lhs doesn't precede @a __rhs. False otherwise. */ template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) _GLIBCXX_NOEXCEPT { return __lhs.compare(__rhs) >= 0; } /** * @brief Test if string doesn't precede C string. * @param __lhs String. * @param __rhs C string. * @return True if @a __lhs doesn't precede @a __rhs. False otherwise. */ template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const _CharT* __rhs) { return __lhs.compare(__rhs) >= 0; } /** * @brief Test if C string doesn't precede string. * @param __lhs C string. * @param __rhs String. * @return True if @a __lhs doesn't precede @a __rhs. False otherwise. */ template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator>=(const _CharT* __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __rhs.compare(__lhs) <= 0; } /** * @brief Swap contents of two strings. * @param __lhs First string. * @param __rhs Second string. * * Exchanges the contents of @a __lhs and @a __rhs in constant time. */ template<typename _CharT, typename _Traits, typename _Alloc> inline void swap(basic_string<_CharT, _Traits, _Alloc>& __lhs, basic_string<_CharT, _Traits, _Alloc>& __rhs) _GLIBCXX_NOEXCEPT_IF(noexcept(__lhs.swap(__rhs))) { __lhs.swap(__rhs); } /** * @brief Read stream into a string. * @param __is Input stream. * @param __str Buffer to store into. * @return Reference to the input stream. * * Stores characters from @a __is into @a __str until whitespace is * found, the end of the stream is encountered, or str.max_size() * is reached. If is.width() is non-zero, that is the limit on the * number of characters stored into @a __str. Any previous * contents of @a __str are erased. */ template<typename _CharT, typename _Traits, typename _Alloc> basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __is, basic_string<_CharT, _Traits, _Alloc>& __str); template<> basic_istream<char>& operator>>(basic_istream<char>& __is, basic_string<char>& __str); /** * @brief Write string to a stream. * @param __os Output stream. * @param __str String to write out. * @return Reference to the output stream. * * Output characters of @a __str into os following the same rules as for * writing a C string. */ template<typename _CharT, typename _Traits, typename _Alloc> inline basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const basic_string<_CharT, _Traits, _Alloc>& __str) { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 586. string inserter not a formatted function return __ostream_insert(__os, __str.data(), __str.size()); } /** * @brief Read a line from stream into a string. * @param __is Input stream. * @param __str Buffer to store into. * @param __delim Character marking end of line. * @return Reference to the input stream. * * Stores characters from @a __is into @a __str until @a __delim is * found, the end of the stream is encountered, or str.max_size() * is reached. Any previous contents of @a __str are erased. If * @a __delim is encountered, it is extracted but not stored into * @a __str. */ template<typename _CharT, typename _Traits, typename _Alloc> basic_istream<_CharT, _Traits>& getline(basic_istream<_CharT, _Traits>& __is, basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim); /** * @brief Read a line from stream into a string. * @param __is Input stream. * @param __str Buffer to store into. * @return Reference to the input stream. * * Stores characters from is into @a __str until '\n' is * found, the end of the stream is encountered, or str.max_size() * is reached. Any previous contents of @a __str are erased. If * end of line is encountered, it is extracted but not stored into * @a __str. */ template<typename _CharT, typename _Traits, typename _Alloc> inline basic_istream<_CharT, _Traits>& getline(basic_istream<_CharT, _Traits>& __is, basic_string<_CharT, _Traits, _Alloc>& __str) { return std::getline(__is, __str, __is.widen('\n')); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 6464 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /// Read a line from an rvalue stream into a string. template<typename _CharT, typename _Traits, typename _Alloc> inline basic_istream<_CharT, _Traits>& getline(basic_istream<_CharT, _Traits>&& __is, basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim) { return std::getline(__is, __str, __delim); } /// Read a line from an rvalue stream into a string. template<typename _CharT, typename _Traits, typename _Alloc> inline basic_istream<_CharT, _Traits>& getline(basic_istream<_CharT, _Traits>&& __is, basic_string<_CharT, _Traits, _Alloc>& __str) { return std::getline(__is, __str); } #endif # 6478 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 template<> basic_istream<char>& getline(basic_istream<char>& __in, basic_string<char>& __str, char __delim); #ifdef _GLIBCXX_USE_WCHAR_T template<> basic_istream<wchar_t>& getline(basic_istream<wchar_t>& __in, basic_string<wchar_t>& __str, wchar_t __delim); #endif # 6490 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 _GLIBCXX_END_NAMESPACE_VERSION } // namespace #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 6495 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <ext/string_conversions.h> #endif /* expanded by -frewrite-includes */ # 6496 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/string_conversions.h" 1 3 // String Conversions -*- C++ -*- // Copyright (C) 2008-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file ext/string_conversions.h * This file is a GNU extension to the Standard C++ Library. */ #ifndef _STRING_CONVERSIONS_H #define _STRING_CONVERSIONS_H 1 #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 33 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/string_conversions.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus < 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 35 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/string_conversions.h" 3 #if 0 /* expanded by -frewrite-includes */ # include <bits/c++0x_warning.h> #endif /* expanded by -frewrite-includes */ # 35 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/string_conversions.h" 3 # 36 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/string_conversions.h" 3 #else # 37 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/string_conversions.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/c++config.h> #endif /* expanded by -frewrite-includes */ # 38 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/string_conversions.h" 3 # 39 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/string_conversions.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <ext/numeric_traits.h> #endif /* expanded by -frewrite-includes */ # 39 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/string_conversions.h" 3 # 40 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/string_conversions.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/functexcept.h> #endif /* expanded by -frewrite-includes */ # 40 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/string_conversions.h" 3 # 41 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/string_conversions.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <cstdlib> #endif /* expanded by -frewrite-includes */ # 41 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/string_conversions.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 1 3 // -*- C++ -*- forwarding header. // Copyright (C) 1997-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file include/cstdlib * This is a Standard C++ Library file. You should @c \#include this file * in your programs, rather than any of the @a *.h implementation files. * * This is the C++ version of the Standard C Library header @c stdlib.h, * and its contents are (mostly) the same as that header, but are all * contained in the namespace @c std (except for names which are defined * as macros in C). */ // // ISO C++ 14882: 20.4.6 C library // #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 40 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/c++config.h> #endif /* expanded by -frewrite-includes */ # 41 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 # 42 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 #ifndef _GLIBCXX_CSTDLIB #define _GLIBCXX_CSTDLIB 1 #if 0 /* disabled by -frewrite-includes */ #if !_GLIBCXX_HOSTED #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 47 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 // The C standard does not require a freestanding implementation to // provide <stdlib.h>. However, the C++ standard does still require // <cstdlib> -- but only the functionality mentioned in // [lib.support.start.term]. #define EXIT_SUCCESS 0 #define EXIT_FAILURE 1 namespace std { extern "C" void abort(void) throw () _GLIBCXX_NORETURN; extern "C" int atexit(void (*)(void)) throw (); extern "C" void exit(int) throw () _GLIBCXX_NORETURN; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 61 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 # ifdef _GLIBCXX_HAVE_AT_QUICK_EXIT extern "C" int at_quick_exit(void (*)(void)) throw (); # endif # 64 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 # ifdef _GLIBCXX_HAVE_QUICK_EXIT extern "C" void quick_exit(int) throw() _GLIBCXX_NORETURN; # endif # 67 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 #endif # 68 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 } // namespace std #else # 71 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 // Need to ensure this finds the C library's <stdlib.h> not a libstdc++ // wrapper that might already be installed later in the include search path. #define _GLIBCXX_INCLUDE_NEXT_C_HEADERS #if 0 /* expanded by -frewrite-includes */ #include_next <stdlib.h> #endif /* expanded by -frewrite-includes */ # 75 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 # 1 "/usr/include/stdlib.h" 1 3 4 /* Copyright (C) 1991-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ /* * ISO C99 Standard: 7.20 General utilities <stdlib.h> */ #ifndef _STDLIB_H #define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION #if 0 /* expanded by -frewrite-includes */ #include <bits/libc-header-start.h> #endif /* expanded by -frewrite-includes */ # 25 "/usr/include/stdlib.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 1 3 4 /* Handle feature test macros at the start of a header. Copyright (C) 2016-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ /* This header is internal to glibc and should not be included outside of glibc headers. Headers including it must define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION first. This header cannot have multiple include guards because ISO C feature test macros depend on the definition of the macro when an affected header is included, not when the first system header is included. */ #ifndef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION # error "Never include <bits/libc-header-start.h> directly." #endif # 30 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 #undef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION #if 0 /* expanded by -frewrite-includes */ #include <features.h> #endif /* expanded by -frewrite-includes */ # 33 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # 34 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 /* ISO/IEC TR 24731-2:2010 defines the __STDC_WANT_LIB_EXT2__ macro. */ #undef __GLIBC_USE_LIB_EXT2 #if 0 /* disabled by -frewrite-includes */ #if (defined __USE_GNU \ || (defined __STDC_WANT_LIB_EXT2__ && __STDC_WANT_LIB_EXT2__ > 0)) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 40 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_LIB_EXT2 1 #else # 42 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_LIB_EXT2 0 #endif # 44 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 /* ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__ macro. Most but not all symbols enabled by that macro in TS 18661-1 are enabled unconditionally in C2X; the symbols in Annex F still require that macro in C2X. */ #undef __GLIBC_USE_IEC_60559_BFP_EXT #if 0 /* disabled by -frewrite-includes */ #if defined __USE_GNU || defined __STDC_WANT_IEC_60559_BFP_EXT__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 51 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_BFP_EXT 1 #else # 53 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_BFP_EXT 0 #endif # 55 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 #undef __GLIBC_USE_IEC_60559_BFP_EXT_C2X #if 0 /* disabled by -frewrite-includes */ #if __GLIBC_USE (IEC_60559_BFP_EXT) || __GLIBC_USE (ISOC2X) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 57 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 1 #else # 59 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 0 #endif # 61 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 /* ISO/IEC TS 18661-4:2015 defines the __STDC_WANT_IEC_60559_FUNCS_EXT__ macro. Other than the reduction functions, the symbols from this TS are enabled unconditionally in C2X. */ #undef __GLIBC_USE_IEC_60559_FUNCS_EXT #if 0 /* disabled by -frewrite-includes */ #if defined __USE_GNU || defined __STDC_WANT_IEC_60559_FUNCS_EXT__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 68 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_FUNCS_EXT 1 #else # 70 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_FUNCS_EXT 0 #endif # 72 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 #undef __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X #if 0 /* disabled by -frewrite-includes */ #if __GLIBC_USE (IEC_60559_FUNCS_EXT) || __GLIBC_USE (ISOC2X) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 74 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 1 #else # 76 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 0 #endif # 78 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 /* ISO/IEC TS 18661-3:2015 defines the __STDC_WANT_IEC_60559_TYPES_EXT__ macro. */ #undef __GLIBC_USE_IEC_60559_TYPES_EXT #if 0 /* disabled by -frewrite-includes */ #if defined __USE_GNU || defined __STDC_WANT_IEC_60559_TYPES_EXT__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 83 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_TYPES_EXT 1 #else # 85 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_TYPES_EXT 0 #endif # 87 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # 26 "/usr/include/stdlib.h" 2 3 4 /* Get size_t, wchar_t and NULL from <stddef.h>. */ #define __need_size_t #define __need_wchar_t #define __need_NULL #if 0 /* expanded by -frewrite-includes */ #include <stddef.h> #endif /* expanded by -frewrite-includes */ # 31 "/usr/include/stdlib.h" 3 4 # 1 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 1 3 4 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ #if 0 /* disabled by -frewrite-includes */ #if !defined(__STDDEF_H) || defined(__need_ptrdiff_t) || \ defined(__need_size_t) || defined(__need_wchar_t) || \ defined(__need_NULL) || defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 13 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \ !defined(__need_wchar_t) && !defined(__need_NULL) && \ !defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 17 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define miscellaneous pieces when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 19 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define __STDDEF_H #endif # 21 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define __need_ptrdiff_t #define __need_size_t #define __need_wchar_t #define __need_NULL #define __need_STDDEF_H_misc /* __need_wint_t is intentionally not defined here. */ #endif # 28 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_ptrdiff_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 30 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !defined(_PTRDIFF_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 31 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define ptrdiff_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 33 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define _PTRDIFF_T #endif # 35 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __PTRDIFF_TYPE__ ptrdiff_t; #endif # 37 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_ptrdiff_t #endif /* defined(__need_ptrdiff_t) */ # 39 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_size_t) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 41 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !defined(_SIZE_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 42 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define size_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 44 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define _SIZE_T #endif # 46 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __SIZE_TYPE__ size_t; #endif # 48 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_size_t #endif /*defined(__need_size_t) */ # 50 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_STDDEF_H_misc) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 52 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is * enabled. */ #if 0 /* disabled by -frewrite-includes */ #if (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 && \ !defined(_RSIZE_T)) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 56 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define rsize_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 58 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define _RSIZE_T #endif # 60 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __SIZE_TYPE__ rsize_t; #endif # 62 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #endif /* defined(__need_STDDEF_H_misc) */ # 63 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_wchar_t) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 65 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #ifndef __cplusplus /* Always define wchar_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(_WCHAR_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 68 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 69 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define _WCHAR_T #if 0 /* disabled by -frewrite-includes */ #if defined(_MSC_EXTENSIONS) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 71 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define _WCHAR_T_DEFINED #endif # 73 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 74 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __WCHAR_TYPE__ wchar_t; #endif # 76 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 77 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_wchar_t #endif /* defined(__need_wchar_t) */ # 79 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_NULL) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 81 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #undef NULL #ifdef __cplusplus #if 0 /* disabled by -frewrite-includes */ # if !defined(__MINGW32__) && !defined(_MSC_VER) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 84 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 # define NULL __null # else # 86 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 # define NULL 0 # endif # 88 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #else # 89 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 # define NULL ((void*)0) #endif # 91 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #ifdef __cplusplus #if 0 /* disabled by -frewrite-includes */ #if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 93 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 namespace std { typedef decltype(nullptr) nullptr_t; } using ::std::nullptr_t; #endif # 96 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 97 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_NULL #endif /* defined(__need_NULL) */ # 99 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_STDDEF_H_misc) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 101 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 102 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include "__stddef_max_align_t.h" #endif /* expanded by -frewrite-includes */ # 102 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 # 103 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 104 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define offsetof(t, d) __builtin_offsetof(t, d) #undef __need_STDDEF_H_misc #endif /* defined(__need_STDDEF_H_misc) */ # 107 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */ #if 0 /* disabled by -frewrite-includes */ #if defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 111 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define wint_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(_WINT_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 113 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 114 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define _WINT_T #endif # 116 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __WINT_TYPE__ wint_t; #endif # 118 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_wint_t #endif /* __need_wint_t */ # 120 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 122 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 # 32 "/usr/include/stdlib.h" 2 3 4 __BEGIN_DECLS #define _STDLIB_H 1 #if 0 /* disabled by -frewrite-includes */ #if (defined __USE_XOPEN || defined __USE_XOPEN2K8) && !defined _SYS_WAIT_H #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 38 "/usr/include/stdlib.h" 3 4 /* XPG requires a few symbols from <sys/wait.h> being defined. */ #if 0 /* expanded by -frewrite-includes */ # include <bits/waitflags.h> #endif /* expanded by -frewrite-includes */ # 39 "/usr/include/stdlib.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/waitflags.h" 1 3 4 /* Definitions of flag bits for `waitpid' et al. Copyright (C) 1992-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ #if 0 /* disabled by -frewrite-includes */ #if !defined _SYS_WAIT_H && !defined _STDLIB_H #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 20 "/usr/include/x86_64-linux-gnu/bits/waitflags.h" 3 4 # error "Never include <bits/waitflags.h> directly; use <sys/wait.h> instead." #endif # 22 "/usr/include/x86_64-linux-gnu/bits/waitflags.h" 3 4 /* Bits in the third argument to `waitpid'. */ #define WNOHANG 1 /* Don't block waiting. */ #define WUNTRACED 2 /* Report status of stopped children. */ /* Bits in the fourth argument to `waitid'. */ #if 0 /* disabled by -frewrite-includes */ #if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 30 "/usr/include/x86_64-linux-gnu/bits/waitflags.h" 3 4 # define WSTOPPED 2 /* Report stopped child (same as WUNTRACED). */ # define WEXITED 4 /* Report dead child. */ # define WCONTINUED 8 /* Report continued child. */ # define WNOWAIT 0x01000000 /* Don't reap, just poll status. */ #endif # 35 "/usr/include/x86_64-linux-gnu/bits/waitflags.h" 3 4 #define __WNOTHREAD 0x20000000 /* Don't wait on children of other threads in this group */ #define __WALL 0x40000000 /* Wait for any child. */ #define __WCLONE 0x80000000 /* Wait for cloned process. */ /* The following values are used by the `waitid' function. */ #if 0 /* disabled by -frewrite-includes */ #if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 43 "/usr/include/x86_64-linux-gnu/bits/waitflags.h" 3 4 # ifndef __ENUM_IDTYPE_T # define __ENUM_IDTYPE_T 1 /* The Linux kernel defines these bare, rather than an enum, which causes a conflict if the include order is reversed. */ # undef P_ALL # undef P_PID # undef P_PGID typedef enum { P_ALL, /* Wait for any child. */ P_PID, /* Wait for specified process. */ P_PGID /* Wait for members of process group. */ } idtype_t; # endif # 59 "/usr/include/x86_64-linux-gnu/bits/waitflags.h" 3 4 #endif # 60 "/usr/include/x86_64-linux-gnu/bits/waitflags.h" 3 4 # 40 "/usr/include/stdlib.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ # include <bits/waitstatus.h> #endif /* expanded by -frewrite-includes */ # 40 "/usr/include/stdlib.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/waitstatus.h" 1 3 4 /* Definitions of status bits for `wait' et al. Copyright (C) 1992-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ #if 0 /* disabled by -frewrite-includes */ #if !defined _SYS_WAIT_H && !defined _STDLIB_H #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 20 "/usr/include/x86_64-linux-gnu/bits/waitstatus.h" 3 4 # error "Never include <bits/waitstatus.h> directly; use <sys/wait.h> instead." #endif # 22 "/usr/include/x86_64-linux-gnu/bits/waitstatus.h" 3 4 /* Everything extant so far uses these same bits. */ /* If WIFEXITED(STATUS), the low-order 8 bits of the status. */ #define __WEXITSTATUS(status) (((status) & 0xff00) >> 8) /* If WIFSIGNALED(STATUS), the terminating signal. */ #define __WTERMSIG(status) ((status) & 0x7f) /* If WIFSTOPPED(STATUS), the signal that stopped the child. */ #define __WSTOPSIG(status) __WEXITSTATUS(status) /* Nonzero if STATUS indicates normal termination. */ #define __WIFEXITED(status) (__WTERMSIG(status) == 0) /* Nonzero if STATUS indicates termination by a signal. */ #define __WIFSIGNALED(status) \ (((signed char) (((status) & 0x7f) + 1) >> 1) > 0) /* Nonzero if STATUS indicates the child is stopped. */ #define __WIFSTOPPED(status) (((status) & 0xff) == 0x7f) /* Nonzero if STATUS indicates the child continued after a stop. We only define this if <bits/waitflags.h> provides the WCONTINUED flag bit. */ #ifdef WCONTINUED # define __WIFCONTINUED(status) ((status) == __W_CONTINUED) #endif # 51 "/usr/include/x86_64-linux-gnu/bits/waitstatus.h" 3 4 /* Nonzero if STATUS indicates the child dumped core. */ #define __WCOREDUMP(status) ((status) & __WCOREFLAG) /* Macros for constructing status values. */ #define __W_EXITCODE(ret, sig) ((ret) << 8 | (sig)) #define __W_STOPCODE(sig) ((sig) << 8 | 0x7f) #define __W_CONTINUED 0xffff #define __WCOREFLAG 0x80 # 41 "/usr/include/stdlib.h" 2 3 4 /* Define the macros <sys/wait.h> also would define this way. */ # define WEXITSTATUS(status) __WEXITSTATUS (status) # define WTERMSIG(status) __WTERMSIG (status) # define WSTOPSIG(status) __WSTOPSIG (status) # define WIFEXITED(status) __WIFEXITED (status) # define WIFSIGNALED(status) __WIFSIGNALED (status) # define WIFSTOPPED(status) __WIFSTOPPED (status) # ifdef __WIFCONTINUED # define WIFCONTINUED(status) __WIFCONTINUED (status) # endif # 52 "/usr/include/stdlib.h" 3 4 #endif /* X/Open or XPG7 and <sys/wait.h> not included. */ # 53 "/usr/include/stdlib.h" 3 4 /* _FloatN API tests for enablement. */ #if 0 /* expanded by -frewrite-includes */ #include <bits/floatn.h> #endif /* expanded by -frewrite-includes */ # 55 "/usr/include/stdlib.h" 3 4 # 56 "/usr/include/stdlib.h" 3 4 /* Returned by `div'. */ typedef struct { int quot; /* Quotient. */ int rem; /* Remainder. */ } div_t; /* Returned by `ldiv'. */ #ifndef __ldiv_t_defined typedef struct { long int quot; /* Quotient. */ long int rem; /* Remainder. */ } ldiv_t; # define __ldiv_t_defined 1 #endif # 73 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_ISOC99 && !defined __lldiv_t_defined #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 75 "/usr/include/stdlib.h" 3 4 /* Returned by `lldiv'. */ __extension__ typedef struct { long long int quot; /* Quotient. */ long long int rem; /* Remainder. */ } lldiv_t; # define __lldiv_t_defined 1 #endif # 83 "/usr/include/stdlib.h" 3 4 /* The largest number rand will return (same as INT_MAX). */ #define RAND_MAX 2147483647 /* We define these the same for all machines. Changes from this to the outside world should be done in `_exit'. */ #define EXIT_FAILURE 1 /* Failing exit status. */ #define EXIT_SUCCESS 0 /* Successful exit status. */ /* Maximum length of a multibyte character in the current locale. */ #define MB_CUR_MAX (__ctype_get_mb_cur_max ()) extern size_t __ctype_get_mb_cur_max (void) __THROW __wur; /* Convert a string to a floating-point number. */ extern double atof (const char *__nptr) __THROW __attribute_pure__ __nonnull ((1)) __wur; /* Convert a string to an integer. */ extern int atoi (const char *__nptr) __THROW __attribute_pure__ __nonnull ((1)) __wur; /* Convert a string to a long integer. */ extern long int atol (const char *__nptr) __THROW __attribute_pure__ __nonnull ((1)) __wur; #ifdef __USE_ISOC99 /* Convert a string to a long long integer. */ __extension__ extern long long int atoll (const char *__nptr) __THROW __attribute_pure__ __nonnull ((1)) __wur; #endif # 115 "/usr/include/stdlib.h" 3 4 /* Convert a string to a floating-point number. */ extern double strtod (const char *__restrict __nptr, char **__restrict __endptr) __THROW __nonnull ((1)); #ifdef __USE_ISOC99 /* Likewise for `float' and `long double' sizes of floating-point numbers. */ extern float strtof (const char *__restrict __nptr, char **__restrict __endptr) __THROW __nonnull ((1)); extern long double strtold (const char *__restrict __nptr, char **__restrict __endptr) __THROW __nonnull ((1)); #endif # 130 "/usr/include/stdlib.h" 3 4 /* Likewise for '_FloatN' and '_FloatNx'. */ #if 0 /* disabled by -frewrite-includes */ #if __HAVE_FLOAT16 && __GLIBC_USE (IEC_60559_TYPES_EXT) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 134 "/usr/include/stdlib.h" 3 4 extern _Float16 strtof16 (const char *__restrict __nptr, char **__restrict __endptr) __THROW __nonnull ((1)); #endif # 138 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __HAVE_FLOAT32 && __GLIBC_USE (IEC_60559_TYPES_EXT) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 140 "/usr/include/stdlib.h" 3 4 extern _Float32 strtof32 (const char *__restrict __nptr, char **__restrict __endptr) __THROW __nonnull ((1)); #endif # 144 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __HAVE_FLOAT64 && __GLIBC_USE (IEC_60559_TYPES_EXT) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 146 "/usr/include/stdlib.h" 3 4 extern _Float64 strtof64 (const char *__restrict __nptr, char **__restrict __endptr) __THROW __nonnull ((1)); #endif # 150 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __HAVE_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 152 "/usr/include/stdlib.h" 3 4 extern _Float128 strtof128 (const char *__restrict __nptr, char **__restrict __endptr) __THROW __nonnull ((1)); #endif # 156 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __HAVE_FLOAT32X && __GLIBC_USE (IEC_60559_TYPES_EXT) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 158 "/usr/include/stdlib.h" 3 4 extern _Float32x strtof32x (const char *__restrict __nptr, char **__restrict __endptr) __THROW __nonnull ((1)); #endif # 162 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __HAVE_FLOAT64X && __GLIBC_USE (IEC_60559_TYPES_EXT) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 164 "/usr/include/stdlib.h" 3 4 extern _Float64x strtof64x (const char *__restrict __nptr, char **__restrict __endptr) __THROW __nonnull ((1)); #endif # 168 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __HAVE_FLOAT128X && __GLIBC_USE (IEC_60559_TYPES_EXT) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 170 "/usr/include/stdlib.h" 3 4 extern _Float128x strtof128x (const char *__restrict __nptr, char **__restrict __endptr) __THROW __nonnull ((1)); #endif # 174 "/usr/include/stdlib.h" 3 4 /* Convert a string to a long integer. */ extern long int strtol (const char *__restrict __nptr, char **__restrict __endptr, int __base) __THROW __nonnull ((1)); /* Convert a string to an unsigned long integer. */ extern unsigned long int strtoul (const char *__restrict __nptr, char **__restrict __endptr, int __base) __THROW __nonnull ((1)); #ifdef __USE_MISC /* Convert a string to a quadword integer. */ __extension__ extern long long int strtoq (const char *__restrict __nptr, char **__restrict __endptr, int __base) __THROW __nonnull ((1)); /* Convert a string to an unsigned quadword integer. */ __extension__ extern unsigned long long int strtouq (const char *__restrict __nptr, char **__restrict __endptr, int __base) __THROW __nonnull ((1)); #endif /* Use misc. */ # 196 "/usr/include/stdlib.h" 3 4 #ifdef __USE_ISOC99 /* Convert a string to a quadword integer. */ __extension__ extern long long int strtoll (const char *__restrict __nptr, char **__restrict __endptr, int __base) __THROW __nonnull ((1)); /* Convert a string to an unsigned quadword integer. */ __extension__ extern unsigned long long int strtoull (const char *__restrict __nptr, char **__restrict __endptr, int __base) __THROW __nonnull ((1)); #endif /* ISO C99 or use MISC. */ # 209 "/usr/include/stdlib.h" 3 4 /* Convert a floating-point number to a string. */ #if 0 /* disabled by -frewrite-includes */ #if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 212 "/usr/include/stdlib.h" 3 4 extern int strfromd (char *__dest, size_t __size, const char *__format, double __f) __THROW __nonnull ((3)); extern int strfromf (char *__dest, size_t __size, const char *__format, float __f) __THROW __nonnull ((3)); extern int strfroml (char *__dest, size_t __size, const char *__format, long double __f) __THROW __nonnull ((3)); #endif # 224 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __HAVE_FLOAT16 && __GLIBC_USE (IEC_60559_TYPES_EXT) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 226 "/usr/include/stdlib.h" 3 4 extern int strfromf16 (char *__dest, size_t __size, const char * __format, _Float16 __f) __THROW __nonnull ((3)); #endif # 230 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __HAVE_FLOAT32 && __GLIBC_USE (IEC_60559_TYPES_EXT) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 232 "/usr/include/stdlib.h" 3 4 extern int strfromf32 (char *__dest, size_t __size, const char * __format, _Float32 __f) __THROW __nonnull ((3)); #endif # 236 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __HAVE_FLOAT64 && __GLIBC_USE (IEC_60559_TYPES_EXT) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 238 "/usr/include/stdlib.h" 3 4 extern int strfromf64 (char *__dest, size_t __size, const char * __format, _Float64 __f) __THROW __nonnull ((3)); #endif # 242 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __HAVE_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 244 "/usr/include/stdlib.h" 3 4 extern int strfromf128 (char *__dest, size_t __size, const char * __format, _Float128 __f) __THROW __nonnull ((3)); #endif # 248 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __HAVE_FLOAT32X && __GLIBC_USE (IEC_60559_TYPES_EXT) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 250 "/usr/include/stdlib.h" 3 4 extern int strfromf32x (char *__dest, size_t __size, const char * __format, _Float32x __f) __THROW __nonnull ((3)); #endif # 254 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __HAVE_FLOAT64X && __GLIBC_USE (IEC_60559_TYPES_EXT) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 256 "/usr/include/stdlib.h" 3 4 extern int strfromf64x (char *__dest, size_t __size, const char * __format, _Float64x __f) __THROW __nonnull ((3)); #endif # 260 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __HAVE_FLOAT128X && __GLIBC_USE (IEC_60559_TYPES_EXT) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 262 "/usr/include/stdlib.h" 3 4 extern int strfromf128x (char *__dest, size_t __size, const char * __format, _Float128x __f) __THROW __nonnull ((3)); #endif # 266 "/usr/include/stdlib.h" 3 4 #ifdef __USE_GNU /* Parallel versions of the functions above which take the locale to use as an additional parameter. These are GNU extensions inspired by the POSIX.1-2008 extended locale API. */ #if 0 /* expanded by -frewrite-includes */ # include <bits/types/locale_t.h> #endif /* expanded by -frewrite-includes */ # 272 "/usr/include/stdlib.h" 3 4 # 273 "/usr/include/stdlib.h" 3 4 extern long int strtol_l (const char *__restrict __nptr, char **__restrict __endptr, int __base, locale_t __loc) __THROW __nonnull ((1, 4)); extern unsigned long int strtoul_l (const char *__restrict __nptr, char **__restrict __endptr, int __base, locale_t __loc) __THROW __nonnull ((1, 4)); __extension__ extern long long int strtoll_l (const char *__restrict __nptr, char **__restrict __endptr, int __base, locale_t __loc) __THROW __nonnull ((1, 4)); __extension__ extern unsigned long long int strtoull_l (const char *__restrict __nptr, char **__restrict __endptr, int __base, locale_t __loc) __THROW __nonnull ((1, 4)); extern double strtod_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) __THROW __nonnull ((1, 3)); extern float strtof_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) __THROW __nonnull ((1, 3)); extern long double strtold_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) __THROW __nonnull ((1, 3)); #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT16 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 309 "/usr/include/stdlib.h" 3 4 extern _Float16 strtof16_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) __THROW __nonnull ((1, 3)); # endif # 314 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT32 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 316 "/usr/include/stdlib.h" 3 4 extern _Float32 strtof32_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) __THROW __nonnull ((1, 3)); # endif # 321 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT64 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 323 "/usr/include/stdlib.h" 3 4 extern _Float64 strtof64_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) __THROW __nonnull ((1, 3)); # endif # 328 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT128 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 330 "/usr/include/stdlib.h" 3 4 extern _Float128 strtof128_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) __THROW __nonnull ((1, 3)); # endif # 335 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT32X #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 337 "/usr/include/stdlib.h" 3 4 extern _Float32x strtof32x_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) __THROW __nonnull ((1, 3)); # endif # 342 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT64X #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 344 "/usr/include/stdlib.h" 3 4 extern _Float64x strtof64x_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) __THROW __nonnull ((1, 3)); # endif # 349 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __HAVE_FLOAT128X #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 351 "/usr/include/stdlib.h" 3 4 extern _Float128x strtof128x_l (const char *__restrict __nptr, char **__restrict __endptr, locale_t __loc) __THROW __nonnull ((1, 3)); # endif # 356 "/usr/include/stdlib.h" 3 4 #endif /* GNU */ # 357 "/usr/include/stdlib.h" 3 4 #ifdef __USE_EXTERN_INLINES __extern_inline int __NTH (atoi (const char *__nptr)) { return (int) strtol (__nptr, (char **) NULL, 10); } __extern_inline long int __NTH (atol (const char *__nptr)) { return strtol (__nptr, (char **) NULL, 10); } # ifdef __USE_ISOC99 __extension__ __extern_inline long long int __NTH (atoll (const char *__nptr)) { return strtoll (__nptr, (char **) NULL, 10); } # endif # 378 "/usr/include/stdlib.h" 3 4 #endif /* Optimizing and Inlining. */ # 379 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 382 "/usr/include/stdlib.h" 3 4 /* Convert N to base 64 using the digits "./0-9A-Za-z", least-significant digit first. Returns a pointer to static storage overwritten by the next call. */ extern char *l64a (long int __n) __THROW __wur; /* Read a number from a string S in base 64 as above. */ extern long int a64l (const char *__s) __THROW __attribute_pure__ __nonnull ((1)) __wur; #endif /* Use misc || extended X/Open. */ # 392 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 394 "/usr/include/stdlib.h" 3 4 #if 0 /* expanded by -frewrite-includes */ # include <sys/types.h> /* we need int32_t... */ #endif /* expanded by -frewrite-includes */ # 394 "/usr/include/stdlib.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/sys/types.h" 1 3 4 /* Copyright (C) 1991-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ /* * POSIX Standard: 2.6 Primitive System Data Types <sys/types.h> */ #ifndef _SYS_TYPES_H #define _SYS_TYPES_H 1 #if 0 /* expanded by -frewrite-includes */ #include <features.h> #endif /* expanded by -frewrite-includes */ # 25 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 # 26 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 __BEGIN_DECLS #if 0 /* expanded by -frewrite-includes */ #include <bits/types.h> #endif /* expanded by -frewrite-includes */ # 29 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 # 30 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 #ifdef __USE_MISC # ifndef __u_char_defined typedef __u_char u_char; typedef __u_short u_short; typedef __u_int u_int; typedef __u_long u_long; typedef __quad_t quad_t; typedef __u_quad_t u_quad_t; typedef __fsid_t fsid_t; # define __u_char_defined # endif # 42 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 typedef __loff_t loff_t; #endif # 44 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 #ifndef __ino_t_defined # ifndef __USE_FILE_OFFSET64 typedef __ino_t ino_t; # else # 49 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 typedef __ino64_t ino_t; # endif # 51 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 # define __ino_t_defined #endif # 53 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_LARGEFILE64 && !defined __ino64_t_defined #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 54 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 typedef __ino64_t ino64_t; # define __ino64_t_defined #endif # 57 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 #ifndef __dev_t_defined typedef __dev_t dev_t; # define __dev_t_defined #endif # 62 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 #ifndef __gid_t_defined typedef __gid_t gid_t; # define __gid_t_defined #endif # 67 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 #ifndef __mode_t_defined typedef __mode_t mode_t; # define __mode_t_defined #endif # 72 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 #ifndef __nlink_t_defined typedef __nlink_t nlink_t; # define __nlink_t_defined #endif # 77 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 #ifndef __uid_t_defined typedef __uid_t uid_t; # define __uid_t_defined #endif # 82 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 #ifndef __off_t_defined # ifndef __USE_FILE_OFFSET64 typedef __off_t off_t; # else # 87 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 typedef __off64_t off_t; # endif # 89 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 # define __off_t_defined #endif # 91 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_LARGEFILE64 && !defined __off64_t_defined #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 92 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 typedef __off64_t off64_t; # define __off64_t_defined #endif # 95 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 #ifndef __pid_t_defined typedef __pid_t pid_t; # define __pid_t_defined #endif # 100 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if (defined __USE_XOPEN || defined __USE_XOPEN2K8) \ && !defined __id_t_defined #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 103 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 typedef __id_t id_t; # define __id_t_defined #endif # 106 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 #ifndef __ssize_t_defined typedef __ssize_t ssize_t; # define __ssize_t_defined #endif # 111 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 #ifdef __USE_MISC # ifndef __daddr_t_defined typedef __daddr_t daddr_t; typedef __caddr_t caddr_t; # define __daddr_t_defined # endif # 118 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 #endif # 119 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if (defined __USE_MISC || defined __USE_XOPEN) && !defined __key_t_defined #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 121 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 typedef __key_t key_t; # define __key_t_defined #endif # 124 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_XOPEN || defined __USE_XOPEN2K8 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 126 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 #if 0 /* expanded by -frewrite-includes */ # include <bits/types/clock_t.h> #endif /* expanded by -frewrite-includes */ # 126 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 # 127 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 #endif # 128 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <bits/types/clockid_t.h> #endif /* expanded by -frewrite-includes */ # 128 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 # 129 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <bits/types/time_t.h> #endif /* expanded by -frewrite-includes */ # 129 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 # 130 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <bits/types/timer_t.h> #endif /* expanded by -frewrite-includes */ # 130 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 # 131 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 #ifdef __USE_XOPEN # ifndef __useconds_t_defined typedef __useconds_t useconds_t; # define __useconds_t_defined # endif # 137 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 # ifndef __suseconds_t_defined typedef __suseconds_t suseconds_t; # define __suseconds_t_defined # endif # 141 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 #endif # 142 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 #define __need_size_t #if 0 /* expanded by -frewrite-includes */ #include <stddef.h> #endif /* expanded by -frewrite-includes */ # 144 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 # 1 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 1 3 4 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ #if 0 /* disabled by -frewrite-includes */ #if !defined(__STDDEF_H) || defined(__need_ptrdiff_t) || \ defined(__need_size_t) || defined(__need_wchar_t) || \ defined(__need_NULL) || defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 13 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \ !defined(__need_wchar_t) && !defined(__need_NULL) && \ !defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 17 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define miscellaneous pieces when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 19 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define __STDDEF_H #endif # 21 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define __need_ptrdiff_t #define __need_size_t #define __need_wchar_t #define __need_NULL #define __need_STDDEF_H_misc /* __need_wint_t is intentionally not defined here. */ #endif # 28 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_ptrdiff_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 30 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !defined(_PTRDIFF_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 31 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define ptrdiff_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 33 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define _PTRDIFF_T #endif # 35 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __PTRDIFF_TYPE__ ptrdiff_t; #endif # 37 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_ptrdiff_t #endif /* defined(__need_ptrdiff_t) */ # 39 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_size_t) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 41 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !defined(_SIZE_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 42 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define size_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 44 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define _SIZE_T #endif # 46 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __SIZE_TYPE__ size_t; #endif # 48 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_size_t #endif /*defined(__need_size_t) */ # 50 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_STDDEF_H_misc) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 52 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is * enabled. */ #if 0 /* disabled by -frewrite-includes */ #if (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 && \ !defined(_RSIZE_T)) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 56 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define rsize_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 58 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define _RSIZE_T #endif # 60 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __SIZE_TYPE__ rsize_t; #endif # 62 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #endif /* defined(__need_STDDEF_H_misc) */ # 63 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_wchar_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 65 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #ifndef __cplusplus /* Always define wchar_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(_WCHAR_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 68 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 69 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define _WCHAR_T #if 0 /* disabled by -frewrite-includes */ #if defined(_MSC_EXTENSIONS) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 71 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define _WCHAR_T_DEFINED #endif # 73 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 74 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __WCHAR_TYPE__ wchar_t; #endif # 76 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 77 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_wchar_t #endif /* defined(__need_wchar_t) */ # 79 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_NULL) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 81 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #undef NULL #ifdef __cplusplus #if 0 /* disabled by -frewrite-includes */ # if !defined(__MINGW32__) && !defined(_MSC_VER) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 84 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 # define NULL __null # else # 86 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 # define NULL 0 # endif # 88 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #else # 89 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 # define NULL ((void*)0) #endif # 91 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #ifdef __cplusplus #if 0 /* disabled by -frewrite-includes */ #if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 93 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 namespace std { typedef decltype(nullptr) nullptr_t; } using ::std::nullptr_t; #endif # 96 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 97 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_NULL #endif /* defined(__need_NULL) */ # 99 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_STDDEF_H_misc) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 101 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 102 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include "__stddef_max_align_t.h" #endif /* expanded by -frewrite-includes */ # 102 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 # 103 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 104 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define offsetof(t, d) __builtin_offsetof(t, d) #undef __need_STDDEF_H_misc #endif /* defined(__need_STDDEF_H_misc) */ # 107 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */ #if 0 /* disabled by -frewrite-includes */ #if defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 111 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define wint_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(_WINT_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 113 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 114 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define _WINT_T #endif # 116 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __WINT_TYPE__ wint_t; #endif # 118 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_wint_t #endif /* __need_wint_t */ # 120 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 122 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 # 145 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 #ifdef __USE_MISC /* Old compatibility names for C types. */ typedef unsigned long int ulong; typedef unsigned short int ushort; typedef unsigned int uint; #endif # 152 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 /* These size-specific names are used by some of the inet code. */ #if 0 /* expanded by -frewrite-includes */ #include <bits/stdint-intn.h> #endif /* expanded by -frewrite-includes */ # 155 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 # 156 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 /* These were defined by ISO C without the first `_'. */ typedef __uint8_t u_int8_t; typedef __uint16_t u_int16_t; typedef __uint32_t u_int32_t; typedef __uint64_t u_int64_t; #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (2, 7) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 164 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 typedef int register_t __attribute__ ((__mode__ (__word__))); #else # 166 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 typedef int register_t; #endif # 168 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 /* Some code from BIND tests this macro to see if the types above are defined. */ #define __BIT_TYPES_DEFINED__ 1 #ifdef __USE_MISC /* In BSD <sys/types.h> is expected to define BYTE_ORDER. */ #if 0 /* expanded by -frewrite-includes */ # include <endian.h> #endif /* expanded by -frewrite-includes */ # 176 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 # 1 "/usr/include/endian.h" 1 3 4 /* Copyright (C) 1992-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ #ifndef _ENDIAN_H #define _ENDIAN_H 1 #if 0 /* expanded by -frewrite-includes */ #include <features.h> #endif /* expanded by -frewrite-includes */ # 21 "/usr/include/endian.h" 3 4 # 22 "/usr/include/endian.h" 3 4 /* Get the definitions of __*_ENDIAN, __BYTE_ORDER, and __FLOAT_WORD_ORDER. */ #if 0 /* expanded by -frewrite-includes */ #include <bits/endian.h> #endif /* expanded by -frewrite-includes */ # 24 "/usr/include/endian.h" 3 4 # 25 "/usr/include/endian.h" 3 4 #ifdef __USE_MISC # define LITTLE_ENDIAN __LITTLE_ENDIAN # define BIG_ENDIAN __BIG_ENDIAN # define PDP_ENDIAN __PDP_ENDIAN # define BYTE_ORDER __BYTE_ORDER #endif # 32 "/usr/include/endian.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_MISC && !defined __ASSEMBLER__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 34 "/usr/include/endian.h" 3 4 /* Conversion interfaces. */ #if 0 /* expanded by -frewrite-includes */ # include <bits/byteswap.h> #endif /* expanded by -frewrite-includes */ # 35 "/usr/include/endian.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 1 3 4 /* Macros and inline functions to swap the order of bytes in integer values. Copyright (C) 1997-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ #if 0 /* disabled by -frewrite-includes */ #if !defined _BYTESWAP_H && !defined _NETINET_IN_H && !defined _ENDIAN_H #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 20 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 3 4 # error "Never use <bits/byteswap.h> directly; include <byteswap.h> instead." #endif # 22 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 3 4 #ifndef _BITS_BYTESWAP_H #define _BITS_BYTESWAP_H 1 #if 0 /* expanded by -frewrite-includes */ #include <features.h> #endif /* expanded by -frewrite-includes */ # 26 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 3 4 # 27 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <bits/types.h> #endif /* expanded by -frewrite-includes */ # 27 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 3 4 # 28 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 3 4 /* Swap bytes in 16-bit value. */ #define __bswap_constant_16(x) \ ((__uint16_t) ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8))) static __inline __uint16_t __bswap_16 (__uint16_t __bsx) { #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (4, 8) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 37 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 3 4 return __builtin_bswap16 (__bsx); #else # 39 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 3 4 return __bswap_constant_16 (__bsx); #endif # 41 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 3 4 } /* Swap bytes in 32-bit value. */ #define __bswap_constant_32(x) \ ((((x) & 0xff000000u) >> 24) | (((x) & 0x00ff0000u) >> 8) \ | (((x) & 0x0000ff00u) << 8) | (((x) & 0x000000ffu) << 24)) static __inline __uint32_t __bswap_32 (__uint32_t __bsx) { #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (4, 3) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 52 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 3 4 return __builtin_bswap32 (__bsx); #else # 54 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 3 4 return __bswap_constant_32 (__bsx); #endif # 56 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 3 4 } /* Swap bytes in 64-bit value. */ #define __bswap_constant_64(x) \ ((((x) & 0xff00000000000000ull) >> 56) \ | (((x) & 0x00ff000000000000ull) >> 40) \ | (((x) & 0x0000ff0000000000ull) >> 24) \ | (((x) & 0x000000ff00000000ull) >> 8) \ | (((x) & 0x00000000ff000000ull) << 8) \ | (((x) & 0x0000000000ff0000ull) << 24) \ | (((x) & 0x000000000000ff00ull) << 40) \ | (((x) & 0x00000000000000ffull) << 56)) __extension__ static __inline __uint64_t __bswap_64 (__uint64_t __bsx) { #if 0 /* disabled by -frewrite-includes */ #if __GNUC_PREREQ (4, 3) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 73 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 3 4 return __builtin_bswap64 (__bsx); #else # 75 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 3 4 return __bswap_constant_64 (__bsx); #endif # 77 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 3 4 } #endif /* _BITS_BYTESWAP_H */ # 80 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 3 4 # 36 "/usr/include/endian.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ # include <bits/uintn-identity.h> #endif /* expanded by -frewrite-includes */ # 36 "/usr/include/endian.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/uintn-identity.h" 1 3 4 /* Inline functions to return unsigned integer values unchanged. Copyright (C) 2017-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ #if 0 /* disabled by -frewrite-includes */ #if !defined _NETINET_IN_H && !defined _ENDIAN_H #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 20 "/usr/include/x86_64-linux-gnu/bits/uintn-identity.h" 3 4 # error "Never use <bits/uintn-identity.h> directly; include <netinet/in.h> or <endian.h> instead." #endif # 22 "/usr/include/x86_64-linux-gnu/bits/uintn-identity.h" 3 4 #ifndef _BITS_UINTN_IDENTITY_H #define _BITS_UINTN_IDENTITY_H 1 #if 0 /* expanded by -frewrite-includes */ #include <bits/types.h> #endif /* expanded by -frewrite-includes */ # 26 "/usr/include/x86_64-linux-gnu/bits/uintn-identity.h" 3 4 # 27 "/usr/include/x86_64-linux-gnu/bits/uintn-identity.h" 3 4 /* These inline functions are to ensure the appropriate type conversions and associated diagnostics from macros that convert to a given endianness. */ static __inline __uint16_t __uint16_identity (__uint16_t __x) { return __x; } static __inline __uint32_t __uint32_identity (__uint32_t __x) { return __x; } static __inline __uint64_t __uint64_identity (__uint64_t __x) { return __x; } #endif /* _BITS_UINTN_IDENTITY_H. */ # 51 "/usr/include/x86_64-linux-gnu/bits/uintn-identity.h" 3 4 # 37 "/usr/include/endian.h" 2 3 4 #if 0 /* disabled by -frewrite-includes */ # if __BYTE_ORDER == __LITTLE_ENDIAN #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 39 "/usr/include/endian.h" 3 4 # define htobe16(x) __bswap_16 (x) # define htole16(x) __uint16_identity (x) # define be16toh(x) __bswap_16 (x) # define le16toh(x) __uint16_identity (x) # define htobe32(x) __bswap_32 (x) # define htole32(x) __uint32_identity (x) # define be32toh(x) __bswap_32 (x) # define le32toh(x) __uint32_identity (x) # define htobe64(x) __bswap_64 (x) # define htole64(x) __uint64_identity (x) # define be64toh(x) __bswap_64 (x) # define le64toh(x) __uint64_identity (x) # else # 55 "/usr/include/endian.h" 3 4 # define htobe16(x) __uint16_identity (x) # define htole16(x) __bswap_16 (x) # define be16toh(x) __uint16_identity (x) # define le16toh(x) __bswap_16 (x) # define htobe32(x) __uint32_identity (x) # define htole32(x) __bswap_32 (x) # define be32toh(x) __uint32_identity (x) # define le32toh(x) __bswap_32 (x) # define htobe64(x) __uint64_identity (x) # define htole64(x) __bswap_64 (x) # define be64toh(x) __uint64_identity (x) # define le64toh(x) __bswap_64 (x) # endif # 70 "/usr/include/endian.h" 3 4 #endif # 71 "/usr/include/endian.h" 3 4 #endif /* endian.h */ # 73 "/usr/include/endian.h" 3 4 # 177 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 /* It also defines `fd_set' and the FD_* macros for `select'. */ #if 0 /* expanded by -frewrite-includes */ # include <sys/select.h> #endif /* expanded by -frewrite-includes */ # 179 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/sys/select.h" 1 3 4 /* `fd_set' type and related macros, and `select'/`pselect' declarations. Copyright (C) 1996-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ /* POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h> */ #ifndef _SYS_SELECT_H #define _SYS_SELECT_H 1 #if 0 /* expanded by -frewrite-includes */ #include <features.h> #endif /* expanded by -frewrite-includes */ # 24 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 # 25 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 /* Get definition of needed basic types. */ #if 0 /* expanded by -frewrite-includes */ #include <bits/types.h> #endif /* expanded by -frewrite-includes */ # 27 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 # 28 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 /* Get __FD_* definitions. */ #if 0 /* expanded by -frewrite-includes */ #include <bits/select.h> #endif /* expanded by -frewrite-includes */ # 30 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/select.h" 1 3 4 /* Copyright (C) 1997-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ #ifndef _SYS_SELECT_H # error "Never use <bits/select.h> directly; include <sys/select.h> instead." #endif # 21 "/usr/include/x86_64-linux-gnu/bits/select.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <bits/wordsize.h> #endif /* expanded by -frewrite-includes */ # 22 "/usr/include/x86_64-linux-gnu/bits/select.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 /* Determine the wordsize from the preprocessor defines. */ #if 0 /* disabled by -frewrite-includes */ #if defined __x86_64__ && !defined __ILP32__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 4 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 # define __WORDSIZE 64 #else # 6 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 # define __WORDSIZE 32 #define __WORDSIZE32_SIZE_ULONG 0 #define __WORDSIZE32_PTRDIFF_LONG 0 #endif # 10 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 #ifdef __x86_64__ # define __WORDSIZE_TIME64_COMPAT32 1 /* Both x86-64 and x32 use the 64-bit system call interface. */ # define __SYSCALL_WORDSIZE 64 #else # 16 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 # define __WORDSIZE_TIME64_COMPAT32 0 #endif # 18 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 # 23 "/usr/include/x86_64-linux-gnu/bits/select.h" 2 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __GNUC__ && __GNUC__ >= 2 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 26 "/usr/include/x86_64-linux-gnu/bits/select.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if __WORDSIZE == 64 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 28 "/usr/include/x86_64-linux-gnu/bits/select.h" 3 4 # define __FD_ZERO_STOS "stosq" # else # 30 "/usr/include/x86_64-linux-gnu/bits/select.h" 3 4 # define __FD_ZERO_STOS "stosl" # endif # 32 "/usr/include/x86_64-linux-gnu/bits/select.h" 3 4 # define __FD_ZERO(fdsp) \ do { \ int __d0, __d1; \ __asm__ __volatile__ ("cld; rep; " __FD_ZERO_STOS \ : "=c" (__d0), "=D" (__d1) \ : "a" (0), "0" (sizeof (fd_set) \ / sizeof (__fd_mask)), \ "1" (&__FDS_BITS (fdsp)[0]) \ : "memory"); \ } while (0) #else /* ! GNU CC */ # 45 "/usr/include/x86_64-linux-gnu/bits/select.h" 3 4 /* We don't use `memset' because this would require a prototype and the array isn't too big. */ # define __FD_ZERO(set) \ do { \ unsigned int __i; \ fd_set *__arr = (set); \ for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i) \ __FDS_BITS (__arr)[__i] = 0; \ } while (0) #endif /* GNU CC */ # 57 "/usr/include/x86_64-linux-gnu/bits/select.h" 3 4 #define __FD_SET(d, set) \ ((void) (__FDS_BITS (set)[__FD_ELT (d)] |= __FD_MASK (d))) #define __FD_CLR(d, set) \ ((void) (__FDS_BITS (set)[__FD_ELT (d)] &= ~__FD_MASK (d))) #define __FD_ISSET(d, set) \ ((__FDS_BITS (set)[__FD_ELT (d)] & __FD_MASK (d)) != 0) # 31 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4 /* Get sigset_t. */ #if 0 /* expanded by -frewrite-includes */ #include <bits/types/sigset_t.h> #endif /* expanded by -frewrite-includes */ # 33 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h" 1 3 4 #ifndef __sigset_t_defined #define __sigset_t_defined 1 #if 0 /* expanded by -frewrite-includes */ #include <bits/types/__sigset_t.h> #endif /* expanded by -frewrite-includes */ # 4 "/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h" 1 3 4 #ifndef ____sigset_t_defined #define ____sigset_t_defined #define _SIGSET_NWORDS (1024 / (8 * sizeof (unsigned long int))) typedef struct { unsigned long int __val[_SIGSET_NWORDS]; } __sigset_t; #endif # 11 "/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h" 3 4 # 5 "/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h" 2 3 4 /* A set of signals to be blocked, unblocked, or waited for. */ typedef __sigset_t sigset_t; #endif # 10 "/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h" 3 4 # 34 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4 /* Get definition of timer specification structures. */ #if 0 /* expanded by -frewrite-includes */ #include <bits/types/time_t.h> #endif /* expanded by -frewrite-includes */ # 36 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 # 37 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <bits/types/struct_timeval.h> #endif /* expanded by -frewrite-includes */ # 37 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 # 38 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 #ifdef __USE_XOPEN2K #if 0 /* expanded by -frewrite-includes */ # include <bits/types/struct_timespec.h> #endif /* expanded by -frewrite-includes */ # 39 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 # 40 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 #endif # 41 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 #ifndef __suseconds_t_defined typedef __suseconds_t suseconds_t; # define __suseconds_t_defined #endif # 46 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 /* The fd_set member is required to be an array of longs. */ typedef long int __fd_mask; /* Some versions of <linux/posix_types.h> define this macros. */ #undef __NFDBITS /* It's easier to assume 8-bit bytes than to get CHAR_BIT. */ #define __NFDBITS (8 * (int) sizeof (__fd_mask)) #define __FD_ELT(d) ((d) / __NFDBITS) #define __FD_MASK(d) ((__fd_mask) (1UL << ((d) % __NFDBITS))) /* fd_set for select and pselect. */ typedef struct { /* XPG4.2 requires this member name. Otherwise avoid the name from the global namespace. */ #ifdef __USE_XOPEN __fd_mask fds_bits[__FD_SETSIZE / __NFDBITS]; # define __FDS_BITS(set) ((set)->fds_bits) #else # 67 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 __fd_mask __fds_bits[__FD_SETSIZE / __NFDBITS]; # define __FDS_BITS(set) ((set)->__fds_bits) #endif # 70 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 } fd_set; /* Maximum number of file descriptors in `fd_set'. */ #define FD_SETSIZE __FD_SETSIZE #ifdef __USE_MISC /* Sometimes the fd_set member is assumed to have this type. */ typedef __fd_mask fd_mask; /* Number of bits per word of `fd_set' (some code assumes this is 32). */ # define NFDBITS __NFDBITS #endif # 82 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 /* Access macros for `fd_set'. */ #define FD_SET(fd, fdsetp) __FD_SET (fd, fdsetp) #define FD_CLR(fd, fdsetp) __FD_CLR (fd, fdsetp) #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp) #define FD_ZERO(fdsetp) __FD_ZERO (fdsetp) __BEGIN_DECLS /* Check the first NFDS descriptors each in READFDS (if not NULL) for read readiness, in WRITEFDS (if not NULL) for write readiness, and in EXCEPTFDS (if not NULL) for exceptional conditions. If TIMEOUT is not NULL, time out after waiting the interval specified therein. Returns the number of ready descriptors, or -1 for errors. This function is a cancellation point and therefore not marked with __THROW. */ extern int select (int __nfds, fd_set *__restrict __readfds, fd_set *__restrict __writefds, fd_set *__restrict __exceptfds, struct timeval *__restrict __timeout); #ifdef __USE_XOPEN2K /* Same as above only that the TIMEOUT value is given with higher resolution and a sigmask which is been set temporarily. This version should be used. This function is a cancellation point and therefore not marked with __THROW. */ extern int pselect (int __nfds, fd_set *__restrict __readfds, fd_set *__restrict __writefds, fd_set *__restrict __exceptfds, const struct timespec *__restrict __timeout, const __sigset_t *__restrict __sigmask); #endif # 119 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 /* Define some inlines helping to catch common problems. */ #if 0 /* disabled by -frewrite-includes */ #if __USE_FORTIFY_LEVEL > 0 && defined __GNUC__ #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 123 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 #if 0 /* expanded by -frewrite-includes */ # include <bits/select2.h> #endif /* expanded by -frewrite-includes */ # 123 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 # 124 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 #endif # 125 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 __END_DECLS #endif /* sys/select.h */ # 129 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 # 180 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 #endif /* Use misc. */ # 181 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if (defined __USE_UNIX98 || defined __USE_XOPEN2K8) \ && !defined __blksize_t_defined #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 185 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 typedef __blksize_t blksize_t; # define __blksize_t_defined #endif # 188 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 /* Types from the Large File Support interface. */ #ifndef __USE_FILE_OFFSET64 # ifndef __blkcnt_t_defined typedef __blkcnt_t blkcnt_t; /* Type to count number of disk blocks. */ # define __blkcnt_t_defined # endif # 195 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 # ifndef __fsblkcnt_t_defined typedef __fsblkcnt_t fsblkcnt_t; /* Type to count file system blocks. */ # define __fsblkcnt_t_defined # endif # 199 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 # ifndef __fsfilcnt_t_defined typedef __fsfilcnt_t fsfilcnt_t; /* Type to count file system inodes. */ # define __fsfilcnt_t_defined # endif # 203 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 #else # 204 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 # ifndef __blkcnt_t_defined typedef __blkcnt64_t blkcnt_t; /* Type to count number of disk blocks. */ # define __blkcnt_t_defined # endif # 208 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 # ifndef __fsblkcnt_t_defined typedef __fsblkcnt64_t fsblkcnt_t; /* Type to count file system blocks. */ # define __fsblkcnt_t_defined # endif # 212 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 # ifndef __fsfilcnt_t_defined typedef __fsfilcnt64_t fsfilcnt_t; /* Type to count file system inodes. */ # define __fsfilcnt_t_defined # endif # 216 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 #endif # 217 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 #ifdef __USE_LARGEFILE64 typedef __blkcnt64_t blkcnt64_t; /* Type to count number of disk blocks. */ typedef __fsblkcnt64_t fsblkcnt64_t; /* Type to count file system blocks. */ typedef __fsfilcnt64_t fsfilcnt64_t; /* Type to count file system inodes. */ #endif # 223 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 /* Now add the thread types. */ #if 0 /* disabled by -frewrite-includes */ #if defined __USE_POSIX199506 || defined __USE_UNIX98 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 227 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 #if 0 /* expanded by -frewrite-includes */ # include <bits/pthreadtypes.h> #endif /* expanded by -frewrite-includes */ # 227 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 # 228 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 #endif # 229 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 __END_DECLS #endif /* sys/types.h */ # 233 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 # 395 "/usr/include/stdlib.h" 2 3 4 /* These are the functions that actually do things. The `random', `srandom', `initstate' and `setstate' functions are those from BSD Unices. The `rand' and `srand' functions are required by the ANSI standard. We provide both interfaces to the same random number generator. */ /* Return a random long integer between 0 and RAND_MAX inclusive. */ extern long int random (void) __THROW; /* Seed the random number generator with the given number. */ extern void srandom (unsigned int __seed) __THROW; /* Initialize the random number generator to use state buffer STATEBUF, of length STATELEN, and seed it with SEED. Optimal lengths are 8, 16, 32, 64, 128 and 256, the bigger the better; values less than 8 will cause an error and values greater than 256 will be rounded down. */ extern char *initstate (unsigned int __seed, char *__statebuf, size_t __statelen) __THROW __nonnull ((2)); /* Switch the random number generator to state buffer STATEBUF, which should have been previously initialized by `initstate'. */ extern char *setstate (char *__statebuf) __THROW __nonnull ((1)); # ifdef __USE_MISC /* Reentrant versions of the `random' family of functions. These functions all use the following data structure to contain state, rather than global state variables. */ struct random_data { int32_t *fptr; /* Front pointer. */ int32_t *rptr; /* Rear pointer. */ int32_t *state; /* Array of state values. */ int rand_type; /* Type of random number generator. */ int rand_deg; /* Degree of random number generator. */ int rand_sep; /* Distance between front and rear. */ int32_t *end_ptr; /* Pointer behind state table. */ }; extern int random_r (struct random_data *__restrict __buf, int32_t *__restrict __result) __THROW __nonnull ((1, 2)); extern int srandom_r (unsigned int __seed, struct random_data *__buf) __THROW __nonnull ((2)); extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, size_t __statelen, struct random_data *__restrict __buf) __THROW __nonnull ((2, 4)); extern int setstate_r (char *__restrict __statebuf, struct random_data *__restrict __buf) __THROW __nonnull ((1, 2)); # endif /* Use misc. */ # 449 "/usr/include/stdlib.h" 3 4 #endif /* Use extended X/Open || misc. */ # 450 "/usr/include/stdlib.h" 3 4 /* Return a random integer between 0 and RAND_MAX inclusive. */ extern int rand (void) __THROW; /* Seed the random number generator with the given number. */ extern void srand (unsigned int __seed) __THROW; #ifdef __USE_POSIX199506 /* Reentrant interface according to POSIX.1. */ extern int rand_r (unsigned int *__seed) __THROW; #endif # 461 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_MISC || defined __USE_XOPEN #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 464 "/usr/include/stdlib.h" 3 4 /* System V style 48-bit random number generator functions. */ /* Return non-negative, double-precision floating-point value in [0.0,1.0). */ extern double drand48 (void) __THROW; extern double erand48 (unsigned short int __xsubi[3]) __THROW __nonnull ((1)); /* Return non-negative, long integer in [0,2^31). */ extern long int lrand48 (void) __THROW; extern long int nrand48 (unsigned short int __xsubi[3]) __THROW __nonnull ((1)); /* Return signed, long integers in [-2^31,2^31). */ extern long int mrand48 (void) __THROW; extern long int jrand48 (unsigned short int __xsubi[3]) __THROW __nonnull ((1)); /* Seed random number generator. */ extern void srand48 (long int __seedval) __THROW; extern unsigned short int *seed48 (unsigned short int __seed16v[3]) __THROW __nonnull ((1)); extern void lcong48 (unsigned short int __param[7]) __THROW __nonnull ((1)); # ifdef __USE_MISC /* Data structure for communication with thread safe versions. This type is to be regarded as opaque. It's only exported because users have to allocate objects of this type. */ struct drand48_data { unsigned short int __x[3]; /* Current state. */ unsigned short int __old_x[3]; /* Old state. */ unsigned short int __c; /* Additive const. in congruential formula. */ unsigned short int __init; /* Flag for initializing. */ __extension__ unsigned long long int __a; /* Factor in congruential formula. */ }; /* Return non-negative, double-precision floating-point value in [0.0,1.0). */ extern int drand48_r (struct drand48_data *__restrict __buffer, double *__restrict __result) __THROW __nonnull ((1, 2)); extern int erand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, double *__restrict __result) __THROW __nonnull ((1, 2)); /* Return non-negative, long integer in [0,2^31). */ extern int lrand48_r (struct drand48_data *__restrict __buffer, long int *__restrict __result) __THROW __nonnull ((1, 2)); extern int nrand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, long int *__restrict __result) __THROW __nonnull ((1, 2)); /* Return signed, long integers in [-2^31,2^31). */ extern int mrand48_r (struct drand48_data *__restrict __buffer, long int *__restrict __result) __THROW __nonnull ((1, 2)); extern int jrand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, long int *__restrict __result) __THROW __nonnull ((1, 2)); /* Seed random number generator. */ extern int srand48_r (long int __seedval, struct drand48_data *__buffer) __THROW __nonnull ((2)); extern int seed48_r (unsigned short int __seed16v[3], struct drand48_data *__buffer) __THROW __nonnull ((1, 2)); extern int lcong48_r (unsigned short int __param[7], struct drand48_data *__buffer) __THROW __nonnull ((1, 2)); # endif /* Use misc. */ # 536 "/usr/include/stdlib.h" 3 4 #endif /* Use misc or X/Open. */ # 537 "/usr/include/stdlib.h" 3 4 /* Allocate SIZE bytes of memory. */ extern void *malloc (size_t __size) __THROW __attribute_malloc__ __attribute_alloc_size__ ((1)) __wur; /* Allocate NMEMB elements of SIZE bytes each, all initialized to 0. */ extern void *calloc (size_t __nmemb, size_t __size) __THROW __attribute_malloc__ __attribute_alloc_size__ ((1, 2)) __wur; /* Re-allocate the previously allocated block in PTR, making the new block SIZE bytes long. */ /* __attribute_malloc__ is not used, because if realloc returns the same pointer that was passed to it, aliasing needs to be allowed between objects pointed by the old and new pointers. */ extern void *realloc (void *__ptr, size_t __size) __THROW __attribute_warn_unused_result__ __attribute_alloc_size__ ((2)); #ifdef __USE_MISC /* Re-allocate the previously allocated block in PTR, making the new block large enough for NMEMB elements of SIZE bytes each. */ /* __attribute_malloc__ is not used, because if reallocarray returns the same pointer that was passed to it, aliasing needs to be allowed between objects pointed by the old and new pointers. */ extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size) __THROW __attribute_warn_unused_result__ __attribute_alloc_size__ ((2, 3)); #endif # 563 "/usr/include/stdlib.h" 3 4 /* Free a block allocated by `malloc', `realloc' or `calloc'. */ extern void free (void *__ptr) __THROW; #ifdef __USE_MISC #if 0 /* expanded by -frewrite-includes */ # include <alloca.h> #endif /* expanded by -frewrite-includes */ # 568 "/usr/include/stdlib.h" 3 4 # 1 "/usr/include/alloca.h" 1 3 4 /* Copyright (C) 1992-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ #ifndef _ALLOCA_H #define _ALLOCA_H 1 #if 0 /* expanded by -frewrite-includes */ #include <features.h> #endif /* expanded by -frewrite-includes */ # 21 "/usr/include/alloca.h" 3 4 # 22 "/usr/include/alloca.h" 3 4 #define __need_size_t #if 0 /* expanded by -frewrite-includes */ #include <stddef.h> #endif /* expanded by -frewrite-includes */ # 24 "/usr/include/alloca.h" 3 4 # 1 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 1 3 4 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ #if 0 /* disabled by -frewrite-includes */ #if !defined(__STDDEF_H) || defined(__need_ptrdiff_t) || \ defined(__need_size_t) || defined(__need_wchar_t) || \ defined(__need_NULL) || defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 13 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \ !defined(__need_wchar_t) && !defined(__need_NULL) && \ !defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 17 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define miscellaneous pieces when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 19 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define __STDDEF_H #endif # 21 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define __need_ptrdiff_t #define __need_size_t #define __need_wchar_t #define __need_NULL #define __need_STDDEF_H_misc /* __need_wint_t is intentionally not defined here. */ #endif # 28 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_ptrdiff_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 30 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !defined(_PTRDIFF_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 31 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define ptrdiff_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 33 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define _PTRDIFF_T #endif # 35 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __PTRDIFF_TYPE__ ptrdiff_t; #endif # 37 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_ptrdiff_t #endif /* defined(__need_ptrdiff_t) */ # 39 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_size_t) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 41 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !defined(_SIZE_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 42 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define size_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 44 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define _SIZE_T #endif # 46 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __SIZE_TYPE__ size_t; #endif # 48 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_size_t #endif /*defined(__need_size_t) */ # 50 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_STDDEF_H_misc) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 52 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is * enabled. */ #if 0 /* disabled by -frewrite-includes */ #if (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 && \ !defined(_RSIZE_T)) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 56 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define rsize_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 58 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define _RSIZE_T #endif # 60 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __SIZE_TYPE__ rsize_t; #endif # 62 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #endif /* defined(__need_STDDEF_H_misc) */ # 63 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_wchar_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 65 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #ifndef __cplusplus /* Always define wchar_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(_WCHAR_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 68 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 69 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define _WCHAR_T #if 0 /* disabled by -frewrite-includes */ #if defined(_MSC_EXTENSIONS) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 71 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define _WCHAR_T_DEFINED #endif # 73 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 74 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __WCHAR_TYPE__ wchar_t; #endif # 76 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 77 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_wchar_t #endif /* defined(__need_wchar_t) */ # 79 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_NULL) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 81 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #undef NULL #ifdef __cplusplus #if 0 /* disabled by -frewrite-includes */ # if !defined(__MINGW32__) && !defined(_MSC_VER) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 84 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 # define NULL __null # else # 86 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 # define NULL 0 # endif # 88 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #else # 89 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 # define NULL ((void*)0) #endif # 91 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #ifdef __cplusplus #if 0 /* disabled by -frewrite-includes */ #if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 93 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 namespace std { typedef decltype(nullptr) nullptr_t; } using ::std::nullptr_t; #endif # 96 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 97 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_NULL #endif /* defined(__need_NULL) */ # 99 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_STDDEF_H_misc) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 101 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 102 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include "__stddef_max_align_t.h" #endif /* expanded by -frewrite-includes */ # 102 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 # 103 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 104 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define offsetof(t, d) __builtin_offsetof(t, d) #undef __need_STDDEF_H_misc #endif /* defined(__need_STDDEF_H_misc) */ # 107 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */ #if 0 /* disabled by -frewrite-includes */ #if defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 111 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define wint_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(_WINT_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 113 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 114 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define _WINT_T #endif # 116 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __WINT_TYPE__ wint_t; #endif # 118 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_wint_t #endif /* __need_wint_t */ # 120 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 122 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 # 25 "/usr/include/alloca.h" 2 3 4 __BEGIN_DECLS /* Remove any previous definitions. */ #undef alloca /* Allocate a block that will be freed when the calling function exits. */ extern void *alloca (size_t __size) __THROW; #ifdef __GNUC__ # define alloca(size) __builtin_alloca (size) #endif /* GCC. */ # 37 "/usr/include/alloca.h" 3 4 __END_DECLS #endif /* alloca.h */ # 41 "/usr/include/alloca.h" 3 4 # 569 "/usr/include/stdlib.h" 2 3 4 #endif /* Use misc. */ # 570 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K) \ || defined __USE_MISC #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 573 "/usr/include/stdlib.h" 3 4 /* Allocate SIZE bytes on a page boundary. The storage cannot be freed. */ extern void *valloc (size_t __size) __THROW __attribute_malloc__ __attribute_alloc_size__ ((1)) __wur; #endif # 577 "/usr/include/stdlib.h" 3 4 #ifdef __USE_XOPEN2K /* Allocate memory of SIZE bytes with an alignment of ALIGNMENT. */ extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) __THROW __nonnull ((1)) __wur; #endif # 583 "/usr/include/stdlib.h" 3 4 #ifdef __USE_ISOC11 /* ISO C variant of aligned allocation. */ extern void *aligned_alloc (size_t __alignment, size_t __size) __THROW __attribute_malloc__ __attribute_alloc_size__ ((2)) __wur; #endif # 589 "/usr/include/stdlib.h" 3 4 /* Abort execution and generate a core-dump. */ extern void abort (void) __THROW __attribute__ ((__noreturn__)); /* Register a function to be called when `exit' is called. */ extern int atexit (void (*__func) (void)) __THROW __nonnull ((1)); #if 0 /* disabled by -frewrite-includes */ #if defined __USE_ISOC11 || defined __USE_ISOCXX11 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 598 "/usr/include/stdlib.h" 3 4 /* Register a function to be called when `quick_exit' is called. */ # ifdef __cplusplus extern "C++" int at_quick_exit (void (*__func) (void)) __THROW __asm ("at_quick_exit") __nonnull ((1)); # else # 603 "/usr/include/stdlib.h" 3 4 extern int at_quick_exit (void (*__func) (void)) __THROW __nonnull ((1)); # endif # 605 "/usr/include/stdlib.h" 3 4 #endif # 606 "/usr/include/stdlib.h" 3 4 #ifdef __USE_MISC /* Register a function to be called with the status given to `exit' and the given argument. */ extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) __THROW __nonnull ((1)); #endif # 613 "/usr/include/stdlib.h" 3 4 /* Call all functions registered with `atexit' and `on_exit', in the reverse of the order in which they were registered, perform stdio cleanup, and terminate program execution with STATUS. */ extern void exit (int __status) __THROW __attribute__ ((__noreturn__)); #if 0 /* disabled by -frewrite-includes */ #if defined __USE_ISOC11 || defined __USE_ISOCXX11 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 620 "/usr/include/stdlib.h" 3 4 /* Call all functions registered with `at_quick_exit' in the reverse of the order in which they were registered and terminate program execution with STATUS. */ extern void quick_exit (int __status) __THROW __attribute__ ((__noreturn__)); #endif # 625 "/usr/include/stdlib.h" 3 4 #ifdef __USE_ISOC99 /* Terminate the program with STATUS without calling any of the functions registered with `atexit' or `on_exit'. */ extern void _Exit (int __status) __THROW __attribute__ ((__noreturn__)); #endif # 631 "/usr/include/stdlib.h" 3 4 /* Return the value of envariable NAME, or NULL if it doesn't exist. */ extern char *getenv (const char *__name) __THROW __nonnull ((1)) __wur; #ifdef __USE_GNU /* This function is similar to the above but returns NULL if the programs is running with SUID or SGID enabled. */ extern char *secure_getenv (const char *__name) __THROW __nonnull ((1)) __wur; #endif # 642 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_MISC || defined __USE_XOPEN #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 644 "/usr/include/stdlib.h" 3 4 /* The SVID says this is in <stdio.h>, but this seems a better place. */ /* Put STRING, which is of the form "NAME=VALUE", in the environment. If there is no `=', remove NAME from the environment. */ extern int putenv (char *__string) __THROW __nonnull ((1)); #endif # 649 "/usr/include/stdlib.h" 3 4 #ifdef __USE_XOPEN2K /* Set NAME to VALUE in the environment. If REPLACE is nonzero, overwrite an existing value. */ extern int setenv (const char *__name, const char *__value, int __replace) __THROW __nonnull ((2)); /* Remove the variable NAME from the environment. */ extern int unsetenv (const char *__name) __THROW __nonnull ((1)); #endif # 659 "/usr/include/stdlib.h" 3 4 #ifdef __USE_MISC /* The `clearenv' was planned to be added to POSIX.1 but probably never made it. Nevertheless the POSIX.9 standard (POSIX bindings for Fortran 77) requires this function. */ extern int clearenv (void) __THROW; #endif # 666 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_MISC \ || (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K8) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 670 "/usr/include/stdlib.h" 3 4 /* Generate a unique temporary file name from TEMPLATE. The last six characters of TEMPLATE must be "XXXXXX"; they are replaced with a string that makes the file name unique. Always returns TEMPLATE, it's either a temporary file name or a null string if it cannot get a unique file name. */ extern char *mktemp (char *__template) __THROW __nonnull ((1)); #endif # 677 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 679 "/usr/include/stdlib.h" 3 4 /* Generate a unique temporary file name from TEMPLATE. The last six characters of TEMPLATE must be "XXXXXX"; they are replaced with a string that makes the filename unique. Returns a file descriptor open on the file for reading and writing, or -1 if it cannot create a uniquely-named file. This function is a possible cancellation point and therefore not marked with __THROW. */ # ifndef __USE_FILE_OFFSET64 extern int mkstemp (char *__template) __nonnull ((1)) __wur; # else # 690 "/usr/include/stdlib.h" 3 4 # ifdef __REDIRECT extern int __REDIRECT (mkstemp, (char *__template), mkstemp64) __nonnull ((1)) __wur; # else # 694 "/usr/include/stdlib.h" 3 4 # define mkstemp mkstemp64 # endif # 696 "/usr/include/stdlib.h" 3 4 # endif # 697 "/usr/include/stdlib.h" 3 4 # ifdef __USE_LARGEFILE64 extern int mkstemp64 (char *__template) __nonnull ((1)) __wur; # endif # 700 "/usr/include/stdlib.h" 3 4 #endif # 701 "/usr/include/stdlib.h" 3 4 #ifdef __USE_MISC /* Similar to mkstemp, but the template can have a suffix after the XXXXXX. The length of the suffix is specified in the second parameter. This function is a possible cancellation point and therefore not marked with __THROW. */ # ifndef __USE_FILE_OFFSET64 extern int mkstemps (char *__template, int __suffixlen) __nonnull ((1)) __wur; # else # 712 "/usr/include/stdlib.h" 3 4 # ifdef __REDIRECT extern int __REDIRECT (mkstemps, (char *__template, int __suffixlen), mkstemps64) __nonnull ((1)) __wur; # else # 716 "/usr/include/stdlib.h" 3 4 # define mkstemps mkstemps64 # endif # 718 "/usr/include/stdlib.h" 3 4 # endif # 719 "/usr/include/stdlib.h" 3 4 # ifdef __USE_LARGEFILE64 extern int mkstemps64 (char *__template, int __suffixlen) __nonnull ((1)) __wur; # endif # 723 "/usr/include/stdlib.h" 3 4 #endif # 724 "/usr/include/stdlib.h" 3 4 #ifdef __USE_XOPEN2K8 /* Create a unique temporary directory from TEMPLATE. The last six characters of TEMPLATE must be "XXXXXX"; they are replaced with a string that makes the directory name unique. Returns TEMPLATE, or a null pointer if it cannot get a unique name. The directory is created mode 700. */ extern char *mkdtemp (char *__template) __THROW __nonnull ((1)) __wur; #endif # 733 "/usr/include/stdlib.h" 3 4 #ifdef __USE_GNU /* Generate a unique temporary file name from TEMPLATE similar to mkstemp. But allow the caller to pass additional flags which are used in the open call to create the file.. This function is a possible cancellation point and therefore not marked with __THROW. */ # ifndef __USE_FILE_OFFSET64 extern int mkostemp (char *__template, int __flags) __nonnull ((1)) __wur; # else # 744 "/usr/include/stdlib.h" 3 4 # ifdef __REDIRECT extern int __REDIRECT (mkostemp, (char *__template, int __flags), mkostemp64) __nonnull ((1)) __wur; # else # 748 "/usr/include/stdlib.h" 3 4 # define mkostemp mkostemp64 # endif # 750 "/usr/include/stdlib.h" 3 4 # endif # 751 "/usr/include/stdlib.h" 3 4 # ifdef __USE_LARGEFILE64 extern int mkostemp64 (char *__template, int __flags) __nonnull ((1)) __wur; # endif # 754 "/usr/include/stdlib.h" 3 4 /* Similar to mkostemp, but the template can have a suffix after the XXXXXX. The length of the suffix is specified in the second parameter. This function is a possible cancellation point and therefore not marked with __THROW. */ # ifndef __USE_FILE_OFFSET64 extern int mkostemps (char *__template, int __suffixlen, int __flags) __nonnull ((1)) __wur; # else # 765 "/usr/include/stdlib.h" 3 4 # ifdef __REDIRECT extern int __REDIRECT (mkostemps, (char *__template, int __suffixlen, int __flags), mkostemps64) __nonnull ((1)) __wur; # else # 770 "/usr/include/stdlib.h" 3 4 # define mkostemps mkostemps64 # endif # 772 "/usr/include/stdlib.h" 3 4 # endif # 773 "/usr/include/stdlib.h" 3 4 # ifdef __USE_LARGEFILE64 extern int mkostemps64 (char *__template, int __suffixlen, int __flags) __nonnull ((1)) __wur; # endif # 777 "/usr/include/stdlib.h" 3 4 #endif # 778 "/usr/include/stdlib.h" 3 4 /* Execute the given line as a shell command. This function is a cancellation point and therefore not marked with __THROW. */ extern int system (const char *__command) __wur; #ifdef __USE_GNU /* Return a malloc'd string containing the canonical absolute name of the existing named file. */ extern char *canonicalize_file_name (const char *__name) __THROW __nonnull ((1)) __wur; #endif # 793 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 795 "/usr/include/stdlib.h" 3 4 /* Return the canonical absolute name of file NAME. If RESOLVED is null, the result is malloc'd; otherwise, if the canonical name is PATH_MAX chars or more, returns null with `errno' set to ENAMETOOLONG; if the name fits in fewer than PATH_MAX chars, returns the name in RESOLVED. */ extern char *realpath (const char *__restrict __name, char *__restrict __resolved) __THROW __wur; #endif # 803 "/usr/include/stdlib.h" 3 4 /* Shorthand for type of comparison functions. */ #ifndef __COMPAR_FN_T # define __COMPAR_FN_T typedef int (*__compar_fn_t) (const void *, const void *); # ifdef __USE_GNU typedef __compar_fn_t comparison_fn_t; # endif # 813 "/usr/include/stdlib.h" 3 4 #endif # 814 "/usr/include/stdlib.h" 3 4 #ifdef __USE_GNU typedef int (*__compar_d_fn_t) (const void *, const void *, void *); #endif # 817 "/usr/include/stdlib.h" 3 4 /* Do a binary search for KEY in BASE, which consists of NMEMB elements of SIZE bytes each, using COMPAR to perform the comparisons. */ extern void *bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size, __compar_fn_t __compar) __nonnull ((1, 2, 5)) __wur; #ifdef __USE_EXTERN_INLINES #if 0 /* expanded by -frewrite-includes */ # include <bits/stdlib-bsearch.h> #endif /* expanded by -frewrite-includes */ # 825 "/usr/include/stdlib.h" 3 4 # 826 "/usr/include/stdlib.h" 3 4 #endif # 827 "/usr/include/stdlib.h" 3 4 /* Sort NMEMB elements of BASE, of SIZE bytes each, using COMPAR to perform the comparisons. */ extern void qsort (void *__base, size_t __nmemb, size_t __size, __compar_fn_t __compar) __nonnull ((1, 4)); #ifdef __USE_GNU extern void qsort_r (void *__base, size_t __nmemb, size_t __size, __compar_d_fn_t __compar, void *__arg) __nonnull ((1, 4)); #endif # 837 "/usr/include/stdlib.h" 3 4 /* Return the absolute value of X. */ extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur; extern long int labs (long int __x) __THROW __attribute__ ((__const__)) __wur; #ifdef __USE_ISOC99 __extension__ extern long long int llabs (long long int __x) __THROW __attribute__ ((__const__)) __wur; #endif # 847 "/usr/include/stdlib.h" 3 4 /* Return the `div_t', `ldiv_t' or `lldiv_t' representation of the value of NUMER over DENOM. */ /* GCC may have built-ins for these someday. */ extern div_t div (int __numer, int __denom) __THROW __attribute__ ((__const__)) __wur; extern ldiv_t ldiv (long int __numer, long int __denom) __THROW __attribute__ ((__const__)) __wur; #ifdef __USE_ISOC99 __extension__ extern lldiv_t lldiv (long long int __numer, long long int __denom) __THROW __attribute__ ((__const__)) __wur; #endif # 862 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K8) \ || defined __USE_MISC #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 866 "/usr/include/stdlib.h" 3 4 /* Convert floating point numbers to strings. The returned values are valid only until another call to the same function. */ /* Convert VALUE to a string with NDIGIT digits and return a pointer to this. Set *DECPT with the position of the decimal character and *SIGN with the sign of the number. */ extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) __THROW __nonnull ((3, 4)) __wur; /* Convert VALUE to a string rounded to NDIGIT decimal digits. Set *DECPT with the position of the decimal character and *SIGN with the sign of the number. */ extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) __THROW __nonnull ((3, 4)) __wur; /* If possible convert VALUE to a string with NDIGIT significant digits. Otherwise use exponential representation. The resulting string will be written to BUF. */ extern char *gcvt (double __value, int __ndigit, char *__buf) __THROW __nonnull ((3)) __wur; #endif # 887 "/usr/include/stdlib.h" 3 4 #ifdef __USE_MISC /* Long double versions of above functions. */ extern char *qecvt (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) __THROW __nonnull ((3, 4)) __wur; extern char *qfcvt (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) __THROW __nonnull ((3, 4)) __wur; extern char *qgcvt (long double __value, int __ndigit, char *__buf) __THROW __nonnull ((3)) __wur; /* Reentrant version of the functions above which provide their own buffers. */ extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) __THROW __nonnull ((3, 4, 5)); extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) __THROW __nonnull ((3, 4, 5)); extern int qecvt_r (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) __THROW __nonnull ((3, 4, 5)); extern int qfcvt_r (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) __THROW __nonnull ((3, 4, 5)); #endif /* misc */ # 918 "/usr/include/stdlib.h" 3 4 /* Return the length of the multibyte character in S, which is no longer than N. */ extern int mblen (const char *__s, size_t __n) __THROW; /* Return the length of the given multibyte character, putting its `wchar_t' representation in *PWC. */ extern int mbtowc (wchar_t *__restrict __pwc, const char *__restrict __s, size_t __n) __THROW; /* Put the multibyte character represented by WCHAR in S, returning its length. */ extern int wctomb (char *__s, wchar_t __wchar) __THROW; /* Convert a multibyte string to a wide char string. */ extern size_t mbstowcs (wchar_t *__restrict __pwcs, const char *__restrict __s, size_t __n) __THROW; /* Convert a wide char string to multibyte string. */ extern size_t wcstombs (char *__restrict __s, const wchar_t *__restrict __pwcs, size_t __n) __THROW; #ifdef __USE_MISC /* Determine whether the string value of RESPONSE matches the affirmation or negative response expression as specified by the LC_MESSAGES category in the program's current locale. Returns 1 if affirmative, 0 if negative, and -1 if not matching. */ extern int rpmatch (const char *__response) __THROW __nonnull ((1)) __wur; #endif # 948 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 951 "/usr/include/stdlib.h" 3 4 /* Parse comma separated suboption from *OPTIONP and match against strings in TOKENS. If found return index and set *VALUEP to optional value introduced by an equal sign. If the suboption is not part of TOKENS return in *VALUEP beginning of unknown suboption. On exit *OPTIONP is set to the beginning of the next token or at the terminating NUL character. */ extern int getsubopt (char **__restrict __optionp, char *const *__restrict __tokens, char **__restrict __valuep) __THROW __nonnull ((1, 2, 3)) __wur; #endif # 962 "/usr/include/stdlib.h" 3 4 /* X/Open pseudo terminal handling. */ #ifdef __USE_XOPEN2KXSI /* Return a master pseudo-terminal handle. */ extern int posix_openpt (int __oflag) __wur; #endif # 970 "/usr/include/stdlib.h" 3 4 #ifdef __USE_XOPEN_EXTENDED /* The next four functions all take a master pseudo-tty fd and perform an operation on the associated slave: */ /* Chown the slave to the calling user. */ extern int grantpt (int __fd) __THROW; /* Release an internal lock so the slave can be opened. Call after grantpt(). */ extern int unlockpt (int __fd) __THROW; /* Return the pathname of the pseudo terminal slave associated with the master FD is open on, or NULL on errors. The returned storage is good until the next call to this function. */ extern char *ptsname (int __fd) __THROW __wur; #endif # 987 "/usr/include/stdlib.h" 3 4 #ifdef __USE_GNU /* Store at most BUFLEN characters of the pathname of the slave pseudo terminal associated with the master FD is open on in BUF. Return 0 on success, otherwise an error number. */ extern int ptsname_r (int __fd, char *__buf, size_t __buflen) __THROW __nonnull ((2)); /* Open a master pseudo terminal and return its file descriptor. */ extern int getpt (void); #endif # 998 "/usr/include/stdlib.h" 3 4 #ifdef __USE_MISC /* Put the 1 minute, 5 minute and 15 minute load averages into the first NELEM elements of LOADAVG. Return the number written (never more than three, but may be less than NELEM), or -1 if an error occurred. */ extern int getloadavg (double __loadavg[], int __nelem) __THROW __nonnull ((1)); #endif # 1006 "/usr/include/stdlib.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1008 "/usr/include/stdlib.h" 3 4 /* Return the index into the active-logins file (utmp) for the controlling terminal. */ extern int ttyslot (void) __THROW; #endif # 1012 "/usr/include/stdlib.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <bits/stdlib-float.h> #endif /* expanded by -frewrite-includes */ # 1013 "/usr/include/stdlib.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/stdlib-float.h" 1 3 4 /* Floating-point inline functions for stdlib.h. Copyright (C) 2012-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ #ifndef _STDLIB_H # error "Never use <bits/stdlib-float.h> directly; include <stdlib.h> instead." #endif # 22 "/usr/include/x86_64-linux-gnu/bits/stdlib-float.h" 3 4 #ifdef __USE_EXTERN_INLINES __extern_inline double __NTH (atof (const char *__nptr)) { return strtod (__nptr, (char **) NULL); } #endif /* Optimizing and Inlining. */ # 30 "/usr/include/x86_64-linux-gnu/bits/stdlib-float.h" 3 4 # 1014 "/usr/include/stdlib.h" 2 3 4 /* Define some macros helping to catch buffer overflows. */ #if 0 /* disabled by -frewrite-includes */ #if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1017 "/usr/include/stdlib.h" 3 4 #if 0 /* expanded by -frewrite-includes */ # include <bits/stdlib.h> #endif /* expanded by -frewrite-includes */ # 1017 "/usr/include/stdlib.h" 3 4 # 1018 "/usr/include/stdlib.h" 3 4 #endif # 1019 "/usr/include/stdlib.h" 3 4 #ifdef __LDBL_COMPAT #if 0 /* expanded by -frewrite-includes */ # include <bits/stdlib-ldbl.h> #endif /* expanded by -frewrite-includes */ # 1020 "/usr/include/stdlib.h" 3 4 # 1021 "/usr/include/stdlib.h" 3 4 #endif # 1022 "/usr/include/stdlib.h" 3 4 __END_DECLS #endif /* stdlib.h */ # 1026 "/usr/include/stdlib.h" 3 4 # 76 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 2 3 #undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS #if 0 /* expanded by -frewrite-includes */ #include <bits/std_abs.h> #endif /* expanded by -frewrite-includes */ # 77 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/std_abs.h" 1 3 // -*- C++ -*- C library enhancements header. // Copyright (C) 2016-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file include/bits/std_abs.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{cmath, cstdlib} */ #ifndef _GLIBCXX_BITS_STD_ABS_H #define _GLIBCXX_BITS_STD_ABS_H #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 34 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/std_abs.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/c++config.h> #endif /* expanded by -frewrite-includes */ # 35 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/std_abs.h" 3 # 36 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/std_abs.h" 3 #define _GLIBCXX_INCLUDE_NEXT_C_HEADERS #if 0 /* expanded by -frewrite-includes */ #include_next <stdlib.h> #endif /* expanded by -frewrite-includes */ # 38 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/std_abs.h" 3 # 39 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/std_abs.h" 3 #ifdef __CORRECT_ISO_CPP_MATH_H_PROTO #if 0 /* expanded by -frewrite-includes */ # include_next <math.h> #endif /* expanded by -frewrite-includes */ # 40 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/std_abs.h" 3 # 41 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/std_abs.h" 3 #endif # 42 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/std_abs.h" 3 #undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS #undef abs extern "C++" { namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION using ::abs; #ifndef __CORRECT_ISO_CPP_STDLIB_H_PROTO inline long abs(long __i) { return __builtin_labs(__i); } #endif # 58 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/std_abs.h" 3 #ifdef _GLIBCXX_USE_LONG_LONG inline long long abs(long long __x) { return __builtin_llabs (__x); } #endif # 63 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/std_abs.h" 3 // _GLIBCXX_RESOLVE_LIB_DEFECTS // 2192. Validity and return type of std::abs(0u) is unclear // 2294. <cstdlib> should declare abs(double) // 2735. std::abs(short), std::abs(signed char) and others should return int #ifndef __CORRECT_ISO_CPP_MATH_H_PROTO inline _GLIBCXX_CONSTEXPR double abs(double __x) { return __builtin_fabs(__x); } inline _GLIBCXX_CONSTEXPR float abs(float __x) { return __builtin_fabsf(__x); } inline _GLIBCXX_CONSTEXPR long double abs(long double __x) { return __builtin_fabsl(__x); } #endif # 82 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/std_abs.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined(__GLIBCXX_TYPE_INT_N_0) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 84 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/std_abs.h" 3 inline _GLIBCXX_CONSTEXPR __GLIBCXX_TYPE_INT_N_0 abs(__GLIBCXX_TYPE_INT_N_0 __x) { return __x >= 0 ? __x : -__x; } #endif # 87 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/std_abs.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined(__GLIBCXX_TYPE_INT_N_1) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 88 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/std_abs.h" 3 inline _GLIBCXX_CONSTEXPR __GLIBCXX_TYPE_INT_N_1 abs(__GLIBCXX_TYPE_INT_N_1 __x) { return __x >= 0 ? __x : -__x; } #endif # 91 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/std_abs.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined(__GLIBCXX_TYPE_INT_N_2) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 92 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/std_abs.h" 3 inline _GLIBCXX_CONSTEXPR __GLIBCXX_TYPE_INT_N_2 abs(__GLIBCXX_TYPE_INT_N_2 __x) { return __x >= 0 ? __x : -__x; } #endif # 95 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/std_abs.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined(__GLIBCXX_TYPE_INT_N_3) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 96 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/std_abs.h" 3 inline _GLIBCXX_CONSTEXPR __GLIBCXX_TYPE_INT_N_3 abs(__GLIBCXX_TYPE_INT_N_3 __x) { return __x >= 0 ? __x : -__x; } #endif # 99 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/std_abs.h" 3 #if 0 /* disabled by -frewrite-includes */ #if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_FLOAT128) && !defined(__CUDACC__) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 101 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/std_abs.h" 3 inline _GLIBCXX_CONSTEXPR __float128 abs(__float128 __x) { return __x < 0 ? -__x : __x; } #endif # 106 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/std_abs.h" 3 _GLIBCXX_END_NAMESPACE_VERSION } // namespace } // extern "C"++" #endif // _GLIBCXX_BITS_STD_ABS_H # 112 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/std_abs.h" 3 # 78 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 2 3 // Get rid of those macros defined in <stdlib.h> in lieu of real functions. #undef abort #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L && defined(_GLIBCXX_HAVE_ALIGNED_ALLOC) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 82 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 # undef aligned_alloc #endif # 84 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 #undef atexit #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 86 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 # ifdef _GLIBCXX_HAVE_AT_QUICK_EXIT # undef at_quick_exit # endif # 89 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 #endif # 90 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 #undef atof #undef atoi #undef atol #undef bsearch #undef calloc #undef div #undef exit #undef free #undef getenv #undef labs #undef ldiv #undef malloc #undef mblen #undef mbstowcs #undef mbtowc #undef qsort #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 107 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 # ifdef _GLIBCXX_HAVE_QUICK_EXIT # undef quick_exit # endif # 110 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 #endif # 111 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 #undef rand #undef realloc #undef srand #undef strtod #undef strtol #undef strtoul #undef system #undef wcstombs #undef wctomb extern "C++" { namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION using ::div_t; using ::ldiv_t; using ::abort; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L && defined(_GLIBCXX_HAVE_ALIGNED_ALLOC) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 132 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 using ::aligned_alloc; #endif # 134 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 using ::atexit; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 136 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 # ifdef _GLIBCXX_HAVE_AT_QUICK_EXIT using ::at_quick_exit; # endif # 139 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 #endif # 140 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 using ::atof; using ::atoi; using ::atol; using ::bsearch; using ::calloc; using ::div; using ::exit; using ::free; using ::getenv; using ::labs; using ::ldiv; using ::malloc; #ifdef _GLIBCXX_HAVE_MBSTATE_T using ::mblen; using ::mbstowcs; using ::mbtowc; #endif // _GLIBCXX_HAVE_MBSTATE_T # 157 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 using ::qsort; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 159 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 # ifdef _GLIBCXX_HAVE_QUICK_EXIT using ::quick_exit; # endif # 162 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 #endif # 163 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 using ::rand; using ::realloc; using ::srand; using ::strtod; using ::strtol; using ::strtoul; using ::system; #ifdef _GLIBCXX_USE_WCHAR_T using ::wcstombs; using ::wctomb; #endif // _GLIBCXX_USE_WCHAR_T # 174 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 #ifndef __CORRECT_ISO_CPP_STDLIB_H_PROTO inline ldiv_t div(long __i, long __j) { return ldiv(__i, __j); } #endif # 179 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 _GLIBCXX_END_NAMESPACE_VERSION } // namespace #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_USE_C99_STDLIB #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 185 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 #undef _Exit #undef llabs #undef lldiv #undef atoll #undef strtoll #undef strtoull #undef strtof #undef strtold namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION #if 0 /* disabled by -frewrite-includes */ #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 200 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 using ::lldiv_t; #endif # 202 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 203 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 extern "C" void (_Exit)(int) throw () _GLIBCXX_NORETURN; #endif # 205 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 #if 0 /* disabled by -frewrite-includes */ #if !_GLIBCXX_USE_C99_DYNAMIC #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 206 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 using ::_Exit; #endif # 208 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 #if 0 /* disabled by -frewrite-includes */ #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 210 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 using ::llabs; inline lldiv_t div(long long __n, long long __d) { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; } using ::lldiv; #endif # 218 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_USE_C99_LONG_LONG_CHECK || _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 220 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 extern "C" long long int (atoll)(const char *) throw (); extern "C" long long int (strtoll)(const char * __restrict, char ** __restrict, int) throw (); extern "C" unsigned long long int (strtoull)(const char * __restrict, char ** __restrict, int) throw (); #endif # 226 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 #if 0 /* disabled by -frewrite-includes */ #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 227 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 using ::atoll; using ::strtoll; using ::strtoull; #endif # 231 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 using ::strtof; using ::strtold; _GLIBCXX_END_NAMESPACE_VERSION } // namespace __gnu_cxx namespace std { #if 0 /* disabled by -frewrite-includes */ #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 240 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 using ::__gnu_cxx::lldiv_t; #endif # 242 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 using ::__gnu_cxx::_Exit; #if 0 /* disabled by -frewrite-includes */ #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 244 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 using ::__gnu_cxx::llabs; using ::__gnu_cxx::div; using ::__gnu_cxx::lldiv; #endif # 248 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 using ::__gnu_cxx::atoll; using ::__gnu_cxx::strtof; using ::__gnu_cxx::strtoll; using ::__gnu_cxx::strtoull; using ::__gnu_cxx::strtold; } // namespace std #endif // _GLIBCXX_USE_C99_STDLIB # 256 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 } // extern "C++" #endif // !_GLIBCXX_HOSTED # 260 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 #endif # 262 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib" 3 # 42 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/string_conversions.h" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <cwchar> #endif /* expanded by -frewrite-includes */ # 42 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/string_conversions.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 1 3 // -*- C++ -*- forwarding header. // Copyright (C) 1997-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file include/cwchar * This is a Standard C++ Library file. You should @c \#include this file * in your programs, rather than any of the @a *.h implementation files. * * This is the C++ version of the Standard C Library header @c wchar.h, * and its contents are (mostly) the same as that header, but are all * contained in the namespace @c std (except for names which are defined * as macros in C). */ // // ISO C++ 14882: 21.4 // #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 40 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/c++config.h> #endif /* expanded by -frewrite-includes */ # 41 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 # 42 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_HAVE_WCHAR_H #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 44 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #if 0 /* expanded by -frewrite-includes */ #include <wchar.h> #endif /* expanded by -frewrite-includes */ # 44 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 # 45 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #endif # 46 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #ifndef _GLIBCXX_CWCHAR #define _GLIBCXX_CWCHAR 1 // Need to do a bit of trickery here with mbstate_t as char_traits // assumes it is in wchar.h, regardless of wchar_t specializations. #ifndef _GLIBCXX_HAVE_MBSTATE_T extern "C" { typedef struct { int __fill[6]; } mbstate_t; } #endif # 61 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 namespace std { using ::mbstate_t; } // namespace std // Get rid of those macros defined in <wchar.h> in lieu of real functions. #undef btowc #undef fgetwc #undef fgetws #undef fputwc #undef fputws #undef fwide #undef fwprintf #undef fwscanf #undef getwc #undef getwchar #undef mbrlen #undef mbrtowc #undef mbsinit #undef mbsrtowcs #undef putwc #undef putwchar #undef swprintf #undef swscanf #undef ungetwc #undef vfwprintf #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_HAVE_VFWSCANF #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 89 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 # undef vfwscanf #endif # 91 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #undef vswprintf #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_HAVE_VSWSCANF #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 93 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 # undef vswscanf #endif # 95 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #undef vwprintf #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_HAVE_VWSCANF #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 97 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 # undef vwscanf #endif # 99 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #undef wcrtomb #undef wcscat #undef wcschr #undef wcscmp #undef wcscoll #undef wcscpy #undef wcscspn #undef wcsftime #undef wcslen #undef wcsncat #undef wcsncmp #undef wcsncpy #undef wcspbrk #undef wcsrchr #undef wcsrtombs #undef wcsspn #undef wcsstr #undef wcstod #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_HAVE_WCSTOF #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 118 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 # undef wcstof #endif # 120 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #undef wcstok #undef wcstol #undef wcstoul #undef wcsxfrm #undef wctob #undef wmemchr #undef wmemcmp #undef wmemcpy #undef wmemmove #undef wmemset #undef wprintf #undef wscanf #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_USE_WCHAR_T #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 134 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 extern "C++" { namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION using ::wint_t; using ::btowc; using ::fgetwc; using ::fgetws; using ::fputwc; using ::fputws; using ::fwide; using ::fwprintf; using ::fwscanf; using ::getwc; using ::getwchar; using ::mbrlen; using ::mbrtowc; using ::mbsinit; using ::mbsrtowcs; using ::putwc; using ::putwchar; #ifndef _GLIBCXX_HAVE_BROKEN_VSWPRINTF using ::swprintf; #endif # 162 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 using ::swscanf; using ::ungetwc; using ::vfwprintf; #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_HAVE_VFWSCANF #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 166 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 using ::vfwscanf; #endif # 168 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #ifndef _GLIBCXX_HAVE_BROKEN_VSWPRINTF using ::vswprintf; #endif # 171 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_HAVE_VSWSCANF #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 172 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 using ::vswscanf; #endif # 174 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 using ::vwprintf; #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_HAVE_VWSCANF #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 176 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 using ::vwscanf; #endif # 178 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 using ::wcrtomb; using ::wcscat; using ::wcscmp; using ::wcscoll; using ::wcscpy; using ::wcscspn; using ::wcsftime; using ::wcslen; using ::wcsncat; using ::wcsncmp; using ::wcsncpy; using ::wcsrtombs; using ::wcsspn; using ::wcstod; #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_HAVE_WCSTOF #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 193 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 using ::wcstof; #endif # 195 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 using ::wcstok; using ::wcstol; using ::wcstoul; using ::wcsxfrm; using ::wctob; using ::wmemcmp; using ::wmemcpy; using ::wmemmove; using ::wmemset; using ::wprintf; using ::wscanf; using ::wcschr; using ::wcspbrk; using ::wcsrchr; using ::wcsstr; using ::wmemchr; #ifndef __CORRECT_ISO_CPP_WCHAR_H_PROTO inline wchar_t* wcschr(wchar_t* __p, wchar_t __c) { return wcschr(const_cast<const wchar_t*>(__p), __c); } inline wchar_t* wcspbrk(wchar_t* __s1, const wchar_t* __s2) { return wcspbrk(const_cast<const wchar_t*>(__s1), __s2); } inline wchar_t* wcsrchr(wchar_t* __p, wchar_t __c) { return wcsrchr(const_cast<const wchar_t*>(__p), __c); } inline wchar_t* wcsstr(wchar_t* __s1, const wchar_t* __s2) { return wcsstr(const_cast<const wchar_t*>(__s1), __s2); } inline wchar_t* wmemchr(wchar_t* __p, wchar_t __c, size_t __n) { return wmemchr(const_cast<const wchar_t*>(__p), __c, __n); } #endif # 233 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 _GLIBCXX_END_NAMESPACE_VERSION } // namespace } // extern "C++" #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_USE_C99_WCHAR #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 239 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #undef wcstold #undef wcstoll #undef wcstoull namespace __gnu_cxx { #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 247 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 extern "C" long double (wcstold)(const wchar_t * __restrict, wchar_t ** __restrict) throw (); #endif # 250 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #if 0 /* disabled by -frewrite-includes */ #if !_GLIBCXX_USE_C99_DYNAMIC #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 251 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 using ::wcstold; #endif # 253 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_USE_C99_LONG_LONG_CHECK || _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 254 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 extern "C" long long int (wcstoll)(const wchar_t * __restrict, wchar_t ** __restrict, int) throw (); extern "C" unsigned long long int (wcstoull)(const wchar_t * __restrict, wchar_t ** __restrict, int) throw (); #endif # 259 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #if 0 /* disabled by -frewrite-includes */ #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 260 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 using ::wcstoll; using ::wcstoull; #endif # 263 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 } // namespace __gnu_cxx namespace std { using ::__gnu_cxx::wcstold; using ::__gnu_cxx::wcstoll; using ::__gnu_cxx::wcstoull; } // namespace #endif # 273 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #endif //_GLIBCXX_USE_WCHAR_T # 275 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 277 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #ifdef _GLIBCXX_USE_WCHAR_T namespace std { #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_HAVE_WCSTOF #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 283 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 using std::wcstof; #endif # 285 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_HAVE_VFWSCANF #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 286 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 using std::vfwscanf; #endif # 288 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_HAVE_VSWSCANF #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 289 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 using std::vswscanf; #endif # 291 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_HAVE_VWSCANF #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 292 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 using std::vwscanf; #endif # 294 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_USE_C99_WCHAR #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 296 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 using std::wcstold; using std::wcstoll; using std::wcstoull; #endif # 300 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 } // namespace #endif // _GLIBCXX_USE_WCHAR_T # 303 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #endif // C++11 # 305 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 #endif # 307 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cwchar" 3 # 43 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/string_conversions.h" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <cstdio> #endif /* expanded by -frewrite-includes */ # 43 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/string_conversions.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdio" 1 3 // -*- C++ -*- forwarding header. // Copyright (C) 1997-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file include/cstdio * This is a Standard C++ Library file. You should @c \#include this file * in your programs, rather than any of the @a *.h implementation files. * * This is the C++ version of the Standard C Library header @c stdio.h, * and its contents are (mostly) the same as that header, but are all * contained in the namespace @c std (except for names which are defined * as macros in C). */ // // ISO C++ 14882: 27.8.2 C Library files // #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 40 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdio" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/c++config.h> #endif /* expanded by -frewrite-includes */ # 41 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdio" 3 # 42 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdio" 3 #if 0 /* expanded by -frewrite-includes */ #include <stdio.h> #endif /* expanded by -frewrite-includes */ # 42 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdio" 3 # 1 "/usr/include/stdio.h" 1 3 4 /* Define ISO C stdio on top of C++ iostreams. Copyright (C) 1991-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ /* * ISO C99 Standard: 7.19 Input/output <stdio.h> */ #ifndef _STDIO_H #define _STDIO_H 1 #define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION #if 0 /* expanded by -frewrite-includes */ #include <bits/libc-header-start.h> #endif /* expanded by -frewrite-includes */ # 27 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 1 3 4 /* Handle feature test macros at the start of a header. Copyright (C) 2016-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ /* This header is internal to glibc and should not be included outside of glibc headers. Headers including it must define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION first. This header cannot have multiple include guards because ISO C feature test macros depend on the definition of the macro when an affected header is included, not when the first system header is included. */ #ifndef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION # error "Never include <bits/libc-header-start.h> directly." #endif # 30 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 #undef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION #if 0 /* expanded by -frewrite-includes */ #include <features.h> #endif /* expanded by -frewrite-includes */ # 33 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # 34 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 /* ISO/IEC TR 24731-2:2010 defines the __STDC_WANT_LIB_EXT2__ macro. */ #undef __GLIBC_USE_LIB_EXT2 #if 0 /* disabled by -frewrite-includes */ #if (defined __USE_GNU \ || (defined __STDC_WANT_LIB_EXT2__ && __STDC_WANT_LIB_EXT2__ > 0)) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 40 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_LIB_EXT2 1 #else # 42 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_LIB_EXT2 0 #endif # 44 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 /* ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__ macro. Most but not all symbols enabled by that macro in TS 18661-1 are enabled unconditionally in C2X; the symbols in Annex F still require that macro in C2X. */ #undef __GLIBC_USE_IEC_60559_BFP_EXT #if 0 /* disabled by -frewrite-includes */ #if defined __USE_GNU || defined __STDC_WANT_IEC_60559_BFP_EXT__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 51 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_BFP_EXT 1 #else # 53 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_BFP_EXT 0 #endif # 55 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 #undef __GLIBC_USE_IEC_60559_BFP_EXT_C2X #if 0 /* disabled by -frewrite-includes */ #if __GLIBC_USE (IEC_60559_BFP_EXT) || __GLIBC_USE (ISOC2X) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 57 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 1 #else # 59 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 0 #endif # 61 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 /* ISO/IEC TS 18661-4:2015 defines the __STDC_WANT_IEC_60559_FUNCS_EXT__ macro. Other than the reduction functions, the symbols from this TS are enabled unconditionally in C2X. */ #undef __GLIBC_USE_IEC_60559_FUNCS_EXT #if 0 /* disabled by -frewrite-includes */ #if defined __USE_GNU || defined __STDC_WANT_IEC_60559_FUNCS_EXT__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 68 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_FUNCS_EXT 1 #else # 70 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_FUNCS_EXT 0 #endif # 72 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 #undef __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X #if 0 /* disabled by -frewrite-includes */ #if __GLIBC_USE (IEC_60559_FUNCS_EXT) || __GLIBC_USE (ISOC2X) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 74 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 1 #else # 76 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 0 #endif # 78 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 /* ISO/IEC TS 18661-3:2015 defines the __STDC_WANT_IEC_60559_TYPES_EXT__ macro. */ #undef __GLIBC_USE_IEC_60559_TYPES_EXT #if 0 /* disabled by -frewrite-includes */ #if defined __USE_GNU || defined __STDC_WANT_IEC_60559_TYPES_EXT__ #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 83 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_TYPES_EXT 1 #else # 85 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # define __GLIBC_USE_IEC_60559_TYPES_EXT 0 #endif # 87 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 3 4 # 28 "/usr/include/stdio.h" 2 3 4 __BEGIN_DECLS #define __need_size_t #define __need_NULL #if 0 /* expanded by -frewrite-includes */ #include <stddef.h> #endif /* expanded by -frewrite-includes */ # 33 "/usr/include/stdio.h" 3 4 # 1 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 1 3 4 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ #if 0 /* disabled by -frewrite-includes */ #if !defined(__STDDEF_H) || defined(__need_ptrdiff_t) || \ defined(__need_size_t) || defined(__need_wchar_t) || \ defined(__need_NULL) || defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 13 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \ !defined(__need_wchar_t) && !defined(__need_NULL) && \ !defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 17 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define miscellaneous pieces when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 19 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define __STDDEF_H #endif # 21 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define __need_ptrdiff_t #define __need_size_t #define __need_wchar_t #define __need_NULL #define __need_STDDEF_H_misc /* __need_wint_t is intentionally not defined here. */ #endif # 28 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_ptrdiff_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 30 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !defined(_PTRDIFF_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 31 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define ptrdiff_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 33 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define _PTRDIFF_T #endif # 35 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __PTRDIFF_TYPE__ ptrdiff_t; #endif # 37 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_ptrdiff_t #endif /* defined(__need_ptrdiff_t) */ # 39 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_size_t) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 41 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !defined(_SIZE_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 42 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define size_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 44 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define _SIZE_T #endif # 46 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __SIZE_TYPE__ size_t; #endif # 48 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_size_t #endif /*defined(__need_size_t) */ # 50 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_STDDEF_H_misc) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 52 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is * enabled. */ #if 0 /* disabled by -frewrite-includes */ #if (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 && \ !defined(_RSIZE_T)) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 56 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define rsize_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 58 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define _RSIZE_T #endif # 60 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __SIZE_TYPE__ rsize_t; #endif # 62 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #endif /* defined(__need_STDDEF_H_misc) */ # 63 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_wchar_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 65 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #ifndef __cplusplus /* Always define wchar_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(_WCHAR_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 68 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 69 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define _WCHAR_T #if 0 /* disabled by -frewrite-includes */ #if defined(_MSC_EXTENSIONS) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 71 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define _WCHAR_T_DEFINED #endif # 73 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 74 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __WCHAR_TYPE__ wchar_t; #endif # 76 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 77 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_wchar_t #endif /* defined(__need_wchar_t) */ # 79 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_NULL) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 81 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #undef NULL #ifdef __cplusplus #if 0 /* disabled by -frewrite-includes */ # if !defined(__MINGW32__) && !defined(_MSC_VER) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 84 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 # define NULL __null # else # 86 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 # define NULL 0 # endif # 88 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #else # 89 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 # define NULL ((void*)0) #endif # 91 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #ifdef __cplusplus #if 0 /* disabled by -frewrite-includes */ #if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 93 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 namespace std { typedef decltype(nullptr) nullptr_t; } using ::std::nullptr_t; #endif # 96 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 97 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_NULL #endif /* defined(__need_NULL) */ # 99 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined(__need_STDDEF_H_misc) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 101 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 102 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include "__stddef_max_align_t.h" #endif /* expanded by -frewrite-includes */ # 102 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 # 103 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 104 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define offsetof(t, d) __builtin_offsetof(t, d) #undef __need_STDDEF_H_misc #endif /* defined(__need_STDDEF_H_misc) */ # 107 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */ #if 0 /* disabled by -frewrite-includes */ #if defined(__need_wint_t) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 111 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 /* Always define wint_t when modules are available. */ #if 0 /* disabled by -frewrite-includes */ #if !defined(_WINT_T) || __has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 113 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if !__has_feature(modules) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 114 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #define _WINT_T #endif # 116 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 typedef __WINT_TYPE__ wint_t; #endif # 118 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #undef __need_wint_t #endif /* __need_wint_t */ # 120 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 #endif # 122 "/usr/lib/llvm-10/lib/clang/10.0.0/include/stddef.h" 3 4 # 34 "/usr/include/stdio.h" 2 3 4 #define __need___va_list #if 0 /* expanded by -frewrite-includes */ #include <stdarg.h> #endif /* expanded by -frewrite-includes */ # 36 "/usr/include/stdio.h" 3 4 # 37 "/usr/include/stdio.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <bits/types.h> #endif /* expanded by -frewrite-includes */ # 38 "/usr/include/stdio.h" 3 4 # 39 "/usr/include/stdio.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <bits/types/__fpos_t.h> #endif /* expanded by -frewrite-includes */ # 39 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h" 1 3 4 #ifndef _____fpos_t_defined #define _____fpos_t_defined 1 #if 0 /* expanded by -frewrite-includes */ #include <bits/types.h> #endif /* expanded by -frewrite-includes */ # 4 "/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h" 3 4 # 5 "/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <bits/types/__mbstate_t.h> #endif /* expanded by -frewrite-includes */ # 5 "/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h" 3 4 # 6 "/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h" 3 4 /* The tag name of this struct is _G_fpos_t to preserve historic C++ mangled names for functions taking fpos_t arguments. That name should not be used in new code. */ typedef struct _G_fpos_t { __off_t __pos; __mbstate_t __state; } __fpos_t; #endif # 17 "/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h" 3 4 # 40 "/usr/include/stdio.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include <bits/types/__fpos64_t.h> #endif /* expanded by -frewrite-includes */ # 40 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h" 1 3 4 #ifndef _____fpos64_t_defined #define _____fpos64_t_defined 1 #if 0 /* expanded by -frewrite-includes */ #include <bits/types.h> #endif /* expanded by -frewrite-includes */ # 4 "/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h" 3 4 # 5 "/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <bits/types/__mbstate_t.h> #endif /* expanded by -frewrite-includes */ # 5 "/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h" 3 4 # 6 "/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h" 3 4 /* The tag name of this struct is _G_fpos64_t to preserve historic C++ mangled names for functions taking fpos_t and/or fpos64_t arguments. That name should not be used in new code. */ typedef struct _G_fpos64_t { __off64_t __pos; __mbstate_t __state; } __fpos64_t; #endif # 17 "/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h" 3 4 # 41 "/usr/include/stdio.h" 2 3 4 #if 0 /* expanded by -frewrite-includes */ #include <bits/types/__FILE.h> #endif /* expanded by -frewrite-includes */ # 41 "/usr/include/stdio.h" 3 4 # 42 "/usr/include/stdio.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <bits/types/FILE.h> #endif /* expanded by -frewrite-includes */ # 42 "/usr/include/stdio.h" 3 4 # 43 "/usr/include/stdio.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <bits/types/struct_FILE.h> #endif /* expanded by -frewrite-includes */ # 43 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h" 1 3 4 /* Copyright (C) 1991-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ #ifndef __struct_FILE_defined #define __struct_FILE_defined 1 /* Caution: The contents of this file are not part of the official stdio.h API. However, much of it is part of the official *binary* interface, and therefore cannot be changed. */ #if 0 /* disabled by -frewrite-includes */ #if defined _IO_USE_OLD_IO_FILE && !defined _LIBC #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 26 "/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h" 3 4 # error "_IO_USE_OLD_IO_FILE should only be defined when building libc itself" #endif # 28 "/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined _IO_lock_t_defined && !defined _LIBC #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 30 "/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h" 3 4 # error "_IO_lock_t_defined should only be defined when building libc itself" #endif # 32 "/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h" 3 4 #if 0 /* expanded by -frewrite-includes */ #include <bits/types.h> #endif /* expanded by -frewrite-includes */ # 33 "/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h" 3 4 # 34 "/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h" 3 4 struct _IO_FILE; struct _IO_marker; struct _IO_codecvt; struct _IO_wide_data; /* During the build of glibc itself, _IO_lock_t will already have been defined by internal headers. */ #ifndef _IO_lock_t_defined typedef void _IO_lock_t; #endif # 45 "/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h" 3 4 /* The tag name of this struct is _IO_FILE to preserve historic C++ mangled names for functions taking FILE* arguments. That name should not be used in new code. */ struct _IO_FILE { int _flags; /* High-order word is _IO_MAGIC; rest is flags. */ /* The following pointers correspond to the C++ streambuf protocol. */ char *_IO_read_ptr; /* Current read pointer */ char *_IO_read_end; /* End of get area. */ char *_IO_read_base; /* Start of putback+get area. */ char *_IO_write_base; /* Start of put area. */ char *_IO_write_ptr; /* Current put pointer. */ char *_IO_write_end; /* End of put area. */ char *_IO_buf_base; /* Start of reserve area. */ char *_IO_buf_end; /* End of reserve area. */ /* The following fields are used to support backing up and undo. */ char *_IO_save_base; /* Pointer to start of non-current get area. */ char *_IO_backup_base; /* Pointer to first valid character of backup area */ char *_IO_save_end; /* Pointer to end of non-current get area. */ struct _IO_marker *_markers; struct _IO_FILE *_chain; int _fileno; int _flags2; __off_t _old_offset; /* This used to be _offset but it's too small. */ /* 1+column number of pbase(); 0 is unknown. */ unsigned short _cur_column; signed char _vtable_offset; char _shortbuf[1]; _IO_lock_t *_lock; #ifdef _IO_USE_OLD_IO_FILE }; struct _IO_FILE_complete { struct _IO_FILE _file; #endif # 89 "/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h" 3 4 __off64_t _offset; /* Wide character stream stuff. */ struct _IO_codecvt *_codecvt; struct _IO_wide_data *_wide_data; struct _IO_FILE *_freeres_list; void *_freeres_buf; size_t __pad5; int _mode; /* Make sure we don't get into trouble again. */ char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; }; /* These macros are used by bits/stdio.h and internal headers. */ #define __getc_unlocked_body(_fp) \ (__glibc_unlikely ((_fp)->_IO_read_ptr >= (_fp)->_IO_read_end) \ ? __uflow (_fp) : *(unsigned char *) (_fp)->_IO_read_ptr++) #define __putc_unlocked_body(_ch, _fp) \ (__glibc_unlikely ((_fp)->_IO_write_ptr >= (_fp)->_IO_write_end) \ ? __overflow (_fp, (unsigned char) (_ch)) \ : (unsigned char) (*(_fp)->_IO_write_ptr++ = (_ch))) #define _IO_EOF_SEEN 0x0010 #define __feof_unlocked_body(_fp) (((_fp)->_flags & _IO_EOF_SEEN) != 0) #define _IO_ERR_SEEN 0x0020 #define __ferror_unlocked_body(_fp) (((_fp)->_flags & _IO_ERR_SEEN) != 0) #define _IO_USER_LOCK 0x8000 /* Many more flag bits are defined internally. */ #endif # 121 "/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h" 3 4 # 44 "/usr/include/stdio.h" 2 3 4 #ifdef __USE_GNU #if 0 /* expanded by -frewrite-includes */ # include <bits/types/cookie_io_functions_t.h> #endif /* expanded by -frewrite-includes */ # 46 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h" 1 3 4 /* Copyright (C) 1991-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ #ifndef __cookie_io_functions_t_defined #define __cookie_io_functions_t_defined 1 #if 0 /* expanded by -frewrite-includes */ #include <bits/types.h> #endif /* expanded by -frewrite-includes */ # 21 "/usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h" 3 4 # 22 "/usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h" 3 4 /* Functions to do I/O and file management for a stream. */ /* Read NBYTES bytes from COOKIE into a buffer pointed to by BUF. Return number of bytes read. */ typedef __ssize_t cookie_read_function_t (void *__cookie, char *__buf, size_t __nbytes); /* Write NBYTES bytes pointed to by BUF to COOKIE. Write all NBYTES bytes unless there is an error. Return number of bytes written. If there is an error, return 0 and do not write anything. If the file has been opened for append (__mode.__append set), then set the file pointer to the end of the file and then do the write; if not, just write at the current file pointer. */ typedef __ssize_t cookie_write_function_t (void *__cookie, const char *__buf, size_t __nbytes); /* Move COOKIE's file position to *POS bytes from the beginning of the file (if W is SEEK_SET), the current position (if W is SEEK_CUR), or the end of the file (if W is SEEK_END). Set *POS to the new file position. Returns zero if successful, nonzero if not. */ typedef int cookie_seek_function_t (void *__cookie, __off64_t *__pos, int __w); /* Close COOKIE. */ typedef int cookie_close_function_t (void *__cookie); /* The structure with the cookie function pointers. The tag name of this struct is _IO_cookie_io_functions_t to preserve historic C++ mangled names for functions taking cookie_io_functions_t arguments. That name should not be used in new code. */ typedef struct _IO_cookie_io_functions_t { cookie_read_function_t *read; /* Read bytes. */ cookie_write_function_t *write; /* Write bytes. */ cookie_seek_function_t *seek; /* Seek/tell file position. */ cookie_close_function_t *close; /* Close file. */ } cookie_io_functions_t; #endif # 64 "/usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h" 3 4 # 47 "/usr/include/stdio.h" 2 3 4 #endif # 48 "/usr/include/stdio.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_XOPEN || defined __USE_XOPEN2K8 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 50 "/usr/include/stdio.h" 3 4 # ifdef __GNUC__ # ifndef _VA_LIST_DEFINED typedef __gnuc_va_list va_list; # define _VA_LIST_DEFINED # endif # 55 "/usr/include/stdio.h" 3 4 # else # 56 "/usr/include/stdio.h" 3 4 #if 0 /* expanded by -frewrite-includes */ # include <stdarg.h> #endif /* expanded by -frewrite-includes */ # 56 "/usr/include/stdio.h" 3 4 # 57 "/usr/include/stdio.h" 3 4 # endif # 58 "/usr/include/stdio.h" 3 4 #endif # 59 "/usr/include/stdio.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_UNIX98 || defined __USE_XOPEN2K #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 61 "/usr/include/stdio.h" 3 4 # ifndef __off_t_defined # ifndef __USE_FILE_OFFSET64 typedef __off_t off_t; # else # 65 "/usr/include/stdio.h" 3 4 typedef __off64_t off_t; # endif # 67 "/usr/include/stdio.h" 3 4 # define __off_t_defined # endif # 69 "/usr/include/stdio.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if defined __USE_LARGEFILE64 && !defined __off64_t_defined #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 70 "/usr/include/stdio.h" 3 4 typedef __off64_t off64_t; # define __off64_t_defined # endif # 73 "/usr/include/stdio.h" 3 4 #endif # 74 "/usr/include/stdio.h" 3 4 #ifdef __USE_XOPEN2K8 # ifndef __ssize_t_defined typedef __ssize_t ssize_t; # define __ssize_t_defined # endif # 80 "/usr/include/stdio.h" 3 4 #endif # 81 "/usr/include/stdio.h" 3 4 /* The type of the second argument to `fgetpos' and `fsetpos'. */ #ifndef __USE_FILE_OFFSET64 typedef __fpos_t fpos_t; #else # 86 "/usr/include/stdio.h" 3 4 typedef __fpos64_t fpos_t; #endif # 88 "/usr/include/stdio.h" 3 4 #ifdef __USE_LARGEFILE64 typedef __fpos64_t fpos64_t; #endif # 91 "/usr/include/stdio.h" 3 4 /* The possibilities for the third argument to `setvbuf'. */ #define _IOFBF 0 /* Fully buffered. */ #define _IOLBF 1 /* Line buffered. */ #define _IONBF 2 /* No buffering. */ /* Default buffer size. */ #define BUFSIZ 8192 /* The value returned by fgetc and similar functions to indicate the end of the file. */ #define EOF (-1) /* The possibilities for the third argument to `fseek'. These values should not be changed. */ #define SEEK_SET 0 /* Seek from beginning of file. */ #define SEEK_CUR 1 /* Seek from current position. */ #define SEEK_END 2 /* Seek from end of file. */ #ifdef __USE_GNU # define SEEK_DATA 3 /* Seek to next data. */ # define SEEK_HOLE 4 /* Seek to next hole. */ #endif # 116 "/usr/include/stdio.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_MISC || defined __USE_XOPEN #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 119 "/usr/include/stdio.h" 3 4 /* Default path prefix for `tempnam' and `tmpnam'. */ # define P_tmpdir "/tmp" #endif # 122 "/usr/include/stdio.h" 3 4 /* Get the values: L_tmpnam How long an array of chars must be to be passed to `tmpnam'. TMP_MAX The minimum number of unique filenames generated by tmpnam (and tempnam when it uses tmpnam's name space), or tempnam (the two are separate). L_ctermid How long an array to pass to `ctermid'. L_cuserid How long an array to pass to `cuserid'. FOPEN_MAX Minimum number of files that can be open at once. FILENAME_MAX Maximum length of a filename. */ #if 0 /* expanded by -frewrite-includes */ #include <bits/stdio_lim.h> #endif /* expanded by -frewrite-includes */ # 133 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/stdio_lim.h" 1 3 4 /* Copyright (C) 1994-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ #ifndef _BITS_STDIO_LIM_H #define _BITS_STDIO_LIM_H 1 #ifndef _STDIO_H # error "Never include <bits/stdio_lim.h> directly; use <stdio.h> instead." #endif # 24 "/usr/include/x86_64-linux-gnu/bits/stdio_lim.h" 3 4 #define L_tmpnam 20 #define TMP_MAX 238328 #define FILENAME_MAX 4096 #ifdef __USE_POSIX # define L_ctermid 9 #if 0 /* disabled by -frewrite-includes */ # if !defined __USE_XOPEN2K || defined __USE_GNU #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 32 "/usr/include/x86_64-linux-gnu/bits/stdio_lim.h" 3 4 # define L_cuserid 9 # endif # 34 "/usr/include/x86_64-linux-gnu/bits/stdio_lim.h" 3 4 #endif # 35 "/usr/include/x86_64-linux-gnu/bits/stdio_lim.h" 3 4 #undef FOPEN_MAX #define FOPEN_MAX 16 #endif /* bits/stdio_lim.h */ # 40 "/usr/include/x86_64-linux-gnu/bits/stdio_lim.h" 3 4 # 134 "/usr/include/stdio.h" 2 3 4 /* Standard streams. */ extern FILE *stdin; /* Standard input stream. */ extern FILE *stdout; /* Standard output stream. */ extern FILE *stderr; /* Standard error output stream. */ /* C89/C99 say they're macros. Make them happy. */ #define stdin stdin #define stdout stdout #define stderr stderr /* Remove file FILENAME. */ extern int remove (const char *__filename) __THROW; /* Rename file OLD to NEW. */ extern int rename (const char *__old, const char *__new) __THROW; #ifdef __USE_ATFILE /* Rename file OLD relative to OLDFD to NEW relative to NEWFD. */ extern int renameat (int __oldfd, const char *__old, int __newfd, const char *__new) __THROW; #endif # 155 "/usr/include/stdio.h" 3 4 #ifdef __USE_GNU /* Flags for renameat2. */ # define RENAME_NOREPLACE (1 << 0) # define RENAME_EXCHANGE (1 << 1) # define RENAME_WHITEOUT (1 << 2) /* Rename file OLD relative to OLDFD to NEW relative to NEWFD, with additional flags. */ extern int renameat2 (int __oldfd, const char *__old, int __newfd, const char *__new, unsigned int __flags) __THROW; #endif # 167 "/usr/include/stdio.h" 3 4 /* Create a temporary file and open it read/write. This function is a possible cancellation point and therefore not marked with __THROW. */ #ifndef __USE_FILE_OFFSET64 extern FILE *tmpfile (void) __wur; #else # 175 "/usr/include/stdio.h" 3 4 # ifdef __REDIRECT extern FILE *__REDIRECT (tmpfile, (void), tmpfile64) __wur; # else # 178 "/usr/include/stdio.h" 3 4 # define tmpfile tmpfile64 # endif # 180 "/usr/include/stdio.h" 3 4 #endif # 181 "/usr/include/stdio.h" 3 4 #ifdef __USE_LARGEFILE64 extern FILE *tmpfile64 (void) __wur; #endif # 185 "/usr/include/stdio.h" 3 4 /* Generate a temporary filename. */ extern char *tmpnam (char *__s) __THROW __wur; #ifdef __USE_MISC /* This is the reentrant variant of `tmpnam'. The only difference is that it does not allow S to be NULL. */ extern char *tmpnam_r (char *__s) __THROW __wur; #endif # 194 "/usr/include/stdio.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_MISC || defined __USE_XOPEN #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 197 "/usr/include/stdio.h" 3 4 /* Generate a unique temporary filename using up to five characters of PFX if it is not NULL. The directory to put this file in is searched for as follows: First the environment variable "TMPDIR" is checked. If it contains the name of a writable directory, that directory is used. If not and if DIR is not NULL, that value is checked. If that fails, P_tmpdir is tried and finally "/tmp". The storage for the filename is allocated by `malloc'. */ extern char *tempnam (const char *__dir, const char *__pfx) __THROW __attribute_malloc__ __wur; #endif # 207 "/usr/include/stdio.h" 3 4 /* Close STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fclose (FILE *__stream); /* Flush STREAM, or all streams if STREAM is NULL. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fflush (FILE *__stream); #ifdef __USE_MISC /* Faster versions when locking is not required. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int fflush_unlocked (FILE *__stream); #endif # 229 "/usr/include/stdio.h" 3 4 #ifdef __USE_GNU /* Close all streams. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int fcloseall (void); #endif # 239 "/usr/include/stdio.h" 3 4 #ifndef __USE_FILE_OFFSET64 /* Open a file and create a new stream for it. This function is a possible cancellation point and therefore not marked with __THROW. */ extern FILE *fopen (const char *__restrict __filename, const char *__restrict __modes) __wur; /* Open a file, replacing an existing stream with it. This function is a possible cancellation point and therefore not marked with __THROW. */ extern FILE *freopen (const char *__restrict __filename, const char *__restrict __modes, FILE *__restrict __stream) __wur; #else # 256 "/usr/include/stdio.h" 3 4 # ifdef __REDIRECT extern FILE *__REDIRECT (fopen, (const char *__restrict __filename, const char *__restrict __modes), fopen64) __wur; extern FILE *__REDIRECT (freopen, (const char *__restrict __filename, const char *__restrict __modes, FILE *__restrict __stream), freopen64) __wur; # else # 265 "/usr/include/stdio.h" 3 4 # define fopen fopen64 # define freopen freopen64 # endif # 268 "/usr/include/stdio.h" 3 4 #endif # 269 "/usr/include/stdio.h" 3 4 #ifdef __USE_LARGEFILE64 extern FILE *fopen64 (const char *__restrict __filename, const char *__restrict __modes) __wur; extern FILE *freopen64 (const char *__restrict __filename, const char *__restrict __modes, FILE *__restrict __stream) __wur; #endif # 276 "/usr/include/stdio.h" 3 4 #ifdef __USE_POSIX /* Create a new stream that refers to an existing system file descriptor. */ extern FILE *fdopen (int __fd, const char *__modes) __THROW __wur; #endif # 281 "/usr/include/stdio.h" 3 4 #ifdef __USE_GNU /* Create a new stream that refers to the given magic cookie, and uses the given functions for input and output. */ extern FILE *fopencookie (void *__restrict __magic_cookie, const char *__restrict __modes, cookie_io_functions_t __io_funcs) __THROW __wur; #endif # 289 "/usr/include/stdio.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_XOPEN2K8 || __GLIBC_USE (LIB_EXT2) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 291 "/usr/include/stdio.h" 3 4 /* Create a new stream that refers to a memory buffer. */ extern FILE *fmemopen (void *__s, size_t __len, const char *__modes) __THROW __wur; /* Open a stream that writes into a malloc'd buffer that is expanded as necessary. *BUFLOC and *SIZELOC are updated with the buffer's location and the number of characters written on fflush or fclose. */ extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __THROW __wur; #endif # 300 "/usr/include/stdio.h" 3 4 /* If BUF is NULL, make STREAM unbuffered. Else make it use buffer BUF, of size BUFSIZ. */ extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __THROW; /* Make STREAM use buffering mode MODE. If BUF is not NULL, use N bytes of it for buffering; else allocate an internal buffer N bytes long. */ extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, int __modes, size_t __n) __THROW; #ifdef __USE_MISC /* If BUF is NULL, make STREAM unbuffered. Else make it use SIZE bytes of BUF for buffering. */ extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, size_t __size) __THROW; /* Make STREAM line-buffered. */ extern void setlinebuf (FILE *__stream) __THROW; #endif # 320 "/usr/include/stdio.h" 3 4 /* Write formatted output to STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fprintf (FILE *__restrict __stream, const char *__restrict __format, ...); /* Write formatted output to stdout. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int printf (const char *__restrict __format, ...); /* Write formatted output to S. */ extern int sprintf (char *__restrict __s, const char *__restrict __format, ...) __THROWNL; /* Write formatted output to S from argument list ARG. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int vfprintf (FILE *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg); /* Write formatted output to stdout from argument list ARG. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int vprintf (const char *__restrict __format, __gnuc_va_list __arg); /* Write formatted output to S from argument list ARG. */ extern int vsprintf (char *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __THROWNL; #if 0 /* disabled by -frewrite-includes */ #if defined __USE_ISOC99 || defined __USE_UNIX98 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 353 "/usr/include/stdio.h" 3 4 /* Maximum chars of output to write in MAXLEN. */ extern int snprintf (char *__restrict __s, size_t __maxlen, const char *__restrict __format, ...) __THROWNL __attribute__ ((__format__ (__printf__, 3, 4))); extern int vsnprintf (char *__restrict __s, size_t __maxlen, const char *__restrict __format, __gnuc_va_list __arg) __THROWNL __attribute__ ((__format__ (__printf__, 3, 0))); #endif # 362 "/usr/include/stdio.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __GLIBC_USE (LIB_EXT2) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 364 "/usr/include/stdio.h" 3 4 /* Write formatted output to a string dynamically allocated with `malloc'. Store the address of the string in *PTR. */ extern int vasprintf (char **__restrict __ptr, const char *__restrict __f, __gnuc_va_list __arg) __THROWNL __attribute__ ((__format__ (__printf__, 2, 0))) __wur; extern int __asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...) __THROWNL __attribute__ ((__format__ (__printf__, 2, 3))) __wur; extern int asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...) __THROWNL __attribute__ ((__format__ (__printf__, 2, 3))) __wur; #endif # 376 "/usr/include/stdio.h" 3 4 #ifdef __USE_XOPEN2K8 /* Write formatted output to a file descriptor. */ extern int vdprintf (int __fd, const char *__restrict __fmt, __gnuc_va_list __arg) __attribute__ ((__format__ (__printf__, 2, 0))); extern int dprintf (int __fd, const char *__restrict __fmt, ...) __attribute__ ((__format__ (__printf__, 2, 3))); #endif # 385 "/usr/include/stdio.h" 3 4 /* Read formatted input from STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fscanf (FILE *__restrict __stream, const char *__restrict __format, ...) __wur; /* Read formatted input from stdin. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int scanf (const char *__restrict __format, ...) __wur; /* Read formatted input from S. */ extern int sscanf (const char *__restrict __s, const char *__restrict __format, ...) __THROW; /* For historical reasons, the C99-compliant versions of the scanf functions are at alternative names. When __LDBL_COMPAT is in effect, this is handled in bits/stdio-ldbl.h. */ #if 0 /* disabled by -frewrite-includes */ #if !__GLIBC_USE (DEPRECATED_SCANF) && !defined __LDBL_COMPAT #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 406 "/usr/include/stdio.h" 3 4 # ifdef __REDIRECT extern int __REDIRECT (fscanf, (FILE *__restrict __stream, const char *__restrict __format, ...), __isoc99_fscanf) __wur; extern int __REDIRECT (scanf, (const char *__restrict __format, ...), __isoc99_scanf) __wur; extern int __REDIRECT_NTH (sscanf, (const char *__restrict __s, const char *__restrict __format, ...), __isoc99_sscanf); # else # 416 "/usr/include/stdio.h" 3 4 extern int __isoc99_fscanf (FILE *__restrict __stream, const char *__restrict __format, ...) __wur; extern int __isoc99_scanf (const char *__restrict __format, ...) __wur; extern int __isoc99_sscanf (const char *__restrict __s, const char *__restrict __format, ...) __THROW; # define fscanf __isoc99_fscanf # define scanf __isoc99_scanf # define sscanf __isoc99_sscanf # endif # 425 "/usr/include/stdio.h" 3 4 #endif # 426 "/usr/include/stdio.h" 3 4 #ifdef __USE_ISOC99 /* Read formatted input from S into argument list ARG. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int vfscanf (FILE *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__format__ (__scanf__, 2, 0))) __wur; /* Read formatted input from stdin into argument list ARG. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__format__ (__scanf__, 1, 0))) __wur; /* Read formatted input from S into argument list ARG. */ extern int vsscanf (const char *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __THROW __attribute__ ((__format__ (__scanf__, 2, 0))); /* Same redirection as above for the v*scanf family. */ #if 0 /* disabled by -frewrite-includes */ # if !__GLIBC_USE (DEPRECATED_SCANF) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 450 "/usr/include/stdio.h" 3 4 #if 0 /* disabled by -frewrite-includes */ # if defined __REDIRECT && !defined __LDBL_COMPAT #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 451 "/usr/include/stdio.h" 3 4 extern int __REDIRECT (vfscanf, (FILE *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg), __isoc99_vfscanf) __attribute__ ((__format__ (__scanf__, 2, 0))) __wur; extern int __REDIRECT (vscanf, (const char *__restrict __format, __gnuc_va_list __arg), __isoc99_vscanf) __attribute__ ((__format__ (__scanf__, 1, 0))) __wur; extern int __REDIRECT_NTH (vsscanf, (const char *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg), __isoc99_vsscanf) __attribute__ ((__format__ (__scanf__, 2, 0))); #if 0 /* disabled by -frewrite-includes */ #if 0 # elif !defined __REDIRECT #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 465 "/usr/include/stdio.h" 3 4 extern int __isoc99_vfscanf (FILE *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __wur; extern int __isoc99_vscanf (const char *__restrict __format, __gnuc_va_list __arg) __wur; extern int __isoc99_vsscanf (const char *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __THROW; # define vfscanf __isoc99_vfscanf # define vscanf __isoc99_vscanf # define vsscanf __isoc99_vsscanf # endif # 477 "/usr/include/stdio.h" 3 4 # endif # 478 "/usr/include/stdio.h" 3 4 #endif /* Use ISO C9x. */ # 479 "/usr/include/stdio.h" 3 4 /* Read a character from STREAM. These functions are possible cancellation points and therefore not marked with __THROW. */ extern int fgetc (FILE *__stream); extern int getc (FILE *__stream); /* Read a character from stdin. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int getchar (void); #ifdef __USE_POSIX199506 /* These are defined in POSIX.1:1996. These functions are possible cancellation points and therefore not marked with __THROW. */ extern int getc_unlocked (FILE *__stream); extern int getchar_unlocked (void); #endif /* Use POSIX. */ # 502 "/usr/include/stdio.h" 3 4 #ifdef __USE_MISC /* Faster version when locking is not necessary. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int fgetc_unlocked (FILE *__stream); #endif /* Use MISC. */ # 512 "/usr/include/stdio.h" 3 4 /* Write a character to STREAM. These functions are possible cancellation points and therefore not marked with __THROW. These functions is a possible cancellation point and therefore not marked with __THROW. */ extern int fputc (int __c, FILE *__stream); extern int putc (int __c, FILE *__stream); /* Write a character to stdout. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int putchar (int __c); #ifdef __USE_MISC /* Faster version when locking is not necessary. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int fputc_unlocked (int __c, FILE *__stream); #endif /* Use MISC. */ # 539 "/usr/include/stdio.h" 3 4 #ifdef __USE_POSIX199506 /* These are defined in POSIX.1:1996. These functions are possible cancellation points and therefore not marked with __THROW. */ extern int putc_unlocked (int __c, FILE *__stream); extern int putchar_unlocked (int __c); #endif /* Use POSIX. */ # 548 "/usr/include/stdio.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_MISC \ || (defined __USE_XOPEN && !defined __USE_XOPEN2K) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 552 "/usr/include/stdio.h" 3 4 /* Get a word (int) from STREAM. */ extern int getw (FILE *__stream); /* Write a word (int) to STREAM. */ extern int putw (int __w, FILE *__stream); #endif # 558 "/usr/include/stdio.h" 3 4 /* Get a newline-terminated string of finite length from STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) __wur; #if 0 /* disabled by -frewrite-includes */ #if __GLIBC_USE (DEPRECATED_GETS) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 568 "/usr/include/stdio.h" 3 4 /* Get a newline-terminated string from stdin, removing the newline. This function is impossible to use safely. It has been officially removed from ISO C11 and ISO C++14, and we have also removed it from the _GNU_SOURCE feature list. It remains available when explicitly using an old ISO C, Unix, or POSIX standard. This function is a possible cancellation point and therefore not marked with __THROW. */ extern char *gets (char *__s) __wur __attribute_deprecated__; #endif # 579 "/usr/include/stdio.h" 3 4 #ifdef __USE_GNU /* This function does the same as `fgets' but does not lock the stream. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern char *fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream) __wur; #endif # 590 "/usr/include/stdio.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_XOPEN2K8 || __GLIBC_USE (LIB_EXT2) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 593 "/usr/include/stdio.h" 3 4 /* Read up to (and including) a DELIMITER from STREAM into *LINEPTR (and null-terminate it). *LINEPTR is a pointer returned from malloc (or NULL), pointing to *N characters of space. It is realloc'd as necessary. Returns the number of characters read (not including the null terminator), or -1 on error or EOF. These functions are not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation they are cancellation points and therefore not marked with __THROW. */ extern __ssize_t __getdelim (char **__restrict __lineptr, size_t *__restrict __n, int __delimiter, FILE *__restrict __stream) __wur; extern __ssize_t getdelim (char **__restrict __lineptr, size_t *__restrict __n, int __delimiter, FILE *__restrict __stream) __wur; /* Like `getdelim', but reads up to a newline. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern __ssize_t getline (char **__restrict __lineptr, size_t *__restrict __n, FILE *__restrict __stream) __wur; #endif # 620 "/usr/include/stdio.h" 3 4 /* Write a string to STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fputs (const char *__restrict __s, FILE *__restrict __stream); /* Write a string, followed by a newline, to stdout. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int puts (const char *__s); /* Push a character back onto the input buffer of STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int ungetc (int __c, FILE *__stream); /* Read chunks of generic data from STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern size_t fread (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __wur; /* Write chunks of generic data to STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern size_t fwrite (const void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __s); #ifdef __USE_GNU /* This function does the same as `fputs' but does not lock the stream. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int fputs_unlocked (const char *__restrict __s, FILE *__restrict __stream); #endif # 665 "/usr/include/stdio.h" 3 4 #ifdef __USE_MISC /* Faster versions when locking is not necessary. These functions are not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation they are cancellation points and therefore not marked with __THROW. */ extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __wur; extern size_t fwrite_unlocked (const void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream); #endif # 678 "/usr/include/stdio.h" 3 4 /* Seek to a certain position on STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fseek (FILE *__stream, long int __off, int __whence); /* Return the current position of STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern long int ftell (FILE *__stream) __wur; /* Rewind to the beginning of STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern void rewind (FILE *__stream); /* The Single Unix Specification, Version 2, specifies an alternative, more adequate interface for the two functions above which deal with file offset. `long int' is not the right type. These definitions are originally defined in the Large File Support API. */ #if 0 /* disabled by -frewrite-includes */ #if defined __USE_LARGEFILE || defined __USE_XOPEN2K #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 702 "/usr/include/stdio.h" 3 4 # ifndef __USE_FILE_OFFSET64 /* Seek to a certain position on STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fseeko (FILE *__stream, __off_t __off, int __whence); /* Return the current position of STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern __off_t ftello (FILE *__stream) __wur; # else # 714 "/usr/include/stdio.h" 3 4 # ifdef __REDIRECT extern int __REDIRECT (fseeko, (FILE *__stream, __off64_t __off, int __whence), fseeko64); extern __off64_t __REDIRECT (ftello, (FILE *__stream), ftello64); # else # 720 "/usr/include/stdio.h" 3 4 # define fseeko fseeko64 # define ftello ftello64 # endif # 723 "/usr/include/stdio.h" 3 4 # endif # 724 "/usr/include/stdio.h" 3 4 #endif # 725 "/usr/include/stdio.h" 3 4 #ifndef __USE_FILE_OFFSET64 /* Get STREAM's position. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos); /* Set STREAM's position. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fsetpos (FILE *__stream, const fpos_t *__pos); #else # 738 "/usr/include/stdio.h" 3 4 # ifdef __REDIRECT extern int __REDIRECT (fgetpos, (FILE *__restrict __stream, fpos_t *__restrict __pos), fgetpos64); extern int __REDIRECT (fsetpos, (FILE *__stream, const fpos_t *__pos), fsetpos64); # else # 744 "/usr/include/stdio.h" 3 4 # define fgetpos fgetpos64 # define fsetpos fsetpos64 # endif # 747 "/usr/include/stdio.h" 3 4 #endif # 748 "/usr/include/stdio.h" 3 4 #ifdef __USE_LARGEFILE64 extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence); extern __off64_t ftello64 (FILE *__stream) __wur; extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos); extern int fsetpos64 (FILE *__stream, const fpos64_t *__pos); #endif # 755 "/usr/include/stdio.h" 3 4 /* Clear the error and EOF indicators for STREAM. */ extern void clearerr (FILE *__stream) __THROW; /* Return the EOF indicator for STREAM. */ extern int feof (FILE *__stream) __THROW __wur; /* Return the error indicator for STREAM. */ extern int ferror (FILE *__stream) __THROW __wur; #ifdef __USE_MISC /* Faster versions when locking is not required. */ extern void clearerr_unlocked (FILE *__stream) __THROW; extern int feof_unlocked (FILE *__stream) __THROW __wur; extern int ferror_unlocked (FILE *__stream) __THROW __wur; #endif # 769 "/usr/include/stdio.h" 3 4 /* Print a message describing the meaning of the value of errno. This function is a possible cancellation point and therefore not marked with __THROW. */ extern void perror (const char *__s); /* Provide the declarations for `sys_errlist' and `sys_nerr' if they are available on this system. Even if available, these variables should not be used directly. The `strerror' function provides all the necessary functionality. */ #if 0 /* expanded by -frewrite-includes */ #include <bits/sys_errlist.h> #endif /* expanded by -frewrite-includes */ # 781 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/sys_errlist.h" 1 3 4 /* Declare sys_errlist and sys_nerr, or don't. Compatibility (do) version. Copyright (C) 2002-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ #ifndef _STDIO_H # error "Never include <bits/sys_errlist.h> directly; use <stdio.h> instead." #endif # 22 "/usr/include/x86_64-linux-gnu/bits/sys_errlist.h" 3 4 /* sys_errlist and sys_nerr are deprecated. Use strerror instead. */ #ifdef __USE_MISC extern int sys_nerr; extern const char *const sys_errlist[]; #endif # 29 "/usr/include/x86_64-linux-gnu/bits/sys_errlist.h" 3 4 #ifdef __USE_GNU extern int _sys_nerr; extern const char *const _sys_errlist[]; #endif # 33 "/usr/include/x86_64-linux-gnu/bits/sys_errlist.h" 3 4 # 782 "/usr/include/stdio.h" 2 3 4 #ifdef __USE_POSIX /* Return the system file descriptor for STREAM. */ extern int fileno (FILE *__stream) __THROW __wur; #endif /* Use POSIX. */ # 788 "/usr/include/stdio.h" 3 4 #ifdef __USE_MISC /* Faster version when locking is not required. */ extern int fileno_unlocked (FILE *__stream) __THROW __wur; #endif # 793 "/usr/include/stdio.h" 3 4 #ifdef __USE_POSIX2 /* Create a new stream connected to a pipe running the given command. This function is a possible cancellation point and therefore not marked with __THROW. */ extern FILE *popen (const char *__command, const char *__modes) __wur; /* Close a stream opened by popen and return the status of its child. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int pclose (FILE *__stream); #endif # 808 "/usr/include/stdio.h" 3 4 #ifdef __USE_POSIX /* Return the name of the controlling terminal. */ extern char *ctermid (char *__s) __THROW; #endif /* Use POSIX. */ # 814 "/usr/include/stdio.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if (defined __USE_XOPEN && !defined __USE_XOPEN2K) || defined __USE_GNU #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 817 "/usr/include/stdio.h" 3 4 /* Return the name of the current user. */ extern char *cuserid (char *__s); #endif /* Use X/Open, but not issue 6. */ # 820 "/usr/include/stdio.h" 3 4 #ifdef __USE_GNU struct obstack; /* See <obstack.h>. */ /* Write formatted output to an obstack. */ extern int obstack_printf (struct obstack *__restrict __obstack, const char *__restrict __format, ...) __THROWNL __attribute__ ((__format__ (__printf__, 2, 3))); extern int obstack_vprintf (struct obstack *__restrict __obstack, const char *__restrict __format, __gnuc_va_list __args) __THROWNL __attribute__ ((__format__ (__printf__, 2, 0))); #endif /* Use GNU. */ # 834 "/usr/include/stdio.h" 3 4 #ifdef __USE_POSIX199506 /* These are defined in POSIX.1:1996. */ /* Acquire ownership of STREAM. */ extern void flockfile (FILE *__stream) __THROW; /* Try to acquire ownership of STREAM but do not block if it is not possible. */ extern int ftrylockfile (FILE *__stream) __THROW __wur; /* Relinquish the ownership granted for STREAM. */ extern void funlockfile (FILE *__stream) __THROW; #endif /* POSIX */ # 849 "/usr/include/stdio.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if defined __USE_XOPEN && !defined __USE_XOPEN2K && !defined __USE_GNU #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 851 "/usr/include/stdio.h" 3 4 /* X/Open Issues 1-5 required getopt to be declared in this header. It was removed in Issue 6. GNU follows Issue 6. */ #if 0 /* expanded by -frewrite-includes */ # include <bits/getopt_posix.h> #endif /* expanded by -frewrite-includes */ # 853 "/usr/include/stdio.h" 3 4 # 854 "/usr/include/stdio.h" 3 4 #endif # 855 "/usr/include/stdio.h" 3 4 /* Slow-path routines used by the optimized inline functions in bits/stdio.h. */ extern int __uflow (FILE *); extern int __overflow (FILE *, int); /* If we are compiling with optimizing read this file. It contains several optimizing inline functions and macros. */ #ifdef __USE_EXTERN_INLINES #if 0 /* expanded by -frewrite-includes */ # include <bits/stdio.h> #endif /* expanded by -frewrite-includes */ # 864 "/usr/include/stdio.h" 3 4 # 865 "/usr/include/stdio.h" 3 4 #endif # 866 "/usr/include/stdio.h" 3 4 #if 0 /* disabled by -frewrite-includes */ #if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 867 "/usr/include/stdio.h" 3 4 #if 0 /* expanded by -frewrite-includes */ # include <bits/stdio2.h> #endif /* expanded by -frewrite-includes */ # 867 "/usr/include/stdio.h" 3 4 # 868 "/usr/include/stdio.h" 3 4 #endif # 869 "/usr/include/stdio.h" 3 4 #ifdef __LDBL_COMPAT #if 0 /* expanded by -frewrite-includes */ # include <bits/stdio-ldbl.h> #endif /* expanded by -frewrite-includes */ # 870 "/usr/include/stdio.h" 3 4 # 871 "/usr/include/stdio.h" 3 4 #endif # 872 "/usr/include/stdio.h" 3 4 __END_DECLS #endif /* <stdio.h> included. */ # 876 "/usr/include/stdio.h" 3 4 # 43 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdio" 2 3 #ifndef _GLIBCXX_CSTDIO #define _GLIBCXX_CSTDIO 1 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus <= 201103L && !defined(_GLIBCXX_HAVE_GETS) #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 48 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdio" 3 extern "C" char* gets (char* __s) __attribute__((__deprecated__)); #endif # 50 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdio" 3 // Get rid of those macros defined in <stdio.h> in lieu of real functions. #undef clearerr #undef fclose #undef feof #undef ferror #undef fflush #undef fgetc #undef fgetpos #undef fgets #undef fopen #undef fprintf #undef fputc #undef fputs #undef fread #undef freopen #undef fscanf #undef fseek #undef fsetpos #undef ftell #undef fwrite #undef getc #undef getchar #if 0 /* disabled by -frewrite-includes */ #if __cplusplus <= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 74 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdio" 3 # undef gets #endif # 76 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdio" 3 #undef perror #undef printf #undef putc #undef putchar #undef puts #undef remove #undef rename #undef rewind #undef scanf #undef setbuf #undef setvbuf #undef sprintf #undef sscanf #undef tmpfile #undef tmpnam #undef ungetc #undef vfprintf #undef vprintf #undef vsprintf namespace std { using ::FILE; using ::fpos_t; using ::clearerr; using ::fclose; using ::feof; using ::ferror; using ::fflush; using ::fgetc; using ::fgetpos; using ::fgets; using ::fopen; using ::fprintf; using ::fputc; using ::fputs; using ::fread; using ::freopen; using ::fscanf; using ::fseek; using ::fsetpos; using ::ftell; using ::fwrite; using ::getc; using ::getchar; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus <= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 123 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdio" 3 // LWG 2249 using ::gets; #endif # 126 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdio" 3 using ::perror; using ::printf; using ::putc; using ::putchar; using ::puts; using ::remove; using ::rename; using ::rewind; using ::scanf; using ::setbuf; using ::setvbuf; using ::sprintf; using ::sscanf; using ::tmpfile; #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_USE_TMPNAM #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 141 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdio" 3 using ::tmpnam; #endif # 143 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdio" 3 using ::ungetc; using ::vfprintf; using ::vprintf; using ::vsprintf; } // namespace #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_USE_C99_STDIO #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 150 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdio" 3 #undef snprintf #undef vfscanf #undef vscanf #undef vsnprintf #undef vsscanf namespace __gnu_cxx { #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 160 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdio" 3 extern "C" int (snprintf)(char * __restrict, std::size_t, const char * __restrict, ...) throw (); extern "C" int (vfscanf)(FILE * __restrict, const char * __restrict, __gnuc_va_list); extern "C" int (vscanf)(const char * __restrict, __gnuc_va_list); extern "C" int (vsnprintf)(char * __restrict, std::size_t, const char * __restrict, __gnuc_va_list) throw (); extern "C" int (vsscanf)(const char * __restrict, const char * __restrict, __gnuc_va_list) throw (); #endif # 173 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdio" 3 #if 0 /* disabled by -frewrite-includes */ #if !_GLIBCXX_USE_C99_DYNAMIC #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 175 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdio" 3 using ::snprintf; using ::vfscanf; using ::vscanf; using ::vsnprintf; using ::vsscanf; #endif # 181 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdio" 3 } // namespace __gnu_cxx namespace std { using ::__gnu_cxx::snprintf; using ::__gnu_cxx::vfscanf; using ::__gnu_cxx::vscanf; using ::__gnu_cxx::vsnprintf; using ::__gnu_cxx::vsscanf; } // namespace std #endif // _GLIBCXX_USE_C99_STDIO # 193 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdio" 3 #endif # 195 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdio" 3 # 44 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/string_conversions.h" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <cerrno> #endif /* expanded by -frewrite-includes */ # 44 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/string_conversions.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cerrno" 1 3 // The -*- C++ -*- forwarding header. // Copyright (C) 1997-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file cerrno * This is a Standard C++ Library file. You should @c \#include this file * in your programs, rather than any of the @a *.h implementation files. * * This is the C++ version of the Standard C Library header @c errno.h, * and its contents are (mostly) the same as that header, but are all * contained in the namespace @c std (except for names which are defined * as macros in C). */ // // ISO C++ 14882: 19.3 Error numbers // #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 40 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cerrno" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/c++config.h> #endif /* expanded by -frewrite-includes */ # 41 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cerrno" 3 # 42 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cerrno" 3 #if 0 /* expanded by -frewrite-includes */ #include <errno.h> #endif /* expanded by -frewrite-includes */ # 42 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cerrno" 3 # 1 "/usr/include/errno.h" 1 3 4 /* Copyright (C) 1991-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ /* * ISO C99 Standard: 7.5 Errors <errno.h> */ #ifndef _ERRNO_H #define _ERRNO_H 1 #if 0 /* expanded by -frewrite-includes */ #include <features.h> #endif /* expanded by -frewrite-includes */ # 25 "/usr/include/errno.h" 3 4 # 26 "/usr/include/errno.h" 3 4 /* The system-specific definitions of the E* constants, as macros. */ #if 0 /* expanded by -frewrite-includes */ #include <bits/errno.h> #endif /* expanded by -frewrite-includes */ # 28 "/usr/include/errno.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/errno.h" 1 3 4 /* Error constants. Linux specific version. Copyright (C) 1996-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ #ifndef _BITS_ERRNO_H #define _BITS_ERRNO_H 1 #if 0 /* disabled by -frewrite-includes */ #if !defined _ERRNO_H #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 23 "/usr/include/x86_64-linux-gnu/bits/errno.h" 3 4 # error "Never include <bits/errno.h> directly; use <errno.h> instead." #endif # 25 "/usr/include/x86_64-linux-gnu/bits/errno.h" 3 4 #if 0 /* expanded by -frewrite-includes */ # include <linux/errno.h> #endif /* expanded by -frewrite-includes */ # 26 "/usr/include/x86_64-linux-gnu/bits/errno.h" 3 4 # 1 "/usr/include/linux/errno.h" 1 3 4 #if 0 /* expanded by -frewrite-includes */ #include <asm/errno.h> #endif /* expanded by -frewrite-includes */ # 1 "/usr/include/linux/errno.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/asm/errno.h" 1 3 4 #if 0 /* expanded by -frewrite-includes */ #include <asm-generic/errno.h> #endif /* expanded by -frewrite-includes */ # 1 "/usr/include/x86_64-linux-gnu/asm/errno.h" 3 4 # 1 "/usr/include/asm-generic/errno.h" 1 3 4 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _ASM_GENERIC_ERRNO_H #define _ASM_GENERIC_ERRNO_H #if 0 /* expanded by -frewrite-includes */ #include <asm-generic/errno-base.h> #endif /* expanded by -frewrite-includes */ # 5 "/usr/include/asm-generic/errno.h" 3 4 # 1 "/usr/include/asm-generic/errno-base.h" 1 3 4 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _ASM_GENERIC_ERRNO_BASE_H #define _ASM_GENERIC_ERRNO_BASE_H #define EPERM 1 /* Operation not permitted */ #define ENOENT 2 /* No such file or directory */ #define ESRCH 3 /* No such process */ #define EINTR 4 /* Interrupted system call */ #define EIO 5 /* I/O error */ #define ENXIO 6 /* No such device or address */ #define E2BIG 7 /* Argument list too long */ #define ENOEXEC 8 /* Exec format error */ #define EBADF 9 /* Bad file number */ #define ECHILD 10 /* No child processes */ #define EAGAIN 11 /* Try again */ #define ENOMEM 12 /* Out of memory */ #define EACCES 13 /* Permission denied */ #define EFAULT 14 /* Bad address */ #define ENOTBLK 15 /* Block device required */ #define EBUSY 16 /* Device or resource busy */ #define EEXIST 17 /* File exists */ #define EXDEV 18 /* Cross-device link */ #define ENODEV 19 /* No such device */ #define ENOTDIR 20 /* Not a directory */ #define EISDIR 21 /* Is a directory */ #define EINVAL 22 /* Invalid argument */ #define ENFILE 23 /* File table overflow */ #define EMFILE 24 /* Too many open files */ #define ENOTTY 25 /* Not a typewriter */ #define ETXTBSY 26 /* Text file busy */ #define EFBIG 27 /* File too large */ #define ENOSPC 28 /* No space left on device */ #define ESPIPE 29 /* Illegal seek */ #define EROFS 30 /* Read-only file system */ #define EMLINK 31 /* Too many links */ #define EPIPE 32 /* Broken pipe */ #define EDOM 33 /* Math argument out of domain of func */ #define ERANGE 34 /* Math result not representable */ #endif # 41 "/usr/include/asm-generic/errno-base.h" 3 4 # 6 "/usr/include/asm-generic/errno.h" 2 3 4 #define EDEADLK 35 /* Resource deadlock would occur */ #define ENAMETOOLONG 36 /* File name too long */ #define ENOLCK 37 /* No record locks available */ /* * This error code is special: arch syscall entry code will return * -ENOSYS if users try to call a syscall that doesn't exist. To keep * failures of syscalls that really do exist distinguishable from * failures due to attempts to use a nonexistent syscall, syscall * implementations should refrain from returning -ENOSYS. */ #define ENOSYS 38 /* Invalid system call number */ #define ENOTEMPTY 39 /* Directory not empty */ #define ELOOP 40 /* Too many symbolic links encountered */ #define EWOULDBLOCK EAGAIN /* Operation would block */ #define ENOMSG 42 /* No message of desired type */ #define EIDRM 43 /* Identifier removed */ #define ECHRNG 44 /* Channel number out of range */ #define EL2NSYNC 45 /* Level 2 not synchronized */ #define EL3HLT 46 /* Level 3 halted */ #define EL3RST 47 /* Level 3 reset */ #define ELNRNG 48 /* Link number out of range */ #define EUNATCH 49 /* Protocol driver not attached */ #define ENOCSI 50 /* No CSI structure available */ #define EL2HLT 51 /* Level 2 halted */ #define EBADE 52 /* Invalid exchange */ #define EBADR 53 /* Invalid request descriptor */ #define EXFULL 54 /* Exchange full */ #define ENOANO 55 /* No anode */ #define EBADRQC 56 /* Invalid request code */ #define EBADSLT 57 /* Invalid slot */ #define EDEADLOCK EDEADLK #define EBFONT 59 /* Bad font file format */ #define ENOSTR 60 /* Device not a stream */ #define ENODATA 61 /* No data available */ #define ETIME 62 /* Timer expired */ #define ENOSR 63 /* Out of streams resources */ #define ENONET 64 /* Machine is not on the network */ #define ENOPKG 65 /* Package not installed */ #define EREMOTE 66 /* Object is remote */ #define ENOLINK 67 /* Link has been severed */ #define EADV 68 /* Advertise error */ #define ESRMNT 69 /* Srmount error */ #define ECOMM 70 /* Communication error on send */ #define EPROTO 71 /* Protocol error */ #define EMULTIHOP 72 /* Multihop attempted */ #define EDOTDOT 73 /* RFS specific error */ #define EBADMSG 74 /* Not a data message */ #define EOVERFLOW 75 /* Value too large for defined data type */ #define ENOTUNIQ 76 /* Name not unique on network */ #define EBADFD 77 /* File descriptor in bad state */ #define EREMCHG 78 /* Remote address changed */ #define ELIBACC 79 /* Can not access a needed shared library */ #define ELIBBAD 80 /* Accessing a corrupted shared library */ #define ELIBSCN 81 /* .lib section in a.out corrupted */ #define ELIBMAX 82 /* Attempting to link in too many shared libraries */ #define ELIBEXEC 83 /* Cannot exec a shared library directly */ #define EILSEQ 84 /* Illegal byte sequence */ #define ERESTART 85 /* Interrupted system call should be restarted */ #define ESTRPIPE 86 /* Streams pipe error */ #define EUSERS 87 /* Too many users */ #define ENOTSOCK 88 /* Socket operation on non-socket */ #define EDESTADDRREQ 89 /* Destination address required */ #define EMSGSIZE 90 /* Message too long */ #define EPROTOTYPE 91 /* Protocol wrong type for socket */ #define ENOPROTOOPT 92 /* Protocol not available */ #define EPROTONOSUPPORT 93 /* Protocol not supported */ #define ESOCKTNOSUPPORT 94 /* Socket type not supported */ #define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */ #define EPFNOSUPPORT 96 /* Protocol family not supported */ #define EAFNOSUPPORT 97 /* Address family not supported by protocol */ #define EADDRINUSE 98 /* Address already in use */ #define EADDRNOTAVAIL 99 /* Cannot assign requested address */ #define ENETDOWN 100 /* Network is down */ #define ENETUNREACH 101 /* Network is unreachable */ #define ENETRESET 102 /* Network dropped connection because of reset */ #define ECONNABORTED 103 /* Software caused connection abort */ #define ECONNRESET 104 /* Connection reset by peer */ #define ENOBUFS 105 /* No buffer space available */ #define EISCONN 106 /* Transport endpoint is already connected */ #define ENOTCONN 107 /* Transport endpoint is not connected */ #define ESHUTDOWN 108 /* Cannot send after transport endpoint shutdown */ #define ETOOMANYREFS 109 /* Too many references: cannot splice */ #define ETIMEDOUT 110 /* Connection timed out */ #define ECONNREFUSED 111 /* Connection refused */ #define EHOSTDOWN 112 /* Host is down */ #define EHOSTUNREACH 113 /* No route to host */ #define EALREADY 114 /* Operation already in progress */ #define EINPROGRESS 115 /* Operation now in progress */ #define ESTALE 116 /* Stale file handle */ #define EUCLEAN 117 /* Structure needs cleaning */ #define ENOTNAM 118 /* Not a XENIX named type file */ #define ENAVAIL 119 /* No XENIX semaphores available */ #define EISNAM 120 /* Is a named type file */ #define EREMOTEIO 121 /* Remote I/O error */ #define EDQUOT 122 /* Quota exceeded */ #define ENOMEDIUM 123 /* No medium found */ #define EMEDIUMTYPE 124 /* Wrong medium type */ #define ECANCELED 125 /* Operation Canceled */ #define ENOKEY 126 /* Required key not available */ #define EKEYEXPIRED 127 /* Key has expired */ #define EKEYREVOKED 128 /* Key has been revoked */ #define EKEYREJECTED 129 /* Key was rejected by service */ /* for robust mutexes */ #define EOWNERDEAD 130 /* Owner died */ #define ENOTRECOVERABLE 131 /* State not recoverable */ #define ERFKILL 132 /* Operation not possible due to RF-kill */ #define EHWPOISON 133 /* Memory page has hardware error */ #endif # 124 "/usr/include/asm-generic/errno.h" 3 4 # 2 "/usr/include/x86_64-linux-gnu/asm/errno.h" 2 3 4 # 2 "/usr/include/linux/errno.h" 2 3 4 # 27 "/usr/include/x86_64-linux-gnu/bits/errno.h" 2 3 4 /* Older Linux headers do not define these constants. */ # ifndef ENOTSUP # define ENOTSUP EOPNOTSUPP # endif # 32 "/usr/include/x86_64-linux-gnu/bits/errno.h" 3 4 # ifndef ECANCELED # define ECANCELED 125 # endif # 36 "/usr/include/x86_64-linux-gnu/bits/errno.h" 3 4 # ifndef EOWNERDEAD # define EOWNERDEAD 130 # endif # 40 "/usr/include/x86_64-linux-gnu/bits/errno.h" 3 4 #ifndef ENOTRECOVERABLE # define ENOTRECOVERABLE 131 # endif # 44 "/usr/include/x86_64-linux-gnu/bits/errno.h" 3 4 # ifndef ERFKILL # define ERFKILL 132 # endif # 48 "/usr/include/x86_64-linux-gnu/bits/errno.h" 3 4 # ifndef EHWPOISON # define EHWPOISON 133 # endif # 52 "/usr/include/x86_64-linux-gnu/bits/errno.h" 3 4 #endif /* bits/errno.h. */ # 54 "/usr/include/x86_64-linux-gnu/bits/errno.h" 3 4 # 29 "/usr/include/errno.h" 2 3 4 /* When included from assembly language, this header only provides the E* constants. */ #ifndef __ASSEMBLER__ __BEGIN_DECLS /* The error code set by various library functions. */ extern int *__errno_location (void) __THROW __attribute_const__; # define errno (*__errno_location ()) # ifdef __USE_GNU /* The full and simple forms of the name with which the program was invoked. These variables are set up automatically at startup based on the value of argv[0]. */ extern char *program_invocation_name; extern char *program_invocation_short_name; #if 0 /* expanded by -frewrite-includes */ #include <bits/types/error_t.h> #endif /* expanded by -frewrite-includes */ # 48 "/usr/include/errno.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types/error_t.h" 1 3 4 /* Define error_t. Copyright (C) 1991-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ #ifndef __error_t_defined # define __error_t_defined 1 typedef int error_t; #endif # 25 "/usr/include/x86_64-linux-gnu/bits/types/error_t.h" 3 4 # 49 "/usr/include/errno.h" 2 3 4 # endif /* __USE_GNU */ # 51 "/usr/include/errno.h" 3 4 __END_DECLS #endif /* !__ASSEMBLER__ */ # 55 "/usr/include/errno.h" 3 4 #endif /* errno.h */ # 56 "/usr/include/errno.h" 3 4 # 43 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cerrno" 2 3 #ifndef _GLIBCXX_CERRNO #define _GLIBCXX_CERRNO 1 // Adhere to section 17.4.1.2 clause 5 of ISO 14882:1998 #ifndef errno #define errno errno #endif # 51 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cerrno" 3 #endif # 53 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cerrno" 3 # 45 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/string_conversions.h" 2 3 namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION // Helper for all the sto* functions. template<typename _TRet, typename _Ret = _TRet, typename _CharT, typename... _Base> _Ret __stoa(_TRet (*__convf) (const _CharT*, _CharT**, _Base...), const char* __name, const _CharT* __str, std::size_t* __idx, _Base... __base) { _Ret __ret; _CharT* __endptr; struct _Save_errno { _Save_errno() : _M_errno(errno) { errno = 0; } ~_Save_errno() { if (errno == 0) errno = _M_errno; } int _M_errno; } const __save_errno; struct _Range_chk { static bool _S_chk(_TRet, std::false_type) { return false; } static bool _S_chk(_TRet __val, std::true_type) // only called when _Ret is int { return __val < _TRet(__numeric_traits<int>::__min) || __val > _TRet(__numeric_traits<int>::__max); } }; const _TRet __tmp = __convf(__str, &__endptr, __base...); if (__endptr == __str) std::__throw_invalid_argument(__name); else if (errno == ERANGE || _Range_chk::_S_chk(__tmp, std::is_same<_Ret, int>{})) std::__throw_out_of_range(__name); else __ret = __tmp; if (__idx) *__idx = __endptr - __str; return __ret; } // Helper for the to_string / to_wstring functions. template<typename _String, typename _CharT = typename _String::value_type> _String __to_xstring(int (*__convf) (_CharT*, std::size_t, const _CharT*, __builtin_va_list), std::size_t __n, const _CharT* __fmt, ...) { // XXX Eventually the result should be constructed in-place in // the __cxx11 string, likely with the help of internal hooks. _CharT* __s = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __n)); __builtin_va_list __args; __builtin_va_start(__args, __fmt); const int __len = __convf(__s, __n, __fmt, __args); __builtin_va_end(__args); return _String(__s, __s + __len); } _GLIBCXX_END_NAMESPACE_VERSION } // namespace #endif // C++11 # 122 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/string_conversions.h" 3 #endif // _STRING_CONVERSIONS_H # 124 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/ext/string_conversions.h" 3 # 6497 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 2 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_BEGIN_NAMESPACE_CXX11 #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_USE_C99_STDLIB #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 6504 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 // 21.4 Numeric Conversions [string.conversions]. inline int stoi(const string& __str, size_t* __idx = 0, int __base = 10) { return __gnu_cxx::__stoa<long, int>(&std::strtol, "stoi", __str.c_str(), __idx, __base); } inline long stol(const string& __str, size_t* __idx = 0, int __base = 10) { return __gnu_cxx::__stoa(&std::strtol, "stol", __str.c_str(), __idx, __base); } inline unsigned long stoul(const string& __str, size_t* __idx = 0, int __base = 10) { return __gnu_cxx::__stoa(&std::strtoul, "stoul", __str.c_str(), __idx, __base); } inline long long stoll(const string& __str, size_t* __idx = 0, int __base = 10) { return __gnu_cxx::__stoa(&std::strtoll, "stoll", __str.c_str(), __idx, __base); } inline unsigned long long stoull(const string& __str, size_t* __idx = 0, int __base = 10) { return __gnu_cxx::__stoa(&std::strtoull, "stoull", __str.c_str(), __idx, __base); } // NB: strtof vs strtod. inline float stof(const string& __str, size_t* __idx = 0) { return __gnu_cxx::__stoa(&std::strtof, "stof", __str.c_str(), __idx); } inline double stod(const string& __str, size_t* __idx = 0) { return __gnu_cxx::__stoa(&std::strtod, "stod", __str.c_str(), __idx); } inline long double stold(const string& __str, size_t* __idx = 0) { return __gnu_cxx::__stoa(&std::strtold, "stold", __str.c_str(), __idx); } #endif // _GLIBCXX_USE_C99_STDLIB # 6543 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_USE_C99_STDIO #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 6545 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 // NB: (v)snprintf vs sprintf. // DR 1261. inline string to_string(int __val) { return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, 4 * sizeof(int), "%d", __val); } inline string to_string(unsigned __val) { return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, 4 * sizeof(unsigned), "%u", __val); } inline string to_string(long __val) { return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, 4 * sizeof(long), "%ld", __val); } inline string to_string(unsigned long __val) { return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, 4 * sizeof(unsigned long), "%lu", __val); } inline string to_string(long long __val) { return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, 4 * sizeof(long long), "%lld", __val); } inline string to_string(unsigned long long __val) { return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, 4 * sizeof(unsigned long long), "%llu", __val); } inline string to_string(float __val) { const int __n = __gnu_cxx::__numeric_traits<float>::__max_exponent10 + 20; return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, __n, "%f", __val); } inline string to_string(double __val) { const int __n = __gnu_cxx::__numeric_traits<double>::__max_exponent10 + 20; return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, __n, "%f", __val); } inline string to_string(long double __val) { const int __n = __gnu_cxx::__numeric_traits<long double>::__max_exponent10 + 20; return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, __n, "%Lf", __val); } #endif // _GLIBCXX_USE_C99_STDIO # 6609 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 #if 0 /* disabled by -frewrite-includes */ #if defined(_GLIBCXX_USE_WCHAR_T) && _GLIBCXX_USE_C99_WCHAR #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 6611 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 inline int stoi(const wstring& __str, size_t* __idx = 0, int __base = 10) { return __gnu_cxx::__stoa<long, int>(&std::wcstol, "stoi", __str.c_str(), __idx, __base); } inline long stol(const wstring& __str, size_t* __idx = 0, int __base = 10) { return __gnu_cxx::__stoa(&std::wcstol, "stol", __str.c_str(), __idx, __base); } inline unsigned long stoul(const wstring& __str, size_t* __idx = 0, int __base = 10) { return __gnu_cxx::__stoa(&std::wcstoul, "stoul", __str.c_str(), __idx, __base); } inline long long stoll(const wstring& __str, size_t* __idx = 0, int __base = 10) { return __gnu_cxx::__stoa(&std::wcstoll, "stoll", __str.c_str(), __idx, __base); } inline unsigned long long stoull(const wstring& __str, size_t* __idx = 0, int __base = 10) { return __gnu_cxx::__stoa(&std::wcstoull, "stoull", __str.c_str(), __idx, __base); } // NB: wcstof vs wcstod. inline float stof(const wstring& __str, size_t* __idx = 0) { return __gnu_cxx::__stoa(&std::wcstof, "stof", __str.c_str(), __idx); } inline double stod(const wstring& __str, size_t* __idx = 0) { return __gnu_cxx::__stoa(&std::wcstod, "stod", __str.c_str(), __idx); } inline long double stold(const wstring& __str, size_t* __idx = 0) { return __gnu_cxx::__stoa(&std::wcstold, "stold", __str.c_str(), __idx); } #ifndef _GLIBCXX_HAVE_BROKEN_VSWPRINTF // DR 1261. inline wstring to_wstring(int __val) { return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, 4 * sizeof(int), L"%d", __val); } inline wstring to_wstring(unsigned __val) { return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, 4 * sizeof(unsigned), L"%u", __val); } inline wstring to_wstring(long __val) { return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, 4 * sizeof(long), L"%ld", __val); } inline wstring to_wstring(unsigned long __val) { return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, 4 * sizeof(unsigned long), L"%lu", __val); } inline wstring to_wstring(long long __val) { return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, 4 * sizeof(long long), L"%lld", __val); } inline wstring to_wstring(unsigned long long __val) { return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, 4 * sizeof(unsigned long long), L"%llu", __val); } inline wstring to_wstring(float __val) { const int __n = __gnu_cxx::__numeric_traits<float>::__max_exponent10 + 20; return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, __n, L"%f", __val); } inline wstring to_wstring(double __val) { const int __n = __gnu_cxx::__numeric_traits<double>::__max_exponent10 + 20; return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, __n, L"%f", __val); } inline wstring to_wstring(long double __val) { const int __n = __gnu_cxx::__numeric_traits<long double>::__max_exponent10 + 20; return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, __n, L"%Lf", __val); } #endif // _GLIBCXX_HAVE_BROKEN_VSWPRINTF # 6712 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 #endif // _GLIBCXX_USE_WCHAR_T && _GLIBCXX_USE_C99_WCHAR # 6713 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 _GLIBCXX_END_NAMESPACE_CXX11 _GLIBCXX_END_NAMESPACE_VERSION } // namespace #endif /* C++11 */ # 6719 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 6721 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/functional_hash.h> #endif /* expanded by -frewrite-includes */ # 6722 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 # 6723 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION // DR 1182. #ifndef _GLIBCXX_COMPATIBILITY_CXX0X /// std::hash specialization for string. template<> struct hash<string> : public __hash_base<size_t, string> { size_t operator()(const string& __s) const noexcept { return std::_Hash_impl::hash(__s.data(), __s.length()); } }; template<> struct __is_fast_hash<hash<string>> : std::false_type { }; #ifdef _GLIBCXX_USE_WCHAR_T /// std::hash specialization for wstring. template<> struct hash<wstring> : public __hash_base<size_t, wstring> { size_t operator()(const wstring& __s) const noexcept { return std::_Hash_impl::hash(__s.data(), __s.length() * sizeof(wchar_t)); } }; template<> struct __is_fast_hash<hash<wstring>> : std::false_type { }; #endif # 6761 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 #endif /* _GLIBCXX_COMPATIBILITY_CXX0X */ # 6762 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 #ifdef _GLIBCXX_USE_CHAR8_T /// std::hash specialization for u8string. template<> struct hash<u8string> : public __hash_base<size_t, u8string> { size_t operator()(const u8string& __s) const noexcept { return std::_Hash_impl::hash(__s.data(), __s.length() * sizeof(char8_t)); } }; template<> struct __is_fast_hash<hash<u8string>> : std::false_type { }; #endif # 6779 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 /// std::hash specialization for u16string. template<> struct hash<u16string> : public __hash_base<size_t, u16string> { size_t operator()(const u16string& __s) const noexcept { return std::_Hash_impl::hash(__s.data(), __s.length() * sizeof(char16_t)); } }; template<> struct __is_fast_hash<hash<u16string>> : std::false_type { }; /// std::hash specialization for u32string. template<> struct hash<u32string> : public __hash_base<size_t, u32string> { size_t operator()(const u32string& __s) const noexcept { return std::_Hash_impl::hash(__s.data(), __s.length() * sizeof(char32_t)); } }; template<> struct __is_fast_hash<hash<u32string>> : std::false_type { }; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201402L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 6811 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 #define __cpp_lib_string_udls 201304 inline namespace literals { inline namespace string_literals { #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wliteral-suffix" _GLIBCXX_DEFAULT_ABI_TAG inline basic_string<char> operator""s(const char* __str, size_t __len) { return basic_string<char>{__str, __len}; } #ifdef _GLIBCXX_USE_WCHAR_T _GLIBCXX_DEFAULT_ABI_TAG inline basic_string<wchar_t> operator""s(const wchar_t* __str, size_t __len) { return basic_string<wchar_t>{__str, __len}; } #endif # 6831 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 #ifdef _GLIBCXX_USE_CHAR8_T _GLIBCXX_DEFAULT_ABI_TAG inline basic_string<char8_t> operator""s(const char8_t* __str, size_t __len) { return basic_string<char8_t>{__str, __len}; } #endif # 6838 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 _GLIBCXX_DEFAULT_ABI_TAG inline basic_string<char16_t> operator""s(const char16_t* __str, size_t __len) { return basic_string<char16_t>{__str, __len}; } _GLIBCXX_DEFAULT_ABI_TAG inline basic_string<char32_t> operator""s(const char32_t* __str, size_t __len) { return basic_string<char32_t>{__str, __len}; } #pragma GCC diagnostic pop } // inline namespace string_literals } // inline namespace literals #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 6854 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 namespace __detail::__variant { template<typename> struct _Never_valueless_alt; // see <variant> // Provide the strong exception-safety guarantee when emplacing a // basic_string into a variant, but only if moving the string cannot throw. template<typename _Tp, typename _Traits, typename _Alloc> struct _Never_valueless_alt<std::basic_string<_Tp, _Traits, _Alloc>> : __and_< is_nothrow_move_constructible<std::basic_string<_Tp, _Traits, _Alloc>>, is_nothrow_move_assignable<std::basic_string<_Tp, _Traits, _Alloc>> >::type { }; } // namespace __detail::__variant #endif // C++17 # 6869 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 #endif // C++14 # 6870 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 _GLIBCXX_END_NAMESPACE_VERSION } // namespace std #endif // C++11 # 6875 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 #endif /* _BASIC_STRING_H */ # 6877 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.h" 3 # 56 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/string" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/basic_string.tcc> #endif /* expanded by -frewrite-includes */ # 56 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/string" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.tcc" 1 3 // Components for manipulating sequences of characters -*- C++ -*- // Copyright (C) 1997-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file bits/basic_string.tcc * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{string} */ // // ISO C++ 14882: 21 Strings library // // Written by Jason Merrill based upon the specification by Takanori Adachi // in ANSI X3J16/94-0013R2. Rewritten by Nathan Myers to ISO-14882. // Non-reference-counted implementation written by Paolo Carlini and // updated by Jonathan Wakely for ISO-14882-2011. #ifndef _BASIC_STRING_TCC #define _BASIC_STRING_TCC 1 #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 43 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.tcc" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/cxxabi_forced.h> #endif /* expanded by -frewrite-includes */ # 44 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.tcc" 3 # 45 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.tcc" 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_USE_CXX11_ABI #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 51 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.tcc" 3 template<typename _CharT, typename _Traits, typename _Alloc> const typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>::npos; template<typename _CharT, typename _Traits, typename _Alloc> void basic_string<_CharT, _Traits, _Alloc>:: swap(basic_string& __s) _GLIBCXX_NOEXCEPT { if (this == &__s) return; _Alloc_traits::_S_on_swap(_M_get_allocator(), __s._M_get_allocator()); if (_M_is_local()) if (__s._M_is_local()) { if (length() && __s.length()) { _CharT __tmp_data[_S_local_capacity + 1]; traits_type::copy(__tmp_data, __s._M_local_buf, _S_local_capacity + 1); traits_type::copy(__s._M_local_buf, _M_local_buf, _S_local_capacity + 1); traits_type::copy(_M_local_buf, __tmp_data, _S_local_capacity + 1); } else if (__s.length()) { traits_type::copy(_M_local_buf, __s._M_local_buf, _S_local_capacity + 1); _M_length(__s.length()); __s._M_set_length(0); return; } else if (length()) { traits_type::copy(__s._M_local_buf, _M_local_buf, _S_local_capacity + 1); __s._M_length(length()); _M_set_length(0); return; } } else { const size_type __tmp_capacity = __s._M_allocated_capacity; traits_type::copy(__s._M_local_buf, _M_local_buf, _S_local_capacity + 1); _M_data(__s._M_data()); __s._M_data(__s._M_local_buf); _M_capacity(__tmp_capacity); } else { const size_type __tmp_capacity = _M_allocated_capacity; if (__s._M_is_local()) { traits_type::copy(_M_local_buf, __s._M_local_buf, _S_local_capacity + 1); __s._M_data(_M_data()); _M_data(_M_local_buf); } else { pointer __tmp_ptr = _M_data(); _M_data(__s._M_data()); __s._M_data(__tmp_ptr); _M_capacity(__s._M_allocated_capacity); } __s._M_capacity(__tmp_capacity); } const size_type __tmp_length = length(); _M_length(__s.length()); __s._M_length(__tmp_length); } template<typename _CharT, typename _Traits, typename _Alloc> typename basic_string<_CharT, _Traits, _Alloc>::pointer basic_string<_CharT, _Traits, _Alloc>:: _M_create(size_type& __capacity, size_type __old_capacity) { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 83. String::npos vs. string::max_size() if (__capacity > max_size()) std::__throw_length_error(__N("basic_string::_M_create")); // The below implements an exponential growth policy, necessary to // meet amortized linear time requirements of the library: see // http://gcc.gnu.org/ml/libstdc++/2001-07/msg00085.html. if (__capacity > __old_capacity && __capacity < 2 * __old_capacity) { __capacity = 2 * __old_capacity; // Never allocate a string bigger than max_size. if (__capacity > max_size()) __capacity = max_size(); } // NB: Need an array of char_type[__capacity], plus a terminating // null char_type() element. return _Alloc_traits::allocate(_M_get_allocator(), __capacity + 1); } // NB: This is the special case for Input Iterators, used in // istreambuf_iterators, etc. // Input Iterators have a cost structure very different from // pointers, calling for a different coding style. template<typename _CharT, typename _Traits, typename _Alloc> template<typename _InIterator> void basic_string<_CharT, _Traits, _Alloc>:: _M_construct(_InIterator __beg, _InIterator __end, std::input_iterator_tag) { size_type __len = 0; size_type __capacity = size_type(_S_local_capacity); while (__beg != __end && __len < __capacity) { _M_data()[__len++] = *__beg; ++__beg; } __try { while (__beg != __end) { if (__len == __capacity) { // Allocate more space. __capacity = __len + 1; pointer __another = _M_create(__capacity, __len); this->_S_copy(__another, _M_data(), __len); _M_dispose(); _M_data(__another); _M_capacity(__capacity); } _M_data()[__len++] = *__beg; ++__beg; } } __catch(...) { _M_dispose(); __throw_exception_again; } _M_set_length(__len); } template<typename _CharT, typename _Traits, typename _Alloc> template<typename _InIterator> void basic_string<_CharT, _Traits, _Alloc>:: _M_construct(_InIterator __beg, _InIterator __end, std::forward_iterator_tag) { // NB: Not required, but considered best practice. if (__gnu_cxx::__is_null_pointer(__beg) && __beg != __end) std::__throw_logic_error(__N("basic_string::" "_M_construct null not valid")); size_type __dnew = static_cast<size_type>(std::distance(__beg, __end)); if (__dnew > size_type(_S_local_capacity)) { _M_data(_M_create(__dnew, size_type(0))); _M_capacity(__dnew); } // Check for out_of_range and length_error exceptions. __try { this->_S_copy_chars(_M_data(), __beg, __end); } __catch(...) { _M_dispose(); __throw_exception_again; } _M_set_length(__dnew); } template<typename _CharT, typename _Traits, typename _Alloc> void basic_string<_CharT, _Traits, _Alloc>:: _M_construct(size_type __n, _CharT __c) { if (__n > size_type(_S_local_capacity)) { _M_data(_M_create(__n, size_type(0))); _M_capacity(__n); } if (__n) this->_S_assign(_M_data(), __n, __c); _M_set_length(__n); } template<typename _CharT, typename _Traits, typename _Alloc> void basic_string<_CharT, _Traits, _Alloc>:: _M_assign(const basic_string& __str) { if (this != &__str) { const size_type __rsize = __str.length(); const size_type __capacity = capacity(); if (__rsize > __capacity) { size_type __new_capacity = __rsize; pointer __tmp = _M_create(__new_capacity, __capacity); _M_dispose(); _M_data(__tmp); _M_capacity(__new_capacity); } if (__rsize) this->_S_copy(_M_data(), __str._M_data(), __rsize); _M_set_length(__rsize); } } template<typename _CharT, typename _Traits, typename _Alloc> void basic_string<_CharT, _Traits, _Alloc>:: reserve(size_type __res) { // Make sure we don't shrink below the current size. if (__res < length()) __res = length(); const size_type __capacity = capacity(); if (__res != __capacity) { if (__res > __capacity || __res > size_type(_S_local_capacity)) { pointer __tmp = _M_create(__res, __capacity); this->_S_copy(__tmp, _M_data(), length() + 1); _M_dispose(); _M_data(__tmp); _M_capacity(__res); } else if (!_M_is_local()) { this->_S_copy(_M_local_data(), _M_data(), length() + 1); _M_destroy(__capacity); _M_data(_M_local_data()); } } } template<typename _CharT, typename _Traits, typename _Alloc> void basic_string<_CharT, _Traits, _Alloc>:: _M_mutate(size_type __pos, size_type __len1, const _CharT* __s, size_type __len2) { const size_type __how_much = length() - __pos - __len1; size_type __new_capacity = length() + __len2 - __len1; pointer __r = _M_create(__new_capacity, capacity()); if (__pos) this->_S_copy(__r, _M_data(), __pos); if (__s && __len2) this->_S_copy(__r + __pos, __s, __len2); if (__how_much) this->_S_copy(__r + __pos + __len2, _M_data() + __pos + __len1, __how_much); _M_dispose(); _M_data(__r); _M_capacity(__new_capacity); } template<typename _CharT, typename _Traits, typename _Alloc> void basic_string<_CharT, _Traits, _Alloc>:: _M_erase(size_type __pos, size_type __n) { const size_type __how_much = length() - __pos - __n; if (__how_much && __n) this->_S_move(_M_data() + __pos, _M_data() + __pos + __n, __how_much); _M_set_length(length() - __n); } template<typename _CharT, typename _Traits, typename _Alloc> void basic_string<_CharT, _Traits, _Alloc>:: resize(size_type __n, _CharT __c) { const size_type __size = this->size(); if (__size < __n) this->append(__n - __size, __c); else if (__n < __size) this->_M_set_length(__n); } template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: _M_append(const _CharT* __s, size_type __n) { const size_type __len = __n + this->size(); if (__len <= this->capacity()) { if (__n) this->_S_copy(this->_M_data() + this->size(), __s, __n); } else this->_M_mutate(this->size(), size_type(0), __s, __n); this->_M_set_length(__len); return *this; } template<typename _CharT, typename _Traits, typename _Alloc> template<typename _InputIterator> basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: _M_replace_dispatch(const_iterator __i1, const_iterator __i2, _InputIterator __k1, _InputIterator __k2, std::__false_type) { const basic_string __s(__k1, __k2); const size_type __n1 = __i2 - __i1; return _M_replace(__i1 - begin(), __n1, __s._M_data(), __s.size()); } template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2, _CharT __c) { _M_check_length(__n1, __n2, "basic_string::_M_replace_aux"); const size_type __old_size = this->size(); const size_type __new_size = __old_size + __n2 - __n1; if (__new_size <= this->capacity()) { pointer __p = this->_M_data() + __pos1; const size_type __how_much = __old_size - __pos1 - __n1; if (__how_much && __n1 != __n2) this->_S_move(__p + __n2, __p + __n1, __how_much); } else this->_M_mutate(__pos1, __n1, 0, __n2); if (__n2) this->_S_assign(this->_M_data() + __pos1, __n2, __c); this->_M_set_length(__new_size); return *this; } template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: _M_replace(size_type __pos, size_type __len1, const _CharT* __s, const size_type __len2) { _M_check_length(__len1, __len2, "basic_string::_M_replace"); const size_type __old_size = this->size(); const size_type __new_size = __old_size + __len2 - __len1; if (__new_size <= this->capacity()) { pointer __p = this->_M_data() + __pos; const size_type __how_much = __old_size - __pos - __len1; if (_M_disjunct(__s)) { if (__how_much && __len1 != __len2) this->_S_move(__p + __len2, __p + __len1, __how_much); if (__len2) this->_S_copy(__p, __s, __len2); } else { // Work in-place. if (__len2 && __len2 <= __len1) this->_S_move(__p, __s, __len2); if (__how_much && __len1 != __len2) this->_S_move(__p + __len2, __p + __len1, __how_much); if (__len2 > __len1) { if (__s + __len2 <= __p + __len1) this->_S_move(__p, __s, __len2); else if (__s >= __p + __len1) this->_S_copy(__p, __s + __len2 - __len1, __len2); else { const size_type __nleft = (__p + __len1) - __s; this->_S_move(__p, __s, __nleft); this->_S_copy(__p + __nleft, __p + __len2, __len2 - __nleft); } } } } else this->_M_mutate(__pos, __len1, __s, __len2); this->_M_set_length(__new_size); return *this; } template<typename _CharT, typename _Traits, typename _Alloc> typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: copy(_CharT* __s, size_type __n, size_type __pos) const { _M_check(__pos, "basic_string::copy"); __n = _M_limit(__pos, __n); __glibcxx_requires_string_len(__s, __n); if (__n) _S_copy(__s, _M_data() + __pos, __n); // 21.3.5.7 par 3: do not append null. (good.) return __n; } #else // !_GLIBCXX_USE_CXX11_ABI # 487 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.tcc" 3 template<typename _CharT, typename _Traits, typename _Alloc> const typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: _Rep::_S_max_size = (((npos - sizeof(_Rep_base))/sizeof(_CharT)) - 1) / 4; template<typename _CharT, typename _Traits, typename _Alloc> const _CharT basic_string<_CharT, _Traits, _Alloc>:: _Rep::_S_terminal = _CharT(); template<typename _CharT, typename _Traits, typename _Alloc> const typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>::npos; // Linker sets _S_empty_rep_storage to all 0s (one reference, empty string) // at static init time (before static ctors are run). template<typename _CharT, typename _Traits, typename _Alloc> typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>::_Rep::_S_empty_rep_storage[ (sizeof(_Rep_base) + sizeof(_CharT) + sizeof(size_type) - 1) / sizeof(size_type)]; // NB: This is the special case for Input Iterators, used in // istreambuf_iterators, etc. // Input Iterators have a cost structure very different from // pointers, calling for a different coding style. template<typename _CharT, typename _Traits, typename _Alloc> template<typename _InIterator> _CharT* basic_string<_CharT, _Traits, _Alloc>:: _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a, input_iterator_tag) { #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_FULLY_DYNAMIC_STRING == 0 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 522 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.tcc" 3 if (__beg == __end && __a == _Alloc()) return _S_empty_rep()._M_refdata(); #endif # 525 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.tcc" 3 // Avoid reallocation for common case. _CharT __buf[128]; size_type __len = 0; while (__beg != __end && __len < sizeof(__buf) / sizeof(_CharT)) { __buf[__len++] = *__beg; ++__beg; } _Rep* __r = _Rep::_S_create(__len, size_type(0), __a); _M_copy(__r->_M_refdata(), __buf, __len); __try { while (__beg != __end) { if (__len == __r->_M_capacity) { // Allocate more space. _Rep* __another = _Rep::_S_create(__len + 1, __len, __a); _M_copy(__another->_M_refdata(), __r->_M_refdata(), __len); __r->_M_destroy(__a); __r = __another; } __r->_M_refdata()[__len++] = *__beg; ++__beg; } } __catch(...) { __r->_M_destroy(__a); __throw_exception_again; } __r->_M_set_length_and_sharable(__len); return __r->_M_refdata(); } template<typename _CharT, typename _Traits, typename _Alloc> template <typename _InIterator> _CharT* basic_string<_CharT, _Traits, _Alloc>:: _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a, forward_iterator_tag) { #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_FULLY_DYNAMIC_STRING == 0 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 568 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.tcc" 3 if (__beg == __end && __a == _Alloc()) return _S_empty_rep()._M_refdata(); #endif # 571 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.tcc" 3 // NB: Not required, but considered best practice. if (__gnu_cxx::__is_null_pointer(__beg) && __beg != __end) __throw_logic_error(__N("basic_string::_S_construct null not valid")); const size_type __dnew = static_cast<size_type>(std::distance(__beg, __end)); // Check for out_of_range and length_error exceptions. _Rep* __r = _Rep::_S_create(__dnew, size_type(0), __a); __try { _S_copy_chars(__r->_M_refdata(), __beg, __end); } __catch(...) { __r->_M_destroy(__a); __throw_exception_again; } __r->_M_set_length_and_sharable(__dnew); return __r->_M_refdata(); } template<typename _CharT, typename _Traits, typename _Alloc> _CharT* basic_string<_CharT, _Traits, _Alloc>:: _S_construct(size_type __n, _CharT __c, const _Alloc& __a) { #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_FULLY_DYNAMIC_STRING == 0 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 596 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.tcc" 3 if (__n == 0 && __a == _Alloc()) return _S_empty_rep()._M_refdata(); #endif # 599 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.tcc" 3 // Check for out_of_range and length_error exceptions. _Rep* __r = _Rep::_S_create(__n, size_type(0), __a); if (__n) _M_assign(__r->_M_refdata(), __n, __c); __r->_M_set_length_and_sharable(__n); return __r->_M_refdata(); } template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc>:: basic_string(const basic_string& __str) : _M_dataplus(__str._M_rep()->_M_grab(_Alloc(__str.get_allocator()), __str.get_allocator()), __str.get_allocator()) { } template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc>:: basic_string(const _Alloc& __a) : _M_dataplus(_S_construct(size_type(), _CharT(), __a), __a) { } template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc>:: basic_string(const basic_string& __str, size_type __pos, const _Alloc& __a) : _M_dataplus(_S_construct(__str._M_data() + __str._M_check(__pos, "basic_string::basic_string"), __str._M_data() + __str._M_limit(__pos, npos) + __pos, __a), __a) { } template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc>:: basic_string(const basic_string& __str, size_type __pos, size_type __n) : _M_dataplus(_S_construct(__str._M_data() + __str._M_check(__pos, "basic_string::basic_string"), __str._M_data() + __str._M_limit(__pos, __n) + __pos, _Alloc()), _Alloc()) { } template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc>:: basic_string(const basic_string& __str, size_type __pos, size_type __n, const _Alloc& __a) : _M_dataplus(_S_construct(__str._M_data() + __str._M_check(__pos, "basic_string::basic_string"), __str._M_data() + __str._M_limit(__pos, __n) + __pos, __a), __a) { } // TBD: DPG annotate template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc>:: basic_string(const _CharT* __s, size_type __n, const _Alloc& __a) : _M_dataplus(_S_construct(__s, __s + __n, __a), __a) { } // TBD: DPG annotate template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc>:: basic_string(const _CharT* __s, const _Alloc& __a) : _M_dataplus(_S_construct(__s, __s ? __s + traits_type::length(__s) : __s + npos, __a), __a) { } template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc>:: basic_string(size_type __n, _CharT __c, const _Alloc& __a) : _M_dataplus(_S_construct(__n, __c, __a), __a) { } // TBD: DPG annotate template<typename _CharT, typename _Traits, typename _Alloc> template<typename _InputIterator> basic_string<_CharT, _Traits, _Alloc>:: basic_string(_InputIterator __beg, _InputIterator __end, const _Alloc& __a) : _M_dataplus(_S_construct(__beg, __end, __a), __a) { } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 683 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.tcc" 3 template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc>:: basic_string(initializer_list<_CharT> __l, const _Alloc& __a) : _M_dataplus(_S_construct(__l.begin(), __l.end(), __a), __a) { } #endif # 689 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.tcc" 3 template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: assign(const basic_string& __str) { if (_M_rep() != __str._M_rep()) { // XXX MT const allocator_type __a = this->get_allocator(); _CharT* __tmp = __str._M_rep()->_M_grab(__a, __str.get_allocator()); _M_rep()->_M_dispose(__a); _M_data(__tmp); } return *this; } template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: assign(const _CharT* __s, size_type __n) { __glibcxx_requires_string_len(__s, __n); _M_check_length(this->size(), __n, "basic_string::assign"); if (_M_disjunct(__s) || _M_rep()->_M_is_shared()) return _M_replace_safe(size_type(0), this->size(), __s, __n); else { // Work in-place. const size_type __pos = __s - _M_data(); if (__pos >= __n) _M_copy(_M_data(), __s, __n); else if (__pos) _M_move(_M_data(), __s, __n); _M_rep()->_M_set_length_and_sharable(__n); return *this; } } template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: append(size_type __n, _CharT __c) { if (__n) { _M_check_length(size_type(0), __n, "basic_string::append"); const size_type __len = __n + this->size(); if (__len > this->capacity() || _M_rep()->_M_is_shared()) this->reserve(__len); _M_assign(_M_data() + this->size(), __n, __c); _M_rep()->_M_set_length_and_sharable(__len); } return *this; } template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: append(const _CharT* __s, size_type __n) { __glibcxx_requires_string_len(__s, __n); if (__n) { _M_check_length(size_type(0), __n, "basic_string::append"); const size_type __len = __n + this->size(); if (__len > this->capacity() || _M_rep()->_M_is_shared()) { if (_M_disjunct(__s)) this->reserve(__len); else { const size_type __off = __s - _M_data(); this->reserve(__len); __s = _M_data() + __off; } } _M_copy(_M_data() + this->size(), __s, __n); _M_rep()->_M_set_length_and_sharable(__len); } return *this; } template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: append(const basic_string& __str) { const size_type __size = __str.size(); if (__size) { const size_type __len = __size + this->size(); if (__len > this->capacity() || _M_rep()->_M_is_shared()) this->reserve(__len); _M_copy(_M_data() + this->size(), __str._M_data(), __size); _M_rep()->_M_set_length_and_sharable(__len); } return *this; } template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: append(const basic_string& __str, size_type __pos, size_type __n) { __str._M_check(__pos, "basic_string::append"); __n = __str._M_limit(__pos, __n); if (__n) { const size_type __len = __n + this->size(); if (__len > this->capacity() || _M_rep()->_M_is_shared()) this->reserve(__len); _M_copy(_M_data() + this->size(), __str._M_data() + __pos, __n); _M_rep()->_M_set_length_and_sharable(__len); } return *this; } template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: insert(size_type __pos, const _CharT* __s, size_type __n) { __glibcxx_requires_string_len(__s, __n); _M_check(__pos, "basic_string::insert"); _M_check_length(size_type(0), __n, "basic_string::insert"); if (_M_disjunct(__s) || _M_rep()->_M_is_shared()) return _M_replace_safe(__pos, size_type(0), __s, __n); else { // Work in-place. const size_type __off = __s - _M_data(); _M_mutate(__pos, 0, __n); __s = _M_data() + __off; _CharT* __p = _M_data() + __pos; if (__s + __n <= __p) _M_copy(__p, __s, __n); else if (__s >= __p) _M_copy(__p, __s + __n, __n); else { const size_type __nleft = __p - __s; _M_copy(__p, __s, __nleft); _M_copy(__p + __nleft, __p + __n, __n - __nleft); } return *this; } } template<typename _CharT, typename _Traits, typename _Alloc> typename basic_string<_CharT, _Traits, _Alloc>::iterator basic_string<_CharT, _Traits, _Alloc>:: erase(iterator __first, iterator __last) { _GLIBCXX_DEBUG_PEDASSERT(__first >= _M_ibegin() && __first <= __last && __last <= _M_iend()); // NB: This isn't just an optimization (bail out early when // there is nothing to do, really), it's also a correctness // issue vs MT, see libstdc++/40518. const size_type __size = __last - __first; if (__size) { const size_type __pos = __first - _M_ibegin(); _M_mutate(__pos, __size, size_type(0)); _M_rep()->_M_set_leaked(); return iterator(_M_data() + __pos); } else return __first; } template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: replace(size_type __pos, size_type __n1, const _CharT* __s, size_type __n2) { __glibcxx_requires_string_len(__s, __n2); _M_check(__pos, "basic_string::replace"); __n1 = _M_limit(__pos, __n1); _M_check_length(__n1, __n2, "basic_string::replace"); bool __left; if (_M_disjunct(__s) || _M_rep()->_M_is_shared()) return _M_replace_safe(__pos, __n1, __s, __n2); else if ((__left = __s + __n2 <= _M_data() + __pos) || _M_data() + __pos + __n1 <= __s) { // Work in-place: non-overlapping case. size_type __off = __s - _M_data(); __left ? __off : (__off += __n2 - __n1); _M_mutate(__pos, __n1, __n2); _M_copy(_M_data() + __pos, _M_data() + __off, __n2); return *this; } else { // Todo: overlapping case. const basic_string __tmp(__s, __n2); return _M_replace_safe(__pos, __n1, __tmp._M_data(), __n2); } } template<typename _CharT, typename _Traits, typename _Alloc> void basic_string<_CharT, _Traits, _Alloc>::_Rep:: _M_destroy(const _Alloc& __a) throw () { const size_type __size = sizeof(_Rep_base) + (this->_M_capacity + 1) * sizeof(_CharT); _Raw_bytes_alloc(__a).deallocate(reinterpret_cast<char*>(this), __size); } template<typename _CharT, typename _Traits, typename _Alloc> void basic_string<_CharT, _Traits, _Alloc>:: _M_leak_hard() { #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_FULLY_DYNAMIC_STRING == 0 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 908 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.tcc" 3 if (_M_rep() == &_S_empty_rep()) return; #endif # 911 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.tcc" 3 if (_M_rep()->_M_is_shared()) _M_mutate(0, 0, 0); _M_rep()->_M_set_leaked(); } template<typename _CharT, typename _Traits, typename _Alloc> void basic_string<_CharT, _Traits, _Alloc>:: _M_mutate(size_type __pos, size_type __len1, size_type __len2) { const size_type __old_size = this->size(); const size_type __new_size = __old_size + __len2 - __len1; const size_type __how_much = __old_size - __pos - __len1; if (__new_size > this->capacity() || _M_rep()->_M_is_shared()) { // Must reallocate. const allocator_type __a = get_allocator(); _Rep* __r = _Rep::_S_create(__new_size, this->capacity(), __a); if (__pos) _M_copy(__r->_M_refdata(), _M_data(), __pos); if (__how_much) _M_copy(__r->_M_refdata() + __pos + __len2, _M_data() + __pos + __len1, __how_much); _M_rep()->_M_dispose(__a); _M_data(__r->_M_refdata()); } else if (__how_much && __len1 != __len2) { // Work in-place. _M_move(_M_data() + __pos + __len2, _M_data() + __pos + __len1, __how_much); } _M_rep()->_M_set_length_and_sharable(__new_size); } template<typename _CharT, typename _Traits, typename _Alloc> void basic_string<_CharT, _Traits, _Alloc>:: reserve(size_type __res) { if (__res != this->capacity() || _M_rep()->_M_is_shared()) { // Make sure we don't shrink below the current size if (__res < this->size()) __res = this->size(); const allocator_type __a = get_allocator(); _CharT* __tmp = _M_rep()->_M_clone(__a, __res - this->size()); _M_rep()->_M_dispose(__a); _M_data(__tmp); } } template<typename _CharT, typename _Traits, typename _Alloc> void basic_string<_CharT, _Traits, _Alloc>:: swap(basic_string& __s) _GLIBCXX_NOEXCEPT_IF(allocator_traits<_Alloc>::is_always_equal::value) { if (_M_rep()->_M_is_leaked()) _M_rep()->_M_set_sharable(); if (__s._M_rep()->_M_is_leaked()) __s._M_rep()->_M_set_sharable(); if (this->get_allocator() == __s.get_allocator()) { _CharT* __tmp = _M_data(); _M_data(__s._M_data()); __s._M_data(__tmp); } // The code below can usually be optimized away. else { const basic_string __tmp1(_M_ibegin(), _M_iend(), __s.get_allocator()); const basic_string __tmp2(__s._M_ibegin(), __s._M_iend(), this->get_allocator()); *this = __tmp2; __s = __tmp1; } } template<typename _CharT, typename _Traits, typename _Alloc> typename basic_string<_CharT, _Traits, _Alloc>::_Rep* basic_string<_CharT, _Traits, _Alloc>::_Rep:: _S_create(size_type __capacity, size_type __old_capacity, const _Alloc& __alloc) { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 83. String::npos vs. string::max_size() if (__capacity > _S_max_size) __throw_length_error(__N("basic_string::_S_create")); // The standard places no restriction on allocating more memory // than is strictly needed within this layer at the moment or as // requested by an explicit application call to reserve(). // Many malloc implementations perform quite poorly when an // application attempts to allocate memory in a stepwise fashion // growing each allocation size by only 1 char. Additionally, // it makes little sense to allocate less linear memory than the // natural blocking size of the malloc implementation. // Unfortunately, we would need a somewhat low-level calculation // with tuned parameters to get this perfect for any particular // malloc implementation. Fortunately, generalizations about // common features seen among implementations seems to suffice. // __pagesize need not match the actual VM page size for good // results in practice, thus we pick a common value on the low // side. __malloc_header_size is an estimate of the amount of // overhead per memory allocation (in practice seen N * sizeof // (void*) where N is 0, 2 or 4). According to folklore, // picking this value on the high side is better than // low-balling it (especially when this algorithm is used with // malloc implementations that allocate memory blocks rounded up // to a size which is a power of 2). const size_type __pagesize = 4096; const size_type __malloc_header_size = 4 * sizeof(void*); // The below implements an exponential growth policy, necessary to // meet amortized linear time requirements of the library: see // http://gcc.gnu.org/ml/libstdc++/2001-07/msg00085.html. // It's active for allocations requiring an amount of memory above // system pagesize. This is consistent with the requirements of the // standard: http://gcc.gnu.org/ml/libstdc++/2001-07/msg00130.html if (__capacity > __old_capacity && __capacity < 2 * __old_capacity) __capacity = 2 * __old_capacity; // NB: Need an array of char_type[__capacity], plus a terminating // null char_type() element, plus enough for the _Rep data structure. // Whew. Seemingly so needy, yet so elemental. size_type __size = (__capacity + 1) * sizeof(_CharT) + sizeof(_Rep); const size_type __adj_size = __size + __malloc_header_size; if (__adj_size > __pagesize && __capacity > __old_capacity) { const size_type __extra = __pagesize - __adj_size % __pagesize; __capacity += __extra / sizeof(_CharT); // Never allocate a string bigger than _S_max_size. if (__capacity > _S_max_size) __capacity = _S_max_size; __size = (__capacity + 1) * sizeof(_CharT) + sizeof(_Rep); } // NB: Might throw, but no worries about a leak, mate: _Rep() // does not throw. void* __place = _Raw_bytes_alloc(__alloc).allocate(__size); _Rep *__p = new (__place) _Rep; __p->_M_capacity = __capacity; // ABI compatibility - 3.4.x set in _S_create both // _M_refcount and _M_length. All callers of _S_create // in basic_string.tcc then set just _M_length. // In 4.0.x and later both _M_refcount and _M_length // are initialized in the callers, unfortunately we can // have 3.4.x compiled code with _S_create callers inlined // calling 4.0.x+ _S_create. __p->_M_set_sharable(); return __p; } template<typename _CharT, typename _Traits, typename _Alloc> _CharT* basic_string<_CharT, _Traits, _Alloc>::_Rep:: _M_clone(const _Alloc& __alloc, size_type __res) { // Requested capacity of the clone. const size_type __requested_cap = this->_M_length + __res; _Rep* __r = _Rep::_S_create(__requested_cap, this->_M_capacity, __alloc); if (this->_M_length) _M_copy(__r->_M_refdata(), _M_refdata(), this->_M_length); __r->_M_set_length_and_sharable(this->_M_length); return __r->_M_refdata(); } template<typename _CharT, typename _Traits, typename _Alloc> void basic_string<_CharT, _Traits, _Alloc>:: resize(size_type __n, _CharT __c) { const size_type __size = this->size(); _M_check_length(__size, __n, "basic_string::resize"); if (__size < __n) this->append(__n - __size, __c); else if (__n < __size) this->erase(__n); // else nothing (in particular, avoid calling _M_mutate() unnecessarily.) } template<typename _CharT, typename _Traits, typename _Alloc> template<typename _InputIterator> basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: _M_replace_dispatch(iterator __i1, iterator __i2, _InputIterator __k1, _InputIterator __k2, __false_type) { const basic_string __s(__k1, __k2); const size_type __n1 = __i2 - __i1; _M_check_length(__n1, __s.size(), "basic_string::_M_replace_dispatch"); return _M_replace_safe(__i1 - _M_ibegin(), __n1, __s._M_data(), __s.size()); } template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2, _CharT __c) { _M_check_length(__n1, __n2, "basic_string::_M_replace_aux"); _M_mutate(__pos1, __n1, __n2); if (__n2) _M_assign(_M_data() + __pos1, __n2, __c); return *this; } template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: _M_replace_safe(size_type __pos1, size_type __n1, const _CharT* __s, size_type __n2) { _M_mutate(__pos1, __n1, __n2); if (__n2) _M_copy(_M_data() + __pos1, __s, __n2); return *this; } template<typename _CharT, typename _Traits, typename _Alloc> typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: copy(_CharT* __s, size_type __n, size_type __pos) const { _M_check(__pos, "basic_string::copy"); __n = _M_limit(__pos, __n); __glibcxx_requires_string_len(__s, __n); if (__n) _M_copy(__s, _M_data() + __pos, __n); // 21.3.5.7 par 3: do not append null. (good.) return __n; } #endif // !_GLIBCXX_USE_CXX11_ABI # 1155 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.tcc" 3 template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc> operator+(const _CharT* __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { __glibcxx_requires_string(__lhs); typedef basic_string<_CharT, _Traits, _Alloc> __string_type; typedef typename __string_type::size_type __size_type; const __size_type __len = _Traits::length(__lhs); __string_type __str; __str.reserve(__len + __rhs.size()); __str.append(__lhs, __len); __str.append(__rhs); return __str; } template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc> operator+(_CharT __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { typedef basic_string<_CharT, _Traits, _Alloc> __string_type; typedef typename __string_type::size_type __size_type; __string_type __str; const __size_type __len = __rhs.size(); __str.reserve(__len + 1); __str.append(__size_type(1), __lhs); __str.append(__rhs); return __str; } template<typename _CharT, typename _Traits, typename _Alloc> typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: find(const _CharT* __s, size_type __pos, size_type __n) const _GLIBCXX_NOEXCEPT { __glibcxx_requires_string_len(__s, __n); const size_type __size = this->size(); if (__n == 0) return __pos <= __size ? __pos : npos; if (__pos >= __size) return npos; const _CharT __elem0 = __s[0]; const _CharT* const __data = data(); const _CharT* __first = __data + __pos; const _CharT* const __last = __data + __size; size_type __len = __size - __pos; while (__len >= __n) { // Find the first occurrence of __elem0: __first = traits_type::find(__first, __len - __n + 1, __elem0); if (!__first) return npos; // Compare the full strings from the first occurrence of __elem0. // We already know that __first[0] == __s[0] but compare them again // anyway because __s is probably aligned, which helps memcmp. if (traits_type::compare(__first, __s, __n) == 0) return __first - __data; __len = __last - ++__first; } return npos; } template<typename _CharT, typename _Traits, typename _Alloc> typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: find(_CharT __c, size_type __pos) const _GLIBCXX_NOEXCEPT { size_type __ret = npos; const size_type __size = this->size(); if (__pos < __size) { const _CharT* __data = _M_data(); const size_type __n = __size - __pos; const _CharT* __p = traits_type::find(__data + __pos, __n, __c); if (__p) __ret = __p - __data; } return __ret; } template<typename _CharT, typename _Traits, typename _Alloc> typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: rfind(const _CharT* __s, size_type __pos, size_type __n) const _GLIBCXX_NOEXCEPT { __glibcxx_requires_string_len(__s, __n); const size_type __size = this->size(); if (__n <= __size) { __pos = std::min(size_type(__size - __n), __pos); const _CharT* __data = _M_data(); do { if (traits_type::compare(__data + __pos, __s, __n) == 0) return __pos; } while (__pos-- > 0); } return npos; } template<typename _CharT, typename _Traits, typename _Alloc> typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: rfind(_CharT __c, size_type __pos) const _GLIBCXX_NOEXCEPT { size_type __size = this->size(); if (__size) { if (--__size > __pos) __size = __pos; for (++__size; __size-- > 0; ) if (traits_type::eq(_M_data()[__size], __c)) return __size; } return npos; } template<typename _CharT, typename _Traits, typename _Alloc> typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: find_first_of(const _CharT* __s, size_type __pos, size_type __n) const _GLIBCXX_NOEXCEPT { __glibcxx_requires_string_len(__s, __n); for (; __n && __pos < this->size(); ++__pos) { const _CharT* __p = traits_type::find(__s, __n, _M_data()[__pos]); if (__p) return __pos; } return npos; } template<typename _CharT, typename _Traits, typename _Alloc> typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: find_last_of(const _CharT* __s, size_type __pos, size_type __n) const _GLIBCXX_NOEXCEPT { __glibcxx_requires_string_len(__s, __n); size_type __size = this->size(); if (__size && __n) { if (--__size > __pos) __size = __pos; do { if (traits_type::find(__s, __n, _M_data()[__size])) return __size; } while (__size-- != 0); } return npos; } template<typename _CharT, typename _Traits, typename _Alloc> typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const _GLIBCXX_NOEXCEPT { __glibcxx_requires_string_len(__s, __n); for (; __pos < this->size(); ++__pos) if (!traits_type::find(__s, __n, _M_data()[__pos])) return __pos; return npos; } template<typename _CharT, typename _Traits, typename _Alloc> typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: find_first_not_of(_CharT __c, size_type __pos) const _GLIBCXX_NOEXCEPT { for (; __pos < this->size(); ++__pos) if (!traits_type::eq(_M_data()[__pos], __c)) return __pos; return npos; } template<typename _CharT, typename _Traits, typename _Alloc> typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const _GLIBCXX_NOEXCEPT { __glibcxx_requires_string_len(__s, __n); size_type __size = this->size(); if (__size) { if (--__size > __pos) __size = __pos; do { if (!traits_type::find(__s, __n, _M_data()[__size])) return __size; } while (__size--); } return npos; } template<typename _CharT, typename _Traits, typename _Alloc> typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: find_last_not_of(_CharT __c, size_type __pos) const _GLIBCXX_NOEXCEPT { size_type __size = this->size(); if (__size) { if (--__size > __pos) __size = __pos; do { if (!traits_type::eq(_M_data()[__size], __c)) return __size; } while (__size--); } return npos; } template<typename _CharT, typename _Traits, typename _Alloc> int basic_string<_CharT, _Traits, _Alloc>:: compare(size_type __pos, size_type __n, const basic_string& __str) const { _M_check(__pos, "basic_string::compare"); __n = _M_limit(__pos, __n); const size_type __osize = __str.size(); const size_type __len = std::min(__n, __osize); int __r = traits_type::compare(_M_data() + __pos, __str.data(), __len); if (!__r) __r = _S_compare(__n, __osize); return __r; } template<typename _CharT, typename _Traits, typename _Alloc> int basic_string<_CharT, _Traits, _Alloc>:: compare(size_type __pos1, size_type __n1, const basic_string& __str, size_type __pos2, size_type __n2) const { _M_check(__pos1, "basic_string::compare"); __str._M_check(__pos2, "basic_string::compare"); __n1 = _M_limit(__pos1, __n1); __n2 = __str._M_limit(__pos2, __n2); const size_type __len = std::min(__n1, __n2); int __r = traits_type::compare(_M_data() + __pos1, __str.data() + __pos2, __len); if (!__r) __r = _S_compare(__n1, __n2); return __r; } template<typename _CharT, typename _Traits, typename _Alloc> int basic_string<_CharT, _Traits, _Alloc>:: compare(const _CharT* __s) const _GLIBCXX_NOEXCEPT { __glibcxx_requires_string(__s); const size_type __size = this->size(); const size_type __osize = traits_type::length(__s); const size_type __len = std::min(__size, __osize); int __r = traits_type::compare(_M_data(), __s, __len); if (!__r) __r = _S_compare(__size, __osize); return __r; } template<typename _CharT, typename _Traits, typename _Alloc> int basic_string <_CharT, _Traits, _Alloc>:: compare(size_type __pos, size_type __n1, const _CharT* __s) const { __glibcxx_requires_string(__s); _M_check(__pos, "basic_string::compare"); __n1 = _M_limit(__pos, __n1); const size_type __osize = traits_type::length(__s); const size_type __len = std::min(__n1, __osize); int __r = traits_type::compare(_M_data() + __pos, __s, __len); if (!__r) __r = _S_compare(__n1, __osize); return __r; } template<typename _CharT, typename _Traits, typename _Alloc> int basic_string <_CharT, _Traits, _Alloc>:: compare(size_type __pos, size_type __n1, const _CharT* __s, size_type __n2) const { __glibcxx_requires_string_len(__s, __n2); _M_check(__pos, "basic_string::compare"); __n1 = _M_limit(__pos, __n1); const size_type __len = std::min(__n1, __n2); int __r = traits_type::compare(_M_data() + __pos, __s, __len); if (!__r) __r = _S_compare(__n1, __n2); return __r; } // 21.3.7.9 basic_string::getline and operators template<typename _CharT, typename _Traits, typename _Alloc> basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __in, basic_string<_CharT, _Traits, _Alloc>& __str) { typedef basic_istream<_CharT, _Traits> __istream_type; typedef basic_string<_CharT, _Traits, _Alloc> __string_type; typedef typename __istream_type::ios_base __ios_base; typedef typename __istream_type::int_type __int_type; typedef typename __string_type::size_type __size_type; typedef ctype<_CharT> __ctype_type; typedef typename __ctype_type::ctype_base __ctype_base; __size_type __extracted = 0; typename __ios_base::iostate __err = __ios_base::goodbit; typename __istream_type::sentry __cerb(__in, false); if (__cerb) { __try { // Avoid reallocation for common case. __str.erase(); _CharT __buf[128]; __size_type __len = 0; const streamsize __w = __in.width(); const __size_type __n = __w > 0 ? static_cast<__size_type>(__w) : __str.max_size(); const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); const __int_type __eof = _Traits::eof(); __int_type __c = __in.rdbuf()->sgetc(); while (__extracted < __n && !_Traits::eq_int_type(__c, __eof) && !__ct.is(__ctype_base::space, _Traits::to_char_type(__c))) { if (__len == sizeof(__buf) / sizeof(_CharT)) { __str.append(__buf, sizeof(__buf) / sizeof(_CharT)); __len = 0; } __buf[__len++] = _Traits::to_char_type(__c); ++__extracted; __c = __in.rdbuf()->snextc(); } __str.append(__buf, __len); if (_Traits::eq_int_type(__c, __eof)) __err |= __ios_base::eofbit; __in.width(0); } __catch(__cxxabiv1::__forced_unwind&) { __in._M_setstate(__ios_base::badbit); __throw_exception_again; } __catch(...) { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 91. Description of operator>> and getline() for string<> // might cause endless loop __in._M_setstate(__ios_base::badbit); } } // 211. operator>>(istream&, string&) doesn't set failbit if (!__extracted) __err |= __ios_base::failbit; if (__err) __in.setstate(__err); return __in; } template<typename _CharT, typename _Traits, typename _Alloc> basic_istream<_CharT, _Traits>& getline(basic_istream<_CharT, _Traits>& __in, basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim) { typedef basic_istream<_CharT, _Traits> __istream_type; typedef basic_string<_CharT, _Traits, _Alloc> __string_type; typedef typename __istream_type::ios_base __ios_base; typedef typename __istream_type::int_type __int_type; typedef typename __string_type::size_type __size_type; __size_type __extracted = 0; const __size_type __n = __str.max_size(); typename __ios_base::iostate __err = __ios_base::goodbit; typename __istream_type::sentry __cerb(__in, true); if (__cerb) { __try { __str.erase(); const __int_type __idelim = _Traits::to_int_type(__delim); const __int_type __eof = _Traits::eof(); __int_type __c = __in.rdbuf()->sgetc(); while (__extracted < __n && !_Traits::eq_int_type(__c, __eof) && !_Traits::eq_int_type(__c, __idelim)) { __str += _Traits::to_char_type(__c); ++__extracted; __c = __in.rdbuf()->snextc(); } if (_Traits::eq_int_type(__c, __eof)) __err |= __ios_base::eofbit; else if (_Traits::eq_int_type(__c, __idelim)) { ++__extracted; __in.rdbuf()->sbumpc(); } else __err |= __ios_base::failbit; } __catch(__cxxabiv1::__forced_unwind&) { __in._M_setstate(__ios_base::badbit); __throw_exception_again; } __catch(...) { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 91. Description of operator>> and getline() for string<> // might cause endless loop __in._M_setstate(__ios_base::badbit); } } if (!__extracted) __err |= __ios_base::failbit; if (__err) __in.setstate(__err); return __in; } // Inhibit implicit instantiations for required instantiations, // which are defined via explicit instantiations elsewhere. #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_EXTERN_TEMPLATE #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1602 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.tcc" 3 // The explicit instantiation definitions in src/c++11/string-inst.cc and // src/c++17/string-inst.cc only instantiate the members required for C++17 // and earlier standards (so not C++20's starts_with and ends_with). // Suppress the explicit instantiation declarations for C++20, so C++20 // code will implicitly instantiate std::string and std::wstring as needed. #if 0 /* disabled by -frewrite-includes */ # if __cplusplus <= 201703L && _GLIBCXX_EXTERN_TEMPLATE > 0 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1608 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.tcc" 3 extern template class basic_string<char>; #if 0 /* disabled by -frewrite-includes */ #if 0 # elif ! _GLIBCXX_USE_CXX11_ABI #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 1610 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.tcc" 3 // Still need to prevent implicit instantiation of the COW empty rep, // to ensure the definition in libstdc++.so is unique (PR 86138). extern template basic_string<char>::size_type basic_string<char>::_Rep::_S_empty_rep_storage[]; # endif # 1615 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.tcc" 3 extern template basic_istream<char>& operator>>(basic_istream<char>&, string&); extern template basic_ostream<char>& operator<<(basic_ostream<char>&, const string&); extern template basic_istream<char>& getline(basic_istream<char>&, string&, char); extern template basic_istream<char>& getline(basic_istream<char>&, string&); #ifdef _GLIBCXX_USE_WCHAR_T #if 0 /* disabled by -frewrite-includes */ # if __cplusplus <= 201703L && _GLIBCXX_EXTERN_TEMPLATE > 0 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1631 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.tcc" 3 extern template class basic_string<wchar_t>; #if 0 /* disabled by -frewrite-includes */ #if 0 # elif ! _GLIBCXX_USE_CXX11_ABI #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 1633 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.tcc" 3 extern template basic_string<wchar_t>::size_type basic_string<wchar_t>::_Rep::_S_empty_rep_storage[]; # endif # 1636 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.tcc" 3 extern template basic_istream<wchar_t>& operator>>(basic_istream<wchar_t>&, wstring&); extern template basic_ostream<wchar_t>& operator<<(basic_ostream<wchar_t>&, const wstring&); extern template basic_istream<wchar_t>& getline(basic_istream<wchar_t>&, wstring&, wchar_t); extern template basic_istream<wchar_t>& getline(basic_istream<wchar_t>&, wstring&); #endif // _GLIBCXX_USE_WCHAR_T # 1650 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.tcc" 3 #endif // _GLIBCXX_EXTERN_TEMPLATE # 1651 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.tcc" 3 _GLIBCXX_END_NAMESPACE_VERSION } // namespace std #endif # 1656 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/basic_string.tcc" 3 # 57 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/string" 2 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L && _GLIBCXX_USE_CXX11_ABI #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 59 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/string" 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION namespace pmr { template<typename _Tp> class polymorphic_allocator; template<typename _CharT, typename _Traits = char_traits<_CharT>> using basic_string = std::basic_string<_CharT, _Traits, polymorphic_allocator<_CharT>>; using string = basic_string<char>; #ifdef _GLIBCXX_USE_CHAR8_T using u8string = basic_string<char8_t>; #endif # 71 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/string" 3 using u16string = basic_string<char16_t>; using u32string = basic_string<char32_t>; #ifdef _GLIBCXX_USE_WCHAR_T using wstring = basic_string<wchar_t>; #endif # 76 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/string" 3 } // namespace pmr template<typename _Str> struct __hash_string_base : public __hash_base<size_t, _Str> { size_t operator()(const _Str& __s) const noexcept { return hash<basic_string_view<typename _Str::value_type>>{}(__s); } }; template<> struct hash<pmr::string> : public __hash_string_base<pmr::string> { }; #ifdef _GLIBCXX_USE_CHAR8_T template<> struct hash<pmr::u8string> : public __hash_string_base<pmr::u8string> { }; #endif # 97 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/string" 3 template<> struct hash<pmr::u16string> : public __hash_string_base<pmr::u16string> { }; template<> struct hash<pmr::u32string> : public __hash_string_base<pmr::u32string> { }; #ifdef _GLIBCXX_USE_WCHAR_T template<> struct hash<pmr::wstring> : public __hash_string_base<pmr::wstring> { }; #endif # 111 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/string" 3 _GLIBCXX_END_NAMESPACE_VERSION } // namespace std #endif // C++17 # 115 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/string" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 117 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/string" 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION #define __cpp_lib_erase_if 202002L template<typename _CharT, typename _Traits, typename _Alloc, typename _Predicate> inline typename basic_string<_CharT, _Traits, _Alloc>::size_type erase_if(basic_string<_CharT, _Traits, _Alloc>& __cont, _Predicate __pred) { const auto __osz = __cont.size(); __cont.erase(std::remove_if(__cont.begin(), __cont.end(), __pred), __cont.end()); return __osz - __cont.size(); } template<typename _CharT, typename _Traits, typename _Alloc, typename _Up> inline typename basic_string<_CharT, _Traits, _Alloc>::size_type erase(basic_string<_CharT, _Traits, _Alloc>& __cont, const _Up& __value) { const auto __osz = __cont.size(); __cont.erase(std::remove(__cont.begin(), __cont.end(), __value), __cont.end()); return __osz - __cont.size(); } _GLIBCXX_END_NAMESPACE_VERSION } // namespace std #endif // C++20 # 146 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/string" 3 #endif /* _GLIBCXX_STRING */ # 148 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/string" 3 # 40 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/stdexcept" 2 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_USE_DUAL_ABI #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 46 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/stdexcept" 3 #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_USE_CXX11_ABI #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 47 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/stdexcept" 3 // Emulates an old COW string when the new std::string is in use. struct __cow_string { union { const char* _M_p; char _M_bytes[sizeof(const char*)]; }; __cow_string(); __cow_string(const std::string&); __cow_string(const char*, size_t); __cow_string(const __cow_string&) _GLIBCXX_NOTHROW; __cow_string& operator=(const __cow_string&) _GLIBCXX_NOTHROW; ~__cow_string(); #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 62 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/stdexcept" 3 __cow_string(__cow_string&&) noexcept; __cow_string& operator=(__cow_string&&) noexcept; #endif # 65 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/stdexcept" 3 }; typedef basic_string<char> __sso_string; #else // _GLIBCXX_USE_CXX11_ABI # 69 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/stdexcept" 3 typedef basic_string<char> __cow_string; // Emulates a new SSO string when the old std::string is in use. struct __sso_string { struct __str { const char* _M_p; size_t _M_string_length; char _M_local_buf[16]; }; union { __str _M_s; char _M_bytes[sizeof(__str)]; }; __sso_string() _GLIBCXX_NOTHROW; __sso_string(const std::string&); __sso_string(const char*, size_t); __sso_string(const __sso_string&); __sso_string& operator=(const __sso_string&); ~__sso_string(); #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 93 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/stdexcept" 3 __sso_string(__sso_string&&) noexcept; __sso_string& operator=(__sso_string&&) noexcept; #endif # 96 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/stdexcept" 3 }; #endif // _GLIBCXX_USE_CXX11_ABI # 98 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/stdexcept" 3 #else // _GLIBCXX_USE_DUAL_ABI # 99 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/stdexcept" 3 typedef basic_string<char> __sso_string; typedef basic_string<char> __cow_string; #endif # 102 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/stdexcept" 3 /** * @addtogroup exceptions * @{ */ /** Logic errors represent problems in the internal logic of a program; * in theory, these are preventable, and even detectable before the * program runs (e.g., violations of class invariants). * @brief One of two subclasses of exception. */ class logic_error : public exception { __cow_string _M_msg; public: /** Takes a character string describing the error. */ explicit logic_error(const string& __arg) _GLIBCXX_TXN_SAFE; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 123 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/stdexcept" 3 explicit logic_error(const char*) _GLIBCXX_TXN_SAFE; logic_error(logic_error&&) noexcept; logic_error& operator=(logic_error&&) noexcept; #endif # 129 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/stdexcept" 3 #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_USE_CXX11_ABI || _GLIBCXX_DEFINE_STDEXCEPT_COPY_OPS #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 131 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/stdexcept" 3 logic_error(const logic_error&) _GLIBCXX_NOTHROW; logic_error& operator=(const logic_error&) _GLIBCXX_NOTHROW; #if 0 /* disabled by -frewrite-includes */ #if 0 #elif __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 134 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/stdexcept" 3 logic_error(const logic_error&) = default; logic_error& operator=(const logic_error&) = default; #endif # 137 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/stdexcept" 3 virtual ~logic_error() _GLIBCXX_TXN_SAFE_DYN _GLIBCXX_NOTHROW; /** Returns a C-style character string describing the general cause of * the current error (the same string passed to the ctor). */ virtual const char* what() const _GLIBCXX_TXN_SAFE_DYN _GLIBCXX_NOTHROW; # ifdef _GLIBCXX_TM_TS_INTERNAL friend void* ::_txnal_logic_error_get_msg(void* e); # endif # 149 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/stdexcept" 3 }; /** Thrown by the library, or by you, to report domain errors (domain in * the mathematical sense). */ class domain_error : public logic_error { public: explicit domain_error(const string& __arg) _GLIBCXX_TXN_SAFE; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 158 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/stdexcept" 3 explicit domain_error(const char*) _GLIBCXX_TXN_SAFE; domain_error(const domain_error&) = default; domain_error& operator=(const domain_error&) = default; domain_error(domain_error&&) = default; domain_error& operator=(domain_error&&) = default; #endif # 164 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/stdexcept" 3 virtual ~domain_error() _GLIBCXX_NOTHROW; }; /** Thrown to report invalid arguments to functions. */ class invalid_argument : public logic_error { public: explicit invalid_argument(const string& __arg) _GLIBCXX_TXN_SAFE; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 173 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/stdexcept" 3 explicit invalid_argument(const char*) _GLIBCXX_TXN_SAFE; invalid_argument(const invalid_argument&) = default; invalid_argument& operator=(const invalid_argument&) = default; invalid_argument(invalid_argument&&) = default; invalid_argument& operator=(invalid_argument&&) = default; #endif # 179 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/stdexcept" 3 virtual ~invalid_argument() _GLIBCXX_NOTHROW; }; /** Thrown when an object is constructed that would exceed its maximum * permitted size (e.g., a basic_string instance). */ class length_error : public logic_error { public: explicit length_error(const string& __arg) _GLIBCXX_TXN_SAFE; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 189 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/stdexcept" 3 explicit length_error(const char*) _GLIBCXX_TXN_SAFE; length_error(const length_error&) = default; length_error& operator=(const length_error&) = default; length_error(length_error&&) = default; length_error& operator=(length_error&&) = default; #endif # 195 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/stdexcept" 3 virtual ~length_error() _GLIBCXX_NOTHROW; }; /** This represents an argument whose value is not within the expected * range (e.g., boundary checks in basic_string). */ class out_of_range : public logic_error { public: explicit out_of_range(const string& __arg) _GLIBCXX_TXN_SAFE; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 205 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/stdexcept" 3 explicit out_of_range(const char*) _GLIBCXX_TXN_SAFE; out_of_range(const out_of_range&) = default; out_of_range& operator=(const out_of_range&) = default; out_of_range(out_of_range&&) = default; out_of_range& operator=(out_of_range&&) = default; #endif # 211 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/stdexcept" 3 virtual ~out_of_range() _GLIBCXX_NOTHROW; }; /** Runtime errors represent problems outside the scope of a program; * they cannot be easily predicted and can generally only be caught as * the program executes. * @brief One of two subclasses of exception. */ class runtime_error : public exception { __cow_string _M_msg; public: /** Takes a character string describing the error. */ explicit runtime_error(const string& __arg) _GLIBCXX_TXN_SAFE; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 229 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/stdexcept" 3 explicit runtime_error(const char*) _GLIBCXX_TXN_SAFE; runtime_error(runtime_error&&) noexcept; runtime_error& operator=(runtime_error&&) noexcept; #endif # 235 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/stdexcept" 3 #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_USE_CXX11_ABI || _GLIBCXX_DEFINE_STDEXCEPT_COPY_OPS #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 237 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/stdexcept" 3 runtime_error(const runtime_error&) _GLIBCXX_NOTHROW; runtime_error& operator=(const runtime_error&) _GLIBCXX_NOTHROW; #if 0 /* disabled by -frewrite-includes */ #if 0 #elif __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #elif 0 /* evaluated by -frewrite-includes */ # 240 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/stdexcept" 3 runtime_error(const runtime_error&) = default; runtime_error& operator=(const runtime_error&) = default; #endif # 243 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/stdexcept" 3 virtual ~runtime_error() _GLIBCXX_TXN_SAFE_DYN _GLIBCXX_NOTHROW; /** Returns a C-style character string describing the general cause of * the current error (the same string passed to the ctor). */ virtual const char* what() const _GLIBCXX_TXN_SAFE_DYN _GLIBCXX_NOTHROW; # ifdef _GLIBCXX_TM_TS_INTERNAL friend void* ::_txnal_runtime_error_get_msg(void* e); # endif # 255 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/stdexcept" 3 }; /** Thrown to indicate range errors in internal computations. */ class range_error : public runtime_error { public: explicit range_error(const string& __arg) _GLIBCXX_TXN_SAFE; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 263 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/stdexcept" 3 explicit range_error(const char*) _GLIBCXX_TXN_SAFE; range_error(const range_error&) = default; range_error& operator=(const range_error&) = default; range_error(range_error&&) = default; range_error& operator=(range_error&&) = default; #endif # 269 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/stdexcept" 3 virtual ~range_error() _GLIBCXX_NOTHROW; }; /** Thrown to indicate arithmetic overflow. */ class overflow_error : public runtime_error { public: explicit overflow_error(const string& __arg) _GLIBCXX_TXN_SAFE; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 278 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/stdexcept" 3 explicit overflow_error(const char*) _GLIBCXX_TXN_SAFE; overflow_error(const overflow_error&) = default; overflow_error& operator=(const overflow_error&) = default; overflow_error(overflow_error&&) = default; overflow_error& operator=(overflow_error&&) = default; #endif # 284 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/stdexcept" 3 virtual ~overflow_error() _GLIBCXX_NOTHROW; }; /** Thrown to indicate arithmetic underflow. */ class underflow_error : public runtime_error { public: explicit underflow_error(const string& __arg) _GLIBCXX_TXN_SAFE; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 293 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/stdexcept" 3 explicit underflow_error(const char*) _GLIBCXX_TXN_SAFE; underflow_error(const underflow_error&) = default; underflow_error& operator=(const underflow_error&) = default; underflow_error(underflow_error&&) = default; underflow_error& operator=(underflow_error&&) = default; #endif # 299 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/stdexcept" 3 virtual ~underflow_error() _GLIBCXX_NOTHROW; }; /// @} group exceptions _GLIBCXX_END_NAMESPACE_VERSION } // namespace #endif /* _GLIBCXX_STDEXCEPT */ # 308 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/stdexcept" 3 # 40 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/array" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/stl_algobase.h> #endif /* expanded by -frewrite-includes */ # 40 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/array" 3 # 41 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/array" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/range_access.h> #endif /* expanded by -frewrite-includes */ # 41 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/array" 3 # 42 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/array" 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template<typename _Tp, std::size_t _Nm> struct __array_traits { typedef _Tp _Type[_Nm]; typedef __is_swappable<_Tp> _Is_swappable; typedef __is_nothrow_swappable<_Tp> _Is_nothrow_swappable; static constexpr _Tp& _S_ref(const _Type& __t, std::size_t __n) noexcept { return const_cast<_Tp&>(__t[__n]); } static constexpr _Tp* _S_ptr(const _Type& __t) noexcept { return const_cast<_Tp*>(__t); } }; template<typename _Tp> struct __array_traits<_Tp, 0> { struct _Type { }; typedef true_type _Is_swappable; typedef true_type _Is_nothrow_swappable; static constexpr _Tp& _S_ref(const _Type&, std::size_t) noexcept { return *static_cast<_Tp*>(nullptr); } static constexpr _Tp* _S_ptr(const _Type&) noexcept { return nullptr; } }; /** * @brief A standard container for storing a fixed size sequence of elements. * * @ingroup sequences * * Meets the requirements of a <a href="tables.html#65">container</a>, a * <a href="tables.html#66">reversible container</a>, and a * <a href="tables.html#67">sequence</a>. * * Sets support random access iterators. * * @tparam Tp Type of element. Required to be a complete type. * @tparam N Number of elements. */ template<typename _Tp, std::size_t _Nm> struct array { typedef _Tp value_type; typedef value_type* pointer; typedef const value_type* const_pointer; typedef value_type& reference; typedef const value_type& const_reference; typedef value_type* iterator; typedef const value_type* const_iterator; typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; typedef std::reverse_iterator<iterator> reverse_iterator; typedef std::reverse_iterator<const_iterator> const_reverse_iterator; // Support for zero-sized arrays mandatory. typedef _GLIBCXX_STD_C::__array_traits<_Tp, _Nm> _AT_Type; typename _AT_Type::_Type _M_elems; // No explicit construct/copy/destroy for aggregate type. // DR 776. void fill(const value_type& __u) { std::fill_n(begin(), size(), __u); } void swap(array& __other) noexcept(_AT_Type::_Is_nothrow_swappable::value) { std::swap_ranges(begin(), end(), __other.begin()); } // Iterators. _GLIBCXX17_CONSTEXPR iterator begin() noexcept { return iterator(data()); } _GLIBCXX17_CONSTEXPR const_iterator begin() const noexcept { return const_iterator(data()); } _GLIBCXX17_CONSTEXPR iterator end() noexcept { return iterator(data() + _Nm); } _GLIBCXX17_CONSTEXPR const_iterator end() const noexcept { return const_iterator(data() + _Nm); } _GLIBCXX17_CONSTEXPR reverse_iterator rbegin() noexcept { return reverse_iterator(end()); } _GLIBCXX17_CONSTEXPR const_reverse_iterator rbegin() const noexcept { return const_reverse_iterator(end()); } _GLIBCXX17_CONSTEXPR reverse_iterator rend() noexcept { return reverse_iterator(begin()); } _GLIBCXX17_CONSTEXPR const_reverse_iterator rend() const noexcept { return const_reverse_iterator(begin()); } _GLIBCXX17_CONSTEXPR const_iterator cbegin() const noexcept { return const_iterator(data()); } _GLIBCXX17_CONSTEXPR const_iterator cend() const noexcept { return const_iterator(data() + _Nm); } _GLIBCXX17_CONSTEXPR const_reverse_iterator crbegin() const noexcept { return const_reverse_iterator(end()); } _GLIBCXX17_CONSTEXPR const_reverse_iterator crend() const noexcept { return const_reverse_iterator(begin()); } // Capacity. constexpr size_type size() const noexcept { return _Nm; } constexpr size_type max_size() const noexcept { return _Nm; } _GLIBCXX_NODISCARD constexpr bool empty() const noexcept { return size() == 0; } // Element access. _GLIBCXX17_CONSTEXPR reference operator[](size_type __n) noexcept { return _AT_Type::_S_ref(_M_elems, __n); } constexpr const_reference operator[](size_type __n) const noexcept { return _AT_Type::_S_ref(_M_elems, __n); } _GLIBCXX17_CONSTEXPR reference at(size_type __n) { if (__n >= _Nm) std::__throw_out_of_range_fmt(__N("array::at: __n (which is %zu) " ">= _Nm (which is %zu)"), __n, _Nm); return _AT_Type::_S_ref(_M_elems, __n); } constexpr const_reference at(size_type __n) const { // Result of conditional expression must be an lvalue so use // boolean ? lvalue : (throw-expr, lvalue) return __n < _Nm ? _AT_Type::_S_ref(_M_elems, __n) : (std::__throw_out_of_range_fmt(__N("array::at: __n (which is %zu) " ">= _Nm (which is %zu)"), __n, _Nm), _AT_Type::_S_ref(_M_elems, 0)); } _GLIBCXX17_CONSTEXPR reference front() noexcept { return *begin(); } constexpr const_reference front() const noexcept { return _AT_Type::_S_ref(_M_elems, 0); } _GLIBCXX17_CONSTEXPR reference back() noexcept { return _Nm ? *(end() - 1) : *end(); } constexpr const_reference back() const noexcept { return _Nm ? _AT_Type::_S_ref(_M_elems, _Nm - 1) : _AT_Type::_S_ref(_M_elems, 0); } _GLIBCXX17_CONSTEXPR pointer data() noexcept { return _AT_Type::_S_ptr(_M_elems); } _GLIBCXX17_CONSTEXPR const_pointer data() const noexcept { return _AT_Type::_S_ptr(_M_elems); } }; #if 0 /* disabled by -frewrite-includes */ #if __cpp_deduction_guides >= 201606 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 243 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/array" 3 template<typename _Tp, typename... _Up> array(_Tp, _Up...) -> array<enable_if_t<(is_same_v<_Tp, _Up> && ...), _Tp>, 1 + sizeof...(_Up)>; #endif # 248 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/array" 3 // Array comparisons. template<typename _Tp, std::size_t _Nm> inline bool operator==(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two) { return std::equal(__one.begin(), __one.end(), __two.begin()); } template<typename _Tp, std::size_t _Nm> inline bool operator!=(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two) { return !(__one == __two); } template<typename _Tp, std::size_t _Nm> inline bool operator<(const array<_Tp, _Nm>& __a, const array<_Tp, _Nm>& __b) { return std::lexicographical_compare(__a.begin(), __a.end(), __b.begin(), __b.end()); } template<typename _Tp, std::size_t _Nm> inline bool operator>(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two) { return __two < __one; } template<typename _Tp, std::size_t _Nm> inline bool operator<=(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two) { return !(__one > __two); } template<typename _Tp, std::size_t _Nm> inline bool operator>=(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two) { return !(__one < __two); } // Specialized algorithms. template<typename _Tp, std::size_t _Nm> inline #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 287 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/array" 3 // Constrained free swap overload, see p0185r1 typename enable_if< _GLIBCXX_STD_C::__array_traits<_Tp, _Nm>::_Is_swappable::value >::type #else # 292 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/array" 3 void #endif # 294 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/array" 3 swap(array<_Tp, _Nm>& __one, array<_Tp, _Nm>& __two) noexcept(noexcept(__one.swap(__two))) { __one.swap(__two); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 299 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/array" 3 template<typename _Tp, std::size_t _Nm> typename enable_if< !_GLIBCXX_STD_C::__array_traits<_Tp, _Nm>::_Is_swappable::value>::type swap(array<_Tp, _Nm>&, array<_Tp, _Nm>&) = delete; #endif # 304 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/array" 3 template<std::size_t _Int, typename _Tp, std::size_t _Nm> constexpr _Tp& get(array<_Tp, _Nm>& __arr) noexcept { static_assert(_Int < _Nm, "array index is within bounds"); return _GLIBCXX_STD_C::__array_traits<_Tp, _Nm>:: _S_ref(__arr._M_elems, _Int); } template<std::size_t _Int, typename _Tp, std::size_t _Nm> constexpr _Tp&& get(array<_Tp, _Nm>&& __arr) noexcept { static_assert(_Int < _Nm, "array index is within bounds"); return std::move(_GLIBCXX_STD_C::get<_Int>(__arr)); } template<std::size_t _Int, typename _Tp, std::size_t _Nm> constexpr const _Tp& get(const array<_Tp, _Nm>& __arr) noexcept { static_assert(_Int < _Nm, "array index is within bounds"); return _GLIBCXX_STD_C::__array_traits<_Tp, _Nm>:: _S_ref(__arr._M_elems, _Int); } template<std::size_t _Int, typename _Tp, std::size_t _Nm> constexpr const _Tp&& get(const array<_Tp, _Nm>&& __arr) noexcept { static_assert(_Int < _Nm, "array index is within bounds"); return std::move(_GLIBCXX_STD_C::get<_Int>(__arr)); } _GLIBCXX_END_NAMESPACE_CONTAINER } // namespace std namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION // Tuple interface to class template array. /// tuple_size template<typename _Tp> struct tuple_size; /// Partial specialization for std::array template<typename _Tp, std::size_t _Nm> struct tuple_size<_GLIBCXX_STD_C::array<_Tp, _Nm>> : public integral_constant<std::size_t, _Nm> { }; /// tuple_element template<std::size_t _Int, typename _Tp> struct tuple_element; /// Partial specialization for std::array template<std::size_t _Int, typename _Tp, std::size_t _Nm> struct tuple_element<_Int, _GLIBCXX_STD_C::array<_Tp, _Nm>> { static_assert(_Int < _Nm, "index is out of bounds"); typedef _Tp type; }; template<typename _Tp, std::size_t _Nm> struct __is_tuple_like_impl<_GLIBCXX_STD_C::array<_Tp, _Nm>> : true_type { }; _GLIBCXX_END_NAMESPACE_VERSION } // namespace std #ifdef _GLIBCXX_DEBUG #if 0 /* expanded by -frewrite-includes */ # include <debug/array> #endif /* expanded by -frewrite-includes */ # 377 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/array" 3 # 378 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/array" 3 #endif # 379 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/array" 3 #ifdef _GLIBCXX_PROFILE #if 0 /* expanded by -frewrite-includes */ # include <profile/array> #endif /* expanded by -frewrite-includes */ # 381 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/array" 3 # 382 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/array" 3 #endif # 383 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/array" 3 #endif // C++11 # 385 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/array" 3 #endif // _GLIBCXX_ARRAY # 387 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/array" 3 # 40 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/tuple" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/uses_allocator.h> #endif /* expanded by -frewrite-includes */ # 40 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/tuple" 3 # 41 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/tuple" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/invoke.h> #endif /* expanded by -frewrite-includes */ # 41 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/tuple" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/invoke.h" 1 3 // Implementation of INVOKE -*- C++ -*- // Copyright (C) 2016-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file include/bits/invoke.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{functional} */ #ifndef _GLIBCXX_INVOKE_H #define _GLIBCXX_INVOKE_H 1 #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 34 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/invoke.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus < 201103L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 36 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/invoke.h" 3 #if 0 /* expanded by -frewrite-includes */ # include <bits/c++0x_warning.h> #endif /* expanded by -frewrite-includes */ # 36 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/invoke.h" 3 # 37 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/invoke.h" 3 #else # 38 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/invoke.h" 3 #if 0 /* expanded by -frewrite-includes */ #include <type_traits> #endif /* expanded by -frewrite-includes */ # 39 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/invoke.h" 3 # 40 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/invoke.h" 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @addtogroup utilities * @{ */ // Used by __invoke_impl instead of std::forward<_Tp> so that a // reference_wrapper is converted to an lvalue-reference. template<typename _Tp, typename _Up = typename __inv_unwrap<_Tp>::type> constexpr _Up&& __invfwd(typename remove_reference<_Tp>::type& __t) noexcept { return static_cast<_Up&&>(__t); } template<typename _Res, typename _Fn, typename... _Args> constexpr _Res __invoke_impl(__invoke_other, _Fn&& __f, _Args&&... __args) { return std::forward<_Fn>(__f)(std::forward<_Args>(__args)...); } template<typename _Res, typename _MemFun, typename _Tp, typename... _Args> constexpr _Res __invoke_impl(__invoke_memfun_ref, _MemFun&& __f, _Tp&& __t, _Args&&... __args) { return (__invfwd<_Tp>(__t).*__f)(std::forward<_Args>(__args)...); } template<typename _Res, typename _MemFun, typename _Tp, typename... _Args> constexpr _Res __invoke_impl(__invoke_memfun_deref, _MemFun&& __f, _Tp&& __t, _Args&&... __args) { return ((*std::forward<_Tp>(__t)).*__f)(std::forward<_Args>(__args)...); } template<typename _Res, typename _MemPtr, typename _Tp> constexpr _Res __invoke_impl(__invoke_memobj_ref, _MemPtr&& __f, _Tp&& __t) { return __invfwd<_Tp>(__t).*__f; } template<typename _Res, typename _MemPtr, typename _Tp> constexpr _Res __invoke_impl(__invoke_memobj_deref, _MemPtr&& __f, _Tp&& __t) { return (*std::forward<_Tp>(__t)).*__f; } /// Invoke a callable object. template<typename _Callable, typename... _Args> constexpr typename __invoke_result<_Callable, _Args...>::type __invoke(_Callable&& __fn, _Args&&... __args) noexcept(__is_nothrow_invocable<_Callable, _Args...>::value) { using __result = __invoke_result<_Callable, _Args...>; using __type = typename __result::type; using __tag = typename __result::__invoke_type; return std::__invoke_impl<__type>(__tag{}, std::forward<_Callable>(__fn), std::forward<_Args>(__args)...); } _GLIBCXX_END_NAMESPACE_VERSION } // namespace std #endif // C++11 # 103 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/invoke.h" 3 #endif // _GLIBCXX_INVOKE_H # 105 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/invoke.h" 3 # 42 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/tuple" 2 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @addtogroup utilities * @{ */ template<typename... _Elements> class tuple; template<typename _Tp> struct __is_empty_non_tuple : is_empty<_Tp> { }; // Using EBO for elements that are tuples causes ambiguous base errors. template<typename _El0, typename... _El> struct __is_empty_non_tuple<tuple<_El0, _El...>> : false_type { }; // Use the Empty Base-class Optimization for empty, non-final types. template<typename _Tp> using __empty_not_final = typename conditional<__is_final(_Tp), false_type, __is_empty_non_tuple<_Tp>>::type; template<std::size_t _Idx, typename _Head, bool = __empty_not_final<_Head>::value> struct _Head_base; template<std::size_t _Idx, typename _Head> struct _Head_base<_Idx, _Head, true> : public _Head { constexpr _Head_base() : _Head() { } constexpr _Head_base(const _Head& __h) : _Head(__h) { } constexpr _Head_base(const _Head_base&) = default; constexpr _Head_base(_Head_base&&) = default; template<typename _UHead> constexpr _Head_base(_UHead&& __h) : _Head(std::forward<_UHead>(__h)) { } _Head_base(allocator_arg_t, __uses_alloc0) : _Head() { } template<typename _Alloc> _Head_base(allocator_arg_t, __uses_alloc1<_Alloc> __a) : _Head(allocator_arg, *__a._M_a) { } template<typename _Alloc> _Head_base(allocator_arg_t, __uses_alloc2<_Alloc> __a) : _Head(*__a._M_a) { } template<typename _UHead> _Head_base(__uses_alloc0, _UHead&& __uhead) : _Head(std::forward<_UHead>(__uhead)) { } template<typename _Alloc, typename _UHead> _Head_base(__uses_alloc1<_Alloc> __a, _UHead&& __uhead) : _Head(allocator_arg, *__a._M_a, std::forward<_UHead>(__uhead)) { } template<typename _Alloc, typename _UHead> _Head_base(__uses_alloc2<_Alloc> __a, _UHead&& __uhead) : _Head(std::forward<_UHead>(__uhead), *__a._M_a) { } static constexpr _Head& _M_head(_Head_base& __b) noexcept { return __b; } static constexpr const _Head& _M_head(const _Head_base& __b) noexcept { return __b; } }; template<std::size_t _Idx, typename _Head> struct _Head_base<_Idx, _Head, false> { constexpr _Head_base() : _M_head_impl() { } constexpr _Head_base(const _Head& __h) : _M_head_impl(__h) { } constexpr _Head_base(const _Head_base&) = default; constexpr _Head_base(_Head_base&&) = default; template<typename _UHead> constexpr _Head_base(_UHead&& __h) : _M_head_impl(std::forward<_UHead>(__h)) { } _Head_base(allocator_arg_t, __uses_alloc0) : _M_head_impl() { } template<typename _Alloc> _Head_base(allocator_arg_t, __uses_alloc1<_Alloc> __a) : _M_head_impl(allocator_arg, *__a._M_a) { } template<typename _Alloc> _Head_base(allocator_arg_t, __uses_alloc2<_Alloc> __a) : _M_head_impl(*__a._M_a) { } template<typename _UHead> _Head_base(__uses_alloc0, _UHead&& __uhead) : _M_head_impl(std::forward<_UHead>(__uhead)) { } template<typename _Alloc, typename _UHead> _Head_base(__uses_alloc1<_Alloc> __a, _UHead&& __uhead) : _M_head_impl(allocator_arg, *__a._M_a, std::forward<_UHead>(__uhead)) { } template<typename _Alloc, typename _UHead> _Head_base(__uses_alloc2<_Alloc> __a, _UHead&& __uhead) : _M_head_impl(std::forward<_UHead>(__uhead), *__a._M_a) { } static constexpr _Head& _M_head(_Head_base& __b) noexcept { return __b._M_head_impl; } static constexpr const _Head& _M_head(const _Head_base& __b) noexcept { return __b._M_head_impl; } _Head _M_head_impl; }; /** * Contains the actual implementation of the @c tuple template, stored * as a recursive inheritance hierarchy from the first element (most * derived class) to the last (least derived class). The @c Idx * parameter gives the 0-based index of the element stored at this * point in the hierarchy; we use it to implement a constant-time * get() operation. */ template<std::size_t _Idx, typename... _Elements> struct _Tuple_impl; /** * Recursive tuple implementation. Here we store the @c Head element * and derive from a @c Tuple_impl containing the remaining elements * (which contains the @c Tail). */ template<std::size_t _Idx, typename _Head, typename... _Tail> struct _Tuple_impl<_Idx, _Head, _Tail...> : public _Tuple_impl<_Idx + 1, _Tail...>, private _Head_base<_Idx, _Head> { template<std::size_t, typename...> friend class _Tuple_impl; typedef _Tuple_impl<_Idx + 1, _Tail...> _Inherited; typedef _Head_base<_Idx, _Head> _Base; static constexpr _Head& _M_head(_Tuple_impl& __t) noexcept { return _Base::_M_head(__t); } static constexpr const _Head& _M_head(const _Tuple_impl& __t) noexcept { return _Base::_M_head(__t); } static constexpr _Inherited& _M_tail(_Tuple_impl& __t) noexcept { return __t; } static constexpr const _Inherited& _M_tail(const _Tuple_impl& __t) noexcept { return __t; } constexpr _Tuple_impl() : _Inherited(), _Base() { } explicit constexpr _Tuple_impl(const _Head& __head, const _Tail&... __tail) : _Inherited(__tail...), _Base(__head) { } template<typename _UHead, typename... _UTail, typename = typename enable_if<sizeof...(_Tail) == sizeof...(_UTail)>::type> explicit constexpr _Tuple_impl(_UHead&& __head, _UTail&&... __tail) : _Inherited(std::forward<_UTail>(__tail)...), _Base(std::forward<_UHead>(__head)) { } constexpr _Tuple_impl(const _Tuple_impl&) = default; // _GLIBCXX_RESOLVE_LIB_DEFECTS // 2729. Missing SFINAE on std::pair::operator= _Tuple_impl& operator=(const _Tuple_impl&) = delete; constexpr _Tuple_impl(_Tuple_impl&& __in) noexcept(__and_<is_nothrow_move_constructible<_Head>, is_nothrow_move_constructible<_Inherited>>::value) : _Inherited(std::move(_M_tail(__in))), _Base(std::forward<_Head>(_M_head(__in))) { } template<typename... _UElements> constexpr _Tuple_impl(const _Tuple_impl<_Idx, _UElements...>& __in) : _Inherited(_Tuple_impl<_Idx, _UElements...>::_M_tail(__in)), _Base(_Tuple_impl<_Idx, _UElements...>::_M_head(__in)) { } template<typename _UHead, typename... _UTails> constexpr _Tuple_impl(_Tuple_impl<_Idx, _UHead, _UTails...>&& __in) : _Inherited(std::move (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_tail(__in))), _Base(std::forward<_UHead> (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_head(__in))) { } template<typename _Alloc> _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a) : _Inherited(__tag, __a), _Base(__tag, __use_alloc<_Head>(__a)) { } template<typename _Alloc> _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, const _Head& __head, const _Tail&... __tail) : _Inherited(__tag, __a, __tail...), _Base(__use_alloc<_Head, _Alloc, _Head>(__a), __head) { } template<typename _Alloc, typename _UHead, typename... _UTail, typename = typename enable_if<sizeof...(_Tail) == sizeof...(_UTail)>::type> _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, _UHead&& __head, _UTail&&... __tail) : _Inherited(__tag, __a, std::forward<_UTail>(__tail)...), _Base(__use_alloc<_Head, _Alloc, _UHead>(__a), std::forward<_UHead>(__head)) { } template<typename _Alloc> _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, const _Tuple_impl& __in) : _Inherited(__tag, __a, _M_tail(__in)), _Base(__use_alloc<_Head, _Alloc, _Head>(__a), _M_head(__in)) { } template<typename _Alloc> _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, _Tuple_impl&& __in) : _Inherited(__tag, __a, std::move(_M_tail(__in))), _Base(__use_alloc<_Head, _Alloc, _Head>(__a), std::forward<_Head>(_M_head(__in))) { } template<typename _Alloc, typename _UHead, typename... _UTails> _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, const _Tuple_impl<_Idx, _UHead, _UTails...>& __in) : _Inherited(__tag, __a, _Tuple_impl<_Idx, _UHead, _UTails...>::_M_tail(__in)), _Base(__use_alloc<_Head, _Alloc, const _UHead&>(__a), _Tuple_impl<_Idx, _UHead, _UTails...>::_M_head(__in)) { } template<typename _Alloc, typename _UHead, typename... _UTails> _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, _Tuple_impl<_Idx, _UHead, _UTails...>&& __in) : _Inherited(__tag, __a, std::move (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_tail(__in))), _Base(__use_alloc<_Head, _Alloc, _UHead>(__a), std::forward<_UHead> (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_head(__in))) { } template<typename... _UElements> void _M_assign(const _Tuple_impl<_Idx, _UElements...>& __in) { _M_head(*this) = _Tuple_impl<_Idx, _UElements...>::_M_head(__in); _M_tail(*this)._M_assign( _Tuple_impl<_Idx, _UElements...>::_M_tail(__in)); } template<typename _UHead, typename... _UTails> void _M_assign(_Tuple_impl<_Idx, _UHead, _UTails...>&& __in) { _M_head(*this) = std::forward<_UHead> (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_head(__in)); _M_tail(*this)._M_assign( std::move(_Tuple_impl<_Idx, _UHead, _UTails...>::_M_tail(__in))); } protected: void _M_swap(_Tuple_impl& __in) { using std::swap; swap(_M_head(*this), _M_head(__in)); _Inherited::_M_swap(_M_tail(__in)); } }; // Basis case of inheritance recursion. template<std::size_t _Idx, typename _Head> struct _Tuple_impl<_Idx, _Head> : private _Head_base<_Idx, _Head> { template<std::size_t, typename...> friend class _Tuple_impl; typedef _Head_base<_Idx, _Head> _Base; static constexpr _Head& _M_head(_Tuple_impl& __t) noexcept { return _Base::_M_head(__t); } static constexpr const _Head& _M_head(const _Tuple_impl& __t) noexcept { return _Base::_M_head(__t); } constexpr _Tuple_impl() : _Base() { } explicit constexpr _Tuple_impl(const _Head& __head) : _Base(__head) { } template<typename _UHead> explicit constexpr _Tuple_impl(_UHead&& __head) : _Base(std::forward<_UHead>(__head)) { } constexpr _Tuple_impl(const _Tuple_impl&) = default; // _GLIBCXX_RESOLVE_LIB_DEFECTS // 2729. Missing SFINAE on std::pair::operator= _Tuple_impl& operator=(const _Tuple_impl&) = delete; constexpr _Tuple_impl(_Tuple_impl&& __in) noexcept(is_nothrow_move_constructible<_Head>::value) : _Base(std::forward<_Head>(_M_head(__in))) { } template<typename _UHead> constexpr _Tuple_impl(const _Tuple_impl<_Idx, _UHead>& __in) : _Base(_Tuple_impl<_Idx, _UHead>::_M_head(__in)) { } template<typename _UHead> constexpr _Tuple_impl(_Tuple_impl<_Idx, _UHead>&& __in) : _Base(std::forward<_UHead>(_Tuple_impl<_Idx, _UHead>::_M_head(__in))) { } template<typename _Alloc> _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a) : _Base(__tag, __use_alloc<_Head>(__a)) { } template<typename _Alloc> _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, const _Head& __head) : _Base(__use_alloc<_Head, _Alloc, _Head>(__a), __head) { } template<typename _Alloc, typename _UHead> _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, _UHead&& __head) : _Base(__use_alloc<_Head, _Alloc, _UHead>(__a), std::forward<_UHead>(__head)) { } template<typename _Alloc> _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, const _Tuple_impl& __in) : _Base(__use_alloc<_Head, _Alloc, _Head>(__a), _M_head(__in)) { } template<typename _Alloc> _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, _Tuple_impl&& __in) : _Base(__use_alloc<_Head, _Alloc, _Head>(__a), std::forward<_Head>(_M_head(__in))) { } template<typename _Alloc, typename _UHead> _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, const _Tuple_impl<_Idx, _UHead>& __in) : _Base(__use_alloc<_Head, _Alloc, const _UHead&>(__a), _Tuple_impl<_Idx, _UHead>::_M_head(__in)) { } template<typename _Alloc, typename _UHead> _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, _Tuple_impl<_Idx, _UHead>&& __in) : _Base(__use_alloc<_Head, _Alloc, _UHead>(__a), std::forward<_UHead>(_Tuple_impl<_Idx, _UHead>::_M_head(__in))) { } template<typename _UHead> void _M_assign(const _Tuple_impl<_Idx, _UHead>& __in) { _M_head(*this) = _Tuple_impl<_Idx, _UHead>::_M_head(__in); } template<typename _UHead> void _M_assign(_Tuple_impl<_Idx, _UHead>&& __in) { _M_head(*this) = std::forward<_UHead>(_Tuple_impl<_Idx, _UHead>::_M_head(__in)); } protected: void _M_swap(_Tuple_impl& __in) { using std::swap; swap(_M_head(*this), _M_head(__in)); } }; // Concept utility functions, reused in conditionally-explicit // constructors. template<bool, typename... _Elements> struct _TC { template<typename... _UElements> static constexpr bool _ConstructibleTuple() { return __and_<is_constructible<_Elements, const _UElements&>...>::value; } template<typename... _UElements> static constexpr bool _ImplicitlyConvertibleTuple() { return __and_<is_convertible<const _UElements&, _Elements>...>::value; } template<typename... _UElements> static constexpr bool _MoveConstructibleTuple() { return __and_<is_constructible<_Elements, _UElements&&>...>::value; } template<typename... _UElements> static constexpr bool _ImplicitlyMoveConvertibleTuple() { return __and_<is_convertible<_UElements&&, _Elements>...>::value; } template<typename _SrcTuple> static constexpr bool _NonNestedTuple() { return __and_<__not_<is_same<tuple<_Elements...>, __remove_cvref_t<_SrcTuple>>>, __not_<is_convertible<_SrcTuple, _Elements...>>, __not_<is_constructible<_Elements..., _SrcTuple>> >::value; } template<typename... _UElements> static constexpr bool _NotSameTuple() { return __not_<is_same<tuple<_Elements...>, __remove_cvref_t<_UElements>...>>::value; } }; template<typename... _Elements> struct _TC<false, _Elements...> { template<typename... _UElements> static constexpr bool _ConstructibleTuple() { return false; } template<typename... _UElements> static constexpr bool _ImplicitlyConvertibleTuple() { return false; } template<typename... _UElements> static constexpr bool _MoveConstructibleTuple() { return false; } template<typename... _UElements> static constexpr bool _ImplicitlyMoveConvertibleTuple() { return false; } template<typename... _UElements> static constexpr bool _NonNestedTuple() { return true; } template<typename... _UElements> static constexpr bool _NotSameTuple() { return true; } }; /// Primary class template, tuple template<typename... _Elements> class tuple : public _Tuple_impl<0, _Elements...> { typedef _Tuple_impl<0, _Elements...> _Inherited; // Used for constraining the default constructor so // that it becomes dependent on the constraints. template<typename _Dummy> struct _TC2 { static constexpr bool _DefaultConstructibleTuple() { return __and_<is_default_constructible<_Elements>...>::value; } static constexpr bool _ImplicitlyDefaultConstructibleTuple() { return __and_<__is_implicitly_default_constructible<_Elements>...> ::value; } }; template<typename... _UElements> static constexpr __enable_if_t<sizeof...(_UElements) == sizeof...(_Elements), bool> __assignable() { return __and_<is_assignable<_Elements&, _UElements>...>::value; } template<typename... _UElements> static constexpr bool __nothrow_assignable() { return __and_<is_nothrow_assignable<_Elements&, _UElements>...>::value; } public: template<typename _Dummy = void, typename enable_if<_TC2<_Dummy>:: _ImplicitlyDefaultConstructibleTuple(), bool>::type = true> constexpr tuple() : _Inherited() { } template<typename _Dummy = void, typename enable_if<_TC2<_Dummy>:: _DefaultConstructibleTuple() && !_TC2<_Dummy>:: _ImplicitlyDefaultConstructibleTuple(), bool>::type = false> explicit constexpr tuple() : _Inherited() { } // Shortcut for the cases where constructors taking _Elements... // need to be constrained. template<typename _Dummy> using _TCC = _TC<is_same<_Dummy, void>::value, _Elements...>; template<typename _Dummy = void, typename enable_if< _TCC<_Dummy>::template _ConstructibleTuple<_Elements...>() && _TCC<_Dummy>::template _ImplicitlyConvertibleTuple<_Elements...>() && (sizeof...(_Elements) >= 1), bool>::type=true> constexpr tuple(const _Elements&... __elements) : _Inherited(__elements...) { } template<typename _Dummy = void, typename enable_if< _TCC<_Dummy>::template _ConstructibleTuple<_Elements...>() && !_TCC<_Dummy>::template _ImplicitlyConvertibleTuple<_Elements...>() && (sizeof...(_Elements) >= 1), bool>::type=false> explicit constexpr tuple(const _Elements&... __elements) : _Inherited(__elements...) { } // Shortcut for the cases where constructors taking _UElements... // need to be constrained. template<typename... _UElements> using _TMC = _TC<(sizeof...(_Elements) == sizeof...(_UElements)) && (_TC<(sizeof...(_UElements)==1), _Elements...>:: template _NotSameTuple<_UElements...>()), _Elements...>; // Shortcut for the cases where constructors taking tuple<_UElements...> // need to be constrained. template<typename... _UElements> using _TMCT = _TC<(sizeof...(_Elements) == sizeof...(_UElements)) && !is_same<tuple<_Elements...>, tuple<_UElements...>>::value, _Elements...>; template<typename... _UElements, typename enable_if< _TMC<_UElements...>::template _MoveConstructibleTuple<_UElements...>() && _TMC<_UElements...>::template _ImplicitlyMoveConvertibleTuple<_UElements...>() && (sizeof...(_Elements) >= 1), bool>::type=true> constexpr tuple(_UElements&&... __elements) : _Inherited(std::forward<_UElements>(__elements)...) { } template<typename... _UElements, typename enable_if< _TMC<_UElements...>::template _MoveConstructibleTuple<_UElements...>() && !_TMC<_UElements...>::template _ImplicitlyMoveConvertibleTuple<_UElements...>() && (sizeof...(_Elements) >= 1), bool>::type=false> explicit constexpr tuple(_UElements&&... __elements) : _Inherited(std::forward<_UElements>(__elements)...) { } constexpr tuple(const tuple&) = default; constexpr tuple(tuple&&) = default; // Shortcut for the cases where constructors taking tuples // must avoid creating temporaries. template<typename _Dummy> using _TNTC = _TC<is_same<_Dummy, void>::value && sizeof...(_Elements) == 1, _Elements...>; template<typename... _UElements, typename _Dummy = void, typename enable_if<_TMCT<_UElements...>::template _ConstructibleTuple<_UElements...>() && _TMCT<_UElements...>::template _ImplicitlyConvertibleTuple<_UElements...>() && _TNTC<_Dummy>::template _NonNestedTuple<const tuple<_UElements...>&>(), bool>::type=true> constexpr tuple(const tuple<_UElements...>& __in) : _Inherited(static_cast<const _Tuple_impl<0, _UElements...>&>(__in)) { } template<typename... _UElements, typename _Dummy = void, typename enable_if<_TMCT<_UElements...>::template _ConstructibleTuple<_UElements...>() && !_TMCT<_UElements...>::template _ImplicitlyConvertibleTuple<_UElements...>() && _TNTC<_Dummy>::template _NonNestedTuple<const tuple<_UElements...>&>(), bool>::type=false> explicit constexpr tuple(const tuple<_UElements...>& __in) : _Inherited(static_cast<const _Tuple_impl<0, _UElements...>&>(__in)) { } template<typename... _UElements, typename _Dummy = void, typename enable_if<_TMCT<_UElements...>::template _MoveConstructibleTuple<_UElements...>() && _TMCT<_UElements...>::template _ImplicitlyMoveConvertibleTuple<_UElements...>() && _TNTC<_Dummy>::template _NonNestedTuple<tuple<_UElements...>&&>(), bool>::type=true> constexpr tuple(tuple<_UElements...>&& __in) : _Inherited(static_cast<_Tuple_impl<0, _UElements...>&&>(__in)) { } template<typename... _UElements, typename _Dummy = void, typename enable_if<_TMCT<_UElements...>::template _MoveConstructibleTuple<_UElements...>() && !_TMCT<_UElements...>::template _ImplicitlyMoveConvertibleTuple<_UElements...>() && _TNTC<_Dummy>::template _NonNestedTuple<tuple<_UElements...>&&>(), bool>::type=false> explicit constexpr tuple(tuple<_UElements...>&& __in) : _Inherited(static_cast<_Tuple_impl<0, _UElements...>&&>(__in)) { } // Allocator-extended constructors. template<typename _Alloc> tuple(allocator_arg_t __tag, const _Alloc& __a) : _Inherited(__tag, __a) { } template<typename _Alloc, typename _Dummy = void, typename enable_if< _TCC<_Dummy>::template _ConstructibleTuple<_Elements...>() && _TCC<_Dummy>::template _ImplicitlyConvertibleTuple<_Elements...>(), bool>::type=true> tuple(allocator_arg_t __tag, const _Alloc& __a, const _Elements&... __elements) : _Inherited(__tag, __a, __elements...) { } template<typename _Alloc, typename _Dummy = void, typename enable_if< _TCC<_Dummy>::template _ConstructibleTuple<_Elements...>() && !_TCC<_Dummy>::template _ImplicitlyConvertibleTuple<_Elements...>(), bool>::type=false> explicit tuple(allocator_arg_t __tag, const _Alloc& __a, const _Elements&... __elements) : _Inherited(__tag, __a, __elements...) { } template<typename _Alloc, typename... _UElements, typename enable_if<_TMC<_UElements...>::template _MoveConstructibleTuple<_UElements...>() && _TMC<_UElements...>::template _ImplicitlyMoveConvertibleTuple<_UElements...>(), bool>::type=true> tuple(allocator_arg_t __tag, const _Alloc& __a, _UElements&&... __elements) : _Inherited(__tag, __a, std::forward<_UElements>(__elements)...) { } template<typename _Alloc, typename... _UElements, typename enable_if<_TMC<_UElements...>::template _MoveConstructibleTuple<_UElements...>() && !_TMC<_UElements...>::template _ImplicitlyMoveConvertibleTuple<_UElements...>(), bool>::type=false> explicit tuple(allocator_arg_t __tag, const _Alloc& __a, _UElements&&... __elements) : _Inherited(__tag, __a, std::forward<_UElements>(__elements)...) { } template<typename _Alloc> tuple(allocator_arg_t __tag, const _Alloc& __a, const tuple& __in) : _Inherited(__tag, __a, static_cast<const _Inherited&>(__in)) { } template<typename _Alloc> tuple(allocator_arg_t __tag, const _Alloc& __a, tuple&& __in) : _Inherited(__tag, __a, static_cast<_Inherited&&>(__in)) { } template<typename _Alloc, typename _Dummy = void, typename... _UElements, typename enable_if<_TMCT<_UElements...>::template _ConstructibleTuple<_UElements...>() && _TMCT<_UElements...>::template _ImplicitlyConvertibleTuple<_UElements...>() && _TNTC<_Dummy>::template _NonNestedTuple<const tuple<_UElements...>&>(), bool>::type=true> tuple(allocator_arg_t __tag, const _Alloc& __a, const tuple<_UElements...>& __in) : _Inherited(__tag, __a, static_cast<const _Tuple_impl<0, _UElements...>&>(__in)) { } template<typename _Alloc, typename _Dummy = void, typename... _UElements, typename enable_if<_TMCT<_UElements...>::template _ConstructibleTuple<_UElements...>() && !_TMCT<_UElements...>::template _ImplicitlyConvertibleTuple<_UElements...>() && _TNTC<_Dummy>::template _NonNestedTuple<const tuple<_UElements...>&>(), bool>::type=false> explicit tuple(allocator_arg_t __tag, const _Alloc& __a, const tuple<_UElements...>& __in) : _Inherited(__tag, __a, static_cast<const _Tuple_impl<0, _UElements...>&>(__in)) { } template<typename _Alloc, typename _Dummy = void, typename... _UElements, typename enable_if<_TMCT<_UElements...>::template _MoveConstructibleTuple<_UElements...>() && _TMCT<_UElements...>::template _ImplicitlyMoveConvertibleTuple<_UElements...>() && _TNTC<_Dummy>::template _NonNestedTuple<tuple<_UElements...>&&>(), bool>::type=true> tuple(allocator_arg_t __tag, const _Alloc& __a, tuple<_UElements...>&& __in) : _Inherited(__tag, __a, static_cast<_Tuple_impl<0, _UElements...>&&>(__in)) { } template<typename _Alloc, typename _Dummy = void, typename... _UElements, typename enable_if<_TMCT<_UElements...>::template _MoveConstructibleTuple<_UElements...>() && !_TMCT<_UElements...>::template _ImplicitlyMoveConvertibleTuple<_UElements...>() && _TNTC<_Dummy>::template _NonNestedTuple<tuple<_UElements...>&&>(), bool>::type=false> explicit tuple(allocator_arg_t __tag, const _Alloc& __a, tuple<_UElements...>&& __in) : _Inherited(__tag, __a, static_cast<_Tuple_impl<0, _UElements...>&&>(__in)) { } // tuple assignment tuple& operator=(typename conditional<__assignable<const _Elements&...>(), const tuple&, const __nonesuch_no_braces&>::type __in) noexcept(__nothrow_assignable<const _Elements&...>()) { this->_M_assign(__in); return *this; } tuple& operator=(typename conditional<__assignable<_Elements...>(), tuple&&, __nonesuch_no_braces&&>::type __in) noexcept(__nothrow_assignable<_Elements...>()) { this->_M_assign(std::move(__in)); return *this; } template<typename... _UElements> __enable_if_t<__assignable<const _UElements&...>(), tuple&> operator=(const tuple<_UElements...>& __in) noexcept(__nothrow_assignable<const _UElements&...>()) { this->_M_assign(__in); return *this; } template<typename... _UElements> __enable_if_t<__assignable<_UElements...>(), tuple&> operator=(tuple<_UElements...>&& __in) noexcept(__nothrow_assignable<_UElements...>()) { this->_M_assign(std::move(__in)); return *this; } // tuple swap void swap(tuple& __in) noexcept(__and_<__is_nothrow_swappable<_Elements>...>::value) { _Inherited::_M_swap(__in); } }; #if 0 /* disabled by -frewrite-includes */ #if __cpp_deduction_guides >= 201606 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 862 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/tuple" 3 template<typename... _UTypes> tuple(_UTypes...) -> tuple<_UTypes...>; template<typename _T1, typename _T2> tuple(pair<_T1, _T2>) -> tuple<_T1, _T2>; template<typename _Alloc, typename... _UTypes> tuple(allocator_arg_t, _Alloc, _UTypes...) -> tuple<_UTypes...>; template<typename _Alloc, typename _T1, typename _T2> tuple(allocator_arg_t, _Alloc, pair<_T1, _T2>) -> tuple<_T1, _T2>; template<typename _Alloc, typename... _UTypes> tuple(allocator_arg_t, _Alloc, tuple<_UTypes...>) -> tuple<_UTypes...>; #endif # 873 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/tuple" 3 // Explicit specialization, zero-element tuple. template<> class tuple<> { public: void swap(tuple&) noexcept { /* no-op */ } // We need the default since we're going to define no-op // allocator constructors. tuple() = default; // No-op allocator constructors. template<typename _Alloc> tuple(allocator_arg_t, const _Alloc&) { } template<typename _Alloc> tuple(allocator_arg_t, const _Alloc&, const tuple&) { } }; /// Partial specialization, 2-element tuple. /// Includes construction and assignment from a pair. template<typename _T1, typename _T2> class tuple<_T1, _T2> : public _Tuple_impl<0, _T1, _T2> { typedef _Tuple_impl<0, _T1, _T2> _Inherited; template<typename _U1, typename _U2> static constexpr bool __assignable() { return __and_<is_assignable<_T1&, _U1>, is_assignable<_T2&, _U2>>::value; } template<typename _U1, typename _U2> static constexpr bool __nothrow_assignable() { return __and_<is_nothrow_assignable<_T1&, _U1>, is_nothrow_assignable<_T2&, _U2>>::value; } public: template <typename _U1 = _T1, typename _U2 = _T2, typename enable_if<__and_< __is_implicitly_default_constructible<_U1>, __is_implicitly_default_constructible<_U2>> ::value, bool>::type = true> constexpr tuple() : _Inherited() { } template <typename _U1 = _T1, typename _U2 = _T2, typename enable_if< __and_< is_default_constructible<_U1>, is_default_constructible<_U2>, __not_< __and_<__is_implicitly_default_constructible<_U1>, __is_implicitly_default_constructible<_U2>>>> ::value, bool>::type = false> explicit constexpr tuple() : _Inherited() { } // Shortcut for the cases where constructors taking _T1, _T2 // need to be constrained. template<typename _Dummy> using _TCC = _TC<is_same<_Dummy, void>::value, _T1, _T2>; template<typename _Dummy = void, typename enable_if<_TCC<_Dummy>::template _ConstructibleTuple<_T1, _T2>() && _TCC<_Dummy>::template _ImplicitlyConvertibleTuple<_T1, _T2>(), bool>::type = true> constexpr tuple(const _T1& __a1, const _T2& __a2) : _Inherited(__a1, __a2) { } template<typename _Dummy = void, typename enable_if<_TCC<_Dummy>::template _ConstructibleTuple<_T1, _T2>() && !_TCC<_Dummy>::template _ImplicitlyConvertibleTuple<_T1, _T2>(), bool>::type = false> explicit constexpr tuple(const _T1& __a1, const _T2& __a2) : _Inherited(__a1, __a2) { } // Shortcut for the cases where constructors taking _U1, _U2 // need to be constrained. using _TMC = _TC<true, _T1, _T2>; template<typename _U1, typename _U2, typename enable_if<_TMC::template _MoveConstructibleTuple<_U1, _U2>() && _TMC::template _ImplicitlyMoveConvertibleTuple<_U1, _U2>() && !is_same<__remove_cvref_t<_U1>, allocator_arg_t>::value, bool>::type = true> constexpr tuple(_U1&& __a1, _U2&& __a2) : _Inherited(std::forward<_U1>(__a1), std::forward<_U2>(__a2)) { } template<typename _U1, typename _U2, typename enable_if<_TMC::template _MoveConstructibleTuple<_U1, _U2>() && !_TMC::template _ImplicitlyMoveConvertibleTuple<_U1, _U2>() && !is_same<__remove_cvref_t<_U1>, allocator_arg_t>::value, bool>::type = false> explicit constexpr tuple(_U1&& __a1, _U2&& __a2) : _Inherited(std::forward<_U1>(__a1), std::forward<_U2>(__a2)) { } constexpr tuple(const tuple&) = default; constexpr tuple(tuple&&) = default; template<typename _U1, typename _U2, typename enable_if<_TMC::template _ConstructibleTuple<_U1, _U2>() && _TMC::template _ImplicitlyConvertibleTuple<_U1, _U2>(), bool>::type = true> constexpr tuple(const tuple<_U1, _U2>& __in) : _Inherited(static_cast<const _Tuple_impl<0, _U1, _U2>&>(__in)) { } template<typename _U1, typename _U2, typename enable_if<_TMC::template _ConstructibleTuple<_U1, _U2>() && !_TMC::template _ImplicitlyConvertibleTuple<_U1, _U2>(), bool>::type = false> explicit constexpr tuple(const tuple<_U1, _U2>& __in) : _Inherited(static_cast<const _Tuple_impl<0, _U1, _U2>&>(__in)) { } template<typename _U1, typename _U2, typename enable_if<_TMC::template _MoveConstructibleTuple<_U1, _U2>() && _TMC::template _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), bool>::type = true> constexpr tuple(tuple<_U1, _U2>&& __in) : _Inherited(static_cast<_Tuple_impl<0, _U1, _U2>&&>(__in)) { } template<typename _U1, typename _U2, typename enable_if<_TMC::template _MoveConstructibleTuple<_U1, _U2>() && !_TMC::template _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), bool>::type = false> explicit constexpr tuple(tuple<_U1, _U2>&& __in) : _Inherited(static_cast<_Tuple_impl<0, _U1, _U2>&&>(__in)) { } template<typename _U1, typename _U2, typename enable_if<_TMC::template _ConstructibleTuple<_U1, _U2>() && _TMC::template _ImplicitlyConvertibleTuple<_U1, _U2>(), bool>::type = true> constexpr tuple(const pair<_U1, _U2>& __in) : _Inherited(__in.first, __in.second) { } template<typename _U1, typename _U2, typename enable_if<_TMC::template _ConstructibleTuple<_U1, _U2>() && !_TMC::template _ImplicitlyConvertibleTuple<_U1, _U2>(), bool>::type = false> explicit constexpr tuple(const pair<_U1, _U2>& __in) : _Inherited(__in.first, __in.second) { } template<typename _U1, typename _U2, typename enable_if<_TMC::template _MoveConstructibleTuple<_U1, _U2>() && _TMC::template _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), bool>::type = true> constexpr tuple(pair<_U1, _U2>&& __in) : _Inherited(std::forward<_U1>(__in.first), std::forward<_U2>(__in.second)) { } template<typename _U1, typename _U2, typename enable_if<_TMC::template _MoveConstructibleTuple<_U1, _U2>() && !_TMC::template _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), bool>::type = false> explicit constexpr tuple(pair<_U1, _U2>&& __in) : _Inherited(std::forward<_U1>(__in.first), std::forward<_U2>(__in.second)) { } // Allocator-extended constructors. template<typename _Alloc> tuple(allocator_arg_t __tag, const _Alloc& __a) : _Inherited(__tag, __a) { } template<typename _Alloc, typename _Dummy = void, typename enable_if< _TCC<_Dummy>::template _ConstructibleTuple<_T1, _T2>() && _TCC<_Dummy>::template _ImplicitlyConvertibleTuple<_T1, _T2>(), bool>::type=true> tuple(allocator_arg_t __tag, const _Alloc& __a, const _T1& __a1, const _T2& __a2) : _Inherited(__tag, __a, __a1, __a2) { } template<typename _Alloc, typename _Dummy = void, typename enable_if< _TCC<_Dummy>::template _ConstructibleTuple<_T1, _T2>() && !_TCC<_Dummy>::template _ImplicitlyConvertibleTuple<_T1, _T2>(), bool>::type=false> explicit tuple(allocator_arg_t __tag, const _Alloc& __a, const _T1& __a1, const _T2& __a2) : _Inherited(__tag, __a, __a1, __a2) { } template<typename _Alloc, typename _U1, typename _U2, typename enable_if<_TMC::template _MoveConstructibleTuple<_U1, _U2>() && _TMC::template _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), bool>::type = true> tuple(allocator_arg_t __tag, const _Alloc& __a, _U1&& __a1, _U2&& __a2) : _Inherited(__tag, __a, std::forward<_U1>(__a1), std::forward<_U2>(__a2)) { } template<typename _Alloc, typename _U1, typename _U2, typename enable_if<_TMC::template _MoveConstructibleTuple<_U1, _U2>() && !_TMC::template _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), bool>::type = false> explicit tuple(allocator_arg_t __tag, const _Alloc& __a, _U1&& __a1, _U2&& __a2) : _Inherited(__tag, __a, std::forward<_U1>(__a1), std::forward<_U2>(__a2)) { } template<typename _Alloc> tuple(allocator_arg_t __tag, const _Alloc& __a, const tuple& __in) : _Inherited(__tag, __a, static_cast<const _Inherited&>(__in)) { } template<typename _Alloc> tuple(allocator_arg_t __tag, const _Alloc& __a, tuple&& __in) : _Inherited(__tag, __a, static_cast<_Inherited&&>(__in)) { } template<typename _Alloc, typename _U1, typename _U2, typename enable_if<_TMC::template _ConstructibleTuple<_U1, _U2>() && _TMC::template _ImplicitlyConvertibleTuple<_U1, _U2>(), bool>::type = true> tuple(allocator_arg_t __tag, const _Alloc& __a, const tuple<_U1, _U2>& __in) : _Inherited(__tag, __a, static_cast<const _Tuple_impl<0, _U1, _U2>&>(__in)) { } template<typename _Alloc, typename _U1, typename _U2, typename enable_if<_TMC::template _ConstructibleTuple<_U1, _U2>() && !_TMC::template _ImplicitlyConvertibleTuple<_U1, _U2>(), bool>::type = false> explicit tuple(allocator_arg_t __tag, const _Alloc& __a, const tuple<_U1, _U2>& __in) : _Inherited(__tag, __a, static_cast<const _Tuple_impl<0, _U1, _U2>&>(__in)) { } template<typename _Alloc, typename _U1, typename _U2, typename enable_if<_TMC::template _MoveConstructibleTuple<_U1, _U2>() && _TMC::template _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), bool>::type = true> tuple(allocator_arg_t __tag, const _Alloc& __a, tuple<_U1, _U2>&& __in) : _Inherited(__tag, __a, static_cast<_Tuple_impl<0, _U1, _U2>&&>(__in)) { } template<typename _Alloc, typename _U1, typename _U2, typename enable_if<_TMC::template _MoveConstructibleTuple<_U1, _U2>() && !_TMC::template _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), bool>::type = false> explicit tuple(allocator_arg_t __tag, const _Alloc& __a, tuple<_U1, _U2>&& __in) : _Inherited(__tag, __a, static_cast<_Tuple_impl<0, _U1, _U2>&&>(__in)) { } template<typename _Alloc, typename _U1, typename _U2, typename enable_if<_TMC::template _ConstructibleTuple<_U1, _U2>() && _TMC::template _ImplicitlyConvertibleTuple<_U1, _U2>(), bool>::type = true> tuple(allocator_arg_t __tag, const _Alloc& __a, const pair<_U1, _U2>& __in) : _Inherited(__tag, __a, __in.first, __in.second) { } template<typename _Alloc, typename _U1, typename _U2, typename enable_if<_TMC::template _ConstructibleTuple<_U1, _U2>() && !_TMC::template _ImplicitlyConvertibleTuple<_U1, _U2>(), bool>::type = false> explicit tuple(allocator_arg_t __tag, const _Alloc& __a, const pair<_U1, _U2>& __in) : _Inherited(__tag, __a, __in.first, __in.second) { } template<typename _Alloc, typename _U1, typename _U2, typename enable_if<_TMC::template _MoveConstructibleTuple<_U1, _U2>() && _TMC::template _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), bool>::type = true> tuple(allocator_arg_t __tag, const _Alloc& __a, pair<_U1, _U2>&& __in) : _Inherited(__tag, __a, std::forward<_U1>(__in.first), std::forward<_U2>(__in.second)) { } template<typename _Alloc, typename _U1, typename _U2, typename enable_if<_TMC::template _MoveConstructibleTuple<_U1, _U2>() && !_TMC::template _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), bool>::type = false> explicit tuple(allocator_arg_t __tag, const _Alloc& __a, pair<_U1, _U2>&& __in) : _Inherited(__tag, __a, std::forward<_U1>(__in.first), std::forward<_U2>(__in.second)) { } tuple& operator=(typename conditional<__assignable<const _T1&, const _T2&>(), const tuple&, const __nonesuch_no_braces&>::type __in) noexcept(__nothrow_assignable<const _T1&, const _T2&>()) { this->_M_assign(__in); return *this; } tuple& operator=(typename conditional<__assignable<_T1, _T2>(), tuple&&, __nonesuch_no_braces&&>::type __in) noexcept(__nothrow_assignable<_T1, _T2>()) { this->_M_assign(std::move(__in)); return *this; } template<typename _U1, typename _U2> __enable_if_t<__assignable<const _U1&, const _U2&>(), tuple&> operator=(const tuple<_U1, _U2>& __in) noexcept(__nothrow_assignable<const _U1&, const _U2&>()) { this->_M_assign(__in); return *this; } template<typename _U1, typename _U2> __enable_if_t<__assignable<_U1, _U2>(), tuple&> operator=(tuple<_U1, _U2>&& __in) noexcept(__nothrow_assignable<_U1, _U2>()) { this->_M_assign(std::move(__in)); return *this; } template<typename _U1, typename _U2> __enable_if_t<__assignable<const _U1&, const _U2&>(), tuple&> operator=(const pair<_U1, _U2>& __in) noexcept(__nothrow_assignable<const _U1&, const _U2&>()) { this->_M_head(*this) = __in.first; this->_M_tail(*this)._M_head(*this) = __in.second; return *this; } template<typename _U1, typename _U2> __enable_if_t<__assignable<_U1, _U2>(), tuple&> operator=(pair<_U1, _U2>&& __in) noexcept(__nothrow_assignable<_U1, _U2>()) { this->_M_head(*this) = std::forward<_U1>(__in.first); this->_M_tail(*this)._M_head(*this) = std::forward<_U2>(__in.second); return *this; } void swap(tuple& __in) noexcept(__and_<__is_nothrow_swappable<_T1>, __is_nothrow_swappable<_T2>>::value) { _Inherited::_M_swap(__in); } }; /// class tuple_size template<typename... _Elements> struct tuple_size<tuple<_Elements...>> : public integral_constant<std::size_t, sizeof...(_Elements)> { }; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201402L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1276 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/tuple" 3 template <typename _Tp> inline constexpr size_t tuple_size_v = tuple_size<_Tp>::value; #endif # 1279 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/tuple" 3 /** * Recursive case for tuple_element: strip off the first element in * the tuple and retrieve the (i-1)th element of the remaining tuple. */ template<std::size_t __i, typename _Head, typename... _Tail> struct tuple_element<__i, tuple<_Head, _Tail...> > : tuple_element<__i - 1, tuple<_Tail...> > { }; /** * Basis case for tuple_element: The first element is the one we're seeking. */ template<typename _Head, typename... _Tail> struct tuple_element<0, tuple<_Head, _Tail...> > { typedef _Head type; }; /** * Error case for tuple_element: invalid index. */ template<size_t __i> struct tuple_element<__i, tuple<>> { static_assert(__i < tuple_size<tuple<>>::value, "tuple index is in range"); }; template<std::size_t __i, typename _Head, typename... _Tail> constexpr _Head& __get_helper(_Tuple_impl<__i, _Head, _Tail...>& __t) noexcept { return _Tuple_impl<__i, _Head, _Tail...>::_M_head(__t); } template<std::size_t __i, typename _Head, typename... _Tail> constexpr const _Head& __get_helper(const _Tuple_impl<__i, _Head, _Tail...>& __t) noexcept { return _Tuple_impl<__i, _Head, _Tail...>::_M_head(__t); } /// Return a reference to the ith element of a tuple. template<std::size_t __i, typename... _Elements> constexpr __tuple_element_t<__i, tuple<_Elements...>>& get(tuple<_Elements...>& __t) noexcept { return std::__get_helper<__i>(__t); } /// Return a const reference to the ith element of a const tuple. template<std::size_t __i, typename... _Elements> constexpr const __tuple_element_t<__i, tuple<_Elements...>>& get(const tuple<_Elements...>& __t) noexcept { return std::__get_helper<__i>(__t); } /// Return an rvalue reference to the ith element of a tuple rvalue. template<std::size_t __i, typename... _Elements> constexpr __tuple_element_t<__i, tuple<_Elements...>>&& get(tuple<_Elements...>&& __t) noexcept { typedef __tuple_element_t<__i, tuple<_Elements...>> __element_type; return std::forward<__element_type&&>(std::get<__i>(__t)); } /// Return a const rvalue reference to the ith element of a const tuple rvalue. template<std::size_t __i, typename... _Elements> constexpr const __tuple_element_t<__i, tuple<_Elements...>>&& get(const tuple<_Elements...>&& __t) noexcept { typedef __tuple_element_t<__i, tuple<_Elements...>> __element_type; return std::forward<const __element_type&&>(std::get<__i>(__t)); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201402L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1348 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/tuple" 3 #define __cpp_lib_tuples_by_type 201304 template<typename _Head, size_t __i, typename... _Tail> constexpr _Head& __get_helper2(_Tuple_impl<__i, _Head, _Tail...>& __t) noexcept { return _Tuple_impl<__i, _Head, _Tail...>::_M_head(__t); } template<typename _Head, size_t __i, typename... _Tail> constexpr const _Head& __get_helper2(const _Tuple_impl<__i, _Head, _Tail...>& __t) noexcept { return _Tuple_impl<__i, _Head, _Tail...>::_M_head(__t); } /// Return a reference to the unique element of type _Tp of a tuple. template <typename _Tp, typename... _Types> constexpr _Tp& get(tuple<_Types...>& __t) noexcept { return std::__get_helper2<_Tp>(__t); } /// Return a reference to the unique element of type _Tp of a tuple rvalue. template <typename _Tp, typename... _Types> constexpr _Tp&& get(tuple<_Types...>&& __t) noexcept { return std::forward<_Tp&&>(std::__get_helper2<_Tp>(__t)); } /// Return a const reference to the unique element of type _Tp of a tuple. template <typename _Tp, typename... _Types> constexpr const _Tp& get(const tuple<_Types...>& __t) noexcept { return std::__get_helper2<_Tp>(__t); } /// Return a const reference to the unique element of type _Tp of /// a const tuple rvalue. template <typename _Tp, typename... _Types> constexpr const _Tp&& get(const tuple<_Types...>&& __t) noexcept { return std::forward<const _Tp&&>(std::__get_helper2<_Tp>(__t)); } #endif # 1386 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/tuple" 3 // This class performs the comparison operations on tuples template<typename _Tp, typename _Up, size_t __i, size_t __size> struct __tuple_compare { static constexpr bool __eq(const _Tp& __t, const _Up& __u) { return bool(std::get<__i>(__t) == std::get<__i>(__u)) && __tuple_compare<_Tp, _Up, __i + 1, __size>::__eq(__t, __u); } static constexpr bool __less(const _Tp& __t, const _Up& __u) { return bool(std::get<__i>(__t) < std::get<__i>(__u)) || (!bool(std::get<__i>(__u) < std::get<__i>(__t)) && __tuple_compare<_Tp, _Up, __i + 1, __size>::__less(__t, __u)); } }; template<typename _Tp, typename _Up, size_t __size> struct __tuple_compare<_Tp, _Up, __size, __size> { static constexpr bool __eq(const _Tp&, const _Up&) { return true; } static constexpr bool __less(const _Tp&, const _Up&) { return false; } }; template<typename... _TElements, typename... _UElements> constexpr bool operator==(const tuple<_TElements...>& __t, const tuple<_UElements...>& __u) { static_assert(sizeof...(_TElements) == sizeof...(_UElements), "tuple objects can only be compared if they have equal sizes."); using __compare = __tuple_compare<tuple<_TElements...>, tuple<_UElements...>, 0, sizeof...(_TElements)>; return __compare::__eq(__t, __u); } template<typename... _TElements, typename... _UElements> constexpr bool operator<(const tuple<_TElements...>& __t, const tuple<_UElements...>& __u) { static_assert(sizeof...(_TElements) == sizeof...(_UElements), "tuple objects can only be compared if they have equal sizes."); using __compare = __tuple_compare<tuple<_TElements...>, tuple<_UElements...>, 0, sizeof...(_TElements)>; return __compare::__less(__t, __u); } template<typename... _TElements, typename... _UElements> constexpr bool operator!=(const tuple<_TElements...>& __t, const tuple<_UElements...>& __u) { return !(__t == __u); } template<typename... _TElements, typename... _UElements> constexpr bool operator>(const tuple<_TElements...>& __t, const tuple<_UElements...>& __u) { return __u < __t; } template<typename... _TElements, typename... _UElements> constexpr bool operator<=(const tuple<_TElements...>& __t, const tuple<_UElements...>& __u) { return !(__u < __t); } template<typename... _TElements, typename... _UElements> constexpr bool operator>=(const tuple<_TElements...>& __t, const tuple<_UElements...>& __u) { return !(__t < __u); } // NB: DR 705. template<typename... _Elements> constexpr tuple<typename __decay_and_strip<_Elements>::__type...> make_tuple(_Elements&&... __args) { typedef tuple<typename __decay_and_strip<_Elements>::__type...> __result_type; return __result_type(std::forward<_Elements>(__args)...); } // _GLIBCXX_RESOLVE_LIB_DEFECTS // 2275. Why is forward_as_tuple not constexpr? /// std::forward_as_tuple template<typename... _Elements> constexpr tuple<_Elements&&...> forward_as_tuple(_Elements&&... __args) noexcept { return tuple<_Elements&&...>(std::forward<_Elements>(__args)...); } template<size_t, typename, typename, size_t> struct __make_tuple_impl; template<size_t _Idx, typename _Tuple, typename... _Tp, size_t _Nm> struct __make_tuple_impl<_Idx, tuple<_Tp...>, _Tuple, _Nm> : __make_tuple_impl<_Idx + 1, tuple<_Tp..., __tuple_element_t<_Idx, _Tuple>>, _Tuple, _Nm> { }; template<std::size_t _Nm, typename _Tuple, typename... _Tp> struct __make_tuple_impl<_Nm, tuple<_Tp...>, _Tuple, _Nm> { typedef tuple<_Tp...> __type; }; template<typename _Tuple> struct __do_make_tuple : __make_tuple_impl<0, tuple<>, _Tuple, std::tuple_size<_Tuple>::value> { }; // Returns the std::tuple equivalent of a tuple-like type. template<typename _Tuple> struct __make_tuple : public __do_make_tuple<__remove_cvref_t<_Tuple>> { }; // Combines several std::tuple's into a single one. template<typename...> struct __combine_tuples; template<> struct __combine_tuples<> { typedef tuple<> __type; }; template<typename... _Ts> struct __combine_tuples<tuple<_Ts...>> { typedef tuple<_Ts...> __type; }; template<typename... _T1s, typename... _T2s, typename... _Rem> struct __combine_tuples<tuple<_T1s...>, tuple<_T2s...>, _Rem...> { typedef typename __combine_tuples<tuple<_T1s..., _T2s...>, _Rem...>::__type __type; }; // Computes the result type of tuple_cat given a set of tuple-like types. template<typename... _Tpls> struct __tuple_cat_result { typedef typename __combine_tuples <typename __make_tuple<_Tpls>::__type...>::__type __type; }; // Helper to determine the index set for the first tuple-like // type of a given set. template<typename...> struct __make_1st_indices; template<> struct __make_1st_indices<> { typedef std::_Index_tuple<> __type; }; template<typename _Tp, typename... _Tpls> struct __make_1st_indices<_Tp, _Tpls...> { typedef typename std::_Build_index_tuple<std::tuple_size< typename std::remove_reference<_Tp>::type>::value>::__type __type; }; // Performs the actual concatenation by step-wise expanding tuple-like // objects into the elements, which are finally forwarded into the // result tuple. template<typename _Ret, typename _Indices, typename... _Tpls> struct __tuple_concater; template<typename _Ret, std::size_t... _Is, typename _Tp, typename... _Tpls> struct __tuple_concater<_Ret, std::_Index_tuple<_Is...>, _Tp, _Tpls...> { template<typename... _Us> static constexpr _Ret _S_do(_Tp&& __tp, _Tpls&&... __tps, _Us&&... __us) { typedef typename __make_1st_indices<_Tpls...>::__type __idx; typedef __tuple_concater<_Ret, __idx, _Tpls...> __next; return __next::_S_do(std::forward<_Tpls>(__tps)..., std::forward<_Us>(__us)..., std::get<_Is>(std::forward<_Tp>(__tp))...); } }; template<typename _Ret> struct __tuple_concater<_Ret, std::_Index_tuple<>> { template<typename... _Us> static constexpr _Ret _S_do(_Us&&... __us) { return _Ret(std::forward<_Us>(__us)...); } }; /// tuple_cat template<typename... _Tpls, typename = typename enable_if<__and_<__is_tuple_like<_Tpls>...>::value>::type> constexpr auto tuple_cat(_Tpls&&... __tpls) -> typename __tuple_cat_result<_Tpls...>::__type { typedef typename __tuple_cat_result<_Tpls...>::__type __ret; typedef typename __make_1st_indices<_Tpls...>::__type __idx; typedef __tuple_concater<__ret, __idx, _Tpls...> __concater; return __concater::_S_do(std::forward<_Tpls>(__tpls)...); } // _GLIBCXX_RESOLVE_LIB_DEFECTS // 2301. Why is tie not constexpr? /// tie template<typename... _Elements> constexpr tuple<_Elements&...> tie(_Elements&... __args) noexcept { return tuple<_Elements&...>(__args...); } /// swap template<typename... _Elements> inline #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1618 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/tuple" 3 // Constrained free swap overload, see p0185r1 typename enable_if<__and_<__is_swappable<_Elements>...>::value >::type #else # 1622 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/tuple" 3 void #endif # 1624 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/tuple" 3 swap(tuple<_Elements...>& __x, tuple<_Elements...>& __y) noexcept(noexcept(__x.swap(__y))) { __x.swap(__y); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1629 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/tuple" 3 template<typename... _Elements> typename enable_if<!__and_<__is_swappable<_Elements>...>::value>::type swap(tuple<_Elements...>&, tuple<_Elements...>&) = delete; #endif # 1633 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/tuple" 3 // A class (and instance) which can be used in 'tie' when an element // of a tuple is not required. // _GLIBCXX14_CONSTEXPR // 2933. PR for LWG 2773 could be clearer struct _Swallow_assign { template<class _Tp> _GLIBCXX14_CONSTEXPR const _Swallow_assign& operator=(const _Tp&) const { return *this; } }; // _GLIBCXX_RESOLVE_LIB_DEFECTS // 2773. Making std::ignore constexpr _GLIBCXX17_INLINE constexpr _Swallow_assign ignore{}; /// Partial specialization for tuples template<typename... _Types, typename _Alloc> struct uses_allocator<tuple<_Types...>, _Alloc> : true_type { }; // See stl_pair.h... template<class _T1, class _T2> template<typename... _Args1, typename... _Args2> inline pair<_T1, _T2>:: pair(piecewise_construct_t, tuple<_Args1...> __first, tuple<_Args2...> __second) : pair(__first, __second, typename _Build_index_tuple<sizeof...(_Args1)>::__type(), typename _Build_index_tuple<sizeof...(_Args2)>::__type()) { } template<class _T1, class _T2> template<typename... _Args1, std::size_t... _Indexes1, typename... _Args2, std::size_t... _Indexes2> inline pair<_T1, _T2>:: pair(tuple<_Args1...>& __tuple1, tuple<_Args2...>& __tuple2, _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>) : first(std::forward<_Args1>(std::get<_Indexes1>(__tuple1))...), second(std::forward<_Args2>(std::get<_Indexes2>(__tuple2))...) { } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1678 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/tuple" 3 # define __cpp_lib_apply 201603 template <typename _Fn, typename _Tuple, size_t... _Idx> constexpr decltype(auto) __apply_impl(_Fn&& __f, _Tuple&& __t, index_sequence<_Idx...>) { return std::__invoke(std::forward<_Fn>(__f), std::get<_Idx>(std::forward<_Tuple>(__t))...); } template <typename _Fn, typename _Tuple> constexpr decltype(auto) apply(_Fn&& __f, _Tuple&& __t) { using _Indices = make_index_sequence<tuple_size_v<remove_reference_t<_Tuple>>>; return std::__apply_impl(std::forward<_Fn>(__f), std::forward<_Tuple>(__t), _Indices{}); } #define __cpp_lib_make_from_tuple 201606 template <typename _Tp, typename _Tuple, size_t... _Idx> constexpr _Tp __make_from_tuple_impl(_Tuple&& __t, index_sequence<_Idx...>) { return _Tp(std::get<_Idx>(std::forward<_Tuple>(__t))...); } template <typename _Tp, typename _Tuple> constexpr _Tp make_from_tuple(_Tuple&& __t) { return __make_from_tuple_impl<_Tp>( std::forward<_Tuple>(__t), make_index_sequence<tuple_size_v<remove_reference_t<_Tuple>>>{}); } #endif // C++17 # 1715 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/tuple" 3 /// @} _GLIBCXX_END_NAMESPACE_VERSION } // namespace std #endif // C++11 # 1722 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/tuple" 3 #endif // _GLIBCXX_TUPLE # 1724 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/tuple" 3 # 35 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/hashtable_policy.h" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <limits> // for std::numeric_limits #endif /* expanded by -frewrite-includes */ # 35 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/hashtable_policy.h" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 1 3 // The template and inlines for the numeric_limits classes. -*- C++ -*- // Copyright (C) 1999-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file include/limits * This is a Standard C++ Library header. */ // Note: this is not a conforming implementation. // Written by Gabriel Dos Reis <gdr@codesourcery.com> // // ISO 14882:1998 // 18.2.1 // #ifndef _GLIBCXX_NUMERIC_LIMITS #define _GLIBCXX_NUMERIC_LIMITS 1 #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 41 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/c++config.h> #endif /* expanded by -frewrite-includes */ # 42 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 # 43 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 // // The numeric_limits<> traits document implementation-defined aspects // of fundamental arithmetic data types (integers and floating points). // From Standard C++ point of view, there are 14 such types: // * integers // bool (1) // char, signed char, unsigned char, wchar_t (4) // short, unsigned short (2) // int, unsigned (2) // long, unsigned long (2) // // * floating points // float (1) // double (1) // long double (1) // // GNU C++ understands (where supported by the host C-library) // * integer // long long, unsigned long long (2) // // which brings us to 16 fundamental arithmetic data types in GNU C++. // // // Since a numeric_limits<> is a bit tricky to get right, we rely on // an interface composed of macros which should be defined in config/os // or config/cpu when they differ from the generic (read arbitrary) // definitions given here. // // These values can be overridden in the target configuration file. // The default values are appropriate for many 32-bit targets. // GCC only intrinsically supports modulo integral types. The only remaining // integral exceptional values is division by zero. Only targets that do not // signal division by zero in some "hard to ignore" way should use false. #ifndef __glibcxx_integral_traps # define __glibcxx_integral_traps true #endif # 82 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 // float // // Default values. Should be overridden in configuration files if necessary. #ifndef __glibcxx_float_has_denorm_loss # define __glibcxx_float_has_denorm_loss false #endif # 91 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 #ifndef __glibcxx_float_traps # define __glibcxx_float_traps false #endif # 94 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 #ifndef __glibcxx_float_tinyness_before # define __glibcxx_float_tinyness_before false #endif # 97 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 // double // Default values. Should be overridden in configuration files if necessary. #ifndef __glibcxx_double_has_denorm_loss # define __glibcxx_double_has_denorm_loss false #endif # 105 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 #ifndef __glibcxx_double_traps # define __glibcxx_double_traps false #endif # 108 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 #ifndef __glibcxx_double_tinyness_before # define __glibcxx_double_tinyness_before false #endif # 111 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 // long double // Default values. Should be overridden in configuration files if necessary. #ifndef __glibcxx_long_double_has_denorm_loss # define __glibcxx_long_double_has_denorm_loss false #endif # 119 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 #ifndef __glibcxx_long_double_traps # define __glibcxx_long_double_traps false #endif # 122 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 #ifndef __glibcxx_long_double_tinyness_before # define __glibcxx_long_double_tinyness_before false #endif # 125 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 // You should not need to define any macros below this point. #define __glibcxx_signed_b(T,B) ((T)(-1) < 0) #define __glibcxx_min_b(T,B) \ (__glibcxx_signed_b (T,B) ? -__glibcxx_max_b (T,B) - 1 : (T)0) #define __glibcxx_max_b(T,B) \ (__glibcxx_signed_b (T,B) ? \ (((((T)1 << (__glibcxx_digits_b (T,B) - 1)) - 1) << 1) + 1) : ~(T)0) #define __glibcxx_digits_b(T,B) \ (B - __glibcxx_signed_b (T,B)) // The fraction 643/2136 approximates log10(2) to 7 significant digits. #define __glibcxx_digits10_b(T,B) \ (__glibcxx_digits_b (T,B) * 643L / 2136) #define __glibcxx_signed(T) \ __glibcxx_signed_b (T, sizeof(T) * __CHAR_BIT__) #define __glibcxx_min(T) \ __glibcxx_min_b (T, sizeof(T) * __CHAR_BIT__) #define __glibcxx_max(T) \ __glibcxx_max_b (T, sizeof(T) * __CHAR_BIT__) #define __glibcxx_digits(T) \ __glibcxx_digits_b (T, sizeof(T) * __CHAR_BIT__) #define __glibcxx_digits10(T) \ __glibcxx_digits10_b (T, sizeof(T) * __CHAR_BIT__) #define __glibcxx_max_digits10(T) \ (2 + (T) * 643L / 2136) namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @brief Describes the rounding style for floating-point types. * * This is used in the std::numeric_limits class. */ enum float_round_style { round_indeterminate = -1, /// Intermediate. round_toward_zero = 0, /// To zero. round_to_nearest = 1, /// To the nearest representable value. round_toward_infinity = 2, /// To infinity. round_toward_neg_infinity = 3 /// To negative infinity. }; /** * @brief Describes the denormalization for floating-point types. * * These values represent the presence or absence of a variable number * of exponent bits. This type is used in the std::numeric_limits class. */ enum float_denorm_style { /// Indeterminate at compile time whether denormalized values are allowed. denorm_indeterminate = -1, /// The type does not allow denormalized values. denorm_absent = 0, /// The type allows denormalized values. denorm_present = 1 }; /** * @brief Part of std::numeric_limits. * * The @c static @c const members are usable as integral constant * expressions. * * @note This is a separate class for purposes of efficiency; you * should only access these members as part of an instantiation * of the std::numeric_limits class. */ struct __numeric_limits_base { /** This will be true for all fundamental types (which have specializations), and false for everything else. */ static _GLIBCXX_USE_CONSTEXPR bool is_specialized = false; /** The number of @c radix digits that be represented without change: for integer types, the number of non-sign bits in the mantissa; for floating types, the number of @c radix digits in the mantissa. */ static _GLIBCXX_USE_CONSTEXPR int digits = 0; /** The number of base 10 digits that can be represented without change. */ static _GLIBCXX_USE_CONSTEXPR int digits10 = 0; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 217 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 /** The number of base 10 digits required to ensure that values which differ are always differentiated. */ static constexpr int max_digits10 = 0; #endif # 221 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 /** True if the type is signed. */ static _GLIBCXX_USE_CONSTEXPR bool is_signed = false; /** True if the type is integer. */ static _GLIBCXX_USE_CONSTEXPR bool is_integer = false; /** True if the type uses an exact representation. All integer types are exact, but not all exact types are integer. For example, rational and fixed-exponent representations are exact but not integer. */ static _GLIBCXX_USE_CONSTEXPR bool is_exact = false; /** For integer types, specifies the base of the representation. For floating types, specifies the base of the exponent representation. */ static _GLIBCXX_USE_CONSTEXPR int radix = 0; /** The minimum negative integer such that @c radix raised to the power of (one less than that integer) is a normalized floating point number. */ static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; /** The minimum negative integer such that 10 raised to that power is in the range of normalized floating point numbers. */ static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0; /** The maximum positive integer such that @c radix raised to the power of (one less than that integer) is a representable finite floating point number. */ static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0; /** The maximum positive integer such that 10 raised to that power is in the range of representable finite floating point numbers. */ static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0; /** True if the type has a representation for positive infinity. */ static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; /** True if the type has a representation for a quiet (non-signaling) Not a Number. */ static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; /** True if the type has a representation for a signaling Not a Number. */ static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; /** See std::float_denorm_style for more information. */ static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm = denorm_absent; /** True if loss of accuracy is detected as a denormalization loss, rather than as an inexact result. */ static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; /** True if-and-only-if the type adheres to the IEC 559 standard, also known as IEEE 754. (Only makes sense for floating point types.) */ static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false; /** True if the set of values representable by the type is finite. All built-in types are bounded, this member would be false for arbitrary precision types. */ static _GLIBCXX_USE_CONSTEXPR bool is_bounded = false; /** True if the type is @e modulo. A type is modulo if, for any operation involving +, -, or * on values of that type whose result would fall outside the range [min(),max()], the value returned differs from the true value by an integer multiple of max() - min() + 1. On most machines, this is false for floating types, true for unsigned integers, and true for signed integers. See PR22200 about signed integers. */ static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false; /** True if trapping is implemented for this type. */ static _GLIBCXX_USE_CONSTEXPR bool traps = false; /** True if tininess is detected before rounding. (see IEC 559) */ static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; /** See std::float_round_style for more information. This is only meaningful for floating types; integer types will all be round_toward_zero. */ static _GLIBCXX_USE_CONSTEXPR float_round_style round_style = round_toward_zero; }; /** * @brief Properties of fundamental types. * * This class allows a program to obtain information about the * representation of a fundamental type on a given platform. For * non-fundamental types, the functions will return 0 and the data * members will all be @c false. */ template<typename _Tp> struct numeric_limits : public __numeric_limits_base { /** The minimum finite value, or for floating types with denormalization, the minimum positive normalized value. */ static _GLIBCXX_CONSTEXPR _Tp min() _GLIBCXX_USE_NOEXCEPT { return _Tp(); } /** The maximum finite value. */ static _GLIBCXX_CONSTEXPR _Tp max() _GLIBCXX_USE_NOEXCEPT { return _Tp(); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 324 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 /** A finite value x such that there is no other finite value y * where y < x. */ static constexpr _Tp lowest() noexcept { return _Tp(); } #endif # 329 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 /** The @e machine @e epsilon: the difference between 1 and the least value greater than 1 that is representable. */ static _GLIBCXX_CONSTEXPR _Tp epsilon() _GLIBCXX_USE_NOEXCEPT { return _Tp(); } /** The maximum rounding error measurement (see LIA-1). */ static _GLIBCXX_CONSTEXPR _Tp round_error() _GLIBCXX_USE_NOEXCEPT { return _Tp(); } /** The representation of positive infinity, if @c has_infinity. */ static _GLIBCXX_CONSTEXPR _Tp infinity() _GLIBCXX_USE_NOEXCEPT { return _Tp(); } /** The representation of a quiet Not a Number, if @c has_quiet_NaN. */ static _GLIBCXX_CONSTEXPR _Tp quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return _Tp(); } /** The representation of a signaling Not a Number, if @c has_signaling_NaN. */ static _GLIBCXX_CONSTEXPR _Tp signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return _Tp(); } /** The minimum positive denormalized value. For types where @c has_denorm is false, this is the minimum positive normalized value. */ static _GLIBCXX_CONSTEXPR _Tp denorm_min() _GLIBCXX_USE_NOEXCEPT { return _Tp(); } }; // _GLIBCXX_RESOLVE_LIB_DEFECTS // 559. numeric_limits<const T> template<typename _Tp> struct numeric_limits<const _Tp> : public numeric_limits<_Tp> { }; template<typename _Tp> struct numeric_limits<volatile _Tp> : public numeric_limits<_Tp> { }; template<typename _Tp> struct numeric_limits<const volatile _Tp> : public numeric_limits<_Tp> { }; // Now there follow 16 explicit specializations. Yes, 16. Make sure // you get the count right. (18 in C++11 mode, with char16_t and char32_t.) // (+1 if char8_t is enabled.) // _GLIBCXX_RESOLVE_LIB_DEFECTS // 184. numeric_limits<bool> wording problems /// numeric_limits<bool> specialization. template<> struct numeric_limits<bool> { static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; static _GLIBCXX_CONSTEXPR bool min() _GLIBCXX_USE_NOEXCEPT { return false; } static _GLIBCXX_CONSTEXPR bool max() _GLIBCXX_USE_NOEXCEPT { return true; } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 395 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static constexpr bool lowest() noexcept { return min(); } #endif # 398 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static _GLIBCXX_USE_CONSTEXPR int digits = 1; static _GLIBCXX_USE_CONSTEXPR int digits10 = 0; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 401 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static constexpr int max_digits10 = 0; #endif # 403 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static _GLIBCXX_USE_CONSTEXPR bool is_signed = false; static _GLIBCXX_USE_CONSTEXPR bool is_integer = true; static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; static _GLIBCXX_USE_CONSTEXPR int radix = 2; static _GLIBCXX_CONSTEXPR bool epsilon() _GLIBCXX_USE_NOEXCEPT { return false; } static _GLIBCXX_CONSTEXPR bool round_error() _GLIBCXX_USE_NOEXCEPT { return false; } static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0; static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0; static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0; static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm = denorm_absent; static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; static _GLIBCXX_CONSTEXPR bool infinity() _GLIBCXX_USE_NOEXCEPT { return false; } static _GLIBCXX_CONSTEXPR bool quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return false; } static _GLIBCXX_CONSTEXPR bool signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return false; } static _GLIBCXX_CONSTEXPR bool denorm_min() _GLIBCXX_USE_NOEXCEPT { return false; } static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false; static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true; static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false; // It is not clear what it means for a boolean type to trap. // This is a DR on the LWG issue list. Here, I use integer // promotion semantics. static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps; static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; static _GLIBCXX_USE_CONSTEXPR float_round_style round_style = round_toward_zero; }; /// numeric_limits<char> specialization. template<> struct numeric_limits<char> { static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; static _GLIBCXX_CONSTEXPR char min() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_min(char); } static _GLIBCXX_CONSTEXPR char max() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_max(char); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 464 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static constexpr char lowest() noexcept { return min(); } #endif # 467 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (char); static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (char); #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 471 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static constexpr int max_digits10 = 0; #endif # 473 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static _GLIBCXX_USE_CONSTEXPR bool is_signed = __glibcxx_signed (char); static _GLIBCXX_USE_CONSTEXPR bool is_integer = true; static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; static _GLIBCXX_USE_CONSTEXPR int radix = 2; static _GLIBCXX_CONSTEXPR char epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; } static _GLIBCXX_CONSTEXPR char round_error() _GLIBCXX_USE_NOEXCEPT { return 0; } static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0; static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0; static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0; static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm = denorm_absent; static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; static _GLIBCXX_CONSTEXPR char infinity() _GLIBCXX_USE_NOEXCEPT { return char(); } static _GLIBCXX_CONSTEXPR char quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return char(); } static _GLIBCXX_CONSTEXPR char signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return char(); } static _GLIBCXX_CONSTEXPR char denorm_min() _GLIBCXX_USE_NOEXCEPT { return static_cast<char>(0); } static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false; static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true; static _GLIBCXX_USE_CONSTEXPR bool is_modulo = !is_signed; static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps; static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; static _GLIBCXX_USE_CONSTEXPR float_round_style round_style = round_toward_zero; }; /// numeric_limits<signed char> specialization. template<> struct numeric_limits<signed char> { static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; static _GLIBCXX_CONSTEXPR signed char min() _GLIBCXX_USE_NOEXCEPT { return -__SCHAR_MAX__ - 1; } static _GLIBCXX_CONSTEXPR signed char max() _GLIBCXX_USE_NOEXCEPT { return __SCHAR_MAX__; } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 531 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static constexpr signed char lowest() noexcept { return min(); } #endif # 534 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (signed char); static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (signed char); #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 539 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static constexpr int max_digits10 = 0; #endif # 541 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static _GLIBCXX_USE_CONSTEXPR bool is_signed = true; static _GLIBCXX_USE_CONSTEXPR bool is_integer = true; static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; static _GLIBCXX_USE_CONSTEXPR int radix = 2; static _GLIBCXX_CONSTEXPR signed char epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; } static _GLIBCXX_CONSTEXPR signed char round_error() _GLIBCXX_USE_NOEXCEPT { return 0; } static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0; static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0; static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0; static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm = denorm_absent; static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; static _GLIBCXX_CONSTEXPR signed char infinity() _GLIBCXX_USE_NOEXCEPT { return static_cast<signed char>(0); } static _GLIBCXX_CONSTEXPR signed char quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<signed char>(0); } static _GLIBCXX_CONSTEXPR signed char signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<signed char>(0); } static _GLIBCXX_CONSTEXPR signed char denorm_min() _GLIBCXX_USE_NOEXCEPT { return static_cast<signed char>(0); } static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false; static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true; static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false; static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps; static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; static _GLIBCXX_USE_CONSTEXPR float_round_style round_style = round_toward_zero; }; /// numeric_limits<unsigned char> specialization. template<> struct numeric_limits<unsigned char> { static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; static _GLIBCXX_CONSTEXPR unsigned char min() _GLIBCXX_USE_NOEXCEPT { return 0; } static _GLIBCXX_CONSTEXPR unsigned char max() _GLIBCXX_USE_NOEXCEPT { return __SCHAR_MAX__ * 2U + 1; } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 601 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static constexpr unsigned char lowest() noexcept { return min(); } #endif # 604 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (unsigned char); static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (unsigned char); #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 610 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static constexpr int max_digits10 = 0; #endif # 612 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static _GLIBCXX_USE_CONSTEXPR bool is_signed = false; static _GLIBCXX_USE_CONSTEXPR bool is_integer = true; static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; static _GLIBCXX_USE_CONSTEXPR int radix = 2; static _GLIBCXX_CONSTEXPR unsigned char epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; } static _GLIBCXX_CONSTEXPR unsigned char round_error() _GLIBCXX_USE_NOEXCEPT { return 0; } static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0; static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0; static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0; static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm = denorm_absent; static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; static _GLIBCXX_CONSTEXPR unsigned char infinity() _GLIBCXX_USE_NOEXCEPT { return static_cast<unsigned char>(0); } static _GLIBCXX_CONSTEXPR unsigned char quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<unsigned char>(0); } static _GLIBCXX_CONSTEXPR unsigned char signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<unsigned char>(0); } static _GLIBCXX_CONSTEXPR unsigned char denorm_min() _GLIBCXX_USE_NOEXCEPT { return static_cast<unsigned char>(0); } static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false; static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true; static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true; static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps; static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; static _GLIBCXX_USE_CONSTEXPR float_round_style round_style = round_toward_zero; }; /// numeric_limits<wchar_t> specialization. template<> struct numeric_limits<wchar_t> { static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; static _GLIBCXX_CONSTEXPR wchar_t min() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_min (wchar_t); } static _GLIBCXX_CONSTEXPR wchar_t max() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_max (wchar_t); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 674 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static constexpr wchar_t lowest() noexcept { return min(); } #endif # 677 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (wchar_t); static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (wchar_t); #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 682 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static constexpr int max_digits10 = 0; #endif # 684 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static _GLIBCXX_USE_CONSTEXPR bool is_signed = __glibcxx_signed (wchar_t); static _GLIBCXX_USE_CONSTEXPR bool is_integer = true; static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; static _GLIBCXX_USE_CONSTEXPR int radix = 2; static _GLIBCXX_CONSTEXPR wchar_t epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; } static _GLIBCXX_CONSTEXPR wchar_t round_error() _GLIBCXX_USE_NOEXCEPT { return 0; } static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0; static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0; static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0; static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm = denorm_absent; static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; static _GLIBCXX_CONSTEXPR wchar_t infinity() _GLIBCXX_USE_NOEXCEPT { return wchar_t(); } static _GLIBCXX_CONSTEXPR wchar_t quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return wchar_t(); } static _GLIBCXX_CONSTEXPR wchar_t signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return wchar_t(); } static _GLIBCXX_CONSTEXPR wchar_t denorm_min() _GLIBCXX_USE_NOEXCEPT { return wchar_t(); } static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false; static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true; static _GLIBCXX_USE_CONSTEXPR bool is_modulo = !is_signed; static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps; static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; static _GLIBCXX_USE_CONSTEXPR float_round_style round_style = round_toward_zero; }; #if 0 /* disabled by -frewrite-includes */ #if _GLIBCXX_USE_CHAR8_T #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 730 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 /// numeric_limits<char8_t> specialization. template<> struct numeric_limits<char8_t> { static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; static _GLIBCXX_CONSTEXPR char8_t min() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_min (char8_t); } static _GLIBCXX_CONSTEXPR char8_t max() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_max (char8_t); } static _GLIBCXX_CONSTEXPR char8_t lowest() _GLIBCXX_USE_NOEXCEPT { return min(); } static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (char8_t); static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (char8_t); static _GLIBCXX_USE_CONSTEXPR int max_digits10 = 0; static _GLIBCXX_USE_CONSTEXPR bool is_signed = __glibcxx_signed (char8_t); static _GLIBCXX_USE_CONSTEXPR bool is_integer = true; static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; static _GLIBCXX_USE_CONSTEXPR int radix = 2; static _GLIBCXX_CONSTEXPR char8_t epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; } static _GLIBCXX_CONSTEXPR char8_t round_error() _GLIBCXX_USE_NOEXCEPT { return 0; } static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0; static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0; static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0; static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm = denorm_absent; static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; static _GLIBCXX_CONSTEXPR char8_t infinity() _GLIBCXX_USE_NOEXCEPT { return char8_t(); } static _GLIBCXX_CONSTEXPR char8_t quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return char8_t(); } static _GLIBCXX_CONSTEXPR char8_t signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return char8_t(); } static _GLIBCXX_CONSTEXPR char8_t denorm_min() _GLIBCXX_USE_NOEXCEPT { return char8_t(); } static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false; static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true; static _GLIBCXX_USE_CONSTEXPR bool is_modulo = !is_signed; static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps; static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; static _GLIBCXX_USE_CONSTEXPR float_round_style round_style = round_toward_zero; }; #endif # 793 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 795 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 /// numeric_limits<char16_t> specialization. template<> struct numeric_limits<char16_t> { static constexpr bool is_specialized = true; static constexpr char16_t min() noexcept { return __glibcxx_min (char16_t); } static constexpr char16_t max() noexcept { return __glibcxx_max (char16_t); } static constexpr char16_t lowest() noexcept { return min(); } static constexpr int digits = __glibcxx_digits (char16_t); static constexpr int digits10 = __glibcxx_digits10 (char16_t); static constexpr int max_digits10 = 0; static constexpr bool is_signed = __glibcxx_signed (char16_t); static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr char16_t epsilon() noexcept { return 0; } static constexpr char16_t round_error() noexcept { return 0; } static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr char16_t infinity() noexcept { return char16_t(); } static constexpr char16_t quiet_NaN() noexcept { return char16_t(); } static constexpr char16_t signaling_NaN() noexcept { return char16_t(); } static constexpr char16_t denorm_min() noexcept { return char16_t(); } static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = !is_signed; static constexpr bool traps = __glibcxx_integral_traps; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; /// numeric_limits<char32_t> specialization. template<> struct numeric_limits<char32_t> { static constexpr bool is_specialized = true; static constexpr char32_t min() noexcept { return __glibcxx_min (char32_t); } static constexpr char32_t max() noexcept { return __glibcxx_max (char32_t); } static constexpr char32_t lowest() noexcept { return min(); } static constexpr int digits = __glibcxx_digits (char32_t); static constexpr int digits10 = __glibcxx_digits10 (char32_t); static constexpr int max_digits10 = 0; static constexpr bool is_signed = __glibcxx_signed (char32_t); static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr char32_t epsilon() noexcept { return 0; } static constexpr char32_t round_error() noexcept { return 0; } static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr char32_t infinity() noexcept { return char32_t(); } static constexpr char32_t quiet_NaN() noexcept { return char32_t(); } static constexpr char32_t signaling_NaN() noexcept { return char32_t(); } static constexpr char32_t denorm_min() noexcept { return char32_t(); } static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = !is_signed; static constexpr bool traps = __glibcxx_integral_traps; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; #endif # 917 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 /// numeric_limits<short> specialization. template<> struct numeric_limits<short> { static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; static _GLIBCXX_CONSTEXPR short min() _GLIBCXX_USE_NOEXCEPT { return -__SHRT_MAX__ - 1; } static _GLIBCXX_CONSTEXPR short max() _GLIBCXX_USE_NOEXCEPT { return __SHRT_MAX__; } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 931 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static constexpr short lowest() noexcept { return min(); } #endif # 934 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (short); static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (short); #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 938 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static constexpr int max_digits10 = 0; #endif # 940 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static _GLIBCXX_USE_CONSTEXPR bool is_signed = true; static _GLIBCXX_USE_CONSTEXPR bool is_integer = true; static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; static _GLIBCXX_USE_CONSTEXPR int radix = 2; static _GLIBCXX_CONSTEXPR short epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; } static _GLIBCXX_CONSTEXPR short round_error() _GLIBCXX_USE_NOEXCEPT { return 0; } static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0; static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0; static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0; static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm = denorm_absent; static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; static _GLIBCXX_CONSTEXPR short infinity() _GLIBCXX_USE_NOEXCEPT { return short(); } static _GLIBCXX_CONSTEXPR short quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return short(); } static _GLIBCXX_CONSTEXPR short signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return short(); } static _GLIBCXX_CONSTEXPR short denorm_min() _GLIBCXX_USE_NOEXCEPT { return short(); } static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false; static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true; static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false; static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps; static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; static _GLIBCXX_USE_CONSTEXPR float_round_style round_style = round_toward_zero; }; /// numeric_limits<unsigned short> specialization. template<> struct numeric_limits<unsigned short> { static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; static _GLIBCXX_CONSTEXPR unsigned short min() _GLIBCXX_USE_NOEXCEPT { return 0; } static _GLIBCXX_CONSTEXPR unsigned short max() _GLIBCXX_USE_NOEXCEPT { return __SHRT_MAX__ * 2U + 1; } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 998 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static constexpr unsigned short lowest() noexcept { return min(); } #endif # 1001 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (unsigned short); static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (unsigned short); #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1007 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static constexpr int max_digits10 = 0; #endif # 1009 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static _GLIBCXX_USE_CONSTEXPR bool is_signed = false; static _GLIBCXX_USE_CONSTEXPR bool is_integer = true; static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; static _GLIBCXX_USE_CONSTEXPR int radix = 2; static _GLIBCXX_CONSTEXPR unsigned short epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; } static _GLIBCXX_CONSTEXPR unsigned short round_error() _GLIBCXX_USE_NOEXCEPT { return 0; } static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0; static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0; static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0; static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm = denorm_absent; static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; static _GLIBCXX_CONSTEXPR unsigned short infinity() _GLIBCXX_USE_NOEXCEPT { return static_cast<unsigned short>(0); } static _GLIBCXX_CONSTEXPR unsigned short quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<unsigned short>(0); } static _GLIBCXX_CONSTEXPR unsigned short signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<unsigned short>(0); } static _GLIBCXX_CONSTEXPR unsigned short denorm_min() _GLIBCXX_USE_NOEXCEPT { return static_cast<unsigned short>(0); } static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false; static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true; static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true; static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps; static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; static _GLIBCXX_USE_CONSTEXPR float_round_style round_style = round_toward_zero; }; /// numeric_limits<int> specialization. template<> struct numeric_limits<int> { static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; static _GLIBCXX_CONSTEXPR int min() _GLIBCXX_USE_NOEXCEPT { return -__INT_MAX__ - 1; } static _GLIBCXX_CONSTEXPR int max() _GLIBCXX_USE_NOEXCEPT { return __INT_MAX__; } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1071 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static constexpr int lowest() noexcept { return min(); } #endif # 1074 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (int); static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (int); #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1078 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static constexpr int max_digits10 = 0; #endif # 1080 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static _GLIBCXX_USE_CONSTEXPR bool is_signed = true; static _GLIBCXX_USE_CONSTEXPR bool is_integer = true; static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; static _GLIBCXX_USE_CONSTEXPR int radix = 2; static _GLIBCXX_CONSTEXPR int epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; } static _GLIBCXX_CONSTEXPR int round_error() _GLIBCXX_USE_NOEXCEPT { return 0; } static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0; static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0; static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0; static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm = denorm_absent; static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; static _GLIBCXX_CONSTEXPR int infinity() _GLIBCXX_USE_NOEXCEPT { return static_cast<int>(0); } static _GLIBCXX_CONSTEXPR int quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<int>(0); } static _GLIBCXX_CONSTEXPR int signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<int>(0); } static _GLIBCXX_CONSTEXPR int denorm_min() _GLIBCXX_USE_NOEXCEPT { return static_cast<int>(0); } static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false; static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true; static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false; static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps; static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; static _GLIBCXX_USE_CONSTEXPR float_round_style round_style = round_toward_zero; }; /// numeric_limits<unsigned int> specialization. template<> struct numeric_limits<unsigned int> { static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; static _GLIBCXX_CONSTEXPR unsigned int min() _GLIBCXX_USE_NOEXCEPT { return 0; } static _GLIBCXX_CONSTEXPR unsigned int max() _GLIBCXX_USE_NOEXCEPT { return __INT_MAX__ * 2U + 1; } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1138 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static constexpr unsigned int lowest() noexcept { return min(); } #endif # 1141 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (unsigned int); static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (unsigned int); #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1147 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static constexpr int max_digits10 = 0; #endif # 1149 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static _GLIBCXX_USE_CONSTEXPR bool is_signed = false; static _GLIBCXX_USE_CONSTEXPR bool is_integer = true; static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; static _GLIBCXX_USE_CONSTEXPR int radix = 2; static _GLIBCXX_CONSTEXPR unsigned int epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; } static _GLIBCXX_CONSTEXPR unsigned int round_error() _GLIBCXX_USE_NOEXCEPT { return 0; } static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0; static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0; static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0; static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm = denorm_absent; static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; static _GLIBCXX_CONSTEXPR unsigned int infinity() _GLIBCXX_USE_NOEXCEPT { return static_cast<unsigned int>(0); } static _GLIBCXX_CONSTEXPR unsigned int quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<unsigned int>(0); } static _GLIBCXX_CONSTEXPR unsigned int signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<unsigned int>(0); } static _GLIBCXX_CONSTEXPR unsigned int denorm_min() _GLIBCXX_USE_NOEXCEPT { return static_cast<unsigned int>(0); } static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false; static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true; static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true; static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps; static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; static _GLIBCXX_USE_CONSTEXPR float_round_style round_style = round_toward_zero; }; /// numeric_limits<long> specialization. template<> struct numeric_limits<long> { static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; static _GLIBCXX_CONSTEXPR long min() _GLIBCXX_USE_NOEXCEPT { return -__LONG_MAX__ - 1; } static _GLIBCXX_CONSTEXPR long max() _GLIBCXX_USE_NOEXCEPT { return __LONG_MAX__; } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1210 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static constexpr long lowest() noexcept { return min(); } #endif # 1213 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (long); static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (long); #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1217 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static constexpr int max_digits10 = 0; #endif # 1219 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static _GLIBCXX_USE_CONSTEXPR bool is_signed = true; static _GLIBCXX_USE_CONSTEXPR bool is_integer = true; static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; static _GLIBCXX_USE_CONSTEXPR int radix = 2; static _GLIBCXX_CONSTEXPR long epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; } static _GLIBCXX_CONSTEXPR long round_error() _GLIBCXX_USE_NOEXCEPT { return 0; } static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0; static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0; static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0; static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm = denorm_absent; static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; static _GLIBCXX_CONSTEXPR long infinity() _GLIBCXX_USE_NOEXCEPT { return static_cast<long>(0); } static _GLIBCXX_CONSTEXPR long quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<long>(0); } static _GLIBCXX_CONSTEXPR long signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<long>(0); } static _GLIBCXX_CONSTEXPR long denorm_min() _GLIBCXX_USE_NOEXCEPT { return static_cast<long>(0); } static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false; static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true; static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false; static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps; static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; static _GLIBCXX_USE_CONSTEXPR float_round_style round_style = round_toward_zero; }; /// numeric_limits<unsigned long> specialization. template<> struct numeric_limits<unsigned long> { static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; static _GLIBCXX_CONSTEXPR unsigned long min() _GLIBCXX_USE_NOEXCEPT { return 0; } static _GLIBCXX_CONSTEXPR unsigned long max() _GLIBCXX_USE_NOEXCEPT { return __LONG_MAX__ * 2UL + 1; } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1277 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static constexpr unsigned long lowest() noexcept { return min(); } #endif # 1280 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (unsigned long); static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (unsigned long); #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1286 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static constexpr int max_digits10 = 0; #endif # 1288 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static _GLIBCXX_USE_CONSTEXPR bool is_signed = false; static _GLIBCXX_USE_CONSTEXPR bool is_integer = true; static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; static _GLIBCXX_USE_CONSTEXPR int radix = 2; static _GLIBCXX_CONSTEXPR unsigned long epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; } static _GLIBCXX_CONSTEXPR unsigned long round_error() _GLIBCXX_USE_NOEXCEPT { return 0; } static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0; static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0; static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0; static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm = denorm_absent; static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; static _GLIBCXX_CONSTEXPR unsigned long infinity() _GLIBCXX_USE_NOEXCEPT { return static_cast<unsigned long>(0); } static _GLIBCXX_CONSTEXPR unsigned long quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<unsigned long>(0); } static _GLIBCXX_CONSTEXPR unsigned long signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<unsigned long>(0); } static _GLIBCXX_CONSTEXPR unsigned long denorm_min() _GLIBCXX_USE_NOEXCEPT { return static_cast<unsigned long>(0); } static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false; static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true; static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true; static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps; static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; static _GLIBCXX_USE_CONSTEXPR float_round_style round_style = round_toward_zero; }; /// numeric_limits<long long> specialization. template<> struct numeric_limits<long long> { static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; static _GLIBCXX_CONSTEXPR long long min() _GLIBCXX_USE_NOEXCEPT { return -__LONG_LONG_MAX__ - 1; } static _GLIBCXX_CONSTEXPR long long max() _GLIBCXX_USE_NOEXCEPT { return __LONG_LONG_MAX__; } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1350 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static constexpr long long lowest() noexcept { return min(); } #endif # 1353 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (long long); static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (long long); #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1359 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static constexpr int max_digits10 = 0; #endif # 1361 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static _GLIBCXX_USE_CONSTEXPR bool is_signed = true; static _GLIBCXX_USE_CONSTEXPR bool is_integer = true; static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; static _GLIBCXX_USE_CONSTEXPR int radix = 2; static _GLIBCXX_CONSTEXPR long long epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; } static _GLIBCXX_CONSTEXPR long long round_error() _GLIBCXX_USE_NOEXCEPT { return 0; } static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0; static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0; static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0; static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm = denorm_absent; static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; static _GLIBCXX_CONSTEXPR long long infinity() _GLIBCXX_USE_NOEXCEPT { return static_cast<long long>(0); } static _GLIBCXX_CONSTEXPR long long quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<long long>(0); } static _GLIBCXX_CONSTEXPR long long signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<long long>(0); } static _GLIBCXX_CONSTEXPR long long denorm_min() _GLIBCXX_USE_NOEXCEPT { return static_cast<long long>(0); } static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false; static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true; static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false; static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps; static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; static _GLIBCXX_USE_CONSTEXPR float_round_style round_style = round_toward_zero; }; /// numeric_limits<unsigned long long> specialization. template<> struct numeric_limits<unsigned long long> { static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; static _GLIBCXX_CONSTEXPR unsigned long long min() _GLIBCXX_USE_NOEXCEPT { return 0; } static _GLIBCXX_CONSTEXPR unsigned long long max() _GLIBCXX_USE_NOEXCEPT { return __LONG_LONG_MAX__ * 2ULL + 1; } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1420 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static constexpr unsigned long long lowest() noexcept { return min(); } #endif # 1423 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (unsigned long long); static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (unsigned long long); #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1429 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static constexpr int max_digits10 = 0; #endif # 1431 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static _GLIBCXX_USE_CONSTEXPR bool is_signed = false; static _GLIBCXX_USE_CONSTEXPR bool is_integer = true; static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; static _GLIBCXX_USE_CONSTEXPR int radix = 2; static _GLIBCXX_CONSTEXPR unsigned long long epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; } static _GLIBCXX_CONSTEXPR unsigned long long round_error() _GLIBCXX_USE_NOEXCEPT { return 0; } static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0; static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0; static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0; static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm = denorm_absent; static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; static _GLIBCXX_CONSTEXPR unsigned long long infinity() _GLIBCXX_USE_NOEXCEPT { return static_cast<unsigned long long>(0); } static _GLIBCXX_CONSTEXPR unsigned long long quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<unsigned long long>(0); } static _GLIBCXX_CONSTEXPR unsigned long long signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<unsigned long long>(0); } static _GLIBCXX_CONSTEXPR unsigned long long denorm_min() _GLIBCXX_USE_NOEXCEPT { return static_cast<unsigned long long>(0); } static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false; static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true; static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true; static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps; static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; static _GLIBCXX_USE_CONSTEXPR float_round_style round_style = round_toward_zero; }; #if 0 /* disabled by -frewrite-includes */ #if !defined(__STRICT_ANSI__) #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1481 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 #define __INT_N(TYPE, BITSIZE, EXT, UEXT) \ template<> \ struct numeric_limits<TYPE> \ { \ static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; \ \ static _GLIBCXX_CONSTEXPR TYPE \ min() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_min_b (TYPE, BITSIZE); } \ \ static _GLIBCXX_CONSTEXPR TYPE \ max() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_max_b (TYPE, BITSIZE); } \ \ static _GLIBCXX_USE_CONSTEXPR int digits \ = BITSIZE - 1; \ static _GLIBCXX_USE_CONSTEXPR int digits10 \ = (BITSIZE - 1) * 643L / 2136; \ \ static _GLIBCXX_USE_CONSTEXPR bool is_signed = true; \ static _GLIBCXX_USE_CONSTEXPR bool is_integer = true; \ static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; \ static _GLIBCXX_USE_CONSTEXPR int radix = 2; \ \ static _GLIBCXX_CONSTEXPR TYPE \ epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; } \ \ static _GLIBCXX_CONSTEXPR TYPE \ round_error() _GLIBCXX_USE_NOEXCEPT { return 0; } \ \ EXT \ \ static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; \ static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0; \ static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0; \ static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0; \ \ static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; \ static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; \ static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; \ static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm \ = denorm_absent; \ static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; \ \ static _GLIBCXX_CONSTEXPR TYPE \ infinity() _GLIBCXX_USE_NOEXCEPT \ { return static_cast<TYPE>(0); } \ \ static _GLIBCXX_CONSTEXPR TYPE \ quiet_NaN() _GLIBCXX_USE_NOEXCEPT \ { return static_cast<TYPE>(0); } \ \ static _GLIBCXX_CONSTEXPR TYPE \ signaling_NaN() _GLIBCXX_USE_NOEXCEPT \ { return static_cast<TYPE>(0); } \ \ static _GLIBCXX_CONSTEXPR TYPE \ denorm_min() _GLIBCXX_USE_NOEXCEPT \ { return static_cast<TYPE>(0); } \ \ static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false; \ static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true; \ static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false; \ \ static _GLIBCXX_USE_CONSTEXPR bool traps \ = __glibcxx_integral_traps; \ static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; \ static _GLIBCXX_USE_CONSTEXPR float_round_style round_style \ = round_toward_zero; \ }; \ \ template<> \ struct numeric_limits<unsigned TYPE> \ { \ static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; \ \ static _GLIBCXX_CONSTEXPR unsigned TYPE \ min() _GLIBCXX_USE_NOEXCEPT { return 0; } \ \ static _GLIBCXX_CONSTEXPR unsigned TYPE \ max() _GLIBCXX_USE_NOEXCEPT \ { return __glibcxx_max_b (unsigned TYPE, BITSIZE); } \ \ UEXT \ \ static _GLIBCXX_USE_CONSTEXPR int digits \ = BITSIZE; \ static _GLIBCXX_USE_CONSTEXPR int digits10 \ = BITSIZE * 643L / 2136; \ static _GLIBCXX_USE_CONSTEXPR bool is_signed = false; \ static _GLIBCXX_USE_CONSTEXPR bool is_integer = true; \ static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; \ static _GLIBCXX_USE_CONSTEXPR int radix = 2; \ \ static _GLIBCXX_CONSTEXPR unsigned TYPE \ epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; } \ \ static _GLIBCXX_CONSTEXPR unsigned TYPE \ round_error() _GLIBCXX_USE_NOEXCEPT { return 0; } \ \ static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; \ static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0; \ static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0; \ static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0; \ \ static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; \ static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; \ static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; \ static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm \ = denorm_absent; \ static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; \ \ static _GLIBCXX_CONSTEXPR unsigned TYPE \ infinity() _GLIBCXX_USE_NOEXCEPT \ { return static_cast<unsigned TYPE>(0); } \ \ static _GLIBCXX_CONSTEXPR unsigned TYPE \ quiet_NaN() _GLIBCXX_USE_NOEXCEPT \ { return static_cast<unsigned TYPE>(0); } \ \ static _GLIBCXX_CONSTEXPR unsigned TYPE \ signaling_NaN() _GLIBCXX_USE_NOEXCEPT \ { return static_cast<unsigned TYPE>(0); } \ \ static _GLIBCXX_CONSTEXPR unsigned TYPE \ denorm_min() _GLIBCXX_USE_NOEXCEPT \ { return static_cast<unsigned TYPE>(0); } \ \ static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false; \ static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true; \ static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true; \ \ static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps; \ static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; \ static _GLIBCXX_USE_CONSTEXPR float_round_style round_style \ = round_toward_zero; \ }; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1619 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 #define __INT_N_201103(TYPE) \ static constexpr TYPE \ lowest() noexcept { return min(); } \ static constexpr int max_digits10 = 0; #define __INT_N_U201103(TYPE) \ static constexpr unsigned TYPE \ lowest() noexcept { return min(); } \ static constexpr int max_digits10 = 0; #else # 1631 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 #define __INT_N_201103(TYPE) #define __INT_N_U201103(TYPE) #endif # 1634 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 #ifdef __GLIBCXX_TYPE_INT_N_0 __INT_N(__GLIBCXX_TYPE_INT_N_0, __GLIBCXX_BITSIZE_INT_N_0, __INT_N_201103 (__GLIBCXX_TYPE_INT_N_0), __INT_N_U201103 (__GLIBCXX_TYPE_INT_N_0)) #endif # 1639 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 #ifdef __GLIBCXX_TYPE_INT_N_1 __INT_N (__GLIBCXX_TYPE_INT_N_1, __GLIBCXX_BITSIZE_INT_N_1, __INT_N_201103 (__GLIBCXX_TYPE_INT_N_1), __INT_N_U201103 (__GLIBCXX_TYPE_INT_N_1)) #endif # 1643 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 #ifdef __GLIBCXX_TYPE_INT_N_2 __INT_N (__GLIBCXX_TYPE_INT_N_2, __GLIBCXX_BITSIZE_INT_N_2, __INT_N_201103 (__GLIBCXX_TYPE_INT_N_2), __INT_N_U201103 (__GLIBCXX_TYPE_INT_N_2)) #endif # 1647 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 #ifdef __GLIBCXX_TYPE_INT_N_3 __INT_N (__GLIBCXX_TYPE_INT_N_3, __GLIBCXX_BITSIZE_INT_N_3, __INT_N_201103 (__GLIBCXX_TYPE_INT_N_3), __INT_N_U201103 (__GLIBCXX_TYPE_INT_N_3)) #endif # 1651 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 #undef __INT_N #undef __INT_N_201103 #undef __INT_N_U201103 #endif # 1657 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 /// numeric_limits<float> specialization. template<> struct numeric_limits<float> { static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; static _GLIBCXX_CONSTEXPR float min() _GLIBCXX_USE_NOEXCEPT { return __FLT_MIN__; } static _GLIBCXX_CONSTEXPR float max() _GLIBCXX_USE_NOEXCEPT { return __FLT_MAX__; } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1671 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static constexpr float lowest() noexcept { return -__FLT_MAX__; } #endif # 1674 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static _GLIBCXX_USE_CONSTEXPR int digits = __FLT_MANT_DIG__; static _GLIBCXX_USE_CONSTEXPR int digits10 = __FLT_DIG__; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1678 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static constexpr int max_digits10 = __glibcxx_max_digits10 (__FLT_MANT_DIG__); #endif # 1681 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static _GLIBCXX_USE_CONSTEXPR bool is_signed = true; static _GLIBCXX_USE_CONSTEXPR bool is_integer = false; static _GLIBCXX_USE_CONSTEXPR bool is_exact = false; static _GLIBCXX_USE_CONSTEXPR int radix = __FLT_RADIX__; static _GLIBCXX_CONSTEXPR float epsilon() _GLIBCXX_USE_NOEXCEPT { return __FLT_EPSILON__; } static _GLIBCXX_CONSTEXPR float round_error() _GLIBCXX_USE_NOEXCEPT { return 0.5F; } static _GLIBCXX_USE_CONSTEXPR int min_exponent = __FLT_MIN_EXP__; static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = __FLT_MIN_10_EXP__; static _GLIBCXX_USE_CONSTEXPR int max_exponent = __FLT_MAX_EXP__; static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = __FLT_MAX_10_EXP__; static _GLIBCXX_USE_CONSTEXPR bool has_infinity = __FLT_HAS_INFINITY__; static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = __FLT_HAS_QUIET_NAN__; static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = has_quiet_NaN; static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm = bool(__FLT_HAS_DENORM__) ? denorm_present : denorm_absent; static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = __glibcxx_float_has_denorm_loss; static _GLIBCXX_CONSTEXPR float infinity() _GLIBCXX_USE_NOEXCEPT { return __builtin_huge_valf(); } static _GLIBCXX_CONSTEXPR float quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return __builtin_nanf(""); } static _GLIBCXX_CONSTEXPR float signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return __builtin_nansf(""); } static _GLIBCXX_CONSTEXPR float denorm_min() _GLIBCXX_USE_NOEXCEPT { return __FLT_DENORM_MIN__; } static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = has_infinity && has_quiet_NaN && has_denorm == denorm_present; static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true; static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false; static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_float_traps; static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = __glibcxx_float_tinyness_before; static _GLIBCXX_USE_CONSTEXPR float_round_style round_style = round_to_nearest; }; #undef __glibcxx_float_has_denorm_loss #undef __glibcxx_float_traps #undef __glibcxx_float_tinyness_before /// numeric_limits<double> specialization. template<> struct numeric_limits<double> { static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; static _GLIBCXX_CONSTEXPR double min() _GLIBCXX_USE_NOEXCEPT { return __DBL_MIN__; } static _GLIBCXX_CONSTEXPR double max() _GLIBCXX_USE_NOEXCEPT { return __DBL_MAX__; } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1746 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static constexpr double lowest() noexcept { return -__DBL_MAX__; } #endif # 1749 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static _GLIBCXX_USE_CONSTEXPR int digits = __DBL_MANT_DIG__; static _GLIBCXX_USE_CONSTEXPR int digits10 = __DBL_DIG__; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1753 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static constexpr int max_digits10 = __glibcxx_max_digits10 (__DBL_MANT_DIG__); #endif # 1756 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static _GLIBCXX_USE_CONSTEXPR bool is_signed = true; static _GLIBCXX_USE_CONSTEXPR bool is_integer = false; static _GLIBCXX_USE_CONSTEXPR bool is_exact = false; static _GLIBCXX_USE_CONSTEXPR int radix = __FLT_RADIX__; static _GLIBCXX_CONSTEXPR double epsilon() _GLIBCXX_USE_NOEXCEPT { return __DBL_EPSILON__; } static _GLIBCXX_CONSTEXPR double round_error() _GLIBCXX_USE_NOEXCEPT { return 0.5; } static _GLIBCXX_USE_CONSTEXPR int min_exponent = __DBL_MIN_EXP__; static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = __DBL_MIN_10_EXP__; static _GLIBCXX_USE_CONSTEXPR int max_exponent = __DBL_MAX_EXP__; static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = __DBL_MAX_10_EXP__; static _GLIBCXX_USE_CONSTEXPR bool has_infinity = __DBL_HAS_INFINITY__; static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = __DBL_HAS_QUIET_NAN__; static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = has_quiet_NaN; static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm = bool(__DBL_HAS_DENORM__) ? denorm_present : denorm_absent; static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = __glibcxx_double_has_denorm_loss; static _GLIBCXX_CONSTEXPR double infinity() _GLIBCXX_USE_NOEXCEPT { return __builtin_huge_val(); } static _GLIBCXX_CONSTEXPR double quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return __builtin_nan(""); } static _GLIBCXX_CONSTEXPR double signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return __builtin_nans(""); } static _GLIBCXX_CONSTEXPR double denorm_min() _GLIBCXX_USE_NOEXCEPT { return __DBL_DENORM_MIN__; } static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = has_infinity && has_quiet_NaN && has_denorm == denorm_present; static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true; static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false; static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_double_traps; static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = __glibcxx_double_tinyness_before; static _GLIBCXX_USE_CONSTEXPR float_round_style round_style = round_to_nearest; }; #undef __glibcxx_double_has_denorm_loss #undef __glibcxx_double_traps #undef __glibcxx_double_tinyness_before /// numeric_limits<long double> specialization. template<> struct numeric_limits<long double> { static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; static _GLIBCXX_CONSTEXPR long double min() _GLIBCXX_USE_NOEXCEPT { return __LDBL_MIN__; } static _GLIBCXX_CONSTEXPR long double max() _GLIBCXX_USE_NOEXCEPT { return __LDBL_MAX__; } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1821 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static constexpr long double lowest() noexcept { return -__LDBL_MAX__; } #endif # 1824 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static _GLIBCXX_USE_CONSTEXPR int digits = __LDBL_MANT_DIG__; static _GLIBCXX_USE_CONSTEXPR int digits10 = __LDBL_DIG__; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201103L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 1828 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static _GLIBCXX_USE_CONSTEXPR int max_digits10 = __glibcxx_max_digits10 (__LDBL_MANT_DIG__); #endif # 1831 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 static _GLIBCXX_USE_CONSTEXPR bool is_signed = true; static _GLIBCXX_USE_CONSTEXPR bool is_integer = false; static _GLIBCXX_USE_CONSTEXPR bool is_exact = false; static _GLIBCXX_USE_CONSTEXPR int radix = __FLT_RADIX__; static _GLIBCXX_CONSTEXPR long double epsilon() _GLIBCXX_USE_NOEXCEPT { return __LDBL_EPSILON__; } static _GLIBCXX_CONSTEXPR long double round_error() _GLIBCXX_USE_NOEXCEPT { return 0.5L; } static _GLIBCXX_USE_CONSTEXPR int min_exponent = __LDBL_MIN_EXP__; static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = __LDBL_MIN_10_EXP__; static _GLIBCXX_USE_CONSTEXPR int max_exponent = __LDBL_MAX_EXP__; static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = __LDBL_MAX_10_EXP__; static _GLIBCXX_USE_CONSTEXPR bool has_infinity = __LDBL_HAS_INFINITY__; static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = __LDBL_HAS_QUIET_NAN__; static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = has_quiet_NaN; static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm = bool(__LDBL_HAS_DENORM__) ? denorm_present : denorm_absent; static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = __glibcxx_long_double_has_denorm_loss; static _GLIBCXX_CONSTEXPR long double infinity() _GLIBCXX_USE_NOEXCEPT { return __builtin_huge_vall(); } static _GLIBCXX_CONSTEXPR long double quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return __builtin_nanl(""); } static _GLIBCXX_CONSTEXPR long double signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return __builtin_nansl(""); } static _GLIBCXX_CONSTEXPR long double denorm_min() _GLIBCXX_USE_NOEXCEPT { return __LDBL_DENORM_MIN__; } static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = has_infinity && has_quiet_NaN && has_denorm == denorm_present; static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true; static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false; static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_long_double_traps; static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = __glibcxx_long_double_tinyness_before; static _GLIBCXX_USE_CONSTEXPR float_round_style round_style = round_to_nearest; }; #undef __glibcxx_long_double_has_denorm_loss #undef __glibcxx_long_double_traps #undef __glibcxx_long_double_tinyness_before _GLIBCXX_END_NAMESPACE_VERSION } // namespace #undef __glibcxx_signed #undef __glibcxx_min #undef __glibcxx_max #undef __glibcxx_digits #undef __glibcxx_digits10 #undef __glibcxx_max_digits10 #endif // _GLIBCXX_NUMERIC_LIMITS # 1894 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/limits" 3 # 36 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/hashtable_policy.h" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/stl_algobase.h> // for std::min. #endif /* expanded by -frewrite-includes */ # 36 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/hashtable_policy.h" 3 # 37 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/hashtable_policy.h" 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> class _Hashtable; namespace __detail { /** * @defgroup hashtable-detail Base and Implementation Classes * @ingroup unordered_associative_containers * @{ */ template<typename _Key, typename _Value, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _Traits> struct _Hashtable_base; // Helper function: return distance(first, last) for forward // iterators, or 0/1 for input iterators. template<class _Iterator> inline typename std::iterator_traits<_Iterator>::difference_type __distance_fw(_Iterator __first, _Iterator __last, std::input_iterator_tag) { return __first != __last ? 1 : 0; } template<class _Iterator> inline typename std::iterator_traits<_Iterator>::difference_type __distance_fw(_Iterator __first, _Iterator __last, std::forward_iterator_tag) { return std::distance(__first, __last); } template<class _Iterator> inline typename std::iterator_traits<_Iterator>::difference_type __distance_fw(_Iterator __first, _Iterator __last) { return __distance_fw(__first, __last, std::__iterator_category(__first)); } struct _Identity { template<typename _Tp> _Tp&& operator()(_Tp&& __x) const { return std::forward<_Tp>(__x); } }; struct _Select1st { template<typename _Tp> auto operator()(_Tp&& __x) const -> decltype(std::get<0>(std::forward<_Tp>(__x))) { return std::get<0>(std::forward<_Tp>(__x)); } }; template<typename _NodeAlloc> struct _Hashtable_alloc; // Functor recycling a pool of nodes and using allocation once the pool is // empty. template<typename _NodeAlloc> struct _ReuseOrAllocNode { private: using __node_alloc_type = _NodeAlloc; using __hashtable_alloc = _Hashtable_alloc<__node_alloc_type>; using __node_alloc_traits = typename __hashtable_alloc::__node_alloc_traits; using __node_type = typename __hashtable_alloc::__node_type; public: _ReuseOrAllocNode(__node_type* __nodes, __hashtable_alloc& __h) : _M_nodes(__nodes), _M_h(__h) { } _ReuseOrAllocNode(const _ReuseOrAllocNode&) = delete; ~_ReuseOrAllocNode() { _M_h._M_deallocate_nodes(_M_nodes); } template<typename _Arg> __node_type* operator()(_Arg&& __arg) const { if (_M_nodes) { __node_type* __node = _M_nodes; _M_nodes = _M_nodes->_M_next(); __node->_M_nxt = nullptr; auto& __a = _M_h._M_node_allocator(); __node_alloc_traits::destroy(__a, __node->_M_valptr()); __try { __node_alloc_traits::construct(__a, __node->_M_valptr(), std::forward<_Arg>(__arg)); } __catch(...) { _M_h._M_deallocate_node_ptr(__node); __throw_exception_again; } return __node; } return _M_h._M_allocate_node(std::forward<_Arg>(__arg)); } private: mutable __node_type* _M_nodes; __hashtable_alloc& _M_h; }; // Functor similar to the previous one but without any pool of nodes to // recycle. template<typename _NodeAlloc> struct _AllocNode { private: using __hashtable_alloc = _Hashtable_alloc<_NodeAlloc>; using __node_type = typename __hashtable_alloc::__node_type; public: _AllocNode(__hashtable_alloc& __h) : _M_h(__h) { } template<typename _Arg> __node_type* operator()(_Arg&& __arg) const { return _M_h._M_allocate_node(std::forward<_Arg>(__arg)); } private: __hashtable_alloc& _M_h; }; // Auxiliary types used for all instantiations of _Hashtable nodes // and iterators. /** * struct _Hashtable_traits * * Important traits for hash tables. * * @tparam _Cache_hash_code Boolean value. True if the value of * the hash function is stored along with the value. This is a * time-space tradeoff. Storing it may improve lookup speed by * reducing the number of times we need to call the _Equal * function. * * @tparam _Constant_iterators Boolean value. True if iterator and * const_iterator are both constant iterator types. This is true * for unordered_set and unordered_multiset, false for * unordered_map and unordered_multimap. * * @tparam _Unique_keys Boolean value. True if the return value * of _Hashtable::count(k) is always at most one, false if it may * be an arbitrary number. This is true for unordered_set and * unordered_map, false for unordered_multiset and * unordered_multimap. */ template<bool _Cache_hash_code, bool _Constant_iterators, bool _Unique_keys> struct _Hashtable_traits { using __hash_cached = __bool_constant<_Cache_hash_code>; using __constant_iterators = __bool_constant<_Constant_iterators>; using __unique_keys = __bool_constant<_Unique_keys>; }; /** * struct _Hash_node_base * * Nodes, used to wrap elements stored in the hash table. A policy * template parameter of class template _Hashtable controls whether * nodes also store a hash code. In some cases (e.g. strings) this * may be a performance win. */ struct _Hash_node_base { _Hash_node_base* _M_nxt; _Hash_node_base() noexcept : _M_nxt() { } _Hash_node_base(_Hash_node_base* __next) noexcept : _M_nxt(__next) { } }; /** * struct _Hash_node_value_base * * Node type with the value to store. */ template<typename _Value> struct _Hash_node_value_base : _Hash_node_base { typedef _Value value_type; __gnu_cxx::__aligned_buffer<_Value> _M_storage; _Value* _M_valptr() noexcept { return _M_storage._M_ptr(); } const _Value* _M_valptr() const noexcept { return _M_storage._M_ptr(); } _Value& _M_v() noexcept { return *_M_valptr(); } const _Value& _M_v() const noexcept { return *_M_valptr(); } }; /** * Primary template struct _Hash_node. */ template<typename _Value, bool _Cache_hash_code> struct _Hash_node; /** * Specialization for nodes with caches, struct _Hash_node. * * Base class is __detail::_Hash_node_value_base. */ template<typename _Value> struct _Hash_node<_Value, true> : _Hash_node_value_base<_Value> { std::size_t _M_hash_code; _Hash_node* _M_next() const noexcept { return static_cast<_Hash_node*>(this->_M_nxt); } }; /** * Specialization for nodes without caches, struct _Hash_node. * * Base class is __detail::_Hash_node_value_base. */ template<typename _Value> struct _Hash_node<_Value, false> : _Hash_node_value_base<_Value> { _Hash_node* _M_next() const noexcept { return static_cast<_Hash_node*>(this->_M_nxt); } }; /// Base class for node iterators. template<typename _Value, bool _Cache_hash_code> struct _Node_iterator_base { using __node_type = _Hash_node<_Value, _Cache_hash_code>; __node_type* _M_cur; _Node_iterator_base(__node_type* __p) noexcept : _M_cur(__p) { } void _M_incr() noexcept { _M_cur = _M_cur->_M_next(); } }; template<typename _Value, bool _Cache_hash_code> inline bool operator==(const _Node_iterator_base<_Value, _Cache_hash_code>& __x, const _Node_iterator_base<_Value, _Cache_hash_code >& __y) noexcept { return __x._M_cur == __y._M_cur; } template<typename _Value, bool _Cache_hash_code> inline bool operator!=(const _Node_iterator_base<_Value, _Cache_hash_code>& __x, const _Node_iterator_base<_Value, _Cache_hash_code>& __y) noexcept { return __x._M_cur != __y._M_cur; } /// Node iterators, used to iterate through all the hashtable. template<typename _Value, bool __constant_iterators, bool __cache> struct _Node_iterator : public _Node_iterator_base<_Value, __cache> { private: using __base_type = _Node_iterator_base<_Value, __cache>; using __node_type = typename __base_type::__node_type; public: typedef _Value value_type; typedef std::ptrdiff_t difference_type; typedef std::forward_iterator_tag iterator_category; using pointer = typename std::conditional<__constant_iterators, const _Value*, _Value*>::type; using reference = typename std::conditional<__constant_iterators, const _Value&, _Value&>::type; _Node_iterator() noexcept : __base_type(0) { } explicit _Node_iterator(__node_type* __p) noexcept : __base_type(__p) { } reference operator*() const noexcept { return this->_M_cur->_M_v(); } pointer operator->() const noexcept { return this->_M_cur->_M_valptr(); } _Node_iterator& operator++() noexcept { this->_M_incr(); return *this; } _Node_iterator operator++(int) noexcept { _Node_iterator __tmp(*this); this->_M_incr(); return __tmp; } }; /// Node const_iterators, used to iterate through all the hashtable. template<typename _Value, bool __constant_iterators, bool __cache> struct _Node_const_iterator : public _Node_iterator_base<_Value, __cache> { private: using __base_type = _Node_iterator_base<_Value, __cache>; using __node_type = typename __base_type::__node_type; public: typedef _Value value_type; typedef std::ptrdiff_t difference_type; typedef std::forward_iterator_tag iterator_category; typedef const _Value* pointer; typedef const _Value& reference; _Node_const_iterator() noexcept : __base_type(0) { } explicit _Node_const_iterator(__node_type* __p) noexcept : __base_type(__p) { } _Node_const_iterator(const _Node_iterator<_Value, __constant_iterators, __cache>& __x) noexcept : __base_type(__x._M_cur) { } reference operator*() const noexcept { return this->_M_cur->_M_v(); } pointer operator->() const noexcept { return this->_M_cur->_M_valptr(); } _Node_const_iterator& operator++() noexcept { this->_M_incr(); return *this; } _Node_const_iterator operator++(int) noexcept { _Node_const_iterator __tmp(*this); this->_M_incr(); return __tmp; } }; // Many of class template _Hashtable's template parameters are policy // classes. These are defaults for the policies. /// Default range hashing function: use division to fold a large number /// into the range [0, N). struct _Mod_range_hashing { typedef std::size_t first_argument_type; typedef std::size_t second_argument_type; typedef std::size_t result_type; result_type operator()(first_argument_type __num, second_argument_type __den) const noexcept { return __num % __den; } }; /// Default ranged hash function H. In principle it should be a /// function object composed from objects of type H1 and H2 such that /// h(k, N) = h2(h1(k), N), but that would mean making extra copies of /// h1 and h2. So instead we'll just use a tag to tell class template /// hashtable to do that composition. struct _Default_ranged_hash { }; /// Default value for rehash policy. Bucket size is (usually) the /// smallest prime that keeps the load factor small enough. struct _Prime_rehash_policy { using __has_load_factor = std::true_type; _Prime_rehash_policy(float __z = 1.0) noexcept : _M_max_load_factor(__z), _M_next_resize(0) { } float max_load_factor() const noexcept { return _M_max_load_factor; } // Return a bucket size no smaller than n. std::size_t _M_next_bkt(std::size_t __n) const; // Return a bucket count appropriate for n elements std::size_t _M_bkt_for_elements(std::size_t __n) const { return __builtin_ceil(__n / (long double)_M_max_load_factor); } // __n_bkt is current bucket count, __n_elt is current element count, // and __n_ins is number of elements to be inserted. Do we need to // increase bucket count? If so, return make_pair(true, n), where n // is the new bucket count. If not, return make_pair(false, 0). std::pair<bool, std::size_t> _M_need_rehash(std::size_t __n_bkt, std::size_t __n_elt, std::size_t __n_ins) const; typedef std::size_t _State; _State _M_state() const { return _M_next_resize; } void _M_reset() noexcept { _M_next_resize = 0; } void _M_reset(_State __state) { _M_next_resize = __state; } static const std::size_t _S_growth_factor = 2; float _M_max_load_factor; mutable std::size_t _M_next_resize; }; /// Range hashing function assuming that second arg is a power of 2. struct _Mask_range_hashing { typedef std::size_t first_argument_type; typedef std::size_t second_argument_type; typedef std::size_t result_type; result_type operator()(first_argument_type __num, second_argument_type __den) const noexcept { return __num & (__den - 1); } }; /// Compute closest power of 2 not less than __n inline std::size_t __clp2(std::size_t __n) noexcept { // Equivalent to return __n ? std::ceil2(__n) : 0; if (__n < 2) return __n; const unsigned __lz = sizeof(size_t) > sizeof(long) ? __builtin_clzll(__n - 1ull) : __builtin_clzl(__n - 1ul); // Doing two shifts avoids undefined behaviour when __lz == 0. return (size_t(1) << (numeric_limits<size_t>::digits - __lz - 1)) << 1; } /// Rehash policy providing power of 2 bucket numbers. Avoids modulo /// operations. struct _Power2_rehash_policy { using __has_load_factor = std::true_type; _Power2_rehash_policy(float __z = 1.0) noexcept : _M_max_load_factor(__z), _M_next_resize(0) { } float max_load_factor() const noexcept { return _M_max_load_factor; } // Return a bucket size no smaller than n (as long as n is not above the // highest power of 2). std::size_t _M_next_bkt(std::size_t __n) noexcept { const auto __max_width = std::min<size_t>(sizeof(size_t), 8); const auto __max_bkt = size_t(1) << (__max_width * __CHAR_BIT__ - 1); std::size_t __res = __clp2(__n); if (__res == __n) __res <<= 1; if (__res == 0) __res = __max_bkt; if (__res == __max_bkt) // Set next resize to the max value so that we never try to rehash again // as we already reach the biggest possible bucket number. // Note that it might result in max_load_factor not being respected. _M_next_resize = std::size_t(-1); else _M_next_resize = __builtin_ceil(__res * (long double)_M_max_load_factor); return __res; } // Return a bucket count appropriate for n elements std::size_t _M_bkt_for_elements(std::size_t __n) const noexcept { return __builtin_ceil(__n / (long double)_M_max_load_factor); } // __n_bkt is current bucket count, __n_elt is current element count, // and __n_ins is number of elements to be inserted. Do we need to // increase bucket count? If so, return make_pair(true, n), where n // is the new bucket count. If not, return make_pair(false, 0). std::pair<bool, std::size_t> _M_need_rehash(std::size_t __n_bkt, std::size_t __n_elt, std::size_t __n_ins) noexcept { if (__n_elt + __n_ins >= _M_next_resize) { long double __min_bkts = (__n_elt + __n_ins) / (long double)_M_max_load_factor; if (__min_bkts >= __n_bkt) return std::make_pair(true, _M_next_bkt(std::max<std::size_t>(__builtin_floor(__min_bkts) + 1, __n_bkt * _S_growth_factor))); _M_next_resize = __builtin_floor(__n_bkt * (long double)_M_max_load_factor); return std::make_pair(false, 0); } else return std::make_pair(false, 0); } typedef std::size_t _State; _State _M_state() const noexcept { return _M_next_resize; } void _M_reset() noexcept { _M_next_resize = 0; } void _M_reset(_State __state) noexcept { _M_next_resize = __state; } static const std::size_t _S_growth_factor = 2; float _M_max_load_factor; std::size_t _M_next_resize; }; // Base classes for std::_Hashtable. We define these base classes // because in some cases we want to do different things depending on // the value of a policy class. In some cases the policy class // affects which member functions and nested typedefs are defined; // we handle that by specializing base class templates. Several of // the base class templates need to access other members of class // template _Hashtable, so we use a variant of the "Curiously // Recurring Template Pattern" (CRTP) technique. /** * Primary class template _Map_base. * * If the hashtable has a value type of the form pair<T1, T2> and a * key extraction policy (_ExtractKey) that returns the first part * of the pair, the hashtable gets a mapped_type typedef. If it * satisfies those criteria and also has unique keys, then it also * gets an operator[]. */ template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits, bool _Unique_keys = _Traits::__unique_keys::value> struct _Map_base { }; /// Partial specialization, __unique_keys set to false. template<typename _Key, typename _Pair, typename _Alloc, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> struct _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits, false> { using mapped_type = typename std::tuple_element<1, _Pair>::type; }; /// Partial specialization, __unique_keys set to true. template<typename _Key, typename _Pair, typename _Alloc, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> struct _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits, true> { private: using __hashtable_base = __detail::_Hashtable_base<_Key, _Pair, _Select1st, _Equal, _H1, _H2, _Hash, _Traits>; using __hashtable = _Hashtable<_Key, _Pair, _Alloc, _Select1st, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>; using __hash_code = typename __hashtable_base::__hash_code; using __node_type = typename __hashtable_base::__node_type; public: using key_type = typename __hashtable_base::key_type; using iterator = typename __hashtable_base::iterator; using mapped_type = typename std::tuple_element<1, _Pair>::type; mapped_type& operator[](const key_type& __k); mapped_type& operator[](key_type&& __k); // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR 761. unordered_map needs an at() member function. mapped_type& at(const key_type& __k); const mapped_type& at(const key_type& __k) const; }; template<typename _Key, typename _Pair, typename _Alloc, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> auto _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits, true>:: operator[](const key_type& __k) -> mapped_type& { __hashtable* __h = static_cast<__hashtable*>(this); __hash_code __code = __h->_M_hash_code(__k); std::size_t __n = __h->_M_bucket_index(__k, __code); __node_type* __p = __h->_M_find_node(__n, __k, __code); if (!__p) { __p = __h->_M_allocate_node(std::piecewise_construct, std::tuple<const key_type&>(__k), std::tuple<>()); return __h->_M_insert_unique_node(__n, __code, __p)->second; } return __p->_M_v().second; } template<typename _Key, typename _Pair, typename _Alloc, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> auto _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits, true>:: operator[](key_type&& __k) -> mapped_type& { __hashtable* __h = static_cast<__hashtable*>(this); __hash_code __code = __h->_M_hash_code(__k); std::size_t __n = __h->_M_bucket_index(__k, __code); __node_type* __p = __h->_M_find_node(__n, __k, __code); if (!__p) { __p = __h->_M_allocate_node(std::piecewise_construct, std::forward_as_tuple(std::move(__k)), std::tuple<>()); return __h->_M_insert_unique_node(__n, __code, __p)->second; } return __p->_M_v().second; } template<typename _Key, typename _Pair, typename _Alloc, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> auto _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits, true>:: at(const key_type& __k) -> mapped_type& { __hashtable* __h = static_cast<__hashtable*>(this); __hash_code __code = __h->_M_hash_code(__k); std::size_t __n = __h->_M_bucket_index(__k, __code); __node_type* __p = __h->_M_find_node(__n, __k, __code); if (!__p) __throw_out_of_range(__N("_Map_base::at")); return __p->_M_v().second; } template<typename _Key, typename _Pair, typename _Alloc, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> auto _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits, true>:: at(const key_type& __k) const -> const mapped_type& { const __hashtable* __h = static_cast<const __hashtable*>(this); __hash_code __code = __h->_M_hash_code(__k); std::size_t __n = __h->_M_bucket_index(__k, __code); __node_type* __p = __h->_M_find_node(__n, __k, __code); if (!__p) __throw_out_of_range(__N("_Map_base::at")); return __p->_M_v().second; } /** * Primary class template _Insert_base. * * Defines @c insert member functions appropriate to all _Hashtables. */ template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> struct _Insert_base { protected: using __hashtable = _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>; using __hashtable_base = _Hashtable_base<_Key, _Value, _ExtractKey, _Equal, _H1, _H2, _Hash, _Traits>; using value_type = typename __hashtable_base::value_type; using iterator = typename __hashtable_base::iterator; using const_iterator = typename __hashtable_base::const_iterator; using size_type = typename __hashtable_base::size_type; using __unique_keys = typename __hashtable_base::__unique_keys; using __ireturn_type = typename __hashtable_base::__ireturn_type; using __node_type = _Hash_node<_Value, _Traits::__hash_cached::value>; using __node_alloc_type = __alloc_rebind<_Alloc, __node_type>; using __node_gen_type = _AllocNode<__node_alloc_type>; __hashtable& _M_conjure_hashtable() { return *(static_cast<__hashtable*>(this)); } template<typename _InputIterator, typename _NodeGetter> void _M_insert_range(_InputIterator __first, _InputIterator __last, const _NodeGetter&, true_type); template<typename _InputIterator, typename _NodeGetter> void _M_insert_range(_InputIterator __first, _InputIterator __last, const _NodeGetter&, false_type); public: __ireturn_type insert(const value_type& __v) { __hashtable& __h = _M_conjure_hashtable(); __node_gen_type __node_gen(__h); return __h._M_insert(__v, __node_gen, __unique_keys()); } iterator insert(const_iterator __hint, const value_type& __v) { __hashtable& __h = _M_conjure_hashtable(); __node_gen_type __node_gen(__h); return __h._M_insert(__hint, __v, __node_gen, __unique_keys()); } void insert(initializer_list<value_type> __l) { this->insert(__l.begin(), __l.end()); } template<typename _InputIterator> void insert(_InputIterator __first, _InputIterator __last) { __hashtable& __h = _M_conjure_hashtable(); __node_gen_type __node_gen(__h); return _M_insert_range(__first, __last, __node_gen, __unique_keys()); } }; template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> template<typename _InputIterator, typename _NodeGetter> void _Insert_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>:: _M_insert_range(_InputIterator __first, _InputIterator __last, const _NodeGetter& __node_gen, true_type) { size_type __n_elt = __detail::__distance_fw(__first, __last); if (__n_elt == 0) return; __hashtable& __h = _M_conjure_hashtable(); for (; __first != __last; ++__first) { if (__h._M_insert(*__first, __node_gen, __unique_keys(), __n_elt).second) __n_elt = 1; else if (__n_elt != 1) --__n_elt; } } template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> template<typename _InputIterator, typename _NodeGetter> void _Insert_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>:: _M_insert_range(_InputIterator __first, _InputIterator __last, const _NodeGetter& __node_gen, false_type) { using __rehash_type = typename __hashtable::__rehash_type; using __rehash_state = typename __hashtable::__rehash_state; using pair_type = std::pair<bool, std::size_t>; size_type __n_elt = __detail::__distance_fw(__first, __last); if (__n_elt == 0) return; __hashtable& __h = _M_conjure_hashtable(); __rehash_type& __rehash = __h._M_rehash_policy; const __rehash_state& __saved_state = __rehash._M_state(); pair_type __do_rehash = __rehash._M_need_rehash(__h._M_bucket_count, __h._M_element_count, __n_elt); if (__do_rehash.first) __h._M_rehash(__do_rehash.second, __saved_state); for (; __first != __last; ++__first) __h._M_insert(*__first, __node_gen, __unique_keys()); } /** * Primary class template _Insert. * * Defines @c insert member functions that depend on _Hashtable policies, * via partial specializations. */ template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits, bool _Constant_iterators = _Traits::__constant_iterators::value> struct _Insert; /// Specialization. template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> struct _Insert<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits, true> : public _Insert_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits> { using __base_type = _Insert_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>; using __hashtable_base = _Hashtable_base<_Key, _Value, _ExtractKey, _Equal, _H1, _H2, _Hash, _Traits>; using value_type = typename __base_type::value_type; using iterator = typename __base_type::iterator; using const_iterator = typename __base_type::const_iterator; using __unique_keys = typename __base_type::__unique_keys; using __ireturn_type = typename __hashtable_base::__ireturn_type; using __hashtable = typename __base_type::__hashtable; using __node_gen_type = typename __base_type::__node_gen_type; using __base_type::insert; __ireturn_type insert(value_type&& __v) { __hashtable& __h = this->_M_conjure_hashtable(); __node_gen_type __node_gen(__h); return __h._M_insert(std::move(__v), __node_gen, __unique_keys()); } iterator insert(const_iterator __hint, value_type&& __v) { __hashtable& __h = this->_M_conjure_hashtable(); __node_gen_type __node_gen(__h); return __h._M_insert(__hint, std::move(__v), __node_gen, __unique_keys()); } }; /// Specialization. template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> struct _Insert<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits, false> : public _Insert_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits> { using __base_type = _Insert_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>; using value_type = typename __base_type::value_type; using iterator = typename __base_type::iterator; using const_iterator = typename __base_type::const_iterator; using __unique_keys = typename __base_type::__unique_keys; using __hashtable = typename __base_type::__hashtable; using __ireturn_type = typename __base_type::__ireturn_type; using __base_type::insert; template<typename _Pair> using __is_cons = std::is_constructible<value_type, _Pair&&>; template<typename _Pair> using _IFcons = std::enable_if<__is_cons<_Pair>::value>; template<typename _Pair> using _IFconsp = typename _IFcons<_Pair>::type; template<typename _Pair, typename = _IFconsp<_Pair>> __ireturn_type insert(_Pair&& __v) { __hashtable& __h = this->_M_conjure_hashtable(); return __h._M_emplace(__unique_keys(), std::forward<_Pair>(__v)); } template<typename _Pair, typename = _IFconsp<_Pair>> iterator insert(const_iterator __hint, _Pair&& __v) { __hashtable& __h = this->_M_conjure_hashtable(); return __h._M_emplace(__hint, __unique_keys(), std::forward<_Pair>(__v)); } }; template<typename _Policy> using __has_load_factor = typename _Policy::__has_load_factor; /** * Primary class template _Rehash_base. * * Give hashtable the max_load_factor functions and reserve iff the * rehash policy supports it. */ template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits, typename = __detected_or_t<std::false_type, __has_load_factor, _RehashPolicy>> struct _Rehash_base; /// Specialization when rehash policy doesn't provide load factor management. template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> struct _Rehash_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits, std::false_type> { }; /// Specialization when rehash policy provide load factor management. template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> struct _Rehash_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits, std::true_type> { using __hashtable = _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>; float max_load_factor() const noexcept { const __hashtable* __this = static_cast<const __hashtable*>(this); return __this->__rehash_policy().max_load_factor(); } void max_load_factor(float __z) { __hashtable* __this = static_cast<__hashtable*>(this); __this->__rehash_policy(_RehashPolicy(__z)); } void reserve(std::size_t __n) { __hashtable* __this = static_cast<__hashtable*>(this); __this->rehash(__builtin_ceil(__n / max_load_factor())); } }; /** * Primary class template _Hashtable_ebo_helper. * * Helper class using EBO when it is not forbidden (the type is not * final) and when it is worth it (the type is empty.) */ template<int _Nm, typename _Tp, bool __use_ebo = !__is_final(_Tp) && __is_empty(_Tp)> struct _Hashtable_ebo_helper; /// Specialization using EBO. template<int _Nm, typename _Tp> struct _Hashtable_ebo_helper<_Nm, _Tp, true> : private _Tp { _Hashtable_ebo_helper() = default; template<typename _OtherTp> _Hashtable_ebo_helper(_OtherTp&& __tp) : _Tp(std::forward<_OtherTp>(__tp)) { } static const _Tp& _S_cget(const _Hashtable_ebo_helper& __eboh) { return static_cast<const _Tp&>(__eboh); } static _Tp& _S_get(_Hashtable_ebo_helper& __eboh) { return static_cast<_Tp&>(__eboh); } }; /// Specialization not using EBO. template<int _Nm, typename _Tp> struct _Hashtable_ebo_helper<_Nm, _Tp, false> { _Hashtable_ebo_helper() = default; template<typename _OtherTp> _Hashtable_ebo_helper(_OtherTp&& __tp) : _M_tp(std::forward<_OtherTp>(__tp)) { } static const _Tp& _S_cget(const _Hashtable_ebo_helper& __eboh) { return __eboh._M_tp; } static _Tp& _S_get(_Hashtable_ebo_helper& __eboh) { return __eboh._M_tp; } private: _Tp _M_tp; }; /** * Primary class template _Local_iterator_base. * * Base class for local iterators, used to iterate within a bucket * but not between buckets. */ template<typename _Key, typename _Value, typename _ExtractKey, typename _H1, typename _H2, typename _Hash, bool __cache_hash_code> struct _Local_iterator_base; /** * Primary class template _Hash_code_base. * * Encapsulates two policy issues that aren't quite orthogonal. * (1) the difference between using a ranged hash function and using * the combination of a hash function and a range-hashing function. * In the former case we don't have such things as hash codes, so * we have a dummy type as placeholder. * (2) Whether or not we cache hash codes. Caching hash codes is * meaningless if we have a ranged hash function. * * We also put the key extraction objects here, for convenience. * Each specialization derives from one or more of the template * parameters to benefit from Ebo. This is important as this type * is inherited in some cases by the _Local_iterator_base type used * to implement local_iterator and const_local_iterator. As with * any iterator type we prefer to make it as small as possible. * * Primary template is unused except as a hook for specializations. */ template<typename _Key, typename _Value, typename _ExtractKey, typename _H1, typename _H2, typename _Hash, bool __cache_hash_code> struct _Hash_code_base; /// Specialization: ranged hash function, no caching hash codes. H1 /// and H2 are provided but ignored. We define a dummy hash code type. template<typename _Key, typename _Value, typename _ExtractKey, typename _H1, typename _H2, typename _Hash> struct _Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, false> : private _Hashtable_ebo_helper<0, _ExtractKey>, private _Hashtable_ebo_helper<1, _Hash> { private: using __ebo_extract_key = _Hashtable_ebo_helper<0, _ExtractKey>; using __ebo_hash = _Hashtable_ebo_helper<1, _Hash>; protected: typedef void* __hash_code; typedef _Hash_node<_Value, false> __node_type; // We need the default constructor for the local iterators and _Hashtable // default constructor. _Hash_code_base() = default; _Hash_code_base(const _ExtractKey& __ex, const _H1&, const _H2&, const _Hash& __h) : __ebo_extract_key(__ex), __ebo_hash(__h) { } __hash_code _M_hash_code(const _Key& __key) const { return 0; } std::size_t _M_bucket_index(const _Key& __k, __hash_code, std::size_t __n) const { return _M_ranged_hash()(__k, __n); } std::size_t _M_bucket_index(const __node_type* __p, std::size_t __n) const noexcept( noexcept(declval<const _Hash&>()(declval<const _Key&>(), (std::size_t)0)) ) { return _M_ranged_hash()(_M_extract()(__p->_M_v()), __n); } void _M_store_code(__node_type*, __hash_code) const { } void _M_copy_code(__node_type*, const __node_type*) const { } void _M_swap(_Hash_code_base& __x) { std::swap(_M_extract(), __x._M_extract()); std::swap(_M_ranged_hash(), __x._M_ranged_hash()); } const _ExtractKey& _M_extract() const { return __ebo_extract_key::_S_cget(*this); } _ExtractKey& _M_extract() { return __ebo_extract_key::_S_get(*this); } const _Hash& _M_ranged_hash() const { return __ebo_hash::_S_cget(*this); } _Hash& _M_ranged_hash() { return __ebo_hash::_S_get(*this); } }; // No specialization for ranged hash function while caching hash codes. // That combination is meaningless, and trying to do it is an error. /// Specialization: ranged hash function, cache hash codes. This /// combination is meaningless, so we provide only a declaration /// and no definition. template<typename _Key, typename _Value, typename _ExtractKey, typename _H1, typename _H2, typename _Hash> struct _Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, true>; /// Specialization: hash function and range-hashing function, no /// caching of hash codes. /// Provides typedef and accessor required by C++ 11. template<typename _Key, typename _Value, typename _ExtractKey, typename _H1, typename _H2> struct _Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, _Default_ranged_hash, false> : private _Hashtable_ebo_helper<0, _ExtractKey>, private _Hashtable_ebo_helper<1, _H1>, private _Hashtable_ebo_helper<2, _H2> { private: using __ebo_extract_key = _Hashtable_ebo_helper<0, _ExtractKey>; using __ebo_h1 = _Hashtable_ebo_helper<1, _H1>; using __ebo_h2 = _Hashtable_ebo_helper<2, _H2>; // Gives the local iterator implementation access to _M_bucket_index(). friend struct _Local_iterator_base<_Key, _Value, _ExtractKey, _H1, _H2, _Default_ranged_hash, false>; public: typedef _H1 hasher; hasher hash_function() const { return _M_h1(); } protected: typedef std::size_t __hash_code; typedef _Hash_node<_Value, false> __node_type; // We need the default constructor for the local iterators and _Hashtable // default constructor. _Hash_code_base() = default; _Hash_code_base(const _ExtractKey& __ex, const _H1& __h1, const _H2& __h2, const _Default_ranged_hash&) : __ebo_extract_key(__ex), __ebo_h1(__h1), __ebo_h2(__h2) { } __hash_code _M_hash_code(const _Key& __k) const { static_assert(__is_invocable<const _H1&, const _Key&>{}, "hash function must be invocable with an argument of key type"); return _M_h1()(__k); } std::size_t _M_bucket_index(const _Key&, __hash_code __c, std::size_t __n) const { return _M_h2()(__c, __n); } std::size_t _M_bucket_index(const __node_type* __p, std::size_t __n) const noexcept( noexcept(declval<const _H1&>()(declval<const _Key&>())) && noexcept(declval<const _H2&>()((__hash_code)0, (std::size_t)0)) ) { return _M_h2()(_M_h1()(_M_extract()(__p->_M_v())), __n); } void _M_store_code(__node_type*, __hash_code) const { } void _M_copy_code(__node_type*, const __node_type*) const { } void _M_swap(_Hash_code_base& __x) { std::swap(_M_extract(), __x._M_extract()); std::swap(_M_h1(), __x._M_h1()); std::swap(_M_h2(), __x._M_h2()); } const _ExtractKey& _M_extract() const { return __ebo_extract_key::_S_cget(*this); } _ExtractKey& _M_extract() { return __ebo_extract_key::_S_get(*this); } const _H1& _M_h1() const { return __ebo_h1::_S_cget(*this); } _H1& _M_h1() { return __ebo_h1::_S_get(*this); } const _H2& _M_h2() const { return __ebo_h2::_S_cget(*this); } _H2& _M_h2() { return __ebo_h2::_S_get(*this); } }; /// Specialization: hash function and range-hashing function, /// caching hash codes. H is provided but ignored. Provides /// typedef and accessor required by C++ 11. template<typename _Key, typename _Value, typename _ExtractKey, typename _H1, typename _H2> struct _Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, _Default_ranged_hash, true> : private _Hashtable_ebo_helper<0, _ExtractKey>, private _Hashtable_ebo_helper<1, _H1>, private _Hashtable_ebo_helper<2, _H2> { private: // Gives the local iterator implementation access to _M_h2(). friend struct _Local_iterator_base<_Key, _Value, _ExtractKey, _H1, _H2, _Default_ranged_hash, true>; using __ebo_extract_key = _Hashtable_ebo_helper<0, _ExtractKey>; using __ebo_h1 = _Hashtable_ebo_helper<1, _H1>; using __ebo_h2 = _Hashtable_ebo_helper<2, _H2>; public: typedef _H1 hasher; hasher hash_function() const { return _M_h1(); } protected: typedef std::size_t __hash_code; typedef _Hash_node<_Value, true> __node_type; // We need the default constructor for _Hashtable default constructor. _Hash_code_base() = default; _Hash_code_base(const _ExtractKey& __ex, const _H1& __h1, const _H2& __h2, const _Default_ranged_hash&) : __ebo_extract_key(__ex), __ebo_h1(__h1), __ebo_h2(__h2) { } __hash_code _M_hash_code(const _Key& __k) const { static_assert(__is_invocable<const _H1&, const _Key&>{}, "hash function must be invocable with an argument of key type"); return _M_h1()(__k); } std::size_t _M_bucket_index(const _Key&, __hash_code __c, std::size_t __n) const { return _M_h2()(__c, __n); } std::size_t _M_bucket_index(const __node_type* __p, std::size_t __n) const noexcept( noexcept(declval<const _H2&>()((__hash_code)0, (std::size_t)0)) ) { return _M_h2()(__p->_M_hash_code, __n); } void _M_store_code(__node_type* __n, __hash_code __c) const { __n->_M_hash_code = __c; } void _M_copy_code(__node_type* __to, const __node_type* __from) const { __to->_M_hash_code = __from->_M_hash_code; } void _M_swap(_Hash_code_base& __x) { std::swap(_M_extract(), __x._M_extract()); std::swap(_M_h1(), __x._M_h1()); std::swap(_M_h2(), __x._M_h2()); } const _ExtractKey& _M_extract() const { return __ebo_extract_key::_S_cget(*this); } _ExtractKey& _M_extract() { return __ebo_extract_key::_S_get(*this); } const _H1& _M_h1() const { return __ebo_h1::_S_cget(*this); } _H1& _M_h1() { return __ebo_h1::_S_get(*this); } const _H2& _M_h2() const { return __ebo_h2::_S_cget(*this); } _H2& _M_h2() { return __ebo_h2::_S_get(*this); } }; /** * Primary class template _Equal_helper. * */ template <typename _Key, typename _Value, typename _ExtractKey, typename _Equal, typename _HashCodeType, bool __cache_hash_code> struct _Equal_helper; /// Specialization. template<typename _Key, typename _Value, typename _ExtractKey, typename _Equal, typename _HashCodeType> struct _Equal_helper<_Key, _Value, _ExtractKey, _Equal, _HashCodeType, true> { static bool _S_equals(const _Equal& __eq, const _ExtractKey& __extract, const _Key& __k, _HashCodeType __c, _Hash_node<_Value, true>* __n) { return __c == __n->_M_hash_code && __eq(__k, __extract(__n->_M_v())); } }; /// Specialization. template<typename _Key, typename _Value, typename _ExtractKey, typename _Equal, typename _HashCodeType> struct _Equal_helper<_Key, _Value, _ExtractKey, _Equal, _HashCodeType, false> { static bool _S_equals(const _Equal& __eq, const _ExtractKey& __extract, const _Key& __k, _HashCodeType, _Hash_node<_Value, false>* __n) { return __eq(__k, __extract(__n->_M_v())); } }; /// Partial specialization used when nodes contain a cached hash code. template<typename _Key, typename _Value, typename _ExtractKey, typename _H1, typename _H2, typename _Hash> struct _Local_iterator_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, true> : private _Hashtable_ebo_helper<0, _H2> { protected: using __base_type = _Hashtable_ebo_helper<0, _H2>; using __hash_code_base = _Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, true>; _Local_iterator_base() = default; _Local_iterator_base(const __hash_code_base& __base, _Hash_node<_Value, true>* __p, std::size_t __bkt, std::size_t __bkt_count) : __base_type(__base._M_h2()), _M_cur(__p), _M_bucket(__bkt), _M_bucket_count(__bkt_count) { } void _M_incr() { _M_cur = _M_cur->_M_next(); if (_M_cur) { std::size_t __bkt = __base_type::_S_get(*this)(_M_cur->_M_hash_code, _M_bucket_count); if (__bkt != _M_bucket) _M_cur = nullptr; } } _Hash_node<_Value, true>* _M_cur; std::size_t _M_bucket; std::size_t _M_bucket_count; public: const void* _M_curr() const { return _M_cur; } // for equality ops std::size_t _M_get_bucket() const { return _M_bucket; } // for debug mode }; // Uninitialized storage for a _Hash_code_base. // This type is DefaultConstructible and Assignable even if the // _Hash_code_base type isn't, so that _Local_iterator_base<..., false> // can be DefaultConstructible and Assignable. template<typename _Tp, bool _IsEmpty = std::is_empty<_Tp>::value> struct _Hash_code_storage { __gnu_cxx::__aligned_buffer<_Tp> _M_storage; _Tp* _M_h() { return _M_storage._M_ptr(); } const _Tp* _M_h() const { return _M_storage._M_ptr(); } }; // Empty partial specialization for empty _Hash_code_base types. template<typename _Tp> struct _Hash_code_storage<_Tp, true> { static_assert( std::is_empty<_Tp>::value, "Type must be empty" ); // As _Tp is an empty type there will be no bytes written/read through // the cast pointer, so no strict-aliasing violation. _Tp* _M_h() { return reinterpret_cast<_Tp*>(this); } const _Tp* _M_h() const { return reinterpret_cast<const _Tp*>(this); } }; template<typename _Key, typename _Value, typename _ExtractKey, typename _H1, typename _H2, typename _Hash> using __hash_code_for_local_iter = _Hash_code_storage<_Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, false>>; // Partial specialization used when hash codes are not cached template<typename _Key, typename _Value, typename _ExtractKey, typename _H1, typename _H2, typename _Hash> struct _Local_iterator_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, false> : __hash_code_for_local_iter<_Key, _Value, _ExtractKey, _H1, _H2, _Hash> { protected: using __hash_code_base = _Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, false>; _Local_iterator_base() : _M_bucket_count(-1) { } _Local_iterator_base(const __hash_code_base& __base, _Hash_node<_Value, false>* __p, std::size_t __bkt, std::size_t __bkt_count) : _M_cur(__p), _M_bucket(__bkt), _M_bucket_count(__bkt_count) { _M_init(__base); } ~_Local_iterator_base() { if (_M_bucket_count != -1) _M_destroy(); } _Local_iterator_base(const _Local_iterator_base& __iter) : _M_cur(__iter._M_cur), _M_bucket(__iter._M_bucket), _M_bucket_count(__iter._M_bucket_count) { if (_M_bucket_count != -1) _M_init(*__iter._M_h()); } _Local_iterator_base& operator=(const _Local_iterator_base& __iter) { if (_M_bucket_count != -1) _M_destroy(); _M_cur = __iter._M_cur; _M_bucket = __iter._M_bucket; _M_bucket_count = __iter._M_bucket_count; if (_M_bucket_count != -1) _M_init(*__iter._M_h()); return *this; } void _M_incr() { _M_cur = _M_cur->_M_next(); if (_M_cur) { std::size_t __bkt = this->_M_h()->_M_bucket_index(_M_cur, _M_bucket_count); if (__bkt != _M_bucket) _M_cur = nullptr; } } _Hash_node<_Value, false>* _M_cur; std::size_t _M_bucket; std::size_t _M_bucket_count; void _M_init(const __hash_code_base& __base) { ::new(this->_M_h()) __hash_code_base(__base); } void _M_destroy() { this->_M_h()->~__hash_code_base(); } public: const void* _M_curr() const { return _M_cur; } // for equality ops and debug mode std::size_t _M_get_bucket() const { return _M_bucket; } // for debug mode }; template<typename _Key, typename _Value, typename _ExtractKey, typename _H1, typename _H2, typename _Hash, bool __cache> inline bool operator==(const _Local_iterator_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, __cache>& __x, const _Local_iterator_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, __cache>& __y) { return __x._M_curr() == __y._M_curr(); } template<typename _Key, typename _Value, typename _ExtractKey, typename _H1, typename _H2, typename _Hash, bool __cache> inline bool operator!=(const _Local_iterator_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, __cache>& __x, const _Local_iterator_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, __cache>& __y) { return __x._M_curr() != __y._M_curr(); } /// local iterators template<typename _Key, typename _Value, typename _ExtractKey, typename _H1, typename _H2, typename _Hash, bool __constant_iterators, bool __cache> struct _Local_iterator : public _Local_iterator_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, __cache> { private: using __base_type = _Local_iterator_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, __cache>; using __hash_code_base = typename __base_type::__hash_code_base; public: typedef _Value value_type; typedef typename std::conditional<__constant_iterators, const _Value*, _Value*>::type pointer; typedef typename std::conditional<__constant_iterators, const _Value&, _Value&>::type reference; typedef std::ptrdiff_t difference_type; typedef std::forward_iterator_tag iterator_category; _Local_iterator() = default; _Local_iterator(const __hash_code_base& __base, _Hash_node<_Value, __cache>* __p, std::size_t __bkt, std::size_t __bkt_count) : __base_type(__base, __p, __bkt, __bkt_count) { } reference operator*() const { return this->_M_cur->_M_v(); } pointer operator->() const { return this->_M_cur->_M_valptr(); } _Local_iterator& operator++() { this->_M_incr(); return *this; } _Local_iterator operator++(int) { _Local_iterator __tmp(*this); this->_M_incr(); return __tmp; } }; /// local const_iterators template<typename _Key, typename _Value, typename _ExtractKey, typename _H1, typename _H2, typename _Hash, bool __constant_iterators, bool __cache> struct _Local_const_iterator : public _Local_iterator_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, __cache> { private: using __base_type = _Local_iterator_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, __cache>; using __hash_code_base = typename __base_type::__hash_code_base; public: typedef _Value value_type; typedef const _Value* pointer; typedef const _Value& reference; typedef std::ptrdiff_t difference_type; typedef std::forward_iterator_tag iterator_category; _Local_const_iterator() = default; _Local_const_iterator(const __hash_code_base& __base, _Hash_node<_Value, __cache>* __p, std::size_t __bkt, std::size_t __bkt_count) : __base_type(__base, __p, __bkt, __bkt_count) { } _Local_const_iterator(const _Local_iterator<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, __constant_iterators, __cache>& __x) : __base_type(__x) { } reference operator*() const { return this->_M_cur->_M_v(); } pointer operator->() const { return this->_M_cur->_M_valptr(); } _Local_const_iterator& operator++() { this->_M_incr(); return *this; } _Local_const_iterator operator++(int) { _Local_const_iterator __tmp(*this); this->_M_incr(); return __tmp; } }; /** * Primary class template _Hashtable_base. * * Helper class adding management of _Equal functor to * _Hash_code_base type. * * Base class templates are: * - __detail::_Hash_code_base * - __detail::_Hashtable_ebo_helper */ template<typename _Key, typename _Value, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _Traits> struct _Hashtable_base : public _Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, _Traits::__hash_cached::value>, private _Hashtable_ebo_helper<0, _Equal> { public: typedef _Key key_type; typedef _Value value_type; typedef _Equal key_equal; typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; using __traits_type = _Traits; using __hash_cached = typename __traits_type::__hash_cached; using __constant_iterators = typename __traits_type::__constant_iterators; using __unique_keys = typename __traits_type::__unique_keys; using __hash_code_base = _Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, __hash_cached::value>; using __hash_code = typename __hash_code_base::__hash_code; using __node_type = typename __hash_code_base::__node_type; using iterator = __detail::_Node_iterator<value_type, __constant_iterators::value, __hash_cached::value>; using const_iterator = __detail::_Node_const_iterator<value_type, __constant_iterators::value, __hash_cached::value>; using local_iterator = __detail::_Local_iterator<key_type, value_type, _ExtractKey, _H1, _H2, _Hash, __constant_iterators::value, __hash_cached::value>; using const_local_iterator = __detail::_Local_const_iterator<key_type, value_type, _ExtractKey, _H1, _H2, _Hash, __constant_iterators::value, __hash_cached::value>; using __ireturn_type = typename std::conditional<__unique_keys::value, std::pair<iterator, bool>, iterator>::type; private: using _EqualEBO = _Hashtable_ebo_helper<0, _Equal>; using _EqualHelper = _Equal_helper<_Key, _Value, _ExtractKey, _Equal, __hash_code, __hash_cached::value>; protected: _Hashtable_base() = default; _Hashtable_base(const _ExtractKey& __ex, const _H1& __h1, const _H2& __h2, const _Hash& __hash, const _Equal& __eq) : __hash_code_base(__ex, __h1, __h2, __hash), _EqualEBO(__eq) { } bool _M_equals(const _Key& __k, __hash_code __c, __node_type* __n) const { static_assert(__is_invocable<const _Equal&, const _Key&, const _Key&>{}, "key equality predicate must be invocable with two arguments of " "key type"); return _EqualHelper::_S_equals(_M_eq(), this->_M_extract(), __k, __c, __n); } void _M_swap(_Hashtable_base& __x) { __hash_code_base::_M_swap(__x); std::swap(_M_eq(), __x._M_eq()); } const _Equal& _M_eq() const { return _EqualEBO::_S_cget(*this); } _Equal& _M_eq() { return _EqualEBO::_S_get(*this); } }; /** * struct _Equality_base. * * Common types and functions for class _Equality. */ struct _Equality_base { protected: template<typename _Uiterator> static bool _S_is_permutation(_Uiterator, _Uiterator, _Uiterator); }; // See std::is_permutation in N3068. template<typename _Uiterator> bool _Equality_base:: _S_is_permutation(_Uiterator __first1, _Uiterator __last1, _Uiterator __first2) { for (; __first1 != __last1; ++__first1, ++__first2) if (!(*__first1 == *__first2)) break; if (__first1 == __last1) return true; _Uiterator __last2 = __first2; std::advance(__last2, std::distance(__first1, __last1)); for (_Uiterator __it1 = __first1; __it1 != __last1; ++__it1) { _Uiterator __tmp = __first1; while (__tmp != __it1 && !bool(*__tmp == *__it1)) ++__tmp; // We've seen this one before. if (__tmp != __it1) continue; std::ptrdiff_t __n2 = 0; for (__tmp = __first2; __tmp != __last2; ++__tmp) if (*__tmp == *__it1) ++__n2; if (!__n2) return false; std::ptrdiff_t __n1 = 0; for (__tmp = __it1; __tmp != __last1; ++__tmp) if (*__tmp == *__it1) ++__n1; if (__n1 != __n2) return false; } return true; } /** * Primary class template _Equality. * * This is for implementing equality comparison for unordered * containers, per N3068, by John Lakos and Pablo Halpern. * Algorithmically, we follow closely the reference implementations * therein. */ template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits, bool _Unique_keys = _Traits::__unique_keys::value> struct _Equality; /// Specialization. template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> struct _Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits, true> { using __hashtable = _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>; bool _M_equal(const __hashtable&) const; }; template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> bool _Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits, true>:: _M_equal(const __hashtable& __other) const { const __hashtable* __this = static_cast<const __hashtable*>(this); if (__this->size() != __other.size()) return false; for (auto __itx = __this->begin(); __itx != __this->end(); ++__itx) { const auto __ity = __other.find(_ExtractKey()(*__itx)); if (__ity == __other.end() || !bool(*__ity == *__itx)) return false; } return true; } /// Specialization. template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> struct _Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits, false> : public _Equality_base { using __hashtable = _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>; bool _M_equal(const __hashtable&) const; }; template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> bool _Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits, false>:: _M_equal(const __hashtable& __other) const { const __hashtable* __this = static_cast<const __hashtable*>(this); if (__this->size() != __other.size()) return false; for (auto __itx = __this->begin(); __itx != __this->end();) { const auto __xrange = __this->equal_range(_ExtractKey()(*__itx)); const auto __yrange = __other.equal_range(_ExtractKey()(*__itx)); if (std::distance(__xrange.first, __xrange.second) != std::distance(__yrange.first, __yrange.second)) return false; if (!_S_is_permutation(__xrange.first, __xrange.second, __yrange.first)) return false; __itx = __xrange.second; } return true; } /** * This type deals with all allocation and keeps an allocator instance through * inheritance to benefit from EBO when possible. */ template<typename _NodeAlloc> struct _Hashtable_alloc : private _Hashtable_ebo_helper<0, _NodeAlloc> { private: using __ebo_node_alloc = _Hashtable_ebo_helper<0, _NodeAlloc>; public: using __node_type = typename _NodeAlloc::value_type; using __node_alloc_type = _NodeAlloc; // Use __gnu_cxx to benefit from _S_always_equal and al. using __node_alloc_traits = __gnu_cxx::__alloc_traits<__node_alloc_type>; using __value_alloc_traits = typename __node_alloc_traits::template rebind_traits<typename __node_type::value_type>; using __node_base = __detail::_Hash_node_base; using __bucket_type = __node_base*; using __bucket_alloc_type = __alloc_rebind<__node_alloc_type, __bucket_type>; using __bucket_alloc_traits = std::allocator_traits<__bucket_alloc_type>; _Hashtable_alloc() = default; _Hashtable_alloc(const _Hashtable_alloc&) = default; _Hashtable_alloc(_Hashtable_alloc&&) = default; template<typename _Alloc> _Hashtable_alloc(_Alloc&& __a) : __ebo_node_alloc(std::forward<_Alloc>(__a)) { } __node_alloc_type& _M_node_allocator() { return __ebo_node_alloc::_S_get(*this); } const __node_alloc_type& _M_node_allocator() const { return __ebo_node_alloc::_S_cget(*this); } template<typename... _Args> __node_type* _M_allocate_node(_Args&&... __args); void _M_deallocate_node(__node_type* __n); void _M_deallocate_node_ptr(__node_type* __n); // Deallocate the linked list of nodes pointed to by __n void _M_deallocate_nodes(__node_type* __n); __bucket_type* _M_allocate_buckets(std::size_t __n); void _M_deallocate_buckets(__bucket_type*, std::size_t __n); }; // Definitions of class template _Hashtable_alloc's out-of-line member // functions. template<typename _NodeAlloc> template<typename... _Args> typename _Hashtable_alloc<_NodeAlloc>::__node_type* _Hashtable_alloc<_NodeAlloc>::_M_allocate_node(_Args&&... __args) { auto __nptr = __node_alloc_traits::allocate(_M_node_allocator(), 1); __node_type* __n = std::__to_address(__nptr); __try { ::new ((void*)__n) __node_type; __node_alloc_traits::construct(_M_node_allocator(), __n->_M_valptr(), std::forward<_Args>(__args)...); return __n; } __catch(...) { __node_alloc_traits::deallocate(_M_node_allocator(), __nptr, 1); __throw_exception_again; } } template<typename _NodeAlloc> void _Hashtable_alloc<_NodeAlloc>::_M_deallocate_node(__node_type* __n) { __node_alloc_traits::destroy(_M_node_allocator(), __n->_M_valptr()); _M_deallocate_node_ptr(__n); } template<typename _NodeAlloc> void _Hashtable_alloc<_NodeAlloc>::_M_deallocate_node_ptr(__node_type* __n) { typedef typename __node_alloc_traits::pointer _Ptr; auto __ptr = std::pointer_traits<_Ptr>::pointer_to(*__n); __n->~__node_type(); __node_alloc_traits::deallocate(_M_node_allocator(), __ptr, 1); } template<typename _NodeAlloc> void _Hashtable_alloc<_NodeAlloc>::_M_deallocate_nodes(__node_type* __n) { while (__n) { __node_type* __tmp = __n; __n = __n->_M_next(); _M_deallocate_node(__tmp); } } template<typename _NodeAlloc> typename _Hashtable_alloc<_NodeAlloc>::__bucket_type* _Hashtable_alloc<_NodeAlloc>::_M_allocate_buckets(std::size_t __n) { __bucket_alloc_type __alloc(_M_node_allocator()); auto __ptr = __bucket_alloc_traits::allocate(__alloc, __n); __bucket_type* __p = std::__to_address(__ptr); __builtin_memset(__p, 0, __n * sizeof(__bucket_type)); return __p; } template<typename _NodeAlloc> void _Hashtable_alloc<_NodeAlloc>::_M_deallocate_buckets(__bucket_type* __bkts, std::size_t __n) { typedef typename __bucket_alloc_traits::pointer _Ptr; auto __ptr = std::pointer_traits<_Ptr>::pointer_to(*__bkts); __bucket_alloc_type __alloc(_M_node_allocator()); __bucket_alloc_traits::deallocate(__alloc, __ptr, __n); } ///@} hashtable-detail } // namespace __detail _GLIBCXX_END_NAMESPACE_VERSION } // namespace std #endif // _HASHTABLE_POLICY_H # 2157 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/hashtable_policy.h" 3 # 36 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/hashtable.h" 2 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201402L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 37 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/hashtable.h" 3 #if 0 /* expanded by -frewrite-includes */ # include <bits/node_handle.h> #endif /* expanded by -frewrite-includes */ # 37 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/hashtable.h" 3 # 38 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/hashtable.h" 3 #endif # 39 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/hashtable.h" 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION template<typename _Tp, typename _Hash> using __cache_default = __not_<__and_<// Do not cache for fast hasher. __is_fast_hash<_Hash>, // Mandatory to have erase not throwing. __is_nothrow_invocable<const _Hash&, const _Tp&>>>; /** * Primary class template _Hashtable. * * @ingroup hashtable-detail * * @tparam _Value CopyConstructible type. * * @tparam _Key CopyConstructible type. * * @tparam _Alloc An allocator type * ([lib.allocator.requirements]) whose _Alloc::value_type is * _Value. As a conforming extension, we allow for * _Alloc::value_type != _Value. * * @tparam _ExtractKey Function object that takes an object of type * _Value and returns a value of type _Key. * * @tparam _Equal Function object that takes two objects of type k * and returns a bool-like value that is true if the two objects * are considered equal. * * @tparam _H1 The hash function. A unary function object with * argument type _Key and result type size_t. Return values should * be distributed over the entire range [0, numeric_limits<size_t>:::max()]. * * @tparam _H2 The range-hashing function (in the terminology of * Tavori and Dreizin). A binary function object whose argument * types and result type are all size_t. Given arguments r and N, * the return value is in the range [0, N). * * @tparam _Hash The ranged hash function (Tavori and Dreizin). A * binary function whose argument types are _Key and size_t and * whose result type is size_t. Given arguments k and N, the * return value is in the range [0, N). Default: hash(k, N) = * h2(h1(k), N). If _Hash is anything other than the default, _H1 * and _H2 are ignored. * * @tparam _RehashPolicy Policy class with three members, all of * which govern the bucket count. _M_next_bkt(n) returns a bucket * count no smaller than n. _M_bkt_for_elements(n) returns a * bucket count appropriate for an element count of n. * _M_need_rehash(n_bkt, n_elt, n_ins) determines whether, if the * current bucket count is n_bkt and the current element count is * n_elt, we need to increase the bucket count. If so, returns * make_pair(true, n), where n is the new bucket count. If not, * returns make_pair(false, <anything>) * * @tparam _Traits Compile-time class with three boolean * std::integral_constant members: __cache_hash_code, __constant_iterators, * __unique_keys. * * Each _Hashtable data structure has: * * - _Bucket[] _M_buckets * - _Hash_node_base _M_before_begin * - size_type _M_bucket_count * - size_type _M_element_count * * with _Bucket being _Hash_node* and _Hash_node containing: * * - _Hash_node* _M_next * - Tp _M_value * - size_t _M_hash_code if cache_hash_code is true * * In terms of Standard containers the hashtable is like the aggregation of: * * - std::forward_list<_Node> containing the elements * - std::vector<std::forward_list<_Node>::iterator> representing the buckets * * The non-empty buckets contain the node before the first node in the * bucket. This design makes it possible to implement something like a * std::forward_list::insert_after on container insertion and * std::forward_list::erase_after on container erase * calls. _M_before_begin is equivalent to * std::forward_list::before_begin. Empty buckets contain * nullptr. Note that one of the non-empty buckets contains * &_M_before_begin which is not a dereferenceable node so the * node pointer in a bucket shall never be dereferenced, only its * next node can be. * * Walking through a bucket's nodes requires a check on the hash code to * see if each node is still in the bucket. Such a design assumes a * quite efficient hash functor and is one of the reasons it is * highly advisable to set __cache_hash_code to true. * * The container iterators are simply built from nodes. This way * incrementing the iterator is perfectly efficient independent of * how many empty buckets there are in the container. * * On insert we compute the element's hash code and use it to find the * bucket index. If the element must be inserted in an empty bucket * we add it at the beginning of the singly linked list and make the * bucket point to _M_before_begin. The bucket that used to point to * _M_before_begin, if any, is updated to point to its new before * begin node. * * On erase, the simple iterator design requires using the hash * functor to get the index of the bucket to update. For this * reason, when __cache_hash_code is set to false the hash functor must * not throw and this is enforced by a static assertion. * * Functionality is implemented by decomposition into base classes, * where the derived _Hashtable class is used in _Map_base, * _Insert, _Rehash_base, and _Equality base classes to access the * "this" pointer. _Hashtable_base is used in the base classes as a * non-recursive, fully-completed-type so that detailed nested type * information, such as iterator type and node type, can be * used. This is similar to the "Curiously Recurring Template * Pattern" (CRTP) technique, but uses a reconstructed, not * explicitly passed, template pattern. * * Base class templates are: * - __detail::_Hashtable_base * - __detail::_Map_base * - __detail::_Insert * - __detail::_Rehash_base * - __detail::_Equality */ template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> class _Hashtable : public __detail::_Hashtable_base<_Key, _Value, _ExtractKey, _Equal, _H1, _H2, _Hash, _Traits>, public __detail::_Map_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>, public __detail::_Insert<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>, public __detail::_Rehash_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>, public __detail::_Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>, private __detail::_Hashtable_alloc< __alloc_rebind<_Alloc, __detail::_Hash_node<_Value, _Traits::__hash_cached::value>>> { static_assert(is_same<typename remove_cv<_Value>::type, _Value>::value, "unordered container must have a non-const, non-volatile value_type"); #ifdef __STRICT_ANSI__ static_assert(is_same<typename _Alloc::value_type, _Value>{}, "unordered container must have the same value_type as its allocator"); #endif # 195 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/hashtable.h" 3 using __traits_type = _Traits; using __hash_cached = typename __traits_type::__hash_cached; using __node_type = __detail::_Hash_node<_Value, __hash_cached::value>; using __node_alloc_type = __alloc_rebind<_Alloc, __node_type>; using __hashtable_alloc = __detail::_Hashtable_alloc<__node_alloc_type>; using __value_alloc_traits = typename __hashtable_alloc::__value_alloc_traits; using __node_alloc_traits = typename __hashtable_alloc::__node_alloc_traits; using __node_base = typename __hashtable_alloc::__node_base; using __bucket_type = typename __hashtable_alloc::__bucket_type; public: typedef _Key key_type; typedef _Value value_type; typedef _Alloc allocator_type; typedef _Equal key_equal; // mapped_type, if present, comes from _Map_base. // hasher, if present, comes from _Hash_code_base/_Hashtable_base. typedef typename __value_alloc_traits::pointer pointer; typedef typename __value_alloc_traits::const_pointer const_pointer; typedef value_type& reference; typedef const value_type& const_reference; private: using __rehash_type = _RehashPolicy; using __rehash_state = typename __rehash_type::_State; using __constant_iterators = typename __traits_type::__constant_iterators; using __unique_keys = typename __traits_type::__unique_keys; using __key_extract = typename std::conditional< __constant_iterators::value, __detail::_Identity, __detail::_Select1st>::type; using __hashtable_base = __detail:: _Hashtable_base<_Key, _Value, _ExtractKey, _Equal, _H1, _H2, _Hash, _Traits>; using __hash_code_base = typename __hashtable_base::__hash_code_base; using __hash_code = typename __hashtable_base::__hash_code; using __ireturn_type = typename __hashtable_base::__ireturn_type; using __map_base = __detail::_Map_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>; using __rehash_base = __detail::_Rehash_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>; using __eq_base = __detail::_Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>; using __reuse_or_alloc_node_type = __detail::_ReuseOrAllocNode<__node_alloc_type>; // Metaprogramming for picking apart hash caching. template<typename _Cond> using __if_hash_cached = __or_<__not_<__hash_cached>, _Cond>; template<typename _Cond> using __if_hash_not_cached = __or_<__hash_cached, _Cond>; // Compile-time diagnostics. // _Hash_code_base has everything protected, so use this derived type to // access it. struct __hash_code_base_access : __hash_code_base { using __hash_code_base::_M_bucket_index; }; // Getting a bucket index from a node shall not throw because it is used // in methods (erase, swap...) that shall not throw. static_assert(noexcept(declval<const __hash_code_base_access&>() ._M_bucket_index((const __node_type*)nullptr, (std::size_t)0)), "Cache the hash code or qualify your functors involved" " in hash code and bucket index computation with noexcept"); // Following two static assertions are necessary to guarantee // that local_iterator will be default constructible. // When hash codes are cached local iterator inherits from H2 functor // which must then be default constructible. static_assert(__if_hash_cached<is_default_constructible<_H2>>::value, "Functor used to map hash code to bucket index" " must be default constructible"); template<typename _Keya, typename _Valuea, typename _Alloca, typename _ExtractKeya, typename _Equala, typename _H1a, typename _H2a, typename _Hasha, typename _RehashPolicya, typename _Traitsa, bool _Unique_keysa> friend struct __detail::_Map_base; template<typename _Keya, typename _Valuea, typename _Alloca, typename _ExtractKeya, typename _Equala, typename _H1a, typename _H2a, typename _Hasha, typename _RehashPolicya, typename _Traitsa> friend struct __detail::_Insert_base; template<typename _Keya, typename _Valuea, typename _Alloca, typename _ExtractKeya, typename _Equala, typename _H1a, typename _H2a, typename _Hasha, typename _RehashPolicya, typename _Traitsa, bool _Constant_iteratorsa> friend struct __detail::_Insert; public: using size_type = typename __hashtable_base::size_type; using difference_type = typename __hashtable_base::difference_type; using iterator = typename __hashtable_base::iterator; using const_iterator = typename __hashtable_base::const_iterator; using local_iterator = typename __hashtable_base::local_iterator; using const_local_iterator = typename __hashtable_base:: const_local_iterator; #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201402L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 322 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/hashtable.h" 3 using node_type = _Node_handle<_Key, _Value, __node_alloc_type>; using insert_return_type = _Node_insert_return<iterator, node_type>; #endif # 325 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/hashtable.h" 3 private: __bucket_type* _M_buckets = &_M_single_bucket; size_type _M_bucket_count = 1; __node_base _M_before_begin; size_type _M_element_count = 0; _RehashPolicy _M_rehash_policy; // A single bucket used when only need for 1 bucket. Especially // interesting in move semantic to leave hashtable with only 1 buckets // which is not allocated so that we can have those operations noexcept // qualified. // Note that we can't leave hashtable with 0 bucket without adding // numerous checks in the code to avoid 0 modulus. __bucket_type _M_single_bucket = nullptr; bool _M_uses_single_bucket(__bucket_type* __bkts) const { return __builtin_expect(__bkts == &_M_single_bucket, false); } bool _M_uses_single_bucket() const { return _M_uses_single_bucket(_M_buckets); } __hashtable_alloc& _M_base_alloc() { return *this; } __bucket_type* _M_allocate_buckets(size_type __n) { if (__builtin_expect(__n == 1, false)) { _M_single_bucket = nullptr; return &_M_single_bucket; } return __hashtable_alloc::_M_allocate_buckets(__n); } void _M_deallocate_buckets(__bucket_type* __bkts, size_type __n) { if (_M_uses_single_bucket(__bkts)) return; __hashtable_alloc::_M_deallocate_buckets(__bkts, __n); } void _M_deallocate_buckets() { _M_deallocate_buckets(_M_buckets, _M_bucket_count); } // Gets bucket begin, deals with the fact that non-empty buckets contain // their before begin node. __node_type* _M_bucket_begin(size_type __bkt) const; __node_type* _M_begin() const { return static_cast<__node_type*>(_M_before_begin._M_nxt); } // Assign *this using another _Hashtable instance. Either elements // are copy or move depends on the _NodeGenerator. template<typename _Ht, typename _NodeGenerator> void _M_assign_elements(_Ht&&, const _NodeGenerator&); template<typename _NodeGenerator> void _M_assign(const _Hashtable&, const _NodeGenerator&); void _M_move_assign(_Hashtable&&, std::true_type); void _M_move_assign(_Hashtable&&, std::false_type); void _M_reset() noexcept; _Hashtable(const _H1& __h1, const _H2& __h2, const _Hash& __h, const _Equal& __eq, const _ExtractKey& __exk, const allocator_type& __a) : __hashtable_base(__exk, __h1, __h2, __h, __eq), __hashtable_alloc(__node_alloc_type(__a)) { } template<bool _No_realloc = true> static constexpr bool _S_nothrow_move() { #if 0 /* disabled by -frewrite-includes */ #if __cplusplus <= 201402L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 417 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/hashtable.h" 3 return __and_<__bool_constant<_No_realloc>, is_nothrow_copy_constructible<_H1>, is_nothrow_copy_constructible<_Equal>>::value; #else # 421 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/hashtable.h" 3 if constexpr (_No_realloc) if constexpr (is_nothrow_copy_constructible<_H1>()) return is_nothrow_copy_constructible<_Equal>(); return false; #endif # 426 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/hashtable.h" 3 } _Hashtable(_Hashtable&& __ht, __node_alloc_type&& __a, true_type /* alloc always equal */) noexcept(_S_nothrow_move()); _Hashtable(_Hashtable&&, __node_alloc_type&&, false_type /* alloc always equal */); public: // Constructor, destructor, assignment, swap _Hashtable() = default; _Hashtable(size_type __bucket_hint, const _H1&, const _H2&, const _Hash&, const _Equal&, const _ExtractKey&, const allocator_type&); template<typename _InputIterator> _Hashtable(_InputIterator __first, _InputIterator __last, size_type __bucket_hint, const _H1&, const _H2&, const _Hash&, const _Equal&, const _ExtractKey&, const allocator_type&); _Hashtable(const _Hashtable&); _Hashtable(_Hashtable&& __ht) noexcept(_S_nothrow_move()) : _Hashtable(std::move(__ht), std::move(__ht._M_node_allocator()), true_type{}) { } _Hashtable(const _Hashtable&, const allocator_type&); _Hashtable(_Hashtable&& __ht, const allocator_type& __a) noexcept(_S_nothrow_move<__node_alloc_traits::_S_always_equal()>()) : _Hashtable(std::move(__ht), __node_alloc_type(__a), typename __node_alloc_traits::is_always_equal{}) { } // Use delegating constructors. explicit _Hashtable(const allocator_type& __a) : __hashtable_alloc(__node_alloc_type(__a)) { } explicit _Hashtable(size_type __n, const _H1& __hf = _H1(), const key_equal& __eql = key_equal(), const allocator_type& __a = allocator_type()) : _Hashtable(__n, __hf, _H2(), _Hash(), __eql, __key_extract(), __a) { } template<typename _InputIterator> _Hashtable(_InputIterator __f, _InputIterator __l, size_type __n = 0, const _H1& __hf = _H1(), const key_equal& __eql = key_equal(), const allocator_type& __a = allocator_type()) : _Hashtable(__f, __l, __n, __hf, _H2(), _Hash(), __eql, __key_extract(), __a) { } _Hashtable(initializer_list<value_type> __l, size_type __n = 0, const _H1& __hf = _H1(), const key_equal& __eql = key_equal(), const allocator_type& __a = allocator_type()) : _Hashtable(__l.begin(), __l.end(), __n, __hf, _H2(), _Hash(), __eql, __key_extract(), __a) { } _Hashtable& operator=(const _Hashtable& __ht); _Hashtable& operator=(_Hashtable&& __ht) noexcept(__node_alloc_traits::_S_nothrow_move() && is_nothrow_move_assignable<_H1>::value && is_nothrow_move_assignable<_Equal>::value) { constexpr bool __move_storage = __node_alloc_traits::_S_propagate_on_move_assign() || __node_alloc_traits::_S_always_equal(); _M_move_assign(std::move(__ht), __bool_constant<__move_storage>()); return *this; } _Hashtable& operator=(initializer_list<value_type> __l) { __reuse_or_alloc_node_type __roan(_M_begin(), *this); _M_before_begin._M_nxt = nullptr; clear(); this->_M_insert_range(__l.begin(), __l.end(), __roan, __unique_keys()); return *this; } ~_Hashtable() noexcept; void swap(_Hashtable&) noexcept(__and_<__is_nothrow_swappable<_H1>, __is_nothrow_swappable<_Equal>>::value); // Basic container operations iterator begin() noexcept { return iterator(_M_begin()); } const_iterator begin() const noexcept { return const_iterator(_M_begin()); } iterator end() noexcept { return iterator(nullptr); } const_iterator end() const noexcept { return const_iterator(nullptr); } const_iterator cbegin() const noexcept { return const_iterator(_M_begin()); } const_iterator cend() const noexcept { return const_iterator(nullptr); } size_type size() const noexcept { return _M_element_count; } _GLIBCXX_NODISCARD bool empty() const noexcept { return size() == 0; } allocator_type get_allocator() const noexcept { return allocator_type(this->_M_node_allocator()); } size_type max_size() const noexcept { return __node_alloc_traits::max_size(this->_M_node_allocator()); } // Observers key_equal key_eq() const { return this->_M_eq(); } // hash_function, if present, comes from _Hash_code_base. // Bucket operations size_type bucket_count() const noexcept { return _M_bucket_count; } size_type max_bucket_count() const noexcept { return max_size(); } size_type bucket_size(size_type __n) const { return std::distance(begin(__n), end(__n)); } size_type bucket(const key_type& __k) const { return _M_bucket_index(__k, this->_M_hash_code(__k)); } local_iterator begin(size_type __n) { return local_iterator(*this, _M_bucket_begin(__n), __n, _M_bucket_count); } local_iterator end(size_type __n) { return local_iterator(*this, nullptr, __n, _M_bucket_count); } const_local_iterator begin(size_type __n) const { return const_local_iterator(*this, _M_bucket_begin(__n), __n, _M_bucket_count); } const_local_iterator end(size_type __n) const { return const_local_iterator(*this, nullptr, __n, _M_bucket_count); } // DR 691. const_local_iterator cbegin(size_type __n) const { return const_local_iterator(*this, _M_bucket_begin(__n), __n, _M_bucket_count); } const_local_iterator cend(size_type __n) const { return const_local_iterator(*this, nullptr, __n, _M_bucket_count); } float load_factor() const noexcept { return static_cast<float>(size()) / static_cast<float>(bucket_count()); } // max_load_factor, if present, comes from _Rehash_base. // Generalization of max_load_factor. Extension, not found in // TR1. Only useful if _RehashPolicy is something other than // the default. const _RehashPolicy& __rehash_policy() const { return _M_rehash_policy; } void __rehash_policy(const _RehashPolicy& __pol) { _M_rehash_policy = __pol; } // Lookup. iterator find(const key_type& __k); const_iterator find(const key_type& __k) const; size_type count(const key_type& __k) const; std::pair<iterator, iterator> equal_range(const key_type& __k); std::pair<const_iterator, const_iterator> equal_range(const key_type& __k) const; protected: // Bucket index computation helpers. size_type _M_bucket_index(__node_type* __n) const noexcept { return __hash_code_base::_M_bucket_index(__n, _M_bucket_count); } size_type _M_bucket_index(const key_type& __k, __hash_code __c) const { return __hash_code_base::_M_bucket_index(__k, __c, _M_bucket_count); } // Find and insert helper functions and types // Find the node before the one matching the criteria. __node_base* _M_find_before_node(size_type, const key_type&, __hash_code) const; __node_type* _M_find_node(size_type __bkt, const key_type& __key, __hash_code __c) const { __node_base* __before_n = _M_find_before_node(__bkt, __key, __c); if (__before_n) return static_cast<__node_type*>(__before_n->_M_nxt); return nullptr; } // Insert a node at the beginning of a bucket. void _M_insert_bucket_begin(size_type, __node_type*); // Remove the bucket first node void _M_remove_bucket_begin(size_type __bkt, __node_type* __next_n, size_type __next_bkt); // Get the node before __n in the bucket __bkt __node_base* _M_get_previous_node(size_type __bkt, __node_base* __n); // Insert node with hash code __code, in bucket bkt if no rehash (assumes // no element with its key already present). Take ownership of the node, // deallocate it on exception. iterator _M_insert_unique_node(size_type __bkt, __hash_code __code, __node_type* __n, size_type __n_elt = 1); // Insert node with hash code __code. Take ownership of the node, // deallocate it on exception. iterator _M_insert_multi_node(__node_type* __hint, __hash_code __code, __node_type* __n); template<typename... _Args> std::pair<iterator, bool> _M_emplace(std::true_type, _Args&&... __args); template<typename... _Args> iterator _M_emplace(std::false_type __uk, _Args&&... __args) { return _M_emplace(cend(), __uk, std::forward<_Args>(__args)...); } // Emplace with hint, useless when keys are unique. template<typename... _Args> iterator _M_emplace(const_iterator, std::true_type __uk, _Args&&... __args) { return _M_emplace(__uk, std::forward<_Args>(__args)...).first; } template<typename... _Args> iterator _M_emplace(const_iterator, std::false_type, _Args&&... __args); template<typename _Arg, typename _NodeGenerator> std::pair<iterator, bool> _M_insert(_Arg&&, const _NodeGenerator&, true_type, size_type = 1); template<typename _Arg, typename _NodeGenerator> iterator _M_insert(_Arg&& __arg, const _NodeGenerator& __node_gen, false_type __uk) { return _M_insert(cend(), std::forward<_Arg>(__arg), __node_gen, __uk); } // Insert with hint, not used when keys are unique. template<typename _Arg, typename _NodeGenerator> iterator _M_insert(const_iterator, _Arg&& __arg, const _NodeGenerator& __node_gen, true_type __uk) { return _M_insert(std::forward<_Arg>(__arg), __node_gen, __uk).first; } // Insert with hint when keys are not unique. template<typename _Arg, typename _NodeGenerator> iterator _M_insert(const_iterator, _Arg&&, const _NodeGenerator&, false_type); size_type _M_erase(std::true_type, const key_type&); size_type _M_erase(std::false_type, const key_type&); iterator _M_erase(size_type __bkt, __node_base* __prev_n, __node_type* __n); public: // Emplace template<typename... _Args> __ireturn_type emplace(_Args&&... __args) { return _M_emplace(__unique_keys(), std::forward<_Args>(__args)...); } template<typename... _Args> iterator emplace_hint(const_iterator __hint, _Args&&... __args) { return _M_emplace(__hint, __unique_keys(), std::forward<_Args>(__args)...); } // Insert member functions via inheritance. // Erase iterator erase(const_iterator); // LWG 2059. iterator erase(iterator __it) { return erase(const_iterator(__it)); } size_type erase(const key_type& __k) { return _M_erase(__unique_keys(), __k); } iterator erase(const_iterator, const_iterator); void clear() noexcept; // Set number of buckets to be appropriate for container of n element. void rehash(size_type __n); // DR 1189. // reserve, if present, comes from _Rehash_base. #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201402L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 819 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/hashtable.h" 3 /// Re-insert an extracted node into a container with unique keys. insert_return_type _M_reinsert_node(node_type&& __nh) { insert_return_type __ret; if (__nh.empty()) __ret.position = end(); else { __glibcxx_assert(get_allocator() == __nh.get_allocator()); const key_type& __k = __nh._M_key(); __hash_code __code = this->_M_hash_code(__k); size_type __bkt = _M_bucket_index(__k, __code); if (__node_type* __n = _M_find_node(__bkt, __k, __code)) { __ret.node = std::move(__nh); __ret.position = iterator(__n); __ret.inserted = false; } else { __ret.position = _M_insert_unique_node(__bkt, __code, __nh._M_ptr); __nh._M_ptr = nullptr; __ret.inserted = true; } } return __ret; } /// Re-insert an extracted node into a container with equivalent keys. iterator _M_reinsert_node_multi(const_iterator __hint, node_type&& __nh) { iterator __ret; if (__nh.empty()) __ret = end(); else { __glibcxx_assert(get_allocator() == __nh.get_allocator()); auto __code = this->_M_hash_code(__nh._M_key()); auto __node = std::exchange(__nh._M_ptr, nullptr); // FIXME: this deallocates the node on exception. __ret = _M_insert_multi_node(__hint._M_cur, __code, __node); } return __ret; } /// Extract a node. node_type extract(const_iterator __pos) { __node_type* __n = __pos._M_cur; size_t __bkt = _M_bucket_index(__n); // Look for previous node to unlink it from the erased one, this // is why we need buckets to contain the before begin to make // this search fast. __node_base* __prev_n = _M_get_previous_node(__bkt, __n); if (__prev_n == _M_buckets[__bkt]) _M_remove_bucket_begin(__bkt, __n->_M_next(), __n->_M_nxt ? _M_bucket_index(__n->_M_next()) : 0); else if (__n->_M_nxt) { size_type __next_bkt = _M_bucket_index(__n->_M_next()); if (__next_bkt != __bkt) _M_buckets[__next_bkt] = __prev_n; } __prev_n->_M_nxt = __n->_M_nxt; __n->_M_nxt = nullptr; --_M_element_count; return { __n, this->_M_node_allocator() }; } /// Extract a node. node_type extract(const _Key& __k) { node_type __nh; auto __pos = find(__k); if (__pos != end()) __nh = extract(const_iterator(__pos)); return __nh; } /// Merge from a compatible container into one with unique keys. template<typename _Compatible_Hashtable> void _M_merge_unique(_Compatible_Hashtable& __src) noexcept { static_assert(is_same_v<typename _Compatible_Hashtable::node_type, node_type>, "Node types are compatible"); __glibcxx_assert(get_allocator() == __src.get_allocator()); auto __n_elt = __src.size(); for (auto __i = __src.begin(), __end = __src.end(); __i != __end;) { auto __pos = __i++; const key_type& __k = this->_M_extract()(__pos._M_cur->_M_v()); __hash_code __code = this->_M_hash_code(__k); size_type __bkt = _M_bucket_index(__k, __code); if (_M_find_node(__bkt, __k, __code) == nullptr) { auto __nh = __src.extract(__pos); _M_insert_unique_node(__bkt, __code, __nh._M_ptr, __n_elt); __nh._M_ptr = nullptr; __n_elt = 1; } else if (__n_elt != 1) --__n_elt; } } /// Merge from a compatible container into one with equivalent keys. template<typename _Compatible_Hashtable> void _M_merge_multi(_Compatible_Hashtable& __src) noexcept { static_assert(is_same_v<typename _Compatible_Hashtable::node_type, node_type>, "Node types are compatible"); __glibcxx_assert(get_allocator() == __src.get_allocator()); this->reserve(size() + __src.size()); for (auto __i = __src.begin(), __end = __src.end(); __i != __end;) _M_reinsert_node_multi(cend(), __src.extract(__i++)); } #endif // C++17 # 950 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/hashtable.h" 3 private: // Helper rehash method used when keys are unique. void _M_rehash_aux(size_type __n, std::true_type); // Helper rehash method used when keys can be non-unique. void _M_rehash_aux(size_type __n, std::false_type); // Unconditionally change size of bucket array to n, restore // hash policy state to __state on exception. void _M_rehash(size_type __n, const __rehash_state& __state); }; // Definitions of class template _Hashtable's out-of-line member functions. template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> auto _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>:: _M_bucket_begin(size_type __bkt) const -> __node_type* { __node_base* __n = _M_buckets[__bkt]; return __n ? static_cast<__node_type*>(__n->_M_nxt) : nullptr; } template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>:: _Hashtable(size_type __bucket_hint, const _H1& __h1, const _H2& __h2, const _Hash& __h, const _Equal& __eq, const _ExtractKey& __exk, const allocator_type& __a) : _Hashtable(__h1, __h2, __h, __eq, __exk, __a) { auto __bkt = _M_rehash_policy._M_next_bkt(__bucket_hint); if (__bkt > _M_bucket_count) { _M_buckets = _M_allocate_buckets(__bkt); _M_bucket_count = __bkt; } } template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> template<typename _InputIterator> _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>:: _Hashtable(_InputIterator __f, _InputIterator __l, size_type __bucket_hint, const _H1& __h1, const _H2& __h2, const _Hash& __h, const _Equal& __eq, const _ExtractKey& __exk, const allocator_type& __a) : _Hashtable(__h1, __h2, __h, __eq, __exk, __a) { auto __nb_elems = __detail::__distance_fw(__f, __l); auto __bkt_count = _M_rehash_policy._M_next_bkt( std::max(_M_rehash_policy._M_bkt_for_elements(__nb_elems), __bucket_hint)); if (__bkt_count > _M_bucket_count) { _M_buckets = _M_allocate_buckets(__bkt_count); _M_bucket_count = __bkt_count; } for (; __f != __l; ++__f) this->insert(*__f); } template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> auto _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>:: operator=(const _Hashtable& __ht) -> _Hashtable& { if (&__ht == this) return *this; if (__node_alloc_traits::_S_propagate_on_copy_assign()) { auto& __this_alloc = this->_M_node_allocator(); auto& __that_alloc = __ht._M_node_allocator(); if (!__node_alloc_traits::_S_always_equal() && __this_alloc != __that_alloc) { // Replacement allocator cannot free existing storage. this->_M_deallocate_nodes(_M_begin()); _M_before_begin._M_nxt = nullptr; _M_deallocate_buckets(); _M_buckets = nullptr; std::__alloc_on_copy(__this_alloc, __that_alloc); __hashtable_base::operator=(__ht); _M_bucket_count = __ht._M_bucket_count; _M_element_count = __ht._M_element_count; _M_rehash_policy = __ht._M_rehash_policy; __try { _M_assign(__ht, [this](const __node_type* __n) { return this->_M_allocate_node(__n->_M_v()); }); } __catch(...) { // _M_assign took care of deallocating all memory. Now we // must make sure this instance remains in a usable state. _M_reset(); __throw_exception_again; } return *this; } std::__alloc_on_copy(__this_alloc, __that_alloc); } // Reuse allocated buckets and nodes. _M_assign_elements(__ht, [](const __reuse_or_alloc_node_type& __roan, const __node_type* __n) { return __roan(__n->_M_v()); }); return *this; } template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> template<typename _Ht, typename _NodeGenerator> void _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>:: _M_assign_elements(_Ht&& __ht, const _NodeGenerator& __node_gen) { __bucket_type* __former_buckets = nullptr; std::size_t __former_bucket_count = _M_bucket_count; const __rehash_state& __former_state = _M_rehash_policy._M_state(); if (_M_bucket_count != __ht._M_bucket_count) { __former_buckets = _M_buckets; _M_buckets = _M_allocate_buckets(__ht._M_bucket_count); _M_bucket_count = __ht._M_bucket_count; } else __builtin_memset(_M_buckets, 0, _M_bucket_count * sizeof(__bucket_type)); __try { __hashtable_base::operator=(std::forward<_Ht>(__ht)); _M_element_count = __ht._M_element_count; _M_rehash_policy = __ht._M_rehash_policy; __reuse_or_alloc_node_type __roan(_M_begin(), *this); _M_before_begin._M_nxt = nullptr; _M_assign(__ht, [&__node_gen, &__roan](__node_type* __n) { return __node_gen(__roan, __n); }); if (__former_buckets) _M_deallocate_buckets(__former_buckets, __former_bucket_count); } __catch(...) { if (__former_buckets) { // Restore previous buckets. _M_deallocate_buckets(); _M_rehash_policy._M_reset(__former_state); _M_buckets = __former_buckets; _M_bucket_count = __former_bucket_count; } __builtin_memset(_M_buckets, 0, _M_bucket_count * sizeof(__bucket_type)); __throw_exception_again; } } template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> template<typename _NodeGenerator> void _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>:: _M_assign(const _Hashtable& __ht, const _NodeGenerator& __node_gen) { __bucket_type* __buckets = nullptr; if (!_M_buckets) _M_buckets = __buckets = _M_allocate_buckets(_M_bucket_count); __try { if (!__ht._M_before_begin._M_nxt) return; // First deal with the special first node pointed to by // _M_before_begin. __node_type* __ht_n = __ht._M_begin(); __node_type* __this_n = __node_gen(__ht_n); this->_M_copy_code(__this_n, __ht_n); _M_before_begin._M_nxt = __this_n; _M_buckets[_M_bucket_index(__this_n)] = &_M_before_begin; // Then deal with other nodes. __node_base* __prev_n = __this_n; for (__ht_n = __ht_n->_M_next(); __ht_n; __ht_n = __ht_n->_M_next()) { __this_n = __node_gen(__ht_n); __prev_n->_M_nxt = __this_n; this->_M_copy_code(__this_n, __ht_n); size_type __bkt = _M_bucket_index(__this_n); if (!_M_buckets[__bkt]) _M_buckets[__bkt] = __prev_n; __prev_n = __this_n; } } __catch(...) { clear(); if (__buckets) _M_deallocate_buckets(); __throw_exception_again; } } template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> void _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>:: _M_reset() noexcept { _M_rehash_policy._M_reset(); _M_bucket_count = 1; _M_single_bucket = nullptr; _M_buckets = &_M_single_bucket; _M_before_begin._M_nxt = nullptr; _M_element_count = 0; } template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> void _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>:: _M_move_assign(_Hashtable&& __ht, std::true_type) { this->_M_deallocate_nodes(_M_begin()); _M_deallocate_buckets(); __hashtable_base::operator=(std::move(__ht)); _M_rehash_policy = __ht._M_rehash_policy; if (!__ht._M_uses_single_bucket()) _M_buckets = __ht._M_buckets; else { _M_buckets = &_M_single_bucket; _M_single_bucket = __ht._M_single_bucket; } _M_bucket_count = __ht._M_bucket_count; _M_before_begin._M_nxt = __ht._M_before_begin._M_nxt; _M_element_count = __ht._M_element_count; std::__alloc_on_move(this->_M_node_allocator(), __ht._M_node_allocator()); // Fix buckets containing the _M_before_begin pointers that can't be // moved. if (_M_begin()) _M_buckets[_M_bucket_index(_M_begin())] = &_M_before_begin; __ht._M_reset(); } template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> void _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>:: _M_move_assign(_Hashtable&& __ht, std::false_type) { if (__ht._M_node_allocator() == this->_M_node_allocator()) _M_move_assign(std::move(__ht), std::true_type()); else { // Can't move memory, move elements then. _M_assign_elements(std::move(__ht), [](const __reuse_or_alloc_node_type& __roan, __node_type* __n) { return __roan(std::move_if_noexcept(__n->_M_v())); }); __ht.clear(); } } template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>:: _Hashtable(const _Hashtable& __ht) : __hashtable_base(__ht), __map_base(__ht), __rehash_base(__ht), __hashtable_alloc( __node_alloc_traits::_S_select_on_copy(__ht._M_node_allocator())), _M_buckets(nullptr), _M_bucket_count(__ht._M_bucket_count), _M_element_count(__ht._M_element_count), _M_rehash_policy(__ht._M_rehash_policy) { _M_assign(__ht, [this](const __node_type* __n) { return this->_M_allocate_node(__n->_M_v()); }); } template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>:: _Hashtable(_Hashtable&& __ht, __node_alloc_type&& __a, true_type /* alloc always equal */) noexcept(_S_nothrow_move()) : __hashtable_base(__ht), __map_base(__ht), __rehash_base(__ht), __hashtable_alloc(std::move(__a)), _M_buckets(__ht._M_buckets), _M_bucket_count(__ht._M_bucket_count), _M_before_begin(__ht._M_before_begin._M_nxt), _M_element_count(__ht._M_element_count), _M_rehash_policy(__ht._M_rehash_policy) { // Update buckets if __ht is using its single bucket. if (__ht._M_uses_single_bucket()) { _M_buckets = &_M_single_bucket; _M_single_bucket = __ht._M_single_bucket; } // Update, if necessary, bucket pointing to before begin that hasn't // moved. if (_M_begin()) _M_buckets[_M_bucket_index(_M_begin())] = &_M_before_begin; __ht._M_reset(); } template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>:: _Hashtable(const _Hashtable& __ht, const allocator_type& __a) : __hashtable_base(__ht), __map_base(__ht), __rehash_base(__ht), __hashtable_alloc(__node_alloc_type(__a)), _M_buckets(), _M_bucket_count(__ht._M_bucket_count), _M_element_count(__ht._M_element_count), _M_rehash_policy(__ht._M_rehash_policy) { _M_assign(__ht, [this](const __node_type* __n) { return this->_M_allocate_node(__n->_M_v()); }); } template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>:: _Hashtable(_Hashtable&& __ht, __node_alloc_type&& __a, false_type /* alloc always equal */) : __hashtable_base(__ht), __map_base(__ht), __rehash_base(__ht), __hashtable_alloc(std::move(__a)), _M_buckets(nullptr), _M_bucket_count(__ht._M_bucket_count), _M_element_count(__ht._M_element_count), _M_rehash_policy(__ht._M_rehash_policy) { if (__ht._M_node_allocator() == this->_M_node_allocator()) { if (__ht._M_uses_single_bucket()) { _M_buckets = &_M_single_bucket; _M_single_bucket = __ht._M_single_bucket; } else _M_buckets = __ht._M_buckets; _M_before_begin._M_nxt = __ht._M_before_begin._M_nxt; // Update, if necessary, bucket pointing to before begin that hasn't // moved. if (_M_begin()) _M_buckets[_M_bucket_index(_M_begin())] = &_M_before_begin; __ht._M_reset(); } else { _M_assign(__ht, [this](__node_type* __n) { return this->_M_allocate_node( std::move_if_noexcept(__n->_M_v())); }); __ht.clear(); } } template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>:: ~_Hashtable() noexcept { clear(); _M_deallocate_buckets(); } template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> void _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>:: swap(_Hashtable& __x) noexcept(__and_<__is_nothrow_swappable<_H1>, __is_nothrow_swappable<_Equal>>::value) { // The only base class with member variables is hash_code_base. // We define _Hash_code_base::_M_swap because different // specializations have different members. this->_M_swap(__x); std::__alloc_on_swap(this->_M_node_allocator(), __x._M_node_allocator()); std::swap(_M_rehash_policy, __x._M_rehash_policy); // Deal properly with potentially moved instances. if (this->_M_uses_single_bucket()) { if (!__x._M_uses_single_bucket()) { _M_buckets = __x._M_buckets; __x._M_buckets = &__x._M_single_bucket; } } else if (__x._M_uses_single_bucket()) { __x._M_buckets = _M_buckets; _M_buckets = &_M_single_bucket; } else std::swap(_M_buckets, __x._M_buckets); std::swap(_M_bucket_count, __x._M_bucket_count); std::swap(_M_before_begin._M_nxt, __x._M_before_begin._M_nxt); std::swap(_M_element_count, __x._M_element_count); std::swap(_M_single_bucket, __x._M_single_bucket); // Fix buckets containing the _M_before_begin pointers that can't be // swapped. if (_M_begin()) _M_buckets[_M_bucket_index(_M_begin())] = &_M_before_begin; if (__x._M_begin()) __x._M_buckets[__x._M_bucket_index(__x._M_begin())] = &__x._M_before_begin; } template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> auto _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>:: find(const key_type& __k) -> iterator { __hash_code __code = this->_M_hash_code(__k); std::size_t __n = _M_bucket_index(__k, __code); __node_type* __p = _M_find_node(__n, __k, __code); return __p ? iterator(__p) : end(); } template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> auto _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>:: find(const key_type& __k) const -> const_iterator { __hash_code __code = this->_M_hash_code(__k); std::size_t __n = _M_bucket_index(__k, __code); __node_type* __p = _M_find_node(__n, __k, __code); return __p ? const_iterator(__p) : end(); } template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> auto _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>:: count(const key_type& __k) const -> size_type { __hash_code __code = this->_M_hash_code(__k); std::size_t __n = _M_bucket_index(__k, __code); __node_type* __p = _M_bucket_begin(__n); if (!__p) return 0; std::size_t __result = 0; for (;; __p = __p->_M_next()) { if (this->_M_equals(__k, __code, __p)) ++__result; else if (__result) // All equivalent values are next to each other, if we // found a non-equivalent value after an equivalent one it // means that we won't find any new equivalent value. break; if (!__p->_M_nxt || _M_bucket_index(__p->_M_next()) != __n) break; } return __result; } template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> auto _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>:: equal_range(const key_type& __k) -> pair<iterator, iterator> { __hash_code __code = this->_M_hash_code(__k); std::size_t __n = _M_bucket_index(__k, __code); __node_type* __p = _M_find_node(__n, __k, __code); if (__p) { __node_type* __p1 = __p->_M_next(); while (__p1 && _M_bucket_index(__p1) == __n && this->_M_equals(__k, __code, __p1)) __p1 = __p1->_M_next(); return std::make_pair(iterator(__p), iterator(__p1)); } else return std::make_pair(end(), end()); } template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> auto _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>:: equal_range(const key_type& __k) const -> pair<const_iterator, const_iterator> { __hash_code __code = this->_M_hash_code(__k); std::size_t __n = _M_bucket_index(__k, __code); __node_type* __p = _M_find_node(__n, __k, __code); if (__p) { __node_type* __p1 = __p->_M_next(); while (__p1 && _M_bucket_index(__p1) == __n && this->_M_equals(__k, __code, __p1)) __p1 = __p1->_M_next(); return std::make_pair(const_iterator(__p), const_iterator(__p1)); } else return std::make_pair(end(), end()); } // Find the node whose key compares equal to k in the bucket n. // Return nullptr if no node is found. template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> auto _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>:: _M_find_before_node(size_type __n, const key_type& __k, __hash_code __code) const -> __node_base* { __node_base* __prev_p = _M_buckets[__n]; if (!__prev_p) return nullptr; for (__node_type* __p = static_cast<__node_type*>(__prev_p->_M_nxt);; __p = __p->_M_next()) { if (this->_M_equals(__k, __code, __p)) return __prev_p; if (!__p->_M_nxt || _M_bucket_index(__p->_M_next()) != __n) break; __prev_p = __p; } return nullptr; } template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> void _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>:: _M_insert_bucket_begin(size_type __bkt, __node_type* __node) { if (_M_buckets[__bkt]) { // Bucket is not empty, we just need to insert the new node // after the bucket before begin. __node->_M_nxt = _M_buckets[__bkt]->_M_nxt; _M_buckets[__bkt]->_M_nxt = __node; } else { // The bucket is empty, the new node is inserted at the // beginning of the singly-linked list and the bucket will // contain _M_before_begin pointer. __node->_M_nxt = _M_before_begin._M_nxt; _M_before_begin._M_nxt = __node; if (__node->_M_nxt) // We must update former begin bucket that is pointing to // _M_before_begin. _M_buckets[_M_bucket_index(__node->_M_next())] = __node; _M_buckets[__bkt] = &_M_before_begin; } } template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> void _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>:: _M_remove_bucket_begin(size_type __bkt, __node_type* __next, size_type __next_bkt) { if (!__next || __next_bkt != __bkt) { // Bucket is now empty // First update next bucket if any if (__next) _M_buckets[__next_bkt] = _M_buckets[__bkt]; // Second update before begin node if necessary if (&_M_before_begin == _M_buckets[__bkt]) _M_before_begin._M_nxt = __next; _M_buckets[__bkt] = nullptr; } } template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> auto _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>:: _M_get_previous_node(size_type __bkt, __node_base* __n) -> __node_base* { __node_base* __prev_n = _M_buckets[__bkt]; while (__prev_n->_M_nxt != __n) __prev_n = __prev_n->_M_nxt; return __prev_n; } template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> template<typename... _Args> auto _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>:: _M_emplace(std::true_type, _Args&&... __args) -> pair<iterator, bool> { // First build the node to get access to the hash code __node_type* __node = this->_M_allocate_node(std::forward<_Args>(__args)...); const key_type& __k = this->_M_extract()(__node->_M_v()); __hash_code __code; __try { __code = this->_M_hash_code(__k); } __catch(...) { this->_M_deallocate_node(__node); __throw_exception_again; } size_type __bkt = _M_bucket_index(__k, __code); if (__node_type* __p = _M_find_node(__bkt, __k, __code)) { // There is already an equivalent node, no insertion this->_M_deallocate_node(__node); return std::make_pair(iterator(__p), false); } // Insert the node return std::make_pair(_M_insert_unique_node(__bkt, __code, __node), true); } template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> template<typename... _Args> auto _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>:: _M_emplace(const_iterator __hint, std::false_type, _Args&&... __args) -> iterator { // First build the node to get its hash code. __node_type* __node = this->_M_allocate_node(std::forward<_Args>(__args)...); __hash_code __code; __try { __code = this->_M_hash_code(this->_M_extract()(__node->_M_v())); } __catch(...) { this->_M_deallocate_node(__node); __throw_exception_again; } return _M_insert_multi_node(__hint._M_cur, __code, __node); } template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> auto _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>:: _M_insert_unique_node(size_type __bkt, __hash_code __code, __node_type* __node, size_type __n_elt) -> iterator { const __rehash_state& __saved_state = _M_rehash_policy._M_state(); std::pair<bool, std::size_t> __do_rehash = _M_rehash_policy._M_need_rehash(_M_bucket_count, _M_element_count, __n_elt); __try { if (__do_rehash.first) { _M_rehash(__do_rehash.second, __saved_state); __bkt = _M_bucket_index(this->_M_extract()(__node->_M_v()), __code); } this->_M_store_code(__node, __code); // Always insert at the beginning of the bucket. _M_insert_bucket_begin(__bkt, __node); ++_M_element_count; return iterator(__node); } __catch(...) { this->_M_deallocate_node(__node); __throw_exception_again; } } // Insert node, in bucket bkt if no rehash (assumes no element with its key // already present). Take ownership of the node, deallocate it on exception. template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> auto _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>:: _M_insert_multi_node(__node_type* __hint, __hash_code __code, __node_type* __node) -> iterator { const __rehash_state& __saved_state = _M_rehash_policy._M_state(); std::pair<bool, std::size_t> __do_rehash = _M_rehash_policy._M_need_rehash(_M_bucket_count, _M_element_count, 1); __try { if (__do_rehash.first) _M_rehash(__do_rehash.second, __saved_state); this->_M_store_code(__node, __code); const key_type& __k = this->_M_extract()(__node->_M_v()); size_type __bkt = _M_bucket_index(__k, __code); // Find the node before an equivalent one or use hint if it exists and // if it is equivalent. __node_base* __prev = __builtin_expect(__hint != nullptr, false) && this->_M_equals(__k, __code, __hint) ? __hint : _M_find_before_node(__bkt, __k, __code); if (__prev) { // Insert after the node before the equivalent one. __node->_M_nxt = __prev->_M_nxt; __prev->_M_nxt = __node; if (__builtin_expect(__prev == __hint, false)) // hint might be the last bucket node, in this case we need to // update next bucket. if (__node->_M_nxt && !this->_M_equals(__k, __code, __node->_M_next())) { size_type __next_bkt = _M_bucket_index(__node->_M_next()); if (__next_bkt != __bkt) _M_buckets[__next_bkt] = __node; } } else // The inserted node has no equivalent in the // hashtable. We must insert the new node at the // beginning of the bucket to preserve equivalent // elements' relative positions. _M_insert_bucket_begin(__bkt, __node); ++_M_element_count; return iterator(__node); } __catch(...) { this->_M_deallocate_node(__node); __throw_exception_again; } } // Insert v if no element with its key is already present. template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> template<typename _Arg, typename _NodeGenerator> auto _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>:: _M_insert(_Arg&& __v, const _NodeGenerator& __node_gen, true_type, size_type __n_elt) -> pair<iterator, bool> { const key_type& __k = this->_M_extract()(__v); __hash_code __code = this->_M_hash_code(__k); size_type __bkt = _M_bucket_index(__k, __code); __node_type* __n = _M_find_node(__bkt, __k, __code); if (__n) return std::make_pair(iterator(__n), false); __n = __node_gen(std::forward<_Arg>(__v)); return { _M_insert_unique_node(__bkt, __code, __n, __n_elt), true }; } // Insert v unconditionally. template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> template<typename _Arg, typename _NodeGenerator> auto _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>:: _M_insert(const_iterator __hint, _Arg&& __v, const _NodeGenerator& __node_gen, false_type) -> iterator { // First compute the hash code so that we don't do anything if it // throws. __hash_code __code = this->_M_hash_code(this->_M_extract()(__v)); // Second allocate new node so that we don't rehash if it throws. __node_type* __node = __node_gen(std::forward<_Arg>(__v)); return _M_insert_multi_node(__hint._M_cur, __code, __node); } template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> auto _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>:: erase(const_iterator __it) -> iterator { __node_type* __n = __it._M_cur; std::size_t __bkt = _M_bucket_index(__n); // Look for previous node to unlink it from the erased one, this // is why we need buckets to contain the before begin to make // this search fast. __node_base* __prev_n = _M_get_previous_node(__bkt, __n); return _M_erase(__bkt, __prev_n, __n); } template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> auto _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>:: _M_erase(size_type __bkt, __node_base* __prev_n, __node_type* __n) -> iterator { if (__prev_n == _M_buckets[__bkt]) _M_remove_bucket_begin(__bkt, __n->_M_next(), __n->_M_nxt ? _M_bucket_index(__n->_M_next()) : 0); else if (__n->_M_nxt) { size_type __next_bkt = _M_bucket_index(__n->_M_next()); if (__next_bkt != __bkt) _M_buckets[__next_bkt] = __prev_n; } __prev_n->_M_nxt = __n->_M_nxt; iterator __result(__n->_M_next()); this->_M_deallocate_node(__n); --_M_element_count; return __result; } template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> auto _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>:: _M_erase(std::true_type, const key_type& __k) -> size_type { __hash_code __code = this->_M_hash_code(__k); std::size_t __bkt = _M_bucket_index(__k, __code); // Look for the node before the first matching node. __node_base* __prev_n = _M_find_before_node(__bkt, __k, __code); if (!__prev_n) return 0; // We found a matching node, erase it. __node_type* __n = static_cast<__node_type*>(__prev_n->_M_nxt); _M_erase(__bkt, __prev_n, __n); return 1; } template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> auto _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>:: _M_erase(std::false_type, const key_type& __k) -> size_type { __hash_code __code = this->_M_hash_code(__k); std::size_t __bkt = _M_bucket_index(__k, __code); // Look for the node before the first matching node. __node_base* __prev_n = _M_find_before_node(__bkt, __k, __code); if (!__prev_n) return 0; // _GLIBCXX_RESOLVE_LIB_DEFECTS // 526. Is it undefined if a function in the standard changes // in parameters? // We use one loop to find all matching nodes and another to deallocate // them so that the key stays valid during the first loop. It might be // invalidated indirectly when destroying nodes. __node_type* __n = static_cast<__node_type*>(__prev_n->_M_nxt); __node_type* __n_last = __n; std::size_t __n_last_bkt = __bkt; do { __n_last = __n_last->_M_next(); if (!__n_last) break; __n_last_bkt = _M_bucket_index(__n_last); } while (__n_last_bkt == __bkt && this->_M_equals(__k, __code, __n_last)); // Deallocate nodes. size_type __result = 0; do { __node_type* __p = __n->_M_next(); this->_M_deallocate_node(__n); __n = __p; ++__result; --_M_element_count; } while (__n != __n_last); if (__prev_n == _M_buckets[__bkt]) _M_remove_bucket_begin(__bkt, __n_last, __n_last_bkt); else if (__n_last && __n_last_bkt != __bkt) _M_buckets[__n_last_bkt] = __prev_n; __prev_n->_M_nxt = __n_last; return __result; } template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> auto _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>:: erase(const_iterator __first, const_iterator __last) -> iterator { __node_type* __n = __first._M_cur; __node_type* __last_n = __last._M_cur; if (__n == __last_n) return iterator(__n); std::size_t __bkt = _M_bucket_index(__n); __node_base* __prev_n = _M_get_previous_node(__bkt, __n); bool __is_bucket_begin = __n == _M_bucket_begin(__bkt); std::size_t __n_bkt = __bkt; for (;;) { do { __node_type* __tmp = __n; __n = __n->_M_next(); this->_M_deallocate_node(__tmp); --_M_element_count; if (!__n) break; __n_bkt = _M_bucket_index(__n); } while (__n != __last_n && __n_bkt == __bkt); if (__is_bucket_begin) _M_remove_bucket_begin(__bkt, __n, __n_bkt); if (__n == __last_n) break; __is_bucket_begin = true; __bkt = __n_bkt; } if (__n && (__n_bkt != __bkt || __is_bucket_begin)) _M_buckets[__n_bkt] = __prev_n; __prev_n->_M_nxt = __n; return iterator(__n); } template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> void _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>:: clear() noexcept { this->_M_deallocate_nodes(_M_begin()); __builtin_memset(_M_buckets, 0, _M_bucket_count * sizeof(__bucket_type)); _M_element_count = 0; _M_before_begin._M_nxt = nullptr; } template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> void _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>:: rehash(size_type __n) { const __rehash_state& __saved_state = _M_rehash_policy._M_state(); std::size_t __buckets = std::max(_M_rehash_policy._M_bkt_for_elements(_M_element_count + 1), __n); __buckets = _M_rehash_policy._M_next_bkt(__buckets); if (__buckets != _M_bucket_count) _M_rehash(__buckets, __saved_state); else // No rehash, restore previous state to keep a consistent state. _M_rehash_policy._M_reset(__saved_state); } template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> void _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>:: _M_rehash(size_type __n, const __rehash_state& __state) { __try { _M_rehash_aux(__n, __unique_keys()); } __catch(...) { // A failure here means that buckets allocation failed. We only // have to restore hash policy previous state. _M_rehash_policy._M_reset(__state); __throw_exception_again; } } // Rehash when there is no equivalent elements. template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> void _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>:: _M_rehash_aux(size_type __n, std::true_type) { __bucket_type* __new_buckets = _M_allocate_buckets(__n); __node_type* __p = _M_begin(); _M_before_begin._M_nxt = nullptr; std::size_t __bbegin_bkt = 0; while (__p) { __node_type* __next = __p->_M_next(); std::size_t __bkt = __hash_code_base::_M_bucket_index(__p, __n); if (!__new_buckets[__bkt]) { __p->_M_nxt = _M_before_begin._M_nxt; _M_before_begin._M_nxt = __p; __new_buckets[__bkt] = &_M_before_begin; if (__p->_M_nxt) __new_buckets[__bbegin_bkt] = __p; __bbegin_bkt = __bkt; } else { __p->_M_nxt = __new_buckets[__bkt]->_M_nxt; __new_buckets[__bkt]->_M_nxt = __p; } __p = __next; } _M_deallocate_buckets(); _M_bucket_count = __n; _M_buckets = __new_buckets; } // Rehash when there can be equivalent elements, preserve their relative // order. template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits> void _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>:: _M_rehash_aux(size_type __n, std::false_type) { __bucket_type* __new_buckets = _M_allocate_buckets(__n); __node_type* __p = _M_begin(); _M_before_begin._M_nxt = nullptr; std::size_t __bbegin_bkt = 0; std::size_t __prev_bkt = 0; __node_type* __prev_p = nullptr; bool __check_bucket = false; while (__p) { __node_type* __next = __p->_M_next(); std::size_t __bkt = __hash_code_base::_M_bucket_index(__p, __n); if (__prev_p && __prev_bkt == __bkt) { // Previous insert was already in this bucket, we insert after // the previously inserted one to preserve equivalent elements // relative order. __p->_M_nxt = __prev_p->_M_nxt; __prev_p->_M_nxt = __p; // Inserting after a node in a bucket require to check that we // haven't change the bucket last node, in this case next // bucket containing its before begin node must be updated. We // schedule a check as soon as we move out of the sequence of // equivalent nodes to limit the number of checks. __check_bucket = true; } else { if (__check_bucket) { // Check if we shall update the next bucket because of // insertions into __prev_bkt bucket. if (__prev_p->_M_nxt) { std::size_t __next_bkt = __hash_code_base::_M_bucket_index(__prev_p->_M_next(), __n); if (__next_bkt != __prev_bkt) __new_buckets[__next_bkt] = __prev_p; } __check_bucket = false; } if (!__new_buckets[__bkt]) { __p->_M_nxt = _M_before_begin._M_nxt; _M_before_begin._M_nxt = __p; __new_buckets[__bkt] = &_M_before_begin; if (__p->_M_nxt) __new_buckets[__bbegin_bkt] = __p; __bbegin_bkt = __bkt; } else { __p->_M_nxt = __new_buckets[__bkt]->_M_nxt; __new_buckets[__bkt]->_M_nxt = __p; } } __prev_p = __p; __prev_bkt = __bkt; __p = __next; } if (__check_bucket && __prev_p->_M_nxt) { std::size_t __next_bkt = __hash_code_base::_M_bucket_index(__prev_p->_M_next(), __n); if (__next_bkt != __prev_bkt) __new_buckets[__next_bkt] = __prev_p; } _M_deallocate_buckets(); _M_bucket_count = __n; _M_buckets = __new_buckets; } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201402L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 2244 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/hashtable.h" 3 template<typename, typename, typename> class _Hash_merge_helper { }; #endif // C++17 # 2246 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/hashtable.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cpp_deduction_guides >= 201606 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 2248 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/hashtable.h" 3 // Used to constrain deduction guides template<typename _Hash> using _RequireNotAllocatorOrIntegral = __enable_if_t<!__or_<is_integral<_Hash>, __is_allocator<_Hash>>::value>; #endif # 2253 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/hashtable.h" 3 _GLIBCXX_END_NAMESPACE_VERSION } // namespace std #endif // _HASHTABLE_H # 2258 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/hashtable.h" 3 # 47 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/unordered_set" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/unordered_set.h> #endif /* expanded by -frewrite-includes */ # 47 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/unordered_set" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unordered_set.h" 1 3 // unordered_set implementation -*- C++ -*- // Copyright (C) 2010-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file bits/unordered_set.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{unordered_set} */ #ifndef _UNORDERED_SET_H #define _UNORDERED_SET_H namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_BEGIN_NAMESPACE_CONTAINER /// Base types for unordered_set. template<bool _Cache> using __uset_traits = __detail::_Hashtable_traits<_Cache, true, true>; template<typename _Value, typename _Hash = hash<_Value>, typename _Pred = std::equal_to<_Value>, typename _Alloc = std::allocator<_Value>, typename _Tr = __uset_traits<__cache_default<_Value, _Hash>::value>> using __uset_hashtable = _Hashtable<_Value, _Value, _Alloc, __detail::_Identity, _Pred, _Hash, __detail::_Mod_range_hashing, __detail::_Default_ranged_hash, __detail::_Prime_rehash_policy, _Tr>; /// Base types for unordered_multiset. template<bool _Cache> using __umset_traits = __detail::_Hashtable_traits<_Cache, true, false>; template<typename _Value, typename _Hash = hash<_Value>, typename _Pred = std::equal_to<_Value>, typename _Alloc = std::allocator<_Value>, typename _Tr = __umset_traits<__cache_default<_Value, _Hash>::value>> using __umset_hashtable = _Hashtable<_Value, _Value, _Alloc, __detail::_Identity, _Pred, _Hash, __detail::_Mod_range_hashing, __detail::_Default_ranged_hash, __detail::_Prime_rehash_policy, _Tr>; template<class _Value, class _Hash, class _Pred, class _Alloc> class unordered_multiset; /** * @brief A standard container composed of unique keys (containing * at most one of each key value) in which the elements' keys are * the elements themselves. * * @ingroup unordered_associative_containers * * @tparam _Value Type of key objects. * @tparam _Hash Hashing function object type, defaults to hash<_Value>. * @tparam _Pred Predicate function object type, defaults to * equal_to<_Value>. * * @tparam _Alloc Allocator type, defaults to allocator<_Key>. * * Meets the requirements of a <a href="tables.html#65">container</a>, and * <a href="tables.html#xx">unordered associative container</a> * * Base is _Hashtable, dispatched at compile time via template * alias __uset_hashtable. */ template<typename _Value, typename _Hash = hash<_Value>, typename _Pred = equal_to<_Value>, typename _Alloc = allocator<_Value>> class unordered_set { typedef __uset_hashtable<_Value, _Hash, _Pred, _Alloc> _Hashtable; _Hashtable _M_h; public: // typedefs: ///@{ /// Public typedefs. typedef typename _Hashtable::key_type key_type; typedef typename _Hashtable::value_type value_type; typedef typename _Hashtable::hasher hasher; typedef typename _Hashtable::key_equal key_equal; typedef typename _Hashtable::allocator_type allocator_type; ///@} ///@{ /// Iterator-related typedefs. typedef typename _Hashtable::pointer pointer; typedef typename _Hashtable::const_pointer const_pointer; typedef typename _Hashtable::reference reference; typedef typename _Hashtable::const_reference const_reference; typedef typename _Hashtable::iterator iterator; typedef typename _Hashtable::const_iterator const_iterator; typedef typename _Hashtable::local_iterator local_iterator; typedef typename _Hashtable::const_local_iterator const_local_iterator; typedef typename _Hashtable::size_type size_type; typedef typename _Hashtable::difference_type difference_type; ///@} #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201402L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 128 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unordered_set.h" 3 using node_type = typename _Hashtable::node_type; using insert_return_type = typename _Hashtable::insert_return_type; #endif # 131 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unordered_set.h" 3 // construct/destroy/copy /// Default constructor. unordered_set() = default; /** * @brief Default constructor creates no elements. * @param __n Minimal initial number of buckets. * @param __hf A hash functor. * @param __eql A key equality functor. * @param __a An allocator object. */ explicit unordered_set(size_type __n, const hasher& __hf = hasher(), const key_equal& __eql = key_equal(), const allocator_type& __a = allocator_type()) : _M_h(__n, __hf, __eql, __a) { } /** * @brief Builds an %unordered_set from a range. * @param __first An input iterator. * @param __last An input iterator. * @param __n Minimal initial number of buckets. * @param __hf A hash functor. * @param __eql A key equality functor. * @param __a An allocator object. * * Create an %unordered_set consisting of copies of the elements from * [__first,__last). This is linear in N (where N is * distance(__first,__last)). */ template<typename _InputIterator> unordered_set(_InputIterator __first, _InputIterator __last, size_type __n = 0, const hasher& __hf = hasher(), const key_equal& __eql = key_equal(), const allocator_type& __a = allocator_type()) : _M_h(__first, __last, __n, __hf, __eql, __a) { } /// Copy constructor. unordered_set(const unordered_set&) = default; /// Move constructor. unordered_set(unordered_set&&) = default; /** * @brief Creates an %unordered_set with no elements. * @param __a An allocator object. */ explicit unordered_set(const allocator_type& __a) : _M_h(__a) { } /* * @brief Copy constructor with allocator argument. * @param __uset Input %unordered_set to copy. * @param __a An allocator object. */ unordered_set(const unordered_set& __uset, const allocator_type& __a) : _M_h(__uset._M_h, __a) { } /* * @brief Move constructor with allocator argument. * @param __uset Input %unordered_set to move. * @param __a An allocator object. */ unordered_set(unordered_set&& __uset, const allocator_type& __a) noexcept( noexcept(_Hashtable(std::move(__uset._M_h), __a)) ) : _M_h(std::move(__uset._M_h), __a) { } /** * @brief Builds an %unordered_set from an initializer_list. * @param __l An initializer_list. * @param __n Minimal initial number of buckets. * @param __hf A hash functor. * @param __eql A key equality functor. * @param __a An allocator object. * * Create an %unordered_set consisting of copies of the elements in the * list. This is linear in N (where N is @a __l.size()). */ unordered_set(initializer_list<value_type> __l, size_type __n = 0, const hasher& __hf = hasher(), const key_equal& __eql = key_equal(), const allocator_type& __a = allocator_type()) : _M_h(__l, __n, __hf, __eql, __a) { } unordered_set(size_type __n, const allocator_type& __a) : unordered_set(__n, hasher(), key_equal(), __a) { } unordered_set(size_type __n, const hasher& __hf, const allocator_type& __a) : unordered_set(__n, __hf, key_equal(), __a) { } template<typename _InputIterator> unordered_set(_InputIterator __first, _InputIterator __last, size_type __n, const allocator_type& __a) : unordered_set(__first, __last, __n, hasher(), key_equal(), __a) { } template<typename _InputIterator> unordered_set(_InputIterator __first, _InputIterator __last, size_type __n, const hasher& __hf, const allocator_type& __a) : unordered_set(__first, __last, __n, __hf, key_equal(), __a) { } unordered_set(initializer_list<value_type> __l, size_type __n, const allocator_type& __a) : unordered_set(__l, __n, hasher(), key_equal(), __a) { } unordered_set(initializer_list<value_type> __l, size_type __n, const hasher& __hf, const allocator_type& __a) : unordered_set(__l, __n, __hf, key_equal(), __a) { } /// Copy assignment operator. unordered_set& operator=(const unordered_set&) = default; /// Move assignment operator. unordered_set& operator=(unordered_set&&) = default; /** * @brief %Unordered_set list assignment operator. * @param __l An initializer_list. * * This function fills an %unordered_set with copies of the elements in * the initializer list @a __l. * * Note that the assignment completely changes the %unordered_set and * that the resulting %unordered_set's size is the same as the number * of elements assigned. */ unordered_set& operator=(initializer_list<value_type> __l) { _M_h = __l; return *this; } /// Returns the allocator object used by the %unordered_set. allocator_type get_allocator() const noexcept { return _M_h.get_allocator(); } // size and capacity: /// Returns true if the %unordered_set is empty. _GLIBCXX_NODISCARD bool empty() const noexcept { return _M_h.empty(); } /// Returns the size of the %unordered_set. size_type size() const noexcept { return _M_h.size(); } /// Returns the maximum size of the %unordered_set. size_type max_size() const noexcept { return _M_h.max_size(); } // iterators. ///@{ /** * Returns a read-only (constant) iterator that points to the first * element in the %unordered_set. */ iterator begin() noexcept { return _M_h.begin(); } const_iterator begin() const noexcept { return _M_h.begin(); } ///@} ///@{ /** * Returns a read-only (constant) iterator that points one past the last * element in the %unordered_set. */ iterator end() noexcept { return _M_h.end(); } const_iterator end() const noexcept { return _M_h.end(); } ///@} /** * Returns a read-only (constant) iterator that points to the first * element in the %unordered_set. */ const_iterator cbegin() const noexcept { return _M_h.begin(); } /** * Returns a read-only (constant) iterator that points one past the last * element in the %unordered_set. */ const_iterator cend() const noexcept { return _M_h.end(); } // modifiers. /** * @brief Attempts to build and insert an element into the * %unordered_set. * @param __args Arguments used to generate an element. * @return A pair, of which the first element is an iterator that points * to the possibly inserted element, and the second is a bool * that is true if the element was actually inserted. * * This function attempts to build and insert an element into the * %unordered_set. An %unordered_set relies on unique keys and thus an * element is only inserted if it is not already present in the * %unordered_set. * * Insertion requires amortized constant time. */ template<typename... _Args> std::pair<iterator, bool> emplace(_Args&&... __args) { return _M_h.emplace(std::forward<_Args>(__args)...); } /** * @brief Attempts to insert an element into the %unordered_set. * @param __pos An iterator that serves as a hint as to where the * element should be inserted. * @param __args Arguments used to generate the element to be * inserted. * @return An iterator that points to the element with key equivalent to * the one generated from @a __args (may or may not be the * element itself). * * This function is not concerned about whether the insertion took place, * and thus does not return a boolean like the single-argument emplace() * does. Note that the first parameter is only a hint and can * potentially improve the performance of the insertion process. A bad * hint would cause no gains in efficiency. * * For more on @a hinting, see: * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints * * Insertion requires amortized constant time. */ template<typename... _Args> iterator emplace_hint(const_iterator __pos, _Args&&... __args) { return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); } ///@{ /** * @brief Attempts to insert an element into the %unordered_set. * @param __x Element to be inserted. * @return A pair, of which the first element is an iterator that points * to the possibly inserted element, and the second is a bool * that is true if the element was actually inserted. * * This function attempts to insert an element into the %unordered_set. * An %unordered_set relies on unique keys and thus an element is only * inserted if it is not already present in the %unordered_set. * * Insertion requires amortized constant time. */ std::pair<iterator, bool> insert(const value_type& __x) { return _M_h.insert(__x); } std::pair<iterator, bool> insert(value_type&& __x) { return _M_h.insert(std::move(__x)); } ///@} ///@{ /** * @brief Attempts to insert an element into the %unordered_set. * @param __hint An iterator that serves as a hint as to where the * element should be inserted. * @param __x Element to be inserted. * @return An iterator that points to the element with key of * @a __x (may or may not be the element passed in). * * This function is not concerned about whether the insertion took place, * and thus does not return a boolean like the single-argument insert() * does. Note that the first parameter is only a hint and can * potentially improve the performance of the insertion process. A bad * hint would cause no gains in efficiency. * * For more on @a hinting, see: * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints * * Insertion requires amortized constant. */ iterator insert(const_iterator __hint, const value_type& __x) { return _M_h.insert(__hint, __x); } iterator insert(const_iterator __hint, value_type&& __x) { return _M_h.insert(__hint, std::move(__x)); } ///@} /** * @brief A template function that attempts to insert a range of * elements. * @param __first Iterator pointing to the start of the range to be * inserted. * @param __last Iterator pointing to the end of the range. * * Complexity similar to that of the range constructor. */ template<typename _InputIterator> void insert(_InputIterator __first, _InputIterator __last) { _M_h.insert(__first, __last); } /** * @brief Attempts to insert a list of elements into the %unordered_set. * @param __l A std::initializer_list<value_type> of elements * to be inserted. * * Complexity similar to that of the range constructor. */ void insert(initializer_list<value_type> __l) { _M_h.insert(__l); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201402L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 484 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unordered_set.h" 3 /// Extract a node. node_type extract(const_iterator __pos) { __glibcxx_assert(__pos != end()); return _M_h.extract(__pos); } /// Extract a node. node_type extract(const key_type& __key) { return _M_h.extract(__key); } /// Re-insert an extracted node. insert_return_type insert(node_type&& __nh) { return _M_h._M_reinsert_node(std::move(__nh)); } /// Re-insert an extracted node. iterator insert(const_iterator, node_type&& __nh) { return _M_h._M_reinsert_node(std::move(__nh)).position; } #endif // C++17 # 507 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unordered_set.h" 3 ///@{ /** * @brief Erases an element from an %unordered_set. * @param __position An iterator pointing to the element to be erased. * @return An iterator pointing to the element immediately following * @a __position prior to the element being erased. If no such * element exists, end() is returned. * * This function erases an element, pointed to by the given iterator, * from an %unordered_set. Note that this function only erases the * element, and that if the element is itself a pointer, the pointed-to * memory is not touched in any way. Managing the pointer is the user's * responsibility. */ iterator erase(const_iterator __position) { return _M_h.erase(__position); } // LWG 2059. iterator erase(iterator __position) { return _M_h.erase(__position); } ///@} /** * @brief Erases elements according to the provided key. * @param __x Key of element to be erased. * @return The number of elements erased. * * This function erases all the elements located by the given key from * an %unordered_set. For an %unordered_set the result of this function * can only be 0 (not present) or 1 (present). * Note that this function only erases the element, and that if * the element is itself a pointer, the pointed-to memory is not touched * in any way. Managing the pointer is the user's responsibility. */ size_type erase(const key_type& __x) { return _M_h.erase(__x); } /** * @brief Erases a [__first,__last) range of elements from an * %unordered_set. * @param __first Iterator pointing to the start of the range to be * erased. * @param __last Iterator pointing to the end of the range to * be erased. * @return The iterator @a __last. * * This function erases a sequence of elements from an %unordered_set. * Note that this function only erases the element, and that if * the element is itself a pointer, the pointed-to memory is not touched * in any way. Managing the pointer is the user's responsibility. */ iterator erase(const_iterator __first, const_iterator __last) { return _M_h.erase(__first, __last); } /** * Erases all elements in an %unordered_set. Note that this function only * erases the elements, and that if the elements themselves are pointers, * the pointed-to memory is not touched in any way. Managing the pointer * is the user's responsibility. */ void clear() noexcept { _M_h.clear(); } /** * @brief Swaps data with another %unordered_set. * @param __x An %unordered_set of the same element and allocator * types. * * This exchanges the elements between two sets in constant time. * Note that the global std::swap() function is specialized such that * std::swap(s1,s2) will feed to this function. */ void swap(unordered_set& __x) noexcept( noexcept(_M_h.swap(__x._M_h)) ) { _M_h.swap(__x._M_h); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201402L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 591 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unordered_set.h" 3 template<typename, typename, typename> friend class std::_Hash_merge_helper; template<typename _H2, typename _P2> void merge(unordered_set<_Value, _H2, _P2, _Alloc>& __source) { using _Merge_helper = _Hash_merge_helper<unordered_set, _H2, _P2>; _M_h._M_merge_unique(_Merge_helper::_S_get_table(__source)); } template<typename _H2, typename _P2> void merge(unordered_set<_Value, _H2, _P2, _Alloc>&& __source) { merge(__source); } template<typename _H2, typename _P2> void merge(unordered_multiset<_Value, _H2, _P2, _Alloc>& __source) { using _Merge_helper = _Hash_merge_helper<unordered_set, _H2, _P2>; _M_h._M_merge_unique(_Merge_helper::_S_get_table(__source)); } template<typename _H2, typename _P2> void merge(unordered_multiset<_Value, _H2, _P2, _Alloc>&& __source) { merge(__source); } #endif // C++17 # 620 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unordered_set.h" 3 // observers. /// Returns the hash functor object with which the %unordered_set was /// constructed. hasher hash_function() const { return _M_h.hash_function(); } /// Returns the key comparison object with which the %unordered_set was /// constructed. key_equal key_eq() const { return _M_h.key_eq(); } // lookup. ///@{ /** * @brief Tries to locate an element in an %unordered_set. * @param __x Element to be located. * @return Iterator pointing to sought-after element, or end() if not * found. * * This function takes a key and tries to locate the element with which * the key matches. If successful the function returns an iterator * pointing to the sought after element. If unsuccessful it returns the * past-the-end ( @c end() ) iterator. */ iterator find(const key_type& __x) { return _M_h.find(__x); } const_iterator find(const key_type& __x) const { return _M_h.find(__x); } ///@} /** * @brief Finds the number of elements. * @param __x Element to located. * @return Number of elements with specified key. * * This function only makes sense for unordered_multisets; for * unordered_set the result will either be 0 (not present) or 1 * (present). */ size_type count(const key_type& __x) const { return _M_h.count(__x); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 672 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unordered_set.h" 3 /** * @brief Finds whether an element with the given key exists. * @param __x Key of elements to be located. * @return True if there is any element with the specified key. */ bool contains(const key_type& __x) const { return _M_h.find(__x) != _M_h.end(); } #endif # 681 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unordered_set.h" 3 ///@{ /** * @brief Finds a subsequence matching given key. * @param __x Key to be located. * @return Pair of iterators that possibly points to the subsequence * matching given key. * * This function probably only makes sense for multisets. */ std::pair<iterator, iterator> equal_range(const key_type& __x) { return _M_h.equal_range(__x); } std::pair<const_iterator, const_iterator> equal_range(const key_type& __x) const { return _M_h.equal_range(__x); } ///@} // bucket interface. /// Returns the number of buckets of the %unordered_set. size_type bucket_count() const noexcept { return _M_h.bucket_count(); } /// Returns the maximum number of buckets of the %unordered_set. size_type max_bucket_count() const noexcept { return _M_h.max_bucket_count(); } /* * @brief Returns the number of elements in a given bucket. * @param __n A bucket index. * @return The number of elements in the bucket. */ size_type bucket_size(size_type __n) const { return _M_h.bucket_size(__n); } /* * @brief Returns the bucket index of a given element. * @param __key A key instance. * @return The key bucket index. */ size_type bucket(const key_type& __key) const { return _M_h.bucket(__key); } ///@{ /** * @brief Returns a read-only (constant) iterator pointing to the first * bucket element. * @param __n The bucket index. * @return A read-only local iterator. */ local_iterator begin(size_type __n) { return _M_h.begin(__n); } const_local_iterator begin(size_type __n) const { return _M_h.begin(__n); } const_local_iterator cbegin(size_type __n) const { return _M_h.cbegin(__n); } ///@} ///@{ /** * @brief Returns a read-only (constant) iterator pointing to one past * the last bucket elements. * @param __n The bucket index. * @return A read-only local iterator. */ local_iterator end(size_type __n) { return _M_h.end(__n); } const_local_iterator end(size_type __n) const { return _M_h.end(__n); } const_local_iterator cend(size_type __n) const { return _M_h.cend(__n); } ///@} // hash policy. /// Returns the average number of elements per bucket. float load_factor() const noexcept { return _M_h.load_factor(); } /// Returns a positive number that the %unordered_set tries to keep the /// load factor less than or equal to. float max_load_factor() const noexcept { return _M_h.max_load_factor(); } /** * @brief Change the %unordered_set maximum load factor. * @param __z The new maximum load factor. */ void max_load_factor(float __z) { _M_h.max_load_factor(__z); } /** * @brief May rehash the %unordered_set. * @param __n The new number of buckets. * * Rehash will occur only if the new number of buckets respect the * %unordered_set maximum load factor. */ void rehash(size_type __n) { _M_h.rehash(__n); } /** * @brief Prepare the %unordered_set for a specified number of * elements. * @param __n Number of elements required. * * Same as rehash(ceil(n / max_load_factor())). */ void reserve(size_type __n) { _M_h.reserve(__n); } template<typename _Value1, typename _Hash1, typename _Pred1, typename _Alloc1> friend bool operator==(const unordered_set<_Value1, _Hash1, _Pred1, _Alloc1>&, const unordered_set<_Value1, _Hash1, _Pred1, _Alloc1>&); }; #if 0 /* disabled by -frewrite-includes */ #if __cpp_deduction_guides >= 201606 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 821 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unordered_set.h" 3 template<typename _InputIterator, typename _Hash = hash<typename iterator_traits<_InputIterator>::value_type>, typename _Pred = equal_to<typename iterator_traits<_InputIterator>::value_type>, typename _Allocator = allocator<typename iterator_traits<_InputIterator>::value_type>, typename = _RequireInputIter<_InputIterator>, typename = _RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireNotAllocator<_Pred>, typename = _RequireAllocator<_Allocator>> unordered_set(_InputIterator, _InputIterator, unordered_set<int>::size_type = {}, _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator()) -> unordered_set<typename iterator_traits<_InputIterator>::value_type, _Hash, _Pred, _Allocator>; template<typename _Tp, typename _Hash = hash<_Tp>, typename _Pred = equal_to<_Tp>, typename _Allocator = allocator<_Tp>, typename = _RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireNotAllocator<_Pred>, typename = _RequireAllocator<_Allocator>> unordered_set(initializer_list<_Tp>, unordered_set<int>::size_type = {}, _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator()) -> unordered_set<_Tp, _Hash, _Pred, _Allocator>; template<typename _InputIterator, typename _Allocator, typename = _RequireInputIter<_InputIterator>, typename = _RequireAllocator<_Allocator>> unordered_set(_InputIterator, _InputIterator, unordered_set<int>::size_type, _Allocator) -> unordered_set<typename iterator_traits<_InputIterator>::value_type, hash< typename iterator_traits<_InputIterator>::value_type>, equal_to< typename iterator_traits<_InputIterator>::value_type>, _Allocator>; template<typename _InputIterator, typename _Hash, typename _Allocator, typename = _RequireInputIter<_InputIterator>, typename = _RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireAllocator<_Allocator>> unordered_set(_InputIterator, _InputIterator, unordered_set<int>::size_type, _Hash, _Allocator) -> unordered_set<typename iterator_traits<_InputIterator>::value_type, _Hash, equal_to< typename iterator_traits<_InputIterator>::value_type>, _Allocator>; template<typename _Tp, typename _Allocator, typename = _RequireAllocator<_Allocator>> unordered_set(initializer_list<_Tp>, unordered_set<int>::size_type, _Allocator) -> unordered_set<_Tp, hash<_Tp>, equal_to<_Tp>, _Allocator>; template<typename _Tp, typename _Hash, typename _Allocator, typename = _RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireAllocator<_Allocator>> unordered_set(initializer_list<_Tp>, unordered_set<int>::size_type, _Hash, _Allocator) -> unordered_set<_Tp, _Hash, equal_to<_Tp>, _Allocator>; #endif # 889 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unordered_set.h" 3 /** * @brief A standard container composed of equivalent keys * (possibly containing multiple of each key value) in which the * elements' keys are the elements themselves. * * @ingroup unordered_associative_containers * * @tparam _Value Type of key objects. * @tparam _Hash Hashing function object type, defaults to hash<_Value>. * @tparam _Pred Predicate function object type, defaults * to equal_to<_Value>. * @tparam _Alloc Allocator type, defaults to allocator<_Key>. * * Meets the requirements of a <a href="tables.html#65">container</a>, and * <a href="tables.html#xx">unordered associative container</a> * * Base is _Hashtable, dispatched at compile time via template * alias __umset_hashtable. */ template<typename _Value, typename _Hash = hash<_Value>, typename _Pred = equal_to<_Value>, typename _Alloc = allocator<_Value>> class unordered_multiset { typedef __umset_hashtable<_Value, _Hash, _Pred, _Alloc> _Hashtable; _Hashtable _M_h; public: // typedefs: ///@{ /// Public typedefs. typedef typename _Hashtable::key_type key_type; typedef typename _Hashtable::value_type value_type; typedef typename _Hashtable::hasher hasher; typedef typename _Hashtable::key_equal key_equal; typedef typename _Hashtable::allocator_type allocator_type; ///@} ///@{ /// Iterator-related typedefs. typedef typename _Hashtable::pointer pointer; typedef typename _Hashtable::const_pointer const_pointer; typedef typename _Hashtable::reference reference; typedef typename _Hashtable::const_reference const_reference; typedef typename _Hashtable::iterator iterator; typedef typename _Hashtable::const_iterator const_iterator; typedef typename _Hashtable::local_iterator local_iterator; typedef typename _Hashtable::const_local_iterator const_local_iterator; typedef typename _Hashtable::size_type size_type; typedef typename _Hashtable::difference_type difference_type; ///@} #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201402L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 944 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unordered_set.h" 3 using node_type = typename _Hashtable::node_type; #endif # 946 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unordered_set.h" 3 // construct/destroy/copy /// Default constructor. unordered_multiset() = default; /** * @brief Default constructor creates no elements. * @param __n Minimal initial number of buckets. * @param __hf A hash functor. * @param __eql A key equality functor. * @param __a An allocator object. */ explicit unordered_multiset(size_type __n, const hasher& __hf = hasher(), const key_equal& __eql = key_equal(), const allocator_type& __a = allocator_type()) : _M_h(__n, __hf, __eql, __a) { } /** * @brief Builds an %unordered_multiset from a range. * @param __first An input iterator. * @param __last An input iterator. * @param __n Minimal initial number of buckets. * @param __hf A hash functor. * @param __eql A key equality functor. * @param __a An allocator object. * * Create an %unordered_multiset consisting of copies of the elements * from [__first,__last). This is linear in N (where N is * distance(__first,__last)). */ template<typename _InputIterator> unordered_multiset(_InputIterator __first, _InputIterator __last, size_type __n = 0, const hasher& __hf = hasher(), const key_equal& __eql = key_equal(), const allocator_type& __a = allocator_type()) : _M_h(__first, __last, __n, __hf, __eql, __a) { } /// Copy constructor. unordered_multiset(const unordered_multiset&) = default; /// Move constructor. unordered_multiset(unordered_multiset&&) = default; /** * @brief Builds an %unordered_multiset from an initializer_list. * @param __l An initializer_list. * @param __n Minimal initial number of buckets. * @param __hf A hash functor. * @param __eql A key equality functor. * @param __a An allocator object. * * Create an %unordered_multiset consisting of copies of the elements in * the list. This is linear in N (where N is @a __l.size()). */ unordered_multiset(initializer_list<value_type> __l, size_type __n = 0, const hasher& __hf = hasher(), const key_equal& __eql = key_equal(), const allocator_type& __a = allocator_type()) : _M_h(__l, __n, __hf, __eql, __a) { } /// Copy assignment operator. unordered_multiset& operator=(const unordered_multiset&) = default; /// Move assignment operator. unordered_multiset& operator=(unordered_multiset&&) = default; /** * @brief Creates an %unordered_multiset with no elements. * @param __a An allocator object. */ explicit unordered_multiset(const allocator_type& __a) : _M_h(__a) { } /* * @brief Copy constructor with allocator argument. * @param __uset Input %unordered_multiset to copy. * @param __a An allocator object. */ unordered_multiset(const unordered_multiset& __umset, const allocator_type& __a) : _M_h(__umset._M_h, __a) { } /* * @brief Move constructor with allocator argument. * @param __umset Input %unordered_multiset to move. * @param __a An allocator object. */ unordered_multiset(unordered_multiset&& __umset, const allocator_type& __a) noexcept( noexcept(_Hashtable(std::move(__umset._M_h), __a)) ) : _M_h(std::move(__umset._M_h), __a) { } unordered_multiset(size_type __n, const allocator_type& __a) : unordered_multiset(__n, hasher(), key_equal(), __a) { } unordered_multiset(size_type __n, const hasher& __hf, const allocator_type& __a) : unordered_multiset(__n, __hf, key_equal(), __a) { } template<typename _InputIterator> unordered_multiset(_InputIterator __first, _InputIterator __last, size_type __n, const allocator_type& __a) : unordered_multiset(__first, __last, __n, hasher(), key_equal(), __a) { } template<typename _InputIterator> unordered_multiset(_InputIterator __first, _InputIterator __last, size_type __n, const hasher& __hf, const allocator_type& __a) : unordered_multiset(__first, __last, __n, __hf, key_equal(), __a) { } unordered_multiset(initializer_list<value_type> __l, size_type __n, const allocator_type& __a) : unordered_multiset(__l, __n, hasher(), key_equal(), __a) { } unordered_multiset(initializer_list<value_type> __l, size_type __n, const hasher& __hf, const allocator_type& __a) : unordered_multiset(__l, __n, __hf, key_equal(), __a) { } /** * @brief %Unordered_multiset list assignment operator. * @param __l An initializer_list. * * This function fills an %unordered_multiset with copies of the elements * in the initializer list @a __l. * * Note that the assignment completely changes the %unordered_multiset * and that the resulting %unordered_multiset's size is the same as the * number of elements assigned. */ unordered_multiset& operator=(initializer_list<value_type> __l) { _M_h = __l; return *this; } /// Returns the allocator object used by the %unordered_multiset. allocator_type get_allocator() const noexcept { return _M_h.get_allocator(); } // size and capacity: /// Returns true if the %unordered_multiset is empty. _GLIBCXX_NODISCARD bool empty() const noexcept { return _M_h.empty(); } /// Returns the size of the %unordered_multiset. size_type size() const noexcept { return _M_h.size(); } /// Returns the maximum size of the %unordered_multiset. size_type max_size() const noexcept { return _M_h.max_size(); } // iterators. ///@{ /** * Returns a read-only (constant) iterator that points to the first * element in the %unordered_multiset. */ iterator begin() noexcept { return _M_h.begin(); } const_iterator begin() const noexcept { return _M_h.begin(); } ///@} ///@{ /** * Returns a read-only (constant) iterator that points one past the last * element in the %unordered_multiset. */ iterator end() noexcept { return _M_h.end(); } const_iterator end() const noexcept { return _M_h.end(); } ///@} /** * Returns a read-only (constant) iterator that points to the first * element in the %unordered_multiset. */ const_iterator cbegin() const noexcept { return _M_h.begin(); } /** * Returns a read-only (constant) iterator that points one past the last * element in the %unordered_multiset. */ const_iterator cend() const noexcept { return _M_h.end(); } // modifiers. /** * @brief Builds and insert an element into the %unordered_multiset. * @param __args Arguments used to generate an element. * @return An iterator that points to the inserted element. * * Insertion requires amortized constant time. */ template<typename... _Args> iterator emplace(_Args&&... __args) { return _M_h.emplace(std::forward<_Args>(__args)...); } /** * @brief Inserts an element into the %unordered_multiset. * @param __pos An iterator that serves as a hint as to where the * element should be inserted. * @param __args Arguments used to generate the element to be * inserted. * @return An iterator that points to the inserted element. * * Note that the first parameter is only a hint and can potentially * improve the performance of the insertion process. A bad hint would * cause no gains in efficiency. * * For more on @a hinting, see: * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints * * Insertion requires amortized constant time. */ template<typename... _Args> iterator emplace_hint(const_iterator __pos, _Args&&... __args) { return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); } ///@{ /** * @brief Inserts an element into the %unordered_multiset. * @param __x Element to be inserted. * @return An iterator that points to the inserted element. * * Insertion requires amortized constant time. */ iterator insert(const value_type& __x) { return _M_h.insert(__x); } iterator insert(value_type&& __x) { return _M_h.insert(std::move(__x)); } ///@} ///@{ /** * @brief Inserts an element into the %unordered_multiset. * @param __hint An iterator that serves as a hint as to where the * element should be inserted. * @param __x Element to be inserted. * @return An iterator that points to the inserted element. * * Note that the first parameter is only a hint and can potentially * improve the performance of the insertion process. A bad hint would * cause no gains in efficiency. * * For more on @a hinting, see: * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints * * Insertion requires amortized constant. */ iterator insert(const_iterator __hint, const value_type& __x) { return _M_h.insert(__hint, __x); } iterator insert(const_iterator __hint, value_type&& __x) { return _M_h.insert(__hint, std::move(__x)); } ///@} /** * @brief A template function that inserts a range of elements. * @param __first Iterator pointing to the start of the range to be * inserted. * @param __last Iterator pointing to the end of the range. * * Complexity similar to that of the range constructor. */ template<typename _InputIterator> void insert(_InputIterator __first, _InputIterator __last) { _M_h.insert(__first, __last); } /** * @brief Inserts a list of elements into the %unordered_multiset. * @param __l A std::initializer_list<value_type> of elements to be * inserted. * * Complexity similar to that of the range constructor. */ void insert(initializer_list<value_type> __l) { _M_h.insert(__l); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201402L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1277 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unordered_set.h" 3 /// Extract a node. node_type extract(const_iterator __pos) { __glibcxx_assert(__pos != end()); return _M_h.extract(__pos); } /// Extract a node. node_type extract(const key_type& __key) { return _M_h.extract(__key); } /// Re-insert an extracted node. iterator insert(node_type&& __nh) { return _M_h._M_reinsert_node_multi(cend(), std::move(__nh)); } /// Re-insert an extracted node. iterator insert(const_iterator __hint, node_type&& __nh) { return _M_h._M_reinsert_node_multi(__hint, std::move(__nh)); } #endif // C++17 # 1300 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unordered_set.h" 3 ///@{ /** * @brief Erases an element from an %unordered_multiset. * @param __position An iterator pointing to the element to be erased. * @return An iterator pointing to the element immediately following * @a __position prior to the element being erased. If no such * element exists, end() is returned. * * This function erases an element, pointed to by the given iterator, * from an %unordered_multiset. * * Note that this function only erases the element, and that if the * element is itself a pointer, the pointed-to memory is not touched in * any way. Managing the pointer is the user's responsibility. */ iterator erase(const_iterator __position) { return _M_h.erase(__position); } // LWG 2059. iterator erase(iterator __position) { return _M_h.erase(__position); } ///@} /** * @brief Erases elements according to the provided key. * @param __x Key of element to be erased. * @return The number of elements erased. * * This function erases all the elements located by the given key from * an %unordered_multiset. * * Note that this function only erases the element, and that if the * element is itself a pointer, the pointed-to memory is not touched in * any way. Managing the pointer is the user's responsibility. */ size_type erase(const key_type& __x) { return _M_h.erase(__x); } /** * @brief Erases a [__first,__last) range of elements from an * %unordered_multiset. * @param __first Iterator pointing to the start of the range to be * erased. * @param __last Iterator pointing to the end of the range to * be erased. * @return The iterator @a __last. * * This function erases a sequence of elements from an * %unordered_multiset. * * Note that this function only erases the element, and that if * the element is itself a pointer, the pointed-to memory is not touched * in any way. Managing the pointer is the user's responsibility. */ iterator erase(const_iterator __first, const_iterator __last) { return _M_h.erase(__first, __last); } /** * Erases all elements in an %unordered_multiset. * * Note that this function only erases the elements, and that if the * elements themselves are pointers, the pointed-to memory is not touched * in any way. Managing the pointer is the user's responsibility. */ void clear() noexcept { _M_h.clear(); } /** * @brief Swaps data with another %unordered_multiset. * @param __x An %unordered_multiset of the same element and allocator * types. * * This exchanges the elements between two sets in constant time. * Note that the global std::swap() function is specialized such that * std::swap(s1,s2) will feed to this function. */ void swap(unordered_multiset& __x) noexcept( noexcept(_M_h.swap(__x._M_h)) ) { _M_h.swap(__x._M_h); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201402L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1389 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unordered_set.h" 3 template<typename, typename, typename> friend class std::_Hash_merge_helper; template<typename _H2, typename _P2> void merge(unordered_multiset<_Value, _H2, _P2, _Alloc>& __source) { using _Merge_helper = _Hash_merge_helper<unordered_multiset, _H2, _P2>; _M_h._M_merge_multi(_Merge_helper::_S_get_table(__source)); } template<typename _H2, typename _P2> void merge(unordered_multiset<_Value, _H2, _P2, _Alloc>&& __source) { merge(__source); } template<typename _H2, typename _P2> void merge(unordered_set<_Value, _H2, _P2, _Alloc>& __source) { using _Merge_helper = _Hash_merge_helper<unordered_multiset, _H2, _P2>; _M_h._M_merge_multi(_Merge_helper::_S_get_table(__source)); } template<typename _H2, typename _P2> void merge(unordered_set<_Value, _H2, _P2, _Alloc>&& __source) { merge(__source); } #endif // C++17 # 1420 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unordered_set.h" 3 // observers. /// Returns the hash functor object with which the %unordered_multiset /// was constructed. hasher hash_function() const { return _M_h.hash_function(); } /// Returns the key comparison object with which the %unordered_multiset /// was constructed. key_equal key_eq() const { return _M_h.key_eq(); } // lookup. ///@{ /** * @brief Tries to locate an element in an %unordered_multiset. * @param __x Element to be located. * @return Iterator pointing to sought-after element, or end() if not * found. * * This function takes a key and tries to locate the element with which * the key matches. If successful the function returns an iterator * pointing to the sought after element. If unsuccessful it returns the * past-the-end ( @c end() ) iterator. */ iterator find(const key_type& __x) { return _M_h.find(__x); } const_iterator find(const key_type& __x) const { return _M_h.find(__x); } ///@} /** * @brief Finds the number of elements. * @param __x Element to located. * @return Number of elements with specified key. */ size_type count(const key_type& __x) const { return _M_h.count(__x); } #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1468 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unordered_set.h" 3 /** * @brief Finds whether an element with the given key exists. * @param __x Key of elements to be located. * @return True if there is any element with the specified key. */ bool contains(const key_type& __x) const { return _M_h.find(__x) != _M_h.end(); } #endif # 1477 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unordered_set.h" 3 ///@{ /** * @brief Finds a subsequence matching given key. * @param __x Key to be located. * @return Pair of iterators that possibly points to the subsequence * matching given key. */ std::pair<iterator, iterator> equal_range(const key_type& __x) { return _M_h.equal_range(__x); } std::pair<const_iterator, const_iterator> equal_range(const key_type& __x) const { return _M_h.equal_range(__x); } ///@} // bucket interface. /// Returns the number of buckets of the %unordered_multiset. size_type bucket_count() const noexcept { return _M_h.bucket_count(); } /// Returns the maximum number of buckets of the %unordered_multiset. size_type max_bucket_count() const noexcept { return _M_h.max_bucket_count(); } /* * @brief Returns the number of elements in a given bucket. * @param __n A bucket index. * @return The number of elements in the bucket. */ size_type bucket_size(size_type __n) const { return _M_h.bucket_size(__n); } /* * @brief Returns the bucket index of a given element. * @param __key A key instance. * @return The key bucket index. */ size_type bucket(const key_type& __key) const { return _M_h.bucket(__key); } ///@{ /** * @brief Returns a read-only (constant) iterator pointing to the first * bucket element. * @param __n The bucket index. * @return A read-only local iterator. */ local_iterator begin(size_type __n) { return _M_h.begin(__n); } const_local_iterator begin(size_type __n) const { return _M_h.begin(__n); } const_local_iterator cbegin(size_type __n) const { return _M_h.cbegin(__n); } ///@} ///@{ /** * @brief Returns a read-only (constant) iterator pointing to one past * the last bucket elements. * @param __n The bucket index. * @return A read-only local iterator. */ local_iterator end(size_type __n) { return _M_h.end(__n); } const_local_iterator end(size_type __n) const { return _M_h.end(__n); } const_local_iterator cend(size_type __n) const { return _M_h.cend(__n); } ///@} // hash policy. /// Returns the average number of elements per bucket. float load_factor() const noexcept { return _M_h.load_factor(); } /// Returns a positive number that the %unordered_multiset tries to keep the /// load factor less than or equal to. float max_load_factor() const noexcept { return _M_h.max_load_factor(); } /** * @brief Change the %unordered_multiset maximum load factor. * @param __z The new maximum load factor. */ void max_load_factor(float __z) { _M_h.max_load_factor(__z); } /** * @brief May rehash the %unordered_multiset. * @param __n The new number of buckets. * * Rehash will occur only if the new number of buckets respect the * %unordered_multiset maximum load factor. */ void rehash(size_type __n) { _M_h.rehash(__n); } /** * @brief Prepare the %unordered_multiset for a specified number of * elements. * @param __n Number of elements required. * * Same as rehash(ceil(n / max_load_factor())). */ void reserve(size_type __n) { _M_h.reserve(__n); } template<typename _Value1, typename _Hash1, typename _Pred1, typename _Alloc1> friend bool operator==(const unordered_multiset<_Value1, _Hash1, _Pred1, _Alloc1>&, const unordered_multiset<_Value1, _Hash1, _Pred1, _Alloc1>&); }; #if 0 /* disabled by -frewrite-includes */ #if __cpp_deduction_guides >= 201606 #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1616 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unordered_set.h" 3 template<typename _InputIterator, typename _Hash = hash<typename iterator_traits<_InputIterator>::value_type>, typename _Pred = equal_to<typename iterator_traits<_InputIterator>::value_type>, typename _Allocator = allocator<typename iterator_traits<_InputIterator>::value_type>, typename = _RequireInputIter<_InputIterator>, typename = _RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireNotAllocator<_Pred>, typename = _RequireAllocator<_Allocator>> unordered_multiset(_InputIterator, _InputIterator, unordered_multiset<int>::size_type = {}, _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator()) -> unordered_multiset<typename iterator_traits<_InputIterator>::value_type, _Hash, _Pred, _Allocator>; template<typename _Tp, typename _Hash = hash<_Tp>, typename _Pred = equal_to<_Tp>, typename _Allocator = allocator<_Tp>, typename = _RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireNotAllocator<_Pred>, typename = _RequireAllocator<_Allocator>> unordered_multiset(initializer_list<_Tp>, unordered_multiset<int>::size_type = {}, _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator()) -> unordered_multiset<_Tp, _Hash, _Pred, _Allocator>; template<typename _InputIterator, typename _Allocator, typename = _RequireInputIter<_InputIterator>, typename = _RequireAllocator<_Allocator>> unordered_multiset(_InputIterator, _InputIterator, unordered_multiset<int>::size_type, _Allocator) -> unordered_multiset<typename iterator_traits<_InputIterator>::value_type, hash<typename iterator_traits<_InputIterator>::value_type>, equal_to<typename iterator_traits<_InputIterator>::value_type>, _Allocator>; template<typename _InputIterator, typename _Hash, typename _Allocator, typename = _RequireInputIter<_InputIterator>, typename = _RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireAllocator<_Allocator>> unordered_multiset(_InputIterator, _InputIterator, unordered_multiset<int>::size_type, _Hash, _Allocator) -> unordered_multiset<typename iterator_traits<_InputIterator>::value_type, _Hash, equal_to< typename iterator_traits<_InputIterator>::value_type>, _Allocator>; template<typename _Tp, typename _Allocator, typename = _RequireAllocator<_Allocator>> unordered_multiset(initializer_list<_Tp>, unordered_multiset<int>::size_type, _Allocator) -> unordered_multiset<_Tp, hash<_Tp>, equal_to<_Tp>, _Allocator>; template<typename _Tp, typename _Hash, typename _Allocator, typename = _RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireAllocator<_Allocator>> unordered_multiset(initializer_list<_Tp>, unordered_multiset<int>::size_type, _Hash, _Allocator) -> unordered_multiset<_Tp, _Hash, equal_to<_Tp>, _Allocator>; #endif # 1688 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unordered_set.h" 3 template<class _Value, class _Hash, class _Pred, class _Alloc> inline void swap(unordered_set<_Value, _Hash, _Pred, _Alloc>& __x, unordered_set<_Value, _Hash, _Pred, _Alloc>& __y) noexcept(noexcept(__x.swap(__y))) { __x.swap(__y); } template<class _Value, class _Hash, class _Pred, class _Alloc> inline void swap(unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x, unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y) noexcept(noexcept(__x.swap(__y))) { __x.swap(__y); } template<class _Value, class _Hash, class _Pred, class _Alloc> inline bool operator==(const unordered_set<_Value, _Hash, _Pred, _Alloc>& __x, const unordered_set<_Value, _Hash, _Pred, _Alloc>& __y) { return __x._M_h._M_equal(__y._M_h); } template<class _Value, class _Hash, class _Pred, class _Alloc> inline bool operator!=(const unordered_set<_Value, _Hash, _Pred, _Alloc>& __x, const unordered_set<_Value, _Hash, _Pred, _Alloc>& __y) { return !(__x == __y); } template<class _Value, class _Hash, class _Pred, class _Alloc> inline bool operator==(const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x, const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y) { return __x._M_h._M_equal(__y._M_h); } template<class _Value, class _Hash, class _Pred, class _Alloc> inline bool operator!=(const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x, const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y) { return !(__x == __y); } _GLIBCXX_END_NAMESPACE_CONTAINER #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201402L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 1730 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unordered_set.h" 3 // Allow std::unordered_set access to internals of compatible sets. template<typename _Val, typename _Hash1, typename _Eq1, typename _Alloc, typename _Hash2, typename _Eq2> struct _Hash_merge_helper< _GLIBCXX_STD_C::unordered_set<_Val, _Hash1, _Eq1, _Alloc>, _Hash2, _Eq2> { private: template<typename... _Tp> using unordered_set = _GLIBCXX_STD_C::unordered_set<_Tp...>; template<typename... _Tp> using unordered_multiset = _GLIBCXX_STD_C::unordered_multiset<_Tp...>; friend unordered_set<_Val, _Hash1, _Eq1, _Alloc>; static auto& _S_get_table(unordered_set<_Val, _Hash2, _Eq2, _Alloc>& __set) { return __set._M_h; } static auto& _S_get_table(unordered_multiset<_Val, _Hash2, _Eq2, _Alloc>& __set) { return __set._M_h; } }; // Allow std::unordered_multiset access to internals of compatible sets. template<typename _Val, typename _Hash1, typename _Eq1, typename _Alloc, typename _Hash2, typename _Eq2> struct _Hash_merge_helper< _GLIBCXX_STD_C::unordered_multiset<_Val, _Hash1, _Eq1, _Alloc>, _Hash2, _Eq2> { private: template<typename... _Tp> using unordered_set = _GLIBCXX_STD_C::unordered_set<_Tp...>; template<typename... _Tp> using unordered_multiset = _GLIBCXX_STD_C::unordered_multiset<_Tp...>; friend unordered_multiset<_Val, _Hash1, _Eq1, _Alloc>; static auto& _S_get_table(unordered_set<_Val, _Hash2, _Eq2, _Alloc>& __set) { return __set._M_h; } static auto& _S_get_table(unordered_multiset<_Val, _Hash2, _Eq2, _Alloc>& __set) { return __set._M_h; } }; #endif // C++17 # 1777 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unordered_set.h" 3 _GLIBCXX_END_NAMESPACE_VERSION } // namespace std #endif /* _UNORDERED_SET_H */ # 1782 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unordered_set.h" 3 # 48 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/unordered_set" 2 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/range_access.h> #endif /* expanded by -frewrite-includes */ # 48 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/unordered_set" 3 # 49 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/unordered_set" 3 #if 0 /* expanded by -frewrite-includes */ #include <bits/erase_if.h> #endif /* expanded by -frewrite-includes */ # 49 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/unordered_set" 3 # 1 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/erase_if.h" 1 3 // <bits/erase_if.h> -*- C++ -*- // Copyright (C) 2015-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file bits/erase_if.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. */ #ifndef _GLIBCXX_ERASE_IF_H #define _GLIBCXX_ERASE_IF_H 1 #if 0 /* expanded by -frewrite-includes */ #pragma GCC system_header #endif /* expanded by -frewrite-includes */ # 34 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/erase_if.h" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201402L #endif #endif /* disabled by -frewrite-includes */ #if 1 /* evaluated by -frewrite-includes */ # 36 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/erase_if.h" 3 namespace std { _GLIBCXX_BEGIN_NAMESPACE_VERSION #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 42 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/erase_if.h" 3 # define __cpp_lib_erase_if 202002L #endif # 44 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/erase_if.h" 3 namespace __detail { template<typename _Container, typename _Predicate> typename _Container::size_type __erase_nodes_if(_Container& __cont, _Predicate __pred) { typename _Container::size_type __num = 0; for (auto __iter = __cont.begin(), __last = __cont.end(); __iter != __last;) { if (__pred(*__iter)) { __iter = __cont.erase(__iter); ++__num; } else ++__iter; } return __num; } } // namespace __detail _GLIBCXX_END_NAMESPACE_VERSION } // namespace std #endif // C++14 # 71 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/erase_if.h" 3 #endif // _GLIBCXX_ERASE_IF_H # 73 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/erase_if.h" 3 # 50 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/unordered_set" 2 3 #ifdef _GLIBCXX_DEBUG #if 0 /* expanded by -frewrite-includes */ # include <debug/unordered_set> #endif /* expanded by -frewrite-includes */ # 52 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/unordered_set" 3 # 53 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/unordered_set" 3 #endif # 54 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/unordered_set" 3 #ifdef _GLIBCXX_PROFILE #if 0 /* expanded by -frewrite-includes */ # include <profile/unordered_set> #endif /* expanded by -frewrite-includes */ # 56 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/unordered_set" 3 # 57 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/unordered_set" 3 #endif # 58 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/unordered_set" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus >= 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 60 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/unordered_set" 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION namespace pmr { template<typename _Tp> class polymorphic_allocator; template<typename _Key, typename _Hash = std::hash<_Key>, typename _Pred = std::equal_to<_Key>> using unordered_set = std::unordered_set<_Key, _Hash, _Pred, polymorphic_allocator<_Key>>; template<typename _Key, typename _Hash = std::hash<_Key>, typename _Pred = std::equal_to<_Key>> using unordered_multiset = std::unordered_multiset<_Key, _Hash, _Pred, polymorphic_allocator<_Key>>; } // namespace pmr _GLIBCXX_END_NAMESPACE_VERSION } // namespace std #endif // C++17 # 80 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/unordered_set" 3 #if 0 /* disabled by -frewrite-includes */ #if __cplusplus > 201703L #endif #endif /* disabled by -frewrite-includes */ #if 0 /* evaluated by -frewrite-includes */ # 82 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/unordered_set" 3 namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION template<typename _Key, typename _Hash, typename _CPred, typename _Alloc, typename _Predicate> inline typename unordered_set<_Key, _Hash, _CPred, _Alloc>::size_type erase_if(unordered_set<_Key, _Hash, _CPred, _Alloc>& __cont, _Predicate __pred) { return __detail::__erase_nodes_if(__cont, __pred); } template<typename _Key, typename _Hash, typename _CPred, typename _Alloc, typename _Predicate> inline typename unordered_multiset<_Key, _Hash, _CPred, _Alloc>::size_type erase_if(unordered_multiset<_Key, _Hash, _CPred, _Alloc>& __cont, _Predicate __pred) { return __detail::__erase_nodes_if(__cont, __pred); } _GLIBCXX_END_NAMESPACE_VERSION } // namespace std #endif // C++20 # 101 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/unordered_set" 3 #endif // C++11 # 103 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/unordered_set" 3 #endif // _GLIBCXX_UNORDERED_SET # 105 "/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/unordered_set" 3 # 4 "blah.cpp" 2 const uint64_t p = 4, y = 1, w = 8; const bool table[512] = { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; using u64 = uint64_t; inline u64 evolve(u64 a, u64 b, u64 c) { if (table[((a & 1) << 8) | ((b & 1) << 5) | ((c & 1) << 2)]) return u64(-1); a <<= 1, b <<= 1, c <<= 1; u64 res = 0; for (int i = 0; i < 64; i++) { u64 A = (a >> i) & 7, B = (b >> i) & 7, C = (c >> i) & 7; res |= u64(table[(A << 6) | (B << 3) | C]) << i; } return res; } inline u64 mirror(u64 x) { for (int i = 0; i < w; i++) x |= (((x >> i) & 1) << (2 * w - 1 - i)); return x; } inline u64 ev2(u64 a, u64 b, u64 c) { a = mirror(a), b = mirror(b), c = mirror(c); u64 s = evolve(a, b, c); if (s == -1) return -1; return s & ((u64(1) << w) - 1); } struct __attribute__((aligned(64))) node { u64 row; node *parent; node() {} node(u64 r, node *p) : row(r), parent(p) {} }; inline node *kth_parent(node *n, int k) { for (int i = 0; i < k; i++) n = n -> parent; return n; } inline void output_row(u64 r) { for (int i = 0; i < w; i++) std::printf("%c", "bo"[(r >> i) & 1]); std::printf("$"); } const int HASHB = 1057, HASHMOD = 43128381; inline u64 hash_node(node *n) { u64 hash = 0; for (int i = 0; i < 2 * p; i++) { hash = (hash * HASHB + (n -> row)) % HASHMOD; n = n -> parent; } return hash; } inline bool is_same_as(node *u, node *v) { if (u == v) return true; for (int i = 0; i < 2 * p; i++) { if (u -> row != v -> row) return false; u = u -> parent; v = v -> parent; } return true; } std::vector<node*> hash[HASHMOD]; const int POOLSIZE = 1 << 22; node pool[POOLSIZE]; int poolcnt; inline node *newnode(node n) { if (poolcnt < POOLSIZE) return &(pool[poolcnt++] = n); std::printf("Ran out of nodes. Aborting search...\n"); std::exit(1); } inline void print_spaceship(node *n) { if (n == &pool[0]) return; std::printf("x = 0, y = 0\n"); while (n != &pool[0]) { output_row(mirror(n -> row)); printf("\n"); n = kth_parent(n, p); } printf("!\n"); } inline void initialize() { pool[0].row = 0; pool[0].parent = &pool[0]; hash[0].push_back(&pool[0]); } const u64 dfs_depth = p, dfs_threshold = POOLSIZE >> 4; node tmp_nodes[dfs_depth]; bool dfs(node *n, int depth) { if (depth == 0) return true; node *v = kth_parent(n, p - y - 1); u64 c = v -> row; v = kth_parent(v, y); u64 b = v -> row; v = kth_parent(v, p); u64 a = v -> row; tmp_nodes[depth - 1].parent = n; for (u64 x = 0; x < (u64(1) << w); x++) if (ev2(a, b, x) == c) { tmp_nodes[depth - 1].row = x; if (dfs(&tmp_nodes[depth - 1], depth - 1)) return true; } return false; } inline void lookahead(bool ok[1 << w], node *u) { node *v = kth_parent(u, p - y - 1); u64 c = v -> row; v = kth_parent(v, y); u64 b = v -> row; v = kth_parent(v, p); u64 a = v -> row; v = kth_parent(u, y - 1); u64 e = v -> row; v = kth_parent(v, p); u64 d = v -> row; std::memset(ok, 0, (sizeof(bool)) << w); for (u64 i = 0; i < (u64(1) << w); i++) { u64 x = ev2(d, e, i); if (ev2(a, b, x) == c) ok[x] = true; } } void bfs() { int qhead = 0, qtail = 1; while (qhead < qtail) { if (qtail - qhead > dfs_threshold) { std::printf("Compating queue..."); for (int i = qhead; i < qtail; i++) if (!dfs(&pool[i], dfs_depth)) pool[i].parent = NULL; } node *u = &pool[qhead]; if (u -> parent == NULL) continue; qhead++; static bool ok[1 << w]; lookahead(ok, u); for (u64 x = 0; x < (u64(1) << w); x++) if (ok[x]) { node *v = newnode(node(x, u)); if (hash_node(v) == 0) { print_spaceship(v); continue; } bool ok = true; for (auto& w : hash[hash_node(v)]) if (is_same_as(v, w)) { ok = false; break; } if (!ok) continue; hash[hash_node(v)].push_back(v); pool[qtail++] = *v; } } } int main() { initialize(); bfs(); }
Become a Patron
Sponsor on GitHub
Donate via PayPal
Compiler Explorer Shop
Source on GitHub
Mailing list
Installed libraries
Wiki
Report an issue
How it works
Contact the author
CE on Mastodon
CE on Bluesky
Statistics
Changelog
Version tree