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
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
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
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)
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.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)
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.latest
x86 djgpp 4.9.4
x86 djgpp 5.5.0
x86 djgpp 6.4.0
x86 djgpp 7.2.0
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.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.3
x86 nvc++ 25.5
x86 nvc++ 25.7
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 P2998)
x86-64 clang (experimental P3068)
x86-64 clang (experimental P3309)
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 gcc (P2034 lambdas)
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.2.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.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
namespace std { typedef long unsigned int size_t; typedef long int ptrdiff_t; typedef decltype(nullptr) nullptr_t; #pragma GCC visibility push(default) extern "C++" __attribute__ ((__noreturn__, __always_inline__)) inline void __terminate() noexcept { void terminate() noexcept __attribute__ ((__noreturn__)); terminate(); } #pragma GCC visibility pop } namespace std { inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { } } namespace __gnu_cxx { inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { } } namespace std { #pragma GCC visibility push(default) constexpr inline bool __is_constant_evaluated() noexcept { return __builtin_is_constant_evaluated(); } #pragma GCC visibility pop } namespace std __attribute__ ((__visibility__ ("default"))) { void __throw_bad_exception(void) __attribute__((__noreturn__)); void __throw_bad_alloc(void) __attribute__((__noreturn__)); void __throw_bad_array_new_length(void) __attribute__((__noreturn__)); void __throw_bad_cast(void) __attribute__((__noreturn__)); void __throw_bad_typeid(void) __attribute__((__noreturn__)); 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__)); void __throw_ios_failure(const char*) __attribute__((__noreturn__)); void __throw_ios_failure(const char*, int) __attribute__((__noreturn__)); void __throw_system_error(int) __attribute__((__noreturn__)); void __throw_future_error(int) __attribute__((__noreturn__)); void __throw_bad_function_call() __attribute__((__noreturn__)); } extern "C++" { namespace std __attribute__ ((__visibility__ ("default"))) { struct __true_type { }; struct __false_type { }; template<bool> struct __truth_type { typedef __false_type __type; }; template<> struct __truth_type<true> { typedef __true_type __type; }; template<class _Sp, class _Tp> struct __traitor { enum { __value = bool(_Sp::__value) || bool(_Tp::__value) }; typedef typename __truth_type<__value>::__type __type; }; 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; }; 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; }; template<typename _Tp> struct __is_integer { enum { __value = 0 }; typedef __false_type __type; }; 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; }; template<> struct __is_integer<wchar_t> { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer<char8_t> { enum { __value = 1 }; typedef __true_type __type; }; 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; }; 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; }; template<typename _Tp> struct __is_floating { enum { __value = 0 }; typedef __false_type __type; }; 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; }; 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; }; template<typename _Tp> struct __is_arithmetic : public __traitor<__is_integer<_Tp>, __is_floating<_Tp> > { }; template<typename _Tp> struct __is_scalar : public __traitor<__is_arithmetic<_Tp>, __is_pointer<_Tp> > { }; 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; }; template<> struct __is_char<wchar_t> { enum { __value = 1 }; typedef __true_type __type; }; 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; }; enum class byte : unsigned char; template<> struct __is_byte<byte> { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_byte<char8_t> { enum { __value = 1 }; typedef __true_type __type; }; template<typename> struct iterator_traits; template<typename _Tp> struct __is_nonvolatile_trivially_copyable { enum { __value = __is_trivially_copyable(_Tp) }; }; template<typename _Tp> struct __is_nonvolatile_trivially_copyable<volatile _Tp> { enum { __value = 0 }; }; template<typename _OutputIter, typename _InputIter> struct __memcpyable { enum { __value = 0 }; }; template<typename _Tp> struct __memcpyable<_Tp*, _Tp*> : __is_nonvolatile_trivially_copyable<_Tp> { }; template<typename _Tp> struct __memcpyable<_Tp*, const _Tp*> : __is_nonvolatile_trivially_copyable<_Tp> { }; template<typename _Iter1, typename _Iter2> struct __memcmpable { enum { __value = 0 }; }; template<typename _Tp> struct __memcmpable<_Tp*, _Tp*> : __is_nonvolatile_trivially_copyable<_Tp> { }; template<typename _Tp> struct __memcmpable<const _Tp*, _Tp*> : __is_nonvolatile_trivially_copyable<_Tp> { }; template<typename _Tp> struct __memcmpable<_Tp*, const _Tp*> : __is_nonvolatile_trivially_copyable<_Tp> { }; template<typename _Tp, bool _TreatAsBytes = __is_byte<_Tp>::__value > struct __is_memcmp_ordered { static const bool __value = _Tp(-1) > _Tp(1); }; template<typename _Tp> struct __is_memcmp_ordered<_Tp, false> { static const bool __value = false; }; template<typename _Tp, typename _Up, bool = sizeof(_Tp) == sizeof(_Up)> struct __is_memcmp_ordered_with { static const bool __value = __is_memcmp_ordered<_Tp>::__value && __is_memcmp_ordered<_Up>::__value; }; template<typename _Tp, typename _Up> struct __is_memcmp_ordered_with<_Tp, _Up, false> { static const bool __value = false; }; template<> struct __is_memcmp_ordered_with<std::byte, std::byte, true> { static constexpr bool __value = true; }; template<typename _Tp, bool _SameSize> struct __is_memcmp_ordered_with<_Tp, std::byte, _SameSize> { static constexpr bool __value = false; }; template<typename _Up, bool _SameSize> struct __is_memcmp_ordered_with<std::byte, _Up, _SameSize> { static constexpr bool __value = false; }; template<typename _Tp> struct __is_move_iterator { enum { __value = 0 }; typedef __false_type __type; }; template<typename _Iterator> constexpr _Iterator __miter_base(_Iterator __it) ; } } extern "C++" { namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { template<bool, typename> struct __enable_if { }; template<typename _Tp> struct __enable_if<true, _Tp> { typedef _Tp __type; }; 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; }; 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; }; template<> struct __add_unsigned<bool>; template<> struct __add_unsigned<wchar_t>; 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; }; template<> struct __remove_unsigned<bool>; template<> struct __remove_unsigned<wchar_t>; template<typename _Type> constexpr bool __is_null_pointer(_Type* __ptr) ; template<typename _Type> constexpr bool __is_null_pointer(_Type) ; constexpr bool __is_null_pointer(std::nullptr_t) ; template<typename _Tp, bool = std::__is_integer<_Tp>::__value> struct __promote { typedef double __type; }; 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> using __promoted_t = decltype((typename __promote<_Tp>::__type(0) + ...)); template<typename _Tp, typename _Up> using __promote_2 = __promote<__promoted_t<_Tp, _Up>>; template<typename _Tp, typename _Up, typename _Vp> using __promote_3 = __promote<__promoted_t<_Tp, _Up, _Vp>>; template<typename _Tp, typename _Up, typename _Vp, typename _Wp> using __promote_4 = __promote<__promoted_t<_Tp, _Up, _Vp, _Wp>>; } } namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { template<typename _Tp> struct __is_integer_nonstrict : public std::__is_integer<_Tp> { using std::__is_integer<_Tp>::__value; enum { __width = __value ? sizeof(_Tp) * 8 : 0 }; }; template<typename _Value> struct __numeric_traits_integer { static_assert(__is_integer_nonstrict<_Value>::__value, "invalid specialization"); static const bool __is_signed = (_Value)(-1) < 0; static const int __digits = __is_integer_nonstrict<_Value>::__width - __is_signed; 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; __extension__ template<> struct __is_integer_nonstrict<__int128> { enum { __value = 1 }; typedef std::__true_type __type; enum { __width = 128 }; }; __extension__ template<> struct __is_integer_nonstrict<unsigned __int128> { enum { __value = 1 }; typedef std::__true_type __type; enum { __width = 128 }; }; template<typename _Tp> using __int_traits = __numeric_traits_integer<_Tp>; template<typename _Value> struct __numeric_traits_floating { static const int __max_digits10 = (2 + (std::__are_same<_Value, float>::__value ? 24 : std::__are_same<_Value, double>::__value ? 53 : 64) * 643L / 2136); static const bool __is_signed = true; static const int __digits10 = (std::__are_same<_Value, float>::__value ? 6 : std::__are_same<_Value, double>::__value ? 15 : 18); static const int __max_exponent10 = (std::__are_same<_Value, float>::__value ? 38 : std::__are_same<_Value, double>::__value ? 308 : 4932); }; 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 __numeric_traits_integer<_Value> { }; template<> struct __numeric_traits<float> : public __numeric_traits_floating<float> { }; template<> struct __numeric_traits<double> : public __numeric_traits_floating<double> { }; template<> struct __numeric_traits<long double> : public __numeric_traits_floating<long double> { }; } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Tp> class reference_wrapper; 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; } constexpr value_type operator()() const noexcept { return value; } }; using true_type = integral_constant<bool, true>; using false_type = integral_constant<bool, false>; template<bool __v> using __bool_constant = integral_constant<bool, __v>; template<bool __v> using bool_constant = integral_constant<bool, __v>; template<bool, typename _Tp = void> struct enable_if { }; template<typename _Tp> struct enable_if<true, _Tp> { typedef _Tp type; }; template<bool _Cond, typename _Tp = void> using __enable_if_t = typename enable_if<_Cond, _Tp>::type; template<bool> struct __conditional { template<typename _Tp, typename> using type = _Tp; }; template<> struct __conditional<false> { template<typename, typename _Up> using type = _Up; }; template<bool _Cond, typename _If, typename _Else> using __conditional_t = typename __conditional<_Cond>::template type<_If, _Else>; template <typename _Type> struct __type_identity { using type = _Type; }; template<typename _Tp> using __type_identity_t = typename __type_identity<_Tp>::type; namespace __detail { template<typename _Tp, typename...> using __first_t = _Tp; template<typename... _Bn> auto __or_fn(int) -> __first_t<false_type, __enable_if_t<!bool(_Bn::value)>...>; template<typename... _Bn> auto __or_fn(...) -> true_type; template<typename... _Bn> auto __and_fn(int) -> __first_t<true_type, __enable_if_t<bool(_Bn::value)>...>; template<typename... _Bn> auto __and_fn(...) -> false_type; } template<typename... _Bn> struct __or_ : decltype(__detail::__or_fn<_Bn...>(0)) { }; template<typename... _Bn> struct __and_ : decltype(__detail::__and_fn<_Bn...>(0)) { }; template<typename _Pp> struct __not_ : __bool_constant<!bool(_Pp::value)> { }; template<typename... _Bn> inline constexpr bool __or_v = __or_<_Bn...>::value; template<typename... _Bn> inline constexpr bool __and_v = __and_<_Bn...>::value; namespace __detail { template<typename , typename _B1, typename... _Bn> struct __disjunction_impl { using type = _B1; }; template<typename _B1, typename _B2, typename... _Bn> struct __disjunction_impl<__enable_if_t<!bool(_B1::value)>, _B1, _B2, _Bn...> { using type = typename __disjunction_impl<void, _B2, _Bn...>::type; }; template<typename , typename _B1, typename... _Bn> struct __conjunction_impl { using type = _B1; }; template<typename _B1, typename _B2, typename... _Bn> struct __conjunction_impl<__enable_if_t<bool(_B1::value)>, _B1, _B2, _Bn...> { using type = typename __conjunction_impl<void, _B2, _Bn...>::type; }; } template<typename... _Bn> struct conjunction : __detail::__conjunction_impl<void, _Bn...>::type { }; template<> struct conjunction<> : true_type { }; template<typename... _Bn> struct disjunction : __detail::__disjunction_impl<void, _Bn...>::type { }; template<> struct disjunction<> : false_type { }; template<typename _Pp> struct negation : __not_<_Pp>::type { }; 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; template<typename> struct is_reference; template<typename> struct is_function; template<typename> struct is_void; template<typename> struct remove_cv; template<typename> struct is_const; template<typename> struct __is_array_unknown_bounds; template <typename _Tp, size_t = sizeof(_Tp)> constexpr true_type __is_complete_or_unbounded(__type_identity<_Tp>) { return {}; } template <typename _TypeIdentity, typename _NestedType = typename _TypeIdentity::type> constexpr typename __or_< is_reference<_NestedType>, is_function<_NestedType>, is_void<_NestedType>, __is_array_unknown_bounds<_NestedType> >::type __is_complete_or_unbounded(_TypeIdentity) { return {}; } template<typename _Tp> using __remove_cv_t = typename remove_cv<_Tp>::type; template<typename _Tp> struct is_void : public false_type { }; template<> struct is_void<void> : public true_type { }; template<> struct is_void<const void> : public true_type { }; template<> struct is_void<volatile void> : public true_type { }; template<> struct is_void<const volatile void> : public true_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 { }; template<> struct __is_integral_helper<wchar_t> : public true_type { }; template<> struct __is_integral_helper<char8_t> : public true_type { }; 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 { }; template<typename _Tp> struct is_integral : public __is_integral_helper<__remove_cv_t<_Tp>>::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 { }; template<typename _Tp> struct is_floating_point : public __is_floating_point_helper<__remove_cv_t<_Tp>>::type { }; 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 { }; template<typename _Tp> struct is_pointer : public __is_pointer_helper<__remove_cv_t<_Tp>>::type { }; template<typename> struct is_lvalue_reference : public false_type { }; template<typename _Tp> struct is_lvalue_reference<_Tp&> : public true_type { }; template<typename> struct is_rvalue_reference : public false_type { }; template<typename _Tp> struct is_rvalue_reference<_Tp&&> : public true_type { }; 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 { }; template<typename _Tp> struct is_member_object_pointer : public __is_member_object_pointer_helper<__remove_cv_t<_Tp>>::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 { }; template<typename _Tp> struct is_member_function_pointer : public __is_member_function_pointer_helper<__remove_cv_t<_Tp>>::type { }; template<typename _Tp> struct is_enum : public integral_constant<bool, __is_enum(_Tp)> { }; template<typename _Tp> struct is_union : public integral_constant<bool, __is_union(_Tp)> { }; template<typename _Tp> struct is_class : public integral_constant<bool, __is_class(_Tp)> { }; template<typename _Tp> struct is_function : public __bool_constant<!is_const<const _Tp>::value> { }; template<typename _Tp> struct is_function<_Tp&> : public false_type { }; template<typename _Tp> struct is_function<_Tp&&> : public false_type { }; template<typename _Tp> struct is_null_pointer : public false_type { }; template<> struct is_null_pointer<std::nullptr_t> : public true_type { }; template<> struct is_null_pointer<const std::nullptr_t> : public true_type { }; template<> struct is_null_pointer<volatile std::nullptr_t> : public true_type { }; template<> struct is_null_pointer<const volatile std::nullptr_t> : public true_type { }; template<typename _Tp> struct __is_nullptr_t : public is_null_pointer<_Tp> { } __attribute__ ((__deprecated__ ("use '" "std::is_null_pointer" "' instead"))); template<typename _Tp> struct is_reference : public false_type { }; template<typename _Tp> struct is_reference<_Tp&> : public true_type { }; template<typename _Tp> struct is_reference<_Tp&&> : public true_type { }; template<typename _Tp> struct is_arithmetic : public __or_<is_integral<_Tp>, is_floating_point<_Tp>>::type { }; template<typename _Tp> struct is_fundamental : public __or_<is_arithmetic<_Tp>, is_void<_Tp>, is_null_pointer<_Tp>>::type { }; 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; 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 { }; 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 { }; template<typename _Tp> struct is_member_pointer : public __is_member_pointer_helper<__remove_cv_t<_Tp>>::type { }; template<typename, typename> struct is_same; template<typename _Tp, typename... _Types> using __is_one_of = __or_<is_same<_Tp, _Types>...>; __extension__ template<typename _Tp> using __is_signed_integer = __is_one_of<__remove_cv_t<_Tp>, signed char, signed short, signed int, signed long, signed long long >; __extension__ template<typename _Tp> using __is_unsigned_integer = __is_one_of<__remove_cv_t<_Tp>, unsigned char, unsigned short, unsigned int, unsigned long, unsigned long long >; template<typename _Tp> using __is_standard_integer = __or_<__is_signed_integer<_Tp>, __is_unsigned_integer<_Tp>>; template<typename...> using __void_t = void; template<typename> struct is_const : public false_type { }; template<typename _Tp> struct is_const<_Tp const> : public true_type { }; template<typename> struct is_volatile : public false_type { }; template<typename _Tp> struct is_volatile<_Tp volatile> : public true_type { }; template<typename _Tp> struct is_trivial : public integral_constant<bool, __is_trivial(_Tp)> { static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), "template argument must be a complete class or an unbounded array"); }; template<typename _Tp> struct is_trivially_copyable : public integral_constant<bool, __is_trivially_copyable(_Tp)> { static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), "template argument must be a complete class or an unbounded array"); }; template<typename _Tp> struct is_standard_layout : public integral_constant<bool, __is_standard_layout(_Tp)> { static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), "template argument must be a complete class or an unbounded array"); }; template<typename _Tp> struct __attribute__ ((__deprecated__ ("use '" "is_standard_layout && is_trivial" "' instead"))) is_pod : public integral_constant<bool, __is_pod(_Tp)> { static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), "template argument must be a complete class or an unbounded array"); }; template<typename _Tp> struct [[__deprecated__]] is_literal_type : public integral_constant<bool, __is_literal_type(_Tp)> { static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), "template argument must be a complete class or an unbounded array"); }; template<typename _Tp> struct is_empty : public integral_constant<bool, __is_empty(_Tp)> { }; template<typename _Tp> struct is_polymorphic : public integral_constant<bool, __is_polymorphic(_Tp)> { }; template<typename _Tp> struct is_final : public integral_constant<bool, __is_final(_Tp)> { }; 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)> { }; template<typename _Tp> struct is_signed : public __is_signed_helper<_Tp>::type { }; template<typename _Tp> struct is_unsigned : public __and_<is_arithmetic<_Tp>, __not_<is_signed<_Tp>>>::type { }; 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> struct remove_all_extents; template<typename _Tp> struct __is_array_known_bounds : public false_type { }; template<typename _Tp, size_t _Size> struct __is_array_known_bounds<_Tp[_Size]> : public true_type { }; template<typename _Tp> struct __is_array_unknown_bounds : public false_type { }; template<typename _Tp> struct __is_array_unknown_bounds<_Tp[]> : public true_type { }; 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 { }; template<typename _Tp> struct is_destructible : public __is_destructible_safe<_Tp>::type { static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), "template argument must be a complete class or an unbounded array"); }; 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 { }; template<typename _Tp> struct is_nothrow_destructible : public __is_nt_destructible_safe<_Tp>::type { static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), "template argument must be a complete class or an unbounded array"); }; template<typename _Tp, typename... _Args> using __is_constructible_impl = __bool_constant<__is_constructible(_Tp, _Args...)>; template<typename _Tp, typename... _Args> struct is_constructible : public __is_constructible_impl<_Tp, _Args...> { static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), "template argument must be a complete class or an unbounded array"); }; template<typename _Tp> struct is_default_constructible : public __is_constructible_impl<_Tp> { static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), "template argument must be a complete class or an unbounded array"); }; template<typename _Tp, typename = void> struct __add_lvalue_reference_helper { using type = _Tp; }; template<typename _Tp> struct __add_lvalue_reference_helper<_Tp, __void_t<_Tp&>> { using type = _Tp&; }; template<typename _Tp> using __add_lval_ref_t = typename __add_lvalue_reference_helper<_Tp>::type; template<typename _Tp> struct is_copy_constructible : public __is_constructible_impl<_Tp, __add_lval_ref_t<const _Tp>> { static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), "template argument must be a complete class or an unbounded array"); }; template<typename _Tp, typename = void> struct __add_rvalue_reference_helper { using type = _Tp; }; template<typename _Tp> struct __add_rvalue_reference_helper<_Tp, __void_t<_Tp&&>> { using type = _Tp&&; }; template<typename _Tp> using __add_rval_ref_t = typename __add_rvalue_reference_helper<_Tp>::type; template<typename _Tp> struct is_move_constructible : public __is_constructible_impl<_Tp, __add_rval_ref_t<_Tp>> { static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), "template argument must be a complete class or an unbounded array"); }; template<typename _Tp, typename... _Args> using __is_nothrow_constructible_impl = __bool_constant<__is_nothrow_constructible(_Tp, _Args...)>; template<typename _Tp, typename... _Args> struct is_nothrow_constructible : public __is_nothrow_constructible_impl<_Tp, _Args...> { static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), "template argument must be a complete class or an unbounded array"); }; template<typename _Tp> struct is_nothrow_default_constructible : public __is_nothrow_constructible_impl<_Tp> { static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), "template argument must be a complete class or an unbounded array"); }; template<typename _Tp> struct is_nothrow_copy_constructible : public __is_nothrow_constructible_impl<_Tp, __add_lval_ref_t<const _Tp>> { static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), "template argument must be a complete class or an unbounded array"); }; template<typename _Tp> struct is_nothrow_move_constructible : public __is_nothrow_constructible_impl<_Tp, __add_rval_ref_t<_Tp>> { static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), "template argument must be a complete class or an unbounded array"); }; template<typename _Tp, typename _Up> using __is_assignable_impl = __bool_constant<__is_assignable(_Tp, _Up)>; template<typename _Tp, typename _Up> struct is_assignable : public __is_assignable_impl<_Tp, _Up> { static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), "template argument must be a complete class or an unbounded array"); }; template<typename _Tp> struct is_copy_assignable : public __is_assignable_impl<__add_lval_ref_t<_Tp>, __add_lval_ref_t<const _Tp>> { static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), "template argument must be a complete class or an unbounded array"); }; template<typename _Tp> struct is_move_assignable : public __is_assignable_impl<__add_lval_ref_t<_Tp>, __add_rval_ref_t<_Tp>> { static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), "template argument must be a complete class or an unbounded array"); }; template<typename _Tp, typename _Up> using __is_nothrow_assignable_impl = __bool_constant<__is_nothrow_assignable(_Tp, _Up)>; template<typename _Tp, typename _Up> struct is_nothrow_assignable : public __is_nothrow_assignable_impl<_Tp, _Up> { static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), "template argument must be a complete class or an unbounded array"); }; template<typename _Tp> struct is_nothrow_copy_assignable : public __is_nothrow_assignable_impl<__add_lval_ref_t<_Tp>, __add_lval_ref_t<const _Tp>> { static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), "template argument must be a complete class or an unbounded array"); }; template<typename _Tp> struct is_nothrow_move_assignable : public __is_nothrow_assignable_impl<__add_lval_ref_t<_Tp>, __add_rval_ref_t<_Tp>> { static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), "template argument must be a complete class or an unbounded array"); }; template<typename _Tp, typename... _Args> using __is_trivially_constructible_impl = __bool_constant<__is_trivially_constructible(_Tp, _Args...)>; template<typename _Tp, typename... _Args> struct is_trivially_constructible : public __is_trivially_constructible_impl<_Tp, _Args...> { static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), "template argument must be a complete class or an unbounded array"); }; template<typename _Tp> struct is_trivially_default_constructible : public __is_trivially_constructible_impl<_Tp> { static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), "template argument must be a complete class or an unbounded array"); }; 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_constructible_impl<_Tp>, __is_implicitly_default_constructible_safe<_Tp>>::type { }; template<typename _Tp> struct is_trivially_copy_constructible : public __is_trivially_constructible_impl<_Tp, __add_lval_ref_t<const _Tp>> { static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), "template argument must be a complete class or an unbounded array"); }; template<typename _Tp> struct is_trivially_move_constructible : public __is_trivially_constructible_impl<_Tp, __add_rval_ref_t<_Tp>> { static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), "template argument must be a complete class or an unbounded array"); }; template<typename _Tp, typename _Up> using __is_trivially_assignable_impl = __bool_constant<__is_trivially_assignable(_Tp, _Up)>; template<typename _Tp, typename _Up> struct is_trivially_assignable : public __is_trivially_assignable_impl<_Tp, _Up> { static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), "template argument must be a complete class or an unbounded array"); }; template<typename _Tp> struct is_trivially_copy_assignable : public __is_trivially_assignable_impl<__add_lval_ref_t<_Tp>, __add_lval_ref_t<const _Tp>> { static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), "template argument must be a complete class or an unbounded array"); }; template<typename _Tp> struct is_trivially_move_assignable : public __is_trivially_assignable_impl<__add_lval_ref_t<_Tp>, __add_rval_ref_t<_Tp>> { static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), "template argument must be a complete class or an unbounded array"); }; template<typename _Tp> struct is_trivially_destructible : public __and_<__is_destructible_safe<_Tp>, __bool_constant<__has_trivial_destructor(_Tp)>>::type { static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), "template argument must be a complete class or an unbounded array"); }; template<typename _Tp> struct has_virtual_destructor : public integral_constant<bool, __has_virtual_destructor(_Tp)> { static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), "template argument must be a complete class or an unbounded array"); }; template<typename _Tp> struct alignment_of : public integral_constant<std::size_t, alignof(_Tp)> { static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), "template argument must be a complete class or an unbounded array"); }; 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> { }; template<typename, unsigned _Uint = 0> struct extent : public integral_constant<size_t, 0> { }; template<typename _Tp, size_t _Size> struct extent<_Tp[_Size], 0> : public integral_constant<size_t, _Size> { }; template<typename _Tp, unsigned _Uint, size_t _Size> struct extent<_Tp[_Size], _Uint> : public extent<_Tp, _Uint - 1>::type { }; template<typename _Tp> struct extent<_Tp[], 0> : public integral_constant<size_t, 0> { }; template<typename _Tp, unsigned _Uint> struct extent<_Tp[], _Uint> : public extent<_Tp, _Uint - 1>::type { }; template<typename _Tp, typename _Up> struct is_same : public integral_constant<bool, __is_same(_Tp, _Up)> { }; template<typename _Base, typename _Derived> struct is_base_of : public integral_constant<bool, __is_base_of(_Base, _Derived)> { }; template<typename _From, typename _To> struct is_convertible : public __bool_constant<__is_convertible(_From, _To)> { }; template<typename _ToElementType, typename _FromElementType> using __is_array_convertible = is_convertible<_FromElementType(*)[], _ToElementType(*)[]>; 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> { }; #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wctor-dtor-privacy" 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)); }; #pragma GCC diagnostic pop template<typename _From, typename _To> struct is_nothrow_convertible : public __is_nt_convertible_helper<_From, _To>::type { }; template<typename _From, typename _To> inline constexpr bool is_nothrow_convertible_v = is_nothrow_convertible<_From, _To>::value; template<typename _Tp> struct remove_const { typedef _Tp type; }; template<typename _Tp> struct remove_const<_Tp const> { typedef _Tp type; }; template<typename _Tp> struct remove_volatile { typedef _Tp type; }; template<typename _Tp> struct remove_volatile<_Tp volatile> { typedef _Tp type; }; template<typename _Tp> struct remove_cv { using type = __remove_cv(_Tp); }; template<typename _Tp> struct add_const { using type = _Tp const; }; template<typename _Tp> struct add_volatile { using type = _Tp volatile; }; template<typename _Tp> struct add_cv { using type = _Tp const volatile; }; template<typename _Tp> using remove_const_t = typename remove_const<_Tp>::type; template<typename _Tp> using remove_volatile_t = typename remove_volatile<_Tp>::type; template<typename _Tp> using remove_cv_t = typename remove_cv<_Tp>::type; template<typename _Tp> using add_const_t = typename add_const<_Tp>::type; template<typename _Tp> using add_volatile_t = typename add_volatile<_Tp>::type; template<typename _Tp> using add_cv_t = typename add_cv<_Tp>::type; template<typename _Tp> struct remove_reference { using type = _Tp; }; template<typename _Tp> struct remove_reference<_Tp&> { using type = _Tp; }; template<typename _Tp> struct remove_reference<_Tp&&> { using type = _Tp; }; template<typename _Tp> struct add_lvalue_reference { using type = __add_lval_ref_t<_Tp>; }; template<typename _Tp> struct add_rvalue_reference { using type = __add_rval_ref_t<_Tp>; }; template<typename _Tp> using remove_reference_t = typename remove_reference<_Tp>::type; template<typename _Tp> using add_lvalue_reference_t = typename add_lvalue_reference<_Tp>::type; template<typename _Tp> using add_rvalue_reference_t = typename add_rvalue_reference<_Tp>::type; 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; }; 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; }; 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<__remove_cv_t<_Tp>>::__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...>> { }; }; template<typename _Tp> class __make_unsigned_selector<_Tp, false, true> : __make_unsigned_selector_base { 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; }; template<> struct __make_unsigned<wchar_t> { using __type = typename __make_unsigned_selector<wchar_t, false, true>::__type; }; template<> struct __make_unsigned<char8_t> { using __type = typename __make_unsigned_selector<char8_t, false, true>::__type; }; 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; }; template<typename _Tp> struct make_unsigned { typedef typename __make_unsigned_selector<_Tp>::__type type; }; template<> struct make_unsigned<bool>; template<> struct make_unsigned<bool const>; template<> struct make_unsigned<bool volatile>; template<> struct make_unsigned<bool const volatile>; 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; }; 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<__remove_cv_t<_Tp>>::__type; public: using __type = typename __match_cv_qualifiers<_Tp, __signed_type>::__type; }; 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; }; template<> struct __make_signed<wchar_t> { using __type = typename __make_signed_selector<wchar_t, false, true>::__type; }; template<> struct __make_signed<char8_t> { using __type = typename __make_signed_selector<char8_t, false, true>::__type; }; 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; }; template<typename _Tp> struct make_signed { typedef typename __make_signed_selector<_Tp>::__type type; }; template<> struct make_signed<bool>; template<> struct make_signed<bool const>; template<> struct make_signed<bool volatile>; template<> struct make_signed<bool const volatile>; template<typename _Tp> using make_signed_t = typename make_signed<_Tp>::type; template<typename _Tp> using make_unsigned_t = typename make_unsigned<_Tp>::type; 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; }; 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; }; template<typename _Tp> using remove_extent_t = typename remove_extent<_Tp>::type; template<typename _Tp> using remove_all_extents_t = typename remove_all_extents<_Tp>::type; 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; }; template<typename _Tp> struct remove_pointer : public __remove_pointer_helper<_Tp, __remove_cv_t<_Tp>> { }; template<typename _Tp, typename = void> struct __add_pointer_helper { using type = _Tp; }; template<typename _Tp> struct __add_pointer_helper<_Tp, __void_t<_Tp*>> { using type = _Tp*; }; template<typename _Tp> struct add_pointer : public __add_pointer_helper<_Tp> { }; template<typename _Tp> struct add_pointer<_Tp&> { using type = _Tp*; }; template<typename _Tp> struct add_pointer<_Tp&&> { using type = _Tp*; }; template<typename _Tp> using remove_pointer_t = typename remove_pointer<_Tp>::type; template<typename _Tp> using add_pointer_t = typename add_pointer<_Tp>::type; template<std::size_t _Len> struct __aligned_storage_msa { union __type { unsigned char __data[_Len]; struct __attribute__((__aligned__)) { } __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; }; #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 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: static const size_t alignment_value = __strictest::_S_alignment; 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; #pragma GCC diagnostic pop template<typename _Up> struct __decay_selector : __conditional_t<is_const<const _Up>::value, remove_cv<_Up>, add_pointer<_Up>> { }; template<typename _Up, size_t _Nm> struct __decay_selector<_Up[_Nm]> { using type = _Up*; }; template<typename _Up> struct __decay_selector<_Up[]> { using type = _Up*; }; template<typename _Tp> struct decay { using type = typename __decay_selector<_Tp>::type; }; template<typename _Tp> struct decay<_Tp&> { using type = typename __decay_selector<_Tp>::type; }; template<typename _Tp> struct decay<_Tp&&> { using type = typename __decay_selector<_Tp>::type; }; 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> using __decay_t = typename decay<_Tp>::type; template<typename _Tp> using __decay_and_strip = __strip_reference_wrapper<__decay_t<_Tp>>; template<typename... _Cond> using _Require = __enable_if_t<__and_<_Cond...>::value>; template<typename _Tp> using __remove_cvref_t = typename remove_cv<typename remove_reference<_Tp>::type>::type; template<bool _Cond, typename _Iftrue, typename _Iffalse> struct conditional { typedef _Iftrue type; }; template<typename _Iftrue, typename _Iffalse> struct conditional<false, _Iftrue, _Iffalse> { typedef _Iffalse type; }; template<typename... _Tp> struct common_type; template<typename _Tp> struct __success_type { typedef _Tp type; }; struct __failure_type { }; struct __do_common_type_impl { template<typename _Tp, typename _Up> using __cond_t = decltype(true ? std::declval<_Tp>() : std::declval<_Up>()); template<typename _Tp, typename _Up> static __success_type<__decay_t<__cond_t<_Tp, _Up>>> _S_test(int); template<typename _Tp, typename _Up> static __success_type<__remove_cvref_t<__cond_t<const _Tp&, const _Up&>>> _S_test_2(int); template<typename, typename> static __failure_type _S_test_2(...); template<typename _Tp, typename _Up> static decltype(_S_test_2<_Tp, _Up>(0)) _S_test(...); }; template<> struct common_type<> { }; template<typename _Tp0> struct common_type<_Tp0> : public common_type<_Tp0, _Tp0> { }; template<typename _Tp1, typename _Tp2, typename _Dp1 = __decay_t<_Tp1>, typename _Dp2 = __decay_t<_Tp2>> struct __common_type_impl { using type = common_type<_Dp1, _Dp2>; }; template<typename _Tp1, typename _Tp2> struct __common_type_impl<_Tp1, _Tp2, _Tp1, _Tp2> : private __do_common_type_impl { using type = decltype(_S_test<_Tp1, _Tp2>(0)); }; template<typename _Tp1, typename _Tp2> struct common_type<_Tp1, _Tp2> : public __common_type_impl<_Tp1, _Tp2>::type { }; template<typename...> struct __common_type_pack { }; template<typename, typename, typename = void> struct __common_type_fold; template<typename _Tp1, typename _Tp2, typename... _Rp> struct common_type<_Tp1, _Tp2, _Rp...> : public __common_type_fold<common_type<_Tp1, _Tp2>, __common_type_pack<_Rp...>> { }; template<typename _CTp, typename... _Rp> struct __common_type_fold<_CTp, __common_type_pack<_Rp...>, __void_t<typename _CTp::type>> : public common_type<typename _CTp::type, _Rp...> { }; template<typename _CTp, typename _Rp> struct __common_type_fold<_CTp, _Rp, void> { }; 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> { }; 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)) ; template<typename _Signature> struct result_of; struct __invoke_memfun_ref { }; struct __invoke_memfun_deref { }; struct __invoke_memobj_ref { }; struct __invoke_memobj_deref { }; struct __invoke_other { }; template<typename _Tp, typename _Tag> struct __result_of_success : __success_type<_Tp> { using __invoke_type = _Tag; }; 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; }; 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; }; 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; }; 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_t<__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; }; 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_t<is_base_of<_Class, _Argval>::value, __result_of_memfun_ref<_MemPtr, _Arg, _Args...>, __result_of_memfun_deref<_MemPtr, _Arg, _Args...> >::type type; }; 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<__decay_t<_MemPtr>, 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<__decay_t<_MemPtr>, typename __inv_unwrap<_Arg>::type, _Args...> { }; 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; }; 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...> { } __attribute__ ((__deprecated__ ("use '" "std::invoke_result" "' instead"))); #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 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; #pragma GCC diagnostic pop template<typename _Tp> using decay_t = typename decay<_Tp>::type; template<bool _Cond, typename _Tp = void> using enable_if_t = typename enable_if<_Cond, _Tp>::type; template<bool _Cond, typename _Iftrue, typename _Iffalse> using conditional_t = typename conditional<_Cond, _Iftrue, _Iffalse>::type; template<typename... _Tp> using common_type_t = typename common_type<_Tp...>::type; template<typename _Tp> using underlying_type_t = typename underlying_type<_Tp>::type; template<typename _Tp> using result_of_t = typename result_of<_Tp>::type; template<typename...> using void_t = void; template<typename _Def, template<typename...> class _Op, typename... _Args> struct __detected_or { using type = _Def; using __is_detected = false_type; }; template<typename _Def, template<typename...> class _Op, typename... _Args> requires requires { typename _Op<_Args...>; } struct __detected_or<_Def, _Op, _Args...> { using type = _Op<_Args...>; using __is_detected = true_type; }; template<typename _Default, template<typename...> class _Op, typename... _Args> using __detected_or_t = typename __detected_or<_Default, _Op, _Args...>::type; template <typename _Tp> struct __is_swappable; template <typename _Tp> struct __is_nothrow_swappable; template<typename> struct __is_tuple_like_impl : false_type { }; template<typename _Tp> struct __is_tuple_like : public __is_tuple_like_impl<__remove_cvref_t<_Tp>>::type { }; template<typename _Tp> constexpr _Require<__not_<__is_tuple_like<_Tp>>, is_move_constructible<_Tp>, is_move_assignable<_Tp>> swap(_Tp&, _Tp&) noexcept(__and_<is_nothrow_move_constructible<_Tp>, is_nothrow_move_assignable<_Tp>>::value); template<typename _Tp, size_t _Nm> constexpr __enable_if_t<__is_swappable<_Tp>::value> 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(...); }; } 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 { }; template<typename _Tp> struct is_swappable : public __is_swappable_impl<_Tp>::type { static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), "template argument must be a complete class or an unbounded array"); }; template<typename _Tp> struct is_nothrow_swappable : public __is_nothrow_swappable_impl<_Tp>::type { static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), "template argument must be a complete class or an unbounded array"); }; template<typename _Tp> inline constexpr bool is_swappable_v = is_swappable<_Tp>::value; template<typename _Tp> inline constexpr bool is_nothrow_swappable_v = is_nothrow_swappable<_Tp>::value; 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(...); }; } 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; }; 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; }; 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; }; template<typename _Tp, typename _Up> struct is_swappable_with : public __is_swappable_with_impl<_Tp, _Up>::type { static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), "first template argument must be a complete class or an unbounded array"); static_assert(std::__is_complete_or_unbounded(__type_identity<_Up>{}), "second template argument must be a complete class or an unbounded array"); }; template<typename _Tp, typename _Up> struct is_nothrow_swappable_with : public __is_nothrow_swappable_with_impl<_Tp, _Up>::type { static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), "first template argument must be a complete class or an unbounded array"); static_assert(std::__is_complete_or_unbounded(__type_identity<_Up>{}), "second template argument must be a complete class or an unbounded array"); }; template<typename _Tp, typename _Up> inline constexpr bool is_swappable_with_v = is_swappable_with<_Tp, _Up>::value; template<typename _Tp, typename _Up> inline constexpr bool is_nothrow_swappable_with_v = is_nothrow_swappable_with<_Tp, _Up>::value; # 2924 "/usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/type_traits" 3 template<typename _Result, typename _Ret, bool = is_void<_Ret>::value, typename = void> struct __is_invocable_impl : false_type { using __nothrow_conv = false_type; }; template<typename _Result, typename _Ret> struct __is_invocable_impl<_Result, _Ret, true, __void_t<typename _Result::type>> : true_type { using __nothrow_conv = true_type; }; #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wctor-dtor-privacy" template<typename _Result, typename _Ret> struct __is_invocable_impl<_Result, _Ret, false, __void_t<typename _Result::type>> { private: using _Res_t = typename _Result::type; static _Res_t _S_get() noexcept; template<typename _Tp> static void _S_conv(__type_identity_t<_Tp>) noexcept; template<typename _Tp, bool _Nothrow = noexcept(_S_conv<_Tp>(_S_get())), typename = decltype(_S_conv<_Tp>(_S_get())), bool _Dangle = false > static __bool_constant<_Nothrow && !_Dangle> _S_test(int); template<typename _Tp, bool = false> static false_type _S_test(...); public: using type = decltype(_S_test<_Ret, true>(1)); using __nothrow_conv = 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) ; template<typename _Fn, typename _Tp, typename... _Args> constexpr bool __call_is_nt(__invoke_memfun_deref) ; template<typename _Fn, typename _Tp> constexpr bool __call_is_nt(__invoke_memobj_ref) ; 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...>; template<typename _Fn, typename... _Args> struct __is_nothrow_invocable : __and_<__is_invocable<_Fn, _Args...>, __call_is_nothrow_<_Fn, _Args...>>::type { }; #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wctor-dtor-privacy" struct __nonesuchbase {}; struct __nonesuch : private __nonesuchbase { ~__nonesuch() = delete; __nonesuch(__nonesuch const&) = delete; void operator=(__nonesuch const&) = delete; }; #pragma GCC diagnostic pop template<typename _Functor, typename... _ArgTypes> struct invoke_result : public __invoke_result<_Functor, _ArgTypes...> { static_assert(std::__is_complete_or_unbounded(__type_identity<_Functor>{}), "_Functor must be a complete class or an unbounded array"); static_assert((std::__is_complete_or_unbounded( __type_identity<_ArgTypes>{}) && ...), "each argument type must be a complete class or an unbounded array"); }; template<typename _Fn, typename... _Args> using invoke_result_t = typename invoke_result<_Fn, _Args...>::type; template<typename _Fn, typename... _ArgTypes> struct is_invocable : __is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, void>::type { static_assert(std::__is_complete_or_unbounded(__type_identity<_Fn>{}), "_Fn must be a complete class or an unbounded array"); static_assert((std::__is_complete_or_unbounded( __type_identity<_ArgTypes>{}) && ...), "each argument type must be a complete class or an unbounded array"); }; template<typename _Ret, typename _Fn, typename... _ArgTypes> struct is_invocable_r : __is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, _Ret>::type { static_assert(std::__is_complete_or_unbounded(__type_identity<_Fn>{}), "_Fn must be a complete class or an unbounded array"); static_assert((std::__is_complete_or_unbounded( __type_identity<_ArgTypes>{}) && ...), "each argument type must be a complete class or an unbounded array"); static_assert(std::__is_complete_or_unbounded(__type_identity<_Ret>{}), "_Ret must be a complete class or an unbounded array"); }; template<typename _Fn, typename... _ArgTypes> struct is_nothrow_invocable : __and_<__is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, void>, __call_is_nothrow_<_Fn, _ArgTypes...>>::type { static_assert(std::__is_complete_or_unbounded(__type_identity<_Fn>{}), "_Fn must be a complete class or an unbounded array"); static_assert((std::__is_complete_or_unbounded( __type_identity<_ArgTypes>{}) && ...), "each argument type must be a complete class or an unbounded array"); }; template<typename _Result, typename _Ret> using __is_nt_invocable_impl = typename __is_invocable_impl<_Result, _Ret>::__nothrow_conv; 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 { static_assert(std::__is_complete_or_unbounded(__type_identity<_Fn>{}), "_Fn must be a complete class or an unbounded array"); static_assert((std::__is_complete_or_unbounded( __type_identity<_ArgTypes>{}) && ...), "each argument type must be a complete class or an unbounded array"); static_assert(std::__is_complete_or_unbounded(__type_identity<_Ret>{}), "_Ret must be a complete class or an unbounded array"); }; 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 = false; template <typename _Tp> inline constexpr bool is_array_v<_Tp[]> = true; template <typename _Tp, size_t _Num> inline constexpr bool is_array_v<_Tp[_Num]> = true; template <typename _Tp> inline constexpr bool is_pointer_v = is_pointer<_Tp>::value; template <typename _Tp> inline constexpr bool is_lvalue_reference_v = false; template <typename _Tp> inline constexpr bool is_lvalue_reference_v<_Tp&> = true; template <typename _Tp> inline constexpr bool is_rvalue_reference_v = false; template <typename _Tp> inline constexpr bool is_rvalue_reference_v<_Tp&&> = true; 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); template <typename _Tp> inline constexpr bool is_union_v = __is_union(_Tp); template <typename _Tp> inline constexpr bool is_class_v = __is_class(_Tp); template <typename _Tp> inline constexpr bool is_function_v = is_function<_Tp>::value; template <typename _Tp> inline constexpr bool is_reference_v = false; template <typename _Tp> inline constexpr bool is_reference_v<_Tp&> = true; template <typename _Tp> inline constexpr bool is_reference_v<_Tp&&> = true; 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 = false; template <typename _Tp> inline constexpr bool is_const_v<const _Tp> = true; template <typename _Tp> inline constexpr bool is_volatile_v = false; template <typename _Tp> inline constexpr bool is_volatile_v<volatile _Tp> = true; template <typename _Tp> inline constexpr bool is_trivial_v = __is_trivial(_Tp); template <typename _Tp> inline constexpr bool is_trivially_copyable_v = __is_trivially_copyable(_Tp); template <typename _Tp> inline constexpr bool is_standard_layout_v = __is_standard_layout(_Tp); template <typename _Tp> __attribute__ ((__deprecated__ ("use '" "is_standard_layout_v && is_trivial_v" "' instead"))) inline constexpr bool is_pod_v = __is_pod(_Tp); template <typename _Tp> [[__deprecated__]] inline constexpr bool is_literal_type_v = __is_literal_type(_Tp); template <typename _Tp> inline constexpr bool is_empty_v = __is_empty(_Tp); template <typename _Tp> inline constexpr bool is_polymorphic_v = __is_polymorphic(_Tp); template <typename _Tp> inline constexpr bool is_abstract_v = __is_abstract(_Tp); template <typename _Tp> inline constexpr bool is_final_v = __is_final(_Tp); 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...); template <typename _Tp> inline constexpr bool is_default_constructible_v = __is_constructible(_Tp); template <typename _Tp> inline constexpr bool is_copy_constructible_v = __is_constructible(_Tp, __add_lval_ref_t<const _Tp>); template <typename _Tp> inline constexpr bool is_move_constructible_v = __is_constructible(_Tp, __add_rval_ref_t<_Tp>); template <typename _Tp, typename _Up> inline constexpr bool is_assignable_v = __is_assignable(_Tp, _Up); template <typename _Tp> inline constexpr bool is_copy_assignable_v = __is_assignable(__add_lval_ref_t<_Tp>, __add_lval_ref_t<const _Tp>); template <typename _Tp> inline constexpr bool is_move_assignable_v = __is_assignable(__add_lval_ref_t<_Tp>, __add_rval_ref_t<_Tp>); 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...); template <typename _Tp> inline constexpr bool is_trivially_default_constructible_v = __is_trivially_constructible(_Tp); template <typename _Tp> inline constexpr bool is_trivially_copy_constructible_v = __is_trivially_constructible(_Tp, __add_lval_ref_t<const _Tp>); template <typename _Tp> inline constexpr bool is_trivially_move_constructible_v = __is_trivially_constructible(_Tp, __add_rval_ref_t<_Tp>); template <typename _Tp, typename _Up> inline constexpr bool is_trivially_assignable_v = __is_trivially_assignable(_Tp, _Up); template <typename _Tp> inline constexpr bool is_trivially_copy_assignable_v = __is_trivially_assignable(__add_lval_ref_t<_Tp>, __add_lval_ref_t<const _Tp>); template <typename _Tp> inline constexpr bool is_trivially_move_assignable_v = __is_trivially_assignable(__add_lval_ref_t<_Tp>, __add_rval_ref_t<_Tp>); 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...); template <typename _Tp> inline constexpr bool is_nothrow_default_constructible_v = __is_nothrow_constructible(_Tp); template <typename _Tp> inline constexpr bool is_nothrow_copy_constructible_v = __is_nothrow_constructible(_Tp, __add_lval_ref_t<const _Tp>); template <typename _Tp> inline constexpr bool is_nothrow_move_constructible_v = __is_nothrow_constructible(_Tp, __add_rval_ref_t<_Tp>); template <typename _Tp, typename _Up> inline constexpr bool is_nothrow_assignable_v = __is_nothrow_assignable(_Tp, _Up); template <typename _Tp> inline constexpr bool is_nothrow_copy_assignable_v = __is_nothrow_assignable(__add_lval_ref_t<_Tp>, __add_lval_ref_t<const _Tp>); template <typename _Tp> inline constexpr bool is_nothrow_move_assignable_v = __is_nothrow_assignable(__add_lval_ref_t<_Tp>, __add_rval_ref_t<_Tp>); 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); template <typename _Tp> inline constexpr size_t alignment_of_v = alignment_of<_Tp>::value; template <typename _Tp> inline constexpr size_t rank_v = 0; template <typename _Tp, size_t _Size> inline constexpr size_t rank_v<_Tp[_Size]> = 1 + rank_v<_Tp>; template <typename _Tp> inline constexpr size_t rank_v<_Tp[]> = 1 + rank_v<_Tp>; template <typename _Tp, unsigned _Idx = 0> inline constexpr size_t extent_v = 0; template <typename _Tp, size_t _Size> inline constexpr size_t extent_v<_Tp[_Size], 0> = _Size; template <typename _Tp, unsigned _Idx, size_t _Size> inline constexpr size_t extent_v<_Tp[_Size], _Idx> = extent_v<_Tp, _Idx - 1>; template <typename _Tp> inline constexpr size_t extent_v<_Tp[], 0> = 0; template <typename _Tp, unsigned _Idx> inline constexpr size_t extent_v<_Tp[], _Idx> = extent_v<_Tp, _Idx - 1>; template <typename _Tp, typename _Up> inline constexpr bool is_same_v = __is_same(_Tp, _Up); template <typename _Base, typename _Derived> inline constexpr bool is_base_of_v = __is_base_of(_Base, _Derived); template <typename _From, typename _To> inline constexpr bool is_convertible_v = __is_convertible(_From, _To); template<typename _Fn, typename... _Args> inline constexpr bool is_invocable_v = is_invocable<_Fn, _Args...>::value; template<typename _Fn, typename... _Args> inline constexpr bool is_nothrow_invocable_v = is_nothrow_invocable<_Fn, _Args...>::value; template<typename _Ret, typename _Fn, typename... _Args> inline constexpr bool is_invocable_r_v = is_invocable_r<_Ret, _Fn, _Args...>::value; template<typename _Ret, typename _Fn, typename... _Args> inline constexpr bool is_nothrow_invocable_r_v = is_nothrow_invocable_r<_Ret, _Fn, _Args...>::value; template<typename _Tp> struct has_unique_object_representations : bool_constant<__has_unique_object_representations( remove_cv_t<remove_all_extents_t<_Tp>> )> { static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), "template argument must be a complete class or an unbounded array"); }; template<typename _Tp> inline constexpr bool has_unique_object_representations_v = has_unique_object_representations<_Tp>::value; template<typename _Tp> struct is_aggregate : bool_constant<__is_aggregate(remove_cv_t<_Tp>)> { }; template<typename _Tp> inline constexpr bool is_aggregate_v = __is_aggregate(remove_cv_t<_Tp>); template<typename _Tp> struct remove_cvref { using type = __remove_cvref(_Tp); }; template<typename _Tp> using remove_cvref_t = typename remove_cvref<_Tp>::type; template<typename _Tp> struct type_identity { using type = _Tp; }; template<typename _Tp> using type_identity_t = typename type_identity<_Tp>::type; 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; 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; template<typename _Tp> inline constexpr bool is_bounded_array_v = false; template<typename _Tp, size_t _Size> inline constexpr bool is_bounded_array_v<_Tp[_Size]> = true; template<typename _Tp> inline constexpr bool is_unbounded_array_v = false; template<typename _Tp> inline constexpr bool is_unbounded_array_v<_Tp[]> = true; template<typename _Tp> struct is_bounded_array : public bool_constant<is_bounded_array_v<_Tp>> { }; template<typename _Tp> struct is_unbounded_array : public bool_constant<is_unbounded_array_v<_Tp>> { }; constexpr bool is_constant_evaluated() noexcept ; template<typename _From, typename _To> using __copy_cv = typename __match_cv_qualifiers<_From, _To>::__type; template<typename _Xp, typename _Yp> using __cond_res = decltype(false ? declval<_Xp(&)()>()() : declval<_Yp(&)()>()()); template<typename _Ap, typename _Bp, typename = void> struct __common_ref_impl { }; template<typename _Ap, typename _Bp> using __common_ref = typename __common_ref_impl<_Ap, _Bp>::type; template<typename _Xp, typename _Yp> using __condres_cvref = __cond_res<__copy_cv<_Xp, _Yp>&, __copy_cv<_Yp, _Xp>&>; template<typename _Xp, typename _Yp> struct __common_ref_impl<_Xp&, _Yp&, __void_t<__condres_cvref<_Xp, _Yp>>> : enable_if<is_reference_v<__condres_cvref<_Xp, _Yp>>, __condres_cvref<_Xp, _Yp>> { }; template<typename _Xp, typename _Yp> using __common_ref_C = remove_reference_t<__common_ref<_Xp&, _Yp&>>&&; template<typename _Xp, typename _Yp> struct __common_ref_impl<_Xp&&, _Yp&&, _Require<is_convertible<_Xp&&, __common_ref_C<_Xp, _Yp>>, is_convertible<_Yp&&, __common_ref_C<_Xp, _Yp>>>> { using type = __common_ref_C<_Xp, _Yp>; }; template<typename _Xp, typename _Yp> using __common_ref_D = __common_ref<const _Xp&, _Yp&>; template<typename _Xp, typename _Yp> struct __common_ref_impl<_Xp&&, _Yp&, _Require<is_convertible<_Xp&&, __common_ref_D<_Xp, _Yp>>>> { using type = __common_ref_D<_Xp, _Yp>; }; template<typename _Xp, typename _Yp> struct __common_ref_impl<_Xp&, _Yp&&> : __common_ref_impl<_Yp&&, _Xp&> { }; template<typename _Tp, typename _Up, template<typename> class _TQual, template<typename> class _UQual> struct basic_common_reference { }; template<typename _Tp> struct __xref { template<typename _Up> using __type = __copy_cv<_Tp, _Up>; }; template<typename _Tp> struct __xref<_Tp&> { template<typename _Up> using __type = __copy_cv<_Tp, _Up>&; }; template<typename _Tp> struct __xref<_Tp&&> { template<typename _Up> using __type = __copy_cv<_Tp, _Up>&&; }; template<typename _Tp1, typename _Tp2> using __basic_common_ref = typename basic_common_reference<remove_cvref_t<_Tp1>, remove_cvref_t<_Tp2>, __xref<_Tp1>::template __type, __xref<_Tp2>::template __type>::type; template<typename... _Tp> struct common_reference; template<typename... _Tp> using common_reference_t = typename common_reference<_Tp...>::type; template<> struct common_reference<> { }; template<typename _Tp0> struct common_reference<_Tp0> { using type = _Tp0; }; template<typename _Tp1, typename _Tp2, int _Bullet = 1, typename = void> struct __common_reference_impl : __common_reference_impl<_Tp1, _Tp2, _Bullet + 1> { }; template<typename _Tp1, typename _Tp2> struct common_reference<_Tp1, _Tp2> : __common_reference_impl<_Tp1, _Tp2> { }; template<typename _Tp1, typename _Tp2> struct __common_reference_impl<_Tp1&, _Tp2&, 1, void_t<__common_ref<_Tp1&, _Tp2&>>> { using type = __common_ref<_Tp1&, _Tp2&>; }; template<typename _Tp1, typename _Tp2> struct __common_reference_impl<_Tp1&&, _Tp2&&, 1, void_t<__common_ref<_Tp1&&, _Tp2&&>>> { using type = __common_ref<_Tp1&&, _Tp2&&>; }; template<typename _Tp1, typename _Tp2> struct __common_reference_impl<_Tp1&, _Tp2&&, 1, void_t<__common_ref<_Tp1&, _Tp2&&>>> { using type = __common_ref<_Tp1&, _Tp2&&>; }; template<typename _Tp1, typename _Tp2> struct __common_reference_impl<_Tp1&&, _Tp2&, 1, void_t<__common_ref<_Tp1&&, _Tp2&>>> { using type = __common_ref<_Tp1&&, _Tp2&>; }; template<typename _Tp1, typename _Tp2> struct __common_reference_impl<_Tp1, _Tp2, 2, void_t<__basic_common_ref<_Tp1, _Tp2>>> { using type = __basic_common_ref<_Tp1, _Tp2>; }; template<typename _Tp1, typename _Tp2> struct __common_reference_impl<_Tp1, _Tp2, 3, void_t<__cond_res<_Tp1, _Tp2>>> { using type = __cond_res<_Tp1, _Tp2>; }; template<typename _Tp1, typename _Tp2> struct __common_reference_impl<_Tp1, _Tp2, 4, void_t<common_type_t<_Tp1, _Tp2>>> { using type = common_type_t<_Tp1, _Tp2>; }; template<typename _Tp1, typename _Tp2> struct __common_reference_impl<_Tp1, _Tp2, 5, void> { }; template<typename _Tp1, typename _Tp2, typename... _Rest> struct common_reference<_Tp1, _Tp2, _Rest...> : __common_type_fold<common_reference<_Tp1, _Tp2>, __common_type_pack<_Rest...>> { }; template<typename _Tp1, typename _Tp2, typename... _Rest> struct __common_type_fold<common_reference<_Tp1, _Tp2>, __common_type_pack<_Rest...>, void_t<common_reference_t<_Tp1, _Tp2>>> : public common_reference<common_reference_t<_Tp1, _Tp2>, _Rest...> { }; } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Tp> constexpr _Tp* __addressof(_Tp& __r) noexcept ; template<typename _Tp> [[__nodiscard__]] constexpr _Tp&& forward(typename std::remove_reference<_Tp>::type& __t) noexcept ; template<typename _Tp> [[__nodiscard__]] constexpr _Tp&& forward(typename std::remove_reference<_Tp>::type&& __t) noexcept ; template<typename _Tp> [[__nodiscard__]] constexpr typename std::remove_reference<_Tp>::type&& move(_Tp&& __t) noexcept ; template<typename _Tp> struct __move_if_noexcept_cond : public __and_<__not_<is_nothrow_move_constructible<_Tp>>, is_copy_constructible<_Tp>>::type { }; template<typename _Tp> [[__nodiscard__]] constexpr __conditional_t<__move_if_noexcept_cond<_Tp>::value, const _Tp&, _Tp&&> move_if_noexcept(_Tp& __x) noexcept ; template<typename _Tp> [[__nodiscard__]] constexpr _Tp* addressof(_Tp& __r) noexcept ; template<typename _Tp> const _Tp* addressof(const _Tp&&) = delete; template <typename _Tp, typename _Up = _Tp> constexpr _Tp __exchange(_Tp& __obj, _Up&& __new_val) ; template<typename _Tp> constexpr 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) ; template<typename _Tp, size_t _Nm> constexpr typename enable_if<__is_swappable<_Tp>::value>::type swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) noexcept(__is_nothrow_swappable<_Tp>::value) ; } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Tp> struct tuple_size; 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> { }; template<typename _Tp> inline constexpr size_t tuple_size_v = tuple_size<_Tp>::value; template<size_t __i, typename _Tp> struct tuple_element; template<size_t __i, typename _Tp> using __tuple_element_t = typename tuple_element<__i, _Tp>::type; template<size_t __i, typename _Tp> struct tuple_element<__i, const _Tp> { using type = const __tuple_element_t<__i, _Tp>; }; template<size_t __i, typename _Tp> struct tuple_element<__i, volatile _Tp> { using type = volatile __tuple_element_t<__i, _Tp>; }; template<size_t __i, typename _Tp> struct tuple_element<__i, const volatile _Tp> { using type = const volatile __tuple_element_t<__i, _Tp>; }; template<typename _Tp, typename... _Types> constexpr size_t __find_uniq_type_in_pack() ; template<size_t __i, typename _Tp> using tuple_element_t = typename tuple_element<__i, _Tp>::type; template<size_t... _Indexes> struct _Index_tuple { }; template<size_t _Num> struct _Build_index_tuple { template<typename, size_t... _Indices> using _IdxTuple = _Index_tuple<_Indices...>; using __type = __make_integer_seq<_IdxTuple, size_t, _Num>; }; template<typename _Tp, _Tp... _Idx> struct integer_sequence { static_assert(is_integral_v<_Tp>); typedef _Tp value_type; static constexpr size_t size() noexcept { return sizeof...(_Idx); } }; template<typename _Tp, _Tp _Num> using make_integer_sequence = __make_integer_seq<integer_sequence, _Tp, _Num>; template<size_t... _Idx> using index_sequence = integer_sequence<size_t, _Idx...>; template<size_t _Num> using make_index_sequence = make_integer_sequence<size_t, _Num>; template<typename... _Types> using index_sequence_for = make_index_sequence<sizeof...(_Types)>; 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> inline constexpr bool __is_in_place_type_v = false; template<typename _Tp> inline constexpr bool __is_in_place_type_v<in_place_type_t<_Tp>> = true; template<typename _Tp> using __is_in_place_type = bool_constant<__is_in_place_type_v<_Tp>>; template<size_t _Np, typename... _Types> struct _Nth_type { }; template<typename _Tp0, typename... _Rest> struct _Nth_type<0, _Tp0, _Rest...> { using type = _Tp0; }; template<typename _Tp0, typename _Tp1, typename... _Rest> struct _Nth_type<1, _Tp0, _Tp1, _Rest...> { using type = _Tp1; }; template<typename _Tp0, typename _Tp1, typename _Tp2, typename... _Rest> struct _Nth_type<2, _Tp0, _Tp1, _Tp2, _Rest...> { using type = _Tp2; }; template<size_t _Np, typename _Tp0, typename _Tp1, typename _Tp2, typename... _Rest> requires (_Np >= 3) struct _Nth_type<_Np, _Tp0, _Tp1, _Tp2, _Rest...> : _Nth_type<_Np - 3, _Rest...> { }; } namespace std __attribute__ ((__visibility__ ("default"))) { namespace __detail { template<typename _Tp, typename _Up> concept __same_as = std::is_same_v<_Tp, _Up>; } template<typename _Tp, typename _Up> concept same_as = __detail::__same_as<_Tp, _Up> && __detail::__same_as<_Up, _Tp>; template<typename _Derived, typename _Base> concept derived_from = __is_base_of(_Base, _Derived) && is_convertible_v<const volatile _Derived*, const volatile _Base*>; template<typename _From, typename _To> concept convertible_to = is_convertible_v<_From, _To> && requires { static_cast<_To>(std::declval<_From>()); }; template<typename _Tp, typename _Up> concept common_reference_with = same_as<common_reference_t<_Tp, _Up>, common_reference_t<_Up, _Tp>> && convertible_to<_Tp, common_reference_t<_Tp, _Up>> && convertible_to<_Up, common_reference_t<_Tp, _Up>>; template<typename _Tp, typename _Up> concept common_with = same_as<common_type_t<_Tp, _Up>, common_type_t<_Up, _Tp>> && requires { static_cast<common_type_t<_Tp, _Up>>(std::declval<_Tp>()); static_cast<common_type_t<_Tp, _Up>>(std::declval<_Up>()); } && common_reference_with<add_lvalue_reference_t<const _Tp>, add_lvalue_reference_t<const _Up>> && common_reference_with<add_lvalue_reference_t<common_type_t<_Tp, _Up>>, common_reference_t< add_lvalue_reference_t<const _Tp>, add_lvalue_reference_t<const _Up>>>; template<typename _Tp> concept integral = is_integral_v<_Tp>; template<typename _Tp> concept signed_integral = integral<_Tp> && is_signed_v<_Tp>; template<typename _Tp> concept unsigned_integral = integral<_Tp> && !signed_integral<_Tp>; template<typename _Tp> concept floating_point = is_floating_point_v<_Tp>; namespace __detail { template<typename _Tp> using __cref = const remove_reference_t<_Tp>&; template<typename _Tp> concept __class_or_enum = is_class_v<_Tp> || is_union_v<_Tp> || is_enum_v<_Tp>; template<typename _Tp> constexpr bool __destructible_impl = false; template<typename _Tp> requires requires(_Tp& __t) { { __t.~_Tp() } noexcept; } constexpr bool __destructible_impl<_Tp> = true; template<typename _Tp> constexpr bool __destructible = __destructible_impl<_Tp>; template<typename _Tp> constexpr bool __destructible<_Tp&> = true; template<typename _Tp> constexpr bool __destructible<_Tp&&> = true; template<typename _Tp, size_t _Nm> constexpr bool __destructible<_Tp[_Nm]> = __destructible<_Tp>; } template<typename _Lhs, typename _Rhs> concept assignable_from = is_lvalue_reference_v<_Lhs> && common_reference_with<__detail::__cref<_Lhs>, __detail::__cref<_Rhs>> && requires(_Lhs __lhs, _Rhs&& __rhs) { { __lhs = static_cast<_Rhs&&>(__rhs) } -> same_as<_Lhs>; }; template<typename _Tp> concept destructible = __detail::__destructible<_Tp>; template<typename _Tp, typename... _Args> concept constructible_from = destructible<_Tp> && is_constructible_v<_Tp, _Args...>; template<typename _Tp> concept default_initializable = constructible_from<_Tp> && requires { _Tp{}; (void) ::new _Tp; }; template<typename _Tp> concept move_constructible = constructible_from<_Tp, _Tp> && convertible_to<_Tp, _Tp>; template<typename _Tp> concept copy_constructible = move_constructible<_Tp> && constructible_from<_Tp, _Tp&> && convertible_to<_Tp&, _Tp> && constructible_from<_Tp, const _Tp&> && convertible_to<const _Tp&, _Tp> && constructible_from<_Tp, const _Tp> && convertible_to<const _Tp, _Tp>; namespace ranges { namespace __cust_swap { template<typename _Tp> void swap(_Tp&, _Tp&) = delete; template<typename _Tp, typename _Up> concept __adl_swap = (__detail::__class_or_enum<remove_reference_t<_Tp>> || __detail::__class_or_enum<remove_reference_t<_Up>>) && requires(_Tp&& __t, _Up&& __u) { swap(static_cast<_Tp&&>(__t), static_cast<_Up&&>(__u)); }; struct _Swap { private: template<typename _Tp, typename _Up> static constexpr bool _S_noexcept() { if constexpr (__adl_swap<_Tp, _Up>) return noexcept(swap(std::declval<_Tp>(), std::declval<_Up>())); else return is_nothrow_move_constructible_v<remove_reference_t<_Tp>> && is_nothrow_move_assignable_v<remove_reference_t<_Tp>>; } public: template<typename _Tp, typename _Up> requires __adl_swap<_Tp, _Up> || (same_as<_Tp, _Up> && is_lvalue_reference_v<_Tp> && move_constructible<remove_reference_t<_Tp>> && assignable_from<_Tp, remove_reference_t<_Tp>>) constexpr void operator()(_Tp&& __t, _Up&& __u) const noexcept(_S_noexcept<_Tp, _Up>()) ; template<typename _Tp, typename _Up, size_t _Num> requires requires(const _Swap& __swap, _Tp& __e1, _Up& __e2) { __swap(__e1, __e2); } constexpr void operator()(_Tp (&__e1)[_Num], _Up (&__e2)[_Num]) const noexcept(noexcept(std::declval<const _Swap&>()(*__e1, *__e2))) ; }; } inline namespace __cust { inline constexpr __cust_swap::_Swap swap{}; } } template<typename _Tp> concept swappable = requires(_Tp& __a, _Tp& __b) { ranges::swap(__a, __b); }; template<typename _Tp, typename _Up> concept swappable_with = common_reference_with<_Tp, _Up> && requires(_Tp&& __t, _Up&& __u) { ranges::swap(static_cast<_Tp&&>(__t), static_cast<_Tp&&>(__t)); ranges::swap(static_cast<_Up&&>(__u), static_cast<_Up&&>(__u)); ranges::swap(static_cast<_Tp&&>(__t), static_cast<_Up&&>(__u)); ranges::swap(static_cast<_Up&&>(__u), static_cast<_Tp&&>(__t)); }; template<typename _Tp> concept movable = is_object_v<_Tp> && move_constructible<_Tp> && assignable_from<_Tp&, _Tp> && swappable<_Tp>; template<typename _Tp> concept copyable = copy_constructible<_Tp> && movable<_Tp> && assignable_from<_Tp&, _Tp&> && assignable_from<_Tp&, const _Tp&> && assignable_from<_Tp&, const _Tp>; template<typename _Tp> concept semiregular = copyable<_Tp> && default_initializable<_Tp>; namespace __detail { template<typename _Tp> concept __boolean_testable_impl = convertible_to<_Tp, bool>; template<typename _Tp> concept __boolean_testable = __boolean_testable_impl<_Tp> && requires(_Tp&& __t) { { !static_cast<_Tp&&>(__t) } -> __boolean_testable_impl; }; } namespace __detail { template<typename _Tp, typename _Up> concept __weakly_eq_cmp_with = requires(__detail::__cref<_Tp> __t, __detail::__cref<_Up> __u) { { __t == __u } -> __boolean_testable; { __t != __u } -> __boolean_testable; { __u == __t } -> __boolean_testable; { __u != __t } -> __boolean_testable; }; } template<typename _Tp> concept equality_comparable = __detail::__weakly_eq_cmp_with<_Tp, _Tp>; template<typename _Tp, typename _Up> concept equality_comparable_with = equality_comparable<_Tp> && equality_comparable<_Up> && common_reference_with<__detail::__cref<_Tp>, __detail::__cref<_Up>> && equality_comparable<common_reference_t<__detail::__cref<_Tp>, __detail::__cref<_Up>>> && __detail::__weakly_eq_cmp_with<_Tp, _Up>; namespace __detail { template<typename _Tp, typename _Up> concept __partially_ordered_with = requires(const remove_reference_t<_Tp>& __t, const remove_reference_t<_Up>& __u) { { __t < __u } -> __boolean_testable; { __t > __u } -> __boolean_testable; { __t <= __u } -> __boolean_testable; { __t >= __u } -> __boolean_testable; { __u < __t } -> __boolean_testable; { __u > __t } -> __boolean_testable; { __u <= __t } -> __boolean_testable; { __u >= __t } -> __boolean_testable; }; } template<typename _Tp> concept totally_ordered = equality_comparable<_Tp> && __detail::__partially_ordered_with<_Tp, _Tp>; template<typename _Tp, typename _Up> concept totally_ordered_with = totally_ordered<_Tp> && totally_ordered<_Up> && equality_comparable_with<_Tp, _Up> && totally_ordered<common_reference_t<__detail::__cref<_Tp>, __detail::__cref<_Up>>> && __detail::__partially_ordered_with<_Tp, _Up>; template<typename _Tp> concept regular = semiregular<_Tp> && equality_comparable<_Tp>; template<typename _Fn, typename... _Args> concept invocable = is_invocable_v<_Fn, _Args...>; template<typename _Fn, typename... _Args> concept regular_invocable = invocable<_Fn, _Args...>; template<typename _Fn, typename... _Args> concept predicate = regular_invocable<_Fn, _Args...> && __detail::__boolean_testable<invoke_result_t<_Fn, _Args...>>; template<typename _Rel, typename _Tp, typename _Up> concept relation = predicate<_Rel, _Tp, _Tp> && predicate<_Rel, _Up, _Up> && predicate<_Rel, _Tp, _Up> && predicate<_Rel, _Up, _Tp>; template<typename _Rel, typename _Tp, typename _Up> concept equivalence_relation = relation<_Rel, _Tp, _Up>; template<typename _Rel, typename _Tp, typename _Up> concept strict_weak_order = relation<_Rel, _Tp, _Up>; } namespace std __attribute__ ((__visibility__ ("default"))) { namespace __cmp_cat { using type = signed char; enum class _Ord : type { equivalent = 0, less = -1, greater = 1 }; enum class _Ncmp : type { _Unordered = 2 }; struct __unspec { consteval __unspec(__unspec*) noexcept { } }; } class partial_ordering { __cmp_cat::type _M_value; constexpr explicit partial_ordering(__cmp_cat::_Ord __v) noexcept : _M_value(__cmp_cat::type(__v)) { } constexpr explicit partial_ordering(__cmp_cat::_Ncmp __v) noexcept : _M_value(__cmp_cat::type(__v)) { } friend class weak_ordering; friend class strong_ordering; public: static const partial_ordering less; static const partial_ordering equivalent; static const partial_ordering greater; static const partial_ordering unordered; [[nodiscard]] friend constexpr bool operator==(partial_ordering __v, __cmp_cat::__unspec) noexcept { return __v._M_value == 0; } [[nodiscard]] friend constexpr bool operator==(partial_ordering, partial_ordering) noexcept = default; [[nodiscard]] friend constexpr bool operator< (partial_ordering __v, __cmp_cat::__unspec) noexcept { return __v._M_value == -1; } [[nodiscard]] friend constexpr bool operator> (partial_ordering __v, __cmp_cat::__unspec) noexcept { return __v._M_value == 1; } [[nodiscard]] friend constexpr bool operator<=(partial_ordering __v, __cmp_cat::__unspec) noexcept { return __v._M_value <= 0; } [[nodiscard]] friend constexpr bool operator>=(partial_ordering __v, __cmp_cat::__unspec) noexcept { return __cmp_cat::type(__v._M_value & 1) == __v._M_value; } [[nodiscard]] friend constexpr bool operator< (__cmp_cat::__unspec, partial_ordering __v) noexcept { return __v._M_value == 1; } [[nodiscard]] friend constexpr bool operator> (__cmp_cat::__unspec, partial_ordering __v) noexcept { return __v._M_value == -1; } [[nodiscard]] friend constexpr bool operator<=(__cmp_cat::__unspec, partial_ordering __v) noexcept { return __cmp_cat::type(__v._M_value & 1) == __v._M_value; } [[nodiscard]] friend constexpr bool operator>=(__cmp_cat::__unspec, partial_ordering __v) noexcept { return 0 >= __v._M_value; } [[nodiscard]] friend constexpr partial_ordering operator<=>(partial_ordering __v, __cmp_cat::__unspec) noexcept { return __v; } [[nodiscard]] friend constexpr partial_ordering operator<=>(__cmp_cat::__unspec, partial_ordering __v) noexcept { if (__v._M_value & 1) return partial_ordering(__cmp_cat::_Ord(-__v._M_value)); else return __v; } }; inline constexpr partial_ordering partial_ordering::less(__cmp_cat::_Ord::less); inline constexpr partial_ordering partial_ordering::equivalent(__cmp_cat::_Ord::equivalent); inline constexpr partial_ordering partial_ordering::greater(__cmp_cat::_Ord::greater); inline constexpr partial_ordering partial_ordering::unordered(__cmp_cat::_Ncmp::_Unordered); class weak_ordering { __cmp_cat::type _M_value; constexpr explicit weak_ordering(__cmp_cat::_Ord __v) noexcept : _M_value(__cmp_cat::type(__v)) { } friend class strong_ordering; public: static const weak_ordering less; static const weak_ordering equivalent; static const weak_ordering greater; [[nodiscard]] constexpr operator partial_ordering() const noexcept { return partial_ordering(__cmp_cat::_Ord(_M_value)); } [[nodiscard]] friend constexpr bool operator==(weak_ordering __v, __cmp_cat::__unspec) noexcept { return __v._M_value == 0; } [[nodiscard]] friend constexpr bool operator==(weak_ordering, weak_ordering) noexcept = default; [[nodiscard]] friend constexpr bool operator< (weak_ordering __v, __cmp_cat::__unspec) noexcept { return __v._M_value < 0; } [[nodiscard]] friend constexpr bool operator> (weak_ordering __v, __cmp_cat::__unspec) noexcept { return __v._M_value > 0; } [[nodiscard]] friend constexpr bool operator<=(weak_ordering __v, __cmp_cat::__unspec) noexcept { return __v._M_value <= 0; } [[nodiscard]] friend constexpr bool operator>=(weak_ordering __v, __cmp_cat::__unspec) noexcept { return __v._M_value >= 0; } [[nodiscard]] friend constexpr bool operator< (__cmp_cat::__unspec, weak_ordering __v) noexcept { return 0 < __v._M_value; } [[nodiscard]] friend constexpr bool operator> (__cmp_cat::__unspec, weak_ordering __v) noexcept { return 0 > __v._M_value; } [[nodiscard]] friend constexpr bool operator<=(__cmp_cat::__unspec, weak_ordering __v) noexcept { return 0 <= __v._M_value; } [[nodiscard]] friend constexpr bool operator>=(__cmp_cat::__unspec, weak_ordering __v) noexcept { return 0 >= __v._M_value; } [[nodiscard]] friend constexpr weak_ordering operator<=>(weak_ordering __v, __cmp_cat::__unspec) noexcept { return __v; } [[nodiscard]] friend constexpr weak_ordering operator<=>(__cmp_cat::__unspec, weak_ordering __v) noexcept { return weak_ordering(__cmp_cat::_Ord(-__v._M_value)); } }; inline constexpr weak_ordering weak_ordering::less(__cmp_cat::_Ord::less); inline constexpr weak_ordering weak_ordering::equivalent(__cmp_cat::_Ord::equivalent); inline constexpr weak_ordering weak_ordering::greater(__cmp_cat::_Ord::greater); class strong_ordering { __cmp_cat::type _M_value; constexpr explicit strong_ordering(__cmp_cat::_Ord __v) noexcept : _M_value(__cmp_cat::type(__v)) { } public: static const strong_ordering less; static const strong_ordering equal; static const strong_ordering equivalent; static const strong_ordering greater; [[nodiscard]] constexpr operator partial_ordering() const noexcept ; [[nodiscard]] constexpr operator weak_ordering() const noexcept ; [[nodiscard]] friend constexpr bool operator==(strong_ordering __v, __cmp_cat::__unspec) noexcept { return __v._M_value == 0; } [[nodiscard]] friend constexpr bool operator==(strong_ordering, strong_ordering) noexcept = default; [[nodiscard]] friend constexpr bool operator< (strong_ordering __v, __cmp_cat::__unspec) noexcept { return __v._M_value < 0; } [[nodiscard]] friend constexpr bool operator> (strong_ordering __v, __cmp_cat::__unspec) noexcept { return __v._M_value > 0; } [[nodiscard]] friend constexpr bool operator<=(strong_ordering __v, __cmp_cat::__unspec) noexcept { return __v._M_value <= 0; } [[nodiscard]] friend constexpr bool operator>=(strong_ordering __v, __cmp_cat::__unspec) noexcept { return __v._M_value >= 0; } [[nodiscard]] friend constexpr bool operator< (__cmp_cat::__unspec, strong_ordering __v) noexcept { return 0 < __v._M_value; } [[nodiscard]] friend constexpr bool operator> (__cmp_cat::__unspec, strong_ordering __v) noexcept { return 0 > __v._M_value; } [[nodiscard]] friend constexpr bool operator<=(__cmp_cat::__unspec, strong_ordering __v) noexcept { return 0 <= __v._M_value; } [[nodiscard]] friend constexpr bool operator>=(__cmp_cat::__unspec, strong_ordering __v) noexcept { return 0 >= __v._M_value; } [[nodiscard]] friend constexpr strong_ordering operator<=>(strong_ordering __v, __cmp_cat::__unspec) noexcept { return __v; } [[nodiscard]] friend constexpr strong_ordering operator<=>(__cmp_cat::__unspec, strong_ordering __v) noexcept { return strong_ordering(__cmp_cat::_Ord(-__v._M_value)); } }; inline constexpr strong_ordering strong_ordering::less(__cmp_cat::_Ord::less); inline constexpr strong_ordering strong_ordering::equal(__cmp_cat::_Ord::equivalent); inline constexpr strong_ordering strong_ordering::equivalent(__cmp_cat::_Ord::equivalent); inline constexpr strong_ordering strong_ordering::greater(__cmp_cat::_Ord::greater); [[nodiscard]] constexpr bool is_eq(partial_ordering __cmp) noexcept { return __cmp == 0; } [[nodiscard]] constexpr bool is_neq(partial_ordering __cmp) noexcept ; [[nodiscard]] constexpr bool is_lt (partial_ordering __cmp) noexcept ; [[nodiscard]] constexpr bool is_lteq(partial_ordering __cmp) noexcept ; [[nodiscard]] constexpr bool is_gt (partial_ordering __cmp) noexcept ; [[nodiscard]] constexpr bool is_gteq(partial_ordering __cmp) noexcept { return __cmp >= 0; } namespace __detail { template<typename _Tp> inline constexpr unsigned __cmp_cat_id = 1; template<> inline constexpr unsigned __cmp_cat_id<partial_ordering> = 2; template<> inline constexpr unsigned __cmp_cat_id<weak_ordering> = 4; template<> inline constexpr unsigned __cmp_cat_id<strong_ordering> = 8; template<typename... _Ts> constexpr auto __common_cmp_cat() { constexpr unsigned __cats = (__cmp_cat_id<_Ts> | ...); if constexpr (__cats & 1) return; else if constexpr (bool(__cats & __cmp_cat_id<partial_ordering>)) return partial_ordering::equivalent; else if constexpr (bool(__cats & __cmp_cat_id<weak_ordering>)) return weak_ordering::equivalent; else return strong_ordering::equivalent; } } template<typename... _Ts> struct common_comparison_category { using type = decltype(__detail::__common_cmp_cat<_Ts...>()); }; template<typename _Tp> struct common_comparison_category<_Tp> { using type = void; }; template<> struct common_comparison_category<partial_ordering> { using type = partial_ordering; }; template<> struct common_comparison_category<weak_ordering> { using type = weak_ordering; }; template<> struct common_comparison_category<strong_ordering> { using type = strong_ordering; }; template<> struct common_comparison_category<> { using type = strong_ordering; }; template<typename... _Ts> using common_comparison_category_t = typename common_comparison_category<_Ts...>::type; namespace __detail { template<typename _Tp, typename _Cat> concept __compares_as = same_as<common_comparison_category_t<_Tp, _Cat>, _Cat>; } template<typename _Tp, typename _Cat = partial_ordering> concept three_way_comparable = __detail::__weakly_eq_cmp_with<_Tp, _Tp> && __detail::__partially_ordered_with<_Tp, _Tp> && requires(const remove_reference_t<_Tp>& __a, const remove_reference_t<_Tp>& __b) { { __a <=> __b } -> __detail::__compares_as<_Cat>; }; template<typename _Tp, typename _Up, typename _Cat = partial_ordering> concept three_way_comparable_with = three_way_comparable<_Tp, _Cat> && three_way_comparable<_Up, _Cat> && common_reference_with<const remove_reference_t<_Tp>&, const remove_reference_t<_Up>&> && three_way_comparable< common_reference_t<const remove_reference_t<_Tp>&, const remove_reference_t<_Up>&>, _Cat> && __detail::__weakly_eq_cmp_with<_Tp, _Up> && __detail::__partially_ordered_with<_Tp, _Up> && requires(const remove_reference_t<_Tp>& __t, const remove_reference_t<_Up>& __u) { { __t <=> __u } -> __detail::__compares_as<_Cat>; { __u <=> __t } -> __detail::__compares_as<_Cat>; }; namespace __detail { template<typename _Tp, typename _Up> using __cmp3way_res_t = decltype(std::declval<_Tp>() <=> std::declval<_Up>()); template<typename _Tp, typename _Up> struct __cmp3way_res_impl { }; template<typename _Tp, typename _Up> requires requires { typename __cmp3way_res_t<__cref<_Tp>, __cref<_Up>>; } struct __cmp3way_res_impl<_Tp, _Up> { using type = __cmp3way_res_t<__cref<_Tp>, __cref<_Up>>; }; } template<typename _Tp, typename _Up = _Tp> struct compare_three_way_result : __detail::__cmp3way_res_impl<_Tp, _Up> { }; template<typename _Tp, typename _Up = _Tp> using compare_three_way_result_t = typename __detail::__cmp3way_res_impl<_Tp, _Up>::type; namespace __detail { template<typename _Tp, typename _Up> concept __3way_builtin_ptr_cmp = requires(_Tp&& __t, _Up&& __u) { static_cast<_Tp&&>(__t) <=> static_cast<_Up&&>(__u); } && convertible_to<_Tp, const volatile void*> && convertible_to<_Up, const volatile void*> && ! requires(_Tp&& __t, _Up&& __u) { operator<=>(static_cast<_Tp&&>(__t), static_cast<_Up&&>(__u)); } && ! requires(_Tp&& __t, _Up&& __u) { static_cast<_Tp&&>(__t).operator<=>(static_cast<_Up&&>(__u)); }; } struct compare_three_way { template<typename _Tp, typename _Up> requires three_way_comparable_with<_Tp, _Up> constexpr auto operator() [[nodiscard]] (_Tp&& __t, _Up&& __u) const noexcept(noexcept(std::declval<_Tp>() <=> std::declval<_Up>())) ; using is_transparent = void; }; namespace __cmp_cust { template<floating_point _Tp> constexpr weak_ordering __fp_weak_ordering(_Tp __e, _Tp __f) ; template<typename _Tp, typename _Up> concept __adl_strong = requires(_Tp&& __t, _Up&& __u) { strong_ordering(strong_order(static_cast<_Tp&&>(__t), static_cast<_Up&&>(__u))); }; template<typename _Tp, typename _Up> concept __adl_weak = requires(_Tp&& __t, _Up&& __u) { weak_ordering(weak_order(static_cast<_Tp&&>(__t), static_cast<_Up&&>(__u))); }; template<typename _Tp, typename _Up> concept __adl_partial = requires(_Tp&& __t, _Up&& __u) { partial_ordering(partial_order(static_cast<_Tp&&>(__t), static_cast<_Up&&>(__u))); }; template<typename _Ord, typename _Tp, typename _Up> concept __cmp3way = requires(_Tp&& __t, _Up&& __u, compare_three_way __c) { _Ord(__c(static_cast<_Tp&&>(__t), static_cast<_Up&&>(__u))); }; template<typename _Tp, typename _Up> concept __strongly_ordered = __adl_strong<_Tp, _Up> || floating_point<remove_reference_t<_Tp>> || __cmp3way<strong_ordering, _Tp, _Up>; template<typename _Tp, typename _Up> concept __decayed_same_as = same_as<decay_t<_Tp>, decay_t<_Up>>; class _Strong_order { template<typename _Tp, typename _Up> static constexpr bool _S_noexcept() ; friend class _Weak_order; friend class _Strong_fallback; enum class _Fp_fmt { _Binary16, _Binary32, _Binary64, _Binary128, _X86_80bit, _M68k_80bit, _Dbldbl, _Bfloat16, }; template<typename _Tp> static consteval _Fp_fmt _S_fp_fmt() noexcept ; using int64_t = long int; using int32_t = int; using int16_t = short; using uint64_t = long unsigned int; using uint16_t = unsigned short; template<typename _Tp> struct _Int { uint64_t _M_lo; _Tp _M_hi; constexpr explicit _Int(_Tp __hi, uint64_t __lo) ; constexpr explicit _Int(uint64_t __lo) ; constexpr bool operator==(const _Int&) const = default; constexpr _Int& operator^=(const _Int& __rhs) noexcept ; constexpr strong_ordering operator<=>(const _Int& __rhs) const noexcept ; }; template<typename _Tp> static constexpr _Tp _S_compl(_Tp __t) noexcept ; template<typename _Tp> static constexpr _Int<_Tp> _S_compl(_Int<_Tp> __t) noexcept ; template<typename _Tp> constexpr static auto _S_fp_bits(_Tp __val) noexcept ; template<typename _Tp> static constexpr strong_ordering _S_fp_cmp(_Tp __x, _Tp __y) noexcept ; public: template<typename _Tp, __decayed_same_as<_Tp> _Up> requires __strongly_ordered<_Tp, _Up> constexpr strong_ordering operator() [[nodiscard]] (_Tp&& __e, _Up&& __f) const noexcept(_S_noexcept<_Tp, _Up>()) ; }; template<typename _Tp, typename _Up> concept __weakly_ordered = floating_point<remove_reference_t<_Tp>> || __adl_weak<_Tp, _Up> || __cmp3way<weak_ordering, _Tp, _Up> || __strongly_ordered<_Tp, _Up>; class _Weak_order { template<typename _Tp, typename _Up> static constexpr bool _S_noexcept() ; friend class _Partial_order; friend class _Weak_fallback; public: template<typename _Tp, __decayed_same_as<_Tp> _Up> requires __weakly_ordered<_Tp, _Up> constexpr weak_ordering operator() [[nodiscard]] (_Tp&& __e, _Up&& __f) const noexcept(_S_noexcept<_Tp, _Up>()) ; }; template<typename _Tp, typename _Up> concept __partially_ordered = __adl_partial<_Tp, _Up> || __cmp3way<partial_ordering, _Tp, _Up> || __weakly_ordered<_Tp, _Up>; class _Partial_order { template<typename _Tp, typename _Up> static constexpr bool _S_noexcept() ; friend class _Partial_fallback; public: template<typename _Tp, __decayed_same_as<_Tp> _Up> requires __partially_ordered<_Tp, _Up> constexpr partial_ordering operator() [[nodiscard]] (_Tp&& __e, _Up&& __f) const noexcept(_S_noexcept<_Tp, _Up>()) ; }; template<typename _Tp, typename _Up> concept __op_eq_lt = requires(_Tp&& __t, _Up&& __u) { { static_cast<_Tp&&>(__t) == static_cast<_Up&&>(__u) } -> convertible_to<bool>; { static_cast<_Tp&&>(__t) < static_cast<_Up&&>(__u) } -> convertible_to<bool>; }; class _Strong_fallback { template<typename _Tp, typename _Up> static constexpr bool _S_noexcept() ; public: template<typename _Tp, __decayed_same_as<_Tp> _Up> requires __strongly_ordered<_Tp, _Up> || __op_eq_lt<_Tp, _Up> constexpr strong_ordering operator() [[nodiscard]] (_Tp&& __e, _Up&& __f) const noexcept(_S_noexcept<_Tp, _Up>()) ; }; class _Weak_fallback { template<typename _Tp, typename _Up> static constexpr bool _S_noexcept() ; public: template<typename _Tp, __decayed_same_as<_Tp> _Up> requires __weakly_ordered<_Tp, _Up> || __op_eq_lt<_Tp, _Up> constexpr weak_ordering operator() [[nodiscard]] (_Tp&& __e, _Up&& __f) const noexcept(_S_noexcept<_Tp, _Up>()) ; }; template<typename _Tp, typename _Up> concept __op_eq_lt_lt = __op_eq_lt<_Tp, _Up> && requires(_Tp&& __t, _Up&& __u) { { static_cast<_Up&&>(__u) < static_cast<_Tp&&>(__t) } -> convertible_to<bool>; }; class _Partial_fallback { template<typename _Tp, typename _Up> static constexpr bool _S_noexcept() ; public: template<typename _Tp, __decayed_same_as<_Tp> _Up> requires __partially_ordered<_Tp, _Up> || __op_eq_lt_lt<_Tp, _Up> constexpr partial_ordering operator() [[nodiscard]] (_Tp&& __e, _Up&& __f) const noexcept(_S_noexcept<_Tp, _Up>()) ; }; } inline namespace __cmp_alg { inline constexpr __cmp_cust::_Strong_order strong_order{}; inline constexpr __cmp_cust::_Weak_order weak_order{}; inline constexpr __cmp_cust::_Partial_order partial_order{}; inline constexpr __cmp_cust::_Strong_fallback compare_strong_order_fallback{}; inline constexpr __cmp_cust::_Weak_fallback compare_weak_order_fallback{}; inline constexpr __cmp_cust::_Partial_fallback compare_partial_order_fallback{}; } namespace __detail { inline constexpr struct _Synth3way { template<typename _Tp, typename _Up> static constexpr bool _S_noexcept(const _Tp* __t = nullptr, const _Up* __u = nullptr) ; template<typename _Tp, typename _Up> [[nodiscard]] constexpr auto operator()(const _Tp& __t, const _Up& __u) const noexcept(_S_noexcept<_Tp, _Up>()) requires requires { { __t < __u } -> __boolean_testable; { __u < __t } -> __boolean_testable; } ; } __synth3way = {}; template<typename _Tp, typename _Up = _Tp> using __synth3way_t = decltype(__detail::__synth3way(std::declval<_Tp&>(), std::declval<_Up&>())); } } namespace std __attribute__ ((__visibility__ ("default"))) { struct piecewise_construct_t { explicit piecewise_construct_t() = default; }; inline constexpr piecewise_construct_t piecewise_construct = piecewise_construct_t(); template<typename...> class tuple; template<size_t...> struct _Index_tuple; template<typename _U1, typename _U2> class __pair_base { }; template<typename _T1, typename _T2> struct pair : public __pair_base<_T1, _T2> { typedef _T1 first_type; typedef _T2 second_type; _T1 first; _T2 second; constexpr pair(const pair&) = default; constexpr pair(pair&&) = default; template<typename... _Args1, typename... _Args2> constexpr pair(piecewise_construct_t, tuple<_Args1...>, tuple<_Args2...>); constexpr void swap(pair& __p) noexcept(__and_<__is_nothrow_swappable<_T1>, __is_nothrow_swappable<_T2>>::value) ; private: template<typename... _Args1, size_t... _Indexes1, typename... _Args2, size_t... _Indexes2> constexpr pair(tuple<_Args1...>&, tuple<_Args2...>&, _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>); public: constexpr explicit(__not_<__and_<__is_implicitly_default_constructible<_T1>, __is_implicitly_default_constructible<_T2>>>()) pair() requires is_default_constructible_v<_T1> && is_default_constructible_v<_T2> : first(), second() { } private: template<typename _U1, typename _U2> static constexpr bool _S_constructible() { if constexpr (is_constructible_v<_T1, _U1>) return is_constructible_v<_T2, _U2>; return false; } template<typename _U1, typename _U2> static constexpr bool _S_nothrow_constructible() { if constexpr (is_nothrow_constructible_v<_T1, _U1>) return is_nothrow_constructible_v<_T2, _U2>; return false; } template<typename _U1, typename _U2> static constexpr bool _S_convertible() { if constexpr (is_convertible_v<_U1, _T1>) return is_convertible_v<_U2, _T2>; return false; } template<typename _U1, typename _U2> static constexpr bool _S_dangles() { return false; } public: constexpr explicit(!_S_convertible<const _T1&, const _T2&>()) pair(const _T1& __x, const _T2& __y) noexcept(_S_nothrow_constructible<const _T1&, const _T2&>()) requires (_S_constructible<const _T1&, const _T2&>()) : first(__x), second(__y) { } template<typename _U1, typename _U2> requires (_S_constructible<_U1, _U2>()) && (!_S_dangles<_U1, _U2>()) constexpr explicit(!_S_convertible<_U1, _U2>()) pair(_U1&& __x, _U2&& __y) noexcept(_S_nothrow_constructible<_U1, _U2>()) ; template<typename _U1, typename _U2> requires (_S_constructible<_U1, _U2>()) && (_S_dangles<_U1, _U2>()) constexpr explicit(!_S_convertible<_U1, _U2>()) pair(_U1&&, _U2&&) = delete; template<typename _U1, typename _U2> requires (_S_constructible<const _U1&, const _U2&>()) && (!_S_dangles<_U1, _U2>()) constexpr explicit(!_S_convertible<const _U1&, const _U2&>()) pair(const pair<_U1, _U2>& __p) noexcept(_S_nothrow_constructible<const _U1&, const _U2&>()) ; template<typename _U1, typename _U2> requires (_S_constructible<const _U1&, const _U2&>()) && (_S_dangles<const _U1&, const _U2&>()) constexpr explicit(!_S_convertible<const _U1&, const _U2&>()) pair(const pair<_U1, _U2>&) = delete; template<typename _U1, typename _U2> requires (_S_constructible<_U1, _U2>()) && (!_S_dangles<_U1, _U2>()) constexpr explicit(!_S_convertible<_U1, _U2>()) pair(pair<_U1, _U2>&& __p) noexcept(_S_nothrow_constructible<_U1, _U2>()) : first(std::forward<_U1>(__p.first)), second(std::forward<_U2>(__p.second)) { } template<typename _U1, typename _U2> requires (_S_constructible<_U1, _U2>()) && (_S_dangles<_U1, _U2>()) constexpr explicit(!_S_convertible<_U1, _U2>()) pair(pair<_U1, _U2>&&) = delete; private: template<typename _U1, typename _U2> static constexpr bool _S_assignable() { if constexpr (is_assignable_v<_T1&, _U1>) return is_assignable_v<_T2&, _U2>; return false; } template<typename _U1, typename _U2> static constexpr bool _S_nothrow_assignable() ; public: pair& operator=(const pair&) = delete; constexpr pair& operator=(const pair& __p) noexcept(_S_nothrow_assignable<const _T1&, const _T2&>()) requires (_S_assignable<const _T1&, const _T2&>()) ; constexpr pair& operator=(pair&& __p) noexcept(_S_nothrow_assignable<_T1, _T2>()) requires (_S_assignable<_T1, _T2>()) ; template<typename _U1, typename _U2> constexpr pair& operator=(const pair<_U1, _U2>& __p) noexcept(_S_nothrow_assignable<const _U1&, const _U2&>()) requires (_S_assignable<const _U1&, const _U2&>()) ; template<typename _U1, typename _U2> constexpr pair& operator=(pair<_U1, _U2>&& __p) noexcept(_S_nothrow_assignable<_U1, _U2>()) requires (_S_assignable<_U1, _U2>()) ; }; template<typename _T1, typename _T2> pair(_T1, _T2) -> pair<_T1, _T2>; template<typename _T1, typename _T2> constexpr bool operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) ; template<typename _T1, typename _T2> constexpr common_comparison_category_t<__detail::__synth3way_t<_T1>, __detail::__synth3way_t<_T2>> operator<=>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) ; template<typename _T1, typename _T2> constexpr typename enable_if<__and_<__is_swappable<_T1>, __is_swappable<_T2>>::value>::type swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y) noexcept(noexcept(__x.swap(__y))) ; 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; 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) ; template<typename _T1, typename _T2> struct __is_tuple_like_impl<pair<_T1, _T2>> : true_type { }; template<class _Tp1, class _Tp2> struct tuple_size<pair<_Tp1, _Tp2>> : public integral_constant<size_t, 2> { }; template<class _Tp1, class _Tp2> struct tuple_element<0, pair<_Tp1, _Tp2>> { typedef _Tp1 type; }; template<class _Tp1, class _Tp2> struct tuple_element<1, pair<_Tp1, _Tp2>> { typedef _Tp2 type; }; template<typename _Tp1, typename _Tp2> inline constexpr size_t tuple_size_v<pair<_Tp1, _Tp2>> = 2; template<typename _Tp1, typename _Tp2> inline constexpr size_t tuple_size_v<const pair<_Tp1, _Tp2>> = 2; template<typename _Tp> inline constexpr bool __is_pair = false; template<typename _Tp, typename _Up> inline constexpr bool __is_pair<pair<_Tp, _Up>> = true; template<size_t _Int> struct __pair_get; template<> struct __pair_get<0> { template<typename _Tp1, typename _Tp2> static constexpr _Tp1& __get(pair<_Tp1, _Tp2>& __pair) noexcept ; template<typename _Tp1, typename _Tp2> static constexpr _Tp1&& __move_get(pair<_Tp1, _Tp2>&& __pair) noexcept ; template<typename _Tp1, typename _Tp2> static constexpr const _Tp1& __const_get(const pair<_Tp1, _Tp2>& __pair) noexcept ; template<typename _Tp1, typename _Tp2> static constexpr const _Tp1&& __const_move_get(const pair<_Tp1, _Tp2>&& __pair) noexcept ; }; template<> struct __pair_get<1> { template<typename _Tp1, typename _Tp2> static constexpr _Tp2& __get(pair<_Tp1, _Tp2>& __pair) noexcept ; template<typename _Tp1, typename _Tp2> static constexpr _Tp2&& __move_get(pair<_Tp1, _Tp2>&& __pair) noexcept ; template<typename _Tp1, typename _Tp2> static constexpr const _Tp2& __const_get(const pair<_Tp1, _Tp2>& __pair) noexcept ; template<typename _Tp1, typename _Tp2> static constexpr const _Tp2&& __const_move_get(const pair<_Tp1, _Tp2>&& __pair) noexcept ; }; template<size_t _Int, class _Tp1, class _Tp2> constexpr typename tuple_element<_Int, pair<_Tp1, _Tp2>>::type& get(pair<_Tp1, _Tp2>& __in) noexcept ; template<size_t _Int, class _Tp1, class _Tp2> constexpr typename tuple_element<_Int, pair<_Tp1, _Tp2>>::type&& get(pair<_Tp1, _Tp2>&& __in) noexcept ; template<size_t _Int, class _Tp1, class _Tp2> constexpr const typename tuple_element<_Int, pair<_Tp1, _Tp2>>::type& get(const pair<_Tp1, _Tp2>& __in) noexcept ; template<size_t _Int, class _Tp1, class _Tp2> constexpr const typename tuple_element<_Int, pair<_Tp1, _Tp2>>::type&& get(const pair<_Tp1, _Tp2>&& __in) noexcept ; template <typename _Tp, typename _Up> constexpr _Tp& get(pair<_Tp, _Up>& __p) noexcept ; template <typename _Tp, typename _Up> constexpr const _Tp& get(const pair<_Tp, _Up>& __p) noexcept ; template <typename _Tp, typename _Up> constexpr _Tp&& get(pair<_Tp, _Up>&& __p) noexcept ; template <typename _Tp, typename _Up> constexpr const _Tp&& get(const pair<_Tp, _Up>&& __p) noexcept ; template <typename _Tp, typename _Up> constexpr _Tp& get(pair<_Up, _Tp>& __p) noexcept ; template <typename _Tp, typename _Up> constexpr const _Tp& get(const pair<_Up, _Tp>& __p) noexcept ; template <typename _Tp, typename _Up> constexpr _Tp&& get(pair<_Up, _Tp>&& __p) noexcept ; template <typename _Tp, typename _Up> constexpr const _Tp&& get(const pair<_Up, _Tp>&& __p) noexcept ; } namespace __gnu_debug { struct _Safe_iterator_base; } namespace std __attribute__ ((__visibility__ ("default"))) { class __undefined; template<typename _Tp> struct __get_first_arg { using type = __undefined; }; template<template<typename, typename...> class _SomeTemplate, typename _Tp, typename... _Types> struct __get_first_arg<_SomeTemplate<_Tp, _Types...>> { using type = _Tp; }; template<typename _Tp, typename _Up> struct __replace_first_arg { }; template<template<typename, typename...> class _SomeTemplate, typename _Up, typename _Tp, typename... _Types> struct __replace_first_arg<_SomeTemplate<_Tp, _Types...>, _Up> { using type = _SomeTemplate<_Up, _Types...>; }; template<typename _Ptr, typename = void> struct __ptr_traits_elem : __get_first_arg<_Ptr> { }; template<typename _Ptr> requires requires { typename _Ptr::element_type; } struct __ptr_traits_elem<_Ptr, void> { using type = typename _Ptr::element_type; }; template<typename _Ptr> using __ptr_traits_elem_t = typename __ptr_traits_elem<_Ptr>::type; template<typename _Ptr, typename _Elt, bool = is_void<_Elt>::value> struct __ptr_traits_ptr_to { using pointer = _Ptr; using element_type = _Elt; static pointer pointer_to(element_type& __r) requires requires { { pointer::pointer_to(__r) } -> convertible_to<pointer>; } ; }; template<typename _Ptr, typename _Elt> struct __ptr_traits_ptr_to<_Ptr, _Elt, true> { }; template<typename _Tp> struct __ptr_traits_ptr_to<_Tp*, _Tp, false> { using pointer = _Tp*; using element_type = _Tp; static constexpr pointer pointer_to(element_type& __r) noexcept ; }; template<typename _Ptr, typename _Elt> struct __ptr_traits_impl : __ptr_traits_ptr_to<_Ptr, _Elt> { private: template<typename _Tp> using __diff_t = typename _Tp::difference_type; template<typename _Tp, typename _Up> using __rebind = __type_identity<typename _Tp::template rebind<_Up>>; public: using pointer = _Ptr; using element_type = _Elt; using difference_type = __detected_or_t<ptrdiff_t, __diff_t, _Ptr>; template<typename _Up> using rebind = typename __detected_or_t<__replace_first_arg<_Ptr, _Up>, __rebind, _Ptr, _Up>::type; }; template<typename _Ptr> struct __ptr_traits_impl<_Ptr, __undefined> { }; template<typename _Ptr> struct pointer_traits : __ptr_traits_impl<_Ptr, __ptr_traits_elem_t<_Ptr>> { }; template<typename _Tp> struct pointer_traits<_Tp*> : __ptr_traits_ptr_to<_Tp*, _Tp> { typedef _Tp* pointer; typedef _Tp element_type; typedef ptrdiff_t difference_type; template<typename _Up> using rebind = _Up*; }; 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 ; template<typename _Ptr> constexpr auto __to_address(const _Ptr& __ptr) noexcept -> decltype(std::pointer_traits<_Ptr>::to_address(__ptr)) ; template<typename _Ptr, typename... _None> constexpr auto __to_address(const _Ptr& __ptr, _None...) noexcept ; template<typename _Tp> constexpr _Tp* to_address(_Tp* __ptr) noexcept ; template<typename _Ptr> constexpr auto to_address(const _Ptr& __ptr) noexcept ; } namespace std __attribute__ ((__visibility__ ("default"))) { struct __is_transparent; struct identity { template<typename _Tp> [[nodiscard]] constexpr _Tp&& operator()(_Tp&& __t) const noexcept ; using is_transparent = __is_transparent; }; namespace ranges { namespace __detail { template<typename _Tp, typename _Up> concept __less_builtin_ptr_cmp = requires (_Tp&& __t, _Up&& __u) { { __t < __u } -> same_as<bool>; } && convertible_to<_Tp, const volatile void*> && convertible_to<_Up, const volatile void*> && (! requires(_Tp&& __t, _Up&& __u) { operator<(std::forward<_Tp>(__t), std::forward<_Up>(__u)); } && ! requires(_Tp&& __t, _Up&& __u) { std::forward<_Tp>(__t).operator<(std::forward<_Up>(__u)); }); } struct equal_to { template<typename _Tp, typename _Up> requires equality_comparable_with<_Tp, _Up> constexpr bool operator()(_Tp&& __t, _Up&& __u) const noexcept(noexcept(std::declval<_Tp>() == std::declval<_Up>())) ; using is_transparent = __is_transparent; }; struct not_equal_to { template<typename _Tp, typename _Up> requires equality_comparable_with<_Tp, _Up> constexpr bool operator()(_Tp&& __t, _Up&& __u) const noexcept(noexcept(std::declval<_Up>() == std::declval<_Tp>())) ; using is_transparent = __is_transparent; }; struct less { template<typename _Tp, typename _Up> requires totally_ordered_with<_Tp, _Up> constexpr bool operator()(_Tp&& __t, _Up&& __u) const noexcept(noexcept(std::declval<_Tp>() < std::declval<_Up>())) ; using is_transparent = __is_transparent; }; struct greater { template<typename _Tp, typename _Up> requires totally_ordered_with<_Tp, _Up> constexpr bool operator()(_Tp&& __t, _Up&& __u) const noexcept(noexcept(std::declval<_Up>() < std::declval<_Tp>())) ; using is_transparent = __is_transparent; }; struct greater_equal { template<typename _Tp, typename _Up> requires totally_ordered_with<_Tp, _Up> constexpr bool operator()(_Tp&& __t, _Up&& __u) const noexcept(noexcept(std::declval<_Tp>() < std::declval<_Up>())) ; using is_transparent = __is_transparent; }; struct less_equal { template<typename _Tp, typename _Up> requires totally_ordered_with<_Tp, _Up> constexpr bool operator()(_Tp&& __t, _Up&& __u) const noexcept(noexcept(std::declval<_Up>() < std::declval<_Tp>())) ; using is_transparent = __is_transparent; }; } } namespace std __attribute__ ((__visibility__ ("default"))) { struct default_sentinel_t { }; inline constexpr default_sentinel_t default_sentinel{}; struct input_iterator_tag; struct output_iterator_tag; struct forward_iterator_tag; struct bidirectional_iterator_tag; struct random_access_iterator_tag; struct contiguous_iterator_tag; template<typename _Iterator> struct iterator_traits; template<typename _Tp> requires is_object_v<_Tp> struct iterator_traits<_Tp*>; template<typename _Iterator, typename> struct __iterator_traits; namespace __detail { template<typename _Tp> using __with_ref = _Tp&; template<typename _Tp> concept __can_reference = requires { typename __with_ref<_Tp>; }; template<typename _Tp> concept __dereferenceable = requires(_Tp& __t) { { *__t } -> __can_reference; }; } template<__detail::__dereferenceable _Tp> using iter_reference_t = decltype(*std::declval<_Tp&>()); namespace ranges { namespace __cust_imove { void iter_move(); template<typename _Tp> concept __adl_imove = (std::__detail::__class_or_enum<remove_reference_t<_Tp>>) && requires(_Tp&& __t) { iter_move(static_cast<_Tp&&>(__t)); }; struct _IMove { private: template<typename _Tp> struct __result { using type = iter_reference_t<_Tp>; }; template<typename _Tp> requires __adl_imove<_Tp> struct __result<_Tp> { using type = decltype(iter_move(std::declval<_Tp>())); }; template<typename _Tp> requires (!__adl_imove<_Tp>) && is_lvalue_reference_v<iter_reference_t<_Tp>> struct __result<_Tp> { using type = remove_reference_t<iter_reference_t<_Tp>>&&; }; template<typename _Tp> static constexpr bool _S_noexcept() ; public: template<std::__detail::__dereferenceable _Tp> using __type = typename __result<_Tp>::type; template<std::__detail::__dereferenceable _Tp> [[nodiscard]] constexpr __type<_Tp> operator()(_Tp&& __e) const noexcept(_S_noexcept<_Tp>()) ; }; } inline namespace __cust { inline constexpr __cust_imove::_IMove iter_move{}; } } template<__detail::__dereferenceable _Tp> requires __detail:: __can_reference<ranges::__cust_imove::_IMove::__type<_Tp&>> using iter_rvalue_reference_t = ranges::__cust_imove::_IMove::__type<_Tp&>; template<typename> struct incrementable_traits { }; template<typename _Tp> requires is_object_v<_Tp> struct incrementable_traits<_Tp*> { using difference_type = ptrdiff_t; }; template<typename _Iter> struct incrementable_traits<const _Iter> : incrementable_traits<_Iter> { }; template<typename _Tp> requires requires { typename _Tp::difference_type; } struct incrementable_traits<_Tp> { using difference_type = typename _Tp::difference_type; }; template<typename _Tp> requires (!requires { typename _Tp::difference_type; } && requires(const _Tp& __a, const _Tp& __b) { { __a - __b } -> integral; }) struct incrementable_traits<_Tp> { using difference_type = make_signed_t<decltype(std::declval<_Tp>() - std::declval<_Tp>())>; }; template<> struct incrementable_traits<__int128> { using difference_type = __int128; }; template<> struct incrementable_traits<unsigned __int128> { using difference_type = __int128; }; namespace __detail { template<typename _Iter> concept __primary_traits_iter = __is_base_of(__iterator_traits<_Iter, void>, iterator_traits<_Iter>); template<typename _Iter, typename _Tp> struct __iter_traits_impl { using type = iterator_traits<_Iter>; }; template<typename _Iter, typename _Tp> requires __primary_traits_iter<_Iter> struct __iter_traits_impl<_Iter, _Tp> { using type = _Tp; }; template<typename _Iter, typename _Tp = _Iter> using __iter_traits = typename __iter_traits_impl<_Iter, _Tp>::type; template<typename _Tp> using __iter_diff_t = typename __iter_traits<_Tp, incrementable_traits<_Tp>>::difference_type; } template<typename _Tp> using iter_difference_t = __detail::__iter_diff_t<remove_cvref_t<_Tp>>; namespace __detail { template<typename> struct __cond_value_type { }; template<typename _Tp> requires is_object_v<_Tp> struct __cond_value_type<_Tp> { using value_type = remove_cv_t<_Tp>; }; template<typename _Tp> concept __has_member_value_type = requires { typename _Tp::value_type; }; template<typename _Tp> concept __has_member_element_type = requires { typename _Tp::element_type; }; } template<typename> struct indirectly_readable_traits { }; template<typename _Tp> struct indirectly_readable_traits<_Tp*> : __detail::__cond_value_type<_Tp> { }; template<typename _Iter> requires is_array_v<_Iter> struct indirectly_readable_traits<_Iter> { using value_type = remove_cv_t<remove_extent_t<_Iter>>; }; template<typename _Iter> struct indirectly_readable_traits<const _Iter> : indirectly_readable_traits<_Iter> { }; template<__detail::__has_member_value_type _Tp> struct indirectly_readable_traits<_Tp> : __detail::__cond_value_type<typename _Tp::value_type> { }; template<__detail::__has_member_element_type _Tp> struct indirectly_readable_traits<_Tp> : __detail::__cond_value_type<typename _Tp::element_type> { }; template<__detail::__has_member_value_type _Tp> requires __detail::__has_member_element_type<_Tp> && same_as<remove_cv_t<typename _Tp::element_type>, remove_cv_t<typename _Tp::value_type>> struct indirectly_readable_traits<_Tp> : __detail::__cond_value_type<typename _Tp::value_type> { }; template<__detail::__has_member_value_type _Tp> requires __detail::__has_member_element_type<_Tp> struct indirectly_readable_traits<_Tp> { }; namespace __detail { template<typename _Tp> using __iter_value_t = typename __iter_traits<_Tp, indirectly_readable_traits<_Tp>>::value_type; } template<typename _Tp> using iter_value_t = __detail::__iter_value_t<remove_cvref_t<_Tp>>; namespace __detail { template<typename _Iter> concept __cpp17_iterator = requires(_Iter __it) { { *__it } -> __can_reference; { ++__it } -> same_as<_Iter&>; { *__it++ } -> __can_reference; } && copyable<_Iter>; template<typename _Iter> concept __cpp17_input_iterator = __cpp17_iterator<_Iter> && equality_comparable<_Iter> && requires(_Iter __it) { typename incrementable_traits<_Iter>::difference_type; typename indirectly_readable_traits<_Iter>::value_type; typename common_reference_t<iter_reference_t<_Iter>&&, typename indirectly_readable_traits<_Iter>::value_type&>; typename common_reference_t<decltype(*__it++)&&, typename indirectly_readable_traits<_Iter>::value_type&>; requires signed_integral< typename incrementable_traits<_Iter>::difference_type>; }; template<typename _Iter> concept __cpp17_fwd_iterator = __cpp17_input_iterator<_Iter> && constructible_from<_Iter> && is_lvalue_reference_v<iter_reference_t<_Iter>> && same_as<remove_cvref_t<iter_reference_t<_Iter>>, typename indirectly_readable_traits<_Iter>::value_type> && requires(_Iter __it) { { __it++ } -> convertible_to<const _Iter&>; { *__it++ } -> same_as<iter_reference_t<_Iter>>; }; template<typename _Iter> concept __cpp17_bidi_iterator = __cpp17_fwd_iterator<_Iter> && requires(_Iter __it) { { --__it } -> same_as<_Iter&>; { __it-- } -> convertible_to<const _Iter&>; { *__it-- } -> same_as<iter_reference_t<_Iter>>; }; template<typename _Iter> concept __cpp17_randacc_iterator = __cpp17_bidi_iterator<_Iter> && totally_ordered<_Iter> && requires(_Iter __it, typename incrementable_traits<_Iter>::difference_type __n) { { __it += __n } -> same_as<_Iter&>; { __it -= __n } -> same_as<_Iter&>; { __it + __n } -> same_as<_Iter>; { __n + __it } -> same_as<_Iter>; { __it - __n } -> same_as<_Iter>; { __it - __it } -> same_as<decltype(__n)>; { __it[__n] } -> convertible_to<iter_reference_t<_Iter>>; }; template<typename _Iter> concept __iter_with_nested_types = requires { typename _Iter::iterator_category; typename _Iter::value_type; typename _Iter::difference_type; typename _Iter::reference; }; template<typename _Iter> concept __iter_without_nested_types = !__iter_with_nested_types<_Iter>; template<typename _Iter> concept __iter_without_category = !requires { typename _Iter::iterator_category; }; } template<typename _Iterator> requires __detail::__iter_with_nested_types<_Iterator> struct __iterator_traits<_Iterator, void> { private: template<typename _Iter> struct __ptr { using type = void; }; template<typename _Iter> requires requires { typename _Iter::pointer; } struct __ptr<_Iter> { using type = typename _Iter::pointer; }; public: using iterator_category = typename _Iterator::iterator_category; using value_type = typename _Iterator::value_type; using difference_type = typename _Iterator::difference_type; using pointer = typename __ptr<_Iterator>::type; using reference = typename _Iterator::reference; }; template<typename _Iterator> requires __detail::__iter_without_nested_types<_Iterator> && __detail::__cpp17_input_iterator<_Iterator> struct __iterator_traits<_Iterator, void> { private: template<typename _Iter> struct __cat { using type = input_iterator_tag; }; template<typename _Iter> requires requires { typename _Iter::iterator_category; } struct __cat<_Iter> { using type = typename _Iter::iterator_category; }; template<typename _Iter> requires __detail::__iter_without_category<_Iter> && __detail::__cpp17_randacc_iterator<_Iter> struct __cat<_Iter> { using type = random_access_iterator_tag; }; template<typename _Iter> requires __detail::__iter_without_category<_Iter> && __detail::__cpp17_bidi_iterator<_Iter> struct __cat<_Iter> { using type = bidirectional_iterator_tag; }; template<typename _Iter> requires __detail::__iter_without_category<_Iter> && __detail::__cpp17_fwd_iterator<_Iter> struct __cat<_Iter> { using type = forward_iterator_tag; }; template<typename _Iter> struct __ptr { using type = void; }; template<typename _Iter> requires requires { typename _Iter::pointer; } struct __ptr<_Iter> { using type = typename _Iter::pointer; }; template<typename _Iter> requires (!requires { typename _Iter::pointer; } && requires(_Iter& __it) { __it.operator->(); }) struct __ptr<_Iter> { using type = decltype(std::declval<_Iter&>().operator->()); }; template<typename _Iter> struct __ref { using type = iter_reference_t<_Iter>; }; template<typename _Iter> requires requires { typename _Iter::reference; } struct __ref<_Iter> { using type = typename _Iter::reference; }; public: using iterator_category = typename __cat<_Iterator>::type; using value_type = typename indirectly_readable_traits<_Iterator>::value_type; using difference_type = typename incrementable_traits<_Iterator>::difference_type; using pointer = typename __ptr<_Iterator>::type; using reference = typename __ref<_Iterator>::type; }; template<typename _Iterator> requires __detail::__iter_without_nested_types<_Iterator> && __detail::__cpp17_iterator<_Iterator> struct __iterator_traits<_Iterator, void> { private: template<typename _Iter> struct __diff { using type = void; }; template<typename _Iter> requires requires { typename incrementable_traits<_Iter>::difference_type; } struct __diff<_Iter> { using type = typename incrementable_traits<_Iter>::difference_type; }; public: using iterator_category = output_iterator_tag; using value_type = void; using difference_type = typename __diff<_Iterator>::type; using pointer = void; using reference = void; }; namespace __detail { template<typename _Iter> struct __iter_concept_impl; template<typename _Iter> requires requires { typename __iter_traits<_Iter>::iterator_concept; } struct __iter_concept_impl<_Iter> { using type = typename __iter_traits<_Iter>::iterator_concept; }; template<typename _Iter> requires (!requires { typename __iter_traits<_Iter>::iterator_concept; } && requires { typename __iter_traits<_Iter>::iterator_category; }) struct __iter_concept_impl<_Iter> { using type = typename __iter_traits<_Iter>::iterator_category; }; template<typename _Iter> requires (!requires { typename __iter_traits<_Iter>::iterator_concept; } && !requires { typename __iter_traits<_Iter>::iterator_category; } && __primary_traits_iter<_Iter>) struct __iter_concept_impl<_Iter> { using type = random_access_iterator_tag; }; template<typename _Iter> struct __iter_concept_impl { }; template<typename _Iter> using __iter_concept = typename __iter_concept_impl<_Iter>::type; template<typename _In> concept __indirectly_readable_impl = requires { typename iter_value_t<_In>; typename iter_reference_t<_In>; typename iter_rvalue_reference_t<_In>; requires same_as<iter_reference_t<const _In>, iter_reference_t<_In>>; requires same_as<iter_rvalue_reference_t<const _In>, iter_rvalue_reference_t<_In>>; } && common_reference_with<iter_reference_t<_In>&&, iter_value_t<_In>&> && common_reference_with<iter_reference_t<_In>&&, iter_rvalue_reference_t<_In>&&> && common_reference_with<iter_rvalue_reference_t<_In>&&, const iter_value_t<_In>&>; } template<typename _In> concept indirectly_readable = __detail::__indirectly_readable_impl<remove_cvref_t<_In>>; template<indirectly_readable _Tp> using iter_common_reference_t = common_reference_t<iter_reference_t<_Tp>, iter_value_t<_Tp>&>; template<typename _Out, typename _Tp> concept indirectly_writable = requires(_Out&& __o, _Tp&& __t) { *__o = std::forward<_Tp>(__t); *std::forward<_Out>(__o) = std::forward<_Tp>(__t); const_cast<const iter_reference_t<_Out>&&>(*__o) = std::forward<_Tp>(__t); const_cast<const iter_reference_t<_Out>&&>(*std::forward<_Out>(__o)) = std::forward<_Tp>(__t); }; namespace ranges::__detail { class __max_diff_type; class __max_size_type; __extension__ template<typename _Tp> concept __is_signed_int128 = same_as<_Tp, __int128>; __extension__ template<typename _Tp> concept __is_unsigned_int128 = same_as<_Tp, unsigned __int128>; template<typename _Tp> concept __cv_bool = same_as<const volatile _Tp, const volatile bool>; template<typename _Tp> concept __integral_nonbool = integral<_Tp> && !__cv_bool<_Tp>; template<typename _Tp> concept __is_int128 = __is_signed_int128<_Tp> || __is_unsigned_int128<_Tp>; template<typename _Tp> concept __is_integer_like = __integral_nonbool<_Tp> || __is_int128<_Tp> || same_as<_Tp, __max_diff_type> || same_as<_Tp, __max_size_type>; template<typename _Tp> concept __is_signed_integer_like = signed_integral<_Tp> || __is_signed_int128<_Tp> || same_as<_Tp, __max_diff_type>; } namespace __detail { using ranges::__detail::__is_signed_integer_like; } template<typename _Iter> concept weakly_incrementable = movable<_Iter> && requires(_Iter __i) { typename iter_difference_t<_Iter>; requires __detail::__is_signed_integer_like<iter_difference_t<_Iter>>; { ++__i } -> same_as<_Iter&>; __i++; }; template<typename _Iter> concept incrementable = regular<_Iter> && weakly_incrementable<_Iter> && requires(_Iter __i) { { __i++ } -> same_as<_Iter>; }; template<typename _Iter> concept input_or_output_iterator = requires(_Iter __i) { { *__i } -> __detail::__can_reference; } && weakly_incrementable<_Iter>; template<typename _Sent, typename _Iter> concept sentinel_for = semiregular<_Sent> && input_or_output_iterator<_Iter> && __detail::__weakly_eq_cmp_with<_Sent, _Iter>; template<typename _Sent, typename _Iter> inline constexpr bool disable_sized_sentinel_for = false; template<typename _Sent, typename _Iter> concept sized_sentinel_for = sentinel_for<_Sent, _Iter> && !disable_sized_sentinel_for<remove_cv_t<_Sent>, remove_cv_t<_Iter>> && requires(const _Iter& __i, const _Sent& __s) { { __s - __i } -> same_as<iter_difference_t<_Iter>>; { __i - __s } -> same_as<iter_difference_t<_Iter>>; }; template<typename _Iter> concept input_iterator = input_or_output_iterator<_Iter> && indirectly_readable<_Iter> && requires { typename __detail::__iter_concept<_Iter>; } && derived_from<__detail::__iter_concept<_Iter>, input_iterator_tag>; template<typename _Iter, typename _Tp> concept output_iterator = input_or_output_iterator<_Iter> && indirectly_writable<_Iter, _Tp> && requires(_Iter __i, _Tp&& __t) { *__i++ = std::forward<_Tp>(__t); }; template<typename _Iter> concept forward_iterator = input_iterator<_Iter> && derived_from<__detail::__iter_concept<_Iter>, forward_iterator_tag> && incrementable<_Iter> && sentinel_for<_Iter, _Iter>; template<typename _Iter> concept bidirectional_iterator = forward_iterator<_Iter> && derived_from<__detail::__iter_concept<_Iter>, bidirectional_iterator_tag> && requires(_Iter __i) { { --__i } -> same_as<_Iter&>; { __i-- } -> same_as<_Iter>; }; template<typename _Iter> concept random_access_iterator = bidirectional_iterator<_Iter> && derived_from<__detail::__iter_concept<_Iter>, random_access_iterator_tag> && totally_ordered<_Iter> && sized_sentinel_for<_Iter, _Iter> && requires(_Iter __i, const _Iter __j, const iter_difference_t<_Iter> __n) { { __i += __n } -> same_as<_Iter&>; { __j + __n } -> same_as<_Iter>; { __n + __j } -> same_as<_Iter>; { __i -= __n } -> same_as<_Iter&>; { __j - __n } -> same_as<_Iter>; { __j[__n] } -> same_as<iter_reference_t<_Iter>>; }; template<typename _Iter> concept contiguous_iterator = random_access_iterator<_Iter> && derived_from<__detail::__iter_concept<_Iter>, contiguous_iterator_tag> && is_lvalue_reference_v<iter_reference_t<_Iter>> && same_as<iter_value_t<_Iter>, remove_cvref_t<iter_reference_t<_Iter>>> && requires(const _Iter& __i) { { std::to_address(__i) } -> same_as<add_pointer_t<iter_reference_t<_Iter>>>; }; template<typename _Fn, typename _Iter> concept indirectly_unary_invocable = indirectly_readable<_Iter> && copy_constructible<_Fn> && invocable<_Fn&, iter_value_t<_Iter>&> && invocable<_Fn&, iter_reference_t<_Iter>> && invocable<_Fn&, iter_common_reference_t<_Iter>> && common_reference_with<invoke_result_t<_Fn&, iter_value_t<_Iter>&>, invoke_result_t<_Fn&, iter_reference_t<_Iter>>>; template<typename _Fn, typename _Iter> concept indirectly_regular_unary_invocable = indirectly_readable<_Iter> && copy_constructible<_Fn> && regular_invocable<_Fn&, iter_value_t<_Iter>&> && regular_invocable<_Fn&, iter_reference_t<_Iter>> && regular_invocable<_Fn&, iter_common_reference_t<_Iter>> && common_reference_with<invoke_result_t<_Fn&, iter_value_t<_Iter>&>, invoke_result_t<_Fn&, iter_reference_t<_Iter>>>; template<typename _Fn, typename _Iter> concept indirect_unary_predicate = indirectly_readable<_Iter> && copy_constructible<_Fn> && predicate<_Fn&, iter_value_t<_Iter>&> && predicate<_Fn&, iter_reference_t<_Iter>> && predicate<_Fn&, iter_common_reference_t<_Iter>>; template<typename _Fn, typename _I1, typename _I2> concept indirect_binary_predicate = indirectly_readable<_I1> && indirectly_readable<_I2> && copy_constructible<_Fn> && predicate<_Fn&, iter_value_t<_I1>&, iter_value_t<_I2>&> && predicate<_Fn&, iter_value_t<_I1>&, iter_reference_t<_I2>> && predicate<_Fn&, iter_reference_t<_I1>, iter_value_t<_I2>&> && predicate<_Fn&, iter_reference_t<_I1>, iter_reference_t<_I2>> && predicate<_Fn&, iter_common_reference_t<_I1>, iter_common_reference_t<_I2>>; template<typename _Fn, typename _I1, typename _I2 = _I1> concept indirect_equivalence_relation = indirectly_readable<_I1> && indirectly_readable<_I2> && copy_constructible<_Fn> && equivalence_relation<_Fn&, iter_value_t<_I1>&, iter_value_t<_I2>&> && equivalence_relation<_Fn&, iter_value_t<_I1>&, iter_reference_t<_I2>> && equivalence_relation<_Fn&, iter_reference_t<_I1>, iter_value_t<_I2>&> && equivalence_relation<_Fn&, iter_reference_t<_I1>, iter_reference_t<_I2>> && equivalence_relation<_Fn&, iter_common_reference_t<_I1>, iter_common_reference_t<_I2>>; template<typename _Fn, typename _I1, typename _I2 = _I1> concept indirect_strict_weak_order = indirectly_readable<_I1> && indirectly_readable<_I2> && copy_constructible<_Fn> && strict_weak_order<_Fn&, iter_value_t<_I1>&, iter_value_t<_I2>&> && strict_weak_order<_Fn&, iter_value_t<_I1>&, iter_reference_t<_I2>> && strict_weak_order<_Fn&, iter_reference_t<_I1>, iter_value_t<_I2>&> && strict_weak_order<_Fn&, iter_reference_t<_I1>, iter_reference_t<_I2>> && strict_weak_order<_Fn&, iter_common_reference_t<_I1>, iter_common_reference_t<_I2>>; template<typename _Fn, typename... _Is> requires (indirectly_readable<_Is> && ...) && invocable<_Fn, iter_reference_t<_Is>...> using indirect_result_t = invoke_result_t<_Fn, iter_reference_t<_Is>...>; namespace __detail { template<typename _Iter, typename _Proj> struct __projected { struct __type { using value_type = remove_cvref_t<indirect_result_t<_Proj&, _Iter>>; indirect_result_t<_Proj&, _Iter> operator*() const; }; }; template<weakly_incrementable _Iter, typename _Proj> struct __projected<_Iter, _Proj> { struct __type { using value_type = remove_cvref_t<indirect_result_t<_Proj&, _Iter>>; using difference_type = iter_difference_t<_Iter>; indirect_result_t<_Proj&, _Iter> operator*() const; }; }; } template<indirectly_readable _Iter, indirectly_regular_unary_invocable<_Iter> _Proj> using projected = typename __detail::__projected<_Iter, _Proj>::__type; template<typename _In, typename _Out> concept indirectly_movable = indirectly_readable<_In> && indirectly_writable<_Out, iter_rvalue_reference_t<_In>>; template<typename _In, typename _Out> concept indirectly_movable_storable = indirectly_movable<_In, _Out> && indirectly_writable<_Out, iter_value_t<_In>> && movable<iter_value_t<_In>> && constructible_from<iter_value_t<_In>, iter_rvalue_reference_t<_In>> && assignable_from<iter_value_t<_In>&, iter_rvalue_reference_t<_In>>; template<typename _In, typename _Out> concept indirectly_copyable = indirectly_readable<_In> && indirectly_writable<_Out, iter_reference_t<_In>>; template<typename _In, typename _Out> concept indirectly_copyable_storable = indirectly_copyable<_In, _Out> && indirectly_writable<_Out, iter_value_t<_In>&> && indirectly_writable<_Out, const iter_value_t<_In>&> && indirectly_writable<_Out, iter_value_t<_In>&&> && indirectly_writable<_Out, const iter_value_t<_In>&&> && copyable<iter_value_t<_In>> && constructible_from<iter_value_t<_In>, iter_reference_t<_In>> && assignable_from<iter_value_t<_In>&, iter_reference_t<_In>>; namespace ranges { namespace __cust_iswap { template<typename _It1, typename _It2> void iter_swap(_It1, _It2) = delete; template<typename _Tp, typename _Up> concept __adl_iswap = (std::__detail::__class_or_enum<remove_reference_t<_Tp>> || std::__detail::__class_or_enum<remove_reference_t<_Up>>) && requires(_Tp&& __t, _Up&& __u) { iter_swap(static_cast<_Tp&&>(__t), static_cast<_Up&&>(__u)); }; template<typename _Xp, typename _Yp> constexpr iter_value_t<_Xp> __iter_exchange_move(_Xp&& __x, _Yp&& __y) noexcept(noexcept(iter_value_t<_Xp>(iter_move(__x))) && noexcept(*__x = iter_move(__y))) ; struct _IterSwap { private: template<typename _Tp, typename _Up> static constexpr bool _S_noexcept() ; public: template<typename _Tp, typename _Up> requires __adl_iswap<_Tp, _Up> || (indirectly_readable<remove_reference_t<_Tp>> && indirectly_readable<remove_reference_t<_Up>> && swappable_with<iter_reference_t<_Tp>, iter_reference_t<_Up>>) || (indirectly_movable_storable<_Tp, _Up> && indirectly_movable_storable<_Up, _Tp>) constexpr void operator()(_Tp&& __e1, _Up&& __e2) const noexcept(_S_noexcept<_Tp, _Up>()) ; }; } inline namespace __cust { inline constexpr __cust_iswap::_IterSwap iter_swap{}; } } template<typename _I1, typename _I2 = _I1> concept indirectly_swappable = indirectly_readable<_I1> && indirectly_readable<_I2> && requires(const _I1 __i1, const _I2 __i2) { ranges::iter_swap(__i1, __i1); ranges::iter_swap(__i2, __i2); ranges::iter_swap(__i1, __i2); ranges::iter_swap(__i2, __i1); }; template<typename _I1, typename _I2, typename _Rel, typename _P1 = identity, typename _P2 = identity> concept indirectly_comparable = indirect_binary_predicate<_Rel, projected<_I1, _P1>, projected<_I2, _P2>>; template<typename _Iter> concept permutable = forward_iterator<_Iter> && indirectly_movable_storable<_Iter, _Iter> && indirectly_swappable<_Iter, _Iter>; template<typename _I1, typename _I2, typename _Out, typename _Rel = ranges::less, typename _P1 = identity, typename _P2 = identity> concept mergeable = input_iterator<_I1> && input_iterator<_I2> && weakly_incrementable<_Out> && indirectly_copyable<_I1, _Out> && indirectly_copyable<_I2, _Out> && indirect_strict_weak_order<_Rel, projected<_I1, _P1>, projected<_I2, _P2>>; template<typename _Iter, typename _Rel = ranges::less, typename _Proj = identity> concept sortable = permutable<_Iter> && indirect_strict_weak_order<_Rel, projected<_Iter, _Proj>>; struct unreachable_sentinel_t { template<weakly_incrementable _It> friend constexpr bool operator==(unreachable_sentinel_t, const _It&) noexcept ; }; inline constexpr unreachable_sentinel_t unreachable_sentinel{}; namespace ranges::__cust_access { using std::__detail::__class_or_enum; struct _Decay_copy final { template<typename _Tp> constexpr decay_t<_Tp> operator()(_Tp&& __t) const noexcept(is_nothrow_convertible_v<_Tp, decay_t<_Tp>>) ; } inline constexpr __decay_copy{}; template<typename _Tp> concept __member_begin = requires(_Tp& __t) { { __decay_copy(__t.begin()) } -> input_or_output_iterator; }; void begin(auto&) = delete; void begin(const auto&) = delete; template<typename _Tp> concept __adl_begin = __class_or_enum<remove_reference_t<_Tp>> && requires(_Tp& __t) { { __decay_copy(begin(__t)) } -> input_or_output_iterator; }; template<typename _Tp> requires is_array_v<_Tp> || __member_begin<_Tp&> || __adl_begin<_Tp&> auto __begin(_Tp& __t) { if constexpr (is_array_v<_Tp>) return __t + 0; else if constexpr (__member_begin<_Tp&>) return __t.begin(); else return begin(__t); } } namespace __detail { template<typename _Tp> using __range_iter_t = decltype(ranges::__cust_access::__begin(std::declval<_Tp&>())); } } namespace std __attribute__ ((__visibility__ ("default"))) { struct input_iterator_tag { }; struct output_iterator_tag { }; struct forward_iterator_tag : public input_iterator_tag { }; struct bidirectional_iterator_tag : public forward_iterator_tag { }; struct random_access_iterator_tag : public bidirectional_iterator_tag { }; struct contiguous_iterator_tag : public random_access_iterator_tag { }; template<typename _Category, typename _Tp, typename _Distance = ptrdiff_t, typename _Pointer = _Tp*, typename _Reference = _Tp&> struct [[__deprecated__]] iterator { typedef _Category iterator_category; typedef _Tp value_type; typedef _Distance difference_type; typedef _Pointer pointer; typedef _Reference reference; }; template<typename _Iterator> struct iterator_traits; template<typename _Iterator, typename = __void_t<>> struct __iterator_traits { }; template<typename _Iterator> struct iterator_traits : public __iterator_traits<_Iterator> { }; template<typename _Tp> requires is_object_v<_Tp> struct iterator_traits<_Tp*> { using iterator_concept = contiguous_iterator_tag; using iterator_category = random_access_iterator_tag; using value_type = remove_cv_t<_Tp>; using difference_type = ptrdiff_t; using pointer = _Tp*; using reference = _Tp&; }; template<typename _Iter> __attribute__((__always_inline__)) inline constexpr typename iterator_traits<_Iter>::iterator_category __iterator_category(const _Iter&) { return typename iterator_traits<_Iter>::iterator_category(); } template<typename _Iter> using __iter_category_t = typename iterator_traits<_Iter>::iterator_category; template<typename _InIter> using _RequireInputIter = __enable_if_t<is_convertible<__iter_category_t<_InIter>, input_iterator_tag>::value>; template<typename _It, typename _Cat = __iter_category_t<_It>> struct __is_random_access_iter : is_base_of<random_access_iterator_tag, _Cat> { typedef is_base_of<random_access_iterator_tag, _Cat> _Base; enum { __value = _Base::value }; }; } namespace std __attribute__ ((__visibility__ ("default"))) { template <typename> struct _List_iterator; template <typename> struct _List_const_iterator; template<typename _InputIterator> constexpr typename iterator_traits<_InputIterator>::difference_type __distance(_InputIterator __first, _InputIterator __last, input_iterator_tag) ; template<typename _RandomAccessIterator> __attribute__((__always_inline__)) constexpr typename iterator_traits<_RandomAccessIterator>::difference_type __distance(_RandomAccessIterator __first, _RandomAccessIterator __last, random_access_iterator_tag) ; template<typename _Tp> ptrdiff_t __distance(std::_List_iterator<_Tp>, std::_List_iterator<_Tp>, input_iterator_tag); template<typename _Tp> ptrdiff_t __distance(std::_List_const_iterator<_Tp>, std::_List_const_iterator<_Tp>, input_iterator_tag); template<typename _OutputIterator> void __distance(_OutputIterator, _OutputIterator, output_iterator_tag) = delete; template<typename _InputIterator> [[__nodiscard__]] __attribute__((__always_inline__)) constexpr typename iterator_traits<_InputIterator>::difference_type distance(_InputIterator __first, _InputIterator __last) ; template<typename _InputIterator, typename _Distance> constexpr void __advance(_InputIterator& __i, _Distance __n, input_iterator_tag) ; template<typename _BidirectionalIterator, typename _Distance> constexpr void __advance(_BidirectionalIterator& __i, _Distance __n, bidirectional_iterator_tag) ; template<typename _RandomAccessIterator, typename _Distance> constexpr void __advance(_RandomAccessIterator& __i, _Distance __n, random_access_iterator_tag) ; template<typename _OutputIterator, typename _Distance> void __advance(_OutputIterator&, _Distance, output_iterator_tag) = delete; template<typename _InputIterator, typename _Distance> __attribute__((__always_inline__)) constexpr void advance(_InputIterator& __i, _Distance __n) ; template<typename _InputIterator> [[__nodiscard__]] [[__gnu__::__always_inline__]] constexpr _InputIterator next(_InputIterator __x, typename iterator_traits<_InputIterator>::difference_type __n = 1) ; template<typename _BidirectionalIterator> [[__nodiscard__]] [[__gnu__::__always_inline__]] constexpr _BidirectionalIterator prev(_BidirectionalIterator __x, typename iterator_traits<_BidirectionalIterator>::difference_type __n = 1) ; } extern "C++" { namespace std __attribute__ ((__visibility__ ("default"))) { class exception { public: exception() noexcept ; virtual ~exception() noexcept; exception(const exception&) = default; exception& operator=(const exception&) = default; exception(exception&&) = default; exception& operator=(exception&&) = default; virtual const char* what() const noexcept; }; } } #pragma GCC visibility push(default) extern "C++" { namespace std { class bad_alloc : public exception { public: bad_alloc() throw() ; bad_alloc(const bad_alloc&) = default; bad_alloc& operator=(const bad_alloc&) = default; virtual ~bad_alloc() throw(); virtual const char* what() const throw(); }; class bad_array_new_length : public bad_alloc { public: bad_array_new_length() throw() ; virtual ~bad_array_new_length() throw(); virtual const char* what() const throw(); }; enum class align_val_t: size_t {}; struct nothrow_t { explicit nothrow_t() = default; }; extern const nothrow_t nothrow; typedef void (*new_handler)(); new_handler set_new_handler(new_handler) throw(); new_handler get_new_handler() noexcept; } [[__nodiscard__]] void* operator new(std::size_t) __attribute__((__externally_visible__)); [[__nodiscard__]] void* operator new[](std::size_t) __attribute__((__externally_visible__)); void operator delete(void*) noexcept __attribute__((__externally_visible__)); void operator delete[](void*) noexcept __attribute__((__externally_visible__)); [[__nodiscard__]] void* operator new(std::size_t, const std::nothrow_t&) noexcept __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); [[__nodiscard__]] void* operator new[](std::size_t, const std::nothrow_t&) noexcept __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); void operator delete(void*, const std::nothrow_t&) noexcept __attribute__((__externally_visible__)); void operator delete[](void*, const std::nothrow_t&) noexcept __attribute__((__externally_visible__)); [[__nodiscard__]] void* operator new(std::size_t, std::align_val_t) __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); [[__nodiscard__]] void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) noexcept __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); void operator delete(void*, std::align_val_t) noexcept __attribute__((__externally_visible__)); void operator delete(void*, std::align_val_t, const std::nothrow_t&) noexcept __attribute__((__externally_visible__)); [[__nodiscard__]] void* operator new[](std::size_t, std::align_val_t) __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); [[__nodiscard__]] void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) noexcept __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); void operator delete[](void*, std::align_val_t) noexcept __attribute__((__externally_visible__)); void operator delete[](void*, std::align_val_t, const std::nothrow_t&) noexcept __attribute__((__externally_visible__)); [[__nodiscard__]] void* operator new(std::size_t, void* __p) noexcept ; [[__nodiscard__]] void* operator new[](std::size_t, void* __p) noexcept ; void operator delete (void*, void*) noexcept ; void operator delete[](void*, void*) noexcept ; } namespace std { template<typename _Tp> [[nodiscard]] constexpr _Tp* launder(_Tp* __p) noexcept ; template<typename _Ret, typename... _Args , bool _NE> void launder(_Ret (*)(_Args...) noexcept (_NE)) = delete; template<typename _Ret, typename... _Args , bool _NE> void launder(_Ret (*)(_Args......) noexcept (_NE)) = delete; void launder(void*) = delete; void launder(const void*) = delete; void launder(volatile void*) = delete; void launder(const volatile void*) = delete; } namespace std { struct destroying_delete_t { explicit destroying_delete_t() = default; }; inline constexpr destroying_delete_t destroying_delete{}; } #pragma GCC visibility pop namespace std __attribute__ ((__visibility__ ("default"))) { template <typename _Tp> constexpr void destroy_at(_Tp* __location) ; template<typename _Tp, typename... _Args> constexpr auto construct_at(_Tp* __location, _Args&&... __args) noexcept(noexcept(::new((void*)0) _Tp(std::declval<_Args>()...))) -> decltype(::new((void*)0) _Tp(std::declval<_Args>()...)) ; template<typename _Tp, typename... _Args> constexpr void _Construct(_Tp* __p, _Args&&... __args) ; template<typename _T1> void _Construct_novalue(_T1* __p) ; template<typename _ForwardIterator> constexpr void _Destroy(_ForwardIterator __first, _ForwardIterator __last); template<typename _Tp> constexpr void _Destroy(_Tp* __pointer) ; template<bool> struct _Destroy_aux { template<typename _ForwardIterator> static constexpr void __destroy(_ForwardIterator __first, _ForwardIterator __last) ; }; template<> struct _Destroy_aux<true> { template<typename _ForwardIterator> static void __destroy(_ForwardIterator, _ForwardIterator) ; }; template<typename _ForwardIterator> constexpr void _Destroy(_ForwardIterator __first, _ForwardIterator __last) ; template<bool> struct _Destroy_n_aux { template<typename _ForwardIterator, typename _Size> static constexpr _ForwardIterator __destroy_n(_ForwardIterator __first, _Size __count) ; }; template<> struct _Destroy_n_aux<true> { template<typename _ForwardIterator, typename _Size> static _ForwardIterator __destroy_n(_ForwardIterator __first, _Size __count) ; }; template<typename _ForwardIterator, typename _Size> constexpr _ForwardIterator _Destroy_n(_ForwardIterator __first, _Size __count) ; template <typename _ForwardIterator> constexpr void destroy(_ForwardIterator __first, _ForwardIterator __last) ; template <typename _ForwardIterator, typename _Size> constexpr _ForwardIterator destroy_n(_ForwardIterator __first, _Size __count) ; } namespace std __attribute__ ((__visibility__ ("default"))) { namespace __detail { template<typename _Cat, typename _Limit, typename _Otherwise = _Cat> using __clamp_iter_cat = __conditional_t<derived_from<_Cat, _Limit>, _Limit, _Otherwise>; template<typename _Tp, typename _Up> concept __different_from = !same_as<remove_cvref_t<_Tp>, remove_cvref_t<_Up>>; } #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 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> { template<typename _Iter> friend class reverse_iterator; template<typename _Iter> static constexpr bool __convertible = !is_same_v<_Iter, _Iterator> && convertible_to<const _Iter&, _Iterator>; protected: _Iterator current; typedef iterator_traits<_Iterator> __traits_type; public: typedef _Iterator iterator_type; typedef typename __traits_type::pointer pointer; using iterator_concept = __conditional_t<random_access_iterator<_Iterator>, random_access_iterator_tag, bidirectional_iterator_tag>; using iterator_category = __detail::__clamp_iter_cat<typename __traits_type::iterator_category, random_access_iterator_tag>; using value_type = iter_value_t<_Iterator>; using difference_type = iter_difference_t<_Iterator>; using reference = iter_reference_t<_Iterator>; constexpr reverse_iterator() noexcept(noexcept(_Iterator())) ; explicit constexpr reverse_iterator(iterator_type __x) noexcept(noexcept(_Iterator(__x))) ; constexpr reverse_iterator(const reverse_iterator& __x) noexcept(noexcept(_Iterator(__x.current))) ; reverse_iterator& operator=(const reverse_iterator&) = default; template<typename _Iter> requires __convertible<_Iter> constexpr reverse_iterator(const reverse_iterator<_Iter>& __x) noexcept(noexcept(_Iterator(__x.current))) ; template<typename _Iter> requires __convertible<_Iter> && assignable_from<_Iterator&, const _Iter&> constexpr reverse_iterator& operator=(const reverse_iterator<_Iter>& __x) noexcept(noexcept(current = __x.current)) ; [[__nodiscard__]] constexpr iterator_type base() const noexcept(noexcept(_Iterator(current))) ; [[__nodiscard__]] constexpr reference operator*() const ; [[__nodiscard__]] constexpr pointer operator->() const requires is_pointer_v<_Iterator> || requires(const _Iterator __i) { __i.operator->(); } ; constexpr reverse_iterator& operator++() ; constexpr reverse_iterator operator++(int) ; constexpr reverse_iterator& operator--() ; constexpr reverse_iterator operator--(int) ; [[__nodiscard__]] constexpr reverse_iterator operator+(difference_type __n) const ; constexpr reverse_iterator& operator+=(difference_type __n) ; [[__nodiscard__]] constexpr reverse_iterator operator-(difference_type __n) const { return reverse_iterator(current + __n); } constexpr reverse_iterator& operator-=(difference_type __n) { current += __n; return *this; } [[__nodiscard__]] constexpr reference operator[](difference_type __n) const { return *(*this + __n); } [[nodiscard]] friend constexpr iter_rvalue_reference_t<_Iterator> iter_move(const reverse_iterator& __i) noexcept(is_nothrow_copy_constructible_v<_Iterator> && noexcept(ranges::iter_move(--std::declval<_Iterator&>()))) { auto __tmp = __i.base(); return ranges::iter_move(--__tmp); } template<indirectly_swappable<_Iterator> _Iter2> friend constexpr void iter_swap(const reverse_iterator& __x, const reverse_iterator<_Iter2>& __y) noexcept(is_nothrow_copy_constructible_v<_Iterator> && is_nothrow_copy_constructible_v<_Iter2> && noexcept(ranges::iter_swap(--std::declval<_Iterator&>(), --std::declval<_Iter2&>()))) ; private: template<typename _Tp> static constexpr _Tp* _S_to_pointer(_Tp* __p) ; template<typename _Tp> static constexpr pointer _S_to_pointer(_Tp __t) ; }; template<typename _IteratorL, typename _IteratorR> [[nodiscard]] constexpr bool operator==(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) requires requires { { __x.base() == __y.base() } -> convertible_to<bool>; } ; template<typename _IteratorL, typename _IteratorR> [[nodiscard]] constexpr bool operator!=(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) requires requires { { __x.base() != __y.base() } -> convertible_to<bool>; } ; template<typename _IteratorL, typename _IteratorR> [[nodiscard]] constexpr bool operator<(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) requires requires { { __x.base() > __y.base() } -> convertible_to<bool>; } ; template<typename _IteratorL, typename _IteratorR> [[nodiscard]] constexpr bool operator>(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) requires requires { { __x.base() < __y.base() } -> convertible_to<bool>; } ; template<typename _IteratorL, typename _IteratorR> [[nodiscard]] constexpr bool operator<=(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) requires requires { { __x.base() >= __y.base() } -> convertible_to<bool>; } ; template<typename _IteratorL, typename _IteratorR> [[nodiscard]] constexpr bool operator>=(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) requires requires { { __x.base() <= __y.base() } -> convertible_to<bool>; } ; template<typename _IteratorL, three_way_comparable_with<_IteratorL> _IteratorR> [[nodiscard]] constexpr compare_three_way_result_t<_IteratorL, _IteratorR> operator<=>(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) ; template<typename _Iterator> [[nodiscard]] constexpr bool operator==(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) requires requires { { __x.base() == __y.base() } -> convertible_to<bool>; } ; template<three_way_comparable _Iterator> [[nodiscard]] constexpr compare_three_way_result_t<_Iterator, _Iterator> operator<=>(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) ; template<typename _IteratorL, typename _IteratorR> [[__nodiscard__]] constexpr auto operator-(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) -> decltype(__y.base() - __x.base()) ; template<typename _Iterator> [[__nodiscard__]] constexpr reverse_iterator<_Iterator> operator+(typename reverse_iterator<_Iterator>::difference_type __n, const reverse_iterator<_Iterator>& __x) ; template<typename _Iterator> constexpr reverse_iterator<_Iterator> __make_reverse_iterator(_Iterator __i) ; template<typename _Iterator> [[__nodiscard__]] constexpr reverse_iterator<_Iterator> make_reverse_iterator(_Iterator __i) ; template<typename _Iterator1, typename _Iterator2> requires (!sized_sentinel_for<_Iterator1, _Iterator2>) inline constexpr bool disable_sized_sentinel_for<reverse_iterator<_Iterator1>, reverse_iterator<_Iterator2>> = true; template<typename _Iterator> constexpr auto __niter_base(reverse_iterator<_Iterator> __it) -> decltype(__make_reverse_iterator(__niter_base(__it.base()))) ; template<typename _Iterator> struct __is_move_iterator<reverse_iterator<_Iterator> > : __is_move_iterator<_Iterator> { }; template<typename _Iterator> constexpr auto __miter_base(reverse_iterator<_Iterator> __it) -> decltype(__make_reverse_iterator(__miter_base(__it.base()))) ; template<typename _Container> class back_insert_iterator : public iterator<output_iterator_tag, void, void, void, void> { protected: _Container* container; public: typedef _Container container_type; using difference_type = ptrdiff_t; explicit constexpr back_insert_iterator(_Container& __x) ; constexpr back_insert_iterator& operator=(const typename _Container::value_type& __value) ; constexpr back_insert_iterator& operator=(typename _Container::value_type&& __value) ; [[__nodiscard__]] constexpr back_insert_iterator& operator*() ; constexpr back_insert_iterator& operator++() ; constexpr back_insert_iterator operator++(int) ; }; template<typename _Container> [[__nodiscard__]] constexpr back_insert_iterator<_Container> back_inserter(_Container& __x) ; template<typename _Container> class front_insert_iterator : public iterator<output_iterator_tag, void, void, void, void> { protected: _Container* container; public: typedef _Container container_type; using difference_type = ptrdiff_t; explicit constexpr front_insert_iterator(_Container& __x) ; constexpr front_insert_iterator& operator=(const typename _Container::value_type& __value) ; constexpr front_insert_iterator& operator=(typename _Container::value_type&& __value) ; [[__nodiscard__]] constexpr front_insert_iterator& operator*() ; constexpr front_insert_iterator& operator++() ; constexpr front_insert_iterator operator++(int) ; }; template<typename _Container> [[__nodiscard__]] constexpr front_insert_iterator<_Container> front_inserter(_Container& __x) ; template<typename _Container> class insert_iterator : public iterator<output_iterator_tag, void, void, void, void> { using _Iter = std::__detail::__range_iter_t<_Container>; protected: _Container* container; _Iter iter; public: typedef _Container container_type; using difference_type = ptrdiff_t; constexpr insert_iterator(_Container& __x, _Iter __i) ; constexpr insert_iterator& operator=(const typename _Container::value_type& __value) ; constexpr insert_iterator& operator=(typename _Container::value_type&& __value) ; [[__nodiscard__]] constexpr insert_iterator& operator*() ; constexpr insert_iterator& operator++() ; constexpr insert_iterator& operator++(int) ; }; #pragma GCC diagnostic pop template<typename _Container> [[nodiscard]] constexpr insert_iterator<_Container> inserter(_Container& __x, std::__detail::__range_iter_t<_Container> __i) ; } namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { template<typename _Iterator, typename _Container> class __normal_iterator { protected: _Iterator _M_current; typedef std::iterator_traits<_Iterator> __traits_type; template<typename _Iter> using __convertible_from = std::__enable_if_t<std::is_convertible<_Iter, _Iterator>::value>; 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; using iterator_concept = std::__detail::__iter_concept<_Iterator>; constexpr __normal_iterator() ; explicit constexpr __normal_iterator(const _Iterator& __i) ; template<typename _Iter, typename = __convertible_from<_Iter>> constexpr __normal_iterator(const __normal_iterator<_Iter, _Container>& __i) ; constexpr reference operator*() const noexcept ; constexpr pointer operator->() const noexcept ; constexpr __normal_iterator& operator++() noexcept ; constexpr __normal_iterator operator++(int) noexcept ; constexpr __normal_iterator& operator--() noexcept ; constexpr __normal_iterator operator--(int) noexcept ; constexpr reference operator[](difference_type __n) const noexcept ; constexpr __normal_iterator& operator+=(difference_type __n) noexcept ; constexpr __normal_iterator operator+(difference_type __n) const noexcept ; constexpr __normal_iterator& operator-=(difference_type __n) noexcept ; constexpr __normal_iterator operator-(difference_type __n) const noexcept ; constexpr const _Iterator& base() const noexcept ; }; template<typename _IteratorL, typename _IteratorR, typename _Container> [[nodiscard]] constexpr bool operator==(const __normal_iterator<_IteratorL, _Container>& __lhs, const __normal_iterator<_IteratorR, _Container>& __rhs) noexcept(noexcept(__lhs.base() == __rhs.base())) requires requires { { __lhs.base() == __rhs.base() } -> std::convertible_to<bool>; } ; template<typename _IteratorL, typename _IteratorR, typename _Container> [[nodiscard]] constexpr std::__detail::__synth3way_t<_IteratorR, _IteratorL> operator<=>(const __normal_iterator<_IteratorL, _Container>& __lhs, const __normal_iterator<_IteratorR, _Container>& __rhs) noexcept(noexcept(std::__detail::__synth3way(__lhs.base(), __rhs.base()))) ; template<typename _Iterator, typename _Container> [[nodiscard]] constexpr bool operator==(const __normal_iterator<_Iterator, _Container>& __lhs, const __normal_iterator<_Iterator, _Container>& __rhs) noexcept(noexcept(__lhs.base() == __rhs.base())) requires requires { { __lhs.base() == __rhs.base() } -> std::convertible_to<bool>; } ; template<typename _Iterator, typename _Container> [[nodiscard]] constexpr std::__detail::__synth3way_t<_Iterator> operator<=>(const __normal_iterator<_Iterator, _Container>& __lhs, const __normal_iterator<_Iterator, _Container>& __rhs) noexcept(noexcept(std::__detail::__synth3way(__lhs.base(), __rhs.base()))) ; template<typename _IteratorL, typename _IteratorR, typename _Container> [[__nodiscard__]] constexpr auto operator-(const __normal_iterator<_IteratorL, _Container>& __lhs, const __normal_iterator<_IteratorR, _Container>& __rhs) noexcept -> decltype(__lhs.base() - __rhs.base()) ; template<typename _Iterator, typename _Container> [[__nodiscard__]] constexpr typename __normal_iterator<_Iterator, _Container>::difference_type operator-(const __normal_iterator<_Iterator, _Container>& __lhs, const __normal_iterator<_Iterator, _Container>& __rhs) noexcept ; template<typename _Iterator, typename _Container> [[__nodiscard__]] constexpr __normal_iterator<_Iterator, _Container> operator+(typename __normal_iterator<_Iterator, _Container>::difference_type __n, const __normal_iterator<_Iterator, _Container>& __i) noexcept ; } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Iterator, typename _Container> constexpr _Iterator __niter_base(__gnu_cxx::__normal_iterator<_Iterator, _Container> __it) noexcept(std::is_nothrow_copy_constructible<_Iterator>::value) ; template<semiregular _Sent> class move_sentinel { public: constexpr move_sentinel() noexcept(is_nothrow_default_constructible_v<_Sent>) ; constexpr explicit move_sentinel(_Sent __s) noexcept(is_nothrow_move_constructible_v<_Sent>) ; template<typename _S2> requires convertible_to<const _S2&, _Sent> constexpr move_sentinel(const move_sentinel<_S2>& __s) noexcept(is_nothrow_constructible_v<_Sent, const _S2&>) ; template<typename _S2> requires assignable_from<_Sent&, const _S2&> constexpr move_sentinel& operator=(const move_sentinel<_S2>& __s) noexcept(is_nothrow_assignable_v<_Sent, const _S2&>) ; [[nodiscard]] constexpr _Sent base() const noexcept(is_nothrow_copy_constructible_v<_Sent>) ; private: _Sent _M_last; }; namespace __detail { template<typename _Iterator> struct __move_iter_cat { }; template<typename _Iterator> requires requires { typename __iter_category_t<_Iterator>; } struct __move_iter_cat<_Iterator> { using iterator_category = __clamp_iter_cat<__iter_category_t<_Iterator>, random_access_iterator_tag>; }; } template<typename _Iterator> class move_iterator : public __detail::__move_iter_cat<_Iterator> { _Iterator _M_current; using __traits_type = iterator_traits<_Iterator>; template<typename _Iter2> friend class move_iterator; template<typename _Iter2> static constexpr bool __convertible = !is_same_v<_Iter2, _Iterator> && convertible_to<const _Iter2&, _Iterator>; static auto _S_iter_concept() ; public: using iterator_type = _Iterator; using iterator_concept = decltype(_S_iter_concept()); using value_type = iter_value_t<_Iterator>; using difference_type = iter_difference_t<_Iterator>; using pointer = _Iterator; using reference = iter_rvalue_reference_t<_Iterator>; constexpr move_iterator() ; explicit constexpr move_iterator(iterator_type __i) ; template<typename _Iter> requires __convertible<_Iter> constexpr move_iterator(const move_iterator<_Iter>& __i) ; template<typename _Iter> requires __convertible<_Iter> && assignable_from<_Iterator&, const _Iter&> constexpr move_iterator& operator=(const move_iterator<_Iter>& __i) ; [[nodiscard]] constexpr const iterator_type& base() const & noexcept ; [[nodiscard]] constexpr iterator_type base() && ; [[__nodiscard__]] constexpr reference operator*() const ; [[__nodiscard__]] constexpr pointer operator->() const ; constexpr move_iterator& operator++() ; constexpr move_iterator operator++(int) ; constexpr void operator++(int) requires (!forward_iterator<_Iterator>) ; constexpr move_iterator& operator--() ; constexpr move_iterator operator--(int) ; [[__nodiscard__]] constexpr move_iterator operator+(difference_type __n) const ; constexpr move_iterator& operator+=(difference_type __n) ; [[__nodiscard__]] constexpr move_iterator operator-(difference_type __n) const { return move_iterator(_M_current - __n); } constexpr move_iterator& operator-=(difference_type __n) { _M_current -= __n; return *this; } [[__nodiscard__]] constexpr reference operator[](difference_type __n) const { return ranges::iter_move(_M_current + __n); } template<sentinel_for<_Iterator> _Sent> [[nodiscard]] friend constexpr bool operator==(const move_iterator& __x, const move_sentinel<_Sent>& __y) { return __x.base() == __y.base(); } template<sized_sentinel_for<_Iterator> _Sent> [[nodiscard]] friend constexpr iter_difference_t<_Iterator> operator-(const move_sentinel<_Sent>& __x, const move_iterator& __y) { return __x.base() - __y.base(); } template<sized_sentinel_for<_Iterator> _Sent> [[nodiscard]] friend constexpr iter_difference_t<_Iterator> operator-(const move_iterator& __x, const move_sentinel<_Sent>& __y) { return __x.base() - __y.base(); } [[nodiscard]] friend constexpr iter_rvalue_reference_t<_Iterator> iter_move(const move_iterator& __i) noexcept(noexcept(ranges::iter_move(__i._M_current))) { return ranges::iter_move(__i._M_current); } template<indirectly_swappable<_Iterator> _Iter2> friend constexpr void iter_swap(const move_iterator& __x, const move_iterator<_Iter2>& __y) noexcept(noexcept(ranges::iter_swap(__x._M_current, __y._M_current))) { return ranges::iter_swap(__x._M_current, __y._M_current); } }; template<typename _IteratorL, typename _IteratorR> [[__nodiscard__]] constexpr bool operator==(const move_iterator<_IteratorL>& __x, const move_iterator<_IteratorR>& __y) requires requires { { __x.base() == __y.base() } -> convertible_to<bool>; } ; template<typename _IteratorL, three_way_comparable_with<_IteratorL> _IteratorR> [[__nodiscard__]] constexpr compare_three_way_result_t<_IteratorL, _IteratorR> operator<=>(const move_iterator<_IteratorL>& __x, const move_iterator<_IteratorR>& __y) ; template<typename _IteratorL, typename _IteratorR> [[__nodiscard__]] constexpr bool operator<(const move_iterator<_IteratorL>& __x, const move_iterator<_IteratorR>& __y) requires requires { { __x.base() < __y.base() } -> convertible_to<bool>; } ; template<typename _IteratorL, typename _IteratorR> [[__nodiscard__]] constexpr bool operator<=(const move_iterator<_IteratorL>& __x, const move_iterator<_IteratorR>& __y) requires requires { { __y.base() < __x.base() } -> convertible_to<bool>; } ; template<typename _IteratorL, typename _IteratorR> [[__nodiscard__]] inline constexpr bool operator>(const move_iterator<_IteratorL>& __x, const move_iterator<_IteratorR>& __y) requires requires { { __y.base() < __x.base() } -> convertible_to<bool>; } { return __y < __x; } template<typename _IteratorL, typename _IteratorR> [[__nodiscard__]] inline constexpr bool operator>=(const move_iterator<_IteratorL>& __x, const move_iterator<_IteratorR>& __y) requires requires { { __x.base() < __y.base() } -> convertible_to<bool>; } { return !(__x < __y); } template<typename _Iterator> [[__nodiscard__]] constexpr bool operator==(const move_iterator<_Iterator>& __x, const move_iterator<_Iterator>& __y) ; template<three_way_comparable _Iterator> [[__nodiscard__]] constexpr compare_three_way_result_t<_Iterator> operator<=>(const move_iterator<_Iterator>& __x, const move_iterator<_Iterator>& __y) ; template<typename _IteratorL, typename _IteratorR> [[__nodiscard__]] constexpr auto operator-(const move_iterator<_IteratorL>& __x, const move_iterator<_IteratorR>& __y) -> decltype(__x.base() - __y.base()) ; template<typename _Iterator> [[__nodiscard__]] constexpr move_iterator<_Iterator> operator+(typename move_iterator<_Iterator>::difference_type __n, const move_iterator<_Iterator>& __x) ; template<typename _Iterator> [[__nodiscard__]] constexpr move_iterator<_Iterator> make_move_iterator(_Iterator __i) ; template<typename _Iterator, typename _ReturnType = __conditional_t<__move_if_noexcept_cond <typename iterator_traits<_Iterator>::value_type>::value, _Iterator, move_iterator<_Iterator>>> constexpr _ReturnType __make_move_if_noexcept_iterator(_Iterator __i) ; template<typename _Tp, typename _ReturnType = __conditional_t<__move_if_noexcept_cond<_Tp>::value, const _Tp*, move_iterator<_Tp*>>> constexpr _ReturnType __make_move_if_noexcept_iterator(_Tp* __i) ; namespace __detail { template<typename _It> concept __common_iter_has_arrow = indirectly_readable<const _It> && (requires(const _It& __it) { __it.operator->(); } || is_reference_v<iter_reference_t<_It>> || constructible_from<iter_value_t<_It>, iter_reference_t<_It>>); template<typename _It> concept __common_iter_use_postfix_proxy = (!requires (_It& __i) { { *__i++ } -> __can_reference; }) && constructible_from<iter_value_t<_It>, iter_reference_t<_It>> && move_constructible<iter_value_t<_It>>; } template<input_or_output_iterator _It, sentinel_for<_It> _Sent> requires (!same_as<_It, _Sent>) && copyable<_It> class common_iterator { template<typename _Tp, typename _Up> static constexpr bool _S_noexcept1() ; template<typename _It2, typename _Sent2> static constexpr bool _S_noexcept() ; class __arrow_proxy { iter_value_t<_It> _M_keep; constexpr __arrow_proxy(iter_reference_t<_It>&& __x) ; friend class common_iterator; public: constexpr const iter_value_t<_It>* operator->() const noexcept ; }; class __postfix_proxy { iter_value_t<_It> _M_keep; constexpr __postfix_proxy(iter_reference_t<_It>&& __x) ; friend class common_iterator; public: constexpr const iter_value_t<_It>& operator*() const noexcept ; }; public: constexpr common_iterator() noexcept(is_nothrow_default_constructible_v<_It>) ; constexpr common_iterator(_It __i) noexcept(is_nothrow_move_constructible_v<_It>) ; constexpr common_iterator(_Sent __s) noexcept(is_nothrow_move_constructible_v<_Sent>) ; template<typename _It2, typename _Sent2> requires convertible_to<const _It2&, _It> && convertible_to<const _Sent2&, _Sent> constexpr common_iterator(const common_iterator<_It2, _Sent2>& __x) noexcept(_S_noexcept<const _It2&, const _Sent2&>()) ; common_iterator(const common_iterator&) = default; constexpr common_iterator(const common_iterator& __x) noexcept(_S_noexcept<const _It&, const _Sent&>()) requires (!is_trivially_copyable_v<_It> || !is_trivially_copyable_v<_Sent>) ; common_iterator(common_iterator&&) = default; constexpr common_iterator(common_iterator&& __x) noexcept(_S_noexcept<_It, _Sent>()) requires (!is_trivially_copyable_v<_It> || !is_trivially_copyable_v<_Sent>) ; constexpr common_iterator& operator=(const common_iterator&) = default; constexpr common_iterator& operator=(const common_iterator& __x) noexcept(is_nothrow_copy_assignable_v<_It> && is_nothrow_copy_assignable_v<_Sent> && is_nothrow_copy_constructible_v<_It> && is_nothrow_copy_constructible_v<_Sent>) requires (!is_trivially_copy_assignable_v<_It> || !is_trivially_copy_assignable_v<_Sent>) ; constexpr common_iterator& operator=(common_iterator&&) = default; constexpr common_iterator& operator=(common_iterator&& __x) noexcept(is_nothrow_move_assignable_v<_It> && is_nothrow_move_assignable_v<_Sent> && is_nothrow_move_constructible_v<_It> && is_nothrow_move_constructible_v<_Sent>) requires (!is_trivially_move_assignable_v<_It> || !is_trivially_move_assignable_v<_Sent>) ; template<typename _It2, typename _Sent2> requires convertible_to<const _It2&, _It> && convertible_to<const _Sent2&, _Sent> && assignable_from<_It&, const _It2&> && assignable_from<_Sent&, const _Sent2&> constexpr common_iterator& operator=(const common_iterator<_It2, _Sent2>& __x) noexcept(is_nothrow_constructible_v<_It, const _It2&> && is_nothrow_constructible_v<_Sent, const _Sent2&> && is_nothrow_assignable_v<_It&, const _It2&> && is_nothrow_assignable_v<_Sent&, const _Sent2&>) ; constexpr ~common_iterator() ; [[nodiscard]] constexpr decltype(auto) operator*() ; [[nodiscard]] constexpr decltype(auto) operator*() const requires __detail::__dereferenceable<const _It> ; [[nodiscard]] constexpr auto operator->() const requires __detail::__common_iter_has_arrow<_It> ; constexpr common_iterator& operator++() ; constexpr decltype(auto) operator++(int) { do { if (std::__is_constant_evaluated() && !bool(_M_index == 0)) __builtin_unreachable(); } while (false); if constexpr (forward_iterator<_It>) { common_iterator __tmp = *this; ++*this; return __tmp; } else if constexpr (!__detail::__common_iter_use_postfix_proxy<_It>) return _M_it++; else { __postfix_proxy __p(**this); ++*this; return __p; } } template<typename _It2, sentinel_for<_It> _Sent2> requires sentinel_for<_Sent, _It2> friend constexpr bool operator== [[nodiscard]] (const common_iterator& __x, const common_iterator<_It2, _Sent2>& __y) { switch(__x._M_index << 2 | __y._M_index) { case 0b0000: case 0b0101: return true; case 0b0001: return __x._M_it == __y._M_sent; case 0b0100: return __x._M_sent == __y._M_it; default: do { if (std::__is_constant_evaluated() && !bool(__x._M_has_value())) __builtin_unreachable(); } while (false); do { if (std::__is_constant_evaluated() && !bool(__y._M_has_value())) __builtin_unreachable(); } while (false); __builtin_unreachable(); } } template<typename _It2, sentinel_for<_It> _Sent2> requires sentinel_for<_Sent, _It2> && equality_comparable_with<_It, _It2> friend constexpr bool operator== [[nodiscard]] (const common_iterator& __x, const common_iterator<_It2, _Sent2>& __y) { switch(__x._M_index << 2 | __y._M_index) { case 0b0101: return true; case 0b0000: return __x._M_it == __y._M_it; case 0b0001: return __x._M_it == __y._M_sent; case 0b0100: return __x._M_sent == __y._M_it; default: do { if (std::__is_constant_evaluated() && !bool(__x._M_has_value())) __builtin_unreachable(); } while (false); do { if (std::__is_constant_evaluated() && !bool(__y._M_has_value())) __builtin_unreachable(); } while (false); __builtin_unreachable(); } } template<sized_sentinel_for<_It> _It2, sized_sentinel_for<_It> _Sent2> requires sized_sentinel_for<_Sent, _It2> friend constexpr iter_difference_t<_It2> operator- [[nodiscard]] (const common_iterator& __x, const common_iterator<_It2, _Sent2>& __y) { switch(__x._M_index << 2 | __y._M_index) { case 0b0101: return 0; case 0b0000: return __x._M_it - __y._M_it; case 0b0001: return __x._M_it - __y._M_sent; case 0b0100: return __x._M_sent - __y._M_it; default: do { if (std::__is_constant_evaluated() && !bool(__x._M_has_value())) __builtin_unreachable(); } while (false); do { if (std::__is_constant_evaluated() && !bool(__y._M_has_value())) __builtin_unreachable(); } while (false); __builtin_unreachable(); } } [[nodiscard]] friend constexpr iter_rvalue_reference_t<_It> iter_move(const common_iterator& __i) noexcept(noexcept(ranges::iter_move(std::declval<const _It&>()))) requires input_iterator<_It> { do { if (std::__is_constant_evaluated() && !bool(__i._M_index == 0)) __builtin_unreachable(); } while (false); return ranges::iter_move(__i._M_it); } template<indirectly_swappable<_It> _It2, typename _Sent2> friend constexpr void iter_swap(const common_iterator& __x, const common_iterator<_It2, _Sent2>& __y) noexcept(noexcept(ranges::iter_swap(std::declval<const _It&>(), std::declval<const _It2&>()))) { do { if (std::__is_constant_evaluated() && !bool(__x._M_index == 0)) __builtin_unreachable(); } while (false); do { if (std::__is_constant_evaluated() && !bool(__y._M_index == 0)) __builtin_unreachable(); } while (false); return ranges::iter_swap(__x._M_it, __y._M_it); } private: template<input_or_output_iterator _It2, sentinel_for<_It2> _Sent2> requires (!same_as<_It2, _Sent2>) && copyable<_It2> friend class common_iterator; constexpr bool _M_has_value() const noexcept ; template<typename _CIt> constexpr void _M_assign(_CIt&& __x) ; union { _It _M_it; _Sent _M_sent; unsigned char _M_valueless; }; unsigned char _M_index; static constexpr unsigned char _S_valueless{2}; }; template<typename _It, typename _Sent> struct incrementable_traits<common_iterator<_It, _Sent>> { using difference_type = iter_difference_t<_It>; }; template<input_iterator _It, typename _Sent> struct iterator_traits<common_iterator<_It, _Sent>> { private: template<typename _Iter> struct __ptr { using type = void; }; template<typename _Iter> requires __detail::__common_iter_has_arrow<_Iter> struct __ptr<_Iter> { using _CIter = common_iterator<_Iter, _Sent>; using type = decltype(std::declval<const _CIter&>().operator->()); }; static auto _S_iter_cat() ; public: using iterator_concept = __conditional_t<forward_iterator<_It>, forward_iterator_tag, input_iterator_tag>; using iterator_category = decltype(_S_iter_cat()); using value_type = iter_value_t<_It>; using difference_type = iter_difference_t<_It>; using pointer = typename __ptr<_It>::type; using reference = iter_reference_t<_It>; }; namespace __detail { template<typename _It> struct __counted_iter_value_type { }; template<indirectly_readable _It> struct __counted_iter_value_type<_It> { using value_type = iter_value_t<_It>; }; template<typename _It> struct __counted_iter_concept { }; template<typename _It> requires requires { typename _It::iterator_concept; } struct __counted_iter_concept<_It> { using iterator_concept = typename _It::iterator_concept; }; template<typename _It> struct __counted_iter_cat { }; template<typename _It> requires requires { typename _It::iterator_category; } struct __counted_iter_cat<_It> { using iterator_category = typename _It::iterator_category; }; } template<input_or_output_iterator _It> class counted_iterator : public __detail::__counted_iter_value_type<_It>, public __detail::__counted_iter_concept<_It>, public __detail::__counted_iter_cat<_It> { public: using iterator_type = _It; using difference_type = iter_difference_t<_It>; constexpr counted_iterator() requires default_initializable<_It> = default; constexpr counted_iterator(_It __i, iter_difference_t<_It> __n) ; template<typename _It2> requires convertible_to<const _It2&, _It> constexpr counted_iterator(const counted_iterator<_It2>& __x) ; template<typename _It2> requires assignable_from<_It&, const _It2&> constexpr counted_iterator& operator=(const counted_iterator<_It2>& __x) ; [[nodiscard]] constexpr const _It& base() const & noexcept ; [[nodiscard]] constexpr _It base() && noexcept(is_nothrow_move_constructible_v<_It>) ; [[nodiscard]] constexpr iter_difference_t<_It> count() const noexcept ; [[nodiscard]] constexpr decltype(auto) operator*() noexcept(noexcept(*_M_current)) ; [[nodiscard]] constexpr decltype(auto) operator*() const noexcept(noexcept(*_M_current)) requires __detail::__dereferenceable<const _It> ; [[nodiscard]] constexpr auto operator->() const noexcept requires contiguous_iterator<_It> ; constexpr counted_iterator& operator++() ; constexpr decltype(auto) operator++(int) ; constexpr counted_iterator operator++(int) requires forward_iterator<_It> ; constexpr counted_iterator& operator--() requires bidirectional_iterator<_It> ; constexpr counted_iterator operator--(int) requires bidirectional_iterator<_It> ; [[nodiscard]] constexpr counted_iterator operator+(iter_difference_t<_It> __n) const requires random_access_iterator<_It> { return counted_iterator(_M_current + __n, _M_length - __n); } [[nodiscard]] friend constexpr counted_iterator operator+(iter_difference_t<_It> __n, const counted_iterator& __x) requires random_access_iterator<_It> { return __x + __n; } constexpr counted_iterator& operator+=(iter_difference_t<_It> __n) requires random_access_iterator<_It> { do { if (std::__is_constant_evaluated() && !bool(__n <= _M_length)) __builtin_unreachable(); } while (false); _M_current += __n; _M_length -= __n; return *this; } [[nodiscard]] constexpr counted_iterator operator-(iter_difference_t<_It> __n) const requires random_access_iterator<_It> { return counted_iterator(_M_current - __n, _M_length + __n); } template<common_with<_It> _It2> [[nodiscard]] friend constexpr iter_difference_t<_It2> operator-(const counted_iterator& __x, const counted_iterator<_It2>& __y) { return __y._M_length - __x._M_length; } [[nodiscard]] friend constexpr iter_difference_t<_It> operator-(const counted_iterator& __x, default_sentinel_t) { return -__x._M_length; } [[nodiscard]] friend constexpr iter_difference_t<_It> operator-(default_sentinel_t, const counted_iterator& __y) { return __y._M_length; } constexpr counted_iterator& operator-=(iter_difference_t<_It> __n) requires random_access_iterator<_It> { do { if (std::__is_constant_evaluated() && !bool(-__n <= _M_length)) __builtin_unreachable(); } while (false); _M_current -= __n; _M_length += __n; return *this; } [[nodiscard]] constexpr decltype(auto) operator[](iter_difference_t<_It> __n) const noexcept(noexcept(_M_current[__n])) requires random_access_iterator<_It> { do { if (std::__is_constant_evaluated() && !bool(__n < _M_length)) __builtin_unreachable(); } while (false); return _M_current[__n]; } template<common_with<_It> _It2> [[nodiscard]] friend constexpr bool operator==(const counted_iterator& __x, const counted_iterator<_It2>& __y) { return __x._M_length == __y._M_length; } [[nodiscard]] friend constexpr bool operator==(const counted_iterator& __x, default_sentinel_t) { return __x._M_length == 0; } template<common_with<_It> _It2> [[nodiscard]] friend constexpr strong_ordering operator<=>(const counted_iterator& __x, const counted_iterator<_It2>& __y) { return __y._M_length <=> __x._M_length; } [[nodiscard]] friend constexpr iter_rvalue_reference_t<_It> iter_move(const counted_iterator& __i) noexcept(noexcept(ranges::iter_move(__i._M_current))) requires input_iterator<_It> { do { if (std::__is_constant_evaluated() && !bool(__i._M_length > 0)) __builtin_unreachable(); } while (false); return ranges::iter_move(__i._M_current); } template<indirectly_swappable<_It> _It2> friend constexpr void iter_swap(const counted_iterator& __x, const counted_iterator<_It2>& __y) noexcept(noexcept(ranges::iter_swap(__x._M_current, __y._M_current))) ; private: template<input_or_output_iterator _It2> friend class counted_iterator; _It _M_current = _It(); iter_difference_t<_It> _M_length = 0; }; template<input_iterator _It> requires same_as<__detail::__iter_traits<_It>, iterator_traits<_It>> struct iterator_traits<counted_iterator<_It>> : iterator_traits<_It> { using pointer = __conditional_t<contiguous_iterator<_It>, add_pointer_t<iter_reference_t<_It>>, void>; }; template<typename _Iterator> constexpr auto __niter_base(move_iterator<_Iterator> __it) -> decltype(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> constexpr auto __miter_base(move_iterator<_Iterator> __it) -> decltype(__miter_base(__it.base())) ; 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<const __iter_key_t<_InputIterator>, __iter_val_t<_InputIterator>>; } namespace std { namespace __debug { } } namespace __gnu_debug { using namespace std::__debug; template<typename _Ite, typename _Seq, typename _Cat> struct _Safe_iterator; } namespace __gnu_cxx { namespace __ops { struct _Iter_less_iter { template<typename _Iterator1, typename _Iterator2> constexpr bool operator()(_Iterator1 __it1, _Iterator2 __it2) const ; }; constexpr _Iter_less_iter __iter_less_iter() ; struct _Iter_less_val { constexpr _Iter_less_val() = default; constexpr explicit _Iter_less_val(_Iter_less_iter) ; template<typename _Iterator, typename _Value> constexpr bool operator()(_Iterator __it, _Value& __val) const ; }; constexpr _Iter_less_val __iter_less_val() ; constexpr _Iter_less_val __iter_comp_val(_Iter_less_iter) ; struct _Val_less_iter { constexpr _Val_less_iter() = default; constexpr explicit _Val_less_iter(_Iter_less_iter) ; template<typename _Value, typename _Iterator> constexpr bool operator()(_Value& __val, _Iterator __it) const ; }; constexpr _Val_less_iter __val_less_iter() ; constexpr _Val_less_iter __val_comp_iter(_Iter_less_iter) ; struct _Iter_equal_to_iter { template<typename _Iterator1, typename _Iterator2> constexpr bool operator()(_Iterator1 __it1, _Iterator2 __it2) const ; }; constexpr _Iter_equal_to_iter __iter_equal_to_iter() ; struct _Iter_equal_to_val { template<typename _Iterator, typename _Value> constexpr bool operator()(_Iterator __it, _Value& __val) const ; }; constexpr _Iter_equal_to_val __iter_equal_to_val() ; constexpr _Iter_equal_to_val __iter_comp_val(_Iter_equal_to_iter) ; template<typename _Compare> struct _Iter_comp_iter { _Compare _M_comp; explicit constexpr _Iter_comp_iter(_Compare __comp) ; template<typename _Iterator1, typename _Iterator2> constexpr bool operator()(_Iterator1 __it1, _Iterator2 __it2) ; }; template<typename _Compare> constexpr _Iter_comp_iter<_Compare> __iter_comp_iter(_Compare __comp) ; template<typename _Compare> struct _Iter_comp_val { _Compare _M_comp; constexpr explicit _Iter_comp_val(_Compare __comp) ; constexpr explicit _Iter_comp_val(const _Iter_comp_iter<_Compare>& __comp) ; constexpr explicit _Iter_comp_val(_Iter_comp_iter<_Compare>&& __comp) ; template<typename _Iterator, typename _Value> constexpr bool operator()(_Iterator __it, _Value& __val) ; }; template<typename _Compare> constexpr _Iter_comp_val<_Compare> __iter_comp_val(_Compare __comp) ; template<typename _Compare> constexpr _Iter_comp_val<_Compare> __iter_comp_val(_Iter_comp_iter<_Compare> __comp) ; template<typename _Compare> struct _Val_comp_iter { _Compare _M_comp; constexpr explicit _Val_comp_iter(_Compare __comp) ; constexpr explicit _Val_comp_iter(const _Iter_comp_iter<_Compare>& __comp) ; constexpr explicit _Val_comp_iter(_Iter_comp_iter<_Compare>&& __comp) ; template<typename _Value, typename _Iterator> constexpr bool operator()(_Value& __val, _Iterator __it) ; }; template<typename _Compare> constexpr _Val_comp_iter<_Compare> __val_comp_iter(_Compare __comp) ; template<typename _Compare> constexpr _Val_comp_iter<_Compare> __val_comp_iter(_Iter_comp_iter<_Compare> __comp) ; template<typename _Value> struct _Iter_equals_val { _Value& _M_value; constexpr explicit _Iter_equals_val(_Value& __value) ; template<typename _Iterator> constexpr bool operator()(_Iterator __it) ; }; template<typename _Value> constexpr _Iter_equals_val<_Value> __iter_equals_val(_Value& __val) ; template<typename _Iterator1> struct _Iter_equals_iter { _Iterator1 _M_it1; constexpr explicit _Iter_equals_iter(_Iterator1 __it1) ; template<typename _Iterator2> constexpr bool operator()(_Iterator2 __it2) ; }; template<typename _Iterator> constexpr _Iter_equals_iter<_Iterator> __iter_comp_iter(_Iter_equal_to_iter, _Iterator __it) ; template<typename _Predicate> struct _Iter_pred { _Predicate _M_pred; constexpr explicit _Iter_pred(_Predicate __pred) ; template<typename _Iterator> constexpr bool operator()(_Iterator __it) ; }; template<typename _Predicate> constexpr _Iter_pred<_Predicate> __pred_iter(_Predicate __pred) ; template<typename _Compare, typename _Value> struct _Iter_comp_to_val { _Compare _M_comp; _Value& _M_value; constexpr _Iter_comp_to_val(_Compare __comp, _Value& __value) ; template<typename _Iterator> constexpr bool operator()(_Iterator __it) ; }; template<typename _Compare, typename _Value> _Iter_comp_to_val<_Compare, _Value> constexpr __iter_comp_val(_Compare __comp, _Value &__val) ; template<typename _Compare, typename _Iterator1> struct _Iter_comp_to_iter { _Compare _M_comp; _Iterator1 _M_it1; constexpr _Iter_comp_to_iter(_Compare __comp, _Iterator1 __it1) ; template<typename _Iterator2> constexpr bool operator()(_Iterator2 __it2) ; }; template<typename _Compare, typename _Iterator> constexpr _Iter_comp_to_iter<_Compare, _Iterator> __iter_comp_iter(_Iter_comp_iter<_Compare> __comp, _Iterator __it) ; template<typename _Predicate> struct _Iter_negate { _Predicate _M_pred; constexpr explicit _Iter_negate(_Predicate __pred) ; template<typename _Iterator> constexpr bool operator()(_Iterator __it) ; }; template<typename _Predicate> constexpr _Iter_negate<_Predicate> __negate(_Iter_pred<_Predicate> __pred) ; } } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _To, typename _From> [[nodiscard]] constexpr _To bit_cast(const _From& __from) noexcept requires (sizeof(_To) == sizeof(_From)) && __is_trivially_copyable(_To) && __is_trivially_copyable(_From) ; template<typename _Tp> constexpr _Tp __rotl(_Tp __x, int __s) noexcept ; template<typename _Tp> constexpr _Tp __rotr(_Tp __x, int __s) noexcept ; template<typename _Tp> constexpr int __countl_zero(_Tp __x) noexcept ; template<typename _Tp> constexpr int __countl_one(_Tp __x) noexcept ; template<typename _Tp> constexpr int __countr_zero(_Tp __x) noexcept ; template<typename _Tp> constexpr int __countr_one(_Tp __x) noexcept ; template<typename _Tp> constexpr int __popcount(_Tp __x) noexcept ; template<typename _Tp> constexpr bool __has_single_bit(_Tp __x) noexcept ; template<typename _Tp> constexpr _Tp __bit_ceil(_Tp __x) noexcept ; template<typename _Tp> constexpr _Tp __bit_floor(_Tp __x) noexcept ; template<typename _Tp> constexpr int __bit_width(_Tp __x) noexcept ; template<typename _Tp, typename _Up = _Tp> using _If_is_unsigned_integer = enable_if_t<__is_unsigned_integer<_Tp>::value, _Up>; template<typename _Tp> [[nodiscard]] constexpr _If_is_unsigned_integer<_Tp> rotl(_Tp __x, int __s) noexcept ; template<typename _Tp> [[nodiscard]] constexpr _If_is_unsigned_integer<_Tp> rotr(_Tp __x, int __s) noexcept ; template<typename _Tp> constexpr _If_is_unsigned_integer<_Tp, int> countl_zero(_Tp __x) noexcept ; template<typename _Tp> constexpr _If_is_unsigned_integer<_Tp, int> countl_one(_Tp __x) noexcept ; template<typename _Tp> constexpr _If_is_unsigned_integer<_Tp, int> countr_zero(_Tp __x) noexcept ; template<typename _Tp> constexpr _If_is_unsigned_integer<_Tp, int> countr_one(_Tp __x) noexcept ; template<typename _Tp> constexpr _If_is_unsigned_integer<_Tp, int> popcount(_Tp __x) noexcept ; template<typename _Tp> constexpr _If_is_unsigned_integer<_Tp, bool> has_single_bit(_Tp __x) noexcept ; template<typename _Tp> constexpr _If_is_unsigned_integer<_Tp> bit_ceil(_Tp __x) noexcept ; template<typename _Tp> constexpr _If_is_unsigned_integer<_Tp> bit_floor(_Tp __x) noexcept ; template<typename _Tp> constexpr _If_is_unsigned_integer<_Tp, int> bit_width(_Tp __x) noexcept ; enum class endian { little = 1234, big = 4321, native = 1234 }; } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Tp, typename _Up> constexpr int __memcmp(const _Tp* __first1, const _Up* __first2, size_t __num) ; template<typename _ForwardIterator1, typename _ForwardIterator2> constexpr void iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) ; template<typename _ForwardIterator1, typename _ForwardIterator2> constexpr _ForwardIterator2 swap_ranges(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2) ; template<typename _Tp> constexpr const _Tp& min(const _Tp& __a, const _Tp& __b) ; template<typename _Tp> constexpr const _Tp& max(const _Tp& __a, const _Tp& __b) ; template<typename _Tp, typename _Compare> constexpr const _Tp& min(const _Tp& __a, const _Tp& __b, _Compare __comp) ; template<typename _Tp, typename _Compare> constexpr const _Tp& max(const _Tp& __a, const _Tp& __b, _Compare __comp) ; template<typename _Iterator> constexpr _Iterator __niter_base(_Iterator __it) noexcept(std::is_nothrow_copy_constructible<_Iterator>::value) ; template<typename _Ite, typename _Seq> _Ite __niter_base(const ::__gnu_debug::_Safe_iterator<_Ite, _Seq, std::random_access_iterator_tag>&); template<typename _From, typename _To> constexpr _From __niter_wrap(_From __from, _To __res) ; template<typename _Iterator> constexpr _Iterator __niter_wrap(const _Iterator&, _Iterator __res) ; template<bool _IsMove, bool _IsSimple, typename _Category> struct __copy_move { template<typename _II, typename _OI> constexpr static _OI __copy_m(_II __first, _II __last, _OI __result) ; }; template<typename _Category> struct __copy_move<true, false, _Category> { template<typename _II, typename _OI> constexpr static _OI __copy_m(_II __first, _II __last, _OI __result) ; }; template<> struct __copy_move<false, false, random_access_iterator_tag> { template<typename _II, typename _OI> constexpr static _OI __copy_m(_II __first, _II __last, _OI __result) ; template<typename _Tp, typename _Up> static void __assign_one(_Tp* __to, _Up* __from) ; }; template<> struct __copy_move<true, false, random_access_iterator_tag> { template<typename _II, typename _OI> constexpr static _OI __copy_m(_II __first, _II __last, _OI __result) ; template<typename _Tp, typename _Up> static void __assign_one(_Tp* __to, _Up* __from) ; }; template<bool _IsMove> struct __copy_move<_IsMove, true, random_access_iterator_tag> { template<typename _Tp, typename _Up> constexpr static _Up* __copy_m(_Tp* __first, _Tp* __last, _Up* __result) ; }; template<typename _Tp, typename _Ref, typename _Ptr> struct _Deque_iterator; struct _Bit_iterator; 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 _CharT> typename __gnu_cxx::__enable_if< __is_char<_CharT>::__value, std::_Deque_iterator<_CharT, _CharT&, _CharT*> >::__type __copy_move_a2( istreambuf_iterator<_CharT, char_traits<_CharT> >, istreambuf_iterator<_CharT, char_traits<_CharT> >, std::_Deque_iterator<_CharT, _CharT&, _CharT*>); template<bool _IsMove, typename _II, typename _OI> constexpr _OI __copy_move_a2(_II __first, _II __last, _OI __result) ; template<bool _IsMove, typename _Tp, typename _Ref, typename _Ptr, typename _OI> _OI __copy_move_a1(std::_Deque_iterator<_Tp, _Ref, _Ptr>, std::_Deque_iterator<_Tp, _Ref, _Ptr>, _OI); template<bool _IsMove, typename _ITp, typename _IRef, typename _IPtr, typename _OTp> std::_Deque_iterator<_OTp, _OTp&, _OTp*> __copy_move_a1(std::_Deque_iterator<_ITp, _IRef, _IPtr>, std::_Deque_iterator<_ITp, _IRef, _IPtr>, std::_Deque_iterator<_OTp, _OTp&, _OTp*>); template<bool _IsMove, typename _II, typename _Tp> typename __gnu_cxx::__enable_if< __is_random_access_iter<_II>::__value, std::_Deque_iterator<_Tp, _Tp&, _Tp*> >::__type __copy_move_a1(_II, _II, std::_Deque_iterator<_Tp, _Tp&, _Tp*>); template<bool _IsMove, typename _II, typename _OI> constexpr _OI __copy_move_a1(_II __first, _II __last, _OI __result) ; template<bool _IsMove, typename _II, typename _OI> constexpr _OI __copy_move_a(_II __first, _II __last, _OI __result) ; template<bool _IsMove, typename _Ite, typename _Seq, typename _Cat, typename _OI> _OI __copy_move_a(const ::__gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat>&, const ::__gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat>&, _OI); template<bool _IsMove, typename _II, typename _Ite, typename _Seq, typename _Cat> __gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat> __copy_move_a(_II, _II, const ::__gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat>&); template<bool _IsMove, typename _IIte, typename _ISeq, typename _ICat, typename _OIte, typename _OSeq, typename _OCat> ::__gnu_debug::_Safe_iterator<_OIte, _OSeq, _OCat> __copy_move_a(const ::__gnu_debug::_Safe_iterator<_IIte, _ISeq, _ICat>&, const ::__gnu_debug::_Safe_iterator<_IIte, _ISeq, _ICat>&, const ::__gnu_debug::_Safe_iterator<_OIte, _OSeq, _OCat>&); template<typename _InputIterator, typename _Size, typename _OutputIterator> constexpr _OutputIterator __copy_n_a(_InputIterator __first, _Size __n, _OutputIterator __result, bool) ; template<typename _CharT, typename _Size> typename __gnu_cxx::__enable_if< __is_char<_CharT>::__value, _CharT*>::__type __copy_n_a(istreambuf_iterator<_CharT, char_traits<_CharT> >, _Size, _CharT*, bool); template<typename _CharT, typename _Size> typename __gnu_cxx::__enable_if< __is_char<_CharT>::__value, std::_Deque_iterator<_CharT, _CharT&, _CharT*> >::__type __copy_n_a(istreambuf_iterator<_CharT, char_traits<_CharT> >, _Size, std::_Deque_iterator<_CharT, _CharT&, _CharT*>, bool); template<typename _II, typename _OI> constexpr _OI copy(_II __first, _II __last, _OI __result) ; template<typename _II, typename _OI> constexpr _OI move(_II __first, _II __last, _OI __result) ; template<bool _IsMove, bool _IsSimple, typename _Category> struct __copy_move_backward { template<typename _BI1, typename _BI2> constexpr static _BI2 __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) ; }; template<typename _Category> struct __copy_move_backward<true, false, _Category> { template<typename _BI1, typename _BI2> constexpr static _BI2 __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) ; }; template<> struct __copy_move_backward<false, false, random_access_iterator_tag> { template<typename _BI1, typename _BI2> constexpr static _BI2 __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) ; }; template<> struct __copy_move_backward<true, false, random_access_iterator_tag> { template<typename _BI1, typename _BI2> constexpr static _BI2 __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) ; }; template<bool _IsMove> struct __copy_move_backward<_IsMove, true, random_access_iterator_tag> { template<typename _Tp, typename _Up> constexpr static _Up* __copy_move_b(_Tp* __first, _Tp* __last, _Up* __result) ; }; template<bool _IsMove, typename _BI1, typename _BI2> constexpr _BI2 __copy_move_backward_a2(_BI1 __first, _BI1 __last, _BI2 __result) ; template<bool _IsMove, typename _BI1, typename _BI2> constexpr _BI2 __copy_move_backward_a1(_BI1 __first, _BI1 __last, _BI2 __result) ; template<bool _IsMove, typename _Tp, typename _Ref, typename _Ptr, typename _OI> _OI __copy_move_backward_a1(std::_Deque_iterator<_Tp, _Ref, _Ptr>, std::_Deque_iterator<_Tp, _Ref, _Ptr>, _OI); template<bool _IsMove, typename _ITp, typename _IRef, typename _IPtr, typename _OTp> std::_Deque_iterator<_OTp, _OTp&, _OTp*> __copy_move_backward_a1( std::_Deque_iterator<_ITp, _IRef, _IPtr>, std::_Deque_iterator<_ITp, _IRef, _IPtr>, std::_Deque_iterator<_OTp, _OTp&, _OTp*>); template<bool _IsMove, typename _II, typename _Tp> typename __gnu_cxx::__enable_if< __is_random_access_iter<_II>::__value, std::_Deque_iterator<_Tp, _Tp&, _Tp*> >::__type __copy_move_backward_a1(_II, _II, std::_Deque_iterator<_Tp, _Tp&, _Tp*>); template<bool _IsMove, typename _II, typename _OI> constexpr _OI __copy_move_backward_a(_II __first, _II __last, _OI __result) ; template<bool _IsMove, typename _Ite, typename _Seq, typename _Cat, typename _OI> _OI __copy_move_backward_a( const ::__gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat>&, const ::__gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat>&, _OI); template<bool _IsMove, typename _II, typename _Ite, typename _Seq, typename _Cat> __gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat> __copy_move_backward_a(_II, _II, const ::__gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat>&); template<bool _IsMove, typename _IIte, typename _ISeq, typename _ICat, typename _OIte, typename _OSeq, typename _OCat> ::__gnu_debug::_Safe_iterator<_OIte, _OSeq, _OCat> __copy_move_backward_a( const ::__gnu_debug::_Safe_iterator<_IIte, _ISeq, _ICat>&, const ::__gnu_debug::_Safe_iterator<_IIte, _ISeq, _ICat>&, const ::__gnu_debug::_Safe_iterator<_OIte, _OSeq, _OCat>&); template<typename _BI1, typename _BI2> constexpr _BI2 copy_backward(_BI1 __first, _BI1 __last, _BI2 __result) ; template<typename _BI1, typename _BI2> constexpr _BI2 move_backward(_BI1 __first, _BI1 __last, _BI2 __result) ; template<typename _ForwardIterator, typename _Tp> constexpr typename __gnu_cxx::__enable_if<!__is_scalar<_Tp>::__value, void>::__type __fill_a1(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) ; template<typename _ForwardIterator, typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, void>::__type __fill_a1(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) ; template<typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_byte<_Tp>::__value, void>::__type __fill_a1(_Tp* __first, _Tp* __last, const _Tp& __c) ; template<typename _Ite, typename _Cont, typename _Tp> constexpr void __fill_a1(::__gnu_cxx::__normal_iterator<_Ite, _Cont> __first, ::__gnu_cxx::__normal_iterator<_Ite, _Cont> __last, const _Tp& __value) ; template<typename _Tp, typename _VTp> void __fill_a1(const std::_Deque_iterator<_Tp, _Tp&, _Tp*>&, const std::_Deque_iterator<_Tp, _Tp&, _Tp*>&, const _VTp&); constexpr void __fill_a1(std::_Bit_iterator, std::_Bit_iterator, const bool&); template<typename _FIte, typename _Tp> constexpr void __fill_a(_FIte __first, _FIte __last, const _Tp& __value) ; template<typename _Ite, typename _Seq, typename _Cat, typename _Tp> void __fill_a(const ::__gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat>&, const ::__gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat>&, const _Tp&); template<typename _ForwardIterator, typename _Tp> constexpr void fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) ; constexpr int __size_to_integer(int __n) ; constexpr unsigned __size_to_integer(unsigned __n) ; constexpr long __size_to_integer(long __n) ; constexpr unsigned long __size_to_integer(unsigned long __n) ; constexpr long long __size_to_integer(long long __n) ; constexpr unsigned long long __size_to_integer(unsigned long long __n) ; constexpr long long __size_to_integer(float __n) ; constexpr long long __size_to_integer(double __n) ; constexpr long long __size_to_integer(long double __n) ; template<typename _OutputIterator, typename _Size, typename _Tp> constexpr typename __gnu_cxx::__enable_if<!__is_scalar<_Tp>::__value, _OutputIterator>::__type __fill_n_a1(_OutputIterator __first, _Size __n, const _Tp& __value) ; template<typename _OutputIterator, typename _Size, typename _Tp> constexpr typename __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, _OutputIterator>::__type __fill_n_a1(_OutputIterator __first, _Size __n, const _Tp& __value) ; template<typename _Ite, typename _Seq, typename _Cat, typename _Size, typename _Tp> ::__gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat> __fill_n_a(const ::__gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat>& __first, _Size __n, const _Tp& __value, std::input_iterator_tag); template<typename _OutputIterator, typename _Size, typename _Tp> constexpr _OutputIterator __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value, std::output_iterator_tag) ; template<typename _OutputIterator, typename _Size, typename _Tp> constexpr _OutputIterator __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value, std::input_iterator_tag) ; template<typename _OutputIterator, typename _Size, typename _Tp> constexpr _OutputIterator __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value, std::random_access_iterator_tag) ; template<typename _OI, typename _Size, typename _Tp> constexpr _OI fill_n(_OI __first, _Size __n, const _Tp& __value) ; template<bool _BoolType> struct __equal { template<typename _II1, typename _II2> constexpr static bool equal(_II1 __first1, _II1 __last1, _II2 __first2) ; }; template<> struct __equal<true> { template<typename _Tp> constexpr static bool equal(const _Tp* __first1, const _Tp* __last1, const _Tp* __first2) ; }; template<typename _Tp, typename _Ref, typename _Ptr, typename _II> typename __gnu_cxx::__enable_if< __is_random_access_iter<_II>::__value, bool>::__type __equal_aux1(std::_Deque_iterator<_Tp, _Ref, _Ptr>, std::_Deque_iterator<_Tp, _Ref, _Ptr>, _II); template<typename _Tp1, typename _Ref1, typename _Ptr1, typename _Tp2, typename _Ref2, typename _Ptr2> bool __equal_aux1(std::_Deque_iterator<_Tp1, _Ref1, _Ptr1>, std::_Deque_iterator<_Tp1, _Ref1, _Ptr1>, std::_Deque_iterator<_Tp2, _Ref2, _Ptr2>); template<typename _II, typename _Tp, typename _Ref, typename _Ptr> typename __gnu_cxx::__enable_if< __is_random_access_iter<_II>::__value, bool>::__type __equal_aux1(_II, _II, std::_Deque_iterator<_Tp, _Ref, _Ptr>); template<typename _II1, typename _II2> constexpr bool __equal_aux1(_II1 __first1, _II1 __last1, _II2 __first2) ; template<typename _II1, typename _II2> constexpr bool __equal_aux(_II1 __first1, _II1 __last1, _II2 __first2) ; template<typename _II1, typename _Seq1, typename _Cat1, typename _II2> bool __equal_aux(const ::__gnu_debug::_Safe_iterator<_II1, _Seq1, _Cat1>&, const ::__gnu_debug::_Safe_iterator<_II1, _Seq1, _Cat1>&, _II2); template<typename _II1, typename _II2, typename _Seq2, typename _Cat2> bool __equal_aux(_II1, _II1, const ::__gnu_debug::_Safe_iterator<_II2, _Seq2, _Cat2>&); template<typename _II1, typename _Seq1, typename _Cat1, typename _II2, typename _Seq2, typename _Cat2> bool __equal_aux(const ::__gnu_debug::_Safe_iterator<_II1, _Seq1, _Cat1>&, const ::__gnu_debug::_Safe_iterator<_II1, _Seq1, _Cat1>&, const ::__gnu_debug::_Safe_iterator<_II2, _Seq2, _Cat2>&); template<typename, typename> struct __lc_rai { template<typename _II1, typename _II2> constexpr static _II1 __newlast1(_II1, _II1 __last1, _II2, _II2) ; template<typename _II> constexpr static bool __cnd2(_II __first, _II __last) ; }; template<> struct __lc_rai<random_access_iterator_tag, random_access_iterator_tag> { template<typename _RAI1, typename _RAI2> constexpr static _RAI1 __newlast1(_RAI1 __first1, _RAI1 __last1, _RAI2 __first2, _RAI2 __last2) ; template<typename _RAI> static constexpr bool __cnd2(_RAI, _RAI) ; }; template<typename _II1, typename _II2, typename _Compare> constexpr bool __lexicographical_compare_impl(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2, _Compare __comp) ; template<bool _BoolType> struct __lexicographical_compare { template<typename _II1, typename _II2> constexpr static bool __lc(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) ; template<typename _II1, typename _II2> constexpr static int __3way(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) ; }; template<> struct __lexicographical_compare<true> { template<typename _Tp, typename _Up> constexpr static bool __lc(const _Tp* __first1, const _Tp* __last1, const _Up* __first2, const _Up* __last2) ; template<typename _Tp, typename _Up> constexpr static ptrdiff_t __3way(const _Tp* __first1, const _Tp* __last1, const _Up* __first2, const _Up* __last2) ; }; template<typename _II1, typename _II2> constexpr bool __lexicographical_compare_aux1(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) ; template<typename _Tp1, typename _Ref1, typename _Ptr1, typename _Tp2> bool __lexicographical_compare_aux1( std::_Deque_iterator<_Tp1, _Ref1, _Ptr1>, std::_Deque_iterator<_Tp1, _Ref1, _Ptr1>, _Tp2*, _Tp2*); template<typename _Tp1, typename _Tp2, typename _Ref2, typename _Ptr2> bool __lexicographical_compare_aux1(_Tp1*, _Tp1*, std::_Deque_iterator<_Tp2, _Ref2, _Ptr2>, std::_Deque_iterator<_Tp2, _Ref2, _Ptr2>); template<typename _Tp1, typename _Ref1, typename _Ptr1, typename _Tp2, typename _Ref2, typename _Ptr2> bool __lexicographical_compare_aux1( std::_Deque_iterator<_Tp1, _Ref1, _Ptr1>, std::_Deque_iterator<_Tp1, _Ref1, _Ptr1>, std::_Deque_iterator<_Tp2, _Ref2, _Ptr2>, std::_Deque_iterator<_Tp2, _Ref2, _Ptr2>); template<typename _II1, typename _II2> constexpr bool __lexicographical_compare_aux(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) ; template<typename _Iter1, typename _Seq1, typename _Cat1, typename _II2> bool __lexicographical_compare_aux( const ::__gnu_debug::_Safe_iterator<_Iter1, _Seq1, _Cat1>&, const ::__gnu_debug::_Safe_iterator<_Iter1, _Seq1, _Cat1>&, _II2, _II2); template<typename _II1, typename _Iter2, typename _Seq2, typename _Cat2> bool __lexicographical_compare_aux( _II1, _II1, const ::__gnu_debug::_Safe_iterator<_Iter2, _Seq2, _Cat2>&, const ::__gnu_debug::_Safe_iterator<_Iter2, _Seq2, _Cat2>&); template<typename _Iter1, typename _Seq1, typename _Cat1, typename _Iter2, typename _Seq2, typename _Cat2> bool __lexicographical_compare_aux( const ::__gnu_debug::_Safe_iterator<_Iter1, _Seq1, _Cat1>&, const ::__gnu_debug::_Safe_iterator<_Iter1, _Seq1, _Cat1>&, const ::__gnu_debug::_Safe_iterator<_Iter2, _Seq2, _Cat2>&, const ::__gnu_debug::_Safe_iterator<_Iter2, _Seq2, _Cat2>&); template<typename _ForwardIterator, typename _Tp, typename _Compare> constexpr _ForwardIterator __lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __val, _Compare __comp) ; template<typename _ForwardIterator, typename _Tp> constexpr _ForwardIterator lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __val) ; template<typename _Tp> constexpr _Tp __lg(_Tp __n) ; template<typename _II1, typename _II2> constexpr bool equal(_II1 __first1, _II1 __last1, _II2 __first2) ; template<typename _IIter1, typename _IIter2, typename _BinaryPredicate> constexpr bool equal(_IIter1 __first1, _IIter1 __last1, _IIter2 __first2, _BinaryPredicate __binary_pred) ; template<typename _II1, typename _II2> constexpr bool __equal4(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) ; template<typename _II1, typename _II2, typename _BinaryPredicate> constexpr bool __equal4(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2, _BinaryPredicate __binary_pred) ; template<typename _II1, typename _II2> constexpr bool equal(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) ; template<typename _IIter1, typename _IIter2, typename _BinaryPredicate> constexpr bool equal(_IIter1 __first1, _IIter1 __last1, _IIter2 __first2, _IIter2 __last2, _BinaryPredicate __binary_pred) ; template<typename _II1, typename _II2> constexpr bool lexicographical_compare(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) ; template<typename _II1, typename _II2, typename _Compare> constexpr bool lexicographical_compare(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2, _Compare __comp) ; template<typename _Iter> concept __is_byte_iter = contiguous_iterator<_Iter> && __is_memcmp_ordered<iter_value_t<_Iter>>::__value; template<typename _Tp> constexpr auto __min_cmp(_Tp __x, _Tp __y) ; template<typename _InputIter1, typename _InputIter2, typename _Comp> constexpr auto lexicographical_compare_three_way(_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2, _InputIter2 __last2, _Comp __comp) -> decltype(__comp(*__first1, *__first2)) ; template<typename _InputIter1, typename _InputIter2> constexpr auto lexicographical_compare_three_way(_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2, _InputIter2 __last2) ; template<typename _InputIterator1, typename _InputIterator2, typename _BinaryPredicate> constexpr pair<_InputIterator1, _InputIterator2> __mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _BinaryPredicate __binary_pred) ; template<typename _InputIterator1, typename _InputIterator2> constexpr pair<_InputIterator1, _InputIterator2> mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2) ; template<typename _InputIterator1, typename _InputIterator2, typename _BinaryPredicate> constexpr pair<_InputIterator1, _InputIterator2> mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _BinaryPredicate __binary_pred) ; template<typename _InputIterator1, typename _InputIterator2, typename _BinaryPredicate> constexpr pair<_InputIterator1, _InputIterator2> __mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _BinaryPredicate __binary_pred) ; template<typename _InputIterator1, typename _InputIterator2> constexpr pair<_InputIterator1, _InputIterator2> mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2) ; template<typename _InputIterator1, typename _InputIterator2, typename _BinaryPredicate> constexpr pair<_InputIterator1, _InputIterator2> mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _BinaryPredicate __binary_pred) ; template<typename _InputIterator, typename _Predicate> constexpr _InputIterator __find_if(_InputIterator __first, _InputIterator __last, _Predicate __pred, input_iterator_tag) ; template<typename _RandomAccessIterator, typename _Predicate> constexpr _RandomAccessIterator __find_if(_RandomAccessIterator __first, _RandomAccessIterator __last, _Predicate __pred, random_access_iterator_tag) ; template<typename _Iterator, typename _Predicate> constexpr _Iterator __find_if(_Iterator __first, _Iterator __last, _Predicate __pred) ; template<typename _InputIterator, typename _Predicate> constexpr typename iterator_traits<_InputIterator>::difference_type __count_if(_InputIterator __first, _InputIterator __last, _Predicate __pred) ; template<typename _ForwardIterator, typename _Predicate> constexpr _ForwardIterator __remove_if(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred) ; template<typename _ForwardIterator1, typename _ForwardIterator2, typename _BinaryPredicate> constexpr bool __is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _BinaryPredicate __pred) ; template<typename _ForwardIterator1, typename _ForwardIterator2> constexpr bool is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2) ; } namespace std __attribute__ ((__visibility__ ("default"))) { 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; constexpr initializer_list(const_iterator __a, size_type __l) ; public: constexpr initializer_list() ; constexpr size_type size() const noexcept ; constexpr const_iterator begin() const noexcept ; constexpr const_iterator end() const noexcept ; }; template<class _Tp> constexpr const _Tp* begin(initializer_list<_Tp> __ils) noexcept ; template<class _Tp> constexpr const _Tp* end(initializer_list<_Tp> __ils) noexcept ; } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _IIter, typename _Predicate> constexpr bool all_of(_IIter, _IIter, _Predicate); ; ; ; ; ; template<typename _IIter, typename _OIter> constexpr _OIter copy(_IIter, _IIter, _OIter); template<typename _BIter1, typename _BIter2> constexpr _BIter2 copy_backward(_BIter1, _BIter1, _BIter2); ; ; ; ; template<typename _FIter, typename _Tp> constexpr void fill(_FIter, _FIter, const _Tp&); template<typename _OIter, typename _Size, typename _Tp> constexpr _OIter fill_n(_OIter, _Size, const _Tp&); ; ; ; ; ; template<typename _BIter> void inplace_merge(_BIter, _BIter, _BIter); ; ; ; ; ; ; template<typename _FIter1, typename _FIter2> constexpr bool is_permutation(_FIter1, _FIter1, _FIter2); ; template<typename _FIter> constexpr bool is_sorted(_FIter, _FIter); ; ; ; template<typename _FIter1, typename _FIter2> constexpr void iter_swap(_FIter1, _FIter2); template<typename _FIter, typename _Tp> constexpr _FIter lower_bound(_FIter, _FIter, const _Tp&); ; ; ; template<typename _Tp> constexpr const _Tp& max(const _Tp&, const _Tp&); template<typename _Tp, typename _Compare> constexpr const _Tp& max(const _Tp&, const _Tp&, _Compare); template<typename _Tp> constexpr const _Tp& min(const _Tp&, const _Tp&); template<typename _Tp, typename _Compare> constexpr const _Tp& min(const _Tp&, const _Tp&, _Compare); ; ; ; ; ; ; template<typename _Tp> constexpr _Tp max(initializer_list<_Tp>); ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; template<typename _FIter, typename _Tp> constexpr _FIter remove(_FIter, _FIter, const _Tp&); template<typename _FIter, typename _Predicate> constexpr _FIter remove_if(_FIter, _FIter, _Predicate); ; ; ; ; ; ; inline namespace _V2 { ; } ; ; ; ; ; template<typename _FIter1, typename _FIter2> constexpr _FIter2 swap_ranges(_FIter1, _FIter1, _FIter2); template<typename _FIter> constexpr _FIter unique(_FIter, _FIter); ; template<typename _FIter, typename _Tp> constexpr _FIter upper_bound(_FIter, _FIter, const _Tp&); ; ; ; ; ; template<typename _IIter1, typename _IIter2> constexpr bool equal(_IIter1, _IIter1, _IIter2); template<typename _IIter1, typename _IIter2, typename _BinaryPredicate> constexpr bool equal(_IIter1, _IIter1, _IIter2, _BinaryPredicate); ; ; template<typename _FIter1, typename _FIter2, typename _BinaryPredicate> constexpr _FIter1 find_first_of(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate); ; ; ; ; template<typename _IIter1, typename _IIter2> constexpr bool lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2); template<typename _IIter1, typename _IIter2, typename _Compare> constexpr bool lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2, _Compare); ; ; ; ; ; ; template<typename _IIter1, typename _IIter2> constexpr pair<_IIter1, _IIter2> mismatch(_IIter1, _IIter1, _IIter2); template<typename _IIter1, typename _IIter2, typename _BinaryPredicate> constexpr pair<_IIter1, _IIter2> mismatch(_IIter1, _IIter1, _IIter2, _BinaryPredicate); ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; template<typename _RAIter> constexpr void sort(_RAIter, _RAIter); ; ; ; template<typename _IIter, typename _OIter, typename _UnaryOperation> constexpr _OIter transform(_IIter, _IIter, _OIter, _UnaryOperation); ; ; ; } namespace std __attribute__ ((__visibility__ ("default"))) { ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Gen> concept uniform_random_bit_generator = invocable<_Gen&> && unsigned_integral<invoke_result_t<_Gen&>> && requires { { _Gen::min() } -> same_as<invoke_result_t<_Gen&>>; { _Gen::max() } -> same_as<invoke_result_t<_Gen&>>; requires bool_constant<(_Gen::min() < _Gen::max())>::value; }; namespace __detail { ; } template<typename _IntType = int> class uniform_int_distribution { static_assert(std::is_integral<_IntType>::value, "template argument must be an integral type"); public: typedef _IntType result_type; struct param_type { typedef uniform_int_distribution<_IntType> distribution_type; private: _IntType _M_a; _IntType _M_b; }; public: result_type b() const ; param_type param() const ; void param(const param_type& __param) ; result_type min() const ; result_type max() const ; template<typename _UniformRandomBitGenerator> result_type operator()(_UniformRandomBitGenerator& __urng) ; template<typename _UniformRandomBitGenerator> result_type operator()(_UniformRandomBitGenerator& __urng, const param_type& __p); template<typename _ForwardIterator, typename _UniformRandomBitGenerator> void __generate(_ForwardIterator __f, _ForwardIterator __t, _UniformRandomBitGenerator& __urng) ; template<typename _ForwardIterator, typename _UniformRandomBitGenerator> void __generate(_ForwardIterator __f, _ForwardIterator __t, _UniformRandomBitGenerator& __urng, const param_type& __p) ; template<typename _UniformRandomBitGenerator> void __generate(result_type* __f, result_type* __t, _UniformRandomBitGenerator& __urng, const param_type& __p) ; friend bool operator==(const uniform_int_distribution& __d1, const uniform_int_distribution& __d2) ; private: template<typename _ForwardIterator, typename _UniformRandomBitGenerator> void __generate_impl(_ForwardIterator __f, _ForwardIterator __t, _UniformRandomBitGenerator& __urng, const param_type& __p); param_type _M_param; template<typename _Wp, typename _Urbg, typename _Up> static _Up _S_nd(_Urbg& __g, _Up __range) ; }; } namespace std __attribute__ ((__visibility__ ("default"))) { namespace __detail { template<typename _Tp> void __return_temporary_buffer(_Tp* __p, size_t __len __attribute__((__unused__))) ; } template<typename _Tp> [[__deprecated__]] pair<_Tp*, ptrdiff_t> get_temporary_buffer(ptrdiff_t __len) noexcept ; template<typename _Tp> void return_temporary_buffer(_Tp* __p) ; template<typename _ForwardIterator, typename _Tp> class _Temporary_buffer { public: typedef _Tp value_type; typedef value_type* pointer; typedef pointer iterator; typedef ptrdiff_t size_type; protected: size_type _M_original_len; size_type _M_len; pointer _M_buffer; public: size_type size() const ; size_type requested_size() const ; iterator begin() ; iterator end() ; _Temporary_buffer(_ForwardIterator __seed, size_type __original_len); ~_Temporary_buffer() ; private: _Temporary_buffer(const _Temporary_buffer&); void operator=(const _Temporary_buffer&); }; template<bool> struct __uninitialized_construct_buf_dispatch { template<typename _Pointer, typename _ForwardIterator> static void __ucr(_Pointer __first, _Pointer __last, _ForwardIterator __seed) ; }; template<> struct __uninitialized_construct_buf_dispatch<true> { template<typename _Pointer, typename _ForwardIterator> static void __ucr(_Pointer, _Pointer, _ForwardIterator) ; }; template<typename _Pointer, typename _ForwardIterator> void __uninitialized_construct_buf(_Pointer __first, _Pointer __last, _ForwardIterator __seed) ; #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" #pragma GCC diagnostic pop } typedef long unsigned int size_t; extern "C" { typedef float _Float32; typedef double _Float64; typedef double _Float32x; typedef long double _Float64x; typedef struct { int quot; int rem; } div_t; typedef struct { long int quot; long int rem; } ldiv_t; __extension__ typedef struct { long long int quot; long long int rem; } lldiv_t; extern size_t __ctype_get_mb_cur_max (void) noexcept (true) __attribute__ ((__warn_unused_result__)); extern double atof (const char *__nptr) noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int atoi (const char *__nptr) noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern long int atol (const char *__nptr) noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); __extension__ extern long long int atoll (const char *__nptr) noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern double strtod (const char *__restrict __nptr, char **__restrict __endptr) noexcept (true) __attribute__ ((__nonnull__ (1))); extern float strtof (const char *__restrict __nptr, char **__restrict __endptr) noexcept (true) __attribute__ ((__nonnull__ (1))); extern long double strtold (const char *__restrict __nptr, char **__restrict __endptr) noexcept (true) __attribute__ ((__nonnull__ (1))); ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; struct __locale_struct { struct __locale_data *__locales[13]; const unsigned short int *__ctype_b; const int *__ctype_tolower; const int *__ctype_toupper; const char *__names[13]; }; typedef struct __locale_struct *__locale_t; typedef __locale_t locale_t; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; extern __attribute__ ((__gnu_inline__)) int atoi (const char *__nptr) noexcept (true) ; extern __attribute__ ((__gnu_inline__)) long int atol (const char *__nptr) noexcept (true) ; __extension__ extern __attribute__ ((__gnu_inline__)) long long int atoll (const char *__nptr) noexcept (true) ; ; ; extern "C" { typedef unsigned char __u_char; typedef unsigned short int __u_short; typedef unsigned int __u_int; typedef unsigned long int __u_long; 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; typedef signed long int __int64_t; typedef unsigned long int __uint64_t; 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; typedef long int __quad_t; typedef unsigned long int __u_quad_t; typedef long int __intmax_t; typedef unsigned long int __uintmax_t; typedef unsigned long int __dev_t; typedef unsigned int __uid_t; typedef unsigned int __gid_t; typedef unsigned long int __ino_t; typedef unsigned long int __ino64_t; typedef unsigned int __mode_t; typedef unsigned long int __nlink_t; typedef long int __off_t; typedef long int __off64_t; typedef int __pid_t; typedef struct { int __val[2]; } __fsid_t; typedef long int __clock_t; typedef unsigned long int __rlim_t; typedef unsigned long int __rlim64_t; typedef unsigned int __id_t; typedef long int __time_t; typedef unsigned int __useconds_t; typedef long int __suseconds_t; typedef long int __suseconds64_t; typedef int __daddr_t; typedef int __key_t; typedef int __clockid_t; typedef void * __timer_t; typedef long int __blksize_t; typedef long int __blkcnt_t; typedef long int __blkcnt64_t; typedef unsigned long int __fsblkcnt_t; typedef unsigned long int __fsblkcnt64_t; typedef unsigned long int __fsfilcnt_t; typedef unsigned long int __fsfilcnt64_t; typedef long int __fsword_t; typedef long int __ssize_t; typedef long int __syscall_slong_t; typedef unsigned long int __syscall_ulong_t; typedef __off64_t __loff_t; typedef char *__caddr_t; typedef long int __intptr_t; typedef unsigned int __socklen_t; typedef int __sig_atomic_t; 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; typedef __loff_t loff_t; typedef __ino_t ino_t; typedef __ino64_t ino64_t; typedef __dev_t dev_t; typedef __gid_t gid_t; typedef __mode_t mode_t; typedef __nlink_t nlink_t; typedef __uid_t uid_t; typedef __off_t off_t; typedef __off64_t off64_t; typedef __pid_t pid_t; typedef __id_t id_t; typedef __ssize_t ssize_t; typedef __daddr_t daddr_t; typedef __caddr_t caddr_t; typedef __key_t key_t; typedef __clock_t clock_t; typedef __clockid_t clockid_t; typedef __time_t time_t; typedef __timer_t timer_t; typedef __useconds_t useconds_t; typedef __suseconds_t suseconds_t; typedef long unsigned int size_t; typedef unsigned long int ulong; typedef unsigned short int ushort; typedef unsigned int uint; typedef __int8_t int8_t; typedef __int16_t int16_t; typedef __int32_t int32_t; typedef __int64_t int64_t; typedef __uint8_t u_int8_t; typedef __uint16_t u_int16_t; typedef __uint32_t u_int32_t; typedef __uint64_t u_int64_t; typedef int register_t __attribute__ ((__mode__ (__word__))); ; ; ; ; ; ; typedef struct { unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; } __sigset_t; typedef __sigset_t sigset_t; struct timeval { __time_t tv_sec; __suseconds_t tv_usec; }; struct timespec { __time_t tv_sec; __syscall_slong_t tv_nsec; }; typedef long int __fd_mask; typedef struct { __fd_mask fds_bits[1024 / (8 * (int) sizeof (__fd_mask))]; } fd_set; typedef __fd_mask fd_mask; extern "C" { ; ; ; ; } typedef __blksize_t blksize_t; typedef __blkcnt_t blkcnt_t; typedef __fsblkcnt_t fsblkcnt_t; typedef __fsfilcnt_t fsfilcnt_t; typedef __blkcnt64_t blkcnt64_t; typedef __fsblkcnt64_t fsblkcnt64_t; typedef __fsfilcnt64_t fsfilcnt64_t; typedef union { __extension__ unsigned long long int __value64; struct { unsigned int __low; unsigned int __high; } __value32; } __atomic_wide_counter; 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; struct __pthread_mutex_s { int __lock; unsigned int __count; int __owner; unsigned int __nusers; int __kind; short __spins; short __elision; __pthread_list_t __list; }; 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; int __cur_writer; int __shared; signed char __rwelision; unsigned char __pad1[7]; unsigned long int __pad2; unsigned int __flags; }; struct __pthread_cond_s { __atomic_wide_counter __wseq; __atomic_wide_counter __g1_start; unsigned int __g_refs[2] ; unsigned int __g_size[2]; unsigned int __g1_orig_size; unsigned int __wrefs; unsigned int __g_signals[2]; }; typedef unsigned int __tss_t; typedef unsigned long int __thrd_t; typedef struct { int __data ; } __once_flag; typedef unsigned long int pthread_t; typedef union { char __size[4]; int __align; } pthread_mutexattr_t; typedef union { char __size[4]; int __align; } pthread_condattr_t; typedef unsigned int pthread_key_t; typedef int pthread_once_t; union pthread_attr_t { char __size[56]; long int __align; }; typedef union pthread_attr_t pthread_attr_t; typedef union { struct __pthread_mutex_s __data; char __size[40]; long int __align; } pthread_mutex_t; typedef union { struct __pthread_cond_s __data; char __size[48]; __extension__ long long int __align; } pthread_cond_t; typedef union { struct __pthread_rwlock_arch_t __data; char __size[56]; long int __align; } pthread_rwlock_t; typedef union { char __size[8]; long int __align; } pthread_rwlockattr_t; typedef volatile int pthread_spinlock_t; typedef union { char __size[32]; long int __align; } pthread_barrier_t; typedef union { char __size[4]; int __align; } pthread_barrierattr_t; } ; ; ; ; struct random_data { int32_t *fptr; int32_t *rptr; int32_t *state; int rand_type; int rand_deg; int rand_sep; int32_t *end_ptr; }; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; struct drand48_data { unsigned short int __x[3]; unsigned short int __old_x[3]; unsigned short int __c; unsigned short int __init; __extension__ unsigned long long int __a; }; ; ; ; ; ; ; ; ; ; ; ; ; extern void *malloc (size_t __size) noexcept (true) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); ; ; extern void free (void *__ptr) noexcept (true); ; ; typedef long unsigned int size_t; extern "C" { ; } ; extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) noexcept (true) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); ; extern void abort (void) noexcept (true) __attribute__ ((__noreturn__)); ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; typedef int (*__compar_fn_t) (const void *, const void *); typedef __compar_fn_t comparison_fn_t; typedef int (*__compar_d_fn_t) (const void *, const void *, void *); ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; extern __attribute__ ((__gnu_inline__)) double atof (const char *__nptr) noexcept (true) ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; } extern "C++" { namespace std __attribute__ ((__visibility__ ("default"))) { } } extern "C++" { namespace std __attribute__ ((__visibility__ ("default"))) { using ::div_t; using ::ldiv_t; using ::abort; using ::atof; using ::atoi; using ::atol; using ::free; using ::malloc; using ::strtod; } namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { using ::lldiv_t; using ::atoll; using ::strtof; using ::strtold; } namespace std { using ::__gnu_cxx::lldiv_t; using ::__gnu_cxx::atoll; using ::__gnu_cxx::strtof; using ::__gnu_cxx::strtold; } } namespace std __attribute__ ((__visibility__ ("default"))) { ; ; ; ; ; ; ; ; ; ; ; template<typename _InputIterator, typename _Predicate> constexpr bool all_of(_InputIterator __first, _InputIterator __last, _Predicate __pred) ; ; ; ; ; ; ; ; ; ; ; ; ; ; template<typename _ForwardIterator, typename _Tp> constexpr _ForwardIterator remove(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) ; template<typename _ForwardIterator, typename _Predicate> constexpr _ForwardIterator remove_if(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred) ; ; ; template<typename _ForwardIterator> constexpr _ForwardIterator unique(_ForwardIterator __first, _ForwardIterator __last) ; ; ; ; ; ; ; ; ; ; inline namespace _V2 { ; ; ; ; } ; ; ; ; ; ; ; ; ; ; ; ; ; enum { _S_threshold = 16 }; ; ; ; ; ; template<typename _RandomAccessIterator, typename _Compare> constexpr void __sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) ; template<typename _RandomAccessIterator, typename _Size, typename _Compare> constexpr void __introselect(_RandomAccessIterator __first, _RandomAccessIterator __nth, _RandomAccessIterator __last, _Size __depth_limit, _Compare __comp) ; ; template<typename _ForwardIterator, typename _Tp, typename _Compare> constexpr _ForwardIterator __upper_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __val, _Compare __comp) ; template<typename _ForwardIterator, typename _Tp> constexpr _ForwardIterator upper_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __val) ; ; template<typename _ForwardIterator, typename _Tp, typename _CompareItTp, typename _CompareTpIt> constexpr pair<_ForwardIterator, _ForwardIterator> __equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __val, _CompareItTp __comp_it_val, _CompareTpIt __comp_val_it) ; ; ; ; ; template<typename _InputIterator1, typename _InputIterator2, typename _OutputIterator, typename _Compare> void __move_merge_adaptive(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) ; template<typename _BidirectionalIterator1, typename _BidirectionalIterator2, typename _BidirectionalIterator3, typename _Compare> void __move_merge_adaptive_backward(_BidirectionalIterator1 __first1, _BidirectionalIterator1 __last1, _BidirectionalIterator2 __first2, _BidirectionalIterator2 __last2, _BidirectionalIterator3 __result, _Compare __comp) ; template<typename _BidirectionalIterator1, typename _BidirectionalIterator2, typename _Distance> _BidirectionalIterator1 __rotate_adaptive(_BidirectionalIterator1 __first, _BidirectionalIterator1 __middle, _BidirectionalIterator1 __last, _Distance __len1, _Distance __len2, _BidirectionalIterator2 __buffer, _Distance __buffer_size) ; template<typename _BidirectionalIterator, typename _Distance, typename _Pointer, typename _Compare> void __merge_adaptive(_BidirectionalIterator __first, _BidirectionalIterator __middle, _BidirectionalIterator __last, _Distance __len1, _Distance __len2, _Pointer __buffer, _Compare __comp) ; template<typename _BidirectionalIterator, typename _Distance, typename _Pointer, typename _Compare> void __merge_adaptive_resize(_BidirectionalIterator __first, _BidirectionalIterator __middle, _BidirectionalIterator __last, _Distance __len1, _Distance __len2, _Pointer __buffer, _Distance __buffer_size, _Compare __comp) ; template<typename _BidirectionalIterator, typename _Distance, typename _Compare> void __merge_without_buffer(_BidirectionalIterator __first, _BidirectionalIterator __middle, _BidirectionalIterator __last, _Distance __len1, _Distance __len2, _Compare __comp) ; template<typename _BidirectionalIterator, typename _Compare> void __inplace_merge(_BidirectionalIterator __first, _BidirectionalIterator __middle, _BidirectionalIterator __last, _Compare __comp) ; template<typename _BidirectionalIterator> void inplace_merge(_BidirectionalIterator __first, _BidirectionalIterator __middle, _BidirectionalIterator __last) ; ; template<typename _InputIterator, typename _OutputIterator, typename _Compare> _OutputIterator __move_merge(_InputIterator __first1, _InputIterator __last1, _InputIterator __first2, _InputIterator __last2, _OutputIterator __result, _Compare __comp) ; template<typename _RandomAccessIterator1, typename _RandomAccessIterator2, typename _Distance, typename _Compare> void __merge_sort_loop(_RandomAccessIterator1 __first, _RandomAccessIterator1 __last, _RandomAccessIterator2 __result, _Distance __step_size, _Compare __comp) ; template<typename _RandomAccessIterator, typename _Distance, typename _Compare> constexpr void __chunk_insertion_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Distance __chunk_size, _Compare __comp) ; enum { _S_chunk_size = 7 }; template<typename _RandomAccessIterator, typename _Pointer, typename _Compare> void __merge_sort_with_buffer(_RandomAccessIterator __first, _RandomAccessIterator __last, _Pointer __buffer, _Compare __comp) ; template<typename _RandomAccessIterator, typename _Pointer, typename _Compare> void __stable_sort_adaptive(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last, _Pointer __buffer, _Compare __comp) ; template<typename _RandomAccessIterator, typename _Pointer, typename _Distance, typename _Compare> void __stable_sort_adaptive_resize(_RandomAccessIterator __first, _RandomAccessIterator __last, _Pointer __buffer, _Distance __buffer_size, _Compare __comp) ; template<typename _RandomAccessIterator, typename _Compare> void __inplace_stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) ; template<typename _InputIterator1, typename _InputIterator2, typename _Compare> constexpr bool __includes(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _Compare __comp) ; ; ; template<typename _BidirectionalIterator, typename _Compare> constexpr bool __next_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last, _Compare __comp) ; ; ; template<typename _BidirectionalIterator, typename _Compare> constexpr bool __prev_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last, _Compare __comp) ; ; ; template<typename _InputIterator, typename _OutputIterator, typename _Predicate, typename _Tp> constexpr _OutputIterator __replace_copy_if(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _Predicate __pred, const _Tp& __new_value) ; ; ; template<typename _ForwardIterator> constexpr bool is_sorted(_ForwardIterator __first, _ForwardIterator __last) ; ; template<typename _ForwardIterator, typename _Compare> constexpr _ForwardIterator __is_sorted_until(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) ; ; ; ; ; template<typename _ForwardIterator, typename _Compare> constexpr pair<_ForwardIterator, _ForwardIterator> __minmax_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) ; ; ; ; ; ; template<typename _ForwardIterator1, typename _ForwardIterator2, typename _BinaryPredicate> constexpr bool __is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2, _BinaryPredicate __pred) ; template<typename _ForwardIterator1, typename _ForwardIterator2> constexpr bool is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2) ; template<typename _ForwardIterator1, typename _ForwardIterator2, typename _BinaryPredicate> constexpr bool is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2, _BinaryPredicate __pred) ; ; ; template<typename _IntType, typename _UniformRandomBitGenerator> pair<_IntType, _IntType> __gen_two_uniform_ints(_IntType __b0, _IntType __b1, _UniformRandomBitGenerator&& __g) ; ; ; template<typename _InputIterator, typename _Size, typename _Function> constexpr _InputIterator for_each_n(_InputIterator __first, _Size __n, _Function __f) ; ; ; ; template<typename _InputIterator, typename _ForwardIterator, typename _BinaryPredicate> constexpr _InputIterator find_first_of(_InputIterator __first1, _InputIterator __last1, _ForwardIterator __first2, _ForwardIterator __last2, _BinaryPredicate __comp) ; ; ; ; ; ; ; ; ; template<typename _ForwardIterator, typename _Searcher> constexpr _ForwardIterator search(_ForwardIterator __first, _ForwardIterator __last, const _Searcher& __searcher) ; template<typename _InputIterator, typename _OutputIterator, typename _UnaryOperation> constexpr _OutputIterator transform(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _UnaryOperation __unary_op) ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; template<typename _RandomAccessIterator> constexpr void sort(_RandomAccessIterator __first, _RandomAccessIterator __last) ; ; template<typename _InputIterator1, typename _InputIterator2, typename _OutputIterator, typename _Compare> constexpr _OutputIterator __merge(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) ; ; ; template<typename _RandomAccessIterator, typename _Compare> void __stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) ; ; ; template<typename _InputIterator1, typename _InputIterator2, typename _OutputIterator, typename _Compare> constexpr _OutputIterator __set_union(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) ; ; ; template<typename _InputIterator1, typename _InputIterator2, typename _OutputIterator, typename _Compare> constexpr _OutputIterator __set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) ; ; ; template<typename _InputIterator1, typename _InputIterator2, typename _OutputIterator, typename _Compare> constexpr _OutputIterator __set_difference(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) ; ; ; template<typename _InputIterator1, typename _InputIterator2, typename _OutputIterator, typename _Compare> constexpr _OutputIterator __set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) ; ; ; template<typename _ForwardIterator, typename _Compare> constexpr _ForwardIterator __min_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) ; ; ; template<typename _ForwardIterator, typename _Compare> constexpr _ForwardIterator __max_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) ; ; ; ; ; template<typename _Tp> constexpr _Tp max(initializer_list<_Tp> __l) ; ; template<typename _InputIterator, typename _RandomAccessIterator, typename _Size, typename _UniformRandomBitGenerator> _RandomAccessIterator __sample(_InputIterator __first, _InputIterator __last, input_iterator_tag, _RandomAccessIterator __out, random_access_iterator_tag, _Size __n, _UniformRandomBitGenerator&& __g) ; template<typename _ForwardIterator, typename _OutputIterator, typename _Cat, typename _Size, typename _UniformRandomBitGenerator> _OutputIterator __sample(_ForwardIterator __first, _ForwardIterator __last, forward_iterator_tag, _OutputIterator __out, _Cat, _Size __n, _UniformRandomBitGenerator&& __g) ; template<typename _PopulationIterator, typename _SampleIterator, typename _Distance, typename _UniformRandomBitGenerator> _SampleIterator sample(_PopulationIterator __first, _PopulationIterator __last, _SampleIterator __out, _Distance __n, _UniformRandomBitGenerator&& __g) ; } namespace std __attribute__ ((__visibility__ ("default"))) { namespace numbers { template<typename _Tp> using _Enable_if_floating = enable_if_t<is_floating_point_v<_Tp>, _Tp>; template<typename _Tp> inline constexpr _Tp e_v = _Enable_if_floating<_Tp>(2.718281828459045235360287471352662498L); template<typename _Tp> inline constexpr _Tp log2e_v = _Enable_if_floating<_Tp>(1.442695040888963407359924681001892137L); template<typename _Tp> inline constexpr _Tp log10e_v = _Enable_if_floating<_Tp>(0.434294481903251827651128918916605082L); template<typename _Tp> inline constexpr _Tp pi_v = _Enable_if_floating<_Tp>(3.141592653589793238462643383279502884L); template<typename _Tp> inline constexpr _Tp inv_pi_v = _Enable_if_floating<_Tp>(0.318309886183790671537767526745028724L); template<typename _Tp> inline constexpr _Tp inv_sqrtpi_v = _Enable_if_floating<_Tp>(0.564189583547756286948079451560772586L); template<typename _Tp> inline constexpr _Tp ln2_v = _Enable_if_floating<_Tp>(0.693147180559945309417232121458176568L); template<typename _Tp> inline constexpr _Tp ln10_v = _Enable_if_floating<_Tp>(2.302585092994045684017991454684364208L); template<typename _Tp> inline constexpr _Tp sqrt2_v = _Enable_if_floating<_Tp>(1.414213562373095048801688724209698079L); template<typename _Tp> inline constexpr _Tp sqrt3_v = _Enable_if_floating<_Tp>(1.732050807568877293527446341505872367L); template<typename _Tp> inline constexpr _Tp inv_sqrt3_v = _Enable_if_floating<_Tp>(0.577350269189625764509148780501957456L); template<typename _Tp> inline constexpr _Tp egamma_v = _Enable_if_floating<_Tp>(0.577215664901532860606512090082402431L); template<typename _Tp> inline constexpr _Tp phi_v = _Enable_if_floating<_Tp>(1.618033988749894848204586834365638118L); inline constexpr double e = e_v<double>; inline constexpr double log2e = log2e_v<double>; inline constexpr double log10e = log10e_v<double>; inline constexpr double pi = pi_v<double>; inline constexpr double inv_pi = inv_pi_v<double>; inline constexpr double inv_sqrtpi = inv_sqrtpi_v<double>; inline constexpr double ln2 = ln2_v<double>; inline constexpr double ln10 = ln10_v<double>; inline constexpr double sqrt2 = sqrt2_v<double>; inline constexpr double sqrt3 = sqrt3_v<double>; inline constexpr double inv_sqrt3 = inv_sqrt3_v<double>; inline constexpr double egamma = egamma_v<double>; inline constexpr double phi = phi_v<double>; } } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Tp> struct numeric_limits; namespace ranges { namespace __detail { class __max_size_type { public: __max_size_type() = default; template<typename _Tp> requires integral<_Tp> || __is_int128<_Tp> constexpr __max_size_type(_Tp __i) ; constexpr explicit __max_size_type(const __max_diff_type& __d) noexcept; template<typename _Tp> requires integral<_Tp> || __is_int128<_Tp> constexpr explicit operator _Tp() const noexcept ; constexpr explicit operator bool() const noexcept ; constexpr __max_size_type operator+() const noexcept ; constexpr __max_size_type operator~() const noexcept ; constexpr __max_size_type operator-() const noexcept ; constexpr __max_size_type& operator++() noexcept ; constexpr __max_size_type operator++(int) noexcept ; constexpr __max_size_type& operator--() noexcept ; constexpr __max_size_type operator--(int) noexcept ; constexpr __max_size_type& operator+=(const __max_size_type& __r) noexcept ; constexpr __max_size_type& operator-=(const __max_size_type& __r) noexcept ; constexpr __max_size_type& operator*=(__max_size_type __r) noexcept ; constexpr __max_size_type& operator/=(const __max_size_type& __r) noexcept ; constexpr __max_size_type& operator%=(const __max_size_type& __r) noexcept ; constexpr __max_size_type& operator<<=(const __max_size_type& __r) noexcept ; constexpr __max_size_type& operator>>=(const __max_size_type& __r) noexcept ; constexpr __max_size_type& operator&=(const __max_size_type& __r) noexcept ; constexpr __max_size_type& operator|=(const __max_size_type& __r) noexcept ; constexpr __max_size_type& operator^=(const __max_size_type& __r) noexcept ; template<typename _Tp> requires integral<_Tp> || __is_int128<_Tp> friend constexpr _Tp& operator+=(_Tp& __a, const __max_size_type& __b) noexcept ; template<typename _Tp> requires integral<_Tp> || __is_int128<_Tp> friend constexpr _Tp& operator-=(_Tp& __a, const __max_size_type& __b) noexcept ; template<typename _Tp> requires integral<_Tp> || __is_int128<_Tp> friend constexpr _Tp& operator*=(_Tp& __a, const __max_size_type& __b) noexcept ; template<typename _Tp> requires integral<_Tp> || __is_int128<_Tp> friend constexpr _Tp& operator/=(_Tp& __a, const __max_size_type& __b) noexcept ; template<typename _Tp> requires integral<_Tp> || __is_int128<_Tp> friend constexpr _Tp& operator%=(_Tp& __a, const __max_size_type& __b) noexcept ; template<typename _Tp> requires integral<_Tp> || __is_int128<_Tp> friend constexpr _Tp& operator&=(_Tp& __a, const __max_size_type& __b) noexcept ; template<typename _Tp> requires integral<_Tp> || __is_int128<_Tp> friend constexpr _Tp& operator|=(_Tp& __a, const __max_size_type& __b) noexcept ; template<typename _Tp> requires integral<_Tp> || __is_int128<_Tp> friend constexpr _Tp& operator^=(_Tp& __a, const __max_size_type& __b) noexcept ; template<typename _Tp> requires integral<_Tp> || __is_int128<_Tp> friend constexpr _Tp& operator<<=(_Tp& __a, const __max_size_type& __b) noexcept ; template<typename _Tp> requires integral<_Tp> || __is_int128<_Tp> friend constexpr _Tp& operator>>=(_Tp& __a, const __max_size_type& __b) noexcept ; friend constexpr __max_size_type operator+(__max_size_type __l, const __max_size_type& __r) noexcept ; friend constexpr __max_size_type operator-(__max_size_type __l, const __max_size_type& __r) noexcept ; friend constexpr __max_size_type operator*(__max_size_type __l, const __max_size_type& __r) noexcept ; friend constexpr __max_size_type operator/(__max_size_type __l, const __max_size_type& __r) noexcept ; friend constexpr __max_size_type operator%(__max_size_type __l, const __max_size_type& __r) noexcept ; friend constexpr __max_size_type operator<<(__max_size_type __l, const __max_size_type& __r) noexcept ; friend constexpr __max_size_type operator>>(__max_size_type __l, const __max_size_type& __r) noexcept ; friend constexpr __max_size_type operator&(__max_size_type __l, const __max_size_type& __r) noexcept ; friend constexpr __max_size_type operator|(__max_size_type __l, const __max_size_type& __r) noexcept ; friend constexpr __max_size_type operator^(__max_size_type __l, const __max_size_type& __r) noexcept ; friend constexpr bool operator==(const __max_size_type& __l, const __max_size_type& __r) noexcept ; friend constexpr strong_ordering operator<=>(const __max_size_type& __l, const __max_size_type& __r) noexcept ; __extension__ using __rep = unsigned __int128; static constexpr size_t _S_rep_bits = sizeof(__rep) * 8; private: __rep _M_val = 0; unsigned _M_msb:1 = 0; constexpr explicit __max_size_type(__rep __val, int __msb) ; friend __max_diff_type; friend std::numeric_limits<__max_size_type>; friend std::numeric_limits<__max_diff_type>; }; class __max_diff_type { public: __max_diff_type() = default; template<typename _Tp> requires integral<_Tp> || __is_int128<_Tp> constexpr __max_diff_type(_Tp __i) ; constexpr explicit __max_diff_type(const __max_size_type& __d) ; template<typename _Tp> requires integral<_Tp> || __is_int128<_Tp> constexpr explicit operator _Tp() const noexcept ; constexpr explicit operator bool() const noexcept ; constexpr __max_diff_type operator+() const noexcept ; constexpr __max_diff_type operator-() const noexcept ; constexpr __max_diff_type operator~() const noexcept ; constexpr __max_diff_type& operator++() noexcept ; constexpr __max_diff_type operator++(int) noexcept ; constexpr __max_diff_type& operator--() noexcept ; constexpr __max_diff_type operator--(int) noexcept ; constexpr __max_diff_type& operator+=(const __max_diff_type& __r) noexcept ; constexpr __max_diff_type& operator-=(const __max_diff_type& __r) noexcept ; constexpr __max_diff_type& operator*=(const __max_diff_type& __r) noexcept ; constexpr __max_diff_type& operator/=(const __max_diff_type& __r) noexcept ; constexpr __max_diff_type& operator%=(const __max_diff_type& __r) noexcept ; constexpr __max_diff_type& operator<<=(const __max_diff_type& __r) noexcept ; constexpr __max_diff_type& operator>>=(const __max_diff_type& __r) noexcept ; constexpr __max_diff_type& operator&=(const __max_diff_type& __r) noexcept ; constexpr __max_diff_type& operator|=(const __max_diff_type& __r) noexcept ; constexpr __max_diff_type& operator^=(const __max_diff_type& __r) noexcept ; template<typename _Tp> requires integral<_Tp> || __is_int128<_Tp> friend constexpr _Tp& operator+=(_Tp& __a, const __max_diff_type& __b) noexcept ; template<typename _Tp> requires integral<_Tp> || __is_int128<_Tp> friend constexpr _Tp& operator-=(_Tp& __a, const __max_diff_type& __b) noexcept ; template<typename _Tp> requires integral<_Tp> || __is_int128<_Tp> friend constexpr _Tp& operator*=(_Tp& __a, const __max_diff_type& __b) noexcept ; template<typename _Tp> requires integral<_Tp> || __is_int128<_Tp> friend constexpr _Tp& operator/=(_Tp& __a, const __max_diff_type& __b) noexcept ; template<typename _Tp> requires integral<_Tp> || __is_int128<_Tp> friend constexpr _Tp& operator%=(_Tp& __a, const __max_diff_type& __b) noexcept ; template<typename _Tp> requires integral<_Tp> || __is_int128<_Tp> friend constexpr _Tp& operator&=(_Tp& __a, const __max_diff_type& __b) noexcept ; template<typename _Tp> requires integral<_Tp> || __is_int128<_Tp> friend constexpr _Tp& operator|=(_Tp& __a, const __max_diff_type& __b) noexcept ; template<typename _Tp> requires integral<_Tp> || __is_int128<_Tp> friend constexpr _Tp& operator^=(_Tp& __a, const __max_diff_type& __b) noexcept ; template<typename _Tp> requires integral<_Tp> || __is_int128<_Tp> friend constexpr _Tp& operator<<=(_Tp& __a, const __max_diff_type& __b) noexcept ; template<typename _Tp> requires integral<_Tp> || __is_int128<_Tp> friend constexpr _Tp& operator>>=(_Tp& __a, const __max_diff_type& __b) noexcept ; friend constexpr __max_diff_type operator+(__max_diff_type __l, const __max_diff_type& __r) noexcept ; friend constexpr __max_diff_type operator-(__max_diff_type __l, const __max_diff_type& __r) noexcept ; friend constexpr __max_diff_type operator*(__max_diff_type __l, const __max_diff_type& __r) noexcept ; friend constexpr __max_diff_type operator/(__max_diff_type __l, const __max_diff_type& __r) noexcept ; friend constexpr __max_diff_type operator%(__max_diff_type __l, const __max_diff_type& __r) noexcept ; friend constexpr __max_diff_type operator<<(__max_diff_type __l, const __max_diff_type& __r) noexcept ; friend constexpr __max_diff_type operator>>(__max_diff_type __l, const __max_diff_type& __r) noexcept ; friend constexpr __max_diff_type operator&(__max_diff_type __l, const __max_diff_type& __r) noexcept ; friend constexpr __max_diff_type operator|(__max_diff_type __l, const __max_diff_type& __r) noexcept ; friend constexpr __max_diff_type operator^(__max_diff_type __l, const __max_diff_type& __r) noexcept ; friend constexpr bool operator==(const __max_diff_type& __l, const __max_diff_type& __r) noexcept ; constexpr strong_ordering operator<=>(const __max_diff_type& __r) const noexcept ; private: __max_size_type _M_rep = 0; friend class __max_size_type; }; } } template<> struct numeric_limits<ranges::__detail::__max_size_type> { using _Sp = ranges::__detail::__max_size_type; static constexpr bool is_specialized = true; static constexpr bool is_signed = false; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int digits = __gnu_cxx::__int_traits<_Sp::__rep>::__digits + 1; static constexpr int digits10 = static_cast<int>(digits * numbers::ln2 / numbers::ln10); static constexpr _Sp min() noexcept ; static constexpr _Sp max() noexcept ; static constexpr _Sp lowest() noexcept ; }; template<> struct numeric_limits<ranges::__detail::__max_diff_type> { using _Dp = ranges::__detail::__max_diff_type; using _Sp = ranges::__detail::__max_size_type; static constexpr bool is_specialized = true; static constexpr bool is_signed = true; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int digits = numeric_limits<_Sp>::digits - 1; static constexpr int digits10 = static_cast<int>(digits * numbers::ln2 / numbers::ln10); static constexpr _Dp min() noexcept ; static constexpr _Dp max() noexcept ; static constexpr _Dp lowest() noexcept ; }; } namespace std __attribute__ ((__visibility__ ("default"))) { namespace ranges { template<typename> inline constexpr bool disable_sized_range = false; template<typename _Tp> inline constexpr bool enable_borrowed_range = false; namespace __detail { constexpr __max_size_type __to_unsigned_like(__max_size_type __t) noexcept ; constexpr __max_size_type __to_unsigned_like(__max_diff_type __t) noexcept { return __max_size_type(__t); } template<integral _Tp> constexpr auto __to_unsigned_like(_Tp __t) noexcept { return static_cast<make_unsigned_t<_Tp>>(__t); } constexpr unsigned __int128 __to_unsigned_like(__int128 __t) noexcept { return __t; } constexpr unsigned __int128 __to_unsigned_like(unsigned __int128 __t) noexcept { return __t; } template<typename _Tp> using __make_unsigned_like_t = decltype(__detail::__to_unsigned_like(std::declval<_Tp>())); template<typename _Tp> concept __maybe_borrowed_range = is_lvalue_reference_v<_Tp> || enable_borrowed_range<remove_cvref_t<_Tp>>; } namespace __cust_access { using std::ranges::__detail::__maybe_borrowed_range; using std::__detail::__range_iter_t; struct _Begin { private: template<typename _Tp> static constexpr bool _S_noexcept() { if constexpr (is_array_v<remove_reference_t<_Tp>>) return true; else if constexpr (__member_begin<_Tp>) return noexcept(__decay_copy(std::declval<_Tp&>().begin())); else return noexcept(__decay_copy(begin(std::declval<_Tp&>()))); } public: template<__maybe_borrowed_range _Tp> requires is_array_v<remove_reference_t<_Tp>> || __member_begin<_Tp> || __adl_begin<_Tp> constexpr auto operator()[[nodiscard]](_Tp&& __t) const noexcept(_S_noexcept<_Tp&>()) { if constexpr (is_array_v<remove_reference_t<_Tp>>) { static_assert(is_lvalue_reference_v<_Tp>); return __t + 0; } else if constexpr (__member_begin<_Tp>) return __t.begin(); else return begin(__t); } }; template<typename _Tp> concept __member_end = requires(_Tp& __t) { { __decay_copy(__t.end()) } -> sentinel_for<__range_iter_t<_Tp>>; }; void end(auto&) = delete; void end(const auto&) = delete; template<typename _Tp> concept __adl_end = __class_or_enum<remove_reference_t<_Tp>> && requires(_Tp& __t) { { __decay_copy(end(__t)) } -> sentinel_for<__range_iter_t<_Tp>>; }; struct _End { private: template<typename _Tp> static constexpr bool _S_noexcept() { if constexpr (is_bounded_array_v<remove_reference_t<_Tp>>) return true; else if constexpr (__member_end<_Tp>) return noexcept(__decay_copy(std::declval<_Tp&>().end())); else return noexcept(__decay_copy(end(std::declval<_Tp&>()))); } public: template<__maybe_borrowed_range _Tp> requires is_bounded_array_v<remove_reference_t<_Tp>> || __member_end<_Tp> || __adl_end<_Tp> constexpr auto operator()[[nodiscard]](_Tp&& __t) const noexcept(_S_noexcept<_Tp&>()) { if constexpr (is_bounded_array_v<remove_reference_t<_Tp>>) { static_assert(is_lvalue_reference_v<_Tp>); return __t + extent_v<remove_reference_t<_Tp>>; } else if constexpr (__member_end<_Tp>) return __t.end(); else return end(__t); } }; template<typename _Tp> concept __member_rbegin = requires(_Tp& __t) { { __decay_copy(__t.rbegin()) } -> input_or_output_iterator; }; void rbegin(auto&) = delete; void rbegin(const auto&) = delete; template<typename _Tp> concept __adl_rbegin = __class_or_enum<remove_reference_t<_Tp>> && requires(_Tp& __t) { { __decay_copy(rbegin(__t)) } -> input_or_output_iterator; }; template<typename _Tp> concept __reversable = requires(_Tp& __t) { { _Begin{}(__t) } -> bidirectional_iterator; { _End{}(__t) } -> same_as<decltype(_Begin{}(__t))>; }; struct _RBegin { private: template<typename _Tp> static constexpr bool _S_noexcept() { if constexpr (__member_rbegin<_Tp>) return noexcept(__decay_copy(std::declval<_Tp&>().rbegin())); else if constexpr (__adl_rbegin<_Tp>) return noexcept(__decay_copy(rbegin(std::declval<_Tp&>()))); else { if constexpr (noexcept(_End{}(std::declval<_Tp&>()))) { using _It = decltype(_End{}(std::declval<_Tp&>())); return is_nothrow_copy_constructible_v<_It>; } else return false; } } public: template<__maybe_borrowed_range _Tp> requires __member_rbegin<_Tp> || __adl_rbegin<_Tp> || __reversable<_Tp> constexpr auto operator()[[nodiscard]](_Tp&& __t) const noexcept(_S_noexcept<_Tp&>()) { if constexpr (__member_rbegin<_Tp>) return __t.rbegin(); else if constexpr (__adl_rbegin<_Tp>) return rbegin(__t); else return std::make_reverse_iterator(_End{}(__t)); } }; template<typename _Tp> concept __member_rend = requires(_Tp& __t) { { __decay_copy(__t.rend()) } -> sentinel_for<decltype(_RBegin{}(std::forward<_Tp>(__t)))>; }; void rend(auto&) = delete; void rend(const auto&) = delete; template<typename _Tp> concept __adl_rend = __class_or_enum<remove_reference_t<_Tp>> && requires(_Tp& __t) { { __decay_copy(rend(__t)) } -> sentinel_for<decltype(_RBegin{}(std::forward<_Tp>(__t)))>; }; struct _REnd { private: template<typename _Tp> static constexpr bool _S_noexcept() { if constexpr (__member_rend<_Tp>) return noexcept(__decay_copy(std::declval<_Tp&>().rend())); else if constexpr (__adl_rend<_Tp>) return noexcept(__decay_copy(rend(std::declval<_Tp&>()))); else { if constexpr (noexcept(_Begin{}(std::declval<_Tp&>()))) { using _It = decltype(_Begin{}(std::declval<_Tp&>())); return is_nothrow_copy_constructible_v<_It>; } else return false; } } public: template<__maybe_borrowed_range _Tp> requires __member_rend<_Tp> || __adl_rend<_Tp> || __reversable<_Tp> constexpr auto operator()[[nodiscard]](_Tp&& __t) const noexcept(_S_noexcept<_Tp&>()) ; }; template<typename _Tp> concept __member_size = !disable_sized_range<remove_cvref_t<_Tp>> && requires(_Tp& __t) { { __decay_copy(__t.size()) } -> __detail::__is_integer_like; }; void size(auto&) = delete; void size(const auto&) = delete; template<typename _Tp> concept __adl_size = __class_or_enum<remove_reference_t<_Tp>> && !disable_sized_range<remove_cvref_t<_Tp>> && requires(_Tp& __t) { { __decay_copy(size(__t)) } -> __detail::__is_integer_like; }; template<typename _Tp> concept __sentinel_size = requires(_Tp& __t) { requires (!is_unbounded_array_v<remove_reference_t<_Tp>>); { _Begin{}(__t) } -> forward_iterator; { _End{}(__t) } -> sized_sentinel_for<decltype(_Begin{}(__t))>; __detail::__to_unsigned_like(_End{}(__t) - _Begin{}(__t)); }; struct _Size { private: template<typename _Tp> static constexpr bool _S_noexcept() ; public: template<typename _Tp> requires is_bounded_array_v<remove_reference_t<_Tp>> || __member_size<_Tp> || __adl_size<_Tp> || __sentinel_size<_Tp> constexpr auto operator()[[nodiscard]](_Tp&& __t) const noexcept(_S_noexcept<_Tp&>()) ; }; struct _SSize { template<typename _Tp> requires requires (_Tp& __t) { _Size{}(__t); } constexpr auto operator()[[nodiscard]](_Tp&& __t) const noexcept(noexcept(_Size{}(__t))) ; }; template<typename _Tp> concept __member_empty = requires(_Tp& __t) { bool(__t.empty()); }; template<typename _Tp> concept __size0_empty = requires(_Tp& __t) { _Size{}(__t) == 0; }; template<typename _Tp> concept __eq_iter_empty = requires(_Tp& __t) { requires (!is_unbounded_array_v<remove_reference_t<_Tp>>); { _Begin{}(__t) } -> forward_iterator; bool(_Begin{}(__t) == _End{}(__t)); }; struct _Empty { private: template<typename _Tp> static constexpr bool _S_noexcept() ; public: template<typename _Tp> requires __member_empty<_Tp> || __size0_empty<_Tp> || __eq_iter_empty<_Tp> constexpr bool operator()[[nodiscard]](_Tp&& __t) const noexcept(_S_noexcept<_Tp&>()) ; }; template<typename _Tp> concept __pointer_to_object = is_pointer_v<_Tp> && is_object_v<remove_pointer_t<_Tp>>; template<typename _Tp> concept __member_data = requires(_Tp& __t) { { __decay_copy(__t.data()) } -> __pointer_to_object; }; template<typename _Tp> concept __begin_data = contiguous_iterator<__range_iter_t<_Tp>>; struct _Data { private: template<typename _Tp> static constexpr bool _S_noexcept() ; public: template<__maybe_borrowed_range _Tp> requires __member_data<_Tp> || __begin_data<_Tp> constexpr auto operator()[[nodiscard]](_Tp&& __t) const noexcept(_S_noexcept<_Tp>()) ; }; } inline namespace __cust { inline constexpr __cust_access::_Begin begin{}; inline constexpr __cust_access::_End end{}; inline constexpr __cust_access::_RBegin rbegin{}; inline constexpr __cust_access::_REnd rend{}; inline constexpr __cust_access::_Size size{}; inline constexpr __cust_access::_SSize ssize{}; inline constexpr __cust_access::_Empty empty{}; inline constexpr __cust_access::_Data data{}; } template<typename _Tp> concept range = requires(_Tp& __t) { ranges::begin(__t); ranges::end(__t); }; template<typename _Tp> concept borrowed_range = range<_Tp> && __detail::__maybe_borrowed_range<_Tp>; template<typename _Tp> using iterator_t = std::__detail::__range_iter_t<_Tp>; template<range _Range> using sentinel_t = decltype(ranges::end(std::declval<_Range&>())); template<range _Range> using range_difference_t = iter_difference_t<iterator_t<_Range>>; template<range _Range> using range_value_t = iter_value_t<iterator_t<_Range>>; template<range _Range> using range_reference_t = iter_reference_t<iterator_t<_Range>>; template<range _Range> using range_rvalue_reference_t = iter_rvalue_reference_t<iterator_t<_Range>>; template<typename _Tp> concept sized_range = range<_Tp> && requires(_Tp& __t) { ranges::size(__t); }; template<sized_range _Range> using range_size_t = decltype(ranges::size(std::declval<_Range&>())); template<typename _Derived> requires is_class_v<_Derived> && same_as<_Derived, remove_cv_t<_Derived>> class view_interface; namespace __detail { template<typename _Tp, typename _Up> requires (!same_as<_Tp, view_interface<_Up>>) void __is_derived_from_view_interface_fn(const _Tp&, const view_interface<_Up>&); template<typename _Tp> concept __is_derived_from_view_interface = requires (_Tp __t) { __is_derived_from_view_interface_fn(__t, __t); }; } struct view_base { }; template<typename _Tp> inline constexpr bool enable_view = derived_from<_Tp, view_base> || __detail::__is_derived_from_view_interface<_Tp>; template<typename _Tp> concept view = range<_Tp> && movable<_Tp> && enable_view<_Tp>; template<typename _Range, typename _Tp> concept output_range = range<_Range> && output_iterator<iterator_t<_Range>, _Tp>; template<typename _Tp> concept input_range = range<_Tp> && input_iterator<iterator_t<_Tp>>; template<typename _Tp> concept forward_range = input_range<_Tp> && forward_iterator<iterator_t<_Tp>>; template<typename _Tp> concept bidirectional_range = forward_range<_Tp> && bidirectional_iterator<iterator_t<_Tp>>; template<typename _Tp> concept random_access_range = bidirectional_range<_Tp> && random_access_iterator<iterator_t<_Tp>>; template<typename _Tp> concept contiguous_range = random_access_range<_Tp> && contiguous_iterator<iterator_t<_Tp>> && requires(_Tp& __t) { { ranges::data(__t) } -> same_as<add_pointer_t<range_reference_t<_Tp>>>; }; template<typename _Tp> concept common_range = range<_Tp> && same_as<iterator_t<_Tp>, sentinel_t<_Tp>>; namespace __cust_access { template<typename _To, typename _Tp> constexpr decltype(auto) __as_const(_Tp& __t) noexcept ; struct _CBegin { template<typename _Tp> [[nodiscard]] constexpr auto operator()(_Tp&& __e) const noexcept(noexcept(_Begin{}(__cust_access::__as_const<_Tp>(__e)))) requires requires { _Begin{}(__cust_access::__as_const<_Tp>(__e)); } ; }; struct _CEnd final { template<typename _Tp> [[nodiscard]] constexpr auto operator()(_Tp&& __e) const noexcept(noexcept(_End{}(__cust_access::__as_const<_Tp>(__e)))) requires requires { _End{}(__cust_access::__as_const<_Tp>(__e)); } ; }; struct _CRBegin { template<typename _Tp> [[nodiscard]] constexpr auto operator()(_Tp&& __e) const noexcept(noexcept(_RBegin{}(__cust_access::__as_const<_Tp>(__e)))) requires requires { _RBegin{}(__cust_access::__as_const<_Tp>(__e)); } ; }; struct _CREnd { template<typename _Tp> [[nodiscard]] constexpr auto operator()(_Tp&& __e) const noexcept(noexcept(_REnd{}(__cust_access::__as_const<_Tp>(__e)))) requires requires { _REnd{}(__cust_access::__as_const<_Tp>(__e)); } ; }; struct _CData { template<typename _Tp> [[nodiscard]] constexpr auto operator()(_Tp&& __e) const noexcept(noexcept(_Data{}(__cust_access::__as_const<_Tp>(__e)))) requires requires { _Data{}(__cust_access::__as_const<_Tp>(__e)); } ; }; } inline namespace __cust { inline constexpr __cust_access::_CBegin cbegin{}; inline constexpr __cust_access::_CEnd cend{}; inline constexpr __cust_access::_CRBegin crbegin{}; inline constexpr __cust_access::_CREnd crend{}; inline constexpr __cust_access::_CData cdata{}; } namespace __detail { template<typename _Tp> inline constexpr bool __is_initializer_list = false; template<typename _Tp> inline constexpr bool __is_initializer_list<initializer_list<_Tp>> = true; } template<typename _Tp> concept viewable_range = range<_Tp> && ((view<remove_cvref_t<_Tp>> && constructible_from<remove_cvref_t<_Tp>, _Tp>) || (!view<remove_cvref_t<_Tp>> && (is_lvalue_reference_v<_Tp> || (movable<remove_reference_t<_Tp>> && !__detail::__is_initializer_list<remove_cvref_t<_Tp>>)))); struct __advance_fn final { template<input_or_output_iterator _It> constexpr void operator()(_It& __it, iter_difference_t<_It> __n) const ; template<input_or_output_iterator _It, sentinel_for<_It> _Sent> constexpr void operator()(_It& __it, _Sent __bound) const ; template<input_or_output_iterator _It, sentinel_for<_It> _Sent> constexpr iter_difference_t<_It> operator()(_It& __it, iter_difference_t<_It> __n, _Sent __bound) const ; void operator&() const = delete; }; inline constexpr __advance_fn advance{}; struct __distance_fn final { template<input_or_output_iterator _It, sentinel_for<_It> _Sent> requires (!sized_sentinel_for<_Sent, _It>) constexpr iter_difference_t<_It> operator()[[nodiscard]](_It __first, _Sent __last) const ; template<input_or_output_iterator _It, sized_sentinel_for<_It> _Sent> [[nodiscard]] constexpr iter_difference_t<_It> operator()(const _It& __first, const _Sent& __last) const ; template<range _Range> [[nodiscard]] constexpr range_difference_t<_Range> operator()(_Range&& __r) const ; void operator&() const = delete; }; inline constexpr __distance_fn distance{}; struct __next_fn final { template<input_or_output_iterator _It> [[nodiscard]] constexpr _It operator()(_It __x) const ; template<input_or_output_iterator _It> [[nodiscard]] constexpr _It operator()(_It __x, iter_difference_t<_It> __n) const ; template<input_or_output_iterator _It, sentinel_for<_It> _Sent> [[nodiscard]] constexpr _It operator()(_It __x, _Sent __bound) const ; template<input_or_output_iterator _It, sentinel_for<_It> _Sent> [[nodiscard]] constexpr _It operator()(_It __x, iter_difference_t<_It> __n, _Sent __bound) const ; void operator&() const = delete; }; inline constexpr __next_fn next{}; struct __prev_fn final { template<bidirectional_iterator _It> [[nodiscard]] constexpr _It operator()(_It __x) const ; template<bidirectional_iterator _It> [[nodiscard]] constexpr _It operator()(_It __x, iter_difference_t<_It> __n) const ; template<bidirectional_iterator _It> [[nodiscard]] constexpr _It operator()(_It __x, iter_difference_t<_It> __n, _It __bound) const ; void operator&() const = delete; }; inline constexpr __prev_fn prev{}; struct dangling { constexpr dangling() noexcept = default; template<typename... _Args> constexpr dangling(_Args&&...) noexcept ; }; template<range _Range> using borrowed_iterator_t = __conditional_t<borrowed_range<_Range>, iterator_t<_Range>, dangling>; } } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Tp, typename _Up = typename __inv_unwrap<_Tp>::type> constexpr _Up&& __invfwd(typename remove_reference<_Tp>::type& __t) noexcept ; template<typename _Res, typename _Fn, typename... _Args> constexpr _Res __invoke_impl(__invoke_other, _Fn&& __f, _Args&&... __args) ; template<typename _Res, typename _MemFun, typename _Tp, typename... _Args> constexpr _Res __invoke_impl(__invoke_memfun_ref, _MemFun&& __f, _Tp&& __t, _Args&&... __args) ; template<typename _Res, typename _MemFun, typename _Tp, typename... _Args> constexpr _Res __invoke_impl(__invoke_memfun_deref, _MemFun&& __f, _Tp&& __t, _Args&&... __args) ; template<typename _Res, typename _MemPtr, typename _Tp> constexpr _Res __invoke_impl(__invoke_memobj_ref, _MemPtr&& __f, _Tp&& __t) ; template<typename _Res, typename _MemPtr, typename _Tp> constexpr _Res __invoke_impl(__invoke_memobj_deref, _MemPtr&& __f, _Tp&& __t) ; template<typename _Callable, typename... _Args> constexpr typename __invoke_result<_Callable, _Args...>::type __invoke(_Callable&& __fn, _Args&&... __args) noexcept(__is_nothrow_invocable<_Callable, _Args...>::value) ; template<typename _Res, typename _Callable, typename... _Args> constexpr enable_if_t<is_invocable_r_v<_Res, _Callable, _Args...>, _Res> __invoke_r(_Callable&& __fn, _Args&&... __args) noexcept(is_nothrow_invocable_r_v<_Res, _Callable, _Args...>) ; } namespace std __attribute__ ((__visibility__ ("default"))) { namespace ranges { namespace __detail { template<typename _Tp> constexpr inline bool __is_normal_iterator = false; template<typename _Iterator, typename _Container> constexpr inline bool __is_normal_iterator<__gnu_cxx::__normal_iterator<_Iterator, _Container>> = true; template<typename _Tp> constexpr inline bool __is_reverse_iterator = false; template<typename _Iterator> constexpr inline bool __is_reverse_iterator<reverse_iterator<_Iterator>> = true; template<typename _Tp> constexpr inline bool __is_move_iterator = false; template<typename _Iterator> constexpr inline bool __is_move_iterator<move_iterator<_Iterator>> = true; } struct __equal_fn { template<input_iterator _Iter1, sentinel_for<_Iter1> _Sent1, input_iterator _Iter2, sentinel_for<_Iter2> _Sent2, typename _Pred = ranges::equal_to, typename _Proj1 = identity, typename _Proj2 = identity> requires indirectly_comparable<_Iter1, _Iter2, _Pred, _Proj1, _Proj2> constexpr bool operator()(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last2, _Pred __pred = {}, _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const ; template<input_range _Range1, input_range _Range2, typename _Pred = ranges::equal_to, typename _Proj1 = identity, typename _Proj2 = identity> requires indirectly_comparable<iterator_t<_Range1>, iterator_t<_Range2>, _Pred, _Proj1, _Proj2> constexpr bool operator()(_Range1&& __r1, _Range2&& __r2, _Pred __pred = {}, _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const ; }; inline constexpr __equal_fn equal{}; template<typename _Iter, typename _Out> struct in_out_result { [[no_unique_address]] _Iter in; [[no_unique_address]] _Out out; template<typename _Iter2, typename _Out2> requires convertible_to<const _Iter&, _Iter2> && convertible_to<const _Out&, _Out2> constexpr operator in_out_result<_Iter2, _Out2>() const & ; template<typename _Iter2, typename _Out2> requires convertible_to<_Iter, _Iter2> && convertible_to<_Out, _Out2> constexpr operator in_out_result<_Iter2, _Out2>() && ; }; template<typename _Iter, typename _Out> using copy_result = in_out_result<_Iter, _Out>; template<typename _Iter, typename _Out> using move_result = in_out_result<_Iter, _Out>; template<typename _Iter1, typename _Iter2> using move_backward_result = in_out_result<_Iter1, _Iter2>; template<typename _Iter1, typename _Iter2> using copy_backward_result = in_out_result<_Iter1, _Iter2>; template<bool _IsMove, bidirectional_iterator _Iter, sentinel_for<_Iter> _Sent, bidirectional_iterator _Out> requires (_IsMove ? indirectly_movable<_Iter, _Out> : indirectly_copyable<_Iter, _Out>) constexpr __conditional_t<_IsMove, move_backward_result<_Iter, _Out>, copy_backward_result<_Iter, _Out>> __copy_or_move_backward(_Iter __first, _Sent __last, _Out __result); template<bool _IsMove, input_iterator _Iter, sentinel_for<_Iter> _Sent, weakly_incrementable _Out> requires (_IsMove ? indirectly_movable<_Iter, _Out> : indirectly_copyable<_Iter, _Out>) constexpr __conditional_t<_IsMove, move_result<_Iter, _Out>, copy_result<_Iter, _Out>> __copy_or_move(_Iter __first, _Sent __last, _Out __result) ; struct __copy_fn { template<input_iterator _Iter, sentinel_for<_Iter> _Sent, weakly_incrementable _Out> requires indirectly_copyable<_Iter, _Out> constexpr copy_result<_Iter, _Out> operator()(_Iter __first, _Sent __last, _Out __result) const ; template<input_range _Range, weakly_incrementable _Out> requires indirectly_copyable<iterator_t<_Range>, _Out> constexpr copy_result<borrowed_iterator_t<_Range>, _Out> operator()(_Range&& __r, _Out __result) const ; }; inline constexpr __copy_fn copy{}; struct __move_fn { template<input_iterator _Iter, sentinel_for<_Iter> _Sent, weakly_incrementable _Out> requires indirectly_movable<_Iter, _Out> constexpr move_result<_Iter, _Out> operator()(_Iter __first, _Sent __last, _Out __result) const ; template<input_range _Range, weakly_incrementable _Out> requires indirectly_movable<iterator_t<_Range>, _Out> constexpr move_result<borrowed_iterator_t<_Range>, _Out> operator()(_Range&& __r, _Out __result) const ; }; inline constexpr __move_fn move{}; template<bool _IsMove, bidirectional_iterator _Iter, sentinel_for<_Iter> _Sent, bidirectional_iterator _Out> requires (_IsMove ? indirectly_movable<_Iter, _Out> : indirectly_copyable<_Iter, _Out>) constexpr __conditional_t<_IsMove, move_backward_result<_Iter, _Out>, copy_backward_result<_Iter, _Out>> __copy_or_move_backward(_Iter __first, _Sent __last, _Out __result) ; struct __copy_backward_fn { template<bidirectional_iterator _Iter1, sentinel_for<_Iter1> _Sent1, bidirectional_iterator _Iter2> requires indirectly_copyable<_Iter1, _Iter2> constexpr copy_backward_result<_Iter1, _Iter2> operator()(_Iter1 __first, _Sent1 __last, _Iter2 __result) const ; template<bidirectional_range _Range, bidirectional_iterator _Iter> requires indirectly_copyable<iterator_t<_Range>, _Iter> constexpr copy_backward_result<borrowed_iterator_t<_Range>, _Iter> operator()(_Range&& __r, _Iter __result) const ; }; inline constexpr __copy_backward_fn copy_backward{}; struct __move_backward_fn { template<bidirectional_iterator _Iter1, sentinel_for<_Iter1> _Sent1, bidirectional_iterator _Iter2> requires indirectly_movable<_Iter1, _Iter2> constexpr move_backward_result<_Iter1, _Iter2> operator()(_Iter1 __first, _Sent1 __last, _Iter2 __result) const ; template<bidirectional_range _Range, bidirectional_iterator _Iter> requires indirectly_movable<iterator_t<_Range>, _Iter> constexpr move_backward_result<borrowed_iterator_t<_Range>, _Iter> operator()(_Range&& __r, _Iter __result) const ; }; inline constexpr __move_backward_fn move_backward{}; template<typename _Iter, typename _Out> using copy_n_result = in_out_result<_Iter, _Out>; struct __copy_n_fn { template<input_iterator _Iter, weakly_incrementable _Out> requires indirectly_copyable<_Iter, _Out> constexpr copy_n_result<_Iter, _Out> operator()(_Iter __first, iter_difference_t<_Iter> __n, _Out __result) const ; }; inline constexpr __copy_n_fn copy_n{}; struct __fill_n_fn { template<typename _Tp, output_iterator<const _Tp&> _Out> constexpr _Out operator()(_Out __first, iter_difference_t<_Out> __n, const _Tp& __value) const ; }; inline constexpr __fill_n_fn fill_n{}; struct __fill_fn { template<typename _Tp, output_iterator<const _Tp&> _Out, sentinel_for<_Out> _Sent> constexpr _Out operator()(_Out __first, _Sent __last, const _Tp& __value) const ; template<typename _Tp, output_range<const _Tp&> _Range> constexpr borrowed_iterator_t<_Range> operator()(_Range&& __r, const _Tp& __value) const ; }; inline constexpr __fill_fn fill{}; } } namespace std __attribute__ ((__visibility__ ("default"))) { namespace ranges { namespace __detail { template<typename _Range> concept __simple_view = view<_Range> && range<const _Range> && same_as<iterator_t<_Range>, iterator_t<const _Range>> && same_as<sentinel_t<_Range>, sentinel_t<const _Range>>; template<typename _It> concept __has_arrow = input_iterator<_It> && (is_pointer_v<_It> || requires(_It __it) { __it.operator->(); }); using std::__detail::__different_from; } template<typename _Derived> requires is_class_v<_Derived> && same_as<_Derived, remove_cv_t<_Derived>> class view_interface { private: constexpr _Derived& _M_derived() noexcept ; constexpr const _Derived& _M_derived() const noexcept ; static constexpr bool _S_bool(bool) noexcept; template<typename _Tp> static constexpr bool _S_empty(_Tp& __t) noexcept(noexcept(_S_bool(ranges::begin(__t) == ranges::end(__t)))) ; template<typename _Tp> static constexpr auto _S_size(_Tp& __t) noexcept(noexcept(ranges::end(__t) - ranges::begin(__t))) ; public: constexpr bool empty() noexcept(noexcept(_S_empty(_M_derived()))) requires forward_range<_Derived> && (!sized_range<_Derived>) ; constexpr bool empty() noexcept(noexcept(ranges::size(_M_derived()) == 0)) requires sized_range<_Derived> ; constexpr bool empty() const noexcept(noexcept(_S_empty(_M_derived()))) requires forward_range<const _Derived> && (!sized_range<const _Derived>) ; constexpr bool empty() const noexcept(noexcept(ranges::size(_M_derived()) == 0)) requires sized_range<const _Derived> ; constexpr explicit operator bool() noexcept(noexcept(ranges::empty(_M_derived()))) requires requires { ranges::empty(_M_derived()); } ; constexpr explicit operator bool() const noexcept(noexcept(ranges::empty(_M_derived()))) requires requires { ranges::empty(_M_derived()); } ; constexpr auto data() noexcept(noexcept(ranges::begin(_M_derived()))) requires contiguous_iterator<iterator_t<_Derived>> ; constexpr auto data() const noexcept(noexcept(ranges::begin(_M_derived()))) requires range<const _Derived> && contiguous_iterator<iterator_t<const _Derived>> ; constexpr auto size() noexcept(noexcept(_S_size(_M_derived()))) requires forward_range<_Derived> && sized_sentinel_for<sentinel_t<_Derived>, iterator_t<_Derived>> ; constexpr auto size() const noexcept(noexcept(_S_size(_M_derived()))) requires forward_range<const _Derived> && sized_sentinel_for<sentinel_t<const _Derived>, iterator_t<const _Derived>> ; constexpr decltype(auto) front() requires forward_range<_Derived> ; constexpr decltype(auto) front() const requires forward_range<const _Derived> ; constexpr decltype(auto) back() requires bidirectional_range<_Derived> && common_range<_Derived> ; constexpr decltype(auto) back() const requires bidirectional_range<const _Derived> && common_range<const _Derived> ; template<random_access_range _Range = _Derived> constexpr decltype(auto) operator[](range_difference_t<_Range> __n) ; template<random_access_range _Range = const _Derived> constexpr decltype(auto) operator[](range_difference_t<_Range> __n) const ; }; namespace __detail { template<typename _From, typename _To> concept __uses_nonqualification_pointer_conversion = is_pointer_v<_From> && is_pointer_v<_To> && !convertible_to<remove_pointer_t<_From>(*)[], remove_pointer_t<_To>(*)[]>; template<typename _From, typename _To> concept __convertible_to_non_slicing = convertible_to<_From, _To> && !__uses_nonqualification_pointer_conversion<decay_t<_From>, decay_t<_To>>; template<typename _Tp> concept __pair_like = !is_reference_v<_Tp> && requires(_Tp __t) { typename tuple_size<_Tp>::type; requires derived_from<tuple_size<_Tp>, integral_constant<size_t, 2>>; typename tuple_element_t<0, remove_const_t<_Tp>>; typename tuple_element_t<1, remove_const_t<_Tp>>; { get<0>(__t) } -> convertible_to<const tuple_element_t<0, _Tp>&>; { get<1>(__t) } -> convertible_to<const tuple_element_t<1, _Tp>&>; }; template<typename _Tp, typename _Up, typename _Vp> concept __pair_like_convertible_from = !range<_Tp> && __pair_like<_Tp> && constructible_from<_Tp, _Up, _Vp> && __convertible_to_non_slicing<_Up, tuple_element_t<0, _Tp>> && convertible_to<_Vp, tuple_element_t<1, _Tp>>; } namespace views { struct _Drop; } enum class subrange_kind : bool { unsized, sized }; template<input_or_output_iterator _It, sentinel_for<_It> _Sent = _It, subrange_kind _Kind = sized_sentinel_for<_Sent, _It> ? subrange_kind::sized : subrange_kind::unsized> requires (_Kind == subrange_kind::sized || !sized_sentinel_for<_Sent, _It>) class subrange : public view_interface<subrange<_It, _Sent, _Kind>> { private: static constexpr bool _S_store_size = _Kind == subrange_kind::sized && !sized_sentinel_for<_Sent, _It>; friend struct views::_Drop; _It _M_begin = _It(); [[no_unique_address]] _Sent _M_end = _Sent(); using __size_type = __detail::__make_unsigned_like_t<iter_difference_t<_It>>; template<typename _Tp, bool = _S_store_size> struct _Size { [[__gnu__::__always_inline__]] constexpr _Size(_Tp = {}) ; }; template<typename _Tp> struct _Size<_Tp, true> { [[__gnu__::__always_inline__]] constexpr _Size(_Tp __s = {}) ; _Tp _M_size; }; [[no_unique_address]] _Size<__size_type> _M_size = {}; public: subrange() requires default_initializable<_It> = default; constexpr subrange(__detail::__convertible_to_non_slicing<_It> auto __i, _Sent __s) noexcept(is_nothrow_constructible_v<_It, decltype(__i)> && is_nothrow_constructible_v<_Sent, _Sent&>) requires (!_S_store_size) ; constexpr subrange(__detail::__convertible_to_non_slicing<_It> auto __i, _Sent __s, __size_type __n) noexcept(is_nothrow_constructible_v<_It, decltype(__i)> && is_nothrow_constructible_v<_Sent, _Sent&>) requires (_Kind == subrange_kind::sized) ; template<__detail::__different_from<subrange> _Rng> requires borrowed_range<_Rng> && __detail::__convertible_to_non_slicing<iterator_t<_Rng>, _It> && convertible_to<sentinel_t<_Rng>, _Sent> constexpr subrange(_Rng&& __r) noexcept(noexcept(subrange(__r, ranges::size(__r)))) ; template<__detail::__different_from<subrange> _Rng> requires borrowed_range<_Rng> && __detail::__convertible_to_non_slicing<iterator_t<_Rng>, _It> && convertible_to<sentinel_t<_Rng>, _Sent> constexpr subrange(_Rng&& __r) noexcept(noexcept(subrange(ranges::begin(__r), ranges::end(__r)))) requires (!_S_store_size) ; template<borrowed_range _Rng> requires __detail::__convertible_to_non_slicing<iterator_t<_Rng>, _It> && convertible_to<sentinel_t<_Rng>, _Sent> constexpr subrange(_Rng&& __r, __size_type __n) noexcept(noexcept(subrange(ranges::begin(__r), ranges::end(__r), __n))) requires (_Kind == subrange_kind::sized) ; template<__detail::__different_from<subrange> _PairLike> requires __detail::__pair_like_convertible_from<_PairLike, const _It&, const _Sent&> constexpr operator _PairLike() const ; constexpr _It begin() const requires copyable<_It> ; [[nodiscard]] constexpr _It begin() requires (!copyable<_It>) ; constexpr _Sent end() const ; constexpr bool empty() const ; constexpr __size_type size() const requires (_Kind == subrange_kind::sized) ; [[nodiscard]] constexpr subrange next(iter_difference_t<_It> __n = 1) const & requires forward_iterator<_It> ; [[nodiscard]] constexpr subrange next(iter_difference_t<_It> __n = 1) && ; [[nodiscard]] constexpr subrange prev(iter_difference_t<_It> __n = 1) const requires bidirectional_iterator<_It> ; constexpr subrange& advance(iter_difference_t<_It> __n) ; }; template<input_or_output_iterator _It, sentinel_for<_It> _Sent> subrange(_It, _Sent) -> subrange<_It, _Sent>; template<input_or_output_iterator _It, sentinel_for<_It> _Sent> subrange(_It, _Sent, __detail::__make_unsigned_like_t<iter_difference_t<_It>>) -> subrange<_It, _Sent, subrange_kind::sized>; template<borrowed_range _Rng> subrange(_Rng&&) -> subrange<iterator_t<_Rng>, sentinel_t<_Rng>, (sized_range<_Rng> || sized_sentinel_for<sentinel_t<_Rng>, iterator_t<_Rng>>) ? subrange_kind::sized : subrange_kind::unsized>; template<borrowed_range _Rng> subrange(_Rng&&, __detail::__make_unsigned_like_t<range_difference_t<_Rng>>) -> subrange<iterator_t<_Rng>, sentinel_t<_Rng>, subrange_kind::sized>; template<size_t _Num, class _It, class _Sent, subrange_kind _Kind> requires (_Num < 2) constexpr auto get(const subrange<_It, _Sent, _Kind>& __r) ; template<size_t _Num, class _It, class _Sent, subrange_kind _Kind> requires (_Num < 2) constexpr auto get(subrange<_It, _Sent, _Kind>&& __r) ; template<typename _It, typename _Sent, subrange_kind _Kind> inline constexpr bool enable_borrowed_range<subrange<_It, _Sent, _Kind>> = true; template<range _Range> using borrowed_subrange_t = __conditional_t<borrowed_range<_Range>, subrange<iterator_t<_Range>>, dangling>; } namespace ranges { struct __find_fn { template<input_iterator _Iter, sentinel_for<_Iter> _Sent, typename _Tp, typename _Proj = identity> requires indirect_binary_predicate<ranges::equal_to, projected<_Iter, _Proj>, const _Tp*> constexpr _Iter operator()(_Iter __first, _Sent __last, const _Tp& __value, _Proj __proj = {}) const ; template<input_range _Range, typename _Tp, typename _Proj = identity> requires indirect_binary_predicate<ranges::equal_to, projected<iterator_t<_Range>, _Proj>, const _Tp*> constexpr borrowed_iterator_t<_Range> operator()(_Range&& __r, const _Tp& __value, _Proj __proj = {}) const ; }; inline constexpr __find_fn find{}; struct __find_if_fn { template<input_iterator _Iter, sentinel_for<_Iter> _Sent, typename _Proj = identity, indirect_unary_predicate<projected<_Iter, _Proj>> _Pred> constexpr _Iter operator()(_Iter __first, _Sent __last, _Pred __pred, _Proj __proj = {}) const ; template<input_range _Range, typename _Proj = identity, indirect_unary_predicate<projected<iterator_t<_Range>, _Proj>> _Pred> constexpr borrowed_iterator_t<_Range> operator()(_Range&& __r, _Pred __pred, _Proj __proj = {}) const ; }; inline constexpr __find_if_fn find_if{}; struct __find_if_not_fn { template<input_iterator _Iter, sentinel_for<_Iter> _Sent, typename _Proj = identity, indirect_unary_predicate<projected<_Iter, _Proj>> _Pred> constexpr _Iter operator()(_Iter __first, _Sent __last, _Pred __pred, _Proj __proj = {}) const ; template<input_range _Range, typename _Proj = identity, indirect_unary_predicate<projected<iterator_t<_Range>, _Proj>> _Pred> constexpr borrowed_iterator_t<_Range> operator()(_Range&& __r, _Pred __pred, _Proj __proj = {}) const ; }; inline constexpr __find_if_not_fn find_if_not{}; template<typename _Iter1, typename _Iter2> struct in_in_result { [[no_unique_address]] _Iter1 in1; [[no_unique_address]] _Iter2 in2; template<typename _IIter1, typename _IIter2> requires convertible_to<const _Iter1&, _IIter1> && convertible_to<const _Iter2&, _IIter2> constexpr operator in_in_result<_IIter1, _IIter2>() const & ; template<typename _IIter1, typename _IIter2> requires convertible_to<_Iter1, _IIter1> && convertible_to<_Iter2, _IIter2> constexpr operator in_in_result<_IIter1, _IIter2>() && ; }; template<typename _Iter1, typename _Iter2> using mismatch_result = in_in_result<_Iter1, _Iter2>; struct __mismatch_fn { template<input_iterator _Iter1, sentinel_for<_Iter1> _Sent1, input_iterator _Iter2, sentinel_for<_Iter2> _Sent2, typename _Pred = ranges::equal_to, typename _Proj1 = identity, typename _Proj2 = identity> requires indirectly_comparable<_Iter1, _Iter2, _Pred, _Proj1, _Proj2> constexpr mismatch_result<_Iter1, _Iter2> operator()(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last2, _Pred __pred = {}, _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const ; template<input_range _Range1, input_range _Range2, typename _Pred = ranges::equal_to, typename _Proj1 = identity, typename _Proj2 = identity> requires indirectly_comparable<iterator_t<_Range1>, iterator_t<_Range2>, _Pred, _Proj1, _Proj2> constexpr mismatch_result<iterator_t<_Range1>, iterator_t<_Range2>> operator()(_Range1&& __r1, _Range2&& __r2, _Pred __pred = {}, _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const ; }; inline constexpr __mismatch_fn mismatch{}; struct __search_fn { template<forward_iterator _Iter1, sentinel_for<_Iter1> _Sent1, forward_iterator _Iter2, sentinel_for<_Iter2> _Sent2, typename _Pred = ranges::equal_to, typename _Proj1 = identity, typename _Proj2 = identity> requires indirectly_comparable<_Iter1, _Iter2, _Pred, _Proj1, _Proj2> constexpr subrange<_Iter1> operator()(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last2, _Pred __pred = {}, _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const ; template<forward_range _Range1, forward_range _Range2, typename _Pred = ranges::equal_to, typename _Proj1 = identity, typename _Proj2 = identity> requires indirectly_comparable<iterator_t<_Range1>, iterator_t<_Range2>, _Pred, _Proj1, _Proj2> constexpr borrowed_subrange_t<_Range1> operator()(_Range1&& __r1, _Range2&& __r2, _Pred __pred = {}, _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const ; }; inline constexpr __search_fn search{}; struct __min_fn { template<typename _Tp, typename _Proj = identity, indirect_strict_weak_order<projected<const _Tp*, _Proj>> _Comp = ranges::less> constexpr const _Tp& operator()(const _Tp& __a, const _Tp& __b, _Comp __comp = {}, _Proj __proj = {}) const ; ; ; }; inline constexpr __min_fn min{}; struct __adjacent_find_fn { ; ; }; inline constexpr __adjacent_find_fn adjacent_find{}; } using ranges::get; template<typename _Iter, typename _Sent, ranges::subrange_kind _Kind> struct tuple_size<ranges::subrange<_Iter, _Sent, _Kind>> : integral_constant<size_t, 2> { }; template<typename _Iter, typename _Sent, ranges::subrange_kind _Kind> struct tuple_element<0, ranges::subrange<_Iter, _Sent, _Kind>> { using type = _Iter; }; template<typename _Iter, typename _Sent, ranges::subrange_kind _Kind> struct tuple_element<1, ranges::subrange<_Iter, _Sent, _Kind>> { using type = _Sent; }; template<typename _Iter, typename _Sent, ranges::subrange_kind _Kind> struct tuple_element<0, const ranges::subrange<_Iter, _Sent, _Kind>> { using type = _Iter; }; template<typename _Iter, typename _Sent, ranges::subrange_kind _Kind> struct tuple_element<1, const ranges::subrange<_Iter, _Sent, _Kind>> { using type = _Sent; }; } namespace std __attribute__ ((__visibility__ ("default"))) { namespace ranges { namespace __detail { template<typename _Comp, typename _Proj> constexpr auto __make_comp_proj(_Comp& __comp, _Proj& __proj) ; ; } struct __all_of_fn { ; ; }; inline constexpr __all_of_fn all_of{}; struct __any_of_fn { ; ; }; inline constexpr __any_of_fn any_of{}; struct __none_of_fn { ; ; }; inline constexpr __none_of_fn none_of{}; template<typename _Iter, typename _Fp> struct in_fun_result { [[no_unique_address]] _Iter in; [[no_unique_address]] _Fp fun; ; ; }; template<typename _Iter, typename _Fp> using for_each_result = in_fun_result<_Iter, _Fp>; struct __for_each_fn { ; ; }; inline constexpr __for_each_fn for_each{}; template<typename _Iter, typename _Fp> using for_each_n_result = in_fun_result<_Iter, _Fp>; struct __for_each_n_fn { ; }; inline constexpr __for_each_n_fn for_each_n{}; struct __find_first_of_fn { ; ; }; inline constexpr __find_first_of_fn find_first_of{}; struct __count_fn { ; ; }; inline constexpr __count_fn count{}; struct __count_if_fn { ; ; }; inline constexpr __count_if_fn count_if{}; struct __search_n_fn { ; ; }; inline constexpr __search_n_fn search_n{}; struct __find_end_fn { ; ; }; inline constexpr __find_end_fn find_end{}; struct __is_permutation_fn { ; ; }; inline constexpr __is_permutation_fn is_permutation{}; template<typename _Iter, typename _Out> using copy_if_result = in_out_result<_Iter, _Out>; struct __copy_if_fn { ; ; }; inline constexpr __copy_if_fn copy_if{}; template<typename _Iter1, typename _Iter2> using swap_ranges_result = in_in_result<_Iter1, _Iter2>; struct __swap_ranges_fn { ; ; }; inline constexpr __swap_ranges_fn swap_ranges{}; template<typename _Iter, typename _Out> using unary_transform_result = in_out_result<_Iter, _Out>; template<typename _Iter1, typename _Iter2, typename _Out> struct in_in_out_result { [[no_unique_address]] _Iter1 in1; [[no_unique_address]] _Iter2 in2; [[no_unique_address]] _Out out; ; ; }; template<typename _Iter1, typename _Iter2, typename _Out> using binary_transform_result = in_in_out_result<_Iter1, _Iter2, _Out>; struct __transform_fn { ; ; ; ; }; inline constexpr __transform_fn transform{}; struct __replace_fn { ; ; }; inline constexpr __replace_fn replace{}; struct __replace_if_fn { ; ; }; inline constexpr __replace_if_fn replace_if{}; template<typename _Iter, typename _Out> using replace_copy_result = in_out_result<_Iter, _Out>; struct __replace_copy_fn { ; ; }; inline constexpr __replace_copy_fn replace_copy{}; template<typename _Iter, typename _Out> using replace_copy_if_result = in_out_result<_Iter, _Out>; struct __replace_copy_if_fn { ; ; }; inline constexpr __replace_copy_if_fn replace_copy_if{}; struct __generate_n_fn { ; }; inline constexpr __generate_n_fn generate_n{}; struct __generate_fn { ; ; }; inline constexpr __generate_fn generate{}; struct __remove_if_fn { ; ; }; inline constexpr __remove_if_fn remove_if{}; struct __remove_fn { ; ; }; inline constexpr __remove_fn remove{}; template<typename _Iter, typename _Out> using remove_copy_if_result = in_out_result<_Iter, _Out>; struct __remove_copy_if_fn { ; ; }; inline constexpr __remove_copy_if_fn remove_copy_if{}; template<typename _Iter, typename _Out> using remove_copy_result = in_out_result<_Iter, _Out>; struct __remove_copy_fn { ; ; }; inline constexpr __remove_copy_fn remove_copy{}; struct __unique_fn { ; ; }; inline constexpr __unique_fn unique{}; namespace __detail { template<typename _Out, typename _Tp> concept __can_reread_output = input_iterator<_Out> && same_as<_Tp, iter_value_t<_Out>>; } template<typename _Iter, typename _Out> using unique_copy_result = in_out_result<_Iter, _Out>; struct __unique_copy_fn { ; ; }; inline constexpr __unique_copy_fn unique_copy{}; struct __reverse_fn { ; ; }; inline constexpr __reverse_fn reverse{}; template<typename _Iter, typename _Out> using reverse_copy_result = in_out_result<_Iter, _Out>; struct __reverse_copy_fn { ; ; }; inline constexpr __reverse_copy_fn reverse_copy{}; struct __rotate_fn { ; ; }; inline constexpr __rotate_fn rotate{}; template<typename _Iter, typename _Out> using rotate_copy_result = in_out_result<_Iter, _Out>; struct __rotate_copy_fn { ; ; }; inline constexpr __rotate_copy_fn rotate_copy{}; struct __sample_fn { ; ; }; inline constexpr __sample_fn sample{}; struct __shuffle_fn { ; ; }; inline constexpr __shuffle_fn shuffle{}; struct __push_heap_fn { ; ; }; inline constexpr __push_heap_fn push_heap{}; struct __pop_heap_fn { ; ; }; inline constexpr __pop_heap_fn pop_heap{}; struct __make_heap_fn { ; ; }; inline constexpr __make_heap_fn make_heap{}; struct __sort_heap_fn { ; ; }; inline constexpr __sort_heap_fn sort_heap{}; struct __is_heap_until_fn { ; ; }; inline constexpr __is_heap_until_fn is_heap_until{}; struct __is_heap_fn { ; ; }; inline constexpr __is_heap_fn is_heap{}; struct __sort_fn { ; ; }; inline constexpr __sort_fn sort{}; struct __stable_sort_fn { ; ; }; inline constexpr __stable_sort_fn stable_sort{}; struct __partial_sort_fn { ; ; }; inline constexpr __partial_sort_fn partial_sort{}; template<typename _Iter, typename _Out> using partial_sort_copy_result = in_out_result<_Iter, _Out>; struct __partial_sort_copy_fn { ; ; }; inline constexpr __partial_sort_copy_fn partial_sort_copy{}; struct __is_sorted_until_fn { ; ; }; inline constexpr __is_sorted_until_fn is_sorted_until{}; struct __is_sorted_fn { ; ; }; inline constexpr __is_sorted_fn is_sorted{}; struct __nth_element_fn { ; ; }; inline constexpr __nth_element_fn nth_element{}; struct __lower_bound_fn { ; ; }; inline constexpr __lower_bound_fn lower_bound{}; struct __upper_bound_fn { ; ; }; inline constexpr __upper_bound_fn upper_bound{}; struct __equal_range_fn { ; ; }; inline constexpr __equal_range_fn equal_range{}; struct __binary_search_fn { ; ; }; inline constexpr __binary_search_fn binary_search{}; struct __is_partitioned_fn { ; ; }; inline constexpr __is_partitioned_fn is_partitioned{}; struct __partition_fn { ; ; }; inline constexpr __partition_fn partition{}; struct __stable_partition_fn { ; ; }; inline constexpr __stable_partition_fn stable_partition{}; template<typename _Iter, typename _Out1, typename _Out2> struct in_out_out_result { [[no_unique_address]] _Iter in; [[no_unique_address]] _Out1 out1; [[no_unique_address]] _Out2 out2; ; ; }; template<typename _Iter, typename _Out1, typename _Out2> using partition_copy_result = in_out_out_result<_Iter, _Out1, _Out2>; struct __partition_copy_fn { ; ; }; inline constexpr __partition_copy_fn partition_copy{}; struct __partition_point_fn { ; ; }; inline constexpr __partition_point_fn partition_point{}; template<typename _Iter1, typename _Iter2, typename _Out> using merge_result = in_in_out_result<_Iter1, _Iter2, _Out>; struct __merge_fn { ; ; }; inline constexpr __merge_fn merge{}; struct __inplace_merge_fn { ; ; }; inline constexpr __inplace_merge_fn inplace_merge{}; struct __includes_fn { ; ; }; inline constexpr __includes_fn includes{}; template<typename _Iter1, typename _Iter2, typename _Out> using set_union_result = in_in_out_result<_Iter1, _Iter2, _Out>; struct __set_union_fn { ; ; }; inline constexpr __set_union_fn set_union{}; template<typename _Iter1, typename _Iter2, typename _Out> using set_intersection_result = in_in_out_result<_Iter1, _Iter2, _Out>; struct __set_intersection_fn { ; template<input_range _Range1, input_range _Range2, weakly_incrementable _Out, typename _Comp = ranges::less, typename _Proj1 = identity, typename _Proj2 = identity> requires mergeable<iterator_t<_Range1>, iterator_t<_Range2>, _Out, _Comp, _Proj1, _Proj2> constexpr set_intersection_result<borrowed_iterator_t<_Range1>, borrowed_iterator_t<_Range2>, _Out> operator()(_Range1&& __r1, _Range2&& __r2, _Out __result, _Comp __comp = {}, _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const ; }; inline constexpr __set_intersection_fn set_intersection{}; template<typename _Iter, typename _Out> using set_difference_result = in_out_result<_Iter, _Out>; struct __set_difference_fn { template<input_iterator _Iter1, sentinel_for<_Iter1> _Sent1, input_iterator _Iter2, sentinel_for<_Iter2> _Sent2, weakly_incrementable _Out, typename _Comp = ranges::less, typename _Proj1 = identity, typename _Proj2 = identity> requires mergeable<_Iter1, _Iter2, _Out, _Comp, _Proj1, _Proj2> constexpr set_difference_result<_Iter1, _Out> operator()(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last2, _Out __result, _Comp __comp = {}, _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const ; template<input_range _Range1, input_range _Range2, weakly_incrementable _Out, typename _Comp = ranges::less, typename _Proj1 = identity, typename _Proj2 = identity> requires mergeable<iterator_t<_Range1>, iterator_t<_Range2>, _Out, _Comp, _Proj1, _Proj2> constexpr set_difference_result<borrowed_iterator_t<_Range1>, _Out> operator()(_Range1&& __r1, _Range2&& __r2, _Out __result, _Comp __comp = {}, _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const ; }; inline constexpr __set_difference_fn set_difference{}; template<typename _Iter1, typename _Iter2, typename _Out> using set_symmetric_difference_result = in_in_out_result<_Iter1, _Iter2, _Out>; struct __set_symmetric_difference_fn { template<input_iterator _Iter1, sentinel_for<_Iter1> _Sent1, input_iterator _Iter2, sentinel_for<_Iter2> _Sent2, weakly_incrementable _Out, typename _Comp = ranges::less, typename _Proj1 = identity, typename _Proj2 = identity> requires mergeable<_Iter1, _Iter2, _Out, _Comp, _Proj1, _Proj2> constexpr set_symmetric_difference_result<_Iter1, _Iter2, _Out> operator()(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last2, _Out __result, _Comp __comp = {}, _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const ; template<input_range _Range1, input_range _Range2, weakly_incrementable _Out, typename _Comp = ranges::less, typename _Proj1 = identity, typename _Proj2 = identity> requires mergeable<iterator_t<_Range1>, iterator_t<_Range2>, _Out, _Comp, _Proj1, _Proj2> constexpr set_symmetric_difference_result<borrowed_iterator_t<_Range1>, borrowed_iterator_t<_Range2>, _Out> operator()(_Range1&& __r1, _Range2&& __r2, _Out __result, _Comp __comp = {}, _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const ; }; inline constexpr __set_symmetric_difference_fn set_symmetric_difference{}; struct __max_fn { template<typename _Tp, typename _Proj = identity, indirect_strict_weak_order<projected<const _Tp*, _Proj>> _Comp = ranges::less> constexpr const _Tp& operator()(const _Tp& __a, const _Tp& __b, _Comp __comp = {}, _Proj __proj = {}) const ; template<input_range _Range, typename _Proj = identity, indirect_strict_weak_order<projected<iterator_t<_Range>, _Proj>> _Comp = ranges::less> requires indirectly_copyable_storable<iterator_t<_Range>, range_value_t<_Range>*> constexpr range_value_t<_Range> operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const ; template<copyable _Tp, typename _Proj = identity, indirect_strict_weak_order<projected<const _Tp*, _Proj>> _Comp = ranges::less> constexpr _Tp operator()(initializer_list<_Tp> __r, _Comp __comp = {}, _Proj __proj = {}) const ; }; inline constexpr __max_fn max{}; struct __clamp_fn { template<typename _Tp, typename _Proj = identity, indirect_strict_weak_order<projected<const _Tp*, _Proj>> _Comp = ranges::less> constexpr const _Tp& operator()(const _Tp& __val, const _Tp& __lo, const _Tp& __hi, _Comp __comp = {}, _Proj __proj = {}) const ; }; inline constexpr __clamp_fn clamp{}; template<typename _Tp> struct min_max_result { [[no_unique_address]] _Tp min; [[no_unique_address]] _Tp max; template<typename _Tp2> requires convertible_to<const _Tp&, _Tp2> constexpr operator min_max_result<_Tp2>() const & ; template<typename _Tp2> requires convertible_to<_Tp, _Tp2> constexpr operator min_max_result<_Tp2>() && ; }; template<typename _Tp> using minmax_result = min_max_result<_Tp>; struct __minmax_fn { template<typename _Tp, typename _Proj = identity, indirect_strict_weak_order<projected<const _Tp*, _Proj>> _Comp = ranges::less> constexpr minmax_result<const _Tp&> operator()(const _Tp& __a, const _Tp& __b, _Comp __comp = {}, _Proj __proj = {}) const ; template<input_range _Range, typename _Proj = identity, indirect_strict_weak_order<projected<iterator_t<_Range>, _Proj>> _Comp = ranges::less> requires indirectly_copyable_storable<iterator_t<_Range>, range_value_t<_Range>*> constexpr minmax_result<range_value_t<_Range>> operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const ; template<copyable _Tp, typename _Proj = identity, indirect_strict_weak_order<projected<const _Tp*, _Proj>> _Comp = ranges::less> constexpr minmax_result<_Tp> operator()(initializer_list<_Tp> __r, _Comp __comp = {}, _Proj __proj = {}) const ; }; inline constexpr __minmax_fn minmax{}; struct __min_element_fn { template<forward_iterator _Iter, sentinel_for<_Iter> _Sent, typename _Proj = identity, indirect_strict_weak_order<projected<_Iter, _Proj>> _Comp = ranges::less> constexpr _Iter operator()(_Iter __first, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const ; template<forward_range _Range, typename _Proj = identity, indirect_strict_weak_order<projected<iterator_t<_Range>, _Proj>> _Comp = ranges::less> constexpr borrowed_iterator_t<_Range> operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const ; }; inline constexpr __min_element_fn min_element{}; struct __max_element_fn { template<forward_iterator _Iter, sentinel_for<_Iter> _Sent, typename _Proj = identity, indirect_strict_weak_order<projected<_Iter, _Proj>> _Comp = ranges::less> constexpr _Iter operator()(_Iter __first, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const ; template<forward_range _Range, typename _Proj = identity, indirect_strict_weak_order<projected<iterator_t<_Range>, _Proj>> _Comp = ranges::less> constexpr borrowed_iterator_t<_Range> operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const ; }; inline constexpr __max_element_fn max_element{}; template<typename _Iter> using minmax_element_result = min_max_result<_Iter>; struct __minmax_element_fn { template<forward_iterator _Iter, sentinel_for<_Iter> _Sent, typename _Proj = identity, indirect_strict_weak_order<projected<_Iter, _Proj>> _Comp = ranges::less> constexpr minmax_element_result<_Iter> operator()(_Iter __first, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const ; template<forward_range _Range, typename _Proj = identity, indirect_strict_weak_order<projected<iterator_t<_Range>, _Proj>> _Comp = ranges::less> constexpr minmax_element_result<borrowed_iterator_t<_Range>> operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const ; }; inline constexpr __minmax_element_fn minmax_element{}; struct __lexicographical_compare_fn { template<input_iterator _Iter1, sentinel_for<_Iter1> _Sent1, input_iterator _Iter2, sentinel_for<_Iter2> _Sent2, typename _Proj1 = identity, typename _Proj2 = identity, indirect_strict_weak_order<projected<_Iter1, _Proj1>, projected<_Iter2, _Proj2>> _Comp = ranges::less> constexpr bool operator()(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last2, _Comp __comp = {}, _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const ; template<input_range _Range1, input_range _Range2, typename _Proj1 = identity, typename _Proj2 = identity, indirect_strict_weak_order<projected<iterator_t<_Range1>, _Proj1>, projected<iterator_t<_Range2>, _Proj2>> _Comp = ranges::less> constexpr bool operator()(_Range1&& __r1, _Range2&& __r2, _Comp __comp = {}, _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const ; private: template<typename _Iter, typename _Ref = iter_reference_t<_Iter>> static constexpr bool __ptr_to_nonvolatile = is_pointer_v<_Iter> && !is_volatile_v<remove_reference_t<_Ref>>; }; inline constexpr __lexicographical_compare_fn lexicographical_compare; template<typename _Iter> struct in_found_result { [[no_unique_address]] _Iter in; bool found; template<typename _Iter2> requires convertible_to<const _Iter&, _Iter2> constexpr operator in_found_result<_Iter2>() const & ; template<typename _Iter2> requires convertible_to<_Iter, _Iter2> constexpr operator in_found_result<_Iter2>() && ; }; template<typename _Iter> using next_permutation_result = in_found_result<_Iter>; struct __next_permutation_fn { template<bidirectional_iterator _Iter, sentinel_for<_Iter> _Sent, typename _Comp = ranges::less, typename _Proj = identity> requires sortable<_Iter, _Comp, _Proj> constexpr next_permutation_result<_Iter> operator()(_Iter __first, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const ; template<bidirectional_range _Range, typename _Comp = ranges::less, typename _Proj = identity> requires sortable<iterator_t<_Range>, _Comp, _Proj> constexpr next_permutation_result<borrowed_iterator_t<_Range>> operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const ; }; inline constexpr __next_permutation_fn next_permutation{}; template<typename _Iter> using prev_permutation_result = in_found_result<_Iter>; struct __prev_permutation_fn { template<bidirectional_iterator _Iter, sentinel_for<_Iter> _Sent, typename _Comp = ranges::less, typename _Proj = identity> requires sortable<_Iter, _Comp, _Proj> constexpr prev_permutation_result<_Iter> operator()(_Iter __first, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const ; template<bidirectional_range _Range, typename _Comp = ranges::less, typename _Proj = identity> requires sortable<iterator_t<_Range>, _Comp, _Proj> constexpr prev_permutation_result<borrowed_iterator_t<_Range>> operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const { return (*this)(ranges::begin(__r), ranges::end(__r), std::move(__comp), std::move(__proj)); } }; inline constexpr __prev_permutation_fn prev_permutation{}; } template<typename _ForwardIterator> constexpr _ForwardIterator shift_left(_ForwardIterator __first, _ForwardIterator __last, typename iterator_traits<_ForwardIterator>::difference_type __n) { do { if (std::__is_constant_evaluated() && !bool(__n >= 0)) __builtin_unreachable(); } while (false); if (__n == 0) return __last; auto __mid = ranges::next(__first, __n, __last); if (__mid == __last) return __first; return std::move(std::move(__mid), std::move(__last), std::move(__first)); } } namespace __pstl { namespace execution { inline namespace v1 { class sequenced_policy { public: }; class parallel_policy { public: }; class parallel_unsequenced_policy { public: }; class unsequenced_policy { public: }; inline constexpr sequenced_policy seq{}; inline constexpr parallel_policy par{}; inline constexpr parallel_unsequenced_policy par_unseq{}; inline constexpr unsequenced_policy unseq{}; template <class _Tp> struct is_execution_policy : std::false_type { }; template <> struct is_execution_policy<__pstl::execution::sequenced_policy> : std::true_type { }; template <> struct is_execution_policy<__pstl::execution::parallel_policy> : std::true_type { }; template <> struct is_execution_policy<__pstl::execution::parallel_unsequenced_policy> : std::true_type { }; template <> struct is_execution_policy<__pstl::execution::unsequenced_policy> : std::true_type { }; template <class _Tp> constexpr bool is_execution_policy_v = __pstl::execution::is_execution_policy<_Tp>::value; } } namespace __internal { template <class _ExecPolicy, class _Tp> using __enable_if_execution_policy = typename std::enable_if<__pstl::execution::is_execution_policy<std::__remove_cvref_t<_ExecPolicy>>::value, _Tp>::type; } } namespace std { ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; } typedef __uint8_t uint8_t; typedef __uint16_t uint16_t; typedef __uint32_t uint32_t; typedef __uint64_t uint64_t; 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; 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; typedef signed char int_fast8_t; typedef long int int_fast16_t; typedef long int int_fast32_t; typedef long int int_fast64_t; typedef unsigned char uint_fast8_t; typedef unsigned long int uint_fast16_t; typedef unsigned long int uint_fast32_t; typedef unsigned long int uint_fast64_t; typedef long int intptr_t; typedef unsigned long int uintptr_t; typedef __intmax_t intmax_t; typedef __uintmax_t uintmax_t; namespace std { 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; } namespace std __attribute__ ((__visibility__ ("default"))) { template<intmax_t _Pn> struct __static_sign : integral_constant<intmax_t, (_Pn < 0) ? -1 : 1> { }; template<intmax_t _Pn> struct __static_abs : integral_constant<intmax_t, _Pn * __static_sign<_Pn>::value> { }; template<intmax_t _Pn, intmax_t _Qn> struct __static_gcd : __static_gcd<_Qn, (_Pn % _Qn)> { }; template<intmax_t _Pn> struct __static_gcd<_Pn, 0> : integral_constant<intmax_t, __static_abs<_Pn>::value> { }; template<intmax_t _Qn> struct __static_gcd<0, _Qn> : integral_constant<intmax_t, __static_abs<_Qn>::value> { }; template<intmax_t _Pn, intmax_t _Qn> struct __safe_multiply { private: static const uintmax_t __c = uintmax_t(1) << (sizeof(intmax_t) * 4); static const uintmax_t __a0 = __static_abs<_Pn>::value % __c; static const uintmax_t __a1 = __static_abs<_Pn>::value / __c; static const uintmax_t __b0 = __static_abs<_Qn>::value % __c; static const uintmax_t __b1 = __static_abs<_Qn>::value / __c; static_assert(__a1 == 0 || __b1 == 0, "overflow in multiplication"); static_assert(__a0 * __b1 + __b0 * __a1 < (__c >> 1), "overflow in multiplication"); static_assert(__b0 * __a0 <= 9223372036854775807L, "overflow in multiplication"); static_assert((__a0 * __b1 + __b0 * __a1) * __c <= 9223372036854775807L - __b0 * __a0, "overflow in multiplication"); public: static const intmax_t value = _Pn * _Qn; }; template<uintmax_t __hi1, uintmax_t __lo1, uintmax_t __hi2, uintmax_t __lo2> struct __big_less : integral_constant<bool, (__hi1 < __hi2 || (__hi1 == __hi2 && __lo1 < __lo2))> { }; template<uintmax_t __hi1, uintmax_t __lo1, uintmax_t __hi2, uintmax_t __lo2> struct __big_add { static constexpr uintmax_t __lo = __lo1 + __lo2; static constexpr uintmax_t __hi = (__hi1 + __hi2 + (__lo1 + __lo2 < __lo1)); }; template<uintmax_t __hi1, uintmax_t __lo1, uintmax_t __hi2, uintmax_t __lo2> struct __big_sub { static_assert(!__big_less<__hi1, __lo1, __hi2, __lo2>::value, "Internal library error"); static constexpr uintmax_t __lo = __lo1 - __lo2; static constexpr uintmax_t __hi = (__hi1 - __hi2 - (__lo1 < __lo2)); }; template<uintmax_t __x, uintmax_t __y> struct __big_mul { private: static constexpr uintmax_t __c = uintmax_t(1) << (sizeof(intmax_t) * 4); static constexpr uintmax_t __x0 = __x % __c; static constexpr uintmax_t __x1 = __x / __c; static constexpr uintmax_t __y0 = __y % __c; static constexpr uintmax_t __y1 = __y / __c; static constexpr uintmax_t __x0y0 = __x0 * __y0; static constexpr uintmax_t __x0y1 = __x0 * __y1; static constexpr uintmax_t __x1y0 = __x1 * __y0; static constexpr uintmax_t __x1y1 = __x1 * __y1; static constexpr uintmax_t __mix = __x0y1 + __x1y0; static constexpr uintmax_t __mix_lo = __mix * __c; static constexpr uintmax_t __mix_hi = __mix / __c + ((__mix < __x0y1) ? __c : 0); typedef __big_add<__mix_hi, __mix_lo, __x1y1, __x0y0> _Res; public: static constexpr uintmax_t __hi = _Res::__hi; static constexpr uintmax_t __lo = _Res::__lo; }; template<uintmax_t __n1, uintmax_t __n0, uintmax_t __d> struct __big_div_impl { private: static_assert(__d >= (uintmax_t(1) << (sizeof(intmax_t) * 8 - 1)), "Internal library error"); static_assert(__n1 < __d, "Internal library error"); static constexpr uintmax_t __c = uintmax_t(1) << (sizeof(intmax_t) * 4); static constexpr uintmax_t __d1 = __d / __c; static constexpr uintmax_t __d0 = __d % __c; static constexpr uintmax_t __q1x = __n1 / __d1; static constexpr uintmax_t __r1x = __n1 % __d1; static constexpr uintmax_t __m = __q1x * __d0; static constexpr uintmax_t __r1y = __r1x * __c + __n0 / __c; static constexpr uintmax_t __r1z = __r1y + __d; static constexpr uintmax_t __r1 = ((__r1y < __m) ? ((__r1z >= __d) && (__r1z < __m)) ? (__r1z + __d) : __r1z : __r1y) - __m; static constexpr uintmax_t __q1 = __q1x - ((__r1y < __m) ? ((__r1z >= __d) && (__r1z < __m)) ? 2 : 1 : 0); static constexpr uintmax_t __q0x = __r1 / __d1; static constexpr uintmax_t __r0x = __r1 % __d1; static constexpr uintmax_t __n = __q0x * __d0; static constexpr uintmax_t __r0y = __r0x * __c + __n0 % __c; static constexpr uintmax_t __r0z = __r0y + __d; static constexpr uintmax_t __r0 = ((__r0y < __n) ? ((__r0z >= __d) && (__r0z < __n)) ? (__r0z + __d) : __r0z : __r0y) - __n; static constexpr uintmax_t __q0 = __q0x - ((__r0y < __n) ? ((__r0z >= __d) && (__r0z < __n)) ? 2 : 1 : 0); public: static constexpr uintmax_t __quot = __q1 * __c + __q0; static constexpr uintmax_t __rem = __r0; private: typedef __big_mul<__quot, __d> _Prod; typedef __big_add<_Prod::__hi, _Prod::__lo, 0, __rem> _Sum; static_assert(_Sum::__hi == __n1 && _Sum::__lo == __n0, "Internal library error"); }; template<uintmax_t __n1, uintmax_t __n0, uintmax_t __d> struct __big_div { private: static_assert(__d != 0, "Internal library error"); static_assert(sizeof (uintmax_t) == sizeof (unsigned long long), "This library calls __builtin_clzll on uintmax_t, which " "is unsafe on your platform. Please complain to " "http://gcc.gnu.org/bugzilla/"); static constexpr int __shift = __builtin_clzll(__d); static constexpr int __coshift_ = sizeof(uintmax_t) * 8 - __shift; static constexpr int __coshift = (__shift != 0) ? __coshift_ : 0; static constexpr uintmax_t __c1 = uintmax_t(1) << __shift; static constexpr uintmax_t __c2 = uintmax_t(1) << __coshift; static constexpr uintmax_t __new_d = __d * __c1; static constexpr uintmax_t __new_n0 = __n0 * __c1; static constexpr uintmax_t __n1_shifted = (__n1 % __d) * __c1; static constexpr uintmax_t __n0_top = (__shift != 0) ? (__n0 / __c2) : 0; static constexpr uintmax_t __new_n1 = __n1_shifted + __n0_top; typedef __big_div_impl<__new_n1, __new_n0, __new_d> _Res; public: static constexpr uintmax_t __quot_hi = __n1 / __d; static constexpr uintmax_t __quot_lo = _Res::__quot; static constexpr uintmax_t __rem = _Res::__rem / __c1; private: typedef __big_mul<__quot_lo, __d> _P0; typedef __big_mul<__quot_hi, __d> _P1; typedef __big_add<_P0::__hi, _P0::__lo, _P1::__lo, __rem> _Sum; static_assert(_P1::__hi == 0, "Internal library error"); static_assert(_Sum::__hi >= _P0::__hi, "Internal library error"); static_assert(_Sum::__hi == __n1 && _Sum::__lo == __n0, "Internal library error"); static_assert(__rem < __d, "Internal library error"); }; template<intmax_t _Num, intmax_t _Den = 1> struct ratio { static_assert(_Den != 0, "denominator cannot be zero"); static_assert(_Num >= -9223372036854775807L && _Den >= -9223372036854775807L, "out of range"); static constexpr intmax_t num = _Num * __static_sign<_Den>::value / __static_gcd<_Num, _Den>::value; static constexpr intmax_t den = __static_abs<_Den>::value / __static_gcd<_Num, _Den>::value; typedef ratio<num, den> type; }; template<typename _Tp> struct __is_ratio : std::false_type { }; template<intmax_t _Num, intmax_t _Den> struct __is_ratio<ratio<_Num, _Den>> : std::true_type { }; template<typename _Tp> constexpr bool __is_ratio_v = false; template<intmax_t _Num, intmax_t _Den> constexpr bool __is_ratio_v<ratio<_Num, _Den>> = true; template<typename _R1, typename _R2> constexpr bool __are_both_ratios() noexcept { if constexpr (__is_ratio_v<_R1>) if constexpr (__is_ratio_v<_R2>) return true; return false; } template<typename _R1, typename _R2> struct __ratio_multiply { static_assert(std::__are_both_ratios<_R1, _R2>(), "both template arguments must be a std::ratio"); private: static const intmax_t __gcd1 = __static_gcd<_R1::num, _R2::den>::value; static const intmax_t __gcd2 = __static_gcd<_R2::num, _R1::den>::value; public: typedef ratio< __safe_multiply<(_R1::num / __gcd1), (_R2::num / __gcd2)>::value, __safe_multiply<(_R1::den / __gcd2), (_R2::den / __gcd1)>::value> type; static constexpr intmax_t num = type::num; static constexpr intmax_t den = type::den; }; template<typename _R1, typename _R2> using ratio_multiply = typename __ratio_multiply<_R1, _R2>::type; template<typename _R1, typename _R2> struct __ratio_divide { static_assert(_R2::num != 0, "division by 0"); typedef typename __ratio_multiply< _R1, ratio<_R2::den, _R2::num>>::type type; static constexpr intmax_t num = type::num; static constexpr intmax_t den = type::den; }; template<typename _R1, typename _R2> using ratio_divide = typename __ratio_divide<_R1, _R2>::type; template<typename _R1, typename _R2> struct ratio_equal : integral_constant<bool, _R1::num == _R2::num && _R1::den == _R2::den> { static_assert(std::__are_both_ratios<_R1, _R2>(), "both template arguments must be a std::ratio"); }; template<typename _R1, typename _R2> struct ratio_not_equal : integral_constant<bool, !ratio_equal<_R1, _R2>::value> { }; template<typename _R1, typename _R2, typename _Left = __big_mul<_R1::num,_R2::den>, typename _Right = __big_mul<_R2::num,_R1::den> > struct __ratio_less_impl_1 : integral_constant<bool, __big_less<_Left::__hi, _Left::__lo, _Right::__hi, _Right::__lo>::value> { }; template<typename _R1, typename _R2, bool = (_R1::num == 0 || _R2::num == 0 || (__static_sign<_R1::num>::value != __static_sign<_R2::num>::value)), bool = (__static_sign<_R1::num>::value == -1 && __static_sign<_R2::num>::value == -1)> struct __ratio_less_impl : __ratio_less_impl_1<_R1, _R2>::type { }; template<typename _R1, typename _R2> struct __ratio_less_impl<_R1, _R2, true, false> : integral_constant<bool, _R1::num < _R2::num> { }; template<typename _R1, typename _R2> struct __ratio_less_impl<_R1, _R2, false, true> : __ratio_less_impl_1<ratio<-_R2::num, _R2::den>, ratio<-_R1::num, _R1::den> >::type { }; template<typename _R1, typename _R2> struct ratio_less : __ratio_less_impl<_R1, _R2>::type { static_assert(std::__are_both_ratios<_R1, _R2>(), "both template arguments must be a std::ratio"); }; template<typename _R1, typename _R2> struct ratio_less_equal : integral_constant<bool, !ratio_less<_R2, _R1>::value> { }; template<typename _R1, typename _R2> struct ratio_greater : integral_constant<bool, ratio_less<_R2, _R1>::value> { }; template<typename _R1, typename _R2> struct ratio_greater_equal : integral_constant<bool, !ratio_less<_R1, _R2>::value> { }; template <typename _R1, typename _R2> inline constexpr bool ratio_equal_v = ratio_equal<_R1, _R2>::value; template <typename _R1, typename _R2> inline constexpr bool ratio_not_equal_v = ratio_not_equal<_R1, _R2>::value; template <typename _R1, typename _R2> inline constexpr bool ratio_less_v = ratio_less<_R1, _R2>::value; template <typename _R1, typename _R2> inline constexpr bool ratio_less_equal_v = ratio_less_equal<_R1, _R2>::value; template <typename _R1, typename _R2> inline constexpr bool ratio_greater_v = ratio_greater<_R1, _R2>::value; template <typename _R1, typename _R2> inline constexpr bool ratio_greater_equal_v = ratio_greater_equal<_R1, _R2>::value; template<typename _R1, typename _R2, bool = (_R1::num >= 0), bool = (_R2::num >= 0), bool = ratio_less<ratio<__static_abs<_R1::num>::value, _R1::den>, ratio<__static_abs<_R2::num>::value, _R2::den> >::value> struct __ratio_add_impl { private: typedef typename __ratio_add_impl< ratio<-_R1::num, _R1::den>, ratio<-_R2::num, _R2::den> >::type __t; public: typedef ratio<-__t::num, __t::den> type; }; template<typename _R1, typename _R2, bool __b> struct __ratio_add_impl<_R1, _R2, true, true, __b> { private: static constexpr uintmax_t __g = __static_gcd<_R1::den, _R2::den>::value; static constexpr uintmax_t __d2 = _R2::den / __g; typedef __big_mul<_R1::den, __d2> __d; typedef __big_mul<_R1::num, _R2::den / __g> __x; typedef __big_mul<_R2::num, _R1::den / __g> __y; typedef __big_add<__x::__hi, __x::__lo, __y::__hi, __y::__lo> __n; static_assert(__n::__hi >= __x::__hi, "Internal library error"); typedef __big_div<__n::__hi, __n::__lo, __g> __ng; static constexpr uintmax_t __g2 = __static_gcd<__ng::__rem, __g>::value; typedef __big_div<__n::__hi, __n::__lo, __g2> __n_final; static_assert(__n_final::__rem == 0, "Internal library error"); static_assert(__n_final::__quot_hi == 0 && __n_final::__quot_lo <= 9223372036854775807L, "overflow in addition"); typedef __big_mul<_R1::den / __g2, __d2> __d_final; static_assert(__d_final::__hi == 0 && __d_final::__lo <= 9223372036854775807L, "overflow in addition"); public: typedef ratio<__n_final::__quot_lo, __d_final::__lo> type; }; template<typename _R1, typename _R2> struct __ratio_add_impl<_R1, _R2, false, true, true> : __ratio_add_impl<_R2, _R1> { }; template<typename _R1, typename _R2> struct __ratio_add_impl<_R1, _R2, true, false, false> { private: static constexpr uintmax_t __g = __static_gcd<_R1::den, _R2::den>::value; static constexpr uintmax_t __d2 = _R2::den / __g; typedef __big_mul<_R1::den, __d2> __d; typedef __big_mul<_R1::num, _R2::den / __g> __x; typedef __big_mul<-_R2::num, _R1::den / __g> __y; typedef __big_sub<__x::__hi, __x::__lo, __y::__hi, __y::__lo> __n; typedef __big_div<__n::__hi, __n::__lo, __g> __ng; static constexpr uintmax_t __g2 = __static_gcd<__ng::__rem, __g>::value; typedef __big_div<__n::__hi, __n::__lo, __g2> __n_final; static_assert(__n_final::__rem == 0, "Internal library error"); static_assert(__n_final::__quot_hi == 0 && __n_final::__quot_lo <= 9223372036854775807L, "overflow in addition"); typedef __big_mul<_R1::den / __g2, __d2> __d_final; static_assert(__d_final::__hi == 0 && __d_final::__lo <= 9223372036854775807L, "overflow in addition"); public: typedef ratio<__n_final::__quot_lo, __d_final::__lo> type; }; template<typename _R1, typename _R2> struct __ratio_add { static_assert(std::__are_both_ratios<_R1, _R2>(), "both template arguments must be a std::ratio"); typedef typename __ratio_add_impl<_R1, _R2>::type type; static constexpr intmax_t num = type::num; static constexpr intmax_t den = type::den; }; template<typename _R1, typename _R2> using ratio_add = typename __ratio_add<_R1, _R2>::type; template<typename _R1, typename _R2> struct __ratio_subtract { typedef typename __ratio_add< _R1, ratio<-_R2::num, _R2::den>>::type type; static constexpr intmax_t num = type::num; static constexpr intmax_t den = type::den; }; template<typename _R1, typename _R2> using ratio_subtract = typename __ratio_subtract<_R1, _R2>::type; typedef ratio<1, 1000000000000000000> atto; typedef ratio<1, 1000000000000000> femto; typedef ratio<1, 1000000000000> pico; typedef ratio<1, 1000000000> nano; typedef ratio<1, 1000000> micro; typedef ratio<1, 1000> milli; typedef ratio<1, 100> centi; typedef ratio<1, 10> deci; typedef ratio< 10, 1> deca; typedef ratio< 100, 1> hecto; typedef ratio< 1000, 1> kilo; typedef ratio< 1000000, 1> mega; typedef ratio< 1000000000, 1> giga; typedef ratio< 1000000000000, 1> tera; typedef ratio< 1000000000000000, 1> peta; typedef ratio< 1000000000000000000, 1> exa; } namespace std __attribute__ ((__visibility__ ("default"))) { enum float_round_style { round_indeterminate = -1, round_toward_zero = 0, round_to_nearest = 1, round_toward_infinity = 2, round_toward_neg_infinity = 3 }; enum float_denorm_style { denorm_indeterminate = -1, denorm_absent = 0, denorm_present = 1 }; struct __numeric_limits_base { static constexpr bool is_specialized = false; static constexpr int digits = 0; static constexpr int digits10 = 0; static constexpr int max_digits10 = 0; static constexpr bool is_signed = false; static constexpr bool is_integer = false; static constexpr bool is_exact = false; static constexpr int radix = 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 bool is_iec559 = false; static constexpr bool is_bounded = false; static constexpr bool is_modulo = false; static constexpr bool traps = false; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<typename _Tp> struct numeric_limits : public __numeric_limits_base { }; 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> { }; template<> struct numeric_limits<bool> { static constexpr bool is_specialized = true; static constexpr bool min() noexcept { return false; } static constexpr int digits = 1; static constexpr int digits10 = 0; static constexpr int max_digits10 = 0; static constexpr bool is_signed = false; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr 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 bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = false; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits<char> { static constexpr bool is_specialized = true; static constexpr char min() noexcept ; static constexpr char max() noexcept ; static constexpr int digits = (sizeof(char) * 8 - ((char)(-1) < 0)); static constexpr int digits10 = ((sizeof(char) * 8 - ((char)(-1) < 0)) * 643L / 2136); static constexpr int max_digits10 = 0; static constexpr bool is_signed = ((char)(-1) < 0); static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; 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 bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = !is_signed; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits<signed char> { static constexpr bool is_specialized = true; static constexpr signed char min() noexcept ; static constexpr int digits = (sizeof(signed char) * 8 - ((signed char)(-1) < 0)); static constexpr int digits10 = ((sizeof(signed char) * 8 - ((signed char)(-1) < 0)) * 643L / 2136); static constexpr int max_digits10 = 0; static constexpr bool is_signed = true; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr 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 bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = false; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits<unsigned char> { static constexpr bool is_specialized = true; static constexpr unsigned char min() noexcept ; static constexpr unsigned char max() noexcept { return 127 * 2U + 1; } static constexpr int digits = (sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0)); static constexpr int digits10 = ((sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0)) * 643L / 2136); static constexpr int max_digits10 = 0; static constexpr bool is_signed = false; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr 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 bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = true; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits<wchar_t> { static constexpr bool is_specialized = true; static constexpr wchar_t min() noexcept { return (((wchar_t)(-1) < 0) ? -(((wchar_t)(-1) < 0) ? (((((wchar_t)1 << ((sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(wchar_t)0) - 1 : (wchar_t)0); } static constexpr int digits = (sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)); static constexpr int digits10 = ((sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) * 643L / 2136); static constexpr int max_digits10 = 0; static constexpr bool is_signed = ((wchar_t)(-1) < 0); static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; 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 bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = !is_signed; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits<char8_t> { static constexpr bool is_specialized = true; static constexpr char8_t min() noexcept { return (((char8_t)(-1) < 0) ? -(((char8_t)(-1) < 0) ? (((((char8_t)1 << ((sizeof(char8_t) * 8 - ((char8_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char8_t)0) - 1 : (char8_t)0); } static constexpr char8_t max() noexcept { return (((char8_t)(-1) < 0) ? (((((char8_t)1 << ((sizeof(char8_t) * 8 - ((char8_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char8_t)0); } static constexpr char8_t lowest() noexcept { return min(); } static constexpr int digits = (sizeof(char8_t) * 8 - ((char8_t)(-1) < 0)); static constexpr int digits10 = ((sizeof(char8_t) * 8 - ((char8_t)(-1) < 0)) * 643L / 2136); static constexpr int max_digits10 = 0; static constexpr bool is_signed = ((char8_t)(-1) < 0); static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr char8_t epsilon() noexcept { return 0; } static constexpr char8_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 char8_t infinity() noexcept { return char8_t(); } static constexpr char8_t quiet_NaN() noexcept { return char8_t(); } static constexpr char8_t signaling_NaN() noexcept { return char8_t(); } static constexpr char8_t denorm_min() noexcept { return char8_t(); } static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = !is_signed; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits<char16_t> { static constexpr bool is_specialized = true; static constexpr char16_t min() noexcept { return (((char16_t)(-1) < 0) ? -(((char16_t)(-1) < 0) ? (((((char16_t)1 << ((sizeof(char16_t) * 8 - ((char16_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char16_t)0) - 1 : (char16_t)0); } static constexpr int digits = (sizeof(char16_t) * 8 - ((char16_t)(-1) < 0)); static constexpr int digits10 = ((sizeof(char16_t) * 8 - ((char16_t)(-1) < 0)) * 643L / 2136); static constexpr int max_digits10 = 0; static constexpr bool is_signed = ((char16_t)(-1) < 0); static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; 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 bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = !is_signed; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits<char32_t> { static constexpr bool is_specialized = true; static constexpr char32_t min() noexcept { return (((char32_t)(-1) < 0) ? -(((char32_t)(-1) < 0) ? (((((char32_t)1 << ((sizeof(char32_t) * 8 - ((char32_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char32_t)0) - 1 : (char32_t)0); } static constexpr int digits = (sizeof(char32_t) * 8 - ((char32_t)(-1) < 0)); static constexpr int digits10 = ((sizeof(char32_t) * 8 - ((char32_t)(-1) < 0)) * 643L / 2136); static constexpr int max_digits10 = 0; static constexpr bool is_signed = ((char32_t)(-1) < 0); static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; 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 bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = !is_signed; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits<short> { static constexpr bool is_specialized = true; static constexpr short min() noexcept { return -32767 - 1; } static constexpr int digits = (sizeof(short) * 8 - ((short)(-1) < 0)); static constexpr int digits10 = ((sizeof(short) * 8 - ((short)(-1) < 0)) * 643L / 2136); static constexpr int max_digits10 = 0; static constexpr bool is_signed = true; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr 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 bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = false; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits<unsigned short> { static constexpr bool is_specialized = true; static constexpr unsigned short min() noexcept { return 0; } static constexpr int digits = (sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0)); static constexpr int digits10 = ((sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0)) * 643L / 2136); static constexpr int max_digits10 = 0; static constexpr bool is_signed = false; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr 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 bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = true; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits<int> { static constexpr bool is_specialized = true; static constexpr int min() noexcept { return -2147483647 - 1; } static constexpr int max() noexcept { return 2147483647; } static constexpr int digits = (sizeof(int) * 8 - ((int)(-1) < 0)); static constexpr int digits10 = ((sizeof(int) * 8 - ((int)(-1) < 0)) * 643L / 2136); static constexpr int max_digits10 = 0; static constexpr bool is_signed = true; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr 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 int quiet_NaN() noexcept ; static constexpr int signaling_NaN() noexcept ; static constexpr int denorm_min() noexcept ; static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = false; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits<unsigned int> { static constexpr bool is_specialized = true; static constexpr unsigned int min() noexcept ; static constexpr unsigned int max() noexcept { return 2147483647 * 2U + 1; } static constexpr unsigned int lowest() noexcept { return min(); } static constexpr int digits = (sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0)); static constexpr int digits10 = ((sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0)) * 643L / 2136); static constexpr int max_digits10 = 0; static constexpr bool is_signed = false; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr unsigned int epsilon() noexcept { return 0; } static constexpr unsigned int round_error() noexcept { return 0; } static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr unsigned int infinity() noexcept ; static constexpr unsigned int quiet_NaN() noexcept ; static constexpr unsigned int signaling_NaN() noexcept ; static constexpr unsigned int denorm_min() noexcept ; static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = true; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits<long> { static constexpr bool is_specialized = true; static constexpr long min() noexcept { return -9223372036854775807L - 1; } static constexpr long max() noexcept { return 9223372036854775807L; } static constexpr long lowest() noexcept { return min(); } static constexpr int digits = (sizeof(long) * 8 - ((long)(-1) < 0)); static constexpr int digits10 = ((sizeof(long) * 8 - ((long)(-1) < 0)) * 643L / 2136); static constexpr int max_digits10 = 0; static constexpr bool is_signed = true; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr long epsilon() noexcept { return 0; } static constexpr long round_error() noexcept ; 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 long infinity() noexcept ; static constexpr long quiet_NaN() noexcept ; static constexpr long signaling_NaN() noexcept ; static constexpr long denorm_min() noexcept { return static_cast<long>(0); } static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = false; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits<unsigned long> { static constexpr bool is_specialized = true; static constexpr unsigned long min() noexcept { return 0; } static constexpr unsigned long max() noexcept { return 9223372036854775807L * 2UL + 1; } static constexpr unsigned long lowest() noexcept { return min(); } static constexpr int digits = (sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0)); static constexpr int digits10 = ((sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0)) * 643L / 2136); static constexpr int max_digits10 = 0; static constexpr bool is_signed = false; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr unsigned long epsilon() noexcept { return 0; } static constexpr unsigned long round_error() noexcept { return 0; } static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr unsigned long infinity() noexcept { return static_cast<unsigned long>(0); } static constexpr unsigned long quiet_NaN() noexcept { return static_cast<unsigned long>(0); } static constexpr unsigned long signaling_NaN() noexcept ; static constexpr unsigned long denorm_min() noexcept ; static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = true; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits<long long> { static constexpr bool is_specialized = true; static constexpr long long min() noexcept ; static constexpr long long max() noexcept ; static constexpr long long lowest() noexcept { return min(); } static constexpr int digits = (sizeof(long long) * 8 - ((long long)(-1) < 0)); static constexpr int digits10 = ((sizeof(long long) * 8 - ((long long)(-1) < 0)) * 643L / 2136); static constexpr int max_digits10 = 0; static constexpr bool is_signed = true; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr long long epsilon() noexcept ; static constexpr long long round_error() noexcept ; 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 long long infinity() noexcept ; static constexpr long long quiet_NaN() noexcept ; static constexpr long long signaling_NaN() noexcept ; static constexpr long long denorm_min() noexcept ; static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = false; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits<unsigned long long> { static constexpr bool is_specialized = true; static constexpr unsigned long long min() noexcept ; static constexpr unsigned long long max() noexcept ; static constexpr unsigned long long lowest() noexcept ; static constexpr int digits = (sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0)); static constexpr int digits10 = ((sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0)) * 643L / 2136); static constexpr int max_digits10 = 0; static constexpr bool is_signed = false; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr unsigned long long epsilon() noexcept ; static constexpr unsigned long long round_error() noexcept ; static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr unsigned long long infinity() noexcept ; static constexpr unsigned long long quiet_NaN() noexcept ; static constexpr unsigned long long signaling_NaN() noexcept ; static constexpr unsigned long long denorm_min() noexcept ; static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = true; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; __extension__ template<> struct numeric_limits<__int128> { static constexpr bool is_specialized = true; static constexpr __int128 min() noexcept ; static constexpr __int128 max() noexcept ; static constexpr int digits = 128 - 1; static constexpr int digits10 = (128 - 1) * 643L / 2136; static constexpr bool is_signed = true; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr __int128 epsilon() noexcept ; static constexpr __int128 round_error() noexcept ; static constexpr __int128 lowest() noexcept ; static constexpr int max_digits10 = 0; static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr __int128 infinity() noexcept ; static constexpr __int128 quiet_NaN() noexcept ; static constexpr __int128 signaling_NaN() noexcept ; static constexpr __int128 denorm_min() noexcept ; static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = false; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; __extension__ template<> struct numeric_limits<unsigned __int128> { static constexpr bool is_specialized = true; static constexpr unsigned __int128 min() noexcept ; static constexpr unsigned __int128 max() noexcept ; static constexpr unsigned __int128 lowest() noexcept ; static constexpr int max_digits10 = 0; static constexpr int digits = 128; static constexpr int digits10 = 128 * 643L / 2136; static constexpr bool is_signed = false; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr unsigned __int128 epsilon() noexcept ; static constexpr unsigned __int128 round_error() noexcept ; static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr unsigned __int128 infinity() noexcept ; static constexpr unsigned __int128 quiet_NaN() noexcept ; static constexpr unsigned __int128 signaling_NaN() noexcept ; static constexpr unsigned __int128 denorm_min() noexcept ; static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = true; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits<float> { static constexpr bool is_specialized = true; static constexpr float min() noexcept ; static constexpr float max() noexcept ; static constexpr float lowest() noexcept ; static constexpr int digits = 24; static constexpr int digits10 = 6; static constexpr int max_digits10 = (2 + (24) * 643L / 2136); static constexpr bool is_signed = true; static constexpr bool is_integer = false; static constexpr bool is_exact = false; static constexpr int radix = 2; static constexpr float epsilon() noexcept ; static constexpr float round_error() noexcept ; static constexpr int min_exponent = (-125); static constexpr int min_exponent10 = (-37); static constexpr int max_exponent = 128; static constexpr int max_exponent10 = 38; static constexpr bool has_infinity = 1; static constexpr bool has_quiet_NaN = 1; static constexpr bool has_signaling_NaN = has_quiet_NaN; static constexpr float_denorm_style has_denorm = bool(1) ? denorm_present : denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr float infinity() noexcept ; static constexpr float quiet_NaN() noexcept ; static constexpr float signaling_NaN() noexcept ; static constexpr float denorm_min() noexcept ; static constexpr bool is_iec559 = has_infinity && has_quiet_NaN && has_denorm == denorm_present; static constexpr bool is_bounded = true; static constexpr bool is_modulo = false; static constexpr bool traps = false; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_to_nearest; }; template<> struct numeric_limits<double> { static constexpr bool is_specialized = true; static constexpr double min() noexcept ; static constexpr double max() noexcept ; static constexpr double lowest() noexcept ; static constexpr int digits = 53; static constexpr int digits10 = 15; static constexpr int max_digits10 = (2 + (53) * 643L / 2136); static constexpr bool is_signed = true; static constexpr bool is_integer = false; static constexpr bool is_exact = false; static constexpr int radix = 2; static constexpr double epsilon() noexcept ; static constexpr double round_error() noexcept ; static constexpr int min_exponent = (-1021); static constexpr int min_exponent10 = (-307); static constexpr int max_exponent = 1024; static constexpr int max_exponent10 = 308; static constexpr bool has_infinity = 1; static constexpr bool has_quiet_NaN = 1; static constexpr bool has_signaling_NaN = has_quiet_NaN; static constexpr float_denorm_style has_denorm = bool(1) ? denorm_present : denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr double infinity() noexcept ; static constexpr double quiet_NaN() noexcept ; static constexpr double signaling_NaN() noexcept ; static constexpr double denorm_min() noexcept ; static constexpr bool is_iec559 = has_infinity && has_quiet_NaN && has_denorm == denorm_present; static constexpr bool is_bounded = true; static constexpr bool is_modulo = false; static constexpr bool traps = false; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_to_nearest; }; template<> struct numeric_limits<long double> { static constexpr bool is_specialized = true; static constexpr long double min() noexcept ; static constexpr long double max() noexcept ; static constexpr long double lowest() noexcept ; static constexpr int digits = 64; static constexpr int digits10 = 18; static constexpr int max_digits10 = (2 + (64) * 643L / 2136); static constexpr bool is_signed = true; static constexpr bool is_integer = false; static constexpr bool is_exact = false; static constexpr int radix = 2; static constexpr long double epsilon() noexcept ; static constexpr long double round_error() noexcept ; static constexpr int min_exponent = (-16381); static constexpr int min_exponent10 = (-4931); static constexpr int max_exponent = 16384; static constexpr int max_exponent10 = 4932; static constexpr bool has_infinity = 1; static constexpr bool has_quiet_NaN = 1; static constexpr bool has_signaling_NaN = has_quiet_NaN; static constexpr float_denorm_style has_denorm = bool(1) ? denorm_present : denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr long double infinity() noexcept ; static constexpr long double quiet_NaN() noexcept ; static constexpr long double signaling_NaN() noexcept ; static constexpr long double denorm_min() noexcept ; static constexpr bool is_iec559 = has_infinity && has_quiet_NaN && has_denorm == denorm_present; static constexpr bool is_bounded = true; static constexpr bool is_modulo = false; static constexpr bool traps = false; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_to_nearest; }; } typedef long unsigned int size_t; struct timex { unsigned int modes; __syscall_slong_t offset; __syscall_slong_t freq; __syscall_slong_t maxerror; __syscall_slong_t esterror; int status; __syscall_slong_t constant; __syscall_slong_t precision; __syscall_slong_t tolerance; struct timeval time; __syscall_slong_t tick; __syscall_slong_t ppsfreq; __syscall_slong_t jitter; int shift; __syscall_slong_t stabil; __syscall_slong_t jitcnt; __syscall_slong_t calcnt; __syscall_slong_t errcnt; __syscall_slong_t stbcnt; int tai; int :32; int :32; int :32; int :32; int :32; int :32; int :32; int :32; int :32; int :32; int :32; }; extern "C" { extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) noexcept (true) __attribute__ ((__nonnull__ (2))); } struct tm { int tm_sec; int tm_min; int tm_hour; int tm_mday; int tm_mon; int tm_year; int tm_wday; int tm_yday; int tm_isdst; long int tm_gmtoff; const char *tm_zone; }; struct itimerspec { struct timespec it_interval; struct timespec it_value; }; struct sigevent; extern "C" { extern clock_t clock (void) noexcept (true); extern time_t time (time_t *__timer) noexcept (true); extern double difftime (time_t __time1, time_t __time0) noexcept (true) __attribute__ ((__const__)); extern time_t mktime (struct tm *__tp) noexcept (true); extern size_t strftime (char *__restrict __s, size_t __maxsize, const char *__restrict __format, const struct tm *__restrict __tp) noexcept (true) __attribute__ ((__nonnull__ (1, 3, 4))); extern char *strptime (const char *__restrict __s, const char *__restrict __fmt, struct tm *__tp) noexcept (true); extern size_t strftime_l (char *__restrict __s, size_t __maxsize, const char *__restrict __format, const struct tm *__restrict __tp, locale_t __loc) noexcept (true); extern char *strptime_l (const char *__restrict __s, const char *__restrict __fmt, struct tm *__tp, locale_t __loc) noexcept (true); extern struct tm *gmtime (const time_t *__timer) noexcept (true); extern struct tm *localtime (const time_t *__timer) noexcept (true); extern struct tm *gmtime_r (const time_t *__restrict __timer, struct tm *__restrict __tp) noexcept (true); extern struct tm *localtime_r (const time_t *__restrict __timer, struct tm *__restrict __tp) noexcept (true); extern char *asctime (const struct tm *__tp) noexcept (true); extern char *ctime (const time_t *__timer) noexcept (true); extern char *asctime_r (const struct tm *__restrict __tp, char *__restrict __buf) noexcept (true); extern char *ctime_r (const time_t *__restrict __timer, char *__restrict __buf) noexcept (true); extern char *__tzname[2]; extern int __daylight; extern long int __timezone; extern char *tzname[2]; extern void tzset (void) noexcept (true); extern int daylight; extern long int timezone; extern time_t timegm (struct tm *__tp) noexcept (true); extern time_t timelocal (struct tm *__tp) noexcept (true); extern int dysize (int __year) noexcept (true) __attribute__ ((__const__)); extern int nanosleep (const struct timespec *__requested_time, struct timespec *__remaining); extern int clock_getres (clockid_t __clock_id, struct timespec *__res) noexcept (true); extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) noexcept (true) __attribute__ ((__nonnull__ (2))); extern int clock_settime (clockid_t __clock_id, const struct timespec *__tp) noexcept (true) __attribute__ ((__nonnull__ (2))); extern int clock_nanosleep (clockid_t __clock_id, int __flags, const struct timespec *__req, struct timespec *__rem); extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) noexcept (true); extern int timer_create (clockid_t __clock_id, struct sigevent *__restrict __evp, timer_t *__restrict __timerid) noexcept (true); extern int timer_delete (timer_t __timerid) noexcept (true); extern int timer_settime (timer_t __timerid, int __flags, const struct itimerspec *__restrict __value, struct itimerspec *__restrict __ovalue) noexcept (true); extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) noexcept (true); extern int timer_getoverrun (timer_t __timerid) noexcept (true); extern int timespec_get (struct timespec *__ts, int __base) noexcept (true) __attribute__ ((__nonnull__ (1))); extern int timespec_getres (struct timespec *__ts, int __base) noexcept (true); extern int getdate_err; extern struct tm *getdate (const char *__string); extern int getdate_r (const char *__restrict __string, struct tm *__restrict __resbufp); } namespace std { using ::clock_t; using ::time_t; using ::tm; using ::clock; using ::difftime; using ::mktime; using ::time; using ::asctime; using ::ctime; using ::gmtime; using ::localtime; using ::strftime; } namespace std { using ::timespec; using ::timespec_get; } namespace std __attribute__ ((__visibility__ ("default"))) { namespace __parse_int { template<unsigned _Base, char _Dig> struct _Digit; template<unsigned _Base> struct _Digit<_Base, '0'> : integral_constant<unsigned, 0> { using __valid = true_type; }; template<unsigned _Base> struct _Digit<_Base, '1'> : integral_constant<unsigned, 1> { using __valid = true_type; }; template<unsigned _Base, unsigned _Val> struct _Digit_impl : integral_constant<unsigned, _Val> { static_assert(_Base > _Val, "invalid digit"); using __valid = true_type; }; template<unsigned _Base> struct _Digit<_Base, '2'> : _Digit_impl<_Base, 2> { }; template<unsigned _Base> struct _Digit<_Base, '3'> : _Digit_impl<_Base, 3> { }; template<unsigned _Base> struct _Digit<_Base, '4'> : _Digit_impl<_Base, 4> { }; template<unsigned _Base> struct _Digit<_Base, '5'> : _Digit_impl<_Base, 5> { }; template<unsigned _Base> struct _Digit<_Base, '6'> : _Digit_impl<_Base, 6> { }; template<unsigned _Base> struct _Digit<_Base, '7'> : _Digit_impl<_Base, 7> { }; template<unsigned _Base> struct _Digit<_Base, '8'> : _Digit_impl<_Base, 8> { }; template<unsigned _Base> struct _Digit<_Base, '9'> : _Digit_impl<_Base, 9> { }; template<unsigned _Base> struct _Digit<_Base, 'a'> : _Digit_impl<_Base, 0xa> { }; template<unsigned _Base> struct _Digit<_Base, 'A'> : _Digit_impl<_Base, 0xa> { }; template<unsigned _Base> struct _Digit<_Base, 'b'> : _Digit_impl<_Base, 0xb> { }; template<unsigned _Base> struct _Digit<_Base, 'B'> : _Digit_impl<_Base, 0xb> { }; template<unsigned _Base> struct _Digit<_Base, 'c'> : _Digit_impl<_Base, 0xc> { }; template<unsigned _Base> struct _Digit<_Base, 'C'> : _Digit_impl<_Base, 0xc> { }; template<unsigned _Base> struct _Digit<_Base, 'd'> : _Digit_impl<_Base, 0xd> { }; template<unsigned _Base> struct _Digit<_Base, 'D'> : _Digit_impl<_Base, 0xd> { }; template<unsigned _Base> struct _Digit<_Base, 'e'> : _Digit_impl<_Base, 0xe> { }; template<unsigned _Base> struct _Digit<_Base, 'E'> : _Digit_impl<_Base, 0xe> { }; template<unsigned _Base> struct _Digit<_Base, 'f'> : _Digit_impl<_Base, 0xf> { }; template<unsigned _Base> struct _Digit<_Base, 'F'> : _Digit_impl<_Base, 0xf> { }; template<unsigned _Base> struct _Digit<_Base, '\''> : integral_constant<unsigned, 0> { using __valid = false_type; }; template<unsigned long long _Val> using __ull_constant = integral_constant<unsigned long long, _Val>; template<unsigned _Base, char _Dig, char... _Digs> struct _Power_help { using __next = typename _Power_help<_Base, _Digs...>::type; using __valid_digit = typename _Digit<_Base, _Dig>::__valid; using type = __ull_constant<__next::value * (__valid_digit{} ? _Base : 1ULL)>; }; template<unsigned _Base, char _Dig> struct _Power_help<_Base, _Dig> { using __valid_digit = typename _Digit<_Base, _Dig>::__valid; using type = __ull_constant<__valid_digit::value>; }; template<unsigned _Base, char... _Digs> struct _Power : _Power_help<_Base, _Digs...>::type { }; template<unsigned _Base> struct _Power<_Base> : __ull_constant<0> { }; template<unsigned _Base, unsigned long long _Pow, char _Dig, char... _Digs> struct _Number_help { using __digit = _Digit<_Base, _Dig>; using __valid_digit = typename __digit::__valid; using __next = _Number_help<_Base, __valid_digit::value ? _Pow / _Base : _Pow, _Digs...>; using type = __ull_constant<_Pow * __digit::value + __next::type::value>; static_assert((type::value / _Pow) == __digit::value, "integer literal does not fit in unsigned long long"); }; template<unsigned _Base, unsigned long long _Pow, char _Dig, char..._Digs> struct _Number_help<_Base, _Pow, '\'', _Dig, _Digs...> : _Number_help<_Base, _Pow, _Dig, _Digs...> { }; template<unsigned _Base, char _Dig> struct _Number_help<_Base, 1ULL, _Dig> { using type = __ull_constant<_Digit<_Base, _Dig>::value>; }; template<unsigned _Base, char... _Digs> struct _Number : _Number_help<_Base, _Power<_Base, _Digs...>::value, _Digs...>::type { }; template<unsigned _Base> struct _Number<_Base> : __ull_constant<0> { }; template<char... _Digs> struct _Parse_int; template<char... _Digs> struct _Parse_int<'0', 'b', _Digs...> : _Number<2U, _Digs...>::type { }; template<char... _Digs> struct _Parse_int<'0', 'B', _Digs...> : _Number<2U, _Digs...>::type { }; template<char... _Digs> struct _Parse_int<'0', 'x', _Digs...> : _Number<16U, _Digs...>::type { }; template<char... _Digs> struct _Parse_int<'0', 'X', _Digs...> : _Number<16U, _Digs...>::type { }; template<char... _Digs> struct _Parse_int<'0', _Digs...> : _Number<8U, _Digs...>::type { }; template<char... _Digs> struct _Parse_int : _Number<10U, _Digs...>::type { }; } namespace __select_int { template<unsigned long long _Val, typename... _Ints> struct _Select_int_base; template<unsigned long long _Val, typename _IntType, typename... _Ints> struct _Select_int_base<_Val, _IntType, _Ints...> : __conditional_t<(_Val <= __gnu_cxx::__int_traits<_IntType>::__max), integral_constant<_IntType, (_IntType)_Val>, _Select_int_base<_Val, _Ints...>> { }; template<unsigned long long _Val> struct _Select_int_base<_Val> { }; template<char... _Digs> using _Select_int = typename _Select_int_base< __parse_int::_Parse_int<_Digs...>::value, unsigned char, unsigned short, unsigned int, unsigned long, unsigned long long >::type; } } namespace std __attribute__ ((__visibility__ ("default"))) { namespace filesystem { struct __file_clock; }; namespace chrono { template<typename _Rep, typename _Period = ratio<1>> class duration; template<typename _Clock, typename _Dur = typename _Clock::duration> class time_point; } template<typename _CT, typename _Period1, typename _Period2, typename = void> struct __duration_common_type { }; template<typename _CT, typename _Period1, typename _Period2> struct __duration_common_type<_CT, _Period1, _Period2, __void_t<typename _CT::type>> { private: using __gcd_num = __static_gcd<_Period1::num, _Period2::num>; using __gcd_den = __static_gcd<_Period1::den, _Period2::den>; using __cr = typename _CT::type; using __r = ratio<__gcd_num::value, (_Period1::den / __gcd_den::value) * _Period2::den>; public: using type = chrono::duration<__cr, typename __r::type>; }; template<typename _Rep1, typename _Period1, typename _Rep2, typename _Period2> struct common_type<chrono::duration<_Rep1, _Period1>, chrono::duration<_Rep2, _Period2>> : __duration_common_type<common_type<_Rep1, _Rep2>, typename _Period1::type, typename _Period2::type> { }; template<typename _Rep, typename _Period> struct common_type<chrono::duration<_Rep, _Period>, chrono::duration<_Rep, _Period>> { using type = chrono::duration<typename common_type<_Rep>::type, typename _Period::type>; }; template<typename _Rep, typename _Period> struct common_type<chrono::duration<_Rep, _Period>> { using type = chrono::duration<typename common_type<_Rep>::type, typename _Period::type>; }; template<typename _CT, typename _Clock, typename = void> struct __timepoint_common_type { }; template<typename _CT, typename _Clock> struct __timepoint_common_type<_CT, _Clock, __void_t<typename _CT::type>> { using type = chrono::time_point<_Clock, typename _CT::type>; }; template<typename _Clock, typename _Duration1, typename _Duration2> struct common_type<chrono::time_point<_Clock, _Duration1>, chrono::time_point<_Clock, _Duration2>> : __timepoint_common_type<common_type<_Duration1, _Duration2>, _Clock> { }; template<typename _Clock, typename _Duration> struct common_type<chrono::time_point<_Clock, _Duration>, chrono::time_point<_Clock, _Duration>> { using type = chrono::time_point<_Clock, _Duration>; }; template<typename _Clock, typename _Duration> struct common_type<chrono::time_point<_Clock, _Duration>> { using type = chrono::time_point<_Clock, _Duration>; }; namespace chrono { template<typename _ToDur, typename _CF, typename _CR, bool _NumIsOne = false, bool _DenIsOne = false> struct __duration_cast_impl { template<typename _Rep, typename _Period> static constexpr _ToDur __cast(const duration<_Rep, _Period>& __d) ; }; template<typename _ToDur, typename _CF, typename _CR> struct __duration_cast_impl<_ToDur, _CF, _CR, true, true> { template<typename _Rep, typename _Period> static constexpr _ToDur __cast(const duration<_Rep, _Period>& __d) ; }; template<typename _ToDur, typename _CF, typename _CR> struct __duration_cast_impl<_ToDur, _CF, _CR, true, false> { template<typename _Rep, typename _Period> static constexpr _ToDur __cast(const duration<_Rep, _Period>& __d) ; }; template<typename _ToDur, typename _CF, typename _CR> struct __duration_cast_impl<_ToDur, _CF, _CR, false, true> { template<typename _Rep, typename _Period> static constexpr _ToDur __cast(const duration<_Rep, _Period>& __d) { typedef typename _ToDur::rep __to_rep; return _ToDur(static_cast<__to_rep>( static_cast<_CR>(__d.count()) * static_cast<_CR>(_CF::num))); } }; template<typename _Tp> struct __is_duration : std::false_type { }; template<typename _Rep, typename _Period> struct __is_duration<duration<_Rep, _Period>> : std::true_type { }; template<typename _Tp> using __enable_if_is_duration = typename enable_if<__is_duration<_Tp>::value, _Tp>::type; template<typename _Tp> using __disable_if_is_duration = typename enable_if<!__is_duration<_Tp>::value, _Tp>::type; template<typename _Tp> inline constexpr bool __is_duration_v = false; template<typename _Rep, typename _Period> inline constexpr bool __is_duration_v<duration<_Rep, _Period>> = true; template<typename _Tp> inline constexpr bool __is_time_point_v = false; template<typename _Clock, typename _Dur> inline constexpr bool __is_time_point_v<time_point<_Clock, _Dur>> = true; template<typename _ToDur, typename _Rep, typename _Period> [[__nodiscard__]] constexpr __enable_if_is_duration<_ToDur> duration_cast(const duration<_Rep, _Period>& __d) { if constexpr (is_same_v<_ToDur, duration<_Rep, _Period>>) return __d; else { using __to_period = typename _ToDur::period; using __to_rep = typename _ToDur::rep; using __cf = ratio_divide<_Period, __to_period>; using __cr = typename common_type<__to_rep, _Rep, intmax_t>::type; using __dc = __duration_cast_impl<_ToDur, __cf, __cr, __cf::num == 1, __cf::den == 1>; return __dc::__cast(__d); } } template<typename _Rep> struct treat_as_floating_point : is_floating_point<_Rep> { }; template <typename _Rep> inline constexpr bool treat_as_floating_point_v = treat_as_floating_point<_Rep>::value; template<> inline constexpr bool treat_as_floating_point_v<int> = false; template<> inline constexpr bool treat_as_floating_point_v<long> = false; template<> inline constexpr bool treat_as_floating_point_v<long long> = false; template<> inline constexpr bool treat_as_floating_point_v<float> = true; template<> inline constexpr bool treat_as_floating_point_v<double> = true; template<> inline constexpr bool treat_as_floating_point_v<long double> = true; template<typename _Tp> inline constexpr bool is_clock_v = false; template<typename _Tp> requires requires { typename _Tp::rep; typename _Tp::period; typename _Tp::duration; typename _Tp::time_point::clock; typename _Tp::time_point::duration; { &_Tp::is_steady } -> same_as<const bool*>; { _Tp::now() } -> same_as<typename _Tp::time_point>; requires same_as<typename _Tp::duration, duration<typename _Tp::rep, typename _Tp::period>>; requires same_as<typename _Tp::time_point::duration, typename _Tp::duration>; } inline constexpr bool is_clock_v<_Tp> = true; template<typename _Tp> struct is_clock : bool_constant<is_clock_v<_Tp>> { }; template<typename _ToDur, typename _Rep, typename _Period> [[nodiscard]] constexpr __enable_if_is_duration<_ToDur> floor(const duration<_Rep, _Period>& __d) { auto __to = chrono::duration_cast<_ToDur>(__d); if (__to > __d) return __to - _ToDur{1}; return __to; } template<typename _ToDur, typename _Rep, typename _Period> [[nodiscard]] constexpr __enable_if_is_duration<_ToDur> ceil(const duration<_Rep, _Period>& __d) { auto __to = chrono::duration_cast<_ToDur>(__d); if (__to < __d) return __to + _ToDur{1}; return __to; } template <typename _ToDur, typename _Rep, typename _Period> [[nodiscard]] constexpr enable_if_t< __and_<__is_duration<_ToDur>, __not_<treat_as_floating_point<typename _ToDur::rep>>>::value, _ToDur> round(const duration<_Rep, _Period>& __d) { _ToDur __t0 = chrono::floor<_ToDur>(__d); _ToDur __t1 = __t0 + _ToDur{1}; auto __diff0 = __d - __t0; auto __diff1 = __t1 - __d; if (__diff0 == __diff1) { if (__t0.count() & 1) return __t1; return __t0; } else if (__diff0 < __diff1) return __t0; return __t1; } template<typename _Rep, typename _Period> [[nodiscard]] constexpr enable_if_t<numeric_limits<_Rep>::is_signed, duration<_Rep, _Period>> abs(duration<_Rep, _Period> __d) { if (__d >= __d.zero()) return __d; return -__d; } namespace __detail { using chrono::ceil; } template<typename _Rep> struct duration_values { static constexpr _Rep zero() noexcept { return _Rep(0); } static constexpr _Rep max() noexcept { return numeric_limits<_Rep>::max(); } static constexpr _Rep min() noexcept { return numeric_limits<_Rep>::lowest(); } }; template<typename _Rep, typename _Period> class duration { static_assert(!__is_duration<_Rep>::value, "rep cannot be a std::chrono::duration"); static_assert(__is_ratio<_Period>::value, "period must be a specialization of std::ratio"); static_assert(_Period::num > 0, "period must be positive"); template<typename _Rep2> using __is_float = treat_as_floating_point<_Rep2>; static constexpr intmax_t _S_gcd(intmax_t __m, intmax_t __n) noexcept { do { intmax_t __rem = __m % __n; __m = __n; __n = __rem; } while (__n != 0); return __m; } template<typename _R1, typename _R2, intmax_t __gcd1 = _S_gcd(_R1::num, _R2::num), intmax_t __gcd2 = _S_gcd(_R1::den, _R2::den)> using __divide = ratio<(_R1::num / __gcd1) * (_R2::den / __gcd2), (_R1::den / __gcd2) * (_R2::num / __gcd1)>; template<typename _Period2> using __is_harmonic = __bool_constant<__divide<_Period2, _Period>::den == 1>; public: using rep = _Rep; using period = typename _Period::type; constexpr duration() = default; duration(const duration&) = default; template<typename _Rep2, typename = _Require< is_convertible<const _Rep2&, rep>, __or_<__is_float<rep>, __not_<__is_float<_Rep2>>>>> constexpr explicit duration(const _Rep2& __rep) : __r(static_cast<rep>(__rep)) { } template<typename _Rep2, typename _Period2, typename = _Require< is_convertible<const _Rep2&, rep>, __or_<__is_float<rep>, __and_<__is_harmonic<_Period2>, __not_<__is_float<_Rep2>>>>>> constexpr duration(const duration<_Rep2, _Period2>& __d) : __r(duration_cast<duration>(__d).count()) { } ~duration() = default; duration& operator=(const duration&) = default; constexpr rep count() const { return __r; } constexpr duration<typename common_type<rep>::type, period> operator+() const { return duration<typename common_type<rep>::type, period>(__r); } constexpr duration<typename common_type<rep>::type, period> operator-() const ; constexpr duration& operator++() ; constexpr duration operator++(int) ; constexpr duration& operator--() ; constexpr duration operator--(int) ; constexpr duration& operator+=(const duration& __d) ; constexpr duration& operator-=(const duration& __d) ; constexpr duration& operator*=(const rep& __rhs) ; constexpr duration& operator/=(const rep& __rhs) ; template<typename _Rep2 = rep> constexpr __enable_if_t<!treat_as_floating_point<_Rep2>::value, duration&> operator%=(const rep& __rhs) { __r %= __rhs; return *this; } template<typename _Rep2 = rep> constexpr __enable_if_t<!treat_as_floating_point<_Rep2>::value, duration&> operator%=(const duration& __d) { __r %= __d.count(); return *this; } static constexpr duration zero() noexcept { return duration(duration_values<rep>::zero()); } static constexpr duration min() noexcept { return duration(duration_values<rep>::min()); } static constexpr duration max() noexcept { return duration(duration_values<rep>::max()); } private: rep __r; }; template<typename _Rep1, typename _Period1, typename _Rep2, typename _Period2> constexpr typename common_type<duration<_Rep1, _Period1>, duration<_Rep2, _Period2>>::type operator+(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2>& __rhs) ; template<typename _Rep1, typename _Period1, typename _Rep2, typename _Period2> constexpr typename common_type<duration<_Rep1, _Period1>, duration<_Rep2, _Period2>>::type operator-(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2>& __rhs) ; template<typename _Rep1, typename _Rep2, typename _CRep = typename common_type<_Rep1, _Rep2>::type> using __common_rep_t = typename enable_if<is_convertible<const _Rep2&, _CRep>::value, _CRep>::type; template<typename _Rep1, typename _Period, typename _Rep2> constexpr duration<__common_rep_t<_Rep1, _Rep2>, _Period> operator*(const duration<_Rep1, _Period>& __d, const _Rep2& __s) ; template<typename _Rep1, typename _Rep2, typename _Period> constexpr duration<__common_rep_t<_Rep2, _Rep1>, _Period> operator*(const _Rep1& __s, const duration<_Rep2, _Period>& __d) ; template<typename _Rep1, typename _Period, typename _Rep2> constexpr duration<__common_rep_t<_Rep1, __disable_if_is_duration<_Rep2>>, _Period> operator/(const duration<_Rep1, _Period>& __d, const _Rep2& __s) ; template<typename _Rep1, typename _Period1, typename _Rep2, typename _Period2> constexpr typename common_type<_Rep1, _Rep2>::type operator/(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2>& __rhs) ; template<typename _Rep1, typename _Period, typename _Rep2> constexpr duration<__common_rep_t<_Rep1, __disable_if_is_duration<_Rep2>>, _Period> operator%(const duration<_Rep1, _Period>& __d, const _Rep2& __s) ; template<typename _Rep1, typename _Period1, typename _Rep2, typename _Period2> constexpr typename common_type<duration<_Rep1, _Period1>, duration<_Rep2, _Period2>>::type operator%(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2>& __rhs) ; template<typename _Rep1, typename _Period1, typename _Rep2, typename _Period2> constexpr bool operator==(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2>& __rhs) { typedef duration<_Rep1, _Period1> __dur1; typedef duration<_Rep2, _Period2> __dur2; typedef typename common_type<__dur1,__dur2>::type __ct; return __ct(__lhs).count() == __ct(__rhs).count(); } template<typename _Rep1, typename _Period1, typename _Rep2, typename _Period2> constexpr bool operator<(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2>& __rhs) { typedef duration<_Rep1, _Period1> __dur1; typedef duration<_Rep2, _Period2> __dur2; typedef typename common_type<__dur1,__dur2>::type __ct; return __ct(__lhs).count() < __ct(__rhs).count(); } template<typename _Rep1, typename _Period1, typename _Rep2, typename _Period2> requires three_way_comparable<common_type_t<_Rep1, _Rep2>> constexpr auto operator<=>(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2>& __rhs) { using __ct = common_type_t<duration<_Rep1, _Period1>, duration<_Rep2, _Period2>>; return __ct(__lhs).count() <=> __ct(__rhs).count(); } template<typename _Rep1, typename _Period1, typename _Rep2, typename _Period2> constexpr bool operator<=(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2>& __rhs) { return !(__rhs < __lhs); } template<typename _Rep1, typename _Period1, typename _Rep2, typename _Period2> constexpr bool operator>(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2>& __rhs) ; template<typename _Rep1, typename _Period1, typename _Rep2, typename _Period2> constexpr bool operator>=(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2>& __rhs) ; using nanoseconds = duration<int64_t, nano>; using microseconds = duration<int64_t, micro>; using milliseconds = duration<int64_t, milli>; using seconds = duration<int64_t>; using minutes = duration<int64_t, ratio< 60>>; using hours = duration<int64_t, ratio<3600>>; using days = duration<int64_t, ratio<86400>>; using weeks = duration<int64_t, ratio<604800>>; using years = duration<int64_t, ratio<31556952>>; using months = duration<int64_t, ratio<2629746>>; template<typename _Clock, typename _Dur> class time_point { static_assert(__is_duration<_Dur>::value, "duration must be a specialization of std::chrono::duration"); public: typedef _Clock clock; typedef _Dur duration; typedef typename duration::rep rep; typedef typename duration::period period; constexpr time_point() ; constexpr explicit time_point(const duration& __dur) ; template<typename _Dur2, typename = _Require<is_convertible<_Dur2, _Dur>>> constexpr time_point(const time_point<clock, _Dur2>& __t) ; constexpr duration time_since_epoch() const ; constexpr time_point& operator++() ; constexpr time_point operator++(int) ; constexpr time_point& operator--() ; constexpr time_point operator--(int) ; constexpr time_point& operator+=(const duration& __dur) ; constexpr time_point& operator-=(const duration& __dur) ; static constexpr time_point min() noexcept ; static constexpr time_point max() noexcept ; private: duration __d; }; template<typename _ToDur, typename _Clock, typename _Dur> [[__nodiscard__]] constexpr __enable_if_t<__is_duration<_ToDur>::value, time_point<_Clock, _ToDur>> time_point_cast(const time_point<_Clock, _Dur>& __t) ; template<typename _ToDur, typename _Clock, typename _Dur> [[nodiscard]] constexpr enable_if_t<__is_duration_v<_ToDur>, time_point<_Clock, _ToDur>> floor(const time_point<_Clock, _Dur>& __tp) ; template<typename _ToDur, typename _Clock, typename _Dur> [[nodiscard]] constexpr enable_if_t<__is_duration_v<_ToDur>, time_point<_Clock, _ToDur>> ceil(const time_point<_Clock, _Dur>& __tp) ; template<typename _ToDur, typename _Clock, typename _Dur> [[nodiscard]] constexpr enable_if_t<__is_duration_v<_ToDur> && !treat_as_floating_point_v<typename _ToDur::rep>, time_point<_Clock, _ToDur>> round(const time_point<_Clock, _Dur>& __tp) ; template<typename _Clock, typename _Dur1, typename _Rep2, typename _Period2> constexpr time_point<_Clock, typename common_type<_Dur1, duration<_Rep2, _Period2>>::type> operator+(const time_point<_Clock, _Dur1>& __lhs, const duration<_Rep2, _Period2>& __rhs) ; template<typename _Rep1, typename _Period1, typename _Clock, typename _Dur2> constexpr time_point<_Clock, typename common_type<duration<_Rep1, _Period1>, _Dur2>::type> operator+(const duration<_Rep1, _Period1>& __lhs, const time_point<_Clock, _Dur2>& __rhs) ; template<typename _Clock, typename _Dur1, typename _Rep2, typename _Period2> constexpr time_point<_Clock, typename common_type<_Dur1, duration<_Rep2, _Period2>>::type> operator-(const time_point<_Clock, _Dur1>& __lhs, const duration<_Rep2, _Period2>& __rhs) ; template<typename _Clock, typename _Dur1, typename _Dur2> constexpr typename common_type<_Dur1, _Dur2>::type operator-(const time_point<_Clock, _Dur1>& __lhs, const time_point<_Clock, _Dur2>& __rhs) ; template<typename _Clock, typename _Dur1, typename _Dur2> constexpr bool operator==(const time_point<_Clock, _Dur1>& __lhs, const time_point<_Clock, _Dur2>& __rhs) { return __lhs.time_since_epoch() == __rhs.time_since_epoch(); } template<typename _Clock, typename _Dur1, three_way_comparable_with<_Dur1> _Dur2> constexpr auto operator<=>(const time_point<_Clock, _Dur1>& __lhs, const time_point<_Clock, _Dur2>& __rhs) { return __lhs.time_since_epoch() <=> __rhs.time_since_epoch(); } template<typename _Clock, typename _Dur1, typename _Dur2> constexpr bool operator<(const time_point<_Clock, _Dur1>& __lhs, const time_point<_Clock, _Dur2>& __rhs) { return __lhs.time_since_epoch() < __rhs.time_since_epoch(); } template<typename _Clock, typename _Dur1, typename _Dur2> constexpr bool operator<=(const time_point<_Clock, _Dur1>& __lhs, const time_point<_Clock, _Dur2>& __rhs) { return !(__rhs < __lhs); } template<typename _Clock, typename _Dur1, typename _Dur2> constexpr bool operator>(const time_point<_Clock, _Dur1>& __lhs, const time_point<_Clock, _Dur2>& __rhs) ; template<typename _Clock, typename _Dur1, typename _Dur2> constexpr bool operator>=(const time_point<_Clock, _Dur1>& __lhs, const time_point<_Clock, _Dur2>& __rhs) ; inline namespace _V2 { struct system_clock { typedef chrono::nanoseconds duration; typedef duration::rep rep; typedef duration::period period; typedef chrono::time_point<system_clock, duration> time_point; static_assert(system_clock::duration::min() < system_clock::duration::zero(), "a clock's minimum duration cannot be less than its epoch"); static constexpr bool is_steady = false; static time_point now() noexcept; static std::time_t to_time_t(const time_point& __t) noexcept ; static time_point from_time_t(std::time_t __t) noexcept ; }; struct steady_clock { typedef chrono::nanoseconds duration; typedef duration::rep rep; typedef duration::period period; typedef chrono::time_point<steady_clock, duration> time_point; static constexpr bool is_steady = true; static time_point now() noexcept; }; using high_resolution_clock = system_clock; } template<typename _Duration> using sys_time = time_point<system_clock, _Duration>; using sys_seconds = sys_time<seconds>; using sys_days = sys_time<days>; using file_clock = ::std::filesystem::__file_clock; template<typename _Duration> using file_time = time_point<file_clock, _Duration>; template<> struct is_clock<system_clock> : true_type { }; template<> struct is_clock<steady_clock> : true_type { }; template<> struct is_clock<file_clock> : true_type { }; template<> inline constexpr bool is_clock_v<system_clock> = true; template<> inline constexpr bool is_clock_v<steady_clock> = true; template<> inline constexpr bool is_clock_v<file_clock> = true; } inline namespace literals { inline namespace chrono_literals { #pragma GCC diagnostic push template<typename _Dur, char... _Digits> constexpr _Dur __check_overflow() ; constexpr chrono::duration<long double, ratio<3600,1>> operator""h(long double __hours) ; template <char... _Digits> constexpr chrono::hours operator""h() ; constexpr chrono::duration<long double, ratio<60,1>> operator""min(long double __mins) ; template <char... _Digits> constexpr chrono::minutes operator""min() ; constexpr chrono::duration<long double> operator""s(long double __secs) ; template <char... _Digits> constexpr chrono::seconds operator""s() ; constexpr chrono::duration<long double, milli> operator""ms(long double __msecs) ; template <char... _Digits> constexpr chrono::milliseconds operator""ms() ; constexpr chrono::duration<long double, micro> operator""us(long double __usecs) ; template <char... _Digits> constexpr chrono::microseconds operator""us() ; constexpr chrono::duration<long double, nano> operator""ns(long double __nsecs) ; template <char... _Digits> constexpr chrono::nanoseconds operator""ns() ; #pragma GCC diagnostic pop } } namespace chrono { using namespace literals::chrono_literals; } namespace filesystem { struct __file_clock { using duration = chrono::nanoseconds; using rep = duration::rep; using period = duration::period; using time_point = chrono::time_point<__file_clock>; static constexpr bool is_steady = false; static time_point now() noexcept ; template<typename _Dur> static chrono::file_time<common_type_t<_Dur, chrono::seconds>> from_sys(const chrono::sys_time<_Dur>& __t) noexcept ; template<typename _Dur> static chrono::sys_time<common_type_t<_Dur, chrono::seconds>> to_sys(const chrono::file_time<_Dur>& __t) noexcept ; private: using __sys_clock = chrono::system_clock; static constexpr chrono::seconds _S_epoch_diff{6437664000}; protected: template<typename _Dur> static chrono::time_point<__file_clock, common_type_t<_Dur, chrono::seconds>> _S_from_sys(const chrono::time_point<__sys_clock, _Dur>& __t) noexcept ; template<typename _Dur> static chrono::time_point<__sys_clock, common_type_t<_Dur, chrono::seconds>> _S_to_sys(const chrono::time_point<__file_clock, _Dur>& __t) noexcept ; }; } } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename> class allocator; template<> class allocator<void>; template<typename, typename> struct uses_allocator; template<typename> struct allocator_traits; } namespace std __attribute__ ((__visibility__ ("default"))) { template<class _CharT> struct char_traits; template<> struct char_traits<char>; template<> struct char_traits<wchar_t>; template<> struct char_traits<char8_t>; template<> struct char_traits<char16_t>; template<> struct char_traits<char32_t>; namespace __cxx11 { template<typename _CharT, typename _Traits = char_traits<_CharT>, typename _Alloc = allocator<_CharT> > class basic_string; } typedef basic_string<char> string; typedef basic_string<wchar_t> wstring; typedef basic_string<char8_t> u8string; typedef basic_string<char16_t> u16string; typedef basic_string<char32_t> u32string; } typedef long unsigned int size_t; typedef __builtin_va_list __gnuc_va_list; typedef __gnuc_va_list va_list; typedef unsigned int wint_t; typedef struct { int __count; union { unsigned int __wch; char __wchb[4]; } __value; } __mbstate_t; typedef __mbstate_t mbstate_t; struct _IO_FILE; typedef struct _IO_FILE __FILE; struct _IO_FILE; typedef struct _IO_FILE FILE; extern "C" { struct tm; extern wchar_t *wcscpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src) noexcept (true) __attribute__ ((__nonnull__ (1, 2))); extern wchar_t *wcsncpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n) noexcept (true) __attribute__ ((__nonnull__ (1, 2))); extern size_t wcslcpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n) noexcept (true) __attribute__ ((__nonnull__ (1, 2))) ; extern size_t wcslcat (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n) noexcept (true) __attribute__ ((__nonnull__ (1, 2))) ; extern wchar_t *wcscat (wchar_t *__restrict __dest, const wchar_t *__restrict __src) noexcept (true) __attribute__ ((__nonnull__ (1, 2))); extern wchar_t *wcsncat (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n) noexcept (true) __attribute__ ((__nonnull__ (1, 2))); extern int wcscmp (const wchar_t *__s1, const wchar_t *__s2) noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int wcsncmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int wcscasecmp (const wchar_t *__s1, const wchar_t *__s2) noexcept (true); extern int wcsncasecmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) noexcept (true); extern int wcscasecmp_l (const wchar_t *__s1, const wchar_t *__s2, locale_t __loc) noexcept (true); extern int wcsncasecmp_l (const wchar_t *__s1, const wchar_t *__s2, size_t __n, locale_t __loc) noexcept (true); extern int wcscoll (const wchar_t *__s1, const wchar_t *__s2) noexcept (true); ; ; ; ; extern wchar_t *wcschr (const wchar_t *__wcs, wchar_t __wc) noexcept (true) __attribute__ ((__pure__)); extern wchar_t *wcsrchr (const wchar_t *__wcs, wchar_t __wc) noexcept (true) __attribute__ ((__pure__)); ; ; ; extern wchar_t *wcspbrk (const wchar_t *__wcs, const wchar_t *__accept) noexcept (true) __attribute__ ((__pure__)); extern wchar_t *wcsstr (const wchar_t *__haystack, const wchar_t *__needle) noexcept (true) __attribute__ ((__pure__)); ; extern size_t wcslen (const wchar_t *__s) noexcept (true) __attribute__ ((__pure__)); ; ; extern wchar_t *wmemchr (const wchar_t *__s, wchar_t __c, size_t __n) noexcept (true) __attribute__ ((__pure__)); extern int wmemcmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) noexcept (true) __attribute__ ((__pure__)); extern wchar_t *wmemcpy (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n) noexcept (true); extern wchar_t *wmemmove (wchar_t *__s1, const wchar_t *__s2, size_t __n) noexcept (true); extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) noexcept (true); ; ; ; ; extern size_t mbrtowc (wchar_t *__restrict __pwc, const char *__restrict __s, size_t __n, mbstate_t *__restrict __p) noexcept (true); ; extern size_t __mbrlen (const char *__restrict __s, size_t __n, mbstate_t *__restrict __ps) noexcept (true); ; extern wint_t __btowc_alias (int __c) __asm ("btowc"); extern int __wctob_alias (wint_t __c) __asm ("wctob"); ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; extern wchar_t *__wmemcpy_chk (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n, size_t __ns1) noexcept (true); extern wchar_t *__wmemcpy_alias (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n) noexcept (true) __asm__ ("" "wmemcpy"); extern wchar_t *__wmemcpy_chk_warn (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n, size_t __ns1) noexcept (true) __asm__ ("" "__wmemcpy_chk") ; extern wchar_t *__wmemmove_chk (wchar_t *__s1, const wchar_t *__s2, size_t __n, size_t __ns1) noexcept (true); extern wchar_t *__wmemmove_alias (wchar_t *__s1, const wchar_t *__s2, size_t __n) noexcept (true) __asm__ ("" "wmemmove"); extern wchar_t *__wmemmove_chk_warn (wchar_t *__s1, const wchar_t *__s2, size_t __n, size_t __ns1) noexcept (true) __asm__ ("" "__wmemmove_chk") ; extern wchar_t *__wmempcpy_chk (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n, size_t __ns1) noexcept (true); extern wchar_t *__wmempcpy_alias (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n) noexcept (true) __asm__ ("" "wmempcpy"); extern wchar_t *__wmempcpy_chk_warn (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n, size_t __ns1) noexcept (true) __asm__ ("" "__wmempcpy_chk") ; extern wchar_t *__wmemset_chk (wchar_t *__s, wchar_t __c, size_t __n, size_t __ns) noexcept (true); extern wchar_t *__wmemset_alias (wchar_t *__s, wchar_t __c, size_t __n) noexcept (true) __asm__ ("" "wmemset"); extern wchar_t *__wmemset_chk_warn (wchar_t *__s, wchar_t __c, size_t __n, size_t __ns) noexcept (true) __asm__ ("" "__wmemset_chk") ; extern wchar_t *__wcscpy_chk (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n) noexcept (true); extern wchar_t *__wcscpy_alias (wchar_t *__restrict __dest, const wchar_t *__restrict __src) noexcept (true) __asm__ ("" "wcscpy"); extern wchar_t *__wcpcpy_chk (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __destlen) noexcept (true); extern wchar_t *__wcpcpy_alias (wchar_t *__restrict __dest, const wchar_t *__restrict __src) noexcept (true) __asm__ ("" "wcpcpy"); extern wchar_t *__wcsncpy_chk (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n, size_t __destlen) noexcept (true); extern wchar_t *__wcsncpy_alias (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n) noexcept (true) __asm__ ("" "wcsncpy"); extern wchar_t *__wcsncpy_chk_warn (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n, size_t __destlen) noexcept (true) __asm__ ("" "__wcsncpy_chk") ; extern wchar_t *__wcpncpy_chk (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n, size_t __destlen) noexcept (true); extern wchar_t *__wcpncpy_alias (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n) noexcept (true) __asm__ ("" "wcpncpy"); extern wchar_t *__wcpncpy_chk_warn (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n, size_t __destlen) noexcept (true) __asm__ ("" "__wcpncpy_chk") ; extern wchar_t *__wcscat_chk (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __destlen) noexcept (true); extern wchar_t *__wcscat_alias (wchar_t *__restrict __dest, const wchar_t *__restrict __src) noexcept (true) __asm__ ("" "wcscat"); extern wchar_t *__wcsncat_chk (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n, size_t __destlen) noexcept (true); extern wchar_t *__wcsncat_alias (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n) noexcept (true) __asm__ ("" "wcsncat"); ; ; extern int __vswprintf_chk (wchar_t *__restrict __s, size_t __n, int __flag, size_t __s_len, const wchar_t *__restrict __format, __gnuc_va_list __arg) noexcept (true) ; extern int __vswprintf_alias (wchar_t *__restrict __s, size_t __n, const wchar_t *__restrict __fmt, __gnuc_va_list __ap) noexcept (true) __asm__ ("" "vswprintf"); ; ; extern int __vfwprintf_chk (__FILE *__restrict __stream, int __flag, const wchar_t *__restrict __format, __gnuc_va_list __ap); extern int __vwprintf_chk (int __flag, const wchar_t *__restrict __format, __gnuc_va_list __ap); extern wchar_t *__fgetws_chk (wchar_t *__restrict __s, size_t __size, int __n, __FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); extern wchar_t *__fgetws_alias (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream) __asm__ ("" "fgetws") __attribute__ ((__warn_unused_result__)); extern wchar_t *__fgetws_chk_warn (wchar_t *__restrict __s, size_t __size, int __n, __FILE *__restrict __stream) __asm__ ("" "__fgetws_chk") __attribute__ ((__warn_unused_result__)) ; extern wchar_t *__fgetws_unlocked_chk (wchar_t *__restrict __s, size_t __size, int __n, __FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); extern wchar_t *__fgetws_unlocked_alias (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream) __asm__ ("" "fgetws_unlocked") __attribute__ ((__warn_unused_result__)); extern wchar_t *__fgetws_unlocked_chk_warn (wchar_t *__restrict __s, size_t __size, int __n, __FILE *__restrict __stream) __asm__ ("" "__fgetws_unlocked_chk") __attribute__ ((__warn_unused_result__)) ; extern size_t __wcrtomb_chk (char *__restrict __s, wchar_t __wchar, mbstate_t *__restrict __p, size_t __buflen) noexcept (true) __attribute__ ((__warn_unused_result__)); extern size_t __wcrtomb_alias (char *__restrict __s, wchar_t __wchar, mbstate_t *__restrict __ps) noexcept (true) __asm__ ("" "wcrtomb") __attribute__ ((__warn_unused_result__)); extern size_t __mbsrtowcs_chk (wchar_t *__restrict __dst, const char **__restrict __src, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) noexcept (true); extern size_t __mbsrtowcs_alias (wchar_t *__restrict __dst, const char **__restrict __src, size_t __len, mbstate_t *__restrict __ps) noexcept (true) __asm__ ("" "mbsrtowcs"); extern size_t __mbsrtowcs_chk_warn (wchar_t *__restrict __dst, const char **__restrict __src, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) noexcept (true) __asm__ ("" "__mbsrtowcs_chk") ; extern size_t __wcsrtombs_chk (char *__restrict __dst, const wchar_t **__restrict __src, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) noexcept (true); extern size_t __wcsrtombs_alias (char *__restrict __dst, const wchar_t **__restrict __src, size_t __len, mbstate_t *__restrict __ps) noexcept (true) __asm__ ("" "wcsrtombs"); extern size_t __wcsrtombs_chk_warn (char *__restrict __dst, const wchar_t **__restrict __src, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) noexcept (true) __asm__ ("" "__wcsrtombs_chk") ; extern size_t __mbsnrtowcs_chk (wchar_t *__restrict __dst, const char **__restrict __src, size_t __nmc, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) noexcept (true); extern size_t __mbsnrtowcs_alias (wchar_t *__restrict __dst, const char **__restrict __src, size_t __nmc, size_t __len, mbstate_t *__restrict __ps) noexcept (true) __asm__ ("" "mbsnrtowcs"); extern size_t __mbsnrtowcs_chk_warn (wchar_t *__restrict __dst, const char **__restrict __src, size_t __nmc, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) noexcept (true) __asm__ ("" "__mbsnrtowcs_chk") ; extern size_t __wcsnrtombs_chk (char *__restrict __dst, const wchar_t **__restrict __src, size_t __nwc, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) noexcept (true); extern size_t __wcsnrtombs_alias (char *__restrict __dst, const wchar_t **__restrict __src, size_t __nwc, size_t __len, mbstate_t *__restrict __ps) noexcept (true) __asm__ ("" "wcsnrtombs"); extern size_t __wcsnrtombs_chk_warn (char *__restrict __dst, const wchar_t **__restrict __src, size_t __nwc, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) noexcept (true) __asm__ ("" "__wcsnrtombs_chk") ; extern size_t __wcslcpy_chk (wchar_t *__dest, const wchar_t *__src, size_t __n, size_t __destlen) noexcept (true); extern size_t __wcslcpy_alias (wchar_t *__dest, const wchar_t *__src, size_t __n) noexcept (true) __asm__ ("" "wcslcpy"); extern size_t __wcslcat_chk (wchar_t *__dest, const wchar_t *__src, size_t __n, size_t __destlen) noexcept (true); extern size_t __wcslcat_alias (wchar_t *__dest, const wchar_t *__src, size_t __n) noexcept (true) __asm__ ("" "wcslcat"); extern __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) wchar_t * wmemcpy (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n) noexcept (true) ; extern __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) wchar_t * wmemmove (wchar_t *__s1, const wchar_t *__s2, size_t __n) noexcept (true) ; extern __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) wchar_t * wmemset (wchar_t *__s, wchar_t __c, size_t __n) noexcept (true) ; extern __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) wchar_t * wcscpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src) noexcept (true) ; extern __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) wchar_t * wcsncpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n) noexcept (true) ; extern __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) wchar_t * wcscat (wchar_t *__restrict __dest, const wchar_t *__restrict __src) noexcept (true) ; extern __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) wchar_t * wcsncat (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n) noexcept (true) ; extern __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t wcslcpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n) noexcept (true) ; extern __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t wcslcat (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n) noexcept (true) ; } namespace std { using ::mbstate_t; } extern "C++" { namespace std __attribute__ ((__visibility__ ("default"))) { using ::wint_t; using ::mbrtowc; using ::wcscat; using ::wcscmp; using ::wcscoll; using ::wcscpy; using ::wcslen; using ::wcsncat; using ::wcsncmp; using ::wcsncpy; using ::wmemcmp; using ::wmemcpy; using ::wmemmove; using ::wmemset; using ::wcschr; using ::wcspbrk; using ::wcsrchr; using ::wcsstr; using ::wmemchr; } } namespace __gnu_cxx { } namespace std { } namespace std { } namespace std __attribute__ ((__visibility__ ("default"))) { typedef long int streamoff; typedef ptrdiff_t streamsize; template<typename _StateT> class fpos { private: streamoff _M_off; _StateT _M_state; public: _StateT state() const ; fpos& operator+=(streamoff __off) ; fpos& operator-=(streamoff __off) ; fpos operator+(streamoff __off) const ; fpos operator-(streamoff __off) const ; streamoff operator-(const fpos& __other) const ; }; template<typename _StateT> bool operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) ; template<typename _StateT> bool operator!=(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) ; typedef fpos<mbstate_t> streampos; typedef fpos<mbstate_t> wstreampos; typedef fpos<mbstate_t> u8streampos; typedef fpos<mbstate_t> u16streampos; typedef fpos<mbstate_t> u32streampos; } namespace std __attribute__ ((__visibility__ ("default"))) { 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; 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; } 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; typedef basic_ios<char> ios; typedef basic_streambuf<char> streambuf; typedef basic_istream<char> istream; typedef basic_ostream<char> ostream; typedef basic_iostream<char> iostream; typedef basic_stringbuf<char> stringbuf; typedef basic_istringstream<char> istringstream; typedef basic_ostringstream<char> ostringstream; typedef basic_stringstream<char> stringstream; typedef basic_filebuf<char> filebuf; typedef basic_ifstream<char> ifstream; typedef basic_ofstream<char> ofstream; typedef basic_fstream<char> fstream; typedef basic_ios<wchar_t> wios; typedef basic_streambuf<wchar_t> wstreambuf; typedef basic_istream<wchar_t> wistream; typedef basic_ostream<wchar_t> wostream; typedef basic_iostream<wchar_t> wiostream; typedef basic_stringbuf<wchar_t> wstringbuf; typedef basic_istringstream<wchar_t> wistringstream; typedef basic_ostringstream<wchar_t> wostringstream; typedef basic_stringstream<wchar_t> wstringstream; typedef basic_filebuf<wchar_t> wfilebuf; typedef basic_ifstream<wchar_t> wifstream; typedef basic_ofstream<wchar_t> wofstream; typedef basic_fstream<wchar_t> wfstream; template<typename _CharT, typename _Traits = char_traits<_CharT>, typename _Allocator = allocator<_CharT>> class basic_syncbuf; template<typename _CharT, typename _Traits = char_traits<_CharT>, typename _Allocator = allocator<_CharT>> class basic_osyncstream; using syncbuf = basic_syncbuf<char>; using osyncstream = basic_osyncstream<char>; using wsyncbuf = basic_syncbuf<wchar_t>; using wosyncstream = basic_osyncstream<wchar_t>; } extern "C++" { namespace std __attribute__ ((__visibility__ ("default"))) { class bad_exception : public exception { public: bad_exception() noexcept ; virtual ~bad_exception() noexcept; virtual const char* what() const noexcept; }; typedef void (*terminate_handler) (); terminate_handler set_terminate(terminate_handler) noexcept; terminate_handler get_terminate() noexcept; void terminate() noexcept __attribute__ ((__noreturn__)); typedef void (*__attribute__ ((__deprecated__)) unexpected_handler) (); __attribute__ ((__deprecated__)) unexpected_handler set_unexpected(unexpected_handler) noexcept; __attribute__ ((__deprecated__)) unexpected_handler get_unexpected() noexcept; __attribute__ ((__deprecated__)) void unexpected() __attribute__ ((__noreturn__)); __attribute__ ((__deprecated__ ("use '" "std::uncaught_exceptions()" "' instead"))) bool uncaught_exception() noexcept __attribute__ ((__pure__)); int uncaught_exceptions() noexcept __attribute__ ((__pure__)); } namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { void __verbose_terminate_handler(); } } #pragma GCC visibility push(default) typedef long int ptrdiff_t; typedef long unsigned int size_t; typedef long unsigned int rsize_t; 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; namespace std { class type_info; } namespace __cxxabiv1 { struct __cxa_refcounted_exception; extern "C" { void* __cxa_allocate_exception(size_t) noexcept; void __cxa_free_exception(void*) noexcept; __cxa_refcounted_exception* __cxa_init_primary_exception(void *__object, std::type_info *__tinfo, void ( *__dest) (void *)) noexcept; } } #pragma GCC visibility pop namespace std { size_t _Hash_bytes(const void* __ptr, size_t __len, size_t __seed); size_t _Fnv_hash_bytes(const void* __ptr, size_t __len, size_t __seed); } #pragma GCC visibility push(default) extern "C++" { namespace __cxxabiv1 { class __class_type_info; } namespace std { class type_info { public: virtual ~type_info(); const char* name() const noexcept ; bool before(const type_info& __arg) const noexcept; bool operator==(const type_info& __arg) const noexcept; size_t hash_code() const noexcept ; virtual bool __is_pointer_p() const; virtual bool __is_function_p() const; virtual bool __do_catch(const type_info *__thr_type, void **__thr_obj, unsigned __outer) const; virtual bool __do_upcast(const __cxxabiv1::__class_type_info *__target, void **__obj_ptr) const; protected: const char *__name; explicit type_info(const char *__n) ; private: type_info& operator=(const type_info&) = delete; type_info(const type_info&) = delete; }; class bad_cast : public exception { public: bad_cast() noexcept ; virtual ~bad_cast() noexcept; virtual const char* what() const noexcept; }; class bad_typeid : public exception { public: bad_typeid () noexcept ; virtual ~bad_typeid() noexcept; virtual const char* what() const noexcept; }; } } #pragma GCC visibility pop extern "C++" { namespace std __attribute__ ((__visibility__ ("default"))) { class type_info; namespace __exception_ptr { class exception_ptr; } using __exception_ptr::exception_ptr; exception_ptr current_exception() noexcept; template<typename _Ex> exception_ptr make_exception_ptr(_Ex) noexcept; void rethrow_exception(exception_ptr) __attribute__ ((__noreturn__)); namespace __exception_ptr { using std::rethrow_exception; class exception_ptr { void* _M_exception_object; explicit exception_ptr(void* __e) noexcept; void _M_addref() noexcept; void _M_release() noexcept; void *_M_get() const noexcept __attribute__ ((__pure__)); friend exception_ptr std::current_exception() noexcept; friend void std::rethrow_exception(exception_ptr); template<typename _Ex> friend exception_ptr std::make_exception_ptr(_Ex) noexcept; public: exception_ptr() noexcept; exception_ptr(const exception_ptr&) noexcept; exception_ptr(nullptr_t) ; exception_ptr(exception_ptr&& __o) ; exception_ptr& operator=(const exception_ptr&) noexcept; exception_ptr& operator=(exception_ptr&& __o) noexcept ; ~exception_ptr() noexcept; void swap(exception_ptr&) noexcept; explicit operator bool() const noexcept ; friend bool operator==(const exception_ptr&, const exception_ptr&) noexcept = default; const class std::type_info* __cxa_exception_type() const noexcept __attribute__ ((__pure__)); }; void swap(exception_ptr& __lhs, exception_ptr& __rhs) ; template<typename _Ex> void __dest_thunk(void* __x) ; } using __exception_ptr::swap; template<typename _Ex> exception_ptr make_exception_ptr(_Ex __ex) noexcept ; } } extern "C++" { namespace std __attribute__ ((__visibility__ ("default"))) { class nested_exception { exception_ptr _M_ptr; public: nested_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 ; exception_ptr nested_ptr() const noexcept ; }; template<typename _Except> struct _Nested_exception : public _Except, public nested_exception { explicit _Nested_exception(const _Except& __ex) ; explicit _Nested_exception(_Except&& __ex) ; }; template<typename _Tp> [[noreturn]] void throw_with_nested(_Tp&& __t) ; template<typename _Ex> inline void rethrow_if_nested(const _Ex& __ex) { const _Ex* __ptr = __builtin_addressof(__ex); if constexpr (!is_polymorphic_v<_Ex>) return; else if constexpr (is_base_of_v<nested_exception, _Ex> && !is_convertible_v<_Ex*, nested_exception*>) return; else if (auto __ne_ptr = dynamic_cast<const nested_exception*>(__ptr)) __ne_ptr->rethrow_nested(); } } } namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Warray-bounds" 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; }; 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; using comparison_category = std::strong_ordering; static constexpr void assign(char_type& __c1, const char_type& __c2) { if (std::__is_constant_evaluated()) std::construct_at(__builtin_addressof(__c1), __c2); else __c1 = __c2; } static constexpr bool eq(const char_type& __c1, const char_type& __c2) { return __c1 == __c2; } static constexpr bool lt(const char_type& __c1, const char_type& __c2) { return __c1 < __c2; } static constexpr int compare(const char_type* __s1, const char_type* __s2, std::size_t __n); static constexpr std::size_t length(const char_type* __s); static constexpr const char_type* find(const char_type* __s, std::size_t __n, const char_type& __a); static constexpr char_type* move(char_type* __s1, const char_type* __s2, std::size_t __n); static constexpr char_type* copy(char_type* __s1, const char_type* __s2, std::size_t __n); static constexpr char_type* assign(char_type* __s, std::size_t __n, char_type __a); static constexpr char_type to_char_type(const int_type& __c) ; static constexpr int_type to_int_type(const char_type& __c) ; static constexpr bool eq_int_type(const int_type& __c1, const int_type& __c2) ; static constexpr int_type eof() ; static constexpr int_type not_eof(const int_type& __c) { return !eq_int_type(__c, eof()) ? __c : to_int_type(char_type()); } }; template<typename _CharT> 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> 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> 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; } } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _CharT> struct char_traits : public __gnu_cxx::char_traits<_CharT> { }; 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; using comparison_category = strong_ordering; static constexpr void assign(char_type& __c1, const char_type& __c2) noexcept ; 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 (static_cast<unsigned char>(__c1) < static_cast<unsigned char>(__c2)); } static constexpr int compare(const char_type* __s1, const char_type* __s2, size_t __n) { if (__n == 0) return 0; if (std::__is_constant_evaluated()) { 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; } return __builtin_memcmp(__s1, __s2, __n); } static constexpr size_t length(const char_type* __s) { if (std::__is_constant_evaluated()) return __gnu_cxx::char_traits<char_type>::length(__s); return __builtin_strlen(__s); } static constexpr const char_type* find(const char_type* __s, size_t __n, const char_type& __a) ; static constexpr char_type* move(char_type* __s1, const char_type* __s2, size_t __n) ; static constexpr char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) ; static constexpr char_type* assign(char_type* __s, size_t __n, char_type __a) ; static constexpr char_type to_char_type(const int_type& __c) noexcept ; static constexpr int_type to_int_type(const char_type& __c) noexcept ; static constexpr bool eq_int_type(const int_type& __c1, const int_type& __c2) noexcept ; static constexpr int_type eof() noexcept ; static constexpr int_type not_eof(const int_type& __c) noexcept ; }; 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; using comparison_category = strong_ordering; static constexpr void assign(char_type& __c1, const char_type& __c2) noexcept ; static constexpr bool eq(const char_type& __c1, const char_type& __c2) noexcept ; static constexpr bool lt(const char_type& __c1, const char_type& __c2) noexcept ; static constexpr int compare(const char_type* __s1, const char_type* __s2, size_t __n) ; static constexpr size_t length(const char_type* __s) ; static constexpr const char_type* find(const char_type* __s, size_t __n, const char_type& __a) ; static constexpr char_type* move(char_type* __s1, const char_type* __s2, size_t __n) ; static constexpr char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) ; static constexpr char_type* assign(char_type* __s, size_t __n, char_type __a) ; static constexpr char_type to_char_type(const int_type& __c) noexcept ; static constexpr int_type to_int_type(const char_type& __c) noexcept ; static constexpr bool eq_int_type(const int_type& __c1, const int_type& __c2) noexcept ; static constexpr int_type eof() noexcept ; static constexpr int_type not_eof(const int_type& __c) noexcept ; }; 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; using comparison_category = strong_ordering; static constexpr void assign(char_type& __c1, const char_type& __c2) noexcept { if (std::__is_constant_evaluated()) std::construct_at(__builtin_addressof(__c1), __c2); else __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 constexpr int compare(const char_type* __s1, const char_type* __s2, size_t __n) { if (__n == 0) return 0; if (std::__is_constant_evaluated()) return __gnu_cxx::char_traits<char_type>::compare(__s1, __s2, __n); return __builtin_memcmp(__s1, __s2, __n); } static constexpr size_t length(const char_type* __s) { if (std::__is_constant_evaluated()) return __gnu_cxx::char_traits<char_type>::length(__s); size_t __i = 0; while (!eq(__s[__i], char_type())) ++__i; return __i; } static constexpr const char_type* find(const char_type* __s, size_t __n, const char_type& __a) { if (__n == 0) return 0; if (std::__is_constant_evaluated()) return __gnu_cxx::char_traits<char_type>::find(__s, __n, __a); return static_cast<const char_type*>(__builtin_memchr(__s, __a, __n)); } static constexpr char_type* move(char_type* __s1, const char_type* __s2, size_t __n) { if (__n == 0) return __s1; if (std::__is_constant_evaluated()) return __gnu_cxx::char_traits<char_type>::move(__s1, __s2, __n); return static_cast<char_type*>(__builtin_memmove(__s1, __s2, __n)); } static constexpr char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) { if (__n == 0) return __s1; if (std::__is_constant_evaluated()) return __gnu_cxx::char_traits<char_type>::copy(__s1, __s2, __n); return static_cast<char_type*>(__builtin_memcpy(__s1, __s2, __n)); } static constexpr char_type* assign(char_type* __s, size_t __n, char_type __a) { if (__n == 0) return __s; if (std::__is_constant_evaluated()) return __gnu_cxx::char_traits<char_type>::assign(__s, __n, __a); return static_cast<char_type*>(__builtin_memset(__s, __a, __n)); } 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; } }; } namespace std __attribute__ ((__visibility__ ("default"))) { template<> struct char_traits<char16_t> { typedef char16_t char_type; typedef unsigned short int_type; typedef streamoff off_type; typedef u16streampos pos_type; typedef mbstate_t state_type; using comparison_category = strong_ordering; static constexpr void assign(char_type& __c1, const char_type& __c2) noexcept ; static constexpr bool eq(const char_type& __c1, const char_type& __c2) noexcept ; static constexpr bool lt(const char_type& __c1, const char_type& __c2) noexcept ; static constexpr int compare(const char_type* __s1, const char_type* __s2, size_t __n) ; static constexpr size_t length(const char_type* __s) ; static constexpr const char_type* find(const char_type* __s, size_t __n, const char_type& __a) ; static constexpr char_type* move(char_type* __s1, const char_type* __s2, size_t __n) ; static constexpr char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) ; static constexpr char_type* assign(char_type* __s, size_t __n, char_type __a) ; static constexpr char_type to_char_type(const int_type& __c) noexcept ; static constexpr bool eq_int_type(const int_type& __c1, const int_type& __c2) noexcept ; static constexpr int_type to_int_type(const char_type& __c) noexcept ; static constexpr int_type eof() noexcept ; static constexpr int_type not_eof(const int_type& __c) noexcept ; }; template<> struct char_traits<char32_t> { typedef char32_t char_type; typedef unsigned int int_type; typedef streamoff off_type; typedef u32streampos pos_type; typedef mbstate_t state_type; using comparison_category = strong_ordering; static constexpr void assign(char_type& __c1, const char_type& __c2) noexcept ; static constexpr bool eq(const char_type& __c1, const char_type& __c2) noexcept ; static constexpr bool lt(const char_type& __c1, const char_type& __c2) noexcept ; static constexpr int compare(const char_type* __s1, const char_type* __s2, size_t __n) ; static constexpr size_t length(const char_type* __s) ; static constexpr const char_type* find(const char_type* __s, size_t __n, const char_type& __a) ; static constexpr char_type* move(char_type* __s1, const char_type* __s2, size_t __n) ; static constexpr char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) ; static constexpr char_type* assign(char_type* __s, size_t __n, char_type __a) ; static constexpr char_type to_char_type(const int_type& __c) noexcept ; static constexpr int_type to_int_type(const char_type& __c) noexcept ; static constexpr bool eq_int_type(const int_type& __c1, const int_type& __c2) noexcept ; static constexpr int_type eof() noexcept ; static constexpr int_type not_eof(const int_type& __c) noexcept { return eq_int_type(__c, eof()) ? 0 : __c; } }; namespace __detail { template<typename _ChTraits> constexpr auto __char_traits_cmp_cat(int __cmp) noexcept { if constexpr (requires { typename _ChTraits::comparison_category; }) { using _Cat = typename _ChTraits::comparison_category; static_assert( !is_void_v<common_comparison_category_t<_Cat>> ); return static_cast<_Cat>(__cmp <=> 0); } else return static_cast<weak_ordering>(__cmp <=> 0); } } #pragma GCC diagnostic pop } extern "C" { struct lconv { char *decimal_point; char *thousands_sep; char *grouping; char *int_curr_symbol; char *currency_symbol; char *mon_decimal_point; char *mon_thousands_sep; char *mon_grouping; char *positive_sign; char *negative_sign; char int_frac_digits; char frac_digits; char p_cs_precedes; char p_sep_by_space; char n_cs_precedes; char n_sep_by_space; char p_sign_posn; char n_sign_posn; 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; }; extern char *setlocale (int __category, const char *__locale) noexcept (true); extern struct lconv *localeconv (void) noexcept (true); extern locale_t newlocale (int __category_mask, const char *__locale, locale_t __base) noexcept (true); extern locale_t duplocale (locale_t __dataset) noexcept (true); extern void freelocale (locale_t __dataset) noexcept (true); extern locale_t uselocale (locale_t __dataset) noexcept (true); } namespace std { using ::lconv; using ::setlocale; using ::localeconv; } namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { extern "C" __typeof(uselocale) __uselocale; } namespace std __attribute__ ((__visibility__ ("default"))) { typedef __locale_t __c_locale; inline int __convert_from_v(const __c_locale& __cloc __attribute__ ((__unused__)), char* __out, const int __size __attribute__ ((__unused__)), const char* __fmt, ...) { __c_locale __old = __gnu_cxx::__uselocale(__cloc); __builtin_va_list __args; __builtin_va_start(__args, __fmt); const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args); __builtin_va_end(__args); __gnu_cxx::__uselocale(__old); return __ret; } } extern "C" { enum { _ISupper = ((0) < 8 ? ((1 << (0)) << 8) : ((1 << (0)) >> 8)), _ISlower = ((1) < 8 ? ((1 << (1)) << 8) : ((1 << (1)) >> 8)), _ISalpha = ((2) < 8 ? ((1 << (2)) << 8) : ((1 << (2)) >> 8)), _ISdigit = ((3) < 8 ? ((1 << (3)) << 8) : ((1 << (3)) >> 8)), _ISxdigit = ((4) < 8 ? ((1 << (4)) << 8) : ((1 << (4)) >> 8)), _ISspace = ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)), _ISprint = ((6) < 8 ? ((1 << (6)) << 8) : ((1 << (6)) >> 8)), _ISgraph = ((7) < 8 ? ((1 << (7)) << 8) : ((1 << (7)) >> 8)), _ISblank = ((8) < 8 ? ((1 << (8)) << 8) : ((1 << (8)) >> 8)), _IScntrl = ((9) < 8 ? ((1 << (9)) << 8) : ((1 << (9)) >> 8)), _ISpunct = ((10) < 8 ? ((1 << (10)) << 8) : ((1 << (10)) >> 8)), _ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8)) }; extern const unsigned short int **__ctype_b_loc (void) noexcept (true) __attribute__ ((__const__)); extern const __int32_t **__ctype_tolower_loc (void) noexcept (true) __attribute__ ((__const__)); extern const __int32_t **__ctype_toupper_loc (void) noexcept (true) __attribute__ ((__const__)); extern int isalnum (int) noexcept (true); extern int isalpha (int) noexcept (true); extern int iscntrl (int) noexcept (true); extern int isdigit (int) noexcept (true); extern int islower (int) noexcept (true); extern int isgraph (int) noexcept (true); extern int isprint (int) noexcept (true); extern int ispunct (int) noexcept (true); extern int isspace (int) noexcept (true); extern int isupper (int) noexcept (true); extern int isxdigit (int) noexcept (true); extern int tolower (int __c) noexcept (true); extern int toupper (int __c) noexcept (true); extern int isblank (int) noexcept (true); extern int isctype (int __c, int __mask) noexcept (true); extern int isascii (int __c) noexcept (true); extern int toascii (int __c) noexcept (true); extern int _toupper (int) noexcept (true); extern int _tolower (int) noexcept (true); extern int isalnum_l (int, locale_t) noexcept (true); extern int isalpha_l (int, locale_t) noexcept (true); extern int iscntrl_l (int, locale_t) noexcept (true); extern int isdigit_l (int, locale_t) noexcept (true); extern int islower_l (int, locale_t) noexcept (true); extern int isgraph_l (int, locale_t) noexcept (true); extern int isprint_l (int, locale_t) noexcept (true); extern int ispunct_l (int, locale_t) noexcept (true); extern int isspace_l (int, locale_t) noexcept (true); extern int isupper_l (int, locale_t) noexcept (true); extern int isxdigit_l (int, locale_t) noexcept (true); extern int isblank_l (int, locale_t) noexcept (true); extern int __tolower_l (int __c, locale_t __l) noexcept (true); extern int tolower_l (int __c, locale_t __l) noexcept (true); extern int __toupper_l (int __c, locale_t __l) noexcept (true); extern int toupper_l (int __c, locale_t __l) noexcept (true); } 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 { using ::isblank; } namespace std __attribute__ ((__visibility__ ("default"))) { class locale; template<typename _Facet> bool has_facet(const locale&) throw(); template<typename _Facet> const _Facet& use_facet(const locale&); 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&); template<typename _CharT> bool isblank(_CharT, const locale&); template<typename _CharT> _CharT toupper(_CharT, const locale&); template<typename _CharT> _CharT tolower(_CharT, const locale&); struct ctype_base; template<typename _CharT> class ctype; template<> class ctype<char>; template<> class ctype<wchar_t>; template<typename _CharT> class ctype_byname; class codecvt_base; template<typename _InternT, typename _ExternT, typename _StateT> class codecvt; template<> class codecvt<char, char, mbstate_t>; template<> class codecvt<wchar_t, char, mbstate_t>; template<> class codecvt<char16_t, char, mbstate_t>; template<> class codecvt<char32_t, char, mbstate_t>; template<> class codecvt<char16_t, char8_t, mbstate_t>; template<> class codecvt<char32_t, char8_t, mbstate_t>; template<typename _InternT, typename _ExternT, typename _StateT> class codecvt_byname; template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> > class num_get; template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> > class num_put; namespace __cxx11 { template<typename _CharT> class numpunct; template<typename _CharT> class numpunct_byname; } namespace __cxx11 { template<typename _CharT> class collate; template<typename _CharT> class collate_byname; } class time_base; 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; } template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> > class time_put; template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> > class time_put_byname; class money_base; namespace __cxx11 { template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> > class money_get; template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> > class money_put; } namespace __cxx11 { template<typename _CharT, bool _Intl = false> class moneypunct; template<typename _CharT, bool _Intl = false> class moneypunct_byname; } struct messages_base; namespace __cxx11 { template<typename _CharT> class messages; template<typename _CharT> class messages_byname; } } #pragma GCC visibility push(default) typedef long unsigned int size_t; struct sched_param { int sched_priority; }; extern "C" { extern int clone (int (*__fn) (void *__arg), void *__child_stack, int __flags, void *__arg, ...) noexcept (true); extern int unshare (int __flags) noexcept (true); extern int sched_getcpu (void) noexcept (true); extern int getcpu (unsigned int *, unsigned int *) noexcept (true); extern int setns (int __fd, int __nstype) noexcept (true); } typedef unsigned long int __cpu_mask; typedef struct { __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))]; } cpu_set_t; extern "C" { extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp) noexcept (true); extern cpu_set_t *__sched_cpualloc (size_t __count) noexcept (true) __attribute__ ((__warn_unused_result__)); extern void __sched_cpufree (cpu_set_t *__set) noexcept (true); } extern "C" { extern int sched_setparam (__pid_t __pid, const struct sched_param *__param) noexcept (true); extern int sched_getparam (__pid_t __pid, struct sched_param *__param) noexcept (true); extern int sched_setscheduler (__pid_t __pid, int __policy, const struct sched_param *__param) noexcept (true); extern int sched_getscheduler (__pid_t __pid) noexcept (true); extern int sched_yield (void) noexcept (true); extern int sched_get_priority_max (int __algorithm) noexcept (true); ; ; ; ; } typedef long int __jmp_buf[8]; struct __jmp_buf_tag { __jmp_buf __jmpbuf; int __mask_was_saved; __sigset_t __saved_mask; }; extern "C" { ; } enum { PTHREAD_CREATE_JOINABLE, PTHREAD_CREATE_DETACHED }; enum { PTHREAD_MUTEX_TIMED_NP, PTHREAD_MUTEX_RECURSIVE_NP, PTHREAD_MUTEX_ERRORCHECK_NP, PTHREAD_MUTEX_ADAPTIVE_NP , 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 , PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_TIMED_NP }; enum { PTHREAD_MUTEX_STALLED, PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED, PTHREAD_MUTEX_ROBUST, PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST }; enum { PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT, PTHREAD_PRIO_PROTECT }; 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 }; enum { PTHREAD_INHERIT_SCHED, PTHREAD_EXPLICIT_SCHED }; enum { PTHREAD_SCOPE_SYSTEM, PTHREAD_SCOPE_PROCESS }; enum { PTHREAD_PROCESS_PRIVATE, PTHREAD_PROCESS_SHARED }; struct _pthread_cleanup_buffer { void (*__routine) (void *); void *__arg; int __canceltype; struct _pthread_cleanup_buffer *__prev; }; enum { PTHREAD_CANCEL_ENABLE, PTHREAD_CANCEL_DISABLE }; enum { PTHREAD_CANCEL_DEFERRED, PTHREAD_CANCEL_ASYNCHRONOUS }; extern "C" { extern int pthread_create (pthread_t *__restrict __newthread, const pthread_attr_t *__restrict __attr, void *(*__start_routine) (void *), void *__restrict __arg) noexcept (true) __attribute__ ((__nonnull__ (1, 3))); ; extern int pthread_join (pthread_t __th, void **__thread_return); ; ; ; extern int pthread_detach (pthread_t __th) noexcept (true); extern pthread_t pthread_self (void) noexcept (true) __attribute__ ((__const__)); extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) noexcept (true) __attribute__ ((__const__)); ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; extern int pthread_once (pthread_once_t *__once_control, void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2))); ; extern int pthread_setcanceltype (int __type, int *__oldtype); ; ; struct __cancel_jmp_buf_tag { __jmp_buf __cancel_jmp_buf; int __mask_was_saved; }; typedef struct { struct __cancel_jmp_buf_tag __cancel_jmp_buf[1]; void *__pad[4]; } __pthread_unwind_buf_t __attribute__ ((__aligned__)); struct __pthread_cleanup_frame { void (*__cancel_routine) (void *); void *__cancel_arg; int __do_it; int __cancel_type; }; class __pthread_cleanup_class { void (*__cancel_routine) (void *); void *__cancel_arg; int __do_it; int __cancel_type; public: }; ; extern int pthread_mutex_init (pthread_mutex_t *__mutex, const pthread_mutexattr_t *__mutexattr) noexcept (true) __attribute__ ((__nonnull__ (1))); extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) noexcept (true) __attribute__ ((__nonnull__ (1))); extern int pthread_mutex_trylock (pthread_mutex_t *__mutex) noexcept (true) __attribute__ ((__nonnull__ (1))); extern int pthread_mutex_lock (pthread_mutex_t *__mutex) noexcept (true) __attribute__ ((__nonnull__ (1))); extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex, const struct timespec *__restrict __abstime) noexcept (true) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_mutex_clocklock (pthread_mutex_t *__restrict __mutex, clockid_t __clockid, const struct timespec *__restrict __abstime) noexcept (true) __attribute__ ((__nonnull__ (1, 3))); extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) noexcept (true) __attribute__ ((__nonnull__ (1))); ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock) noexcept (true) __attribute__ ((__nonnull__ (1))); extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) noexcept (true) __attribute__ ((__nonnull__ (1))); extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock, const struct timespec *__restrict __abstime) noexcept (true) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_rwlock_clockrdlock (pthread_rwlock_t *__restrict __rwlock, clockid_t __clockid, const struct timespec *__restrict __abstime) noexcept (true) __attribute__ ((__nonnull__ (1, 3))); extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) noexcept (true) __attribute__ ((__nonnull__ (1))); extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) noexcept (true) __attribute__ ((__nonnull__ (1))); extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock, const struct timespec *__restrict __abstime) noexcept (true) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_rwlock_clockwrlock (pthread_rwlock_t *__restrict __rwlock, clockid_t __clockid, const struct timespec *__restrict __abstime) noexcept (true) __attribute__ ((__nonnull__ (1, 3))); extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) noexcept (true) __attribute__ ((__nonnull__ (1))); ; ; ; ; ; ; ; extern int pthread_cond_destroy (pthread_cond_t *__cond) noexcept (true) __attribute__ ((__nonnull__ (1))); extern int pthread_cond_signal (pthread_cond_t *__cond) noexcept (true) __attribute__ ((__nonnull__ (1))); extern int pthread_cond_broadcast (pthread_cond_t *__cond) noexcept (true) __attribute__ ((__nonnull__ (1))); extern int pthread_cond_wait (pthread_cond_t *__restrict __cond, pthread_mutex_t *__restrict __mutex) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond, pthread_mutex_t *__restrict __mutex, const struct timespec *__restrict __abstime) __attribute__ ((__nonnull__ (1, 2, 3))); extern int pthread_cond_clockwait (pthread_cond_t *__restrict __cond, pthread_mutex_t *__restrict __mutex, __clockid_t __clock_id, const struct timespec *__restrict __abstime) __attribute__ ((__nonnull__ (1, 2, 4))); ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) noexcept (true) __attribute__ ((__nonnull__ (1))); extern int pthread_barrierattr_getpshared (const pthread_barrierattr_t * __restrict __attr, int *__restrict __pshared) noexcept (true) __attribute__ ((__nonnull__ (1, 2))); extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr, int __pshared) noexcept (true) __attribute__ ((__nonnull__ (1))); extern int pthread_key_create (pthread_key_t *__key, void (*__destr_function) (void *)) noexcept (true) __attribute__ ((__nonnull__ (1))); extern int pthread_key_delete (pthread_key_t __key) noexcept (true); extern void *pthread_getspecific (pthread_key_t __key) noexcept (true); extern int pthread_setspecific (pthread_key_t __key, const void *__pointer) noexcept (true) ; extern int pthread_getcpuclockid (pthread_t __thread_id, __clockid_t *__clock_id) noexcept (true) __attribute__ ((__nonnull__ (2))); extern int pthread_atfork (void (*__prepare) (void), void (*__parent) (void), void (*__child) (void)) noexcept (true); extern __inline __attribute__ ((__gnu_inline__)) int pthread_equal (pthread_t __thread1, pthread_t __thread2) noexcept (true) { return __thread1 == __thread2; } } 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; static int __gthread_active_p (void) ; static int __gthread_create (__gthread_t *__threadid, void *(*__func) (void*), void *__args) ; static int __gthread_join (__gthread_t __threadid, void **__value_ptr) ; static int __gthread_detach (__gthread_t __threadid) ; static int __gthread_equal (__gthread_t __t1, __gthread_t __t2) ; static __gthread_t __gthread_self (void) ; static int __gthread_yield (void) ; static int __gthread_once (__gthread_once_t *__once, void (*__func) (void)) ; static int __gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *)) ; static int __gthread_key_delete (__gthread_key_t __key) ; static void * __gthread_getspecific (__gthread_key_t __key) ; static int __gthread_setspecific (__gthread_key_t __key, const void *__ptr) ; static void __gthread_mutex_init_function (__gthread_mutex_t *__mutex) ; static int __gthread_mutex_destroy (__gthread_mutex_t *__mutex) ; static int __gthread_mutex_lock (__gthread_mutex_t *__mutex) ; static int __gthread_mutex_trylock (__gthread_mutex_t *__mutex) ; static int __gthread_mutex_timedlock (__gthread_mutex_t *__mutex, const __gthread_time_t *__abs_timeout) ; static int __gthread_mutex_unlock (__gthread_mutex_t *__mutex) ; static int __gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex) ; static int __gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex) ; static int __gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *__mutex, const __gthread_time_t *__abs_timeout) ; static int __gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex) ; static int __gthread_recursive_mutex_destroy (__gthread_recursive_mutex_t *__mutex) ; static int __gthread_cond_broadcast (__gthread_cond_t *__cond) ; static int __gthread_cond_signal (__gthread_cond_t *__cond) ; static int __gthread_cond_wait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex) ; static int __gthread_cond_timedwait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex, const __gthread_time_t *__abs_timeout) ; static int __gthread_cond_wait_recursive (__gthread_cond_t *__cond, __gthread_recursive_mutex_t *__mutex) ; static int __gthread_cond_destroy (__gthread_cond_t* __cond) ; #pragma GCC visibility pop typedef int _Atomic_word; extern "C" { extern char __libc_single_threaded; } namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { __attribute__((__always_inline__)) bool __is_single_threaded() noexcept ; _Atomic_word __attribute__((__always_inline__)) __exchange_and_add(volatile _Atomic_word* __mem, int __val) ; void __attribute__((__always_inline__)) __atomic_add(volatile _Atomic_word* __mem, int __val) ; _Atomic_word __attribute__((__always_inline__)) __exchange_and_add_single(_Atomic_word* __mem, int __val) ; void __attribute__((__always_inline__)) __atomic_add_single(_Atomic_word* __mem, int __val) ; _Atomic_word __attribute__ ((__always_inline__)) __exchange_and_add_dispatch(_Atomic_word* __mem, int __val) ; void __attribute__ ((__always_inline__)) __atomic_add_dispatch(_Atomic_word* __mem, int __val) ; } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Tp> class __new_allocator { public: typedef _Tp value_type; typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; typedef std::true_type propagate_on_container_move_assignment; __attribute__((__always_inline__)) constexpr __new_allocator() noexcept ; __attribute__((__always_inline__)) constexpr __new_allocator(const __new_allocator&) noexcept ; template<typename _Tp1> __attribute__((__always_inline__)) constexpr __new_allocator(const __new_allocator<_Tp1>&) noexcept ; __new_allocator& operator=(const __new_allocator&) = default; [[__nodiscard__]] _Tp* allocate(size_type __n, const void* = static_cast<const void*>(0)) ; void deallocate(_Tp* __p, size_type __n __attribute__ ((__unused__))) ; template<typename _Up> friend __attribute__((__always_inline__)) constexpr bool operator==(const __new_allocator&, const __new_allocator<_Up>&) noexcept ; private: __attribute__((__always_inline__)) constexpr size_type _M_max_size() const noexcept ; }; } namespace std { template<typename _Tp> using __allocator_base = __new_allocator<_Tp>; } namespace std __attribute__ ((__visibility__ ("default"))) { template<> class allocator<void> { public: typedef void value_type; typedef size_t size_type; typedef ptrdiff_t difference_type; using propagate_on_container_move_assignment = true_type; using is_always_equal __attribute__ ((__deprecated__ ("use '" "std::allocator_traits::is_always_equal" "' instead"))) = true_type; allocator() = default; ~allocator() = default; template<typename _Up> __attribute__((__always_inline__)) constexpr allocator(const allocator<_Up>&) noexcept ; }; template<typename _Tp> class allocator : public __allocator_base<_Tp> { public: typedef _Tp value_type; typedef size_t size_type; typedef ptrdiff_t difference_type; using propagate_on_container_move_assignment = true_type; using is_always_equal __attribute__ ((__deprecated__ ("use '" "std::allocator_traits::is_always_equal" "' instead"))) = true_type; __attribute__((__always_inline__)) constexpr allocator() noexcept ; __attribute__((__always_inline__)) constexpr allocator(const allocator& __a) ; allocator& operator=(const allocator&) = default; template<typename _Tp1> __attribute__((__always_inline__)) constexpr allocator(const allocator<_Tp1>&) noexcept ; __attribute__((__always_inline__)) constexpr ~allocator() noexcept ; [[nodiscard,__gnu__::__always_inline__]] constexpr _Tp* allocate(size_t __n) ; [[__gnu__::__always_inline__]] constexpr void deallocate(_Tp* __p, size_t __n) ; friend __attribute__((__always_inline__)) constexpr bool operator==(const allocator&, const allocator&) noexcept ; }; template<typename _T1, typename _T2> __attribute__((__always_inline__)) constexpr bool operator==(const allocator<_T1>&, const allocator<_T2>&) noexcept ; 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>&) ; }; extern template class allocator<char>; extern template class allocator<wchar_t>; } #pragma GCC visibility push(default) namespace __cxxabiv1 { class __forced_unwind { virtual ~__forced_unwind() throw(); virtual void __pure_dummy() = 0; }; } #pragma GCC visibility pop namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _CharT, typename _Traits> void __ostream_write(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s, streamsize __n) ; template<typename _CharT, typename _Traits> void __ostream_fill(basic_ostream<_CharT, _Traits>& __out, streamsize __n) ; template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& __ostream_insert(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s, streamsize __n) ; extern template ostream& __ostream_insert(ostream&, const char*, streamsize); extern template wostream& __ostream_insert(wostream&, const wchar_t*, streamsize); } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Arg, typename _Result> struct unary_function { typedef _Arg argument_type; typedef _Result result_type; } __attribute__ ((__deprecated__)); template<typename _Arg1, typename _Arg2, typename _Result> struct binary_function { typedef _Arg1 first_argument_type; typedef _Arg2 second_argument_type; typedef _Result result_type; } __attribute__ ((__deprecated__)); struct __is_transparent; 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; #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" template<typename _Tp> struct plus : public binary_function<_Tp, _Tp, _Tp> { constexpr _Tp operator()(const _Tp& __x, const _Tp& __y) const ; }; template<typename _Tp> struct minus : public binary_function<_Tp, _Tp, _Tp> { constexpr _Tp operator()(const _Tp& __x, const _Tp& __y) const ; }; template<typename _Tp> struct multiplies : public binary_function<_Tp, _Tp, _Tp> { constexpr _Tp operator()(const _Tp& __x, const _Tp& __y) const ; }; template<typename _Tp> struct divides : public binary_function<_Tp, _Tp, _Tp> { constexpr _Tp operator()(const _Tp& __x, const _Tp& __y) const ; }; template<typename _Tp> struct modulus : public binary_function<_Tp, _Tp, _Tp> { constexpr _Tp operator()(const _Tp& __x, const _Tp& __y) const ; }; template<typename _Tp> struct negate : public unary_function<_Tp, _Tp> { constexpr _Tp operator()(const _Tp& __x) const ; }; #pragma GCC diagnostic pop template<> struct plus<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)) ; typedef __is_transparent is_transparent; }; template<> struct minus<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)) ; typedef __is_transparent is_transparent; }; template<> struct multiplies<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)) ; typedef __is_transparent is_transparent; }; template<> struct divides<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)) ; typedef __is_transparent is_transparent; }; template<> struct modulus<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)) ; typedef __is_transparent is_transparent; }; template<> struct negate<void> { template <typename _Tp> constexpr auto operator()(_Tp&& __t) const noexcept(noexcept(-std::forward<_Tp>(__t))) -> decltype(-std::forward<_Tp>(__t)) ; typedef __is_transparent is_transparent; }; 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; #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" template<typename _Tp> struct equal_to : public binary_function<_Tp, _Tp, bool> { constexpr bool operator()(const _Tp& __x, const _Tp& __y) const ; }; template<typename _Tp> struct not_equal_to : public binary_function<_Tp, _Tp, bool> { constexpr bool operator()(const _Tp& __x, const _Tp& __y) const ; }; template<typename _Tp> struct greater : public binary_function<_Tp, _Tp, bool> { constexpr bool operator()(const _Tp& __x, const _Tp& __y) const ; }; template<typename _Tp> struct less : public binary_function<_Tp, _Tp, bool> { constexpr bool operator()(const _Tp& __x, const _Tp& __y) const ; }; template<typename _Tp> struct greater_equal : public binary_function<_Tp, _Tp, bool> { constexpr bool operator()(const _Tp& __x, const _Tp& __y) const ; }; template<typename _Tp> struct less_equal : public binary_function<_Tp, _Tp, bool> { constexpr bool operator()(const _Tp& __x, const _Tp& __y) const ; }; template<typename _Tp> struct greater<_Tp*> : public binary_function<_Tp*, _Tp*, bool> { constexpr bool operator()(_Tp* __x, _Tp* __y) const noexcept ; }; template<typename _Tp> struct less<_Tp*> : public binary_function<_Tp*, _Tp*, bool> { constexpr bool operator()(_Tp* __x, _Tp* __y) const noexcept ; }; template<typename _Tp> struct greater_equal<_Tp*> : public binary_function<_Tp*, _Tp*, bool> { constexpr bool operator()(_Tp* __x, _Tp* __y) const noexcept ; }; template<typename _Tp> struct less_equal<_Tp*> : public binary_function<_Tp*, _Tp*, bool> { constexpr bool operator()(_Tp* __x, _Tp* __y) const noexcept ; }; #pragma GCC diagnostic pop 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)) ; typedef __is_transparent is_transparent; }; 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)) ; typedef __is_transparent is_transparent; }; 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)) ; template<typename _Tp, typename _Up> constexpr bool operator()(_Tp* __t, _Up* __u) const noexcept ; typedef __is_transparent is_transparent; private: template <typename _Tp, typename _Up> static constexpr decltype(auto) _S_cmp(_Tp&& __t, _Up&& __u, false_type) ; template <typename _Tp, typename _Up> static constexpr bool _S_cmp(_Tp&& __t, _Up&& __u, true_type) noexcept ; template<typename _Tp, typename _Up, typename = void> struct __not_overloaded2 : true_type { }; template<typename _Tp, typename _Up> struct __not_overloaded2<_Tp, _Up, __void_t< decltype(std::declval<_Tp>().operator>(std::declval<_Up>()))>> : false_type { }; template<typename _Tp, typename _Up, typename = void> struct __not_overloaded : __not_overloaded2<_Tp, _Up> { }; 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*>>; }; 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)) ; template<typename _Tp, typename _Up> constexpr bool operator()(_Tp* __t, _Up* __u) const noexcept ; typedef __is_transparent is_transparent; private: template <typename _Tp, typename _Up> static constexpr decltype(auto) _S_cmp(_Tp&& __t, _Up&& __u, false_type) ; template <typename _Tp, typename _Up> static constexpr bool _S_cmp(_Tp&& __t, _Up&& __u, true_type) noexcept ; template<typename _Tp, typename _Up, typename = void> struct __not_overloaded2 : true_type { }; template<typename _Tp, typename _Up> struct __not_overloaded2<_Tp, _Up, __void_t< decltype(std::declval<_Tp>().operator<(std::declval<_Up>()))>> : false_type { }; template<typename _Tp, typename _Up, typename = void> struct __not_overloaded : __not_overloaded2<_Tp, _Up> { }; 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*>>; }; 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)) ; template<typename _Tp, typename _Up> constexpr bool operator()(_Tp* __t, _Up* __u) const noexcept ; typedef __is_transparent is_transparent; private: template <typename _Tp, typename _Up> static constexpr decltype(auto) _S_cmp(_Tp&& __t, _Up&& __u, false_type) ; template <typename _Tp, typename _Up> static constexpr bool _S_cmp(_Tp&& __t, _Up&& __u, true_type) noexcept ; template<typename _Tp, typename _Up, typename = void> struct __not_overloaded2 : true_type { }; template<typename _Tp, typename _Up> struct __not_overloaded2<_Tp, _Up, __void_t< decltype(std::declval<_Tp>().operator>=(std::declval<_Up>()))>> : false_type { }; template<typename _Tp, typename _Up, typename = void> struct __not_overloaded : __not_overloaded2<_Tp, _Up> { }; 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*>>; }; 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)) ; template<typename _Tp, typename _Up> constexpr bool operator()(_Tp* __t, _Up* __u) const noexcept ; typedef __is_transparent is_transparent; private: template <typename _Tp, typename _Up> static constexpr decltype(auto) _S_cmp(_Tp&& __t, _Up&& __u, false_type) ; template <typename _Tp, typename _Up> static constexpr bool _S_cmp(_Tp&& __t, _Up&& __u, true_type) noexcept ; template<typename _Tp, typename _Up, typename = void> struct __not_overloaded2 : true_type { }; template<typename _Tp, typename _Up> struct __not_overloaded2<_Tp, _Up, __void_t< decltype(std::declval<_Tp>().operator<=(std::declval<_Up>()))>> : false_type { }; template<typename _Tp, typename _Up, typename = void> struct __not_overloaded : __not_overloaded2<_Tp, _Up> { }; 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*>>; }; template<typename _Tp = void> struct logical_and; template<typename _Tp = void> struct logical_or; template<typename _Tp = void> struct logical_not; #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" template<typename _Tp> struct logical_and : public binary_function<_Tp, _Tp, bool> { constexpr bool operator()(const _Tp& __x, const _Tp& __y) const ; }; template<typename _Tp> struct logical_or : public binary_function<_Tp, _Tp, bool> { constexpr bool operator()(const _Tp& __x, const _Tp& __y) const ; }; template<typename _Tp> struct logical_not : public unary_function<_Tp, bool> { constexpr bool operator()(const _Tp& __x) const ; }; #pragma GCC diagnostic pop template<> struct logical_and<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)) ; typedef __is_transparent is_transparent; }; template<> struct logical_or<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)) ; typedef __is_transparent is_transparent; }; template<> struct logical_not<void> { template <typename _Tp> constexpr auto operator()(_Tp&& __t) const noexcept(noexcept(!std::forward<_Tp>(__t))) -> decltype(!std::forward<_Tp>(__t)) ; typedef __is_transparent is_transparent; }; 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; #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" template<typename _Tp> struct bit_and : public binary_function<_Tp, _Tp, _Tp> { constexpr _Tp operator()(const _Tp& __x, const _Tp& __y) const ; }; template<typename _Tp> struct bit_or : public binary_function<_Tp, _Tp, _Tp> { constexpr _Tp operator()(const _Tp& __x, const _Tp& __y) const ; }; template<typename _Tp> struct bit_xor : public binary_function<_Tp, _Tp, _Tp> { constexpr _Tp operator()(const _Tp& __x, const _Tp& __y) const ; }; template<typename _Tp> struct bit_not : public unary_function<_Tp, _Tp> { constexpr _Tp operator()(const _Tp& __x) const ; }; #pragma GCC diagnostic pop template <> struct bit_and<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)) ; typedef __is_transparent is_transparent; }; template <> struct bit_or<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)) ; typedef __is_transparent is_transparent; }; template <> struct bit_xor<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)) ; typedef __is_transparent is_transparent; }; template <> struct bit_not<void> { template <typename _Tp> constexpr auto operator()(_Tp&& __t) const noexcept(noexcept(~std::forward<_Tp>(__t))) -> decltype(~std::forward<_Tp>(__t)) ; typedef __is_transparent is_transparent; }; #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" template<typename _Predicate> class [[__deprecated__]] unary_negate : public unary_function<typename _Predicate::argument_type, bool> { protected: _Predicate _M_pred; public: constexpr explicit unary_negate(const _Predicate& __x) ; constexpr bool operator()(const typename _Predicate::argument_type& __x) const ; }; template<typename _Predicate> __attribute__ ((__deprecated__ ("use '" "std::not_fn" "' instead"))) constexpr unary_negate<_Predicate> not1(const _Predicate& __pred) ; template<typename _Predicate> class [[__deprecated__]] binary_negate : public binary_function<typename _Predicate::first_argument_type, typename _Predicate::second_argument_type, bool> { protected: _Predicate _M_pred; public: constexpr explicit binary_negate(const _Predicate& __x) ; constexpr bool operator()(const typename _Predicate::first_argument_type& __x, const typename _Predicate::second_argument_type& __y) const ; }; template<typename _Predicate> __attribute__ ((__deprecated__ ("use '" "std::not_fn" "' instead"))) constexpr binary_negate<_Predicate> not2(const _Predicate& __pred) ; 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)) ; _Result operator()(_Arg __x) const ; } __attribute__ ((__deprecated__)); template<typename _Arg, typename _Result> __attribute__ ((__deprecated__ ("use '" "std::function" "' instead"))) pointer_to_unary_function<_Arg, _Result> ptr_fun(_Result (*__x)(_Arg)) ; 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)) ; _Result operator()(_Arg1 __x, _Arg2 __y) const ; } __attribute__ ((__deprecated__)); template<typename _Arg1, typename _Arg2, typename _Result> __attribute__ ((__deprecated__ ("use '" "std::function" "' instead"))) pointer_to_binary_function<_Arg1, _Arg2, _Result> ptr_fun(_Result (*__x)(_Arg1, _Arg2)) ; template<typename _Tp> struct _Identity : public unary_function<_Tp, _Tp> { _Tp& operator()(_Tp& __x) const ; const _Tp& operator()(const _Tp& __x) const ; }; 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 ; const typename _Pair::first_type& operator()(const _Pair& __x) const ; template<typename _Pair2> typename _Pair2::first_type& operator()(_Pair2& __x) const ; template<typename _Pair2> const typename _Pair2::first_type& operator()(const _Pair2& __x) const ; }; template<typename _Pair> struct _Select2nd : public unary_function<_Pair, typename _Pair::second_type> { typename _Pair::second_type& operator()(_Pair& __x) const ; const typename _Pair::second_type& operator()(const _Pair& __x) const ; }; template<typename _Ret, typename _Tp> class mem_fun_t : public unary_function<_Tp*, _Ret> { public: explicit mem_fun_t(_Ret (_Tp::*__pf)()) ; _Ret operator()(_Tp* __p) const ; private: _Ret (_Tp::*_M_f)(); } __attribute__ ((__deprecated__)); 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) ; _Ret operator()(const _Tp* __p) const ; private: _Ret (_Tp::*_M_f)() const; } __attribute__ ((__deprecated__)); template<typename _Ret, typename _Tp> class mem_fun_ref_t : public unary_function<_Tp, _Ret> { public: explicit mem_fun_ref_t(_Ret (_Tp::*__pf)()) ; _Ret operator()(_Tp& __r) const ; private: _Ret (_Tp::*_M_f)(); } __attribute__ ((__deprecated__)); 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) ; _Ret operator()(const _Tp& __r) const ; private: _Ret (_Tp::*_M_f)() const; } __attribute__ ((__deprecated__)); 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)) ; _Ret operator()(_Tp* __p, _Arg __x) const ; private: _Ret (_Tp::*_M_f)(_Arg); } __attribute__ ((__deprecated__)); 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) ; _Ret operator()(const _Tp* __p, _Arg __x) const ; private: _Ret (_Tp::*_M_f)(_Arg) const; } __attribute__ ((__deprecated__)); 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)) ; _Ret operator()(_Tp& __r, _Arg __x) const ; private: _Ret (_Tp::*_M_f)(_Arg); } __attribute__ ((__deprecated__)); 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) ; _Ret operator()(const _Tp& __r, _Arg __x) const ; private: _Ret (_Tp::*_M_f)(_Arg) const; } __attribute__ ((__deprecated__)); template<typename _Ret, typename _Tp> __attribute__ ((__deprecated__ ("use '" "std::mem_fn" "' instead"))) mem_fun_t<_Ret, _Tp> mem_fun(_Ret (_Tp::*__f)()) ; template<typename _Ret, typename _Tp> __attribute__ ((__deprecated__ ("use '" "std::mem_fn" "' instead"))) const_mem_fun_t<_Ret, _Tp> mem_fun(_Ret (_Tp::*__f)() const) ; template<typename _Ret, typename _Tp> __attribute__ ((__deprecated__ ("use '" "std::mem_fn" "' instead"))) mem_fun_ref_t<_Ret, _Tp> mem_fun_ref(_Ret (_Tp::*__f)()) ; template<typename _Ret, typename _Tp> __attribute__ ((__deprecated__ ("use '" "std::mem_fn" "' instead"))) const_mem_fun_ref_t<_Ret, _Tp> mem_fun_ref(_Ret (_Tp::*__f)() const) ; template<typename _Ret, typename _Tp, typename _Arg> __attribute__ ((__deprecated__ ("use '" "std::mem_fn" "' instead"))) mem_fun1_t<_Ret, _Tp, _Arg> mem_fun(_Ret (_Tp::*__f)(_Arg)) ; template<typename _Ret, typename _Tp, typename _Arg> __attribute__ ((__deprecated__ ("use '" "std::mem_fn" "' instead"))) const_mem_fun1_t<_Ret, _Tp, _Arg> mem_fun(_Ret (_Tp::*__f)(_Arg) const) ; template<typename _Ret, typename _Tp, typename _Arg> __attribute__ ((__deprecated__ ("use '" "std::mem_fn" "' instead"))) mem_fun1_ref_t<_Ret, _Tp, _Arg> mem_fun_ref(_Ret (_Tp::*__f)(_Arg)) ; template<typename _Ret, typename _Tp, typename _Arg> __attribute__ ((__deprecated__ ("use '" "std::mem_fn" "' instead"))) const_mem_fun1_ref_t<_Ret, _Tp, _Arg> mem_fun_ref(_Ret (_Tp::*__f)(_Arg) const) ; #pragma GCC diagnostic pop template<typename _Func, typename _SfinaeType, typename = __void_t<>> struct __has_is_transparent { }; template<typename _Func, typename _SfinaeType> struct __has_is_transparent<_Func, _SfinaeType, __void_t<typename _Func::is_transparent>> { typedef void type; }; template<typename _Func, typename _SfinaeType> using __has_is_transparent_t = typename __has_is_transparent<_Func, _SfinaeType>::type; } #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" namespace std __attribute__ ((__visibility__ ("default"))) { 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) ; typename _Operation::result_type operator()(const typename _Operation::second_argument_type& __x) const ; typename _Operation::result_type operator()(typename _Operation::second_argument_type& __x) const ; } __attribute__ ((__deprecated__ ("use '" "std::bind" "' instead"))); template<typename _Operation, typename _Tp> __attribute__ ((__deprecated__ ("use '" "std::bind" "' instead"))) binder1st<_Operation> bind1st(const _Operation& __fn, const _Tp& __x) ; 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) ; typename _Operation::result_type operator()(const typename _Operation::first_argument_type& __x) const ; typename _Operation::result_type operator()(typename _Operation::first_argument_type& __x) const ; } __attribute__ ((__deprecated__ ("use '" "std::bind" "' instead"))); template<typename _Operation, typename _Tp> __attribute__ ((__deprecated__ ("use '" "std::bind" "' instead"))) binder2nd<_Operation> bind2nd(const _Operation& __fn, const _Tp& __x) ; } #pragma GCC diagnostic pop namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Res, typename... _ArgTypes> struct _Maybe_unary_or_binary_function { }; #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" template<typename _Res, typename _T1> struct _Maybe_unary_or_binary_function<_Res, _T1> : std::unary_function<_T1, _Res> { }; template<typename _Res, typename _T1, typename _T2> struct _Maybe_unary_or_binary_function<_Res, _T1, _T2> : std::binary_function<_T1, _T2, _Res> { }; #pragma GCC diagnostic pop template<typename _Signature> struct _Mem_fn_traits; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits_base { using __result_type = _Res; using __maybe_type = _Maybe_unary_or_binary_function<_Res, _Class*, _ArgTypes...>; using __arity = integral_constant<size_t, sizeof...(_ArgTypes)>; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) > : _Mem_fn_traits_base<_Res, _Class, _ArgTypes...> { using __vararg = false_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) > : _Mem_fn_traits_base<_Res, _Class, _ArgTypes...> { using __vararg = true_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) const > : _Mem_fn_traits_base<_Res, const _Class, _ArgTypes...> { using __vararg = false_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) const > : _Mem_fn_traits_base<_Res, const _Class, _ArgTypes...> { using __vararg = true_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) volatile > : _Mem_fn_traits_base<_Res, volatile _Class, _ArgTypes...> { using __vararg = false_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) volatile > : _Mem_fn_traits_base<_Res, volatile _Class, _ArgTypes...> { using __vararg = true_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) const volatile > : _Mem_fn_traits_base<_Res, const volatile _Class, _ArgTypes...> { using __vararg = false_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) const volatile > : _Mem_fn_traits_base<_Res, const volatile _Class, _ArgTypes...> { using __vararg = true_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) &> : _Mem_fn_traits_base<_Res, _Class, _ArgTypes...> { using __vararg = false_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) &> : _Mem_fn_traits_base<_Res, _Class, _ArgTypes...> { using __vararg = true_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) const &> : _Mem_fn_traits_base<_Res, const _Class, _ArgTypes...> { using __vararg = false_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) const &> : _Mem_fn_traits_base<_Res, const _Class, _ArgTypes...> { using __vararg = true_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) volatile &> : _Mem_fn_traits_base<_Res, volatile _Class, _ArgTypes...> { using __vararg = false_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) volatile &> : _Mem_fn_traits_base<_Res, volatile _Class, _ArgTypes...> { using __vararg = true_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) const volatile &> : _Mem_fn_traits_base<_Res, const volatile _Class, _ArgTypes...> { using __vararg = false_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) const volatile &> : _Mem_fn_traits_base<_Res, const volatile _Class, _ArgTypes...> { using __vararg = true_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) &&> : _Mem_fn_traits_base<_Res, _Class, _ArgTypes...> { using __vararg = false_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) &&> : _Mem_fn_traits_base<_Res, _Class, _ArgTypes...> { using __vararg = true_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) const &&> : _Mem_fn_traits_base<_Res, const _Class, _ArgTypes...> { using __vararg = false_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) const &&> : _Mem_fn_traits_base<_Res, const _Class, _ArgTypes...> { using __vararg = true_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) volatile &&> : _Mem_fn_traits_base<_Res, volatile _Class, _ArgTypes...> { using __vararg = false_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) volatile &&> : _Mem_fn_traits_base<_Res, volatile _Class, _ArgTypes...> { using __vararg = true_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) const volatile &&> : _Mem_fn_traits_base<_Res, const volatile _Class, _ArgTypes...> { using __vararg = false_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) const volatile &&> : _Mem_fn_traits_base<_Res, const volatile _Class, _ArgTypes...> { using __vararg = true_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) noexcept> : _Mem_fn_traits_base<_Res, _Class, _ArgTypes...> { using __vararg = false_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) noexcept> : _Mem_fn_traits_base<_Res, _Class, _ArgTypes...> { using __vararg = true_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) const noexcept> : _Mem_fn_traits_base<_Res, const _Class, _ArgTypes...> { using __vararg = false_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) const noexcept> : _Mem_fn_traits_base<_Res, const _Class, _ArgTypes...> { using __vararg = true_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) volatile noexcept> : _Mem_fn_traits_base<_Res, volatile _Class, _ArgTypes...> { using __vararg = false_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) volatile noexcept> : _Mem_fn_traits_base<_Res, volatile _Class, _ArgTypes...> { using __vararg = true_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) const volatile noexcept> : _Mem_fn_traits_base<_Res, const volatile _Class, _ArgTypes...> { using __vararg = false_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) const volatile noexcept> : _Mem_fn_traits_base<_Res, const volatile _Class, _ArgTypes...> { using __vararg = true_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) & noexcept> : _Mem_fn_traits_base<_Res, _Class, _ArgTypes...> { using __vararg = false_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) & noexcept> : _Mem_fn_traits_base<_Res, _Class, _ArgTypes...> { using __vararg = true_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) const & noexcept> : _Mem_fn_traits_base<_Res, const _Class, _ArgTypes...> { using __vararg = false_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) const & noexcept> : _Mem_fn_traits_base<_Res, const _Class, _ArgTypes...> { using __vararg = true_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) volatile & noexcept> : _Mem_fn_traits_base<_Res, volatile _Class, _ArgTypes...> { using __vararg = false_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) volatile & noexcept> : _Mem_fn_traits_base<_Res, volatile _Class, _ArgTypes...> { using __vararg = true_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) const volatile & noexcept> : _Mem_fn_traits_base<_Res, const volatile _Class, _ArgTypes...> { using __vararg = false_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) const volatile & noexcept> : _Mem_fn_traits_base<_Res, const volatile _Class, _ArgTypes...> { using __vararg = true_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) && noexcept> : _Mem_fn_traits_base<_Res, _Class, _ArgTypes...> { using __vararg = false_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) && noexcept> : _Mem_fn_traits_base<_Res, _Class, _ArgTypes...> { using __vararg = true_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) const && noexcept> : _Mem_fn_traits_base<_Res, const _Class, _ArgTypes...> { using __vararg = false_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) const && noexcept> : _Mem_fn_traits_base<_Res, const _Class, _ArgTypes...> { using __vararg = true_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) volatile && noexcept> : _Mem_fn_traits_base<_Res, volatile _Class, _ArgTypes...> { using __vararg = false_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) volatile && noexcept> : _Mem_fn_traits_base<_Res, volatile _Class, _ArgTypes...> { using __vararg = true_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) const volatile && noexcept> : _Mem_fn_traits_base<_Res, const volatile _Class, _ArgTypes...> { using __vararg = false_type; }; template<typename _Res, typename _Class, typename... _ArgTypes> struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) const volatile && noexcept> : _Mem_fn_traits_base<_Res, const volatile _Class, _ArgTypes...> { using __vararg = true_type; }; template<typename _Functor, typename = __void_t<>> struct _Maybe_get_result_type { }; template<typename _Functor> struct _Maybe_get_result_type<_Functor, __void_t<typename _Functor::result_type>> { typedef typename _Functor::result_type result_type; }; template<typename _Functor> struct _Weak_result_type_impl : _Maybe_get_result_type<_Functor> { }; template<typename _Res, typename... _ArgTypes , bool _NE> struct _Weak_result_type_impl<_Res(_ArgTypes...) noexcept (_NE)> { typedef _Res result_type; }; template<typename _Res, typename... _ArgTypes , bool _NE> struct _Weak_result_type_impl<_Res(_ArgTypes......) noexcept (_NE)> { typedef _Res result_type; }; template<typename _Res, typename... _ArgTypes , bool _NE> struct _Weak_result_type_impl<_Res(*)(_ArgTypes...) noexcept (_NE)> { typedef _Res result_type; }; template<typename _Res, typename... _ArgTypes , bool _NE> struct _Weak_result_type_impl<_Res(*)(_ArgTypes......) noexcept (_NE)> { typedef _Res result_type; }; template<typename _Functor, bool = is_member_function_pointer<_Functor>::value> struct _Weak_result_type_memfun : _Weak_result_type_impl<_Functor> { }; template<typename _MemFunPtr> struct _Weak_result_type_memfun<_MemFunPtr, true> { using result_type = typename _Mem_fn_traits<_MemFunPtr>::__result_type; }; template<typename _Func, typename _Class> struct _Weak_result_type_memfun<_Func _Class::*, false> { }; template<typename _Functor> struct _Weak_result_type : _Weak_result_type_memfun<typename remove_cv<_Functor>::type> { }; template<typename _Tp> class reference_wrapper { _Tp* _M_data; constexpr static _Tp* _S_fun(_Tp& __r) noexcept ; static void _S_fun(_Tp&&) = delete; template<typename _Up, typename _Up2 = __remove_cvref_t<_Up>> using __not_same = typename enable_if<!is_same<reference_wrapper, _Up2>::value>::type; public: typedef _Tp type; template<typename _Up, typename = __not_same<_Up>, typename = decltype(reference_wrapper::_S_fun(std::declval<_Up>()))> constexpr reference_wrapper(_Up&& __uref) noexcept(noexcept(reference_wrapper::_S_fun(std::declval<_Up>()))) ; reference_wrapper(const reference_wrapper&) = default; reference_wrapper& operator=(const reference_wrapper&) = default; constexpr operator _Tp&() const noexcept ; constexpr _Tp& get() const noexcept ; template<typename... _Args> constexpr typename __invoke_result<_Tp&, _Args...>::type operator()(_Args&&... __args) const noexcept(__is_nothrow_invocable<_Tp&, _Args...>::value) ; }; template<typename _Tp> reference_wrapper(_Tp&) -> reference_wrapper<_Tp>; template<typename _Tp> constexpr reference_wrapper<_Tp> ref(_Tp& __t) noexcept ; template<typename _Tp> constexpr reference_wrapper<const _Tp> cref(const _Tp& __t) noexcept ; template<typename _Tp> void ref(const _Tp&&) = delete; template<typename _Tp> void cref(const _Tp&&) = delete; template<typename _Tp> constexpr reference_wrapper<_Tp> ref(reference_wrapper<_Tp> __t) noexcept ; template<typename _Tp> constexpr reference_wrapper<const _Tp> cref(reference_wrapper<_Tp> __t) noexcept ; } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Container> [[__nodiscard__, __gnu__::__always_inline__]] constexpr auto begin(_Container& __cont) -> decltype(__cont.begin()) ; template<typename _Container> [[__nodiscard__, __gnu__::__always_inline__]] constexpr auto begin(const _Container& __cont) -> decltype(__cont.begin()) ; template<typename _Container> [[__nodiscard__, __gnu__::__always_inline__]] constexpr auto end(_Container& __cont) -> decltype(__cont.end()) ; template<typename _Container> [[__nodiscard__, __gnu__::__always_inline__]] constexpr auto end(const _Container& __cont) -> decltype(__cont.end()) ; template<typename _Tp, size_t _Nm> [[__nodiscard__, __gnu__::__always_inline__]] constexpr _Tp* begin(_Tp (&__arr)[_Nm]) noexcept ; template<typename _Tp, size_t _Nm> [[__nodiscard__, __gnu__::__always_inline__]] constexpr _Tp* end(_Tp (&__arr)[_Nm]) noexcept ; template<typename _Tp> class valarray; template<typename _Tp> _Tp* begin(valarray<_Tp>&) noexcept; template<typename _Tp> const _Tp* begin(const valarray<_Tp>&) noexcept; template<typename _Tp> _Tp* end(valarray<_Tp>&) noexcept; template<typename _Tp> const _Tp* end(const valarray<_Tp>&) noexcept; template<typename _Container> [[__nodiscard__, __gnu__::__always_inline__]] constexpr auto cbegin(const _Container& __cont) noexcept(noexcept(std::begin(__cont))) -> decltype(std::begin(__cont)) ; template<typename _Container> [[__nodiscard__, __gnu__::__always_inline__]] constexpr auto cend(const _Container& __cont) noexcept(noexcept(std::end(__cont))) -> decltype(std::end(__cont)) ; template<typename _Container> [[__nodiscard__, __gnu__::__always_inline__]] constexpr auto rbegin(_Container& __cont) -> decltype(__cont.rbegin()) ; template<typename _Container> [[__nodiscard__, __gnu__::__always_inline__]] constexpr auto rbegin(const _Container& __cont) -> decltype(__cont.rbegin()) ; template<typename _Container> [[__nodiscard__, __gnu__::__always_inline__]] constexpr auto rend(_Container& __cont) -> decltype(__cont.rend()) ; template<typename _Container> [[__nodiscard__, __gnu__::__always_inline__]] constexpr auto rend(const _Container& __cont) -> decltype(__cont.rend()) ; template<typename _Tp, size_t _Nm> [[__nodiscard__]] constexpr reverse_iterator<_Tp*> rbegin(_Tp (&__arr)[_Nm]) noexcept ; template<typename _Tp, size_t _Nm> [[__nodiscard__]] constexpr reverse_iterator<_Tp*> rend(_Tp (&__arr)[_Nm]) noexcept ; template<typename _Tp> [[__nodiscard__]] constexpr reverse_iterator<const _Tp*> rbegin(initializer_list<_Tp> __il) noexcept ; template<typename _Tp> [[__nodiscard__]] constexpr reverse_iterator<const _Tp*> rend(initializer_list<_Tp> __il) noexcept ; template<typename _Container> [[__nodiscard__, __gnu__::__always_inline__]] constexpr auto crbegin(const _Container& __cont) -> decltype(std::rbegin(__cont)) ; template<typename _Container> [[__nodiscard__, __gnu__::__always_inline__]] constexpr auto crend(const _Container& __cont) -> decltype(std::rend(__cont)) ; template <typename _Container> [[nodiscard, __gnu__::__always_inline__]] constexpr auto size(const _Container& __cont) noexcept(noexcept(__cont.size())) -> decltype(__cont.size()) ; template <typename _Tp, size_t _Nm> [[nodiscard, __gnu__::__always_inline__]] constexpr size_t size(const _Tp (&)[_Nm]) noexcept ; template <typename _Container> [[nodiscard, __gnu__::__always_inline__]] constexpr auto empty(const _Container& __cont) noexcept(noexcept(__cont.empty())) -> decltype(__cont.empty()) ; template <typename _Tp, size_t _Nm> [[nodiscard, __gnu__::__always_inline__]] constexpr bool empty(const _Tp (&)[_Nm]) noexcept ; template <typename _Tp> [[nodiscard, __gnu__::__always_inline__]] constexpr bool empty(initializer_list<_Tp> __il) noexcept ; template <typename _Container> [[nodiscard, __gnu__::__always_inline__]] constexpr auto data(_Container& __cont) noexcept(noexcept(__cont.data())) -> decltype(__cont.data()) ; template <typename _Container> [[nodiscard, __gnu__::__always_inline__]] constexpr auto data(const _Container& __cont) noexcept(noexcept(__cont.data())) -> decltype(__cont.data()) ; template <typename _Tp, size_t _Nm> [[nodiscard, __gnu__::__always_inline__]] constexpr _Tp* data(_Tp (&__array)[_Nm]) noexcept ; template <typename _Tp> [[nodiscard, __gnu__::__always_inline__]] constexpr const _Tp* data(initializer_list<_Tp> __il) noexcept ; template<typename _Container> [[nodiscard, __gnu__::__always_inline__]] constexpr auto ssize(const _Container& __cont) noexcept(noexcept(__cont.size())) -> common_type_t<ptrdiff_t, make_signed_t<decltype(__cont.size())>> ; template<typename _Tp, ptrdiff_t _Num> [[nodiscard, __gnu__::__always_inline__]] constexpr ptrdiff_t ssize(const _Tp (&)[_Num]) noexcept ; } namespace std __attribute__ ((__visibility__ ("default"))) { struct __allocator_traits_base { template<typename _Tp, typename _Up, typename = void> struct __rebind : __replace_first_arg<_Tp, _Up> { static_assert(is_same< typename __replace_first_arg<_Tp, typename _Tp::value_type>::type, _Tp>::value, "allocator_traits<A>::rebind_alloc<A::value_type> must be A"); }; 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; static_assert(is_same< typename _Tp::template rebind<typename _Tp::value_type>::other, _Tp>::value, "allocator_traits<A>::rebind_alloc<A::value_type> must be A"); }; 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 = __type_identity<typename _Tp::is_always_equal>; }; template<typename _Alloc, typename _Up> using __alloc_rebind = typename __allocator_traits_base::template __rebind<_Alloc, _Up>::type; template<typename _Alloc> struct allocator_traits : __allocator_traits_base { typedef _Alloc allocator_type; typedef typename _Alloc::value_type value_type; using pointer = __detected_or_t<value_type*, __pointer, _Alloc>; private: 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>; }; 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; }; 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: using const_pointer = typename _Ptr<__c_pointer, const value_type>::type; using void_pointer = typename _Ptr<__v_pointer, void>::type; using const_void_pointer = typename _Ptr<__cv_pointer, const void>::type; using difference_type = typename _Diff<_Alloc, pointer>::type; using size_type = typename _Size<_Alloc, difference_type>::type; using propagate_on_container_copy_assignment = __detected_or_t<false_type, __pocca, _Alloc>; using propagate_on_container_move_assignment = __detected_or_t<false_type, __pocma, _Alloc>; using propagate_on_container_swap = __detected_or_t<false_type, __pocs, _Alloc>; using is_always_equal = typename __detected_or_t<is_empty<_Alloc>, __equal, _Alloc>::type; 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 constexpr auto _S_allocate(_Alloc2& __a, size_type __n, const_void_pointer __hint, int) -> decltype(__a.allocate(__n, __hint)) ; template<typename _Alloc2> static constexpr pointer _S_allocate(_Alloc2& __a, size_type __n, const_void_pointer, ...) ; 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 constexpr _Require<__has_construct<_Tp, _Args...>> _S_construct(_Alloc& __a, _Tp* __p, _Args&&... __args) noexcept(noexcept(__a.construct(__p, std::forward<_Args>(__args)...))) ; template<typename _Tp, typename... _Args> static constexpr _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) ; template<typename _Alloc2, typename _Tp> static constexpr auto _S_destroy(_Alloc2& __a, _Tp* __p, int) noexcept(noexcept(__a.destroy(__p))) -> decltype(__a.destroy(__p)) ; template<typename _Alloc2, typename _Tp> static constexpr void _S_destroy(_Alloc2&, _Tp* __p, ...) noexcept(std::is_nothrow_destructible<_Tp>::value) ; template<typename _Alloc2> static constexpr auto _S_max_size(_Alloc2& __a, int) -> decltype(__a.max_size()) ; template<typename _Alloc2> static constexpr size_type _S_max_size(_Alloc2&, ...) ; template<typename _Alloc2> static constexpr auto _S_select(_Alloc2& __a, int) -> decltype(__a.select_on_container_copy_construction()) ; template<typename _Alloc2> static constexpr _Alloc2 _S_select(_Alloc2& __a, ...) ; public: [[__nodiscard__]] static constexpr pointer allocate(_Alloc& __a, size_type __n) ; [[__nodiscard__]] static constexpr pointer allocate(_Alloc& __a, size_type __n, const_void_pointer __hint) ; static constexpr void deallocate(_Alloc& __a, pointer __p, size_type __n) ; template<typename _Tp, typename... _Args> static constexpr 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)...)) ; template<typename _Tp> static constexpr void destroy(_Alloc& __a, _Tp* __p) noexcept(noexcept(_S_destroy(__a, __p, 0))) ; static constexpr size_type max_size(const _Alloc& __a) noexcept ; static constexpr _Alloc select_on_container_copy_construction(const _Alloc& __rhs) ; }; template<typename _Tp> struct allocator_traits<allocator<_Tp>> { using allocator_type = allocator<_Tp>; using value_type = _Tp; using pointer = _Tp*; using const_pointer = const _Tp*; using void_pointer = void*; using const_void_pointer = const void*; using difference_type = std::ptrdiff_t; using size_type = std::size_t; using propagate_on_container_copy_assignment = false_type; using propagate_on_container_move_assignment = true_type; using propagate_on_container_swap = false_type; using is_always_equal = true_type; template<typename _Up> using rebind_alloc = allocator<_Up>; template<typename _Up> using rebind_traits = allocator_traits<allocator<_Up>>; [[__nodiscard__,__gnu__::__always_inline__]] static constexpr pointer allocate(allocator_type& __a, size_type __n) ; [[__nodiscard__,__gnu__::__always_inline__]] static constexpr pointer allocate(allocator_type& __a, size_type __n, [[maybe_unused]] const_void_pointer __hint) ; [[__gnu__::__always_inline__]] static constexpr void deallocate(allocator_type& __a, pointer __p, size_type __n) ; template<typename _Up, typename... _Args> [[__gnu__::__always_inline__]] static constexpr void construct(allocator_type& __a __attribute__((__unused__)), _Up* __p, _Args&&... __args) noexcept(std::is_nothrow_constructible<_Up, _Args...>::value) ; template<typename _Up> [[__gnu__::__always_inline__]] static constexpr void destroy(allocator_type& __a __attribute__((__unused__)), _Up* __p) noexcept(is_nothrow_destructible<_Up>::value) ; [[__gnu__::__always_inline__]] static constexpr size_type max_size(const allocator_type& __a __attribute__((__unused__))) noexcept ; [[__gnu__::__always_inline__]] static constexpr allocator_type select_on_container_copy_construction(const allocator_type& __rhs) ; }; template<> struct allocator_traits<allocator<void>> { using allocator_type = allocator<void>; using value_type = void; using pointer = void*; using const_pointer = const void*; using void_pointer = void*; using const_void_pointer = const void*; using difference_type = std::ptrdiff_t; using size_type = std::size_t; using propagate_on_container_copy_assignment = false_type; using propagate_on_container_move_assignment = true_type; using propagate_on_container_swap = false_type; using is_always_equal = true_type; template<typename _Up> using rebind_alloc = allocator<_Up>; template<typename _Up> using rebind_traits = allocator_traits<allocator<_Up>>; static void* allocate(allocator_type&, size_type, const void* = nullptr) = delete; static void deallocate(allocator_type&, void*, size_type) = delete; template<typename _Up, typename... _Args> [[__gnu__::__always_inline__]] static constexpr void construct(allocator_type&, _Up* __p, _Args&&... __args) noexcept(std::is_nothrow_constructible<_Up, _Args...>::value) ; template<typename _Up> [[__gnu__::__always_inline__]] static constexpr void destroy(allocator_type&, _Up* __p) noexcept(is_nothrow_destructible<_Up>::value) ; static size_type max_size(const allocator_type&) = delete; [[__gnu__::__always_inline__]] static constexpr allocator_type select_on_container_copy_construction(const allocator_type& __rhs) ; }; template<typename _Alloc> [[__gnu__::__always_inline__]] constexpr void __alloc_on_copy(_Alloc& __one, const _Alloc& __two) ; template<typename _Alloc> [[__gnu__::__always_inline__]] constexpr _Alloc __alloc_on_copy(const _Alloc& __a) ; template<typename _Alloc> [[__gnu__::__always_inline__]] constexpr void __alloc_on_move(_Alloc& __one, _Alloc& __two) ; template<typename _Alloc> [[__gnu__::__always_inline__]] constexpr void __alloc_on_swap(_Alloc& __one, _Alloc& __two) ; 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 { }; template<typename _Alloc> struct __is_copy_insertable : __is_alloc_insertable_impl<_Alloc, typename _Alloc::value_type const&>::type { }; template<typename _Tp> struct __is_copy_insertable<allocator<_Tp>> : is_copy_constructible<_Tp> { }; template<typename _Alloc> struct __is_move_insertable : __is_alloc_insertable_impl<_Alloc, typename _Alloc::value_type>::type { }; template<typename _Tp> struct __is_move_insertable<allocator<_Tp>> : is_move_constructible<_Tp> { }; 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; template<typename _Alloc> concept __allocator_like = requires (_Alloc& __a) { typename _Alloc::value_type; __a.deallocate(__a.allocate(1u), 1u); }; template<typename _Alloc, bool = __is_empty(_Alloc)> struct __alloc_swap { static void _S_do_it(_Alloc&, _Alloc&) noexcept ; }; template<typename _Alloc> struct __alloc_swap<_Alloc, false> { static void _S_do_it(_Alloc& __one, _Alloc& __two) noexcept ; }; 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 ; }; template<typename _Tp> struct __shrink_to_fit_aux<_Tp, true> { constexpr static bool _S_do_it(_Tp& __c) noexcept ; }; template<typename _ForwardIterator, typename _Allocator> constexpr void _Destroy(_ForwardIterator __first, _ForwardIterator __last, _Allocator& __alloc) ; template<typename _ForwardIterator, typename _Tp> __attribute__((__always_inline__)) constexpr void _Destroy(_ForwardIterator __first, _ForwardIterator __last, allocator<_Tp>&) ; } namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { template<typename _Alloc, typename = typename _Alloc::value_type> struct __alloc_traits : std::allocator_traits<_Alloc> { typedef _Alloc allocator_type; 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; 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: template<typename _Ptr, typename... _Args> [[__gnu__::__always_inline__]] static constexpr std::__enable_if_t<__is_custom_pointer<_Ptr>::value> construct(_Alloc& __a, _Ptr __p, _Args&&... __args) noexcept(noexcept(_Base_type::construct(__a, std::__to_address(__p), std::forward<_Args>(__args)...))) ; template<typename _Ptr> [[__gnu__::__always_inline__]] static constexpr std::__enable_if_t<__is_custom_pointer<_Ptr>::value> destroy(_Alloc& __a, _Ptr __p) noexcept(noexcept(_Base_type::destroy(__a, std::__to_address(__p)))) ; [[__gnu__::__always_inline__]] static constexpr _Alloc _S_select_on_copy(const _Alloc& __a) ; [[__gnu__::__always_inline__]] static constexpr void _S_on_swap(_Alloc& __a, _Alloc& __b) ; [[__gnu__::__always_inline__]] static constexpr bool _S_propagate_on_copy_assign() ; [[__gnu__::__always_inline__]] static constexpr bool _S_propagate_on_move_assign() { return _Base_type::propagate_on_container_move_assignment::value; } [[__gnu__::__always_inline__]] static constexpr bool _S_propagate_on_swap() { return _Base_type::propagate_on_container_swap::value; } [[__gnu__::__always_inline__]] static constexpr bool _S_always_equal() { return _Base_type::is_always_equal::value; } __attribute__((__always_inline__)) 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; }; }; } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Result, typename _Arg> struct __hash_base { typedef _Result result_type [[__deprecated__]]; typedef _Arg argument_type [[__deprecated__]]; }; template<typename _Tp> struct hash; template<typename _Tp, typename = void> struct __poison_hash { static constexpr bool __enable_hash_call = false; private: __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; }; template<typename _Tp, bool = is_enum<_Tp>::value> struct __hash_enum { private: __hash_enum(__hash_enum&&); ~__hash_enum(); }; 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)); } }; template<typename _Tp> struct hash : __hash_enum<_Tp> { }; 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); } }; template<> struct hash<bool> : public __hash_base<size_t, bool> { size_t operator()(bool __val) const noexcept { return static_cast<size_t>(__val); } }; template<> struct hash<char> : public __hash_base<size_t, char> { size_t operator()(char __val) const noexcept ; }; template<> struct hash<signed char> : public __hash_base<size_t, signed char> { size_t operator()(signed char __val) const noexcept ; }; template<> struct hash<unsigned char> : public __hash_base<size_t, unsigned char> { size_t operator()(unsigned char __val) const noexcept ; }; template<> struct hash<wchar_t> : public __hash_base<size_t, wchar_t> { size_t operator()(wchar_t __val) const noexcept ; }; template<> struct hash<char8_t> : public __hash_base<size_t, char8_t> { size_t operator()(char8_t __val) const noexcept { return static_cast<size_t>(__val); } }; template<> struct hash<char16_t> : public __hash_base<size_t, char16_t> { size_t operator()(char16_t __val) const noexcept ; }; template<> struct hash<char32_t> : public __hash_base<size_t, char32_t> { size_t operator()(char32_t __val) const noexcept ; }; template<> struct hash<short> : public __hash_base<size_t, short> { size_t operator()(short __val) const noexcept ; }; template<> struct hash<int> : public __hash_base<size_t, int> { size_t operator()(int __val) const noexcept ; }; template<> struct hash<long> : public __hash_base<size_t, long> { size_t operator()(long __val) const noexcept ; }; template<> struct hash<long long> : public __hash_base<size_t, long long> { size_t operator()(long long __val) const noexcept ; }; template<> struct hash<unsigned short> : public __hash_base<size_t, unsigned short> { size_t operator()(unsigned short __val) const noexcept ; }; template<> struct hash<unsigned int> : public __hash_base<size_t, unsigned int> { size_t operator()(unsigned int __val) const noexcept ; }; template<> struct hash<unsigned long> : public __hash_base<size_t, unsigned long> { size_t operator()(unsigned long __val) const noexcept ; }; template<> struct hash<unsigned long long> : public __hash_base<size_t, unsigned long long> { size_t operator()(unsigned long long __val) const noexcept ; }; struct _Hash_impl { static size_t hash(const void* __ptr, size_t __clength, size_t __seed = static_cast<size_t>(0xc70f6907UL)) ; template<typename _Tp> static size_t hash(const _Tp& __val) ; template<typename _Tp> static size_t __hash_combine(const _Tp& __val, size_t __hash) ; }; struct _Fnv_hash_impl { static size_t hash(const void* __ptr, size_t __clength, size_t __seed = static_cast<size_t>(2166136261UL)) ; template<typename _Tp> static size_t hash(const _Tp& __val) ; template<typename _Tp> static size_t __hash_combine(const _Tp& __val, size_t __hash) ; }; template<> struct hash<float> : public __hash_base<size_t, float> { size_t operator()(float __val) const noexcept ; }; template<> struct hash<double> : public __hash_base<size_t, double> { size_t operator()(double __val) const noexcept ; }; template<> struct hash<long double> : public __hash_base<size_t, long double> { __attribute__ ((__pure__)) size_t operator()(long double __val) const noexcept; }; template<> struct hash<nullptr_t> : public __hash_base<size_t, nullptr_t> { size_t operator()(nullptr_t) const noexcept ; }; template<typename _Hash> struct __is_fast_hash : public std::true_type { }; template<> struct __is_fast_hash<hash<long double>> : public std::false_type { }; } namespace std __attribute__ ((__visibility__ ("default"))) { constexpr size_t __sv_check(size_t __size, size_t __pos, const char* __s) ; constexpr size_t __sv_limit(size_t __size, size_t __pos, size_t __off) noexcept ; template<typename _CharT, typename _Traits = std::char_traits<_CharT>> class basic_string_view { static_assert(!is_array_v<_CharT>); static_assert(is_trivial_v<_CharT> && is_standard_layout_v<_CharT>); static_assert(is_same_v<_CharT, typename _Traits::char_type>); public: using traits_type = _Traits; using value_type = _CharT; using pointer = value_type*; using const_pointer = const value_type*; using reference = value_type&; using const_reference = const value_type&; using const_iterator = const value_type*; using iterator = const_iterator; using const_reverse_iterator = std::reverse_iterator<const_iterator>; using reverse_iterator = const_reverse_iterator; using size_type = size_t; using difference_type = ptrdiff_t; static constexpr size_type npos = size_type(-1); constexpr basic_string_view() ; constexpr basic_string_view(const basic_string_view&) noexcept = default; [[__gnu__::__nonnull__]] constexpr basic_string_view(const _CharT* __str) noexcept : _M_len{traits_type::length(__str)}, _M_str{__str} { } constexpr basic_string_view(const _CharT* __str, size_type __len) noexcept : _M_len{__len}, _M_str{__str} { } template<contiguous_iterator _It, sized_sentinel_for<_It> _End> requires same_as<iter_value_t<_It>, _CharT> && (!convertible_to<_End, size_type>) constexpr basic_string_view(_It __first, _End __last) noexcept(noexcept(__last - __first)) : _M_len(__last - __first), _M_str(std::to_address(__first)) { } constexpr basic_string_view& operator=(const basic_string_view&) noexcept = default; [[nodiscard]] constexpr const_iterator begin() const noexcept { return this->_M_str; } [[nodiscard]] constexpr const_iterator end() const noexcept ; [[nodiscard]] constexpr const_iterator cbegin() const noexcept ; [[nodiscard]] constexpr const_iterator cend() const noexcept ; [[nodiscard]] constexpr const_reverse_iterator rbegin() const noexcept ; [[nodiscard]] constexpr const_reverse_iterator rend() const noexcept ; [[nodiscard]] constexpr const_reverse_iterator crbegin() const noexcept ; [[nodiscard]] constexpr const_reverse_iterator crend() const noexcept ; [[nodiscard]] constexpr size_type size() const noexcept ; [[nodiscard]] constexpr size_type length() const noexcept ; [[nodiscard]] constexpr size_type max_size() const noexcept ; [[nodiscard]] constexpr bool empty() const noexcept ; [[nodiscard]] constexpr const_reference operator[](size_type __pos) const noexcept ; [[nodiscard]] constexpr const_reference at(size_type __pos) const ; [[nodiscard]] constexpr const_reference front() const noexcept ; [[nodiscard]] constexpr const_reference back() const noexcept ; [[nodiscard]] constexpr const_pointer data() const noexcept ; constexpr void remove_prefix(size_type __n) noexcept ; constexpr void remove_suffix(size_type __n) noexcept ; constexpr void swap(basic_string_view& __sv) noexcept ; constexpr size_type copy(_CharT* __str, size_type __n, size_type __pos = 0) const ; [[nodiscard]] constexpr basic_string_view substr(size_type __pos = 0, size_type __n = npos) const noexcept(false) ; [[nodiscard]] constexpr int compare(basic_string_view __str) const noexcept ; [[nodiscard]] constexpr int compare(size_type __pos1, size_type __n1, basic_string_view __str) const ; [[nodiscard]] constexpr int compare(size_type __pos1, size_type __n1, basic_string_view __str, size_type __pos2, size_type __n2) const ; [[nodiscard, __gnu__::__nonnull__]] constexpr int compare(const _CharT* __str) const noexcept ; [[nodiscard, __gnu__::__nonnull__]] constexpr int compare(size_type __pos1, size_type __n1, const _CharT* __str) const ; [[nodiscard]] constexpr int compare(size_type __pos1, size_type __n1, const _CharT* __str, size_type __n2) const noexcept(false) ; [[nodiscard]] constexpr bool starts_with(basic_string_view __x) const noexcept ; [[nodiscard]] constexpr bool starts_with(_CharT __x) const noexcept ; [[nodiscard, __gnu__::__nonnull__]] constexpr bool starts_with(const _CharT* __x) const noexcept ; [[nodiscard]] constexpr bool ends_with(basic_string_view __x) const noexcept ; [[nodiscard]] constexpr bool ends_with(_CharT __x) const noexcept ; [[nodiscard, __gnu__::__nonnull__]] constexpr bool ends_with(const _CharT* __x) const noexcept ; [[nodiscard]] constexpr size_type find(basic_string_view __str, size_type __pos = 0) const noexcept ; [[nodiscard]] constexpr size_type find(_CharT __c, size_type __pos = 0) const noexcept; [[nodiscard]] constexpr size_type find(const _CharT* __str, size_type __pos, size_type __n) const noexcept; [[nodiscard, __gnu__::__nonnull__]] constexpr size_type find(const _CharT* __str, size_type __pos = 0) const noexcept ; [[nodiscard]] constexpr size_type rfind(basic_string_view __str, size_type __pos = npos) const noexcept ; [[nodiscard]] constexpr size_type rfind(_CharT __c, size_type __pos = npos) const noexcept; [[nodiscard]] constexpr size_type rfind(const _CharT* __str, size_type __pos, size_type __n) const noexcept; [[nodiscard, __gnu__::__nonnull__]] constexpr size_type rfind(const _CharT* __str, size_type __pos = npos) const noexcept ; [[nodiscard]] constexpr size_type find_first_of(basic_string_view __str, size_type __pos = 0) const noexcept ; [[nodiscard]] constexpr size_type find_first_of(_CharT __c, size_type __pos = 0) const noexcept ; [[nodiscard]] constexpr size_type find_first_of(const _CharT* __str, size_type __pos, size_type __n) const noexcept; [[nodiscard, __gnu__::__nonnull__]] constexpr size_type find_first_of(const _CharT* __str, size_type __pos = 0) const noexcept ; [[nodiscard]] constexpr size_type find_last_of(basic_string_view __str, size_type __pos = npos) const noexcept ; [[nodiscard]] constexpr size_type find_last_of(_CharT __c, size_type __pos=npos) const noexcept ; [[nodiscard]] constexpr size_type find_last_of(const _CharT* __str, size_type __pos, size_type __n) const noexcept; [[nodiscard, __gnu__::__nonnull__]] constexpr size_type find_last_of(const _CharT* __str, size_type __pos = npos) const noexcept ; [[nodiscard]] constexpr size_type find_first_not_of(basic_string_view __str, size_type __pos = 0) const noexcept ; [[nodiscard]] constexpr size_type find_first_not_of(_CharT __c, size_type __pos = 0) const noexcept; [[nodiscard]] constexpr size_type find_first_not_of(const _CharT* __str, size_type __pos, size_type __n) const noexcept; [[nodiscard, __gnu__::__nonnull__]] constexpr size_type find_first_not_of(const _CharT* __str, size_type __pos = 0) const noexcept ; [[nodiscard]] constexpr size_type find_last_not_of(basic_string_view __str, size_type __pos = npos) const noexcept ; [[nodiscard]] constexpr size_type find_last_not_of(_CharT __c, size_type __pos = npos) const noexcept; [[nodiscard]] constexpr size_type find_last_not_of(const _CharT* __str, size_type __pos, size_type __n) const noexcept; [[nodiscard, __gnu__::__nonnull__]] constexpr size_type find_last_not_of(const _CharT* __str, size_type __pos = npos) const noexcept ; private: static constexpr int _S_compare(size_type __n1, size_type __n2) noexcept ; size_t _M_len; const _CharT* _M_str; }; template<contiguous_iterator _It, sized_sentinel_for<_It> _End> basic_string_view(_It, _End) -> basic_string_view<iter_value_t<_It>>; template<typename _CharT, typename _Traits> [[nodiscard]] constexpr bool operator==(basic_string_view<_CharT, _Traits> __x, basic_string_view<_CharT, _Traits> __y) noexcept ; template<typename _CharT, typename _Traits> [[nodiscard]] constexpr bool operator==(basic_string_view<_CharT, _Traits> __x, __type_identity_t<basic_string_view<_CharT, _Traits>> __y) noexcept ; template<typename _CharT, typename _Traits> [[nodiscard]] constexpr auto operator<=>(basic_string_view<_CharT, _Traits> __x, basic_string_view<_CharT, _Traits> __y) noexcept -> decltype(__detail::__char_traits_cmp_cat<_Traits>(0)) ; template<typename _CharT, typename _Traits> [[nodiscard]] constexpr auto operator<=>(basic_string_view<_CharT, _Traits> __x, __type_identity_t<basic_string_view<_CharT, _Traits>> __y) noexcept -> decltype(__detail::__char_traits_cmp_cat<_Traits>(0)) ; template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, basic_string_view<_CharT,_Traits> __str) ; using string_view = basic_string_view<char>; using wstring_view = basic_string_view<wchar_t>; using u8string_view = basic_string_view<char8_t>; using u16string_view = basic_string_view<char16_t>; using u32string_view = basic_string_view<char32_t>; template<typename _Tp> struct hash; template<> struct hash<string_view> : public __hash_base<size_t, string_view> { [[nodiscard]] size_t operator()(const string_view& __str) const noexcept ; }; template<> struct __is_fast_hash<hash<string_view>> : std::false_type { }; template<> struct hash<wstring_view> : public __hash_base<size_t, wstring_view> { [[nodiscard]] size_t operator()(const wstring_view& __s) const noexcept ; }; template<> struct __is_fast_hash<hash<wstring_view>> : std::false_type { }; template<> struct hash<u8string_view> : public __hash_base<size_t, u8string_view> { [[nodiscard]] size_t operator()(const u8string_view& __str) const noexcept { return std::_Hash_impl::hash(__str.data(), __str.length()); } }; template<> struct __is_fast_hash<hash<u8string_view>> : std::false_type { }; template<> struct hash<u16string_view> : public __hash_base<size_t, u16string_view> { [[nodiscard]] size_t operator()(const u16string_view& __s) const noexcept ; }; template<> struct __is_fast_hash<hash<u16string_view>> : std::false_type { }; template<> struct hash<u32string_view> : public __hash_base<size_t, u32string_view> { [[nodiscard]] size_t operator()(const u32string_view& __s) const noexcept ; }; template<> struct __is_fast_hash<hash<u32string_view>> : std::false_type { }; inline namespace literals { inline namespace string_view_literals { #pragma GCC diagnostic push constexpr basic_string_view<char> operator""sv(const char* __str, size_t __len) noexcept ; constexpr basic_string_view<wchar_t> operator""sv(const wchar_t* __str, size_t __len) noexcept ; constexpr basic_string_view<char8_t> operator""sv(const char8_t* __str, size_t __len) noexcept ; constexpr basic_string_view<char16_t> operator""sv(const char16_t* __str, size_t __len) noexcept ; constexpr basic_string_view<char32_t> operator""sv(const char32_t* __str, size_t __len) noexcept ; #pragma GCC diagnostic pop } } namespace ranges { template<typename _CharT, typename _Traits> inline constexpr bool enable_borrowed_range<basic_string_view<_CharT, _Traits>> = true; template<typename _CharT, typename _Traits> inline constexpr bool enable_view<basic_string_view<_CharT, _Traits>> = true; } } namespace std __attribute__ ((__visibility__ ("default"))) { } namespace std __attribute__ ((__visibility__ ("default"))) { namespace __cxx11 { 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; 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; static const size_type npos = static_cast<size_type>(-1); protected: typedef const_iterator __const_iterator; private: static constexpr pointer _S_allocate(_Char_alloc_type& __a, size_type __n) ; 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>; constexpr static __sv_type _S_to_string_view(__sv_type __svt) noexcept ; struct __sv_wrapper { constexpr explicit __sv_wrapper(__sv_type __sv) ; __sv_type _M_sv; }; constexpr explicit basic_string(__sv_wrapper __svw, const _Alloc& __a) ; struct _Alloc_hider : allocator_type { constexpr _Alloc_hider(pointer __dat, const _Alloc& __a) ; constexpr _Alloc_hider(pointer __dat, _Alloc&& __a = _Alloc()) ; pointer _M_p; }; _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; }; constexpr void _M_data(pointer __p) ; constexpr void _M_length(size_type __length) ; constexpr pointer _M_data() const ; constexpr pointer _M_local_data() ; constexpr const_pointer _M_local_data() const ; constexpr void _M_capacity(size_type __capacity) ; constexpr void _M_set_length(size_type __n) ; constexpr bool _M_is_local() const ; constexpr pointer _M_create(size_type&, size_type); constexpr void _M_dispose() ; constexpr void _M_destroy(size_type __size) throw() ; template<typename _InIterator> constexpr void _M_construct(_InIterator __beg, _InIterator __end, std::input_iterator_tag); template<typename _FwdIterator> constexpr void _M_construct(_FwdIterator __beg, _FwdIterator __end, std::forward_iterator_tag); constexpr void _M_construct(size_type __req, _CharT __c); constexpr allocator_type& _M_get_allocator() ; constexpr const allocator_type& _M_get_allocator() const ; __attribute__((__always_inline__)) constexpr void _M_init_local_buf() noexcept ; __attribute__((__always_inline__)) constexpr pointer _M_use_local_data() noexcept ; private: constexpr size_type _M_check(size_type __pos, const char* __s) const ; constexpr void _M_check_length(size_type __n1, size_type __n2, const char* __s) const ; constexpr size_type _M_limit(size_type __pos, size_type __off) const noexcept ; bool _M_disjunct(const _CharT* __s) const noexcept ; constexpr static void _S_copy(_CharT* __d, const _CharT* __s, size_type __n) ; constexpr static void _S_move(_CharT* __d, const _CharT* __s, size_type __n) ; constexpr static void _S_assign(_CharT* __d, size_type __n, _CharT __c) ; template<class _Iterator> constexpr static void _S_copy_chars(_CharT* __p, _Iterator __k1, _Iterator __k2) ; constexpr static void _S_copy_chars(_CharT* __p, iterator __k1, iterator __k2) noexcept ; constexpr static void _S_copy_chars(_CharT* __p, const_iterator __k1, const_iterator __k2) noexcept ; constexpr static void _S_copy_chars(_CharT* __p, _CharT* __k1, _CharT* __k2) noexcept ; constexpr static void _S_copy_chars(_CharT* __p, const _CharT* __k1, const _CharT* __k2) noexcept ; constexpr static int _S_compare(size_type __n1, size_type __n2) noexcept ; constexpr void _M_assign(const basic_string&); constexpr void _M_mutate(size_type __pos, size_type __len1, const _CharT* __s, size_type __len2); constexpr void _M_erase(size_type __pos, size_type __n); public: constexpr basic_string() noexcept(is_nothrow_default_constructible<_Alloc>::value) ; constexpr explicit basic_string(const _Alloc& __a) ; constexpr basic_string(const basic_string& __str) ; constexpr basic_string(const basic_string& __str, size_type __pos, const _Alloc& __a = _Alloc()) ; constexpr basic_string(const basic_string& __str, size_type __pos, size_type __n) ; constexpr basic_string(const basic_string& __str, size_type __pos, size_type __n, const _Alloc& __a) ; constexpr basic_string(const _CharT* __s, size_type __n, const _Alloc& __a = _Alloc()) ; template<typename = _RequireAllocator<_Alloc>> constexpr basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()) ; template<typename = _RequireAllocator<_Alloc>> constexpr basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc()) ; constexpr basic_string(basic_string&& __str) ; constexpr basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc()) ; constexpr basic_string(const basic_string& __str, const _Alloc& __a) ; constexpr basic_string(basic_string&& __str, const _Alloc& __a) noexcept(_Alloc_traits::_S_always_equal()) ; template<typename _InputIterator, typename = std::_RequireInputIter<_InputIterator>> constexpr basic_string(_InputIterator __beg, _InputIterator __end, const _Alloc& __a = _Alloc()) ; template<typename _Tp, typename = enable_if_t<is_convertible_v<const _Tp&, __sv_type>>> constexpr basic_string(const _Tp& __t, size_type __pos, size_type __n, const _Alloc& __a = _Alloc()) ; template<typename _Tp, typename = _If_sv<_Tp, void>> constexpr explicit basic_string(const _Tp& __t, const _Alloc& __a = _Alloc()) ; constexpr ~basic_string() ; constexpr basic_string& operator=(const basic_string& __str) ; constexpr basic_string& operator=(const _CharT* __s) ; constexpr basic_string& operator=(_CharT __c) ; constexpr basic_string& operator=(basic_string&& __str) noexcept(_Alloc_traits::_S_nothrow_move()) ; constexpr basic_string& operator=(initializer_list<_CharT> __l) ; template<typename _Tp> constexpr _If_sv<_Tp, basic_string&> operator=(const _Tp& __svt) ; constexpr operator __sv_type() const noexcept ; [[__nodiscard__]] constexpr iterator begin() noexcept ; [[__nodiscard__]] constexpr const_iterator begin() const noexcept ; [[__nodiscard__]] constexpr iterator end() noexcept ; [[__nodiscard__]] constexpr const_iterator end() const noexcept ; [[__nodiscard__]] constexpr reverse_iterator rbegin() noexcept ; [[__nodiscard__]] constexpr const_reverse_iterator rbegin() const noexcept ; [[__nodiscard__]] constexpr reverse_iterator rend() noexcept ; [[__nodiscard__]] constexpr const_reverse_iterator rend() const noexcept ; [[__nodiscard__]] constexpr const_iterator cbegin() const noexcept ; [[__nodiscard__]] constexpr const_iterator cend() const noexcept ; [[__nodiscard__]] constexpr const_reverse_iterator crbegin() const noexcept ; [[__nodiscard__]] constexpr const_reverse_iterator crend() const noexcept ; public: [[__nodiscard__]] constexpr size_type size() const noexcept ; [[__nodiscard__]] constexpr size_type length() const noexcept ; [[__nodiscard__]] constexpr size_type max_size() const noexcept ; constexpr void resize(size_type __n, _CharT __c); constexpr void resize(size_type __n) ; #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" constexpr void shrink_to_fit() noexcept ; #pragma GCC diagnostic pop [[__nodiscard__]] constexpr size_type capacity() const noexcept ; constexpr void reserve(size_type __res_arg); [[deprecated("use shrink_to_fit() instead")]] constexpr void reserve(); constexpr void clear() noexcept ; [[__nodiscard__]] constexpr bool empty() const noexcept ; [[__nodiscard__]] constexpr const_reference operator[] (size_type __pos) const noexcept ; [[__nodiscard__]] constexpr reference operator[](size_type __pos) ; [[__nodiscard__]] constexpr const_reference at(size_type __n) const ; [[__nodiscard__]] constexpr reference at(size_type __n) ; [[__nodiscard__]] constexpr reference front() noexcept ; [[__nodiscard__]] constexpr const_reference front() const noexcept ; [[__nodiscard__]] constexpr reference back() noexcept ; [[__nodiscard__]] constexpr const_reference back() const noexcept ; constexpr basic_string& operator+=(const basic_string& __str) ; constexpr basic_string& operator+=(const _CharT* __s) ; constexpr basic_string& operator+=(_CharT __c) ; constexpr basic_string& operator+=(initializer_list<_CharT> __l) ; template<typename _Tp> constexpr _If_sv<_Tp, basic_string&> operator+=(const _Tp& __svt) ; constexpr basic_string& append(const basic_string& __str) ; constexpr basic_string& append(const basic_string& __str, size_type __pos, size_type __n = npos) ; constexpr basic_string& append(const _CharT* __s, size_type __n) ; constexpr basic_string& append(const _CharT* __s) ; constexpr basic_string& append(size_type __n, _CharT __c) ; constexpr basic_string& append(initializer_list<_CharT> __l) ; template<class _InputIterator, typename = std::_RequireInputIter<_InputIterator>> constexpr basic_string& append(_InputIterator __first, _InputIterator __last) ; template<typename _Tp> constexpr _If_sv<_Tp, basic_string&> append(const _Tp& __svt) ; template<typename _Tp> constexpr _If_sv<_Tp, basic_string&> append(const _Tp& __svt, size_type __pos, size_type __n = npos) ; constexpr void push_back(_CharT __c) ; constexpr basic_string& assign(const basic_string& __str) ; constexpr basic_string& assign(basic_string&& __str) noexcept(_Alloc_traits::_S_nothrow_move()) ; constexpr basic_string& assign(const basic_string& __str, size_type __pos, size_type __n = npos) ; constexpr basic_string& assign(const _CharT* __s, size_type __n) ; constexpr basic_string& assign(const _CharT* __s) ; constexpr basic_string& assign(size_type __n, _CharT __c) ; template<class _InputIterator, typename = std::_RequireInputIter<_InputIterator>> constexpr basic_string& assign(_InputIterator __first, _InputIterator __last) ; constexpr basic_string& assign(initializer_list<_CharT> __l) ; template<typename _Tp> constexpr _If_sv<_Tp, basic_string&> assign(const _Tp& __svt) ; template<typename _Tp> constexpr _If_sv<_Tp, basic_string&> assign(const _Tp& __svt, size_type __pos, size_type __n = npos) ; constexpr iterator insert(const_iterator __p, size_type __n, _CharT __c) ; template<class _InputIterator, typename = std::_RequireInputIter<_InputIterator>> constexpr iterator insert(const_iterator __p, _InputIterator __beg, _InputIterator __end) ; constexpr iterator insert(const_iterator __p, initializer_list<_CharT> __l) ; constexpr basic_string& insert(size_type __pos1, const basic_string& __str) ; constexpr basic_string& insert(size_type __pos1, const basic_string& __str, size_type __pos2, size_type __n = npos) ; constexpr basic_string& insert(size_type __pos, const _CharT* __s, size_type __n) ; constexpr basic_string& insert(size_type __pos, const _CharT* __s) ; constexpr basic_string& insert(size_type __pos, size_type __n, _CharT __c) ; constexpr iterator insert(__const_iterator __p, _CharT __c) ; template<typename _Tp> constexpr _If_sv<_Tp, basic_string&> insert(size_type __pos, const _Tp& __svt) ; template<typename _Tp> constexpr _If_sv<_Tp, basic_string&> insert(size_type __pos1, const _Tp& __svt, size_type __pos2, size_type __n = npos) ; constexpr basic_string& erase(size_type __pos = 0, size_type __n = npos) ; constexpr iterator erase(__const_iterator __position) ; constexpr iterator erase(__const_iterator __first, __const_iterator __last) ; constexpr void pop_back() noexcept ; constexpr basic_string& replace(size_type __pos, size_type __n, const basic_string& __str) ; constexpr basic_string& replace(size_type __pos1, size_type __n1, const basic_string& __str, size_type __pos2, size_type __n2 = npos) ; constexpr basic_string& replace(size_type __pos, size_type __n1, const _CharT* __s, size_type __n2) ; constexpr basic_string& replace(size_type __pos, size_type __n1, const _CharT* __s) ; constexpr basic_string& replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c) ; constexpr basic_string& replace(__const_iterator __i1, __const_iterator __i2, const basic_string& __str) ; constexpr basic_string& replace(__const_iterator __i1, __const_iterator __i2, const _CharT* __s, size_type __n) ; constexpr basic_string& replace(__const_iterator __i1, __const_iterator __i2, const _CharT* __s) ; constexpr basic_string& replace(__const_iterator __i1, __const_iterator __i2, size_type __n, _CharT __c) ; template<class _InputIterator, typename = std::_RequireInputIter<_InputIterator>> constexpr basic_string& replace(const_iterator __i1, const_iterator __i2, _InputIterator __k1, _InputIterator __k2) ; constexpr basic_string& replace(__const_iterator __i1, __const_iterator __i2, _CharT* __k1, _CharT* __k2) ; constexpr basic_string& replace(__const_iterator __i1, __const_iterator __i2, const _CharT* __k1, const _CharT* __k2) ; constexpr basic_string& replace(__const_iterator __i1, __const_iterator __i2, iterator __k1, iterator __k2) ; constexpr basic_string& replace(__const_iterator __i1, __const_iterator __i2, const_iterator __k1, const_iterator __k2) ; constexpr basic_string& replace(const_iterator __i1, const_iterator __i2, initializer_list<_CharT> __l) ; template<typename _Tp> constexpr _If_sv<_Tp, basic_string&> replace(size_type __pos, size_type __n, const _Tp& __svt) ; template<typename _Tp> constexpr _If_sv<_Tp, basic_string&> replace(size_type __pos1, size_type __n1, const _Tp& __svt, size_type __pos2, size_type __n2 = npos) ; template<typename _Tp> constexpr _If_sv<_Tp, basic_string&> replace(const_iterator __i1, const_iterator __i2, const _Tp& __svt) ; private: template<class _Integer> constexpr basic_string& _M_replace_dispatch(const_iterator __i1, const_iterator __i2, _Integer __n, _Integer __val, __true_type) ; template<class _InputIterator> constexpr basic_string& _M_replace_dispatch(const_iterator __i1, const_iterator __i2, _InputIterator __k1, _InputIterator __k2, __false_type); constexpr basic_string& _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2, _CharT __c); __attribute__((__noinline__, __noclone__, __cold__)) void _M_replace_cold(pointer __p, size_type __len1, const _CharT* __s, const size_type __len2, const size_type __how_much); constexpr basic_string& _M_replace(size_type __pos, size_type __len1, const _CharT* __s, const size_type __len2); constexpr basic_string& _M_append(const _CharT* __s, size_type __n); public: constexpr size_type copy(_CharT* __s, size_type __n, size_type __pos = 0) const; constexpr void swap(basic_string& __s) noexcept; [[__nodiscard__]] constexpr const _CharT* c_str() const noexcept ; [[__nodiscard__]] constexpr const _CharT* data() const noexcept ; [[__nodiscard__]] constexpr _CharT* data() noexcept ; [[__nodiscard__]] constexpr allocator_type get_allocator() const noexcept ; [[__nodiscard__]] constexpr size_type find(const _CharT* __s, size_type __pos, size_type __n) const noexcept; [[__nodiscard__]] constexpr size_type find(const basic_string& __str, size_type __pos = 0) const noexcept ; template<typename _Tp> [[__nodiscard__]] constexpr _If_sv<_Tp, size_type> find(const _Tp& __svt, size_type __pos = 0) const noexcept(is_same<_Tp, __sv_type>::value) ; [[__nodiscard__]] constexpr size_type find(const _CharT* __s, size_type __pos = 0) const noexcept ; [[__nodiscard__]] constexpr size_type find(_CharT __c, size_type __pos = 0) const noexcept; [[__nodiscard__]] constexpr size_type rfind(const basic_string& __str, size_type __pos = npos) const noexcept ; template<typename _Tp> [[__nodiscard__]] constexpr _If_sv<_Tp, size_type> rfind(const _Tp& __svt, size_type __pos = npos) const noexcept(is_same<_Tp, __sv_type>::value) ; [[__nodiscard__]] constexpr size_type rfind(const _CharT* __s, size_type __pos, size_type __n) const noexcept; [[__nodiscard__]] constexpr size_type rfind(const _CharT* __s, size_type __pos = npos) const ; [[__nodiscard__]] constexpr size_type rfind(_CharT __c, size_type __pos = npos) const noexcept; [[__nodiscard__]] constexpr size_type find_first_of(const basic_string& __str, size_type __pos = 0) const noexcept ; template<typename _Tp> [[__nodiscard__]] constexpr _If_sv<_Tp, size_type> find_first_of(const _Tp& __svt, size_type __pos = 0) const noexcept(is_same<_Tp, __sv_type>::value) ; [[__nodiscard__]] constexpr size_type find_first_of(const _CharT* __s, size_type __pos, size_type __n) const noexcept; [[__nodiscard__]] constexpr size_type find_first_of(const _CharT* __s, size_type __pos = 0) const noexcept ; [[__nodiscard__]] constexpr size_type find_first_of(_CharT __c, size_type __pos = 0) const noexcept ; [[__nodiscard__]] constexpr size_type find_last_of(const basic_string& __str, size_type __pos = npos) const noexcept ; template<typename _Tp> [[__nodiscard__]] constexpr _If_sv<_Tp, size_type> find_last_of(const _Tp& __svt, size_type __pos = npos) const noexcept(is_same<_Tp, __sv_type>::value) ; [[__nodiscard__]] constexpr size_type find_last_of(const _CharT* __s, size_type __pos, size_type __n) const noexcept; [[__nodiscard__]] constexpr size_type find_last_of(const _CharT* __s, size_type __pos = npos) const noexcept ; [[__nodiscard__]] constexpr size_type find_last_of(_CharT __c, size_type __pos = npos) const noexcept ; [[__nodiscard__]] constexpr size_type find_first_not_of(const basic_string& __str, size_type __pos = 0) const noexcept ; template<typename _Tp> [[__nodiscard__]] constexpr _If_sv<_Tp, size_type> find_first_not_of(const _Tp& __svt, size_type __pos = 0) const noexcept(is_same<_Tp, __sv_type>::value) ; [[__nodiscard__]] constexpr size_type find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const noexcept; [[__nodiscard__]] constexpr size_type find_first_not_of(const _CharT* __s, size_type __pos = 0) const noexcept ; [[__nodiscard__]] constexpr size_type find_first_not_of(_CharT __c, size_type __pos = 0) const noexcept; [[__nodiscard__]] constexpr size_type find_last_not_of(const basic_string& __str, size_type __pos = npos) const noexcept ; template<typename _Tp> [[__nodiscard__]] constexpr _If_sv<_Tp, size_type> find_last_not_of(const _Tp& __svt, size_type __pos = npos) const noexcept(is_same<_Tp, __sv_type>::value) ; [[__nodiscard__]] constexpr size_type find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const noexcept; [[__nodiscard__]] constexpr size_type find_last_not_of(const _CharT* __s, size_type __pos = npos) const noexcept ; [[__nodiscard__]] constexpr size_type find_last_not_of(_CharT __c, size_type __pos = npos) const noexcept; [[__nodiscard__]] constexpr basic_string substr(size_type __pos = 0, size_type __n = npos) const ; [[__nodiscard__]] constexpr int compare(const basic_string& __str) const ; template<typename _Tp> [[__nodiscard__]] constexpr _If_sv<_Tp, int> compare(const _Tp& __svt) const noexcept(is_same<_Tp, __sv_type>::value) ; template<typename _Tp> [[__nodiscard__]] constexpr _If_sv<_Tp, int> compare(size_type __pos, size_type __n, const _Tp& __svt) const noexcept(is_same<_Tp, __sv_type>::value) ; template<typename _Tp> [[__nodiscard__]] constexpr _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) ; [[__nodiscard__]] constexpr int compare(size_type __pos, size_type __n, const basic_string& __str) const ; [[__nodiscard__]] constexpr int compare(size_type __pos1, size_type __n1, const basic_string& __str, size_type __pos2, size_type __n2 = npos) const ; [[__nodiscard__]] constexpr int compare(const _CharT* __s) const noexcept ; [[__nodiscard__]] constexpr int compare(size_type __pos, size_type __n1, const _CharT* __s) const ; [[__nodiscard__]] constexpr int compare(size_type __pos, size_type __n1, const _CharT* __s, size_type __n2) const ; [[nodiscard]] constexpr bool starts_with(basic_string_view<_CharT, _Traits> __x) const noexcept ; [[nodiscard]] constexpr bool starts_with(_CharT __x) const noexcept ; [[nodiscard, __gnu__::__nonnull__]] constexpr bool starts_with(const _CharT* __x) const noexcept ; [[nodiscard]] constexpr bool ends_with(basic_string_view<_CharT, _Traits> __x) const noexcept ; [[nodiscard]] constexpr bool ends_with(_CharT __x) const noexcept ; [[nodiscard, __gnu__::__nonnull__]] constexpr bool ends_with(const _CharT* __x) const noexcept ; template<typename, typename, typename> friend class basic_stringbuf; }; } } namespace std __attribute__ ((__visibility__ ("default"))) { 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>; 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>; } template<typename _Str> constexpr _Str __str_concat(typename _Str::value_type const* __lhs, typename _Str::size_type __lhs_len, typename _Str::value_type const* __rhs, typename _Str::size_type __rhs_len, typename _Str::allocator_type const& __a) ; template<typename _CharT, typename _Traits, typename _Alloc> [[__nodiscard__]] constexpr basic_string<_CharT, _Traits, _Alloc> operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) ; template<typename _CharT, typename _Traits, typename _Alloc> [[__nodiscard__]] constexpr basic_string<_CharT,_Traits,_Alloc> operator+(const _CharT* __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs) ; template<typename _CharT, typename _Traits, typename _Alloc> [[__nodiscard__]] constexpr basic_string<_CharT,_Traits,_Alloc> operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs) ; template<typename _CharT, typename _Traits, typename _Alloc> [[__nodiscard__]] constexpr basic_string<_CharT, _Traits, _Alloc> operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const _CharT* __rhs) ; template<typename _CharT, typename _Traits, typename _Alloc> [[__nodiscard__]] constexpr basic_string<_CharT, _Traits, _Alloc> operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs) ; template<typename _CharT, typename _Traits, typename _Alloc> [[__nodiscard__]] constexpr basic_string<_CharT, _Traits, _Alloc> operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) ; template<typename _CharT, typename _Traits, typename _Alloc> constexpr basic_string<_CharT, _Traits, _Alloc> operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, basic_string<_CharT, _Traits, _Alloc>&& __rhs) ; template<typename _CharT, typename _Traits, typename _Alloc> [[__nodiscard__]] constexpr basic_string<_CharT, _Traits, _Alloc> operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, basic_string<_CharT, _Traits, _Alloc>&& __rhs) ; template<typename _CharT, typename _Traits, typename _Alloc> [[__nodiscard__]] [[__nodiscard__]] constexpr basic_string<_CharT, _Traits, _Alloc> operator+(const _CharT* __lhs, basic_string<_CharT, _Traits, _Alloc>&& __rhs) ; template<typename _CharT, typename _Traits, typename _Alloc> [[__nodiscard__]] constexpr basic_string<_CharT, _Traits, _Alloc> operator+(_CharT __lhs, basic_string<_CharT, _Traits, _Alloc>&& __rhs) ; template<typename _CharT, typename _Traits, typename _Alloc> [[__nodiscard__]] constexpr basic_string<_CharT, _Traits, _Alloc> operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, const _CharT* __rhs) ; template<typename _CharT, typename _Traits, typename _Alloc> [[__nodiscard__]] constexpr basic_string<_CharT, _Traits, _Alloc> operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, _CharT __rhs) ; template<typename _CharT, typename _Traits, typename _Alloc> [[__nodiscard__]] constexpr bool operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) noexcept ; template<typename _CharT, typename _Traits, typename _Alloc> [[__nodiscard__]] constexpr bool operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const _CharT* __rhs) ; template<typename _CharT, typename _Traits, typename _Alloc> [[nodiscard]] constexpr auto operator<=>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) noexcept -> decltype(__detail::__char_traits_cmp_cat<_Traits>(0)) ; template<typename _CharT, typename _Traits, typename _Alloc> [[nodiscard]] constexpr auto operator<=>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const _CharT* __rhs) noexcept -> decltype(__detail::__char_traits_cmp_cat<_Traits>(0)) ; template<typename _CharT, typename _Traits, typename _Alloc> constexpr void swap(basic_string<_CharT, _Traits, _Alloc>& __lhs, basic_string<_CharT, _Traits, _Alloc>& __rhs) noexcept(noexcept(__lhs.swap(__rhs))) ; 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); template<typename _CharT, typename _Traits, typename _Alloc> basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const basic_string<_CharT, _Traits, _Alloc>& __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); template<typename _CharT, typename _Traits, typename _Alloc> basic_istream<_CharT, _Traits>& getline(basic_istream<_CharT, _Traits>& __is, basic_string<_CharT, _Traits, _Alloc>& __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) ; template<typename _CharT, typename _Traits, typename _Alloc> basic_istream<_CharT, _Traits>& getline(basic_istream<_CharT, _Traits>&& __is, basic_string<_CharT, _Traits, _Alloc>& __str) ; template<> basic_istream<char>& getline(basic_istream<char>& __in, basic_string<char>& __str, char __delim); template<> basic_istream<wchar_t>& getline(basic_istream<wchar_t>& __in, basic_string<wchar_t>& __str, wchar_t __delim); } extern "C" { typedef long unsigned int size_t; typedef struct _G_fpos_t { __off_t __pos; __mbstate_t __state; } __fpos_t; typedef struct _G_fpos64_t { __off64_t __pos; __mbstate_t __state; } __fpos64_t; struct _IO_FILE; struct _IO_marker; struct _IO_codecvt; struct _IO_wide_data; typedef void _IO_lock_t; struct _IO_FILE { int _flags; char *_IO_read_ptr; char *_IO_read_end; char *_IO_read_base; char *_IO_write_base; char *_IO_write_ptr; char *_IO_write_end; char *_IO_buf_base; char *_IO_buf_end; char *_IO_save_base; char *_IO_backup_base; char *_IO_save_end; struct _IO_marker *_markers; struct _IO_FILE *_chain; int _fileno; int _flags2; __off_t _old_offset; unsigned short _cur_column; signed char _vtable_offset; char _shortbuf[1]; _IO_lock_t *_lock; __off64_t _offset; struct _IO_codecvt *_codecvt; struct _IO_wide_data *_wide_data; struct _IO_FILE *_freeres_list; void *_freeres_buf; size_t __pad5; int _mode; char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; }; typedef __ssize_t cookie_read_function_t (void *__cookie, char *__buf, size_t __nbytes); typedef __ssize_t cookie_write_function_t (void *__cookie, const char *__buf, size_t __nbytes); typedef int cookie_seek_function_t (void *__cookie, __off64_t *__pos, int __w); typedef int cookie_close_function_t (void *__cookie); typedef struct _IO_cookie_io_functions_t { cookie_read_function_t *read; cookie_write_function_t *write; cookie_seek_function_t *seek; cookie_close_function_t *close; } cookie_io_functions_t; typedef __fpos_t fpos_t; typedef __fpos64_t fpos64_t; extern FILE *stdin; extern FILE *stdout; extern FILE *stderr; extern int remove (const char *__filename) noexcept (true); extern int rename (const char *__old, const char *__new) noexcept (true); extern int renameat (int __oldfd, const char *__old, int __newfd, const char *__new) noexcept (true); extern int renameat2 (int __oldfd, const char *__old, int __newfd, const char *__new, unsigned int __flags) noexcept (true); extern int fclose (FILE *__stream) __attribute__ ((__nonnull__ (1))); extern FILE *tmpfile (void) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); extern FILE *tmpfile64 (void) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); extern char *tmpnam (char[20]) noexcept (true) __attribute__ ((__warn_unused_result__)); extern char *tmpnam_r (char __s[20]) noexcept (true) __attribute__ ((__warn_unused_result__)); extern char *tempnam (const char *__dir, const char *__pfx) noexcept (true) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)) ; extern int fflush (FILE *__stream); extern int fflush_unlocked (FILE *__stream); extern int fcloseall (void); extern FILE *fopen (const char *__restrict __filename, const char *__restrict __modes) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); extern FILE *freopen (const char *__restrict __filename, const char *__restrict __modes, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)) __attribute__ ((__nonnull__ (3))); extern FILE *fopen64 (const char *__restrict __filename, const char *__restrict __modes) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); extern FILE *freopen64 (const char *__restrict __filename, const char *__restrict __modes, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)) __attribute__ ((__nonnull__ (3))); extern FILE *fdopen (int __fd, const char *__modes) noexcept (true) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); extern FILE *fopencookie (void *__restrict __magic_cookie, const char *__restrict __modes, cookie_io_functions_t __io_funcs) noexcept (true) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); extern FILE *fmemopen (void *__s, size_t __len, const char *__modes) noexcept (true) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) noexcept (true) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); ; extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) noexcept (true); extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, int __modes, size_t __n) noexcept (true); extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, size_t __size) noexcept (true); extern void setlinebuf (FILE *__stream) noexcept (true); extern int fprintf (FILE *__restrict __stream, const char *__restrict __format, ...); extern int printf (const char *__restrict __format, ...); extern int sprintf (char *__restrict __s, const char *__restrict __format, ...) noexcept (true); extern int vfprintf (FILE *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg); extern int vprintf (const char *__restrict __format, __gnuc_va_list __arg); extern int vsprintf (char *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) noexcept (true); extern int snprintf (char *__restrict __s, size_t __maxlen, const char *__restrict __format, ...) noexcept (true) __attribute__ ((__format__ (__printf__, 3, 4))); extern int vsnprintf (char *__restrict __s, size_t __maxlen, const char *__restrict __format, __gnuc_va_list __arg) noexcept (true) __attribute__ ((__format__ (__printf__, 3, 0))); extern int vasprintf (char **__restrict __ptr, const char *__restrict __f, __gnuc_va_list __arg) noexcept (true) __attribute__ ((__format__ (__printf__, 2, 0))) __attribute__ ((__warn_unused_result__)); extern int __asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...) noexcept (true) __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__)); extern int asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...) noexcept (true) __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__)); 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))); extern int fscanf (FILE *__restrict __stream, const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)); extern int scanf (const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)); extern int sscanf (const char *__restrict __s, const char *__restrict __format, ...) noexcept (true); extern int fscanf (FILE *__restrict __stream, const char *__restrict __format, ...) __asm__ ("" "__isoc23_fscanf") __attribute__ ((__warn_unused_result__)); extern int scanf (const char *__restrict __format, ...) __asm__ ("" "__isoc23_scanf") __attribute__ ((__warn_unused_result__)); extern int sscanf (const char *__restrict __s, const char *__restrict __format, ...) noexcept (true) __asm__ ("" "__isoc23_sscanf"); ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; struct obstack; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; extern __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int vsprintf (char *__restrict __s, const char *__restrict __fmt, __gnuc_va_list __ap) noexcept (true) ; extern __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int vsnprintf (char *__restrict __s, size_t __n, const char *__restrict __fmt, __gnuc_va_list __ap) noexcept (true) ; extern __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int vprintf (const char *__restrict __fmt, __gnuc_va_list __ap) ; extern __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int vfprintf (FILE *__restrict __stream, const char *__restrict __fmt, __gnuc_va_list __ap) ; extern __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int vdprintf (int __fd, const char *__restrict __fmt, __gnuc_va_list __ap) ; extern __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int vasprintf (char **__restrict __ptr, const char *__restrict __fmt, __gnuc_va_list __ap) noexcept (true) ; ; ; ; ; ; } namespace std { using ::FILE; using ::fpos_t; using ::fclose; using ::fflush; using ::fopen; using ::fprintf; using ::freopen; using ::fscanf; using ::printf; using ::remove; using ::rename; using ::scanf; using ::setbuf; using ::setvbuf; using ::sprintf; using ::sscanf; using ::tmpfile; using ::tmpnam; using ::vfprintf; using ::vprintf; using ::vsprintf; } namespace __gnu_cxx { using ::snprintf; using ::vsnprintf; } namespace std { using ::__gnu_cxx::snprintf; using ::__gnu_cxx::vsnprintf; } extern "C" { extern int *__errno_location (void) noexcept (true) __attribute__ ((__const__)); extern char *program_invocation_name; extern char *program_invocation_short_name; typedef int error_t; } namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { ; ; } namespace std __attribute__ ((__visibility__ ("default"))) { namespace __detail { template<typename _Tp> constexpr bool __integer_to_chars_is_unsigned = ! __gnu_cxx::__int_traits<_Tp>::__is_signed; template<typename _Tp> constexpr unsigned __to_chars_len(_Tp __value, int __base = 10) noexcept ; template<typename _Tp> void __to_chars_10_impl(char* __first, unsigned __len, _Tp __val) noexcept ; } } namespace std __attribute__ ((__visibility__ ("default"))) { namespace __cxx11 { [[__nodiscard__]] string to_string(int __val) noexcept ; [[__nodiscard__]] string to_string(unsigned __val) noexcept ; [[__nodiscard__]] string to_string(long __val) ; [[__nodiscard__]] string to_string(unsigned long __val) ; [[__nodiscard__]] string to_string(long long __val) ; [[__nodiscard__]] string to_string(unsigned long long __val) ; [[__nodiscard__]] string to_string(float __val) ; [[__nodiscard__]] string to_string(double __val) ; [[__nodiscard__]] string to_string(long double __val) ; int stoi(const wstring& __str, size_t* __idx = 0, int __base = 10) ; long stol(const wstring& __str, size_t* __idx = 0, int __base = 10) ; unsigned long stoul(const wstring& __str, size_t* __idx = 0, int __base = 10) ; long long stoll(const wstring& __str, size_t* __idx = 0, int __base = 10) ; unsigned long long stoull(const wstring& __str, size_t* __idx = 0, int __base = 10) ; float stof(const wstring& __str, size_t* __idx = 0) ; double stod(const wstring& __str, size_t* __idx = 0) ; long double stold(const wstring& __str, size_t* __idx = 0) ; [[__nodiscard__]] wstring to_wstring(int __val) ; [[__nodiscard__]] wstring to_wstring(unsigned __val) ; [[__nodiscard__]] wstring to_wstring(long __val) ; [[__nodiscard__]] wstring to_wstring(unsigned long __val) ; [[__nodiscard__]] wstring to_wstring(long long __val) ; [[__nodiscard__]] wstring to_wstring(unsigned long long __val) ; [[__nodiscard__]] wstring to_wstring(float __val) ; [[__nodiscard__]] wstring to_wstring(double __val) ; [[__nodiscard__]] wstring to_wstring(long double __val) ; } } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _CharT, typename _Alloc, typename _StrT = basic_string<_CharT, char_traits<_CharT>, _Alloc>> struct __str_hash_base : public __hash_base<size_t, _StrT> { [[__nodiscard__]] size_t operator()(const _StrT& __s) const noexcept ; }; template<typename _Alloc> struct hash<basic_string<char, char_traits<char>, _Alloc>> : public __str_hash_base<char, _Alloc> { }; template<typename _Alloc> struct hash<basic_string<wchar_t, char_traits<wchar_t>, _Alloc>> : public __str_hash_base<wchar_t, _Alloc> { }; template<typename _Alloc> struct __is_fast_hash<hash<basic_string<wchar_t, char_traits<wchar_t>, _Alloc>>> : std::false_type { }; template<typename _Alloc> struct hash<basic_string<char8_t, char_traits<char8_t>, _Alloc>> : public __str_hash_base<char8_t, _Alloc> { }; template<typename _Alloc> struct hash<basic_string<char16_t, char_traits<char16_t>, _Alloc>> : public __str_hash_base<char16_t, _Alloc> { }; template<typename _Alloc> struct hash<basic_string<char32_t, char_traits<char32_t>, _Alloc>> : public __str_hash_base<char32_t, _Alloc> { }; template<> struct __is_fast_hash<hash<string>> : std::false_type { }; template<> struct __is_fast_hash<hash<wstring>> : std::false_type { }; template<> struct __is_fast_hash<hash<u16string>> : std::false_type { }; template<> struct __is_fast_hash<hash<u32string>> : std::false_type { }; template<> struct __is_fast_hash<hash<u8string>> : std::false_type { }; inline namespace literals { inline namespace string_literals { #pragma GCC diagnostic push __attribute ((__abi_tag__ ("cxx11"))) constexpr basic_string<char> operator""s(const char* __str, size_t __len) ; __attribute ((__abi_tag__ ("cxx11"))) constexpr basic_string<wchar_t> operator""s(const wchar_t* __str, size_t __len) ; __attribute ((__abi_tag__ ("cxx11"))) constexpr basic_string<char8_t> operator""s(const char8_t* __str, size_t __len) ; __attribute ((__abi_tag__ ("cxx11"))) constexpr basic_string<char16_t> operator""s(const char16_t* __str, size_t __len) ; __attribute ((__abi_tag__ ("cxx11"))) constexpr basic_string<char32_t> operator""s(const char32_t* __str, size_t __len) ; #pragma GCC diagnostic pop } } namespace __detail::__variant { template<typename> struct _Never_valueless_alt; 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 std __attribute__ ((__visibility__ ("default"))) { 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> basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __in, basic_string<_CharT, _Traits, _Alloc>& __str) ; 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) ; extern template void basic_string<char>::_M_replace_cold(char *, size_type, const char*, const size_type, const size_type); 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&); extern template void basic_string<wchar_t>::_M_replace_cold(wchar_t*, size_type, const wchar_t*, const size_type, const size_type); 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&); } typedef long int ptrdiff_t; typedef long unsigned int size_t; typedef long unsigned int rsize_t; extern "C++" { namespace std { using ::max_align_t; } namespace std { enum class byte : unsigned char {}; template<typename _IntegerType> struct __byte_operand { }; template<> struct __byte_operand<bool> { using __type = byte; }; template<> struct __byte_operand<char> { using __type = byte; }; template<> struct __byte_operand<signed char> { using __type = byte; }; template<> struct __byte_operand<unsigned char> { using __type = byte; }; template<> struct __byte_operand<wchar_t> { using __type = byte; }; template<> struct __byte_operand<char8_t> { using __type = byte; }; template<> struct __byte_operand<char16_t> { using __type = byte; }; template<> struct __byte_operand<char32_t> { using __type = byte; }; template<> struct __byte_operand<short> { using __type = byte; }; template<> struct __byte_operand<unsigned short> { using __type = byte; }; template<> struct __byte_operand<int> { using __type = byte; }; template<> struct __byte_operand<unsigned int> { using __type = byte; }; template<> struct __byte_operand<long> { using __type = byte; }; template<> struct __byte_operand<unsigned long> { using __type = byte; }; template<> struct __byte_operand<long long> { using __type = byte; }; template<> struct __byte_operand<unsigned long long> { using __type = byte; }; template<typename _IntegerType> struct __byte_operand<const _IntegerType> : __byte_operand<_IntegerType> { }; template<typename _IntegerType> struct __byte_operand<volatile _IntegerType> : __byte_operand<_IntegerType> { }; template<typename _IntegerType> struct __byte_operand<const volatile _IntegerType> : __byte_operand<_IntegerType> { }; template<typename _IntegerType> using __byte_op_t = typename __byte_operand<_IntegerType>::__type; template<typename _IntegerType> [[__gnu__::__always_inline__]] constexpr __byte_op_t<_IntegerType> operator<<(byte __b, _IntegerType __shift) noexcept ; template<typename _IntegerType> [[__gnu__::__always_inline__]] constexpr __byte_op_t<_IntegerType> operator>>(byte __b, _IntegerType __shift) noexcept ; [[__gnu__::__always_inline__]] constexpr byte operator|(byte __l, byte __r) noexcept ; [[__gnu__::__always_inline__]] constexpr byte operator&(byte __l, byte __r) noexcept ; [[__gnu__::__always_inline__]] constexpr byte operator^(byte __l, byte __r) noexcept ; [[__gnu__::__always_inline__]] constexpr byte operator~(byte __b) noexcept ; template<typename _IntegerType> [[__gnu__::__always_inline__]] constexpr __byte_op_t<_IntegerType>& operator<<=(byte& __b, _IntegerType __shift) noexcept ; template<typename _IntegerType> [[__gnu__::__always_inline__]] constexpr __byte_op_t<_IntegerType>& operator>>=(byte& __b, _IntegerType __shift) noexcept ; [[__gnu__::__always_inline__]] constexpr byte& operator|=(byte& __l, byte __r) noexcept ; [[__gnu__::__always_inline__]] constexpr byte& operator&=(byte& __l, byte __r) noexcept ; [[__gnu__::__always_inline__]] constexpr byte& operator^=(byte& __l, byte __r) noexcept ; template<typename _IntegerType> [[nodiscard,__gnu__::__always_inline__]] constexpr _IntegerType to_integer(__byte_op_t<_IntegerType> __b) noexcept ; } } namespace std __attribute__ ((__visibility__ ("default"))) { struct __erased_type { }; template<typename _Alloc, typename _Tp> using __is_erased_or_convertible = __or_<is_convertible<_Alloc, _Tp>, is_same<_Tp, __erased_type>>; struct allocator_arg_t { explicit allocator_arg_t() = default; }; 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 { }; 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 constexpr 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_t< is_constructible<_Tp, allocator_arg_t, const _Alloc&, _Args...>::value, __uses_alloc1<_Alloc>, __uses_alloc2<_Alloc>> { 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> constexpr __uses_alloc_t<_Tp, _Alloc, _Args...> __use_alloc(const _Alloc& __a) ; template<typename _Tp, typename _Alloc, typename... _Args> void __use_alloc(const _Alloc&&) = delete; template <typename _Tp, typename _Alloc> inline constexpr bool uses_allocator_v = uses_allocator<_Tp, _Alloc>::value; template<template<typename...> class _Predicate, typename _Tp, typename _Alloc, typename... _Args> struct __is_uses_allocator_predicate : __conditional_t<uses_allocator<_Tp, _Alloc>::value, __or_<_Predicate<_Tp, allocator_arg_t, _Alloc, _Args...>, _Predicate<_Tp, _Args..., _Alloc>>, _Predicate<_Tp, _Args...>> { }; template<typename _Tp, typename _Alloc, typename... _Args> struct __is_uses_allocator_constructible : __is_uses_allocator_predicate<is_constructible, _Tp, _Alloc, _Args...> { }; template<typename _Tp, typename _Alloc, typename... _Args> inline constexpr bool __is_uses_allocator_constructible_v = __is_uses_allocator_constructible<_Tp, _Alloc, _Args...>::value; template<typename _Tp, typename _Alloc, typename... _Args> struct __is_nothrow_uses_allocator_constructible : __is_uses_allocator_predicate<is_nothrow_constructible, _Tp, _Alloc, _Args...> { }; template<typename _Tp, typename _Alloc, typename... _Args> inline constexpr bool __is_nothrow_uses_allocator_constructible_v = __is_nothrow_uses_allocator_constructible<_Tp, _Alloc, _Args...>::value; template<typename _Tp, typename... _Args> void __uses_allocator_construct_impl(__uses_alloc0, _Tp* __ptr, _Args&&... __args) ; template<typename _Tp, typename _Alloc, typename... _Args> void __uses_allocator_construct_impl(__uses_alloc1<_Alloc> __a, _Tp* __ptr, _Args&&... __args) ; template<typename _Tp, typename _Alloc, typename... _Args> void __uses_allocator_construct_impl(__uses_alloc2<_Alloc> __a, _Tp* __ptr, _Args&&... __args) ; template<typename _Tp, typename _Alloc, typename... _Args> void __uses_allocator_construct(const _Alloc& __a, _Tp* __ptr, _Args&&... __args) ; } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename... _Elements> class tuple; template<typename _Tp> struct __is_empty_non_tuple : is_empty<_Tp> { }; template<typename _El0, typename... _El> struct __is_empty_non_tuple<tuple<_El0, _El...>> : false_type { }; template<typename _Tp> using __empty_not_final = __conditional_t<__is_final(_Tp), false_type, __is_empty_non_tuple<_Tp>>; template<size_t _Idx, typename _Head, bool = __empty_not_final<_Head>::value> struct _Head_base; template<size_t _Idx, typename _Head> struct _Head_base<_Idx, _Head, true> { constexpr _Head_base() ; constexpr _Head_base(const _Head& __h) ; constexpr _Head_base(const _Head_base&) = default; constexpr _Head_base(_Head_base&&) = default; template<typename _UHead> constexpr _Head_base(_UHead&& __h) ; constexpr _Head_base(allocator_arg_t, __uses_alloc0) ; template<typename _Alloc> constexpr _Head_base(allocator_arg_t, __uses_alloc1<_Alloc> __a) ; template<typename _Alloc> constexpr _Head_base(allocator_arg_t, __uses_alloc2<_Alloc> __a) ; template<typename _UHead> constexpr _Head_base(__uses_alloc0, _UHead&& __uhead) ; template<typename _Alloc, typename _UHead> constexpr _Head_base(__uses_alloc1<_Alloc> __a, _UHead&& __uhead) ; template<typename _Alloc, typename _UHead> constexpr _Head_base(__uses_alloc2<_Alloc> __a, _UHead&& __uhead) ; static constexpr _Head& _M_head(_Head_base& __b) noexcept ; static constexpr const _Head& _M_head(const _Head_base& __b) noexcept ; [[__no_unique_address__]] _Head _M_head_impl; }; template<size_t _Idx, typename _Head> struct _Head_base<_Idx, _Head, false> { constexpr _Head_base() ; constexpr _Head_base(const _Head& __h) ; constexpr _Head_base(const _Head_base&) = default; constexpr _Head_base(_Head_base&&) = default; template<typename _UHead> constexpr _Head_base(_UHead&& __h) ; constexpr _Head_base(allocator_arg_t, __uses_alloc0) ; template<typename _Alloc> constexpr _Head_base(allocator_arg_t, __uses_alloc1<_Alloc> __a) ; template<typename _Alloc> constexpr _Head_base(allocator_arg_t, __uses_alloc2<_Alloc> __a) ; template<typename _UHead> constexpr _Head_base(__uses_alloc0, _UHead&& __uhead) ; template<typename _Alloc, typename _UHead> constexpr _Head_base(__uses_alloc1<_Alloc> __a, _UHead&& __uhead) ; template<typename _Alloc, typename _UHead> constexpr _Head_base(__uses_alloc2<_Alloc> __a, _UHead&& __uhead) ; static constexpr _Head& _M_head(_Head_base& __b) noexcept ; static constexpr const _Head& _M_head(const _Head_base& __b) noexcept ; _Head _M_head_impl; }; template<size_t _Idx, typename... _Elements> struct _Tuple_impl; template<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<size_t, typename...> friend struct _Tuple_impl; typedef _Tuple_impl<_Idx + 1, _Tail...> _Inherited; typedef _Head_base<_Idx, _Head> _Base; static constexpr _Head& _M_head(_Tuple_impl& __t) noexcept ; static constexpr const _Head& _M_head(const _Tuple_impl& __t) noexcept ; static constexpr _Inherited& _M_tail(_Tuple_impl& __t) noexcept ; static constexpr const _Inherited& _M_tail(const _Tuple_impl& __t) noexcept ; constexpr _Tuple_impl() ; explicit constexpr _Tuple_impl(const _Head& __head, const _Tail&... __tail) ; template<typename _UHead, typename... _UTail, typename = __enable_if_t<sizeof...(_Tail) == sizeof...(_UTail)>> explicit constexpr _Tuple_impl(_UHead&& __head, _UTail&&... __tail) ; constexpr _Tuple_impl(const _Tuple_impl&) = default; _Tuple_impl& operator=(const _Tuple_impl&) = delete; _Tuple_impl(_Tuple_impl&&) = default; template<typename... _UElements> constexpr _Tuple_impl(const _Tuple_impl<_Idx, _UElements...>& __in) ; template<typename _UHead, typename... _UTails> constexpr _Tuple_impl(_Tuple_impl<_Idx, _UHead, _UTails...>&& __in) ; template<typename _Alloc> constexpr _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a) ; template<typename _Alloc> constexpr _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, const _Head& __head, const _Tail&... __tail) ; template<typename _Alloc, typename _UHead, typename... _UTail, typename = __enable_if_t<sizeof...(_Tail) == sizeof...(_UTail)>> constexpr _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, _UHead&& __head, _UTail&&... __tail) ; template<typename _Alloc> constexpr _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, const _Tuple_impl& __in) ; template<typename _Alloc> constexpr _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, _Tuple_impl&& __in) ; template<typename _Alloc, typename _UHead, typename... _UTails> constexpr _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, const _Tuple_impl<_Idx, _UHead, _UTails...>& __in) ; template<typename _Alloc, typename _UHead, typename... _UTails> constexpr _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, _Tuple_impl<_Idx, _UHead, _UTails...>&& __in) ; template<typename... _UElements> constexpr void _M_assign(const _Tuple_impl<_Idx, _UElements...>& __in) ; template<typename _UHead, typename... _UTails> constexpr void _M_assign(_Tuple_impl<_Idx, _UHead, _UTails...>&& __in) ; protected: constexpr void _M_swap(_Tuple_impl& __in) ; }; template<size_t _Idx, typename _Head> struct _Tuple_impl<_Idx, _Head> : private _Head_base<_Idx, _Head> { template<size_t, typename...> friend struct _Tuple_impl; typedef _Head_base<_Idx, _Head> _Base; static constexpr _Head& _M_head(_Tuple_impl& __t) noexcept ; static constexpr const _Head& _M_head(const _Tuple_impl& __t) noexcept ; constexpr _Tuple_impl() ; explicit constexpr _Tuple_impl(const _Head& __head) ; template<typename _UHead> explicit constexpr _Tuple_impl(_UHead&& __head) ; constexpr _Tuple_impl(const _Tuple_impl&) = default; _Tuple_impl& operator=(const _Tuple_impl&) = delete; constexpr _Tuple_impl(_Tuple_impl&& __in) noexcept(is_nothrow_move_constructible<_Head>::value) ; template<typename _UHead> constexpr _Tuple_impl(const _Tuple_impl<_Idx, _UHead>& __in) ; template<typename _UHead> constexpr _Tuple_impl(_Tuple_impl<_Idx, _UHead>&& __in) ; template<typename _Alloc> constexpr _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a) ; template<typename _Alloc> constexpr _Tuple_impl(allocator_arg_t, const _Alloc& __a, const _Head& __head) ; template<typename _Alloc, typename _UHead> constexpr _Tuple_impl(allocator_arg_t, const _Alloc& __a, _UHead&& __head) ; template<typename _Alloc> constexpr _Tuple_impl(allocator_arg_t, const _Alloc& __a, const _Tuple_impl& __in) ; template<typename _Alloc> constexpr _Tuple_impl(allocator_arg_t, const _Alloc& __a, _Tuple_impl&& __in) ; template<typename _Alloc, typename _UHead> constexpr _Tuple_impl(allocator_arg_t, const _Alloc& __a, const _Tuple_impl<_Idx, _UHead>& __in) ; template<typename _Alloc, typename _UHead> constexpr _Tuple_impl(allocator_arg_t, const _Alloc& __a, _Tuple_impl<_Idx, _UHead>&& __in) ; template<typename _UHead> constexpr void _M_assign(const _Tuple_impl<_Idx, _UHead>& __in) ; template<typename _UHead> constexpr void _M_assign(_Tuple_impl<_Idx, _UHead>&& __in) ; protected: constexpr void _M_swap(_Tuple_impl& __in) ; }; template<bool, typename... _Types> struct _TupleConstraints { template<typename... _UTypes> using __constructible = __and_<is_constructible<_Types, _UTypes>...>; template<typename... _UTypes> using __convertible = __and_<is_convertible<_UTypes, _Types>...>; template<typename... _UTypes> static constexpr bool __is_implicitly_constructible() { return __and_<__constructible<_UTypes...>, __convertible<_UTypes...> >::value; } template<typename... _UTypes> static constexpr bool __is_explicitly_constructible() { return __and_<__constructible<_UTypes...>, __not_<__convertible<_UTypes...>> >::value; } static constexpr bool __is_implicitly_default_constructible() { return __and_<std::__is_implicitly_default_constructible<_Types>... >::value; } static constexpr bool __is_explicitly_default_constructible() { return __and_<is_default_constructible<_Types>..., __not_<__and_< std::__is_implicitly_default_constructible<_Types>...> >>::value; } }; template<typename... _Types> struct _TupleConstraints<false, _Types...> { template<typename... _UTypes> static constexpr bool __is_implicitly_constructible() { return false; } template<typename... _UTypes> static constexpr bool __is_explicitly_constructible() { return false; } }; template<typename... _Elements> class tuple : public _Tuple_impl<0, _Elements...> { typedef _Tuple_impl<0, _Elements...> _Inherited; template<bool _Cond> using _TCC = _TupleConstraints<_Cond, _Elements...>; template<bool _Dummy> using _ImplicitDefaultCtor = __enable_if_t< _TCC<_Dummy>::__is_implicitly_default_constructible(), bool>; template<bool _Dummy> using _ExplicitDefaultCtor = __enable_if_t< _TCC<_Dummy>::__is_explicitly_default_constructible(), bool>; template<bool _Cond, typename... _Args> using _ImplicitCtor = __enable_if_t< _TCC<_Cond>::template __is_implicitly_constructible<_Args...>(), bool>; template<bool _Cond, typename... _Args> using _ExplicitCtor = __enable_if_t< _TCC<_Cond>::template __is_explicitly_constructible<_Args...>(), bool>; 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; } template<typename... _UElements> static constexpr bool __nothrow_constructible() ; template<typename _Up> static constexpr bool __valid_args() ; template<typename, typename, typename... _Tail> static constexpr bool __valid_args() ; template<typename _Tuple, typename = tuple, typename = __remove_cvref_t<_Tuple>> struct _UseOtherCtor : false_type { }; template<typename _Tuple, typename _Tp, typename _Up> struct _UseOtherCtor<_Tuple, tuple<_Tp>, tuple<_Up>> : __or_<is_convertible<_Tuple, _Tp>, is_constructible<_Tp, _Tuple>>::type { }; template<typename _Tuple, typename _Tp> struct _UseOtherCtor<_Tuple, tuple<_Tp>, tuple<_Tp>> : true_type { }; template<typename _Tuple> static constexpr bool __use_other_ctor() ; public: template<typename _Dummy = void, _ImplicitDefaultCtor<is_void<_Dummy>::value> = true> constexpr tuple() noexcept(__and_<is_nothrow_default_constructible<_Elements>...>::value) ; template<typename _Dummy = void, _ExplicitDefaultCtor<is_void<_Dummy>::value> = false> explicit constexpr tuple() noexcept(__and_<is_nothrow_default_constructible<_Elements>...>::value) ; template<bool _NotEmpty = (sizeof...(_Elements) >= 1), _ImplicitCtor<_NotEmpty, const _Elements&...> = true> constexpr tuple(const _Elements&... __elements) noexcept(__nothrow_constructible<const _Elements&...>()) ; template<bool _NotEmpty = (sizeof...(_Elements) >= 1), _ExplicitCtor<_NotEmpty, const _Elements&...> = false> explicit constexpr tuple(const _Elements&... __elements) noexcept(__nothrow_constructible<const _Elements&...>()) ; template<typename... _UElements, bool _Valid = __valid_args<_UElements...>(), _ImplicitCtor<_Valid, _UElements...> = true> constexpr tuple(_UElements&&... __elements) noexcept(__nothrow_constructible<_UElements...>()) ; template<typename... _UElements, bool _Valid = __valid_args<_UElements...>(), _ExplicitCtor<_Valid, _UElements...> = false> explicit constexpr tuple(_UElements&&... __elements) noexcept(__nothrow_constructible<_UElements...>()) ; constexpr tuple(const tuple&) = default; constexpr tuple(tuple&&) = default; template<typename... _UElements, bool _Valid = (sizeof...(_Elements) == sizeof...(_UElements)) && !__use_other_ctor<const tuple<_UElements...>&>(), _ImplicitCtor<_Valid, const _UElements&...> = true> constexpr tuple(const tuple<_UElements...>& __in) noexcept(__nothrow_constructible<const _UElements&...>()) ; template<typename... _UElements, bool _Valid = (sizeof...(_Elements) == sizeof...(_UElements)) && !__use_other_ctor<const tuple<_UElements...>&>(), _ExplicitCtor<_Valid, const _UElements&...> = false> explicit constexpr tuple(const tuple<_UElements...>& __in) noexcept(__nothrow_constructible<const _UElements&...>()) ; template<typename... _UElements, bool _Valid = (sizeof...(_Elements) == sizeof...(_UElements)) && !__use_other_ctor<tuple<_UElements...>&&>(), _ImplicitCtor<_Valid, _UElements...> = true> constexpr tuple(tuple<_UElements...>&& __in) noexcept(__nothrow_constructible<_UElements...>()) ; template<typename... _UElements, bool _Valid = (sizeof...(_Elements) == sizeof...(_UElements)) && !__use_other_ctor<tuple<_UElements...>&&>(), _ExplicitCtor<_Valid, _UElements...> = false> explicit constexpr tuple(tuple<_UElements...>&& __in) noexcept(__nothrow_constructible<_UElements...>()) ; template<typename _Alloc, _ImplicitDefaultCtor<is_object<_Alloc>::value> = true> constexpr tuple(allocator_arg_t __tag, const _Alloc& __a) ; template<typename _Alloc, bool _NotEmpty = (sizeof...(_Elements) >= 1), _ImplicitCtor<_NotEmpty, const _Elements&...> = true> constexpr tuple(allocator_arg_t __tag, const _Alloc& __a, const _Elements&... __elements) ; template<typename _Alloc, bool _NotEmpty = (sizeof...(_Elements) >= 1), _ExplicitCtor<_NotEmpty, const _Elements&...> = false> constexpr explicit tuple(allocator_arg_t __tag, const _Alloc& __a, const _Elements&... __elements) ; template<typename _Alloc, typename... _UElements, bool _Valid = __valid_args<_UElements...>(), _ImplicitCtor<_Valid, _UElements...> = true> constexpr tuple(allocator_arg_t __tag, const _Alloc& __a, _UElements&&... __elements) ; template<typename _Alloc, typename... _UElements, bool _Valid = __valid_args<_UElements...>(), _ExplicitCtor<_Valid, _UElements...> = false> constexpr explicit tuple(allocator_arg_t __tag, const _Alloc& __a, _UElements&&... __elements) ; template<typename _Alloc> constexpr tuple(allocator_arg_t __tag, const _Alloc& __a, const tuple& __in) ; template<typename _Alloc> constexpr tuple(allocator_arg_t __tag, const _Alloc& __a, tuple&& __in) ; template<typename _Alloc, typename... _UElements, bool _Valid = (sizeof...(_Elements) == sizeof...(_UElements)) && !__use_other_ctor<const tuple<_UElements...>&>(), _ImplicitCtor<_Valid, const _UElements&...> = true> constexpr tuple(allocator_arg_t __tag, const _Alloc& __a, const tuple<_UElements...>& __in) ; template<typename _Alloc, typename... _UElements, bool _Valid = (sizeof...(_Elements) == sizeof...(_UElements)) && !__use_other_ctor<const tuple<_UElements...>&>(), _ExplicitCtor<_Valid, const _UElements&...> = false> constexpr explicit tuple(allocator_arg_t __tag, const _Alloc& __a, const tuple<_UElements...>& __in) ; template<typename _Alloc, typename... _UElements, bool _Valid = (sizeof...(_Elements) == sizeof...(_UElements)) && !__use_other_ctor<tuple<_UElements...>&&>(), _ImplicitCtor<_Valid, _UElements...> = true> constexpr tuple(allocator_arg_t __tag, const _Alloc& __a, tuple<_UElements...>&& __in) ; template<typename _Alloc, typename... _UElements, bool _Valid = (sizeof...(_Elements) == sizeof...(_UElements)) && !__use_other_ctor<tuple<_UElements...>&&>(), _ExplicitCtor<_Valid, _UElements...> = false> constexpr explicit tuple(allocator_arg_t __tag, const _Alloc& __a, tuple<_UElements...>&& __in) ; constexpr tuple& operator=(__conditional_t<__assignable<const _Elements&...>(), const tuple&, const __nonesuch&> __in) noexcept(__nothrow_assignable<const _Elements&...>()) ; constexpr tuple& operator=(__conditional_t<__assignable<_Elements...>(), tuple&&, __nonesuch&&> __in) noexcept(__nothrow_assignable<_Elements...>()) ; template<typename... _UElements> constexpr __enable_if_t<__assignable<const _UElements&...>(), tuple&> operator=(const tuple<_UElements...>& __in) noexcept(__nothrow_assignable<const _UElements&...>()) ; template<typename... _UElements> constexpr __enable_if_t<__assignable<_UElements...>(), tuple&> operator=(tuple<_UElements...>&& __in) noexcept(__nothrow_assignable<_UElements...>()) ; constexpr void swap(tuple& __in) noexcept(__and_<__is_nothrow_swappable<_Elements>...>::value) ; }; 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...>; template<> class tuple<> { public: constexpr void swap(tuple&) noexcept ; tuple() = default; template<typename _Alloc> constexpr tuple(allocator_arg_t, const _Alloc&) noexcept { } template<typename _Alloc> constexpr tuple(allocator_arg_t, const _Alloc&, const tuple&) noexcept { } }; template<typename _T1, typename _T2> class tuple<_T1, _T2> : public _Tuple_impl<0, _T1, _T2> { typedef _Tuple_impl<0, _T1, _T2> _Inherited; template<bool _Dummy, typename _U1, typename _U2> using _ImplicitDefaultCtor = __enable_if_t< _TupleConstraints<_Dummy, _U1, _U2>:: __is_implicitly_default_constructible(), bool>; template<bool _Dummy, typename _U1, typename _U2> using _ExplicitDefaultCtor = __enable_if_t< _TupleConstraints<_Dummy, _U1, _U2>:: __is_explicitly_default_constructible(), bool>; template<bool _Dummy> using _TCC = _TupleConstraints<_Dummy, _T1, _T2>; template<bool _Cond, typename _U1, typename _U2> using _ImplicitCtor = __enable_if_t< _TCC<_Cond>::template __is_implicitly_constructible<_U1, _U2>(), bool>; template<bool _Cond, typename _U1, typename _U2> using _ExplicitCtor = __enable_if_t< _TCC<_Cond>::template __is_explicitly_constructible<_U1, _U2>(), bool>; 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; } template<typename _U1, typename _U2> static constexpr bool __nothrow_constructible() { return __and_<is_nothrow_constructible<_T1, _U1>, is_nothrow_constructible<_T2, _U2>>::value; } static constexpr bool __nothrow_default_constructible() { return __and_<is_nothrow_default_constructible<_T1>, is_nothrow_default_constructible<_T2>>::value; } template<typename _U1> static constexpr bool __is_alloc_arg() { return is_same<__remove_cvref_t<_U1>, allocator_arg_t>::value; } public: template<bool _Dummy = true, _ImplicitDefaultCtor<_Dummy, _T1, _T2> = true> constexpr tuple() noexcept(__nothrow_default_constructible()) : _Inherited() { } template<bool _Dummy = true, _ExplicitDefaultCtor<_Dummy, _T1, _T2> = false> explicit constexpr tuple() noexcept(__nothrow_default_constructible()) ; template<bool _Dummy = true, _ImplicitCtor<_Dummy, const _T1&, const _T2&> = true> constexpr tuple(const _T1& __a1, const _T2& __a2) noexcept(__nothrow_constructible<const _T1&, const _T2&>()) ; template<bool _Dummy = true, _ExplicitCtor<_Dummy, const _T1&, const _T2&> = false> explicit constexpr tuple(const _T1& __a1, const _T2& __a2) noexcept(__nothrow_constructible<const _T1&, const _T2&>()) ; template<typename _U1, typename _U2, _ImplicitCtor<!__is_alloc_arg<_U1>(), _U1, _U2> = true> constexpr tuple(_U1&& __a1, _U2&& __a2) noexcept(__nothrow_constructible<_U1, _U2>()) ; template<typename _U1, typename _U2, _ExplicitCtor<!__is_alloc_arg<_U1>(), _U1, _U2> = false> explicit constexpr tuple(_U1&& __a1, _U2&& __a2) noexcept(__nothrow_constructible<_U1, _U2>()) ; constexpr tuple(const tuple&) = default; constexpr tuple(tuple&&) = default; template<typename _U1, typename _U2, _ImplicitCtor<true, const _U1&, const _U2&> = true> constexpr tuple(const tuple<_U1, _U2>& __in) noexcept(__nothrow_constructible<const _U1&, const _U2&>()) ; template<typename _U1, typename _U2, _ExplicitCtor<true, const _U1&, const _U2&> = false> explicit constexpr tuple(const tuple<_U1, _U2>& __in) noexcept(__nothrow_constructible<const _U1&, const _U2&>()) ; template<typename _U1, typename _U2, _ImplicitCtor<true, _U1, _U2> = true> constexpr tuple(tuple<_U1, _U2>&& __in) noexcept(__nothrow_constructible<_U1, _U2>()) ; template<typename _U1, typename _U2, _ExplicitCtor<true, _U1, _U2> = false> explicit constexpr tuple(tuple<_U1, _U2>&& __in) noexcept(__nothrow_constructible<_U1, _U2>()) ; template<typename _U1, typename _U2, _ImplicitCtor<true, const _U1&, const _U2&> = true> constexpr tuple(const pair<_U1, _U2>& __in) noexcept(__nothrow_constructible<const _U1&, const _U2&>()) ; template<typename _U1, typename _U2, _ExplicitCtor<true, const _U1&, const _U2&> = false> explicit constexpr tuple(const pair<_U1, _U2>& __in) noexcept(__nothrow_constructible<const _U1&, const _U2&>()) ; template<typename _U1, typename _U2, _ImplicitCtor<true, _U1, _U2> = true> constexpr tuple(pair<_U1, _U2>&& __in) noexcept(__nothrow_constructible<_U1, _U2>()) ; template<typename _U1, typename _U2, _ExplicitCtor<true, _U1, _U2> = false> explicit constexpr tuple(pair<_U1, _U2>&& __in) noexcept(__nothrow_constructible<_U1, _U2>()) ; template<typename _Alloc, _ImplicitDefaultCtor<is_object<_Alloc>::value, _T1, _T2> = true> constexpr tuple(allocator_arg_t __tag, const _Alloc& __a) ; template<typename _Alloc, bool _Dummy = true, _ImplicitCtor<_Dummy, const _T1&, const _T2&> = true> constexpr tuple(allocator_arg_t __tag, const _Alloc& __a, const _T1& __a1, const _T2& __a2) ; template<typename _Alloc, bool _Dummy = true, _ExplicitCtor<_Dummy, const _T1&, const _T2&> = false> explicit constexpr tuple(allocator_arg_t __tag, const _Alloc& __a, const _T1& __a1, const _T2& __a2) ; template<typename _Alloc, typename _U1, typename _U2, _ImplicitCtor<true, _U1, _U2> = true> constexpr tuple(allocator_arg_t __tag, const _Alloc& __a, _U1&& __a1, _U2&& __a2) ; template<typename _Alloc, typename _U1, typename _U2, _ExplicitCtor<true, _U1, _U2> = false> explicit constexpr tuple(allocator_arg_t __tag, const _Alloc& __a, _U1&& __a1, _U2&& __a2) ; template<typename _Alloc> constexpr tuple(allocator_arg_t __tag, const _Alloc& __a, const tuple& __in) ; template<typename _Alloc> constexpr tuple(allocator_arg_t __tag, const _Alloc& __a, tuple&& __in) ; template<typename _Alloc, typename _U1, typename _U2, _ImplicitCtor<true, const _U1&, const _U2&> = true> constexpr tuple(allocator_arg_t __tag, const _Alloc& __a, const tuple<_U1, _U2>& __in) ; template<typename _Alloc, typename _U1, typename _U2, _ExplicitCtor<true, const _U1&, const _U2&> = false> explicit constexpr tuple(allocator_arg_t __tag, const _Alloc& __a, const tuple<_U1, _U2>& __in) ; template<typename _Alloc, typename _U1, typename _U2, _ImplicitCtor<true, _U1, _U2> = true> constexpr tuple(allocator_arg_t __tag, const _Alloc& __a, tuple<_U1, _U2>&& __in) ; template<typename _Alloc, typename _U1, typename _U2, _ExplicitCtor<true, _U1, _U2> = false> explicit constexpr tuple(allocator_arg_t __tag, const _Alloc& __a, tuple<_U1, _U2>&& __in) ; template<typename _Alloc, typename _U1, typename _U2, _ImplicitCtor<true, const _U1&, const _U2&> = true> constexpr tuple(allocator_arg_t __tag, const _Alloc& __a, const pair<_U1, _U2>& __in) ; template<typename _Alloc, typename _U1, typename _U2, _ExplicitCtor<true, const _U1&, const _U2&> = false> explicit constexpr tuple(allocator_arg_t __tag, const _Alloc& __a, const pair<_U1, _U2>& __in) ; template<typename _Alloc, typename _U1, typename _U2, _ImplicitCtor<true, _U1, _U2> = true> constexpr tuple(allocator_arg_t __tag, const _Alloc& __a, pair<_U1, _U2>&& __in) ; template<typename _Alloc, typename _U1, typename _U2, _ExplicitCtor<true, _U1, _U2> = false> explicit constexpr tuple(allocator_arg_t __tag, const _Alloc& __a, pair<_U1, _U2>&& __in) ; constexpr tuple& operator=(__conditional_t<__assignable<const _T1&, const _T2&>(), const tuple&, const __nonesuch&> __in) noexcept(__nothrow_assignable<const _T1&, const _T2&>()) ; constexpr tuple& operator=(__conditional_t<__assignable<_T1, _T2>(), tuple&&, __nonesuch&&> __in) noexcept(__nothrow_assignable<_T1, _T2>()) ; template<typename _U1, typename _U2> constexpr __enable_if_t<__assignable<const _U1&, const _U2&>(), tuple&> operator=(const tuple<_U1, _U2>& __in) noexcept(__nothrow_assignable<const _U1&, const _U2&>()) ; template<typename _U1, typename _U2> constexpr __enable_if_t<__assignable<_U1, _U2>(), tuple&> operator=(tuple<_U1, _U2>&& __in) noexcept(__nothrow_assignable<_U1, _U2>()) ; template<typename _U1, typename _U2> constexpr __enable_if_t<__assignable<const _U1&, const _U2&>(), tuple&> operator=(const pair<_U1, _U2>& __in) noexcept(__nothrow_assignable<const _U1&, const _U2&>()) ; template<typename _U1, typename _U2> constexpr __enable_if_t<__assignable<_U1, _U2>(), tuple&> operator=(pair<_U1, _U2>&& __in) noexcept(__nothrow_assignable<_U1, _U2>()) ; constexpr void swap(tuple& __in) noexcept(__and_<__is_nothrow_swappable<_T1>, __is_nothrow_swappable<_T2>>::value) ; }; template<typename... _Elements> struct tuple_size<tuple<_Elements...>> : public integral_constant<size_t, sizeof...(_Elements)> { }; template<typename... _Types> inline constexpr size_t tuple_size_v<tuple<_Types...>> = sizeof...(_Types); template<typename... _Types> inline constexpr size_t tuple_size_v<const tuple<_Types...>> = sizeof...(_Types); template<size_t __i, typename... _Types> struct tuple_element<__i, tuple<_Types...>> { static_assert(__i < sizeof...(_Types), "tuple index must be in range"); using type = typename _Nth_type<__i, _Types...>::type; }; template<size_t __i, typename _Head, typename... _Tail> constexpr _Head& __get_helper(_Tuple_impl<__i, _Head, _Tail...>& __t) noexcept ; template<size_t __i, typename _Head, typename... _Tail> constexpr const _Head& __get_helper(const _Tuple_impl<__i, _Head, _Tail...>& __t) noexcept ; template<size_t __i, typename... _Types> __enable_if_t<(__i >= sizeof...(_Types))> __get_helper(const tuple<_Types...>&) = delete; template<size_t __i, typename... _Elements> constexpr __tuple_element_t<__i, tuple<_Elements...>>& get(tuple<_Elements...>& __t) noexcept ; template<size_t __i, typename... _Elements> constexpr const __tuple_element_t<__i, tuple<_Elements...>>& get(const tuple<_Elements...>& __t) noexcept ; template<size_t __i, typename... _Elements> constexpr __tuple_element_t<__i, tuple<_Elements...>>&& get(tuple<_Elements...>&& __t) noexcept ; template<size_t __i, typename... _Elements> constexpr const __tuple_element_t<__i, tuple<_Elements...>>&& get(const tuple<_Elements...>&& __t) noexcept ; template<size_t __i, typename... _Elements> constexpr __enable_if_t<(__i >= sizeof...(_Elements))> get(const tuple<_Elements...>&) = delete; template <typename _Tp, typename... _Types> constexpr _Tp& get(tuple<_Types...>& __t) noexcept ; template <typename _Tp, typename... _Types> constexpr _Tp&& get(tuple<_Types...>&& __t) noexcept ; template <typename _Tp, typename... _Types> constexpr const _Tp& get(const tuple<_Types...>& __t) noexcept ; template <typename _Tp, typename... _Types> constexpr const _Tp&& get(const tuple<_Types...>&& __t) noexcept ; template<typename _Tp, typename _Up, size_t __i, size_t __size> struct __tuple_compare { static constexpr bool __eq(const _Tp& __t, const _Up& __u) ; static constexpr bool __less(const _Tp& __t, const _Up& __u) ; }; template<typename _Tp, typename _Up, size_t __size> struct __tuple_compare<_Tp, _Up, __size, __size> { static constexpr bool __eq(const _Tp&, const _Up&) ; static constexpr bool __less(const _Tp&, const _Up&) ; }; template<typename... _TElements, typename... _UElements> constexpr bool operator==(const tuple<_TElements...>& __t, const tuple<_UElements...>& __u) ; template<typename _Cat, typename _Tp, typename _Up> constexpr _Cat __tuple_cmp(const _Tp&, const _Up&, index_sequence<>) ; template<typename _Cat, typename _Tp, typename _Up, size_t _Idx0, size_t... _Idxs> constexpr _Cat __tuple_cmp(const _Tp& __t, const _Up& __u, index_sequence<_Idx0, _Idxs...>) ; template<typename... _Tps, typename... _Ups> constexpr common_comparison_category_t<__detail::__synth3way_t<_Tps, _Ups>...> operator<=>(const tuple<_Tps...>& __t, const tuple<_Ups...>& __u) ; template<typename... _Elements> constexpr tuple<typename __decay_and_strip<_Elements>::__type...> make_tuple(_Elements&&... __args) ; template<typename... _Elements> constexpr tuple<_Elements&&...> forward_as_tuple(_Elements&&... __args) noexcept ; template<typename _Tp, size_t _Nm> struct array; template<size_t _Int, typename _Tp, size_t _Nm> constexpr _Tp& get(array<_Tp, _Nm>&) noexcept; template<size_t _Int, typename _Tp, size_t _Nm> constexpr _Tp&& get(array<_Tp, _Nm>&&) noexcept; template<size_t _Int, typename _Tp, size_t _Nm> constexpr const _Tp& get(const array<_Tp, _Nm>&) noexcept; template<size_t _Int, typename _Tp, size_t _Nm> constexpr const _Tp&& get(const array<_Tp, _Nm>&&) noexcept; 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<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, tuple_size<_Tuple>::value> { }; template<typename _Tuple> struct __make_tuple : public __do_make_tuple<__remove_cvref_t<_Tuple>> { }; 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; }; template<typename... _Tpls> struct __tuple_cat_result { typedef typename __combine_tuples <typename __make_tuple<_Tpls>::__type...>::__type __type; }; template<typename...> struct __make_1st_indices; template<> struct __make_1st_indices<> { typedef _Index_tuple<> __type; }; template<typename _Tp, typename... _Tpls> struct __make_1st_indices<_Tp, _Tpls...> { typedef typename _Build_index_tuple<tuple_size< typename remove_reference<_Tp>::type>::value>::__type __type; }; template<typename _Ret, typename _Indices, typename... _Tpls> struct __tuple_concater; template<typename _Ret, size_t... _Is, typename _Tp, typename... _Tpls> struct __tuple_concater<_Ret, _Index_tuple<_Is...>, _Tp, _Tpls...> { template<typename... _Us> static constexpr _Ret _S_do(_Tp&& __tp, _Tpls&&... __tps, _Us&&... __us) ; }; template<typename _Ret> struct __tuple_concater<_Ret, _Index_tuple<>> { template<typename... _Us> static constexpr _Ret _S_do(_Us&&... __us) ; }; template<typename... _Tps> struct __is_tuple_like_impl<tuple<_Tps...>> : true_type { }; 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 ; template<typename... _Elements> constexpr tuple<_Elements&...> tie(_Elements&... __args) noexcept ; template<typename... _Elements> constexpr typename enable_if<__and_<__is_swappable<_Elements>...>::value >::type swap(tuple<_Elements...>& __x, tuple<_Elements...>& __y) noexcept(noexcept(__x.swap(__y))) ; template<typename... _Elements> constexpr typename enable_if<!__and_<__is_swappable<_Elements>...>::value>::type swap(tuple<_Elements...>&, tuple<_Elements...>&) = delete; struct _Swallow_assign { template<class _Tp> constexpr const _Swallow_assign& operator=(const _Tp&) const ; }; inline constexpr _Swallow_assign ignore{}; template<typename... _Types, typename _Alloc> struct uses_allocator<tuple<_Types...>, _Alloc> : true_type { }; template<template<typename...> class _Trait, typename _Tp, typename _Tuple> inline constexpr bool __unpack_std_tuple = false; template<template<typename...> class _Trait, typename _Tp, typename... _Up> inline constexpr bool __unpack_std_tuple<_Trait, _Tp, tuple<_Up...>> = _Trait<_Tp, _Up...>::value; template<template<typename...> class _Trait, typename _Tp, typename... _Up> inline constexpr bool __unpack_std_tuple<_Trait, _Tp, tuple<_Up...>&> = _Trait<_Tp, _Up&...>::value; template<template<typename...> class _Trait, typename _Tp, typename... _Up> inline constexpr bool __unpack_std_tuple<_Trait, _Tp, const tuple<_Up...>> = _Trait<_Tp, const _Up...>::value; template<template<typename...> class _Trait, typename _Tp, typename... _Up> inline constexpr bool __unpack_std_tuple<_Trait, _Tp, const tuple<_Up...>&> = _Trait<_Tp, const _Up&...>::value; template <typename _Fn, typename _Tuple, size_t... _Idx> constexpr decltype(auto) __apply_impl(_Fn&& __f, _Tuple&& __t, index_sequence<_Idx...>) ; template <typename _Fn, typename _Tuple> constexpr decltype(auto) apply(_Fn&& __f, _Tuple&& __t) noexcept(__unpack_std_tuple<is_nothrow_invocable, _Fn, _Tuple>) ; template <typename _Tp, typename _Tuple, size_t... _Idx> constexpr _Tp __make_from_tuple_impl(_Tuple&& __t, index_sequence<_Idx...>) ; template <typename _Tp, typename _Tuple> constexpr _Tp make_from_tuple(_Tuple&& __t) noexcept(__unpack_std_tuple<is_nothrow_constructible, _Tp, _Tuple>) ; } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Tp> concept _Std_pair = __is_pair<remove_cv_t<_Tp>>; template<typename _Tp, typename _Alloc, typename... _Args> constexpr auto uses_allocator_construction_args(const _Alloc& __a, _Args&&... __args) noexcept requires (! _Std_pair<_Tp>) ; template<_Std_pair _Tp, typename _Alloc, typename _Tuple1, typename _Tuple2> constexpr auto uses_allocator_construction_args(const _Alloc& __a, piecewise_construct_t, _Tuple1&& __x, _Tuple2&& __y) noexcept; template<_Std_pair _Tp, typename _Alloc> constexpr auto uses_allocator_construction_args(const _Alloc&) noexcept; template<_Std_pair _Tp, typename _Alloc, typename _Up, typename _Vp> constexpr auto uses_allocator_construction_args(const _Alloc&, _Up&&, _Vp&&) noexcept; template<_Std_pair _Tp, typename _Alloc, typename _Up, typename _Vp> constexpr auto uses_allocator_construction_args(const _Alloc&, const pair<_Up, _Vp>&) noexcept; template<_Std_pair _Tp, typename _Alloc, typename _Up, typename _Vp> constexpr auto uses_allocator_construction_args(const _Alloc&, pair<_Up, _Vp>&&) noexcept; template<_Std_pair _Tp, typename _Alloc, typename _Tuple1, typename _Tuple2> constexpr auto uses_allocator_construction_args(const _Alloc& __a, piecewise_construct_t, _Tuple1&& __x, _Tuple2&& __y) noexcept ; template<_Std_pair _Tp, typename _Alloc> constexpr auto uses_allocator_construction_args(const _Alloc& __a) noexcept ; template<_Std_pair _Tp, typename _Alloc, typename _Up, typename _Vp> constexpr auto uses_allocator_construction_args(const _Alloc& __a, _Up&& __u, _Vp&& __v) noexcept ; template<_Std_pair _Tp, typename _Alloc, typename _Up, typename _Vp> constexpr auto uses_allocator_construction_args(const _Alloc& __a, const pair<_Up, _Vp>& __pr) noexcept ; template<_Std_pair _Tp, typename _Alloc, typename _Up, typename _Vp> constexpr auto uses_allocator_construction_args(const _Alloc& __a, pair<_Up, _Vp>&& __pr) noexcept ; template<typename _Tp, typename _Alloc, typename... _Args> constexpr _Tp make_obj_using_allocator(const _Alloc& __a, _Args&&... __args) ; template<typename _Tp, typename _Alloc, typename... _Args> constexpr _Tp* uninitialized_construct_using_allocator(_Tp* __p, const _Alloc& __a, _Args&&... __args) ; } namespace std __attribute__ ((__visibility__ ("default"))) { namespace pmr { class memory_resource { static constexpr size_t _S_max_align = alignof(max_align_t); public: memory_resource() = default; memory_resource(const memory_resource&) = default; virtual ~memory_resource(); memory_resource& operator=(const memory_resource&) = default; [[nodiscard]] void* allocate(size_t __bytes, size_t __alignment = _S_max_align) __attribute__((__returns_nonnull__,__alloc_size__(2),__alloc_align__(3))) ; void deallocate(void* __p, size_t __bytes, size_t __alignment = _S_max_align) __attribute__((__nonnull__)) ; [[nodiscard]] bool is_equal(const memory_resource& __other) const noexcept ; private: virtual void* do_allocate(size_t __bytes, size_t __alignment) = 0; virtual void do_deallocate(void* __p, size_t __bytes, size_t __alignment) = 0; virtual bool do_is_equal(const memory_resource& __other) const noexcept = 0; }; [[nodiscard]] bool operator==(const memory_resource& __a, const memory_resource& __b) noexcept ; template<typename _Tp> class polymorphic_allocator { template<typename _Up> struct __not_pair { using type = void; }; template<typename _Up1, typename _Up2> struct __not_pair<pair<_Up1, _Up2>> { }; public: using value_type = _Tp; polymorphic_allocator() noexcept ; polymorphic_allocator(memory_resource* __r) noexcept __attribute__((__nonnull__)) ; polymorphic_allocator(const polymorphic_allocator& __other) = default; template<typename _Up> polymorphic_allocator(const polymorphic_allocator<_Up>& __x) ; polymorphic_allocator& operator=(const polymorphic_allocator&) = delete; [[nodiscard]] _Tp* allocate(size_t __n) __attribute__((__returns_nonnull__)) ; void deallocate(_Tp* __p, size_t __n) noexcept __attribute__((__nonnull__)) ; [[nodiscard]] void* allocate_bytes(size_t __nbytes, size_t __alignment = alignof(max_align_t)) ; void deallocate_bytes(void* __p, size_t __nbytes, size_t __alignment = alignof(max_align_t)) ; template<typename _Up> [[nodiscard]] _Up* allocate_object(size_t __n = 1) ; template<typename _Up> void deallocate_object(_Up* __p, size_t __n = 1) ; template<typename _Up, typename... _CtorArgs> [[nodiscard]] _Up* new_object(_CtorArgs&&... __ctor_args) ; template<typename _Up> void delete_object(_Up* __p) ; template<typename _Tp1, typename... _Args> __attribute__((__nonnull__)) void construct(_Tp1* __p, _Args&&... __args) ; template<typename _Up> __attribute__ ((__deprecated__ ("use '" "allocator_traits::destroy" "' instead"))) __attribute__((__nonnull__)) void destroy(_Up* __p) ; polymorphic_allocator select_on_container_copy_construction() const noexcept ; memory_resource* resource() const noexcept __attribute__((__returns_nonnull__)) ; [[nodiscard]] friend bool operator==(const polymorphic_allocator& __a, const polymorphic_allocator& __b) noexcept { return *__a.resource() == *__b.resource(); } private: memory_resource* _M_resource; }; template<typename _Tp1, typename _Tp2> [[nodiscard]] inline bool operator==(const polymorphic_allocator<_Tp1>& __a, const polymorphic_allocator<_Tp2>& __b) noexcept { return *__a.resource() == *__b.resource(); } } template<typename _Alloc> struct allocator_traits; template<typename _Tp> struct allocator_traits<pmr::polymorphic_allocator<_Tp>> { using allocator_type = pmr::polymorphic_allocator<_Tp>; using value_type = _Tp; using pointer = _Tp*; using const_pointer = const _Tp*; using void_pointer = void*; using const_void_pointer = const void*; using difference_type = std::ptrdiff_t; using size_type = std::size_t; using propagate_on_container_copy_assignment = false_type; using propagate_on_container_move_assignment = false_type; using propagate_on_container_swap = false_type; static allocator_type select_on_container_copy_construction(const allocator_type&) noexcept { return allocator_type(); } using is_always_equal = false_type; template<typename _Up> using rebind_alloc = pmr::polymorphic_allocator<_Up>; template<typename _Up> using rebind_traits = allocator_traits<pmr::polymorphic_allocator<_Up>>; [[nodiscard]] static pointer allocate(allocator_type& __a, size_type __n) ; [[nodiscard]] static pointer allocate(allocator_type& __a, size_type __n, const_void_pointer) ; static void deallocate(allocator_type& __a, pointer __p, size_type __n) ; template<typename _Up, typename... _Args> static void construct(allocator_type& __a, _Up* __p, _Args&&... __args) ; template<typename _Up> static constexpr void destroy(allocator_type&, _Up* __p) noexcept(is_nothrow_destructible<_Up>::value) ; static constexpr size_type max_size(const allocator_type&) noexcept ; }; } namespace std __attribute__ ((__visibility__ ("default"))) { namespace pmr { template<typename _CharT, typename _Traits = char_traits<_CharT>> using basic_string = std::basic_string<_CharT, _Traits, polymorphic_allocator<_CharT>>; using string = basic_string<char>; using u8string = basic_string<char8_t>; using u16string = basic_string<char16_t>; using u32string = basic_string<char32_t>; using wstring = basic_string<wchar_t>; } } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _CharT, typename _Traits, typename _Alloc, typename _Predicate> constexpr typename basic_string<_CharT, _Traits, _Alloc>::size_type erase_if(basic_string<_CharT, _Traits, _Alloc>& __cont, _Predicate __pred) ; template<typename _CharT, typename _Traits, typename _Alloc, typename _Up> constexpr typename basic_string<_CharT, _Traits, _Alloc>::size_type erase(basic_string<_CharT, _Traits, _Alloc>& __cont, const _Up& __value) ; } namespace std __attribute__ ((__visibility__ ("default"))) { class locale { public: typedef int category; class facet; class id; class _Impl; friend class facet; friend class _Impl; template<typename _Facet> friend bool has_facet(const locale&) throw(); template<typename _Facet> friend const _Facet& use_facet(const locale&); template<typename _Facet> friend const _Facet* __try_use_facet(const locale&) noexcept; template<typename _Cache> friend struct __use_cache; static const category none = 0; static const category ctype = 1L << 0; static const category numeric = 1L << 1; static const category collate = 1L << 2; static const category time = 1L << 3; static const category monetary = 1L << 4; static const category messages = 1L << 5; static const category all = (ctype | numeric | collate | time | monetary | messages); locale() throw(); locale(const locale& __other) throw(); explicit locale(const char* __s); locale(const locale& __base, const char* __s, category __cat); explicit locale(const std::string& __s) ; locale(const locale& __base, const std::string& __s, category __cat) ; locale(const locale& __base, const locale& __add, category __cat); template<typename _Facet> locale(const locale& __other, _Facet* __f); ~locale() throw(); const locale& operator=(const locale& __other) throw(); template<typename _Facet> locale combine(const locale& __other) const; __attribute ((__abi_tag__ ("cxx11"))) string name() const; bool operator==(const locale& __other) const throw(); template<typename _Char, typename _Traits, typename _Alloc> bool operator()(const basic_string<_Char, _Traits, _Alloc>& __s1, const basic_string<_Char, _Traits, _Alloc>& __s2) const; static locale global(const locale& __loc); static const locale& classic(); private: _Impl* _M_impl; static _Impl* _S_classic; static _Impl* _S_global; static const char* const* const _S_categories; enum { _S_categories_size = 6 + 6 }; static __gthread_once_t _S_once; explicit locale(_Impl*) throw(); static void _S_initialize(); static void _S_initialize_once() throw(); static category _S_normalize_category(category); void _M_coalesce(const locale& __base, const locale& __add, category __cat); static const id* const _S_twinned_facets[]; }; class locale::facet { private: friend class locale; friend class locale::_Impl; mutable _Atomic_word _M_refcount; static __c_locale _S_c_locale; static const char _S_c_name[2]; static __gthread_once_t _S_once; static void _S_initialize_once(); protected: explicit facet(size_t __refs = 0) throw() ; virtual ~facet(); static void _S_create_c_locale(__c_locale& __cloc, const char* __s, __c_locale __old = 0); static __c_locale _S_clone_c_locale(__c_locale& __cloc) throw(); static void _S_destroy_c_locale(__c_locale& __cloc); static __c_locale _S_lc_ctype_c_locale(__c_locale __cloc, const char* __s); static __c_locale _S_get_c_locale(); __attribute__ ((__const__)) static const char* _S_get_c_name() throw(); facet(const facet&) = delete; facet& operator=(const facet&) = delete; private: void _M_add_reference() const throw() ; void _M_remove_reference() const throw() ; const facet* _M_sso_shim(const id*) const; const facet* _M_cow_shim(const id*) const; protected: class __shim; }; class locale::id { private: friend class locale; friend class locale::_Impl; template<typename _Facet> friend const _Facet& use_facet(const locale&); template<typename _Facet> friend bool has_facet(const locale&) throw(); template<typename _Facet> friend const _Facet* __try_use_facet(const locale&) noexcept; mutable size_t _M_index; static _Atomic_word _S_refcount; void operator=(const id&); id(const id&); public: id() ; size_t _M_id() const throw(); }; class locale::_Impl { public: friend class locale; friend class locale::facet; template<typename _Facet> friend bool has_facet(const locale&) throw(); template<typename _Facet> friend const _Facet& use_facet(const locale&); template<typename _Facet> friend const _Facet* __try_use_facet(const locale&) noexcept; template<typename _Cache> friend struct __use_cache; private: _Atomic_word _M_refcount; const facet** _M_facets; size_t _M_facets_size; const facet** _M_caches; char** _M_names; static const locale::id* const _S_id_ctype[]; static const locale::id* const _S_id_numeric[]; static const locale::id* const _S_id_collate[]; static const locale::id* const _S_id_time[]; static const locale::id* const _S_id_monetary[]; static const locale::id* const _S_id_messages[]; static const locale::id* const* const _S_facet_categories[]; void _M_add_reference() throw() ; void _M_remove_reference() throw() ; _Impl(const _Impl&, size_t); _Impl(const char*, size_t); _Impl(size_t) throw(); ~_Impl() throw(); _Impl(const _Impl&); void operator=(const _Impl&); bool _M_check_same_name() ; void _M_replace_categories(const _Impl*, category); void _M_replace_category(const _Impl*, const locale::id* const*); void _M_replace_facet(const _Impl*, const locale::id*); void _M_install_facet(const locale::id*, const facet*); template<typename _Facet> void _M_init_facet(_Facet* __facet) ; template<typename _Facet> void _M_init_facet_unchecked(_Facet* __facet) ; void _M_install_cache(const facet*, size_t); void _M_init_extra(facet**); void _M_init_extra(void*, void*, const char*, const char*); }; template<typename _CharT> class __cxx11:: collate : public locale::facet { public: typedef _CharT char_type; typedef basic_string<_CharT> string_type; protected: __c_locale _M_c_locale_collate; public: static locale::id id; explicit collate(size_t __refs = 0) ; explicit collate(__c_locale __cloc, size_t __refs = 0) ; int compare(const _CharT* __lo1, const _CharT* __hi1, const _CharT* __lo2, const _CharT* __hi2) const ; string_type transform(const _CharT* __lo, const _CharT* __hi) const ; long hash(const _CharT* __lo, const _CharT* __hi) const ; int _M_compare(const _CharT*, const _CharT*) const throw(); size_t _M_transform(_CharT*, const _CharT*, size_t) const throw(); protected: virtual ~collate() ; virtual int do_compare(const _CharT* __lo1, const _CharT* __hi1, const _CharT* __lo2, const _CharT* __hi2) const; virtual string_type do_transform(const _CharT* __lo, const _CharT* __hi) const; virtual long do_hash(const _CharT* __lo, const _CharT* __hi) const; }; template<typename _CharT> locale::id collate<_CharT>::id; template<> int collate<char>::_M_compare(const char*, const char*) const throw(); template<> size_t collate<char>::_M_transform(char*, const char*, size_t) const throw(); template<> int collate<wchar_t>::_M_compare(const wchar_t*, const wchar_t*) const throw(); template<> size_t collate<wchar_t>::_M_transform(wchar_t*, const wchar_t*, size_t) const throw(); template<typename _CharT> class __cxx11:: collate_byname : public collate<_CharT> { public: typedef _CharT char_type; typedef basic_string<_CharT> string_type; explicit collate_byname(const char* __s, size_t __refs = 0) ; explicit collate_byname(const string& __s, size_t __refs = 0) ; protected: virtual ~collate_byname() ; }; } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Facet> const _Facet* __try_use_facet(const locale& __loc) noexcept ; template<typename _Facet> bool has_facet(const locale& __loc) throw() ; #pragma GCC diagnostic push template<typename _Facet> const _Facet& use_facet(const locale& __loc) ; #pragma GCC diagnostic pop extern template class collate<char>; extern template class collate_byname<char>; extern template const collate<char>* __try_use_facet<collate<char> >(const locale&) noexcept; extern template const collate<char>& use_facet<collate<char> >(const locale&); extern template bool has_facet<collate<char> >(const locale&); extern template class collate<wchar_t>; extern template class collate_byname<wchar_t>; extern template const collate<wchar_t>* __try_use_facet<collate<wchar_t> >(const locale&) noexcept; extern template const collate<wchar_t>& use_facet<collate<wchar_t> >(const locale&); extern template bool has_facet<collate<wchar_t> >(const locale&); } namespace std __attribute__ ((__visibility__ ("default"))) { enum class errc { address_family_not_supported = 97, address_in_use = 98, address_not_available = 99, already_connected = 106, argument_list_too_long = 7, argument_out_of_domain = 33, bad_address = 14, bad_file_descriptor = 9, bad_message = 74, broken_pipe = 32, connection_aborted = 103, connection_already_in_progress = 114, connection_refused = 111, connection_reset = 104, cross_device_link = 18, destination_address_required = 89, device_or_resource_busy = 16, directory_not_empty = 39, executable_format_error = 8, file_exists = 17, file_too_large = 27, filename_too_long = 36, function_not_supported = 38, host_unreachable = 113, identifier_removed = 43, illegal_byte_sequence = 84, inappropriate_io_control_operation = 25, interrupted = 4, invalid_argument = 22, invalid_seek = 29, io_error = 5, is_a_directory = 21, message_size = 90, network_down = 100, network_reset = 102, network_unreachable = 101, no_buffer_space = 105, no_child_process = 10, no_link = 67, no_lock_available = 37, no_message_available = 61, no_message = 42, no_protocol_option = 92, no_space_on_device = 28, no_stream_resources = 63, no_such_device_or_address = 6, no_such_device = 19, no_such_file_or_directory = 2, no_such_process = 3, not_a_directory = 20, not_a_socket = 88, not_a_stream = 60, not_connected = 107, not_enough_memory = 12, not_supported = 95, operation_canceled = 125, operation_in_progress = 115, operation_not_permitted = 1, operation_not_supported = 95, operation_would_block = 11, owner_dead = 130, permission_denied = 13, protocol_error = 71, protocol_not_supported = 93, read_only_file_system = 30, resource_deadlock_would_occur = 35, resource_unavailable_try_again = 11, result_out_of_range = 34, state_not_recoverable = 131, stream_timeout = 62, text_file_busy = 26, timed_out = 110, too_many_files_open_in_system = 23, too_many_files_open = 24, too_many_links = 31, too_many_symbolic_link_levels = 40, value_too_large = 75, wrong_protocol_type = 91 }; } namespace std __attribute__ ((__visibility__ ("default"))) { 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&) noexcept; __cow_string& operator=(const __cow_string&) noexcept; ~__cow_string(); __cow_string(__cow_string&&) noexcept; __cow_string& operator=(__cow_string&&) noexcept; }; typedef basic_string<char> __sso_string; class logic_error : public exception { __cow_string _M_msg; public: explicit logic_error(const string& __arg) ; explicit logic_error(const char*) ; logic_error(logic_error&&) noexcept; logic_error& operator=(logic_error&&) noexcept; logic_error(const logic_error&) noexcept; logic_error& operator=(const logic_error&) noexcept; virtual ~logic_error() noexcept; virtual const char* what() const noexcept; }; class domain_error : public logic_error { public: explicit domain_error(const string& __arg) ; explicit domain_error(const char*) ; domain_error(const domain_error&) = default; domain_error& operator=(const domain_error&) = default; domain_error(domain_error&&) = default; domain_error& operator=(domain_error&&) = default; virtual ~domain_error() noexcept; }; class invalid_argument : public logic_error { public: explicit invalid_argument(const string& __arg) ; explicit invalid_argument(const char*) ; invalid_argument(const invalid_argument&) = default; invalid_argument& operator=(const invalid_argument&) = default; invalid_argument(invalid_argument&&) = default; invalid_argument& operator=(invalid_argument&&) = default; virtual ~invalid_argument() noexcept; }; class length_error : public logic_error { public: explicit length_error(const string& __arg) ; explicit length_error(const char*) ; length_error(const length_error&) = default; length_error& operator=(const length_error&) = default; length_error(length_error&&) = default; length_error& operator=(length_error&&) = default; virtual ~length_error() noexcept; }; class out_of_range : public logic_error { public: explicit out_of_range(const string& __arg) ; explicit out_of_range(const char*) ; 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; virtual ~out_of_range() noexcept; }; class runtime_error : public exception { __cow_string _M_msg; public: explicit runtime_error(const string& __arg) ; explicit runtime_error(const char*) ; runtime_error(runtime_error&&) noexcept; runtime_error& operator=(runtime_error&&) noexcept; runtime_error(const runtime_error&) noexcept; runtime_error& operator=(const runtime_error&) noexcept; virtual ~runtime_error() noexcept; virtual const char* what() const noexcept; }; class range_error : public runtime_error { public: explicit range_error(const string& __arg) ; explicit range_error(const char*) ; range_error(const range_error&) = default; range_error& operator=(const range_error&) = default; range_error(range_error&&) = default; range_error& operator=(range_error&&) = default; virtual ~range_error() noexcept; }; class overflow_error : public runtime_error { public: explicit overflow_error(const string& __arg) ; explicit overflow_error(const char*) ; overflow_error(const overflow_error&) = default; overflow_error& operator=(const overflow_error&) = default; overflow_error(overflow_error&&) = default; overflow_error& operator=(overflow_error&&) = default; virtual ~overflow_error() noexcept; }; class underflow_error : public runtime_error { public: explicit underflow_error(const string& __arg) ; explicit underflow_error(const char*) ; underflow_error(const underflow_error&) = default; underflow_error& operator=(const underflow_error&) = default; underflow_error(underflow_error&&) = default; underflow_error& operator=(underflow_error&&) = default; virtual ~underflow_error() noexcept; }; } namespace std __attribute__ ((__visibility__ ("default"))) { class error_code; class error_condition; class system_error; template<typename _Tp> struct is_error_code_enum : public false_type { }; template<typename _Tp> struct is_error_condition_enum : public false_type { }; template<> struct is_error_condition_enum<errc> : public true_type { }; template <typename _Tp> inline constexpr bool is_error_code_enum_v = is_error_code_enum<_Tp>::value; template <typename _Tp> inline constexpr bool is_error_condition_enum_v = is_error_condition_enum<_Tp>::value; inline namespace _V2 { class error_category { public: constexpr error_category() noexcept = default; virtual ~error_category(); error_category(const error_category&) = delete; error_category& operator=(const error_category&) = delete; virtual const char* name() const noexcept = 0; private: __attribute ((__abi_tag__ ("cxx11"))) virtual __cow_string _M_message(int) const; public: __attribute ((__abi_tag__ ("cxx11"))) virtual string message(int) const = 0; public: virtual error_condition default_error_condition(int __i) const noexcept; virtual bool equivalent(int __i, const error_condition& __cond) const noexcept; virtual bool equivalent(const error_code& __code, int __i) const noexcept; [[__nodiscard__]] bool operator==(const error_category& __other) const noexcept ; [[nodiscard]] strong_ordering operator<=>(const error_category& __rhs) const noexcept ; }; [[__nodiscard__, __gnu__::__const__]] const error_category& generic_category() noexcept; [[__nodiscard__, __gnu__::__const__]] const error_category& system_category() noexcept; } namespace __adl_only { void make_error_code() = delete; void make_error_condition() = delete; } class error_code { template<typename _ErrorCodeEnum> using _Check = __enable_if_t<is_error_code_enum<_ErrorCodeEnum>::value>; public: error_code() ; error_code(int __v, const error_category& __cat) ; template<typename _ErrorCodeEnum, typename = _Check<_ErrorCodeEnum>> error_code(_ErrorCodeEnum __e) noexcept ; error_code(const error_code&) = default; error_code& operator=(const error_code&) = default; void assign(int __v, const error_category& __cat) noexcept ; void clear() noexcept ; [[__nodiscard__]] int value() const noexcept ; [[__nodiscard__]] const error_category& category() const noexcept ; error_condition default_error_condition() const noexcept; __attribute ((__abi_tag__ ("cxx11"))) string message() const ; [[__nodiscard__]] explicit operator bool() const noexcept ; private: int _M_value; const error_category* _M_cat; }; [[__nodiscard__]] error_code make_error_code(errc __e) noexcept ; [[nodiscard]] strong_ordering operator<=>(const error_code& __lhs, const error_code& __rhs) noexcept ; template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e) ; class error_condition { template<typename _ErrorConditionEnum> using _Check = __enable_if_t<is_error_condition_enum<_ErrorConditionEnum>::value>; public: error_condition() ; error_condition(int __v, const error_category& __cat) ; template<typename _ErrorConditionEnum, typename = _Check<_ErrorConditionEnum>> error_condition(_ErrorConditionEnum __e) noexcept ; error_condition(const error_condition&) = default; error_condition& operator=(const error_condition&) = default; void assign(int __v, const error_category& __cat) noexcept ; void clear() noexcept ; [[__nodiscard__]] int value() const noexcept ; [[__nodiscard__]] const error_category& category() const noexcept ; __attribute ((__abi_tag__ ("cxx11"))) string message() const ; [[__nodiscard__]] explicit operator bool() const noexcept ; private: int _M_value; const error_category* _M_cat; }; [[__nodiscard__]] error_condition make_error_condition(errc __e) noexcept ; [[__nodiscard__]] bool operator==(const error_code& __lhs, const error_code& __rhs) noexcept ; [[__nodiscard__]] bool operator==(const error_code& __lhs, const error_condition& __rhs) noexcept ; [[__nodiscard__]] bool operator==(const error_condition& __lhs, const error_condition& __rhs) noexcept ; [[nodiscard]] strong_ordering operator<=>(const error_condition& __lhs, const error_condition& __rhs) noexcept ; class system_error : public std::runtime_error { private: error_code _M_code; public: system_error(error_code __ec = error_code()) ; system_error(error_code __ec, const string& __what) ; system_error(error_code __ec, const char* __what) ; system_error(int __v, const error_category& __ecat, const char* __what) ; system_error(int __v, const error_category& __ecat) ; system_error(int __v, const error_category& __ecat, const string& __what) ; system_error (const system_error &) = default; system_error &operator= (const system_error &) = default; virtual ~system_error() noexcept; const error_code& code() const noexcept ; }; } namespace std __attribute__ ((__visibility__ ("default"))) { template<> struct hash<error_code> : public __hash_base<size_t, error_code> { size_t operator()(const error_code& __e) const noexcept ; }; template<> struct hash<error_condition> : public __hash_base<size_t, error_condition> { size_t operator()(const error_condition& __e) const noexcept ; }; } namespace std __attribute__ ((__visibility__ ("default"))) { enum _Ios_Fmtflags { _S_boolalpha = 1L << 0, _S_dec = 1L << 1, _S_fixed = 1L << 2, _S_hex = 1L << 3, _S_internal = 1L << 4, _S_left = 1L << 5, _S_oct = 1L << 6, _S_right = 1L << 7, _S_scientific = 1L << 8, _S_showbase = 1L << 9, _S_showpoint = 1L << 10, _S_showpos = 1L << 11, _S_skipws = 1L << 12, _S_unitbuf = 1L << 13, _S_uppercase = 1L << 14, _S_adjustfield = _S_left | _S_right | _S_internal, _S_basefield = _S_dec | _S_oct | _S_hex, _S_floatfield = _S_scientific | _S_fixed, _S_ios_fmtflags_end = 1L << 16, _S_ios_fmtflags_max = 2147483647, _S_ios_fmtflags_min = ~2147483647 }; constexpr _Ios_Fmtflags operator&(_Ios_Fmtflags __a, _Ios_Fmtflags __b) ; constexpr _Ios_Fmtflags operator|(_Ios_Fmtflags __a, _Ios_Fmtflags __b) ; constexpr _Ios_Fmtflags operator^(_Ios_Fmtflags __a, _Ios_Fmtflags __b) ; constexpr _Ios_Fmtflags operator~(_Ios_Fmtflags __a) ; const _Ios_Fmtflags& operator|=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) ; const _Ios_Fmtflags& operator&=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) ; const _Ios_Fmtflags& operator^=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) ; enum _Ios_Openmode { _S_app = 1L << 0, _S_ate = 1L << 1, _S_bin = 1L << 2, _S_in = 1L << 3, _S_out = 1L << 4, _S_trunc = 1L << 5, _S_noreplace = 1L << 6, _S_ios_openmode_end = 1L << 16, _S_ios_openmode_max = 2147483647, _S_ios_openmode_min = ~2147483647 }; constexpr _Ios_Openmode operator&(_Ios_Openmode __a, _Ios_Openmode __b) ; constexpr _Ios_Openmode operator|(_Ios_Openmode __a, _Ios_Openmode __b) ; constexpr _Ios_Openmode operator^(_Ios_Openmode __a, _Ios_Openmode __b) ; constexpr _Ios_Openmode operator~(_Ios_Openmode __a) ; const _Ios_Openmode& operator|=(_Ios_Openmode& __a, _Ios_Openmode __b) ; const _Ios_Openmode& operator&=(_Ios_Openmode& __a, _Ios_Openmode __b) ; const _Ios_Openmode& operator^=(_Ios_Openmode& __a, _Ios_Openmode __b) ; enum _Ios_Iostate { _S_goodbit = 0, _S_badbit = 1L << 0, _S_eofbit = 1L << 1, _S_failbit = 1L << 2, _S_ios_iostate_end = 1L << 16, _S_ios_iostate_max = 2147483647, _S_ios_iostate_min = ~2147483647 }; constexpr _Ios_Iostate operator&(_Ios_Iostate __a, _Ios_Iostate __b) ; constexpr _Ios_Iostate operator|(_Ios_Iostate __a, _Ios_Iostate __b) ; constexpr _Ios_Iostate operator^(_Ios_Iostate __a, _Ios_Iostate __b) ; constexpr _Ios_Iostate operator~(_Ios_Iostate __a) ; const _Ios_Iostate& operator|=(_Ios_Iostate& __a, _Ios_Iostate __b) ; const _Ios_Iostate& operator&=(_Ios_Iostate& __a, _Ios_Iostate __b) ; const _Ios_Iostate& operator^=(_Ios_Iostate& __a, _Ios_Iostate __b) ; enum _Ios_Seekdir { _S_beg = 0, _S_cur = 1, _S_end = 2, _S_ios_seekdir_end = 1L << 16 }; enum class io_errc { stream = 1 }; template <> struct is_error_code_enum<io_errc> : public true_type { }; [[__nodiscard__, __gnu__::__const__]] const error_category& iostream_category() noexcept; [[__nodiscard__]] error_code make_error_code(io_errc __e) noexcept ; [[__nodiscard__]] error_condition make_error_condition(io_errc __e) noexcept ; class ios_base { public: class __attribute ((__abi_tag__ ("cxx11"))) failure : public system_error { public: explicit failure(const string& __str); }; typedef _Ios_Fmtflags fmtflags; static const fmtflags boolalpha = _S_boolalpha; static const fmtflags dec = _S_dec; static const fmtflags fixed = _S_fixed; static const fmtflags hex = _S_hex; static const fmtflags internal = _S_internal; static const fmtflags left = _S_left; static const fmtflags oct = _S_oct; static const fmtflags right = _S_right; static const fmtflags scientific = _S_scientific; static const fmtflags showbase = _S_showbase; static const fmtflags showpoint = _S_showpoint; static const fmtflags showpos = _S_showpos; static const fmtflags skipws = _S_skipws; static const fmtflags unitbuf = _S_unitbuf; static const fmtflags uppercase = _S_uppercase; static const fmtflags adjustfield = _S_adjustfield; static const fmtflags basefield = _S_basefield; static const fmtflags floatfield = _S_floatfield; typedef _Ios_Iostate iostate; static const iostate badbit = _S_badbit; static const iostate eofbit = _S_eofbit; static const iostate failbit = _S_failbit; static const iostate goodbit = _S_goodbit; typedef _Ios_Openmode openmode; static const openmode app = _S_app; static const openmode ate = _S_ate; static const openmode binary = _S_bin; static const openmode in = _S_in; static const openmode out = _S_out; static const openmode trunc = _S_trunc; static const openmode __noreplace = _S_noreplace; typedef _Ios_Seekdir seekdir; static const seekdir beg = _S_beg; static const seekdir cur = _S_cur; static const seekdir end = _S_end; enum event { erase_event, imbue_event, copyfmt_event }; typedef void (*event_callback) (event __e, ios_base& __b, int __i); protected: streamsize _M_precision; streamsize _M_width; fmtflags _M_flags; iostate _M_exception; iostate _M_streambuf_state; struct _Callback_list { _Callback_list* _M_next; ios_base::event_callback _M_fn; int _M_index; _Atomic_word _M_refcount; }; _Callback_list* _M_callbacks; struct _Words { void* _M_pword; long _M_iword; }; _Words _M_word_zero; enum { _S_local_word_size = 8 }; _Words _M_local_word[_S_local_word_size]; int _M_word_size; _Words* _M_word; _Words& _M_grow_words(int __index, bool __iword); locale _M_ios_locale; public: class Init { friend class ios_base; public: private: static _Atomic_word _S_refcount; static bool _S_synced_with_stdio; }; fmtflags setf(fmtflags __fmtfl) ; fmtflags setf(fmtflags __fmtfl, fmtflags __mask) ; void unsetf(fmtflags __mask) ; protected: public: protected: }; } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _CharT, typename _Traits> streamsize __copy_streambufs_eof(basic_streambuf<_CharT, _Traits>*, basic_streambuf<_CharT, _Traits>*, bool&); template<typename _CharT, typename _Traits> class basic_streambuf { public: typedef _CharT char_type; typedef _Traits traits_type; typedef typename traits_type::int_type int_type; typedef typename traits_type::pos_type pos_type; typedef typename traits_type::off_type off_type; typedef basic_streambuf<char_type, traits_type> __streambuf_type; friend class basic_ios<char_type, traits_type>; friend class basic_istream<char_type, traits_type>; friend class basic_ostream<char_type, traits_type>; friend class istreambuf_iterator<char_type, traits_type>; friend class ostreambuf_iterator<char_type, traits_type>; friend streamsize __copy_streambufs_eof<>(basic_streambuf*, basic_streambuf*, bool&); ; ; ; ; ; protected: char_type* _M_in_beg; char_type* _M_in_cur; char_type* _M_in_end; char_type* _M_out_beg; char_type* _M_out_cur; char_type* _M_out_end; locale _M_buf_locale; public: locale getloc() const ; int_type sbumpc() ; int_type sgetc() ; protected: char_type* eback() const ; char_type* gptr() const ; char_type* egptr() const ; void gbump(int __n) ; char_type* pptr() const ; char_type* epptr() const ; void pbump(int __n) ; virtual void imbue(const locale& __loc __attribute__ ((__unused__))) ; virtual basic_streambuf<char_type,_Traits>* setbuf(char_type*, streamsize) ; virtual pos_type seekoff(off_type, ios_base::seekdir, ios_base::openmode = ios_base::in | ios_base::out) ; virtual pos_type seekpos(pos_type, ios_base::openmode = ios_base::in | ios_base::out) ; virtual int sync() ; virtual streamsize showmanyc() ; virtual streamsize xsgetn(char_type* __s, streamsize __n); virtual int_type underflow() ; virtual int_type uflow() ; virtual int_type pbackfail(int_type __c __attribute__ ((__unused__)) = traits_type::eof()) { return traits_type::eof(); } virtual streamsize xsputn(const char_type* __s, streamsize __n); virtual int_type overflow(int_type __c __attribute__ ((__unused__)) = traits_type::eof()) ; void __safe_gbump(streamsize __n) ; void __safe_pbump(streamsize __n) ; protected: }; template<> streamsize __copy_streambufs_eof(basic_streambuf<char>* __sbin, basic_streambuf<char>* __sbout, bool& __ineof); template<> streamsize __copy_streambufs_eof(basic_streambuf<wchar_t>* __sbin, basic_streambuf<wchar_t>* __sbout, bool& __ineof); } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _CharT, typename _Traits> streamsize __copy_streambufs_eof(basic_streambuf<_CharT, _Traits>* __sbin, basic_streambuf<_CharT, _Traits>* __sbout, bool& __ineof) ; extern template class basic_streambuf<char>;; extern template class basic_streambuf<wchar_t>;; } typedef unsigned long int wctype_t; enum { __ISwupper = 0, __ISwlower = 1, __ISwalpha = 2, __ISwdigit = 3, __ISwxdigit = 4, __ISwspace = 5, __ISwprint = 6, __ISwgraph = 7, __ISwblank = 8, __ISwcntrl = 9, __ISwpunct = 10, __ISwalnum = 11, _ISwupper = ((__ISwupper) < 8 ? (int) ((1UL << (__ISwupper)) << 24) : ((__ISwupper) < 16 ? (int) ((1UL << (__ISwupper)) << 8) : ((__ISwupper) < 24 ? (int) ((1UL << (__ISwupper)) >> 8) : (int) ((1UL << (__ISwupper)) >> 24)))), _ISwlower = ((__ISwlower) < 8 ? (int) ((1UL << (__ISwlower)) << 24) : ((__ISwlower) < 16 ? (int) ((1UL << (__ISwlower)) << 8) : ((__ISwlower) < 24 ? (int) ((1UL << (__ISwlower)) >> 8) : (int) ((1UL << (__ISwlower)) >> 24)))), _ISwalpha = ((__ISwalpha) < 8 ? (int) ((1UL << (__ISwalpha)) << 24) : ((__ISwalpha) < 16 ? (int) ((1UL << (__ISwalpha)) << 8) : ((__ISwalpha) < 24 ? (int) ((1UL << (__ISwalpha)) >> 8) : (int) ((1UL << (__ISwalpha)) >> 24)))), _ISwdigit = ((__ISwdigit) < 8 ? (int) ((1UL << (__ISwdigit)) << 24) : ((__ISwdigit) < 16 ? (int) ((1UL << (__ISwdigit)) << 8) : ((__ISwdigit) < 24 ? (int) ((1UL << (__ISwdigit)) >> 8) : (int) ((1UL << (__ISwdigit)) >> 24)))), _ISwxdigit = ((__ISwxdigit) < 8 ? (int) ((1UL << (__ISwxdigit)) << 24) : ((__ISwxdigit) < 16 ? (int) ((1UL << (__ISwxdigit)) << 8) : ((__ISwxdigit) < 24 ? (int) ((1UL << (__ISwxdigit)) >> 8) : (int) ((1UL << (__ISwxdigit)) >> 24)))), _ISwspace = ((__ISwspace) < 8 ? (int) ((1UL << (__ISwspace)) << 24) : ((__ISwspace) < 16 ? (int) ((1UL << (__ISwspace)) << 8) : ((__ISwspace) < 24 ? (int) ((1UL << (__ISwspace)) >> 8) : (int) ((1UL << (__ISwspace)) >> 24)))), _ISwprint = ((__ISwprint) < 8 ? (int) ((1UL << (__ISwprint)) << 24) : ((__ISwprint) < 16 ? (int) ((1UL << (__ISwprint)) << 8) : ((__ISwprint) < 24 ? (int) ((1UL << (__ISwprint)) >> 8) : (int) ((1UL << (__ISwprint)) >> 24)))), _ISwgraph = ((__ISwgraph) < 8 ? (int) ((1UL << (__ISwgraph)) << 24) : ((__ISwgraph) < 16 ? (int) ((1UL << (__ISwgraph)) << 8) : ((__ISwgraph) < 24 ? (int) ((1UL << (__ISwgraph)) >> 8) : (int) ((1UL << (__ISwgraph)) >> 24)))), _ISwblank = ((__ISwblank) < 8 ? (int) ((1UL << (__ISwblank)) << 24) : ((__ISwblank) < 16 ? (int) ((1UL << (__ISwblank)) << 8) : ((__ISwblank) < 24 ? (int) ((1UL << (__ISwblank)) >> 8) : (int) ((1UL << (__ISwblank)) >> 24)))), _ISwcntrl = ((__ISwcntrl) < 8 ? (int) ((1UL << (__ISwcntrl)) << 24) : ((__ISwcntrl) < 16 ? (int) ((1UL << (__ISwcntrl)) << 8) : ((__ISwcntrl) < 24 ? (int) ((1UL << (__ISwcntrl)) >> 8) : (int) ((1UL << (__ISwcntrl)) >> 24)))), _ISwpunct = ((__ISwpunct) < 8 ? (int) ((1UL << (__ISwpunct)) << 24) : ((__ISwpunct) < 16 ? (int) ((1UL << (__ISwpunct)) << 8) : ((__ISwpunct) < 24 ? (int) ((1UL << (__ISwpunct)) >> 8) : (int) ((1UL << (__ISwpunct)) >> 24)))), _ISwalnum = ((__ISwalnum) < 8 ? (int) ((1UL << (__ISwalnum)) << 24) : ((__ISwalnum) < 16 ? (int) ((1UL << (__ISwalnum)) << 8) : ((__ISwalnum) < 24 ? (int) ((1UL << (__ISwalnum)) >> 8) : (int) ((1UL << (__ISwalnum)) >> 24)))) }; extern "C" { ; ; ; ; ; ; ; ; ; ; ; extern int iswblank (wint_t __wc) noexcept (true); extern wctype_t wctype (const char *__property) noexcept (true); extern int iswctype (wint_t __wc, wctype_t __desc) noexcept (true); extern wint_t towlower (wint_t __wc) noexcept (true); extern wint_t towupper (wint_t __wc) noexcept (true); } extern "C" { typedef const __int32_t *wctrans_t; extern wctrans_t wctrans (const char *__property) noexcept (true); extern wint_t towctrans (wint_t __wc, wctrans_t __desc) noexcept (true); extern int iswalnum_l (wint_t __wc, locale_t __locale) noexcept (true); extern int iswalpha_l (wint_t __wc, locale_t __locale) noexcept (true); extern int iswcntrl_l (wint_t __wc, locale_t __locale) noexcept (true); extern int iswdigit_l (wint_t __wc, locale_t __locale) noexcept (true); extern int iswgraph_l (wint_t __wc, locale_t __locale) noexcept (true); extern int iswlower_l (wint_t __wc, locale_t __locale) noexcept (true); extern int iswprint_l (wint_t __wc, locale_t __locale) noexcept (true); extern int iswpunct_l (wint_t __wc, locale_t __locale) noexcept (true); extern int iswspace_l (wint_t __wc, locale_t __locale) noexcept (true); extern int iswupper_l (wint_t __wc, locale_t __locale) noexcept (true); extern int iswxdigit_l (wint_t __wc, locale_t __locale) noexcept (true); extern int iswblank_l (wint_t __wc, locale_t __locale) noexcept (true); extern wctype_t wctype_l (const char *__property, locale_t __locale) noexcept (true); extern int iswctype_l (wint_t __wc, wctype_t __desc, locale_t __locale) noexcept (true); extern wint_t towlower_l (wint_t __wc, locale_t __locale) noexcept (true); extern wint_t towupper_l (wint_t __wc, locale_t __locale) noexcept (true); extern wctrans_t wctrans_l (const char *__property, locale_t __locale) noexcept (true); extern wint_t towctrans_l (wint_t __wc, wctrans_t __desc, locale_t __locale) noexcept (true); } namespace std { using ::wctrans_t; using ::wctype_t; using ::wint_t; using ::iswblank; using ::iswctype; using ::towctrans; using ::towlower; using ::towupper; using ::wctrans; using ::wctype; } namespace std __attribute__ ((__visibility__ ("default"))) { struct ctype_base { typedef const int* __to_type; typedef unsigned short mask; static const mask upper = _ISupper; static const mask lower = _ISlower; static const mask alpha = _ISalpha; static const mask digit = _ISdigit; static const mask xdigit = _ISxdigit; static const mask space = _ISspace; static const mask print = _ISprint; static const mask graph = _ISalpha | _ISdigit | _ISpunct; static const mask cntrl = _IScntrl; static const mask punct = _ISpunct; static const mask alnum = _ISalpha | _ISdigit; static const mask blank = _ISblank; }; } namespace std __attribute__ ((__visibility__ ("default"))) { #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" template<typename _CharT, typename _Traits> class istreambuf_iterator : public iterator<input_iterator_tag, _CharT, typename _Traits::off_type, _CharT*, _CharT> { public: using pointer = void; typedef _CharT char_type; typedef _Traits traits_type; typedef typename _Traits::int_type int_type; typedef basic_streambuf<_CharT, _Traits> streambuf_type; typedef basic_istream<_CharT, _Traits> istream_type; template<typename _CharT2> friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, ostreambuf_iterator<_CharT2> >::__type copy(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, ostreambuf_iterator<_CharT2>); template<bool _IsMove, typename _CharT2> friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, _CharT2*>::__type __copy_move_a2(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, _CharT2*); template<typename _CharT2, typename _Size> friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, _CharT2*>::__type __copy_n_a(istreambuf_iterator<_CharT2>, _Size, _CharT2*, bool); template<typename _CharT2> friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, istreambuf_iterator<_CharT2> >::__type find(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, const _CharT2&); template<typename _CharT2, typename _Distance> friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, void>::__type advance(istreambuf_iterator<_CharT2>&, _Distance); private: mutable streambuf_type* _M_sbuf; int_type _M_c; public: constexpr istreambuf_iterator() ; constexpr istreambuf_iterator(default_sentinel_t) ; istreambuf_iterator(const istreambuf_iterator&) noexcept = default; ~istreambuf_iterator() = default; istreambuf_iterator(istream_type& __s) ; istreambuf_iterator(streambuf_type* __s) ; istreambuf_iterator& operator=(const istreambuf_iterator&) noexcept = default; [[__nodiscard__]] char_type operator*() const ; istreambuf_iterator& operator++() ; istreambuf_iterator operator++(int) ; [[__nodiscard__]] bool equal(const istreambuf_iterator& __b) const ; private: int_type _M_get() const ; bool _M_at_eof() const ; static bool _S_is_eof(int_type __c) ; [[nodiscard]] friend bool operator==(const istreambuf_iterator& __i, default_sentinel_t) { return __i._M_at_eof(); } }; template<typename _CharT, typename _Traits> [[__nodiscard__]] bool operator==(const istreambuf_iterator<_CharT, _Traits>& __a, const istreambuf_iterator<_CharT, _Traits>& __b) ; template<typename _CharT, typename _Traits> class ostreambuf_iterator : public iterator<output_iterator_tag, void, void, void, void> { public: using difference_type = ptrdiff_t; typedef _CharT char_type; typedef _Traits traits_type; typedef basic_streambuf<_CharT, _Traits> streambuf_type; typedef basic_ostream<_CharT, _Traits> ostream_type; template<typename _CharT2> friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, ostreambuf_iterator<_CharT2> >::__type copy(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, ostreambuf_iterator<_CharT2>); private: streambuf_type* _M_sbuf; bool _M_failed; public: constexpr ostreambuf_iterator() ; ostreambuf_iterator(ostream_type& __s) ; ostreambuf_iterator(streambuf_type* __s) ; ostreambuf_iterator& operator=(_CharT __c) ; [[__nodiscard__]] ostreambuf_iterator& operator*() ; ostreambuf_iterator& operator++(int) ; ostreambuf_iterator& operator++() ; [[__nodiscard__]] bool failed() const noexcept ; ostreambuf_iterator& _M_put(const _CharT* __ws, streamsize __len) ; }; #pragma GCC diagnostic pop template<typename _CharT> typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, ostreambuf_iterator<_CharT> >::__type copy(istreambuf_iterator<_CharT> __first, istreambuf_iterator<_CharT> __last, ostreambuf_iterator<_CharT> __result) ; template<bool _IsMove, typename _CharT> typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, ostreambuf_iterator<_CharT> >::__type __copy_move_a2(_CharT* __first, _CharT* __last, ostreambuf_iterator<_CharT> __result) ; template<bool _IsMove, typename _CharT> typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, ostreambuf_iterator<_CharT> >::__type __copy_move_a2(const _CharT* __first, const _CharT* __last, ostreambuf_iterator<_CharT> __result) ; template<bool _IsMove, typename _CharT> typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, _CharT*>::__type __copy_move_a2(istreambuf_iterator<_CharT> __first, istreambuf_iterator<_CharT> __last, _CharT* __result) ; template<typename _CharT, typename _Size> typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, _CharT*>::__type __copy_n_a(istreambuf_iterator<_CharT> __it, _Size __n, _CharT* __result, bool __strict __attribute__((__unused__))) ; template<typename _CharT> typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, istreambuf_iterator<_CharT> >::__type find(istreambuf_iterator<_CharT> __first, istreambuf_iterator<_CharT> __last, const _CharT& __val) ; template<typename _CharT, typename _Distance> typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, void>::__type advance(istreambuf_iterator<_CharT>& __i, _Distance __n) ; } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Tp> void __convert_to_v(const char*, _Tp&, ios_base::iostate&, const __c_locale&) throw(); template<> void __convert_to_v(const char*, float&, ios_base::iostate&, const __c_locale&) throw(); template<> void __convert_to_v(const char*, double&, ios_base::iostate&, const __c_locale&) throw(); template<> void __convert_to_v(const char*, long double&, ios_base::iostate&, const __c_locale&) throw(); template<typename _CharT, typename _Traits> struct __pad { static void _S_pad(ios_base& __io, _CharT __fill, _CharT* __news, const _CharT* __olds, streamsize __newlen, streamsize __oldlen); }; template<typename _CharT> _CharT* __add_grouping(_CharT* __s, _CharT __sep, const char* __gbeg, size_t __gsize, const _CharT* __first, const _CharT* __last); template<typename _CharT> ostreambuf_iterator<_CharT> __write(ostreambuf_iterator<_CharT> __s, const _CharT* __ws, int __len) ; template<typename _CharT, typename _OutIter> _OutIter __write(_OutIter __s, const _CharT* __ws, int __len) ; template<typename _CharT> class __ctype_abstract_base : public locale::facet, public ctype_base { public: typedef _CharT char_type; bool is(mask __m, char_type __c) const ; const char_type* is(const char_type *__lo, const char_type *__hi, mask *__vec) const ; const char_type* scan_is(mask __m, const char_type* __lo, const char_type* __hi) const ; const char_type* scan_not(mask __m, const char_type* __lo, const char_type* __hi) const ; char_type toupper(char_type __c) const ; const char_type* toupper(char_type *__lo, const char_type* __hi) const ; char_type tolower(char_type __c) const ; const char_type* tolower(char_type* __lo, const char_type* __hi) const ; char_type widen(char __c) const ; const char* widen(const char* __lo, const char* __hi, char_type* __to) const ; char narrow(char_type __c, char __dfault) const ; const char_type* narrow(const char_type* __lo, const char_type* __hi, char __dfault, char* __to) const ; protected: explicit __ctype_abstract_base(size_t __refs = 0) ; virtual ~__ctype_abstract_base() ; virtual bool do_is(mask __m, char_type __c) const = 0; virtual const char_type* do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const = 0; virtual const char_type* do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const = 0; virtual const char_type* do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const = 0; virtual char_type do_toupper(char_type __c) const = 0; virtual const char_type* do_toupper(char_type* __lo, const char_type* __hi) const = 0; virtual char_type do_tolower(char_type __c) const = 0; virtual const char_type* do_tolower(char_type* __lo, const char_type* __hi) const = 0; virtual char_type do_widen(char __c) const = 0; virtual const char* do_widen(const char* __lo, const char* __hi, char_type* __to) const = 0; virtual char do_narrow(char_type __c, char __dfault) const = 0; virtual const char_type* do_narrow(const char_type* __lo, const char_type* __hi, char __dfault, char* __to) const = 0; }; template<typename _CharT> class ctype : public __ctype_abstract_base<_CharT> { public: typedef _CharT char_type; typedef typename __ctype_abstract_base<_CharT>::mask mask; static locale::id id; explicit ctype(size_t __refs = 0) ; protected: virtual ~ctype(); virtual bool do_is(mask __m, char_type __c) const; virtual const char_type* do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const; virtual const char_type* do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const; virtual const char_type* do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const; virtual char_type do_toupper(char_type __c) const; virtual const char_type* do_toupper(char_type* __lo, const char_type* __hi) const; virtual char_type do_tolower(char_type __c) const; virtual const char_type* do_tolower(char_type* __lo, const char_type* __hi) const; virtual char_type do_widen(char __c) const; virtual const char* do_widen(const char* __lo, const char* __hi, char_type* __dest) const; virtual char do_narrow(char_type, char __dfault) const; virtual const char_type* do_narrow(const char_type* __lo, const char_type* __hi, char __dfault, char* __to) const; }; template<typename _CharT> locale::id ctype<_CharT>::id; template<typename _CharT, typename _Traits, typename _Alloc> class ctype<basic_string<_CharT, _Traits, _Alloc> >; template<> class ctype<char> : public locale::facet, public ctype_base { public: typedef char char_type; protected: __c_locale _M_c_locale_ctype; bool _M_del; __to_type _M_toupper; __to_type _M_tolower; const mask* _M_table; mutable char _M_widen_ok; mutable char _M_widen[1 + static_cast<unsigned char>(-1)]; mutable char _M_narrow[1 + static_cast<unsigned char>(-1)]; mutable char _M_narrow_ok; public: static locale::id id; static const size_t table_size = 1 + static_cast<unsigned char>(-1); explicit ctype(const mask* __table = 0, bool __del = false, size_t __refs = 0); explicit ctype(__c_locale __cloc, const mask* __table = 0, bool __del = false, size_t __refs = 0); inline bool is(mask __m, char __c) const; inline const char* is(const char* __lo, const char* __hi, mask* __vec) const; inline const char* scan_is(mask __m, const char* __lo, const char* __hi) const; inline const char* scan_not(mask __m, const char* __lo, const char* __hi) const; char_type toupper(char_type __c) const ; const char_type* toupper(char_type *__lo, const char_type* __hi) const ; char_type tolower(char_type __c) const ; const char_type* tolower(char_type* __lo, const char_type* __hi) const ; char_type widen(char __c) const ; const char* widen(const char* __lo, const char* __hi, char_type* __to) const ; char narrow(char_type __c, char __dfault) const ; const char_type* narrow(const char_type* __lo, const char_type* __hi, char __dfault, char* __to) const ; const mask* table() const throw() ; static const mask* classic_table() throw(); protected: virtual ~ctype(); virtual char_type do_toupper(char_type __c) const; virtual const char_type* do_toupper(char_type* __lo, const char_type* __hi) const; virtual char_type do_tolower(char_type __c) const; virtual const char_type* do_tolower(char_type* __lo, const char_type* __hi) const; virtual char_type do_widen(char __c) const ; virtual const char* do_widen(const char* __lo, const char* __hi, char_type* __to) const ; virtual char do_narrow(char_type __c, char __dfault __attribute__((__unused__))) const ; virtual const char_type* do_narrow(const char_type* __lo, const char_type* __hi, char __dfault __attribute__((__unused__)), char* __to) const ; private: void _M_narrow_init() const; void _M_widen_init() const; }; template<> class ctype<wchar_t> : public __ctype_abstract_base<wchar_t> { public: typedef wchar_t char_type; typedef wctype_t __wmask_type; protected: __c_locale _M_c_locale_ctype; bool _M_narrow_ok; char _M_narrow[128]; wint_t _M_widen[1 + static_cast<unsigned char>(-1)]; mask _M_bit[16]; __wmask_type _M_wmask[16]; public: static locale::id id; explicit ctype(size_t __refs = 0); explicit ctype(__c_locale __cloc, size_t __refs = 0); protected: __wmask_type _M_convert_to_wmask(const mask __m) const throw(); virtual ~ctype(); virtual bool do_is(mask __m, char_type __c) const; virtual const char_type* do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const; virtual const char_type* do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const; virtual const char_type* do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const; virtual char_type do_toupper(char_type __c) const; virtual const char_type* do_toupper(char_type* __lo, const char_type* __hi) const; virtual char_type do_tolower(char_type __c) const; virtual const char_type* do_tolower(char_type* __lo, const char_type* __hi) const; virtual char_type do_widen(char __c) const; virtual const char* do_widen(const char* __lo, const char* __hi, char_type* __to) const; virtual char do_narrow(char_type __c, char __dfault) const; virtual const char_type* do_narrow(const char_type* __lo, const char_type* __hi, char __dfault, char* __to) const; void _M_initialize_ctype() throw(); }; template<typename _CharT> class ctype_byname : public ctype<_CharT> { public: typedef typename ctype<_CharT>::mask mask; explicit ctype_byname(const char* __s, size_t __refs = 0); explicit ctype_byname(const string& __s, size_t __refs = 0) ; protected: virtual ~ctype_byname() ; }; template<> class ctype_byname<char> : public ctype<char> { public: explicit ctype_byname(const char* __s, size_t __refs = 0); explicit ctype_byname(const string& __s, size_t __refs = 0); protected: virtual ~ctype_byname(); }; template<> class ctype_byname<wchar_t> : public ctype<wchar_t> { public: explicit ctype_byname(const char* __s, size_t __refs = 0); explicit ctype_byname(const string& __s, size_t __refs = 0); protected: virtual ~ctype_byname(); }; } namespace std __attribute__ ((__visibility__ ("default"))) { } namespace std __attribute__ ((__visibility__ ("default"))) { class __num_base { public: enum { _S_ominus, _S_oplus, _S_ox, _S_oX, _S_odigits, _S_odigits_end = _S_odigits + 16, _S_oudigits = _S_odigits_end, _S_oudigits_end = _S_oudigits + 16, _S_oe = _S_odigits + 14, _S_oE = _S_oudigits + 14, _S_oend = _S_oudigits_end }; static const char* _S_atoms_out; static const char* _S_atoms_in; enum { _S_iminus, _S_iplus, _S_ix, _S_iX, _S_izero, _S_ie = _S_izero + 14, _S_iE = _S_izero + 20, _S_iend = 26 }; static void _S_format_float(const ios_base& __io, char* __fptr, char __mod) throw(); }; template<typename _CharT> struct __numpunct_cache : public locale::facet { const char* _M_grouping; size_t _M_grouping_size; bool _M_use_grouping; const _CharT* _M_truename; size_t _M_truename_size; const _CharT* _M_falsename; size_t _M_falsename_size; _CharT _M_decimal_point; _CharT _M_thousands_sep; _CharT _M_atoms_out[__num_base::_S_oend]; _CharT _M_atoms_in[__num_base::_S_iend]; bool _M_allocated; __numpunct_cache(size_t __refs = 0) ; ~__numpunct_cache(); void _M_cache(const locale& __loc); private: __numpunct_cache& operator=(const __numpunct_cache&); explicit __numpunct_cache(const __numpunct_cache&); }; namespace __cxx11 { template<typename _CharT> class numpunct : public locale::facet { public: typedef _CharT char_type; typedef basic_string<_CharT> string_type; typedef __numpunct_cache<_CharT> __cache_type; protected: __cache_type* _M_data; public: static locale::id id; explicit numpunct(size_t __refs = 0) ; explicit numpunct(__cache_type* __cache, size_t __refs = 0) ; explicit numpunct(__c_locale __cloc, size_t __refs = 0) ; char_type decimal_point() const ; char_type thousands_sep() const ; string grouping() const ; string_type truename() const ; string_type falsename() const ; protected: virtual ~numpunct(); virtual char_type do_decimal_point() const ; virtual char_type do_thousands_sep() const ; virtual string do_grouping() const ; virtual string_type do_truename() const ; virtual string_type do_falsename() const ; }; template<typename _CharT> locale::id numpunct<_CharT>::id; template<> numpunct<char>::~numpunct(); template<> numpunct<wchar_t>::~numpunct(); template<typename _CharT> class numpunct_byname : public numpunct<_CharT> { public: typedef _CharT char_type; typedef basic_string<_CharT> string_type; protected: }; } template<typename _CharT, typename _InIter> class num_get : public locale::facet { public: typedef _CharT char_type; typedef _InIter iter_type; static locale::id id; protected: ; }; template<typename _CharT, typename _InIter> locale::id num_get<_CharT, _InIter>::id; template<typename _CharT, typename _OutIter> class num_put : public locale::facet { public: typedef _CharT char_type; typedef _OutIter iter_type; static locale::id id; protected: ; ; }; template <typename _CharT, typename _OutIter> locale::id num_put<_CharT, _OutIter>::id; template<typename _CharT> bool isspace(_CharT __c, const locale& __loc) ; template<typename _CharT> bool isprint(_CharT __c, const locale& __loc) ; template<typename _CharT> bool iscntrl(_CharT __c, const locale& __loc) ; template<typename _CharT> bool isupper(_CharT __c, const locale& __loc) ; template<typename _CharT> bool islower(_CharT __c, const locale& __loc) ; template<typename _CharT> bool isalpha(_CharT __c, const locale& __loc) ; template<typename _CharT> bool isdigit(_CharT __c, const locale& __loc) ; template<typename _CharT> bool ispunct(_CharT __c, const locale& __loc) ; template<typename _CharT> bool isxdigit(_CharT __c, const locale& __loc) ; template<typename _CharT> bool isalnum(_CharT __c, const locale& __loc) ; template<typename _CharT> bool isgraph(_CharT __c, const locale& __loc) ; template<typename _CharT> bool isblank(_CharT __c, const locale& __loc) ; template<typename _CharT> _CharT toupper(_CharT __c, const locale& __loc) ; template<typename _CharT> _CharT tolower(_CharT __c, const locale& __loc) ; } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Facet> struct __use_cache { }; template<typename _CharT> struct __use_cache<__numpunct_cache<_CharT> > { }; ; template<typename _CharT> _CharT* __add_grouping(_CharT* __s, _CharT __sep, const char* __gbeg, size_t __gsize, const _CharT* __first, const _CharT* __last) ; extern template class __cxx11:: numpunct<char>; extern template class __cxx11:: numpunct_byname<char>; extern template class num_get<char>; extern template class num_put<char>; extern template class ctype_byname<char>; extern template const ctype<char>* __try_use_facet<ctype<char> >(const locale&) noexcept; extern template const numpunct<char>* __try_use_facet<numpunct<char> >(const locale&) noexcept; extern template const num_put<char>* __try_use_facet<num_put<char> >(const locale&) noexcept; extern template const num_get<char>* __try_use_facet<num_get<char> >(const locale&) noexcept; extern template const ctype<char>& use_facet<ctype<char> >(const locale&); extern template const numpunct<char>& use_facet<numpunct<char> >(const locale&); extern template const num_put<char>& use_facet<num_put<char> >(const locale&); extern template const num_get<char>& use_facet<num_get<char> >(const locale&); extern template bool has_facet<ctype<char> >(const locale&); extern template bool has_facet<numpunct<char> >(const locale&); extern template bool has_facet<num_put<char> >(const locale&); extern template bool has_facet<num_get<char> >(const locale&); extern template class __cxx11:: numpunct<wchar_t>; extern template class __cxx11:: numpunct_byname<wchar_t>; extern template class num_get<wchar_t>; extern template class num_put<wchar_t>; extern template class ctype_byname<wchar_t>; extern template const ctype<wchar_t>* __try_use_facet<ctype<wchar_t> >(const locale&) noexcept; extern template const numpunct<wchar_t>* __try_use_facet<numpunct<wchar_t> >(const locale&) noexcept; extern template const num_put<wchar_t>* __try_use_facet<num_put<wchar_t> >(const locale&) noexcept; extern template const num_get<wchar_t>* __try_use_facet<num_get<wchar_t> >(const locale&) noexcept; extern template const ctype<wchar_t>& use_facet<ctype<wchar_t> >(const locale&); extern template const numpunct<wchar_t>& use_facet<numpunct<wchar_t> >(const locale&); extern template const num_put<wchar_t>& use_facet<num_put<wchar_t> >(const locale&); extern template const num_get<wchar_t>& use_facet<num_get<wchar_t> >(const locale&); extern template bool has_facet<ctype<wchar_t> >(const locale&); extern template bool has_facet<numpunct<wchar_t> >(const locale&); extern template bool has_facet<num_put<wchar_t> >(const locale&); extern template bool has_facet<num_get<wchar_t> >(const locale&); } namespace std __attribute__ ((__visibility__ ("default"))) { ; template<typename _CharT, typename _Traits> class basic_ios : public ios_base { public: typedef _CharT char_type; typedef typename _Traits::int_type int_type; typedef typename _Traits::pos_type pos_type; typedef typename _Traits::off_type off_type; typedef _Traits traits_type; typedef ctype<_CharT> __ctype_type; typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> > __num_put_type; typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> > __num_get_type; protected: basic_ostream<_CharT, _Traits>* _M_tie; mutable char_type _M_fill; mutable bool _M_fill_init; basic_streambuf<_CharT, _Traits>* _M_streambuf; const __ctype_type* _M_ctype; const __num_put_type* _M_num_put; const __num_get_type* _M_num_get; public: protected: }; } namespace std __attribute__ ((__visibility__ ("default"))) { extern template class basic_ios<char>; extern template class basic_ios<wchar_t>; } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _CharT, typename _Traits> class basic_ostream : virtual public basic_ios<_CharT, _Traits> { public: typedef _CharT char_type; typedef typename _Traits::int_type int_type; typedef typename _Traits::pos_type pos_type; typedef typename _Traits::off_type off_type; typedef _Traits traits_type; typedef basic_streambuf<_CharT, _Traits> __streambuf_type; typedef basic_ios<_CharT, _Traits> __ios_type; typedef basic_ostream<_CharT, _Traits> __ostream_type; typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> > __num_put_type; typedef ctype<_CharT> __ctype_type; class sentry; friend class sentry; __ostream_type& operator<<(unsigned int __n) ; protected: ; private: }; template <typename _CharT, typename _Traits> class basic_ostream<_CharT, _Traits>::sentry { bool _M_ok; basic_ostream<_CharT, _Traits>& _M_os; public: #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" #pragma GCC diagnostic pop }; ; ; template<typename _Traits> basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>& __out, char __c) ; ; ; ; ; ; ; ; ; ; ; ; template<typename _Traits> basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>& __out, const char* __s) ; ; ; ; ; ; ; ; ; ; ; ; ; template<typename _Tp> concept __derived_from_ios_base = is_class_v<_Tp> && (!is_same_v<_Tp, ios_base>) && requires (_Tp* __t, ios_base* __b) { __b = __t; }; template<typename _Os, typename _Tp> requires __derived_from_ios_base<_Os> using __rvalue_stream_insertion_t = _Os&&; ; template<typename _CharT, typename _Traits> class __syncbuf_base : public basic_streambuf<_CharT, _Traits> { public: protected: basic_streambuf<_CharT, _Traits>* _M_wrapped = nullptr; bool _M_emit_on_sync = false; bool _M_needs_sync = false; }; ; ; ; } namespace std __attribute__ ((__visibility__ ("default"))) { ; extern template class basic_ostream<char>;;;; extern template ostream& operator<<(ostream&, char);;; extern template ostream& operator<<(ostream&, const char*);;;;;;;;;;; extern template class basic_ostream<wchar_t>;;;;;;;;;;;;;;;; } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _CharT, typename _Traits> class basic_istream : virtual public basic_ios<_CharT, _Traits> { public: typedef _CharT char_type; typedef typename _Traits::int_type int_type; typedef typename _Traits::pos_type pos_type; typedef typename _Traits::off_type off_type; typedef _Traits traits_type; typedef basic_streambuf<_CharT, _Traits> __streambuf_type; typedef basic_ios<_CharT, _Traits> __ios_type; typedef basic_istream<_CharT, _Traits> __istream_type; typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> > __num_get_type; typedef ctype<_CharT> __ctype_type; protected: streamsize _M_gcount; public: class sentry; friend class sentry; protected: ; }; template<typename _CharT, typename _Traits> class basic_istream<_CharT, _Traits>::sentry { bool _M_ok; public: typedef _Traits traits_type; typedef basic_streambuf<_CharT, _Traits> __streambuf_type; typedef basic_istream<_CharT, _Traits> __istream_type; typedef typename __istream_type::__ctype_type __ctype_type; typedef typename _Traits::int_type __int_type; }; ; ; ; ; ; ; ; template<typename _CharT, typename _Traits> class basic_iostream : public basic_istream<_CharT, _Traits>, public basic_ostream<_CharT, _Traits> { public: typedef _CharT char_type; typedef typename _Traits::int_type int_type; typedef typename _Traits::pos_type pos_type; typedef typename _Traits::off_type off_type; typedef _Traits traits_type; typedef basic_istream<_CharT, _Traits> __istream_type; typedef basic_ostream<_CharT, _Traits> __ostream_type; protected: }; ; template<typename _Is, typename _Tp> requires __derived_from_ios_base<_Is> && requires (_Is& __is, _Tp&& __t) { __is >> std::forward<_Tp>(__t); } using __rvalue_stream_extraction_t = _Is&&; ; } namespace std __attribute__ ((__visibility__ ("default"))) { ; ; ; extern template class basic_istream<char>;;;;;;;;;;;;;;;; extern template class basic_iostream<char>; extern template class basic_istream<wchar_t>;;;;;;;;;;;;;;; extern template class basic_iostream<wchar_t>; } namespace std __attribute__ ((__visibility__ ("default"))) { namespace __cxx11 { template<typename _CharT, typename _Traits, typename _Alloc> class basic_stringbuf : public basic_streambuf<_CharT, _Traits> { struct __xfer_bufptrs; using allocator_traits = std::allocator_traits<_Alloc>; using _Noexcept_swap = __or_<typename allocator_traits::propagate_on_container_swap, typename allocator_traits::is_always_equal>; public: typedef _CharT char_type; typedef _Traits traits_type; typedef _Alloc allocator_type; typedef typename traits_type::int_type int_type; typedef typename traits_type::pos_type pos_type; typedef typename traits_type::off_type off_type; typedef basic_streambuf<char_type, traits_type> __streambuf_type; typedef basic_string<char_type, _Traits, _Alloc> __string_type; typedef typename __string_type::size_type __size_type; protected: ios_base::openmode _M_mode; __string_type _M_string; public: ; ; ; ; ; protected: private: struct __xfer_bufptrs { basic_stringbuf* _M_to; off_type _M_goff[3]; off_type _M_poff[3]; }; }; template<typename _CharT, typename _Traits, typename _Alloc> class basic_istringstream : public basic_istream<_CharT, _Traits> { public: typedef _CharT char_type; typedef _Traits traits_type; typedef _Alloc allocator_type; typedef typename traits_type::int_type int_type; typedef typename traits_type::pos_type pos_type; typedef typename traits_type::off_type off_type; typedef basic_string<_CharT, _Traits, _Alloc> __string_type; typedef basic_stringbuf<_CharT, _Traits, _Alloc> __stringbuf_type; typedef basic_istream<char_type, traits_type> __istream_type; private: __stringbuf_type _M_stringbuf; public: ; ; ; ; ; }; template <typename _CharT, typename _Traits, typename _Alloc> class basic_ostringstream : public basic_ostream<_CharT, _Traits> { public: typedef _CharT char_type; typedef _Traits traits_type; typedef _Alloc allocator_type; typedef typename traits_type::int_type int_type; typedef typename traits_type::pos_type pos_type; typedef typename traits_type::off_type off_type; typedef basic_string<_CharT, _Traits, _Alloc> __string_type; typedef basic_stringbuf<_CharT, _Traits, _Alloc> __stringbuf_type; typedef basic_ostream<char_type, traits_type> __ostream_type; private: __stringbuf_type _M_stringbuf; public: basic_ostringstream() ; ~basic_ostringstream() ; ; ; ; __string_type str() const & ; ; __string_type str() && ; ; }; template <typename _CharT, typename _Traits, typename _Alloc> class basic_stringstream : public basic_iostream<_CharT, _Traits> { public: typedef _CharT char_type; typedef _Traits traits_type; typedef _Alloc allocator_type; typedef typename traits_type::int_type int_type; typedef typename traits_type::pos_type pos_type; typedef typename traits_type::off_type off_type; typedef basic_string<_CharT, _Traits, _Alloc> __string_type; typedef basic_stringbuf<_CharT, _Traits, _Alloc> __stringbuf_type; typedef basic_iostream<char_type, traits_type> __iostream_type; private: __stringbuf_type _M_stringbuf; public: ; ; ; __string_type str() const & ; template<__allocator_like _SAlloc> basic_string<_CharT, _Traits, _SAlloc> str(const _SAlloc& __sa) const ; __string_type str() && ; basic_string_view<char_type, traits_type> view() const noexcept ; void str(const __string_type& __s) ; template<__allocator_like _SAlloc> requires (!is_same_v<_SAlloc, _Alloc>) void str(const basic_string<_CharT, _Traits, _SAlloc>& __s) ; void str(__string_type&& __s) ; }; template <class _CharT, class _Traits, class _Allocator> void swap(basic_stringbuf<_CharT, _Traits, _Allocator>& __x, basic_stringbuf<_CharT, _Traits, _Allocator>& __y) noexcept(noexcept(__x.swap(__y))) ; template <class _CharT, class _Traits, class _Allocator> void swap(basic_istringstream<_CharT, _Traits, _Allocator>& __x, basic_istringstream<_CharT, _Traits, _Allocator>& __y) ; template <class _CharT, class _Traits, class _Allocator> void swap(basic_ostringstream<_CharT, _Traits, _Allocator>& __x, basic_ostringstream<_CharT, _Traits, _Allocator>& __y) ; template <class _CharT, class _Traits, class _Allocator> void swap(basic_stringstream<_CharT, _Traits, _Allocator>& __x, basic_stringstream<_CharT, _Traits, _Allocator>& __y) ; } } namespace std __attribute__ ((__visibility__ ("default"))) { extern template class basic_stringbuf<char>; extern template class basic_istringstream<char>; extern template class basic_ostringstream<char>; extern template class basic_stringstream<char>; extern template class basic_stringbuf<wchar_t>; extern template class basic_istringstream<wchar_t>; extern template class basic_ostringstream<wchar_t>; extern template class basic_stringstream<wchar_t>; } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _ValueType, typename _Tp> constexpr bool __check_constructible() ; template<typename _InputIterator, typename _ForwardIterator> constexpr _ForwardIterator __do_uninit_copy(_InputIterator __first, _InputIterator __last, _ForwardIterator __result) ; template<bool _TrivialValueTypes> struct __uninitialized_copy { template<typename _InputIterator, typename _ForwardIterator> static _ForwardIterator __uninit_copy(_InputIterator __first, _InputIterator __last, _ForwardIterator __result) ; }; template<> struct __uninitialized_copy<true> { template<typename _InputIterator, typename _ForwardIterator> static _ForwardIterator __uninit_copy(_InputIterator __first, _InputIterator __last, _ForwardIterator __result) ; }; template<typename _InputIterator, typename _ForwardIterator> _ForwardIterator uninitialized_copy(_InputIterator __first, _InputIterator __last, _ForwardIterator __result) ; template<typename _ForwardIterator, typename _Tp> constexpr void __do_uninit_fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __x) ; template<bool _TrivialValueType> struct __uninitialized_fill { template<typename _ForwardIterator, typename _Tp> static void __uninit_fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __x) ; }; template<> struct __uninitialized_fill<true> { template<typename _ForwardIterator, typename _Tp> static void __uninit_fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __x) ; }; template<typename _ForwardIterator, typename _Tp> void uninitialized_fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __x) ; template<typename _ForwardIterator, typename _Size, typename _Tp> constexpr _ForwardIterator __do_uninit_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __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) ; }; 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) ; }; template<typename _ForwardIterator, typename _Size, typename _Tp> _ForwardIterator uninitialized_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __x) ; template<typename _InputIterator, typename _ForwardIterator, typename _Allocator> constexpr _ForwardIterator __uninitialized_copy_a(_InputIterator __first, _InputIterator __last, _ForwardIterator __result, _Allocator& __alloc) ; template<typename _InputIterator, typename _ForwardIterator, typename _Tp> constexpr _ForwardIterator __uninitialized_copy_a(_InputIterator __first, _InputIterator __last, _ForwardIterator __result, allocator<_Tp>&) ; template<typename _InputIterator, typename _ForwardIterator, typename _Allocator> constexpr _ForwardIterator __uninitialized_move_a(_InputIterator __first, _InputIterator __last, _ForwardIterator __result, _Allocator& __alloc) ; template<typename _InputIterator, typename _ForwardIterator, typename _Allocator> constexpr _ForwardIterator __uninitialized_move_if_noexcept_a(_InputIterator __first, _InputIterator __last, _ForwardIterator __result, _Allocator& __alloc) ; template<typename _ForwardIterator, typename _Tp, typename _Allocator> constexpr void __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __x, _Allocator& __alloc) ; template<typename _ForwardIterator, typename _Tp, typename _Tp2> constexpr void __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __x, allocator<_Tp2>&) ; template<typename _ForwardIterator, typename _Size, typename _Tp, typename _Allocator> constexpr _ForwardIterator __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n, const _Tp& __x, _Allocator& __alloc) ; template<typename _ForwardIterator, typename _Size, typename _Tp, typename _Tp2> constexpr _ForwardIterator __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n, const _Tp& __x, allocator<_Tp2>&) ; template<typename _InputIterator1, typename _InputIterator2, typename _ForwardIterator, typename _Allocator> _ForwardIterator __uninitialized_copy_move(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _ForwardIterator __result, _Allocator& __alloc) ; template<typename _InputIterator1, typename _InputIterator2, typename _ForwardIterator, typename _Allocator> _ForwardIterator __uninitialized_move_copy(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _ForwardIterator __result, _Allocator& __alloc) ; template<typename _ForwardIterator, typename _Tp, typename _InputIterator, typename _Allocator> _ForwardIterator __uninitialized_fill_move(_ForwardIterator __result, _ForwardIterator __mid, const _Tp& __x, _InputIterator __first, _InputIterator __last, _Allocator& __alloc) ; template<typename _InputIterator, typename _ForwardIterator, typename _Tp, typename _Allocator> void __uninitialized_move_fill(_InputIterator __first1, _InputIterator __last1, _ForwardIterator __first2, _ForwardIterator __last2, const _Tp& __x, _Allocator& __alloc) ; template<bool _TrivialValueType> struct __uninitialized_default_1 { template<typename _ForwardIterator> static void __uninit_default(_ForwardIterator __first, _ForwardIterator __last) ; }; template<> struct __uninitialized_default_1<true> { template<typename _ForwardIterator> static void __uninit_default(_ForwardIterator __first, _ForwardIterator __last) ; }; template<bool _TrivialValueType> struct __uninitialized_default_n_1 { template<typename _ForwardIterator, typename _Size> constexpr static _ForwardIterator __uninit_default_n(_ForwardIterator __first, _Size __n) ; }; template<> struct __uninitialized_default_n_1<true> { template<typename _ForwardIterator, typename _Size> constexpr static _ForwardIterator __uninit_default_n(_ForwardIterator __first, _Size __n) ; }; template<typename _ForwardIterator> void __uninitialized_default(_ForwardIterator __first, _ForwardIterator __last) ; template<typename _ForwardIterator, typename _Size> constexpr _ForwardIterator __uninitialized_default_n(_ForwardIterator __first, _Size __n) ; template<typename _ForwardIterator, typename _Allocator> void __uninitialized_default_a(_ForwardIterator __first, _ForwardIterator __last, _Allocator& __alloc) ; template<typename _ForwardIterator, typename _Tp> void __uninitialized_default_a(_ForwardIterator __first, _ForwardIterator __last, allocator<_Tp>&) ; template<typename _ForwardIterator, typename _Size, typename _Allocator> constexpr _ForwardIterator __uninitialized_default_n_a(_ForwardIterator __first, _Size __n, _Allocator& __alloc) ; template<typename _ForwardIterator, typename _Size, typename _Tp> constexpr _ForwardIterator __uninitialized_default_n_a(_ForwardIterator __first, _Size __n, allocator<_Tp>&) ; template<bool _TrivialValueType> struct __uninitialized_default_novalue_1 { template<typename _ForwardIterator> static void __uninit_default_novalue(_ForwardIterator __first, _ForwardIterator __last) ; }; template<> struct __uninitialized_default_novalue_1<true> { template<typename _ForwardIterator> static void __uninit_default_novalue(_ForwardIterator, _ForwardIterator) ; }; template<bool _TrivialValueType> struct __uninitialized_default_novalue_n_1 { template<typename _ForwardIterator, typename _Size> static _ForwardIterator __uninit_default_novalue_n(_ForwardIterator __first, _Size __n) ; }; template<> struct __uninitialized_default_novalue_n_1<true> { template<typename _ForwardIterator, typename _Size> static _ForwardIterator __uninit_default_novalue_n(_ForwardIterator __first, _Size __n) ; }; template<typename _ForwardIterator> void __uninitialized_default_novalue(_ForwardIterator __first, _ForwardIterator __last) ; template<typename _ForwardIterator, typename _Size> _ForwardIterator __uninitialized_default_novalue_n(_ForwardIterator __first, _Size __n) ; template<typename _InputIterator, typename _Size, typename _ForwardIterator> _ForwardIterator __uninitialized_copy_n(_InputIterator __first, _Size __n, _ForwardIterator __result, input_iterator_tag) ; template<typename _RandomAccessIterator, typename _Size, typename _ForwardIterator> _ForwardIterator __uninitialized_copy_n(_RandomAccessIterator __first, _Size __n, _ForwardIterator __result, random_access_iterator_tag) ; template<typename _InputIterator, typename _Size, typename _ForwardIterator> pair<_InputIterator, _ForwardIterator> __uninitialized_copy_n_pair(_InputIterator __first, _Size __n, _ForwardIterator __result, input_iterator_tag) ; template<typename _RandomAccessIterator, typename _Size, typename _ForwardIterator> pair<_RandomAccessIterator, _ForwardIterator> __uninitialized_copy_n_pair(_RandomAccessIterator __first, _Size __n, _ForwardIterator __result, random_access_iterator_tag) ; template<typename _InputIterator, typename _Size, typename _ForwardIterator> _ForwardIterator uninitialized_copy_n(_InputIterator __first, _Size __n, _ForwardIterator __result) ; template<typename _InputIterator, typename _Size, typename _ForwardIterator> pair<_InputIterator, _ForwardIterator> __uninitialized_copy_n_pair(_InputIterator __first, _Size __n, _ForwardIterator __result) ; template <typename _ForwardIterator> void uninitialized_default_construct(_ForwardIterator __first, _ForwardIterator __last) ; template <typename _ForwardIterator, typename _Size> _ForwardIterator uninitialized_default_construct_n(_ForwardIterator __first, _Size __count) ; template <typename _ForwardIterator> void uninitialized_value_construct(_ForwardIterator __first, _ForwardIterator __last) ; template <typename _ForwardIterator, typename _Size> _ForwardIterator uninitialized_value_construct_n(_ForwardIterator __first, _Size __count) ; template <typename _InputIterator, typename _ForwardIterator> _ForwardIterator uninitialized_move(_InputIterator __first, _InputIterator __last, _ForwardIterator __result) ; template <typename _InputIterator, typename _Size, typename _ForwardIterator> pair<_InputIterator, _ForwardIterator> uninitialized_move_n(_InputIterator __first, _Size __count, _ForwardIterator __result) ; template<typename _Tp, typename _Up, typename _Allocator> constexpr void __relocate_object_a(_Tp* __restrict __dest, _Up* __restrict __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)))) ; template<typename _Tp, typename = void> struct __is_bitwise_relocatable : is_trivial<_Tp> { }; template <typename _InputIterator, typename _ForwardIterator, typename _Allocator> constexpr _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))) ; template <typename _Tp, typename _Up> constexpr __enable_if_t<std::__is_bitwise_relocatable<_Tp>::value, _Tp*> __relocate_a_1(_Tp* __first, _Tp* __last, _Tp* __result, [[__maybe_unused__]] allocator<_Up>& __alloc) noexcept ; template <typename _InputIterator, typename _ForwardIterator, typename _Allocator> constexpr _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))) ; } namespace std __attribute__ ((__visibility__ ("default"))) { 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; constexpr _Vector_impl_data() ; constexpr _Vector_impl_data(_Vector_impl_data&& __x) ; constexpr void _M_copy_data(_Vector_impl_data const& __x) noexcept ; constexpr void _M_swap_data(_Vector_impl_data& __x) noexcept ; }; struct _Vector_impl : public _Tp_alloc_type, public _Vector_impl_data { constexpr _Vector_impl() noexcept(is_nothrow_default_constructible<_Tp_alloc_type>::value) ; constexpr _Vector_impl(_Tp_alloc_type const& __a) ; constexpr _Vector_impl(_Vector_impl&& __x) ; constexpr _Vector_impl(_Tp_alloc_type&& __a) ; constexpr _Vector_impl(_Tp_alloc_type&& __a, _Vector_impl&& __rv) ; }; public: typedef _Alloc allocator_type; constexpr _Tp_alloc_type& _M_get_Tp_allocator() noexcept ; constexpr const _Tp_alloc_type& _M_get_Tp_allocator() const noexcept ; constexpr allocator_type get_allocator() const noexcept ; _Vector_base() = default; constexpr _Vector_base(const allocator_type& __a) ; constexpr _Vector_base(size_t __n) ; constexpr _Vector_base(size_t __n, const allocator_type& __a) ; _Vector_base(_Vector_base&&) = default; constexpr _Vector_base(_Tp_alloc_type&& __a) ; constexpr _Vector_base(_Vector_base&& __x, const allocator_type& __a) ; constexpr _Vector_base(const allocator_type& __a, _Vector_base&& __x) ; constexpr ~_Vector_base() noexcept ; public: _Vector_impl _M_impl; constexpr pointer _M_allocate(size_t __n) ; constexpr void _M_deallocate(pointer __p, size_t __n) ; protected: constexpr void _M_create_storage(size_t __n) ; }; template<typename _Tp, typename _Alloc = std::allocator<_Tp> > class vector : protected _Vector_base<_Tp, _Alloc> { static_assert(is_same<typename remove_cv<_Tp>::type, _Tp>::value, "std::vector must have a non-const, non-volatile value_type"); static_assert(is_same<typename _Alloc::value_type, _Tp>::value, "std::vector must have the same value_type as its allocator"); 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: static constexpr bool _S_nothrow_relocate(true_type) ; static constexpr bool _S_nothrow_relocate(false_type) ; static constexpr bool _S_use_relocate() ; static pointer _S_do_relocate(pointer __first, pointer __last, pointer __result, _Tp_alloc_type& __alloc, true_type) noexcept ; static pointer _S_do_relocate(pointer, pointer, pointer __result, _Tp_alloc_type&, false_type) noexcept ; static constexpr pointer _S_relocate(pointer __first, pointer __last, pointer __result, _Tp_alloc_type& __alloc) noexcept ; protected: using _Base::_M_allocate; using _Base::_M_deallocate; using _Base::_M_impl; using _Base::_M_get_Tp_allocator; public: vector() = default; explicit constexpr vector(const allocator_type& __a) ; explicit constexpr vector(size_type __n, const allocator_type& __a = allocator_type()) ; constexpr vector(size_type __n, const value_type& __value, const allocator_type& __a = allocator_type()) ; constexpr vector(const vector& __x) ; vector(vector&&) noexcept = default; constexpr vector(const vector& __x, const __type_identity_t<allocator_type>& __a) ; private: constexpr vector(vector&& __rv, const allocator_type& __m, true_type) ; constexpr vector(vector&& __rv, const allocator_type& __m, false_type) ; public: constexpr vector(vector&& __rv, const __type_identity_t<allocator_type>& __m) noexcept( noexcept( vector(std::declval<vector&&>(), std::declval<const allocator_type&>(), std::declval<typename _Alloc_traits::is_always_equal>())) ) ; constexpr vector(initializer_list<value_type> __l, const allocator_type& __a = allocator_type()) ; template<typename _InputIterator, typename = std::_RequireInputIter<_InputIterator>> constexpr vector(_InputIterator __first, _InputIterator __last, const allocator_type& __a = allocator_type()) ; constexpr ~vector() noexcept ; constexpr vector& operator=(const vector& __x); constexpr vector& operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move()) ; constexpr vector& operator=(initializer_list<value_type> __l) ; constexpr void assign(size_type __n, const value_type& __val) ; template<typename _InputIterator, typename = std::_RequireInputIter<_InputIterator>> constexpr void assign(_InputIterator __first, _InputIterator __last) ; constexpr void assign(initializer_list<value_type> __l) ; using _Base::get_allocator; [[__nodiscard__]] constexpr iterator begin() noexcept ; [[__nodiscard__]] constexpr const_iterator begin() const noexcept ; [[__nodiscard__]] constexpr iterator end() noexcept ; [[__nodiscard__]] constexpr const_iterator end() const noexcept ; [[__nodiscard__]] constexpr reverse_iterator rbegin() noexcept ; [[__nodiscard__]] constexpr const_reverse_iterator rbegin() const noexcept ; [[__nodiscard__]] constexpr reverse_iterator rend() noexcept ; [[__nodiscard__]] constexpr const_reverse_iterator rend() const noexcept ; [[__nodiscard__]] constexpr const_iterator cbegin() const noexcept ; [[__nodiscard__]] constexpr const_iterator cend() const noexcept ; [[__nodiscard__]] constexpr const_reverse_iterator crbegin() const noexcept ; [[__nodiscard__]] constexpr const_reverse_iterator crend() const noexcept ; [[__nodiscard__]] constexpr size_type size() const noexcept ; [[__nodiscard__]] constexpr size_type max_size() const noexcept ; constexpr void resize(size_type __new_size) ; constexpr void resize(size_type __new_size, const value_type& __x) ; constexpr void shrink_to_fit() ; [[__nodiscard__]] constexpr size_type capacity() const noexcept ; [[__nodiscard__]] constexpr bool empty() const noexcept ; constexpr void reserve(size_type __n); [[__nodiscard__]] constexpr reference operator[](size_type __n) noexcept ; [[__nodiscard__]] constexpr const_reference operator[](size_type __n) const noexcept ; protected: constexpr void _M_range_check(size_type __n) const ; public: constexpr reference at(size_type __n) ; constexpr const_reference at(size_type __n) const ; [[__nodiscard__]] constexpr reference front() noexcept ; [[__nodiscard__]] constexpr const_reference front() const noexcept ; [[__nodiscard__]] constexpr reference back() noexcept ; [[__nodiscard__]] constexpr const_reference back() const noexcept ; [[__nodiscard__]] constexpr _Tp* data() noexcept ; [[__nodiscard__]] constexpr const _Tp* data() const noexcept ; constexpr void push_back(const value_type& __x) ; constexpr void push_back(value_type&& __x) ; template<typename... _Args> constexpr reference emplace_back(_Args&&... __args); constexpr void pop_back() noexcept ; template<typename... _Args> constexpr iterator emplace(const_iterator __position, _Args&&... __args) ; constexpr iterator insert(const_iterator __position, const value_type& __x); constexpr iterator insert(const_iterator __position, value_type&& __x) ; constexpr iterator insert(const_iterator __position, initializer_list<value_type> __l) ; constexpr iterator insert(const_iterator __position, size_type __n, const value_type& __x) ; template<typename _InputIterator, typename = std::_RequireInputIter<_InputIterator>> constexpr iterator insert(const_iterator __position, _InputIterator __first, _InputIterator __last) ; constexpr iterator erase(const_iterator __position) ; constexpr iterator erase(const_iterator __first, const_iterator __last) ; constexpr void swap(vector& __x) noexcept ; constexpr void clear() noexcept ; protected: template<typename _ForwardIterator> constexpr pointer _M_allocate_and_copy(size_type __n, _ForwardIterator __first, _ForwardIterator __last) ; template<typename _InputIterator> constexpr void _M_range_initialize(_InputIterator __first, _InputIterator __last, std::input_iterator_tag) ; template<typename _ForwardIterator> constexpr void _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag) ; constexpr void _M_fill_initialize(size_type __n, const value_type& __value) ; constexpr void _M_default_initialize(size_type __n) ; template<typename _Integer> constexpr void _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) ; template<typename _InputIterator> constexpr void _M_assign_dispatch(_InputIterator __first, _InputIterator __last, __false_type) ; template<typename _InputIterator> constexpr void _M_assign_aux(_InputIterator __first, _InputIterator __last, std::input_iterator_tag); template<typename _ForwardIterator> constexpr void _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag); constexpr void _M_fill_assign(size_type __n, const value_type& __val); template<typename _Integer> constexpr void _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __val, __true_type) ; template<typename _InputIterator> constexpr void _M_insert_dispatch(iterator __pos, _InputIterator __first, _InputIterator __last, __false_type) ; template<typename _InputIterator> constexpr void _M_range_insert(iterator __pos, _InputIterator __first, _InputIterator __last, std::input_iterator_tag); template<typename _ForwardIterator> constexpr void _M_range_insert(iterator __pos, _ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag); constexpr void _M_fill_insert(iterator __pos, size_type __n, const value_type& __x); constexpr void _M_default_append(size_type __n); constexpr bool _M_shrink_to_fit(); struct _Temporary_value { template<typename... _Args> constexpr explicit _Temporary_value(vector* __vec, _Args&&... __args) ; constexpr ~_Temporary_value() ; constexpr value_type& _M_val() noexcept ; private: constexpr _Tp* _M_ptr() noexcept ; union _Storage { constexpr _Storage() ; constexpr ~_Storage() ; _Storage& operator=(const _Storage&) = delete; unsigned char _M_byte; _Tp _M_val; }; vector* _M_this; _Storage _M_storage; }; template<typename _Arg> constexpr void _M_insert_aux(iterator __position, _Arg&& __arg); template<typename... _Args> constexpr void _M_realloc_insert(iterator __position, _Args&&... __args); constexpr iterator _M_insert_rval(const_iterator __position, value_type&& __v); template<typename... _Args> constexpr iterator _M_emplace_aux(const_iterator __position, _Args&&... __args); constexpr iterator _M_emplace_aux(const_iterator __position, value_type&& __v) ; constexpr size_type _M_check_len(size_type __n, const char* __s) const ; static constexpr size_type _S_check_init_len(size_type __n, const allocator_type& __a) ; static constexpr size_type _S_max_size(const _Tp_alloc_type& __a) noexcept ; constexpr void _M_erase_at_end(pointer __pos) noexcept ; constexpr iterator _M_erase(iterator __position); constexpr iterator _M_erase(iterator __first, iterator __last); private: constexpr void _M_move_assign(vector&& __x, true_type) noexcept ; constexpr void _M_move_assign(vector&& __x, false_type) ; template<typename _Up> constexpr _Up* _M_data_ptr(_Up* __ptr) const noexcept ; template<typename _Ptr> constexpr typename std::pointer_traits<_Ptr>::element_type* _M_data_ptr(_Ptr __ptr) const ; }; 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>; template<typename _Tp, typename _Alloc> constexpr bool operator==(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) ; template<typename _Tp, typename _Alloc> constexpr __detail::__synth3way_t<_Tp> operator<=>(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) ; template<typename _Tp, typename _Alloc> constexpr void swap(vector<_Tp, _Alloc>& __x, vector<_Tp, _Alloc>& __y) noexcept(noexcept(__x.swap(__y))) ; namespace __detail::__variant { template<typename> struct _Never_valueless_alt; template<typename _Tp, typename _Alloc> struct _Never_valueless_alt<std::vector<_Tp, _Alloc>> : std::is_nothrow_move_assignable<std::vector<_Tp, _Alloc>> { }; } } namespace std __attribute__ ((__visibility__ ("default"))) { typedef unsigned long _Bit_type; enum { _S_word_bit = int(8 * sizeof(_Bit_type)) }; __attribute__((__nonnull__)) constexpr void __fill_bvector_n(_Bit_type*, size_t, bool) noexcept; struct _Bit_reference { _Bit_type * _M_p; _Bit_type _M_mask; constexpr _Bit_reference(_Bit_type * __x, _Bit_type __y) ; constexpr _Bit_reference() ; _Bit_reference(const _Bit_reference&) = default; [[__nodiscard__]] constexpr operator bool() const noexcept ; constexpr _Bit_reference& operator=(bool __x) noexcept ; constexpr _Bit_reference& operator=(const _Bit_reference& __x) noexcept ; [[__nodiscard__]] constexpr bool operator==(const _Bit_reference& __x) const { return bool(*this) == bool(__x); } [[__nodiscard__]] constexpr bool operator<(const _Bit_reference& __x) const ; constexpr void flip() noexcept ; constexpr friend void swap(_Bit_reference __x, _Bit_reference __y) noexcept ; constexpr friend void swap(_Bit_reference __x, bool& __y) noexcept ; constexpr friend void swap(bool& __x, _Bit_reference __y) noexcept ; }; #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" struct _Bit_iterator_base : public std::iterator<std::random_access_iterator_tag, bool> { _Bit_type * _M_p; unsigned int _M_offset; constexpr __attribute__((__always_inline__)) void _M_assume_normalized() const ; constexpr _Bit_iterator_base(_Bit_type * __x, unsigned int __y) ; constexpr void _M_bump_up() ; constexpr void _M_bump_down() ; constexpr void _M_incr(ptrdiff_t __i) { _M_assume_normalized(); 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); } [[__nodiscard__]] friend constexpr bool operator==(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) { __x._M_assume_normalized(); __y._M_assume_normalized(); return __x._M_p == __y._M_p && __x._M_offset == __y._M_offset; } [[nodiscard]] friend constexpr strong_ordering operator<=>(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) noexcept { __x._M_assume_normalized(); __y._M_assume_normalized(); if (const auto __cmp = __x._M_p <=> __y._M_p; __cmp != 0) return __cmp; return __x._M_offset <=> __y._M_offset; } friend constexpr ptrdiff_t operator-(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) { __x._M_assume_normalized(); __y._M_assume_normalized(); return (int(_S_word_bit) * (__x._M_p - __y._M_p) + __x._M_offset - __y._M_offset); } }; #pragma GCC diagnostic pop struct _Bit_iterator : public _Bit_iterator_base { typedef _Bit_reference reference; typedef void pointer; typedef _Bit_iterator iterator; constexpr _Bit_iterator() : _Bit_iterator_base(0, 0) { } constexpr _Bit_iterator(_Bit_type * __x, unsigned int __y) : _Bit_iterator_base(__x, __y) { } constexpr iterator _M_const_cast() const ; [[__nodiscard__]] constexpr reference operator*() const ; constexpr iterator& operator++() ; constexpr iterator operator++(int) ; constexpr iterator& operator--() ; constexpr iterator operator--(int) ; constexpr iterator& operator+=(difference_type __i) ; constexpr iterator& operator-=(difference_type __i) ; [[__nodiscard__]] constexpr reference operator[](difference_type __i) const { return *(*this + __i); } [[__nodiscard__]] friend constexpr iterator operator+(const iterator& __x, difference_type __n) { iterator __tmp = __x; __tmp += __n; return __tmp; } [[__nodiscard__]] friend constexpr iterator operator+(difference_type __n, const iterator& __x) { return __x + __n; } [[__nodiscard__]] friend constexpr iterator operator-(const iterator& __x, difference_type __n) { iterator __tmp = __x; __tmp -= __n; return __tmp; } }; struct _Bit_const_iterator : public _Bit_iterator_base { typedef bool reference; typedef bool const_reference; typedef void pointer; typedef _Bit_const_iterator const_iterator; constexpr _Bit_const_iterator() ; constexpr _Bit_const_iterator(_Bit_type * __x, unsigned int __y) ; constexpr _Bit_const_iterator(const _Bit_iterator& __x) ; constexpr _Bit_iterator _M_const_cast() const ; [[__nodiscard__]] constexpr const_reference operator*() const ; constexpr const_iterator& operator++() ; constexpr const_iterator operator++(int) ; constexpr const_iterator& operator--() ; constexpr const_iterator operator--(int) ; constexpr const_iterator& operator+=(difference_type __i) { _M_incr(__i); return *this; } constexpr const_iterator& operator-=(difference_type __i) { *this += -__i; return *this; } [[__nodiscard__]] constexpr const_reference operator[](difference_type __i) const { return *(*this + __i); } [[__nodiscard__]] friend constexpr const_iterator operator+(const const_iterator& __x, difference_type __n) { const_iterator __tmp = __x; __tmp += __n; return __tmp; } [[__nodiscard__]] friend constexpr const_iterator operator-(const const_iterator& __x, difference_type __n) { const_iterator __tmp = __x; __tmp -= __n; return __tmp; } [[__nodiscard__]] friend constexpr const_iterator operator+(difference_type __n, const const_iterator& __x) { return __x + __n; } }; 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; constexpr _Bvector_impl_data() noexcept : _M_start(), _M_finish(), _M_end_of_storage() { } _Bvector_impl_data(const _Bvector_impl_data&) = default; _Bvector_impl_data& operator=(const _Bvector_impl_data&) = default; constexpr _Bvector_impl_data(_Bvector_impl_data&& __x) noexcept : _Bvector_impl_data(__x) { __x._M_reset(); } constexpr void _M_move_data(_Bvector_impl_data&& __x) noexcept { *this = __x; __x._M_reset(); } constexpr void _M_reset() noexcept ; constexpr void _M_swap_data(_Bvector_impl_data& __x) noexcept ; }; struct _Bvector_impl : public _Bit_alloc_type, public _Bvector_impl_data { constexpr _Bvector_impl() noexcept(is_nothrow_default_constructible<_Bit_alloc_type>::value) ; constexpr _Bvector_impl(const _Bit_alloc_type& __a) ; constexpr _Bvector_impl(_Bvector_impl&& __x) ; constexpr _Bvector_impl(_Bit_alloc_type&& __a, _Bvector_impl&& __x) ; constexpr _Bit_type* _M_end_addr() const noexcept ; }; public: typedef _Alloc allocator_type; constexpr _Bit_alloc_type& _M_get_Bit_allocator() noexcept ; constexpr const _Bit_alloc_type& _M_get_Bit_allocator() const noexcept ; constexpr allocator_type get_allocator() const noexcept ; _Bvector_base() = default; constexpr _Bvector_base(const allocator_type& __a) ; _Bvector_base(_Bvector_base&&) = default; constexpr _Bvector_base(_Bvector_base&& __x, const allocator_type& __a) ; constexpr ~_Bvector_base() ; protected: _Bvector_impl _M_impl; constexpr _Bit_pointer _M_allocate(size_t __n) ; constexpr void _M_deallocate() ; constexpr void _M_move_data(_Bvector_base&& __x) noexcept ; constexpr static size_t _S_nword(size_t __n) ; }; 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; friend struct std::hash<vector>; 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; constexpr allocator_type get_allocator() const ; protected: using _Base::_M_allocate; using _Base::_M_deallocate; using _Base::_S_nword; using _Base::_M_get_Bit_allocator; public: vector() = default; constexpr explicit vector(const allocator_type& __a) ; constexpr explicit vector(size_type __n, const allocator_type& __a = allocator_type()) ; constexpr vector(size_type __n, const bool& __value, const allocator_type& __a = allocator_type()) ; constexpr vector(const vector& __x) ; vector(vector&&) = default; private: constexpr vector(vector&& __x, const allocator_type& __a, true_type) ; constexpr vector(vector&& __x, const allocator_type& __a, false_type) ; public: constexpr vector(vector&& __x, const __type_identity_t<allocator_type>& __a) noexcept(_Bit_alloc_traits::_S_always_equal()) ; constexpr vector(const vector& __x, const __type_identity_t<allocator_type>& __a) ; constexpr vector(initializer_list<bool> __l, const allocator_type& __a = allocator_type()) ; template<typename _InputIterator, typename = std::_RequireInputIter<_InputIterator>> constexpr vector(_InputIterator __first, _InputIterator __last, const allocator_type& __a = allocator_type()) ; constexpr ~vector() noexcept ; constexpr vector& operator=(const vector& __x) ; constexpr vector& operator=(vector&& __x) noexcept(_Bit_alloc_traits::_S_nothrow_move()) ; constexpr vector& operator=(initializer_list<bool> __l) ; constexpr void assign(size_type __n, const bool& __x) ; template<typename _InputIterator, typename = std::_RequireInputIter<_InputIterator>> constexpr void assign(_InputIterator __first, _InputIterator __last) ; constexpr void assign(initializer_list<bool> __l) ; [[__nodiscard__]] constexpr iterator begin() noexcept ; [[__nodiscard__]] constexpr const_iterator begin() const noexcept ; [[__nodiscard__]] constexpr iterator end() noexcept ; [[__nodiscard__]] constexpr const_iterator end() const noexcept ; [[__nodiscard__]] constexpr reverse_iterator rbegin() noexcept ; [[__nodiscard__]] constexpr const_reverse_iterator rbegin() const noexcept ; [[__nodiscard__]] constexpr reverse_iterator rend() noexcept ; [[__nodiscard__]] constexpr const_reverse_iterator rend() const noexcept ; [[__nodiscard__]] constexpr const_iterator cbegin() const noexcept ; [[__nodiscard__]] constexpr const_iterator cend() const noexcept ; [[__nodiscard__]] constexpr const_reverse_iterator crbegin() const noexcept ; [[__nodiscard__]] constexpr const_reverse_iterator crend() const noexcept ; [[__nodiscard__]] constexpr size_type size() const noexcept ; [[__nodiscard__]] constexpr size_type max_size() const noexcept ; [[__nodiscard__]] constexpr size_type capacity() const noexcept ; [[__nodiscard__]] constexpr bool empty() const noexcept ; [[__nodiscard__]] constexpr reference operator[](size_type __n) ; [[__nodiscard__]] constexpr const_reference operator[](size_type __n) const ; protected: constexpr void _M_range_check(size_type __n) const ; public: constexpr reference at(size_type __n) ; constexpr const_reference at(size_type __n) const ; constexpr void reserve(size_type __n) ; [[__nodiscard__]] constexpr reference front() ; [[__nodiscard__]] constexpr const_reference front() const ; [[__nodiscard__]] constexpr reference back() ; [[__nodiscard__]] constexpr const_reference back() const ; constexpr void push_back(bool __x) ; constexpr void swap(vector& __x) noexcept ; constexpr static void swap(reference __x, reference __y) noexcept ; constexpr iterator insert(const_iterator __position, const bool& __x) ; __attribute__ ((__deprecated__ ("use '" "insert(position, false)" "' instead"))) iterator insert(const_iterator __position) ; template<typename _InputIterator, typename = std::_RequireInputIter<_InputIterator>> constexpr iterator insert(const_iterator __position, _InputIterator __first, _InputIterator __last) ; constexpr iterator insert(const_iterator __position, size_type __n, const bool& __x) ; constexpr iterator insert(const_iterator __p, initializer_list<bool> __l) ; constexpr void pop_back() ; constexpr iterator erase(const_iterator __position) ; constexpr iterator erase(const_iterator __first, const_iterator __last) ; constexpr void resize(size_type __new_size, bool __x = bool()) ; constexpr void shrink_to_fit() ; constexpr void flip() noexcept ; constexpr void clear() noexcept ; template<typename... _Args> constexpr reference emplace_back(_Args&&... __args) ; template<typename... _Args> constexpr iterator emplace(const_iterator __pos, _Args&&... __args) ; protected: constexpr iterator _M_copy_aligned(const_iterator __first, const_iterator __last, iterator __result) ; constexpr void _M_initialize(size_type __n) ; constexpr void _M_initialize_value(bool __x) noexcept ; constexpr void _M_reallocate(size_type __n); constexpr bool _M_shrink_to_fit(); template<typename _InputIterator> constexpr void _M_initialize_range(_InputIterator __first, _InputIterator __last, std::input_iterator_tag) ; template<typename _ForwardIterator> constexpr void _M_initialize_range(_ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag) ; constexpr void _M_fill_assign(size_t __n, bool __x) ; template<typename _InputIterator> constexpr void _M_assign_aux(_InputIterator __first, _InputIterator __last, std::input_iterator_tag) ; template<typename _ForwardIterator> constexpr void _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag) ; constexpr void _M_fill_insert(iterator __position, size_type __n, bool __x); template<typename _InputIterator> constexpr void _M_insert_range(iterator __pos, _InputIterator __first, _InputIterator __last, std::input_iterator_tag) ; template<typename _ForwardIterator> constexpr void _M_insert_range(iterator __position, _ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag); constexpr void _M_insert_aux(iterator __position, bool __x); constexpr size_type _M_check_len(size_type __n, const char* __s) const ; constexpr void _M_erase_at_end(iterator __pos) ; constexpr iterator _M_erase(iterator __pos); constexpr iterator _M_erase(iterator __first, iterator __last); protected: void data() = delete; }; constexpr void __fill_bvector(_Bit_type* __v, unsigned int __first, unsigned int __last, bool __x) noexcept ; __attribute__((__nonnull__)) constexpr void __fill_bvector_n(_Bit_type* __p, size_t __n, bool __x) noexcept ; constexpr void __fill_a1(std::_Bit_iterator __first, std::_Bit_iterator __last, const bool& __x) ; template<typename _Alloc> struct hash<std::vector<bool, _Alloc>> : public __hash_base<size_t, std::vector<bool, _Alloc>> { size_t operator()(const std::vector<bool, _Alloc>&) const noexcept; }; } namespace std __attribute__ ((__visibility__ ("default"))) { } namespace std __attribute__ ((__visibility__ ("default"))) { } namespace std __attribute__ ((__visibility__ ("default"))) { namespace pmr { template<typename _Tp> using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>; } } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Tp, typename _Alloc, typename _Predicate> constexpr typename vector<_Tp, _Alloc>::size_type erase_if(vector<_Tp, _Alloc>& __cont, _Predicate __pred) ; template<typename _Tp, typename _Alloc, typename _Up> constexpr typename vector<_Tp, _Alloc>::size_type erase(vector<_Tp, _Alloc>& __cont, const _Up& __value) ; } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Alloc> struct __allocated_ptr { using pointer = typename allocator_traits<_Alloc>::pointer; using value_type = typename allocator_traits<_Alloc>::value_type; __allocated_ptr(_Alloc& __a, pointer __ptr) ; template<typename _Ptr, typename _Req = _Require<is_same<_Ptr, value_type*>>> __allocated_ptr(_Alloc& __a, _Ptr __ptr) ; __allocated_ptr(__allocated_ptr&& __gd) ; ~__allocated_ptr() ; __allocated_ptr& operator=(std::nullptr_t) noexcept ; value_type* get() ; private: _Alloc* _M_alloc; pointer _M_ptr; }; template<typename _Alloc> __allocated_ptr<_Alloc> __allocate_guarded(_Alloc& __a) ; } namespace std __attribute__ ((__visibility__ ("default"))) { #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" template<typename> class auto_ptr; #pragma GCC diagnostic pop template<typename _Tp> struct default_delete { constexpr default_delete() noexcept = default; template<typename _Up, typename = _Require<is_convertible<_Up*, _Tp*>>> default_delete(const default_delete<_Up>&) noexcept ; void operator()(_Tp* __ptr) const { static_assert(!is_void<_Tp>::value, "can't delete pointer to incomplete type"); static_assert(sizeof(_Tp)>0, "can't delete pointer to incomplete type"); delete __ptr; } }; template<typename _Tp> struct default_delete<_Tp[]> { public: constexpr default_delete() noexcept = default; template<typename _Up, typename = _Require<is_convertible<_Up(*)[], _Tp(*)[]>>> default_delete(const default_delete<_Up[]>&) noexcept { } template<typename _Up> typename enable_if<is_convertible<_Up(*)[], _Tp(*)[]>::value>::type operator()(_Up* __ptr) const { static_assert(sizeof(_Tp)>0, "can't delete pointer to incomplete type"); delete [] __ptr; } }; template <typename _Tp, typename _Dp> class __uniq_ptr_impl { template <typename _Up, typename _Ep, typename = void> struct _Ptr { using type = _Up*; }; template <typename _Up, typename _Ep> struct _Ptr<_Up, _Ep, __void_t<typename remove_reference<_Ep>::type::pointer>> { using type = typename remove_reference<_Ep>::type::pointer; }; public: using _DeleterConstraint = enable_if< __and_<__not_<is_pointer<_Dp>>, is_default_constructible<_Dp>>::value>; using pointer = typename _Ptr<_Tp, _Dp>::type; static_assert( !is_rvalue_reference<_Dp>::value, "unique_ptr's deleter type must be a function object type" " or an lvalue reference type" ); __uniq_ptr_impl() = default; __uniq_ptr_impl(pointer __p) ; template<typename _Del> __uniq_ptr_impl(pointer __p, _Del&& __d) ; __uniq_ptr_impl(__uniq_ptr_impl&& __u) ; __uniq_ptr_impl& operator=(__uniq_ptr_impl&& __u) noexcept ; pointer& _M_ptr() noexcept ; pointer _M_ptr() const noexcept ; _Dp& _M_deleter() noexcept ; const _Dp& _M_deleter() const noexcept ; void reset(pointer __p) noexcept ; pointer release() noexcept ; void swap(__uniq_ptr_impl& __rhs) noexcept ; private: tuple<pointer, _Dp> _M_t; }; template <typename _Tp, typename _Dp, bool = is_move_constructible<_Dp>::value, bool = is_move_assignable<_Dp>::value> struct __uniq_ptr_data : __uniq_ptr_impl<_Tp, _Dp> { using __uniq_ptr_impl<_Tp, _Dp>::__uniq_ptr_impl; __uniq_ptr_data(__uniq_ptr_data&&) = default; __uniq_ptr_data& operator=(__uniq_ptr_data&&) = default; }; template <typename _Tp, typename _Dp> struct __uniq_ptr_data<_Tp, _Dp, true, false> : __uniq_ptr_impl<_Tp, _Dp> { using __uniq_ptr_impl<_Tp, _Dp>::__uniq_ptr_impl; __uniq_ptr_data(__uniq_ptr_data&&) = default; __uniq_ptr_data& operator=(__uniq_ptr_data&&) = delete; }; template <typename _Tp, typename _Dp> struct __uniq_ptr_data<_Tp, _Dp, false, true> : __uniq_ptr_impl<_Tp, _Dp> { using __uniq_ptr_impl<_Tp, _Dp>::__uniq_ptr_impl; __uniq_ptr_data(__uniq_ptr_data&&) = delete; __uniq_ptr_data& operator=(__uniq_ptr_data&&) = default; }; template <typename _Tp, typename _Dp> struct __uniq_ptr_data<_Tp, _Dp, false, false> : __uniq_ptr_impl<_Tp, _Dp> { using __uniq_ptr_impl<_Tp, _Dp>::__uniq_ptr_impl; __uniq_ptr_data(__uniq_ptr_data&&) = delete; __uniq_ptr_data& operator=(__uniq_ptr_data&&) = delete; }; template <typename _Tp, typename _Dp = default_delete<_Tp>> class unique_ptr { template <typename _Up> using _DeleterConstraint = typename __uniq_ptr_impl<_Tp, _Up>::_DeleterConstraint::type; __uniq_ptr_data<_Tp, _Dp> _M_t; public: using pointer = typename __uniq_ptr_impl<_Tp, _Dp>::pointer; using element_type = _Tp; using deleter_type = _Dp; private: template<typename _Up, typename _Ep> using __safe_conversion_up = __and_< is_convertible<typename unique_ptr<_Up, _Ep>::pointer, pointer>, __not_<is_array<_Up>> >; public: template<typename _Del = _Dp, typename = _DeleterConstraint<_Del>> constexpr unique_ptr() ; template<typename _Del = _Dp, typename = _DeleterConstraint<_Del>> explicit unique_ptr(pointer __p) ; template<typename _Del = deleter_type, typename = _Require<is_copy_constructible<_Del>>> unique_ptr(pointer __p, const deleter_type& __d) ; template<typename _Del = deleter_type, typename = _Require<is_move_constructible<_Del>>> unique_ptr(pointer __p, __enable_if_t<!is_lvalue_reference<_Del>::value, _Del&&> __d) ; template<typename _Del = deleter_type, typename _DelUnref = typename remove_reference<_Del>::type> unique_ptr(pointer, __enable_if_t<is_lvalue_reference<_Del>::value, _DelUnref&&>) = delete; template<typename _Del = _Dp, typename = _DeleterConstraint<_Del>> constexpr unique_ptr(nullptr_t) ; unique_ptr(unique_ptr&&) = default; template<typename _Up, typename _Ep, typename = _Require< __safe_conversion_up<_Up, _Ep>, __conditional_t<is_reference<_Dp>::value, is_same<_Ep, _Dp>, is_convertible<_Ep, _Dp>>>> unique_ptr(unique_ptr<_Up, _Ep>&& __u) ; #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" template<typename _Up, typename = _Require< is_convertible<_Up*, _Tp*>, is_same<_Dp, default_delete<_Tp>>>> unique_ptr(auto_ptr<_Up>&& __u) noexcept; #pragma GCC diagnostic pop ~unique_ptr() noexcept { static_assert(__is_invocable<deleter_type&, pointer>::value, "unique_ptr's deleter must be invocable with a pointer"); auto& __ptr = _M_t._M_ptr(); if (__ptr != nullptr) get_deleter()(std::move(__ptr)); __ptr = pointer(); } unique_ptr& operator=(unique_ptr&&) = default; template<typename _Up, typename _Ep> typename enable_if< __and_< __safe_conversion_up<_Up, _Ep>, is_assignable<deleter_type&, _Ep&&> >::value, unique_ptr&>::type operator=(unique_ptr<_Up, _Ep>&& __u) noexcept { reset(__u.release()); get_deleter() = std::forward<_Ep>(__u.get_deleter()); return *this; } unique_ptr& operator=(nullptr_t) noexcept ; typename add_lvalue_reference<element_type>::type operator*() const noexcept(noexcept(*std::declval<pointer>())) ; pointer operator->() const noexcept ; pointer get() const noexcept ; deleter_type& get_deleter() noexcept ; const deleter_type& get_deleter() const noexcept ; explicit operator bool() const noexcept ; pointer release() noexcept ; void reset(pointer __p = pointer()) noexcept ; void swap(unique_ptr& __u) noexcept ; unique_ptr(const unique_ptr&) = delete; unique_ptr& operator=(const unique_ptr&) = delete; }; template<typename _Tp, typename _Dp> class unique_ptr<_Tp[], _Dp> { template <typename _Up> using _DeleterConstraint = typename __uniq_ptr_impl<_Tp, _Up>::_DeleterConstraint::type; __uniq_ptr_data<_Tp, _Dp> _M_t; template<typename _Up> using __is_derived_Tp = __and_< is_base_of<_Tp, _Up>, __not_<is_same<__remove_cv_t<_Tp>, __remove_cv_t<_Up>>> >; public: using pointer = typename __uniq_ptr_impl<_Tp, _Dp>::pointer; using element_type = _Tp; using deleter_type = _Dp; template<typename _Up, typename _Ep, typename _UPtr = unique_ptr<_Up, _Ep>, typename _UP_pointer = typename _UPtr::pointer, typename _UP_element_type = typename _UPtr::element_type> using __safe_conversion_up = __and_< is_array<_Up>, is_same<pointer, element_type*>, is_same<_UP_pointer, _UP_element_type*>, is_convertible<_UP_element_type(*)[], element_type(*)[]> >; template<typename _Up> using __safe_conversion_raw = __and_< __or_<__or_<is_same<_Up, pointer>, is_same<_Up, nullptr_t>>, __and_<is_pointer<_Up>, is_same<pointer, element_type*>, is_convertible< typename remove_pointer<_Up>::type(*)[], element_type(*)[]> > > >; template<typename _Del = _Dp, typename = _DeleterConstraint<_Del>> constexpr unique_ptr() ; template<typename _Up, typename _Vp = _Dp, typename = _DeleterConstraint<_Vp>, typename = typename enable_if< __safe_conversion_raw<_Up>::value, bool>::type> explicit unique_ptr(_Up __p) ; template<typename _Up, typename _Del = deleter_type, typename = _Require<__safe_conversion_raw<_Up>, is_copy_constructible<_Del>>> unique_ptr(_Up __p, const deleter_type& __d) ; template<typename _Up, typename _Del = deleter_type, typename = _Require<__safe_conversion_raw<_Up>, is_move_constructible<_Del>>> unique_ptr(_Up __p, __enable_if_t<!is_lvalue_reference<_Del>::value, _Del&&> __d) ; template<typename _Up, typename _Del = deleter_type, typename _DelUnref = typename remove_reference<_Del>::type, typename = _Require<__safe_conversion_raw<_Up>>> unique_ptr(_Up, __enable_if_t<is_lvalue_reference<_Del>::value, _DelUnref&&>) = delete; unique_ptr(unique_ptr&&) = default; template<typename _Del = _Dp, typename = _DeleterConstraint<_Del>> constexpr unique_ptr(nullptr_t) ; template<typename _Up, typename _Ep, typename = _Require< __safe_conversion_up<_Up, _Ep>, __conditional_t<is_reference<_Dp>::value, is_same<_Ep, _Dp>, is_convertible<_Ep, _Dp>>>> unique_ptr(unique_ptr<_Up, _Ep>&& __u) ; ~unique_ptr() ; unique_ptr& operator=(unique_ptr&&) = default; template<typename _Up, typename _Ep> typename enable_if<__and_<__safe_conversion_up<_Up, _Ep>, is_assignable<deleter_type&, _Ep&&> >::value, unique_ptr&>::type operator=(unique_ptr<_Up, _Ep>&& __u) noexcept ; unique_ptr& operator=(nullptr_t) noexcept ; typename std::add_lvalue_reference<element_type>::type operator[](size_t __i) const ; pointer get() const noexcept ; deleter_type& get_deleter() noexcept ; const deleter_type& get_deleter() const noexcept ; explicit operator bool() const noexcept ; pointer release() noexcept ; template <typename _Up, typename = _Require< __or_<is_same<_Up, pointer>, __and_<is_same<pointer, element_type*>, is_pointer<_Up>, is_convertible< typename remove_pointer<_Up>::type(*)[], element_type(*)[] > > > >> void reset(_Up __p) noexcept ; void reset(nullptr_t = nullptr) noexcept ; void swap(unique_ptr& __u) noexcept ; unique_ptr(const unique_ptr&) = delete; unique_ptr& operator=(const unique_ptr&) = delete; }; template<typename _Tp, typename _Dp> typename enable_if<__is_swappable<_Dp>::value>::type swap(unique_ptr<_Tp, _Dp>& __x, unique_ptr<_Tp, _Dp>& __y) noexcept ; template<typename _Tp, typename _Dp> typename enable_if<!__is_swappable<_Dp>::value>::type swap(unique_ptr<_Tp, _Dp>&, unique_ptr<_Tp, _Dp>&) = delete; template<typename _Tp, typename _Dp, typename _Up, typename _Ep> [[__nodiscard__]] bool operator==(const unique_ptr<_Tp, _Dp>& __x, const unique_ptr<_Up, _Ep>& __y) ; template<typename _Tp, typename _Dp> [[__nodiscard__]] bool operator==(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) noexcept ; template<typename _Tp, typename _Dp, typename _Up, typename _Ep> [[__nodiscard__]] bool operator<(const unique_ptr<_Tp, _Dp>& __x, const unique_ptr<_Up, _Ep>& __y) ; template<typename _Tp, typename _Dp> [[__nodiscard__]] bool operator<(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) ; template<typename _Tp, typename _Dp> [[__nodiscard__]] bool operator<(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) ; template<typename _Tp, typename _Dp, typename _Up, typename _Ep> [[__nodiscard__]] bool operator<=(const unique_ptr<_Tp, _Dp>& __x, const unique_ptr<_Up, _Ep>& __y) ; template<typename _Tp, typename _Dp> [[__nodiscard__]] bool operator<=(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) ; template<typename _Tp, typename _Dp> [[__nodiscard__]] bool operator<=(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) ; template<typename _Tp, typename _Dp, typename _Up, typename _Ep> [[__nodiscard__]] bool operator>(const unique_ptr<_Tp, _Dp>& __x, const unique_ptr<_Up, _Ep>& __y) ; template<typename _Tp, typename _Dp> [[__nodiscard__]] bool operator>(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) ; template<typename _Tp, typename _Dp> [[__nodiscard__]] bool operator>(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) ; template<typename _Tp, typename _Dp, typename _Up, typename _Ep> [[__nodiscard__]] bool operator>=(const unique_ptr<_Tp, _Dp>& __x, const unique_ptr<_Up, _Ep>& __y) ; template<typename _Tp, typename _Dp> [[__nodiscard__]] bool operator>=(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) ; template<typename _Tp, typename _Dp> [[__nodiscard__]] bool operator>=(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) ; template<typename _Tp, typename _Dp, typename _Up, typename _Ep> requires three_way_comparable_with<typename unique_ptr<_Tp, _Dp>::pointer, typename unique_ptr<_Up, _Ep>::pointer> compare_three_way_result_t<typename unique_ptr<_Tp, _Dp>::pointer, typename unique_ptr<_Up, _Ep>::pointer> operator<=>(const unique_ptr<_Tp, _Dp>& __x, const unique_ptr<_Up, _Ep>& __y) ; template<typename _Tp, typename _Dp> requires three_way_comparable<typename unique_ptr<_Tp, _Dp>::pointer> compare_three_way_result_t<typename unique_ptr<_Tp, _Dp>::pointer> operator<=>(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) ; template<typename _Up, typename _Ptr = typename _Up::pointer, bool = __poison_hash<_Ptr>::__enable_hash_call> struct __uniq_ptr_hash : private __poison_hash<_Ptr> { size_t operator()(const _Up& __u) const noexcept(noexcept(std::declval<hash<_Ptr>>()(std::declval<_Ptr>()))) ; }; template<typename _Up, typename _Ptr> struct __uniq_ptr_hash<_Up, _Ptr, false> : private __poison_hash<_Ptr> { }; template<typename _Tp, typename _Dp> struct hash<unique_ptr<_Tp, _Dp>> : public __hash_base<size_t, unique_ptr<_Tp, _Dp>>, public __uniq_ptr_hash<unique_ptr<_Tp, _Dp>> { }; namespace __detail { template<typename _Tp> struct _MakeUniq { typedef unique_ptr<_Tp> __single_object; }; template<typename _Tp> struct _MakeUniq<_Tp[]> { typedef unique_ptr<_Tp[]> __array; }; template<typename _Tp, size_t _Bound> struct _MakeUniq<_Tp[_Bound]> { struct __invalid_type { }; }; template<typename _Tp> using __unique_ptr_t = typename _MakeUniq<_Tp>::__single_object; template<typename _Tp> using __unique_ptr_array_t = typename _MakeUniq<_Tp>::__array; template<typename _Tp> using __invalid_make_unique_t = typename _MakeUniq<_Tp>::__invalid_type; } template<typename _Tp, typename... _Args> __detail::__unique_ptr_t<_Tp> make_unique(_Args&&... __args) ; template<typename _Tp> __detail::__unique_ptr_array_t<_Tp> make_unique(size_t __num) ; template<typename _Tp, typename... _Args> __detail::__invalid_make_unique_t<_Tp> make_unique(_Args&&...) = delete; template<typename _Tp> __detail::__unique_ptr_t<_Tp> make_unique_for_overwrite() ; template<typename _Tp> __detail::__unique_ptr_array_t<_Tp> make_unique_for_overwrite(size_t __num) ; template<typename _Tp, typename... _Args> __detail::__invalid_make_unique_t<_Tp> make_unique_for_overwrite(_Args&&...) = delete; template<typename _CharT, typename _Traits, typename _Tp, typename _Dp> basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const unique_ptr<_Tp, _Dp>& __p) requires requires { __os << __p.get(); } ; namespace __detail::__variant { template<typename> struct _Never_valueless_alt; template<typename _Tp, typename _Del> struct _Never_valueless_alt<std::unique_ptr<_Tp, _Del>> : std::true_type { }; } } namespace __gnu_cxx { template<typename _Tp> struct __aligned_membuf { struct _Tp2 { _Tp _M_t; }; alignas(__alignof__(_Tp2::_M_t)) unsigned char _M_storage[sizeof(_Tp)]; __aligned_membuf() = default; __aligned_membuf(std::nullptr_t) ; void* _M_addr() noexcept ; const void* _M_addr() const noexcept ; _Tp* _M_ptr() noexcept ; const _Tp* _M_ptr() const noexcept ; }; #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 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; __aligned_buffer(std::nullptr_t) ; void* _M_addr() noexcept ; const void* _M_addr() const noexcept ; _Tp* _M_ptr() noexcept ; const _Tp* _M_ptr() const noexcept ; }; #pragma GCC diagnostic pop } namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { enum _Lock_policy { _S_single, _S_mutex, _S_atomic }; inline const _Lock_policy __default_lock_policy = _S_atomic; class __concurrence_lock_error : public std::exception { public: virtual char const* what() const throw() ; }; class __concurrence_unlock_error : public std::exception { public: virtual char const* what() const throw() ; }; class __concurrence_broadcast_error : public std::exception { public: virtual char const* what() const throw() ; }; class __concurrence_wait_error : public std::exception { public: virtual char const* what() const throw() ; }; void __throw_concurrence_lock_error() ; void __throw_concurrence_unlock_error() ; void __throw_concurrence_broadcast_error() ; void __throw_concurrence_wait_error() ; class __mutex { private: __gthread_mutex_t _M_mutex = { { 0, 0, 0, 0, PTHREAD_MUTEX_TIMED_NP, 0, 0, { 0, 0 } } }; __mutex(const __mutex&); __mutex& operator=(const __mutex&); public: __mutex() ; void lock() ; void unlock() ; __gthread_mutex_t* gthread_mutex(void) ; }; class __recursive_mutex { private: __gthread_recursive_mutex_t _M_mutex = { { 0, 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, 0, 0, { 0, 0 } } }; __recursive_mutex(const __recursive_mutex&); __recursive_mutex& operator=(const __recursive_mutex&); public: __recursive_mutex() ; void lock() ; void unlock() ; __gthread_recursive_mutex_t* gthread_recursive_mutex(void) ; }; class __scoped_lock { public: typedef __mutex __mutex_type; private: __mutex_type& _M_device; __scoped_lock(const __scoped_lock&); __scoped_lock& operator=(const __scoped_lock&); public: explicit __scoped_lock(__mutex_type& __name) ; ~__scoped_lock() throw() ; }; class __cond { private: __gthread_cond_t _M_cond = { { {0}, {0}, {0, 0}, {0, 0}, 0, 0, {0, 0} } }; __cond(const __cond&); public: }; } namespace std __attribute__ ((__visibility__ ("default"))) { ; } namespace std __attribute__ ((__visibility__ ("default"))) { #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" template<typename> class auto_ptr; #pragma GCC diagnostic pop class bad_weak_ptr : public std::exception { public: }; using __gnu_cxx::_Lock_policy; using __gnu_cxx::__default_lock_policy; using __gnu_cxx::_S_single; using __gnu_cxx::_S_mutex; using __gnu_cxx::_S_atomic; template<_Lock_policy _Lp> class _Mutex_base { protected: enum { _S_need_barriers = 0 }; }; template<> class _Mutex_base<_S_mutex> : public __gnu_cxx::__mutex { protected: enum { _S_need_barriers = 1 }; }; template<_Lock_policy _Lp = __default_lock_policy> class _Sp_counted_base : public _Mutex_base<_Lp> { public: private: _Atomic_word _M_use_count; _Atomic_word _M_weak_count; }; template<typename _Tp, _Lock_policy _Lp = __default_lock_policy> class __shared_ptr; template<typename _Tp, _Lock_policy _Lp = __default_lock_policy> class __weak_ptr; template<typename _Tp, _Lock_policy _Lp = __default_lock_policy> class __enable_shared_from_this; template<typename _Tp> class shared_ptr; template<typename _Tp> class weak_ptr; template<typename _Tp> struct owner_less; template<typename _Tp> class enable_shared_from_this; template<_Lock_policy _Lp = __default_lock_policy> class __weak_count; template<_Lock_policy _Lp = __default_lock_policy> class __shared_count; template<typename> class _Sp_atomic; template<typename _Ptr, _Lock_policy _Lp> class _Sp_counted_ptr final : public _Sp_counted_base<_Lp> { public: private: _Ptr _M_ptr; }; template<int _Nm, typename _Tp, bool __use_ebo = !__is_final(_Tp) && __is_empty(_Tp)> struct _Sp_ebo_helper; template<int _Nm, typename _Tp> struct _Sp_ebo_helper<_Nm, _Tp, true> : private _Tp { }; template<int _Nm, typename _Tp> struct _Sp_ebo_helper<_Nm, _Tp, false> { private: _Tp _M_tp; }; template<typename _Ptr, typename _Deleter, typename _Alloc, _Lock_policy _Lp> class _Sp_counted_deleter final : public _Sp_counted_base<_Lp> { class _Impl : _Sp_ebo_helper<0, _Deleter>, _Sp_ebo_helper<1, _Alloc> { typedef _Sp_ebo_helper<0, _Deleter> _Del_base; typedef _Sp_ebo_helper<1, _Alloc> _Alloc_base; public: _Ptr _M_ptr; }; public: using __allocator_type = __alloc_rebind<_Alloc, _Sp_counted_deleter>; private: _Impl _M_impl; }; struct _Sp_make_shared_tag { private: template<typename _Tp, typename _Alloc, _Lock_policy _Lp> friend class _Sp_counted_ptr_inplace; }; template<typename _Alloc> struct _Sp_alloc_shared_tag { const _Alloc& _M_a; }; template<typename _Tp, typename _Alloc, _Lock_policy _Lp> class _Sp_counted_ptr_inplace final : public _Sp_counted_base<_Lp> { class _Impl : _Sp_ebo_helper<0, _Alloc> { typedef _Sp_ebo_helper<0, _Alloc> _A_base; public: __gnu_cxx::__aligned_buffer<_Tp> _M_storage; }; public: using __allocator_type = __alloc_rebind<_Alloc, _Sp_counted_ptr_inplace>; ; private: friend class __shared_count<_Lp>; _Impl _M_impl; }; struct _Sp_overwrite_tag { }; template<typename _Tp, typename _Alloc, _Lock_policy _Lp> requires is_same_v<typename _Alloc::value_type, _Sp_overwrite_tag> class _Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp> final : public _Sp_counted_base<_Lp> { [[no_unique_address]] _Alloc _M_alloc; union { _Tp _M_obj; char _M_unused; }; friend class __shared_count<_Lp>; _Tp* _M_ptr() noexcept ; public: using __allocator_type = __alloc_rebind<_Alloc, _Sp_counted_ptr_inplace>; _Sp_counted_ptr_inplace(const _Alloc& __a) ; ~_Sp_counted_ptr_inplace() noexcept ; virtual void _M_dispose() noexcept ; virtual void _M_destroy() noexcept ; void* _M_get_deleter(const std::type_info&) noexcept override ; }; struct _Sp_overwrite_tag; template<typename _Alloc> struct _Sp_counted_array_base { [[no_unique_address]] _Alloc _M_alloc{}; size_t _M_n = 0; bool _M_overwrite = false; ; protected: private: ; ; }; template<typename _Alloc, _Lock_policy _Lp> class _Sp_counted_array final : public _Sp_counted_base<_Lp>, _Sp_counted_array_base<_Alloc> { using pointer = typename allocator_traits<_Alloc>::pointer; pointer _M_alloc_ptr; friend class __shared_count<_Lp>; public: }; struct __sp_array_delete { ; }; template<_Lock_policy _Lp> class __shared_count { template<typename _Tp> struct __not_alloc_shared_tag { using type = void; }; template<typename _Tp> struct __not_alloc_shared_tag<_Sp_alloc_shared_tag<_Tp>> { }; template<typename _Alloc> struct __not_alloc_shared_tag<_Sp_counted_array_base<_Alloc>> { }; public: ; ; ; ; ; ; ; #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" ; #pragma GCC diagnostic pop ; ~__shared_count() noexcept ; __shared_count(const __shared_count& __r) ; private: friend class __weak_count<_Lp>; template<typename> friend class _Sp_atomic; _Sp_counted_base<_Lp>* _M_pi; }; template<_Lock_policy _Lp> class __weak_count { public: ~__weak_count() noexcept ; __weak_count& operator=(__weak_count&& __r) noexcept ; void _M_swap(__weak_count& __r) noexcept ; long _M_get_use_count() const noexcept ; bool _M_less(const __weak_count& __rhs) const noexcept ; bool _M_less(const __shared_count<_Lp>& __rhs) const noexcept ; friend bool operator==(const __weak_count& __a, const __weak_count& __b) noexcept ; private: friend class __shared_count<_Lp>; template<typename> friend class _Sp_atomic; _Sp_counted_base<_Lp>* _M_pi; }; template<typename _Yp_ptr, typename _Tp_ptr> struct __sp_compatible_with : false_type { }; template<typename _Yp, typename _Tp> struct __sp_compatible_with<_Yp*, _Tp*> : is_convertible<_Yp*, _Tp*>::type { }; template<typename _Up, size_t _Nm> struct __sp_compatible_with<_Up(*)[_Nm], _Up(*)[]> : true_type { }; template<typename _Up, size_t _Nm> struct __sp_compatible_with<_Up(*)[_Nm], const _Up(*)[]> : true_type { }; template<typename _Up, size_t _Nm> struct __sp_compatible_with<_Up(*)[_Nm], volatile _Up(*)[]> : true_type { }; template<typename _Up, size_t _Nm> struct __sp_compatible_with<_Up(*)[_Nm], const volatile _Up(*)[]> : true_type { }; template<typename _Up, size_t _Nm, typename _Yp, typename = void> struct __sp_is_constructible_arrN : false_type { }; template<typename _Up, size_t _Nm, typename _Yp> struct __sp_is_constructible_arrN<_Up, _Nm, _Yp, __void_t<_Yp[_Nm]>> : is_convertible<_Yp(*)[_Nm], _Up(*)[_Nm]>::type { }; template<typename _Up, typename _Yp, typename = void> struct __sp_is_constructible_arr : false_type { }; template<typename _Up, typename _Yp> struct __sp_is_constructible_arr<_Up, _Yp, __void_t<_Yp[]>> : is_convertible<_Yp(*)[], _Up(*)[]>::type { }; template<typename _Tp, typename _Yp> struct __sp_is_constructible; template<typename _Up, size_t _Nm, typename _Yp> struct __sp_is_constructible<_Up[_Nm], _Yp> : __sp_is_constructible_arrN<_Up, _Nm, _Yp>::type { }; template<typename _Up, typename _Yp> struct __sp_is_constructible<_Up[], _Yp> : __sp_is_constructible_arr<_Up, _Yp>::type { }; template<typename _Tp, typename _Yp> struct __sp_is_constructible : is_convertible<_Yp*, _Tp*>::type { }; template<typename _Tp, _Lock_policy _Lp, bool = is_array<_Tp>::value, bool = is_void<_Tp>::value> class __shared_ptr_access { public: using element_type = _Tp; element_type& operator*() const noexcept ; element_type* operator->() const noexcept ; private: element_type* _M_get() const noexcept ; }; template<typename _Tp, _Lock_policy _Lp> class __shared_ptr_access<_Tp, _Lp, false, true> { public: using element_type = _Tp; element_type* operator->() const noexcept ; }; template<typename _Tp, _Lock_policy _Lp> class __shared_ptr_access<_Tp, _Lp, true, false> { public: using element_type = typename remove_extent<_Tp>::type; element_type& operator[](ptrdiff_t __i) const noexcept ; private: element_type* _M_get() const noexcept ; }; template<typename _Tp, _Lock_policy _Lp> class __shared_ptr : public __shared_ptr_access<_Tp, _Lp> { public: using element_type = typename remove_extent<_Tp>::type; private: template<typename _Yp> using _SafeConv = typename enable_if<__sp_is_constructible<_Tp, _Yp>::value>::type; template<typename _Yp, typename _Res = void> using _Compatible = typename enable_if<__sp_compatible_with<_Yp*, _Tp*>::value, _Res>::type; template<typename _Yp> using _Assignable = _Compatible<_Yp, __shared_ptr&>; template<typename _Yp, typename _Del, typename _Res = void, typename _Ptr = typename unique_ptr<_Yp, _Del>::pointer> using _UniqCompatible = __enable_if_t<__and_< __sp_compatible_with<_Yp*, _Tp*>, is_convertible<_Ptr, element_type*>, is_move_constructible<_Del> >::value, _Res>; template<typename _Yp, typename _Del> using _UniqAssignable = _UniqCompatible<_Yp, _Del, __shared_ptr&>; public: using weak_type = __weak_ptr<_Tp, _Lp>; constexpr __shared_ptr() ; template<typename _Yp, typename = _SafeConv<_Yp>> explicit __shared_ptr(_Yp* __p) ; ; ; ; ; ; ; __shared_ptr(const __shared_ptr&) noexcept = default; __shared_ptr& operator=(const __shared_ptr&) noexcept = default; ~__shared_ptr() = default; template<typename _Yp, typename = _Compatible<_Yp>> __shared_ptr(const __shared_ptr<_Yp, _Lp>& __r) ; __shared_ptr(__shared_ptr&& __r) ; template<typename _Yp, typename = _Compatible<_Yp>> __shared_ptr(__shared_ptr<_Yp, _Lp>&& __r) ; ; ; #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" ; #pragma GCC diagnostic pop ; #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" ; #pragma GCC diagnostic pop __shared_ptr& operator=(__shared_ptr&& __r) noexcept ; ; ; ; ; ; element_type* get() const noexcept ; explicit operator bool() const noexcept ; ; ; protected: ; ; ; friend class __weak_ptr<_Tp, _Lp>; private: template<typename _Yp> using __esft_base_t = decltype(__enable_shared_from_this_base( std::declval<const __shared_count<_Lp>&>(), std::declval<_Yp*>())); template<typename _Yp, typename = void> struct __has_esft_base : false_type { }; template<typename _Yp> struct __has_esft_base<_Yp, __void_t<__esft_base_t<_Yp>>> : __not_<is_array<_Tp>> { }; ; ; template<typename _Tp1, _Lock_policy _Lp1> friend class __shared_ptr; template<typename _Tp1, _Lock_policy _Lp1> friend class __weak_ptr; ; ; friend _Sp_atomic<shared_ptr<_Tp>>; element_type* _M_ptr; __shared_count<_Lp> _M_refcount; }; ; ; ; ; ; ; ; template<typename _Tp, typename _Tp1, _Lock_policy _Lp> __shared_ptr<_Tp, _Lp> dynamic_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r) noexcept ; ; template<typename _Tp, _Lock_policy _Lp> class __weak_ptr { template<typename _Yp, typename _Res = void> using _Compatible = typename enable_if<__sp_compatible_with<_Yp*, _Tp*>::value, _Res>::type; template<typename _Yp> using _Assignable = _Compatible<_Yp, __weak_ptr&>; public: using element_type = typename remove_extent<_Tp>::type; ~__weak_ptr() = default; ; ; __weak_ptr(__weak_ptr&& __r) ; ; ; ; __weak_ptr& operator=(__weak_ptr&& __r) noexcept ; ; ; ; private: template<typename _Tp1, _Lock_policy _Lp1> friend class __shared_ptr; template<typename _Tp1, _Lock_policy _Lp1> friend class __weak_ptr; friend class __enable_shared_from_this<_Tp, _Lp>; friend class enable_shared_from_this<_Tp>; friend _Sp_atomic<weak_ptr<_Tp>>; element_type* _M_ptr; __weak_count<_Lp> _M_refcount; }; ; #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" template<typename _Tp, typename _Tp1> struct _Sp_owner_less : public binary_function<_Tp, _Tp, bool> { }; #pragma GCC diagnostic pop template<> struct _Sp_owner_less<void, void> { ; using is_transparent = void; }; template<typename _Tp, _Lock_policy _Lp> struct owner_less<__shared_ptr<_Tp, _Lp>> : public _Sp_owner_less<__shared_ptr<_Tp, _Lp>, __weak_ptr<_Tp, _Lp>> { }; template<typename _Tp, _Lock_policy _Lp> struct owner_less<__weak_ptr<_Tp, _Lp>> : public _Sp_owner_less<__weak_ptr<_Tp, _Lp>, __shared_ptr<_Tp, _Lp>> { }; template<typename _Tp, _Lock_policy _Lp> class __enable_shared_from_this { protected: public: private: ; template<typename, _Lock_policy> friend class __shared_ptr; mutable __weak_ptr<_Tp, _Lp> _M_weak_this; }; ; ; template<typename _Tp, _Lock_policy _Lp> struct hash<__shared_ptr<_Tp, _Lp>> : public __hash_base<size_t, __shared_ptr<_Tp, _Lp>> { }; } namespace std __attribute__ ((__visibility__ ("default"))) { ; ; ; template<typename _Tp> requires (!is_array_v<_Tp>) using _NonArray = _Tp; template<typename _Tp> requires is_array_v<_Tp> && (extent_v<_Tp> == 0) using _UnboundedArray = _Tp; template<typename _Tp> requires (extent_v<_Tp> != 0) using _BoundedArray = _Tp; template<typename _Tp> requires (!is_array_v<_Tp>) || (extent_v<_Tp> != 0) using _NotUnboundedArray = _Tp; template<typename _Tp> class shared_ptr : public __shared_ptr<_Tp> { template<typename... _Args> using _Constructible = typename enable_if< is_constructible<__shared_ptr<_Tp>, _Args...>::value >::type; template<typename _Arg> using _Assignable = typename enable_if< is_assignable<__shared_ptr<_Tp>&, _Arg>::value, shared_ptr& >::type; public: using element_type = typename __shared_ptr<_Tp>::element_type; using weak_type = weak_ptr<_Tp>; constexpr shared_ptr() ; shared_ptr(const shared_ptr&) noexcept = default; ; ; ; ; ; ; ; template<typename _Yp, typename = _Constructible<const shared_ptr<_Yp>&>> shared_ptr(const shared_ptr<_Yp>& __r) ; shared_ptr(shared_ptr&& __r) ; ; ; #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" ; #pragma GCC diagnostic pop ; constexpr shared_ptr(nullptr_t) ; shared_ptr& operator=(const shared_ptr&) noexcept = default; ; #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" ; #pragma GCC diagnostic pop shared_ptr& operator=(shared_ptr&& __r) noexcept ; ; ; private: ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; friend class weak_ptr<_Tp>; }; ; ; ; ; ; ; ; ; ; template<typename _Tp, typename _Up> shared_ptr<_Tp> dynamic_pointer_cast(const shared_ptr<_Up>& __r) noexcept ; ; ; ; template<typename _Tp, typename _Up> shared_ptr<_Tp> dynamic_pointer_cast(shared_ptr<_Up>&& __r) noexcept ; ; template<typename _Tp> class weak_ptr : public __weak_ptr<_Tp> { template<typename _Arg> using _Constructible = typename enable_if< is_constructible<__weak_ptr<_Tp>, _Arg>::value >::type; template<typename _Arg> using _Assignable = typename enable_if< is_assignable<__weak_ptr<_Tp>&, _Arg>::value, weak_ptr& >::type; public: ; ; template<typename _Yp, typename = _Constructible<weak_ptr<_Yp>>> weak_ptr(weak_ptr<_Yp>&& __r) ; weak_ptr& operator=(const weak_ptr& __r) noexcept = default; template<typename _Yp> _Assignable<const weak_ptr<_Yp>&> operator=(const weak_ptr<_Yp>& __r) noexcept ; template<typename _Yp> _Assignable<const shared_ptr<_Yp>&> operator=(const shared_ptr<_Yp>& __r) noexcept ; weak_ptr& operator=(weak_ptr&& __r) noexcept = default; template<typename _Yp> _Assignable<weak_ptr<_Yp>> operator=(weak_ptr<_Yp>&& __r) noexcept ; shared_ptr<_Tp> lock() const noexcept ; }; template<typename _Tp> weak_ptr(shared_ptr<_Tp>) -> weak_ptr<_Tp>; template<typename _Tp> void swap(weak_ptr<_Tp>& __a, weak_ptr<_Tp>& __b) noexcept ; template<typename _Tp = void> struct owner_less; template<> struct owner_less<void> : _Sp_owner_less<void, void> { }; template<typename _Tp> struct owner_less<shared_ptr<_Tp>> : public _Sp_owner_less<shared_ptr<_Tp>, weak_ptr<_Tp>> { }; template<typename _Tp> struct owner_less<weak_ptr<_Tp>> : public _Sp_owner_less<weak_ptr<_Tp>, shared_ptr<_Tp>> { }; template<typename _Tp> class enable_shared_from_this { protected: constexpr enable_shared_from_this() noexcept ; enable_shared_from_this(const enable_shared_from_this&) noexcept ; enable_shared_from_this& operator=(const enable_shared_from_this&) noexcept ; ~enable_shared_from_this() ; public: shared_ptr<_Tp> shared_from_this() ; shared_ptr<const _Tp> shared_from_this() const ; weak_ptr<_Tp> weak_from_this() noexcept ; weak_ptr<const _Tp> weak_from_this() const noexcept ; private: template<typename _Tp1> void _M_weak_assign(_Tp1* __p, const __shared_count<>& __n) const noexcept ; friend const enable_shared_from_this* __enable_shared_from_this_base(const __shared_count<>&, const enable_shared_from_this* __p) ; template<typename, _Lock_policy> friend class __shared_ptr; mutable weak_ptr<_Tp> _M_weak_this; }; template<typename _Tp, typename _Alloc, typename... _Args> shared_ptr<_NonArray<_Tp>> allocate_shared(const _Alloc& __a, _Args&&... __args) ; template<typename _Tp, typename... _Args> shared_ptr<_NonArray<_Tp>> make_shared(_Args&&... __args) ; template<typename _Tp, typename _Alloc = allocator<void>> auto __make_shared_arr_tag(size_t __n, const _Alloc& __a = _Alloc()) noexcept ; template<typename _Tp, typename _Alloc> shared_ptr<_UnboundedArray<_Tp>> allocate_shared(const _Alloc& __a, size_t __n) ; template<typename _Tp> shared_ptr<_UnboundedArray<_Tp>> make_shared(size_t __n) ; template<typename _Tp, typename _Alloc> shared_ptr<_UnboundedArray<_Tp>> allocate_shared(const _Alloc& __a, size_t __n, const remove_extent_t<_Tp>& __u) ; template<typename _Tp> shared_ptr<_UnboundedArray<_Tp>> make_shared(size_t __n, const remove_extent_t<_Tp>& __u) ; template<typename _Tp, typename _Alloc = allocator<void>> auto __make_shared_arrN_tag(const _Alloc& __a = _Alloc()) noexcept ; template<typename _Tp, typename _Alloc> shared_ptr<_BoundedArray<_Tp>> allocate_shared(const _Alloc& __a) ; template<typename _Tp> shared_ptr<_BoundedArray<_Tp>> make_shared() ; template<typename _Tp, typename _Alloc> shared_ptr<_BoundedArray<_Tp>> allocate_shared(const _Alloc& __a, const remove_extent_t<_Tp>& __u) ; template<typename _Tp> shared_ptr<_BoundedArray<_Tp>> make_shared(const remove_extent_t<_Tp>& __u) ; template<typename _Tp, typename _Alloc> shared_ptr<_NotUnboundedArray<_Tp>> allocate_shared_for_overwrite(const _Alloc& __a) ; template<typename _Tp> shared_ptr<_NotUnboundedArray<_Tp>> make_shared_for_overwrite() ; template<typename _Tp, typename _Alloc> shared_ptr<_UnboundedArray<_Tp>> allocate_shared_for_overwrite(const _Alloc& __a, size_t __n) ; template<typename _Tp> shared_ptr<_UnboundedArray<_Tp>> make_shared_for_overwrite(size_t __n) ; template<typename _Tp> struct hash<shared_ptr<_Tp>> : public __hash_base<size_t, shared_ptr<_Tp>> { size_t operator()(const shared_ptr<_Tp>& __s) const noexcept ; }; namespace __detail::__variant { template<typename> struct _Never_valueless_alt; template<typename _Tp> struct _Never_valueless_alt<std::shared_ptr<_Tp>> : std::true_type { }; template<typename _Tp> struct _Never_valueless_alt<std::weak_ptr<_Tp>> : std::true_type { }; } } namespace std __attribute__ ((__visibility__ ("default"))) { namespace chrono { struct local_t { }; template<typename _Duration> using local_time = time_point<local_t, _Duration>; using local_seconds = local_time<seconds>; using local_days = local_time<days>; class utc_clock; class tai_clock; class gps_clock; template<typename _Duration> using utc_time = time_point<utc_clock, _Duration>; using utc_seconds = utc_time<seconds>; template<typename _Duration> using tai_time = time_point<tai_clock, _Duration>; using tai_seconds = tai_time<seconds>; template<typename _Duration> using gps_time = time_point<gps_clock, _Duration>; using gps_seconds = gps_time<seconds>; template<> struct is_clock<utc_clock> : true_type { }; template<> struct is_clock<tai_clock> : true_type { }; template<> struct is_clock<gps_clock> : true_type { }; template<> inline constexpr bool is_clock_v<utc_clock> = true; template<> inline constexpr bool is_clock_v<tai_clock> = true; template<> inline constexpr bool is_clock_v<gps_clock> = true; struct leap_second_info { bool is_leap_second; seconds elapsed; }; template<typename _Duration> leap_second_info get_leap_second_info(const utc_time<_Duration>& __ut); class utc_clock { public: using rep = system_clock::rep; using period = system_clock::period; using duration = chrono::duration<rep, period>; using time_point = chrono::time_point<utc_clock>; static constexpr bool is_steady = false; [[nodiscard]] static time_point now() ; template<typename _Duration> [[nodiscard]] static sys_time<common_type_t<_Duration, seconds>> to_sys(const utc_time<_Duration>& __t) ; template<typename _Duration> [[nodiscard]] static utc_time<common_type_t<_Duration, seconds>> from_sys(const sys_time<_Duration>& __t); }; class tai_clock { public: using rep = system_clock::rep; using period = system_clock::period; using duration = chrono::duration<rep, period>; using time_point = chrono::time_point<tai_clock>; static constexpr bool is_steady = false; [[nodiscard]] static time_point now() ; template<typename _Duration> [[nodiscard]] static utc_time<common_type_t<_Duration, seconds>> to_utc(const tai_time<_Duration>& __t) ; template<typename _Duration> [[nodiscard]] static tai_time<common_type_t<_Duration, seconds>> from_utc(const utc_time<_Duration>& __t) ; }; class gps_clock { public: using rep = system_clock::rep; using period = system_clock::period; using duration = chrono::duration<rep, period>; using time_point = chrono::time_point<gps_clock>; static constexpr bool is_steady = false; [[nodiscard]] static time_point now() ; template<typename _Duration> [[nodiscard]] static utc_time<common_type_t<_Duration, seconds>> to_utc(const gps_time<_Duration>& __t) ; template<typename _Duration> [[nodiscard]] static gps_time<common_type_t<_Duration, seconds>> from_utc(const utc_time<_Duration>& __t) ; }; template<typename _DestClock, typename _SourceClock> struct clock_time_conversion { }; template<typename _Clock> struct clock_time_conversion<_Clock, _Clock> { template<typename _Duration> time_point<_Clock, _Duration> operator()(const time_point<_Clock, _Duration>& __t) const ; }; template<> struct clock_time_conversion<system_clock, system_clock> { template<typename _Duration> sys_time<_Duration> operator()(const sys_time<_Duration>& __t) const ; }; template<> struct clock_time_conversion<utc_clock, utc_clock> { template<typename _Duration> utc_time<_Duration> operator()(const utc_time<_Duration>& __t) const ; }; template<> struct clock_time_conversion<utc_clock, system_clock> { template<typename _Duration> utc_time<common_type_t<_Duration, seconds>> operator()(const sys_time<_Duration>& __t) const ; }; template<> struct clock_time_conversion<system_clock, utc_clock> { template<typename _Duration> sys_time<common_type_t<_Duration, seconds>> operator()(const utc_time<_Duration>& __t) const ; }; template<typename _Tp, typename _Clock> inline constexpr bool __is_time_point_for_v = false; template<typename _Clock, typename _Duration> inline constexpr bool __is_time_point_for_v<time_point<_Clock, _Duration>, _Clock> = true; template<typename _SourceClock> struct clock_time_conversion<system_clock, _SourceClock> { template<typename _Duration, typename _Src = _SourceClock> auto operator()(const time_point<_SourceClock, _Duration>& __t) const -> decltype(_Src::to_sys(__t)) ; }; template<typename _DestClock> struct clock_time_conversion<_DestClock, system_clock> { template<typename _Duration, typename _Dest = _DestClock> auto operator()(const sys_time<_Duration>& __t) const -> decltype(_Dest::from_sys(__t)) ; }; template<typename _SourceClock> struct clock_time_conversion<utc_clock, _SourceClock> { template<typename _Duration, typename _Src = _SourceClock> auto operator()(const time_point<_SourceClock, _Duration>& __t) const -> decltype(_Src::to_utc(__t)) ; }; template<typename _DestClock> struct clock_time_conversion<_DestClock, utc_clock> { template<typename _Duration, typename _Dest = _DestClock> auto operator()(const utc_time<_Duration>& __t) const -> decltype(_Dest::from_utc(__t)) ; }; namespace __detail { template<typename _DestClock, typename _SourceClock, typename _Duration> concept __clock_convs = requires (const time_point<_SourceClock, _Duration>& __t) { clock_time_conversion<_DestClock, _SourceClock>{}(__t); }; template<typename _DestClock, typename _SourceClock, typename _Duration> concept __clock_convs_sys = requires (const time_point<_SourceClock, _Duration>& __t) { clock_time_conversion<_DestClock, system_clock>{}( clock_time_conversion<system_clock, _SourceClock>{}(__t)); }; template<typename _DestClock, typename _SourceClock, typename _Duration> concept __clock_convs_utc = requires (const time_point<_SourceClock, _Duration>& __t) { clock_time_conversion<_DestClock, utc_clock>{}( clock_time_conversion<utc_clock, _SourceClock>{}(__t)); }; template<typename _DestClock, typename _SourceClock, typename _Duration> concept __clock_convs_sys_utc = requires (const time_point<_SourceClock, _Duration>& __t) { clock_time_conversion<_DestClock, utc_clock>{}( clock_time_conversion<utc_clock, system_clock>{}( clock_time_conversion<system_clock, _SourceClock>{}(__t))); }; template<typename _DestClock, typename _SourceClock, typename _Duration> concept __clock_convs_utc_sys = requires (const time_point<_SourceClock, _Duration>& __t) { clock_time_conversion<_DestClock, system_clock>{}( clock_time_conversion<system_clock, utc_clock>{}( clock_time_conversion<utc_clock, _SourceClock>{}(__t))); }; } template<typename _DestClock, typename _SourceClock, typename _Duration> [[nodiscard]] auto clock_cast(const time_point<_SourceClock, _Duration>& __t) requires __detail::__clock_convs<_DestClock, _SourceClock, _Duration> || __detail::__clock_convs_sys<_DestClock, _SourceClock, _Duration> || __detail::__clock_convs_utc<_DestClock, _SourceClock, _Duration> || __detail::__clock_convs_sys_utc<_DestClock, _SourceClock, _Duration> || __detail::__clock_convs_utc_sys<_DestClock, _SourceClock, _Duration> ; class day; class month; class year; class weekday; class weekday_indexed; class weekday_last; class month_day; class month_day_last; class month_weekday; class month_weekday_last; class year_month; class year_month_day; class year_month_day_last; class year_month_weekday; class year_month_weekday_last; struct last_spec { explicit last_spec() = default; friend constexpr month_day_last operator/(int __m, last_spec) noexcept; friend constexpr month_day_last operator/(last_spec, int __m) noexcept; }; inline constexpr last_spec last{}; namespace __detail { constexpr unsigned __modulo(long long __n, unsigned __d) ; inline constexpr unsigned __days_per_month[12] = { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; } class day { private: unsigned char _M_d; public: day() = default; explicit constexpr day(unsigned __d) ; constexpr day& operator++() noexcept ; constexpr day operator++(int) noexcept ; constexpr day& operator--() noexcept ; constexpr day operator--(int) noexcept ; constexpr day& operator+=(const days& __d) noexcept ; constexpr day& operator-=(const days& __d) noexcept ; constexpr explicit operator unsigned() const noexcept ; constexpr bool ok() const noexcept ; friend constexpr bool operator==(const day& __x, const day& __y) noexcept ; friend constexpr strong_ordering operator<=>(const day& __x, const day& __y) noexcept ; friend constexpr day operator+(const day& __x, const days& __y) noexcept ; friend constexpr day operator+(const days& __x, const day& __y) noexcept ; friend constexpr day operator-(const day& __x, const days& __y) noexcept { return __x + -__y; } friend constexpr days operator-(const day& __x, const day& __y) noexcept { return days{int(unsigned{__x}) - int(unsigned{__y})}; } friend constexpr month_day operator/(const month& __m, const day& __d) noexcept; friend constexpr month_day operator/(int __m, const day& __d) noexcept; friend constexpr month_day operator/(const day& __d, const month& __m) noexcept; friend constexpr month_day operator/(const day& __d, int __m) noexcept; friend constexpr year_month_day operator/(const year_month& __ym, const day& __d) noexcept; }; class month { private: unsigned char _M_m; public: month() = default; explicit constexpr month(unsigned __m) noexcept : _M_m(__m) { } constexpr month& operator++() noexcept { *this += months{1}; return *this; } constexpr month operator++(int) noexcept { auto __ret = *this; ++(*this); return __ret; } constexpr month& operator--() noexcept ; constexpr month operator--(int) noexcept ; constexpr month& operator+=(const months& __m) noexcept ; constexpr month& operator-=(const months& __m) noexcept ; explicit constexpr operator unsigned() const noexcept ; constexpr bool ok() const noexcept ; friend constexpr bool operator==(const month& __x, const month& __y) noexcept ; friend constexpr strong_ordering operator<=>(const month& __x, const month& __y) noexcept ; friend constexpr month operator+(const month& __x, const months& __y) noexcept ; friend constexpr month operator+(const months& __x, const month& __y) noexcept { return __y + __x; } friend constexpr month operator-(const month& __x, const months& __y) noexcept ; friend constexpr months operator-(const month& __x, const month& __y) noexcept ; friend constexpr year_month operator/(const year& __y, const month& __m) noexcept; friend constexpr month_day operator/(const month& __m, int __d) noexcept; friend constexpr month_day_last operator/(const month& __m, last_spec) noexcept; friend constexpr month_day_last operator/(last_spec, const month& __m) noexcept; friend constexpr month_weekday operator/(const month& __m, const weekday_indexed& __wdi) noexcept; friend constexpr month_weekday operator/(const weekday_indexed& __wdi, const month& __m) noexcept; friend constexpr month_weekday_last operator/(const month& __m, const weekday_last& __wdl) noexcept; friend constexpr month_weekday_last operator/(const weekday_last& __wdl, const month& __m) noexcept; }; inline constexpr month January{1}; inline constexpr month February{2}; inline constexpr month March{3}; inline constexpr month April{4}; inline constexpr month May{5}; inline constexpr month June{6}; inline constexpr month July{7}; inline constexpr month August{8}; inline constexpr month September{9}; inline constexpr month October{10}; inline constexpr month November{11}; inline constexpr month December{12}; class year { private: short _M_y; public: year() = default; explicit constexpr year(int __y) ; static constexpr year min() noexcept ; static constexpr year max() noexcept ; constexpr year& operator++() noexcept ; constexpr year operator++(int) noexcept ; constexpr year& operator--() noexcept ; constexpr year operator--(int) noexcept ; constexpr year& operator+=(const years& __y) noexcept ; constexpr year& operator-=(const years& __y) noexcept ; constexpr year operator+() const noexcept ; constexpr year operator-() const noexcept ; constexpr bool is_leap() const noexcept ; explicit constexpr operator int() const noexcept ; constexpr bool ok() const noexcept ; friend constexpr bool operator==(const year& __x, const year& __y) noexcept ; friend constexpr strong_ordering operator<=>(const year& __x, const year& __y) noexcept ; friend constexpr year operator+(const year& __x, const years& __y) noexcept ; friend constexpr year operator+(const years& __x, const year& __y) noexcept ; friend constexpr year operator-(const year& __x, const years& __y) noexcept ; friend constexpr years operator-(const year& __x, const year& __y) noexcept ; friend constexpr year_month operator/(const year& __y, int __m) noexcept; friend constexpr year_month_day operator/(const year& __y, const month_day& __md) noexcept; friend constexpr year_month_day operator/(const month_day& __md, const year& __y) noexcept; friend constexpr year_month_day_last operator/(const year& __y, const month_day_last& __mdl) noexcept; friend constexpr year_month_day_last operator/(const month_day_last& __mdl, const year& __y) noexcept; friend constexpr year_month_weekday operator/(const year& __y, const month_weekday& __mwd) noexcept; friend constexpr year_month_weekday operator/(const month_weekday& __mwd, const year& __y) noexcept; friend constexpr year_month_weekday_last operator/(const year& __y, const month_weekday_last& __mwdl) noexcept; friend constexpr year_month_weekday_last operator/(const month_weekday_last& __mwdl, const year& __y) noexcept; }; class weekday { private: unsigned char _M_wd; static constexpr weekday _S_from_days(const days& __d) ; public: weekday() = default; explicit constexpr weekday(unsigned __wd) noexcept : _M_wd(__wd == 7 ? 0 : __wd) { } constexpr weekday(const sys_days& __dp) noexcept : weekday{_S_from_days(__dp.time_since_epoch())} { } explicit constexpr weekday(const local_days& __dp) noexcept : weekday{sys_days{__dp.time_since_epoch()}} { } constexpr weekday& operator++() noexcept { *this += days{1}; return *this; } constexpr weekday operator++(int) noexcept ; constexpr weekday& operator--() noexcept ; constexpr weekday operator--(int) noexcept ; constexpr weekday& operator+=(const days& __d) noexcept ; constexpr weekday& operator-=(const days& __d) noexcept ; constexpr unsigned c_encoding() const noexcept ; constexpr unsigned iso_encoding() const noexcept ; constexpr bool ok() const noexcept ; constexpr weekday_indexed operator[](unsigned __index) const noexcept; constexpr weekday_last operator[](last_spec) const noexcept; friend constexpr bool operator==(const weekday& __x, const weekday& __y) noexcept ; friend constexpr weekday operator+(const weekday& __x, const days& __y) noexcept ; friend constexpr weekday operator+(const days& __x, const weekday& __y) noexcept ; friend constexpr weekday operator-(const weekday& __x, const days& __y) noexcept ; friend constexpr days operator-(const weekday& __x, const weekday& __y) noexcept ; }; inline constexpr weekday Sunday{0}; inline constexpr weekday Monday{1}; inline constexpr weekday Tuesday{2}; inline constexpr weekday Wednesday{3}; inline constexpr weekday Thursday{4}; inline constexpr weekday Friday{5}; inline constexpr weekday Saturday{6}; class weekday_indexed { private: chrono::weekday _M_wd; unsigned char _M_index; public: weekday_indexed() = default; constexpr weekday_indexed(const chrono::weekday& __wd, unsigned __index) ; constexpr chrono::weekday weekday() const noexcept ; constexpr unsigned index() const noexcept ;; constexpr bool ok() const noexcept ; friend constexpr bool operator==(const weekday_indexed& __x, const weekday_indexed& __y) noexcept ; friend constexpr month_weekday operator/(const month& __m, const weekday_indexed& __wdi) noexcept; friend constexpr month_weekday operator/(int __m, const weekday_indexed& __wdi) noexcept; friend constexpr month_weekday operator/(const weekday_indexed& __wdi, const month& __m) noexcept; friend constexpr month_weekday operator/(const weekday_indexed& __wdi, int __m) noexcept; friend constexpr year_month_weekday operator/(const year_month& __ym, const weekday_indexed& __wdi) noexcept; }; class weekday_last { private: chrono::weekday _M_wd; public: explicit constexpr weekday_last(const chrono::weekday& __wd) ; constexpr chrono::weekday weekday() const noexcept ; constexpr bool ok() const noexcept ; friend constexpr bool operator==(const weekday_last& __x, const weekday_last& __y) noexcept ; friend constexpr month_weekday_last operator/(int __m, const weekday_last& __wdl) noexcept; friend constexpr month_weekday_last operator/(const weekday_last& __wdl, int __m) noexcept; friend constexpr year_month_weekday_last operator/(const year_month& __ym, const weekday_last& __wdl) noexcept; }; class month_day { private: chrono::month _M_m; chrono::day _M_d; public: month_day() = default; constexpr month_day(const chrono::month& __m, const chrono::day& __d) ; constexpr chrono::month month() const noexcept ; constexpr chrono::day day() const noexcept ; constexpr bool ok() const noexcept ; friend constexpr bool operator==(const month_day& __x, const month_day& __y) noexcept ; friend constexpr strong_ordering operator<=>(const month_day& __x, const month_day& __y) noexcept = default; friend constexpr month_day operator/(const chrono::month& __m, const chrono::day& __d) noexcept ; friend constexpr month_day operator/(const chrono::month& __m, int __d) noexcept ; friend constexpr month_day operator/(int __m, const chrono::day& __d) noexcept ; friend constexpr month_day operator/(const chrono::day& __d, const chrono::month& __m) noexcept ; friend constexpr month_day operator/(const chrono::day& __d, int __m) noexcept ; friend constexpr year_month_day operator/(int __y, const month_day& __md) noexcept; friend constexpr year_month_day operator/(const month_day& __md, int __y) noexcept; }; class month_day_last { private: chrono::month _M_m; public: explicit constexpr month_day_last(const chrono::month& __m) ; constexpr chrono::month month() const noexcept ; constexpr bool ok() const noexcept ; friend constexpr bool operator==(const month_day_last& __x, const month_day_last& __y) noexcept ; friend constexpr strong_ordering operator<=>(const month_day_last& __x, const month_day_last& __y) noexcept = default; friend constexpr month_day_last operator/(const chrono::month& __m, last_spec) noexcept ; friend constexpr month_day_last operator/(int __m, last_spec) noexcept ; friend constexpr month_day_last operator/(last_spec, const chrono::month& __m) noexcept ; friend constexpr month_day_last operator/(last_spec, int __m) noexcept ; friend constexpr year_month_day_last operator/(int __y, const month_day_last& __mdl) noexcept; friend constexpr year_month_day_last operator/(const month_day_last& __mdl, int __y) noexcept; }; class month_weekday { private: chrono::month _M_m; chrono::weekday_indexed _M_wdi; public: constexpr month_weekday(const chrono::month& __m, const chrono::weekday_indexed& __wdi) ; constexpr chrono::month month() const noexcept ; constexpr chrono::weekday_indexed weekday_indexed() const noexcept ; constexpr bool ok() const noexcept ; friend constexpr bool operator==(const month_weekday& __x, const month_weekday& __y) noexcept ; friend constexpr month_weekday operator/(const chrono::month& __m, const chrono::weekday_indexed& __wdi) noexcept ; friend constexpr month_weekday operator/(int __m, const chrono::weekday_indexed& __wdi) noexcept ; friend constexpr month_weekday operator/(const chrono::weekday_indexed& __wdi, const chrono::month& __m) noexcept ; friend constexpr month_weekday operator/(const chrono::weekday_indexed& __wdi, int __m) noexcept ; friend constexpr year_month_weekday operator/(int __y, const month_weekday& __mwd) noexcept; friend constexpr year_month_weekday operator/(const month_weekday& __mwd, int __y) noexcept; }; class month_weekday_last { private: chrono::month _M_m; chrono::weekday_last _M_wdl; public: constexpr month_weekday_last(const chrono::month& __m, const chrono::weekday_last& __wdl) ; constexpr chrono::month month() const noexcept ; constexpr chrono::weekday_last weekday_last() const noexcept ; constexpr bool ok() const noexcept ; friend constexpr bool operator==(const month_weekday_last& __x, const month_weekday_last& __y) noexcept ; friend constexpr month_weekday_last operator/(const chrono::month& __m, const chrono::weekday_last& __wdl) noexcept ; friend constexpr month_weekday_last operator/(int __m, const chrono::weekday_last& __wdl) noexcept ; friend constexpr month_weekday_last operator/(const chrono::weekday_last& __wdl, const chrono::month& __m) noexcept ; friend constexpr month_weekday_last operator/(const chrono::weekday_last& __wdl, int __m) noexcept ; friend constexpr year_month_weekday_last operator/(int __y, const month_weekday_last& __mwdl) noexcept; friend constexpr year_month_weekday_last operator/(const month_weekday_last& __mwdl, int __y) noexcept; }; namespace __detail { using __months_years_conversion_disambiguator = void; } class year_month { private: chrono::year _M_y; chrono::month _M_m; public: year_month() = default; constexpr year_month(const chrono::year& __y, const chrono::month& __m) ; constexpr chrono::year year() const noexcept ; constexpr chrono::month month() const noexcept ; template<typename = __detail::__months_years_conversion_disambiguator> constexpr year_month& operator+=(const months& __dm) noexcept ; template<typename = __detail::__months_years_conversion_disambiguator> constexpr year_month& operator-=(const months& __dm) noexcept ; constexpr year_month& operator+=(const years& __dy) noexcept ; constexpr year_month& operator-=(const years& __dy) noexcept ; constexpr bool ok() const noexcept ; friend constexpr bool operator==(const year_month& __x, const year_month& __y) noexcept ; friend constexpr strong_ordering operator<=>(const year_month& __x, const year_month& __y) noexcept = default; template<typename = __detail::__months_years_conversion_disambiguator> friend constexpr year_month operator+(const year_month& __ym, const months& __dm) noexcept { auto __m = __ym.month() + __dm; auto __i = int(unsigned(__ym.month())) - 1 + __dm.count(); auto __y = (__i < 0 ? __ym.year() + years{(__i - 11) / 12} : __ym.year() + years{__i / 12}); return __y / __m; } template<typename = __detail::__months_years_conversion_disambiguator> friend constexpr year_month operator+(const months& __dm, const year_month& __ym) noexcept { return __ym + __dm; } template<typename = __detail::__months_years_conversion_disambiguator> friend constexpr year_month operator-(const year_month& __ym, const months& __dm) noexcept { return __ym + -__dm; } friend constexpr months operator-(const year_month& __x, const year_month& __y) noexcept ; friend constexpr year_month operator+(const year_month& __ym, const years& __dy) noexcept ; friend constexpr year_month operator+(const years& __dy, const year_month& __ym) noexcept ; friend constexpr year_month operator-(const year_month& __ym, const years& __dy) noexcept ; friend constexpr year_month operator/(const chrono::year& __y, const chrono::month& __m) noexcept ; friend constexpr year_month operator/(const chrono::year& __y, int __m) noexcept ; friend constexpr year_month_day operator/(const year_month& __ym, int __d) noexcept; friend constexpr year_month_day_last operator/(const year_month& __ym, last_spec) noexcept; }; class year_month_day { private: chrono::year _M_y; chrono::month _M_m; chrono::day _M_d; static constexpr year_month_day _S_from_days(const days& __dp) noexcept; constexpr days _M_days_since_epoch() const noexcept; public: year_month_day() = default; constexpr year_month_day(const chrono::year& __y, const chrono::month& __m, const chrono::day& __d) ; constexpr year_month_day(const year_month_day_last& __ymdl) noexcept; constexpr year_month_day(const sys_days& __dp) ; explicit constexpr year_month_day(const local_days& __dp) ; template<typename = __detail::__months_years_conversion_disambiguator> constexpr year_month_day& operator+=(const months& __m) noexcept ; template<typename = __detail::__months_years_conversion_disambiguator> constexpr year_month_day& operator-=(const months& __m) noexcept ; constexpr year_month_day& operator+=(const years& __y) noexcept ; constexpr year_month_day& operator-=(const years& __y) noexcept ; constexpr chrono::year year() const noexcept ; constexpr chrono::month month() const noexcept ; constexpr chrono::day day() const noexcept ; constexpr operator sys_days() const noexcept ; explicit constexpr operator local_days() const noexcept ; constexpr bool ok() const noexcept; friend constexpr bool operator==(const year_month_day& __x, const year_month_day& __y) noexcept ; friend constexpr strong_ordering operator<=>(const year_month_day& __x, const year_month_day& __y) noexcept = default; template<typename = __detail::__months_years_conversion_disambiguator> friend constexpr year_month_day operator+(const year_month_day& __ymd, const months& __dm) noexcept { return (__ymd.year() / __ymd.month() + __dm) / __ymd.day(); } template<typename = __detail::__months_years_conversion_disambiguator> friend constexpr year_month_day operator+(const months& __dm, const year_month_day& __ymd) noexcept { return __ymd + __dm; } friend constexpr year_month_day operator+(const year_month_day& __ymd, const years& __dy) noexcept { return (__ymd.year() + __dy) / __ymd.month() / __ymd.day(); } friend constexpr year_month_day operator+(const years& __dy, const year_month_day& __ymd) noexcept { return __ymd + __dy; } template<typename = __detail::__months_years_conversion_disambiguator> friend constexpr year_month_day operator-(const year_month_day& __ymd, const months& __dm) noexcept { return __ymd + -__dm; } friend constexpr year_month_day operator-(const year_month_day& __ymd, const years& __dy) noexcept ; friend constexpr year_month_day operator/(const year_month& __ym, const chrono::day& __d) noexcept ; friend constexpr year_month_day operator/(const year_month& __ym, int __d) noexcept ; friend constexpr year_month_day operator/(const chrono::year& __y, const month_day& __md) noexcept ; friend constexpr year_month_day operator/(int __y, const month_day& __md) noexcept ; friend constexpr year_month_day operator/(const month_day& __md, const chrono::year& __y) noexcept ; friend constexpr year_month_day operator/(const month_day& __md, int __y) noexcept ; }; class year_month_day_last { private: chrono::year _M_y; chrono::month_day_last _M_mdl; public: constexpr year_month_day_last(const chrono::year& __y, const chrono::month_day_last& __mdl) ; template<typename = __detail::__months_years_conversion_disambiguator> constexpr year_month_day_last& operator+=(const months& __m) noexcept ; template<typename = __detail::__months_years_conversion_disambiguator> constexpr year_month_day_last& operator-=(const months& __m) noexcept ; constexpr year_month_day_last& operator+=(const years& __y) noexcept ; constexpr year_month_day_last& operator-=(const years& __y) noexcept ; constexpr chrono::year year() const noexcept ; constexpr chrono::month month() const noexcept ; constexpr chrono::month_day_last month_day_last() const noexcept ; constexpr chrono::day day() const noexcept ; constexpr operator sys_days() const noexcept ; explicit constexpr operator local_days() const noexcept ; constexpr bool ok() const noexcept ; friend constexpr bool operator==(const year_month_day_last& __x, const year_month_day_last& __y) noexcept { return __x.year() == __y.year() && __x.month_day_last() == __y.month_day_last(); } friend constexpr strong_ordering operator<=>(const year_month_day_last& __x, const year_month_day_last& __y) noexcept = default; template<typename = __detail::__months_years_conversion_disambiguator> friend constexpr year_month_day_last operator+(const year_month_day_last& __ymdl, const months& __dm) noexcept { return (__ymdl.year() / __ymdl.month() + __dm) / last; } template<typename = __detail::__months_years_conversion_disambiguator> friend constexpr year_month_day_last operator+(const months& __dm, const year_month_day_last& __ymdl) noexcept { return __ymdl + __dm; } template<typename = __detail::__months_years_conversion_disambiguator> friend constexpr year_month_day_last operator-(const year_month_day_last& __ymdl, const months& __dm) noexcept { return __ymdl + -__dm; } friend constexpr year_month_day_last operator+(const year_month_day_last& __ymdl, const years& __dy) noexcept ; friend constexpr year_month_day_last operator+(const years& __dy, const year_month_day_last& __ymdl) noexcept ; friend constexpr year_month_day_last operator-(const year_month_day_last& __ymdl, const years& __dy) noexcept ; friend constexpr year_month_day_last operator/(const year_month& __ym, last_spec) noexcept ; friend constexpr year_month_day_last operator/(const chrono::year& __y, const chrono::month_day_last& __mdl) noexcept ; friend constexpr year_month_day_last operator/(int __y, const chrono::month_day_last& __mdl) noexcept ; friend constexpr year_month_day_last operator/(const chrono::month_day_last& __mdl, const chrono::year& __y) noexcept ; friend constexpr year_month_day_last operator/(const chrono::month_day_last& __mdl, int __y) noexcept ; }; class year_month_weekday { private: chrono::year _M_y; chrono::month _M_m; chrono::weekday_indexed _M_wdi; static constexpr year_month_weekday _S_from_sys_days(const sys_days& __dp) ; public: year_month_weekday() = default; constexpr year_month_weekday(const chrono::year& __y, const chrono::month& __m, const chrono::weekday_indexed& __wdi) ; constexpr year_month_weekday(const sys_days& __dp) ; explicit constexpr year_month_weekday(const local_days& __dp) ; template<typename = __detail::__months_years_conversion_disambiguator> constexpr year_month_weekday& operator+=(const months& __m) noexcept ; template<typename = __detail::__months_years_conversion_disambiguator> constexpr year_month_weekday& operator-=(const months& __m) noexcept ; constexpr year_month_weekday& operator+=(const years& __y) noexcept ; constexpr year_month_weekday& operator-=(const years& __y) noexcept ; constexpr chrono::year year() const noexcept ; constexpr chrono::month month() const noexcept ; constexpr chrono::weekday weekday() const noexcept ; constexpr unsigned index() const noexcept ; constexpr chrono::weekday_indexed weekday_indexed() const noexcept ; constexpr operator sys_days() const noexcept ; explicit constexpr operator local_days() const noexcept ; constexpr bool ok() const noexcept ; friend constexpr bool operator==(const year_month_weekday& __x, const year_month_weekday& __y) noexcept ; template<typename = __detail::__months_years_conversion_disambiguator> friend constexpr year_month_weekday operator+(const year_month_weekday& __ymwd, const months& __dm) noexcept { return ((__ymwd.year() / __ymwd.month() + __dm) / __ymwd.weekday_indexed()); } template<typename = __detail::__months_years_conversion_disambiguator> friend constexpr year_month_weekday operator+(const months& __dm, const year_month_weekday& __ymwd) noexcept { return __ymwd + __dm; } friend constexpr year_month_weekday operator+(const year_month_weekday& __ymwd, const years& __dy) noexcept { return {__ymwd.year() + __dy, __ymwd.month(), __ymwd.weekday_indexed()}; } friend constexpr year_month_weekday operator+(const years& __dy, const year_month_weekday& __ymwd) noexcept { return __ymwd + __dy; } template<typename = __detail::__months_years_conversion_disambiguator> friend constexpr year_month_weekday operator-(const year_month_weekday& __ymwd, const months& __dm) noexcept { return __ymwd + -__dm; } friend constexpr year_month_weekday operator-(const year_month_weekday& __ymwd, const years& __dy) noexcept { return __ymwd + -__dy; } friend constexpr year_month_weekday operator/(const year_month& __ym, const chrono::weekday_indexed& __wdi) noexcept { return {__ym.year(), __ym.month(), __wdi}; } friend constexpr year_month_weekday operator/(const chrono::year& __y, const month_weekday& __mwd) noexcept { return {__y, __mwd.month(), __mwd.weekday_indexed()}; } friend constexpr year_month_weekday operator/(int __y, const month_weekday& __mwd) noexcept ; friend constexpr year_month_weekday operator/(const month_weekday& __mwd, const chrono::year& __y) noexcept ; friend constexpr year_month_weekday operator/(const month_weekday& __mwd, int __y) noexcept ; }; class year_month_weekday_last { private: chrono::year _M_y; chrono::month _M_m; chrono::weekday_last _M_wdl; public: constexpr year_month_weekday_last(const chrono::year& __y, const chrono::month& __m, const chrono::weekday_last& __wdl) ; template<typename = __detail::__months_years_conversion_disambiguator> constexpr year_month_weekday_last& operator+=(const months& __m) noexcept ; template<typename = __detail::__months_years_conversion_disambiguator> constexpr year_month_weekday_last& operator-=(const months& __m) noexcept ; constexpr year_month_weekday_last& operator+=(const years& __y) noexcept ; constexpr year_month_weekday_last& operator-=(const years& __y) noexcept ; constexpr chrono::year year() const noexcept ; constexpr chrono::month month() const noexcept ; constexpr chrono::weekday weekday() const noexcept ; constexpr chrono::weekday_last weekday_last() const noexcept ; constexpr operator sys_days() const noexcept ; explicit constexpr operator local_days() const noexcept { return local_days{sys_days{*this}.time_since_epoch()}; } constexpr bool ok() const noexcept { return _M_y.ok() && _M_m.ok() && _M_wdl.ok(); } friend constexpr bool operator==(const year_month_weekday_last& __x, const year_month_weekday_last& __y) noexcept { return __x.year() == __y.year() && __x.month() == __y.month() && __x.weekday_last() == __y.weekday_last(); } template<typename = __detail::__months_years_conversion_disambiguator> friend constexpr year_month_weekday_last operator+(const year_month_weekday_last& __ymwdl, const months& __dm) noexcept { return ((__ymwdl.year() / __ymwdl.month() + __dm) / __ymwdl.weekday_last()); } template<typename = __detail::__months_years_conversion_disambiguator> friend constexpr year_month_weekday_last operator+(const months& __dm, const year_month_weekday_last& __ymwdl) noexcept { return __ymwdl + __dm; } friend constexpr year_month_weekday_last operator+(const year_month_weekday_last& __ymwdl, const years& __dy) noexcept { return {__ymwdl.year() + __dy, __ymwdl.month(), __ymwdl.weekday_last()}; } friend constexpr year_month_weekday_last operator+(const years& __dy, const year_month_weekday_last& __ymwdl) noexcept { return __ymwdl + __dy; } template<typename = __detail::__months_years_conversion_disambiguator> friend constexpr year_month_weekday_last operator-(const year_month_weekday_last& __ymwdl, const months& __dm) noexcept { return __ymwdl + -__dm; } friend constexpr year_month_weekday_last operator-(const year_month_weekday_last& __ymwdl, const years& __dy) noexcept ; friend constexpr year_month_weekday_last operator/(const year_month& __ym, const chrono::weekday_last& __wdl) noexcept ; friend constexpr year_month_weekday_last operator/(const chrono::year& __y, const chrono::month_weekday_last& __mwdl) noexcept ; friend constexpr year_month_weekday_last operator/(int __y, const chrono::month_weekday_last& __mwdl) noexcept ; friend constexpr year_month_weekday_last operator/(const chrono::month_weekday_last& __mwdl, const chrono::year& __y) noexcept ; friend constexpr year_month_weekday_last operator/(const chrono::month_weekday_last& __mwdl, int __y) noexcept ; }; namespace __detail { consteval long long __pow10(unsigned __n) ; template<typename _Duration> struct __utc_leap_second; } template<typename _Duration> class hh_mm_ss { static_assert( __is_duration<_Duration>::value ); private: static consteval int _S_fractional_width() ; constexpr hh_mm_ss(_Duration __d, bool __is_neg) ; static constexpr _Duration _S_abs(_Duration __d) ; public: static constexpr unsigned fractional_width = {_S_fractional_width()}; using precision = duration<common_type_t<typename _Duration::rep, chrono::seconds::rep>, ratio<1, __detail::__pow10(fractional_width)>>; constexpr hh_mm_ss() noexcept = default; constexpr explicit hh_mm_ss(_Duration __d) ; constexpr bool is_negative() const noexcept ; constexpr chrono::hours hours() const noexcept ; constexpr chrono::minutes minutes() const noexcept ; constexpr chrono::seconds seconds() const noexcept ; constexpr precision subseconds() const noexcept ; constexpr explicit operator precision() const noexcept ; constexpr precision to_duration() const noexcept ; private: static constexpr bool _S_is_unsigned = __and_v<is_integral<typename _Duration::rep>, is_unsigned<typename _Duration::rep>>; template<typename _Ratio> using __byte_duration = duration<unsigned char, _Ratio>; template<typename _Dur> struct __subseconds { typename _Dur::rep _M_r{}; constexpr explicit operator _Dur() const noexcept ; }; template<typename _Rep> requires (!treat_as_floating_point_v<_Rep>) struct __subseconds<duration<_Rep, ratio<1>>> { constexpr explicit operator duration<_Rep, ratio<1>>() const noexcept ; }; template<typename _Tp> static constexpr bool __fits = duration_values<typename _Duration::rep>::max() <= duration_values<_Tp>::max(); template<typename _Rep, typename _Period> requires (!treat_as_floating_point_v<_Rep>) && ratio_less_v<_Period, ratio<1, 1>> && (ratio_greater_equal_v<_Period, ratio<1, 250>> || __fits<unsigned char>) struct __subseconds<duration<_Rep, _Period>> { unsigned char _M_r{}; constexpr explicit operator duration<_Rep, _Period>() const noexcept ; }; template<typename _Rep, typename _Period> requires (!treat_as_floating_point_v<_Rep>) && ratio_less_v<_Period, ratio<1, 250>> && (ratio_greater_equal_v<_Period, ratio<1, 4000000000>> || __fits<uint_least32_t>) struct __subseconds<duration<_Rep, _Period>> { uint_least32_t _M_r{}; constexpr explicit operator duration<_Rep, _Period>() const noexcept ; }; chrono::hours _M_h{}; __byte_duration<ratio<60>> _M_m{}; __byte_duration<ratio<1>> _M_s{}; bool _M_is_neg{}; __subseconds<precision> _M_ss{}; template<typename> friend struct __detail::__utc_leap_second; }; namespace __detail { template<typename _Duration> struct __utc_leap_second { explicit __utc_leap_second(const sys_time<_Duration>& __s) ; sys_days _M_date; hh_mm_ss<common_type_t<_Duration, days>> _M_time; }; } constexpr bool is_am(const hours& __h) noexcept ; constexpr bool is_pm(const hours& __h) noexcept ; constexpr hours make12(const hours& __h) noexcept ; constexpr hours make24(const hours& __h, bool __is_pm) noexcept ; struct tzdb; struct sys_info { sys_seconds begin; sys_seconds end; seconds offset; minutes save; string abbrev; }; struct local_info { static constexpr int unique = 0; static constexpr int nonexistent = 1; static constexpr int ambiguous = 2; int result; sys_info first; sys_info second; }; class nonexistent_local_time : public runtime_error { public: template<typename _Duration> nonexistent_local_time(const local_time<_Duration>& __tp, const local_info& __i) ; private: template<typename _Duration> static string _S_make_what_str(const local_time<_Duration>& __tp, const local_info& __i) ; }; class ambiguous_local_time : public runtime_error { public: template<typename _Duration> ambiguous_local_time(const local_time<_Duration>& __tp, const local_info& __i) ; private: template<typename _Duration> static string _S_make_what_str(const local_time<_Duration>& __tp, const local_info& __i) ; }; template<typename _Duration> [[noreturn]] void __throw_bad_local_time(const local_time<_Duration>& __tp, const local_info& __i) ; enum class choose { earliest, latest }; class time_zone { public: time_zone(time_zone&&) = default; time_zone& operator=(time_zone&&) = default; ~time_zone(); [[nodiscard]] string_view name() const noexcept ; template<typename _Duration> sys_info get_info(const sys_time<_Duration>& __st) const ; template<typename _Duration> local_info get_info(const local_time<_Duration>& __tp) const ; template<typename _Duration> sys_time<common_type_t<_Duration, seconds>> to_sys(const local_time<_Duration>& __tp) const ; template<typename _Duration> sys_time<common_type_t<_Duration, seconds>> to_sys(const local_time<_Duration>& __tp, choose __z) const { local_info __info = get_info(__tp); if (__info.result == local_info::nonexistent) return __info.first.end; sys_time<_Duration> __st(__tp.time_since_epoch()); if (__info.result == local_info::ambiguous && __z == choose::latest) return __st - __info.second.offset; return __st - __info.first.offset; } template<typename _Duration> local_time<common_type_t<_Duration, seconds>> to_local(const sys_time<_Duration>& __tp) const { auto __d = (__tp + get_info(__tp).offset).time_since_epoch(); return local_time<common_type_t<_Duration, seconds>>(__d); } [[nodiscard]] friend bool operator==(const time_zone& __x, const time_zone& __y) noexcept { return __x._M_name == __y._M_name; } [[nodiscard]] friend strong_ordering operator<=>(const time_zone& __x, const time_zone& __y) noexcept { return __x._M_name <=> __y._M_name; } private: sys_info _M_get_sys_info(sys_seconds) const; local_info _M_get_local_info(local_seconds) const; friend const tzdb& reload_tzdb(); friend struct tzdb; friend class tzdb_list; struct _Impl; explicit time_zone(unique_ptr<_Impl> __p); string _M_name; unique_ptr<_Impl> _M_impl; }; const time_zone* locate_zone(string_view __tz_name); const time_zone* current_zone(); class tzdb_list { struct _Node; public: tzdb_list(const tzdb_list&) = delete; tzdb_list& operator=(const tzdb_list&) = delete; class const_iterator { public: using value_type = tzdb; using reference = const tzdb&; using pointer = const tzdb*; using difference_type = ptrdiff_t; using iterator_category = forward_iterator_tag; constexpr const_iterator() = default; const_iterator(const const_iterator&) = default; const_iterator(const_iterator&&) = default; const_iterator& operator=(const const_iterator&) = default; const_iterator& operator=(const_iterator&&) = default; reference operator*() const noexcept; pointer operator->() const noexcept ; const_iterator& operator++(); const_iterator operator++(int); bool operator==(const const_iterator&) const noexcept = default; private: explicit const_iterator(const shared_ptr<_Node>&) noexcept; friend class tzdb_list; shared_ptr<_Node> _M_node; void* _M_reserved = nullptr; }; const tzdb& front() const noexcept; const_iterator erase_after(const_iterator __p); const_iterator begin() const noexcept; const_iterator end() const noexcept ; const_iterator cbegin() const noexcept ; const_iterator cend() const noexcept ; private: constexpr explicit tzdb_list(nullptr_t); friend tzdb_list& get_tzdb_list(); friend const tzdb& get_tzdb(); friend const tzdb& reload_tzdb(); friend struct tzdb; friend class leap_second; friend struct time_zone::_Impl; friend class time_zone_link; }; class time_zone_link { public: time_zone_link(time_zone_link&&) = default; time_zone_link& operator=(time_zone_link&&) = default; string_view name() const noexcept ; string_view target() const noexcept ; friend bool operator==(const time_zone_link& __x, const time_zone_link& __y) noexcept ; friend strong_ordering operator<=>(const time_zone_link& __x, const time_zone_link& __y) noexcept ; private: friend const tzdb& reload_tzdb(); friend struct tzdb_list::_Node; explicit time_zone_link(nullptr_t) { } string _M_name; string _M_target; }; class leap_second { public: leap_second(const leap_second&) = default; leap_second& operator=(const leap_second&) = default; [[nodiscard]] constexpr sys_seconds date() const noexcept { if (_M_s >= _M_s.zero()) [[likely]] return sys_seconds(_M_s); return sys_seconds(-_M_s); } [[nodiscard]] constexpr seconds value() const noexcept { if (_M_s >= _M_s.zero()) [[likely]] return seconds(1); return seconds(-1); } [[nodiscard]] friend constexpr bool operator==(const leap_second&, const leap_second&) noexcept = default; [[nodiscard]] friend constexpr strong_ordering operator<=>(const leap_second& __x, const leap_second& __y) noexcept { return __x.date() <=> __y.date(); } template<typename _Duration> [[nodiscard]] friend constexpr bool operator==(const leap_second& __x, const sys_time<_Duration>& __y) noexcept { return __x.date() == __y; } template<typename _Duration> [[nodiscard]] friend constexpr bool operator<(const leap_second& __x, const sys_time<_Duration>& __y) noexcept { return __x.date() < __y; } template<typename _Duration> [[nodiscard]] friend constexpr bool operator<(const sys_time<_Duration>& __x, const leap_second& __y) noexcept { return __x < __y.date(); } template<typename _Duration> [[nodiscard]] friend constexpr bool operator>(const leap_second& __x, const sys_time<_Duration>& __y) noexcept { return __y < __x.date(); } template<typename _Duration> [[nodiscard]] friend constexpr bool operator>(const sys_time<_Duration>& __x, const leap_second& __y) noexcept { return __y.date() < __x; } template<typename _Duration> [[nodiscard]] friend constexpr bool operator<=(const leap_second& __x, const sys_time<_Duration>& __y) noexcept { return !(__y < __x.date()); } template<typename _Duration> [[nodiscard]] friend constexpr bool operator<=(const sys_time<_Duration>& __x, const leap_second& __y) noexcept { return !(__y.date() < __x); } template<typename _Duration> [[nodiscard]] friend constexpr bool operator>=(const leap_second& __x, const sys_time<_Duration>& __y) noexcept { return !(__x.date() < __y); } template<typename _Duration> [[nodiscard]] friend constexpr bool operator>=(const sys_time<_Duration>& __x, const leap_second& __y) noexcept { return !(__x < __y.date()); } template<three_way_comparable_with<seconds> _Duration> [[nodiscard]] friend constexpr auto operator<=>(const leap_second& __x, const sys_time<_Duration>& __y) noexcept { return __x.date() <=> __y; } private: explicit leap_second(seconds::rep __s) : _M_s(__s) { } friend struct tzdb_list::_Node; friend const tzdb& reload_tzdb(); template<typename _Duration> friend leap_second_info get_leap_second_info(const utc_time<_Duration>&); seconds _M_s; }; template<class _Tp> struct zoned_traits { }; template<> struct zoned_traits<const time_zone*> { static const time_zone* default_zone() { return std::chrono::locate_zone("UTC"); } static const time_zone* locate_zone(string_view __name) { return std::chrono::locate_zone(__name); } }; struct tzdb { string version; std::vector<time_zone> zones; std::vector<time_zone_link> links; std::vector<leap_second> leap_seconds; const time_zone* locate_zone(string_view __tz_name) const; const time_zone* current_zone() const; private: friend const tzdb& reload_tzdb(); friend class time_zone; friend struct tzdb_list::_Node; }; tzdb_list& get_tzdb_list(); const tzdb& get_tzdb(); const tzdb& reload_tzdb(); string remote_version(); template<typename _Duration, typename _TimeZonePtr = const time_zone*> class zoned_time { static_assert(__is_duration_v<_Duration>); using _Traits = zoned_traits<_TimeZonePtr>; using string_view = type_identity_t<std::string_view>; public: using duration = common_type_t<_Duration, seconds>; zoned_time() requires requires { _Traits::default_zone(); } { } zoned_time(const zoned_time&) = default; zoned_time& operator=(const zoned_time&) = default; zoned_time(const sys_time<_Duration>& __st) requires requires { _Traits::default_zone(); } : _M_tp(__st) { } explicit zoned_time(_TimeZonePtr __z) : _M_zone(std::move(__z)) { } explicit zoned_time(string_view __name) requires requires { _TimeZonePtr{_Traits::locate_zone(std::string_view{})}; } : _M_zone(_Traits::locate_zone(__name)) { } template<typename _Duration2> zoned_time(const zoned_time<_Duration2, _TimeZonePtr>& __zt) requires is_convertible_v<sys_time<_Duration2>, sys_time<_Duration>> : _M_zone(__zt._M_zone), _M_tp(__zt._M_tp) { } zoned_time(_TimeZonePtr __z, const sys_time<_Duration>& __st) : _M_zone(std::move(__z)), _M_tp(__st) { } zoned_time(string_view __name, const sys_time<_Duration>& __st) : zoned_time(_Traits::locate_zone(__name), __st) { } zoned_time(_TimeZonePtr __z, const local_time<_Duration>& __tp) requires requires { { __z->to_sys(__tp) } -> convertible_to<sys_time<_Duration>>; } : _M_zone(std::move(__z)), _M_tp(_M_zone->to_sys(__tp)) { } zoned_time(string_view __name, const local_time<_Duration>& __tp) requires requires (_TimeZonePtr __z) { { _Traits::locate_zone(__name) } -> convertible_to<_TimeZonePtr>; { __z->to_sys(__tp) } -> convertible_to<sys_time<_Duration>>; } : zoned_time(_Traits::locate_zone(__name), __tp) { } zoned_time(_TimeZonePtr __z, const local_time<_Duration>& __tp, choose __c) requires requires { { __z->to_sys(__tp, __c) } -> convertible_to<sys_time<_Duration>>; } : _M_zone(std::move(__z)), _M_tp(_M_zone->to_sys(__tp, __c)) { } zoned_time(string_view __name, const local_time<_Duration>& __tp, choose __c) requires requires (_TimeZonePtr __z) { { _Traits::locate_zone(__name) } -> convertible_to<_TimeZonePtr>; { __z->to_sys(__tp, __c) } -> convertible_to<sys_time<_Duration>>; } : _M_zone(_Traits::locate_zone(__name)), _M_tp(_M_zone->to_sys(__tp, __c)) { } template<typename _Duration2, typename _TimeZonePtr2> zoned_time(_TimeZonePtr __z, const zoned_time<_Duration2, _TimeZonePtr2>& __zt) requires is_convertible_v<sys_time<_Duration2>, sys_time<_Duration>> : _M_zone(__z), _M_tp(__zt._M_tp) { } template<typename _Duration2, typename _TimeZonePtr2> zoned_time(_TimeZonePtr __z, const zoned_time<_Duration2, _TimeZonePtr2>& __zt, choose) requires is_convertible_v<sys_time<_Duration2>, sys_time<_Duration>> : _M_zone(__z), _M_tp(__zt._M_tp) { } template<typename _Duration2, typename _TimeZonePtr2> zoned_time(string_view __name, const zoned_time<_Duration2, _TimeZonePtr2>& __zt) requires is_convertible_v<sys_time<_Duration2>, sys_time<_Duration>> && requires { { _Traits::locate_zone(__name) } -> convertible_to<_TimeZonePtr>; } : _M_zone(_Traits::locate_zone(__name)), _M_tp(__zt._M_tp) { } template<typename _Duration2, typename _TimeZonePtr2> zoned_time(string_view __name, const zoned_time<_Duration2, _TimeZonePtr2>& __zt, choose) requires is_convertible_v<sys_time<_Duration2>, sys_time<_Duration>> && requires { { _Traits::locate_zone(__name) } -> convertible_to<_TimeZonePtr>; } : _M_zone(_Traits::locate_zone(__name)), _M_tp(__zt._M_tp) { } zoned_time& operator=(const sys_time<_Duration>& __st) ; zoned_time& operator=(const local_time<_Duration>& __lt) ; [[nodiscard]] operator sys_time<duration>() const ; [[nodiscard]] explicit operator local_time<duration>() const ; [[nodiscard]] _TimeZonePtr get_time_zone() const ; [[nodiscard]] local_time<duration> get_local_time() const ; [[nodiscard]] sys_time<duration> get_sys_time() const ; [[nodiscard]] sys_info get_info() const ; [[nodiscard]] friend bool operator==(const zoned_time&, const zoned_time&) = default; private: _TimeZonePtr _M_zone{ _Traits::default_zone() }; sys_time<duration> _M_tp{}; template<typename _Duration2, typename _TimeZonePtr2> friend class zoned_time; }; zoned_time() -> zoned_time<seconds>; template<typename _Duration> zoned_time(sys_time<_Duration>) -> zoned_time<common_type_t<_Duration, seconds>>; template<typename _TimeZonePtrOrName> using __time_zone_representation = __conditional_t<is_convertible_v<_TimeZonePtrOrName, string_view>, const time_zone*, remove_cvref_t<_TimeZonePtrOrName>>; template<typename _TimeZonePtrOrName> zoned_time(_TimeZonePtrOrName&&) -> zoned_time<seconds, __time_zone_representation<_TimeZonePtrOrName>>; template<typename _TimeZonePtrOrName, typename _Duration> zoned_time(_TimeZonePtrOrName&&, sys_time<_Duration>) -> zoned_time<common_type_t<_Duration, seconds>, __time_zone_representation<_TimeZonePtrOrName>>; template<typename _TimeZonePtrOrName, typename _Duration> zoned_time(_TimeZonePtrOrName&&, local_time<_Duration>, choose = choose::earliest) -> zoned_time<common_type_t<_Duration, seconds>, __time_zone_representation<_TimeZonePtrOrName>>; template<typename _Duration, typename _TimeZonePtrOrName, typename _TimeZonePtr2> zoned_time(_TimeZonePtrOrName&&, zoned_time<_Duration, _TimeZonePtr2>, choose = choose::earliest) -> zoned_time<common_type_t<_Duration, seconds>, __time_zone_representation<_TimeZonePtrOrName>>; template<typename _Dur1, typename _TZPtr1, typename _Dur2, typename _TZPtr2> [[nodiscard]] bool operator==(const zoned_time<_Dur1, _TZPtr1>& __x, const zoned_time<_Dur2, _TZPtr2>& __y) ; using zoned_seconds = zoned_time<seconds>; namespace __detail { leap_second_info __get_leap_second_info(sys_seconds __ss, bool __is_utc) ; } template<typename _Duration> [[nodiscard]] leap_second_info get_leap_second_info(const utc_time<_Duration>& __ut) ; } inline namespace literals { inline namespace chrono_literals { #pragma GCC diagnostic push constexpr chrono::day operator""d(unsigned long long __d) noexcept ; constexpr chrono::year operator""y(unsigned long long __y) noexcept ; #pragma GCC diagnostic pop } } } namespace std __attribute__ ((__visibility__ ("default"))) { class time_base { public: enum dateorder { no_order, dmy, mdy, ymd, ydm }; }; template<typename _CharT> struct __timepunct_cache : public locale::facet { static const _CharT* _S_timezones[14]; const _CharT* _M_date_format; const _CharT* _M_date_era_format; const _CharT* _M_time_format; const _CharT* _M_time_era_format; const _CharT* _M_date_time_format; const _CharT* _M_date_time_era_format; const _CharT* _M_am; const _CharT* _M_pm; const _CharT* _M_am_pm_format; const _CharT* _M_day1; const _CharT* _M_day2; const _CharT* _M_day3; const _CharT* _M_day4; const _CharT* _M_day5; const _CharT* _M_day6; const _CharT* _M_day7; const _CharT* _M_aday1; const _CharT* _M_aday2; const _CharT* _M_aday3; const _CharT* _M_aday4; const _CharT* _M_aday5; const _CharT* _M_aday6; const _CharT* _M_aday7; const _CharT* _M_month01; const _CharT* _M_month02; const _CharT* _M_month03; const _CharT* _M_month04; const _CharT* _M_month05; const _CharT* _M_month06; const _CharT* _M_month07; const _CharT* _M_month08; const _CharT* _M_month09; const _CharT* _M_month10; const _CharT* _M_month11; const _CharT* _M_month12; const _CharT* _M_amonth01; const _CharT* _M_amonth02; const _CharT* _M_amonth03; const _CharT* _M_amonth04; const _CharT* _M_amonth05; const _CharT* _M_amonth06; const _CharT* _M_amonth07; const _CharT* _M_amonth08; const _CharT* _M_amonth09; const _CharT* _M_amonth10; const _CharT* _M_amonth11; const _CharT* _M_amonth12; bool _M_allocated; __timepunct_cache(size_t __refs = 0) ; ~__timepunct_cache(); private: __timepunct_cache& operator=(const __timepunct_cache&); explicit __timepunct_cache(const __timepunct_cache&); }; template<> const char* __timepunct_cache<char>::_S_timezones[14]; template<> const wchar_t* __timepunct_cache<wchar_t>::_S_timezones[14]; template<typename _CharT> const _CharT* __timepunct_cache<_CharT>::_S_timezones[14]; template<typename _CharT> class __timepunct : public locale::facet { public: typedef _CharT __char_type; typedef __timepunct_cache<_CharT> __cache_type; protected: __cache_type* _M_data; __c_locale _M_c_locale_timepunct; const char* _M_name_timepunct; public: static locale::id id; explicit __timepunct(size_t __refs = 0); explicit __timepunct(__cache_type* __cache, size_t __refs = 0); ; protected: ; void _M_initialize_timepunct(__c_locale __cloc = 0); }; template<typename _CharT> locale::id __timepunct<_CharT>::id; template<> void __timepunct<char>::_M_initialize_timepunct(__c_locale __cloc); template<> void __timepunct<wchar_t>::_M_initialize_timepunct(__c_locale __cloc); } namespace std __attribute__ ((__visibility__ ("default"))) { } namespace std __attribute__ ((__visibility__ ("default"))) { struct __time_get_state { unsigned int _M_have_I : 1; unsigned int _M_have_wday : 1; unsigned int _M_have_yday : 1; unsigned int _M_have_mon : 1; unsigned int _M_have_mday : 1; unsigned int _M_have_uweek : 1; unsigned int _M_have_wweek : 1; unsigned int _M_have_century : 1; unsigned int _M_is_pm : 1; unsigned int _M_want_century : 1; unsigned int _M_want_xday : 1; unsigned int _M_pad1 : 5; unsigned int _M_week_no : 6; unsigned int _M_pad2 : 10; int _M_century; int _M_pad3; }; namespace __cxx11 { template<typename _CharT, typename _InIter> class time_get : public locale::facet, public time_base { public: typedef _CharT char_type; typedef _InIter iter_type; static locale::id id; protected: virtual dateorder do_date_order() const; virtual iter_type do_get_time(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, tm* __tm) const; virtual iter_type do_get_date(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, tm* __tm) const; virtual iter_type do_get_weekday(iter_type __beg, iter_type __end, ios_base&, ios_base::iostate& __err, tm* __tm) const; virtual iter_type do_get_monthname(iter_type __beg, iter_type __end, ios_base&, ios_base::iostate& __err, tm* __tm) const; virtual iter_type do_get_year(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, tm* __tm) const; virtual iter_type do_get(iter_type __s, iter_type __end, ios_base& __f, ios_base::iostate& __err, tm* __tm, char __format, char __modifier) const; }; template<typename _CharT, typename _InIter> locale::id time_get<_CharT, _InIter>::id; template<typename _CharT, typename _InIter> class time_get_byname : public time_get<_CharT, _InIter> { public: typedef _CharT char_type; typedef _InIter iter_type; protected: }; } template<typename _CharT, typename _OutIter> class time_put : public locale::facet { public: typedef _CharT char_type; typedef _OutIter iter_type; static locale::id id; protected: }; template<typename _CharT, typename _OutIter> locale::id time_put<_CharT, _OutIter>::id; template<typename _CharT, typename _OutIter> class time_put_byname : public time_put<_CharT, _OutIter> { public: typedef _CharT char_type; typedef _OutIter iter_type; protected: }; class money_base { public: enum part { none, space, symbol, sign, value }; struct pattern { char field[4]; }; static const pattern _S_default_pattern; enum { _S_minus, _S_zero, _S_end = 11 }; static const char* _S_atoms; }; template<typename _CharT, bool _Intl> struct __moneypunct_cache : public locale::facet { const char* _M_grouping; size_t _M_grouping_size; bool _M_use_grouping; _CharT _M_decimal_point; _CharT _M_thousands_sep; const _CharT* _M_curr_symbol; size_t _M_curr_symbol_size; const _CharT* _M_positive_sign; size_t _M_positive_sign_size; const _CharT* _M_negative_sign; size_t _M_negative_sign_size; int _M_frac_digits; money_base::pattern _M_pos_format; money_base::pattern _M_neg_format; _CharT _M_atoms[money_base::_S_end]; bool _M_allocated; private: }; namespace __cxx11 { template<typename _CharT, bool _Intl> class moneypunct : public locale::facet, public money_base { public: typedef _CharT char_type; typedef basic_string<_CharT> string_type; typedef __moneypunct_cache<_CharT, _Intl> __cache_type; private: __cache_type* _M_data; public: static const bool intl = _Intl; static locale::id id; protected: }; template<typename _CharT, bool _Intl> locale::id moneypunct<_CharT, _Intl>::id; template<typename _CharT, bool _Intl> const bool moneypunct<_CharT, _Intl>::intl; template<typename _CharT, bool _Intl> class moneypunct_byname : public moneypunct<_CharT, _Intl> { public: typedef _CharT char_type; typedef basic_string<_CharT> string_type; static const bool intl = _Intl; protected: }; template<typename _CharT, bool _Intl> const bool moneypunct_byname<_CharT, _Intl>::intl; } namespace __cxx11 { template<typename _CharT, typename _InIter> class money_get : public locale::facet { public: typedef _CharT char_type; typedef _InIter iter_type; typedef basic_string<_CharT> string_type; static locale::id id; protected: ; }; template<typename _CharT, typename _InIter> locale::id money_get<_CharT, _InIter>::id; template<typename _CharT, typename _OutIter> class money_put : public locale::facet { public: typedef _CharT char_type; typedef _OutIter iter_type; typedef basic_string<_CharT> string_type; static locale::id id; protected: ; }; template<typename _CharT, typename _OutIter> locale::id money_put<_CharT, _OutIter>::id; } struct messages_base { typedef int catalog; }; namespace __cxx11 { template<typename _CharT> class messages : public locale::facet, public messages_base { public: typedef _CharT char_type; typedef basic_string<_CharT> string_type; protected: __c_locale _M_c_locale_messages; const char* _M_name_messages; public: static locale::id id; protected: string_type _M_convert_from_char(char*) const ; }; template<typename _CharT> locale::id messages<_CharT>::id; template<typename _CharT> class messages_byname : public messages<_CharT> { public: typedef _CharT char_type; typedef basic_string<_CharT> string_type; explicit messages_byname(const char* __s, size_t __refs = 0); explicit messages_byname(const string& __s, size_t __refs = 0) ; protected: virtual ~messages_byname() ; }; } } extern "C" { extern char *gettext (const char *__msgid) noexcept (true) __attribute__ ((__format_arg__ (1))); extern char *dgettext (const char *__domainname, const char *__msgid) noexcept (true) __attribute__ ((__format_arg__ (2))); extern char *__dgettext (const char *__domainname, const char *__msgid) noexcept (true) __attribute__ ((__format_arg__ (2))); extern char *dcgettext (const char *__domainname, const char *__msgid, int __category) noexcept (true) __attribute__ ((__format_arg__ (2))); extern char *__dcgettext (const char *__domainname, const char *__msgid, int __category) noexcept (true) __attribute__ ((__format_arg__ (2))); extern char *ngettext (const char *__msgid1, const char *__msgid2, unsigned long int __n) noexcept (true) __attribute__ ((__format_arg__ (1))) __attribute__ ((__format_arg__ (2))); extern char *dngettext (const char *__domainname, const char *__msgid1, const char *__msgid2, unsigned long int __n) noexcept (true) __attribute__ ((__format_arg__ (2))) __attribute__ ((__format_arg__ (3))); extern char *dcngettext (const char *__domainname, const char *__msgid1, const char *__msgid2, unsigned long int __n, int __category) noexcept (true) __attribute__ ((__format_arg__ (2))) __attribute__ ((__format_arg__ (3))); extern char *textdomain (const char *__domainname) noexcept (true); extern char *bindtextdomain (const char *__domainname, const char *__dirname) noexcept (true); extern char *bind_textdomain_codeset (const char *__domainname, const char *__codeset) noexcept (true); } namespace std __attribute__ ((__visibility__ ("default"))) { } namespace std __attribute__ ((__visibility__ ("default"))) { class codecvt_base { public: enum result { ok, partial, error, noconv }; }; template<typename _InternT, typename _ExternT, typename _StateT> class __codecvt_abstract_base : public locale::facet, public codecvt_base { public: typedef codecvt_base::result result; typedef _InternT intern_type; typedef _ExternT extern_type; typedef _StateT state_type; result out(state_type& __state, const intern_type* __from, const intern_type* __from_end, const intern_type*& __from_next, extern_type* __to, extern_type* __to_end, extern_type*& __to_next) const ; result unshift(state_type& __state, extern_type* __to, extern_type* __to_end, extern_type*& __to_next) const ; result in(state_type& __state, const extern_type* __from, const extern_type* __from_end, const extern_type*& __from_next, intern_type* __to, intern_type* __to_end, intern_type*& __to_next) const ; int encoding() const throw() ; bool always_noconv() const throw() ; int length(state_type& __state, const extern_type* __from, const extern_type* __end, size_t __max) const ; int max_length() const throw() ; protected: explicit __codecvt_abstract_base(size_t __refs = 0) ; virtual ~__codecvt_abstract_base() ; virtual result do_out(state_type& __state, const intern_type* __from, const intern_type* __from_end, const intern_type*& __from_next, extern_type* __to, extern_type* __to_end, extern_type*& __to_next) const = 0; virtual result do_unshift(state_type& __state, extern_type* __to, extern_type* __to_end, extern_type*& __to_next) const = 0; virtual result do_in(state_type& __state, const extern_type* __from, const extern_type* __from_end, const extern_type*& __from_next, intern_type* __to, intern_type* __to_end, intern_type*& __to_next) const = 0; virtual int do_encoding() const throw() = 0; virtual bool do_always_noconv() const throw() = 0; virtual int do_length(state_type&, const extern_type* __from, const extern_type* __end, size_t __max) const = 0; virtual int do_max_length() const throw() = 0; }; template<typename _InternT, typename _ExternT, typename _StateT> class codecvt : public __codecvt_abstract_base<_InternT, _ExternT, _StateT> { public: typedef codecvt_base::result result; typedef _InternT intern_type; typedef _ExternT extern_type; typedef _StateT state_type; protected: __c_locale _M_c_locale_codecvt; public: static locale::id id; explicit codecvt(size_t __refs = 0) ; explicit codecvt(__c_locale __cloc, size_t __refs = 0); protected: virtual ~codecvt() ; virtual result do_out(state_type& __state, const intern_type* __from, const intern_type* __from_end, const intern_type*& __from_next, extern_type* __to, extern_type* __to_end, extern_type*& __to_next) const; virtual result do_unshift(state_type& __state, extern_type* __to, extern_type* __to_end, extern_type*& __to_next) const; virtual result do_in(state_type& __state, const extern_type* __from, const extern_type* __from_end, const extern_type*& __from_next, intern_type* __to, intern_type* __to_end, intern_type*& __to_next) const; virtual int do_encoding() const throw(); virtual bool do_always_noconv() const throw(); virtual int do_length(state_type&, const extern_type* __from, const extern_type* __end, size_t __max) const; virtual int do_max_length() const throw(); }; template<typename _InternT, typename _ExternT, typename _StateT> locale::id codecvt<_InternT, _ExternT, _StateT>::id; template<> class codecvt<char, char, mbstate_t> : public __codecvt_abstract_base<char, char, mbstate_t> { friend class messages<char>; public: typedef char intern_type; typedef char extern_type; typedef mbstate_t state_type; protected: __c_locale _M_c_locale_codecvt; public: static locale::id id; explicit codecvt(size_t __refs = 0); explicit codecvt(__c_locale __cloc, size_t __refs = 0); protected: virtual ~codecvt(); virtual result do_out(state_type& __state, const intern_type* __from, const intern_type* __from_end, const intern_type*& __from_next, extern_type* __to, extern_type* __to_end, extern_type*& __to_next) const; virtual result do_unshift(state_type& __state, extern_type* __to, extern_type* __to_end, extern_type*& __to_next) const; virtual result do_in(state_type& __state, const extern_type* __from, const extern_type* __from_end, const extern_type*& __from_next, intern_type* __to, intern_type* __to_end, intern_type*& __to_next) const; virtual int do_encoding() const throw(); virtual bool do_always_noconv() const throw(); virtual int do_length(state_type&, const extern_type* __from, const extern_type* __end, size_t __max) const; virtual int do_max_length() const throw(); }; template<> class codecvt<wchar_t, char, mbstate_t> : public __codecvt_abstract_base<wchar_t, char, mbstate_t> { friend class messages<wchar_t>; public: typedef wchar_t intern_type; typedef char extern_type; typedef mbstate_t state_type; protected: __c_locale _M_c_locale_codecvt; public: static locale::id id; explicit codecvt(size_t __refs = 0); explicit codecvt(__c_locale __cloc, size_t __refs = 0); protected: virtual ~codecvt(); virtual result do_out(state_type& __state, const intern_type* __from, const intern_type* __from_end, const intern_type*& __from_next, extern_type* __to, extern_type* __to_end, extern_type*& __to_next) const; virtual result do_unshift(state_type& __state, extern_type* __to, extern_type* __to_end, extern_type*& __to_next) const; virtual result do_in(state_type& __state, const extern_type* __from, const extern_type* __from_end, const extern_type*& __from_next, intern_type* __to, intern_type* __to_end, intern_type*& __to_next) const; virtual int do_encoding() const throw(); virtual bool do_always_noconv() const throw(); virtual int do_length(state_type&, const extern_type* __from, const extern_type* __end, size_t __max) const; virtual int do_max_length() const throw(); }; template<> class codecvt<char16_t, char, mbstate_t> : public __codecvt_abstract_base<char16_t, char, mbstate_t> { public: typedef char16_t intern_type; typedef char extern_type; typedef mbstate_t state_type; public: static locale::id id; explicit codecvt(size_t __refs = 0) ; protected: virtual ~codecvt(); virtual result do_out(state_type& __state, const intern_type* __from, const intern_type* __from_end, const intern_type*& __from_next, extern_type* __to, extern_type* __to_end, extern_type*& __to_next) const; virtual result do_unshift(state_type& __state, extern_type* __to, extern_type* __to_end, extern_type*& __to_next) const; virtual result do_in(state_type& __state, const extern_type* __from, const extern_type* __from_end, const extern_type*& __from_next, intern_type* __to, intern_type* __to_end, intern_type*& __to_next) const; virtual int do_encoding() const throw(); virtual bool do_always_noconv() const throw(); virtual int do_length(state_type&, const extern_type* __from, const extern_type* __end, size_t __max) const; virtual int do_max_length() const throw(); }; template<> class codecvt<char32_t, char, mbstate_t> : public __codecvt_abstract_base<char32_t, char, mbstate_t> { public: typedef char32_t intern_type; typedef char extern_type; typedef mbstate_t state_type; public: static locale::id id; explicit codecvt(size_t __refs = 0) ; protected: virtual ~codecvt(); virtual result do_out(state_type& __state, const intern_type* __from, const intern_type* __from_end, const intern_type*& __from_next, extern_type* __to, extern_type* __to_end, extern_type*& __to_next) const; virtual result do_unshift(state_type& __state, extern_type* __to, extern_type* __to_end, extern_type*& __to_next) const; virtual result do_in(state_type& __state, const extern_type* __from, const extern_type* __from_end, const extern_type*& __from_next, intern_type* __to, intern_type* __to_end, intern_type*& __to_next) const; virtual int do_encoding() const throw(); virtual bool do_always_noconv() const throw(); virtual int do_length(state_type&, const extern_type* __from, const extern_type* __end, size_t __max) const; virtual int do_max_length() const throw(); }; template<> class codecvt<char16_t, char8_t, mbstate_t> : public __codecvt_abstract_base<char16_t, char8_t, mbstate_t> { public: typedef char16_t intern_type; typedef char8_t extern_type; typedef mbstate_t state_type; public: static locale::id id; explicit codecvt(size_t __refs = 0) : __codecvt_abstract_base<char16_t, char8_t, mbstate_t>(__refs) { } protected: virtual ~codecvt(); virtual result do_out(state_type& __state, const intern_type* __from, const intern_type* __from_end, const intern_type*& __from_next, extern_type* __to, extern_type* __to_end, extern_type*& __to_next) const; virtual result do_unshift(state_type& __state, extern_type* __to, extern_type* __to_end, extern_type*& __to_next) const; virtual result do_in(state_type& __state, const extern_type* __from, const extern_type* __from_end, const extern_type*& __from_next, intern_type* __to, intern_type* __to_end, intern_type*& __to_next) const; virtual int do_encoding() const throw(); virtual bool do_always_noconv() const throw(); virtual int do_length(state_type&, const extern_type* __from, const extern_type* __end, size_t __max) const; virtual int do_max_length() const throw(); }; template<> class codecvt<char32_t, char8_t, mbstate_t> : public __codecvt_abstract_base<char32_t, char8_t, mbstate_t> { public: typedef char32_t intern_type; typedef char8_t extern_type; typedef mbstate_t state_type; public: static locale::id id; explicit codecvt(size_t __refs = 0) : __codecvt_abstract_base<char32_t, char8_t, mbstate_t>(__refs) { } protected: virtual ~codecvt(); virtual result do_out(state_type& __state, const intern_type* __from, const intern_type* __from_end, const intern_type*& __from_next, extern_type* __to, extern_type* __to_end, extern_type*& __to_next) const; virtual result do_unshift(state_type& __state, extern_type* __to, extern_type* __to_end, extern_type*& __to_next) const; virtual result do_in(state_type& __state, const extern_type* __from, const extern_type* __from_end, const extern_type*& __from_next, intern_type* __to, intern_type* __to_end, intern_type*& __to_next) const; virtual int do_encoding() const throw(); virtual bool do_always_noconv() const throw(); virtual int do_length(state_type&, const extern_type* __from, const extern_type* __end, size_t __max) const; virtual int do_max_length() const throw(); }; template<typename _InternT, typename _ExternT, typename _StateT> class codecvt_byname : public codecvt<_InternT, _ExternT, _StateT> { public: explicit codecvt_byname(const char* __s, size_t __refs = 0) ; explicit codecvt_byname(const string& __s, size_t __refs = 0) ; protected: virtual ~codecvt_byname() ; }; template<> class codecvt_byname<char16_t, char, mbstate_t> : public codecvt<char16_t, char, mbstate_t> { public: explicit codecvt_byname(const char*, size_t __refs = 0) ; explicit codecvt_byname(const string& __s, size_t __refs = 0) ; protected: virtual ~codecvt_byname() ; }; template<> class codecvt_byname<char32_t, char, mbstate_t> : public codecvt<char32_t, char, mbstate_t> { public: explicit codecvt_byname(const char*, size_t __refs = 0) ; explicit codecvt_byname(const string& __s, size_t __refs = 0) ; protected: virtual ~codecvt_byname() ; }; template<> class codecvt_byname<char16_t, char8_t, mbstate_t> : public codecvt<char16_t, char8_t, mbstate_t> { public: explicit codecvt_byname(const char*, size_t __refs = 0) : codecvt<char16_t, char8_t, mbstate_t>(__refs) { } explicit codecvt_byname(const string& __s, size_t __refs = 0) : codecvt_byname(__s.c_str(), __refs) { } protected: virtual ~codecvt_byname() { } }; template<> class codecvt_byname<char32_t, char8_t, mbstate_t> : public codecvt<char32_t, char8_t, mbstate_t> { public: explicit codecvt_byname(const char*, size_t __refs = 0) : codecvt<char32_t, char8_t, mbstate_t>(__refs) { } explicit codecvt_byname(const string& __s, size_t __refs = 0) : codecvt_byname(__s.c_str(), __refs) { } protected: virtual ~codecvt_byname() { } }; extern template class codecvt_byname<char, char, mbstate_t>; extern template const codecvt<char, char, mbstate_t>& use_facet<codecvt<char, char, mbstate_t> >(const locale&); extern template bool has_facet<codecvt<char, char, mbstate_t> >(const locale&); extern template class codecvt_byname<wchar_t, char, mbstate_t>; extern template const codecvt<wchar_t, char, mbstate_t>& use_facet<codecvt<wchar_t, char, mbstate_t> >(const locale&); extern template bool has_facet<codecvt<wchar_t, char, mbstate_t> >(const locale&); extern template class codecvt_byname<char16_t, char, mbstate_t>; extern template class codecvt_byname<char32_t, char, mbstate_t>; extern template class codecvt_byname<char16_t, char8_t, mbstate_t>; extern template class codecvt_byname<char32_t, char8_t, mbstate_t>; } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _CharT, bool _Intl> struct __use_cache<__moneypunct_cache<_CharT, _Intl> > { const __moneypunct_cache<_CharT, _Intl>* operator() (const locale& __loc) const ; }; namespace __cxx11 { } extern template class moneypunct<char, false>; extern template class moneypunct<char, true>; extern template class moneypunct_byname<char, false>; extern template class moneypunct_byname<char, true>; extern template class __cxx11:: money_get<char>; extern template class __cxx11:: money_put<char>; extern template class __timepunct<char>; extern template class time_put<char>; extern template class time_put_byname<char>; extern template class time_get<char>; extern template class time_get_byname<char>; extern template class messages<char>; extern template class messages_byname<char>; extern template const moneypunct<char, true>* __try_use_facet<moneypunct<char, true> >(const locale&) noexcept; extern template const moneypunct<char, false>* __try_use_facet<moneypunct<char, false> >(const locale&) noexcept; extern template const money_put<char>* __try_use_facet<money_put<char> >(const locale&) noexcept; extern template const money_get<char>* __try_use_facet<money_get<char> >(const locale&) noexcept; extern template const __timepunct<char>* __try_use_facet<__timepunct<char> >(const locale&) noexcept; extern template const time_put<char>* __try_use_facet<time_put<char> >(const locale&) noexcept; extern template const time_get<char>* __try_use_facet<time_get<char> >(const locale&) noexcept; extern template const messages<char>* __try_use_facet<messages<char> >(const locale&) noexcept; extern template const moneypunct<char, true>& use_facet<moneypunct<char, true> >(const locale&); extern template const moneypunct<char, false>& use_facet<moneypunct<char, false> >(const locale&); extern template const money_put<char>& use_facet<money_put<char> >(const locale&); extern template const money_get<char>& use_facet<money_get<char> >(const locale&); extern template const __timepunct<char>& use_facet<__timepunct<char> >(const locale&); extern template const time_put<char>& use_facet<time_put<char> >(const locale&); extern template const time_get<char>& use_facet<time_get<char> >(const locale&); extern template const messages<char>& use_facet<messages<char> >(const locale&); extern template bool has_facet<moneypunct<char> >(const locale&); extern template bool has_facet<money_put<char> >(const locale&); extern template bool has_facet<money_get<char> >(const locale&); extern template bool has_facet<__timepunct<char> >(const locale&); extern template bool has_facet<time_put<char> >(const locale&); extern template bool has_facet<time_get<char> >(const locale&); extern template bool has_facet<messages<char> >(const locale&); extern template class moneypunct<wchar_t, false>; extern template class moneypunct<wchar_t, true>; extern template class moneypunct_byname<wchar_t, false>; extern template class moneypunct_byname<wchar_t, true>; extern template class __cxx11:: money_get<wchar_t>; extern template class __cxx11:: money_put<wchar_t>; extern template class __timepunct<wchar_t>; extern template class time_put<wchar_t>; extern template class time_put_byname<wchar_t>; extern template class time_get<wchar_t>; extern template class time_get_byname<wchar_t>; extern template class messages<wchar_t>; extern template class messages_byname<wchar_t>; extern template const moneypunct<wchar_t, true>* __try_use_facet<moneypunct<wchar_t, true> >(const locale&) noexcept; extern template const moneypunct<wchar_t, false>* __try_use_facet<moneypunct<wchar_t, false> >(const locale&) noexcept; extern template const money_put<wchar_t>* __try_use_facet<money_put<wchar_t> >(const locale&) noexcept; extern template const money_get<wchar_t>* __try_use_facet<money_get<wchar_t> >(const locale&) noexcept; extern template const __timepunct<wchar_t>* __try_use_facet<__timepunct<wchar_t> >(const locale&) noexcept; extern template const time_put<wchar_t>* __try_use_facet<time_put<wchar_t> >(const locale&) noexcept; extern template const time_get<wchar_t>* __try_use_facet<time_get<wchar_t> >(const locale&) noexcept; extern template const messages<wchar_t>* __try_use_facet<messages<wchar_t> >(const locale&) noexcept; extern template const moneypunct<wchar_t, true>& use_facet<moneypunct<wchar_t, true> >(const locale&); extern template const moneypunct<wchar_t, false>& use_facet<moneypunct<wchar_t, false> >(const locale&); extern template const money_put<wchar_t>& use_facet<money_put<wchar_t> >(const locale&); extern template const money_get<wchar_t>& use_facet<money_get<wchar_t> >(const locale&); extern template const __timepunct<wchar_t>& use_facet<__timepunct<wchar_t> >(const locale&); extern template const time_put<wchar_t>& use_facet<time_put<wchar_t> >(const locale&); extern template const time_get<wchar_t>& use_facet<time_get<wchar_t> >(const locale&); extern template const messages<wchar_t>& use_facet<messages<wchar_t> >(const locale&); extern template bool has_facet<moneypunct<wchar_t> >(const locale&); extern template bool has_facet<money_put<wchar_t> >(const locale&); extern template bool has_facet<money_get<wchar_t> >(const locale&); extern template bool has_facet<__timepunct<wchar_t> >(const locale&); extern template bool has_facet<time_put<wchar_t> >(const locale&); extern template bool has_facet<time_get<wchar_t> >(const locale&); extern template bool has_facet<messages<wchar_t> >(const locale&); } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _OutStr, typename _InChar, typename _Codecvt, typename _State, typename _Fn> bool __do_str_codecvt(const _InChar* __first, const _InChar* __last, _OutStr& __outstr, const _Codecvt& __cvt, _State& __state, size_t& __count, _Fn __fn) ; template<typename _CharT, typename _Traits, typename _Alloc, typename _State> bool __str_codecvt_in(const char* __first, const char* __last, basic_string<_CharT, _Traits, _Alloc>& __outstr, const codecvt<_CharT, char, _State>& __cvt, _State& __state, size_t& __count) ; template<typename _CharT, typename _Traits, typename _Alloc, typename _State> bool __str_codecvt_in(const char* __first, const char* __last, basic_string<_CharT, _Traits, _Alloc>& __outstr, const codecvt<_CharT, char, _State>& __cvt) ; template<typename _CharT, typename _Traits, typename _Alloc, typename _State> bool __str_codecvt_in_all(const char* __first, const char* __last, basic_string<_CharT, _Traits, _Alloc>& __outstr, const codecvt<_CharT, char, _State>& __cvt) ; template<typename _CharT, typename _Traits, typename _Alloc, typename _State> bool __str_codecvt_out(const _CharT* __first, const _CharT* __last, basic_string<char, _Traits, _Alloc>& __outstr, const codecvt<_CharT, char, _State>& __cvt, _State& __state, size_t& __count) ; template<typename _CharT, typename _Traits, typename _Alloc, typename _State> bool __str_codecvt_out(const _CharT* __first, const _CharT* __last, basic_string<char, _Traits, _Alloc>& __outstr, const codecvt<_CharT, char, _State>& __cvt) ; template<typename _CharT, typename _Traits, typename _Alloc, typename _State> bool __str_codecvt_out_all(const _CharT* __first, const _CharT* __last, basic_string<char, _Traits, _Alloc>& __outstr, const codecvt<_CharT, char, _State>& __cvt) ; template<typename _CharT, typename _Traits, typename _Alloc, typename _State> bool __str_codecvt_out(const _CharT* __first, const _CharT* __last, basic_string<char8_t, _Traits, _Alloc>& __outstr, const codecvt<_CharT, char8_t, _State>& __cvt, _State& __state, size_t& __count) ; template<typename _CharT, typename _Traits, typename _Alloc, typename _State> bool __str_codecvt_out(const _CharT* __first, const _CharT* __last, basic_string<char8_t, _Traits, _Alloc>& __outstr, const codecvt<_CharT, char8_t, _State>& __cvt) ; namespace __detail { template<typename _Tp> struct _Scoped_ptr { __attribute__((__nonnull__(2))) explicit _Scoped_ptr(_Tp* __ptr) ; _Scoped_ptr(_Tp* __ptr, const char* __msg) ; ~_Scoped_ptr() ; _Scoped_ptr(const _Scoped_ptr&) = delete; _Scoped_ptr& operator=(const _Scoped_ptr&) = delete; __attribute__((__returns_nonnull__)) _Tp* operator->() const noexcept ; _Tp& operator*() const noexcept ; private: _Tp* _M_ptr; }; } namespace __cxx11 { template<typename _Codecvt, typename _Elem = wchar_t, typename _Wide_alloc = allocator<_Elem>, typename _Byte_alloc = allocator<char>> class wstring_convert { public: typedef basic_string<char, char_traits<char>, _Byte_alloc> byte_string; typedef basic_string<_Elem, char_traits<_Elem>, _Wide_alloc> wide_string; typedef typename _Codecvt::state_type state_type; typedef typename wide_string::traits_type::int_type int_type; wstring_convert() ; explicit wstring_convert(_Codecvt* __pcvt) ; wstring_convert(_Codecvt* __pcvt, state_type __state) ; explicit wstring_convert(const byte_string& __byte_err, const wide_string& __wide_err = wide_string()) ; ~wstring_convert() = default; wstring_convert(const wstring_convert&) = delete; wstring_convert& operator=(const wstring_convert&) = delete; wide_string from_bytes(char __byte) ; wide_string from_bytes(const char* __ptr) ; wide_string from_bytes(const byte_string& __str) ; wide_string from_bytes(const char* __first, const char* __last) ; byte_string to_bytes(_Elem __wchar) ; byte_string to_bytes(const _Elem* __ptr) ; byte_string to_bytes(const wide_string& __wstr) ; byte_string to_bytes(const _Elem* __first, const _Elem* __last) ; size_t converted() const noexcept ; state_type state() const ; private: __detail::_Scoped_ptr<_Codecvt> _M_cvt; byte_string _M_byte_err_string; wide_string _M_wide_err_string; state_type _M_state = state_type(); size_t _M_count = 0; bool _M_with_cvtstate = false; bool _M_with_strings = false; }; } template<typename _Codecvt, typename _Elem = wchar_t, typename _Tr = char_traits<_Elem>> class wbuffer_convert : public basic_streambuf<_Elem, _Tr> { typedef basic_streambuf<_Elem, _Tr> _Wide_streambuf; public: typedef typename _Codecvt::state_type state_type; wbuffer_convert() ; explicit wbuffer_convert(streambuf* __bytebuf, _Codecvt* __pcvt = new _Codecvt, state_type __state = state_type()) ; ~wbuffer_convert() = default; wbuffer_convert(const wbuffer_convert&) = delete; wbuffer_convert& operator=(const wbuffer_convert&) = delete; streambuf* rdbuf() const noexcept ; streambuf* rdbuf(streambuf *__bytebuf) noexcept ; state_type state() const noexcept ; protected: int sync() ; typename _Wide_streambuf::int_type overflow(typename _Wide_streambuf::int_type __out) ; typename _Wide_streambuf::int_type underflow() ; streamsize xsputn(const typename _Wide_streambuf::char_type* __s, streamsize __n) ; private: bool _M_conv_get() ; bool _M_put(...) ; bool _M_put(const char* __p, streamsize __n) ; bool _M_conv_put() ; streambuf* _M_buf; __detail::_Scoped_ptr<_Codecvt> _M_cvt; state_type _M_state; static const streamsize _S_buffer_length = 32; static const streamsize _S_putback_length = 3; _Elem _M_put_area[_S_buffer_length]; _Elem _M_get_area[_S_buffer_length]; streamsize _M_unconv = 0; char _M_get_buf[_S_buffer_length-_S_putback_length]; bool _M_always_noconv; }; } namespace std __attribute__ ((__visibility__ ("default"))) { namespace __detail { template<typename _String, typename _CharT> struct _Quoted_string { static_assert(is_reference<_String>::value || is_pointer<_String>::value, "String type must be pointer or reference"); _Quoted_string(_String __str, _CharT __del, _CharT __esc) ; _Quoted_string& operator=(_Quoted_string&) = delete; _String _M_string; _CharT _M_delim; _CharT _M_escape; }; template<typename _CharT, typename _Traits> struct _Quoted_string<basic_string_view<_CharT, _Traits>, _CharT> { _Quoted_string(basic_string_view<_CharT, _Traits> __str, _CharT __del, _CharT __esc) ; _Quoted_string& operator=(_Quoted_string&) = delete; basic_string_view<_CharT, _Traits> _M_string; _CharT _M_delim; _CharT _M_escape; }; template<typename _CharT, typename _Traits> std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const _Quoted_string<const _CharT*, _CharT>& __str) ; template<typename _CharT, typename _Traits, typename _String> std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const _Quoted_string<_String, _CharT>& __str) ; template<typename _CharT, typename _Traits, typename _Alloc> std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, const _Quoted_string<basic_string<_CharT, _Traits, _Alloc>&, _CharT>& __str) ; } } namespace std __attribute__ ((__visibility__ ("default"))) { struct _Resetiosflags { ios_base::fmtflags _M_mask; }; _Resetiosflags resetiosflags(ios_base::fmtflags __mask) ; template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __is, _Resetiosflags __f) ; template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, _Resetiosflags __f) ; struct _Setiosflags { ios_base::fmtflags _M_mask; }; _Setiosflags setiosflags(ios_base::fmtflags __mask) ; template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __is, _Setiosflags __f) ; template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, _Setiosflags __f) ; struct _Setbase { int _M_base; }; _Setbase setbase(int __base) ; template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __is, _Setbase __f) ; template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, _Setbase __f) ; template<typename _CharT> struct _Setfill { _CharT _M_c; }; template<typename _CharT> _Setfill<_CharT> setfill(_CharT __c) ; template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __is, _Setfill<_CharT> __f) ; template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, _Setfill<_CharT> __f) ; struct _Setprecision { int _M_n; }; _Setprecision setprecision(int __n) ; template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __is, _Setprecision __f) ; template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, _Setprecision __f) ; struct _Setw { int _M_n; }; _Setw setw(int __n) ; template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __is, _Setw __f) ; template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, _Setw __f) ; template<typename _MoneyT> struct _Get_money { _MoneyT& _M_mon; bool _M_intl; }; template<typename _MoneyT> _Get_money<_MoneyT> get_money(_MoneyT& __mon, bool __intl = false) ; template<typename _CharT, typename _Traits, typename _MoneyT> basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __is, _Get_money<_MoneyT> __f) ; template<typename _MoneyT> struct _Put_money { const _MoneyT& _M_mon; bool _M_intl; }; template<typename _MoneyT> _Put_money<_MoneyT> put_money(const _MoneyT& __mon, bool __intl = false) ; template<typename _CharT, typename _Traits, typename _MoneyT> basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, _Put_money<_MoneyT> __f) ; template<typename _CharT> struct _Put_time { const std::tm* _M_tmb; const _CharT* _M_fmt; }; template<typename _CharT> _Put_time<_CharT> put_time(const std::tm* __tmb, const _CharT* __fmt) ; template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, _Put_time<_CharT> __f) ; template<typename _CharT> struct _Get_time { std::tm* _M_tmb; const _CharT* _M_fmt; }; template<typename _CharT> _Get_time<_CharT> get_time(std::tm* __tmb, const _CharT* __fmt) ; template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __is, _Get_time<_CharT> __f) ; template<typename _CharT> auto quoted(const _CharT* __string, _CharT __delim = _CharT('"'), _CharT __escape = _CharT('\\')) ; template<typename _CharT, typename _Traits, typename _Alloc> auto quoted(const basic_string<_CharT, _Traits, _Alloc>& __string, _CharT __delim = _CharT('"'), _CharT __escape = _CharT('\\')) ; template<typename _CharT, typename _Traits, typename _Alloc> auto quoted(basic_string<_CharT, _Traits, _Alloc>& __string, _CharT __delim = _CharT('"'), _CharT __escape = _CharT('\\')) ; template<typename _CharT, typename _Traits> auto quoted(basic_string_view<_CharT, _Traits> __sv, _CharT __delim = _CharT('"'), _CharT __escape = _CharT('\\')) ; extern template ostream& operator<<(ostream&, _Setfill<char>); extern template ostream& operator<<(ostream&, _Setiosflags); extern template ostream& operator<<(ostream&, _Resetiosflags); extern template ostream& operator<<(ostream&, _Setbase); extern template ostream& operator<<(ostream&, _Setprecision); extern template ostream& operator<<(ostream&, _Setw); extern template istream& operator>>(istream&, _Setfill<char>); extern template istream& operator>>(istream&, _Setiosflags); extern template istream& operator>>(istream&, _Resetiosflags); extern template istream& operator>>(istream&, _Setbase); extern template istream& operator>>(istream&, _Setprecision); extern template istream& operator>>(istream&, _Setw); extern template wostream& operator<<(wostream&, _Setfill<wchar_t>); extern template wostream& operator<<(wostream&, _Setiosflags); extern template wostream& operator<<(wostream&, _Resetiosflags); extern template wostream& operator<<(wostream&, _Setbase); extern template wostream& operator<<(wostream&, _Setprecision); extern template wostream& operator<<(wostream&, _Setw); extern template wistream& operator>>(wistream&, _Setfill<wchar_t>); extern template wistream& operator>>(wistream&, _Setiosflags); extern template wistream& operator>>(wistream&, _Resetiosflags); extern template wistream& operator>>(wistream&, _Setbase); extern template wistream& operator>>(wistream&, _Setprecision); extern template wistream& operator>>(wistream&, _Setw); } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Tp, size_t _Nm> struct __array_traits { using _Type = _Tp[_Nm]; using _Is_swappable = __is_swappable<_Tp>; using _Is_nothrow_swappable = __is_nothrow_swappable<_Tp>; }; template<typename _Tp> struct __array_traits<_Tp, 0> { struct _Type { __attribute__((__always_inline__,__noreturn__)) _Tp& operator[](size_t) const noexcept ; __attribute__((__always_inline__)) constexpr explicit operator _Tp*() const noexcept ; }; using _Is_swappable = true_type; using _Is_nothrow_swappable = true_type; }; 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; typename __array_traits<_Tp, _Nm>::_Type _M_elems; constexpr void fill(const value_type& __u) ; constexpr void swap(array& __other) noexcept(__array_traits<_Tp, _Nm>::_Is_nothrow_swappable::value) ; [[__gnu__::__const__, __nodiscard__]] constexpr iterator begin() noexcept ; [[__nodiscard__]] constexpr const_iterator begin() const noexcept ; [[__gnu__::__const__, __nodiscard__]] constexpr iterator end() noexcept ; [[__nodiscard__]] constexpr const_iterator end() const noexcept ; [[__gnu__::__const__, __nodiscard__]] constexpr reverse_iterator rbegin() noexcept ; [[__nodiscard__]] constexpr const_reverse_iterator rbegin() const noexcept ; [[__gnu__::__const__, __nodiscard__]] constexpr reverse_iterator rend() noexcept ; [[__nodiscard__]] constexpr const_reverse_iterator rend() const noexcept ; [[__nodiscard__]] constexpr const_iterator cbegin() const noexcept ; [[__nodiscard__]] constexpr const_iterator cend() const noexcept ; [[__nodiscard__]] constexpr const_reverse_iterator crbegin() const noexcept ; [[__nodiscard__]] constexpr const_reverse_iterator crend() const noexcept ; [[__nodiscard__, __gnu__::__const__, __gnu__::__always_inline__]] constexpr size_type size() const noexcept ; [[__nodiscard__, __gnu__::__const__, __gnu__::__always_inline__]] constexpr size_type max_size() const noexcept ; [[__nodiscard__, __gnu__::__const__, __gnu__::__always_inline__]] constexpr bool empty() const noexcept ; [[__nodiscard__]] constexpr reference operator[](size_type __n) noexcept ; [[__nodiscard__]] constexpr const_reference operator[](size_type __n) const noexcept ; constexpr reference at(size_type __n) ; constexpr const_reference at(size_type __n) const ; [[__nodiscard__]] constexpr reference front() noexcept ; [[__nodiscard__]] constexpr const_reference front() const noexcept ; [[__nodiscard__]] constexpr reference back() noexcept ; [[__nodiscard__]] constexpr const_reference back() const noexcept ; [[__nodiscard__, __gnu__::__const__, __gnu__::__always_inline__]] constexpr pointer data() noexcept ; [[__nodiscard__]] constexpr const_pointer data() const noexcept ; }; template<typename _Tp, typename... _Up> array(_Tp, _Up...) -> array<enable_if_t<(is_same_v<_Tp, _Up> && ...), _Tp>, 1 + sizeof...(_Up)>; template<typename _Tp, std::size_t _Nm> [[__nodiscard__]] constexpr bool operator==(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two) ; template<typename _Tp, size_t _Nm> [[nodiscard]] constexpr __detail::__synth3way_t<_Tp> operator<=>(const array<_Tp, _Nm>& __a, const array<_Tp, _Nm>& __b) ; template<typename _Tp, std::size_t _Nm> constexpr __enable_if_t<__array_traits<_Tp, _Nm>::_Is_swappable::value> swap(array<_Tp, _Nm>& __one, array<_Tp, _Nm>& __two) noexcept(noexcept(__one.swap(__two))) ; template<typename _Tp, std::size_t _Nm> __enable_if_t<!__array_traits<_Tp, _Nm>::_Is_swappable::value> swap(array<_Tp, _Nm>&, array<_Tp, _Nm>&) = delete; template<std::size_t _Int, typename _Tp, std::size_t _Nm> [[__nodiscard__]] constexpr _Tp& get(array<_Tp, _Nm>& __arr) noexcept ; template<std::size_t _Int, typename _Tp, std::size_t _Nm> [[__nodiscard__]] constexpr _Tp&& get(array<_Tp, _Nm>&& __arr) noexcept ; template<std::size_t _Int, typename _Tp, std::size_t _Nm> [[__nodiscard__]] constexpr const _Tp& get(const array<_Tp, _Nm>& __arr) noexcept ; template<std::size_t _Int, typename _Tp, std::size_t _Nm> [[__nodiscard__]] constexpr const _Tp&& get(const array<_Tp, _Nm>&& __arr) noexcept ; template<bool _Move = false, typename _Tp, size_t... _Idx> constexpr array<remove_cv_t<_Tp>, sizeof...(_Idx)> __to_array(_Tp (&__a)[sizeof...(_Idx)], index_sequence<_Idx...>) ; template<typename _Tp, size_t _Nm> [[nodiscard]] constexpr array<remove_cv_t<_Tp>, _Nm> to_array(_Tp (&__a)[_Nm]) noexcept(is_nothrow_constructible_v<_Tp, _Tp&>) ; template<typename _Tp, size_t _Nm> [[nodiscard]] constexpr array<remove_cv_t<_Tp>, _Nm> to_array(_Tp (&&__a)[_Nm]) noexcept(is_nothrow_move_constructible_v<_Tp>) ; template<typename _Tp, size_t _Nm> struct tuple_size<array<_Tp, _Nm>> : public integral_constant<size_t, _Nm> { }; template<size_t _Ind, typename _Tp, size_t _Nm> struct tuple_element<_Ind, array<_Tp, _Nm>> { static_assert(_Ind < _Nm, "array index is in range"); using type = _Tp; }; template<typename _Tp, size_t _Nm> inline constexpr size_t tuple_size_v<array<_Tp, _Nm>> = _Nm; template<typename _Tp, size_t _Nm> inline constexpr size_t tuple_size_v<const array<_Tp, _Nm>> = _Nm; template<typename _Tp, size_t _Nm> struct __is_tuple_like_impl<array<_Tp, _Nm>> : true_type { }; } namespace std __attribute__ ((__visibility__ ("default"))) { struct to_chars_result { char* ptr; errc ec; friend bool operator==(const to_chars_result&, const to_chars_result&) = default; }; struct from_chars_result { const char* ptr; errc ec; friend bool operator==(const from_chars_result&, const from_chars_result&) = default; }; namespace __detail { template<typename _Tp> using __integer_to_chars_result_type = enable_if_t<__or_<__is_signed_integer<_Tp>, __is_unsigned_integer<_Tp>, is_same<_Tp, signed __int128>, is_same<_Tp, unsigned __int128>, is_same<char, remove_cv_t<_Tp>>>::value, to_chars_result>; template<typename _Tp> struct __to_chars_unsigned_type : __make_unsigned_selector_base { using _UInts = _List<unsigned int, unsigned long, unsigned long long , unsigned __int128 >; using type = typename __select<sizeof(_Tp), _UInts>::__type; }; template<typename _Tp> using __unsigned_least_t = typename __to_chars_unsigned_type<_Tp>::type; template<typename _Tp> constexpr unsigned __to_chars_len(_Tp __value, int __base ) noexcept; template<typename _Tp> constexpr unsigned __to_chars_len_2(_Tp __value) noexcept ; template<typename _Tp> constexpr to_chars_result __to_chars(char* __first, char* __last, _Tp __val, int __base) noexcept ; template<typename _Tp> constexpr __integer_to_chars_result_type<_Tp> __to_chars_16(char* __first, char* __last, _Tp __val) noexcept ; template<typename _Tp> constexpr __integer_to_chars_result_type<_Tp> __to_chars_10(char* __first, char* __last, _Tp __val) noexcept ; template<typename _Tp> constexpr __integer_to_chars_result_type<_Tp> __to_chars_8(char* __first, char* __last, _Tp __val) noexcept ; template<typename _Tp> constexpr __integer_to_chars_result_type<_Tp> __to_chars_2(char* __first, char* __last, _Tp __val) noexcept ; } template<typename _Tp> constexpr __detail::__integer_to_chars_result_type<_Tp> __to_chars_i(char* __first, char* __last, _Tp __value, int __base = 10) ; to_chars_result to_chars(char* __first, char* __last, char __value, int __base = 10) ; to_chars_result to_chars(char* __first, char* __last, signed char __value, int __base = 10) ; to_chars_result to_chars(char* __first, char* __last, unsigned char __value, int __base = 10) ; to_chars_result to_chars(char* __first, char* __last, signed short __value, int __base = 10) ; to_chars_result to_chars(char* __first, char* __last, unsigned short __value, int __base = 10) ; to_chars_result to_chars(char* __first, char* __last, signed int __value, int __base = 10) ; to_chars_result to_chars(char* __first, char* __last, unsigned int __value, int __base = 10) ; to_chars_result to_chars(char* __first, char* __last, signed long __value, int __base = 10) ; to_chars_result to_chars(char* __first, char* __last, unsigned long __value, int __base = 10) ; to_chars_result to_chars(char* __first, char* __last, signed long long __value, int __base = 10) ; to_chars_result to_chars(char* __first, char* __last, unsigned long long __value, int __base = 10) ; to_chars_result to_chars(char*, char*, bool, int = 10) = delete; namespace __detail { template<typename _Tp> constexpr bool __raise_and_add(_Tp& __val, int __base, unsigned char __c) ; template<bool _DecOnly> struct __from_chars_alnum_to_val_table { struct type { unsigned char __data[1u << 8] = {}; }; static constexpr type _S_make_table() ; static constexpr type value = (_DecOnly, _S_make_table()); }; template<bool _DecOnly = false> constexpr unsigned char __from_chars_alnum_to_val(unsigned char __c) ; template<bool _DecOnly, typename _Tp> bool __from_chars_pow2_base(const char*& __first, const char* __last, _Tp& __val, int __base) ; template<bool _DecOnly, typename _Tp> constexpr bool __from_chars_alnum(const char*& __first, const char* __last, _Tp& __val, int __base) ; template<typename _Tp> using __integer_from_chars_result_type = enable_if_t<__or_<__is_signed_integer<_Tp>, __is_unsigned_integer<_Tp>, is_same<char, remove_cv_t<_Tp>>>::value, from_chars_result>; } template<typename _Tp> __detail::__integer_from_chars_result_type<_Tp> from_chars(const char* __first, const char* __last, _Tp& __value, int __base = 10) ; enum class chars_format { scientific = 1, fixed = 2, hex = 4, general = fixed | scientific }; constexpr chars_format operator|(chars_format __lhs, chars_format __rhs) noexcept ; constexpr chars_format operator&(chars_format __lhs, chars_format __rhs) noexcept ; constexpr chars_format operator^(chars_format __lhs, chars_format __rhs) noexcept ; constexpr chars_format operator~(chars_format __fmt) noexcept ; constexpr chars_format& operator|=(chars_format& __lhs, chars_format __rhs) noexcept ; constexpr chars_format& operator&=(chars_format& __lhs, chars_format __rhs) noexcept ; constexpr chars_format& operator^=(chars_format& __lhs, chars_format __rhs) noexcept ; from_chars_result from_chars(const char* __first, const char* __last, float& __value, chars_format __fmt = chars_format::general) noexcept; from_chars_result from_chars(const char* __first, const char* __last, double& __value, chars_format __fmt = chars_format::general) noexcept; from_chars_result from_chars(const char* __first, const char* __last, long double& __value, chars_format __fmt = chars_format::general) noexcept; from_chars_result __from_chars_float16_t(const char* __first, const char* __last, float& __value, chars_format __fmt = chars_format::general) noexcept; from_chars_result __from_chars_bfloat16_t(const char* __first, const char* __last, float& __value, chars_format __fmt = chars_format::general) noexcept; to_chars_result to_chars(char* __first, char* __last, float __value) noexcept; to_chars_result to_chars(char* __first, char* __last, float __value, chars_format __fmt) noexcept; to_chars_result to_chars(char* __first, char* __last, float __value, chars_format __fmt, int __precision) noexcept; to_chars_result to_chars(char* __first, char* __last, double __value) noexcept; to_chars_result to_chars(char* __first, char* __last, double __value, chars_format __fmt) noexcept; to_chars_result to_chars(char* __first, char* __last, double __value, chars_format __fmt, int __precision) noexcept; to_chars_result to_chars(char* __first, char* __last, long double __value) noexcept; to_chars_result to_chars(char* __first, char* __last, long double __value, chars_format __fmt) noexcept; to_chars_result to_chars(char* __first, char* __last, long double __value, chars_format __fmt, int __precision) noexcept; to_chars_result __to_chars_float16_t(char* __first, char* __last, float __value, chars_format __fmt) noexcept; to_chars_result __to_chars_bfloat16_t(char* __first, char* __last, float __value, chars_format __fmt) noexcept; } namespace std __attribute__ ((__visibility__ ("default"))) { struct _Enable_default_constructor_tag { explicit constexpr _Enable_default_constructor_tag() = default; }; template<bool _Switch, typename _Tag = void> struct _Enable_default_constructor { constexpr _Enable_default_constructor() noexcept = default; constexpr _Enable_default_constructor(_Enable_default_constructor const&) noexcept = default; constexpr _Enable_default_constructor(_Enable_default_constructor&&) noexcept = default; _Enable_default_constructor& operator=(_Enable_default_constructor const&) noexcept = default; _Enable_default_constructor& operator=(_Enable_default_constructor&&) noexcept = default; constexpr explicit _Enable_default_constructor(_Enable_default_constructor_tag) { } }; template<bool _Switch, typename _Tag = void> struct _Enable_destructor { }; template<bool _Copy, bool _CopyAssignment, bool _Move, bool _MoveAssignment, typename _Tag = void> struct _Enable_copy_move { }; template<bool _Default, bool _Destructor, bool _Copy, bool _CopyAssignment, bool _Move, bool _MoveAssignment, typename _Tag = void> struct _Enable_special_members : private _Enable_default_constructor<_Default, _Tag>, private _Enable_destructor<_Destructor, _Tag>, private _Enable_copy_move<_Copy, _CopyAssignment, _Move, _MoveAssignment, _Tag> { }; template<typename _Tag> struct _Enable_default_constructor<false, _Tag> { constexpr _Enable_default_constructor() noexcept = delete; constexpr _Enable_default_constructor(_Enable_default_constructor const&) noexcept = default; constexpr _Enable_default_constructor(_Enable_default_constructor&&) noexcept = default; _Enable_default_constructor& operator=(_Enable_default_constructor const&) noexcept = default; _Enable_default_constructor& operator=(_Enable_default_constructor&&) noexcept = default; constexpr explicit _Enable_default_constructor(_Enable_default_constructor_tag) { } }; template<typename _Tag> struct _Enable_destructor<false, _Tag> { ~_Enable_destructor() noexcept = delete; }; template<typename _Tag> struct _Enable_copy_move<false, true, true, true, _Tag> { constexpr _Enable_copy_move() noexcept = default; constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = delete; constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = default; _Enable_copy_move& operator=(_Enable_copy_move const&) noexcept = default; _Enable_copy_move& operator=(_Enable_copy_move&&) noexcept = default; }; template<typename _Tag> struct _Enable_copy_move<true, false, true, true, _Tag> { constexpr _Enable_copy_move() noexcept = default; constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = default; constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = default; _Enable_copy_move& operator=(_Enable_copy_move const&) noexcept = delete; _Enable_copy_move& operator=(_Enable_copy_move&&) noexcept = default; }; template<typename _Tag> struct _Enable_copy_move<false, false, true, true, _Tag> { constexpr _Enable_copy_move() noexcept = default; constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = delete; constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = default; _Enable_copy_move& operator=(_Enable_copy_move const&) noexcept = delete; _Enable_copy_move& operator=(_Enable_copy_move&&) noexcept = default; }; template<typename _Tag> struct _Enable_copy_move<true, true, false, true, _Tag> { constexpr _Enable_copy_move() noexcept = default; constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = default; constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = delete; _Enable_copy_move& operator=(_Enable_copy_move const&) noexcept = default; _Enable_copy_move& operator=(_Enable_copy_move&&) noexcept = default; }; template<typename _Tag> struct _Enable_copy_move<false, true, false, true, _Tag> { constexpr _Enable_copy_move() noexcept = default; constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = delete; constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = delete; _Enable_copy_move& operator=(_Enable_copy_move const&) noexcept = default; _Enable_copy_move& operator=(_Enable_copy_move&&) noexcept = default; }; template<typename _Tag> struct _Enable_copy_move<true, false, false, true, _Tag> { constexpr _Enable_copy_move() noexcept = default; constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = default; constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = delete; _Enable_copy_move& operator=(_Enable_copy_move const&) noexcept = delete; _Enable_copy_move& operator=(_Enable_copy_move&&) noexcept = default; }; template<typename _Tag> struct _Enable_copy_move<false, false, false, true, _Tag> { constexpr _Enable_copy_move() noexcept = default; constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = delete; constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = delete; _Enable_copy_move& operator=(_Enable_copy_move const&) noexcept = delete; _Enable_copy_move& operator=(_Enable_copy_move&&) noexcept = default; }; template<typename _Tag> struct _Enable_copy_move<true, true, true, false, _Tag> { constexpr _Enable_copy_move() noexcept = default; constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = default; constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = default; _Enable_copy_move& operator=(_Enable_copy_move const&) noexcept = default; _Enable_copy_move& operator=(_Enable_copy_move&&) noexcept = delete; }; template<typename _Tag> struct _Enable_copy_move<false, true, true, false, _Tag> { constexpr _Enable_copy_move() noexcept = default; constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = delete; constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = default; _Enable_copy_move& operator=(_Enable_copy_move const&) noexcept = default; _Enable_copy_move& operator=(_Enable_copy_move&&) noexcept = delete; }; template<typename _Tag> struct _Enable_copy_move<true, false, true, false, _Tag> { constexpr _Enable_copy_move() noexcept = default; constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = default; constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = default; _Enable_copy_move& operator=(_Enable_copy_move const&) noexcept = delete; _Enable_copy_move& operator=(_Enable_copy_move&&) noexcept = delete; }; template<typename _Tag> struct _Enable_copy_move<false, false, true, false, _Tag> { constexpr _Enable_copy_move() noexcept = default; constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = delete; constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = default; _Enable_copy_move& operator=(_Enable_copy_move const&) noexcept = delete; _Enable_copy_move& operator=(_Enable_copy_move&&) noexcept = delete; }; template<typename _Tag> struct _Enable_copy_move<true, true, false, false, _Tag> { constexpr _Enable_copy_move() noexcept = default; constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = default; constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = delete; _Enable_copy_move& operator=(_Enable_copy_move const&) noexcept = default; _Enable_copy_move& operator=(_Enable_copy_move&&) noexcept = delete; }; template<typename _Tag> struct _Enable_copy_move<false, true, false, false, _Tag> { constexpr _Enable_copy_move() noexcept = default; constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = delete; constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = delete; _Enable_copy_move& operator=(_Enable_copy_move const&) noexcept = default; _Enable_copy_move& operator=(_Enable_copy_move&&) noexcept = delete; }; template<typename _Tag> struct _Enable_copy_move<true, false, false, false, _Tag> { constexpr _Enable_copy_move() noexcept = default; constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = default; constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = delete; _Enable_copy_move& operator=(_Enable_copy_move const&) noexcept = delete; _Enable_copy_move& operator=(_Enable_copy_move&&) noexcept = delete; }; template<typename _Tag> struct _Enable_copy_move<false, false, false, false, _Tag> { constexpr _Enable_copy_move() noexcept = default; constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = delete; constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = delete; _Enable_copy_move& operator=(_Enable_copy_move const&) noexcept = delete; _Enable_copy_move& operator=(_Enable_copy_move&&) noexcept = delete; }; } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Tp> class optional; struct nullopt_t { enum class _Construct { _Token }; explicit constexpr nullopt_t(_Construct) noexcept { } }; inline constexpr nullopt_t nullopt { nullopt_t::_Construct::_Token }; template<typename _Fn> struct _Optional_func { _Fn& _M_f; }; class bad_optional_access : public exception { public: bad_optional_access() = default; virtual ~bad_optional_access() = default; const char* what() const noexcept override { return "bad optional access"; } }; [[__noreturn__]] void __throw_bad_optional_access() ; template <typename _Tp> struct _Optional_payload_base { using _Stored_type = remove_const_t<_Tp>; _Optional_payload_base() = default; ~_Optional_payload_base() = default; template<typename... _Args> constexpr _Optional_payload_base(in_place_t __tag, _Args&&... __args) ; template<typename _Up, typename... _Args> constexpr _Optional_payload_base(std::initializer_list<_Up> __il, _Args&&... __args) ; constexpr _Optional_payload_base(bool , const _Optional_payload_base& __other) ; constexpr _Optional_payload_base(bool , _Optional_payload_base&& __other) ; _Optional_payload_base(const _Optional_payload_base&) = default; _Optional_payload_base(_Optional_payload_base&&) = default; _Optional_payload_base& operator=(const _Optional_payload_base&) = default; _Optional_payload_base& operator=(_Optional_payload_base&&) = default; constexpr void _M_copy_assign(const _Optional_payload_base& __other) ; constexpr void _M_move_assign(_Optional_payload_base&& __other) noexcept(__and_v<is_nothrow_move_constructible<_Tp>, is_nothrow_move_assignable<_Tp>>) ; struct _Empty_byte { }; template<typename _Up, bool = is_trivially_destructible_v<_Up>> union _Storage { constexpr _Storage() ; template<typename... _Args> constexpr _Storage(in_place_t, _Args&&... __args) ; template<typename _Vp, typename... _Args> constexpr _Storage(std::initializer_list<_Vp> __il, _Args&&... __args) ; template<typename _Fn, typename _Arg> constexpr _Storage(_Optional_func<_Fn> __f, _Arg&& __arg) ; _Empty_byte _M_empty; _Up _M_value; }; template<typename _Up> union _Storage<_Up, false> { constexpr _Storage() ; template<typename... _Args> constexpr _Storage(in_place_t, _Args&&... __args) ; template<typename _Vp, typename... _Args> constexpr _Storage(std::initializer_list<_Vp> __il, _Args&&... __args) ; template<typename _Fn, typename _Arg> constexpr _Storage(_Optional_func<_Fn> __f, _Arg&& __arg) ; constexpr ~_Storage() ; _Empty_byte _M_empty; _Up _M_value; }; _Storage<_Stored_type> _M_payload; bool _M_engaged = false; template<typename... _Args> constexpr void _M_construct(_Args&&... __args) noexcept(is_nothrow_constructible_v<_Stored_type, _Args...>) ; constexpr void _M_destroy() noexcept ; template<typename _Fn, typename _Up> constexpr void _M_apply(_Optional_func<_Fn> __f, _Up&& __x) ; constexpr _Tp& _M_get() noexcept ; constexpr const _Tp& _M_get() const noexcept ; constexpr void _M_reset() noexcept ; }; template <typename _Tp, bool = is_trivially_destructible_v<_Tp>, bool = is_trivially_copy_assignable_v<_Tp> && is_trivially_copy_constructible_v<_Tp>, bool = is_trivially_move_assignable_v<_Tp> && is_trivially_move_constructible_v<_Tp>> struct _Optional_payload; template <typename _Tp> struct _Optional_payload<_Tp, true, true, true> : _Optional_payload_base<_Tp> { using _Optional_payload_base<_Tp>::_Optional_payload_base; _Optional_payload() = default; }; template <typename _Tp> struct _Optional_payload<_Tp, true, false, true> : _Optional_payload_base<_Tp> { using _Optional_payload_base<_Tp>::_Optional_payload_base; _Optional_payload() = default; ~_Optional_payload() = default; _Optional_payload(const _Optional_payload&) = default; _Optional_payload(_Optional_payload&&) = default; _Optional_payload& operator=(_Optional_payload&&) = default; constexpr _Optional_payload& operator=(const _Optional_payload& __other) ; }; template <typename _Tp> struct _Optional_payload<_Tp, true, true, false> : _Optional_payload_base<_Tp> { using _Optional_payload_base<_Tp>::_Optional_payload_base; _Optional_payload() = default; ~_Optional_payload() = default; _Optional_payload(const _Optional_payload&) = default; _Optional_payload(_Optional_payload&&) = default; _Optional_payload& operator=(const _Optional_payload&) = default; constexpr _Optional_payload& operator=(_Optional_payload&& __other) noexcept(__and_v<is_nothrow_move_constructible<_Tp>, is_nothrow_move_assignable<_Tp>>) ; }; template <typename _Tp> struct _Optional_payload<_Tp, true, false, false> : _Optional_payload_base<_Tp> { using _Optional_payload_base<_Tp>::_Optional_payload_base; _Optional_payload() = default; ~_Optional_payload() = default; _Optional_payload(const _Optional_payload&) = default; _Optional_payload(_Optional_payload&&) = default; constexpr _Optional_payload& operator=(const _Optional_payload& __other) ; constexpr _Optional_payload& operator=(_Optional_payload&& __other) noexcept(__and_v<is_nothrow_move_constructible<_Tp>, is_nothrow_move_assignable<_Tp>>) ; }; template <typename _Tp, bool _Copy, bool _Move> struct _Optional_payload<_Tp, false, _Copy, _Move> : _Optional_payload<_Tp, true, false, false> { using _Optional_payload<_Tp, true, false, false>::_Optional_payload; _Optional_payload() = default; _Optional_payload(const _Optional_payload&) = default; _Optional_payload(_Optional_payload&&) = default; _Optional_payload& operator=(const _Optional_payload&) = default; _Optional_payload& operator=(_Optional_payload&&) = default; constexpr ~_Optional_payload() ; }; template<typename _Tp, typename _Dp> class _Optional_base_impl { protected: using _Stored_type = remove_const_t<_Tp>; template<typename... _Args> constexpr void _M_construct(_Args&&... __args) noexcept(is_nothrow_constructible_v<_Stored_type, _Args...>) ; constexpr void _M_destruct() noexcept ; constexpr void _M_reset() noexcept ; constexpr bool _M_is_engaged() const noexcept ; constexpr _Tp& _M_get() noexcept ; constexpr const _Tp& _M_get() const noexcept ; }; template<typename _Tp, bool = is_trivially_copy_constructible_v<_Tp>, bool = is_trivially_move_constructible_v<_Tp>> struct _Optional_base : _Optional_base_impl<_Tp, _Optional_base<_Tp>> { constexpr _Optional_base() = default; template<typename... _Args, enable_if_t<is_constructible_v<_Tp, _Args...>, bool> = false> constexpr explicit _Optional_base(in_place_t, _Args&&... __args) ; template<typename _Up, typename... _Args, enable_if_t<is_constructible_v<_Tp, initializer_list<_Up>&, _Args...>, bool> = false> constexpr explicit _Optional_base(in_place_t, initializer_list<_Up> __il, _Args&&... __args) ; constexpr _Optional_base(const _Optional_base& __other) ; constexpr _Optional_base(_Optional_base&& __other) noexcept(is_nothrow_move_constructible_v<_Tp>) ; _Optional_base& operator=(const _Optional_base&) = default; _Optional_base& operator=(_Optional_base&&) = default; _Optional_payload<_Tp> _M_payload; }; template<typename _Tp> struct _Optional_base<_Tp, false, true> : _Optional_base_impl<_Tp, _Optional_base<_Tp>> { constexpr _Optional_base() = default; template<typename... _Args, enable_if_t<is_constructible_v<_Tp, _Args...>, bool> = false> constexpr explicit _Optional_base(in_place_t, _Args&&... __args) ; template<typename _Up, typename... _Args, enable_if_t<is_constructible_v<_Tp, initializer_list<_Up>&, _Args...>, bool> = false> constexpr explicit _Optional_base(in_place_t, initializer_list<_Up> __il, _Args... __args) ; constexpr _Optional_base(const _Optional_base& __other) ; constexpr _Optional_base(_Optional_base&& __other) = default; _Optional_base& operator=(const _Optional_base&) = default; _Optional_base& operator=(_Optional_base&&) = default; _Optional_payload<_Tp> _M_payload; }; template<typename _Tp> struct _Optional_base<_Tp, true, false> : _Optional_base_impl<_Tp, _Optional_base<_Tp>> { constexpr _Optional_base() = default; template<typename... _Args, enable_if_t<is_constructible_v<_Tp, _Args...>, bool> = false> constexpr explicit _Optional_base(in_place_t, _Args&&... __args) ; template<typename _Up, typename... _Args, enable_if_t<is_constructible_v<_Tp, initializer_list<_Up>&, _Args...>, bool> = false> constexpr explicit _Optional_base(in_place_t, initializer_list<_Up> __il, _Args&&... __args) ; constexpr _Optional_base(const _Optional_base& __other) = default; constexpr _Optional_base(_Optional_base&& __other) noexcept(is_nothrow_move_constructible_v<_Tp>) ; _Optional_base& operator=(const _Optional_base&) = default; _Optional_base& operator=(_Optional_base&&) = default; _Optional_payload<_Tp> _M_payload; }; template<typename _Tp> struct _Optional_base<_Tp, true, true> : _Optional_base_impl<_Tp, _Optional_base<_Tp>> { constexpr _Optional_base() = default; template<typename... _Args, enable_if_t<is_constructible_v<_Tp, _Args...>, bool> = false> constexpr explicit _Optional_base(in_place_t, _Args&&... __args) ; template<typename _Up, typename... _Args, enable_if_t<is_constructible_v<_Tp, initializer_list<_Up>&, _Args...>, bool> = false> constexpr explicit _Optional_base(in_place_t, initializer_list<_Up> __il, _Args&&... __args) ; constexpr _Optional_base(const _Optional_base& __other) = default; constexpr _Optional_base(_Optional_base&& __other) = default; _Optional_base& operator=(const _Optional_base&) = default; _Optional_base& operator=(_Optional_base&&) = default; _Optional_payload<_Tp> _M_payload; }; template<typename _Tp> class optional; template<typename _Tp> inline constexpr bool __is_optional_v = false; template<typename _Tp> inline constexpr bool __is_optional_v<optional<_Tp>> = true; template<typename _Tp, typename _Up> using __converts_from_optional = __or_<is_constructible<_Tp, const optional<_Up>&>, is_constructible<_Tp, optional<_Up>&>, is_constructible<_Tp, const optional<_Up>&&>, is_constructible<_Tp, optional<_Up>&&>, is_convertible<const optional<_Up>&, _Tp>, is_convertible<optional<_Up>&, _Tp>, is_convertible<const optional<_Up>&&, _Tp>, is_convertible<optional<_Up>&&, _Tp>>; template<typename _Tp, typename _Up> using __assigns_from_optional = __or_<is_assignable<_Tp&, const optional<_Up>&>, is_assignable<_Tp&, optional<_Up>&>, is_assignable<_Tp&, const optional<_Up>&&>, is_assignable<_Tp&, optional<_Up>&&>>; template<typename _Tp> class optional : private _Optional_base<_Tp>, private _Enable_copy_move< is_copy_constructible_v<_Tp>, __and_v<is_copy_constructible<_Tp>, is_copy_assignable<_Tp>>, is_move_constructible_v<_Tp>, __and_v<is_move_constructible<_Tp>, is_move_assignable<_Tp>>, optional<_Tp>> { static_assert(!is_same_v<remove_cv_t<_Tp>, nullopt_t>); static_assert(!is_same_v<remove_cv_t<_Tp>, in_place_t>); static_assert(is_object_v<_Tp> && !is_array_v<_Tp>); private: using _Base = _Optional_base<_Tp>; template<typename _Up> using __not_self = __not_<is_same<optional, __remove_cvref_t<_Up>>>; template<typename _Up> using __not_tag = __not_<is_same<in_place_t, __remove_cvref_t<_Up>>>; template<typename... _Cond> using _Requires = enable_if_t<__and_v<_Cond...>, bool>; public: using value_type = _Tp; constexpr optional() noexcept ; constexpr optional(nullopt_t) noexcept ; template<typename _Up = _Tp, _Requires<__not_self<_Up>, __not_tag<_Up>, is_constructible<_Tp, _Up>, is_convertible<_Up, _Tp>> = true> constexpr optional(_Up&& __t) noexcept(is_nothrow_constructible_v<_Tp, _Up>) ; template<typename _Up = _Tp, _Requires<__not_self<_Up>, __not_tag<_Up>, is_constructible<_Tp, _Up>, __not_<is_convertible<_Up, _Tp>>> = false> explicit constexpr optional(_Up&& __t) noexcept(is_nothrow_constructible_v<_Tp, _Up>) ; template<typename _Up, _Requires<__not_<is_same<_Tp, _Up>>, is_constructible<_Tp, const _Up&>, is_convertible<const _Up&, _Tp>, __not_<__converts_from_optional<_Tp, _Up>>> = true> constexpr optional(const optional<_Up>& __t) noexcept(is_nothrow_constructible_v<_Tp, const _Up&>) ; template<typename _Up, _Requires<__not_<is_same<_Tp, _Up>>, is_constructible<_Tp, const _Up&>, __not_<is_convertible<const _Up&, _Tp>>, __not_<__converts_from_optional<_Tp, _Up>>> = false> explicit constexpr optional(const optional<_Up>& __t) noexcept(is_nothrow_constructible_v<_Tp, const _Up&>) ; template<typename _Up, _Requires<__not_<is_same<_Tp, _Up>>, is_constructible<_Tp, _Up>, is_convertible<_Up, _Tp>, __not_<__converts_from_optional<_Tp, _Up>>> = true> constexpr optional(optional<_Up>&& __t) noexcept(is_nothrow_constructible_v<_Tp, _Up>) ; template<typename _Up, _Requires<__not_<is_same<_Tp, _Up>>, is_constructible<_Tp, _Up>, __not_<is_convertible<_Up, _Tp>>, __not_<__converts_from_optional<_Tp, _Up>>> = false> explicit constexpr optional(optional<_Up>&& __t) noexcept(is_nothrow_constructible_v<_Tp, _Up>) ; template<typename... _Args, _Requires<is_constructible<_Tp, _Args...>> = false> explicit constexpr optional(in_place_t, _Args&&... __args) noexcept(is_nothrow_constructible_v<_Tp, _Args...>) ; template<typename _Up, typename... _Args, _Requires<is_constructible<_Tp, initializer_list<_Up>&, _Args...>> = false> explicit constexpr optional(in_place_t, initializer_list<_Up> __il, _Args&&... __args) noexcept(is_nothrow_constructible_v<_Tp, initializer_list<_Up>&, _Args...>) ; constexpr optional& operator=(nullopt_t) noexcept ; template<typename _Up = _Tp> constexpr enable_if_t<__and_v<__not_self<_Up>, __not_<__and_<is_scalar<_Tp>, is_same<_Tp, decay_t<_Up>>>>, is_constructible<_Tp, _Up>, is_assignable<_Tp&, _Up>>, optional&> operator=(_Up&& __u) noexcept(__and_v<is_nothrow_constructible<_Tp, _Up>, is_nothrow_assignable<_Tp&, _Up>>) ; template<typename _Up> constexpr enable_if_t<__and_v<__not_<is_same<_Tp, _Up>>, is_constructible<_Tp, const _Up&>, is_assignable<_Tp&, const _Up&>, __not_<__converts_from_optional<_Tp, _Up>>, __not_<__assigns_from_optional<_Tp, _Up>>>, optional&> operator=(const optional<_Up>& __u) noexcept(__and_v<is_nothrow_constructible<_Tp, const _Up&>, is_nothrow_assignable<_Tp&, const _Up&>>) ; template<typename _Up> constexpr enable_if_t<__and_v<__not_<is_same<_Tp, _Up>>, is_constructible<_Tp, _Up>, is_assignable<_Tp&, _Up>, __not_<__converts_from_optional<_Tp, _Up>>, __not_<__assigns_from_optional<_Tp, _Up>>>, optional&> operator=(optional<_Up>&& __u) noexcept(__and_v<is_nothrow_constructible<_Tp, _Up>, is_nothrow_assignable<_Tp&, _Up>>) ; template<typename... _Args> constexpr enable_if_t<is_constructible_v<_Tp, _Args...>, _Tp&> emplace(_Args&&... __args) noexcept(is_nothrow_constructible_v<_Tp, _Args...>) ; template<typename _Up, typename... _Args> constexpr enable_if_t<is_constructible_v<_Tp, initializer_list<_Up>&, _Args...>, _Tp&> emplace(initializer_list<_Up> __il, _Args&&... __args) noexcept(is_nothrow_constructible_v<_Tp, initializer_list<_Up>&, _Args...>) ; constexpr void swap(optional& __other) noexcept(is_nothrow_move_constructible_v<_Tp> && is_nothrow_swappable_v<_Tp>) ; constexpr const _Tp* operator->() const noexcept ; constexpr _Tp* operator->() noexcept ; constexpr const _Tp& operator*() const& noexcept ; constexpr _Tp& operator*()& noexcept ; constexpr _Tp&& operator*()&& noexcept ; constexpr const _Tp&& operator*() const&& noexcept ; constexpr explicit operator bool() const noexcept ; constexpr bool has_value() const noexcept ; constexpr const _Tp& value() const& ; constexpr _Tp& value()& ; constexpr _Tp&& value()&& ; constexpr const _Tp&& value() const&& ; template<typename _Up> constexpr _Tp value_or(_Up&& __u) const& ; template<typename _Up> constexpr _Tp value_or(_Up&& __u) && ; constexpr void reset() noexcept ; private: template<typename _Up> friend class optional; template<typename _Fn, typename _Value> explicit constexpr optional(_Optional_func<_Fn> __f, _Value&& __v) ; }; template<typename _Tp> using __optional_relop_t = enable_if_t<is_convertible<_Tp, bool>::value, bool>; template<typename _Tp, typename _Up> using __optional_eq_t = __optional_relop_t< decltype(std::declval<const _Tp&>() == std::declval<const _Up&>()) >; template<typename _Tp, typename _Up> using __optional_ne_t = __optional_relop_t< decltype(std::declval<const _Tp&>() != std::declval<const _Up&>()) >; template<typename _Tp, typename _Up> using __optional_lt_t = __optional_relop_t< decltype(std::declval<const _Tp&>() < std::declval<const _Up&>()) >; template<typename _Tp, typename _Up> using __optional_gt_t = __optional_relop_t< decltype(std::declval<const _Tp&>() > std::declval<const _Up&>()) >; template<typename _Tp, typename _Up> using __optional_le_t = __optional_relop_t< decltype(std::declval<const _Tp&>() <= std::declval<const _Up&>()) >; template<typename _Tp, typename _Up> using __optional_ge_t = __optional_relop_t< decltype(std::declval<const _Tp&>() >= std::declval<const _Up&>()) >; template<typename _Tp, typename _Up> constexpr auto operator==(const optional<_Tp>& __lhs, const optional<_Up>& __rhs) -> __optional_eq_t<_Tp, _Up> ; template<typename _Tp, typename _Up> constexpr auto operator!=(const optional<_Tp>& __lhs, const optional<_Up>& __rhs) -> __optional_ne_t<_Tp, _Up> ; template<typename _Tp, typename _Up> constexpr auto operator<(const optional<_Tp>& __lhs, const optional<_Up>& __rhs) -> __optional_lt_t<_Tp, _Up> ; template<typename _Tp, typename _Up> constexpr auto operator>(const optional<_Tp>& __lhs, const optional<_Up>& __rhs) -> __optional_gt_t<_Tp, _Up> ; template<typename _Tp, typename _Up> constexpr auto operator<=(const optional<_Tp>& __lhs, const optional<_Up>& __rhs) -> __optional_le_t<_Tp, _Up> ; template<typename _Tp, typename _Up> constexpr auto operator>=(const optional<_Tp>& __lhs, const optional<_Up>& __rhs) -> __optional_ge_t<_Tp, _Up> ; template<typename _Tp, three_way_comparable_with<_Tp> _Up> constexpr compare_three_way_result_t<_Tp, _Up> operator<=>(const optional<_Tp>& __x, const optional<_Up>& __y) ; template<typename _Tp> constexpr bool operator==(const optional<_Tp>& __lhs, nullopt_t) noexcept ; template<typename _Tp> constexpr strong_ordering operator<=>(const optional<_Tp>& __x, nullopt_t) noexcept ; template<typename _Tp, typename _Up> constexpr auto operator==(const optional<_Tp>& __lhs, const _Up& __rhs) -> __optional_eq_t<_Tp, _Up> ; template<typename _Tp, typename _Up> constexpr auto operator==(const _Up& __lhs, const optional<_Tp>& __rhs) -> __optional_eq_t<_Up, _Tp> ; template<typename _Tp, typename _Up> constexpr auto operator!=(const optional<_Tp>& __lhs, const _Up& __rhs) -> __optional_ne_t<_Tp, _Up> ; template<typename _Tp, typename _Up> constexpr auto operator!=(const _Up& __lhs, const optional<_Tp>& __rhs) -> __optional_ne_t<_Up, _Tp> ; template<typename _Tp, typename _Up> constexpr auto operator<(const optional<_Tp>& __lhs, const _Up& __rhs) -> __optional_lt_t<_Tp, _Up> ; template<typename _Tp, typename _Up> constexpr auto operator<(const _Up& __lhs, const optional<_Tp>& __rhs) -> __optional_lt_t<_Up, _Tp> ; template<typename _Tp, typename _Up> constexpr auto operator>(const optional<_Tp>& __lhs, const _Up& __rhs) -> __optional_gt_t<_Tp, _Up> ; template<typename _Tp, typename _Up> constexpr auto operator>(const _Up& __lhs, const optional<_Tp>& __rhs) -> __optional_gt_t<_Up, _Tp> ; template<typename _Tp, typename _Up> constexpr auto operator<=(const optional<_Tp>& __lhs, const _Up& __rhs) -> __optional_le_t<_Tp, _Up> ; template<typename _Tp, typename _Up> constexpr auto operator<=(const _Up& __lhs, const optional<_Tp>& __rhs) -> __optional_le_t<_Up, _Tp> ; template<typename _Tp, typename _Up> constexpr auto operator>=(const optional<_Tp>& __lhs, const _Up& __rhs) -> __optional_ge_t<_Tp, _Up> ; template<typename _Tp, typename _Up> constexpr auto operator>=(const _Up& __lhs, const optional<_Tp>& __rhs) -> __optional_ge_t<_Up, _Tp> ; template<typename _Tp, typename _Up> requires (!__is_optional_v<_Up>) && three_way_comparable_with<_Tp, _Up> constexpr compare_three_way_result_t<_Tp, _Up> operator<=>(const optional<_Tp>& __x, const _Up& __v) ; template<typename _Tp> constexpr enable_if_t<is_move_constructible_v<_Tp> && is_swappable_v<_Tp>> swap(optional<_Tp>& __lhs, optional<_Tp>& __rhs) noexcept(noexcept(__lhs.swap(__rhs))) ; template<typename _Tp> enable_if_t<!(is_move_constructible_v<_Tp> && is_swappable_v<_Tp>)> swap(optional<_Tp>&, optional<_Tp>&) = delete; template<typename _Tp> constexpr enable_if_t<is_constructible_v<decay_t<_Tp>, _Tp>, optional<decay_t<_Tp>>> make_optional(_Tp&& __t) noexcept(is_nothrow_constructible_v<optional<decay_t<_Tp>>, _Tp>) ; template<typename _Tp, typename... _Args> constexpr enable_if_t<is_constructible_v<_Tp, _Args...>, optional<_Tp>> make_optional(_Args&&... __args) noexcept(is_nothrow_constructible_v<_Tp, _Args...>) ; template<typename _Tp, typename _Up, typename... _Args> constexpr enable_if_t<is_constructible_v<_Tp, initializer_list<_Up>&, _Args...>, optional<_Tp>> make_optional(initializer_list<_Up> __il, _Args&&... __args) noexcept(is_nothrow_constructible_v<_Tp, initializer_list<_Up>&, _Args...>) ; template<typename _Tp, typename _Up = remove_const_t<_Tp>, bool = __poison_hash<_Up>::__enable_hash_call> struct __optional_hash_call_base { size_t operator()(const optional<_Tp>& __t) const noexcept(noexcept(hash<_Up>{}(*__t))) ; }; template<typename _Tp, typename _Up> struct __optional_hash_call_base<_Tp, _Up, false> {}; template<typename _Tp> struct hash<optional<_Tp>> : private __poison_hash<remove_const_t<_Tp>>, public __optional_hash_call_base<_Tp> { using result_type [[__deprecated__]] = size_t; using argument_type [[__deprecated__]] = optional<_Tp>; }; template<typename _Tp> struct __is_fast_hash<hash<optional<_Tp>>> : __is_fast_hash<hash<_Tp>> { }; template <typename _Tp> optional(_Tp) -> optional<_Tp>; } namespace std __attribute__ ((__visibility__ ("default"))) { inline constexpr size_t dynamic_extent = static_cast<size_t>(-1); template<typename _Type, size_t _Extent> class span; namespace __detail { template<typename _Tp> inline constexpr bool __is_span = false; template<typename _Tp, size_t _Num> inline constexpr bool __is_span<span<_Tp, _Num>> = true; template<typename _Tp> inline constexpr bool __is_std_array = false; template<typename _Tp, size_t _Num> inline constexpr bool __is_std_array<std::array<_Tp, _Num>> = true; template<size_t _Extent> class __extent_storage { public: constexpr __extent_storage(size_t) noexcept ; static constexpr size_t _M_extent() noexcept ; }; template<> class __extent_storage<dynamic_extent> { public: constexpr __extent_storage(size_t __extent) ; constexpr size_t _M_extent() const noexcept ; private: size_t _M_extent_value; }; } template<typename _Type, size_t _Extent = dynamic_extent> class span { template<size_t _Offset, size_t _Count> static constexpr size_t _S_subspan_extent() ; template<typename _Tp, size_t _ArrayExtent> requires (_Extent == dynamic_extent || _ArrayExtent == _Extent) using __is_compatible_array = __is_array_convertible<_Type, _Tp>; template<typename _Ref> using __is_compatible_ref = __is_array_convertible<_Type, remove_reference_t<_Ref>>; public: using element_type = _Type; using value_type = remove_cv_t<_Type>; using size_type = size_t; using difference_type = ptrdiff_t; using pointer = _Type*; using const_pointer = const _Type*; using reference = element_type&; using const_reference = const element_type&; using iterator = __gnu_cxx::__normal_iterator<pointer, span>; using reverse_iterator = std::reverse_iterator<iterator>; static constexpr size_t extent = _Extent; constexpr span() noexcept requires (_Extent == dynamic_extent || _Extent == 0) ; template<contiguous_iterator _It> requires __is_compatible_ref<iter_reference_t<_It>>::value constexpr explicit(extent != dynamic_extent) span(_It __first, size_type __count) ; template<contiguous_iterator _It, sized_sentinel_for<_It> _End> requires __is_compatible_ref<iter_reference_t<_It>>::value && (!is_convertible_v<_End, size_type>) constexpr explicit(extent != dynamic_extent) span(_It __first, _End __last) noexcept(noexcept(__last - __first)) ; template<size_t _ArrayExtent> requires (_Extent == dynamic_extent || _ArrayExtent == _Extent) constexpr span(type_identity_t<element_type> (&__arr)[_ArrayExtent]) ; template<typename _Tp, size_t _ArrayExtent> requires __is_compatible_array<_Tp, _ArrayExtent>::value constexpr span(array<_Tp, _ArrayExtent>& __arr) ; template<typename _Tp, size_t _ArrayExtent> requires __is_compatible_array<const _Tp, _ArrayExtent>::value constexpr span(const array<_Tp, _ArrayExtent>& __arr) ; template<typename _Range> requires (!__detail::__is_span<remove_cvref_t<_Range>>) && (!__detail::__is_std_array<remove_cvref_t<_Range>>) && (!is_array_v<remove_cvref_t<_Range>>) && ranges::contiguous_range<_Range> && ranges::sized_range<_Range> && (ranges::borrowed_range<_Range> || is_const_v<element_type>) && __is_compatible_ref<ranges::range_reference_t<_Range>>::value constexpr explicit(extent != dynamic_extent) span(_Range&& __range) noexcept(noexcept(ranges::data(__range)) && noexcept(ranges::size(__range))) ; constexpr span(const span&) noexcept = default; template<typename _OType, size_t _OExtent> requires (_Extent == dynamic_extent || _OExtent == dynamic_extent || _Extent == _OExtent) && (__is_array_convertible<_Type, _OType>::value) constexpr explicit(extent != dynamic_extent && _OExtent == dynamic_extent) span(const span<_OType, _OExtent>& __s) ; ~span() noexcept = default; constexpr span& operator=(const span&) noexcept = default; constexpr size_type size() const noexcept ; constexpr size_type size_bytes() const noexcept ; [[nodiscard]] constexpr bool empty() const noexcept ; constexpr reference front() const noexcept ; constexpr reference back() const noexcept ; constexpr reference operator[](size_type __idx) const noexcept ; constexpr pointer data() const noexcept ; constexpr iterator begin() const noexcept ; constexpr iterator end() const noexcept ; constexpr reverse_iterator rbegin() const noexcept ; constexpr reverse_iterator rend() const noexcept ; template<size_t _Count> constexpr span<element_type, _Count> first() const noexcept ; constexpr span<element_type, dynamic_extent> first(size_type __count) const noexcept ; template<size_t _Count> constexpr span<element_type, _Count> last() const noexcept ; constexpr span<element_type, dynamic_extent> last(size_type __count) const noexcept ; template<size_t _Offset, size_t _Count = dynamic_extent> constexpr auto subspan() const noexcept -> span<element_type, _S_subspan_extent<_Offset, _Count>()> ; constexpr span<element_type, dynamic_extent> subspan(size_type __offset, size_type __count = dynamic_extent) const noexcept ; private: pointer _M_ptr; [[no_unique_address]] __detail::__extent_storage<extent> _M_extent; }; template<typename _Type, size_t _ArrayExtent> span(_Type(&)[_ArrayExtent]) -> span<_Type, _ArrayExtent>; template<typename _Type, size_t _ArrayExtent> span(array<_Type, _ArrayExtent>&) -> span<_Type, _ArrayExtent>; template<typename _Type, size_t _ArrayExtent> span(const array<_Type, _ArrayExtent>&) -> span<const _Type, _ArrayExtent>; template<contiguous_iterator _Iter, typename _End> span(_Iter, _End) -> span<remove_reference_t<iter_reference_t<_Iter>>>; template<ranges::contiguous_range _Range> span(_Range &&) -> span<remove_reference_t<ranges::range_reference_t<_Range&>>>; template<typename _Type, size_t _Extent> span<const byte, _Extent == dynamic_extent ? dynamic_extent : _Extent * sizeof(_Type)> as_bytes(span<_Type, _Extent> __sp) noexcept ; template<typename _Type, size_t _Extent> requires (!is_const_v<_Type>) span<byte, _Extent == dynamic_extent ? dynamic_extent : _Extent * sizeof(_Type)> as_writable_bytes(span<_Type, _Extent> __sp) noexcept ; namespace ranges { template<typename _ElementType, size_t _Extent> inline constexpr bool enable_borrowed_range<span<_ElementType, _Extent>> = true; template<typename _ElementType, size_t _Extent> inline constexpr bool enable_view<span<_ElementType, _Extent>> = true; } } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename... _Types> class tuple; template<typename... _Types> class variant; template <typename> struct hash; template<typename _Variant> struct variant_size; template<typename _Variant> struct variant_size<const _Variant> : variant_size<_Variant> {}; template<typename _Variant> struct variant_size<volatile _Variant> : variant_size<_Variant> {}; template<typename _Variant> struct variant_size<const volatile _Variant> : variant_size<_Variant> {}; template<typename... _Types> struct variant_size<variant<_Types...>> : std::integral_constant<size_t, sizeof...(_Types)> {}; template<typename _Variant> inline constexpr size_t variant_size_v = variant_size<_Variant>::value; template<typename... _Types> inline constexpr size_t variant_size_v<variant<_Types...>> = sizeof...(_Types); template<typename... _Types> inline constexpr size_t variant_size_v<const variant<_Types...>> = sizeof...(_Types); template<size_t _Np, typename _Variant> struct variant_alternative; template<size_t _Np, typename... _Types> struct variant_alternative<_Np, variant<_Types...>> { static_assert(_Np < sizeof...(_Types)); using type = typename _Nth_type<_Np, _Types...>::type; }; template<size_t _Np, typename _Variant> using variant_alternative_t = typename variant_alternative<_Np, _Variant>::type; template<size_t _Np, typename _Variant> struct variant_alternative<_Np, const _Variant> { using type = const variant_alternative_t<_Np, _Variant>; }; template<size_t _Np, typename _Variant> struct variant_alternative<_Np, volatile _Variant> { using type = volatile variant_alternative_t<_Np, _Variant>; }; template<size_t _Np, typename _Variant> struct variant_alternative<_Np, const volatile _Variant> { using type = const volatile variant_alternative_t<_Np, _Variant>; }; inline constexpr size_t variant_npos = -1; template<size_t _Np, typename... _Types> constexpr variant_alternative_t<_Np, variant<_Types...>>& get(variant<_Types...>&); template<size_t _Np, typename... _Types> constexpr variant_alternative_t<_Np, variant<_Types...>>&& get(variant<_Types...>&&); template<size_t _Np, typename... _Types> constexpr variant_alternative_t<_Np, variant<_Types...>> const& get(const variant<_Types...>&); template<size_t _Np, typename... _Types> constexpr variant_alternative_t<_Np, variant<_Types...>> const&& get(const variant<_Types...>&&); template<typename _Result_type, typename _Visitor, typename... _Variants> constexpr decltype(auto) __do_visit(_Visitor&& __visitor, _Variants&&... __variants); template <typename... _Types, typename _Tp> constexpr decltype(auto) __variant_cast(_Tp&& __rhs) ; namespace __detail { namespace __variant { struct __variant_cookie {}; struct __variant_idx_cookie { using type = __variant_idx_cookie; }; template<typename _Tp> struct __deduce_visit_result { using type = _Tp; }; template<typename _Visitor, typename... _Variants> constexpr void __raw_visit(_Visitor&& __visitor, _Variants&&... __variants) ; template<typename _Visitor, typename... _Variants> constexpr void __raw_idx_visit(_Visitor&& __visitor, _Variants&&... __variants) ; template<typename... _Types> constexpr std::variant<_Types...>& __as(std::variant<_Types...>& __v) noexcept ; template<typename... _Types> constexpr const std::variant<_Types...>& __as(const std::variant<_Types...>& __v) noexcept ; template<typename... _Types> constexpr std::variant<_Types...>&& __as(std::variant<_Types...>&& __v) noexcept ; template<typename... _Types> constexpr const std::variant<_Types...>&& __as(const std::variant<_Types...>&& __v) noexcept ; template<typename _Type, bool = std::is_trivially_destructible_v<_Type>> struct _Uninitialized; template<typename _Type> struct _Uninitialized<_Type, true> { template<typename... _Args> constexpr _Uninitialized(in_place_index_t<0>, _Args&&... __args) ; constexpr const _Type& _M_get() const & noexcept ; constexpr _Type& _M_get() & noexcept ; constexpr const _Type&& _M_get() const && noexcept ; constexpr _Type&& _M_get() && noexcept ; _Type _M_storage; }; template<typename _Type> struct _Uninitialized<_Type, false> { template<typename... _Args> constexpr _Uninitialized(in_place_index_t<0>, _Args&&... __args) ; const _Type& _M_get() const & noexcept ; _Type& _M_get() & noexcept ; const _Type&& _M_get() const && noexcept ; _Type&& _M_get() && noexcept ; __gnu_cxx::__aligned_membuf<_Type> _M_storage; }; template<size_t _Np, typename _Union> constexpr decltype(auto) __get_n(_Union&& __u) noexcept ; template<size_t _Np, typename _Variant> constexpr decltype(auto) __get(_Variant&& __v) noexcept ; template<size_t _Np, typename _Union> constexpr decltype(auto) __construct_n(_Union& __u) noexcept ; template<typename... _Types> struct _Traits { static constexpr bool _S_default_ctor = is_default_constructible_v<typename _Nth_type<0, _Types...>::type>; static constexpr bool _S_copy_ctor = (is_copy_constructible_v<_Types> && ...); static constexpr bool _S_move_ctor = (is_move_constructible_v<_Types> && ...); static constexpr bool _S_copy_assign = _S_copy_ctor && (is_copy_assignable_v<_Types> && ...); static constexpr bool _S_move_assign = _S_move_ctor && (is_move_assignable_v<_Types> && ...); static constexpr bool _S_trivial_dtor = (is_trivially_destructible_v<_Types> && ...); static constexpr bool _S_trivial_copy_ctor = (is_trivially_copy_constructible_v<_Types> && ...); static constexpr bool _S_trivial_move_ctor = (is_trivially_move_constructible_v<_Types> && ...); static constexpr bool _S_trivial_copy_assign = _S_trivial_dtor && _S_trivial_copy_ctor && (is_trivially_copy_assignable_v<_Types> && ...); static constexpr bool _S_trivial_move_assign = _S_trivial_dtor && _S_trivial_move_ctor && (is_trivially_move_assignable_v<_Types> && ...); static constexpr bool _S_nothrow_default_ctor = is_nothrow_default_constructible_v< typename _Nth_type<0, _Types...>::type>; static constexpr bool _S_nothrow_copy_ctor = false; static constexpr bool _S_nothrow_move_ctor = (is_nothrow_move_constructible_v<_Types> && ...); static constexpr bool _S_nothrow_copy_assign = false; static constexpr bool _S_nothrow_move_assign = _S_nothrow_move_ctor && (is_nothrow_move_assignable_v<_Types> && ...); }; template<typename... _Types> union _Variadic_union { _Variadic_union() = default; template<size_t _Np, typename... _Args> _Variadic_union(in_place_index_t<_Np>, _Args&&...) = delete; }; template<typename _First, typename... _Rest> union _Variadic_union<_First, _Rest...> { constexpr _Variadic_union() ; template<typename... _Args> constexpr _Variadic_union(in_place_index_t<0>, _Args&&... __args) ; template<size_t _Np, typename... _Args> constexpr _Variadic_union(in_place_index_t<_Np>, _Args&&... __args) ; _Uninitialized<_First> _M_first; _Variadic_union<_Rest...> _M_rest; }; template<typename _Tp> struct _Never_valueless_alt : __and_<bool_constant<sizeof(_Tp) <= 256>, is_trivially_copyable<_Tp>> { }; template <typename... _Types> constexpr bool __never_valueless() ; template<bool __trivially_destructible, typename... _Types> struct _Variant_storage; template <typename... _Types> using __select_index = typename __select_int::_Select_int_base<sizeof...(_Types), unsigned char, unsigned short>::type::value_type; template<typename... _Types> struct _Variant_storage<false, _Types...> { constexpr _Variant_storage() ; template<size_t _Np, typename... _Args> constexpr _Variant_storage(in_place_index_t<_Np>, _Args&&... __args) ; constexpr void _M_reset() ; constexpr ~_Variant_storage() ; constexpr bool _M_valid() const noexcept ; _Variadic_union<_Types...> _M_u; using __index_type = __select_index<_Types...>; __index_type _M_index; }; template<typename... _Types> struct _Variant_storage<true, _Types...> { constexpr _Variant_storage() ; template<size_t _Np, typename... _Args> constexpr _Variant_storage(in_place_index_t<_Np>, _Args&&... __args) ; constexpr void _M_reset() noexcept ; constexpr bool _M_valid() const noexcept ; _Variadic_union<_Types...> _M_u; using __index_type = __select_index<_Types...>; __index_type _M_index; }; template<size_t _Np, bool _Triv, typename... _Types, typename... _Args> constexpr void __emplace(_Variant_storage<_Triv, _Types...>& __v, _Args&&... __args) ; template<typename... _Types> using _Variant_storage_alias = _Variant_storage<_Traits<_Types...>::_S_trivial_dtor, _Types...>; template<bool, typename... _Types> struct _Copy_ctor_base : _Variant_storage_alias<_Types...> { using _Base = _Variant_storage_alias<_Types...>; using _Base::_Base; constexpr _Copy_ctor_base(const _Copy_ctor_base& __rhs) noexcept(_Traits<_Types...>::_S_nothrow_copy_ctor) ; _Copy_ctor_base(_Copy_ctor_base&&) = default; _Copy_ctor_base& operator=(const _Copy_ctor_base&) = default; _Copy_ctor_base& operator=(_Copy_ctor_base&&) = default; }; template<typename... _Types> struct _Copy_ctor_base<true, _Types...> : _Variant_storage_alias<_Types...> { using _Base = _Variant_storage_alias<_Types...>; using _Base::_Base; }; template<typename... _Types> using _Copy_ctor_alias = _Copy_ctor_base<_Traits<_Types...>::_S_trivial_copy_ctor, _Types...>; template<bool, typename... _Types> struct _Move_ctor_base : _Copy_ctor_alias<_Types...> { using _Base = _Copy_ctor_alias<_Types...>; using _Base::_Base; constexpr _Move_ctor_base(_Move_ctor_base&& __rhs) noexcept(_Traits<_Types...>::_S_nothrow_move_ctor) ; _Move_ctor_base(const _Move_ctor_base&) = default; _Move_ctor_base& operator=(const _Move_ctor_base&) = default; _Move_ctor_base& operator=(_Move_ctor_base&&) = default; }; template<typename... _Types> struct _Move_ctor_base<true, _Types...> : _Copy_ctor_alias<_Types...> { using _Base = _Copy_ctor_alias<_Types...>; using _Base::_Base; }; template<typename... _Types> using _Move_ctor_alias = _Move_ctor_base<_Traits<_Types...>::_S_trivial_move_ctor, _Types...>; template<bool, typename... _Types> struct _Copy_assign_base : _Move_ctor_alias<_Types...> { using _Base = _Move_ctor_alias<_Types...>; using _Base::_Base; constexpr _Copy_assign_base& operator=(const _Copy_assign_base& __rhs) noexcept(_Traits<_Types...>::_S_nothrow_copy_assign) ; _Copy_assign_base(const _Copy_assign_base&) = default; _Copy_assign_base(_Copy_assign_base&&) = default; _Copy_assign_base& operator=(_Copy_assign_base&&) = default; }; template<typename... _Types> struct _Copy_assign_base<true, _Types...> : _Move_ctor_alias<_Types...> { using _Base = _Move_ctor_alias<_Types...>; using _Base::_Base; }; template<typename... _Types> using _Copy_assign_alias = _Copy_assign_base<_Traits<_Types...>::_S_trivial_copy_assign, _Types...>; template<bool, typename... _Types> struct _Move_assign_base : _Copy_assign_alias<_Types...> { using _Base = _Copy_assign_alias<_Types...>; using _Base::_Base; constexpr _Move_assign_base& operator=(_Move_assign_base&& __rhs) noexcept(_Traits<_Types...>::_S_nothrow_move_assign) ; _Move_assign_base(const _Move_assign_base&) = default; _Move_assign_base(_Move_assign_base&&) = default; _Move_assign_base& operator=(const _Move_assign_base&) = default; }; template<typename... _Types> struct _Move_assign_base<true, _Types...> : _Copy_assign_alias<_Types...> { using _Base = _Copy_assign_alias<_Types...>; using _Base::_Base; }; template<typename... _Types> using _Move_assign_alias = _Move_assign_base<_Traits<_Types...>::_S_trivial_move_assign, _Types...>; template<typename... _Types> struct _Variant_base : _Move_assign_alias<_Types...> { using _Base = _Move_assign_alias<_Types...>; constexpr _Variant_base() noexcept(_Traits<_Types...>::_S_nothrow_default_ctor) ; template<size_t _Np, typename... _Args> constexpr explicit _Variant_base(in_place_index_t<_Np> __i, _Args&&... __args) ; _Variant_base(const _Variant_base&) = default; _Variant_base(_Variant_base&&) = default; _Variant_base& operator=(const _Variant_base&) = default; _Variant_base& operator=(_Variant_base&&) = default; }; template<typename _Tp, typename... _Types> inline constexpr bool __exactly_once = std::__find_uniq_type_in_pack<_Tp, _Types...>() < sizeof...(_Types); template<typename _Ti> struct _Arr { _Ti _M_x[1]; }; template<size_t _Ind, typename _Tp, typename _Ti, typename = void> struct _Build_FUN { void _S_fun() = delete; }; template<size_t _Ind, typename _Tp, typename _Ti> struct _Build_FUN<_Ind, _Tp, _Ti, void_t<decltype(_Arr<_Ti>{{std::declval<_Tp>()}})>> { static integral_constant<size_t, _Ind> _S_fun(_Ti); }; template<typename _Tp, typename _Variant, typename = make_index_sequence<variant_size_v<_Variant>>> struct _Build_FUNs; template<typename _Tp, typename... _Ti, size_t... _Ind> struct _Build_FUNs<_Tp, variant<_Ti...>, index_sequence<_Ind...>> : _Build_FUN<_Ind, _Tp, _Ti>... { using _Build_FUN<_Ind, _Tp, _Ti>::_S_fun...; }; template<typename _Tp, typename _Variant> using _FUN_type = decltype(_Build_FUNs<_Tp, _Variant>::_S_fun(std::declval<_Tp>())); template<typename _Tp, typename _Variant, typename = void> inline constexpr size_t __accepted_index = variant_npos; template<typename _Tp, typename _Variant> inline constexpr size_t __accepted_index<_Tp, _Variant, void_t<_FUN_type<_Tp, _Variant>>> = _FUN_type<_Tp, _Variant>::value; template<typename _Maybe_variant_cookie, typename _Variant, typename = __remove_cvref_t<_Variant>> inline constexpr bool __extra_visit_slot_needed = false; template<typename _Var, typename... _Types> inline constexpr bool __extra_visit_slot_needed<__variant_cookie, _Var, variant<_Types...>> = !__variant::__never_valueless<_Types...>(); template<typename _Var, typename... _Types> inline constexpr bool __extra_visit_slot_needed<__variant_idx_cookie, _Var, variant<_Types...>> = !__variant::__never_valueless<_Types...>(); template<typename _Tp, size_t... _Dimensions> struct _Multi_array; template<typename _Tp> struct _Multi_array<_Tp> { template<typename> struct __untag_result : false_type { using element_type = _Tp; }; #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wignored-qualifiers" template <typename... _Args> struct __untag_result<const void(*)(_Args...)> : false_type { using element_type = void(*)(_Args...); }; #pragma GCC diagnostic pop template <typename... _Args> struct __untag_result<__variant_cookie(*)(_Args...)> : false_type { using element_type = void(*)(_Args...); }; template <typename... _Args> struct __untag_result<__variant_idx_cookie(*)(_Args...)> : false_type { using element_type = void(*)(_Args...); }; template <typename _Res, typename... _Args> struct __untag_result<__deduce_visit_result<_Res>(*)(_Args...)> : true_type { using element_type = _Res(*)(_Args...); }; using __result_is_deduced = __untag_result<_Tp>; constexpr const typename __untag_result<_Tp>::element_type& _M_access() const ; typename __untag_result<_Tp>::element_type _M_data; }; template<typename _Ret, typename _Visitor, typename... _Variants, size_t __first, size_t... __rest> struct _Multi_array<_Ret(*)(_Visitor, _Variants...), __first, __rest...> { static constexpr size_t __index = sizeof...(_Variants) - sizeof...(__rest) - 1; using _Variant = typename _Nth_type<__index, _Variants...>::type; static constexpr int __do_cookie = __extra_visit_slot_needed<_Ret, _Variant> ? 1 : 0; using _Tp = _Ret(*)(_Visitor, _Variants...); template<typename... _Args> constexpr decltype(auto) _M_access(size_t __first_index, _Args... __rest_indices) const ; _Multi_array<_Tp, __rest...> _M_arr[__first + __do_cookie]; }; template<typename _Array_type, typename _Index_seq> struct __gen_vtable_impl; template<typename _Result_type, typename _Visitor, size_t... __dimensions, typename... _Variants, size_t... __indices> struct __gen_vtable_impl< _Multi_array<_Result_type (*)(_Visitor, _Variants...), __dimensions...>, std::index_sequence<__indices...>> { using _Next = remove_reference_t<typename _Nth_type<sizeof...(__indices), _Variants...>::type>; using _Array_type = _Multi_array<_Result_type (*)(_Visitor, _Variants...), __dimensions...>; static constexpr _Array_type _S_apply() ; template<size_t... __var_indices> static constexpr void _S_apply_all_alts(_Array_type& __vtable, std::index_sequence<__var_indices...>) ; template<bool __do_cookie, size_t __index, typename _Tp> static constexpr void _S_apply_single_alt(_Tp& __element, _Tp* __cookie_element = nullptr) ; }; template<typename _Result_type, typename _Visitor, typename... _Variants, size_t... __indices> struct __gen_vtable_impl< _Multi_array<_Result_type (*)(_Visitor, _Variants...)>, std::index_sequence<__indices...>> { using _Array_type = _Multi_array<_Result_type (*)(_Visitor, _Variants...)>; template<size_t __index, typename _Variant> static constexpr decltype(auto) __element_by_index_or_cookie(_Variant&& __var) noexcept ; static constexpr decltype(auto) __visit_invoke(_Visitor&& __visitor, _Variants... __vars) ; static constexpr auto _S_apply() ; }; template<typename _Result_type, typename _Visitor, typename... _Variants> struct __gen_vtable { using _Array_type = _Multi_array<_Result_type (*)(_Visitor, _Variants...), variant_size_v<remove_reference_t<_Variants>>...>; static constexpr _Array_type _S_vtable = __gen_vtable_impl<_Array_type, std::index_sequence<>>::_S_apply(); }; template<size_t _Np, typename _Tp> struct _Base_dedup : public _Tp { }; template<typename _Variant, typename __indices> struct _Variant_hash_base; template<typename... _Types, size_t... __indices> struct _Variant_hash_base<variant<_Types...>, std::index_sequence<__indices...>> : _Base_dedup<__indices, __poison_hash<remove_const_t<_Types>>>... { }; template<size_t _Np, typename _Variant, typename _AsV = decltype(__variant::__as(std::declval<_Variant>())), typename _Tp = variant_alternative_t<_Np, remove_reference_t<_AsV>>> using __get_t = __conditional_t<is_lvalue_reference_v<_Variant>, _Tp&, _Tp&&>; template<typename _Visitor, typename... _Variants> using __visit_result_t = invoke_result_t<_Visitor, __get_t<0, _Variants>...>; template<typename _Tp, typename... _Types> constexpr inline bool __same_types = (is_same_v<_Tp, _Types> && ...); template <typename _Visitor, typename _Variant, size_t... _Idxs> constexpr bool __check_visitor_results(std::index_sequence<_Idxs...>) ; } } template<typename _Tp, typename... _Types> constexpr bool holds_alternative(const variant<_Types...>& __v) noexcept ; template<typename _Tp, typename... _Types> constexpr _Tp& get(variant<_Types...>& __v) ; template<typename _Tp, typename... _Types> constexpr _Tp&& get(variant<_Types...>&& __v) ; template<typename _Tp, typename... _Types> constexpr const _Tp& get(const variant<_Types...>& __v) ; template<typename _Tp, typename... _Types> constexpr const _Tp&& get(const variant<_Types...>&& __v) ; template<size_t _Np, typename... _Types> constexpr add_pointer_t<variant_alternative_t<_Np, variant<_Types...>>> get_if(variant<_Types...>* __ptr) noexcept ; template<size_t _Np, typename... _Types> constexpr add_pointer_t<const variant_alternative_t<_Np, variant<_Types...>>> get_if(const variant<_Types...>* __ptr) noexcept ; template<typename _Tp, typename... _Types> constexpr add_pointer_t<_Tp> get_if(variant<_Types...>* __ptr) noexcept ; template<typename _Tp, typename... _Types> constexpr add_pointer_t<const _Tp> get_if(const variant<_Types...>* __ptr) noexcept ; struct monostate { }; template<typename... _Types> constexpr bool operator <(const variant<_Types...>& __lhs, const variant<_Types...>& __rhs) ; template<typename... _Types> constexpr bool operator <=(const variant<_Types...>& __lhs, const variant<_Types...>& __rhs) ; template<typename... _Types> constexpr bool operator ==(const variant<_Types...>& __lhs, const variant<_Types...>& __rhs) ; template<typename... _Types> constexpr bool operator !=(const variant<_Types...>& __lhs, const variant<_Types...>& __rhs) ; template<typename... _Types> constexpr bool operator >=(const variant<_Types...>& __lhs, const variant<_Types...>& __rhs) ; template<typename... _Types> constexpr bool operator >(const variant<_Types...>& __lhs, const variant<_Types...>& __rhs) ; constexpr bool operator==(monostate, monostate) noexcept ; template<typename... _Types> requires (three_way_comparable<_Types> && ...) constexpr common_comparison_category_t<compare_three_way_result_t<_Types>...> operator<=>(const variant<_Types...>& __v, const variant<_Types...>& __w) ; constexpr strong_ordering operator<=>(monostate, monostate) noexcept ; template<typename _Visitor, typename... _Variants> constexpr __detail::__variant::__visit_result_t<_Visitor, _Variants...> visit(_Visitor&&, _Variants&&...); template<typename... _Types> constexpr enable_if_t<(is_move_constructible_v<_Types> && ...) && (is_swappable_v<_Types> && ...)> swap(variant<_Types...>& __lhs, variant<_Types...>& __rhs) noexcept(noexcept(__lhs.swap(__rhs))) ; template<typename... _Types> enable_if_t<!((is_move_constructible_v<_Types> && ...) && (is_swappable_v<_Types> && ...))> swap(variant<_Types...>&, variant<_Types...>&) = delete; class bad_variant_access : public exception { public: bad_variant_access() noexcept ; const char* what() const noexcept override ; private: bad_variant_access(const char* __reason) ; const char* _M_reason = "bad variant access"; friend void __throw_bad_variant_access(const char* __what); }; void __throw_bad_variant_access(const char* __what) ; void __throw_bad_variant_access(bool __valueless) ; template<typename... _Types> class variant : private __detail::__variant::_Variant_base<_Types...>, private _Enable_default_constructor< __detail::__variant::_Traits<_Types...>::_S_default_ctor, variant<_Types...>>, private _Enable_copy_move< __detail::__variant::_Traits<_Types...>::_S_copy_ctor, __detail::__variant::_Traits<_Types...>::_S_copy_assign, __detail::__variant::_Traits<_Types...>::_S_move_ctor, __detail::__variant::_Traits<_Types...>::_S_move_assign, variant<_Types...>> { private: template <typename... _UTypes, typename _Tp> friend constexpr decltype(auto) __variant_cast(_Tp&&); static_assert(sizeof...(_Types) > 0, "variant must have at least one alternative"); static_assert(!(std::is_reference_v<_Types> || ...), "variant must have no reference alternative"); static_assert(!(std::is_void_v<_Types> || ...), "variant must have no void alternative"); using _Base = __detail::__variant::_Variant_base<_Types...>; using _Default_ctor_enabler = _Enable_default_constructor< __detail::__variant::_Traits<_Types...>::_S_default_ctor, variant<_Types...>>; template<typename _Tp> static constexpr bool __not_self = !is_same_v<__remove_cvref_t<_Tp>, variant>; template<typename _Tp> static constexpr bool __exactly_once = __detail::__variant::__exactly_once<_Tp, _Types...>; template<typename _Tp> static constexpr size_t __accepted_index = __detail::__variant::__accepted_index<_Tp, variant>; template<size_t _Np, typename = enable_if_t<(_Np < sizeof...(_Types))>> using __to_type = typename _Nth_type<_Np, _Types...>::type; template<typename _Tp, typename = enable_if_t<__not_self<_Tp>>> using __accepted_type = __to_type<__accepted_index<_Tp>>; template<typename _Tp> static constexpr size_t __index_of = std::__find_uniq_type_in_pack<_Tp, _Types...>(); using _Traits = __detail::__variant::_Traits<_Types...>; template<typename _Tp> struct __is_in_place_tag : false_type { }; template<typename _Tp> struct __is_in_place_tag<in_place_type_t<_Tp>> : true_type { }; template<size_t _Np> struct __is_in_place_tag<in_place_index_t<_Np>> : true_type { }; template<typename _Tp> static constexpr bool __not_in_place_tag = !__is_in_place_tag<__remove_cvref_t<_Tp>>::value; public: variant() = default; variant(const variant& __rhs) = default; variant(variant&&) = default; variant& operator=(const variant&) = default; variant& operator=(variant&&) = default; constexpr ~variant() = default; template<typename _Tp, typename = enable_if_t<sizeof...(_Types) != 0>, typename = enable_if_t<__not_in_place_tag<_Tp>>, typename _Tj = __accepted_type<_Tp&&>, typename = enable_if_t<__exactly_once<_Tj> && is_constructible_v<_Tj, _Tp>>> constexpr variant(_Tp&& __t) noexcept(is_nothrow_constructible_v<_Tj, _Tp>) ; template<typename _Tp, typename... _Args, typename = enable_if_t<__exactly_once<_Tp> && is_constructible_v<_Tp, _Args...>>> constexpr explicit variant(in_place_type_t<_Tp>, _Args&&... __args) ; template<typename _Tp, typename _Up, typename... _Args, typename = enable_if_t<__exactly_once<_Tp> && is_constructible_v<_Tp, initializer_list<_Up>&, _Args...>>> constexpr explicit variant(in_place_type_t<_Tp>, initializer_list<_Up> __il, _Args&&... __args) ; template<size_t _Np, typename... _Args, typename _Tp = __to_type<_Np>, typename = enable_if_t<is_constructible_v<_Tp, _Args...>>> constexpr explicit variant(in_place_index_t<_Np>, _Args&&... __args) ; template<size_t _Np, typename _Up, typename... _Args, typename _Tp = __to_type<_Np>, typename = enable_if_t<is_constructible_v<_Tp, initializer_list<_Up>&, _Args...>>> constexpr explicit variant(in_place_index_t<_Np>, initializer_list<_Up> __il, _Args&&... __args) ; template<typename _Tp> constexpr enable_if_t<__exactly_once<__accepted_type<_Tp&&>> && is_constructible_v<__accepted_type<_Tp&&>, _Tp> && is_assignable_v<__accepted_type<_Tp&&>&, _Tp>, variant&> operator=(_Tp&& __rhs) noexcept(is_nothrow_assignable_v<__accepted_type<_Tp&&>&, _Tp> && is_nothrow_constructible_v<__accepted_type<_Tp&&>, _Tp>) ; template<typename _Tp, typename... _Args> constexpr enable_if_t<is_constructible_v<_Tp, _Args...> && __exactly_once<_Tp>, _Tp&> emplace(_Args&&... __args) ; template<typename _Tp, typename _Up, typename... _Args> constexpr enable_if_t<is_constructible_v<_Tp, initializer_list<_Up>&, _Args...> && __exactly_once<_Tp>, _Tp&> emplace(initializer_list<_Up> __il, _Args&&... __args) ; template<size_t _Np, typename... _Args> constexpr enable_if_t<is_constructible_v<__to_type<_Np>, _Args...>, __to_type<_Np>&> emplace(_Args&&... __args) ; template<size_t _Np, typename _Up, typename... _Args> constexpr enable_if_t<is_constructible_v<__to_type<_Np>, initializer_list<_Up>&, _Args...>, __to_type<_Np>&> emplace(initializer_list<_Up> __il, _Args&&... __args) ; template<size_t _Np, typename... _Args> enable_if_t<!(_Np < sizeof...(_Types))> emplace(_Args&&...) = delete; template<typename _Tp, typename... _Args> enable_if_t<!__exactly_once<_Tp>> emplace(_Args&&...) = delete; constexpr bool valueless_by_exception() const noexcept ; constexpr size_t index() const noexcept ; constexpr void swap(variant& __rhs) noexcept((__is_nothrow_swappable<_Types>::value && ...) && is_nothrow_move_constructible_v<variant>) ; private: template<size_t _Np, typename _Vp> friend constexpr decltype(auto) __detail::__variant::__get(_Vp&& __v) noexcept; template<typename... _Tp> friend constexpr bool operator <(const variant<_Tp...>& __lhs, const variant<_Tp...>& __rhs); template<typename... _Tp> friend constexpr bool operator <=(const variant<_Tp...>& __lhs, const variant<_Tp...>& __rhs); template<typename... _Tp> friend constexpr bool operator ==(const variant<_Tp...>& __lhs, const variant<_Tp...>& __rhs); template<typename... _Tp> friend constexpr bool operator !=(const variant<_Tp...>& __lhs, const variant<_Tp...>& __rhs); template<typename... _Tp> friend constexpr bool operator >=(const variant<_Tp...>& __lhs, const variant<_Tp...>& __rhs); template<typename... _Tp> friend constexpr bool operator >(const variant<_Tp...>& __lhs, const variant<_Tp...>& __rhs); }; template<size_t _Np, typename... _Types> constexpr variant_alternative_t<_Np, variant<_Types...>>& get(variant<_Types...>& __v) ; template<size_t _Np, typename... _Types> constexpr variant_alternative_t<_Np, variant<_Types...>>&& get(variant<_Types...>&& __v) ; template<size_t _Np, typename... _Types> constexpr const variant_alternative_t<_Np, variant<_Types...>>& get(const variant<_Types...>& __v) ; template<size_t _Np, typename... _Types> constexpr const variant_alternative_t<_Np, variant<_Types...>>&& get(const variant<_Types...>&& __v) ; template<typename _Result_type, typename _Visitor, typename... _Variants> constexpr decltype(auto) __do_visit(_Visitor&& __visitor, _Variants&&... __variants) ; template<typename _Visitor, typename... _Variants> constexpr __detail::__variant::__visit_result_t<_Visitor, _Variants...> visit(_Visitor&& __visitor, _Variants&&... __variants) ; template<typename _Res, typename _Visitor, typename... _Variants> constexpr _Res visit(_Visitor&& __visitor, _Variants&&... __variants) ; template<bool, typename... _Types> struct __variant_hash_call_base_impl { size_t operator()(const variant<_Types...>& __t) const noexcept((is_nothrow_invocable_v<hash<decay_t<_Types>>, _Types> && ...)) ; }; template<typename... _Types> struct __variant_hash_call_base_impl<false, _Types...> {}; template<typename... _Types> using __variant_hash_call_base = __variant_hash_call_base_impl<(__poison_hash<remove_const_t<_Types>>:: __enable_hash_call &&...), _Types...>; template<typename... _Types> struct hash<variant<_Types...>> : private __detail::__variant::_Variant_hash_base< variant<_Types...>, std::index_sequence_for<_Types...>>, public __variant_hash_call_base<_Types...> { using result_type [[__deprecated__]] = size_t; using argument_type [[__deprecated__]] = variant<_Types...>; }; template<> struct hash<monostate> { using result_type [[__deprecated__]] = size_t; using argument_type [[__deprecated__]] = monostate; size_t operator()(const monostate&) const noexcept ; }; template<typename... _Types> struct __is_fast_hash<hash<variant<_Types...>>> : bool_constant<(__is_fast_hash<_Types>::value && ...)> { }; } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Out, typename _CharT> class basic_format_context; namespace __format { template<typename _CharT> class _Sink; template<typename _CharT> class _Sink_iter; } using format_context = basic_format_context<__format::_Sink_iter<char>, char>; using wformat_context = basic_format_context<__format::_Sink_iter<wchar_t>, wchar_t>; template<typename _Context> class basic_format_args; using format_args = basic_format_args<format_context>; using wformat_args = basic_format_args<wformat_context>; template<typename _Context> class basic_format_arg; template<typename _CharT, typename... _Args> struct basic_format_string { template<typename _Tp> requires convertible_to<const _Tp&, basic_string_view<_CharT>> consteval basic_format_string(const _Tp& __s); [[__gnu__::__always_inline__]] constexpr basic_string_view<_CharT> get() const noexcept ; private: basic_string_view<_CharT> _M_str; }; template<typename... _Args> using format_string = basic_format_string<char, type_identity_t<_Args>...>; template<typename... _Args> using wformat_string = basic_format_string<wchar_t, type_identity_t<_Args>...>; template<typename _Tp, typename _CharT = char> struct formatter { formatter() = delete; formatter(const formatter&) = delete; formatter& operator=(const formatter&) = delete; }; class format_error : public runtime_error { public: explicit format_error(const string& __what) ; explicit format_error(const char* __what) ; }; [[noreturn]] void __throw_format_error(const char* __what) ; namespace __format { [[noreturn]] void __unmatched_left_brace_in_format_string() ; [[noreturn]] void __unmatched_right_brace_in_format_string() ; [[noreturn]] void __conflicting_indexing_in_format_string() ; [[noreturn]] void __invalid_arg_id_in_format_string() ; [[noreturn]] void __failed_to_parse_format_spec() ; } template<typename _CharT> class basic_format_parse_context; using format_parse_context = basic_format_parse_context<char>; using wformat_parse_context = basic_format_parse_context<wchar_t>; template<typename _CharT> class basic_format_parse_context { public: using char_type = _CharT; using const_iterator = typename basic_string_view<_CharT>::const_iterator; using iterator = const_iterator; constexpr explicit basic_format_parse_context(basic_string_view<_CharT> __fmt, size_t __num_args = 0) ; basic_format_parse_context(const basic_format_parse_context&) = delete; void operator=(const basic_format_parse_context&) = delete; constexpr const_iterator begin() const noexcept ; constexpr const_iterator end() const noexcept ; constexpr void advance_to(const_iterator __it) noexcept ; constexpr size_t next_arg_id() ; constexpr void check_arg_id(size_t __id) ; private: iterator _M_begin; iterator _M_end; enum _Indexing { _Unknown, _Manual, _Auto }; _Indexing _M_indexing = _Unknown; size_t _M_next_arg_id = 0; size_t _M_num_args; }; template<typename _Tp, template<typename...> class _Class> static constexpr bool __is_specialization_of = false; template<template<typename...> class _Class, typename... _Args> static constexpr bool __is_specialization_of<_Class<_Args...>, _Class> = true; namespace __format { template<typename _CharT> constexpr pair<unsigned short, const _CharT*> __parse_integer(const _CharT* __first, const _CharT* __last) ; template<typename _CharT> constexpr pair<unsigned short, const _CharT*> __parse_arg_id(const _CharT* __first, const _CharT* __last) ; enum _Pres_type { _Pres_none = 0, _Pres_d = 1, _Pres_b, _Pres_B, _Pres_o, _Pres_x, _Pres_X, _Pres_c, _Pres_a = 1, _Pres_A, _Pres_e, _Pres_E, _Pres_f, _Pres_F, _Pres_g, _Pres_G, _Pres_p = 0, _Pres_P, _Pres_s = 0, _Pres_esc = 0xf, }; enum _Align { _Align_default, _Align_left, _Align_right, _Align_centre, }; enum _Sign { _Sign_default, _Sign_plus, _Sign_minus, _Sign_space, }; enum _WidthPrec { _WP_none, _WP_value, _WP_from_arg }; template<typename _Context> size_t __int_from_arg(const basic_format_arg<_Context>& __arg); constexpr bool __is_digit(char __c) ; constexpr bool __is_xdigit(char __c) ; template<typename _CharT> struct _Spec { _Align _M_align : 2; _Sign _M_sign : 2; unsigned _M_alt : 1; unsigned _M_localized : 1; unsigned _M_zero_fill : 1; _WidthPrec _M_width_kind : 2; _WidthPrec _M_prec_kind : 2; _Pres_type _M_type : 4; unsigned short _M_width; unsigned short _M_prec; _CharT _M_fill = ' '; using iterator = typename basic_string_view<_CharT>::iterator; static constexpr _Align _S_align(_CharT __c) noexcept ; constexpr iterator _M_parse_fill_and_align(iterator __first, iterator __last) noexcept ; static constexpr _Sign _S_sign(_CharT __c) noexcept ; constexpr iterator _M_parse_sign(iterator __first, iterator) noexcept ; constexpr iterator _M_parse_alternate_form(iterator __first, iterator) noexcept ; constexpr iterator _M_parse_zero_fill(iterator __first, iterator ) noexcept ; static constexpr iterator _S_parse_width_or_precision(iterator __first, iterator __last, unsigned short& __val, bool& __arg_id, basic_format_parse_context<_CharT>& __pc) ; constexpr iterator _M_parse_width(iterator __first, iterator __last, basic_format_parse_context<_CharT>& __pc) ; constexpr iterator _M_parse_precision(iterator __first, iterator __last, basic_format_parse_context<_CharT>& __pc) ; constexpr iterator _M_parse_locale(iterator __first, iterator ) noexcept ; template<typename _Context> size_t _M_get_width(_Context& __ctx) const ; template<typename _Context> size_t _M_get_precision(_Context& __ctx) const ; }; template<typename _Int> char* __put_sign(_Int __i, _Sign __sign, char* __dest) noexcept ; template<typename _Out, typename _CharT> requires output_iterator<_Out, const _CharT&> _Out __write(_Out __out, basic_string_view<_CharT> __str) ; template<typename _Out, typename _CharT> _Out __write_padded(_Out __out, basic_string_view<_CharT> __str, _Align __align, size_t __nfill, _CharT __fill_char) ; template<typename _CharT, typename _Out> _Out __write_padded_as_spec(basic_string_view<type_identity_t<_CharT>> __str, size_t __estimated_width, basic_format_context<_Out, _CharT>& __fc, const _Spec<_CharT>& __spec, _Align __align = _Align_left) ; struct _Optional_locale { [[__gnu__::__always_inline__]] _Optional_locale() ; _Optional_locale(const locale& __loc) ; _Optional_locale(const _Optional_locale& __l) ; _Optional_locale& operator=(const _Optional_locale& __l) noexcept ; ~_Optional_locale() ; _Optional_locale& operator=(locale&& __loc) noexcept ; const locale& value() noexcept ; bool has_value() const noexcept ; union { char _M_dummy = '\0'; std::locale _M_loc; }; bool _M_hasval = false; }; template<typename _CharT> concept __char = same_as<_CharT, char> || same_as<_CharT, wchar_t>; template<__char _CharT> struct __formatter_str { constexpr typename basic_format_parse_context<_CharT>::iterator parse(basic_format_parse_context<_CharT>& __pc) ; template<typename _Out> _Out format(basic_string_view<_CharT> __s, basic_format_context<_Out, _CharT>& __fc) const ; private: _Spec<_CharT> _M_spec{}; }; template<__char _CharT> struct __formatter_int { static constexpr _Pres_type _AsInteger = _Pres_d; static constexpr _Pres_type _AsBool = _Pres_s; static constexpr _Pres_type _AsChar = _Pres_c; constexpr typename basic_format_parse_context<_CharT>::iterator _M_do_parse(basic_format_parse_context<_CharT>& __pc, _Pres_type __type) ; template<typename _Tp> constexpr typename basic_format_parse_context<_CharT>::iterator _M_parse(basic_format_parse_context<_CharT>& __pc) ; template<typename _Int, typename _Out> typename basic_format_context<_Out, _CharT>::iterator format(_Int __i, basic_format_context<_Out, _CharT>& __fc) const ; template<typename _Out> typename basic_format_context<_Out, _CharT>::iterator format(bool __i, basic_format_context<_Out, _CharT>& __fc) const ; template<typename _Out> typename basic_format_context<_Out, _CharT>::iterator _M_format_character(_CharT __c, basic_format_context<_Out, _CharT>& __fc) const ; template<typename _Int> static _CharT _S_to_character(_Int __i) ; template<typename _Out> typename basic_format_context<_Out, _CharT>::iterator _M_format_int(string_view __narrow_str, size_t __prefix_len, basic_format_context<_Out, _CharT>& __fc) const ; template<typename _Tp> using make_unsigned_t = typename __conditional_t<(sizeof(_Tp) <= sizeof(long long)), std::make_unsigned<_Tp>, type_identity<unsigned __int128>>::type; template<typename _Int> static to_chars_result to_chars(char* __first, char* __last, _Int __value, int __base) ; _Spec<_CharT> _M_spec{}; }; using std::to_chars; template<typename _Tp> concept __formattable_float = requires (_Tp __t, char* __p) { __format::to_chars(__p, __p, __t, chars_format::scientific, 6); }; template<__char _CharT> struct __formatter_fp { constexpr typename basic_format_parse_context<_CharT>::iterator parse(basic_format_parse_context<_CharT>& __pc) ; template<typename _Fp, typename _Out> typename basic_format_context<_Out, _CharT>::iterator format(_Fp __v, basic_format_context<_Out, _CharT>& __fc) const ; basic_string<_CharT> _M_localize(basic_string_view<_CharT> __str, char __expc, const locale& __loc) const ; template<typename _Ch, typename _Func> static void _S_resize_and_overwrite(basic_string<_Ch>& __str, size_t __n, _Func __f) ; _Spec<_CharT> _M_spec{}; }; } template<__format::__char _CharT> struct formatter<_CharT, _CharT> { formatter() = default; constexpr typename basic_format_parse_context<_CharT>::iterator parse(basic_format_parse_context<_CharT>& __pc) ; template<typename _Out> typename basic_format_context<_Out, _CharT>::iterator format(_CharT __u, basic_format_context<_Out, _CharT>& __fc) const ; private: __format::__formatter_int<_CharT> _M_f; }; template<> struct formatter<char, wchar_t> { formatter() = default; constexpr typename basic_format_parse_context<wchar_t>::iterator parse(basic_format_parse_context<wchar_t>& __pc) ; template<typename _Out> typename basic_format_context<_Out, wchar_t>::iterator format(char __u, basic_format_context<_Out, wchar_t>& __fc) const ; private: __format::__formatter_int<wchar_t> _M_f; }; template<__format::__char _CharT> struct formatter<_CharT*, _CharT> { formatter() = default; [[__gnu__::__always_inline__]] constexpr typename basic_format_parse_context<_CharT>::iterator parse(basic_format_parse_context<_CharT>& __pc) ; template<typename _Out> [[__gnu__::__nonnull__]] typename basic_format_context<_Out, _CharT>::iterator format(_CharT* __u, basic_format_context<_Out, _CharT>& __fc) const ; private: __format::__formatter_str<_CharT> _M_f; }; template<__format::__char _CharT> struct formatter<const _CharT*, _CharT> { formatter() = default; [[__gnu__::__always_inline__]] constexpr typename basic_format_parse_context<_CharT>::iterator parse(basic_format_parse_context<_CharT>& __pc) ; template<typename _Out> [[__gnu__::__nonnull__]] typename basic_format_context<_Out, _CharT>::iterator format(const _CharT* __u, basic_format_context<_Out, _CharT>& __fc) const ; private: __format::__formatter_str<_CharT> _M_f; }; template<__format::__char _CharT, size_t _Nm> struct formatter<_CharT[_Nm], _CharT> { formatter() = default; [[__gnu__::__always_inline__]] constexpr typename basic_format_parse_context<_CharT>::iterator parse(basic_format_parse_context<_CharT>& __pc) ; template<typename _Out> typename basic_format_context<_Out, _CharT>::iterator format(const _CharT (&__u)[_Nm], basic_format_context<_Out, _CharT>& __fc) const ; private: __format::__formatter_str<_CharT> _M_f; }; template<typename _Traits, typename _Alloc> struct formatter<basic_string<char, _Traits, _Alloc>, char> { formatter() = default; [[__gnu__::__always_inline__]] constexpr typename basic_format_parse_context<char>::iterator parse(basic_format_parse_context<char>& __pc) ; template<typename _Out> typename basic_format_context<_Out, char>::iterator format(const basic_string<char, _Traits, _Alloc>& __u, basic_format_context<_Out, char>& __fc) const ; private: __format::__formatter_str<char> _M_f; }; template<typename _Traits, typename _Alloc> struct formatter<basic_string<wchar_t, _Traits, _Alloc>, wchar_t> { formatter() = default; [[__gnu__::__always_inline__]] constexpr typename basic_format_parse_context<wchar_t>::iterator parse(basic_format_parse_context<wchar_t>& __pc) ; template<typename _Out> typename basic_format_context<_Out, wchar_t>::iterator format(const basic_string<wchar_t, _Traits, _Alloc>& __u, basic_format_context<_Out, wchar_t>& __fc) const ; private: __format::__formatter_str<wchar_t> _M_f; }; template<typename _Traits> struct formatter<basic_string_view<char, _Traits>, char> { formatter() = default; [[__gnu__::__always_inline__]] constexpr typename basic_format_parse_context<char>::iterator parse(basic_format_parse_context<char>& __pc) ; template<typename _Out> typename basic_format_context<_Out, char>::iterator format(basic_string_view<char, _Traits> __u, basic_format_context<_Out, char>& __fc) const ; private: __format::__formatter_str<char> _M_f; }; template<typename _Traits> struct formatter<basic_string_view<wchar_t, _Traits>, wchar_t> { formatter() = default; [[__gnu__::__always_inline__]] constexpr typename basic_format_parse_context<wchar_t>::iterator parse(basic_format_parse_context<wchar_t>& __pc) ; template<typename _Out> typename basic_format_context<_Out, wchar_t>::iterator format(basic_string_view<wchar_t, _Traits> __u, basic_format_context<_Out, wchar_t>& __fc) const ; private: __format::__formatter_str<wchar_t> _M_f; }; template<integral _Tp, __format::__char _CharT> requires (!__is_one_of<_Tp, char, wchar_t, char16_t, char32_t>::value) struct formatter<_Tp, _CharT> { formatter() = default; [[__gnu__::__always_inline__]] constexpr typename basic_format_parse_context<_CharT>::iterator parse(basic_format_parse_context<_CharT>& __pc) ; template<typename _Out> typename basic_format_context<_Out, _CharT>::iterator format(_Tp __u, basic_format_context<_Out, _CharT>& __fc) const ; private: __format::__formatter_int<_CharT> _M_f; }; template<typename _Tp, __format::__char _CharT> requires (__is_one_of<_Tp, __int128, unsigned __int128>::value) struct formatter<_Tp, _CharT> { formatter() = default; [[__gnu__::__always_inline__]] constexpr typename basic_format_parse_context<_CharT>::iterator parse(basic_format_parse_context<_CharT>& __pc) ; template<typename _Out> typename basic_format_context<_Out, _CharT>::iterator format(_Tp __u, basic_format_context<_Out, _CharT>& __fc) const ; private: __format::__formatter_int<_CharT> _M_f; }; template<__format::__formattable_float _Tp, __format::__char _CharT> struct formatter<_Tp, _CharT> { formatter() = default; [[__gnu__::__always_inline__]] constexpr typename basic_format_parse_context<_CharT>::iterator parse(basic_format_parse_context<_CharT>& __pc) ; template<typename _Out> typename basic_format_context<_Out, _CharT>::iterator format(_Tp __u, basic_format_context<_Out, _CharT>& __fc) const ; private: __format::__formatter_fp<_CharT> _M_f; }; template<__format::__char _CharT> struct formatter<const void*, _CharT> { formatter() = default; constexpr typename basic_format_parse_context<_CharT>::iterator parse(basic_format_parse_context<_CharT>& __pc) ; template<typename _Out> typename basic_format_context<_Out, _CharT>::iterator format(const void* __v, basic_format_context<_Out, _CharT>& __fc) const ; private: __format::_Spec<_CharT> _M_spec{}; }; template<__format::__char _CharT> struct formatter<void*, _CharT> { formatter() = default; [[__gnu__::__always_inline__]] constexpr typename basic_format_parse_context<_CharT>::iterator parse(basic_format_parse_context<_CharT>& __pc) ; template<typename _Out> typename basic_format_context<_Out, _CharT>::iterator format(void* __v, basic_format_context<_Out, _CharT>& __fc) const ; private: formatter<const void*, _CharT> _M_f; }; template<__format::__char _CharT> struct formatter<nullptr_t, _CharT> { formatter() = default; [[__gnu__::__always_inline__]] constexpr typename basic_format_parse_context<_CharT>::iterator parse(basic_format_parse_context<_CharT>& __pc) ; template<typename _Out> typename basic_format_context<_Out, _CharT>::iterator format(nullptr_t, basic_format_context<_Out, _CharT>& __fc) const ; private: formatter<const void*, _CharT> _M_f; }; namespace __format { template<typename _Tp, typename _Context, typename _Formatter = typename _Context::template formatter_type<remove_const_t<_Tp>>, typename _ParseContext = basic_format_parse_context<typename _Context::char_type>> concept __parsable_with = semiregular<_Formatter> && requires (_Formatter __f, _ParseContext __pc) { { __f.parse(__pc) } -> same_as<typename _ParseContext::iterator>; }; template<typename _Tp, typename _Context, typename _Formatter = typename _Context::template formatter_type<remove_const_t<_Tp>>, typename _ParseContext = basic_format_parse_context<typename _Context::char_type>> concept __formattable_with = semiregular<_Formatter> && requires (const _Formatter __cf, _Tp&& __t, _Context __fc) { { __cf.format(__t, __fc) } -> same_as<typename _Context::iterator>; }; template<typename _CharT> using _Iter_for = back_insert_iterator<basic_string<_CharT>>; template<typename _Tp, typename _CharT, typename _Context = basic_format_context<_Iter_for<_CharT>, _CharT>> concept __formattable_impl = __parsable_with<_Tp, _Context> && __formattable_with<_Tp, _Context>; } template<typename _Out> struct format_to_n_result { _Out out; iter_difference_t<_Out> size; }; namespace __format { template<typename _CharT> class _Sink_iter { _Sink<_CharT>* _M_sink = nullptr; public: using iterator_category = output_iterator_tag; using value_type = void; using difference_type = ptrdiff_t; using pointer = void; using reference = void; _Sink_iter() = default; _Sink_iter(const _Sink_iter&) = default; _Sink_iter& operator=(const _Sink_iter&) = default; [[__gnu__::__always_inline__]] explicit constexpr _Sink_iter(_Sink<_CharT>& __sink) ; [[__gnu__::__always_inline__]] constexpr _Sink_iter& operator=(_CharT __c) ; [[__gnu__::__always_inline__]] constexpr _Sink_iter& operator=(basic_string_view<_CharT> __s) ; [[__gnu__::__always_inline__]] constexpr _Sink_iter& operator*() ; [[__gnu__::__always_inline__]] constexpr _Sink_iter& operator++() ; [[__gnu__::__always_inline__]] constexpr _Sink_iter operator++(int) ; }; template<typename _CharT> class _Sink { friend class _Sink_iter<_CharT>; span<_CharT> _M_span; typename span<_CharT>::iterator _M_next; virtual void _M_overflow() = 0; protected: [[__gnu__::__always_inline__]] explicit constexpr _Sink(span<_CharT> __span) ; [[__gnu__::__always_inline__]] span<_CharT> _M_used() const noexcept ; [[__gnu__::__always_inline__]] constexpr span<_CharT> _M_unused() const noexcept ; [[__gnu__::__always_inline__]] constexpr void _M_rewind() noexcept ; void _M_reset(span<_CharT> __s, size_t __pos = 0) noexcept ; constexpr void _M_write(_CharT __c) ; constexpr void _M_write(basic_string_view<_CharT> __s) ; public: _Sink(const _Sink&) = delete; _Sink& operator=(const _Sink&) = delete; [[__gnu__::__always_inline__]] constexpr _Sink_iter<_CharT> out() noexcept ; }; template<typename _CharT> class _Buf_sink : public _Sink<_CharT> { protected: _CharT _M_buf[32 * sizeof(void*) / sizeof(_CharT)]; [[__gnu__::__always_inline__]] constexpr _Buf_sink() ; }; template<typename _Seq> class _Seq_sink final : public _Buf_sink<typename _Seq::value_type> { using _CharT = typename _Seq::value_type; _Seq _M_seq; void _M_overflow() override ; public: [[__gnu__::__always_inline__]] _Seq_sink() noexcept(is_nothrow_default_constructible_v<_Seq>) ; _Seq_sink(_Seq&& __s) noexcept(is_nothrow_move_constructible_v<_Seq>) ; using _Sink<_CharT>::out; _Seq get() && ; }; template<typename _CharT, typename _Alloc = allocator<_CharT>> using _Str_sink = _Seq_sink<basic_string<_CharT, char_traits<_CharT>, _Alloc>>; template<typename _CharT, typename _OutIter> class _Iter_sink : public _Buf_sink<_CharT> { _OutIter _M_out; iter_difference_t<_OutIter> _M_max; protected: size_t _M_count = 0; void _M_overflow() override ; public: [[__gnu__::__always_inline__]] explicit _Iter_sink(_OutIter __out, iter_difference_t<_OutIter> __max = -1) ; using _Sink<_CharT>::out; format_to_n_result<_OutIter> _M_finish() && ; }; template<typename _CharT, contiguous_iterator _OutIter> requires same_as<iter_value_t<_OutIter>, _CharT> class _Iter_sink<_CharT, _OutIter> : public _Sink<_CharT> { _OutIter _M_first; iter_difference_t<_OutIter> _M_max = -1; protected: size_t _M_count = 0; private: _CharT _M_buf[64]; protected: void _M_overflow() override ; private: static span<_CharT> _S_make_span(_CharT* __ptr, iter_difference_t<_OutIter> __n, span<_CharT> __buf) noexcept ; public: explicit _Iter_sink(_OutIter __out, iter_difference_t<_OutIter> __n = -1) ; format_to_n_result<_OutIter> _M_finish() && ; }; enum _Arg_t : unsigned char { _Arg_none, _Arg_bool, _Arg_c, _Arg_i, _Arg_u, _Arg_ll, _Arg_ull, _Arg_flt, _Arg_dbl, _Arg_ldbl, _Arg_str, _Arg_sv, _Arg_ptr, _Arg_handle, _Arg_i128, _Arg_u128, _Arg_bf16, _Arg_f16, _Arg_f32, _Arg_f64, _Arg_f128, _Arg_max_ }; template<typename _Context> struct _Arg_value { using _CharT = typename _Context::char_type; struct _HandleBase { const void* _M_ptr; void (*_M_func)(); }; union { monostate _M_none; bool _M_bool; _CharT _M_c; int _M_i; unsigned _M_u; long long _M_ll; unsigned long long _M_ull; float _M_flt; double _M_dbl; long double _M_ldbl; const _CharT* _M_str; basic_string_view<_CharT> _M_sv; const void* _M_ptr; _HandleBase _M_handle; __int128 _M_i128; unsigned __int128 _M_u128; }; [[__gnu__::__always_inline__]] _Arg_value() ; template<typename _Tp, typename _Self> [[__gnu__::__always_inline__]] static auto& _S_get(_Self& __u) noexcept ; template<typename _Tp> [[__gnu__::__always_inline__]] auto& _M_get() noexcept ; template<typename _Tp> [[__gnu__::__always_inline__]] const auto& _M_get() const noexcept ; template<typename _Tp> [[__gnu__::__always_inline__]] void _M_set(_Tp __v) noexcept ; }; template<typename _Context, typename... _Args> class _Arg_store; } template<typename _Context> class basic_format_arg { using _CharT = typename _Context::char_type; template<typename _Tp> static constexpr bool __formattable = __format::__formattable_with<_Tp, _Context>; public: class handle : public __format::_Arg_value<_Context>::_HandleBase { using _Base = typename __format::_Arg_value<_Context>::_HandleBase; template<typename _Tp> using __maybe_const_t = __conditional_t<__formattable<_Tp>, const _Tp, _Tp>; template<typename _Tq> static void _S_format(basic_format_parse_context<_CharT>& __parse_ctx, _Context& __format_ctx, const void* __ptr) ; template<typename _Tp> explicit handle(_Tp& __val) noexcept ; friend class basic_format_arg<_Context>; public: handle(const handle&) = default; handle& operator=(const handle&) = default; [[__gnu__::__always_inline__]] void format(basic_format_parse_context<_CharT>& __pc, _Context& __fc) const ; }; [[__gnu__::__always_inline__]] basic_format_arg() ; [[nodiscard,__gnu__::__always_inline__]] explicit operator bool() const noexcept ; private: template<typename _Ctx> friend class basic_format_args; template<typename _Ctx, typename... _Args> friend class __format::_Arg_store; static_assert(is_trivially_copyable_v<__format::_Arg_value<_Context>>); __format::_Arg_value<_Context> _M_val; __format::_Arg_t _M_type; template<typename _Tp> static consteval auto _S_to_arg_type() ; template<typename _Tp> using _Normalize = typename decltype(_S_to_arg_type<_Tp>())::type; template<typename _Tp> static consteval __format::_Arg_t _S_to_enum() ; template<typename _Tp> void _M_set(_Tp __v) noexcept ; template<typename _Tp> requires __format::__formattable_with<_Tp, _Context> explicit basic_format_arg(_Tp& __v) noexcept ; template<typename _Ctx, typename... _Argz> friend auto make_format_args(_Argz&&...) noexcept; template<typename _Visitor, typename _Ctx> friend decltype(auto) visit_format_arg(_Visitor&& __vis, basic_format_arg<_Ctx>); template<typename _Visitor> decltype(auto) _M_visit(_Visitor&& __vis, __format::_Arg_t __type) ; }; template<typename _Visitor, typename _Context> decltype(auto) visit_format_arg(_Visitor&& __vis, basic_format_arg<_Context> __arg) ; namespace __format { struct _WidthPrecVisitor { template<typename _Tp> size_t operator()(_Tp& __arg) const ; }; template<typename _Context> size_t __int_from_arg(const basic_format_arg<_Context>& __arg) ; template<int _Bits, size_t _Nm> constexpr auto __pack_arg_types(const array<_Arg_t, _Nm>& __types) ; } template<typename _Context> class basic_format_args { static constexpr int _S_packed_type_bits = 5; static constexpr int _S_packed_type_mask = 0b11111; static constexpr int _S_max_packed_args = 12; static_assert( __format::_Arg_max_ <= (1 << _S_packed_type_bits) ); template<typename... _Args> using _Store = __format::_Arg_store<_Context, _Args...>; template<typename _Ctx, typename... _Args> friend class __format::_Arg_store; using uint64_t = long unsigned int; using _Format_arg = basic_format_arg<_Context>; using _Format_arg_val = __format::_Arg_value<_Context>; uint64_t _M_packed_size : 4; uint64_t _M_unpacked_size : 60; union { const _Format_arg_val* _M_values; const _Format_arg* _M_args; }; size_t _M_size() const noexcept ; typename __format::_Arg_t _M_type(size_t __i) const noexcept ; template<typename _Ctx, typename... _Args> friend auto make_format_args(_Args&&...) noexcept; template<typename... _Args> static consteval array<__format::_Arg_t, sizeof...(_Args)> _S_types_to_pack() ; public: basic_format_args() noexcept = default; template<typename... _Args> basic_format_args(const _Store<_Args...>& __store) noexcept; [[nodiscard,__gnu__::__always_inline__]] basic_format_arg<_Context> get(size_t __i) const noexcept ; }; template<typename _Context, typename... _Args> basic_format_args(__format::_Arg_store<_Context, _Args...>) -> basic_format_args<_Context>; template<typename _Context, typename... _Args> auto make_format_args(_Args&&... __fmt_args) noexcept; template<typename _Context, typename... _Args> class __format::_Arg_store { friend std::basic_format_args<_Context>; template<typename _Ctx, typename... _Argz> friend auto std:: make_format_args(_Argz&&...) noexcept; static constexpr bool _S_values_only = sizeof...(_Args) <= basic_format_args<_Context>::_S_max_packed_args; using _Element_t = __conditional_t<_S_values_only, __format::_Arg_value<_Context>, basic_format_arg<_Context>>; _Element_t _M_args[sizeof...(_Args)]; template<typename _Tp> static _Element_t _S_make_elt(_Tp& __v) ; template<typename... _Tp> requires (sizeof...(_Tp) == sizeof...(_Args)) [[__gnu__::__always_inline__]] _Arg_store(_Tp&... __a) ; }; template<typename _Context> class __format::_Arg_store<_Context> { }; template<typename _Context = format_context, typename... _Args> [[nodiscard,__gnu__::__always_inline__]] auto make_format_args(_Args&&... __fmt_args) noexcept ; template<typename... _Args> [[nodiscard,__gnu__::__always_inline__]] auto make_wformat_args(_Args&&... __args) noexcept ; namespace __format { template<typename _Out, typename _CharT, typename _Context> _Out __do_vformat_to(_Out, basic_string_view<_CharT>, const basic_format_args<_Context>&, const locale* = nullptr); } template<typename _Out, typename _CharT> class basic_format_context { static_assert( output_iterator<_Out, const _CharT&> ); basic_format_args<basic_format_context> _M_args; _Out _M_out; __format::_Optional_locale _M_loc; basic_format_context(basic_format_args<basic_format_context> __args, _Out __out) ; basic_format_context(basic_format_args<basic_format_context> __args, _Out __out, const std::locale& __loc) ; template<typename _Out2, typename _CharT2, typename _Context2> friend _Out2 __format::__do_vformat_to(_Out2, basic_string_view<_CharT2>, const basic_format_args<_Context2>&, const locale*); public: basic_format_context() = default; ~basic_format_context() = default; using iterator = _Out; using char_type = _CharT; template<typename _Tp> using formatter_type = formatter<_Tp, _CharT>; [[nodiscard]] basic_format_arg<basic_format_context> arg(size_t __id) const noexcept ; [[nodiscard]] std::locale locale() ; [[nodiscard]] iterator out() ; void advance_to(iterator __it) ; }; namespace __format { template<typename _CharT> struct _Scanner { using iterator = typename basic_format_parse_context<_CharT>::iterator; basic_format_parse_context<_CharT> _M_pc; constexpr explicit _Scanner(basic_string_view<_CharT> __str, size_t __nargs = -1) ; constexpr iterator begin() const noexcept ; constexpr iterator end() const noexcept ; constexpr void _M_scan() ; constexpr basic_string_view<_CharT> _M_fmt_str() const noexcept ; constexpr virtual void _M_on_chars(iterator) ; constexpr void _M_on_replacement_field() ; constexpr virtual void _M_format_arg(size_t __id) = 0; }; template<typename _Out, typename _CharT> class _Formatting_scanner : public _Scanner<_CharT> { public: _Formatting_scanner(basic_format_context<_Out, _CharT>& __fc, basic_string_view<_CharT> __str) ; private: basic_format_context<_Out, _CharT>& _M_fc; using iterator = typename _Scanner<_CharT>::iterator; constexpr void _M_on_chars(iterator __last) override ; constexpr void _M_format_arg(size_t __id) override ; }; template<typename _CharT, typename... _Args> class _Checking_scanner : public _Scanner<_CharT> { static_assert( (is_default_constructible_v<formatter<_Args, _CharT>> && ...), "std::formatter must be specialized for each type being formatted"); public: constexpr _Checking_scanner(basic_string_view<_CharT> __str) ; private: constexpr void _M_format_arg(size_t __id) override ; template<typename _Tp, typename... _OtherArgs> constexpr void _M_parse_format_spec(size_t __id) ; }; template<typename _Out, typename _CharT, typename _Context> _Out __do_vformat_to(_Out __out, basic_string_view<_CharT> __fmt, const basic_format_args<_Context>& __args, const locale* __loc) ; } template<typename _Out> requires output_iterator<_Out, const char&> [[__gnu__::__always_inline__]] _Out vformat_to(_Out __out, string_view __fmt, format_args __args) ; template<typename _Out> requires output_iterator<_Out, const wchar_t&> [[__gnu__::__always_inline__]] _Out vformat_to(_Out __out, wstring_view __fmt, wformat_args __args) ; template<typename _Out> requires output_iterator<_Out, const char&> [[__gnu__::__always_inline__]] _Out vformat_to(_Out __out, const locale& __loc, string_view __fmt, format_args __args) ; template<typename _Out> requires output_iterator<_Out, const wchar_t&> [[__gnu__::__always_inline__]] _Out vformat_to(_Out __out, const locale& __loc, wstring_view __fmt, wformat_args __args) ; [[nodiscard]] string vformat(string_view __fmt, format_args __args) ; [[nodiscard]] wstring vformat(wstring_view __fmt, wformat_args __args) ; [[nodiscard]] string vformat(const locale& __loc, string_view __fmt, format_args __args) ; [[nodiscard]] wstring vformat(const locale& __loc, wstring_view __fmt, wformat_args __args) ; template<typename... _Args> [[nodiscard]] string format(format_string<_Args...> __fmt, _Args&&... __args) ; template<typename... _Args> [[nodiscard]] wstring format(wformat_string<_Args...> __fmt, _Args&&... __args) ; template<typename... _Args> [[nodiscard]] string format(const locale& __loc, format_string<_Args...> __fmt, _Args&&... __args) ; template<typename... _Args> [[nodiscard]] wstring format(const locale& __loc, wformat_string<_Args...> __fmt, _Args&&... __args) ; template<typename _Out, typename... _Args> requires output_iterator<_Out, const char&> _Out format_to(_Out __out, format_string<_Args...> __fmt, _Args&&... __args) ; template<typename _Out, typename... _Args> requires output_iterator<_Out, const wchar_t&> _Out format_to(_Out __out, wformat_string<_Args...> __fmt, _Args&&... __args) ; template<typename _Out, typename... _Args> requires output_iterator<_Out, const char&> _Out format_to(_Out __out, const locale& __loc, format_string<_Args...> __fmt, _Args&&... __args) ; template<typename _Out, typename... _Args> requires output_iterator<_Out, const wchar_t&> _Out format_to(_Out __out, const locale& __loc, wformat_string<_Args...> __fmt, _Args&&... __args) ; template<typename _Out, typename... _Args> requires output_iterator<_Out, const char&> format_to_n_result<_Out> format_to_n(_Out __out, iter_difference_t<_Out> __n, format_string<_Args...> __fmt, _Args&&... __args) ; template<typename _Out, typename... _Args> requires output_iterator<_Out, const wchar_t&> format_to_n_result<_Out> format_to_n(_Out __out, iter_difference_t<_Out> __n, wformat_string<_Args...> __fmt, _Args&&... __args) ; template<typename _Out, typename... _Args> requires output_iterator<_Out, const char&> format_to_n_result<_Out> format_to_n(_Out __out, iter_difference_t<_Out> __n, const locale& __loc, format_string<_Args...> __fmt, _Args&&... __args) ; template<typename _Out, typename... _Args> requires output_iterator<_Out, const wchar_t&> format_to_n_result<_Out> format_to_n(_Out __out, iter_difference_t<_Out> __n, const locale& __loc, wformat_string<_Args...> __fmt, _Args&&... __args) ; namespace __format { template<typename _CharT> class _Counting_sink final : public _Iter_sink<_CharT, _CharT*> { public: _Counting_sink() ; [[__gnu__::__always_inline__]] size_t count() const ; }; } template<typename... _Args> [[nodiscard]] size_t formatted_size(format_string<_Args...> __fmt, _Args&&... __args) ; template<typename... _Args> [[nodiscard]] size_t formatted_size(wformat_string<_Args...> __fmt, _Args&&... __args) ; template<typename... _Args> [[nodiscard]] size_t formatted_size(const locale& __loc, format_string<_Args...> __fmt, _Args&&... __args) ; template<typename... _Args> [[nodiscard]] size_t formatted_size(const locale& __loc, wformat_string<_Args...> __fmt, _Args&&... __args) ; } namespace std __attribute__ ((__visibility__ ("default"))) { namespace chrono { namespace __detail { template<typename _CharT> consteval auto _Widen(const char* __narrow, const wchar_t* __wide) ; template<typename _Period> constexpr const char* __units_suffix_misc(char* __buf, size_t ) noexcept ; template<typename _Period, typename _CharT> constexpr auto __units_suffix(char* __buf, size_t __n) noexcept ; } template<typename _CharT, typename _Traits, typename _Rep, typename _Period> basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const duration<_Rep, _Period>& __d) ; namespace __detail { template<typename _Duration> struct __local_time_fmt { local_time<_Duration> _M_time; const string* _M_abbrev; const seconds* _M_offset_sec; }; struct __local_fmt_t; } template<typename _Duration> __detail::__local_time_fmt<_Duration> local_time_format(local_time<_Duration> __time, const string* __abbrev = nullptr, const seconds* __offset_sec = nullptr) ; } namespace __format { [[noreturn,__gnu__::__always_inline__]] void __no_timezone_available() ; [[noreturn,__gnu__::__always_inline__]] void __not_valid_for_duration() ; [[noreturn,__gnu__::__always_inline__]] void __invalid_chrono_spec() ; template<typename _CharT> struct _ChronoSpec : _Spec<_CharT> { basic_string_view<_CharT> _M_chrono_specs; }; enum _ChronoParts { _Year = 1, _Month = 2, _Day = 4, _Weekday = 8, _TimeOfDay = 16, _TimeZone = 32, _Date = _Year | _Month | _Day | _Weekday, _DateTime = _Date | _TimeOfDay, _ZonedDateTime = _DateTime | _TimeZone, _Duration = 128 }; constexpr _ChronoParts operator|(_ChronoParts __x, _ChronoParts __y) ; template<typename _CharT> struct __formatter_chrono { using __string_view = basic_string_view<_CharT>; using __string = basic_string<_CharT>; template<typename _ParseContext> constexpr typename _ParseContext::iterator _M_parse(_ParseContext& __pc, _ChronoParts __parts) ; template<typename _Tp, typename _FormatContext> typename _FormatContext::iterator _M_format(const _Tp& __t, _FormatContext& __fc, bool __is_neg = false) const ; _ChronoSpec<_CharT> _M_spec; private: template<typename _FormatContext> std::locale _M_locale(_FormatContext& __fc) const ; template<typename _Tp, typename _FormatContext> typename _FormatContext::iterator _M_format_to_ostream(const _Tp& __t, _FormatContext& __fc, bool __is_neg) const ; static constexpr const _CharT* _S_chars = ::std::chrono::__detail::_Widen<_CharT>("0123456789+-:/ {}", L"0123456789+-:/ {}"); static constexpr const _CharT* _S_plus_minus = _S_chars + 10; static constexpr _CharT _S_colon = _S_chars[12]; static constexpr _CharT _S_slash = _S_chars[13]; static constexpr _CharT _S_space = _S_chars[14]; static constexpr const _CharT* _S_empty_spec = _S_chars + 15; template<typename _Tp, typename _FormatContext> typename _FormatContext::iterator _M_a_A(const _Tp& __t, typename _FormatContext::iterator __out, _FormatContext& __ctx, bool __full) const ; template<typename _Tp, typename _FormatContext> typename _FormatContext::iterator _M_b_B(const _Tp& __t, typename _FormatContext::iterator __out, _FormatContext& __ctx, bool __full) const ; template<typename _Tp, typename _FormatContext> typename _FormatContext::iterator _M_c(const _Tp& __tt, typename _FormatContext::iterator __out, _FormatContext& __ctx, bool __mod = false) const ; template<typename _Tp, typename _FormatContext> typename _FormatContext::iterator _M_C_y_Y(const _Tp& __t, typename _FormatContext::iterator __out, _FormatContext& __ctx, _CharT __conv, _CharT __mod = 0) const ; template<typename _Tp, typename _FormatContext> typename _FormatContext::iterator _M_D(const _Tp& __t, typename _FormatContext::iterator __out, _FormatContext&) const ; template<typename _Tp, typename _FormatContext> typename _FormatContext::iterator _M_d_e(const _Tp& __t, typename _FormatContext::iterator __out, _FormatContext& __ctx, _CharT __conv, bool __mod = false) const ; template<typename _Tp, typename _FormatContext> typename _FormatContext::iterator _M_F(const _Tp& __t, typename _FormatContext::iterator __out, _FormatContext&) const ; template<typename _Tp, typename _FormatContext> typename _FormatContext::iterator _M_g_G(const _Tp& __t, typename _FormatContext::iterator __out, _FormatContext& __ctx, bool __full) const ; template<typename _Tp, typename _FormatContext> typename _FormatContext::iterator _M_H_I(const _Tp& __t, typename _FormatContext::iterator __out, _FormatContext& __ctx, _CharT __conv, bool __mod = false) const ; template<typename _Tp, typename _FormatContext> typename _FormatContext::iterator _M_j(const _Tp& __t, typename _FormatContext::iterator __out, _FormatContext&) const ; template<typename _Tp, typename _FormatContext> typename _FormatContext::iterator _M_m(const _Tp& __t, typename _FormatContext::iterator __out, _FormatContext& __ctx, bool __mod) const ; template<typename _Tp, typename _FormatContext> typename _FormatContext::iterator _M_M(const _Tp& __t, typename _FormatContext::iterator __out, _FormatContext& __ctx, bool __mod) const ; template<typename _Tp, typename _FormatContext> typename _FormatContext::iterator _M_p(const _Tp& __t, typename _FormatContext::iterator __out, _FormatContext& __ctx) const ; template<typename _Tp, typename _FormatContext> typename _FormatContext::iterator _M_q(const _Tp&, typename _FormatContext::iterator __out, _FormatContext& __ctx) const ; template<typename _Tp, typename _FormatContext> typename _FormatContext::iterator _M_r(const _Tp& __tt, typename _FormatContext::iterator __out, _FormatContext& __ctx) const ; template<typename _Tp, typename _FormatContext> typename _FormatContext::iterator _M_R_T(const _Tp& __t, typename _FormatContext::iterator __out, _FormatContext& __ctx, bool __secs) const ; template<typename _Tp, typename _FormatContext> typename _FormatContext::iterator _M_S(const _Tp& __t, typename _FormatContext::iterator __out, _FormatContext& __ctx, bool __mod = false) const ; template<typename _Tp, typename _FormatContext> typename _FormatContext::iterator _M_u_w(const _Tp& __t, typename _FormatContext::iterator __out, _FormatContext& __ctx, _CharT __conv, bool __mod = false) const ; template<typename _Tp, typename _FormatContext> typename _FormatContext::iterator _M_U_V_W(const _Tp& __t, typename _FormatContext::iterator __out, _FormatContext& __ctx, _CharT __conv, bool __mod = false) const ; template<typename _Tp, typename _FormatContext> typename _FormatContext::iterator _M_x(const _Tp& __t, typename _FormatContext::iterator __out, _FormatContext& __ctx, bool __mod = false) const ; template<typename _Tp, typename _FormatContext> typename _FormatContext::iterator _M_X(const _Tp& __tt, typename _FormatContext::iterator __out, _FormatContext& __ctx, bool __mod = false) const ; template<typename _Tp, typename _FormatContext> typename _FormatContext::iterator _M_z(const _Tp& __t, typename _FormatContext::iterator __out, _FormatContext&, bool __mod = false) const ; template<typename _Tp, typename _FormatContext> typename _FormatContext::iterator _M_Z(const _Tp& __t, typename _FormatContext::iterator __out, _FormatContext& __ctx) const ; static _CharT _S_digit(int __n) noexcept ; static basic_string_view<_CharT> _S_two_digits(int __n) noexcept ; template<typename _Tp> static decltype(auto) _S_hms(const _Tp& __t) ; template<typename _Tp> static auto _S_days(const _Tp& __t) ; template<typename _Tp> static chrono::year_month_day _S_date(const _Tp& __t) ; template<typename _Tp> static chrono::day _S_day(const _Tp& __t) ; template<typename _Tp> static chrono::month _S_month(const _Tp& __t) ; template<typename _Tp> static chrono::year _S_year(const _Tp& __t) ; template<typename _Tp> static chrono::weekday _S_weekday(const _Tp& __t) ; template<typename _Tp> static auto _S_floor_seconds(const _Tp& __t) ; template<typename _Iter> _Iter _M_locale_fmt(_Iter __out, const locale& __loc, const struct tm& __tm, char __fmt, char __mod) const ; }; } template<typename _Rep, typename _Period, typename _CharT> struct formatter<chrono::duration<_Rep, _Period>, _CharT> { constexpr typename basic_format_parse_context<_CharT>::iterator parse(basic_format_parse_context<_CharT>& __pc) ; template<typename _Out> typename basic_format_context<_Out, _CharT>::iterator format(const chrono::duration<_Rep, _Period>& __d, basic_format_context<_Out, _CharT>& __fc) const ; private: __format::__formatter_chrono<_CharT> _M_f; }; template<typename _CharT> struct formatter<chrono::day, _CharT> { template<typename _ParseContext> constexpr typename _ParseContext::iterator parse(_ParseContext& __pc) ; template<typename _FormatContext> typename _FormatContext::iterator format(const chrono::day& __t, _FormatContext& __fc) const ; private: __format::__formatter_chrono<_CharT> _M_f; }; template<typename _CharT> struct formatter<chrono::month, _CharT> { template<typename _ParseContext> constexpr typename _ParseContext::iterator parse(_ParseContext& __pc) ; template<typename _FormatContext> typename _FormatContext::iterator format(const chrono::month& __t, _FormatContext& __fc) const ; private: __format::__formatter_chrono<_CharT> _M_f; }; template<typename _CharT> struct formatter<chrono::year, _CharT> { template<typename _ParseContext> constexpr typename _ParseContext::iterator parse(_ParseContext& __pc) ; template<typename _FormatContext> typename _FormatContext::iterator format(const chrono::year& __t, _FormatContext& __fc) const ; private: __format::__formatter_chrono<_CharT> _M_f; }; template<typename _CharT> struct formatter<chrono::weekday, _CharT> { template<typename _ParseContext> constexpr typename _ParseContext::iterator parse(_ParseContext& __pc) ; template<typename _FormatContext> typename _FormatContext::iterator format(const chrono::weekday& __t, _FormatContext& __fc) const ; private: __format::__formatter_chrono<_CharT> _M_f; }; template<typename _CharT> struct formatter<chrono::weekday_indexed, _CharT> { template<typename _ParseContext> constexpr typename _ParseContext::iterator parse(_ParseContext& __pc) ; template<typename _FormatContext> typename _FormatContext::iterator format(const chrono::weekday_indexed& __t, _FormatContext& __fc) const ; private: __format::__formatter_chrono<_CharT> _M_f; }; template<typename _CharT> struct formatter<chrono::weekday_last, _CharT> { template<typename _ParseContext> constexpr typename _ParseContext::iterator parse(_ParseContext& __pc) ; template<typename _FormatContext> typename _FormatContext::iterator format(const chrono::weekday_last& __t, _FormatContext& __fc) const ; private: __format::__formatter_chrono<_CharT> _M_f; }; template<typename _CharT> struct formatter<chrono::month_day, _CharT> { template<typename _ParseContext> constexpr typename _ParseContext::iterator parse(_ParseContext& __pc) ; template<typename _FormatContext> typename _FormatContext::iterator format(const chrono::month_day& __t, _FormatContext& __fc) const ; private: __format::__formatter_chrono<_CharT> _M_f; }; template<typename _CharT> struct formatter<chrono::month_day_last, _CharT> { template<typename _ParseContext> constexpr typename _ParseContext::iterator parse(_ParseContext& __pc) ; template<typename _FormatContext> typename _FormatContext::iterator format(const chrono::month_day_last& __t, _FormatContext& __fc) const ; private: __format::__formatter_chrono<_CharT> _M_f; }; template<typename _CharT> struct formatter<chrono::month_weekday, _CharT> { template<typename _ParseContext> constexpr typename _ParseContext::iterator parse(_ParseContext& __pc) ; template<typename _FormatContext> typename _FormatContext::iterator format(const chrono::month_weekday& __t, _FormatContext& __fc) const ; private: __format::__formatter_chrono<_CharT> _M_f; }; template<typename _CharT> struct formatter<chrono::month_weekday_last, _CharT> { template<typename _ParseContext> constexpr typename _ParseContext::iterator parse(_ParseContext& __pc) ; template<typename _FormatContext> typename _FormatContext::iterator format(const chrono::month_weekday_last& __t, _FormatContext& __fc) const ; private: __format::__formatter_chrono<_CharT> _M_f; }; template<typename _CharT> struct formatter<chrono::year_month, _CharT> { template<typename _ParseContext> constexpr typename _ParseContext::iterator parse(_ParseContext& __pc) ; template<typename _FormatContext> typename _FormatContext::iterator format(const chrono::year_month& __t, _FormatContext& __fc) const ; private: __format::__formatter_chrono<_CharT> _M_f; }; template<typename _CharT> struct formatter<chrono::year_month_day, _CharT> { template<typename _ParseContext> constexpr typename _ParseContext::iterator parse(_ParseContext& __pc) ; template<typename _FormatContext> typename _FormatContext::iterator format(const chrono::year_month_day& __t, _FormatContext& __fc) const ; private: __format::__formatter_chrono<_CharT> _M_f; }; template<typename _CharT> struct formatter<chrono::year_month_day_last, _CharT> { template<typename _ParseContext> constexpr typename _ParseContext::iterator parse(_ParseContext& __pc) ; template<typename _FormatContext> typename _FormatContext::iterator format(const chrono::year_month_day_last& __t, _FormatContext& __fc) const ; private: __format::__formatter_chrono<_CharT> _M_f; }; template<typename _CharT> struct formatter<chrono::year_month_weekday, _CharT> { template<typename _ParseContext> constexpr typename _ParseContext::iterator parse(_ParseContext& __pc) ; template<typename _FormatContext> typename _FormatContext::iterator format(const chrono::year_month_weekday& __t, _FormatContext& __fc) const ; private: __format::__formatter_chrono<_CharT> _M_f; }; template<typename _CharT> struct formatter<chrono::year_month_weekday_last, _CharT> { template<typename _ParseContext> constexpr typename _ParseContext::iterator parse(_ParseContext& __pc) ; template<typename _FormatContext> typename _FormatContext::iterator format(const chrono::year_month_weekday_last& __t, _FormatContext& __fc) const ; private: __format::__formatter_chrono<_CharT> _M_f; }; template<typename _Rep, typename _Period, typename _CharT> struct formatter<chrono::hh_mm_ss<chrono::duration<_Rep, _Period>>, _CharT> { template<typename _ParseContext> constexpr typename _ParseContext::iterator parse(_ParseContext& __pc) ; template<typename _FormatContext> typename _FormatContext::iterator format(const chrono::hh_mm_ss<chrono::duration<_Rep, _Period>>& __t, _FormatContext& __fc) const ; private: __format::__formatter_chrono<_CharT> _M_f; }; template<typename _CharT> struct formatter<chrono::sys_info, _CharT> { template<typename _ParseContext> constexpr typename _ParseContext::iterator parse(_ParseContext& __pc) ; template<typename _FormatContext> typename _FormatContext::iterator format(const chrono::sys_info& __i, _FormatContext& __fc) const ; private: __format::__formatter_chrono<_CharT> _M_f; }; template<typename _CharT> struct formatter<chrono::local_info, _CharT> { template<typename _ParseContext> constexpr typename _ParseContext::iterator parse(_ParseContext& __pc) ; template<typename _FormatContext> typename _FormatContext::iterator format(const chrono::local_info& __i, _FormatContext& __fc) const ; private: __format::__formatter_chrono<_CharT> _M_f; }; template<typename _Duration, typename _CharT> struct formatter<chrono::sys_time<_Duration>, _CharT> { template<typename _ParseContext> constexpr typename _ParseContext::iterator parse(_ParseContext& __pc) ; template<typename _FormatContext> typename _FormatContext::iterator format(const chrono::sys_time<_Duration>& __t, _FormatContext& __fc) const ; private: static constexpr bool __stream_insertable = requires (basic_ostream<_CharT>& __os, chrono::sys_time<_Duration> __t) { __os << __t; }; __format::__formatter_chrono<_CharT> _M_f; }; template<typename _Duration, typename _CharT> struct formatter<chrono::utc_time<_Duration>, _CharT> : __format::__formatter_chrono<_CharT> { template<typename _ParseContext> constexpr typename _ParseContext::iterator parse(_ParseContext& __pc) ; template<typename _FormatContext> typename _FormatContext::iterator format(const chrono::utc_time<_Duration>& __t, _FormatContext& __fc) const ; private: friend formatter<chrono::__detail::__utc_leap_second<_Duration>, _CharT>; __format::__formatter_chrono<_CharT> _M_f; }; template<typename _Duration, typename _CharT> struct formatter<chrono::tai_time<_Duration>, _CharT> : __format::__formatter_chrono<_CharT> { template<typename _ParseContext> constexpr typename _ParseContext::iterator parse(_ParseContext& __pc) ; template<typename _FormatContext> typename _FormatContext::iterator format(const chrono::tai_time<_Duration>& __t, _FormatContext& __fc) const ; private: __format::__formatter_chrono<_CharT> _M_f; }; template<typename _Duration, typename _CharT> struct formatter<chrono::gps_time<_Duration>, _CharT> : __format::__formatter_chrono<_CharT> { template<typename _ParseContext> constexpr typename _ParseContext::iterator parse(_ParseContext& __pc) ; template<typename _FormatContext> typename _FormatContext::iterator format(const chrono::gps_time<_Duration>& __t, _FormatContext& __fc) const ; private: __format::__formatter_chrono<_CharT> _M_f; }; template<typename _Duration, typename _CharT> struct formatter<chrono::file_time<_Duration>, _CharT> { template<typename _ParseContext> constexpr typename _ParseContext::iterator parse(_ParseContext& __pc) ; template<typename _FormatContext> typename _FormatContext::iterator format(const chrono::file_time<_Duration>& __t, _FormatContext& __ctx) const ; private: __format::__formatter_chrono<_CharT> _M_f; }; template<typename _Duration, typename _CharT> struct formatter<chrono::local_time<_Duration>, _CharT> { template<typename _ParseContext> constexpr typename _ParseContext::iterator parse(_ParseContext& __pc) ; template<typename _FormatContext> typename _FormatContext::iterator format(const chrono::local_time<_Duration>& __t, _FormatContext& __ctx) const ; private: __format::__formatter_chrono<_CharT> _M_f; }; template<typename _Duration, typename _CharT> struct formatter<chrono::__detail::__local_time_fmt<_Duration>, _CharT> { template<typename _ParseContext> constexpr typename _ParseContext::iterator parse(_ParseContext& __pc) ; template<typename _FormatContext> typename _FormatContext::iterator format(const chrono::__detail::__local_time_fmt<_Duration>& __t, _FormatContext& __ctx) const ; private: __format::__formatter_chrono<_CharT> _M_f; }; template<typename _Duration, typename _TimeZonePtr, typename _CharT> struct formatter<chrono::zoned_time<_Duration, _TimeZonePtr>, _CharT> : formatter<chrono::__detail::__local_time_fmt<_Duration>, _CharT> { template<typename _FormatContext> typename _FormatContext::iterator format(const chrono::zoned_time<_Duration, _TimeZonePtr>& __tp, _FormatContext& __ctx) const ; }; template<typename _Duration, typename _CharT> struct formatter<chrono::__detail::__utc_leap_second<_Duration>, _CharT> : formatter<chrono::utc_time<_Duration>, _CharT> { template<typename _FormatContext> typename _FormatContext::iterator format(const chrono::__detail::__utc_leap_second<_Duration>& __t, _FormatContext& __fc) const ; }; namespace chrono { template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const day& __d) ; template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const month& __m) ; template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const year& __y) ; template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const weekday& __wd) ; template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const weekday_indexed& __wdi) ; template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const weekday_last& __wdl) ; template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const month_day& __md) ; template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const month_day_last& __mdl) ; template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const month_weekday& __mwd) ; template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const month_weekday_last& __mwdl) ; template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const year_month& __ym) ; template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const year_month_day& __ymd) ; template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const year_month_day_last& __ymdl) ; template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const year_month_weekday& __ymwd) ; template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const year_month_weekday_last& __ymwdl) ; template<typename _CharT, typename _Traits, typename _Duration> basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const hh_mm_ss<_Duration>& __hms) ; template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const sys_info& __i) ; template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const local_info& __li) ; template<typename _CharT, typename _Traits, typename _Duration, typename _TimeZonePtr> basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const zoned_time<_Duration, _TimeZonePtr>& __t) ; template<typename _CharT, typename _Traits, typename _Duration> requires (!treat_as_floating_point_v<typename _Duration::rep>) && ratio_less_v<typename _Duration::period, days::period> basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const sys_time<_Duration>& __tp) ; template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const sys_days& __dp) ; template<typename _CharT, typename _Traits, typename _Duration> basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const utc_time<_Duration>& __t) ; template<typename _CharT, typename _Traits, typename _Duration> basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const tai_time<_Duration>& __t) ; template<typename _CharT, typename _Traits, typename _Duration> basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const gps_time<_Duration>& __t) ; template<typename _CharT, typename _Traits, typename _Duration> basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const file_time<_Duration>& __t) ; template<typename _CharT, typename _Traits, typename _Duration> basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const local_time<_Duration>& __lt) ; } } extern "C" { typedef long unsigned int size_t; extern void *memcpy (void *__restrict __dest, const void *__restrict __src, size_t __n) noexcept (true) __attribute__ ((__nonnull__ (1, 2))); extern void *memmove (void *__dest, const void *__src, size_t __n) noexcept (true) __attribute__ ((__nonnull__ (1, 2))); extern void *memccpy (void *__restrict __dest, const void *__restrict __src, int __c, size_t __n) noexcept (true) __attribute__ ((__nonnull__ (1, 2))) ; extern void *memset (void *__s, int __c, size_t __n) noexcept (true) __attribute__ ((__nonnull__ (1))); extern int memcmp (const void *__s1, const void *__s2, size_t __n) noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int __memcmpeq (const void *__s1, const void *__s2, size_t __n) noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern "C++" { extern void *memchr (void *__s, int __c, size_t __n) noexcept (true) __asm ("memchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern const void *memchr (const void *__s, int __c, size_t __n) noexcept (true) __asm ("memchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) void * memchr (void *__s, int __c, size_t __n) noexcept (true) ; extern __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) const void * memchr (const void *__s, int __c, size_t __n) noexcept (true) ; } extern "C++" void *rawmemchr (void *__s, int __c) noexcept (true) __asm ("rawmemchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern "C++" const void *rawmemchr (const void *__s, int __c) noexcept (true) __asm ("rawmemchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern "C++" void *memrchr (void *__s, int __c, size_t __n) noexcept (true) __asm ("memrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; extern "C++" const void *memrchr (const void *__s, int __c, size_t __n) noexcept (true) __asm ("memrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; extern char *strcpy (char *__restrict __dest, const char *__restrict __src) noexcept (true) __attribute__ ((__nonnull__ (1, 2))); extern char *strncpy (char *__restrict __dest, const char *__restrict __src, size_t __n) noexcept (true) __attribute__ ((__nonnull__ (1, 2))); extern char *strcat (char *__restrict __dest, const char *__restrict __src) noexcept (true) __attribute__ ((__nonnull__ (1, 2))); extern char *strncat (char *__restrict __dest, const char *__restrict __src, size_t __n) noexcept (true) __attribute__ ((__nonnull__ (1, 2))); extern int strcmp (const char *__s1, const char *__s2) noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strncmp (const char *__s1, const char *__s2, size_t __n) noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strcoll (const char *__s1, const char *__s2) noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern size_t strxfrm (char *__restrict __dest, const char *__restrict __src, size_t __n) noexcept (true) __attribute__ ((__nonnull__ (2))) ; extern int strcoll_l (const char *__s1, const char *__s2, locale_t __l) noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n, locale_t __l) noexcept (true) __attribute__ ((__nonnull__ (2, 4))) ; extern char *strdup (const char *__s) noexcept (true) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); extern char *strndup (const char *__string, size_t __n) noexcept (true) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); extern "C++" { extern char *strchr (char *__s, int __c) noexcept (true) __asm ("strchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern const char *strchr (const char *__s, int __c) noexcept (true) __asm ("strchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) char * strchr (char *__s, int __c) noexcept (true) ; extern __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) const char * strchr (const char *__s, int __c) noexcept (true) ; } extern "C++" { extern char *strrchr (char *__s, int __c) noexcept (true) __asm ("strrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern const char *strrchr (const char *__s, int __c) noexcept (true) __asm ("strrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) char * strrchr (char *__s, int __c) noexcept (true) ; extern __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) const char * strrchr (const char *__s, int __c) noexcept (true) ; } extern "C++" char *strchrnul (char *__s, int __c) noexcept (true) __asm ("strchrnul") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern "C++" const char *strchrnul (const char *__s, int __c) noexcept (true) __asm ("strchrnul") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern size_t strcspn (const char *__s, const char *__reject) noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern size_t strspn (const char *__s, const char *__accept) noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern "C++" { extern char *strpbrk (char *__s, const char *__accept) noexcept (true) __asm ("strpbrk") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern const char *strpbrk (const char *__s, const char *__accept) noexcept (true) __asm ("strpbrk") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) char * strpbrk (char *__s, const char *__accept) noexcept (true) ; extern __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) const char * strpbrk (const char *__s, const char *__accept) noexcept (true) ; } extern "C++" { extern char *strstr (char *__haystack, const char *__needle) noexcept (true) __asm ("strstr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern const char *strstr (const char *__haystack, const char *__needle) noexcept (true) __asm ("strstr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) char * strstr (char *__haystack, const char *__needle) noexcept (true) ; extern __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) const char * strstr (const char *__haystack, const char *__needle) noexcept (true) ; } extern char *strtok (char *__restrict __s, const char *__restrict __delim) noexcept (true) __attribute__ ((__nonnull__ (2))); extern char *__strtok_r (char *__restrict __s, const char *__restrict __delim, char **__restrict __save_ptr) noexcept (true) __attribute__ ((__nonnull__ (2, 3))); extern char *strtok_r (char *__restrict __s, const char *__restrict __delim, char **__restrict __save_ptr) noexcept (true) __attribute__ ((__nonnull__ (2, 3))); extern "C++" char *strcasestr (char *__haystack, const char *__needle) noexcept (true) __asm ("strcasestr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern "C++" const char *strcasestr (const char *__haystack, const char *__needle) noexcept (true) __asm ("strcasestr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern void *memmem (const void *__haystack, size_t __haystacklen, const void *__needle, size_t __needlelen) noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3))) ; extern void *__mempcpy (void *__restrict __dest, const void *__restrict __src, size_t __n) noexcept (true) __attribute__ ((__nonnull__ (1, 2))); extern void *mempcpy (void *__restrict __dest, const void *__restrict __src, size_t __n) noexcept (true) __attribute__ ((__nonnull__ (1, 2))); extern size_t strlen (const char *__s) noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern size_t strnlen (const char *__string, size_t __maxlen) noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *strerror (int __errnum) noexcept (true); extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) noexcept (true) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)) ; extern const char *strerrordesc_np (int __err) noexcept (true); extern const char *strerrorname_np (int __err) noexcept (true); extern char *strerror_l (int __errnum, locale_t __l) noexcept (true); typedef long unsigned int size_t; extern "C" { extern int bcmp (const void *__s1, const void *__s2, size_t __n) noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern void bcopy (const void *__src, void *__dest, size_t __n) noexcept (true) __attribute__ ((__nonnull__ (1, 2))); extern void bzero (void *__s, size_t __n) noexcept (true) __attribute__ ((__nonnull__ (1))); extern char *index (const char *__s, int __c) noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *rindex (const char *__s, int __c) noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern int ffs (int __i) noexcept (true) __attribute__ ((__const__)); extern int ffsl (long int __l) noexcept (true) __attribute__ ((__const__)); __extension__ extern int ffsll (long long int __ll) noexcept (true) __attribute__ ((__const__)); extern int strcasecmp (const char *__s1, const char *__s2) noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strncasecmp (const char *__s1, const char *__s2, size_t __n) noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strcasecmp_l (const char *__s1, const char *__s2, locale_t __loc) noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); extern int strncasecmp_l (const char *__s1, const char *__s2, size_t __n, locale_t __loc) noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4))); } extern __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void bcopy (const void *__src, void *__dest, size_t __len) noexcept (true) ; extern __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void bzero (void *__dest, size_t __len) noexcept (true) ; extern void explicit_bzero (void *__s, size_t __n) noexcept (true) __attribute__ ((__nonnull__ (1))) ; extern char *strsep (char **__restrict __stringp, const char *__restrict __delim) noexcept (true) __attribute__ ((__nonnull__ (1, 2))); extern char *strsignal (int __sig) noexcept (true); extern const char *sigabbrev_np (int __sig) noexcept (true); extern const char *sigdescr_np (int __sig) noexcept (true); extern char *__stpcpy (char *__restrict __dest, const char *__restrict __src) noexcept (true) __attribute__ ((__nonnull__ (1, 2))); extern char *stpcpy (char *__restrict __dest, const char *__restrict __src) noexcept (true) __attribute__ ((__nonnull__ (1, 2))); extern char *__stpncpy (char *__restrict __dest, const char *__restrict __src, size_t __n) noexcept (true) __attribute__ ((__nonnull__ (1, 2))); extern char *stpncpy (char *__restrict __dest, const char *__restrict __src, size_t __n) noexcept (true) __attribute__ ((__nonnull__ (1, 2))); extern size_t strlcpy (char *__restrict __dest, const char *__restrict __src, size_t __n) noexcept (true) __attribute__ ((__nonnull__ (1, 2))) ; extern size_t strlcat (char *__restrict __dest, const char *__restrict __src, size_t __n) noexcept (true) __attribute__ ((__nonnull__ (1, 2))) ; extern int strverscmp (const char *__s1, const char *__s2) noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strfry (char *__string) noexcept (true) __attribute__ ((__nonnull__ (1))); extern void *memfrob (void *__s, size_t __n) noexcept (true) __attribute__ ((__nonnull__ (1))) ; extern "C++" char *basename (char *__filename) noexcept (true) __asm ("basename") __attribute__ ((__nonnull__ (1))); extern "C++" const char *basename (const char *__filename) noexcept (true) __asm ("basename") __attribute__ ((__nonnull__ (1))); extern __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void * memcpy (void *__restrict __dest, const void *__restrict __src, size_t __len) noexcept (true) ; extern __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void * memmove (void *__dest, const void *__src, size_t __len) noexcept (true) ; extern __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void * mempcpy (void *__restrict __dest, const void *__restrict __src, size_t __len) noexcept (true) ; extern __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void * memset (void *__dest, int __ch, size_t __len) noexcept (true) ; void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen) noexcept (true) __attribute__ ((__nonnull__ (1))) ; extern __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void explicit_bzero (void *__dest, size_t __len) noexcept (true) ; extern __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char * strcpy (char *__restrict __dest, const char *__restrict __src) noexcept (true) ; extern __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char * stpcpy (char *__restrict __dest, const char *__restrict __src) noexcept (true) ; extern __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char * strncpy (char *__restrict __dest, const char *__restrict __src, size_t __len) noexcept (true) ; extern __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char * stpncpy (char *__dest, const char *__src, size_t __n) noexcept (true) ; extern __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char * strcat (char *__restrict __dest, const char *__restrict __src) noexcept (true) ; extern __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char * strncat (char *__restrict __dest, const char *__restrict __src, size_t __len) noexcept (true) ; extern size_t __strlcpy_chk (char *__dest, const char *__src, size_t __n, size_t __destlen) noexcept (true); extern size_t __strlcpy_alias (char *__dest, const char *__src, size_t __n) noexcept (true) __asm__ ("" "strlcpy"); extern __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t strlcpy (char *__restrict __dest, const char *__restrict __src, size_t __n) noexcept (true) ; extern size_t __strlcat_chk (char *__dest, const char *__src, size_t __n, size_t __destlen) noexcept (true); extern size_t __strlcat_alias (char *__dest, const char *__src, size_t __n) noexcept (true) __asm__ ("" "strlcat"); extern __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t strlcat (char *__restrict __dest, const char *__restrict __src, size_t __n) noexcept (true) ; } extern "C++" { namespace std __attribute__ ((__visibility__ ("default"))) { using ::memchr; using ::memcmp; using ::memcpy; using ::memmove; using ::memset; using ::strcat; using ::strcmp; using ::strcoll; using ::strcpy; using ::strcspn; using ::strerror; using ::strlen; using ::strncat; using ::strncmp; using ::strncpy; using ::strspn; using ::strtok; using ::strxfrm; using ::strchr; using ::strpbrk; using ::strrchr; using ::strstr; } } namespace std __attribute__ ((__visibility__ ("default"))) { constexpr size_t __deque_buf_size(size_t __size) ; template<typename _Tp, typename _Ref, typename _Ptr> struct _Deque_iterator { private: template<typename _CvTp> using __iter = _Deque_iterator<_Tp, _CvTp&, __ptr_rebind<_Ptr, _CvTp>>; public: typedef __iter<_Tp> iterator; typedef __iter<const _Tp> const_iterator; typedef __ptr_rebind<_Ptr, _Tp> _Elt_pointer; typedef __ptr_rebind<_Ptr, _Elt_pointer> _Map_pointer; static size_t _S_buffer_size() noexcept ; 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) ; _Deque_iterator() ; template<typename _Iter, typename = _Require<is_same<_Self, const_iterator>, is_same<_Iter, iterator>>> _Deque_iterator(const _Iter& __x) ; _Deque_iterator(const _Deque_iterator& __x) ; _Deque_iterator& operator=(const _Deque_iterator&) = default; iterator _M_const_cast() const noexcept ; [[__nodiscard__]] reference operator*() const noexcept ; [[__nodiscard__]] pointer operator->() const noexcept ; _Self& operator++() noexcept ; _Self operator++(int) noexcept ; _Self& operator--() noexcept ; _Self operator--(int) noexcept ; _Self& operator+=(difference_type __n) noexcept ; _Self& operator-=(difference_type __n) noexcept ; [[__nodiscard__]] reference operator[](difference_type __n) const noexcept { return *(*this + __n); } void _M_set_node(_Map_pointer __new_node) noexcept { _M_node = __new_node; _M_first = *__new_node; _M_last = _M_first + difference_type(_S_buffer_size()); } [[__nodiscard__]] friend bool operator==(const _Self& __x, const _Self& __y) noexcept { return __x._M_cur == __y._M_cur; } template<typename _RefR, typename _PtrR> [[__nodiscard__]] friend bool operator==(const _Self& __x, const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) noexcept { return __x._M_cur == __y._M_cur; } [[nodiscard]] friend strong_ordering operator<=>(const _Self& __x, const _Self& __y) noexcept { if (const auto __cmp = __x._M_node <=> __y._M_node; __cmp != 0) return __cmp; return __x._M_cur <=> __y._M_cur; } [[__nodiscard__]] friend difference_type operator-(const _Self& __x, const _Self& __y) noexcept { return difference_type(_S_buffer_size()) * (__x._M_node - __y._M_node - bool(__x._M_node)) + (__x._M_cur - __x._M_first) + (__y._M_last - __y._M_cur); } template<typename _RefR, typename _PtrR> [[__nodiscard__]] friend difference_type operator-(const _Self& __x, const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) noexcept { return difference_type(_S_buffer_size()) * (__x._M_node - __y._M_node - bool(__x._M_node)) + (__x._M_cur - __x._M_first) + (__y._M_last - __y._M_cur); } [[__nodiscard__]] friend _Self operator+(const _Self& __x, difference_type __n) noexcept { _Self __tmp = __x; __tmp += __n; return __tmp; } [[__nodiscard__]] friend _Self operator-(const _Self& __x, difference_type __n) noexcept { _Self __tmp = __x; __tmp -= __n; return __tmp; } [[__nodiscard__]] friend _Self operator+(difference_type __n, const _Self& __x) noexcept { return __x + __n; } }; 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; typedef typename _Alloc_traits::pointer _Ptr; typedef typename _Alloc_traits::const_pointer _Ptr_const; typedef typename _Alloc_traits::template rebind<_Ptr>::other _Map_alloc_type; typedef __gnu_cxx::__alloc_traits<_Map_alloc_type> _Map_alloc_traits; typedef _Alloc allocator_type; allocator_type get_allocator() const 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) ; _Deque_base(const allocator_type& __a, size_t __num_elements) ; _Deque_base(const allocator_type& __a) ; _Deque_base(_Deque_base&& __x) ; _Deque_base(_Deque_base&& __x, const allocator_type& __a) ; _Deque_base(_Deque_base&& __x, const allocator_type& __a, size_t __n) ; ~_Deque_base() noexcept; typedef typename iterator::_Map_pointer _Map_pointer; struct _Deque_impl_data { _Map_pointer _M_map; size_t _M_map_size; iterator _M_start; iterator _M_finish; _Deque_impl_data() ; _Deque_impl_data(const _Deque_impl_data&) = default; _Deque_impl_data& operator=(const _Deque_impl_data&) = default; _Deque_impl_data(_Deque_impl_data&& __x) ; void _M_swap_data(_Deque_impl_data& __x) noexcept ; }; struct _Deque_impl : public _Tp_alloc_type, public _Deque_impl_data { _Deque_impl() noexcept(is_nothrow_default_constructible<_Tp_alloc_type>::value) ; _Deque_impl(const _Tp_alloc_type& __a) ; _Deque_impl(_Deque_impl&&) = default; _Deque_impl(_Tp_alloc_type&& __a) ; _Deque_impl(_Deque_impl&& __d, _Tp_alloc_type&& __a) ; }; _Tp_alloc_type& _M_get_Tp_allocator() noexcept ; const _Tp_alloc_type& _M_get_Tp_allocator() const noexcept ; _Map_alloc_type _M_get_map_allocator() const noexcept ; _Ptr _M_allocate_node() ; void _M_deallocate_node(_Ptr __p) noexcept ; _Map_pointer _M_allocate_map(size_t __n) ; void _M_deallocate_map(_Map_pointer __p, size_t __n) noexcept ; 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) noexcept; enum { _S_initial_map_size = 8 }; _Deque_impl _M_impl; }; template<typename _Tp, typename _Alloc = std::allocator<_Tp> > class deque : protected _Deque_base<_Tp, _Alloc> { static_assert(is_same<typename remove_cv<_Tp>::type, _Tp>::value, "std::deque must have a non-const, non-volatile value_type"); static_assert(is_same<typename _Alloc::value_type, _Tp>::value, "std::deque must have the same value_type as its allocator"); 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; private: static size_t _S_buffer_size() noexcept ; 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; using _Base::_M_impl; public: deque() = default; explicit deque(const allocator_type& __a) ; explicit deque(size_type __n, const allocator_type& __a = allocator_type()) ; deque(size_type __n, const value_type& __value, const allocator_type& __a = allocator_type()) ; deque(const deque& __x) ; deque(deque&&) = default; deque(const deque& __x, const __type_identity_t<allocator_type>& __a) ; deque(deque&& __x, const __type_identity_t<allocator_type>& __a) ; private: deque(deque&& __x, const allocator_type& __a, true_type) ; deque(deque&& __x, const allocator_type& __a, false_type) ; public: deque(initializer_list<value_type> __l, const allocator_type& __a = allocator_type()) ; template<typename _InputIterator, typename = std::_RequireInputIter<_InputIterator>> deque(_InputIterator __first, _InputIterator __last, const allocator_type& __a = allocator_type()) ; ~deque() ; deque& operator=(const deque& __x); deque& operator=(deque&& __x) noexcept(_Alloc_traits::_S_always_equal()) ; deque& operator=(initializer_list<value_type> __l) ; void assign(size_type __n, const value_type& __val) ; template<typename _InputIterator, typename = std::_RequireInputIter<_InputIterator>> void assign(_InputIterator __first, _InputIterator __last) ; void assign(initializer_list<value_type> __l) ; [[__nodiscard__]] allocator_type get_allocator() const noexcept ; [[__nodiscard__]] iterator begin() noexcept ; [[__nodiscard__]] const_iterator begin() const noexcept ; [[__nodiscard__]] iterator end() noexcept ; [[__nodiscard__]] const_iterator end() const noexcept ; [[__nodiscard__]] reverse_iterator rbegin() noexcept ; [[__nodiscard__]] const_reverse_iterator rbegin() const noexcept ; [[__nodiscard__]] reverse_iterator rend() noexcept ; [[__nodiscard__]] const_reverse_iterator rend() const noexcept ; [[__nodiscard__]] const_iterator cbegin() const noexcept ; [[__nodiscard__]] const_iterator cend() const noexcept ; [[__nodiscard__]] const_reverse_iterator crbegin() const noexcept ; [[__nodiscard__]] const_reverse_iterator crend() const noexcept ; [[__nodiscard__]] size_type size() const noexcept ; [[__nodiscard__]] size_type max_size() const noexcept ; void resize(size_type __new_size) ; void resize(size_type __new_size, const value_type& __x) ; void shrink_to_fit() noexcept ; [[__nodiscard__]] bool empty() const noexcept ; [[__nodiscard__]] reference operator[](size_type __n) noexcept ; [[__nodiscard__]] const_reference operator[](size_type __n) const noexcept ; protected: void _M_range_check(size_type __n) const ; public: reference at(size_type __n) ; const_reference at(size_type __n) const ; [[__nodiscard__]] reference front() noexcept ; [[__nodiscard__]] const_reference front() const noexcept ; [[__nodiscard__]] reference back() noexcept ; [[__nodiscard__]] const_reference back() const noexcept ; void push_front(const value_type& __x) ; void push_front(value_type&& __x) ; template<typename... _Args> reference emplace_front(_Args&&... __args); void push_back(const value_type& __x) ; void push_back(value_type&& __x) ; template<typename... _Args> reference emplace_back(_Args&&... __args); void pop_front() noexcept ; void pop_back() noexcept ; template<typename... _Args> iterator emplace(const_iterator __position, _Args&&... __args); iterator insert(const_iterator __position, const value_type& __x); iterator insert(const_iterator __position, value_type&& __x) ; iterator insert(const_iterator __p, initializer_list<value_type> __l) ; iterator insert(const_iterator __position, size_type __n, const value_type& __x) ; template<typename _InputIterator, typename = std::_RequireInputIter<_InputIterator>> iterator insert(const_iterator __position, _InputIterator __first, _InputIterator __last) ; iterator erase(const_iterator __position) ; iterator erase(const_iterator __first, const_iterator __last) ; void swap(deque& __x) noexcept ; void clear() noexcept ; protected: static size_t _S_check_init_len(size_t __n, const allocator_type& __a) ; static size_type _S_max_size(const _Tp_alloc_type& __a) noexcept ; template<typename _InputIterator> void _M_range_initialize(_InputIterator __first, _InputIterator __last, std::input_iterator_tag); template<typename _ForwardIterator> void _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag); void _M_fill_initialize(const value_type& __value); void _M_default_initialize(); template<typename _InputIterator> void _M_assign_aux(_InputIterator __first, _InputIterator __last, std::input_iterator_tag); template<typename _ForwardIterator> void _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag) ; void _M_fill_assign(size_type __n, const value_type& __val) ; template<typename... _Args> void _M_push_back_aux(_Args&&... __args); template<typename... _Args> void _M_push_front_aux(_Args&&... __args); void _M_pop_back_aux(); void _M_pop_front_aux(); template<typename _InputIterator> void _M_range_insert_aux(iterator __pos, _InputIterator __first, _InputIterator __last, std::input_iterator_tag); template<typename _ForwardIterator> void _M_range_insert_aux(iterator __pos, _ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag); void _M_fill_insert(iterator __pos, size_type __n, const value_type& __x); template<typename... _Args> iterator _M_insert_aux(iterator __pos, _Args&&... __args); void _M_insert_aux(iterator __pos, size_type __n, const value_type& __x); template<typename _ForwardIterator> void _M_insert_aux(iterator __pos, _ForwardIterator __first, _ForwardIterator __last, size_type __n); void _M_destroy_data_aux(iterator __first, iterator __last); template<typename _Alloc1> void _M_destroy_data(iterator __first, iterator __last, const _Alloc1&) ; void _M_destroy_data(iterator __first, iterator __last, const std::allocator<_Tp>&) ; void _M_erase_at_begin(iterator __pos) ; void _M_erase_at_end(iterator __pos) ; iterator _M_erase(iterator __pos); iterator _M_erase(iterator __first, iterator __last); void _M_default_append(size_type __n); bool _M_shrink_to_fit(); iterator _M_reserve_elements_at_front(size_type __n) ; iterator _M_reserve_elements_at_back(size_type __n) ; void _M_new_elements_at_front(size_type __new_elements); void _M_new_elements_at_back(size_type __new_elements); void _M_reserve_map_at_back(size_type __nodes_to_add = 1) ; void _M_reserve_map_at_front(size_type __nodes_to_add = 1) ; void _M_reallocate_map(size_type __nodes_to_add, bool __add_at_front); void _M_move_assign1(deque&& __x, true_type) noexcept ; void _M_move_assign1(deque&& __x, false_type) ; template<typename... _Args> void _M_replace_map(_Args&&... __args) ; void _M_move_assign2(deque&& __x, true_type) ; void _M_move_assign2(deque&& __x, false_type) ; }; 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>; template<typename _Tp, typename _Alloc> [[__nodiscard__]] bool operator==(const deque<_Tp, _Alloc>& __x, const deque<_Tp, _Alloc>& __y) ; template<typename _Tp, typename _Alloc> [[nodiscard]] __detail::__synth3way_t<_Tp> operator<=>(const deque<_Tp, _Alloc>& __x, const deque<_Tp, _Alloc>& __y) ; template<typename _Tp, typename _Alloc> void swap(deque<_Tp,_Alloc>& __x, deque<_Tp,_Alloc>& __y) noexcept(noexcept(__x.swap(__y))) ; template<class _Tp> struct __is_bitwise_relocatable<std::deque<_Tp>> : true_type { }; } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Tp, typename _VTp> void __fill_a1(const std::_Deque_iterator<_Tp, _Tp&, _Tp*>& __first, const std::_Deque_iterator<_Tp, _Tp&, _Tp*>& __last, const _VTp& __value) { typedef std::_Deque_iterator<_Tp, _Tp&, _Tp*> _Iter; if (__first._M_node != __last._M_node) { std::__fill_a1(__first._M_cur, __first._M_last, __value); for (typename _Iter::_Map_pointer __node = __first._M_node + 1; __node < __last._M_node; ++__node) std::__fill_a1(*__node, *__node + _Iter::_S_buffer_size(), __value); std::__fill_a1(__last._M_first, __last._M_cur, __value); } else std::__fill_a1(__first._M_cur, __last._M_cur, __value); } template<bool _IsMove, typename _Tp, typename _Ref, typename _Ptr, typename _OI> _OI __copy_move_dit(std::_Deque_iterator<_Tp, _Ref, _Ptr> __first, std::_Deque_iterator<_Tp, _Ref, _Ptr> __last, _OI __result) ; template<bool _IsMove, typename _Tp, typename _Ref, typename _Ptr, typename _OI> _OI __copy_move_a1(std::_Deque_iterator<_Tp, _Ref, _Ptr> __first, std::_Deque_iterator<_Tp, _Ref, _Ptr> __last, _OI __result) ; template<bool _IsMove, typename _ITp, typename _IRef, typename _IPtr, typename _OTp> std::_Deque_iterator<_OTp, _OTp&, _OTp*> __copy_move_a1(std::_Deque_iterator<_ITp, _IRef, _IPtr> __first, std::_Deque_iterator<_ITp, _IRef, _IPtr> __last, std::_Deque_iterator<_OTp, _OTp&, _OTp*> __result) ; template<bool _IsMove, typename _II, typename _Tp> typename __gnu_cxx::__enable_if< __is_random_access_iter<_II>::__value, std::_Deque_iterator<_Tp, _Tp&, _Tp*> >::__type __copy_move_a1(_II __first, _II __last, std::_Deque_iterator<_Tp, _Tp&, _Tp*> __result) ; template<bool _IsMove, typename _CharT> typename __gnu_cxx::__enable_if< __is_char<_CharT>::__value, std::_Deque_iterator<_CharT, _CharT&, _CharT*> >::__type __copy_move_a2( istreambuf_iterator<_CharT, char_traits<_CharT> > __first, istreambuf_iterator<_CharT, char_traits<_CharT> > __last, std::_Deque_iterator<_CharT, _CharT&, _CharT*> __result) ; template<typename _CharT, typename _Size> typename __gnu_cxx::__enable_if< __is_char<_CharT>::__value, std::_Deque_iterator<_CharT, _CharT&, _CharT*> >::__type __copy_n_a( istreambuf_iterator<_CharT, char_traits<_CharT> > __it, _Size __size, std::_Deque_iterator<_CharT, _CharT&, _CharT*> __result, bool __strict) ; template<bool _IsMove, typename _Tp, typename _Ref, typename _Ptr, typename _OI> _OI __copy_move_backward_dit( std::_Deque_iterator<_Tp, _Ref, _Ptr> __first, std::_Deque_iterator<_Tp, _Ref, _Ptr> __last, _OI __result) ; template<bool _IsMove, typename _Tp, typename _Ref, typename _Ptr, typename _OI> _OI __copy_move_backward_a1( std::_Deque_iterator<_Tp, _Ref, _Ptr> __first, std::_Deque_iterator<_Tp, _Ref, _Ptr> __last, _OI __result) ; template<bool _IsMove, typename _ITp, typename _IRef, typename _IPtr, typename _OTp> std::_Deque_iterator<_OTp, _OTp&, _OTp*> __copy_move_backward_a1( std::_Deque_iterator<_ITp, _IRef, _IPtr> __first, std::_Deque_iterator<_ITp, _IRef, _IPtr> __last, std::_Deque_iterator<_OTp, _OTp&, _OTp*> __result) ; template<bool _IsMove, typename _II, typename _Tp> typename __gnu_cxx::__enable_if< __is_random_access_iter<_II>::__value, std::_Deque_iterator<_Tp, _Tp&, _Tp*> >::__type __copy_move_backward_a1(_II __first, _II __last, std::_Deque_iterator<_Tp, _Tp&, _Tp*> __result) ; template<typename _Tp, typename _Ref, typename _Ptr, typename _II> bool __equal_dit( const std::_Deque_iterator<_Tp, _Ref, _Ptr>& __first1, const std::_Deque_iterator<_Tp, _Ref, _Ptr>& __last1, _II __first2) ; template<typename _Tp, typename _Ref, typename _Ptr, typename _II> typename __gnu_cxx::__enable_if< __is_random_access_iter<_II>::__value, bool>::__type __equal_aux1(std::_Deque_iterator<_Tp, _Ref, _Ptr> __first1, std::_Deque_iterator<_Tp, _Ref, _Ptr> __last1, _II __first2) ; template<typename _Tp1, typename _Ref1, typename _Ptr1, typename _Tp2, typename _Ref2, typename _Ptr2> bool __equal_aux1(std::_Deque_iterator<_Tp1, _Ref1, _Ptr1> __first1, std::_Deque_iterator<_Tp1, _Ref1, _Ptr1> __last1, std::_Deque_iterator<_Tp2, _Ref2, _Ptr2> __first2) ; template<typename _II, typename _Tp, typename _Ref, typename _Ptr> typename __gnu_cxx::__enable_if< __is_random_access_iter<_II>::__value, bool>::__type __equal_aux1(_II __first1, _II __last1, std::_Deque_iterator<_Tp, _Ref, _Ptr> __first2) ; template<typename _Tp1, typename _Ref, typename _Ptr, typename _Tp2> int __lex_cmp_dit( std::_Deque_iterator<_Tp1, _Ref, _Ptr> __first1, std::_Deque_iterator<_Tp1, _Ref, _Ptr> __last1, const _Tp2* __first2, const _Tp2* __last2) ; template<typename _Tp1, typename _Ref1, typename _Ptr1, typename _Tp2> bool __lexicographical_compare_aux1( std::_Deque_iterator<_Tp1, _Ref1, _Ptr1> __first1, std::_Deque_iterator<_Tp1, _Ref1, _Ptr1> __last1, _Tp2* __first2, _Tp2* __last2) ; template<typename _Tp1, typename _Tp2, typename _Ref2, typename _Ptr2> bool __lexicographical_compare_aux1(_Tp1* __first1, _Tp1* __last1, std::_Deque_iterator<_Tp2, _Ref2, _Ptr2> __first2, std::_Deque_iterator<_Tp2, _Ref2, _Ptr2> __last2) ; template<typename _Tp1, typename _Ref1, typename _Ptr1, typename _Tp2, typename _Ref2, typename _Ptr2> bool __lexicographical_compare_aux1( std::_Deque_iterator<_Tp1, _Ref1, _Ptr1> __first1, std::_Deque_iterator<_Tp1, _Ref1, _Ptr1> __last1, std::_Deque_iterator<_Tp2, _Ref2, _Ptr2> __first2, std::_Deque_iterator<_Tp2, _Ref2, _Ptr2> __last2) ; } namespace std __attribute__ ((__visibility__ ("default"))) { namespace pmr { template<typename _Tp> using deque = std::deque<_Tp, polymorphic_allocator<_Tp>>; } } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Tp, typename _Alloc, typename _Predicate> typename deque<_Tp, _Alloc>::size_type erase_if(deque<_Tp, _Alloc>& __cont, _Predicate __pred) ; template<typename _Tp, typename _Alloc, typename _Up> typename deque<_Tp, _Alloc>::size_type erase(deque<_Tp, _Alloc>& __cont, const _Up& __value) ; } namespace std __attribute__ ((__visibility__ ("default"))) { class bad_function_call : public std::exception { public: virtual ~bad_function_call() noexcept; const char* what() const noexcept; }; template<typename _Tp> struct __is_location_invariant : is_trivially_copyable<_Tp>::type { }; class _Undefined_class; union _Nocopy_types { void* _M_object; const void* _M_const_object; void (*_M_function_pointer)(); void (_Undefined_class::*_M_member_pointer)(); }; union [[gnu::may_alias]] _Any_data { void* _M_access() noexcept ; const void* _M_access() const noexcept ; template<typename _Tp> _Tp& _M_access() noexcept ; template<typename _Tp> const _Tp& _M_access() const noexcept ; _Nocopy_types _M_unused; char _M_pod_data[sizeof(_Nocopy_types)]; }; enum _Manager_operation { __get_type_info, __get_functor_ptr, __clone_functor, __destroy_functor }; template<typename _Signature> class function; class _Function_base { public: static const size_t _M_max_size = sizeof(_Nocopy_types); static const size_t _M_max_align = __alignof__(_Nocopy_types); template<typename _Functor> class _Base_manager { protected: static const bool __stored_locally = (__is_location_invariant<_Functor>::value && sizeof(_Functor) <= _M_max_size && __alignof__(_Functor) <= _M_max_align && (_M_max_align % __alignof__(_Functor) == 0)); using _Local_storage = integral_constant<bool, __stored_locally>; static _Functor* _M_get_pointer(const _Any_data& __source) noexcept ; private: template<typename _Fn> static void _M_create(_Any_data& __dest, _Fn&& __f, true_type) ; template<typename _Fn> static void _M_create(_Any_data& __dest, _Fn&& __f, false_type) ; static void _M_destroy(_Any_data& __victim, true_type) ; static void _M_destroy(_Any_data& __victim, false_type) ; public: static bool _M_manager(_Any_data& __dest, const _Any_data& __source, _Manager_operation __op) ; template<typename _Fn> static void _M_init_functor(_Any_data& __functor, _Fn&& __f) noexcept(__and_<_Local_storage, is_nothrow_constructible<_Functor, _Fn>>::value) ; template<typename _Signature> static bool _M_not_empty_function(const function<_Signature>& __f) noexcept ; template<typename _Tp> static bool _M_not_empty_function(_Tp* __fp) noexcept ; template<typename _Class, typename _Tp> static bool _M_not_empty_function(_Tp _Class::* __mp) noexcept ; template<typename _Tp> static bool _M_not_empty_function(const _Tp&) noexcept ; }; _Function_base() = default; ~_Function_base() ; bool _M_empty() const ; using _Manager_type = bool (*)(_Any_data&, const _Any_data&, _Manager_operation); _Any_data _M_functor{}; _Manager_type _M_manager{}; }; template<typename _Signature, typename _Functor> class _Function_handler; template<typename _Res, typename _Functor, typename... _ArgTypes> class _Function_handler<_Res(_ArgTypes...), _Functor> : public _Function_base::_Base_manager<_Functor> { using _Base = _Function_base::_Base_manager<_Functor>; public: static bool _M_manager(_Any_data& __dest, const _Any_data& __source, _Manager_operation __op) ; static _Res _M_invoke(const _Any_data& __functor, _ArgTypes&&... __args) { return std::__invoke_r<_Res>(*_Base::_M_get_pointer(__functor), std::forward<_ArgTypes>(__args)...); } template<typename _Fn> static constexpr bool _S_nothrow_init() noexcept { return __and_<typename _Base::_Local_storage, is_nothrow_constructible<_Functor, _Fn>>::value; } }; template<> class _Function_handler<void, void> { public: static bool _M_manager(_Any_data&, const _Any_data&, _Manager_operation) ; }; template<typename _Signature, typename _Functor, bool __valid = is_object<_Functor>::value> struct _Target_handler : _Function_handler<_Signature, typename remove_cv<_Functor>::type> { }; template<typename _Signature, typename _Functor> struct _Target_handler<_Signature, _Functor, false> : _Function_handler<void, void> { }; template<typename _Res, typename... _ArgTypes> class function<_Res(_ArgTypes...)> : public _Maybe_unary_or_binary_function<_Res, _ArgTypes...>, private _Function_base { template<typename _Func, bool _Self = is_same<__remove_cvref_t<_Func>, function>::value> using _Decay_t = typename __enable_if_t<!_Self, decay<_Func>>::type; template<typename _Func, typename _DFunc = _Decay_t<_Func>, typename _Res2 = __invoke_result<_DFunc&, _ArgTypes...>> struct _Callable : __is_invocable_impl<_Res2, _Res>::type { }; template<typename _Cond, typename _Tp = void> using _Requires = __enable_if_t<_Cond::value, _Tp>; template<typename _Functor> using _Handler = _Function_handler<_Res(_ArgTypes...), __decay_t<_Functor>>; public: typedef _Res result_type; function() ; function(nullptr_t) ; function(const function& __x) ; function(function&& __x) ; template<typename _Functor, typename _Constraints = _Requires<_Callable<_Functor>>> function(_Functor&& __f) noexcept(_Handler<_Functor>::template _S_nothrow_init<_Functor>()) ; function& operator=(const function& __x) ; function& operator=(function&& __x) noexcept ; function& operator=(nullptr_t) noexcept ; template<typename _Functor> _Requires<_Callable<_Functor>, function&> operator=(_Functor&& __f) noexcept(_Handler<_Functor>::template _S_nothrow_init<_Functor>()) ; template<typename _Functor> function& operator=(reference_wrapper<_Functor> __f) noexcept ; void swap(function& __x) noexcept ; explicit operator bool() const noexcept ; _Res operator()(_ArgTypes... __args) const ; const type_info& target_type() const noexcept ; template<typename _Functor> _Functor* target() noexcept ; template<typename _Functor> const _Functor* target() const noexcept ; private: using _Invoker_type = _Res (*)(const _Any_data&, _ArgTypes&&...); _Invoker_type _M_invoker = nullptr; }; template<typename> struct __function_guide_helper { }; template<typename _Res, typename _Tp, bool _Nx, typename... _Args> struct __function_guide_helper< _Res (_Tp::*) (_Args...) noexcept(_Nx) > { using type = _Res(_Args...); }; template<typename _Res, typename _Tp, bool _Nx, typename... _Args> struct __function_guide_helper< _Res (_Tp::*) (_Args...) & noexcept(_Nx) > { using type = _Res(_Args...); }; template<typename _Res, typename _Tp, bool _Nx, typename... _Args> struct __function_guide_helper< _Res (_Tp::*) (_Args...) const noexcept(_Nx) > { using type = _Res(_Args...); }; template<typename _Res, typename _Tp, bool _Nx, typename... _Args> struct __function_guide_helper< _Res (_Tp::*) (_Args...) const & noexcept(_Nx) > { using type = _Res(_Args...); }; template<typename _Fn, typename _Op> using __function_guide_t = typename __function_guide_helper<_Op>::type; template<typename _Res, typename... _ArgTypes> function(_Res(*)(_ArgTypes...)) -> function<_Res(_ArgTypes...)>; template<typename _Fn, typename _Signature = __function_guide_t<_Fn, decltype(&_Fn::operator())>> function(_Fn) -> function<_Signature>; template<typename _Res, typename... _Args> bool operator==(const function<_Res(_Args...)>& __f, nullptr_t) noexcept ; template<typename _Res, typename... _Args> void swap(function<_Res(_Args...)>& __x, function<_Res(_Args...)>& __y) noexcept ; namespace __detail::__variant { template<typename> struct _Never_valueless_alt; template<typename _Signature> struct _Never_valueless_alt<std::function<_Signature>> : std::true_type { }; } } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _Hash, typename _RangeHash, typename _Unused, typename _RehashPolicy, typename _Traits> class _Hashtable; namespace __detail { template<typename _Key, typename _Value, typename _ExtractKey, typename _Equal, typename _Hash, typename _RangeHash, typename _Unused, typename _Traits> struct _Hashtable_base; template<typename _Iterator> typename std::iterator_traits<_Iterator>::difference_type __distance_fw(_Iterator __first, _Iterator __last, std::input_iterator_tag) ; template<typename _Iterator> typename std::iterator_traits<_Iterator>::difference_type __distance_fw(_Iterator __first, _Iterator __last, std::forward_iterator_tag) ; template<typename _Iterator> typename std::iterator_traits<_Iterator>::difference_type __distance_fw(_Iterator __first, _Iterator __last) ; struct _Identity { template<typename _Tp> _Tp&& operator()(_Tp&& __x) const noexcept ; }; struct _Select1st { template<typename _Pair> struct __1st_type; template<typename _Tp, typename _Up> struct __1st_type<pair<_Tp, _Up>> { using type = _Tp; }; template<typename _Tp, typename _Up> struct __1st_type<const pair<_Tp, _Up>> { using type = const _Tp; }; template<typename _Pair> struct __1st_type<_Pair&> { using type = typename __1st_type<_Pair>::type&; }; template<typename _Tp> typename __1st_type<_Tp>::type&& operator()(_Tp&& __x) const noexcept ; }; template<typename _ExKey, typename _Value> struct _ConvertToValueType; template<typename _Value> struct _ConvertToValueType<_Identity, _Value> { template<typename _Kt> constexpr _Kt&& operator()(_Kt&& __k) const noexcept ; }; template<typename _Value> struct _ConvertToValueType<_Select1st, _Value> { constexpr _Value&& operator()(_Value&& __x) const noexcept ; constexpr const _Value& operator()(const _Value& __x) const noexcept ; template<typename _Kt, typename _Val> constexpr std::pair<_Kt, _Val>&& operator()(std::pair<_Kt, _Val>&& __x) const noexcept ; template<typename _Kt, typename _Val> constexpr const std::pair<_Kt, _Val>& operator()(const std::pair<_Kt, _Val>& __x) const noexcept ; }; template<typename _ExKey> struct _NodeBuilder; template<> struct _NodeBuilder<_Select1st> { template<typename _Kt, typename _Arg, typename _NodeGenerator> static auto _S_build(_Kt&& __k, _Arg&& __arg, const _NodeGenerator& __node_gen) -> typename _NodeGenerator::__node_type* ; }; template<> struct _NodeBuilder<_Identity> { template<typename _Kt, typename _Arg, typename _NodeGenerator> static auto _S_build(_Kt&& __k, _Arg&&, const _NodeGenerator& __node_gen) -> typename _NodeGenerator::__node_type* ; }; template<typename _NodeAlloc> struct _Hashtable_alloc; 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; public: using __node_type = typename __hashtable_alloc::__node_type; _ReuseOrAllocNode(__node_type* __nodes, __hashtable_alloc& __h) ; _ReuseOrAllocNode(const _ReuseOrAllocNode&) = delete; ~_ReuseOrAllocNode() ; template<typename... _Args> __node_type* operator()(_Args&&... __args) const ; private: mutable __node_type* _M_nodes; __hashtable_alloc& _M_h; }; template<typename _NodeAlloc> struct _AllocNode { private: using __hashtable_alloc = _Hashtable_alloc<_NodeAlloc>; public: using __node_type = typename __hashtable_alloc::__node_type; _AllocNode(__hashtable_alloc& __h) ; template<typename... _Args> __node_type* operator()(_Args&&... __args) const ; private: __hashtable_alloc& _M_h; }; 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>; }; template<typename _Hash> struct _Hashtable_hash_traits { static constexpr std::size_t __small_size_threshold() noexcept ; }; struct _Hash_node_base { _Hash_node_base* _M_nxt; _Hash_node_base() ; _Hash_node_base(_Hash_node_base* __next) ; }; template<typename _Value> struct _Hash_node_value_base { typedef _Value value_type; __gnu_cxx::__aligned_buffer<_Value> _M_storage; [[__gnu__::__always_inline__]] _Value* _M_valptr() noexcept ; [[__gnu__::__always_inline__]] const _Value* _M_valptr() const noexcept ; [[__gnu__::__always_inline__]] _Value& _M_v() noexcept ; [[__gnu__::__always_inline__]] const _Value& _M_v() const noexcept ; }; template<bool _Cache_hash_code> struct _Hash_node_code_cache { }; template<> struct _Hash_node_code_cache<true> { std::size_t _M_hash_code; }; template<typename _Value, bool _Cache_hash_code> struct _Hash_node_value : _Hash_node_value_base<_Value> , _Hash_node_code_cache<_Cache_hash_code> { }; template<typename _Value, bool _Cache_hash_code> struct _Hash_node : _Hash_node_base , _Hash_node_value<_Value, _Cache_hash_code> { _Hash_node* _M_next() const noexcept ; }; 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_iterator_base(__node_type* __p) ; void _M_incr() noexcept ; friend bool operator==(const _Node_iterator_base& __x, const _Node_iterator_base& __y) noexcept ; }; 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: using value_type = _Value; using difference_type = std::ptrdiff_t; using iterator_category = std::forward_iterator_tag; using pointer = __conditional_t<__constant_iterators, const value_type*, value_type*>; using reference = __conditional_t<__constant_iterators, const value_type&, value_type&>; _Node_iterator() = default; explicit _Node_iterator(__node_type* __p) ; reference operator*() const noexcept ; pointer operator->() const noexcept ; _Node_iterator& operator++() noexcept ; _Node_iterator operator++(int) noexcept ; }; 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_type* pointer; typedef const value_type& reference; _Node_const_iterator() = default; explicit _Node_const_iterator(__node_type* __p) ; _Node_const_iterator(const _Node_iterator<_Value, __constant_iterators, __cache>& __x) ; reference operator*() const noexcept ; pointer operator->() const noexcept ; _Node_const_iterator& operator++() noexcept ; _Node_const_iterator operator++(int) noexcept ; }; 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 ; }; struct _Default_ranged_hash { }; struct _Prime_rehash_policy { using __has_load_factor = true_type; _Prime_rehash_policy(float __z = 1.0) ; float max_load_factor() const noexcept ; std::size_t _M_next_bkt(std::size_t __n) const; std::size_t _M_bkt_for_elements(std::size_t __n) const ; 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 ; void _M_reset() noexcept ; void _M_reset(_State __state) ; static const std::size_t _S_growth_factor = 2; float _M_max_load_factor; mutable std::size_t _M_next_resize; }; 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 ; }; std::size_t __clp2(std::size_t __n) noexcept ; struct _Power2_rehash_policy { using __has_load_factor = true_type; _Power2_rehash_policy(float __z = 1.0) ; float max_load_factor() const noexcept ; std::size_t _M_next_bkt(std::size_t __n) noexcept ; std::size_t _M_bkt_for_elements(std::size_t __n) const noexcept ; 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 ; typedef std::size_t _State; _State _M_state() const noexcept ; void _M_reset() noexcept ; void _M_reset(_State __state) noexcept ; static const std::size_t _S_growth_factor = 2; float _M_max_load_factor; std::size_t _M_next_resize; }; template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _Hash, typename _RangeHash, typename _Unused, typename _RehashPolicy, typename _Traits, bool _Unique_keys = _Traits::__unique_keys::value> struct _Map_base { }; template<typename _Key, typename _Val, typename _Alloc, typename _Equal, typename _Hash, typename _RangeHash, typename _Unused, typename _RehashPolicy, typename _Traits> struct _Map_base<_Key, pair<const _Key, _Val>, _Alloc, _Select1st, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits, false> { using mapped_type = _Val; }; template<typename _Key, typename _Val, typename _Alloc, typename _Equal, typename _Hash, typename _RangeHash, typename _Unused, typename _RehashPolicy, typename _Traits> struct _Map_base<_Key, pair<const _Key, _Val>, _Alloc, _Select1st, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits, true> { private: using __hashtable_base = _Hashtable_base<_Key, pair<const _Key, _Val>, _Select1st, _Equal, _Hash, _RangeHash, _Unused, _Traits>; using __hashtable = _Hashtable<_Key, pair<const _Key, _Val>, _Alloc, _Select1st, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>; using __hash_code = typename __hashtable_base::__hash_code; public: using key_type = typename __hashtable_base::key_type; using mapped_type = _Val; mapped_type& operator[](const key_type& __k); mapped_type& operator[](key_type&& __k); mapped_type& at(const key_type& __k) ; const mapped_type& at(const key_type& __k) const ; }; template<typename _Key, typename _Val, typename _Alloc, typename _Equal, typename _Hash, typename _RangeHash, typename _Unused, typename _RehashPolicy, typename _Traits, bool __uniq> struct _Map_base<const _Key, pair<const _Key, _Val>, _Alloc, _Select1st, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits, __uniq> : _Map_base<_Key, pair<const _Key, _Val>, _Alloc, _Select1st, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits, __uniq> { }; template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _Hash, typename _RangeHash, typename _Unused, typename _RehashPolicy, typename _Traits> struct _Insert_base { protected: using __hashtable_base = _Hashtable_base<_Key, _Value, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _Traits>; using __hashtable = _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>; using __hash_cached = typename _Traits::__hash_cached; using __constant_iterators = typename _Traits::__constant_iterators; using __hashtable_alloc = _Hashtable_alloc< __alloc_rebind<_Alloc, _Hash_node<_Value, __hash_cached::value>>>; using value_type = typename __hashtable_base::value_type; using size_type = typename __hashtable_base::size_type; using __unique_keys = typename _Traits::__unique_keys; using __node_alloc_type = typename __hashtable_alloc::__node_alloc_type; using __node_gen_type = _AllocNode<__node_alloc_type>; __hashtable& _M_conjure_hashtable() ; template<typename _InputIterator, typename _NodeGetter> void _M_insert_range(_InputIterator __first, _InputIterator __last, const _NodeGetter&, true_type __uks); template<typename _InputIterator, typename _NodeGetter> void _M_insert_range(_InputIterator __first, _InputIterator __last, const _NodeGetter&, false_type __uks); public: using iterator = _Node_iterator<_Value, __constant_iterators::value, __hash_cached::value>; using const_iterator = _Node_const_iterator<_Value, __constant_iterators::value, __hash_cached::value>; using __ireturn_type = __conditional_t<__unique_keys::value, std::pair<iterator, bool>, iterator>; __ireturn_type insert(const value_type& __v) ; iterator insert(const_iterator __hint, const value_type& __v) ; template<typename _KType, typename... _Args> std::pair<iterator, bool> try_emplace(const_iterator, _KType&& __k, _Args&&... __args) ; void insert(initializer_list<value_type> __l) ; template<typename _InputIterator> void insert(_InputIterator __first, _InputIterator __last) ; }; template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _Hash, typename _RangeHash, typename _Unused, typename _RehashPolicy, typename _Traits, bool _Constant_iterators = _Traits::__constant_iterators::value> struct _Insert; template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _Hash, typename _RangeHash, typename _Unused, typename _RehashPolicy, typename _Traits> struct _Insert<_Key, _Value, _Alloc, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits, true> : public _Insert_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits> { using __base_type = _Insert_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _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 __ireturn_type = typename __base_type::__ireturn_type; using __unique_keys = typename __base_type::__unique_keys; 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) ; iterator insert(const_iterator __hint, value_type&& __v) ; }; template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _Hash, typename _RangeHash, typename _Unused, typename _RehashPolicy, typename _Traits> struct _Insert<_Key, _Value, _Alloc, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits, false> : public _Insert_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits> { using __base_type = _Insert_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _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) ; template<typename _Pair, typename = _IFconsp<_Pair>> iterator insert(const_iterator __hint, _Pair&& __v) ; }; template<typename _Policy> using __has_load_factor = typename _Policy::__has_load_factor; template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _Hash, typename _RangeHash, typename _Unused, typename _RehashPolicy, typename _Traits, typename = __detected_or_t<false_type, __has_load_factor, _RehashPolicy>> struct _Rehash_base; template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _Hash, typename _RangeHash, typename _Unused, typename _RehashPolicy, typename _Traits> struct _Rehash_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits, false_type > { }; template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _Hash, typename _RangeHash, typename _Unused, typename _RehashPolicy, typename _Traits> struct _Rehash_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits, true_type > { private: using __hashtable = _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>; public: float max_load_factor() const noexcept ; void max_load_factor(float __z) ; void reserve(std::size_t __n) ; }; template<int _Nm, typename _Tp, bool __use_ebo = !__is_final(_Tp) && __is_empty(_Tp)> struct _Hashtable_ebo_helper; template<int _Nm, typename _Tp> struct _Hashtable_ebo_helper<_Nm, _Tp, true> : private _Tp { _Hashtable_ebo_helper() noexcept(noexcept(_Tp())) ; template<typename _OtherTp> _Hashtable_ebo_helper(_OtherTp&& __tp) ; const _Tp& _M_cget() const ; _Tp& _M_get() ; }; template<int _Nm, typename _Tp> struct _Hashtable_ebo_helper<_Nm, _Tp, false> { _Hashtable_ebo_helper() = default; template<typename _OtherTp> _Hashtable_ebo_helper(_OtherTp&& __tp) ; const _Tp& _M_cget() const ; _Tp& _M_get() ; private: _Tp _M_tp{}; }; template<typename _Key, typename _Value, typename _ExtractKey, typename _Hash, typename _RangeHash, typename _Unused, bool __cache_hash_code> struct _Local_iterator_base; template<typename _Key, typename _Value, typename _ExtractKey, typename _Hash, typename _RangeHash, typename _Unused, bool __cache_hash_code> struct _Hash_code_base : private _Hashtable_ebo_helper<1, _Hash> { private: using __ebo_hash = _Hashtable_ebo_helper<1, _Hash>; friend struct _Local_iterator_base<_Key, _Value, _ExtractKey, _Hash, _RangeHash, _Unused, false>; public: typedef _Hash hasher; hasher hash_function() const ; protected: typedef std::size_t __hash_code; _Hash_code_base() = default; _Hash_code_base(const _Hash& __hash) ; __hash_code _M_hash_code(const _Key& __k) const ; template<typename _Kt> __hash_code _M_hash_code_tr(const _Kt& __k) const ; __hash_code _M_hash_code(const _Hash_node_value<_Value, false>& __n) const ; __hash_code _M_hash_code(const _Hash_node_value<_Value, true>& __n) const ; std::size_t _M_bucket_index(__hash_code __c, std::size_t __bkt_count) const ; std::size_t _M_bucket_index(const _Hash_node_value<_Value, false>& __n, std::size_t __bkt_count) const noexcept( noexcept(declval<const _Hash&>()(declval<const _Key&>())) && noexcept(declval<const _RangeHash&>()((__hash_code)0, (std::size_t)0)) ) ; std::size_t _M_bucket_index(const _Hash_node_value<_Value, true>& __n, std::size_t __bkt_count) const noexcept( noexcept(declval<const _RangeHash&>()((__hash_code)0, (std::size_t)0)) ) ; void _M_store_code(_Hash_node_code_cache<false>&, __hash_code) const ; void _M_copy_code(_Hash_node_code_cache<false>&, const _Hash_node_code_cache<false>&) const ; void _M_store_code(_Hash_node_code_cache<true>& __n, __hash_code __c) const ; void _M_copy_code(_Hash_node_code_cache<true>& __to, const _Hash_node_code_cache<true>& __from) const ; void _M_swap(_Hash_code_base& __x) ; const _Hash& _M_hash() const ; }; template<typename _Key, typename _Value, typename _ExtractKey, typename _Hash, typename _RangeHash, typename _Unused> struct _Local_iterator_base<_Key, _Value, _ExtractKey, _Hash, _RangeHash, _Unused, true> : public _Node_iterator_base<_Value, true> { protected: using __base_node_iter = _Node_iterator_base<_Value, true>; using __hash_code_base = _Hash_code_base<_Key, _Value, _ExtractKey, _Hash, _RangeHash, _Unused, true>; _Local_iterator_base() = default; _Local_iterator_base(const __hash_code_base&, _Hash_node<_Value, true>* __p, std::size_t __bkt, std::size_t __bkt_count) ; void _M_incr() ; std::size_t _M_bucket; std::size_t _M_bucket_count; public: std::size_t _M_get_bucket() const ; }; template<typename _Tp, bool _IsEmpty = std::is_empty<_Tp>::value> struct _Hash_code_storage { __gnu_cxx::__aligned_buffer<_Tp> _M_storage; _Tp* _M_h() ; const _Tp* _M_h() const ; }; template<typename _Tp> struct _Hash_code_storage<_Tp, true> { static_assert( std::is_empty<_Tp>::value, "Type must be empty" ); _Tp* _M_h() ; const _Tp* _M_h() const ; }; template<typename _Key, typename _Value, typename _ExtractKey, typename _Hash, typename _RangeHash, typename _Unused> using __hash_code_for_local_iter = _Hash_code_storage<_Hash_code_base<_Key, _Value, _ExtractKey, _Hash, _RangeHash, _Unused, false>>; template<typename _Key, typename _Value, typename _ExtractKey, typename _Hash, typename _RangeHash, typename _Unused> struct _Local_iterator_base<_Key, _Value, _ExtractKey, _Hash, _RangeHash, _Unused, false> : __hash_code_for_local_iter<_Key, _Value, _ExtractKey, _Hash, _RangeHash, _Unused> , _Node_iterator_base<_Value, false> { protected: using __hash_code_base = _Hash_code_base<_Key, _Value, _ExtractKey, _Hash, _RangeHash, _Unused, false>; using __node_iter_base = _Node_iterator_base<_Value, false>; _Local_iterator_base() ; _Local_iterator_base(const __hash_code_base& __base, _Hash_node<_Value, false>* __p, std::size_t __bkt, std::size_t __bkt_count) ; ~_Local_iterator_base() ; _Local_iterator_base(const _Local_iterator_base& __iter) ; _Local_iterator_base& operator=(const _Local_iterator_base& __iter) ; void _M_incr() ; std::size_t _M_bucket; std::size_t _M_bucket_count; void _M_init(const __hash_code_base& __base) ; void _M_destroy() ; public: std::size_t _M_get_bucket() const ; }; template<typename _Key, typename _Value, typename _ExtractKey, typename _Hash, typename _RangeHash, typename _Unused, bool __constant_iterators, bool __cache> struct _Local_iterator : public _Local_iterator_base<_Key, _Value, _ExtractKey, _Hash, _RangeHash, _Unused, __cache> { private: using __base_type = _Local_iterator_base<_Key, _Value, _ExtractKey, _Hash, _RangeHash, _Unused, __cache>; using __hash_code_base = typename __base_type::__hash_code_base; public: using value_type = _Value; using pointer = __conditional_t<__constant_iterators, const value_type*, value_type*>; using reference = __conditional_t<__constant_iterators, const value_type&, value_type&>; using difference_type = ptrdiff_t; using iterator_category = forward_iterator_tag; _Local_iterator() = default; _Local_iterator(const __hash_code_base& __base, _Hash_node<_Value, __cache>* __n, std::size_t __bkt, std::size_t __bkt_count) ; reference operator*() const ; pointer operator->() const ; _Local_iterator& operator++() ; _Local_iterator operator++(int) ; }; template<typename _Key, typename _Value, typename _ExtractKey, typename _Hash, typename _RangeHash, typename _Unused, bool __constant_iterators, bool __cache> struct _Local_const_iterator : public _Local_iterator_base<_Key, _Value, _ExtractKey, _Hash, _RangeHash, _Unused, __cache> { private: using __base_type = _Local_iterator_base<_Key, _Value, _ExtractKey, _Hash, _RangeHash, _Unused, __cache>; using __hash_code_base = typename __base_type::__hash_code_base; public: typedef _Value value_type; typedef const value_type* pointer; typedef const value_type& 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>* __n, std::size_t __bkt, std::size_t __bkt_count) ; _Local_const_iterator(const _Local_iterator<_Key, _Value, _ExtractKey, _Hash, _RangeHash, _Unused, __constant_iterators, __cache>& __x) ; reference operator*() const ; pointer operator->() const ; _Local_const_iterator& operator++() ; _Local_const_iterator operator++(int) ; }; template<typename _Key, typename _Value, typename _ExtractKey, typename _Equal, typename _Hash, typename _RangeHash, typename _Unused, typename _Traits> struct _Hashtable_base : public _Hash_code_base<_Key, _Value, _ExtractKey, _Hash, _RangeHash, _Unused, _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 __hash_code_base = _Hash_code_base<_Key, _Value, _ExtractKey, _Hash, _RangeHash, _Unused, __hash_cached::value>; using __hash_code = typename __hash_code_base::__hash_code; private: using _EqualEBO = _Hashtable_ebo_helper<0, _Equal>; static bool _S_equals(__hash_code, const _Hash_node_code_cache<false>&) ; static bool _S_node_equals(const _Hash_node_code_cache<false>&, const _Hash_node_code_cache<false>&) ; static bool _S_equals(__hash_code __c, const _Hash_node_code_cache<true>& __n) ; static bool _S_node_equals(const _Hash_node_code_cache<true>& __lhn, const _Hash_node_code_cache<true>& __rhn) ; protected: _Hashtable_base() = default; _Hashtable_base(const _Hash& __hash, const _Equal& __eq) ; bool _M_key_equals(const _Key& __k, const _Hash_node_value<_Value, __hash_cached::value>& __n) const ; template<typename _Kt> bool _M_key_equals_tr(const _Kt& __k, const _Hash_node_value<_Value, __hash_cached::value>& __n) const ; bool _M_equals(const _Key& __k, __hash_code __c, const _Hash_node_value<_Value, __hash_cached::value>& __n) const ; template<typename _Kt> bool _M_equals_tr(const _Kt& __k, __hash_code __c, const _Hash_node_value<_Value, __hash_cached::value>& __n) const ; bool _M_node_equals( const _Hash_node_value<_Value, __hash_cached::value>& __lhn, const _Hash_node_value<_Value, __hash_cached::value>& __rhn) const ; void _M_swap(_Hashtable_base& __x) ; const _Equal& _M_eq() const ; }; template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _Hash, typename _RangeHash, typename _Unused, typename _RehashPolicy, typename _Traits, bool _Unique_keys = _Traits::__unique_keys::value> struct _Equality; template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _Hash, typename _RangeHash, typename _Unused, typename _RehashPolicy, typename _Traits> struct _Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits, true> { using __hashtable = _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>; bool _M_equal(const __hashtable&) const; }; template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _Hash, typename _RangeHash, typename _Unused, typename _RehashPolicy, typename _Traits> struct _Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits, false> { using __hashtable = _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>; bool _M_equal(const __hashtable&) const; }; template<typename _NodeAlloc> struct _Hashtable_alloc : private _Hashtable_ebo_helper<0, _NodeAlloc> { private: using __ebo_node_alloc = _Hashtable_ebo_helper<0, _NodeAlloc>; template<typename> struct __get_value_type; template<typename _Val, bool _Cache_hash_code> struct __get_value_type<_Hash_node<_Val, _Cache_hash_code>> { using type = _Val; }; public: using __node_type = typename _NodeAlloc::value_type; using __node_alloc_type = _NodeAlloc; using __node_alloc_traits = __gnu_cxx::__alloc_traits<__node_alloc_type>; using __value_alloc_traits = typename __node_alloc_traits::template rebind_traits<typename __get_value_type<__node_type>::type>; using __node_ptr = __node_type*; using __node_base = _Hash_node_base; using __node_base_ptr = __node_base*; using __buckets_alloc_type = __alloc_rebind<__node_alloc_type, __node_base_ptr>; using __buckets_alloc_traits = std::allocator_traits<__buckets_alloc_type>; using __buckets_ptr = __node_base_ptr*; _Hashtable_alloc() = default; _Hashtable_alloc(const _Hashtable_alloc&) = default; _Hashtable_alloc(_Hashtable_alloc&&) = default; template<typename _Alloc> _Hashtable_alloc(_Alloc&& __a) ; __node_alloc_type& _M_node_allocator() ; const __node_alloc_type& _M_node_allocator() const ; template<typename... _Args> __node_ptr _M_allocate_node(_Args&&... __args); void _M_deallocate_node(__node_ptr __n); void _M_deallocate_node_ptr(__node_ptr __n); void _M_deallocate_nodes(__node_ptr __n); __buckets_ptr _M_allocate_buckets(std::size_t __bkt_count); void _M_deallocate_buckets(__buckets_ptr, std::size_t __bkt_count); }; } } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Val, typename _NodeAlloc> class _Node_handle_common { using _AllocTraits = allocator_traits<_NodeAlloc>; public: using allocator_type = __alloc_rebind<_NodeAlloc, _Val>; allocator_type get_allocator() const noexcept ; explicit operator bool() const noexcept ; [[nodiscard]] bool empty() const noexcept ; protected: constexpr _Node_handle_common() ; ~_Node_handle_common() ; _Node_handle_common(_Node_handle_common&& __nh) ; _Node_handle_common& operator=(_Node_handle_common&& __nh) noexcept ; _Node_handle_common(typename _AllocTraits::pointer __ptr, const _NodeAlloc& __alloc) ; void _M_swap(_Node_handle_common& __nh) noexcept ; private: void _M_move(_Node_handle_common&& __nh) noexcept ; void _M_reset() noexcept ; protected: typename _AllocTraits::pointer _M_ptr; private: union _Optional_alloc { _Optional_alloc() ; ~_Optional_alloc() ; _Optional_alloc(_Optional_alloc&&) = delete; _Optional_alloc& operator=(_Optional_alloc&&) = delete; _Optional_alloc(const _NodeAlloc& __alloc) ; void operator=(_NodeAlloc&& __alloc) noexcept ; void swap(_Optional_alloc& __other) noexcept ; _NodeAlloc& operator*() noexcept ; _NodeAlloc release() noexcept ; struct _Empty { }; [[__no_unique_address__]] _Empty _M_empty; [[__no_unique_address__]] _NodeAlloc _M_alloc; }; [[__no_unique_address__]] _Optional_alloc _M_alloc; template<typename _Key2, typename _Value2, typename _KeyOfValue, typename _Compare, typename _ValueAlloc> friend class _Rb_tree; }; template<typename _Key, typename _Value, typename _NodeAlloc> class _Node_handle : public _Node_handle_common<_Value, _NodeAlloc> { public: constexpr _Node_handle() noexcept = default; ~_Node_handle() = default; _Node_handle(_Node_handle&&) noexcept = default; _Node_handle& operator=(_Node_handle&&) noexcept = default; using key_type = _Key; using mapped_type = typename _Value::second_type; key_type& key() const noexcept ; mapped_type& mapped() const noexcept ; void swap(_Node_handle& __nh) noexcept ; friend void swap(_Node_handle& __x, _Node_handle& __y) noexcept(noexcept(__x.swap(__y))) ; private: using _AllocTraits = allocator_traits<_NodeAlloc>; _Node_handle(typename _AllocTraits::pointer __ptr, const _NodeAlloc& __alloc) ; template<typename _Tp> using __pointer = __ptr_rebind<typename _AllocTraits::pointer, remove_reference_t<_Tp>>; __pointer<_Key> _M_pkey = nullptr; __pointer<typename _Value::second_type> _M_pmapped = nullptr; template<typename _Tp> __pointer<_Tp> _S_pointer_to(_Tp& __obj) ; const key_type& _M_key() const noexcept ; template<typename _Key2, typename _Value2, typename _KeyOfValue, typename _Compare, typename _ValueAlloc> friend class _Rb_tree; template<typename _Key2, typename _Value2, typename _ValueAlloc, typename _ExtractKey, typename _Equal, typename _Hash, typename _RangeHash, typename _Unused, typename _RehashPolicy, typename _Traits> friend class _Hashtable; }; template<typename _Value, typename _NodeAlloc> class _Node_handle<_Value, _Value, _NodeAlloc> : public _Node_handle_common<_Value, _NodeAlloc> { public: constexpr _Node_handle() noexcept = default; ~_Node_handle() = default; _Node_handle(_Node_handle&&) noexcept = default; _Node_handle& operator=(_Node_handle&&) noexcept = default; using value_type = _Value; value_type& value() const noexcept ; void swap(_Node_handle& __nh) noexcept ; friend void swap(_Node_handle& __x, _Node_handle& __y) noexcept(noexcept(__x.swap(__y))) ; private: using _AllocTraits = allocator_traits<_NodeAlloc>; _Node_handle(typename _AllocTraits::pointer __ptr, const _NodeAlloc& __alloc) ; const value_type& _M_key() const noexcept ; template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc> friend class _Rb_tree; template<typename _Key2, typename _Value2, typename _ValueAlloc, typename _ExtractKey, typename _Equal, typename _Hash, typename _RangeHash, typename _Unused, typename _RehashPolicy, typename _Traits> friend class _Hashtable; }; template<typename _Iterator, typename _NodeHandle> struct _Node_insert_return { _Iterator position = _Iterator(); bool inserted = false; _NodeHandle node; }; } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Tp, typename _Hash> using __cache_default = __not_<__and_< __is_fast_hash<_Hash>, __is_nothrow_invocable<const _Hash&, const _Tp&>>>; template<typename _Equal, typename _Hash, typename _Allocator> using _Hashtable_enable_default_ctor = _Enable_default_constructor<__and_<is_default_constructible<_Equal>, is_default_constructible<_Hash>, is_default_constructible<_Allocator>>{}, __detail::_Hash_node_base>; template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _Hash, typename _RangeHash, typename _Unused, typename _RehashPolicy, typename _Traits> class _Hashtable : public __detail::_Hashtable_base<_Key, _Value, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _Traits>, public __detail::_Map_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>, public __detail::_Insert<_Key, _Value, _Alloc, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>, public __detail::_Rehash_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>, public __detail::_Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>, private __detail::_Hashtable_alloc< __alloc_rebind<_Alloc, __detail::_Hash_node<_Value, _Traits::__hash_cached::value>>>, private _Hashtable_enable_default_ctor<_Equal, _Hash, _Alloc> { static_assert(is_same<typename remove_cv<_Value>::type, _Value>::value, "unordered container must have a non-const, non-volatile value_type"); static_assert(is_same<typename _Alloc::value_type, _Value>{}, "unordered container must have the same value_type as its allocator"); using __traits_type = _Traits; using __hash_cached = typename __traits_type::__hash_cached; using __constant_iterators = typename __traits_type::__constant_iterators; 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 __node_value_type = __detail::_Hash_node_value<_Value, __hash_cached::value>; using __node_ptr = typename __hashtable_alloc::__node_ptr; 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 __node_base_ptr = typename __hashtable_alloc::__node_base_ptr; using __buckets_ptr = typename __hashtable_alloc::__buckets_ptr; using __insert_base = __detail::_Insert<_Key, _Value, _Alloc, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>; using __enable_default_ctor = _Hashtable_enable_default_ctor<_Equal, _Hash, _Alloc>; public: typedef _Key key_type; typedef _Value value_type; typedef _Alloc allocator_type; typedef _Equal key_equal; 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; using iterator = typename __insert_base::iterator; using const_iterator = typename __insert_base::const_iterator; using local_iterator = __detail::_Local_iterator<key_type, _Value, _ExtractKey, _Hash, _RangeHash, _Unused, __constant_iterators::value, __hash_cached::value>; using const_local_iterator = __detail::_Local_const_iterator< key_type, _Value, _ExtractKey, _Hash, _RangeHash, _Unused, __constant_iterators::value, __hash_cached::value>; private: using __rehash_type = _RehashPolicy; using __rehash_state = typename __rehash_type::_State; using __unique_keys = typename __traits_type::__unique_keys; using __hashtable_base = __detail:: _Hashtable_base<_Key, _Value, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _Traits>; using __hash_code_base = typename __hashtable_base::__hash_code_base; using __hash_code = typename __hashtable_base::__hash_code; using __ireturn_type = typename __insert_base::__ireturn_type; using __map_base = __detail::_Map_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>; using __rehash_base = __detail::_Rehash_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>; using __eq_base = __detail::_Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>; using __reuse_or_alloc_node_gen_t = __detail::_ReuseOrAllocNode<__node_alloc_type>; using __alloc_node_gen_t = __detail::_AllocNode<__node_alloc_type>; using __node_builder_t = __detail::_NodeBuilder<_ExtractKey>; struct _Scoped_node { _Scoped_node(__node_ptr __n, __hashtable_alloc* __h) ; template<typename... _Args> _Scoped_node(__hashtable_alloc* __h, _Args&&... __args) ; ~_Scoped_node() ;; _Scoped_node(const _Scoped_node&) = delete; _Scoped_node& operator=(const _Scoped_node&) = delete; __hashtable_alloc* _M_h; __node_ptr _M_node; }; template<typename _Ht> static constexpr __conditional_t<std::is_lvalue_reference<_Ht>::value, const value_type&, value_type&&> __fwd_value_for(value_type& __val) noexcept ; struct __hash_code_base_access : __hash_code_base { using __hash_code_base::_M_bucket_index; }; static_assert(is_nothrow_default_constructible<_RangeHash>::value, "Functor used to map hash code to bucket index" " must be nothrow default constructible"); static_assert(noexcept( std::declval<const _RangeHash&>()((std::size_t)0, (std::size_t)0)), "Functor used to map hash code to bucket index must be" " noexcept"); static_assert(is_nothrow_default_constructible<_ExtractKey>::value, "_ExtractKey must be nothrow default constructible"); static_assert(noexcept( std::declval<const _ExtractKey&>()(std::declval<_Value>())), "_ExtractKey functor must be noexcept invocable"); template<typename _Keya, typename _Valuea, typename _Alloca, typename _ExtractKeya, typename _Equala, typename _Hasha, typename _RangeHasha, typename _Unuseda, typename _RehashPolicya, typename _Traitsa, bool _Unique_keysa> friend struct __detail::_Map_base; template<typename _Keya, typename _Valuea, typename _Alloca, typename _ExtractKeya, typename _Equala, typename _Hasha, typename _RangeHasha, typename _Unuseda, typename _RehashPolicya, typename _Traitsa> friend struct __detail::_Insert_base; template<typename _Keya, typename _Valuea, typename _Alloca, typename _ExtractKeya, typename _Equala, typename _Hasha, typename _RangeHasha, typename _Unuseda, typename _RehashPolicya, typename _Traitsa, bool _Constant_iteratorsa> friend struct __detail::_Insert; template<typename _Keya, typename _Valuea, typename _Alloca, typename _ExtractKeya, typename _Equala, typename _Hasha, typename _RangeHasha, typename _Unuseda, typename _RehashPolicya, typename _Traitsa, bool _Unique_keysa> friend struct __detail::_Equality; public: using size_type = typename __hashtable_base::size_type; using difference_type = typename __hashtable_base::difference_type; using node_type = _Node_handle<_Key, _Value, __node_alloc_type>; using insert_return_type = _Node_insert_return<iterator, node_type>; private: __buckets_ptr _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; __node_base_ptr _M_single_bucket = nullptr; void _M_update_bbegin() ; void _M_update_bbegin(__node_ptr __n) ; bool _M_uses_single_bucket(__buckets_ptr __bkts) const ; bool _M_uses_single_bucket() const ; static constexpr size_t __small_size_threshold() noexcept ; __hashtable_alloc& _M_base_alloc() ; __buckets_ptr _M_allocate_buckets(size_type __bkt_count) ; void _M_deallocate_buckets(__buckets_ptr __bkts, size_type __bkt_count) ; void _M_deallocate_buckets() ; __node_ptr _M_bucket_begin(size_type __bkt) const; __node_ptr _M_begin() const ; template<typename _Ht> void _M_assign_elements(_Ht&&); template<typename _Ht, typename _NodeGenerator> void _M_assign(_Ht&&, const _NodeGenerator&); void _M_move_assign(_Hashtable&&, true_type); void _M_move_assign(_Hashtable&&, false_type); void _M_reset() noexcept; _Hashtable(const _Hash& __h, const _Equal& __eq, const allocator_type& __a) ; template<bool _No_realloc = true> static constexpr bool _S_nothrow_move() ; _Hashtable(_Hashtable&& __ht, __node_alloc_type&& __a, true_type ) noexcept(_S_nothrow_move()); _Hashtable(_Hashtable&&, __node_alloc_type&&, false_type ); template<typename _InputIterator> _Hashtable(_InputIterator __first, _InputIterator __last, size_type __bkt_count_hint, const _Hash&, const _Equal&, const allocator_type&, true_type __uks); template<typename _InputIterator> _Hashtable(_InputIterator __first, _InputIterator __last, size_type __bkt_count_hint, const _Hash&, const _Equal&, const allocator_type&, false_type __uks); public: _Hashtable() = default; _Hashtable(const _Hashtable&); _Hashtable(const _Hashtable&, const allocator_type&); explicit _Hashtable(size_type __bkt_count_hint, const _Hash& __hf = _Hash(), const key_equal& __eql = key_equal(), const allocator_type& __a = allocator_type()); _Hashtable(_Hashtable&& __ht) noexcept(_S_nothrow_move()) ; _Hashtable(_Hashtable&& __ht, const allocator_type& __a) noexcept(_S_nothrow_move<__node_alloc_traits::_S_always_equal()>()) ; explicit _Hashtable(const allocator_type& __a) ; template<typename _InputIterator> _Hashtable(_InputIterator __f, _InputIterator __l, size_type __bkt_count_hint = 0, const _Hash& __hf = _Hash(), const key_equal& __eql = key_equal(), const allocator_type& __a = allocator_type()) ; _Hashtable(initializer_list<value_type> __l, size_type __bkt_count_hint = 0, const _Hash& __hf = _Hash(), const key_equal& __eql = key_equal(), const allocator_type& __a = allocator_type()) ; _Hashtable& operator=(const _Hashtable& __ht); _Hashtable& operator=(_Hashtable&& __ht) noexcept(__node_alloc_traits::_S_nothrow_move() && is_nothrow_move_assignable<_Hash>::value && is_nothrow_move_assignable<_Equal>::value) ; _Hashtable& operator=(initializer_list<value_type> __l) ; ~_Hashtable() noexcept; void swap(_Hashtable&) noexcept(__and_<__is_nothrow_swappable<_Hash>, __is_nothrow_swappable<_Equal>>::value); iterator begin() noexcept ; const_iterator begin() const noexcept ; iterator end() noexcept ; const_iterator end() const noexcept ; const_iterator cbegin() const noexcept ; const_iterator cend() const noexcept ; size_type size() const noexcept ; [[__nodiscard__]] bool empty() const noexcept ; allocator_type get_allocator() const noexcept ; size_type max_size() const noexcept ; key_equal key_eq() const ; size_type bucket_count() const noexcept ; size_type max_bucket_count() const noexcept ; size_type bucket_size(size_type __bkt) const ; size_type bucket(const key_type& __k) const ; local_iterator begin(size_type __bkt) ; local_iterator end(size_type __bkt) ; const_local_iterator begin(size_type __bkt) const ; const_local_iterator end(size_type __bkt) const ; const_local_iterator cbegin(size_type __bkt) const ; const_local_iterator cend(size_type __bkt) const ; float load_factor() const noexcept ; const _RehashPolicy& __rehash_policy() const ; void __rehash_policy(const _RehashPolicy& __pol) ; 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; template<typename _Kt, typename = __has_is_transparent_t<_Hash, _Kt>, typename = __has_is_transparent_t<_Equal, _Kt>> iterator _M_find_tr(const _Kt& __k); template<typename _Kt, typename = __has_is_transparent_t<_Hash, _Kt>, typename = __has_is_transparent_t<_Equal, _Kt>> const_iterator _M_find_tr(const _Kt& __k) const; template<typename _Kt, typename = __has_is_transparent_t<_Hash, _Kt>, typename = __has_is_transparent_t<_Equal, _Kt>> size_type _M_count_tr(const _Kt& __k) const; template<typename _Kt, typename = __has_is_transparent_t<_Hash, _Kt>, typename = __has_is_transparent_t<_Equal, _Kt>> pair<iterator, iterator> _M_equal_range_tr(const _Kt& __k); template<typename _Kt, typename = __has_is_transparent_t<_Hash, _Kt>, typename = __has_is_transparent_t<_Equal, _Kt>> pair<const_iterator, const_iterator> _M_equal_range_tr(const _Kt& __k) const; private: size_type _M_bucket_index(const __node_value_type& __n) const noexcept ; size_type _M_bucket_index(__hash_code __c) const ; __node_base_ptr _M_find_before_node(const key_type&); __node_base_ptr _M_find_before_node(size_type, const key_type&, __hash_code) const; template<typename _Kt> __node_base_ptr _M_find_before_node_tr(size_type, const _Kt&, __hash_code) const; __node_ptr _M_find_node(size_type __bkt, const key_type& __key, __hash_code __c) const ; template<typename _Kt> __node_ptr _M_find_node_tr(size_type __bkt, const _Kt& __key, __hash_code __c) const ; void _M_insert_bucket_begin(size_type, __node_ptr); void _M_remove_bucket_begin(size_type __bkt, __node_ptr __next_n, size_type __next_bkt); __node_base_ptr _M_get_previous_node(size_type __bkt, __node_ptr __n); pair<const_iterator, __hash_code> _M_compute_hash_code(const_iterator __hint, const key_type& __k) const; iterator _M_insert_unique_node(size_type __bkt, __hash_code, __node_ptr __n, size_type __n_elt = 1); iterator _M_insert_multi_node(__node_ptr __hint, __hash_code __code, __node_ptr __n); template<typename... _Args> std::pair<iterator, bool> _M_emplace(true_type __uks, _Args&&... __args); template<typename... _Args> iterator _M_emplace(false_type __uks, _Args&&... __args) ; template<typename... _Args> iterator _M_emplace(const_iterator, true_type __uks, _Args&&... __args) ; template<typename... _Args> iterator _M_emplace(const_iterator, false_type __uks, _Args&&... __args); template<typename _Kt, typename _Arg, typename _NodeGenerator> std::pair<iterator, bool> _M_insert_unique(_Kt&&, _Arg&&, const _NodeGenerator&); template<typename _Kt> static __conditional_t< __and_<__is_nothrow_invocable<_Hash&, const key_type&>, __not_<__is_nothrow_invocable<_Hash&, _Kt>>>::value, key_type, _Kt&&> _S_forward_key(_Kt&& __k) ; static const key_type& _S_forward_key(const key_type& __k) ; static key_type&& _S_forward_key(key_type&& __k) ; template<typename _Arg, typename _NodeGenerator> std::pair<iterator, bool> _M_insert_unique_aux(_Arg&& __arg, const _NodeGenerator& __node_gen) ; template<typename _Arg, typename _NodeGenerator> std::pair<iterator, bool> _M_insert(_Arg&& __arg, const _NodeGenerator& __node_gen, true_type ) ; template<typename _Arg, typename _NodeGenerator> iterator _M_insert(_Arg&& __arg, const _NodeGenerator& __node_gen, false_type __uks) ; template<typename _Arg, typename _NodeGenerator> iterator _M_insert(const_iterator, _Arg&& __arg, const _NodeGenerator& __node_gen, true_type __uks) ; template<typename _Arg, typename _NodeGenerator> iterator _M_insert(const_iterator, _Arg&&, const _NodeGenerator&, false_type __uks); size_type _M_erase(true_type __uks, const key_type&); size_type _M_erase(false_type __uks, const key_type&); iterator _M_erase(size_type __bkt, __node_base_ptr __prev_n, __node_ptr __n); public: template<typename... _Args> __ireturn_type emplace(_Args&&... __args) ; template<typename... _Args> iterator emplace_hint(const_iterator __hint, _Args&&... __args) ; iterator erase(const_iterator); iterator erase(iterator __it) ; size_type erase(const key_type& __k) ; iterator erase(const_iterator, const_iterator); void clear() noexcept; void rehash(size_type __bkt_count); insert_return_type _M_reinsert_node(node_type&& __nh) ; iterator _M_reinsert_node_multi(const_iterator __hint, node_type&& __nh) ; private: node_type _M_extract_node(size_t __bkt, __node_base_ptr __prev_n) ; template<typename _H2> __hash_code _M_src_hash_code(const _H2&, const key_type& __k, const __node_value_type& __src_n) const ; public: node_type extract(const_iterator __pos) ; node_type extract(const _Key& __k) ; template<typename _Compatible_Hashtable> void _M_merge_unique(_Compatible_Hashtable& __src) ; template<typename _Compatible_Hashtable> void _M_merge_multi(_Compatible_Hashtable& __src) ; private: void _M_rehash_aux(size_type __bkt_count, true_type __uks); void _M_rehash_aux(size_type __bkt_count, false_type __uks); void _M_rehash(size_type __bkt_count, const __rehash_state& __state); }; template<typename, typename, typename> class _Hash_merge_helper { }; template<typename _Hash> using _RequireNotAllocatorOrIntegral = __enable_if_t<!__or_<is_integral<_Hash>, __is_allocator<_Hash>>::value>; } namespace std __attribute__ ((__visibility__ ("default"))) { template<bool _Cache> using __umap_traits = __detail::_Hashtable_traits<_Cache, false, true>; template<typename _Key, typename _Tp, typename _Hash = hash<_Key>, typename _Pred = std::equal_to<_Key>, typename _Alloc = std::allocator<std::pair<const _Key, _Tp> >, typename _Tr = __umap_traits<__cache_default<_Key, _Hash>::value>> using __umap_hashtable = _Hashtable<_Key, std::pair<const _Key, _Tp>, _Alloc, __detail::_Select1st, _Pred, _Hash, __detail::_Mod_range_hashing, __detail::_Default_ranged_hash, __detail::_Prime_rehash_policy, _Tr>; template<bool _Cache> using __ummap_traits = __detail::_Hashtable_traits<_Cache, false, false>; template<typename _Key, typename _Tp, typename _Hash = hash<_Key>, typename _Pred = std::equal_to<_Key>, typename _Alloc = std::allocator<std::pair<const _Key, _Tp> >, typename _Tr = __ummap_traits<__cache_default<_Key, _Hash>::value>> using __ummap_hashtable = _Hashtable<_Key, std::pair<const _Key, _Tp>, _Alloc, __detail::_Select1st, _Pred, _Hash, __detail::_Mod_range_hashing, __detail::_Default_ranged_hash, __detail::_Prime_rehash_policy, _Tr>; template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> class unordered_multimap; template<typename _Key, typename _Tp, typename _Hash = hash<_Key>, typename _Pred = equal_to<_Key>, typename _Alloc = allocator<std::pair<const _Key, _Tp>>> class unordered_map { typedef __umap_hashtable<_Key, _Tp, _Hash, _Pred, _Alloc> _Hashtable; _Hashtable _M_h; public: typedef typename _Hashtable::key_type key_type; typedef typename _Hashtable::value_type value_type; typedef typename _Hashtable::mapped_type mapped_type; typedef typename _Hashtable::hasher hasher; typedef typename _Hashtable::key_equal key_equal; typedef typename _Hashtable::allocator_type allocator_type; 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; using node_type = typename _Hashtable::node_type; using insert_return_type = typename _Hashtable::insert_return_type; unordered_map() = default; explicit unordered_map(size_type __n, const hasher& __hf = hasher(), const key_equal& __eql = key_equal(), const allocator_type& __a = allocator_type()) ; template<typename _InputIterator> unordered_map(_InputIterator __first, _InputIterator __last, size_type __n = 0, const hasher& __hf = hasher(), const key_equal& __eql = key_equal(), const allocator_type& __a = allocator_type()) ; unordered_map(const unordered_map&) = default; unordered_map(unordered_map&&) = default; explicit unordered_map(const allocator_type& __a) ; unordered_map(const unordered_map& __umap, const allocator_type& __a) ; unordered_map(unordered_map&& __umap, const allocator_type& __a) noexcept( noexcept(_Hashtable(std::move(__umap._M_h), __a)) ) ; unordered_map(initializer_list<value_type> __l, size_type __n = 0, const hasher& __hf = hasher(), const key_equal& __eql = key_equal(), const allocator_type& __a = allocator_type()) ; unordered_map(size_type __n, const allocator_type& __a) ; unordered_map(size_type __n, const hasher& __hf, const allocator_type& __a) ; template<typename _InputIterator> unordered_map(_InputIterator __first, _InputIterator __last, size_type __n, const allocator_type& __a) ; template<typename _InputIterator> unordered_map(_InputIterator __first, _InputIterator __last, size_type __n, const hasher& __hf, const allocator_type& __a) ; unordered_map(initializer_list<value_type> __l, size_type __n, const allocator_type& __a) ; unordered_map(initializer_list<value_type> __l, size_type __n, const hasher& __hf, const allocator_type& __a) ; unordered_map& operator=(const unordered_map&) = default; unordered_map& operator=(unordered_map&&) = default; unordered_map& operator=(initializer_list<value_type> __l) ; allocator_type get_allocator() const noexcept ; [[__nodiscard__]] bool empty() const noexcept ; size_type size() const noexcept ; size_type max_size() const noexcept ; iterator begin() noexcept ; const_iterator begin() const noexcept ; const_iterator cbegin() const noexcept ; iterator end() noexcept ; const_iterator end() const noexcept ; const_iterator cend() const noexcept ; template<typename... _Args> std::pair<iterator, bool> emplace(_Args&&... __args) ; template<typename... _Args> iterator emplace_hint(const_iterator __pos, _Args&&... __args) ; node_type extract(const_iterator __pos) ; node_type extract(const key_type& __key) ; insert_return_type insert(node_type&& __nh) ; iterator insert(const_iterator, node_type&& __nh) ; template <typename... _Args> pair<iterator, bool> try_emplace(const key_type& __k, _Args&&... __args) ; template <typename... _Args> pair<iterator, bool> try_emplace(key_type&& __k, _Args&&... __args) ; template <typename... _Args> iterator try_emplace(const_iterator __hint, const key_type& __k, _Args&&... __args) ; template <typename... _Args> iterator try_emplace(const_iterator __hint, key_type&& __k, _Args&&... __args) ; std::pair<iterator, bool> insert(const value_type& __x) ; std::pair<iterator, bool> insert(value_type&& __x) ; template<typename _Pair> __enable_if_t<is_constructible<value_type, _Pair&&>::value, pair<iterator, bool>> insert(_Pair&& __x) ; iterator insert(const_iterator __hint, const value_type& __x) ; iterator insert(const_iterator __hint, value_type&& __x) ; template<typename _Pair> __enable_if_t<is_constructible<value_type, _Pair&&>::value, iterator> insert(const_iterator __hint, _Pair&& __x) ; template<typename _InputIterator> void insert(_InputIterator __first, _InputIterator __last) ; void insert(initializer_list<value_type> __l) ; template <typename _Obj> pair<iterator, bool> insert_or_assign(const key_type& __k, _Obj&& __obj) ; template <typename _Obj> pair<iterator, bool> insert_or_assign(key_type&& __k, _Obj&& __obj) ; template <typename _Obj> iterator insert_or_assign(const_iterator __hint, const key_type& __k, _Obj&& __obj) ; template <typename _Obj> iterator insert_or_assign(const_iterator __hint, key_type&& __k, _Obj&& __obj) ; iterator erase(const_iterator __position) ; iterator erase(iterator __position) ; size_type erase(const key_type& __x) ; iterator erase(const_iterator __first, const_iterator __last) ; void clear() noexcept ; void swap(unordered_map& __x) noexcept( noexcept(_M_h.swap(__x._M_h)) ) ; template<typename, typename, typename> friend class std::_Hash_merge_helper; template<typename _H2, typename _P2> void merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>& __source) ; template<typename _H2, typename _P2> void merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>&& __source) ; template<typename _H2, typename _P2> void merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>& __source) ; template<typename _H2, typename _P2> void merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>&& __source) ; hasher hash_function() const ; key_equal key_eq() const ; iterator find(const key_type& __x) ; template<typename _Kt> auto find(const _Kt& __x) -> decltype(_M_h._M_find_tr(__x)) ; const_iterator find(const key_type& __x) const ; template<typename _Kt> auto find(const _Kt& __x) const -> decltype(_M_h._M_find_tr(__x)) ; size_type count(const key_type& __x) const ; template<typename _Kt> auto count(const _Kt& __x) const -> decltype(_M_h._M_count_tr(__x)) ; bool contains(const key_type& __x) const ; template<typename _Kt> auto contains(const _Kt& __x) const -> decltype(_M_h._M_find_tr(__x), void(), true) ; std::pair<iterator, iterator> equal_range(const key_type& __x) ; template<typename _Kt> auto equal_range(const _Kt& __x) -> decltype(_M_h._M_equal_range_tr(__x)) ; std::pair<const_iterator, const_iterator> equal_range(const key_type& __x) const ; template<typename _Kt> auto equal_range(const _Kt& __x) const -> decltype(_M_h._M_equal_range_tr(__x)) ; mapped_type& operator[](const key_type& __k) ; mapped_type& operator[](key_type&& __k) ; mapped_type& at(const key_type& __k) ; const mapped_type& at(const key_type& __k) const ; size_type bucket_count() const noexcept ; size_type max_bucket_count() const noexcept ; size_type bucket_size(size_type __n) const ; size_type bucket(const key_type& __key) const ; local_iterator begin(size_type __n) ; const_local_iterator begin(size_type __n) const ; const_local_iterator cbegin(size_type __n) const ; local_iterator end(size_type __n) ; const_local_iterator end(size_type __n) const ; const_local_iterator cend(size_type __n) const ; float load_factor() const noexcept ; float max_load_factor() const noexcept ; void max_load_factor(float __z) ; void rehash(size_type __n) ; void reserve(size_type __n) ; ; }; template<typename _InputIterator, typename _Hash = hash<__iter_key_t<_InputIterator>>, typename _Pred = equal_to<__iter_key_t<_InputIterator>>, typename _Allocator = allocator<__iter_to_alloc_t<_InputIterator>>, typename = _RequireInputIter<_InputIterator>, typename = _RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireNotAllocator<_Pred>, typename = _RequireAllocator<_Allocator>> unordered_map(_InputIterator, _InputIterator, typename unordered_map<int, int>::size_type = {}, _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator()) -> unordered_map<__iter_key_t<_InputIterator>, __iter_val_t<_InputIterator>, _Hash, _Pred, _Allocator>; template<typename _Key, typename _Tp, typename _Hash = hash<_Key>, typename _Pred = equal_to<_Key>, typename _Allocator = allocator<pair<const _Key, _Tp>>, typename = _RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireNotAllocator<_Pred>, typename = _RequireAllocator<_Allocator>> unordered_map(initializer_list<pair<_Key, _Tp>>, typename unordered_map<int, int>::size_type = {}, _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator()) -> unordered_map<_Key, _Tp, _Hash, _Pred, _Allocator>; template<typename _InputIterator, typename _Allocator, typename = _RequireInputIter<_InputIterator>, typename = _RequireAllocator<_Allocator>> unordered_map(_InputIterator, _InputIterator, typename unordered_map<int, int>::size_type, _Allocator) -> unordered_map<__iter_key_t<_InputIterator>, __iter_val_t<_InputIterator>, hash<__iter_key_t<_InputIterator>>, equal_to<__iter_key_t<_InputIterator>>, _Allocator>; template<typename _InputIterator, typename _Allocator, typename = _RequireInputIter<_InputIterator>, typename = _RequireAllocator<_Allocator>> unordered_map(_InputIterator, _InputIterator, _Allocator) -> unordered_map<__iter_key_t<_InputIterator>, __iter_val_t<_InputIterator>, hash<__iter_key_t<_InputIterator>>, equal_to<__iter_key_t<_InputIterator>>, _Allocator>; ; ; ; ; template<typename _Key, typename _Tp, typename _Hash = hash<_Key>, typename _Pred = equal_to<_Key>, typename _Alloc = allocator<std::pair<const _Key, _Tp>>> class unordered_multimap { typedef __ummap_hashtable<_Key, _Tp, _Hash, _Pred, _Alloc> _Hashtable; _Hashtable _M_h; public: typedef typename _Hashtable::key_type key_type; typedef typename _Hashtable::value_type value_type; typedef typename _Hashtable::mapped_type mapped_type; typedef typename _Hashtable::hasher hasher; typedef typename _Hashtable::key_equal key_equal; typedef typename _Hashtable::allocator_type allocator_type; 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; using node_type = typename _Hashtable::node_type; ; ; ; [[__nodiscard__]] ; ; ; ; ; template<typename, typename, typename> friend class std::_Hash_merge_helper; ; ; ; ; ; ; ; ; ; ; ; }; ; ; ; ; ; ; ; ; ; ; ; template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> bool operator==(const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) ; template<typename _Key, typename _Val, typename _Hash1, typename _Eq1, typename _Alloc, typename _Hash2, typename _Eq2> struct _Hash_merge_helper< std::unordered_map<_Key, _Val, _Hash1, _Eq1, _Alloc>, _Hash2, _Eq2> { private: template<typename... _Tp> using unordered_map = std::unordered_map<_Tp...>; template<typename... _Tp> using unordered_multimap = std::unordered_multimap<_Tp...>; friend unordered_map<_Key, _Val, _Hash1, _Eq1, _Alloc>; static auto& _S_get_table(unordered_map<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map) ; static auto& _S_get_table(unordered_multimap<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map) ; }; template<typename _Key, typename _Val, typename _Hash1, typename _Eq1, typename _Alloc, typename _Hash2, typename _Eq2> struct _Hash_merge_helper< std::unordered_multimap<_Key, _Val, _Hash1, _Eq1, _Alloc>, _Hash2, _Eq2> { private: template<typename... _Tp> using unordered_map = std::unordered_map<_Tp...>; template<typename... _Tp> using unordered_multimap = std::unordered_multimap<_Tp...>; friend unordered_multimap<_Key, _Val, _Hash1, _Eq1, _Alloc>; static auto& _S_get_table(unordered_map<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map) ; static auto& _S_get_table(unordered_multimap<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map) ; }; } namespace std { namespace __detail { template<typename _Container, typename _UnsafeContainer, typename _Predicate> typename _Container::size_type __erase_nodes_if(_Container& __cont, _UnsafeContainer& __ucont, _Predicate __pred) ; } } namespace std __attribute__ ((__visibility__ ("default"))) { namespace pmr { template<typename _Key, typename _Tp, typename _Hash = std::hash<_Key>, typename _Pred = std::equal_to<_Key>> using unordered_map = std::unordered_map<_Key, _Tp, _Hash, _Pred, polymorphic_allocator<pair<const _Key, _Tp>>>; template<typename _Key, typename _Tp, typename _Hash = std::hash<_Key>, typename _Pred = std::equal_to<_Key>> using unordered_multimap = std::unordered_multimap<_Key, _Tp, _Hash, _Pred, polymorphic_allocator<pair<const _Key, _Tp>>>; } } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Key, typename _Tp, typename _Hash, typename _CPred, typename _Alloc, typename _Predicate> typename unordered_map<_Key, _Tp, _Hash, _CPred, _Alloc>::size_type erase_if(unordered_map<_Key, _Tp, _Hash, _CPred, _Alloc>& __cont, _Predicate __pred) ; template<typename _Key, typename _Tp, typename _Hash, typename _CPred, typename _Alloc, typename _Predicate> typename unordered_multimap<_Key, _Tp, _Hash, _CPred, _Alloc>:: size_type erase_if(unordered_multimap<_Key, _Tp, _Hash, _CPred, _Alloc>& __cont, _Predicate __pred) ; } namespace std __attribute__ ((__visibility__ ("default"))) { template<int _Num> struct _Placeholder { }; template<typename _Callable, typename... _Args> constexpr invoke_result_t<_Callable, _Args...> invoke(_Callable&& __fn, _Args&&... __args) noexcept(is_nothrow_invocable_v<_Callable, _Args...>) ; template<typename _MemFunPtr, bool __is_mem_fn = is_member_function_pointer<_MemFunPtr>::value> class _Mem_fn_base : public _Mem_fn_traits<_MemFunPtr>::__maybe_type { using _Traits = _Mem_fn_traits<_MemFunPtr>; using _Arity = typename _Traits::__arity; using _Varargs = typename _Traits::__vararg; template<typename _Func, typename... _BoundArgs> friend struct _Bind_check_arity; _MemFunPtr _M_pmf; public: using result_type = typename _Traits::__result_type; explicit constexpr _Mem_fn_base(_MemFunPtr __pmf) ; template<typename... _Args> constexpr auto operator()(_Args&&... __args) const noexcept(noexcept( std::__invoke(_M_pmf, std::forward<_Args>(__args)...))) -> decltype(std::__invoke(_M_pmf, std::forward<_Args>(__args)...)) ; }; template<typename _MemObjPtr> class _Mem_fn_base<_MemObjPtr, false> { using _Arity = integral_constant<size_t, 0>; using _Varargs = false_type; template<typename _Func, typename... _BoundArgs> friend struct _Bind_check_arity; _MemObjPtr _M_pm; public: explicit constexpr _Mem_fn_base(_MemObjPtr __pm) ; template<typename _Tp> constexpr auto operator()(_Tp&& __obj) const noexcept(noexcept(std::__invoke(_M_pm, std::forward<_Tp>(__obj)))) -> decltype(std::__invoke(_M_pm, std::forward<_Tp>(__obj))) ; }; template<typename _MemberPointer> struct _Mem_fn; template<typename _Res, typename _Class> struct _Mem_fn<_Res _Class::*> : _Mem_fn_base<_Res _Class::*> { using _Mem_fn_base<_Res _Class::*>::_Mem_fn_base; }; template<typename _Tp, typename _Class> constexpr _Mem_fn<_Tp _Class::*> mem_fn(_Tp _Class::* __pm) noexcept ; template<typename _Tp> struct is_bind_expression : public false_type { }; template<typename _Tp> struct is_placeholder : public integral_constant<int, 0> { }; template <typename _Tp> inline constexpr bool is_bind_expression_v = is_bind_expression<_Tp>::value; template <typename _Tp> inline constexpr int is_placeholder_v = is_placeholder<_Tp>::value; namespace placeholders { inline const _Placeholder<1> _1; inline const _Placeholder<2> _2; inline const _Placeholder<3> _3; inline const _Placeholder<4> _4; inline const _Placeholder<5> _5; inline const _Placeholder<6> _6; inline const _Placeholder<7> _7; inline const _Placeholder<8> _8; inline const _Placeholder<9> _9; inline const _Placeholder<10> _10; inline const _Placeholder<11> _11; inline const _Placeholder<12> _12; inline const _Placeholder<13> _13; inline const _Placeholder<14> _14; inline const _Placeholder<15> _15; inline const _Placeholder<16> _16; inline const _Placeholder<17> _17; inline const _Placeholder<18> _18; inline const _Placeholder<19> _19; inline const _Placeholder<20> _20; inline const _Placeholder<21> _21; inline const _Placeholder<22> _22; inline const _Placeholder<23> _23; inline const _Placeholder<24> _24; inline const _Placeholder<25> _25; inline const _Placeholder<26> _26; inline const _Placeholder<27> _27; inline const _Placeholder<28> _28; inline const _Placeholder<29> _29; } template<int _Num> struct is_placeholder<_Placeholder<_Num> > : public integral_constant<int, _Num> { }; template<int _Num> struct is_placeholder<const _Placeholder<_Num> > : public integral_constant<int, _Num> { }; template<std::size_t __i, typename _Tuple> using _Safe_tuple_element_t = typename enable_if<(__i < tuple_size<_Tuple>::value), tuple_element<__i, _Tuple>>::type::type; template<typename _Arg, bool _IsBindExp = is_bind_expression<_Arg>::value, bool _IsPlaceholder = (is_placeholder<_Arg>::value > 0)> class _Mu; template<typename _Tp> class _Mu<reference_wrapper<_Tp>, false, false> { public: template<typename _CVRef, typename _Tuple> constexpr _Tp& operator()(_CVRef& __arg, _Tuple&) const volatile ; }; template<typename _Arg> class _Mu<_Arg, true, false> { public: template<typename _CVArg, typename... _Args> constexpr auto operator()(_CVArg& __arg, tuple<_Args...>& __tuple) const volatile -> decltype(__arg(declval<_Args>()...)) ; private: template<typename _CVArg, typename... _Args, std::size_t... _Indexes> constexpr auto __call(_CVArg& __arg, tuple<_Args...>& __tuple, const _Index_tuple<_Indexes...>&) const volatile -> decltype(__arg(declval<_Args>()...)) ; }; template<typename _Arg> class _Mu<_Arg, false, true> { public: template<typename _Tuple> constexpr _Safe_tuple_element_t<(is_placeholder<_Arg>::value - 1), _Tuple>&& operator()(const volatile _Arg&, _Tuple& __tuple) const volatile ; }; template<typename _Arg> class _Mu<_Arg, false, false> { public: template<typename _CVArg, typename _Tuple> constexpr _CVArg&& operator()(_CVArg&& __arg, _Tuple&) const volatile ; }; template<std::size_t _Ind, typename... _Tp> auto __volget(volatile tuple<_Tp...>& __tuple) -> __tuple_element_t<_Ind, tuple<_Tp...>> volatile& ; template<std::size_t _Ind, typename... _Tp> auto __volget(const volatile tuple<_Tp...>& __tuple) -> __tuple_element_t<_Ind, tuple<_Tp...>> const volatile& ; template<typename _Signature> class _Bind; template<typename _Functor, typename... _Bound_args> class _Bind<_Functor(_Bound_args...)> : public _Weak_result_type<_Functor> { typedef typename _Build_index_tuple<sizeof...(_Bound_args)>::__type _Bound_indexes; _Functor _M_f; tuple<_Bound_args...> _M_bound_args; template<typename _Result, typename... _Args, std::size_t... _Indexes> constexpr _Result __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) ; template<typename _Result, typename... _Args, std::size_t... _Indexes> constexpr _Result __call_c(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) const ; template<typename _BoundArg, typename _CallArgs> using _Mu_type = decltype( _Mu<typename remove_cv<_BoundArg>::type>()( std::declval<_BoundArg&>(), std::declval<_CallArgs&>()) ); template<typename _Fn, typename _CallArgs, typename... _BArgs> using _Res_type_impl = typename result_of< _Fn&(_Mu_type<_BArgs, _CallArgs>&&...) >::type; template<typename _CallArgs> using _Res_type = _Res_type_impl<_Functor, _CallArgs, _Bound_args...>; template<typename _CallArgs> using __dependent = typename enable_if<bool(tuple_size<_CallArgs>::value+1), _Functor>::type; template<typename _CallArgs, template<class> class __cv_quals> using _Res_type_cv = _Res_type_impl< typename __cv_quals<__dependent<_CallArgs>>::type, _CallArgs, typename __cv_quals<_Bound_args>::type...>; public: template<typename... _Args> explicit constexpr _Bind(const _Functor& __f, _Args&&... __args) ; template<typename... _Args> explicit constexpr _Bind(_Functor&& __f, _Args&&... __args) ; _Bind(const _Bind&) = default; _Bind(_Bind&&) = default; template<typename... _Args, typename _Result = _Res_type<tuple<_Args...>>> constexpr _Result operator()(_Args&&... __args) ; template<typename... _Args, typename _Result = _Res_type_cv<tuple<_Args...>, add_const>> constexpr _Result operator()(_Args&&... __args) const ; }; template<typename _Result, typename _Signature> class _Bind_result; template<typename _Result, typename _Functor, typename... _Bound_args> class _Bind_result<_Result, _Functor(_Bound_args...)> { typedef typename _Build_index_tuple<sizeof...(_Bound_args)>::__type _Bound_indexes; _Functor _M_f; tuple<_Bound_args...> _M_bound_args; template<typename _Res, typename... _Args, std::size_t... _Indexes> constexpr _Res __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) ; template<typename _Res, typename... _Args, std::size_t... _Indexes> constexpr _Res __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) const ; public: typedef _Result result_type; template<typename... _Args> explicit constexpr _Bind_result(const _Functor& __f, _Args&&... __args) ; template<typename... _Args> explicit constexpr _Bind_result(_Functor&& __f, _Args&&... __args) ; _Bind_result(const _Bind_result&) = default; _Bind_result(_Bind_result&&) = default; template<typename... _Args> constexpr result_type operator()(_Args&&... __args) ; template<typename... _Args> constexpr result_type operator()(_Args&&... __args) const ; template<typename... _Args> void operator()(_Args&&...) const volatile = delete; }; template<typename _Signature> struct is_bind_expression<_Bind<_Signature> > : public true_type { }; template<typename _Signature> struct is_bind_expression<const _Bind<_Signature> > : public true_type { }; template<typename _Signature> struct is_bind_expression<volatile _Bind<_Signature> > : public true_type { }; template<typename _Signature> struct is_bind_expression<const volatile _Bind<_Signature>> : public true_type { }; template<typename _Result, typename _Signature> struct is_bind_expression<_Bind_result<_Result, _Signature>> : public true_type { }; template<typename _Result, typename _Signature> struct is_bind_expression<const _Bind_result<_Result, _Signature>> : public true_type { }; template<typename _Result, typename _Signature> struct is_bind_expression<volatile _Bind_result<_Result, _Signature>> : public true_type { }; template<typename _Result, typename _Signature> struct is_bind_expression<const volatile _Bind_result<_Result, _Signature>> : public true_type { }; template<typename _Func, typename... _BoundArgs> struct _Bind_check_arity { }; template<typename _Ret, typename... _Args, typename... _BoundArgs> struct _Bind_check_arity<_Ret (*)(_Args...), _BoundArgs...> { static_assert(sizeof...(_BoundArgs) == sizeof...(_Args), "Wrong number of arguments for function"); }; template<typename _Ret, typename... _Args, typename... _BoundArgs> struct _Bind_check_arity<_Ret (*)(_Args......), _BoundArgs...> { static_assert(sizeof...(_BoundArgs) >= sizeof...(_Args), "Wrong number of arguments for function"); }; template<typename _Tp, typename _Class, typename... _BoundArgs> struct _Bind_check_arity<_Tp _Class::*, _BoundArgs...> { using _Arity = typename _Mem_fn<_Tp _Class::*>::_Arity; using _Varargs = typename _Mem_fn<_Tp _Class::*>::_Varargs; static_assert(_Varargs::value ? sizeof...(_BoundArgs) >= _Arity::value + 1 : sizeof...(_BoundArgs) == _Arity::value + 1, "Wrong number of arguments for pointer-to-member"); }; template<typename _Tp, typename _Tp2 = typename decay<_Tp>::type> using __is_socketlike = __or_<is_integral<_Tp2>, is_enum<_Tp2>>; template<bool _SocketLike, typename _Func, typename... _BoundArgs> struct _Bind_helper : _Bind_check_arity<typename decay<_Func>::type, _BoundArgs...> { typedef typename decay<_Func>::type __func_type; typedef _Bind<__func_type(typename decay<_BoundArgs>::type...)> type; }; template<typename _Func, typename... _BoundArgs> struct _Bind_helper<true, _Func, _BoundArgs...> { }; template<typename _Func, typename... _BoundArgs> constexpr typename _Bind_helper<__is_socketlike<_Func>::value, _Func, _BoundArgs...>::type bind(_Func&& __f, _BoundArgs&&... __args) ; template<typename _Result, typename _Func, typename... _BoundArgs> struct _Bindres_helper : _Bind_check_arity<typename decay<_Func>::type, _BoundArgs...> { typedef typename decay<_Func>::type __functor_type; typedef _Bind_result<_Result, __functor_type(typename decay<_BoundArgs>::type...)> type; }; template<typename _Result, typename _Func, typename... _BoundArgs> constexpr typename _Bindres_helper<_Result, _Func, _BoundArgs...>::type bind(_Func&& __f, _BoundArgs&&... __args) ; template<typename _Fd, typename... _BoundArgs> struct _Bind_front { static_assert(is_move_constructible_v<_Fd>); static_assert((is_move_constructible_v<_BoundArgs> && ...)); template<typename _Fn, typename... _Args> explicit constexpr _Bind_front(int, _Fn&& __fn, _Args&&... __args) noexcept(__and_<is_nothrow_constructible<_Fd, _Fn>, is_nothrow_constructible<_BoundArgs, _Args>...>::value) ; _Bind_front(const _Bind_front&) = default; _Bind_front(_Bind_front&&) = default; _Bind_front& operator=(const _Bind_front&) = default; _Bind_front& operator=(_Bind_front&&) = default; ~_Bind_front() = default; template<typename... _CallArgs> constexpr invoke_result_t<_Fd&, _BoundArgs&..., _CallArgs...> operator()(_CallArgs&&... __call_args) & noexcept(is_nothrow_invocable_v<_Fd&, _BoundArgs&..., _CallArgs...>) ; template<typename... _CallArgs> constexpr invoke_result_t<const _Fd&, const _BoundArgs&..., _CallArgs...> operator()(_CallArgs&&... __call_args) const & noexcept(is_nothrow_invocable_v<const _Fd&, const _BoundArgs&..., _CallArgs...>) ; template<typename... _CallArgs> constexpr invoke_result_t<_Fd, _BoundArgs..., _CallArgs...> operator()(_CallArgs&&... __call_args) && noexcept(is_nothrow_invocable_v<_Fd, _BoundArgs..., _CallArgs...>) ; template<typename... _CallArgs> constexpr invoke_result_t<const _Fd, const _BoundArgs..., _CallArgs...> operator()(_CallArgs&&... __call_args) const && noexcept(is_nothrow_invocable_v<const _Fd, const _BoundArgs..., _CallArgs...>) ; private: using _BoundIndices = index_sequence_for<_BoundArgs...>; template<typename _Tp, size_t... _Ind, typename... _CallArgs> static constexpr decltype(auto) _S_call(_Tp&& __g, index_sequence<_Ind...>, _CallArgs&&... __call_args) ; [[no_unique_address]] _Fd _M_fd; [[no_unique_address]] std::tuple<_BoundArgs...> _M_bound_args; }; template<typename _Fd> struct _Bind_front0 { static_assert(is_move_constructible_v<_Fd>); template<typename _Fn> explicit constexpr _Bind_front0(int, _Fn&& __fn) noexcept(is_nothrow_constructible_v<_Fd, _Fn>) ; _Bind_front0(const _Bind_front0&) = default; _Bind_front0(_Bind_front0&&) = default; _Bind_front0& operator=(const _Bind_front0&) = default; _Bind_front0& operator=(_Bind_front0&&) = default; ~_Bind_front0() = default; template<typename... _CallArgs> constexpr invoke_result_t<_Fd&, _CallArgs...> operator()(_CallArgs&&... __call_args) & noexcept(is_nothrow_invocable_v<_Fd&, _CallArgs...>) ; template<typename... _CallArgs> constexpr invoke_result_t<const _Fd&, _CallArgs...> operator()(_CallArgs&&... __call_args) const & noexcept(is_nothrow_invocable_v<const _Fd&, _CallArgs...>) ; template<typename... _CallArgs> constexpr invoke_result_t<_Fd, _CallArgs...> operator()(_CallArgs&&... __call_args) && noexcept(is_nothrow_invocable_v<_Fd, _CallArgs...>) ; template<typename... _CallArgs> constexpr invoke_result_t<const _Fd, _CallArgs...> operator()(_CallArgs&&... __call_args) const && noexcept(is_nothrow_invocable_v<const _Fd, _CallArgs...>) ; private: [[no_unique_address]] _Fd _M_fd; }; template<typename _Fn, typename... _Args> using _Bind_front_t = __conditional_t<sizeof...(_Args) == 0, _Bind_front0<decay_t<_Fn>>, _Bind_front<decay_t<_Fn>, decay_t<_Args>...>>; template<typename _Fn, typename... _Args> constexpr _Bind_front_t<_Fn, _Args...> bind_front(_Fn&& __fn, _Args&&... __args) noexcept(is_nothrow_constructible_v<_Bind_front_t<_Fn, _Args...>, int, _Fn, _Args...>) ; template<typename _Fn> class _Not_fn { template<typename _Fn2, typename... _Args> using __inv_res_t = typename __invoke_result<_Fn2, _Args...>::type; template<typename _Tp> static decltype(!std::declval<_Tp>()) _S_not() noexcept(noexcept(!std::declval<_Tp>())); public: template<typename _Fn2> constexpr _Not_fn(_Fn2&& __fn, int) ; _Not_fn(const _Not_fn& __fn) = default; _Not_fn(_Not_fn&& __fn) = default; ~_Not_fn() = default; template<typename... _Args> constexpr decltype(_S_not<__inv_res_t<_Fn &, _Args...>>()) operator()(_Args&&... __args) & noexcept(__is_nothrow_invocable<_Fn &, _Args...>::value && noexcept(_S_not<__inv_res_t<_Fn &, _Args...>>())) ; template<typename... _Args> constexpr decltype(_S_not<__inv_res_t<_Fn const &, _Args...>>()) operator()(_Args&&... __args) const & noexcept(__is_nothrow_invocable<_Fn const &, _Args...>::value && noexcept(_S_not<__inv_res_t<_Fn const &, _Args...>>())) ; template<typename... _Args> constexpr decltype(_S_not<__inv_res_t<_Fn &&, _Args...>>()) operator()(_Args&&... __args) && noexcept(__is_nothrow_invocable<_Fn &&, _Args...>::value && noexcept(_S_not<__inv_res_t<_Fn &&, _Args...>>())) ; template<typename... _Args> constexpr decltype(_S_not<__inv_res_t<_Fn const &&, _Args...>>()) operator()(_Args&&... __args) const && noexcept(__is_nothrow_invocable<_Fn const &&, _Args...>::value && noexcept(_S_not<__inv_res_t<_Fn const &&, _Args...>>())) ; private: _Fn _M_fn; }; template<typename _Tp, typename _Pred> struct __is_byte_like : false_type { }; template<typename _Tp> struct __is_byte_like<_Tp, equal_to<_Tp>> : __bool_constant<sizeof(_Tp) == 1 && is_integral<_Tp>::value> { }; template<typename _Tp> struct __is_byte_like<_Tp, equal_to<void>> : __bool_constant<sizeof(_Tp) == 1 && is_integral<_Tp>::value> { }; enum class byte : unsigned char; template<> struct __is_byte_like<byte, equal_to<byte>> : true_type { }; template<> struct __is_byte_like<byte, equal_to<void>> : true_type { }; template<typename _Fn> constexpr auto not_fn(_Fn&& __fn) noexcept(std::is_nothrow_constructible<std::decay_t<_Fn>, _Fn&&>::value) ; template<typename _ForwardIterator1, typename _BinaryPredicate = equal_to<>> class default_searcher { public: constexpr default_searcher(_ForwardIterator1 __pat_first, _ForwardIterator1 __pat_last, _BinaryPredicate __pred = _BinaryPredicate()) ; template<typename _ForwardIterator2> constexpr pair<_ForwardIterator2, _ForwardIterator2> operator()(_ForwardIterator2 __first, _ForwardIterator2 __last) const ; private: tuple<_ForwardIterator1, _ForwardIterator1, _BinaryPredicate> _M_m; }; template<typename _Key, typename _Tp, typename _Hash, typename _Pred> struct __boyer_moore_map_base { template<typename _RAIter> __boyer_moore_map_base(_RAIter __pat, size_t __patlen, _Hash&& __hf, _Pred&& __pred) ; using __diff_type = _Tp; __diff_type _M_lookup(_Key __key, __diff_type __not_found) const ; _Pred _M_pred() const ; std::unordered_map<_Key, _Tp, _Hash, _Pred> _M_bad_char; }; template<typename _Tp, size_t _Len, typename _Pred> struct __boyer_moore_array_base { template<typename _RAIter, typename _Unused> __boyer_moore_array_base(_RAIter __pat, size_t __patlen, _Unused&&, _Pred&& __pred) ; using __diff_type = _Tp; template<typename _Key> __diff_type _M_lookup(_Key __key, __diff_type __not_found) const ; const _Pred& _M_pred() const ; tuple<array<_Tp, _Len>, _Pred> _M_bad_char; }; template<typename _RAIter, typename _Hash, typename _Pred, typename _Val = typename iterator_traits<_RAIter>::value_type, typename _Diff = typename iterator_traits<_RAIter>::difference_type> using __boyer_moore_base_t = __conditional_t<__is_byte_like<_Val, _Pred>::value, __boyer_moore_array_base<_Diff, 256, _Pred>, __boyer_moore_map_base<_Val, _Diff, _Hash, _Pred>>; template<typename _RAIter, typename _Hash = hash<typename iterator_traits<_RAIter>::value_type>, typename _BinaryPredicate = equal_to<>> class boyer_moore_searcher : __boyer_moore_base_t<_RAIter, _Hash, _BinaryPredicate> { using _Base = __boyer_moore_base_t<_RAIter, _Hash, _BinaryPredicate>; using typename _Base::__diff_type; public: boyer_moore_searcher(_RAIter __pat_first, _RAIter __pat_last, _Hash __hf = _Hash(), _BinaryPredicate __pred = _BinaryPredicate()); template<typename _RandomAccessIterator2> pair<_RandomAccessIterator2, _RandomAccessIterator2> operator()(_RandomAccessIterator2 __first, _RandomAccessIterator2 __last) const; private: bool _M_is_prefix(_RAIter __word, __diff_type __len, __diff_type __pos) ; __diff_type _M_suffix_length(_RAIter __word, __diff_type __len, __diff_type __pos) ; template<typename _Tp> __diff_type _M_bad_char_shift(_Tp __c) const ; _RAIter _M_pat; _RAIter _M_pat_end; std::vector<__diff_type> _M_good_suffix; }; template<typename _RAIter, typename _Hash = hash<typename iterator_traits<_RAIter>::value_type>, typename _BinaryPredicate = equal_to<>> class boyer_moore_horspool_searcher : __boyer_moore_base_t<_RAIter, _Hash, _BinaryPredicate> { using _Base = __boyer_moore_base_t<_RAIter, _Hash, _BinaryPredicate>; using typename _Base::__diff_type; public: boyer_moore_horspool_searcher(_RAIter __pat, _RAIter __pat_end, _Hash __hf = _Hash(), _BinaryPredicate __pred = _BinaryPredicate()) ; template<typename _RandomAccessIterator2> pair<_RandomAccessIterator2, _RandomAccessIterator2> operator()(_RandomAccessIterator2 __first, _RandomAccessIterator2 __last) const ; private: template<typename _Tp> __diff_type _M_bad_char_shift(_Tp __c) const ; _RAIter _M_pat; _RAIter _M_pat_end; }; } namespace std __attribute__ ((__visibility__ ("default"))) { #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" template<typename _Tp, typename _CharT = char, typename _Traits = char_traits<_CharT>, typename _Dist = ptrdiff_t> class istream_iterator : public iterator<input_iterator_tag, _Tp, _Dist, const _Tp*, const _Tp&> { public: typedef _CharT char_type; typedef _Traits traits_type; typedef basic_istream<_CharT, _Traits> istream_type; private: istream_type* _M_stream; _Tp _M_value; bool _M_ok; public: constexpr istream_iterator() noexcept(is_nothrow_default_constructible<_Tp>::value) ; istream_iterator(istream_type& __s) ; constexpr istream_iterator(const istream_iterator& __obj) noexcept(is_nothrow_copy_constructible<_Tp>::value) ; constexpr istream_iterator(default_sentinel_t) noexcept(is_nothrow_default_constructible_v<_Tp>) ; istream_iterator& operator=(const istream_iterator&) = default; ~istream_iterator() = default; [[__nodiscard__]] const _Tp& operator*() const noexcept ; [[__nodiscard__]] const _Tp* operator->() const noexcept ; istream_iterator& operator++() ; istream_iterator operator++(int) ; private: bool _M_equal(const istream_iterator& __x) const noexcept { return (_M_ok == __x._M_ok) && (!_M_ok || _M_stream == __x._M_stream); } void _M_read() { if (_M_stream && !(*_M_stream >> _M_value)) { _M_stream = 0; _M_ok = false; } } [[__nodiscard__]] friend bool operator==(const istream_iterator& __x, const istream_iterator& __y) noexcept { return __x._M_equal(__y); } [[nodiscard]] friend bool operator==(const istream_iterator& __i, default_sentinel_t) noexcept { return !__i._M_stream; } }; template<typename _Tp, typename _CharT = char, typename _Traits = char_traits<_CharT> > class ostream_iterator : public iterator<output_iterator_tag, void, void, void, void> { public: using difference_type = ptrdiff_t; typedef _CharT char_type; typedef _Traits traits_type; typedef basic_ostream<_CharT, _Traits> ostream_type; private: ostream_type* _M_stream; const _CharT* _M_string; public: ostream_iterator(ostream_type& __s) noexcept : _M_stream(std::__addressof(__s)), _M_string(0) {} ostream_iterator(ostream_type& __s, const _CharT* __c) ; ostream_iterator(const ostream_iterator& __obj) ; ostream_iterator& operator=(const ostream_iterator&) = default; ostream_iterator& operator=(const _Tp& __value) ; [[__nodiscard__]] ostream_iterator& operator*() noexcept ; ostream_iterator& operator++() noexcept ; ostream_iterator& operator++(int) noexcept ; }; #pragma GCC diagnostic pop } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _ForwardIterator, typename _Tp> constexpr void iota(_ForwardIterator __first, _ForwardIterator __last, _Tp __value) ; template<typename _InputIterator, typename _Tp> constexpr _Tp accumulate(_InputIterator __first, _InputIterator __last, _Tp __init) ; template<typename _InputIterator, typename _Tp, typename _BinaryOperation> constexpr _Tp accumulate(_InputIterator __first, _InputIterator __last, _Tp __init, _BinaryOperation __binary_op) ; template<typename _InputIterator1, typename _InputIterator2, typename _Tp> constexpr _Tp inner_product(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _Tp __init) ; template<typename _InputIterator1, typename _InputIterator2, typename _Tp, typename _BinaryOperation1, typename _BinaryOperation2> constexpr _Tp inner_product(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _Tp __init, _BinaryOperation1 __binary_op1, _BinaryOperation2 __binary_op2) ; template<typename _InputIterator, typename _OutputIterator> constexpr _OutputIterator partial_sum(_InputIterator __first, _InputIterator __last, _OutputIterator __result) ; template<typename _InputIterator, typename _OutputIterator, typename _BinaryOperation> constexpr _OutputIterator partial_sum(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _BinaryOperation __binary_op) ; template<typename _InputIterator, typename _OutputIterator> constexpr _OutputIterator adjacent_difference(_InputIterator __first, _InputIterator __last, _OutputIterator __result) ; template<typename _InputIterator, typename _OutputIterator, typename _BinaryOperation> constexpr _OutputIterator adjacent_difference(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _BinaryOperation __binary_op) ; } namespace std __attribute__ ((__visibility__ ("default"))) { namespace __detail { template<typename _Res, typename _Tp> constexpr _Res __abs_r(_Tp __val) ; template<typename> void __abs_r(bool) = delete; template<typename _Tp> constexpr _Tp __gcd(_Tp __m, _Tp __n) ; } template<typename _Mn, typename _Nn> constexpr common_type_t<_Mn, _Nn> gcd(_Mn __m, _Nn __n) noexcept ; template<typename _Mn, typename _Nn> constexpr common_type_t<_Mn, _Nn> lcm(_Mn __m, _Nn __n) noexcept ; template<typename _Tp> constexpr enable_if_t<__and_v<is_arithmetic<_Tp>, is_same<remove_cv_t<_Tp>, _Tp>, __not_<is_same<_Tp, bool>>>, _Tp> midpoint(_Tp __a, _Tp __b) noexcept ; template<typename _Tp> constexpr enable_if_t<is_object_v<_Tp>, _Tp*> midpoint(_Tp* __a, _Tp* __b) noexcept ; template<typename _InputIterator, typename _Tp, typename _BinaryOperation> constexpr _Tp reduce(_InputIterator __first, _InputIterator __last, _Tp __init, _BinaryOperation __binary_op) ; template<typename _InputIterator, typename _Tp> constexpr _Tp reduce(_InputIterator __first, _InputIterator __last, _Tp __init) ; template<typename _InputIterator> constexpr typename iterator_traits<_InputIterator>::value_type reduce(_InputIterator __first, _InputIterator __last) ; template<typename _InputIterator1, typename _InputIterator2, typename _Tp, typename _BinaryOperation1, typename _BinaryOperation2> constexpr _Tp transform_reduce(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _Tp __init, _BinaryOperation1 __binary_op1, _BinaryOperation2 __binary_op2) ; template<typename _InputIterator1, typename _InputIterator2, typename _Tp> constexpr _Tp transform_reduce(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _Tp __init) ; template<typename _InputIterator, typename _Tp, typename _BinaryOperation, typename _UnaryOperation> constexpr _Tp transform_reduce(_InputIterator __first, _InputIterator __last, _Tp __init, _BinaryOperation __binary_op, _UnaryOperation __unary_op) ; template<typename _InputIterator, typename _OutputIterator, typename _Tp, typename _BinaryOperation> constexpr _OutputIterator exclusive_scan(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _Tp __init, _BinaryOperation __binary_op) ; template<typename _InputIterator, typename _OutputIterator, typename _Tp> constexpr _OutputIterator exclusive_scan(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _Tp __init) ; template<typename _InputIterator, typename _OutputIterator, typename _BinaryOperation, typename _Tp> constexpr _OutputIterator inclusive_scan(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _BinaryOperation __binary_op, _Tp __init) ; template<typename _InputIterator, typename _OutputIterator, typename _BinaryOperation> constexpr _OutputIterator inclusive_scan(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _BinaryOperation __binary_op) ; template<typename _InputIterator, typename _OutputIterator> constexpr _OutputIterator inclusive_scan(_InputIterator __first, _InputIterator __last, _OutputIterator __result) ; template<typename _InputIterator, typename _OutputIterator, typename _Tp, typename _BinaryOperation, typename _UnaryOperation> constexpr _OutputIterator transform_exclusive_scan(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _Tp __init, _BinaryOperation __binary_op, _UnaryOperation __unary_op) ; template<typename _InputIterator, typename _OutputIterator, typename _BinaryOperation, typename _UnaryOperation, typename _Tp> constexpr _OutputIterator transform_inclusive_scan(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _BinaryOperation __binary_op, _UnaryOperation __unary_op, _Tp __init) ; template<typename _InputIterator, typename _OutputIterator, typename _BinaryOperation, typename _UnaryOperation> constexpr _OutputIterator transform_inclusive_scan(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _BinaryOperation __binary_op, _UnaryOperation __unary_op) ; } namespace std { template <class _ExecutionPolicy, class _ForwardIterator, class _Tp, class _BinaryOperation> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _Tp> reduce(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Tp __init, _BinaryOperation __binary_op); template <class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _Tp> reduce(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Tp __init); template <class _ExecutionPolicy, class _ForwardIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, typename iterator_traits<_ForwardIterator>::value_type> reduce(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last); template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _Tp> transform_reduce(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _Tp __init); template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _Tp, class _BinaryOperation1, class _BinaryOperation2> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _Tp> transform_reduce(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _Tp __init, _BinaryOperation1 __binary_op1, _BinaryOperation2 __binary_op2); template <class _ExecutionPolicy, class _ForwardIterator, class _Tp, class _BinaryOperation, class _UnaryOperation> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _Tp> transform_reduce(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Tp __init, _BinaryOperation __binary_op, _UnaryOperation __unary_op); template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> exclusive_scan(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __result, _Tp __init); template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _Tp, class _BinaryOperation> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> exclusive_scan(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __result, _Tp __init, _BinaryOperation __binary_op); template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> inclusive_scan(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __result); template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryOperation> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> inclusive_scan(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __result, _BinaryOperation __binary_op); template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _Tp, class _BinaryOperation> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> inclusive_scan(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __result, _BinaryOperation __binary_op, _Tp __init); template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _Tp, class _BinaryOperation, class _UnaryOperation> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> transform_exclusive_scan(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __result, _Tp __init, _BinaryOperation __binary_op, _UnaryOperation __unary_op); template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryOperation, class _UnaryOperation, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> transform_inclusive_scan(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __result, _BinaryOperation __binary_op, _UnaryOperation __unary_op, _Tp __init); template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _UnaryOperation, class _BinaryOperation> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> transform_inclusive_scan(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __result, _BinaryOperation __binary_op, _UnaryOperation __unary_op); template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryOperation> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> adjacent_difference(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __d_first, _BinaryOperation __op); template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> adjacent_difference(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __d_first); } namespace std __attribute__ ((__visibility__ ("default"))) { namespace rel_ops { template <class _Tp> bool operator!=(const _Tp& __x, const _Tp& __y) ; template <class _Tp> bool operator>(const _Tp& __x, const _Tp& __y) ; template <class _Tp> bool operator<=(const _Tp& __x, const _Tp& __y) ; template <class _Tp> bool operator>=(const _Tp& __x, const _Tp& __y) ; } } namespace std __attribute__ ((__visibility__ ("default"))) { template <typename _Tp, typename _Up = _Tp> constexpr _Tp exchange(_Tp& __obj, _Up&& __new_val) noexcept(__and_<is_nothrow_move_constructible<_Tp>, is_nothrow_assignable<_Tp&, _Up>>::value) ; template<typename _Tp> [[nodiscard]] constexpr add_const_t<_Tp>& as_const(_Tp& __t) noexcept ; template<typename _Tp> void as_const(const _Tp&&) = delete; template<typename _Tp, typename _Up> constexpr bool cmp_equal(_Tp __t, _Up __u) noexcept ; template<typename _Tp, typename _Up> constexpr bool cmp_not_equal(_Tp __t, _Up __u) noexcept ; template<typename _Tp, typename _Up> constexpr bool cmp_less(_Tp __t, _Up __u) noexcept ; template<typename _Tp, typename _Up> constexpr bool cmp_greater(_Tp __t, _Up __u) noexcept ; template<typename _Tp, typename _Up> constexpr bool cmp_less_equal(_Tp __t, _Up __u) noexcept ; template<typename _Tp, typename _Up> constexpr bool cmp_greater_equal(_Tp __t, _Up __u) noexcept ; template<typename _Res, typename _Tp> constexpr bool in_range(_Tp __t) noexcept ; } extern "C" { typedef long unsigned int size_t; typedef __socklen_t socklen_t; extern int access (const char *__name, int __type) noexcept (true) __attribute__ ((__nonnull__ (1))); extern int euidaccess (const char *__name, int __type) noexcept (true) __attribute__ ((__nonnull__ (1))); extern int eaccess (const char *__name, int __type) noexcept (true) __attribute__ ((__nonnull__ (1))); extern int execveat (int __fd, const char *__path, char *const __argv[], char *const __envp[], int __flags) noexcept (true) __attribute__ ((__nonnull__ (2, 3))); extern int faccessat (int __fd, const char *__file, int __type, int __flag) noexcept (true) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); extern __off_t lseek (int __fd, __off_t __offset, int __whence) noexcept (true); extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence) noexcept (true); extern int close (int __fd); extern void closefrom (int __lowfd) noexcept (true); extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __attribute__ ((__warn_unused_result__)) ; extern ssize_t write (int __fd, const void *__buf, size_t __n) __attribute__ ((__warn_unused_result__)) ; extern ssize_t pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset) __attribute__ ((__warn_unused_result__)) ; extern ssize_t pwrite (int __fd, const void *__buf, size_t __n, __off_t __offset) __attribute__ ((__warn_unused_result__)) ; extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) __attribute__ ((__warn_unused_result__)) ; extern ssize_t pwrite64 (int __fd, const void *__buf, size_t __n, __off64_t __offset) __attribute__ ((__warn_unused_result__)) ; extern int pipe (int __pipedes[2]) noexcept (true) __attribute__ ((__warn_unused_result__)); extern int pipe2 (int __pipedes[2], int __flags) noexcept (true) __attribute__ ((__warn_unused_result__)); extern unsigned int alarm (unsigned int __seconds) noexcept (true); extern unsigned int sleep (unsigned int __seconds); extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval) noexcept (true); extern int usleep (__useconds_t __useconds); extern int pause (void); extern int chown (const char *__file, __uid_t __owner, __gid_t __group) noexcept (true) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int fchown (int __fd, __uid_t __owner, __gid_t __group) noexcept (true) __attribute__ ((__warn_unused_result__)); extern int lchown (const char *__file, __uid_t __owner, __gid_t __group) noexcept (true) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int fchownat (int __fd, const char *__file, __uid_t __owner, __gid_t __group, int __flag) noexcept (true) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); extern int chdir (const char *__path) noexcept (true) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); extern int fchdir (int __fd) noexcept (true) __attribute__ ((__warn_unused_result__)); extern char *getcwd (char *__buf, size_t __size) noexcept (true) __attribute__ ((__warn_unused_result__)); extern char *get_current_dir_name (void) noexcept (true); extern char *getwd (char *__buf) noexcept (true) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__)) ; extern int dup (int __fd) noexcept (true) __attribute__ ((__warn_unused_result__)); ; ; extern char **__environ; extern char **environ; ; ; ; ; ; ; ; ; ; ; enum { _PC_LINK_MAX, _PC_MAX_CANON, _PC_MAX_INPUT, _PC_NAME_MAX, _PC_PATH_MAX, _PC_PIPE_BUF, _PC_CHOWN_RESTRICTED, _PC_NO_TRUNC, _PC_VDISABLE, _PC_SYNC_IO, _PC_ASYNC_IO, _PC_PRIO_IO, _PC_SOCK_MAXBUF, _PC_FILESIZEBITS, _PC_REC_INCR_XFER_SIZE, _PC_REC_MAX_XFER_SIZE, _PC_REC_MIN_XFER_SIZE, _PC_REC_XFER_ALIGN, _PC_ALLOC_SIZE_MIN, _PC_SYMLINK_MAX, _PC_2_SYMLINKS }; enum { _SC_ARG_MAX, _SC_CHILD_MAX, _SC_CLK_TCK, _SC_NGROUPS_MAX, _SC_OPEN_MAX, _SC_STREAM_MAX, _SC_TZNAME_MAX, _SC_JOB_CONTROL, _SC_SAVED_IDS, _SC_REALTIME_SIGNALS, _SC_PRIORITY_SCHEDULING, _SC_TIMERS, _SC_ASYNCHRONOUS_IO, _SC_PRIORITIZED_IO, _SC_SYNCHRONIZED_IO, _SC_FSYNC, _SC_MAPPED_FILES, _SC_MEMLOCK, _SC_MEMLOCK_RANGE, _SC_MEMORY_PROTECTION, _SC_MESSAGE_PASSING, _SC_SEMAPHORES, _SC_SHARED_MEMORY_OBJECTS, _SC_AIO_LISTIO_MAX, _SC_AIO_MAX, _SC_AIO_PRIO_DELTA_MAX, _SC_DELAYTIMER_MAX, _SC_MQ_OPEN_MAX, _SC_MQ_PRIO_MAX, _SC_VERSION, _SC_PAGESIZE, _SC_RTSIG_MAX, _SC_SEM_NSEMS_MAX, _SC_SEM_VALUE_MAX, _SC_SIGQUEUE_MAX, _SC_TIMER_MAX, _SC_BC_BASE_MAX, _SC_BC_DIM_MAX, _SC_BC_SCALE_MAX, _SC_BC_STRING_MAX, _SC_COLL_WEIGHTS_MAX, _SC_EQUIV_CLASS_MAX, _SC_EXPR_NEST_MAX, _SC_LINE_MAX, _SC_RE_DUP_MAX, _SC_CHARCLASS_NAME_MAX, _SC_2_VERSION, _SC_2_C_BIND, _SC_2_C_DEV, _SC_2_FORT_DEV, _SC_2_FORT_RUN, _SC_2_SW_DEV, _SC_2_LOCALEDEF, _SC_PII, _SC_PII_XTI, _SC_PII_SOCKET, _SC_PII_INTERNET, _SC_PII_OSI, _SC_POLL, _SC_SELECT, _SC_UIO_MAXIOV, _SC_IOV_MAX = _SC_UIO_MAXIOV, _SC_PII_INTERNET_STREAM, _SC_PII_INTERNET_DGRAM, _SC_PII_OSI_COTS, _SC_PII_OSI_CLTS, _SC_PII_OSI_M, _SC_T_IOV_MAX, _SC_THREADS, _SC_THREAD_SAFE_FUNCTIONS, _SC_GETGR_R_SIZE_MAX, _SC_GETPW_R_SIZE_MAX, _SC_LOGIN_NAME_MAX, _SC_TTY_NAME_MAX, _SC_THREAD_DESTRUCTOR_ITERATIONS, _SC_THREAD_KEYS_MAX, _SC_THREAD_STACK_MIN, _SC_THREAD_THREADS_MAX, _SC_THREAD_ATTR_STACKADDR, _SC_THREAD_ATTR_STACKSIZE, _SC_THREAD_PRIORITY_SCHEDULING, _SC_THREAD_PRIO_INHERIT, _SC_THREAD_PRIO_PROTECT, _SC_THREAD_PROCESS_SHARED, _SC_NPROCESSORS_CONF, _SC_NPROCESSORS_ONLN, _SC_PHYS_PAGES, _SC_AVPHYS_PAGES, _SC_ATEXIT_MAX, _SC_PASS_MAX, _SC_XOPEN_VERSION, _SC_XOPEN_XCU_VERSION, _SC_XOPEN_UNIX, _SC_XOPEN_CRYPT, _SC_XOPEN_ENH_I18N, _SC_XOPEN_SHM, _SC_2_CHAR_TERM, _SC_2_C_VERSION, _SC_2_UPE, _SC_XOPEN_XPG2, _SC_XOPEN_XPG3, _SC_XOPEN_XPG4, _SC_CHAR_BIT, _SC_CHAR_MAX, _SC_CHAR_MIN, _SC_INT_MAX, _SC_INT_MIN, _SC_LONG_BIT, _SC_WORD_BIT, _SC_MB_LEN_MAX, _SC_NZERO, _SC_SSIZE_MAX, _SC_SCHAR_MAX, _SC_SCHAR_MIN, _SC_SHRT_MAX, _SC_SHRT_MIN, _SC_UCHAR_MAX, _SC_UINT_MAX, _SC_ULONG_MAX, _SC_USHRT_MAX, _SC_NL_ARGMAX, _SC_NL_LANGMAX, _SC_NL_MSGMAX, _SC_NL_NMAX, _SC_NL_SETMAX, _SC_NL_TEXTMAX, _SC_XBS5_ILP32_OFF32, _SC_XBS5_ILP32_OFFBIG, _SC_XBS5_LP64_OFF64, _SC_XBS5_LPBIG_OFFBIG, _SC_XOPEN_LEGACY, _SC_XOPEN_REALTIME, _SC_XOPEN_REALTIME_THREADS, _SC_ADVISORY_INFO, _SC_BARRIERS, _SC_BASE, _SC_C_LANG_SUPPORT, _SC_C_LANG_SUPPORT_R, _SC_CLOCK_SELECTION, _SC_CPUTIME, _SC_THREAD_CPUTIME, _SC_DEVICE_IO, _SC_DEVICE_SPECIFIC, _SC_DEVICE_SPECIFIC_R, _SC_FD_MGMT, _SC_FIFO, _SC_PIPE, _SC_FILE_ATTRIBUTES, _SC_FILE_LOCKING, _SC_FILE_SYSTEM, _SC_MONOTONIC_CLOCK, _SC_MULTI_PROCESS, _SC_SINGLE_PROCESS, _SC_NETWORKING, _SC_READER_WRITER_LOCKS, _SC_SPIN_LOCKS, _SC_REGEXP, _SC_REGEX_VERSION, _SC_SHELL, _SC_SIGNALS, _SC_SPAWN, _SC_SPORADIC_SERVER, _SC_THREAD_SPORADIC_SERVER, _SC_SYSTEM_DATABASE, _SC_SYSTEM_DATABASE_R, _SC_TIMEOUTS, _SC_TYPED_MEMORY_OBJECTS, _SC_USER_GROUPS, _SC_USER_GROUPS_R, _SC_2_PBS, _SC_2_PBS_ACCOUNTING, _SC_2_PBS_LOCATE, _SC_2_PBS_MESSAGE, _SC_2_PBS_TRACK, _SC_SYMLOOP_MAX, _SC_STREAMS, _SC_2_PBS_CHECKPOINT, _SC_V6_ILP32_OFF32, _SC_V6_ILP32_OFFBIG, _SC_V6_LP64_OFF64, _SC_V6_LPBIG_OFFBIG, _SC_HOST_NAME_MAX, _SC_TRACE, _SC_TRACE_EVENT_FILTER, _SC_TRACE_INHERIT, _SC_TRACE_LOG, _SC_LEVEL1_ICACHE_SIZE, _SC_LEVEL1_ICACHE_ASSOC, _SC_LEVEL1_ICACHE_LINESIZE, _SC_LEVEL1_DCACHE_SIZE, _SC_LEVEL1_DCACHE_ASSOC, _SC_LEVEL1_DCACHE_LINESIZE, _SC_LEVEL2_CACHE_SIZE, _SC_LEVEL2_CACHE_ASSOC, _SC_LEVEL2_CACHE_LINESIZE, _SC_LEVEL3_CACHE_SIZE, _SC_LEVEL3_CACHE_ASSOC, _SC_LEVEL3_CACHE_LINESIZE, _SC_LEVEL4_CACHE_SIZE, _SC_LEVEL4_CACHE_ASSOC, _SC_LEVEL4_CACHE_LINESIZE, _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50, _SC_RAW_SOCKETS, _SC_V7_ILP32_OFF32, _SC_V7_ILP32_OFFBIG, _SC_V7_LP64_OFF64, _SC_V7_LPBIG_OFFBIG, _SC_SS_REPL_MAX, _SC_TRACE_EVENT_NAME_MAX, _SC_TRACE_NAME_MAX, _SC_TRACE_SYS_MAX, _SC_TRACE_USER_EVENT_MAX, _SC_XOPEN_STREAMS, _SC_THREAD_ROBUST_PRIO_INHERIT, _SC_THREAD_ROBUST_PRIO_PROTECT, _SC_MINSIGSTKSZ, _SC_SIGSTKSZ }; enum { _CS_PATH, _CS_V6_WIDTH_RESTRICTED_ENVS, _CS_GNU_LIBC_VERSION, _CS_GNU_LIBPTHREAD_VERSION, _CS_V5_WIDTH_RESTRICTED_ENVS, _CS_V7_WIDTH_RESTRICTED_ENVS, _CS_LFS_CFLAGS = 1000, _CS_LFS_LDFLAGS, _CS_LFS_LIBS, _CS_LFS_LINTFLAGS, _CS_LFS64_CFLAGS, _CS_LFS64_LDFLAGS, _CS_LFS64_LIBS, _CS_LFS64_LINTFLAGS, _CS_XBS5_ILP32_OFF32_CFLAGS = 1100, _CS_XBS5_ILP32_OFF32_LDFLAGS, _CS_XBS5_ILP32_OFF32_LIBS, _CS_XBS5_ILP32_OFF32_LINTFLAGS, _CS_XBS5_ILP32_OFFBIG_CFLAGS, _CS_XBS5_ILP32_OFFBIG_LDFLAGS, _CS_XBS5_ILP32_OFFBIG_LIBS, _CS_XBS5_ILP32_OFFBIG_LINTFLAGS, _CS_XBS5_LP64_OFF64_CFLAGS, _CS_XBS5_LP64_OFF64_LDFLAGS, _CS_XBS5_LP64_OFF64_LIBS, _CS_XBS5_LP64_OFF64_LINTFLAGS, _CS_XBS5_LPBIG_OFFBIG_CFLAGS, _CS_XBS5_LPBIG_OFFBIG_LDFLAGS, _CS_XBS5_LPBIG_OFFBIG_LIBS, _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS, _CS_POSIX_V6_ILP32_OFF32_CFLAGS, _CS_POSIX_V6_ILP32_OFF32_LDFLAGS, _CS_POSIX_V6_ILP32_OFF32_LIBS, _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS, _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS, _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS, _CS_POSIX_V6_ILP32_OFFBIG_LIBS, _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS, _CS_POSIX_V6_LP64_OFF64_CFLAGS, _CS_POSIX_V6_LP64_OFF64_LDFLAGS, _CS_POSIX_V6_LP64_OFF64_LIBS, _CS_POSIX_V6_LP64_OFF64_LINTFLAGS, _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS, _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS, _CS_POSIX_V6_LPBIG_OFFBIG_LIBS, _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS, _CS_POSIX_V7_ILP32_OFF32_CFLAGS, _CS_POSIX_V7_ILP32_OFF32_LDFLAGS, _CS_POSIX_V7_ILP32_OFF32_LIBS, _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS, _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS, _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS, _CS_POSIX_V7_ILP32_OFFBIG_LIBS, _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS, _CS_POSIX_V7_LP64_OFF64_CFLAGS, _CS_POSIX_V7_LP64_OFF64_LDFLAGS, _CS_POSIX_V7_LP64_OFF64_LIBS, _CS_POSIX_V7_LP64_OFF64_LINTFLAGS, _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS, _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS, _CS_POSIX_V7_LPBIG_OFFBIG_LIBS, _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS, _CS_V6_ENV, _CS_V7_ENV }; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; extern "C" { extern char *optarg; extern int optind; extern int opterr; extern int optopt; ; } extern "C" { } ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; extern __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t read (int __fd, void *__buf, size_t __nbytes) ; extern __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset) ; extern __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t pread64 (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) ; extern __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char * getcwd (char *__buf, size_t __size) noexcept (true) ; extern __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__)) char * getwd (char *__buf) noexcept (true) ; ; } namespace std __attribute__ ((__visibility__ ("default"))) { class __mutex_base { protected: typedef __gthread_mutex_t __native_type; __native_type _M_mutex = { { 0, 0, 0, 0, PTHREAD_MUTEX_TIMED_NP, 0, 0, { 0, 0 } } }; constexpr __mutex_base() noexcept = default; }; class mutex : private __mutex_base { public: typedef __native_type* native_handle_type; constexpr mutex() noexcept = default; void lock() ; [[__nodiscard__]] void unlock() ; }; class __condvar { using timespec = __gthread_time_t; public: protected: __gthread_cond_t _M_cond = { { {0}, {0}, {0, 0}, {0, 0}, 0, 0, {0, 0} } }; }; struct defer_lock_t { explicit defer_lock_t() = default; }; struct try_to_lock_t { explicit try_to_lock_t() = default; }; struct adopt_lock_t { explicit adopt_lock_t() = default; }; inline constexpr defer_lock_t defer_lock { }; inline constexpr try_to_lock_t try_to_lock { }; inline constexpr adopt_lock_t adopt_lock { }; template<typename _Mutex> class lock_guard { public: typedef _Mutex mutex_type; private: mutex_type& _M_device; }; } namespace std __attribute__ ((__visibility__ ("default"))) { namespace __detail { using __platform_wait_t = int; inline constexpr size_t __platform_wait_alignment = 4; } template<typename _Tp> inline constexpr bool __platform_wait_uses_type = is_scalar_v<_Tp> && ((sizeof(_Tp) == sizeof(__detail::__platform_wait_t)) && (alignof(_Tp*) >= __detail::__platform_wait_alignment)); namespace __detail { enum class __futex_wait_flags : int { __private_flag = 0, __wait = 0, __wake = 1, __wait_bitset = 9, __wake_bitset = 10, __wait_private = __wait | __private_flag, __wake_private = __wake | __private_flag, __wait_bitset_private = __wait_bitset | __private_flag, __wake_bitset_private = __wake_bitset | __private_flag, __bitset_match_any = -1 }; ; ; inline constexpr auto __atomic_spin_count_relax = 12; inline constexpr auto __atomic_spin_count = 16; struct __default_spin_policy { }; template<typename _Pred, typename _Spin = __default_spin_policy> bool __atomic_spin(_Pred& __pred, _Spin __spin = _Spin{ }) noexcept ; ; struct __waiter_pool_base { static constexpr auto _S_align = 64; alignas(_S_align) __platform_wait_t _M_wait = 0; alignas(_S_align) __platform_wait_t _M_ver = 0; }; struct __waiter_pool : __waiter_pool_base { }; template<typename _Tp> struct __waiter_base { using __waiter_type = _Tp; __waiter_type& _M_w; __platform_wait_t* _M_addr; ; ; ; ; ; ; }; template<typename _EntersWait> struct __waiter : __waiter_base<__waiter_pool> { using __base_type = __waiter_base<__waiter_pool>; ; ; ; }; using __enters_wait = __waiter<std::true_type>; using __bare_wait = __waiter<std::false_type>; } ; ; template<typename _Pred> void __atomic_wait_address_bare(const __detail::__platform_wait_t* __addr, _Pred __pred) noexcept ; ; void __atomic_notify_address_bare(const __detail::__platform_wait_t* __addr, bool __all) noexcept ; } namespace std __attribute__ ((__visibility__ ("default"))) { enum class memory_order : int { relaxed, consume, acquire, release, acq_rel, seq_cst }; inline constexpr memory_order memory_order_relaxed = memory_order::relaxed; inline constexpr memory_order memory_order_consume = memory_order::consume; inline constexpr memory_order memory_order_acquire = memory_order::acquire; inline constexpr memory_order memory_order_release = memory_order::release; inline constexpr memory_order memory_order_acq_rel = memory_order::acq_rel; inline constexpr memory_order memory_order_seq_cst = memory_order::seq_cst; enum __memory_order_modifier { __memory_order_mask = 0x0ffff, __memory_order_modifier_mask = 0xffff0000, __memory_order_hle_acquire = 0x10000, __memory_order_hle_release = 0x20000 }; constexpr bool __is_valid_cmpexch_failure_order(memory_order __m) noexcept ; template<typename _IntTp> struct __atomic_base; ; template<typename _Tp> struct atomic; template<typename _Tp> struct atomic<_Tp*>; typedef bool __atomic_flag_data_type; extern "C" { struct __atomic_flag_base { __atomic_flag_data_type _M_i = {}; }; } struct atomic_flag : public __atomic_flag_base { constexpr atomic_flag(bool __i) ; private: }; template<typename _ITp> struct __atomic_base { using value_type = _ITp; using difference_type = value_type; private: typedef _ITp __int_type; static constexpr int _S_alignment = sizeof(_ITp) > alignof(_ITp) ? sizeof(_ITp) : alignof(_ITp); alignas(_S_alignment) __int_type _M_i = 0; public: __atomic_base() noexcept = default; constexpr __atomic_base(__int_type __i) ; operator __int_type() const noexcept ; __int_type operator++(int) noexcept ; __int_type operator--(int) noexcept ; __int_type operator++() noexcept ; __attribute__((__always_inline__)) void store(__int_type __i, memory_order __m = memory_order_seq_cst) noexcept ; __attribute__((__always_inline__)) __int_type load(memory_order __m = memory_order_seq_cst) const noexcept ; __attribute__((__always_inline__)) bool compare_exchange_weak(__int_type& __i1, __int_type __i2, memory_order __m1, memory_order __m2) noexcept ; __attribute__((__always_inline__)) __int_type fetch_add(__int_type __i, memory_order __m = memory_order_seq_cst) noexcept ; __attribute__((__always_inline__)) __int_type fetch_sub(__int_type __i, memory_order __m = memory_order_seq_cst) noexcept ; }; template<typename _PTp> struct __atomic_base<_PTp*> { private: typedef _PTp* __pointer_type; __pointer_type _M_p = nullptr; public: }; namespace __atomic_impl { ; ; template<typename _Tp> using _Val = typename remove_volatile<_Tp>::type; ; } namespace __atomic_impl { template<typename _Tp> using _Diff = __conditional_t<is_pointer_v<_Tp>, ptrdiff_t, _Val<_Tp>>; ; ; template<typename _Tp> __attribute__((__always_inline__)) _Val<_Tp> load(const _Tp* __ptr, memory_order __m) noexcept ; ; ; template<typename _Tp> __attribute__((__always_inline__)) bool compare_exchange_strong(_Tp* __ptr, _Val<_Tp>& __expected, _Val<_Tp> __desired, memory_order __success, memory_order __failure) noexcept ; ; ; ; template<typename _Tp> __attribute__((__always_inline__)) _Tp fetch_add(_Tp* __ptr, _Diff<_Tp> __i, memory_order __m) noexcept ; ; ; ; ; ; ; ; ; ; ; ; ; ; } template<typename _Fp> struct __atomic_float { static_assert(is_floating_point_v<_Fp>); static constexpr size_t _S_alignment = __alignof__(_Fp); public: using value_type = _Fp; using difference_type = value_type; static constexpr bool is_always_lock_free = __atomic_always_lock_free(sizeof(_Fp), 0); private: alignas(_S_alignment) _Fp _M_fp = 0; }; template<typename _Tp, bool = is_integral_v<_Tp>, bool = is_floating_point_v<_Tp>> struct __atomic_ref; template<typename _Tp> struct __atomic_ref<_Tp, false, false> { static_assert(is_trivially_copyable_v<_Tp>); static constexpr int _S_min_alignment = (sizeof(_Tp) & (sizeof(_Tp) - 1)) || sizeof(_Tp) > 16 ? 0 : sizeof(_Tp); public: using value_type = _Tp; static constexpr bool is_always_lock_free = __atomic_always_lock_free(sizeof(_Tp), 0); static constexpr size_t required_alignment = _S_min_alignment > alignof(_Tp) ? _S_min_alignment : alignof(_Tp); private: _Tp* _M_ptr; }; template<typename _Tp> struct __atomic_ref<_Tp, true, false> { static_assert(is_integral_v<_Tp>); public: using value_type = _Tp; using difference_type = value_type; static constexpr bool is_always_lock_free = __atomic_always_lock_free(sizeof(_Tp), 0); static constexpr size_t required_alignment = sizeof(_Tp) > alignof(_Tp) ? sizeof(_Tp) : alignof(_Tp); private: _Tp* _M_ptr; }; template<typename _Fp> struct __atomic_ref<_Fp, false, true> { static_assert(is_floating_point_v<_Fp>); public: using value_type = _Fp; using difference_type = value_type; static constexpr bool is_always_lock_free = __atomic_always_lock_free(sizeof(_Fp), 0); static constexpr size_t required_alignment = __alignof__(_Fp); private: _Fp* _M_ptr; }; template<typename _Tp> struct __atomic_ref<_Tp*, false, false> { public: using value_type = _Tp*; using difference_type = ptrdiff_t; static constexpr bool is_always_lock_free = 2 == 2; static constexpr size_t required_alignment = __alignof__(_Tp*); private: _Tp** _M_ptr; }; } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Tp> struct atomic; template<> struct atomic<bool> { using value_type = bool; private: __atomic_base<bool> _M_base; public: constexpr atomic(bool __i) ; static constexpr bool is_always_lock_free = 2 == 2; void store(bool __i, memory_order __m = memory_order_seq_cst) noexcept ; bool load(memory_order __m = memory_order_seq_cst) const noexcept ; }; template<typename _Tp> struct atomic { using value_type = _Tp; private: static constexpr int _S_min_alignment = (sizeof(_Tp) & (sizeof(_Tp) - 1)) || sizeof(_Tp) > 16 ? 0 : sizeof(_Tp); static constexpr int _S_alignment = _S_min_alignment > alignof(_Tp) ? _S_min_alignment : alignof(_Tp); alignas(_S_alignment) _Tp _M_i = _Tp(); static_assert(__is_trivially_copyable(_Tp), "std::atomic requires a trivially copyable type"); static_assert(sizeof(_Tp) > 0, "Incomplete or zero-sized types are not supported"); static_assert(is_copy_constructible_v<_Tp>); static_assert(is_move_constructible_v<_Tp>); static_assert(is_copy_assignable_v<_Tp>); static_assert(is_move_assignable_v<_Tp>); public: atomic& operator=(const atomic&) volatile = delete; constexpr atomic(_Tp __i) ; operator _Tp() const noexcept ; operator _Tp() const volatile noexcept ; _Tp operator=(_Tp __i) noexcept ; _Tp operator=(_Tp __i) volatile noexcept ; bool is_lock_free() const noexcept ; bool is_lock_free() const volatile noexcept ; static constexpr bool is_always_lock_free = __atomic_always_lock_free(sizeof(_M_i), 0); void store(_Tp __i, memory_order __m = memory_order_seq_cst) noexcept ; void store(_Tp __i, memory_order __m = memory_order_seq_cst) volatile noexcept ; _Tp load(memory_order __m = memory_order_seq_cst) const noexcept ; _Tp load(memory_order __m = memory_order_seq_cst) const volatile noexcept ; _Tp exchange(_Tp __i, memory_order __m = memory_order_seq_cst) noexcept ; _Tp exchange(_Tp __i, memory_order __m = memory_order_seq_cst) volatile noexcept ; bool compare_exchange_weak(_Tp& __e, _Tp __i, memory_order __s, memory_order __f) noexcept ; bool compare_exchange_weak(_Tp& __e, _Tp __i, memory_order __s, memory_order __f) volatile noexcept ; bool compare_exchange_weak(_Tp& __e, _Tp __i, memory_order __m = memory_order_seq_cst) noexcept ; bool compare_exchange_weak(_Tp& __e, _Tp __i, memory_order __m = memory_order_seq_cst) volatile noexcept ; bool compare_exchange_strong(_Tp& __e, _Tp __i, memory_order __s, memory_order __f) noexcept ; bool compare_exchange_strong(_Tp& __e, _Tp __i, memory_order __s, memory_order __f) volatile noexcept ; bool compare_exchange_strong(_Tp& __e, _Tp __i, memory_order __m = memory_order_seq_cst) noexcept ; bool compare_exchange_strong(_Tp& __e, _Tp __i, memory_order __m = memory_order_seq_cst) volatile noexcept ; void wait(_Tp __old, memory_order __m = memory_order_seq_cst) const noexcept ; void notify_one() noexcept ; void notify_all() noexcept ; }; template<typename _Tp> struct atomic<_Tp*> { using value_type = _Tp*; using difference_type = ptrdiff_t; typedef _Tp* __pointer_type; typedef __atomic_base<_Tp*> __base_type; __base_type _M_b; atomic() noexcept = default; ~atomic() noexcept = default; atomic(const atomic&) = delete; atomic& operator=(const atomic&) = delete; atomic& operator=(const atomic&) volatile = delete; constexpr atomic(__pointer_type __p) ; operator __pointer_type() const noexcept ; operator __pointer_type() const volatile noexcept ; __pointer_type operator=(__pointer_type __p) noexcept ; __pointer_type operator=(__pointer_type __p) volatile noexcept ; __pointer_type operator++(int) noexcept ; __pointer_type operator++(int) volatile noexcept ; __pointer_type operator--(int) noexcept ; __pointer_type operator--(int) volatile noexcept ; __pointer_type operator++() noexcept ; __pointer_type operator++() volatile noexcept ; __pointer_type operator--() noexcept ; __pointer_type operator--() volatile noexcept ; __pointer_type operator+=(ptrdiff_t __d) noexcept ; __pointer_type operator+=(ptrdiff_t __d) volatile noexcept ; __pointer_type operator-=(ptrdiff_t __d) noexcept ; __pointer_type operator-=(ptrdiff_t __d) volatile noexcept ; bool is_lock_free() const noexcept ; bool is_lock_free() const volatile noexcept ; static constexpr bool is_always_lock_free = 2 == 2; void store(__pointer_type __p, memory_order __m = memory_order_seq_cst) noexcept ; void store(__pointer_type __p, memory_order __m = memory_order_seq_cst) volatile noexcept ; __pointer_type load(memory_order __m = memory_order_seq_cst) const noexcept ; __pointer_type load(memory_order __m = memory_order_seq_cst) const volatile noexcept ; __pointer_type exchange(__pointer_type __p, memory_order __m = memory_order_seq_cst) noexcept ; __pointer_type exchange(__pointer_type __p, memory_order __m = memory_order_seq_cst) volatile noexcept ; bool compare_exchange_weak(__pointer_type& __p1, __pointer_type __p2, memory_order __m1, memory_order __m2) noexcept ; bool compare_exchange_weak(__pointer_type& __p1, __pointer_type __p2, memory_order __m1, memory_order __m2) volatile noexcept ; bool compare_exchange_weak(__pointer_type& __p1, __pointer_type __p2, memory_order __m = memory_order_seq_cst) noexcept ; bool compare_exchange_weak(__pointer_type& __p1, __pointer_type __p2, memory_order __m = memory_order_seq_cst) volatile noexcept ; bool compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, memory_order __m1, memory_order __m2) noexcept ; bool compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, memory_order __m1, memory_order __m2) volatile noexcept ; bool compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, memory_order __m = memory_order_seq_cst) noexcept ; bool compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, memory_order __m = memory_order_seq_cst) volatile noexcept ; void wait(__pointer_type __old, memory_order __m = memory_order_seq_cst) const noexcept ; void notify_one() noexcept ; void notify_all() noexcept ; __pointer_type fetch_add(ptrdiff_t __d, memory_order __m = memory_order_seq_cst) noexcept ; __pointer_type fetch_add(ptrdiff_t __d, memory_order __m = memory_order_seq_cst) volatile noexcept ; __pointer_type fetch_sub(ptrdiff_t __d, memory_order __m = memory_order_seq_cst) noexcept ; __pointer_type fetch_sub(ptrdiff_t __d, memory_order __m = memory_order_seq_cst) volatile noexcept ; }; template<> struct atomic<char> : __atomic_base<char> { typedef char __integral_type; typedef __atomic_base<char> __base_type; atomic() noexcept = default; ~atomic() noexcept = default; atomic(const atomic&) = delete; atomic& operator=(const atomic&) = delete; atomic& operator=(const atomic&) volatile = delete; constexpr atomic(__integral_type __i) ; using __base_type::operator __integral_type; using __base_type::operator=; static constexpr bool is_always_lock_free = 2 == 2; }; template<> struct atomic<signed char> : __atomic_base<signed char> { typedef signed char __integral_type; typedef __atomic_base<signed char> __base_type; atomic() noexcept= default; ~atomic() noexcept = default; atomic(const atomic&) = delete; atomic& operator=(const atomic&) = delete; atomic& operator=(const atomic&) volatile = delete; constexpr atomic(__integral_type __i) ; using __base_type::operator __integral_type; using __base_type::operator=; static constexpr bool is_always_lock_free = 2 == 2; }; template<> struct atomic<unsigned char> : __atomic_base<unsigned char> { typedef unsigned char __integral_type; typedef __atomic_base<unsigned char> __base_type; atomic() noexcept= default; ~atomic() noexcept = default; atomic(const atomic&) = delete; atomic& operator=(const atomic&) = delete; atomic& operator=(const atomic&) volatile = delete; constexpr atomic(__integral_type __i) ; using __base_type::operator __integral_type; using __base_type::operator=; static constexpr bool is_always_lock_free = 2 == 2; }; template<> struct atomic<short> : __atomic_base<short> { typedef short __integral_type; typedef __atomic_base<short> __base_type; atomic() noexcept = default; using __base_type::operator __integral_type; using __base_type::operator=; static constexpr bool is_always_lock_free = 2 == 2; }; template<> struct atomic<unsigned short> : __atomic_base<unsigned short> { typedef unsigned short __integral_type; typedef __atomic_base<unsigned short> __base_type; using __base_type::operator __integral_type; using __base_type::operator=; static constexpr bool is_always_lock_free = 2 == 2; }; template<> struct atomic<int> : __atomic_base<int> { typedef int __integral_type; typedef __atomic_base<int> __base_type; using __base_type::operator __integral_type; using __base_type::operator=; static constexpr bool is_always_lock_free = 2 == 2; }; template<> struct atomic<unsigned int> : __atomic_base<unsigned int> { typedef unsigned int __integral_type; typedef __atomic_base<unsigned int> __base_type; atomic() noexcept = default; constexpr atomic(__integral_type __i) ; using __base_type::operator __integral_type; using __base_type::operator=; static constexpr bool is_always_lock_free = 2 == 2; }; template<> struct atomic<long> : __atomic_base<long> { typedef long __integral_type; typedef __atomic_base<long> __base_type; using __base_type::operator __integral_type; using __base_type::operator=; static constexpr bool is_always_lock_free = 2 == 2; }; template<> struct atomic<unsigned long> : __atomic_base<unsigned long> { typedef unsigned long __integral_type; typedef __atomic_base<unsigned long> __base_type; constexpr atomic(__integral_type __i) ; using __base_type::operator __integral_type; using __base_type::operator=; static constexpr bool is_always_lock_free = 2 == 2; }; template<> struct atomic<long long> : __atomic_base<long long> { typedef long long __integral_type; typedef __atomic_base<long long> __base_type; using __base_type::operator __integral_type; using __base_type::operator=; static constexpr bool is_always_lock_free = 2 == 2; }; template<> struct atomic<unsigned long long> : __atomic_base<unsigned long long> { typedef unsigned long long __integral_type; typedef __atomic_base<unsigned long long> __base_type; using __base_type::operator __integral_type; using __base_type::operator=; static constexpr bool is_always_lock_free = 2 == 2; }; template<> struct atomic<wchar_t> : __atomic_base<wchar_t> { typedef wchar_t __integral_type; typedef __atomic_base<wchar_t> __base_type; using __base_type::operator __integral_type; using __base_type::operator=; static constexpr bool is_always_lock_free = 2 == 2; }; template<> struct atomic<char8_t> : __atomic_base<char8_t> { typedef char8_t __integral_type; typedef __atomic_base<char8_t> __base_type; atomic() noexcept = default; ~atomic() noexcept = default; atomic(const atomic&) = delete; atomic& operator=(const atomic&) = delete; atomic& operator=(const atomic&) volatile = delete; constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } using __base_type::operator __integral_type; using __base_type::operator=; static constexpr bool is_always_lock_free = 2 == 2; }; template<> struct atomic<char16_t> : __atomic_base<char16_t> { typedef char16_t __integral_type; typedef __atomic_base<char16_t> __base_type; using __base_type::operator __integral_type; using __base_type::operator=; static constexpr bool is_always_lock_free = 2 == 2; }; template<> struct atomic<char32_t> : __atomic_base<char32_t> { typedef char32_t __integral_type; typedef __atomic_base<char32_t> __base_type; using __base_type::operator __integral_type; using __base_type::operator=; static constexpr bool is_always_lock_free = 2 == 2; }; typedef atomic<bool> atomic_bool; typedef atomic<char> atomic_char; typedef atomic<signed char> atomic_schar; typedef atomic<unsigned char> atomic_uchar; typedef atomic<short> atomic_short; typedef atomic<unsigned short> atomic_ushort; typedef atomic<int> atomic_int; typedef atomic<unsigned int> atomic_uint; typedef atomic<long> atomic_long; typedef atomic<unsigned long> atomic_ulong; typedef atomic<long long> atomic_llong; typedef atomic<unsigned long long> atomic_ullong; typedef atomic<wchar_t> atomic_wchar_t; typedef atomic<char8_t> atomic_char8_t; typedef atomic<char16_t> atomic_char16_t; typedef atomic<char32_t> atomic_char32_t; typedef atomic<int8_t> atomic_int8_t; typedef atomic<uint8_t> atomic_uint8_t; typedef atomic<int16_t> atomic_int16_t; typedef atomic<uint16_t> atomic_uint16_t; typedef atomic<int32_t> atomic_int32_t; typedef atomic<uint32_t> atomic_uint32_t; typedef atomic<int64_t> atomic_int64_t; typedef atomic<uint64_t> atomic_uint64_t; typedef atomic<int_least8_t> atomic_int_least8_t; typedef atomic<uint_least8_t> atomic_uint_least8_t; typedef atomic<int_least16_t> atomic_int_least16_t; typedef atomic<uint_least16_t> atomic_uint_least16_t; typedef atomic<int_least32_t> atomic_int_least32_t; typedef atomic<uint_least32_t> atomic_uint_least32_t; typedef atomic<int_least64_t> atomic_int_least64_t; typedef atomic<uint_least64_t> atomic_uint_least64_t; typedef atomic<int_fast8_t> atomic_int_fast8_t; typedef atomic<uint_fast8_t> atomic_uint_fast8_t; typedef atomic<int_fast16_t> atomic_int_fast16_t; typedef atomic<uint_fast16_t> atomic_uint_fast16_t; typedef atomic<int_fast32_t> atomic_int_fast32_t; typedef atomic<uint_fast32_t> atomic_uint_fast32_t; typedef atomic<int_fast64_t> atomic_int_fast64_t; typedef atomic<uint_fast64_t> atomic_uint_fast64_t; typedef atomic<intptr_t> atomic_intptr_t; typedef atomic<uintptr_t> atomic_uintptr_t; typedef atomic<size_t> atomic_size_t; typedef atomic<ptrdiff_t> atomic_ptrdiff_t; typedef atomic<intmax_t> atomic_intmax_t; typedef atomic<uintmax_t> atomic_uintmax_t; template<typename _Tp> using __atomic_val_t = __type_identity_t<_Tp>; template<typename _Tp> using __atomic_diff_t = typename atomic<_Tp>::difference_type; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; template<> struct atomic<float> : __atomic_float<float> { using __atomic_float<float>::operator=; }; template<> struct atomic<double> : __atomic_float<double> { using __atomic_float<double>::operator=; }; template<> struct atomic<long double> : __atomic_float<long double> { using __atomic_float<long double>::operator=; }; template<typename _Tp> struct atomic_ref : __atomic_ref<_Tp> { using __atomic_ref<_Tp>::operator=; }; using atomic_signed_lock_free = atomic<make_signed_t<__detail::__platform_wait_t>>; using atomic_unsigned_lock_free = atomic<make_unsigned_t<__detail::__platform_wait_t>>; } extern "C" { typedef float float_t; typedef double double_t; enum { FP_INT_UPWARD = 0, FP_INT_DOWNWARD = 1, FP_INT_TOWARDZERO = 2, FP_INT_TONEARESTFROMZERO = 3, FP_INT_TONEAREST = 4, }; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; extern double nextafter (double __x, double __y) noexcept (true); ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; extern int signgam; enum { FP_NAN = 0, FP_INFINITE = 1, FP_ZERO = 2, FP_SUBNORMAL = 3, FP_NORMAL = 4 }; ; extern "C++" { ; ; ; } extern "C++" { ; ; ; } extern "C++" { ; } extern "C++" { template<typename> struct __iseqsig_type; template<> struct __iseqsig_type<float> { }; template<> struct __iseqsig_type<double> { }; template<> struct __iseqsig_type<long double> { }; ; } } extern "C++" { namespace std __attribute__ ((__visibility__ ("default"))) { ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; constexpr bool isfinite(float __x) ; ; constexpr bool isinf(float __x) ; ; ; ; constexpr bool signbit(double __x) ; ; ; ; ; ; ; ; using ::double_t; using ::float_t; using ::nextafter; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; } namespace std __attribute__ ((__visibility__ ("default"))) { namespace __detail { template<typename _Tp> struct __floating_point_constant { static const _Tp __value; }; template<typename _Tp> struct __numeric_constants { }; ; } } namespace std __attribute__ ((__visibility__ ("default"))) { namespace __detail { ; ; ; ; ; ; ; ; ; ; ; ; ; } } namespace std __attribute__ ((__visibility__ ("default"))) { namespace __detail { ; ; ; ; ; ; ; ; ; } } namespace std __attribute__ ((__visibility__ ("default"))) { namespace __detail { ; ; ; ; } } namespace std __attribute__ ((__visibility__ ("default"))) { namespace __detail { ; ; ; ; ; ; ; ; ; ; ; ; } } namespace std __attribute__ ((__visibility__ ("default"))) { namespace __detail { ; ; ; ; ; ; ; ; ; ; ; ; ; ; } } namespace std __attribute__ ((__visibility__ ("default"))) { namespace __detail { ; ; ; ; ; ; ; } } namespace std __attribute__ ((__visibility__ ("default"))) { namespace __detail { ; ; ; } } namespace std __attribute__ ((__visibility__ ("default"))) { namespace __detail { ; ; ; ; ; } } namespace std __attribute__ ((__visibility__ ("default"))) { namespace __detail { ; ; } } namespace std __attribute__ ((__visibility__ ("default"))) { namespace __detail { ; ; ; ; ; ; } } namespace std __attribute__ ((__visibility__ ("default"))) { namespace __detail { ; ; ; ; ; ; ; } } namespace std __attribute__ ((__visibility__ ("default"))) { ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; } } namespace std __attribute__ ((__visibility__ ("default"))) { #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" template <class _OutputIterator, class _Tp> class [[__deprecated__]] raw_storage_iterator : public iterator<output_iterator_tag, void, void, void, void> { protected: _OutputIterator _M_iter; public: }; #pragma GCC diagnostic pop } namespace std __attribute__ ((__visibility__ ("default"))) { struct _Sp_locker { private: unsigned char _M_key1; unsigned char _M_key2; }; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; template<typename _Tp> struct atomic; template<typename _Up> static constexpr bool __is_shared_ptr = false; template<typename _Up> static constexpr bool __is_shared_ptr<shared_ptr<_Up>> = true; template<typename _Tp> class _Sp_atomic { using value_type = _Tp; friend struct atomic<_Tp>; struct _Atomic_count { using __count_type = decltype(_Tp::_M_refcount); using pointer = decltype(__count_type::_M_pi); static_assert(alignof(remove_pointer_t<pointer>) > 1); private: mutable __atomic_base<uintptr_t> _M_val{0}; static constexpr uintptr_t _S_lock_bit{1}; }; typename _Tp::element_type* _M_ptr = nullptr; _Atomic_count _M_refcount; }; template<typename _Tp> struct atomic<shared_ptr<_Tp>> { public: using value_type = shared_ptr<_Tp>; static constexpr bool is_always_lock_free = false; private: _Sp_atomic<shared_ptr<_Tp>> _M_impl; }; template<typename _Tp> struct atomic<weak_ptr<_Tp>> { public: using value_type = weak_ptr<_Tp>; static constexpr bool is_always_lock_free = false; private: _Sp_atomic<weak_ptr<_Tp>> _M_impl; }; } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Tp1> struct auto_ptr_ref { _Tp1* _M_ptr; } __attribute__ ((__deprecated__)); #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" template<typename _Tp> class auto_ptr { private: _Tp* _M_ptr; public: typedef _Tp element_type; ; ; ~auto_ptr() ; element_type& operator*() const throw() ; element_type* operator->() const throw() ; element_type* get() const throw() ; element_type* release() throw() ; void reset(element_type* __p = 0) throw() ; auto_ptr(auto_ptr_ref<element_type> __ref) throw() ; auto_ptr& operator=(auto_ptr_ref<element_type> __ref) throw() ; template<typename _Tp1> operator auto_ptr_ref<_Tp1>() throw() ; template<typename _Tp1> operator auto_ptr<_Tp1>() throw() ; } __attribute__ ((__deprecated__ ("use '" "std::unique_ptr" "' instead"))); template<> class auto_ptr<void> { public: typedef void element_type; } __attribute__ ((__deprecated__)); #pragma GCC diagnostic pop } namespace std __attribute__ ((__visibility__ ("default"))) { namespace ranges { namespace __detail { template<typename _Tp> constexpr void* __voidify(_Tp& __obj) noexcept ; template<typename _Iter> concept __nothrow_input_iterator = (input_iterator<_Iter> && is_lvalue_reference_v<iter_reference_t<_Iter>> && same_as<remove_cvref_t<iter_reference_t<_Iter>>, iter_value_t<_Iter>>); template<typename _Sent, typename _Iter> concept __nothrow_sentinel = sentinel_for<_Sent, _Iter>; template<typename _Range> concept __nothrow_input_range = (range<_Range> && __nothrow_input_iterator<iterator_t<_Range>> && __nothrow_sentinel<sentinel_t<_Range>, iterator_t<_Range>>); template<typename _Iter> concept __nothrow_forward_iterator = (__nothrow_input_iterator<_Iter> && forward_iterator<_Iter> && __nothrow_sentinel<_Iter, _Iter>); template<typename _Range> concept __nothrow_forward_range = (__nothrow_input_range<_Range> && __nothrow_forward_iterator<iterator_t<_Range>>); } struct __destroy_fn { template<__detail::__nothrow_input_iterator _Iter, __detail::__nothrow_sentinel<_Iter> _Sent> requires destructible<iter_value_t<_Iter>> constexpr _Iter operator()(_Iter __first, _Sent __last) const noexcept; template<__detail::__nothrow_input_range _Range> requires destructible<range_value_t<_Range>> constexpr borrowed_iterator_t<_Range> operator()(_Range&& __r) const noexcept; }; inline constexpr __destroy_fn destroy{}; namespace __detail { template<typename _Iter> requires destructible<iter_value_t<_Iter>> struct _DestroyGuard { private: _Iter _M_first; const _Iter* _M_cur; public: explicit _DestroyGuard(const _Iter& __iter) ; void release() noexcept ; ~_DestroyGuard() ; }; template<typename _Iter> requires destructible<iter_value_t<_Iter>> && is_trivially_destructible_v<iter_value_t<_Iter>> struct _DestroyGuard<_Iter> { explicit _DestroyGuard(const _Iter&) ; void release() noexcept ; }; } struct __uninitialized_default_construct_fn { template<__detail::__nothrow_forward_iterator _Iter, __detail::__nothrow_sentinel<_Iter> _Sent> requires default_initializable<iter_value_t<_Iter>> _Iter operator()(_Iter __first, _Sent __last) const ; template<__detail::__nothrow_forward_range _Range> requires default_initializable<range_value_t<_Range>> borrowed_iterator_t<_Range> operator()(_Range&& __r) const ; }; inline constexpr __uninitialized_default_construct_fn uninitialized_default_construct{}; struct __uninitialized_default_construct_n_fn { template<__detail::__nothrow_forward_iterator _Iter> requires default_initializable<iter_value_t<_Iter>> _Iter operator()(_Iter __first, iter_difference_t<_Iter> __n) const ; }; inline constexpr __uninitialized_default_construct_n_fn uninitialized_default_construct_n; struct __uninitialized_value_construct_fn { template<__detail::__nothrow_forward_iterator _Iter, __detail::__nothrow_sentinel<_Iter> _Sent> requires default_initializable<iter_value_t<_Iter>> _Iter operator()(_Iter __first, _Sent __last) const ; template<__detail::__nothrow_forward_range _Range> requires default_initializable<range_value_t<_Range>> borrowed_iterator_t<_Range> operator()(_Range&& __r) const ; }; inline constexpr __uninitialized_value_construct_fn uninitialized_value_construct{}; struct __uninitialized_value_construct_n_fn { template<__detail::__nothrow_forward_iterator _Iter> requires default_initializable<iter_value_t<_Iter>> _Iter operator()(_Iter __first, iter_difference_t<_Iter> __n) const ; }; inline constexpr __uninitialized_value_construct_n_fn uninitialized_value_construct_n; template<typename _Iter, typename _Out> using uninitialized_copy_result = in_out_result<_Iter, _Out>; struct __uninitialized_copy_fn { template<input_iterator _Iter, sentinel_for<_Iter> _ISent, __detail::__nothrow_forward_iterator _Out, __detail::__nothrow_sentinel<_Out> _OSent> requires constructible_from<iter_value_t<_Out>, iter_reference_t<_Iter>> uninitialized_copy_result<_Iter, _Out> operator()(_Iter __ifirst, _ISent __ilast, _Out __ofirst, _OSent __olast) const ; template<input_range _IRange, __detail::__nothrow_forward_range _ORange> requires constructible_from<range_value_t<_ORange>, range_reference_t<_IRange>> uninitialized_copy_result<borrowed_iterator_t<_IRange>, borrowed_iterator_t<_ORange>> operator()(_IRange&& __inr, _ORange&& __outr) const ; }; inline constexpr __uninitialized_copy_fn uninitialized_copy{}; template<typename _Iter, typename _Out> using uninitialized_copy_n_result = in_out_result<_Iter, _Out>; struct __uninitialized_copy_n_fn { template<input_iterator _Iter, __detail::__nothrow_forward_iterator _Out, __detail::__nothrow_sentinel<_Out> _Sent> requires constructible_from<iter_value_t<_Out>, iter_reference_t<_Iter>> uninitialized_copy_n_result<_Iter, _Out> operator()(_Iter __ifirst, iter_difference_t<_Iter> __n, _Out __ofirst, _Sent __olast) const ; }; inline constexpr __uninitialized_copy_n_fn uninitialized_copy_n{}; template<typename _Iter, typename _Out> using uninitialized_move_result = in_out_result<_Iter, _Out>; struct __uninitialized_move_fn { template<input_iterator _Iter, sentinel_for<_Iter> _ISent, __detail::__nothrow_forward_iterator _Out, __detail::__nothrow_sentinel<_Out> _OSent> requires constructible_from<iter_value_t<_Out>, iter_rvalue_reference_t<_Iter>> uninitialized_move_result<_Iter, _Out> operator()(_Iter __ifirst, _ISent __ilast, _Out __ofirst, _OSent __olast) const ; template<input_range _IRange, __detail::__nothrow_forward_range _ORange> requires constructible_from<range_value_t<_ORange>, range_rvalue_reference_t<_IRange>> uninitialized_move_result<borrowed_iterator_t<_IRange>, borrowed_iterator_t<_ORange>> operator()(_IRange&& __inr, _ORange&& __outr) const ; }; inline constexpr __uninitialized_move_fn uninitialized_move{}; template<typename _Iter, typename _Out> using uninitialized_move_n_result = in_out_result<_Iter, _Out>; struct __uninitialized_move_n_fn { template<input_iterator _Iter, __detail::__nothrow_forward_iterator _Out, __detail::__nothrow_sentinel<_Out> _Sent> requires constructible_from<iter_value_t<_Out>, iter_rvalue_reference_t<_Iter>> uninitialized_move_n_result<_Iter, _Out> operator()(_Iter __ifirst, iter_difference_t<_Iter> __n, _Out __ofirst, _Sent __olast) const ; }; inline constexpr __uninitialized_move_n_fn uninitialized_move_n{}; struct __uninitialized_fill_fn { template<__detail::__nothrow_forward_iterator _Iter, __detail::__nothrow_sentinel<_Iter> _Sent, typename _Tp> requires constructible_from<iter_value_t<_Iter>, const _Tp&> _Iter operator()(_Iter __first, _Sent __last, const _Tp& __x) const ; template<__detail::__nothrow_forward_range _Range, typename _Tp> requires constructible_from<range_value_t<_Range>, const _Tp&> borrowed_iterator_t<_Range> operator()(_Range&& __r, const _Tp& __x) const ; }; inline constexpr __uninitialized_fill_fn uninitialized_fill{}; struct __uninitialized_fill_n_fn { template<__detail::__nothrow_forward_iterator _Iter, typename _Tp> requires constructible_from<iter_value_t<_Iter>, const _Tp&> _Iter operator()(_Iter __first, iter_difference_t<_Iter> __n, const _Tp& __x) const ; }; inline constexpr __uninitialized_fill_n_fn uninitialized_fill_n{}; struct __construct_at_fn { template<typename _Tp, typename... _Args> requires requires { ::new (std::declval<void*>()) _Tp(std::declval<_Args>()...); } constexpr _Tp* operator()(_Tp* __location, _Args&&... __args) const noexcept(noexcept(std::construct_at(__location, std::forward<_Args>(__args)...))) ; }; inline constexpr __construct_at_fn construct_at{}; struct __destroy_at_fn { template<destructible _Tp> constexpr void operator()(_Tp* __location) const noexcept ; }; inline constexpr __destroy_at_fn destroy_at{}; struct __destroy_n_fn { template<__detail::__nothrow_input_iterator _Iter> requires destructible<iter_value_t<_Iter>> constexpr _Iter operator()(_Iter __first, iter_difference_t<_Iter> __n) const noexcept ; }; inline constexpr __destroy_n_fn destroy_n{}; } } namespace std __attribute__ ((__visibility__ ("default"))) { enum class pointer_safety { relaxed, preferred, strict }; void declare_reachable(void*) ; template <typename _Tp> _Tp* undeclare_reachable(_Tp* __p) ; void declare_no_pointers(char*, size_t) ; void undeclare_no_pointers(char*, size_t) ; pointer_safety get_pointer_safety() noexcept ; } namespace std { template <class _ExecutionPolicy, class _InputIterator, class _ForwardIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> uninitialized_copy(_ExecutionPolicy&& __exec, _InputIterator __first, _InputIterator __last, _ForwardIterator __result); template <class _ExecutionPolicy, class _InputIterator, class _Size, class _ForwardIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> uninitialized_copy_n(_ExecutionPolicy&& __exec, _InputIterator __first, _Size __n, _ForwardIterator __result); template <class _ExecutionPolicy, class _InputIterator, class _ForwardIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> uninitialized_move(_ExecutionPolicy&& __exec, _InputIterator __first, _InputIterator __last, _ForwardIterator __result); template <class _ExecutionPolicy, class _InputIterator, class _Size, class _ForwardIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> uninitialized_move_n(_ExecutionPolicy&& __exec, _InputIterator __first, _Size __n, _ForwardIterator __result); template <class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> uninitialized_fill(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value); template <class _ExecutionPolicy, class _ForwardIterator, class _Size, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> uninitialized_fill_n(_ExecutionPolicy&& __exec, _ForwardIterator __first, _Size __n, const _Tp& __value); template <class _ExecutionPolicy, class _ForwardIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> destroy(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last); template <class _ExecutionPolicy, class _ForwardIterator, class _Size> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> destroy_n(_ExecutionPolicy&& __exec, _ForwardIterator __first, _Size __n); template <class _ExecutionPolicy, class _ForwardIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> uninitialized_default_construct(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last); template <class _ExecutionPolicy, class _ForwardIterator, class _Size> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> uninitialized_default_construct_n(_ExecutionPolicy&& __exec, _ForwardIterator __first, _Size __n); template <class _ExecutionPolicy, class _ForwardIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> uninitialized_value_construct(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last); template <class _ExecutionPolicy, class _ForwardIterator, class _Size> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> uninitialized_value_construct_n(_ExecutionPolicy&& __exec, _ForwardIterator __first, _Size __n); } namespace fmt { inline namespace v10 { template <bool B, typename T = void> using enable_if_t = typename std::enable_if<B, T>::type; template <bool B, typename T, typename F> using conditional_t = typename std::conditional<B, T, F>::type; template <bool B> using bool_constant = std::integral_constant<bool, B>; template <typename T> using remove_reference_t = typename std::remove_reference<T>::type; template <typename T> using remove_const_t = typename std::remove_const<T>::type; template <typename T> using remove_cvref_t = typename std::remove_cv<remove_reference_t<T>>::type; template <typename T> struct type_identity { using type = T; }; template <typename T> using type_identity_t = typename type_identity<T>::type; template <typename T> using underlying_t = typename std::underlying_type<T>::type; template <typename T> struct is_contiguous : std::false_type {}; template <typename Char> struct is_contiguous<std::basic_string<Char>> : std::true_type {}; struct monostate { constexpr monostate() ; }; template <typename T, fmt::enable_if_t<(std::is_same<T, std::byte>::value), int> = 0> auto format_as(T b) -> unsigned char ; namespace detail { template <typename... T> constexpr void ignore_unused(const T&...) ; constexpr __attribute__((always_inline)) auto is_constant_evaluated( bool default_value = false) noexcept -> bool ; template <typename T> constexpr __attribute__((always_inline)) auto const_check(T value) -> T ; [[noreturn]] void assert_fail(const char* file, int line, const char* message); template <typename Char> using std_string_view = std::basic_string_view<Char>; using int128_opt = __int128_t; using uint128_opt = __uint128_t; template <typename T> auto convert_for_visit(T value) -> T ; template <typename Int> constexpr auto to_unsigned(Int value) -> typename std::make_unsigned<Int>::type ; constexpr auto is_utf8() -> bool ; } template <typename Char> class basic_string_view { private: const Char* data_; size_t size_; public: using value_type = Char; using iterator = const Char*; constexpr basic_string_view() ; constexpr basic_string_view(const Char* s, size_t count) ; constexpr __attribute__((always_inline)) basic_string_view(const Char* s) ; template <typename Traits, typename Alloc> constexpr basic_string_view( const std::basic_string<Char, Traits, Alloc>& s) ; template <typename S, fmt::enable_if_t<(std::is_same< S, detail::std_string_view<Char>>::value), int> = 0> constexpr basic_string_view(S s) ; constexpr auto data() const noexcept -> const Char* ; constexpr auto size() const noexcept -> size_t ; constexpr auto begin() const noexcept -> iterator ; constexpr auto end() const noexcept -> iterator ; constexpr auto operator[](size_t pos) const noexcept -> const Char& ; constexpr void remove_prefix(size_t n) noexcept ; constexpr auto starts_with( basic_string_view<Char> sv) const noexcept -> bool ; constexpr auto starts_with(Char c) const noexcept -> bool ; constexpr auto starts_with(const Char* s) const -> bool ; constexpr auto compare(basic_string_view other) const -> int ; constexpr friend auto operator==(basic_string_view lhs, basic_string_view rhs) -> bool ; friend auto operator!=(basic_string_view lhs, basic_string_view rhs) -> bool ; friend auto operator<(basic_string_view lhs, basic_string_view rhs) -> bool ; friend auto operator<=(basic_string_view lhs, basic_string_view rhs) -> bool ; friend auto operator>(basic_string_view lhs, basic_string_view rhs) -> bool ; friend auto operator>=(basic_string_view lhs, basic_string_view rhs) -> bool ; }; using string_view = basic_string_view<char>; template <typename T> struct is_char : std::false_type {}; template <> struct is_char<char> : std::true_type {}; namespace detail { struct compile_string {}; template <typename S> struct is_compile_string : std::is_base_of<compile_string, S> {}; template <typename Char, fmt::enable_if_t<(is_char<Char>::value), int> = 0> __attribute__((always_inline)) auto to_string_view(const Char* s) -> basic_string_view<Char> ; template <typename Char, typename Traits, typename Alloc> auto to_string_view(const std::basic_string<Char, Traits, Alloc>& s) -> basic_string_view<Char> ; template <typename Char> constexpr auto to_string_view(basic_string_view<Char> s) -> basic_string_view<Char> ; template <typename Char, fmt::enable_if_t<(!std::is_empty<std_string_view<Char>>::value), int> = 0> auto to_string_view(std_string_view<Char> s) -> basic_string_view<Char> ; template <typename S, fmt::enable_if_t<(is_compile_string<S>::value), int> = 0> constexpr auto to_string_view(const S& s) -> basic_string_view<typename S::char_type> ; void to_string_view(...); template <typename S> struct is_string : std::is_class<decltype(detail::to_string_view(std::declval<S>()))> {}; template <typename S, typename = void> struct char_t_impl {}; template <typename S> struct char_t_impl<S, enable_if_t<is_string<S>::value>> { using result = decltype(to_string_view(std::declval<S>())); using type = typename result::value_type; }; enum class type { none_type, int_type, uint_type, long_long_type, ulong_long_type, int128_type, uint128_type, bool_type, char_type, last_integer_type = char_type, float_type, double_type, long_double_type, last_numeric_type = long_double_type, cstring_type, string_type, pointer_type, custom_type }; template <typename T, typename Char> struct type_constant : std::integral_constant<type, type::custom_type> {}; template <typename Char> struct type_constant<int, Char> : std::integral_constant<type, type::int_type> {}; template <typename Char> struct type_constant<unsigned, Char> : std::integral_constant<type, type::uint_type> {}; template <typename Char> struct type_constant<long long, Char> : std::integral_constant<type, type::long_long_type> {}; template <typename Char> struct type_constant<unsigned long long, Char> : std::integral_constant<type, type::ulong_long_type> {}; template <typename Char> struct type_constant<int128_opt, Char> : std::integral_constant<type, type::int128_type> {}; template <typename Char> struct type_constant<uint128_opt, Char> : std::integral_constant<type, type::uint128_type> {}; template <typename Char> struct type_constant<bool, Char> : std::integral_constant<type, type::bool_type> {}; template <typename Char> struct type_constant<Char, Char> : std::integral_constant<type, type::char_type> {}; template <typename Char> struct type_constant<float, Char> : std::integral_constant<type, type::float_type> {}; template <typename Char> struct type_constant<double, Char> : std::integral_constant<type, type::double_type> {}; template <typename Char> struct type_constant<long double, Char> : std::integral_constant<type, type::long_double_type> {}; template <typename Char> struct type_constant<const Char*, Char> : std::integral_constant<type, type::cstring_type> {}; template <typename Char> struct type_constant<basic_string_view<Char>, Char> : std::integral_constant<type, type::string_type> {}; template <typename Char> struct type_constant<const void*, Char> : std::integral_constant<type, type::pointer_type> {}; constexpr auto is_integral_type(type t) -> bool ; constexpr auto is_arithmetic_type(type t) -> bool { return t > type::none_type && t <= type::last_numeric_type; } constexpr auto set(type rhs) -> int { return 1 << static_cast<int>(rhs); } constexpr auto in(type t, int set) -> bool { return ((set >> static_cast<int>(t)) & 1) != 0; } enum { sint_set = set(type::int_type) | set(type::long_long_type) | set(type::int128_type), uint_set = set(type::uint_type) | set(type::ulong_long_type) | set(type::uint128_type), bool_set = set(type::bool_type), char_set = set(type::char_type), float_set = set(type::float_type) | set(type::double_type) | set(type::long_double_type), string_set = set(type::string_type), cstring_set = set(type::cstring_type), pointer_set = set(type::pointer_type) }; [[noreturn]] void throw_format_error(const char* message); struct error_handler { constexpr error_handler() = default; [[noreturn]] void on_error(const char* message) { throw_format_error(message); } }; } using detail::throw_format_error; template <typename S> using char_t = typename detail::char_t_impl<S>::type; template <typename Char> class basic_format_parse_context { private: basic_string_view<Char> format_str_; int next_arg_id_; constexpr void do_check_arg_id(int id); public: using char_type = Char; using iterator = const Char*; explicit constexpr basic_format_parse_context( basic_string_view<Char> format_str, int next_arg_id = 0) ; constexpr auto begin() const noexcept -> iterator ; constexpr auto end() const noexcept -> iterator ; constexpr void advance_to(iterator it) ; constexpr auto next_arg_id() -> int ; constexpr void check_arg_id(int id) ; constexpr void check_arg_id(basic_string_view<Char>) ; constexpr void check_dynamic_spec(int arg_id); }; using format_parse_context = basic_format_parse_context<char>; namespace detail { template <typename Char> class compile_parse_context : public basic_format_parse_context<Char> { private: int num_args_; const type* types_; using base = basic_format_parse_context<Char>; public: explicit constexpr compile_parse_context( basic_string_view<Char> format_str, int num_args, const type* types, int next_arg_id = 0) ; constexpr auto num_args() const -> int ; constexpr auto arg_type(int id) const -> type ; constexpr auto next_arg_id() -> int ; constexpr void check_arg_id(int id) ; using base::check_arg_id; constexpr void check_dynamic_spec(int arg_id) ; }; template <typename Container> auto get_container(std::back_insert_iterator<Container> it) -> Container& ; template <typename Char, typename InputIt, typename OutputIt> constexpr auto copy_str(InputIt begin, InputIt end, OutputIt out) -> OutputIt ; template <typename Char, typename T, typename U, fmt::enable_if_t<(std::is_same<remove_const_t<T>, U>::value&& is_char<U>::value), int> = 0> constexpr auto copy_str(T* begin, T* end, U* out) -> U* ; template <typename T> class buffer { private: T* ptr_; size_t size_; size_t capacity_; protected: constexpr buffer(size_t sz) ; constexpr buffer(T* p = nullptr, size_t sz = 0, size_t cap = 0) ; constexpr ~buffer() = default; buffer(buffer&&) = default; constexpr void set(T* buf_data, size_t buf_capacity) noexcept ; virtual constexpr void grow(size_t capacity) = 0; public: using value_type = T; using const_reference = const T&; buffer(const buffer&) = delete; void operator=(const buffer&) = delete; __attribute__((always_inline)) auto begin() noexcept -> T* ; __attribute__((always_inline)) auto end() noexcept -> T* ; __attribute__((always_inline)) auto begin() const noexcept -> const T* ; __attribute__((always_inline)) auto end() const noexcept -> const T* ; constexpr auto size() const noexcept -> size_t ; constexpr auto capacity() const noexcept -> size_t ; constexpr auto data() noexcept -> T* ; constexpr auto data() const noexcept -> const T* ; void clear() ; constexpr void try_resize(size_t count) ; constexpr void try_reserve(size_t new_capacity) ; constexpr void push_back(const T& value) ; template <typename U> void append(const U* begin, const U* end); template <typename Idx> constexpr auto operator[](Idx index) -> T& ; template <typename Idx> constexpr auto operator[](Idx index) const -> const T& ; }; struct buffer_traits { explicit buffer_traits(size_t) ; auto count() const -> size_t ; auto limit(size_t size) -> size_t ; }; class fixed_buffer_traits { private: size_t count_ = 0; size_t limit_; public: explicit fixed_buffer_traits(size_t limit) ; auto count() const -> size_t ; auto limit(size_t size) -> size_t ; }; template <typename OutputIt, typename T, typename Traits = buffer_traits> class iterator_buffer final : public Traits, public buffer<T> { private: OutputIt out_; enum { buffer_size = 256 }; T data_[buffer_size]; protected: constexpr void grow(size_t) override ; void flush() ; public: explicit iterator_buffer(OutputIt out, size_t n = buffer_size) ; iterator_buffer(iterator_buffer&& other) ; ~iterator_buffer() ; auto out() -> OutputIt ; auto count() const -> size_t ; }; template <typename T> class iterator_buffer<T*, T, fixed_buffer_traits> final : public fixed_buffer_traits, public buffer<T> { private: T* out_; enum { buffer_size = 256 }; T data_[buffer_size]; protected: constexpr void grow(size_t) override ; void flush() ; public: explicit iterator_buffer(T* out, size_t n = buffer_size) ; iterator_buffer(iterator_buffer&& other) ; ~iterator_buffer() ; auto out() -> T* ; auto count() const -> size_t ; }; template <typename T> class iterator_buffer<T*, T> final : public buffer<T> { protected: constexpr void grow(size_t) override ; public: explicit iterator_buffer(T* out, size_t = 0) ; auto out() -> T* ; }; template <typename Container> class iterator_buffer<std::back_insert_iterator<Container>, enable_if_t<is_contiguous<Container>::value, typename Container::value_type>> final : public buffer<typename Container::value_type> { private: Container& container_; protected: constexpr void grow(size_t capacity) override ; public: explicit iterator_buffer(Container& c) ; explicit iterator_buffer(std::back_insert_iterator<Container> out, size_t = 0) ; auto out() -> std::back_insert_iterator<Container> ; }; template <typename T = char> class counting_buffer final : public buffer<T> { private: enum { buffer_size = 256 }; T data_[buffer_size]; size_t count_ = 0; protected: constexpr void grow(size_t) override ; public: counting_buffer() ; auto count() -> size_t ; }; } template <typename Context> class basic_format_arg; template <typename Context> class basic_format_args; template <typename Context> class dynamic_format_arg_store; template <typename T, typename Char = char, typename Enable = void> struct formatter { formatter() = delete; }; template <typename T, typename Context> using has_formatter = std::is_constructible<typename Context::template formatter_type<T>>; class appender : public std::back_insert_iterator<detail::buffer<char>> { using base = std::back_insert_iterator<detail::buffer<char>>; public: using std::back_insert_iterator<detail::buffer<char>>::back_insert_iterator; appender(base it) ; using unchecked_type = appender; auto operator++() noexcept -> appender& ; auto operator++(int) noexcept -> appender ; }; namespace detail { template <typename Context, typename T> constexpr auto has_const_formatter_impl(T*) -> decltype(typename Context::template formatter_type<T>().format( std::declval<const T&>(), std::declval<Context&>()), true) ; template <typename Context> constexpr auto has_const_formatter_impl(...) -> bool ; template <typename T, typename Context> constexpr auto has_const_formatter() -> bool ; template <typename T> using buffer_appender = conditional_t<std::is_same<T, char>::value, appender, std::back_insert_iterator<buffer<T>>>; template <typename T, typename OutputIt> auto get_buffer(OutputIt out) -> iterator_buffer<OutputIt, T> ; template <typename T, typename Buf, fmt::enable_if_t<(std::is_base_of<buffer<char>, Buf>::value), int> = 0> auto get_buffer(std::back_insert_iterator<Buf> out) -> buffer<char>& ; template <typename Buf, typename OutputIt> __attribute__((always_inline)) auto get_iterator(Buf& buf, OutputIt) -> decltype(buf.out()) ; template <typename T, typename OutputIt> auto get_iterator(buffer<T>&, OutputIt out) -> OutputIt ; struct view {}; template <typename Char, typename T> struct named_arg : view { const Char* name; const T& value; named_arg(const Char* n, const T& v) ; }; template <typename Char> struct named_arg_info { const Char* name; int id; }; template <typename T, typename Char, size_t NUM_ARGS, size_t NUM_NAMED_ARGS> struct arg_data { T args_[1 + (NUM_ARGS != 0 ? NUM_ARGS : +1)]; named_arg_info<Char> named_args_[NUM_NAMED_ARGS]; template <typename... U> arg_data(const U&... init) ; arg_data(const arg_data& other) = delete; auto args() const -> const T* ; auto named_args() -> named_arg_info<Char>* ; }; template <typename T, typename Char, size_t NUM_ARGS> struct arg_data<T, Char, NUM_ARGS, 0> { T args_[NUM_ARGS != 0 ? NUM_ARGS : +1]; template <typename... U> constexpr __attribute__((always_inline)) arg_data(const U&... init) ; constexpr __attribute__((always_inline)) auto args() const -> const T* ; constexpr __attribute__((always_inline)) auto named_args() -> std::nullptr_t ; }; template <typename Char> void init_named_args(named_arg_info<Char>*, int, int) ; template <typename T> struct is_named_arg : std::false_type {}; template <typename T> struct is_statically_named_arg : std::false_type {}; template <typename T, typename Char> struct is_named_arg<named_arg<Char, T>> : std::true_type {}; template <typename Char, typename T, typename... Tail, fmt::enable_if_t<(!is_named_arg<T>::value), int> = 0> void init_named_args(named_arg_info<Char>* named_args, int arg_count, int named_arg_count, const T&, const Tail&... args) ; template <typename Char, typename T, typename... Tail, fmt::enable_if_t<(is_named_arg<T>::value), int> = 0> void init_named_args(named_arg_info<Char>* named_args, int arg_count, int named_arg_count, const T& arg, const Tail&... args) ; template <typename... Args> constexpr __attribute__((always_inline)) void init_named_args(std::nullptr_t, int, int, const Args&...) ; template <bool B = false> constexpr auto count() -> size_t ; template <bool B1, bool B2, bool... Tail> constexpr auto count() -> size_t ; template <typename... Args> constexpr auto count_named_args() -> size_t ; template <typename... Args> constexpr auto count_statically_named_args() -> size_t ; struct unformattable {}; struct unformattable_char : unformattable {}; struct unformattable_pointer : unformattable {}; template <typename Char> struct string_value { const Char* data; size_t size; }; template <typename Char> struct named_arg_value { const named_arg_info<Char>* data; size_t size; }; template <typename Context> struct custom_value { using parse_context = typename Context::parse_context_type; void* value; void (*format)(void* arg, parse_context& parse_ctx, Context& ctx); }; template <typename Context> class value { public: using char_type = typename Context::char_type; union { monostate no_value; int int_value; unsigned uint_value; long long long_long_value; unsigned long long ulong_long_value; int128_opt int128_value; uint128_opt uint128_value; bool bool_value; char_type char_value; float float_value; double double_value; long double long_double_value; const void* pointer; string_value<char_type> string; custom_value<Context> custom; named_arg_value<char_type> named_args; }; constexpr __attribute__((always_inline)) value() ; constexpr __attribute__((always_inline)) value(int val) ; constexpr __attribute__((always_inline)) value(unsigned val) ; constexpr __attribute__((always_inline)) value(long long val) ; constexpr __attribute__((always_inline)) value(unsigned long long val) ; __attribute__((always_inline)) value(int128_opt val) ; __attribute__((always_inline)) value(uint128_opt val) ; constexpr __attribute__((always_inline)) value(float val) ; constexpr __attribute__((always_inline)) value(double val) ; __attribute__((always_inline)) value(long double val) ; constexpr __attribute__((always_inline)) value(bool val) ; constexpr __attribute__((always_inline)) value(char_type val) ; constexpr __attribute__((always_inline)) value(const char_type* val) ; constexpr __attribute__((always_inline)) value(basic_string_view<char_type> val) ; __attribute__((always_inline)) value(const void* val) ; __attribute__((always_inline)) value(const named_arg_info<char_type>* args, size_t size) ; template <typename T> constexpr __attribute__((always_inline)) value(T& val) ; value(unformattable); value(unformattable_char); value(unformattable_pointer); private: template <typename T, typename Formatter> static void format_custom_arg(void* arg, typename Context::parse_context_type& parse_ctx, Context& ctx) ; }; enum { long_short = sizeof(long) == sizeof(int) }; using long_type = conditional_t<long_short, int, long long>; using ulong_type = conditional_t<long_short, unsigned, unsigned long long>; template <typename T> struct format_as_result { template <typename U, fmt::enable_if_t<(std::is_enum<U>::value || std::is_class<U>::value), int> = 0> static auto map(U*) -> remove_cvref_t<decltype(format_as(std::declval<U>()))>; static auto map(...) -> void; using type = decltype(map(static_cast<T*>(nullptr))); }; template <typename T> using format_as_t = typename format_as_result<T>::type; template <typename T> struct has_format_as : bool_constant<!std::is_same<format_as_t<T>, void>::value> {}; template <typename Context> struct arg_mapper { using char_type = typename Context::char_type; constexpr __attribute__((always_inline)) auto map(signed char val) -> int ; constexpr __attribute__((always_inline)) auto map(unsigned char val) -> unsigned ; constexpr __attribute__((always_inline)) auto map(short val) -> int ; constexpr __attribute__((always_inline)) auto map(unsigned short val) -> unsigned ; constexpr __attribute__((always_inline)) auto map(int val) -> int ; constexpr __attribute__((always_inline)) auto map(unsigned val) -> unsigned ; constexpr __attribute__((always_inline)) auto map(long val) -> long_type ; constexpr __attribute__((always_inline)) auto map(unsigned long val) -> ulong_type ; constexpr __attribute__((always_inline)) auto map(long long val) -> long long ; constexpr __attribute__((always_inline)) auto map(unsigned long long val) -> unsigned long long ; constexpr __attribute__((always_inline)) auto map(int128_opt val) -> int128_opt ; constexpr __attribute__((always_inline)) auto map(uint128_opt val) -> uint128_opt ; constexpr __attribute__((always_inline)) auto map(bool val) -> bool ; template <typename T, fmt::enable_if_t<(std::is_same<T, char>::value || std::is_same<T, char_type>::value), int> = 0> constexpr __attribute__((always_inline)) auto map(T val) -> char_type ; template <typename T, enable_if_t<(std::is_same<T, wchar_t>::value || std::is_same<T, char8_t>::value || std::is_same<T, char16_t>::value || std::is_same<T, char32_t>::value) && !std::is_same<T, char_type>::value, int> = 0> constexpr __attribute__((always_inline)) auto map(T) -> unformattable_char ; constexpr __attribute__((always_inline)) auto map(float val) -> float ; constexpr __attribute__((always_inline)) auto map(double val) -> double ; constexpr __attribute__((always_inline)) auto map(long double val) -> long double ; constexpr __attribute__((always_inline)) auto map(char_type* val) -> const char_type* ; constexpr __attribute__((always_inline)) auto map(const char_type* val) -> const char_type* ; template <typename T, fmt::enable_if_t<(is_string<T>::value && !std::is_pointer<T>::value && std::is_same<char_type, char_t<T>>::value), int> = 0> constexpr __attribute__((always_inline)) auto map(const T& val) -> basic_string_view<char_type> ; template <typename T, fmt::enable_if_t<(is_string<T>::value && !std::is_pointer<T>::value && !std::is_same<char_type, char_t<T>>::value), int> = 0> constexpr __attribute__((always_inline)) auto map(const T&) -> unformattable_char ; constexpr __attribute__((always_inline)) auto map(void* val) -> const void* ; constexpr __attribute__((always_inline)) auto map(const void* val) -> const void* ; constexpr __attribute__((always_inline)) auto map(std::nullptr_t val) -> const void* ; template < typename T, fmt::enable_if_t<(std::is_pointer<T>::value || std::is_member_pointer<T>::value || std::is_function<typename std::remove_pointer<T>::type>::value || (std::is_array<T>::value && !std::is_convertible<T, const char_type*>::value)), int> = 0> constexpr auto map(const T&) -> unformattable_pointer ; template <typename T, std::size_t N, fmt::enable_if_t<(!std::is_same<T, wchar_t>::value), int> = 0> constexpr __attribute__((always_inline)) auto map(const T (&values)[N]) -> const T (&)[N] ; template <typename T, typename U = format_as_t<T>, fmt::enable_if_t<(std::is_arithmetic<U>::value), int> = 0> constexpr __attribute__((always_inline)) auto map(const T& val) -> decltype( map(U())) ; template <typename T, typename U = remove_const_t<T>> struct formattable : bool_constant<has_const_formatter<U, Context>() || (has_formatter<U, Context>::value && !std::is_const<T>::value)> {}; template <typename T, fmt::enable_if_t<(formattable<T>::value), int> = 0> constexpr __attribute__((always_inline)) auto do_map(T& val) -> T& ; template <typename T, fmt::enable_if_t<(!formattable<T>::value), int> = 0> constexpr __attribute__((always_inline)) auto do_map(T&) -> unformattable ; template <typename T, typename U = remove_const_t<T>, fmt::enable_if_t<((std::is_class<U>::value || std::is_enum<U>::value || std::is_union<U>::value) && !is_string<U>::value && !is_char<U>::value && !is_named_arg<U>::value && !std::is_arithmetic<format_as_t<U>>::value), int> = 0> constexpr __attribute__((always_inline)) auto map(T& val) -> decltype( do_map(val)) ; template <typename T, fmt::enable_if_t<(is_named_arg<T>::value), int> = 0> constexpr __attribute__((always_inline)) auto map(const T& named_arg) -> decltype( map(named_arg.value)) ; auto map(...) -> unformattable ; }; template <typename T, typename Context> using mapped_type_constant = type_constant<decltype(arg_mapper<Context>().map(std::declval<const T&>())), typename Context::char_type>; enum { packed_arg_bits = 4 }; enum { max_packed_args = 62 / packed_arg_bits }; enum : unsigned long long { is_unpacked_bit = 1ULL << 63 }; enum : unsigned long long { has_named_args_bit = 1ULL << 62 }; template <typename Char, typename InputIt> auto copy_str(InputIt begin, InputIt end, appender out) -> appender ; template <typename Char, typename InputIt> auto copy_str(InputIt begin, InputIt end, std::back_insert_iterator<std::string> out) -> std::back_insert_iterator<std::string> ; template <typename Char, typename R, typename OutputIt> constexpr auto copy_str(R&& rng, OutputIt out) -> OutputIt ; template <typename...> using void_t = void; template <typename It, typename T, typename Enable = void> struct is_output_iterator : std::false_type {}; template <typename It, typename T> struct is_output_iterator< It, T, void_t<typename std::iterator_traits<It>::iterator_category, decltype(*std::declval<It>() = std::declval<T>())>> : std::true_type {}; template <typename It> struct is_back_insert_iterator : std::false_type {}; template <typename Container> struct is_back_insert_iterator<std::back_insert_iterator<Container>> : std::true_type {}; class locale_ref { private: const void* locale_; public: constexpr __attribute__((always_inline)) locale_ref() ; template <typename Locale> explicit locale_ref(const Locale& loc); explicit operator bool() const noexcept ; template <typename Locale> auto get() const -> Locale; }; template <typename> constexpr auto encode_types() -> unsigned long long ; template <typename Context, typename Arg, typename... Args> constexpr auto encode_types() -> unsigned long long ; template <typename T, typename Char> struct type_is_unformattable_for; template <bool PACKED, typename Context, typename T, fmt::enable_if_t<(PACKED), int> = 0> constexpr __attribute__((always_inline)) auto make_arg(T& val) -> value<Context> ; template <typename Context, typename T> constexpr auto make_arg(T& val) -> basic_format_arg<Context> ; template <bool PACKED, typename Context, typename T, fmt::enable_if_t<(!PACKED), int> = 0> constexpr auto make_arg(T& val) -> basic_format_arg<Context> ; } template <typename Context> class basic_format_arg { private: detail::value<Context> value_; detail::type type_; template <typename ContextType, typename T> friend constexpr auto detail::make_arg(T& value) -> basic_format_arg<ContextType>; template <typename Visitor, typename Ctx> friend constexpr auto visit_format_arg(Visitor&& vis, const basic_format_arg<Ctx>& arg) -> decltype(vis(0)); friend class basic_format_args<Context>; friend class dynamic_format_arg_store<Context>; using char_type = typename Context::char_type; template <typename T, typename Char, size_t NUM_ARGS, size_t NUM_NAMED_ARGS> friend struct detail::arg_data; basic_format_arg(const detail::named_arg_info<char_type>* args, size_t size) ; public: class handle { public: explicit handle(detail::custom_value<Context> custom) ; void format(typename Context::parse_context_type& parse_ctx, Context& ctx) const ; private: detail::custom_value<Context> custom_; }; constexpr basic_format_arg() ; constexpr explicit operator bool() const noexcept ; auto type() const -> detail::type ; auto is_integral() const -> bool ; auto is_arithmetic() const -> bool ; __attribute__((always_inline)) auto format_custom(const char_type* parse_begin, typename Context::parse_context_type& parse_ctx, Context& ctx) -> bool ; }; template <typename Visitor, typename Context> constexpr __attribute__((always_inline)) auto visit_format_arg( Visitor&& vis, const basic_format_arg<Context>& arg) -> decltype(vis(0)) ; template <typename OutputIt, typename Char> class basic_format_context { private: OutputIt out_; basic_format_args<basic_format_context> args_; detail::locale_ref loc_; public: using iterator = OutputIt; using format_arg = basic_format_arg<basic_format_context>; using format_args = basic_format_args<basic_format_context>; using parse_context_type = basic_format_parse_context<Char>; template <typename T> using formatter_type = formatter<T, Char>; using char_type = Char; basic_format_context(basic_format_context&&) = default; basic_format_context(const basic_format_context&) = delete; void operator=(const basic_format_context&) = delete; constexpr basic_format_context(OutputIt out, format_args ctx_args, detail::locale_ref loc = {}) ; constexpr auto arg(int id) const -> format_arg ; constexpr auto arg(basic_string_view<Char> name) -> format_arg ; constexpr auto arg_id(basic_string_view<Char> name) -> int ; auto args() const -> const format_args& ; constexpr auto error_handler() -> detail::error_handler ; void on_error(const char* message) ; constexpr auto out() -> iterator ; void advance_to(iterator it) ; constexpr auto locale() -> detail::locale_ref ; }; template <typename Char> using buffer_context = basic_format_context<detail::buffer_appender<Char>, Char>; using format_context = buffer_context<char>; template <typename T, typename Char = char> using is_formattable = bool_constant<!std::is_base_of< detail::unformattable, decltype(detail::arg_mapper<buffer_context<Char>>() .map(std::declval<T&>()))>::value>; template <typename Context, typename... Args> class format_arg_store { private: static const size_t num_args = sizeof...(Args); static constexpr size_t num_named_args = detail::count_named_args<Args...>(); static const bool is_packed = num_args <= detail::max_packed_args; using value_type = conditional_t<is_packed, detail::value<Context>, basic_format_arg<Context>>; detail::arg_data<value_type, typename Context::char_type, num_args, num_named_args> data_; friend class basic_format_args<Context>; static constexpr unsigned long long desc = (is_packed ? detail::encode_types<Context, Args...>() : detail::is_unpacked_bit | num_args) | (num_named_args != 0 ? static_cast<unsigned long long>(detail::has_named_args_bit) : 0); public: template <typename... T> constexpr __attribute__((always_inline)) format_arg_store(T&... args) ; }; template <typename Context = format_context, typename... T> constexpr auto make_format_args(T&... args) -> format_arg_store<Context, remove_cvref_t<T>...> ; template <typename Char, typename T> auto arg(const Char* name, const T& arg) -> detail::named_arg<Char, T> ; template <typename Context> class basic_format_args { public: using size_type = int; using format_arg = basic_format_arg<Context>; private: unsigned long long desc_; union { const detail::value<Context>* values_; const format_arg* args_; }; constexpr auto is_packed() const -> bool ; auto has_named_args() const -> bool ; constexpr auto type(int index) const -> detail::type ; constexpr __attribute__((always_inline)) basic_format_args(unsigned long long desc, const detail::value<Context>* values) ; constexpr basic_format_args(unsigned long long desc, const format_arg* args) ; public: constexpr basic_format_args() ; template <typename... Args> constexpr __attribute__((always_inline)) basic_format_args( const format_arg_store<Context, Args...>& store) ; constexpr __attribute__((always_inline)) basic_format_args( const dynamic_format_arg_store<Context>& store) ; constexpr basic_format_args(const format_arg* args, int count) ; constexpr auto get(int id) const -> format_arg ; template <typename Char> auto get(basic_string_view<Char> name) const -> format_arg ; template <typename Char> auto get_id(basic_string_view<Char> name) const -> int ; auto max_size() const -> int ; }; using format_args = basic_format_args<format_context>; namespace align { enum type : unsigned char{none, left, right, center, numeric}; } using align_t = align::type; namespace sign { enum type : unsigned char{none, minus, plus, space}; } using sign_t = sign::type; namespace detail { template <typename Char> struct fill_t { private: enum { max_size = 4 }; Char data_[max_size] = {Char(' '), Char(0), Char(0), Char(0)}; unsigned char size_ = 1; public: constexpr void operator=(basic_string_view<Char> s) ; constexpr auto size() const -> size_t ; constexpr auto data() const -> const Char* ; constexpr auto operator[](size_t index) -> Char& ; constexpr auto operator[](size_t index) const -> const Char& ; }; } enum class presentation_type : unsigned char { none, dec, oct, hex_lower, hex_upper, bin_lower, bin_upper, hexfloat_lower, hexfloat_upper, exp_lower, exp_upper, fixed_lower, fixed_upper, general_lower, general_upper, chr, string, pointer, debug }; template <typename Char = char> struct format_specs { int width; int precision; presentation_type type; align_t align : 4; sign_t sign : 3; bool alt : 1; bool localized : 1; detail::fill_t<Char> fill; constexpr format_specs() ; }; namespace detail { enum class arg_id_kind { none, index, name }; template <typename Char> struct arg_ref { constexpr arg_ref() ; constexpr explicit arg_ref(int index) ; constexpr explicit arg_ref(basic_string_view<Char> name) ; constexpr auto operator=(int idx) -> arg_ref& ; arg_id_kind kind; union value { constexpr value(int idx = 0) ; constexpr value(basic_string_view<Char> n) ; int index; basic_string_view<Char> name; } val; }; template <typename Char = char> struct dynamic_format_specs : format_specs<Char> { arg_ref<Char> width_ref; arg_ref<Char> precision_ref; }; template <typename Char, fmt::enable_if_t<(std::is_integral<Char>::value), int> = 0> constexpr auto to_ascii(Char c) -> char ; template <typename Char, fmt::enable_if_t<(std::is_enum<Char>::value), int> = 0> constexpr auto to_ascii(Char c) -> char ; template <typename Char> constexpr auto code_point_length(const Char* begin) -> int ; template <bool IS_CONSTEXPR, typename T, typename Ptr = const T*> constexpr auto find(Ptr first, Ptr last, T value, Ptr& out) -> bool ; template <> auto find<false, char>(const char* first, const char* last, char value, const char*& out) -> bool ; template <typename Char> constexpr auto parse_nonnegative_int(const Char*& begin, const Char* end, int error_value) noexcept -> int ; constexpr auto parse_align(char c) -> align_t ; template <typename Char> constexpr auto is_name_start(Char c) -> bool ; template <typename Char, typename Handler> constexpr auto do_parse_arg_id(const Char* begin, const Char* end, Handler&& handler) -> const Char* ; template <typename Char, typename Handler> constexpr __attribute__((always_inline)) auto parse_arg_id(const Char* begin, const Char* end, Handler&& handler) -> const Char* ; template <typename Char> struct dynamic_spec_id_handler { basic_format_parse_context<Char>& ctx; arg_ref<Char>& ref; constexpr void on_auto() ; constexpr void on_index(int id) ; constexpr void on_name(basic_string_view<Char> id) ; }; template <typename Char> constexpr auto parse_dynamic_spec(const Char* begin, const Char* end, int& value, arg_ref<Char>& ref, basic_format_parse_context<Char>& ctx) -> const Char* ; template <typename Char> constexpr auto parse_precision(const Char* begin, const Char* end, int& value, arg_ref<Char>& ref, basic_format_parse_context<Char>& ctx) -> const Char* ; enum class state { start, align, sign, hash, zero, width, precision, locale }; template <typename Char> constexpr __attribute__((always_inline)) auto parse_format_specs( const Char* begin, const Char* end, dynamic_format_specs<Char>& specs, basic_format_parse_context<Char>& ctx, type arg_type) -> const Char* ; template <typename Char, typename Handler> constexpr auto parse_replacement_field(const Char* begin, const Char* end, Handler&& handler) -> const Char* ; template <bool IS_CONSTEXPR, typename Char, typename Handler> constexpr __attribute__((always_inline)) void parse_format_string( basic_string_view<Char> format_str, Handler&& handler) ; template <typename T, bool = is_named_arg<T>::value> struct strip_named_arg { using type = T; }; template <typename T> struct strip_named_arg<T, true> { using type = remove_cvref_t<decltype(T::value)>; }; template <typename T, typename ParseContext> constexpr auto parse_format_specs(ParseContext& ctx) -> decltype(ctx.begin()) ; template <typename Char> constexpr auto check_char_specs(const format_specs<Char>& specs) -> bool ; template <typename... Args, typename Char> constexpr auto get_arg_index_by_name(basic_string_view<Char> name) -> int ; template <typename Char, typename... Args> class format_string_checker { private: using parse_context_type = compile_parse_context<Char>; static constexpr int num_args = sizeof...(Args); using parse_func = const Char* (*)(parse_context_type&); type types_[num_args > 0 ? static_cast<size_t>(num_args) : 1]; parse_context_type context_; parse_func parse_funcs_[num_args > 0 ? static_cast<size_t>(num_args) : 1]; public: explicit constexpr format_string_checker(basic_string_view<Char> fmt) ; constexpr void on_text(const Char*, const Char*) ; constexpr auto on_arg_id() -> int ; constexpr auto on_arg_id(int id) -> int ; constexpr auto on_arg_id(basic_string_view<Char> id) -> int ; constexpr void on_replacement_field(int id, const Char* begin) ; constexpr auto on_format_specs(int id, const Char* begin, const Char*) -> const Char* ; constexpr void on_error(const char* message) ; }; template <typename..., typename S, fmt::enable_if_t<(!is_compile_string<S>::value), int> = 0> __attribute__((always_inline)) void check_format_string(const S&) ; template <typename... Args, typename S, fmt::enable_if_t<(is_compile_string<S>::value), int> = 0> void check_format_string(S format_str) ; template <typename Char = char> struct vformat_args { using type = basic_format_args< basic_format_context<std::back_insert_iterator<buffer<Char>>, Char>>; }; template <> struct vformat_args<char> { using type = format_args; }; template <typename Char> void vformat_to(buffer<Char>& buf, basic_string_view<Char> fmt, typename vformat_args<Char>::type args, locale_ref loc = {}); void vprint_mojibake(std::FILE*, string_view, format_args); void vprint_mojibake(std::FILE*, string_view, format_args) ; } template <typename T, typename Char> struct formatter<T, Char, enable_if_t<detail::type_constant<T, Char>::value != detail::type::custom_type>> { private: detail::dynamic_format_specs<Char> specs_; public: template <typename ParseContext> constexpr auto parse(ParseContext& ctx) -> const Char* ; template <detail::type U = detail::type_constant<T, Char>::value, fmt::enable_if_t<(U == detail::type::string_type || U == detail::type::cstring_type || U == detail::type::char_type), int> = 0> constexpr void set_debug_format(bool set = true) ; template <typename FormatContext> constexpr auto format(const T& val, FormatContext& ctx) const -> decltype(ctx.out()); }; template <typename Char = char> struct runtime_format_string { basic_string_view<Char> str; }; template <typename Char, typename... Args> class basic_format_string { private: basic_string_view<Char> str_; public: template <typename S, fmt::enable_if_t<(std::is_convertible<const S&, basic_string_view<Char>>::value), int> = 0> consteval __attribute__((always_inline)) basic_format_string(const S& s) ; basic_format_string(runtime_format_string<Char> fmt) ; __attribute__((always_inline)) operator basic_string_view<Char>() const ; __attribute__((always_inline)) auto get() const -> basic_string_view<Char> ; }; template <typename... Args> using format_string = basic_format_string<char, type_identity_t<Args>...>; auto runtime(string_view s) -> runtime_format_string<> ; auto vformat(string_view fmt, format_args args) -> std::string; template <typename... T> [[nodiscard]] __attribute__((always_inline)) auto format(format_string<T...> fmt, T&&... args) -> std::string ; template <typename OutputIt, fmt::enable_if_t<(detail::is_output_iterator<OutputIt, char>::value), int> = 0> auto vformat_to(OutputIt out, string_view fmt, format_args args) -> OutputIt ; template <typename OutputIt, typename... T, fmt::enable_if_t<(detail::is_output_iterator<OutputIt, char>::value), int> = 0> __attribute__((always_inline)) auto format_to(OutputIt out, format_string<T...> fmt, T&&... args) -> OutputIt ; template <typename OutputIt> struct format_to_n_result { OutputIt out; size_t size; }; template <typename OutputIt, typename... T, fmt::enable_if_t<(detail::is_output_iterator<OutputIt, char>::value), int> = 0> auto vformat_to_n(OutputIt out, size_t n, string_view fmt, format_args args) -> format_to_n_result<OutputIt> ; template <typename OutputIt, typename... T, fmt::enable_if_t<(detail::is_output_iterator<OutputIt, char>::value), int> = 0> __attribute__((always_inline)) auto format_to_n(OutputIt out, size_t n, format_string<T...> fmt, T&&... args) -> format_to_n_result<OutputIt> ; template <typename... T> [[nodiscard]] __attribute__((always_inline)) auto formatted_size(format_string<T...> fmt, T&&... args) -> size_t ; void vprint(string_view fmt, format_args args); void vprint(std::FILE* f, string_view fmt, format_args args); template <typename... T> __attribute__((always_inline)) void print(format_string<T...> fmt, T&&... args) ; template <typename... T> __attribute__((always_inline)) void print(std::FILE* f, format_string<T...> fmt, T&&... args) ; template <typename... T> __attribute__((always_inline)) void println(std::FILE* f, format_string<T...> fmt, T&&... args) ; template <typename... T> __attribute__((always_inline)) void println(format_string<T...> fmt, T&&... args) ; } } namespace fmt { inline namespace v10 { namespace detail { constexpr void abort_fuzzing_if(bool condition) ; template <typename CharT, CharT... C> struct string_literal { static constexpr CharT value[sizeof...(C)] = {C...}; constexpr operator basic_string_view<CharT>() const ; }; template <typename To, typename From, fmt::enable_if_t<(sizeof(To) == sizeof(From)), int> = 0> constexpr auto bit_cast(const From& from) -> To ; auto is_big_endian() -> bool ; class uint128_fallback { private: uint64_t lo_, hi_; public: constexpr uint128_fallback(uint64_t hi, uint64_t lo) ; constexpr uint128_fallback(uint64_t value = 0) ; constexpr auto high() const noexcept -> uint64_t ; constexpr auto low() const noexcept -> uint64_t ; template <typename T, fmt::enable_if_t<(std::is_integral<T>::value), int> = 0> constexpr explicit operator T() const ; friend constexpr auto operator==(const uint128_fallback& lhs, const uint128_fallback& rhs) -> bool ; friend constexpr auto operator!=(const uint128_fallback& lhs, const uint128_fallback& rhs) -> bool ; friend constexpr auto operator>(const uint128_fallback& lhs, const uint128_fallback& rhs) -> bool ; friend constexpr auto operator|(const uint128_fallback& lhs, const uint128_fallback& rhs) -> uint128_fallback ; friend constexpr auto operator&(const uint128_fallback& lhs, const uint128_fallback& rhs) -> uint128_fallback ; friend constexpr auto operator~(const uint128_fallback& n) -> uint128_fallback ; friend auto operator+(const uint128_fallback& lhs, const uint128_fallback& rhs) -> uint128_fallback ; friend auto operator*(const uint128_fallback& lhs, uint32_t rhs) -> uint128_fallback ; friend auto operator-(const uint128_fallback& lhs, uint64_t rhs) -> uint128_fallback ; constexpr auto operator>>(int shift) const -> uint128_fallback ; constexpr auto operator<<(int shift) const -> uint128_fallback ; constexpr auto operator>>=(int shift) -> uint128_fallback& ; constexpr void operator+=(uint128_fallback n) ; constexpr void operator&=(uint128_fallback n) ; constexpr auto operator+=(uint64_t n) noexcept -> uint128_fallback& { if (is_constant_evaluated()) { lo_ += n; hi_ += (lo_ < n ? 1 : 0); return *this; } unsigned long long carry; lo_ = __builtin_addcll(lo_, n, 0, &carry); hi_ += carry; return *this; } }; using uint128_t = conditional_t<1, uint128_opt, uint128_fallback>; using uintptr_t = ::uintptr_t; template <typename T> constexpr auto max_value() -> T { return (std::numeric_limits<T>::max)(); } template <typename T> constexpr auto num_bits() -> int { return std::numeric_limits<T>::digits; } template <> constexpr auto num_bits<int128_opt>() -> int { return 128; } template <> constexpr auto num_bits<uint128_t>() -> int ; template <typename To, typename From, fmt::enable_if_t<(sizeof(To) > sizeof(From)), int> = 0> auto bit_cast(const From& from) -> To ; template <typename UInt> constexpr auto countl_zero_fallback(UInt n) -> int ; constexpr auto countl_zero(uint32_t n) -> int ; constexpr auto countl_zero(uint64_t n) -> int ; __attribute__((always_inline)) void assume(bool condition) ; template <typename T> using iterator_t = decltype(std::begin(std::declval<T&>())); template <typename T> using sentinel_t = decltype(std::end(std::declval<T&>())); template <typename Char> auto get_data(std::basic_string<Char>& s) -> Char* ; template <typename Container> auto get_data(Container& c) -> typename Container::value_type* ; template <typename Container, fmt::enable_if_t<(is_contiguous<Container>::value), int> = 0> __attribute__((no_sanitize("undefined"))) auto reserve(std::back_insert_iterator<Container> it, size_t n) -> typename Container::value_type* ; template <typename T> auto reserve(buffer_appender<T> it, size_t n) -> buffer_appender<T> ; template <typename Iterator> constexpr auto reserve(Iterator& it, size_t) -> Iterator& ; template <typename OutputIt> using reserve_iterator = remove_reference_t<decltype(reserve(std::declval<OutputIt&>(), 0))>; template <typename T, typename OutputIt> constexpr auto to_pointer(OutputIt, size_t) -> T* ; template <typename T> auto to_pointer(buffer_appender<T> it, size_t n) -> T* ; template <typename Container, fmt::enable_if_t<(is_contiguous<Container>::value), int> = 0> auto base_iterator(std::back_insert_iterator<Container> it, typename Container::value_type*) -> std::back_insert_iterator<Container> ; template <typename Iterator> constexpr auto base_iterator(Iterator, Iterator it) -> Iterator ; template <typename OutputIt, typename Size, typename T> constexpr auto fill_n(OutputIt out, Size count, const T& value) -> OutputIt ; template <typename T, typename Size> constexpr auto fill_n(T* out, Size count, char value) -> T* ; using char8_type = char8_t; template <typename OutChar, typename InputIt, typename OutputIt> constexpr __attribute__((noinline)) auto copy_str_noinline(InputIt begin, InputIt end, OutputIt out) -> OutputIt ; constexpr auto utf8_decode(const char* s, uint32_t* c, int* e) -> const char* ; constexpr inline uint32_t invalid_code_point = ~uint32_t(); template <typename F> constexpr void for_each_codepoint(string_view s, F f) ; template <typename Char> auto compute_width(basic_string_view<Char> s) -> size_t ; constexpr auto compute_width(string_view s) -> size_t ; auto compute_width(basic_string_view<char8_type> s) -> size_t ; template <typename Char> auto code_point_index(basic_string_view<Char> s, size_t n) -> size_t ; auto code_point_index(string_view s, size_t n) -> size_t ; auto code_point_index(basic_string_view<char8_type> s, size_t n) -> size_t ; template <typename T> struct is_integral : std::is_integral<T> {}; template <> struct is_integral<int128_opt> : std::true_type {}; template <> struct is_integral<uint128_t> : std::true_type {}; template <typename T> using is_signed = std::integral_constant<bool, std::numeric_limits<T>::is_signed || std::is_same<T, int128_opt>::value>; template <typename T> using is_integer = bool_constant<is_integral<T>::value && !std::is_same<T, bool>::value && !std::is_same<T, char>::value && !std::is_same<T, wchar_t>::value>; using float128 = void; template <typename T> using is_float128 = std::is_same<T, float128>; template <typename T> using is_floating_point = bool_constant<std::is_floating_point<T>::value || is_float128<T>::value>; template <typename T, bool = std::is_floating_point<T>::value> struct is_fast_float : bool_constant<std::numeric_limits<T>::is_iec559 && sizeof(T) <= sizeof(double)> {}; template <typename T> struct is_fast_float<T, false> : std::false_type {}; template <typename T> using is_double_double = bool_constant<std::numeric_limits<T>::digits == 106>; template <typename T, typename Enable = void> struct is_locale : std::false_type {}; template <typename T> struct is_locale<T, void_t<decltype(T::classic())>> : std::true_type {}; } enum { inline_buffer_size = 500 }; template <typename T, size_t SIZE = inline_buffer_size, typename Allocator = std::allocator<T>> class basic_memory_buffer final : public detail::buffer<T> { private: T store_[SIZE]; [[no_unique_address]] Allocator alloc_; constexpr void deallocate() ; protected: constexpr void grow(size_t size) override ; public: using value_type = T; using const_reference = const T&; constexpr explicit basic_memory_buffer( const Allocator& alloc = Allocator()) ; constexpr ~basic_memory_buffer() ; private: constexpr void move(basic_memory_buffer& other) ; public: constexpr basic_memory_buffer(basic_memory_buffer&& other) noexcept ; auto operator=(basic_memory_buffer&& other) noexcept -> basic_memory_buffer& ; auto get_allocator() const -> Allocator ; constexpr void resize(size_t count) ; void reserve(size_t new_capacity) ; using detail::buffer<T>::append; template <typename ContiguousRange> void append(const ContiguousRange& range) ; }; using memory_buffer = basic_memory_buffer<char>; template <typename T, size_t SIZE, typename Allocator> struct is_contiguous<basic_memory_buffer<T, SIZE, Allocator>> : std::true_type { }; namespace detail { auto write_console(int fd, string_view text) -> bool; auto write_console(std::FILE* f, string_view text) -> bool; void print(std::FILE*, string_view); } #pragma clang diagnostic ignored "-Wweak-vtables" class format_error : public std::runtime_error { public: using std::runtime_error::runtime_error; }; namespace detail_exported { template <typename Char, size_t N> constexpr auto compile_string_to_view(const Char (&s)[N]) -> basic_string_view<Char> ; template <typename Char> constexpr auto compile_string_to_view(detail::std_string_view<Char> s) -> basic_string_view<Char> ; } class loc_value { private: basic_format_arg<format_context> value_; public: template <typename T, fmt::enable_if_t<(!detail::is_float128<T>::value), int> = 0> loc_value(T value) ; template <typename T, fmt::enable_if_t<(detail::is_float128<T>::value), int> = 0> loc_value(T) ; template <typename Visitor> auto visit(Visitor&& vis) -> decltype(vis(0)) ; }; template <typename Locale> class format_facet : public Locale::facet { private: std::string separator_; std::string grouping_; std::string decimal_point_; protected: virtual auto do_put(appender out, loc_value val, const format_specs<>& specs) const -> bool; public: static typename Locale::id id; explicit format_facet(Locale& loc); explicit format_facet(string_view sep = "", std::initializer_list<unsigned char> g = {3}, std::string decimal_point = ".") ; auto put(appender out, loc_value val, const format_specs<>& specs) const -> bool ; }; namespace detail { template <typename T, fmt::enable_if_t<(is_signed<T>::value), int> = 0> constexpr auto is_negative(T value) -> bool ; template <typename T, fmt::enable_if_t<(!is_signed<T>::value), int> = 0> constexpr auto is_negative(T) -> bool ; template <typename T> constexpr auto is_supported_floating_point(T) -> bool ; template <typename T> using uint32_or_64_or_128_t = conditional_t<num_bits<T>() <= 32 && !0, uint32_t, conditional_t<num_bits<T>() <= 64, uint64_t, uint128_t>>; template <typename T> using uint64_or_128_t = conditional_t<num_bits<T>() <= 64, uint64_t, uint128_t>; constexpr auto digits2(size_t value) -> const char* ; template <typename Char, typename Sign> constexpr auto sign(Sign s) -> Char ; template <typename T> constexpr auto count_digits_fallback(T n) -> int ; constexpr auto count_digits(uint128_opt n) -> int ; auto do_count_digits(uint64_t n) -> int ; constexpr auto count_digits(uint64_t n) -> int ; template <int BITS, typename UInt> constexpr auto count_digits(UInt n) -> int ; __attribute__((always_inline)) auto do_count_digits(uint32_t n) -> int ; constexpr auto count_digits(uint32_t n) -> int ; template <typename Int> constexpr auto digits10() noexcept -> int ; template <> constexpr auto digits10<int128_opt>() noexcept -> int ; template <> constexpr auto digits10<uint128_t>() noexcept -> int ; template <typename Char> struct thousands_sep_result { std::string grouping; Char thousands_sep; }; template <typename Char> auto thousands_sep_impl(locale_ref loc) -> thousands_sep_result<Char>; template <typename Char> auto thousands_sep(locale_ref loc) -> thousands_sep_result<Char> ; template <> auto thousands_sep(locale_ref loc) -> thousands_sep_result<wchar_t> ; template <typename Char> auto decimal_point_impl(locale_ref loc) -> Char; template <typename Char> auto decimal_point(locale_ref loc) -> Char ; template <> auto decimal_point(locale_ref loc) -> wchar_t ; template <typename Char> auto equal2(const Char* lhs, const char* rhs) -> bool ; auto equal2(const char* lhs, const char* rhs) -> bool ; template <typename Char> constexpr __attribute__((always_inline)) void copy2(Char* dst, const char* src) ; template <typename Iterator> struct format_decimal_result { Iterator begin; Iterator end; }; template <typename Char, typename UInt> constexpr auto format_decimal(Char* out, UInt value, int size) -> format_decimal_result<Char*> ; template <typename Char, typename UInt, typename Iterator, fmt::enable_if_t<(!std::is_pointer<remove_cvref_t<Iterator>>::value), int> = 0> constexpr auto format_decimal(Iterator out, UInt value, int size) -> format_decimal_result<Iterator> ; template <unsigned BASE_BITS, typename Char, typename UInt> constexpr auto format_uint(Char* buffer, UInt value, int num_digits, bool upper = false) -> Char* ; template <unsigned BASE_BITS, typename Char, typename It, typename UInt> constexpr auto format_uint(It out, UInt value, int num_digits, bool upper = false) -> It ; class utf8_to_utf16 { private: basic_memory_buffer<wchar_t> buffer_; public: explicit utf8_to_utf16(string_view s); operator basic_string_view<wchar_t>() const ; auto size() const -> size_t ; auto c_str() const -> const wchar_t* ; auto str() const -> std::wstring ; }; enum class to_utf8_error_policy { abort, replace }; template <typename WChar, typename Buffer = memory_buffer> class to_utf8 { private: Buffer buffer_; public: to_utf8() ; explicit to_utf8(basic_string_view<WChar> s, to_utf8_error_policy policy = to_utf8_error_policy::abort) ; operator string_view() const ; auto size() const -> size_t ; auto c_str() const -> const char* ; auto str() const -> std::string ; auto convert(basic_string_view<WChar> s, to_utf8_error_policy policy = to_utf8_error_policy::abort) -> bool ; static auto convert(Buffer& buf, basic_string_view<WChar> s, to_utf8_error_policy policy = to_utf8_error_policy::abort) -> bool ; }; auto umul128(uint64_t x, uint64_t y) noexcept -> uint128_fallback ; namespace dragonbox { auto floor_log10_pow2(int e) noexcept -> int ; auto floor_log2_pow10(int e) noexcept -> int ; auto umul128_upper64(uint64_t x, uint64_t y) noexcept -> uint64_t ; auto umul192_upper128(uint64_t x, uint128_fallback y) noexcept -> uint128_fallback ; auto get_cached_power(int k) noexcept -> uint128_fallback; template <typename T, typename Enable = void> struct float_info; template <> struct float_info<float> { using carrier_uint = uint32_t; static const int exponent_bits = 8; static const int kappa = 1; static const int big_divisor = 100; static const int small_divisor = 10; static const int min_k = -31; static const int max_k = 46; static const int shorter_interval_tie_lower_threshold = -35; static const int shorter_interval_tie_upper_threshold = -35; }; template <> struct float_info<double> { using carrier_uint = uint64_t; static const int exponent_bits = 11; static const int kappa = 2; static const int big_divisor = 1000; static const int small_divisor = 100; static const int min_k = -292; static const int max_k = 341; static const int shorter_interval_tie_lower_threshold = -77; static const int shorter_interval_tie_upper_threshold = -77; }; template <typename T> struct float_info<T, enable_if_t<std::numeric_limits<T>::digits == 64 || std::numeric_limits<T>::digits == 113 || is_float128<T>::value>> { using carrier_uint = detail::uint128_t; static const int exponent_bits = 15; }; template <typename T> struct float_info<T, enable_if_t<is_double_double<T>::value>> { using carrier_uint = detail::uint128_t; }; template <typename T> struct decimal_fp { using significand_type = typename float_info<T>::carrier_uint; significand_type significand; int exponent; }; template <typename T> auto to_decimal(T x) noexcept -> decimal_fp<T>; } template <typename Float> constexpr auto has_implicit_bit() -> bool ; template <typename Float> constexpr auto num_significand_bits() -> int ; template <typename Float> constexpr auto exponent_mask() -> typename dragonbox::float_info<Float>::carrier_uint ; template <typename Float> constexpr auto exponent_bias() -> int ; template <typename Char, typename It> constexpr auto write_exponent(int exp, It it) -> It ; template <typename F> struct basic_fp { F f; int e; static constexpr const int num_significand_bits = static_cast<int>(sizeof(F) * num_bits<unsigned char>()); constexpr basic_fp() ; constexpr basic_fp(uint64_t f_val, int e_val) ; template <typename Float> constexpr basic_fp(Float n) ; template <typename Float, fmt::enable_if_t<(!is_double_double<Float>::value), int> = 0> constexpr auto assign(Float n) -> bool ; template <typename Float, fmt::enable_if_t<(is_double_double<Float>::value), int> = 0> constexpr auto assign(Float n) -> bool ; }; using fp = basic_fp<unsigned long long>; template <int SHIFT = 0, typename F> constexpr auto normalize(basic_fp<F> value) -> basic_fp<F> ; constexpr auto multiply(uint64_t lhs, uint64_t rhs) -> uint64_t ; constexpr auto operator*(fp x, fp y) -> fp ; template <typename T, bool doublish = num_bits<T>() == num_bits<double>()> using convert_float_result = conditional_t<std::is_same<T, float>::value || doublish, double, T>; template <typename T> constexpr auto convert_float(T value) -> convert_float_result<T> ; template <typename OutputIt, typename Char> __attribute__((noinline)) constexpr auto fill(OutputIt it, size_t n, const fill_t<Char>& fill) -> OutputIt ; template <align::type align = align::left, typename OutputIt, typename Char, typename F> constexpr auto write_padded(OutputIt out, const format_specs<Char>& specs, size_t size, size_t width, F&& f) -> OutputIt ; template <align::type align = align::left, typename OutputIt, typename Char, typename F> constexpr auto write_padded(OutputIt out, const format_specs<Char>& specs, size_t size, F&& f) -> OutputIt ; template <align::type align = align::left, typename Char, typename OutputIt> constexpr auto write_bytes(OutputIt out, string_view bytes, const format_specs<Char>& specs) -> OutputIt ; template <typename Char, typename OutputIt, typename UIntPtr> auto write_ptr(OutputIt out, UIntPtr value, const format_specs<Char>* specs) -> OutputIt ; auto is_printable(uint32_t cp) -> bool; auto needs_escape(uint32_t cp) -> bool ; template <typename Char> struct find_escape_result { const Char* begin; const Char* end; uint32_t cp; }; template <typename Char> using make_unsigned_char = typename conditional_t<std::is_integral<Char>::value, std::make_unsigned<Char>, type_identity<uint32_t>>::type; template <typename Char> auto find_escape(const Char* begin, const Char* end) -> find_escape_result<Char> ; auto find_escape(const char* begin, const char* end) -> find_escape_result<char> ; template <size_t width, typename Char, typename OutputIt> auto write_codepoint(OutputIt out, char prefix, uint32_t cp) -> OutputIt ; template <typename OutputIt, typename Char> auto write_escaped_cp(OutputIt out, const find_escape_result<Char>& escape) -> OutputIt ; template <typename Char, typename OutputIt> auto write_escaped_string(OutputIt out, basic_string_view<Char> str) -> OutputIt ; template <typename Char, typename OutputIt> auto write_escaped_char(OutputIt out, Char v) -> OutputIt ; template <typename Char, typename OutputIt> constexpr auto write_char(OutputIt out, Char value, const format_specs<Char>& specs) -> OutputIt ; template <typename Char, typename OutputIt> constexpr auto write(OutputIt out, Char value, const format_specs<Char>& specs, locale_ref loc = {}) -> OutputIt ; template <typename Char> struct write_int_data { size_t size; size_t padding; constexpr write_int_data(int num_digits, unsigned prefix, const format_specs<Char>& specs) ; }; template <typename OutputIt, typename Char, typename W> constexpr __attribute__((always_inline)) auto write_int(OutputIt out, int num_digits, unsigned prefix, const format_specs<Char>& specs, W write_digits) -> OutputIt ; template <typename Char> class digit_grouping { private: std::string grouping_; std::basic_string<Char> thousands_sep_; struct next_state { std::string::const_iterator group; int pos; }; auto initial_state() const -> next_state ; auto next(next_state& state) const -> int ; public: explicit digit_grouping(locale_ref loc, bool localized = true) ; digit_grouping(std::string grouping, std::basic_string<Char> sep) ; auto has_separator() const -> bool ; auto count_separators(int num_digits) const -> int ; template <typename Out, typename C> auto apply(Out out, basic_string_view<C> digits) const -> Out ; }; constexpr void prefix_append(unsigned& prefix, unsigned value) ; template <typename OutputIt, typename UInt, typename Char> auto write_int(OutputIt out, UInt value, unsigned prefix, const format_specs<Char>& specs, const digit_grouping<Char>& grouping) -> OutputIt ; auto write_loc(appender out, loc_value value, const format_specs<>& specs, locale_ref loc) -> bool; template <typename OutputIt, typename Char> auto write_loc(OutputIt, loc_value, const format_specs<Char>&, locale_ref) -> bool ; template <typename UInt> struct write_int_arg { UInt abs_value; unsigned prefix; }; template <typename T> constexpr auto make_write_int_arg(T value, sign_t sign) -> write_int_arg<uint32_or_64_or_128_t<T>> ; template <typename Char = char> struct loc_writer { buffer_appender<Char> out; const format_specs<Char>& specs; std::basic_string<Char> sep; std::string grouping; std::basic_string<Char> decimal_point; template <typename T, fmt::enable_if_t<(is_integer<T>::value), int> = 0> auto operator()(T value) -> bool ; template <typename T, fmt::enable_if_t<(!is_integer<T>::value), int> = 0> auto operator()(T) -> bool ; }; template <typename Char, typename OutputIt, typename T> constexpr __attribute__((always_inline)) auto write_int(OutputIt out, write_int_arg<T> arg, const format_specs<Char>& specs, locale_ref) -> OutputIt ; template <typename Char, typename OutputIt, typename T> constexpr __attribute__((noinline)) auto write_int_noinline( OutputIt out, write_int_arg<T> arg, const format_specs<Char>& specs, locale_ref loc) -> OutputIt ; template <typename Char, typename OutputIt, typename T, fmt::enable_if_t<(is_integral<T>::value && !std::is_same<T, bool>::value && std::is_same<OutputIt, buffer_appender<Char>>::value), int> = 0> constexpr __attribute__((always_inline)) auto write(OutputIt out, T value, const format_specs<Char>& specs, locale_ref loc) -> OutputIt ; template <typename Char, typename OutputIt, typename T, fmt::enable_if_t<(is_integral<T>::value && !std::is_same<T, bool>::value && !std::is_same<OutputIt, buffer_appender<Char>>::value), int> = 0> constexpr __attribute__((always_inline)) auto write(OutputIt out, T value, const format_specs<Char>& specs, locale_ref loc) -> OutputIt ; class counting_iterator { private: size_t count_; public: using iterator_category = std::output_iterator_tag; using difference_type = std::ptrdiff_t; using pointer = void; using reference = void; using unchecked_type = counting_iterator; struct value_type { template <typename T> constexpr void operator=(const T&) ; }; constexpr counting_iterator() ; constexpr auto count() const -> size_t ; constexpr auto operator++() -> counting_iterator& ; constexpr auto operator++(int) -> counting_iterator ; constexpr friend auto operator+(counting_iterator it, difference_type n) -> counting_iterator ; constexpr auto operator*() const -> value_type ; }; template <typename Char, typename OutputIt> constexpr auto write(OutputIt out, basic_string_view<Char> s, const format_specs<Char>& specs) -> OutputIt ; template <typename Char, typename OutputIt> constexpr auto write(OutputIt out, basic_string_view<type_identity_t<Char>> s, const format_specs<Char>& specs, locale_ref) -> OutputIt ; template <typename Char, typename OutputIt> constexpr auto write(OutputIt out, const Char* s, const format_specs<Char>& specs, locale_ref) -> OutputIt ; template <typename Char, typename OutputIt, typename T, fmt::enable_if_t<(is_integral<T>::value && !std::is_same<T, bool>::value && !std::is_same<T, Char>::value), int> = 0> constexpr auto write(OutputIt out, T value) -> OutputIt ; template <typename Char> constexpr auto parse_align(const Char* begin, const Char* end, format_specs<Char>& specs) -> const Char* ; enum class float_format : unsigned char { general, exp, fixed, hex }; struct float_specs { int precision; float_format format : 8; sign_t sign : 8; bool upper : 1; bool locale : 1; bool binary32 : 1; bool showpoint : 1; }; template <typename Char> constexpr auto parse_float_type_spec(const format_specs<Char>& specs) -> float_specs ; template <typename Char, typename OutputIt> constexpr auto write_nonfinite(OutputIt out, bool isnan, format_specs<Char> specs, const float_specs& fspecs) -> OutputIt ; struct big_decimal_fp { const char* significand; int significand_size; int exponent; }; constexpr auto get_significand_size(const big_decimal_fp& f) -> int ; template <typename T> auto get_significand_size(const dragonbox::decimal_fp<T>& f) -> int ; template <typename Char, typename OutputIt> constexpr auto write_significand(OutputIt out, const char* significand, int significand_size) -> OutputIt ; template <typename Char, typename OutputIt, typename UInt> auto write_significand(OutputIt out, UInt significand, int significand_size) -> OutputIt ; template <typename Char, typename OutputIt, typename T, typename Grouping> constexpr auto write_significand(OutputIt out, T significand, int significand_size, int exponent, const Grouping& grouping) -> OutputIt ; template <typename Char, typename UInt, fmt::enable_if_t<(std::is_integral<UInt>::value), int> = 0> auto write_significand(Char* out, UInt significand, int significand_size, int integral_size, Char decimal_point) -> Char* ; template <typename OutputIt, typename UInt, typename Char, fmt::enable_if_t<(!std::is_pointer<remove_cvref_t<OutputIt>>::value), int> = 0> auto write_significand(OutputIt out, UInt significand, int significand_size, int integral_size, Char decimal_point) -> OutputIt ; template <typename OutputIt, typename Char> constexpr auto write_significand(OutputIt out, const char* significand, int significand_size, int integral_size, Char decimal_point) -> OutputIt ; template <typename OutputIt, typename Char, typename T, typename Grouping> constexpr auto write_significand(OutputIt out, T significand, int significand_size, int integral_size, Char decimal_point, const Grouping& grouping) -> OutputIt ; template <typename OutputIt, typename DecimalFP, typename Char, typename Grouping = digit_grouping<Char>> constexpr auto do_write_float(OutputIt out, const DecimalFP& f, const format_specs<Char>& specs, float_specs fspecs, locale_ref loc) -> OutputIt ; template <typename Char> class fallback_digit_grouping { public: constexpr fallback_digit_grouping(locale_ref, bool) ; constexpr auto has_separator() const -> bool ; constexpr auto count_separators(int) const -> int ; template <typename Out, typename C> constexpr auto apply(Out out, basic_string_view<C>) const -> Out ; }; template <typename OutputIt, typename DecimalFP, typename Char> constexpr auto write_float(OutputIt out, const DecimalFP& f, const format_specs<Char>& specs, float_specs fspecs, locale_ref loc) -> OutputIt ; template <typename T> constexpr auto isnan(T value) -> bool ; template <typename T, typename Enable = void> struct has_isfinite : std::false_type {}; template <typename T> struct has_isfinite<T, enable_if_t<sizeof(std::isfinite(T())) != 0>> : std::true_type {}; template <typename T, fmt::enable_if_t<(std::is_floating_point<T>::value&& has_isfinite<T>::value), int> = 0> constexpr auto isfinite(T value) -> bool ; template <typename T, fmt::enable_if_t<(!has_isfinite<T>::value), int> = 0> constexpr auto isfinite(T value) -> bool ; template <typename T, fmt::enable_if_t<(is_floating_point<T>::value), int> = 0> __attribute__((always_inline)) constexpr bool signbit(T value) ; constexpr void adjust_precision(int& precision, int exp10) ; class bigint { private: using bigit = uint32_t; using double_bigit = uint64_t; enum { bigits_capacity = 32 }; basic_memory_buffer<bigit, bigits_capacity> bigits_; int exp_; constexpr auto operator[](int index) const -> bigit ; constexpr auto operator[](int index) -> bigit& ; static constexpr const int bigit_bits = num_bits<bigit>(); friend struct formatter<bigint>; constexpr void subtract_bigits(int index, bigit other, bigit& borrow) ; constexpr void remove_leading_zeros() ; constexpr void subtract_aligned(const bigint& other) ; constexpr void multiply(uint32_t value) ; template <typename UInt, fmt::enable_if_t<(std::is_same<UInt, uint64_t>::value || std::is_same<UInt, uint128_t>::value), int> = 0> constexpr void multiply(UInt value) ; template <typename UInt, fmt::enable_if_t<(std::is_same<UInt, uint64_t>::value || std::is_same<UInt, uint128_t>::value), int> = 0> constexpr void assign(UInt n) ; public: constexpr bigint() ; explicit bigint(uint64_t n) ; bigint(const bigint&) = delete; void operator=(const bigint&) = delete; constexpr void assign(const bigint& other) ; template <typename Int> constexpr void operator=(Int n) ; constexpr auto num_bigits() const -> int ; __attribute__((noinline)) constexpr auto operator<<=(int shift) -> bigint& ; template <typename Int> constexpr auto operator*=(Int value) -> bigint& ; friend constexpr auto compare(const bigint& lhs, const bigint& rhs) -> int ; friend constexpr auto add_compare(const bigint& lhs1, const bigint& lhs2, const bigint& rhs) -> int ; constexpr void assign_pow10(int exp) ; constexpr void square() ; constexpr void align(const bigint& other) ; constexpr auto divmod_assign(const bigint& divisor) -> int ; }; enum dragon { predecessor_closer = 1, fixup = 2, fixed = 4, }; constexpr void format_dragon(basic_fp<uint128_t> value, unsigned flags, int num_digits, buffer<char>& buf, int& exp10) ; template <typename Float, fmt::enable_if_t<(!is_double_double<Float>::value), int> = 0> constexpr void format_hexfloat(Float value, int precision, float_specs specs, buffer<char>& buf) ; template <typename Float, fmt::enable_if_t<(is_double_double<Float>::value), int> = 0> constexpr void format_hexfloat(Float value, int precision, float_specs specs, buffer<char>& buf) ; constexpr auto fractional_part_rounding_thresholds(int index) -> uint32_t ; template <typename Float> constexpr auto format_float(Float value, int precision, float_specs specs, buffer<char>& buf) -> int ; template <typename Char, typename OutputIt, typename T> constexpr auto write_float(OutputIt out, T value, format_specs<Char> specs, locale_ref loc) -> OutputIt ; template <typename Char, typename OutputIt, typename T, fmt::enable_if_t<(is_floating_point<T>::value), int> = 0> constexpr auto write(OutputIt out, T value, format_specs<Char> specs, locale_ref loc = {}) -> OutputIt ; template <typename Char, typename OutputIt, typename T, fmt::enable_if_t<(is_fast_float<T>::value), int> = 0> constexpr auto write(OutputIt out, T value) -> OutputIt ; template <typename Char, typename OutputIt, typename T, fmt::enable_if_t<(is_floating_point<T>::value && !is_fast_float<T>::value), int> = 0> auto write(OutputIt out, T value) -> OutputIt ; template <typename Char, typename OutputIt> auto write(OutputIt out, monostate, format_specs<Char> = {}, locale_ref = {}) -> OutputIt ; template <typename Char, typename OutputIt> constexpr auto write(OutputIt out, basic_string_view<Char> value) -> OutputIt ; template <typename Char, typename OutputIt, typename T, fmt::enable_if_t<(is_string<T>::value), int> = 0> constexpr auto write(OutputIt out, const T& value) -> OutputIt ; template < typename Char, typename OutputIt, typename T, bool check = std::is_enum<T>::value && !std::is_same<T, Char>::value && mapped_type_constant<T, basic_format_context<OutputIt, Char>>::value != type::custom_type, fmt::enable_if_t<(check), int> = 0> constexpr auto write(OutputIt out, T value) -> OutputIt ; template <typename Char, typename OutputIt, typename T, fmt::enable_if_t<(std::is_same<T, bool>::value), int> = 0> constexpr auto write(OutputIt out, T value, const format_specs<Char>& specs = {}, locale_ref = {}) -> OutputIt ; template <typename Char, typename OutputIt> constexpr auto write(OutputIt out, Char value) -> OutputIt ; template <typename Char, typename OutputIt> constexpr auto write(OutputIt out, const Char* value) -> OutputIt ; template <typename Char, typename OutputIt, typename T, fmt::enable_if_t<(std::is_same<T, void>::value), int> = 0> auto write(OutputIt out, const T* value, const format_specs<Char>& specs = {}, locale_ref = {}) -> OutputIt ; template <typename Char, typename OutputIt, typename T, typename Context = basic_format_context<OutputIt, Char>> constexpr auto write(OutputIt out, const T& value) -> enable_if_t< std::is_class<T>::value && !is_string<T>::value && !is_floating_point<T>::value && !std::is_same<T, Char>::value && !std::is_same<T, remove_cvref_t<decltype(arg_mapper<Context>().map( value))>>::value, OutputIt> ; template <typename Char, typename OutputIt, typename T, typename Context = basic_format_context<OutputIt, Char>> constexpr auto write(OutputIt out, const T& value) -> enable_if_t<mapped_type_constant<T, Context>::value == type::custom_type, OutputIt> ; template <typename Char> struct default_arg_formatter { using iterator = buffer_appender<Char>; using context = buffer_context<Char>; iterator out; basic_format_args<context> args; locale_ref loc; template <typename T> auto operator()(T value) -> iterator ; auto operator()(typename basic_format_arg<context>::handle h) -> iterator ; }; template <typename Char> struct arg_formatter { using iterator = buffer_appender<Char>; using context = buffer_context<Char>; iterator out; const format_specs<Char>& specs; locale_ref locale; template <typename T> constexpr __attribute__((always_inline)) auto operator()(T value) -> iterator ; auto operator()(typename basic_format_arg<context>::handle) -> iterator ; }; struct width_checker { template <typename T, fmt::enable_if_t<(is_integer<T>::value), int> = 0> constexpr auto operator()(T value) -> unsigned long long ; template <typename T, fmt::enable_if_t<(!is_integer<T>::value), int> = 0> constexpr auto operator()(T) -> unsigned long long ; }; struct precision_checker { template <typename T, fmt::enable_if_t<(is_integer<T>::value), int> = 0> constexpr auto operator()(T value) -> unsigned long long ; template <typename T, fmt::enable_if_t<(!is_integer<T>::value), int> = 0> constexpr auto operator()(T) -> unsigned long long ; }; template <typename Handler, typename FormatArg> constexpr auto get_dynamic_spec(FormatArg arg) -> int ; template <typename Context, typename ID> constexpr auto get_arg(Context& ctx, ID id) -> decltype(ctx.arg(id)) ; template <typename Handler, typename Context> constexpr void handle_dynamic_spec(int& value, arg_ref<typename Context::char_type> ref, Context& ctx) ; template <typename Char> struct udl_arg { const Char* str; template <typename T> auto operator=(T&& value) const -> named_arg<Char, T> ; }; template <typename Locale, typename Char> auto vformat(const Locale& loc, basic_string_view<Char> fmt, basic_format_args<buffer_context<type_identity_t<Char>>> args) -> std::basic_string<Char> ; using format_func = void (*)(detail::buffer<char>&, int, const char*); void format_error_code(buffer<char>& out, int error_code, string_view message) noexcept; void report_error(format_func func, int error_code, const char* message) noexcept; } auto vsystem_error(int error_code, string_view format_str, format_args args) -> std::system_error; template <typename... T> auto system_error(int error_code, format_string<T...> fmt, T&&... args) -> std::system_error ; void format_system_error(detail::buffer<char>& out, int error_code, const char* message) noexcept; void report_system_error(int error_code, const char* message) noexcept; class format_int { private: enum { buffer_size = std::numeric_limits<unsigned long long>::digits10 + 3 }; mutable char buffer_[buffer_size]; char* str_; template <typename UInt> auto format_unsigned(UInt value) -> char* ; template <typename Int> auto format_signed(Int value) -> char* ; public: explicit format_int(int value) ; explicit format_int(long value) ; explicit format_int(long long value) ; explicit format_int(unsigned value) ; explicit format_int(unsigned long value) ; explicit format_int(unsigned long long value) ; auto size() const -> size_t ; auto data() const -> const char* ; auto c_str() const -> const char* ; auto str() const -> std::string ; }; template <typename T, typename Char> struct formatter<T, Char, enable_if_t<detail::has_format_as<T>::value>> : formatter<detail::format_as_t<T>, Char> { template <typename FormatContext> auto format(const T& value, FormatContext& ctx) const -> decltype(ctx.out()) ; }; template <typename Char> struct formatter<signed char, Char> : formatter<int, Char> {}; template <typename Char> struct formatter<unsigned char, Char> : formatter<unsigned, Char> {}; template <typename Char> struct formatter<short, Char> : formatter<int, Char> {}; template <typename Char> struct formatter<unsigned short, Char> : formatter<unsigned, Char> {}; template <typename Char> struct formatter<long, Char> : formatter<detail::long_type, Char> {}; template <typename Char> struct formatter<unsigned long, Char> : formatter<detail::ulong_type, Char> {}; template <typename Char> struct formatter<Char*, Char> : formatter<const Char*, Char> {}; template <typename Char> struct formatter<std::basic_string<Char>, Char> : formatter<basic_string_view<Char>, Char> {}; template <typename Char> struct formatter<std::nullptr_t, Char> : formatter<const void*, Char> {}; template <typename Char> struct formatter<detail::std_string_view<Char>, Char> : formatter<basic_string_view<Char>, Char> {}; template <typename Char> struct formatter<void*, Char> : formatter<const void*, Char> {}; template <typename Char, size_t N> struct formatter<Char[N], Char> : formatter<basic_string_view<Char>, Char> {}; template <typename T> auto ptr(T p) -> const void* ; template <typename T, typename Deleter> auto ptr(const std::unique_ptr<T, Deleter>& p) -> const void* ; template <typename T> auto ptr(const std::shared_ptr<T>& p) -> const void* ; template <typename Enum> constexpr auto underlying(Enum e) noexcept -> underlying_t<Enum> ; namespace enums { template <typename Enum, fmt::enable_if_t<(std::is_enum<Enum>::value), int> = 0> constexpr auto format_as(Enum e) noexcept -> underlying_t<Enum> ; } class bytes { private: string_view data_; friend struct formatter<bytes>; public: explicit bytes(string_view data) ; }; template <> struct formatter<bytes> { private: detail::dynamic_format_specs<> specs_; public: template <typename ParseContext> constexpr auto parse(ParseContext& ctx) -> const char* ; template <typename FormatContext> auto format(bytes b, FormatContext& ctx) -> decltype(ctx.out()) ; }; template <typename T> struct group_digits_view { T value; }; template <typename T> auto group_digits(T value) -> group_digits_view<T> ; template <typename T> struct formatter<group_digits_view<T>> : formatter<T> { private: detail::dynamic_format_specs<> specs_; public: template <typename ParseContext> constexpr auto parse(ParseContext& ctx) -> const char* ; template <typename FormatContext> auto format(group_digits_view<T> t, FormatContext& ctx) -> decltype(ctx.out()) ; }; template <typename T> struct nested_view { const formatter<T>* fmt; const T* value; }; template <typename T> struct formatter<nested_view<T>> { constexpr auto parse(format_parse_context& ctx) -> const char* ; auto format(nested_view<T> view, format_context& ctx) const -> decltype(ctx.out()) ; }; template <typename T> struct nested_formatter { private: int width_; detail::fill_t<char> fill_; align_t align_ : 4; formatter<T> formatter_; public: constexpr nested_formatter() ; constexpr auto parse(format_parse_context& ctx) -> const char* ; template <typename F> auto write_padded(format_context& ctx, F write) const -> decltype(ctx.out()) ; auto nested(const T& value) const -> nested_view<T> ; }; template <typename It, typename Sentinel, typename Char = char> struct join_view : detail::view { It begin; Sentinel end; basic_string_view<Char> sep; join_view(It b, Sentinel e, basic_string_view<Char> s) ; }; template <typename It, typename Sentinel, typename Char> struct formatter<join_view<It, Sentinel, Char>, Char> { private: using value_type = std::iter_value_t<It>; formatter<remove_cvref_t<value_type>, Char> value_formatter_; public: template <typename ParseContext> constexpr auto parse(ParseContext& ctx) -> const Char* ; template <typename FormatContext> auto format(const join_view<It, Sentinel, Char>& value, FormatContext& ctx) const -> decltype(ctx.out()) ; }; template <typename It, typename Sentinel> auto join(It begin, Sentinel end, string_view sep) -> join_view<It, Sentinel> ; template <typename Range> auto join(Range&& range, string_view sep) -> join_view<detail::iterator_t<Range>, detail::sentinel_t<Range>> ; template <typename T, fmt::enable_if_t<(!std::is_integral<T>::value && !detail::has_format_as<T>::value), int> = 0> auto to_string(const T& value) -> std::string ; template <typename T, fmt::enable_if_t<(std::is_integral<T>::value), int> = 0> [[nodiscard]] auto to_string(T value) -> std::string ; template <typename Char, size_t SIZE> [[nodiscard]] auto to_string(const basic_memory_buffer<Char, SIZE>& buf) -> std::basic_string<Char> ; template <typename T, fmt::enable_if_t<(!std::is_integral<T>::value && detail::has_format_as<T>::value), int> = 0> auto to_string(const T& value) -> std::string ; namespace detail { template <typename Char> void vformat_to(buffer<Char>& buf, basic_string_view<Char> fmt, typename vformat_args<Char>::type args, locale_ref loc) ; extern template void vformat_to(buffer<char>&, string_view, typename vformat_args<>::type, locale_ref); extern template auto thousands_sep_impl<char>(locale_ref) -> thousands_sep_result<char>; extern template auto thousands_sep_impl<wchar_t>(locale_ref) -> thousands_sep_result<wchar_t>; extern template auto decimal_point_impl(locale_ref) -> char; extern template auto decimal_point_impl(locale_ref) -> wchar_t; } inline namespace literals { constexpr auto operator""_a(const char* s, size_t) -> detail::udl_arg<char> ; } template <typename Locale, fmt::enable_if_t<(detail::is_locale<Locale>::value), int> = 0> auto vformat(const Locale& loc, string_view fmt, format_args args) -> std::string ; template <typename Locale, typename... T, fmt::enable_if_t<(detail::is_locale<Locale>::value), int> = 0> auto format(const Locale& loc, format_string<T...> fmt, T&&... args) -> std::string ; template <typename OutputIt, typename Locale, fmt::enable_if_t<(detail::is_output_iterator<OutputIt, char>::value&& detail::is_locale<Locale>::value), int> = 0> auto vformat_to(OutputIt out, const Locale& loc, string_view fmt, format_args args) -> OutputIt ; template <typename OutputIt, typename Locale, typename... T, fmt::enable_if_t<(detail::is_output_iterator<OutputIt, char>::value&& detail::is_locale<Locale>::value), int> = 0> __attribute__((always_inline)) auto format_to(OutputIt out, const Locale& loc, format_string<T...> fmt, T&&... args) -> OutputIt ; template <typename Locale, typename... T, fmt::enable_if_t<(detail::is_locale<Locale>::value), int> = 0> [[nodiscard]] __attribute__((always_inline)) auto formatted_size(const Locale& loc, format_string<T...> fmt, T&&... args) -> size_t ; } } static_assert(202002L >= 201703L, "__cplusplus >= 201703L"); namespace folly { constexpr bool kHasUnalignedAccess = true; } namespace folly { constexpr bool kIsArchArm = 0 == 1; constexpr bool kIsArchAmd64 = 1 == 1; constexpr bool kIsArchAArch64 = 0 == 1; constexpr bool kIsArchPPC64 = 0 == 1; constexpr bool kIsArchS390X = 0 == 1; constexpr bool kIsArchRISCV64 = 0 == 1; } namespace folly { constexpr bool kIsLibrarySanitizeAddress = false; constexpr bool kIsSanitizeAddress = false; constexpr bool kIsSanitizeThread = false; constexpr bool kIsSanitizeDataflow = false; constexpr bool kIsSanitize = false; constexpr bool kIsOptimize = true; constexpr bool kIsOptimizeSize = false; } namespace folly { constexpr auto kIsDebug = false; } namespace folly { constexpr auto kHasExceptions = true; } namespace folly { constexpr auto kIsLittleEndian = 1234 == 1234; constexpr auto kIsBigEndian = !kIsLittleEndian; } namespace folly { constexpr auto kHasWeakSymbols = true; } namespace folly { constexpr bool const kHasRtti = 1; } namespace folly { constexpr auto kIsObjC = false; constexpr auto kIsMobile = false; constexpr auto kIsLinux = true; constexpr auto kIsWindows = false; constexpr auto kIsApple = false; constexpr bool kIsAppleIOS = 0 == 1; constexpr bool kIsAppleMacOS = 0 == 1; constexpr bool kIsAppleTVOS = 0 == 1; constexpr bool kIsAppleWatchOS = 0 == 1; constexpr auto kIsGlibcxx = true; constexpr auto kGlibcxxVer = 13; constexpr auto kGlibcxxAssertions = false; constexpr auto kIsLibcpp = false; constexpr auto kIsLibstdcpp = true; constexpr auto kMscVer = 0; constexpr auto kGnuc = 4; constexpr auto kIsClang = true; constexpr auto kClangVerMajor = 17; constexpr auto kMicrosoftAbiVer = 0; constexpr auto kCpplibVer = 0; } namespace folly { namespace builtin { namespace detail { template <typename V> struct predict_constinit_ { __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) consteval predict_constinit_( V ) noexcept ; }; template <typename E> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr E predict_( E exp, predict_constinit_<long> = 0, predict_constinit_<double> = 0.) ; } } } namespace folly { template <typename...> struct tag_t {}; template <typename... T> inline constexpr tag_t<T...> tag{}; template <std::size_t I> using index_constant = std::integral_constant<std::size_t, I>; template <typename...> inline constexpr bool always_false = false; namespace detail { template <typename Void, typename T> struct require_sizeof_ { static_assert(always_false<T>, "application of sizeof fails substitution"); }; template <typename T> struct require_sizeof_<decltype(void(sizeof(T))), T> { template <typename V> using apply_t = V; static constexpr std::size_t size = sizeof(T); }; } template <typename T> constexpr std::size_t require_sizeof = detail::require_sizeof_<void, T>::size; template <typename T> inline constexpr bool is_unbounded_array_v = false; template <typename T> inline constexpr bool is_unbounded_array_v<T[]> = true; template <typename T> struct is_unbounded_array : std::bool_constant<is_unbounded_array_v<T>> {}; template <typename T> inline constexpr bool is_bounded_array_v = false; template <typename T, std::size_t S> inline constexpr bool is_bounded_array_v<T[S]> = true; template <typename T> struct is_bounded_array : std::bool_constant<is_bounded_array_v<T>> {}; namespace detail { template <template <typename...> class, typename> inline constexpr bool is_instantiation_of_v = false; template <template <typename...> class C, typename... T> inline constexpr bool is_instantiation_of_v<C, C<T...>> = true; template <template <typename...> class C, typename... T> struct is_instantiation_of : std::bool_constant<is_instantiation_of_v<C, T...>> {}; template <typename, typename> inline constexpr bool is_similar_instantiation_v = false; template <template <typename...> class C, typename... A, typename... B> inline constexpr bool is_similar_instantiation_v<C<A...>, C<B...>> = true; template <typename A, typename B> struct is_similar_instantiation : std::bool_constant<is_similar_instantiation_v<A, B>> {}; } template <typename> struct member_pointer_traits; template <typename M, typename O> struct member_pointer_traits<M O::*> { using member_type = M; using object_type = O; }; namespace detail { struct is_constexpr_default_constructible_ { template <typename T> static constexpr auto make(tag_t<T>) -> decltype(void(T()), 0) ; template <typename T, int = make(tag<T>)> static std::true_type sfinae(T*); static std::false_type sfinae(void*); template <typename T> static constexpr bool apply = !require_sizeof<T> || decltype(sfinae(static_cast<T*>(nullptr)))::value; }; } template <typename T> inline constexpr bool is_constexpr_default_constructible_v = detail::is_constexpr_default_constructible_::apply<T>; template <typename T> struct is_constexpr_default_constructible : std::bool_constant<is_constexpr_default_constructible_v<T>> {}; template <typename T> using _t = typename T::type; template <typename T> struct remove_cvref { using type = typename std::remove_cv<typename std::remove_reference<T>::type>::type; }; template <typename T> using remove_cvref_t = typename remove_cvref<T>::type; namespace detail { template <typename Src> struct like_ { template <typename Dst> using apply = Dst; }; template <typename Src> struct like_<Src const> { template <typename Dst> using apply = Dst const; }; template <typename Src> struct like_<Src volatile> { template <typename Dst> using apply = Dst volatile; }; template <typename Src> struct like_<Src const volatile> { template <typename Dst> using apply = Dst const volatile; }; template <typename Src> struct like_<Src&> { template <typename Dst> using apply = typename like_<Src>::template apply<Dst>&; }; template <typename Src> struct like_<Src&&> { template <typename Dst> using apply = typename like_<Src>::template apply<Dst>&&; }; } template <typename Src, typename Dst> using like_t = typename detail::like_<Src>::template apply<remove_cvref_t<Dst>>; template <typename Src, typename Dst> struct like { using type = like_t<Src, Dst>; }; namespace traits_detail { template <class T, class...> struct type_t_ { using type = T; }; } template <class T, class... Ts> using type_t = typename traits_detail::type_t_<T, Ts...>::type; template <class... Ts> using void_t = type_t<void, Ts...>; struct nonesuch { ~nonesuch() = delete; nonesuch(nonesuch const&) = delete; void operator=(nonesuch const&) = delete; }; namespace detail { template <typename Void, typename D, template <typename...> class, typename...> struct detected_ { using value_t = std::false_type; using type = D; }; template <typename D, template <typename...> class T, typename... A> struct detected_<void_t<T<A...>>, D, T, A...> { using value_t = std::true_type; using type = T<A...>; }; } template <typename D, template <typename...> class T, typename... A> using detected_or = detail::detected_<void, D, T, A...>; template <typename D, template <typename...> class T, typename... A> using detected_or_t = typename detected_or<D, T, A...>::type; template <template <typename...> class T, typename... A> using detected_t = detected_or_t<nonesuch, T, A...>; template <template <typename...> class T, typename... A> inline constexpr bool is_detected_v = detected_or<nonesuch, T, A...>::value_t::value; template <template <typename...> class T, typename... A> struct is_detected : detected_or<nonesuch, T, A...>::value_t {}; template <typename T> using aligned_storage_for_t = typename std::aligned_storage<sizeof(T), alignof(T)>::type; namespace fallback { template <typename From, typename To> inline constexpr bool is_nothrow_convertible_v = (std::is_void<From>::value && std::is_void<To>::value) || ( std::is_convertible<From, To>::value && std::is_nothrow_constructible<To, From>::value); template <typename From, typename To> struct is_nothrow_convertible : std::bool_constant<is_nothrow_convertible_v<From, To>> {}; } using std::is_nothrow_convertible; using std::is_nothrow_convertible_v; namespace traits_detail { template <typename T> using detect_IsRelocatable = typename T::IsRelocatable; template <class T> struct IsRelocatable_is_true : std::is_same<typename T::IsRelocatable, std::true_type> {}; template <class T> struct has_true_IsRelocatable : std::conditional< is_detected_v<detect_IsRelocatable, T>, IsRelocatable_is_true<T>, std::false_type>::type {}; template <typename T> using detect_IsZeroInitializable = typename T::IsZeroInitializable; template <class T> struct IsZeroInitializable_is_true : std::is_same<typename T::IsZeroInitializable, std::true_type> {}; template <class T> struct has_true_IsZeroInitializable : std::conditional< is_detected_v<detect_IsZeroInitializable, T>, IsZeroInitializable_is_true<T>, std::false_type>::type {}; } struct Ignore { Ignore() = default; template <class T> constexpr Ignore(const T&) ; template <class T> const Ignore& operator=(T const&) const ; }; template <class...> using Ignored = Ignore; namespace traits_detail_IsEqualityComparable { Ignore operator==(Ignore, Ignore); template <class T, class U = T> struct IsEqualityComparable : std::is_convertible< decltype(std::declval<T>() == std::declval<U>()), bool> {}; } using traits_detail_IsEqualityComparable:: IsEqualityComparable; namespace traits_detail_IsLessThanComparable { Ignore operator<(Ignore, Ignore); template <class T, class U = T> struct IsLessThanComparable : std::is_convertible< decltype(std::declval<T>() < std::declval<U>()), bool> {}; } using traits_detail_IsLessThanComparable:: IsLessThanComparable; template <class T> struct IsRelocatable : std::conditional< !require_sizeof<T> || is_detected_v<traits_detail::detect_IsRelocatable, T>, traits_detail::has_true_IsRelocatable<T>, std::is_trivially_copyable<T>>::type {}; template <class T> struct IsZeroInitializable : std::conditional< !require_sizeof<T> || is_detected_v<traits_detail::detect_IsZeroInitializable, T>, traits_detail::has_true_IsZeroInitializable<T>, std::bool_constant< !std::is_class<T>::value && !std::is_union<T>::value && !std::is_member_object_pointer<T>::value && true>>::type {}; namespace detail { template <bool> struct conditional_; template <> struct conditional_<false> { template <typename, typename T> using apply = T; }; template <> struct conditional_<true> { template <typename T, typename> using apply = T; }; } template <bool V, typename T, typename F> using conditional_t = typename detail::conditional_<V>::template apply<T, F>; template <typename...> struct Conjunction : std::true_type {}; template <typename T> struct Conjunction<T> : T {}; template <typename T, typename... TList> struct Conjunction<T, TList...> : std::conditional<T::value, Conjunction<TList...>, T>::type {}; template <typename...> struct Disjunction : std::false_type {}; template <typename T> struct Disjunction<T> : T {}; template <typename T, typename... TList> struct Disjunction<T, TList...> : std::conditional<T::value, T, Disjunction<TList...>>::type {}; template <typename T> struct Negation : std::bool_constant<!T::value> {}; template <bool... Bs> struct Bools { using valid_type = bool; static constexpr std::size_t size() ; }; template <class... Ts> struct StrictConjunction : std::is_same<Bools<Ts::value...>, Bools<(Ts::value || true)...>> {}; template <class... Ts> struct StrictDisjunction : Negation< std::is_same<Bools<Ts::value...>, Bools<(Ts::value && false)...>>> {}; namespace detail { template <typename T> using is_transparent_ = typename T::is_transparent; } template <typename T> inline constexpr bool is_transparent_v = is_detected_v<detail::is_transparent_, T>; template <typename T> struct is_transparent : std::bool_constant<is_transparent_v<T>> {}; namespace detail { template <typename T, typename = void> inline constexpr bool is_allocator_ = !require_sizeof<T>; template <typename T> inline constexpr bool is_allocator_< T, void_t< typename T::value_type, decltype(std::declval<T&>().allocate(std::size_t{})), decltype(std::declval<T&>().deallocate( static_cast<typename T::value_type*>(nullptr), std::size_t{}))>> = true; } template <typename T> inline constexpr bool is_allocator_v = detail::is_allocator_<T>; template <typename T> struct is_allocator : std::bool_constant<is_allocator_v<T>> {}; } namespace folly { template <class T, class U> struct IsRelocatable<std::pair<T, U>> : std::bool_constant<IsRelocatable<T>::value && IsRelocatable<U>::value> {}; template <typename T, typename... Ts> using IsOneOf = StrictDisjunction<std::is_same<T, Ts>...>; template <typename T> constexpr bool is_negative(T x) ; template <typename T> constexpr bool is_non_positive(T x) ; template <typename T> constexpr bool is_positive(T x) ; template <typename T> constexpr bool is_non_negative(T x) ; namespace detail { #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wsign-compare" template <typename RHS, RHS rhs, typename LHS> bool less_than_impl(LHS const lhs) ; template <typename RHS, RHS rhs, typename LHS> bool greater_than_impl(LHS const lhs) ; #pragma GCC diagnostic pop } template <typename RHS, RHS rhs, typename LHS> bool less_than(LHS const lhs) ; template <typename RHS, RHS rhs, typename LHS> bool greater_than(LHS const lhs) ; } namespace folly { template <class T1, class T2> struct IsRelocatable<std::unique_ptr<T1, T2> > : std::true_type {}; } namespace folly { template <class T1> struct IsRelocatable<std::shared_ptr<T1> > : std::true_type {}; } namespace folly { template <typename T> struct is_arithmetic : std::is_arithmetic<T> {}; template <typename T> inline constexpr bool is_arithmetic_v = is_arithmetic<T>::value; template <typename T> struct is_integral : std::is_integral<T> {}; template <typename T> inline constexpr bool is_integral_v = is_integral<T>::value; template <typename T> struct is_signed : std::is_signed<T> {}; template <typename T> inline constexpr bool is_signed_v = is_signed<T>::value; template <typename T> struct is_unsigned : std::is_unsigned<T> {}; template <typename T> inline constexpr bool is_unsigned_v = is_unsigned<T>::value; template <typename T> struct make_signed : std::make_signed<T> {}; template <typename T> using make_signed_t = typename make_signed<T>::type; template <typename T> struct make_unsigned : std::make_unsigned<T> {}; template <typename T> using make_unsigned_t = typename make_unsigned<T>::type; namespace traits_detail { template <std::size_t> struct uint_bits_t_ {}; template <> struct uint_bits_t_<8> : type_t_<std::uint8_t> {}; template <> struct uint_bits_t_<16> : type_t_<std::uint16_t> {}; template <> struct uint_bits_t_<32> : type_t_<std::uint32_t> {}; template <> struct uint_bits_t_<64> : type_t_<std::uint64_t> {}; } template <std::size_t bits> using uint_bits_t = _t<traits_detail::uint_bits_t_<bits>>; template <std::size_t lg_bits> using uint_bits_lg_t = uint_bits_t<(1u << lg_bits)>; template <std::size_t bits> using int_bits_t = make_signed_t<uint_bits_t<bits>>; template <std::size_t lg_bits> using int_bits_lg_t = make_signed_t<uint_bits_lg_t<lg_bits>>; namespace traits_detail { template <std::size_t I, typename T> struct type_pack_element_indexed_type { using type = T; }; template <typename, typename...> struct type_pack_element_set; template <std::size_t... I, typename... T> struct type_pack_element_set<std::index_sequence<I...>, T...> : type_pack_element_indexed_type<I, T>... {}; template <typename... T> using type_pack_element_set_t = type_pack_element_set<std::index_sequence_for<T...>, T...>; template <std::size_t I> struct type_pack_element_test { template <typename T> static type_pack_element_indexed_type<I, T> impl( type_pack_element_indexed_type<I, T>*); }; template <std::size_t I, typename... Ts> using type_pack_element_fallback = _t<decltype(type_pack_element_test<I>::impl( static_cast<type_pack_element_set_t<Ts...>*>(nullptr)))>; } template <std::size_t I, typename... Ts> using type_pack_element_t = __type_pack_element<I, Ts...>; template <typename... Ts> inline constexpr std::size_t type_pack_size_v = sizeof...(Ts); template <typename... Ts> using type_pack_size_t = index_constant<sizeof...(Ts)>; template <typename T, typename Hasher> using is_hasher_usable = std::integral_constant< bool, std::is_default_constructible_v<Hasher> && std::is_copy_constructible_v<Hasher> && std::is_move_constructible_v<Hasher> && std::is_invocable_r_v<size_t, Hasher, const T&>>; template <typename T, typename Hasher> inline constexpr bool is_hasher_usable_v = is_hasher_usable<T, Hasher>::value; template <typename T, template <typename U> typename Hasher = std::hash> using is_hashable = std::integral_constant<bool, is_hasher_usable_v<T, Hasher<T>>>; template <typename T, template <typename U> typename Hasher = std::hash> inline constexpr bool is_hashable_v = is_hashable<T, Hasher>::value; namespace detail { template <typename T, typename> using enable_hasher_helper_impl = T; } template < typename T, template <typename U> typename Hasher, typename... Dependencies> using enable_hasher_helper = detail::enable_hasher_helper_impl< T, std::enable_if_t< StrictConjunction<is_hashable<Dependencies, Hasher>...>::value>>; template <typename T, typename... Dependencies> using enable_std_hash_helper = enable_hasher_helper<T, std::hash, Dependencies...>; } namespace folly { namespace detail { template <typename T> T decay_1_(T const volatile&&); template <typename T> T decay_1_(T const&); template <typename T> T* decay_1_(T*); template <typename T> auto decay_0_(int) -> decltype(detail::decay_1_(static_cast<T&& (*)() noexcept>(nullptr)())); template <typename T> auto decay_0_(short) -> void; template <typename T> using decay_t = decltype(detail::decay_0_<T>(0)); } using detail::decay_t; template <typename T> constexpr detail::decay_t<T> copy(T&& value) noexcept( noexcept(detail::decay_t<T>(static_cast<T&&>(value)))) ; template <typename Src, typename Dst> constexpr like_t<Src, Dst>&& forward_like(Dst&& dst) noexcept ; struct initlist_construct_t {}; constexpr initlist_construct_t initlist_construct{}; struct sorted_unique_t {}; constexpr sorted_unique_t sorted_unique{}; struct sorted_equivalent_t {}; constexpr sorted_equivalent_t sorted_equivalent{}; template <typename T> struct transparent : T { using is_transparent = void; using T::T; }; struct identity_fn { template <class T> constexpr T&& operator()(T&& x) const noexcept ; }; using Identity = identity_fn; inline constexpr identity_fn identity{}; namespace detail { template <typename T> struct inheritable_inherit_ : T { using T::T; template < typename... A, std::enable_if_t<std::is_constructible<T, A...>::value, int> = 0> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) inheritable_inherit_(A&&... a) noexcept( noexcept(T(static_cast<A&&>(a)...))) ; }; template <typename T> struct inheritable_contain_ { T v; template < typename... A, std::enable_if_t<std::is_constructible<T, A...>::value, int> = 0> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) inheritable_contain_(A&&... a) noexcept( noexcept(T(static_cast<A&&>(a)...))) ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) operator T&() & noexcept ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) operator T&&() && noexcept ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) operator T const&() const& noexcept ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) operator T const&&() const&& noexcept ; }; template <bool> struct inheritable_; template <> struct inheritable_<false> { template <typename T> using apply = inheritable_inherit_<T>; }; template <> struct inheritable_<true> { template <typename T> using apply = inheritable_contain_<T>; }; template <typename T> using inheritable = typename inheritable_<std::is_final<T>::value>::template apply<T>; } namespace moveonly_ { struct MoveOnly { constexpr MoveOnly() noexcept = default; ~MoveOnly() noexcept = default; MoveOnly(MoveOnly&&) noexcept = default; MoveOnly& operator=(MoveOnly&&) noexcept = default; MoveOnly(const MoveOnly&) = delete; MoveOnly& operator=(const MoveOnly&) = delete; }; struct NonCopyableNonMovable { constexpr NonCopyableNonMovable() noexcept = default; ~NonCopyableNonMovable() noexcept = default; NonCopyableNonMovable(NonCopyableNonMovable&&) = delete; NonCopyableNonMovable& operator=(NonCopyableNonMovable&&) = delete; NonCopyableNonMovable(const NonCopyableNonMovable&) = delete; NonCopyableNonMovable& operator=(const NonCopyableNonMovable&) = delete; }; struct Default {}; template <bool Copy, bool Move> using EnableCopyMove = std::conditional_t< Copy, Default, std::conditional_t<Move, MoveOnly, NonCopyableNonMovable>>; } using moveonly_::MoveOnly; using moveonly_::NonCopyableNonMovable; struct variadic_noop_fn { template <typename... A> constexpr void operator()(A&&...) const noexcept ; }; inline constexpr variadic_noop_fn variadic_noop; template <auto Value> struct variadic_constant_of_fn { using value_type = decltype(Value); static inline constexpr value_type value = Value; template <typename... A> constexpr value_type operator()(A&&...) const noexcept ; }; template <auto Value> inline constexpr variadic_constant_of_fn<Value> variadic_constant_of; struct unsafe_default_initialized_cv { #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wuninitialized" template <typename T> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr operator T() const noexcept ; #pragma GCC diagnostic pop }; inline constexpr unsafe_default_initialized_cv unsafe_default_initialized{}; struct to_signed_fn { template <typename..., typename T> constexpr auto operator()(T const& t) const noexcept -> typename std::make_signed<T>::type ; }; inline constexpr to_signed_fn to_signed{}; struct to_unsigned_fn { template <typename..., typename T> constexpr auto operator()(T const& t) const noexcept -> typename std::make_unsigned<T>::type ; }; inline constexpr to_unsigned_fn to_unsigned{}; namespace detail { template <typename Src, typename Dst> inline constexpr bool is_to_narrow_convertible_v = (std::is_integral<Dst>::value) && (std::is_signed<Dst>::value == std::is_signed<Src>::value); } template <typename Src> class to_narrow_convertible { static_assert(std::is_integral<Src>::value, "not an integer"); template <typename Dst> struct to_ : std::bool_constant<detail::is_to_narrow_convertible_v<Src, Dst>> {}; public: explicit constexpr to_narrow_convertible(Src const& value) ; explicit to_narrow_convertible(to_narrow_convertible const&) = default; explicit to_narrow_convertible(to_narrow_convertible&&) = default; to_narrow_convertible& operator=(to_narrow_convertible const&) = default; to_narrow_convertible& operator=(to_narrow_convertible&&) = default; template <typename Dst, std::enable_if_t<to_<Dst>::value, int> = 0> constexpr operator Dst() const noexcept ; private: Src value_; }; struct to_narrow_fn { template <typename..., typename Src> constexpr auto operator()(Src const& src) const noexcept -> to_narrow_convertible<Src> ; }; inline constexpr to_narrow_fn to_narrow{}; template <typename Src> class to_integral_convertible { static_assert(std::is_floating_point<Src>::value, "not a floating-point"); template <typename Dst> static constexpr bool to_ = std::is_integral<Dst>::value; public: explicit constexpr to_integral_convertible(Src const& value) ; explicit to_integral_convertible(to_integral_convertible const&) = default; explicit to_integral_convertible(to_integral_convertible&&) = default; to_integral_convertible& operator=(to_integral_convertible const&) = default; to_integral_convertible& operator=(to_integral_convertible&&) = default; template <typename Dst, std::enable_if_t<to_<Dst>, int> = 0> constexpr operator Dst() const noexcept ; private: Src value_; }; struct to_integral_fn { template <typename..., typename Src> constexpr auto operator()(Src const& src) const noexcept -> to_integral_convertible<Src> ; }; inline constexpr to_integral_fn to_integral{}; template <typename Src> class to_floating_point_convertible { static_assert(std::is_integral<Src>::value, "not a floating-point"); template <typename Dst> static constexpr bool to_ = std::is_floating_point<Dst>::value; public: explicit constexpr to_floating_point_convertible(Src const& value) ; explicit to_floating_point_convertible(to_floating_point_convertible const&) = default; explicit to_floating_point_convertible(to_floating_point_convertible&&) = default; to_floating_point_convertible& operator=( to_floating_point_convertible const&) = default; to_floating_point_convertible& operator=(to_floating_point_convertible&&) = default; template <typename Dst, std::enable_if_t<to_<Dst>, int> = 0> constexpr operator Dst() const noexcept ; private: Src value_; }; struct to_floating_point_fn { template <typename..., typename Src> constexpr auto operator()(Src const& src) const noexcept -> to_floating_point_convertible<Src> ; }; inline constexpr to_floating_point_fn to_floating_point{}; struct to_underlying_fn { template <typename..., class E> constexpr std::underlying_type_t<E> operator()(E e) const noexcept ; }; inline constexpr to_underlying_fn to_underlying{}; namespace detail { template <typename R> using invocable_to_detect = decltype(static_cast<R (*)() noexcept>(nullptr)()()); template < typename F, typename TML = detected_t<invocable_to_detect, F&>, typename TCL = detected_t<invocable_to_detect, F const&>, typename TMR = detected_t<invocable_to_detect, F&&>, typename TCR = detected_t<invocable_to_detect, F const&&>> class invocable_to_convertible : private inheritable<F> { private: static_assert(std::is_same<F, decay_t<F>>::value, "mismatch"); template <typename R> using result_t = detected_t<invocable_to_detect, R>; template <typename R> static constexpr bool detected_v = is_detected_v<invocable_to_detect, R>; template <typename R> using if_invocable_as_v = std::enable_if_t<detected_v<R>, int>; template <typename R> static constexpr bool nx_v = noexcept(static_cast<R (*)() noexcept>(nullptr)()()); template <typename G> static constexpr bool constructible_v = std::is_constructible<F, G&&>::value; using FML = F&; using FCL = F const&; using FMR = F&&; using FCR = F const&&; static_assert(std::is_same<TML, result_t<FML>>::value, "mismatch"); static_assert(std::is_same<TCL, result_t<FCL>>::value, "mismatch"); static_assert(std::is_same<TMR, result_t<FMR>>::value, "mismatch"); static_assert(std::is_same<TCR, result_t<FCR>>::value, "mismatch"); public: template <typename G, std::enable_if_t<constructible_v<G&&>, int> = 0> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) explicit constexpr invocable_to_convertible(G&& g) noexcept( noexcept(F(static_cast<G&&>(g)))) ; template <typename..., typename R = FML, if_invocable_as_v<R> = 0> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr operator TML() & noexcept(nx_v<R>) ; template <typename..., typename R = FCL, if_invocable_as_v<R> = 0> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr operator TCL() const& noexcept(nx_v<R>) ; template <typename..., typename R = FMR, if_invocable_as_v<R> = 0> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr operator TMR() && noexcept(nx_v<R>) ; template <typename..., typename R = FCR, if_invocable_as_v<R> = 0> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr operator TCR() const&& noexcept(nx_v<R>) ; }; } struct invocable_to_fn { template < typename F, typename..., typename D = detail::decay_t<F>, typename R = detail::invocable_to_convertible<D>, std::enable_if_t<std::is_constructible<D, F&&>::value, int> = 0> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr R operator()(F&& f) const noexcept(noexcept(R(static_cast<F&&>(f)))) ; }; inline constexpr invocable_to_fn invocable_to{}; } namespace folly { template <typename T> struct StaticConst { static constexpr T value{}; }; } namespace folly { template <const auto& Tag> using cpo_t = std::decay_t<decltype(Tag)>; } namespace folly { struct invoke_fn { template <typename F, typename... A> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(F&& f, A&&... a) const noexcept(noexcept(static_cast<F&&>(f)(static_cast<A&&>(a)...))) -> decltype(static_cast<F&&>(f)(static_cast<A&&>(a)...)) ; template <typename M, typename C, typename... A> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(M C::*f, A&&... a) const noexcept(noexcept(std::mem_fn(f)(static_cast<A&&>(a)...))) -> decltype(std::mem_fn(f)(static_cast<A&&>(a)...)) ; }; inline constexpr invoke_fn invoke; } namespace folly { namespace invoke_detail { struct ok_one_ { template <typename T> static constexpr bool pass_v = ( std::is_void_v<T> || std::is_reference_v<T> || std::is_function_v<T> || is_unbounded_array_v<T> || false); template <typename T, std::size_t = sizeof(T)> static void test(int); template <typename T> static auto test(...) ; template <typename T> using apply = decltype(test<T>(0)); }; template <typename T, typename... A> using ok_ = type_t<T, ok_one_::apply<A>...>; template <typename F> struct traits { template <typename... A> using result = decltype( static_cast<F&& (*)() noexcept>(nullptr)()(static_cast<A&& (*)() noexcept>(nullptr)()...)); template <typename... A> static constexpr bool nothrow = noexcept( static_cast<F&& (*)() noexcept>(nullptr)()(static_cast<A&& (*)() noexcept>(nullptr)()...)); }; template <typename P> struct traits_member_ptr { template <typename... A> using result = decltype( std::mem_fn(static_cast<P (*)() noexcept>(nullptr)())(static_cast<A&& (*)() noexcept>(nullptr)()...)); template <typename... A> static constexpr bool nothrow = noexcept( std::mem_fn(static_cast<P (*)() noexcept>(nullptr)())(static_cast<A&& (*)() noexcept>(nullptr)()...)); }; template <typename M, typename C> struct traits<M C::*> : traits_member_ptr<M C::*> {}; template <typename M, typename C> struct traits<M C::*const> : traits_member_ptr<M C::*> {}; template <typename M, typename C> struct traits<M C::*&> : traits_member_ptr<M C::*> {}; template <typename M, typename C> struct traits<M C::*const&> : traits_member_ptr<M C::*> {}; template <typename M, typename C> struct traits<M C::*&&> : traits_member_ptr<M C::*> {}; template <typename M, typename C> struct traits<M C::*const&&> : traits_member_ptr<M C::*> {}; template <bool IsVoid> struct conv_r_; template <> struct conv_r_<true> { template <bool NX, typename R, typename FR> using apply = std::true_type; }; template <> struct conv_r_<false> { template <typename R> static void conv(R, decay_t<R>* = nullptr) noexcept; template < bool NX, typename R, typename FR, bool C = noexcept(conv<R>(static_cast<FR (*)() noexcept>(nullptr)()))> static std::bool_constant<!NX || C> test(int); template <bool NX, typename R, typename FR> static std::false_type test(...); template <bool NX, typename R, typename FR> using apply = decltype(test<NX, R, FR>(0)); }; template <bool NX, typename R, typename FR> static inline constexpr bool conv_r_v_ = conv_r_<std::is_void_v<R>>::template apply<NX, R, FR>::value; template <typename F, typename... A> using invoke_result_t = typename traits<F>::template result<A...>; template <typename Void, typename F, typename... A> struct invoke_result {}; template <typename F, typename... A> struct invoke_result<void_t<invoke_result_t<F, A...>>, F, A...> { using type = invoke_result_t<F, A...>; }; template <typename Void, typename F, typename... A> inline constexpr bool is_invocable_v = ok_<bool, F, A...>{false}; template <typename F, typename... A> inline constexpr bool is_invocable_v<void_t<invoke_result_t<F, A...>>, F, A...> = true; template <typename Void, typename R, typename F, typename... A> inline constexpr bool is_invocable_r_v = ok_<bool, R, F, A...>{false}; template <typename R, typename F, typename... A> inline constexpr bool is_invocable_r_v<void_t<invoke_result_t<F, A...>>, R, F, A...> = conv_r_v_<false, R, invoke_result_t<F, A...>>; template <typename Void, typename F, typename... A> inline constexpr bool is_nothrow_invocable_v = ok_<bool, F, A...>{false}; template <typename F, typename... A> inline constexpr bool is_nothrow_invocable_v<void_t<invoke_result_t<F, A...>>, F, A...> = traits<F>::template nothrow<A...>; template <typename Void, typename R, typename F, typename... A> inline constexpr bool is_nothrow_invocable_r_v = ok_<bool, R, F, A...>{false}; template <typename R, typename F, typename... A> inline constexpr bool is_nothrow_invocable_r_v<void_t<invoke_result_t<F, A...>>, R, F, A...> = traits<F>::template nothrow<A...> && conv_r_v_<true, R, invoke_result_t<F, A...>>; } template <typename F, typename... A> using invoke_result = invoke_detail::invoke_result<void, F, A...>; using invoke_detail::invoke_result_t; template <typename F, typename... A> inline constexpr bool is_invocable_v = invoke_detail::is_invocable_v<void, F, A...>; template <typename F, typename... A> struct is_invocable : std::bool_constant<is_invocable_v<F, A...>> {}; template <typename R, typename F, typename... A> inline constexpr bool is_invocable_r_v = invoke_detail::is_invocable_r_v<void, R, F, A...>; template <typename R, typename F, typename... A> struct is_invocable_r : std::bool_constant<is_invocable_r_v<R, F, A...>> {}; template <typename F, typename... A> inline constexpr bool is_nothrow_invocable_v = invoke_detail::is_nothrow_invocable_v<void, F, A...>; template <typename F, typename... A> struct is_nothrow_invocable : std::bool_constant<is_nothrow_invocable_v<F, A...>> {}; template <typename R, typename F, typename... Args> inline constexpr bool is_nothrow_invocable_r_v = invoke_detail::is_nothrow_invocable_r_v<void, R, F, Args...>; template <typename R, typename F, typename... A> struct is_nothrow_invocable_r : std::bool_constant<is_nothrow_invocable_r_v<R, F, A...>> {}; } namespace folly { namespace detail { struct invoke_private_overload; template <bool, typename I> struct invoke_traits_base_ {}; template <typename I> struct invoke_traits_base_<false, I> {}; template <typename I> struct invoke_traits_base_<true, I> { inline static constexpr I invoke{}; }; template <typename I> using invoke_traits_base = invoke_traits_base_<is_constexpr_default_constructible_v<I>, I>; } template <typename I> struct invoke_traits : detail::invoke_traits_base<I> { public: using invoke_type = I; template <typename... A> using invoke_result = invoke_detail::invoke_result<void, I, A...>; template <typename... A> using invoke_result_t = invoke_detail::invoke_result_t<I, A...>; template <typename... A> inline static constexpr bool is_invocable_v = invoke_detail::is_invocable_v<void, I, A...>; template <typename... A> struct is_invocable : std::bool_constant<invoke_detail::is_invocable_v<void, I, A...>> {}; template <typename R, typename... A> inline static constexpr bool is_invocable_r_v = invoke_detail::is_invocable_r_v<void, R, I, A...>; template <typename R, typename... A> struct is_invocable_r : std::bool_constant< invoke_detail::is_invocable_r_v<void, R, I, A...>> {}; template <typename... A> inline static constexpr bool is_nothrow_invocable_v = invoke_detail::is_nothrow_invocable_v<void, I, A...>; template <typename... A> struct is_nothrow_invocable : std::bool_constant< invoke_detail::is_nothrow_invocable_v<void, I, A...>> {}; template <typename R, typename... A> inline static constexpr bool is_nothrow_invocable_r_v = invoke_detail::is_nothrow_invocable_r_v<void, R, I, A...>; template <typename R, typename... A> struct is_nothrow_invocable_r : std::bool_constant< invoke_detail::is_nothrow_invocable_r_v<void, R, I, A...>> {}; }; template <typename... Invoker> struct invoke_first_match : private Invoker... { private: using iseq = std::index_sequence_for<Invoker...>; template <size_t Idx> using at = type_pack_element_t<Idx, Invoker...>; template <size_t... Idx, typename... A> static constexpr size_t first_(std::index_sequence<Idx...>, tag_t<A...>) ; template <typename... A> static constexpr size_t first = first_(iseq{}, tag<A...>); public: template <typename... A, typename Inv = at<first<A...>>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(A&&... a) const noexcept(is_nothrow_invocable_v<Inv const&, A...>) -> invoke_result_t<Inv const&, A...> ; }; } namespace folly { namespace detail_tag_invoke_fn { void tag_invoke(); struct tag_invoke_fn { template <typename Tag, typename... Args> constexpr auto operator()(Tag tag, Args&&... args) const noexcept(noexcept( tag_invoke(static_cast<Tag&&>(tag), static_cast<Args&&>(args)...))) -> decltype(tag_invoke( static_cast<Tag&&>(tag), static_cast<Args&&>(args)...)) ; }; template <typename Tag, typename... Args> using tag_invoke_result_t = decltype(tag_invoke( static_cast<Tag && (*)() noexcept>(nullptr)(), static_cast<Args && (*)() noexcept>(nullptr)()...)); template <typename Tag, typename... Args> auto try_tag_invoke(int) noexcept( noexcept(tag_invoke(static_cast<Tag&& (*)() noexcept>(nullptr)(), static_cast<Args&& (*)() noexcept>(nullptr)()...))) -> decltype(static_cast<void>(tag_invoke(static_cast<Tag&& (*)() noexcept>(nullptr)(), static_cast<Args&& (*)() noexcept>(nullptr)()...)), std::true_type{}); template <typename Tag, typename... Args> std::false_type try_tag_invoke(...) noexcept(false); template <template <typename...> class T, typename... Args> struct defer { using type = T<Args...>; }; struct empty {}; } namespace folly_cpo__ { inline constexpr detail_tag_invoke_fn::tag_invoke_fn tag_invoke{}; } using namespace folly_cpo__; template <typename Tag, typename... Args> inline constexpr bool is_tag_invocable_v = decltype(detail_tag_invoke_fn::try_tag_invoke<Tag, Args...>(0))::value; template <typename Tag, typename... Args> struct is_tag_invocable : std::bool_constant<is_tag_invocable_v<Tag, Args...>> {}; template <typename Tag, typename... Args> inline constexpr bool is_nothrow_tag_invocable_v = noexcept(detail_tag_invoke_fn::try_tag_invoke<Tag, Args...>(0)); template <typename Tag, typename... Args> struct is_nothrow_tag_invocable : std::bool_constant<is_nothrow_tag_invocable_v<Tag, Args...>> {}; template <typename R, typename Tag, typename... Args> using is_tag_invocable_r = folly::is_invocable_r<R, decltype(folly::tag_invoke), Tag, Args...>; template <typename R, typename Tag, typename... Args> inline constexpr bool is_tag_invocable_r_v = is_tag_invocable_r<R, Tag, Args...>::value; template <typename R, typename Tag, typename... Args> using is_nothrow_tag_invocable_r = folly::is_nothrow_invocable_r<R, decltype(folly::tag_invoke), Tag, Args...>; template <typename R, typename Tag, typename... Args> inline constexpr bool is_nothrow_tag_invocable_r_v = is_nothrow_tag_invocable_r<R, Tag, Args...>::value; using detail_tag_invoke_fn::tag_invoke_result_t; template <typename Tag, typename... Args> struct tag_invoke_result : conditional_t< is_tag_invocable_v<Tag, Args...>, detail_tag_invoke_fn::defer<tag_invoke_result_t, Tag, Args...>, detail_tag_invoke_fn::empty> {}; } namespace folly { template <typename Tuple> using index_sequence_for_tuple = std::make_index_sequence<std::tuple_size<Tuple>::value>; namespace detail { namespace apply_tuple { namespace adl { using std::get; template <std::size_t I> struct invoke_get_fn { template <typename T> constexpr auto operator()(T&& t) const noexcept(noexcept(get<I>(static_cast<T&&>(t)))) -> decltype(get<I>(static_cast<T&&>(t))) ; }; } template < typename Tuple, std::size_t... Indices, typename ReturnTuple = std::tuple< decltype(adl::invoke_get_fn<Indices>{}(std::declval<Tuple>()))...>> auto forward_tuple(Tuple&& tuple, std::index_sequence<Indices...>) -> ReturnTuple ; } } struct ApplyInvoke { private: template <typename T> using seq = index_sequence_for_tuple<std::remove_reference_t<T>>; template <std::size_t I> using get = detail::apply_tuple::adl::invoke_get_fn<I>; template <typename F, typename T, std::size_t... I> static constexpr auto invoke_(F&& f, T&& t, std::index_sequence<I...>) noexcept( noexcept(invoke(static_cast<F&&>(f), get<I>{}(static_cast<T&&>(t))...))) -> decltype(invoke( static_cast<F&&>(f), get<I>{}(static_cast<T&&>(t))...)) ; public: template <typename F, typename T> constexpr auto operator()(F&& f, T&& t) const noexcept( noexcept(invoke_(static_cast<F&&>(f), static_cast<T&&>(t), seq<T>{}))) -> decltype(invoke_(static_cast<F&&>(f), static_cast<T&&>(t), seq<T>{})) ; }; using std::apply; template <typename Tuple> auto forward_tuple(Tuple&& tuple) noexcept -> decltype(detail::apply_tuple::forward_tuple( std::declval<Tuple>(), std::declval< index_sequence_for_tuple<std::remove_reference_t<Tuple>>>())) ; template <typename F, typename Tuple> using apply_result = invoke_result<ApplyInvoke, F, Tuple>; template <typename F, typename Tuple> using apply_result_t = invoke_result_t<ApplyInvoke, F, Tuple>; template <typename F, typename Tuple> inline constexpr bool is_applicable_v = is_invocable_v<ApplyInvoke, F, Tuple>; template <typename F, typename Tuple> using is_applicable = is_invocable<ApplyInvoke, F, Tuple>; template <typename R, typename F, typename Tuple> inline constexpr bool is_applicable_r_v = is_invocable_r_v<R, ApplyInvoke, F, Tuple>; template <typename R, typename F, typename Tuple> using is_applicable_r = is_invocable_r<R, ApplyInvoke, F, Tuple>; template <typename F, typename Tuple> inline constexpr bool is_nothrow_applicable_v = is_nothrow_invocable_v<ApplyInvoke, F, Tuple>; template <typename F, typename Tuple> using is_nothrow_applicable = is_nothrow_invocable<ApplyInvoke, F, Tuple>; template <typename R, typename F, typename Tuple> inline constexpr bool is_nothrow_applicable_r_v = is_nothrow_invocable_r_v<R, ApplyInvoke, F, Tuple>; template <typename R, typename F, typename Tuple> using is_nothrow_applicable_r = is_nothrow_invocable_r<R, ApplyInvoke, F, Tuple>; namespace detail { namespace apply_tuple { template <class F> class Uncurry { public: explicit Uncurry(F&& func) ; explicit Uncurry(const F& func) ; template <class Tuple> auto operator()(Tuple&& tuple) const -> decltype(apply(std::declval<F>(), std::forward<Tuple>(tuple))) ; private: F func_; }; } } template <class F> auto uncurry(F&& f) -> detail::apply_tuple::Uncurry<typename std::decay<F>::type> ; } namespace folly { namespace hash { class SpookyHashV1 { public: static void Hash128( const void *message, size_t length, uint64_t *hash1, uint64_t *hash2); static uint64_t Hash64( const void *message, size_t length, uint64_t seed) ; static uint32_t Hash32( const void *message, size_t length, uint32_t seed) ; void Init( uint64_t seed1, uint64_t seed2); void Update( const void *message, size_t length); void Final( uint64_t *hash1, uint64_t *hash2); static uint64_t Rot64(uint64_t x, int k) ; static void Mix( const uint64_t *data, uint64_t &s0, uint64_t &s1, uint64_t &s2, uint64_t &s3, uint64_t &s4, uint64_t &s5, uint64_t &s6, uint64_t &s7, uint64_t &s8, uint64_t &s9, uint64_t &s10,uint64_t &s11) ; static void EndPartial( uint64_t &h0, uint64_t &h1, uint64_t &h2, uint64_t &h3, uint64_t &h4, uint64_t &h5, uint64_t &h6, uint64_t &h7, uint64_t &h8, uint64_t &h9, uint64_t &h10,uint64_t &h11) ; static void End( uint64_t &h0, uint64_t &h1, uint64_t &h2, uint64_t &h3, uint64_t &h4, uint64_t &h5, uint64_t &h6, uint64_t &h7, uint64_t &h8, uint64_t &h9, uint64_t &h10,uint64_t &h11) ; static void ShortMix(uint64_t &h0, uint64_t &h1, uint64_t &h2, uint64_t &h3) ; static void ShortEnd(uint64_t &h0, uint64_t &h1, uint64_t &h2, uint64_t &h3) ; private: static void Short( const void *message, size_t length, uint64_t *hash1, uint64_t *hash2); static const size_t sc_numVars = 12; static const size_t sc_blockSize = sc_numVars*8; static const size_t sc_bufSize = 2*sc_blockSize; static const uint64_t sc_const = 0xdeadbeefdeadbeefULL; uint64_t m_data[2*sc_numVars]; uint64_t m_state[sc_numVars]; size_t m_length; uint8_t m_remainder; }; } } namespace folly { namespace hash { class SpookyHashV2 { public: static void Hash128( const void *message, size_t length, uint64_t *hash1, uint64_t *hash2); static uint64_t Hash64( const void *message, size_t length, uint64_t seed) ; static uint32_t Hash32( const void *message, size_t length, uint32_t seed) ; void Init( uint64_t seed1, uint64_t seed2); void Update( const void *message, size_t length); void Final( uint64_t *hash1, uint64_t *hash2) const; static uint64_t Rot64(uint64_t x, int k) ; static void Mix( const uint64_t *data, uint64_t &s0, uint64_t &s1, uint64_t &s2, uint64_t &s3, uint64_t &s4, uint64_t &s5, uint64_t &s6, uint64_t &s7, uint64_t &s8, uint64_t &s9, uint64_t &s10,uint64_t &s11) ; static void EndPartial( uint64_t &h0, uint64_t &h1, uint64_t &h2, uint64_t &h3, uint64_t &h4, uint64_t &h5, uint64_t &h6, uint64_t &h7, uint64_t &h8, uint64_t &h9, uint64_t &h10,uint64_t &h11) ; static void End( const uint64_t *data, uint64_t &h0, uint64_t &h1, uint64_t &h2, uint64_t &h3, uint64_t &h4, uint64_t &h5, uint64_t &h6, uint64_t &h7, uint64_t &h8, uint64_t &h9, uint64_t &h10,uint64_t &h11) ; static void ShortMix(uint64_t &h0, uint64_t &h1, uint64_t &h2, uint64_t &h3) ; static void ShortEnd(uint64_t &h0, uint64_t &h1, uint64_t &h2, uint64_t &h3) ; private: static void Short( const void *message, size_t length, uint64_t *hash1, uint64_t *hash2); static constexpr size_t sc_numVars = 12; static constexpr size_t sc_blockSize = sc_numVars*8; static constexpr size_t sc_bufSize = 2*sc_blockSize; static constexpr uint64_t sc_const = 0xdeadbeefdeadbeefULL; uint64_t m_data[2*sc_numVars]; uint64_t m_state[sc_numVars]; size_t m_length; uint8_t m_remainder; }; } } extern "C" { typedef struct { long int quot; long int rem; } imaxdiv_t; extern intmax_t imaxabs (intmax_t __n) noexcept (true) __attribute__ ((__const__)); extern imaxdiv_t imaxdiv (intmax_t __numer, intmax_t __denom) noexcept (true) __attribute__ ((__const__)); extern intmax_t strtoimax (const char *__restrict __nptr, char **__restrict __endptr, int __base) noexcept (true); extern uintmax_t strtoumax (const char *__restrict __nptr, char ** __restrict __endptr, int __base) noexcept (true); extern intmax_t wcstoimax (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) noexcept (true); extern uintmax_t wcstoumax (const wchar_t *__restrict __nptr, wchar_t ** __restrict __endptr, int __base) noexcept (true); extern intmax_t strtoimax (const char *__restrict __nptr, char **__restrict __endptr, int __base) noexcept (true) __asm__ ("" "__isoc23_strtoimax"); extern uintmax_t strtoumax (const char *__restrict __nptr, char **__restrict __endptr, int __base) noexcept (true) __asm__ ("" "__isoc23_strtoumax"); extern intmax_t wcstoimax (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) noexcept (true) __asm__ ("" "__isoc23_wcstoimax"); extern uintmax_t wcstoumax (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) noexcept (true) __asm__ ("" "__isoc23_wcstoumax"); } namespace std { using ::imaxdiv_t; using ::imaxabs; using ::imaxdiv; using ::strtoimax; using ::strtoumax; using ::wcstoimax; using ::wcstoumax; } namespace folly { namespace detail { template <typename T, typename = std::enable_if_t<std::is_integral_v<T>>> bool generic_checked_add(T* result, T a, T b) ; template <typename T, typename = std::enable_if_t<std::is_unsigned<T>::value>> bool generic_checked_small_mul(T* result, T a, T b) ; template <typename T, typename = std::enable_if_t<std::is_unsigned<T>::value>> std::enable_if_t<sizeof(T) < sizeof(uint64_t), bool> generic_checked_mul( T* result, T a, T b) ; template <typename T, typename = std::enable_if_t<std::is_unsigned<T>::value>> std::enable_if_t<sizeof(T) == sizeof(uint64_t), bool> generic_checked_mul( T* result, T a, T b) ; } template <typename T, typename = std::enable_if_t<std::is_integral_v<T>>> bool checked_add(T* result, T a, T b) ; template <typename T, typename = std::enable_if_t<std::is_unsigned<T>::value>> bool checked_add(T* result, T a, T b, T c) ; template <typename T, typename = std::enable_if_t<std::is_unsigned<T>::value>> bool checked_add(T* result, T a, T b, T c, T d) ; template <typename T> bool checked_div(T* result, T dividend, T divisor) ; template <typename T> bool checked_mod(T* result, T dividend, T divisor) ; template <typename T, typename = std::enable_if_t<std::is_unsigned<T>::value>> bool checked_mul(T* result, T a, T b) ; template <typename T, typename = std::enable_if_t<std::is_unsigned<T>::value>> bool checked_muladd(T* result, T base, T mul, T add) ; template < typename T, typename T2, typename = std::enable_if_t<std::is_pointer<T>::value>, typename = std::enable_if_t<std::is_unsigned<T2>::value>> bool checked_add(T* result, T a, T2 b) ; } namespace folly { namespace detail { template < typename Char, std::size_t = __builtin_strlen(static_cast<const Char*>(""))> constexpr std::size_t constexpr_strlen_internal(const Char* s, int) noexcept { return __builtin_strlen(s); } template <typename Char> constexpr std::size_t constexpr_strlen_internal( const Char* s, unsigned) noexcept { std::size_t ret = 0; while (*s++) { ++ret; } return ret; } template <typename Char> constexpr std::size_t constexpr_strlen_fallback(const Char* s) noexcept { return constexpr_strlen_internal(s, 0u); } static_assert( constexpr_strlen_fallback("123456789") == 9, "Someone appears to have broken constexpr_strlen..."); template < typename Char, int = __builtin_strcmp(static_cast<const Char*>(""), "")> constexpr int constexpr_strcmp_internal( const Char* s1, const Char* s2, int) noexcept { return __builtin_strcmp(s1, s2); } template <typename Char> constexpr int constexpr_strcmp_internal( const Char* s1, const Char* s2, unsigned) noexcept { while (*s1 && *s1 == *s2) { ++s1, ++s2; } return int(*s2 < *s1) - int(*s1 < *s2); } template <typename Char> constexpr int constexpr_strcmp_fallback( const Char* s1, const Char* s2) noexcept { return constexpr_strcmp_internal(s1, s2, 0u); } } template <typename Char> constexpr std::size_t constexpr_strlen(const Char* s) noexcept { return detail::constexpr_strlen_internal(s, 0); } template <typename Char> constexpr int constexpr_strcmp(const Char* s1, const Char* s2) noexcept { return detail::constexpr_strcmp_internal(s1, s2, 0); } namespace detail { template <typename V> struct is_constant_evaluated_or_constinit_ { V value; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) consteval is_constant_evaluated_or_constinit_(V const v) noexcept(noexcept(V(v))) ; }; } constexpr bool is_constant_evaluated_or( detail::is_constant_evaluated_or_constinit_<bool> const def) noexcept ; } namespace folly { namespace numbers { namespace detail { template <typename T> using enable_if_floating_t = std::enable_if_t<std::is_floating_point<T>::value, T>; } template <typename T> inline constexpr T e_v = detail::enable_if_floating_t<T>( 2.71828182845904523536028747135266249775724709369995L); template <typename T> inline constexpr T ln2_v = detail::enable_if_floating_t<T>( 0.69314718055994530941723212145817656807550013436025L); inline constexpr double e = e_v<double>; inline constexpr double ln2 = ln2_v<double>; } template <typename T, typename S, S Value> struct floating_point_integral_constant { using value_type = T; static constexpr value_type value = static_cast<value_type>(Value); constexpr operator value_type() const noexcept ; constexpr value_type operator()() const noexcept ; }; namespace detail { template <typename T> constexpr size_t constexpr_iterated_squares_desc_size_(T const base) ; } template <typename Base> inline constexpr size_t constexpr_iterated_squares_desc_size_v = detail::constexpr_iterated_squares_desc_size_(Base::value); template <typename T, std::size_t Size> struct constexpr_iterated_squares_desc { static_assert(Size > 0, "requires non-zero size"); using size_type = decltype(Size); using base_type = T; struct item_type { size_type power; base_type scale; }; static constexpr size_type size = Size; base_type base; item_type scaling[size]; private: using lim = std::numeric_limits<base_type>; static_assert( lim::max_exponent < std::numeric_limits<size_type>::max(), "size_type too small for base_type"); public: explicit constexpr constexpr_iterated_squares_desc(base_type r) ; constexpr item_type shrink(base_type const num, base_type const max) const ; constexpr item_type growth(base_type const num, base_type const min) const ; }; template <typename Base> inline constexpr auto constexpr_iterated_squares_desc_v = constexpr_iterated_squares_desc< typename Base::value_type, constexpr_iterated_squares_desc_size_v<Base>>{Base::value}; template <typename T> constexpr auto& constexpr_iterated_squares_desc_2_v = constexpr_iterated_squares_desc_v< floating_point_integral_constant<T, int, 2>>; template <typename T, typename... Ts> constexpr T constexpr_max(T a, Ts... ts) { T list[] = {ts..., a}; for (auto i = 0u; i < sizeof...(Ts); ++i) { a = list[i] < a ? a : list[i]; } return a; } template <typename T, typename... Ts> constexpr T constexpr_min(T a, Ts... ts) { T list[] = {ts..., a}; for (auto i = 0u; i < sizeof...(Ts); ++i) { a = list[i] < a ? list[i] : a; } return a; } template <typename T, typename Less> constexpr T const& constexpr_clamp( T const& v, T const& lo, T const& hi, Less less) { T const& a = less(v, lo) ? lo : v; T const& b = less(hi, a) ? hi : a; return b; } template <typename T> constexpr T const& constexpr_clamp(T const& v, T const& lo, T const& hi) { return constexpr_clamp(v, lo, hi, std::less<T>{}); } template <typename T> constexpr bool constexpr_isnan(T const t) ; namespace detail { template <typename T, typename = void> struct constexpr_abs_helper {}; template <typename T> struct constexpr_abs_helper< T, typename std::enable_if<std::is_floating_point<T>::value>::type> { static constexpr T go(T t) ; }; template <typename T> struct constexpr_abs_helper< T, typename std::enable_if< std::is_integral<T>::value && !std::is_same<T, bool>::value && std::is_unsigned<T>::value>::type> { static constexpr T go(T t) ; }; template <typename T> struct constexpr_abs_helper< T, typename std::enable_if< std::is_integral<T>::value && !std::is_same<T, bool>::value && std::is_signed<T>::value>::type> { static constexpr typename std::make_unsigned<T>::type go(T t) ; }; } template <typename T> constexpr auto constexpr_abs(T t) -> decltype(detail::constexpr_abs_helper<T>::go(t)) ; namespace detail { template <typename T> constexpr T constexpr_log2_(T a, T e) ; template <typename T> constexpr T constexpr_log2_ceil_(T l2, T t) ; } template <typename T> constexpr T constexpr_log2(T t) ; template <typename T> constexpr T constexpr_log2_ceil(T t) ; template < typename T, std::enable_if_t<std::is_floating_point<T>::value, int> = 0> constexpr T constexpr_trunc(T const t) ; template <typename T, std::enable_if_t<std::is_integral<T>::value, int> = 0> constexpr T constexpr_trunc(T const t) ; template <typename T> constexpr T constexpr_round(T const t) ; template <typename T> constexpr T constexpr_floor(T const t) ; template <typename T> constexpr T constexpr_ceil(T const t) ; template <typename T> constexpr T constexpr_ceil(T t, T round) ; template <typename T> constexpr T constexpr_mult(T const a, T const b) ; namespace detail { template < typename T, typename E, std::enable_if_t<std::is_signed<E>::value, int> = 1> constexpr T constexpr_ipow(T const base, E const exp) ; template < typename T, typename E, std::enable_if_t<std::is_unsigned<E>::value, int> = 1> constexpr T constexpr_ipow(T const base, E const exp) ; } template < typename T, typename N, std::enable_if_t< std::is_floating_point<T>::value && std::is_integral<N>::value && !std::is_same<N, bool>::value, int> = 0> constexpr T constexpr_exp(N const power) ; template < typename N, std::enable_if_t< std::is_integral<N>::value && !std::is_same<N, bool>::value, int> = 0> constexpr double constexpr_exp(N const power) ; template < typename T, std::enable_if_t<std::is_floating_point<T>::value, int> = 0> constexpr T constexpr_exp(T const power) ; template < typename T, std::enable_if_t<std::is_floating_point<T>::value, int> = 0> constexpr T constexpr_log(T const num) ; template < typename T, typename E, std::enable_if_t< std::is_integral<E>::value && !std::is_same<E, bool>::value, int> = 0> constexpr T constexpr_pow(T const base, E const exp) ; template < typename T, std::enable_if_t<std::is_floating_point<T>::value, int> = 0> constexpr T constexpr_pow(T const base, T const exp) ; template <typename T> constexpr std::size_t constexpr_find_last_set(T const t) { using U = std::make_unsigned_t<T>; return t == T(0) ? 0 : 1 + constexpr_log2(static_cast<U>(t)); } namespace detail { template <typename U> constexpr std::size_t constexpr_find_first_set_( std::size_t s, std::size_t a, U const u) ; } template <typename T> constexpr std::size_t constexpr_find_first_set(T t) ; template <typename T> constexpr T constexpr_add_overflow_clamped(T a, T b) ; template <typename T> constexpr T constexpr_sub_overflow_clamped(T a, T b) ; template <typename Dst, typename Src> constexpr typename std::enable_if<std::is_integral<Src>::value, Dst>::type constexpr_clamp_cast(Src src) ; namespace detail { constexpr double kClampCastLowerBoundDoubleToInt64F = -9223372036854774784.0; constexpr double kClampCastUpperBoundDoubleToInt64F = 9223372036854774784.0; constexpr double kClampCastUpperBoundDoubleToUInt64F = 18446744073709549568.0; constexpr float kClampCastLowerBoundFloatToInt32F = -2147483520.0f; constexpr float kClampCastUpperBoundFloatToInt32F = 2147483520.0f; constexpr float kClampCastUpperBoundFloatToUInt32F = 4294967040.0f; template <typename D, typename S> constexpr D constexpr_clamp_cast_helper(S src, S sl, S su, D dl, D du) ; } template <typename Dst, typename Src> constexpr typename std::enable_if<std::is_floating_point<Src>::value, Dst>::type constexpr_clamp_cast(Src src) ; } namespace folly { template <typename V, size_t N> struct c_array { constexpr size_t size() const noexcept ; V data[N]; }; } namespace folly { namespace detail { enum class safe_assert_msg_type : char { term, cstr, ui64 }; template <safe_assert_msg_type... A> struct safe_assert_msg_type_s {}; struct safe_assert_msg_types_one_fn { template <safe_assert_msg_type A> using c = std::integral_constant<safe_assert_msg_type, A>; c<safe_assert_msg_type::cstr> operator()(char const*) const; c<safe_assert_msg_type::ui64> operator()(uint64_t) const; }; inline constexpr safe_assert_msg_types_one_fn safe_assert_msg_types_one{}; template <typename... A> safe_assert_msg_type_s<decltype(safe_assert_msg_types_one((A)A{}))::value...> safe_assert_msg_types_seq_of(A...); template <typename> struct safe_assert_msg_types; template <safe_assert_msg_type... A> struct safe_assert_msg_types<safe_assert_msg_type_s<A...>> { using value_type = c_array<safe_assert_msg_type, sizeof...(A) + 1>; static constexpr value_type value = {{A..., safe_assert_msg_type::term}}; }; struct safe_assert_arg { char const* expr; char const* file; unsigned int line; char const* function; safe_assert_msg_type const* msg_types; }; struct safe_assert_msg_cast_one_fn { __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) auto operator()(char const* const a) const ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) auto operator()(uint64_t const a) const ; }; inline constexpr safe_assert_msg_cast_one_fn safe_assert_msg_cast_one{}; template <bool P> [[noreturn]] __attribute__((__cold__)) __attribute__((__noinline__)) void safe_assert_terminate( safe_assert_arg const* arg, ...) noexcept; template <bool P> struct safe_assert_terminate_w { safe_assert_arg const& arg; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr safe_assert_terminate_w( safe_assert_arg const& arg_) ; template <typename... A> [[noreturn]] __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) void operator()(A... a) const noexcept ; }; } } namespace folly { void compiler_may_unsafely_assume(bool cond); [[noreturn]] void compiler_may_unsafely_assume_unreachable(); void compiler_may_unsafely_assume_separate_storage( const void* a, const void* b); struct compiler_must_not_elide_fn { template <typename T> inline __attribute__((__always_inline__)) void operator()(T const& t) const noexcept; }; inline constexpr compiler_must_not_elide_fn compiler_must_not_elide{}; struct compiler_must_not_predict_fn { template <typename T> inline __attribute__((__always_inline__)) void operator()(T& t) const noexcept; }; inline constexpr compiler_must_not_predict_fn compiler_must_not_predict{}; namespace detail { template <typename T> using detect_folly_is_unsafe_for_async_usage = typename T::folly_is_unsafe_for_async_usage; template <typename T> inline constexpr bool is_unsafe_for_async_usage_v = detected_or_t< std::false_type, detail::detect_folly_is_unsafe_for_async_usage, T>::value; } struct unsafe_for_async_usage { using folly_is_unsafe_for_async_usage = std::true_type; }; static_assert(detail::is_unsafe_for_async_usage_v<unsafe_for_async_usage>, ""); namespace detail { template <typename T> using detect_folly_is_coro_aware_mutex = typename T::folly_coro_aware_mutex; } template <bool If> struct unsafe_for_async_usage_if {}; template <> struct unsafe_for_async_usage_if<true> { using folly_is_unsafe_for_async_usage = std::true_type; }; template <typename T> constexpr bool is_coro_aware_mutex_v = is_detected_v<detail::detect_folly_is_coro_aware_mutex, T>; } namespace folly { __attribute__((__always_inline__)) void compiler_may_unsafely_assume(bool cond) ; [[noreturn]] __attribute__((__always_inline__)) void compiler_may_unsafely_assume_unreachable() ; __attribute__((__always_inline__)) void compiler_may_unsafely_assume_separate_storage( void const* const a, void const* const b) ; namespace detail { template <typename T, typename D = std::decay_t<T>> using compiler_must_force_indirect = std::bool_constant< !std::is_trivially_copyable_v<D> || sizeof(long) < sizeof(D) || std::is_pointer<D>::value>; template <typename T> __attribute__((__always_inline__)) void compiler_must_not_elide(T const& t, std::false_type) ; template <typename T> __attribute__((__always_inline__)) void compiler_must_not_elide(T const& t, std::true_type) ; template <typename T> __attribute__((__always_inline__)) void compiler_must_not_predict(T& t, std::false_type) ; template <typename T> __attribute__((__always_inline__)) void compiler_must_not_predict(T& t, std::true_type) ; } } namespace folly { __attribute__((__always_inline__)) void assume(bool cond) ; [[noreturn]] __attribute__((__always_inline__)) void assume_unreachable() ; } namespace folly { using std::bit_cast; namespace detail { template <typename Dst, typename Src> constexpr std::make_signed_t<Dst> bits_to_signed(Src const s) ; template <typename Dst, typename Src> constexpr std::make_unsigned_t<Dst> bits_to_unsigned(Src const s) ; } template <typename T> constexpr unsigned int findFirstSet(T const v) ; template <typename T> constexpr unsigned int findLastSet(T const v) ; template <typename T> constexpr T extractFirstSet(T const v) ; template <typename T> constexpr unsigned int popcount(T const v) ; template <class T> constexpr T nextPowTwo(T const v) ; template <class T> constexpr T prevPowTwo(T const v) ; template <class T> constexpr bool isPowTwo(T const v) ; template <class T> constexpr T strictNextPowTwo(T const v) ; template <class T> constexpr T strictPrevPowTwo(T const v) ; namespace detail { template <size_t Size> struct uint_types_by_size; static uint8_t byteswap_gen(uint8_t v) ; template <> struct uint_types_by_size<8 / 8> { using type = uint8_t; }; static uint64_t byteswap_gen(uint64_t v) ; template <> struct uint_types_by_size<64 / 8> { using type = uint64_t; }; static uint32_t byteswap_gen(uint32_t v) ; template <> struct uint_types_by_size<32 / 8> { using type = uint32_t; }; static uint16_t byteswap_gen(uint16_t v) ; template <> struct uint_types_by_size<16 / 8> { using type = uint16_t; }; template <class T> struct EndianInt { static_assert( (std::is_integral<T>::value && !std::is_same<T, bool>::value) || std::is_floating_point<T>::value, "template type parameter must be non-bool integral or floating point"); static T swap(T x) ; static T big(T x) ; static T little(T x) ; }; } class Endian { public: enum class Order : uint8_t { LITTLE, BIG, }; static constexpr Order order = kIsLittleEndian ? Order::LITTLE : Order::BIG; template <class T> static T swap(T x) ; template <class T> static T big(T x) ; template <class T> static T little(T x) ; static uint64_t swap64(uint64_t x) ; static uint64_t big64(uint64_t x) ; static uint64_t little64(uint64_t x) ; static int64_t swap64(int64_t x) ; static int64_t big64(int64_t x) ; static int64_t little64(int64_t x) ; static uint32_t swap32(uint32_t x) ; static uint32_t big32(uint32_t x) ; static uint32_t little32(uint32_t x) ; static int32_t swap32(int32_t x) ; static int32_t big32(int32_t x) ; static int32_t little32(int32_t x) ; static uint16_t swap16(uint16_t x) ; static uint16_t big16(uint16_t x) ; static uint16_t little16(uint16_t x) ; static int16_t swap16(int16_t x) ; static int16_t big16(int16_t x) ; static int16_t little16(int16_t x) ; static uint8_t swap8(uint8_t x) ; static uint8_t big8(uint8_t x) ; static uint8_t little8(uint8_t x) ; static int8_t swap8(int8_t x) ; static int8_t big8(int8_t x) ; static int8_t little8(int8_t x) ; }; template <class T, class Enable = void> struct Unaligned; #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wpacked" template <class T> struct Unaligned< T, typename std::enable_if< std::is_standard_layout<T>::value && std::is_trivial<T>::value>::type> { Unaligned() = default; Unaligned(T v) ; T value; } __attribute__((__packed__)); #pragma GCC diagnostic pop template <class T> constexpr T loadUnaligned(const void* p) ; template <class T> T partialLoadUnaligned(const void* p, size_t l) ; template <class T> void storeUnaligned(void* p, T value) ; template <typename T> T bitReverse(T n) ; } namespace folly { namespace hash { namespace detail { namespace { template <typename T> constexpr bool is_hashable_byte_v = false; template <> constexpr bool is_hashable_byte_v<char> = true; template <> constexpr bool is_hashable_byte_v<signed char> = true; template <> constexpr bool is_hashable_byte_v<unsigned char> = true; } } constexpr uint64_t hash_128_to_64( const uint64_t upper, const uint64_t lower) noexcept ; constexpr uint64_t commutative_hash_128_to_64( const uint64_t upper, const uint64_t lower) noexcept ; constexpr uint64_t twang_mix64(uint64_t key) noexcept ; constexpr uint64_t twang_unmix64(uint64_t key) noexcept ; constexpr uint32_t twang_32from64(uint64_t key) noexcept ; constexpr uint32_t jenkins_rev_mix32(uint32_t key) noexcept ; constexpr uint32_t jenkins_rev_unmix32(uint32_t key) noexcept ; constexpr uint32_t fnv32_hash_start = 2166136261UL; constexpr uint64_t fnv64_hash_start = 14695981039346656037ULL; constexpr uint64_t fnva64_hash_start = 14695981039346656037ULL; constexpr uint32_t fnv32_append_byte(uint32_t hash, uint8_t c) ; template <typename C, std::enable_if_t<detail::is_hashable_byte_v<C>, int> = 0> constexpr uint32_t fnv32_buf( const C* buf, size_t n, uint32_t hash = fnv32_hash_start) noexcept ; uint32_t fnv32_buf( const void* buf, size_t n, uint32_t hash = fnv32_hash_start) noexcept ; constexpr uint32_t fnv32( const char* buf, uint32_t hash = fnv32_hash_start) noexcept ; uint32_t fnv32( const std::string& str, uint32_t hash = fnv32_hash_start) noexcept ; constexpr uint64_t fnv64_append_byte(uint64_t hash, uint8_t c) ; template <typename C, std::enable_if_t<detail::is_hashable_byte_v<C>, int> = 0> constexpr uint64_t fnv64_buf( const C* buf, size_t n, uint64_t hash = fnv64_hash_start) noexcept ; uint64_t fnv64_buf( const void* buf, size_t n, uint64_t hash = fnv64_hash_start) noexcept ; constexpr uint64_t fnv64( const char* buf, uint64_t hash = fnv64_hash_start) noexcept ; uint64_t fnv64( const std::string& str, uint64_t hash = fnv64_hash_start) noexcept ; constexpr uint64_t fnva64_append_byte(uint64_t hash, uint8_t c) ; template <typename C, std::enable_if_t<detail::is_hashable_byte_v<C>, int> = 0> constexpr uint64_t fnva64_buf( const C* buf, size_t n, uint64_t hash = fnva64_hash_start) noexcept ; uint64_t fnva64_buf( const void* buf, size_t n, uint64_t hash = fnva64_hash_start) noexcept ; uint64_t fnva64( const std::string& str, uint64_t hash = fnva64_hash_start) noexcept ; constexpr uint32_t hsieh_hash32_buf_constexpr( const unsigned char* buf, size_t len) noexcept ; uint32_t hsieh_hash32_buf(const void* buf, size_t len) noexcept ; uint32_t hsieh_hash32(const char* s) noexcept ; uint32_t hsieh_hash32_str(const std::string& str) noexcept ; } namespace detail { template <typename Int> struct integral_hasher { using folly_is_avalanching = std::bool_constant<(sizeof(Int) >= 8 || sizeof(size_t) == 4)>; constexpr size_t operator()(Int const& i) const noexcept ; }; template <typename F> struct float_hasher { using folly_is_avalanching = std::true_type; size_t operator()(F const& f) const noexcept ; }; } template <class Key, class Enable = void> struct hasher; struct Hash { template <class T> constexpr size_t operator()(const T& v) const noexcept(noexcept(hasher<T>()(v))) ; template <class T, class... Ts> constexpr size_t operator()(const T& t, const Ts&... ts) const ; constexpr size_t operator()() const noexcept ; }; template <typename Hasher, typename Key> struct IsAvalanchingHasher; namespace detail { template <typename Hasher, typename Void = void> struct IsAvalanchingHasherFromMemberType : std::bool_constant<!require_sizeof<Hasher>> {}; template <typename Hasher> struct IsAvalanchingHasherFromMemberType< Hasher, void_t<typename Hasher::folly_is_avalanching>> : std::bool_constant<Hasher::folly_is_avalanching::value> {}; } template <typename Hasher, typename Key> struct IsAvalanchingHasher : detail::IsAvalanchingHasherFromMemberType<Hasher> { }; template <typename H, typename K> struct IsAvalanchingHasher<transparent<H>, K> : IsAvalanchingHasher<H, K> {}; template <typename K> struct IsAvalanchingHasher<Hash, K> : IsAvalanchingHasher<hasher<K>, K> {}; template <> struct hasher<bool> { using folly_is_avalanching = std::true_type; constexpr size_t operator()(bool key) const noexcept ; }; template <typename K> struct IsAvalanchingHasher<hasher<bool>, K> : std::true_type {}; template <> struct hasher<unsigned long long> : detail::integral_hasher<unsigned long long> {}; template <> struct hasher<signed long long> : detail::integral_hasher<signed long long> {}; template <> struct hasher<unsigned long> : detail::integral_hasher<unsigned long> {}; template <> struct hasher<signed long> : detail::integral_hasher<signed long> {}; template <> struct hasher<unsigned int> : detail::integral_hasher<unsigned int> {}; template <> struct hasher<signed int> : detail::integral_hasher<signed int> {}; template <> struct hasher<unsigned short> : detail::integral_hasher<unsigned short> {}; template <> struct hasher<signed short> : detail::integral_hasher<signed short> {}; template <> struct hasher<unsigned char> : detail::integral_hasher<unsigned char> {}; template <> struct hasher<signed char> : detail::integral_hasher<signed char> {}; template <> struct hasher<char> : detail::integral_hasher<char> {}; template <> struct hasher<float> : detail::float_hasher<float> {}; template <> struct hasher<double> : detail::float_hasher<double> {}; template <> struct hasher<std::string> { using folly_is_avalanching = std::true_type; size_t operator()(const std::string& key) const ; }; template <typename K> struct IsAvalanchingHasher<hasher<std::string>, K> : std::true_type {}; template <> struct hasher<std::string_view> { using folly_is_avalanching = std::true_type; size_t operator()(const std::string_view& key) const ; }; template <typename K> struct IsAvalanchingHasher<hasher<std::string_view>, K> : std::true_type {}; template <typename T> struct hasher<T, std::enable_if_t<std::is_enum<T>::value>> { size_t operator()(T key) const noexcept ; }; template <typename T, typename K> struct IsAvalanchingHasher< hasher<T, std::enable_if_t<std::is_enum<T>::value>>, K> : IsAvalanchingHasher<hasher<std::underlying_type_t<T>>, K> {}; template <typename T1, typename T2> struct hasher<std::pair<T1, T2>> { using folly_is_avalanching = std::true_type; size_t operator()(const std::pair<T1, T2>& key) const ; }; template <typename... Ts> struct hasher<std::tuple<Ts...>> { size_t operator()(const std::tuple<Ts...>& key) const ; }; template <typename T> struct hasher<T*> { using folly_is_avalanching = hasher<std::uintptr_t>::folly_is_avalanching; size_t operator()(T* key) const ; }; template <typename T> struct hasher<std::unique_ptr<T>> { using folly_is_avalanching = typename hasher<T*>::folly_is_avalanching; size_t operator()(const std::unique_ptr<T>& key) const ; }; template <typename T> struct hasher<std::shared_ptr<T>> { using folly_is_avalanching = typename hasher<T*>::folly_is_avalanching; size_t operator()(const std::shared_ptr<T>& key) const ; }; template <typename T, typename K> struct IsAvalanchingHasher<hasher<std::tuple<T>>, K> : IsAvalanchingHasher<hasher<T>, K> {}; template <typename T1, typename T2, typename... Ts, typename K> struct IsAvalanchingHasher<hasher<std::tuple<T1, T2, Ts...>>, K> : std::true_type {}; namespace hash { class StdHasher { public: template <typename T> size_t operator()(const T& t) const noexcept(noexcept(std::hash<T>()(t))) ; }; template <class Hash, class Value> uint64_t commutative_hash_combine_value_generic( uint64_t seed, Hash const& hasher, Value const& value) ; template < class Iter, class Hash = std::hash<typename std::iterator_traits<Iter>::value_type>> uint64_t hash_range( Iter begin, Iter end, uint64_t hash = 0, Hash hasher = Hash()) ; template <class Hash, class Iter> uint64_t commutative_hash_combine_range_generic( uint64_t seed, Hash const& hasher, Iter first, Iter last) ; template <class Iter> uint64_t commutative_hash_combine_range(Iter first, Iter last) ; namespace detail { using c_array_size_t = size_t[]; } template <class Hasher> size_t hash_combine_generic(const Hasher&) noexcept ; template <class Hasher, typename T, typename... Ts> size_t hash_combine_generic( const Hasher& h, const T& t, const Ts&... ts) noexcept(noexcept(detail::c_array_size_t{ h(t), h(ts)...})) ; template <typename Hash, typename... Value> uint64_t commutative_hash_combine_generic( uint64_t seed, Hash const& hasher, Value const&... value) ; template <typename T, typename... Ts> [[nodiscard]] size_t hash_combine(const T& t, const Ts&... ts) noexcept( noexcept(hash_combine_generic(StdHasher{}, t, ts...))) ; template <typename... Value> uint64_t commutative_hash_combine(Value const&... value) ; } template <size_t index, typename... Ts> struct TupleHasher { size_t operator()(std::tuple<Ts...> const& key) const ; }; template <typename... Ts> struct TupleHasher<0, Ts...> { size_t operator()(std::tuple<Ts...> const& key) const ; }; } namespace std { template <typename T1, typename T2> struct hash<std::pair<T1, T2>> { using folly_is_avalanching = std::true_type; size_t operator()(const std::pair<T1, T2>& x) const ; }; template <typename... Ts> struct hash<std::tuple<Ts...>> { private: using FirstT = std::decay_t<std::tuple_element_t<0, std::tuple<Ts..., bool>>>; public: using folly_is_avalanching = std::bool_constant<( sizeof...(Ts) != 1 || folly::IsAvalanchingHasher<std::hash<FirstT>, FirstT>::value)>; size_t operator()(std::tuple<Ts...> const& key) const ; }; } namespace folly { template <typename... Args, typename K> struct IsAvalanchingHasher<std::hash<std::basic_string<Args...>>, K> : std::true_type {}; } namespace folly { template <typename T> __attribute__((__always_inline__)) static std::type_info const* type_info_of() ; template <typename T> __attribute__((__always_inline__)) static std::type_info const* type_info_of( [[maybe_unused]] T const& t) ; } namespace folly { template <typename Ex> [[noreturn]] __attribute__((__noinline__)) __attribute__((__cold__)) void throw_exception(Ex&& ex) ; template <typename Ex> [[noreturn]] __attribute__((__noinline__)) __attribute__((__cold__)) void terminate_with(Ex&& ex) noexcept ; namespace detail { struct throw_exception_arg_array_ { template <typename R> using v = std::remove_extent_t<std::remove_reference_t<R>>; template <typename R> using apply = std::enable_if_t<std::is_same<char const, v<R>>::value, v<R>*>; }; struct throw_exception_arg_trivial_ { template <typename R> using apply = remove_cvref_t<R>; }; struct throw_exception_arg_base_ { template <typename R> using apply = R; }; template <typename R> using throw_exception_arg_ = conditional_t< std::is_array<std::remove_reference_t<R>>::value, throw_exception_arg_array_, conditional_t< std::is_trivially_copyable_v<remove_cvref_t<R>>, throw_exception_arg_trivial_, throw_exception_arg_base_>>; template <typename R> using throw_exception_arg_t = typename throw_exception_arg_<R>::template apply<R>; template <typename Ex, typename... Args> [[noreturn]] __attribute__((__noinline__)) __attribute__((__cold__)) void throw_exception_(Args... args) ; template <typename Ex, typename... Args> [[noreturn]] __attribute__((__noinline__)) __attribute__((__cold__)) void terminate_with_( Args... args) noexcept ; } template <typename Ex, typename... Args> [[noreturn]] __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) void throw_exception(Args&&... args) ; template <typename Ex, typename... Args> [[noreturn]] __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) void terminate_with(Args&&... args) ; template < typename F, typename... A, typename FD = std::remove_pointer_t<std::decay_t<F>>, std::enable_if_t<!std::is_function<FD>::value, int> = 0, typename R = decltype(static_cast<F&& (*)() noexcept>(nullptr)()(static_cast<A&& (*)() noexcept>(nullptr)()...))> __attribute__((__noinline__)) __attribute__((__cold__)) R invoke_cold(F&& f, A&&... a) noexcept(noexcept(static_cast<F&&>(f)(static_cast<A&&>(a)...))) ; template < typename F, typename... A, typename FD = std::remove_pointer_t<std::decay_t<F>>, std::enable_if_t<std::is_function<FD>::value, int> = 0, typename R = decltype(static_cast<F&& (*)() noexcept>(nullptr)()(static_cast<A&& (*)() noexcept>(nullptr)()...))> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) R invoke_cold(F&& f, A&&... a) noexcept(noexcept(f(static_cast<A&&>(a)...))) ; template <typename F, typename... A> [[noreturn]] __attribute__((__noinline__)) __attribute__((__cold__)) void invoke_noreturn_cold(F&& f, A&&... a) noexcept( noexcept(static_cast<F&&>(f)(static_cast<A&&>(a)...))) ; template < typename E, typename Try, typename Catch, typename... CatchA, typename R = std::common_type_t< decltype(static_cast<Try&& (*)() noexcept>(nullptr)()()), decltype(static_cast<Catch&& (*)() noexcept>(nullptr)()( static_cast<E& (*)() noexcept>(nullptr)(), static_cast<CatchA&& (*)() noexcept>(nullptr)()...))>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) R catch_exception(Try&& t, Catch&& c, CatchA&&... a) ; template < typename Try, typename Catch, typename... CatchA, typename R = std::common_type_t< decltype(static_cast<Try&& (*)() noexcept>(nullptr)()()), decltype(static_cast<Catch&& (*)() noexcept>(nullptr)()(static_cast<CatchA&& (*)() noexcept>(nullptr)()...))>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) R catch_exception(Try&& t, Catch&& c, CatchA&&... a) noexcept( noexcept(static_cast<Catch&&>(c)(static_cast<CatchA&&>(a)...))) ; [[noreturn]] __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) void rethrow_current_exception() ; namespace detail { inline constexpr bool exception_ptr_access_ct = true; extern std::atomic<int> exception_ptr_access_rt_cache_; __attribute__((__cold__)) bool exception_ptr_access_rt_v_() noexcept; __attribute__((__cold__)) bool exception_ptr_access_rt_() noexcept; ; } [[gnu::pure]] std::type_info const* exception_ptr_get_type( std::exception_ptr const& ptr) noexcept ; template <typename T> T* exception_ptr_get_object(std::exception_ptr const& ptr) noexcept ; class exception_shared_string { private: struct state; state* const state_; public: ; }; template <class T> class static_what_exception : public T { protected: struct static_lifetime {}; public: using T::T; private: const char* msg_ = nullptr; }; } using std::abort; using std::div_t; using std::ldiv_t; using std::atof; using std::atoi; using std::atol; using std::free; using std::malloc; using std::strtod; extern "C" { extern __attribute__((visibility("default"))) const char *malloc_conf; extern __attribute__((visibility("default"))) void (*malloc_message)(void *cbopaque, const char *s); __attribute__((visibility("default"))) void __attribute__((nothrow)) *malloc(size_t size) throw() __attribute__((malloc)) __attribute__((alloc_size(1))); ; __attribute__((visibility("default"))) int __attribute__((nothrow)) posix_memalign( void **memptr, size_t alignment, size_t size) throw() __attribute__((nonnull(1))); ; ; __attribute__((visibility("default"))) void __attribute__((nothrow)) free(void *ptr) throw(); ; ; ; ; ; ; ; ; ; ; ; __attribute__((visibility("default"))) size_t __attribute__((nothrow)) malloc_usable_size( void *ptr) throw(); ; ; typedef struct extent_hooks_s extent_hooks_t; typedef void *(extent_alloc_t)(extent_hooks_t *, void *, size_t, size_t, bool *, bool *, unsigned); typedef bool (extent_dalloc_t)(extent_hooks_t *, void *, size_t, bool, unsigned); typedef void (extent_destroy_t)(extent_hooks_t *, void *, size_t, bool, unsigned); typedef bool (extent_commit_t)(extent_hooks_t *, void *, size_t, size_t, size_t, unsigned); typedef bool (extent_decommit_t)(extent_hooks_t *, void *, size_t, size_t, size_t, unsigned); typedef bool (extent_purge_t)(extent_hooks_t *, void *, size_t, size_t, size_t, unsigned); typedef bool (extent_split_t)(extent_hooks_t *, void *, size_t, size_t, size_t, bool, unsigned); typedef bool (extent_merge_t)(extent_hooks_t *, void *, size_t, void *, size_t, bool, unsigned); struct extent_hooks_s { extent_alloc_t *alloc; extent_dalloc_t *dalloc; extent_destroy_t *destroy; extent_commit_t *commit; extent_decommit_t *decommit; extent_purge_t *purge_lazy; extent_purge_t *purge_forced; extent_split_t *split; extent_merge_t *merge; }; } extern "C" { ; ; ; ; ; ; ; ; ; ; ; } namespace folly { namespace detail { template <class Initializer> class FastStaticBool { public: private: static std::atomic<signed char> flag_; }; template <class Initializer> constinit std::atomic<signed char> FastStaticBool<Initializer>::flag_{}; } namespace detail { } size_t goodMallocSize(size_t minSize) noexcept ; static const size_t jemallocMinInPlaceExpandable = 4096; void* checkedMalloc(size_t size) ; void sizedFree(void* ptr, size_t size) ; } #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wshadow" namespace folly { namespace fbstring_detail { ; ; ; ; } enum class AcquireMallocatedString {}; template <class Char> class fbstring_core { public: private: struct RefCounted { std::atomic<size_t> refCount_; Char data_[1]; }; typedef uint8_t category_type; enum class Category : category_type { isSmall = 0, isMedium = kIsLittleEndian ? 0x80 : 0x2, isLarge = kIsLittleEndian ? 0x40 : 0x1, }; struct MediumLarge { Char* data_; size_t size_; size_t capacity_; }; union { uint8_t bytes_[sizeof(MediumLarge)]; Char small_[sizeof(MediumLarge) / sizeof(Char)]; MediumLarge ml_; }; constexpr static size_t lastChar = sizeof(MediumLarge) - 1; constexpr static size_t maxSmallSize = lastChar / sizeof(Char); constexpr static size_t maxMediumSize = 254 / sizeof(Char); constexpr static uint8_t categoryExtractMask = kIsLittleEndian ? 0xC0 : 0x3; constexpr static size_t kCategoryShift = (sizeof(size_t) - 1) * 8; constexpr static size_t capacityExtractMask = kIsLittleEndian ? ~(size_t(categoryExtractMask) << kCategoryShift) : 0x0 ; static_assert( !(sizeof(MediumLarge) % sizeof(Char)), "Corrupt memory layout for fbstring."); }; template <class Char> class dummy_fbstring_core { public: private: std::basic_string<Char> backend_; }; template < typename E, class T = std::char_traits<E>, class A = std::allocator<E>, class Storage = fbstring_core<E>> class basic_fbstring { static_assert( std::is_same<A, std::allocator<E>>::value, "fbstring ignores custom allocators"); ; struct Invariant { private: const basic_fbstring& s_; }; public: typedef T traits_type; typedef typename traits_type::char_type value_type; typedef A allocator_type; typedef typename std::allocator_traits<A>::size_type size_type; typedef typename std::allocator_traits<A>::difference_type difference_type; typedef typename std::allocator_traits<A>::value_type& reference; typedef typename std::allocator_traits<A>::value_type const& const_reference; typedef typename std::allocator_traits<A>::pointer pointer; typedef typename std::allocator_traits<A>::const_pointer const_pointer; typedef E* iterator; typedef const E* const_iterator; typedef std::reverse_iterator<iterator> reverse_iterator; typedef std::reverse_iterator<const_iterator> const_reverse_iterator; static constexpr size_type npos = size_type(-1); typedef std::true_type IsRelocatable; private: using string_view_type = std::basic_string_view<value_type, traits_type>; struct string_view_ctor {}; public: ; __attribute__((__noinline__)) basic_fbstring(const value_type* s, const A& = A()) ; ; ; ; ~basic_fbstring() noexcept ; ; ; size_type size() const ; void clear() ; basic_fbstring& append(const value_type* s, size_type n); ; ; private: typedef std::basic_istream<value_type, traits_type> istream_type; public: private: ; ; ; public: ; ; private: ; private: ; ; ; ; public: ; const value_type* data() const ; ; private: Storage store_; }; template <typename E, class T, class A, class S> basic_fbstring<E, T, A, S> operator+( const basic_fbstring<E, T, A, S>& lhs, const basic_fbstring<E, T, A, S>& rhs) ; ; ; ; ; ; ; ; ; template <typename E, class T, class A, class S> basic_fbstring<E, T, A, S> operator+( basic_fbstring<E, T, A, S>&& lhs, const E* rhs) ; ; ; template <typename E, class T, class A, class S> bool operator==( const basic_fbstring<E, T, A, S>& lhs, const basic_fbstring<E, T, A, S>& rhs) ; ; ; ; ; template <typename E, class T, class A, class S> bool operator!=( const basic_fbstring<E, T, A, S>& lhs, const basic_fbstring<E, T, A, S>& rhs) ; ; ; ; ; template <typename E, class T, class A, class S> bool operator<( const basic_fbstring<E, T, A, S>& lhs, const basic_fbstring<E, T, A, S>& rhs) ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; template <typename E, class T, class A, class S> bool operator>=( const basic_fbstring<E, T, A, S>& lhs, const basic_fbstring<E, T, A, S>& rhs) ; ; ; ; ; ; ; ; ; template <typename E, class T, class A, class S> std::basic_ostream< typename basic_fbstring<E, T, A, S>::value_type, typename basic_fbstring<E, T, A, S>::traits_type>& operator<<( std::basic_ostream< typename basic_fbstring<E, T, A, S>::value_type, typename basic_fbstring<E, T, A, S>::traits_type>& os, const basic_fbstring<E, T, A, S>& str) ; ; ; ; ; ; ; ; ; ; ; ; ; typedef basic_fbstring<char> fbstring; template <class T, class R, class A, class S> struct IsRelocatable<basic_fbstring<T, R, A, S> > : std::true_type {}; } namespace std { template <> struct hash<::folly::basic_fbstring<char>> { }; template <> struct hash<::folly::basic_fbstring<char16_t>> { }; template <> struct hash<::folly::basic_fbstring<char32_t>> { }; template <> struct hash<::folly::basic_fbstring<wchar_t>> { }; } #pragma GCC diagnostic pop namespace folly { template <class T> struct IsSomeString; template <> struct IsSomeString<fbstring> : std::true_type {}; } template <> struct fmt::formatter<folly::fbstring> : private formatter<fmt::string_view> { using formatter<fmt::string_view>::parse; ; }; namespace folly { fbstring exceptionStr(std::exception const& e); fbstring exceptionStr(std::exception_ptr const& ep); } namespace folly { } namespace std __attribute__ ((__visibility__ ("default"))) { namespace ranges { template<typename _Tp> requires is_object_v<_Tp> class empty_view : public view_interface<empty_view<_Tp>> { public: }; template<typename _Tp> inline constexpr bool enable_borrowed_range<empty_view<_Tp>> = true; namespace __detail { template<typename _Tp> concept __boxable = copy_constructible<_Tp> && is_object_v<_Tp>; template<__boxable _Tp> struct __box : std::optional<_Tp> { using std::optional<_Tp>::optional; using std::optional<_Tp>::operator=; }; template<__boxable _Tp> requires copyable<_Tp> || (is_nothrow_move_constructible_v<_Tp> && is_nothrow_copy_constructible_v<_Tp>) struct __box<_Tp> { private: [[no_unique_address]] _Tp _M_value = _Tp(); public: ; ; }; } template<copy_constructible _Tp> requires is_object_v<_Tp> class single_view : public view_interface<single_view<_Tp>> { public: ; private: [[no_unique_address]] __detail::__box<_Tp> _M_value; }; ; namespace __detail { ; template<typename _Wp> using __iota_diff_t = decltype(__to_signed_like(std::declval<_Wp>())); template<typename _It> concept __decrementable = incrementable<_It> && requires(_It __i) { { --__i } -> same_as<_It&>; { __i-- } -> same_as<_It>; }; template<typename _It> concept __advanceable = __decrementable<_It> && totally_ordered<_It> && requires( _It __i, const _It __j, const __iota_diff_t<_It> __n) { { __i += __n } -> same_as<_It&>; { __i -= __n } -> same_as<_It&>; _It(__j + __n); _It(__n + __j); _It(__j - __n); { __j - __j } -> convertible_to<__iota_diff_t<_It>>; }; template<typename _Winc> struct __iota_view_iter_cat { }; template<incrementable _Winc> struct __iota_view_iter_cat<_Winc> { using iterator_category = input_iterator_tag; }; } template<weakly_incrementable _Winc, semiregular _Bound = unreachable_sentinel_t> requires std::__detail::__weakly_eq_cmp_with<_Winc, _Bound> && copyable<_Winc> class iota_view : public view_interface<iota_view<_Winc, _Bound>> { private: struct _Sentinel; struct _Iterator : __detail::__iota_view_iter_cat<_Winc> { private: static auto _S_iter_concept() ; public: using iterator_concept = decltype(_S_iter_concept()); using value_type = _Winc; using difference_type = __detail::__iota_diff_t<_Winc>; private: _Winc _M_value = _Winc(); friend iota_view; friend _Sentinel; }; struct _Sentinel { private: constexpr auto _M_distance_from(const _Iterator& __x) const ; _Bound _M_bound = _Bound(); public: _Sentinel() = default; constexpr explicit _Sentinel(_Bound __bound) ; friend constexpr bool operator==(const _Iterator& __x, const _Sentinel& __y) { return __y._M_equal(__x); } friend constexpr iter_difference_t<_Winc> operator-(const _Iterator& __x, const _Sentinel& __y) requires sized_sentinel_for<_Bound, _Winc> { return -__y._M_distance_from(__x); } friend constexpr iter_difference_t<_Winc> operator-(const _Sentinel& __x, const _Iterator& __y) requires sized_sentinel_for<_Bound, _Winc> { return __x._M_distance_from(__y); } friend iota_view; }; _Winc _M_value = _Winc(); [[no_unique_address]] _Bound _M_bound = _Bound(); public: iota_view() requires default_initializable<_Winc> = default; constexpr explicit iota_view(_Winc __value) ; constexpr iota_view(type_identity_t<_Winc> __value, type_identity_t<_Bound> __bound) ; constexpr iota_view(_Iterator __first, _Iterator __last) ; constexpr iota_view(_Iterator __first, unreachable_sentinel_t __last) ; constexpr iota_view(_Iterator __first, _Sentinel __last) requires (!same_as<_Winc, _Bound>) && (!same_as<_Bound, unreachable_sentinel_t>) ; constexpr _Iterator begin() const ; constexpr auto end() const ; constexpr _Iterator end() const requires same_as<_Winc, _Bound> ; constexpr auto size() const requires (same_as<_Winc, _Bound> && __detail::__advanceable<_Winc>) || (integral<_Winc> && integral<_Bound>) || sized_sentinel_for<_Bound, _Winc> ; }; template<typename _Winc, typename _Bound> requires (!__detail::__is_integer_like<_Winc> || !__detail::__is_integer_like<_Bound> || (__detail::__is_signed_integer_like<_Winc> == __detail::__is_signed_integer_like<_Bound>)) iota_view(_Winc, _Bound) -> iota_view<_Winc, _Bound>; template<typename _Winc, typename _Bound> inline constexpr bool enable_borrowed_range<iota_view<_Winc, _Bound>> = true; namespace views { template<typename _Tp> inline constexpr empty_view<_Tp> empty{}; namespace __detail { template<typename _Tp> concept __can_single_view = requires { single_view<decay_t<_Tp>>(std::declval<_Tp>()); }; } struct _Single { template<__detail::__can_single_view _Tp> constexpr auto operator() [[nodiscard]] (_Tp&& __e) const noexcept(noexcept(single_view<decay_t<_Tp>>(std::forward<_Tp>(__e)))) ; }; inline constexpr _Single single{}; namespace __detail { template<typename... _Args> concept __can_iota_view = requires { iota_view(std::declval<_Args>()...); }; } struct _Iota { template<__detail::__can_iota_view _Tp> constexpr auto operator() [[nodiscard]] (_Tp&& __e) const ; template<typename _Tp, typename _Up> requires __detail::__can_iota_view<_Tp, _Up> constexpr auto operator() [[nodiscard]] (_Tp&& __e, _Up&& __f) const ; }; inline constexpr _Iota iota{}; } namespace __detail { template<typename _Val, typename _CharT, typename _Traits> concept __stream_extractable = requires(basic_istream<_CharT, _Traits>& is, _Val& t) { is >> t; }; } template<movable _Val, typename _CharT, typename _Traits = char_traits<_CharT>> requires default_initializable<_Val> && __detail::__stream_extractable<_Val, _CharT, _Traits> class basic_istream_view : public view_interface<basic_istream_view<_Val, _CharT, _Traits>> { public: constexpr explicit basic_istream_view(basic_istream<_CharT, _Traits>& __stream) ; constexpr auto begin() ; constexpr default_sentinel_t end() const noexcept ; private: basic_istream<_CharT, _Traits>* _M_stream; _Val _M_object = _Val(); struct _Iterator { public: using iterator_concept = input_iterator_tag; using difference_type = ptrdiff_t; using value_type = _Val; constexpr explicit _Iterator(basic_istream_view* __parent) ; _Iterator(const _Iterator&) = delete; _Iterator(_Iterator&&) = default; _Iterator& operator=(const _Iterator&) = delete; _Iterator& operator=(_Iterator&&) = default; _Iterator& operator++() ; void operator++(int) ; _Val& operator*() const ; friend bool operator==(const _Iterator& __x, default_sentinel_t) ; private: basic_istream_view* _M_parent; bool _M_at_end() const ; }; friend _Iterator; }; template<typename _Val> using istream_view = basic_istream_view<_Val, char>; template<typename _Val> using wistream_view = basic_istream_view<_Val, wchar_t>; namespace views { namespace __detail { template<typename _Tp, typename _Up> concept __can_istream_view = requires (_Up __e) { basic_istream_view<_Tp, typename _Up::char_type, typename _Up::traits_type>(__e); }; } template<typename _Tp> struct _Istream { template<typename _CharT, typename _Traits> constexpr auto operator() [[nodiscard]] (basic_istream<_CharT, _Traits>& __e) const requires __detail::__can_istream_view<_Tp, remove_reference_t<decltype(__e)>> ; }; template<typename _Tp> inline constexpr _Istream<_Tp> istream; } namespace __detail { struct _Empty { }; template<bool _Present, typename _Tp> using __maybe_present_t = __conditional_t<_Present, _Tp, _Empty>; template<bool _Const, typename _Tp> using __maybe_const_t = __conditional_t<_Const, const _Tp, _Tp>; } using __detail::__maybe_const_t; namespace views::__adaptor { template<typename _Adaptor, typename... _Args> concept __adaptor_invocable = requires { std::declval<_Adaptor>()(declval<_Args>()...); }; template<typename _Adaptor, typename... _Args> concept __adaptor_partial_app_viable = (_Adaptor::_S_arity > 1) && (sizeof...(_Args) == _Adaptor::_S_arity - 1) && (constructible_from<decay_t<_Args>, _Args> && ...); template<typename _Adaptor, typename... _Args> struct _Partial; template<typename _Lhs, typename _Rhs> struct _Pipe; struct _RangeAdaptorClosure { template<typename _Self, typename _Range> requires derived_from<remove_cvref_t<_Self>, _RangeAdaptorClosure> && __adaptor_invocable<_Self, _Range> friend constexpr auto operator|(_Range&& __r, _Self&& __self) ; template<typename _Lhs, typename _Rhs> requires derived_from<_Lhs, _RangeAdaptorClosure> && derived_from<_Rhs, _RangeAdaptorClosure> friend constexpr auto operator|(_Lhs __lhs, _Rhs __rhs) ; }; template<typename _Derived> struct _RangeAdaptor { template<typename... _Args> requires __adaptor_partial_app_viable<_Derived, _Args...> constexpr auto operator()(_Args&&... __args) const ; }; template<typename _Adaptor> concept __closure_has_simple_call_op = _Adaptor::_S_has_simple_call_op; template<typename _Adaptor, typename... _Args> concept __adaptor_has_simple_extra_args = _Adaptor::_S_has_simple_extra_args || _Adaptor::template _S_has_simple_extra_args<_Args...>; template<typename _Adaptor, typename... _Args> struct _Partial : _RangeAdaptorClosure { tuple<_Args...> _M_args; constexpr _Partial(_Args... __args) ; template<typename _Range> requires __adaptor_invocable<_Adaptor, _Range, const _Args&...> constexpr auto operator()(_Range&& __r) const & ; template<typename _Range> requires __adaptor_invocable<_Adaptor, _Range, _Args...> constexpr auto operator()(_Range&& __r) && ; template<typename _Range> constexpr auto operator()(_Range&& __r) const && = delete; }; template<typename _Adaptor, typename _Arg> struct _Partial<_Adaptor, _Arg> : _RangeAdaptorClosure { _Arg _M_arg; constexpr _Partial(_Arg __arg) ; template<typename _Range> requires __adaptor_invocable<_Adaptor, _Range, const _Arg&> constexpr auto operator()(_Range&& __r) const & ; template<typename _Range> requires __adaptor_invocable<_Adaptor, _Range, _Arg> constexpr auto operator()(_Range&& __r) && ; template<typename _Range> constexpr auto operator()(_Range&& __r) const && = delete; }; template<typename _Adaptor, typename... _Args> requires __adaptor_has_simple_extra_args<_Adaptor, _Args...> && (is_trivially_copyable_v<_Args> && ...) struct _Partial<_Adaptor, _Args...> : _RangeAdaptorClosure { tuple<_Args...> _M_args; constexpr _Partial(_Args... __args) ; template<typename _Range> requires __adaptor_invocable<_Adaptor, _Range, const _Args&...> constexpr auto operator()(_Range&& __r) const ; static constexpr bool _S_has_simple_call_op = true; }; template<typename _Adaptor, typename _Arg> requires __adaptor_has_simple_extra_args<_Adaptor, _Arg> && is_trivially_copyable_v<_Arg> struct _Partial<_Adaptor, _Arg> : _RangeAdaptorClosure { _Arg _M_arg; constexpr _Partial(_Arg __arg) ; template<typename _Range> requires __adaptor_invocable<_Adaptor, _Range, const _Arg&> constexpr auto operator()(_Range&& __r) const ; static constexpr bool _S_has_simple_call_op = true; }; template<typename _Lhs, typename _Rhs, typename _Range> concept __pipe_invocable = requires { std::declval<_Rhs>()(std::declval<_Lhs>()(std::declval<_Range>())); }; template<typename _Lhs, typename _Rhs> struct _Pipe : _RangeAdaptorClosure { [[no_unique_address]] _Lhs _M_lhs; [[no_unique_address]] _Rhs _M_rhs; constexpr _Pipe(_Lhs __lhs, _Rhs __rhs) ; template<typename _Range> requires __pipe_invocable<const _Lhs&, const _Rhs&, _Range> constexpr auto operator()(_Range&& __r) const & ; template<typename _Range> requires __pipe_invocable<_Lhs, _Rhs, _Range> constexpr auto operator()(_Range&& __r) && ; template<typename _Range> constexpr auto operator()(_Range&& __r) const && = delete; }; template<typename _Lhs, typename _Rhs> requires __closure_has_simple_call_op<_Lhs> && __closure_has_simple_call_op<_Rhs> struct _Pipe<_Lhs, _Rhs> : _RangeAdaptorClosure { [[no_unique_address]] _Lhs _M_lhs; [[no_unique_address]] _Rhs _M_rhs; constexpr _Pipe(_Lhs __lhs, _Rhs __rhs) ; template<typename _Range> requires __pipe_invocable<const _Lhs&, const _Rhs&, _Range> constexpr auto operator()(_Range&& __r) const ; static constexpr bool _S_has_simple_call_op = true; }; } template<range _Range> requires is_object_v<_Range> class ref_view : public view_interface<ref_view<_Range>> { private: _Range* _M_r; static void _S_fun(_Range&); static void _S_fun(_Range&&) = delete; public: template<__detail::__different_from<ref_view> _Tp> requires convertible_to<_Tp, _Range&> && requires { _S_fun(declval<_Tp>()); } constexpr ref_view(_Tp&& __t) noexcept(noexcept(static_cast<_Range&>(std::declval<_Tp>()))) ; constexpr _Range& base() const ; constexpr iterator_t<_Range> begin() const ; constexpr sentinel_t<_Range> end() const ; constexpr bool empty() const requires requires { ranges::empty(*_M_r); } ; constexpr auto size() const requires sized_range<_Range> ; constexpr auto data() const requires contiguous_range<_Range> ; }; template<typename _Range> ref_view(_Range&) -> ref_view<_Range>; template<typename _Tp> inline constexpr bool enable_borrowed_range<ref_view<_Tp>> = true; template<range _Range> requires movable<_Range> && (!__detail::__is_initializer_list<remove_cv_t<_Range>>) class owning_view : public view_interface<owning_view<_Range>> { private: _Range _M_r = _Range(); public: owning_view() requires default_initializable<_Range> = default; constexpr owning_view(_Range&& __t) noexcept(is_nothrow_move_constructible_v<_Range>) ; owning_view(owning_view&&) = default; owning_view& operator=(owning_view&&) = default; constexpr _Range& base() & noexcept ; constexpr const _Range& base() const& noexcept ; constexpr _Range&& base() && noexcept ; constexpr const _Range&& base() const&& noexcept ; constexpr iterator_t<_Range> begin() ; constexpr sentinel_t<_Range> end() ; constexpr auto begin() const requires range<const _Range> ; constexpr auto end() const requires range<const _Range> ; constexpr bool empty() requires requires { ranges::empty(_M_r); } ; constexpr bool empty() const requires requires { ranges::empty(_M_r); } ; constexpr auto size() requires sized_range<_Range> ; constexpr auto size() const requires sized_range<const _Range> ; constexpr auto data() requires contiguous_range<_Range> ; constexpr auto data() const requires contiguous_range<const _Range> ; }; template<typename _Tp> inline constexpr bool enable_borrowed_range<owning_view<_Tp>> = enable_borrowed_range<_Tp>; namespace views { namespace __detail { template<typename _Range> concept __can_ref_view = requires { ref_view{std::declval<_Range>()}; }; template<typename _Range> concept __can_owning_view = requires { owning_view{std::declval<_Range>()}; }; } struct _All : __adaptor::_RangeAdaptorClosure { template<typename _Range> static constexpr bool _S_noexcept() ; template<viewable_range _Range> requires view<decay_t<_Range>> || __detail::__can_ref_view<_Range> || __detail::__can_owning_view<_Range> constexpr auto operator() [[nodiscard]] (_Range&& __r) const noexcept(_S_noexcept<_Range>()) ; static constexpr bool _S_has_simple_call_op = true; }; inline constexpr _All all; template<viewable_range _Range> using all_t = decltype(all(std::declval<_Range>())); } namespace __detail { template<typename _Tp> struct __non_propagating_cache { }; template<typename _Tp> requires is_object_v<_Tp> struct __non_propagating_cache<_Tp> : protected _Optional_base<_Tp> { __non_propagating_cache() = default; constexpr __non_propagating_cache(const __non_propagating_cache&) noexcept ; constexpr __non_propagating_cache(__non_propagating_cache&& __other) noexcept ; constexpr __non_propagating_cache& operator=(const __non_propagating_cache& __other) noexcept ; constexpr __non_propagating_cache& operator=(__non_propagating_cache&& __other) noexcept ; constexpr __non_propagating_cache& operator=(_Tp __val) ; constexpr explicit operator bool() const noexcept ; constexpr _Tp& operator*() noexcept ; constexpr const _Tp& operator*() const noexcept ; template<typename _Iter> constexpr _Tp& _M_emplace_deref(const _Iter& __i) ; }; template<range _Range> struct _CachedPosition { constexpr bool _M_has_value() const ; constexpr iterator_t<_Range> _M_get(const _Range&) const ; constexpr void _M_set(const _Range&, const iterator_t<_Range>&) const ; }; template<forward_range _Range> struct _CachedPosition<_Range> : protected __non_propagating_cache<iterator_t<_Range>> { constexpr bool _M_has_value() const ; constexpr iterator_t<_Range> _M_get(const _Range&) const ; constexpr void _M_set(const _Range&, const iterator_t<_Range>& __it) ; }; template<random_access_range _Range> requires (sizeof(range_difference_t<_Range>) <= sizeof(iterator_t<_Range>)) struct _CachedPosition<_Range> { private: range_difference_t<_Range> _M_offset = -1; public: _CachedPosition() = default; constexpr _CachedPosition(const _CachedPosition&) = default; constexpr _CachedPosition(_CachedPosition&& __other) noexcept ; constexpr _CachedPosition& operator=(const _CachedPosition&) = default; constexpr _CachedPosition& operator=(_CachedPosition&& __other) noexcept ; constexpr bool _M_has_value() const ; constexpr iterator_t<_Range> _M_get(_Range& __r) const ; constexpr void _M_set(_Range& __r, const iterator_t<_Range>& __it) ; }; } namespace __detail { template<typename _Base> struct __filter_view_iter_cat { }; template<forward_range _Base> struct __filter_view_iter_cat<_Base> { private: static auto _S_iter_cat() ; public: using iterator_category = decltype(_S_iter_cat()); }; } template<input_range _Vp, indirect_unary_predicate<iterator_t<_Vp>> _Pred> requires view<_Vp> && is_object_v<_Pred> class filter_view : public view_interface<filter_view<_Vp, _Pred>> { private: struct _Sentinel; struct _Iterator : __detail::__filter_view_iter_cat<_Vp> { private: static constexpr auto _S_iter_concept() ; friend filter_view; using _Vp_iter = iterator_t<_Vp>; _Vp_iter _M_current = _Vp_iter(); filter_view* _M_parent = nullptr; public: using iterator_concept = decltype(_S_iter_concept()); using value_type = range_value_t<_Vp>; using difference_type = range_difference_t<_Vp>; _Iterator() requires default_initializable<_Vp_iter> = default; constexpr _Iterator(filter_view* __parent, _Vp_iter __current) ; constexpr const _Vp_iter& base() const & noexcept ; constexpr _Vp_iter base() && ; constexpr range_reference_t<_Vp> operator*() const ; constexpr _Vp_iter operator->() const requires __detail::__has_arrow<_Vp_iter> && copyable<_Vp_iter> ; constexpr _Iterator& operator++() ; constexpr void operator++(int) ; constexpr _Iterator operator++(int) requires forward_range<_Vp> { auto __tmp = *this; ++*this; return __tmp; } constexpr _Iterator& operator--() requires bidirectional_range<_Vp> { do --_M_current; while (!std::__invoke(*_M_parent->_M_pred, *_M_current)); return *this; } constexpr _Iterator operator--(int) requires bidirectional_range<_Vp> { auto __tmp = *this; --*this; return __tmp; } friend constexpr bool operator==(const _Iterator& __x, const _Iterator& __y) requires equality_comparable<_Vp_iter> { return __x._M_current == __y._M_current; } friend constexpr range_rvalue_reference_t<_Vp> iter_move(const _Iterator& __i) noexcept(noexcept(ranges::iter_move(__i._M_current))) { return ranges::iter_move(__i._M_current); } friend constexpr void iter_swap(const _Iterator& __x, const _Iterator& __y) noexcept(noexcept(ranges::iter_swap(__x._M_current, __y._M_current))) requires indirectly_swappable<_Vp_iter> { ranges::iter_swap(__x._M_current, __y._M_current); } }; struct _Sentinel { private: sentinel_t<_Vp> _M_end = sentinel_t<_Vp>(); constexpr bool __equal(const _Iterator& __i) const { return __i._M_current == _M_end; } public: _Sentinel() = default; constexpr explicit _Sentinel(filter_view* __parent) : _M_end(ranges::end(__parent->_M_base)) { } constexpr sentinel_t<_Vp> base() const ; friend constexpr bool operator==(const _Iterator& __x, const _Sentinel& __y) ; }; _Vp _M_base = _Vp(); [[no_unique_address]] __detail::__box<_Pred> _M_pred; [[no_unique_address]] __detail::_CachedPosition<_Vp> _M_cached_begin; public: filter_view() requires (default_initializable<_Vp> && default_initializable<_Pred>) = default; constexpr filter_view(_Vp __base, _Pred __pred) ; constexpr _Vp base() const& requires copy_constructible<_Vp> ; constexpr _Vp base() && ; constexpr const _Pred& pred() const ; constexpr _Iterator begin() ; constexpr auto end() ; }; template<typename _Range, typename _Pred> filter_view(_Range&&, _Pred) -> filter_view<views::all_t<_Range>, _Pred>; namespace views { namespace __detail { template<typename _Range, typename _Pred> concept __can_filter_view = requires { filter_view(std::declval<_Range>(), std::declval<_Pred>()); }; } struct _Filter : __adaptor::_RangeAdaptor<_Filter> { template<viewable_range _Range, typename _Pred> requires __detail::__can_filter_view<_Range, _Pred> constexpr auto operator() [[nodiscard]] (_Range&& __r, _Pred&& __p) const ; using _RangeAdaptor<_Filter>::operator(); static constexpr int _S_arity = 2; static constexpr bool _S_has_simple_extra_args = true; }; inline constexpr _Filter filter; } template<input_range _Vp, copy_constructible _Fp> requires view<_Vp> && is_object_v<_Fp> && regular_invocable<_Fp&, range_reference_t<_Vp>> && std::__detail::__can_reference<invoke_result_t<_Fp&, range_reference_t<_Vp>>> class transform_view : public view_interface<transform_view<_Vp, _Fp>> { private: template<bool _Const> using _Base = __detail::__maybe_const_t<_Const, _Vp>; template<bool _Const> struct __iter_cat { }; template<bool _Const> requires forward_range<_Base<_Const>> struct __iter_cat<_Const> { private: static auto _S_iter_cat() ; public: using iterator_category = decltype(_S_iter_cat()); }; template<bool _Const> struct _Sentinel; template<bool _Const> struct _Iterator : __iter_cat<_Const> { private: using _Parent = __detail::__maybe_const_t<_Const, transform_view>; using _Base = transform_view::_Base<_Const>; static auto _S_iter_concept() ; using _Base_iter = iterator_t<_Base>; _Base_iter _M_current = _Base_iter(); _Parent* _M_parent = nullptr; public: using iterator_concept = decltype(_S_iter_concept()); using value_type = remove_cvref_t<invoke_result_t<_Fp&, range_reference_t<_Base>>>; using difference_type = range_difference_t<_Base>; _Iterator() requires default_initializable<_Base_iter> = default; constexpr _Iterator(_Parent* __parent, _Base_iter __current) ; constexpr _Iterator(_Iterator<!_Const> __i) ; constexpr const _Base_iter& base() const & noexcept ; constexpr _Base_iter base() && ; constexpr decltype(auto) operator*() const noexcept(noexcept(std::__invoke(*_M_parent->_M_fun, *_M_current))) ; constexpr _Iterator& operator++() ; constexpr void operator++(int) ; constexpr _Iterator operator++(int) requires forward_range<_Base> ; constexpr _Iterator& operator--() requires bidirectional_range<_Base> ; constexpr _Iterator operator--(int) requires bidirectional_range<_Base> ; constexpr _Iterator& operator+=(difference_type __n) requires random_access_range<_Base> ; constexpr _Iterator& operator-=(difference_type __n) requires random_access_range<_Base> ; constexpr decltype(auto) operator[](difference_type __n) const requires random_access_range<_Base> { return std::__invoke(*_M_parent->_M_fun, _M_current[__n]); } friend constexpr bool operator==(const _Iterator& __x, const _Iterator& __y) requires equality_comparable<_Base_iter> { return __x._M_current == __y._M_current; } friend constexpr bool operator<(const _Iterator& __x, const _Iterator& __y) requires random_access_range<_Base> { return __x._M_current < __y._M_current; } friend constexpr bool operator>(const _Iterator& __x, const _Iterator& __y) requires random_access_range<_Base> { return __y < __x; } friend constexpr bool operator<=(const _Iterator& __x, const _Iterator& __y) requires random_access_range<_Base> { return !(__y < __x); } friend constexpr bool operator>=(const _Iterator& __x, const _Iterator& __y) requires random_access_range<_Base> { return !(__x < __y); } friend constexpr auto operator<=>(const _Iterator& __x, const _Iterator& __y) requires random_access_range<_Base> && three_way_comparable<_Base_iter> { return __x._M_current <=> __y._M_current; } friend constexpr _Iterator operator+(_Iterator __i, difference_type __n) requires random_access_range<_Base> { return {__i._M_parent, __i._M_current + __n}; } friend constexpr _Iterator operator+(difference_type __n, _Iterator __i) requires random_access_range<_Base> { return {__i._M_parent, __i._M_current + __n}; } friend constexpr _Iterator operator-(_Iterator __i, difference_type __n) requires random_access_range<_Base> { return {__i._M_parent, __i._M_current - __n}; } friend constexpr difference_type operator-(const _Iterator& __x, const _Iterator& __y) requires sized_sentinel_for<iterator_t<_Base>, iterator_t<_Base>> { return __x._M_current - __y._M_current; } friend constexpr decltype(auto) iter_move(const _Iterator& __i) noexcept(noexcept(*__i)) { if constexpr (is_lvalue_reference_v<decltype(*__i)>) return std::move(*__i); else return *__i; } friend _Iterator<!_Const>; template<bool> friend struct _Sentinel; }; template<bool _Const> struct _Sentinel { private: using _Parent = __detail::__maybe_const_t<_Const, transform_view>; using _Base = transform_view::_Base<_Const>; template<bool _Const2> constexpr auto __distance_from(const _Iterator<_Const2>& __i) const ; template<bool _Const2> constexpr bool __equal(const _Iterator<_Const2>& __i) const ; sentinel_t<_Base> _M_end = sentinel_t<_Base>(); public: _Sentinel() = default; constexpr explicit _Sentinel(sentinel_t<_Base> __end) ; constexpr _Sentinel(_Sentinel<!_Const> __i) ; constexpr sentinel_t<_Base> base() const { return _M_end; } template<bool _Const2> requires sentinel_for<sentinel_t<_Base>, iterator_t<__detail::__maybe_const_t<_Const2, _Vp>>> friend constexpr bool operator==(const _Iterator<_Const2>& __x, const _Sentinel& __y) { return __y.__equal(__x); } template<bool _Const2, typename _Base2 = __detail::__maybe_const_t<_Const2, _Vp>> requires sized_sentinel_for<sentinel_t<_Base>, iterator_t<_Base2>> friend constexpr range_difference_t<_Base2> operator-(const _Iterator<_Const2>& __x, const _Sentinel& __y) { return -__y.__distance_from(__x); } template<bool _Const2, typename _Base2 = __detail::__maybe_const_t<_Const2, _Vp>> requires sized_sentinel_for<sentinel_t<_Base>, iterator_t<_Base2>> friend constexpr range_difference_t<_Base2> operator-(const _Sentinel& __y, const _Iterator<_Const2>& __x) { return __y.__distance_from(__x); } friend _Sentinel<!_Const>; }; _Vp _M_base = _Vp(); [[no_unique_address]] __detail::__box<_Fp> _M_fun; public: transform_view() requires (default_initializable<_Vp> && default_initializable<_Fp>) = default; constexpr transform_view(_Vp __base, _Fp __fun) ; constexpr _Vp base() const& requires copy_constructible<_Vp> ; constexpr _Vp base() && ; constexpr _Iterator<false> begin() ; constexpr _Iterator<true> begin() const requires range<const _Vp> && regular_invocable<const _Fp&, range_reference_t<const _Vp>> ; constexpr _Sentinel<false> end() ; constexpr _Iterator<false> end() requires common_range<_Vp> ; constexpr _Sentinel<true> end() const requires range<const _Vp> && regular_invocable<const _Fp&, range_reference_t<const _Vp>> ; constexpr _Iterator<true> end() const requires common_range<const _Vp> && regular_invocable<const _Fp&, range_reference_t<const _Vp>> ; constexpr auto size() requires sized_range<_Vp> ; constexpr auto size() const requires sized_range<const _Vp> ; }; template<typename _Range, typename _Fp> transform_view(_Range&&, _Fp) -> transform_view<views::all_t<_Range>, _Fp>; namespace views { namespace __detail { template<typename _Range, typename _Fp> concept __can_transform_view = requires { transform_view(std::declval<_Range>(), std::declval<_Fp>()); }; } struct _Transform : __adaptor::_RangeAdaptor<_Transform> { template<viewable_range _Range, typename _Fp> requires __detail::__can_transform_view<_Range, _Fp> constexpr auto operator() [[nodiscard]] (_Range&& __r, _Fp&& __f) const ; using _RangeAdaptor<_Transform>::operator(); static constexpr int _S_arity = 2; static constexpr bool _S_has_simple_extra_args = true; }; inline constexpr _Transform transform; } template<view _Vp> class take_view : public view_interface<take_view<_Vp>> { private: template<bool _Const> using _CI = counted_iterator< iterator_t<__detail::__maybe_const_t<_Const, _Vp>>>; template<bool _Const> struct _Sentinel { private: using _Base = __detail::__maybe_const_t<_Const, _Vp>; sentinel_t<_Base> _M_end = sentinel_t<_Base>(); public: _Sentinel() = default; constexpr explicit _Sentinel(sentinel_t<_Base> __end) ; constexpr _Sentinel(_Sentinel<!_Const> __s) requires _Const && convertible_to<sentinel_t<_Vp>, sentinel_t<_Base>> : _M_end(std::move(__s._M_end)) { } constexpr sentinel_t<_Base> base() const { return _M_end; } friend constexpr bool operator==(const _CI<_Const>& __y, const _Sentinel& __x) { return __y.count() == 0 || __y.base() == __x._M_end; } template<bool _OtherConst = !_Const, typename _Base2 = __detail::__maybe_const_t<_OtherConst, _Vp>> requires sentinel_for<sentinel_t<_Base>, iterator_t<_Base2>> friend constexpr bool operator==(const _CI<_OtherConst>& __y, const _Sentinel& __x) { return __y.count() == 0 || __y.base() == __x._M_end; } friend _Sentinel<!_Const>; }; _Vp _M_base = _Vp(); range_difference_t<_Vp> _M_count = 0; public: take_view() requires default_initializable<_Vp> = default; constexpr take_view(_Vp __base, range_difference_t<_Vp> __count) ; constexpr _Vp base() const& requires copy_constructible<_Vp> ; constexpr _Vp base() && ; constexpr auto begin() requires (!__detail::__simple_view<_Vp>) ; constexpr auto begin() const requires range<const _Vp> ; constexpr auto end() requires (!__detail::__simple_view<_Vp>) ; constexpr auto end() const requires range<const _Vp> ; constexpr auto size() requires sized_range<_Vp> ; constexpr auto size() const requires sized_range<const _Vp> ; }; template<typename _Range> take_view(_Range&&, range_difference_t<_Range>) -> take_view<views::all_t<_Range>>; template<typename _Tp> inline constexpr bool enable_borrowed_range<take_view<_Tp>> = enable_borrowed_range<_Tp>; namespace views { namespace __detail { template<typename _Range> inline constexpr bool __is_empty_view = false; template<typename _Tp> inline constexpr bool __is_empty_view<empty_view<_Tp>> = true; template<typename _Range> inline constexpr bool __is_basic_string_view = false; template<typename _CharT, typename _Traits> inline constexpr bool __is_basic_string_view<basic_string_view<_CharT, _Traits>> = true; template<typename _Range> inline constexpr bool __is_subrange = false; template<typename _Iter, typename _Sent, subrange_kind _Kind> inline constexpr bool __is_subrange<subrange<_Iter, _Sent, _Kind>> = true; template<typename _Range> inline constexpr bool __is_iota_view = false; template<typename _Winc, typename _Bound> inline constexpr bool __is_iota_view<iota_view<_Winc, _Bound>> = true; template<typename _Range> inline constexpr bool __is_repeat_view = false; template<typename _Range> constexpr auto __take_of_repeat_view(_Range&&, range_difference_t<_Range>); template<typename _Range, typename _Dp> concept __can_take_view = requires { take_view(std::declval<_Range>(), std::declval<_Dp>()); }; } struct _Take : __adaptor::_RangeAdaptor<_Take> { template<viewable_range _Range, typename _Dp = range_difference_t<_Range>> requires __detail::__can_take_view<_Range, _Dp> constexpr auto operator() [[nodiscard]] (_Range&& __r, type_identity_t<_Dp> __n) const ; using _RangeAdaptor<_Take>::operator(); static constexpr int _S_arity = 2; template<typename _Tp> static constexpr bool _S_has_simple_extra_args = ranges::__detail::__is_integer_like<_Tp>; }; inline constexpr _Take take; } template<view _Vp, typename _Pred> requires input_range<_Vp> && is_object_v<_Pred> && indirect_unary_predicate<const _Pred, iterator_t<_Vp>> class take_while_view : public view_interface<take_while_view<_Vp, _Pred>> { template<bool _Const> struct _Sentinel { private: using _Base = __detail::__maybe_const_t<_Const, _Vp>; sentinel_t<_Base> _M_end = sentinel_t<_Base>(); const _Pred* _M_pred = nullptr; public: _Sentinel() = default; constexpr explicit _Sentinel(sentinel_t<_Base> __end, const _Pred* __pred) ; constexpr _Sentinel(_Sentinel<!_Const> __s) ; constexpr sentinel_t<_Base> base() const ; friend constexpr bool operator==(const iterator_t<_Base>& __x, const _Sentinel& __y) { return __y._M_end == __x || !std::__invoke(*__y._M_pred, *__x); } template<bool _OtherConst = !_Const, typename _Base2 = __detail::__maybe_const_t<_OtherConst, _Vp>> requires sentinel_for<sentinel_t<_Base>, iterator_t<_Base2>> friend constexpr bool operator==(const iterator_t<_Base2>& __x, const _Sentinel& __y) { return __y._M_end == __x || !std::__invoke(*__y._M_pred, *__x); } friend _Sentinel<!_Const>; }; _Vp _M_base = _Vp(); [[no_unique_address]] __detail::__box<_Pred> _M_pred; public: take_while_view() requires (default_initializable<_Vp> && default_initializable<_Pred>) = default; constexpr take_while_view(_Vp __base, _Pred __pred) : _M_base(std::move(__base)), _M_pred(std::move(__pred)) { } constexpr _Vp base() const& requires copy_constructible<_Vp> { return _M_base; } constexpr _Vp base() && ; constexpr const _Pred& pred() const ; constexpr auto begin() requires (!__detail::__simple_view<_Vp>) ; constexpr auto begin() const requires range<const _Vp> && indirect_unary_predicate<const _Pred, iterator_t<const _Vp>> ; constexpr auto end() requires (!__detail::__simple_view<_Vp>) ; constexpr auto end() const requires range<const _Vp> && indirect_unary_predicate<const _Pred, iterator_t<const _Vp>> ; }; template<typename _Range, typename _Pred> take_while_view(_Range&&, _Pred) -> take_while_view<views::all_t<_Range>, _Pred>; namespace views { namespace __detail { template<typename _Range, typename _Pred> concept __can_take_while_view = requires { take_while_view(std::declval<_Range>(), std::declval<_Pred>()); }; } struct _TakeWhile : __adaptor::_RangeAdaptor<_TakeWhile> { template<viewable_range _Range, typename _Pred> requires __detail::__can_take_while_view<_Range, _Pred> constexpr auto operator() [[nodiscard]] (_Range&& __r, _Pred&& __p) const ; using _RangeAdaptor<_TakeWhile>::operator(); static constexpr int _S_arity = 2; static constexpr bool _S_has_simple_extra_args = true; }; inline constexpr _TakeWhile take_while; } template<view _Vp> class drop_view : public view_interface<drop_view<_Vp>> { private: _Vp _M_base = _Vp(); range_difference_t<_Vp> _M_count = 0; static constexpr bool _S_needs_cached_begin = !(random_access_range<const _Vp> && sized_range<const _Vp>); [[no_unique_address]] __detail::__maybe_present_t<_S_needs_cached_begin, __detail::_CachedPosition<_Vp>> _M_cached_begin; public: drop_view() requires default_initializable<_Vp> = default; constexpr drop_view(_Vp __base, range_difference_t<_Vp> __count) ; constexpr _Vp base() const& requires copy_constructible<_Vp> ; constexpr _Vp base() && ; constexpr auto begin() requires (!(__detail::__simple_view<_Vp> && random_access_range<const _Vp> && sized_range<const _Vp>)) ; constexpr auto begin() const requires random_access_range<const _Vp> && sized_range<const _Vp> ; constexpr auto end() requires (!__detail::__simple_view<_Vp>) ; constexpr auto end() const requires range<const _Vp> ; constexpr auto size() requires sized_range<_Vp> ; constexpr auto size() const requires sized_range<const _Vp> ; }; template<typename _Range> drop_view(_Range&&, range_difference_t<_Range>) -> drop_view<views::all_t<_Range>>; template<typename _Tp> inline constexpr bool enable_borrowed_range<drop_view<_Tp>> = enable_borrowed_range<_Tp>; namespace views { namespace __detail { template<typename _Range> constexpr auto __drop_of_repeat_view(_Range&&, range_difference_t<_Range>); template<typename _Range, typename _Dp> concept __can_drop_view = requires { drop_view(std::declval<_Range>(), std::declval<_Dp>()); }; } struct _Drop : __adaptor::_RangeAdaptor<_Drop> { template<viewable_range _Range, typename _Dp = range_difference_t<_Range>> requires __detail::__can_drop_view<_Range, _Dp> constexpr auto operator() [[nodiscard]] (_Range&& __r, type_identity_t<_Dp> __n) const ; using _RangeAdaptor<_Drop>::operator(); static constexpr int _S_arity = 2; template<typename _Tp> static constexpr bool _S_has_simple_extra_args = _Take::_S_has_simple_extra_args<_Tp>; }; inline constexpr _Drop drop; } template<view _Vp, typename _Pred> requires input_range<_Vp> && is_object_v<_Pred> && indirect_unary_predicate<const _Pred, iterator_t<_Vp>> class drop_while_view : public view_interface<drop_while_view<_Vp, _Pred>> { private: _Vp _M_base = _Vp(); [[no_unique_address]] __detail::__box<_Pred> _M_pred; [[no_unique_address]] __detail::_CachedPosition<_Vp> _M_cached_begin; public: drop_while_view() requires (default_initializable<_Vp> && default_initializable<_Pred>) = default; constexpr drop_while_view(_Vp __base, _Pred __pred) ; constexpr _Vp base() const& requires copy_constructible<_Vp> ; constexpr _Vp base() && ; constexpr const _Pred& pred() const ; constexpr auto begin() ; constexpr auto end() ; }; template<typename _Range, typename _Pred> drop_while_view(_Range&&, _Pred) -> drop_while_view<views::all_t<_Range>, _Pred>; template<typename _Tp, typename _Pred> inline constexpr bool enable_borrowed_range<drop_while_view<_Tp, _Pred>> = enable_borrowed_range<_Tp>; namespace views { namespace __detail { template<typename _Range, typename _Pred> concept __can_drop_while_view = requires { drop_while_view(std::declval<_Range>(), std::declval<_Pred>()); }; } struct _DropWhile : __adaptor::_RangeAdaptor<_DropWhile> { template<viewable_range _Range, typename _Pred> requires __detail::__can_drop_while_view<_Range, _Pred> constexpr auto operator() [[nodiscard]] (_Range&& __r, _Pred&& __p) const ; using _RangeAdaptor<_DropWhile>::operator(); static constexpr int _S_arity = 2; static constexpr bool _S_has_simple_extra_args = true; }; inline constexpr _DropWhile drop_while; } template<input_range _Vp> requires view<_Vp> && input_range<range_reference_t<_Vp>> class join_view : public view_interface<join_view<_Vp>> { private: using _InnerRange = range_reference_t<_Vp>; template<bool _Const> using _Base = __detail::__maybe_const_t<_Const, _Vp>; template<bool _Const> using _Outer_iter = iterator_t<_Base<_Const>>; template<bool _Const> using _Inner_iter = iterator_t<range_reference_t<_Base<_Const>>>; template<bool _Const> static constexpr bool _S_ref_is_glvalue = is_reference_v<range_reference_t<_Base<_Const>>>; template<bool _Const> struct __iter_cat { }; template<bool _Const> requires _S_ref_is_glvalue<_Const> && forward_range<_Base<_Const>> && forward_range<range_reference_t<_Base<_Const>>> struct __iter_cat<_Const> { private: static constexpr auto _S_iter_cat() ; public: using iterator_category = decltype(_S_iter_cat()); }; template<bool _Const> struct _Sentinel; template<bool _Const> struct _Iterator : __iter_cat<_Const> { private: using _Parent = __detail::__maybe_const_t<_Const, join_view>; using _Base = join_view::_Base<_Const>; static constexpr bool _S_ref_is_glvalue = join_view::_S_ref_is_glvalue<_Const>; constexpr void _M_satisfy() ; static constexpr auto _S_iter_concept() ; using _Outer_iter = join_view::_Outer_iter<_Const>; using _Inner_iter = join_view::_Inner_iter<_Const>; _Outer_iter _M_outer = _Outer_iter(); optional<_Inner_iter> _M_inner; _Parent* _M_parent = nullptr; public: using iterator_concept = decltype(_S_iter_concept()); using value_type = range_value_t<range_reference_t<_Base>>; using difference_type = common_type_t<range_difference_t<_Base>, range_difference_t<range_reference_t<_Base>>>; _Iterator() requires default_initializable<_Outer_iter> = default; constexpr _Iterator(_Parent* __parent, _Outer_iter __outer) ; constexpr _Iterator(_Iterator<!_Const> __i) ; constexpr decltype(auto) operator*() const ; constexpr _Inner_iter operator->() const requires __detail::__has_arrow<_Inner_iter> && copyable<_Inner_iter> ; constexpr _Iterator& operator++() ; constexpr void operator++(int) ; constexpr _Iterator operator++(int) requires _S_ref_is_glvalue && forward_range<_Base> && forward_range<range_reference_t<_Base>> ; constexpr _Iterator& operator--() requires _S_ref_is_glvalue && bidirectional_range<_Base> && bidirectional_range<range_reference_t<_Base>> && common_range<range_reference_t<_Base>> ; constexpr _Iterator operator--(int) requires _S_ref_is_glvalue && bidirectional_range<_Base> && bidirectional_range<range_reference_t<_Base>> && common_range<range_reference_t<_Base>> ; friend constexpr bool operator==(const _Iterator& __x, const _Iterator& __y) requires _S_ref_is_glvalue && equality_comparable<_Outer_iter> && equality_comparable<_Inner_iter> { return (__x._M_outer == __y._M_outer && __x._M_inner == __y._M_inner); } friend constexpr decltype(auto) iter_move(const _Iterator& __i) noexcept(noexcept(ranges::iter_move(*__i._M_inner))) { return ranges::iter_move(*__i._M_inner); } friend constexpr void iter_swap(const _Iterator& __x, const _Iterator& __y) noexcept(noexcept(ranges::iter_swap(*__x._M_inner, *__y._M_inner))) requires indirectly_swappable<_Inner_iter> { return ranges::iter_swap(*__x._M_inner, *__y._M_inner); } friend _Iterator<!_Const>; template<bool> friend struct _Sentinel; }; template<bool _Const> struct _Sentinel { private: using _Parent = __detail::__maybe_const_t<_Const, join_view>; using _Base = join_view::_Base<_Const>; template<bool _Const2> constexpr bool __equal(const _Iterator<_Const2>& __i) const { return __i._M_outer == _M_end; } sentinel_t<_Base> _M_end = sentinel_t<_Base>(); public: _Sentinel() = default; constexpr explicit _Sentinel(_Parent* __parent) ; constexpr _Sentinel(_Sentinel<!_Const> __s) ; template<bool _Const2> requires sentinel_for<sentinel_t<_Base>, iterator_t<__detail::__maybe_const_t<_Const2, _Vp>>> friend constexpr bool operator==(const _Iterator<_Const2>& __x, const _Sentinel& __y) ; friend _Sentinel<!_Const>; }; _Vp _M_base = _Vp(); [[no_unique_address]] __detail::__non_propagating_cache<remove_cv_t<_InnerRange>> _M_inner; public: join_view() requires default_initializable<_Vp> = default; constexpr explicit join_view(_Vp __base) ; constexpr _Vp base() const& requires copy_constructible<_Vp> ; constexpr _Vp base() && ; constexpr auto begin() ; constexpr auto begin() const requires input_range<const _Vp> && is_reference_v<range_reference_t<const _Vp>> ; constexpr auto end() ; constexpr auto end() const requires input_range<const _Vp> && is_reference_v<range_reference_t<const _Vp>> ; }; template<typename _Range> explicit join_view(_Range&&) -> join_view<views::all_t<_Range>>; namespace views { namespace __detail { template<typename _Range> concept __can_join_view = requires { join_view<all_t<_Range>>{std::declval<_Range>()}; }; } struct _Join : __adaptor::_RangeAdaptorClosure { template<viewable_range _Range> requires __detail::__can_join_view<_Range> constexpr auto operator() [[nodiscard]] (_Range&& __r) const ; static constexpr bool _S_has_simple_call_op = true; }; inline constexpr _Join join; } namespace __detail { template<auto> struct __require_constant; template<typename _Range> concept __tiny_range = sized_range<_Range> && requires { typename __require_constant<remove_reference_t<_Range>::size()>; } && (remove_reference_t<_Range>::size() <= 1); template<typename _Base> struct __lazy_split_view_outer_iter_cat { }; template<forward_range _Base> struct __lazy_split_view_outer_iter_cat<_Base> { using iterator_category = input_iterator_tag; }; template<typename _Base> struct __lazy_split_view_inner_iter_cat { }; template<forward_range _Base> struct __lazy_split_view_inner_iter_cat<_Base> { private: static constexpr auto _S_iter_cat() ; public: using iterator_category = decltype(_S_iter_cat()); }; } template<input_range _Vp, forward_range _Pattern> requires view<_Vp> && view<_Pattern> && indirectly_comparable<iterator_t<_Vp>, iterator_t<_Pattern>, ranges::equal_to> && (forward_range<_Vp> || __detail::__tiny_range<_Pattern>) class lazy_split_view : public view_interface<lazy_split_view<_Vp, _Pattern>> { private: template<bool _Const> using _Base = __detail::__maybe_const_t<_Const, _Vp>; template<bool _Const> struct _InnerIter; template<bool _Const> struct _OuterIter : __detail::__lazy_split_view_outer_iter_cat<_Base<_Const>> { private: using _Parent = __detail::__maybe_const_t<_Const, lazy_split_view>; using _Base = lazy_split_view::_Base<_Const>; constexpr bool __at_end() const ; constexpr auto& __current() noexcept ; constexpr auto& __current() const noexcept ; _Parent* _M_parent = nullptr; [[no_unique_address]] __detail::__maybe_present_t<forward_range<_Vp>, iterator_t<_Base>> _M_current; bool _M_trailing_empty = false; public: using iterator_concept = __conditional_t<forward_range<_Base>, forward_iterator_tag, input_iterator_tag>; using difference_type = range_difference_t<_Base>; struct value_type : view_interface<value_type> { private: _OuterIter _M_i = _OuterIter(); public: value_type() = default; constexpr explicit value_type(_OuterIter __i) ; constexpr _InnerIter<_Const> begin() const ; constexpr default_sentinel_t end() const noexcept ; }; _OuterIter() = default; constexpr explicit _OuterIter(_Parent* __parent) requires (!forward_range<_Base>) ; constexpr _OuterIter(_Parent* __parent, iterator_t<_Base> __current) ; constexpr _OuterIter(_OuterIter<!_Const> __i) ; constexpr value_type operator*() const ; constexpr _OuterIter& operator++() ; constexpr decltype(auto) operator++(int) { if constexpr (forward_range<_Base>) { auto __tmp = *this; ++*this; return __tmp; } else ++*this; } friend constexpr bool operator==(const _OuterIter& __x, const _OuterIter& __y) requires forward_range<_Base> { return __x._M_current == __y._M_current && __x._M_trailing_empty == __y._M_trailing_empty; } friend constexpr bool operator==(const _OuterIter& __x, default_sentinel_t) { return __x.__at_end(); }; friend _OuterIter<!_Const>; friend _InnerIter<_Const>; }; template<bool _Const> struct _InnerIter : __detail::__lazy_split_view_inner_iter_cat<_Base<_Const>> { private: using _Base = lazy_split_view::_Base<_Const>; constexpr bool __at_end() const { auto [__pcur, __pend] = subrange{_M_i._M_parent->_M_pattern}; auto __end = ranges::end(_M_i._M_parent->_M_base); if constexpr (__detail::__tiny_range<_Pattern>) { const auto& __cur = _M_i_current(); if (__cur == __end) return true; if (__pcur == __pend) return _M_incremented; return *__cur == *__pcur; } else { auto __cur = _M_i_current(); if (__cur == __end) return true; if (__pcur == __pend) return _M_incremented; do { if (*__cur != *__pcur) return false; if (++__pcur == __pend) return true; } while (++__cur != __end); return false; } } constexpr auto& _M_i_current() noexcept ; constexpr auto& _M_i_current() const noexcept ; _OuterIter<_Const> _M_i = _OuterIter<_Const>(); bool _M_incremented = false; public: using iterator_concept = typename _OuterIter<_Const>::iterator_concept; using value_type = range_value_t<_Base>; using difference_type = range_difference_t<_Base>; _InnerIter() = default; constexpr explicit _InnerIter(_OuterIter<_Const> __i) ; constexpr const iterator_t<_Base>& base() const& noexcept ; constexpr iterator_t<_Base> base() && requires forward_range<_Vp> ; constexpr decltype(auto) operator*() const ; constexpr _InnerIter& operator++() ; constexpr decltype(auto) operator++(int) ; friend constexpr bool operator==(const _InnerIter& __x, const _InnerIter& __y) requires forward_range<_Base> { return __x._M_i == __y._M_i; } friend constexpr bool operator==(const _InnerIter& __x, default_sentinel_t) { return __x.__at_end(); } friend constexpr decltype(auto) iter_move(const _InnerIter& __i) noexcept(noexcept(ranges::iter_move(__i._M_i_current()))) { return ranges::iter_move(__i._M_i_current()); } friend constexpr void iter_swap(const _InnerIter& __x, const _InnerIter& __y) noexcept(noexcept(ranges::iter_swap(__x._M_i_current(), __y._M_i_current()))) requires indirectly_swappable<iterator_t<_Base>> { ranges::iter_swap(__x._M_i_current(), __y._M_i_current()); } }; _Vp _M_base = _Vp(); _Pattern _M_pattern = _Pattern(); [[no_unique_address]] __detail::__maybe_present_t<!forward_range<_Vp>, __detail::__non_propagating_cache<iterator_t<_Vp>>> _M_current; public: lazy_split_view() requires (default_initializable<_Vp> && default_initializable<_Pattern>) = default; constexpr lazy_split_view(_Vp __base, _Pattern __pattern) ; template<input_range _Range> requires constructible_from<_Vp, views::all_t<_Range>> && constructible_from<_Pattern, single_view<range_value_t<_Range>>> constexpr lazy_split_view(_Range&& __r, range_value_t<_Range> __e) ; constexpr _Vp base() const& requires copy_constructible<_Vp> ; constexpr _Vp base() && ; constexpr auto begin() ; constexpr auto begin() const requires forward_range<_Vp> && forward_range<const _Vp> ; constexpr auto end() requires forward_range<_Vp> && common_range<_Vp> ; constexpr auto end() const ; }; template<typename _Range, typename _Pattern> lazy_split_view(_Range&&, _Pattern&&) -> lazy_split_view<views::all_t<_Range>, views::all_t<_Pattern>>; template<input_range _Range> lazy_split_view(_Range&&, range_value_t<_Range>) -> lazy_split_view<views::all_t<_Range>, single_view<range_value_t<_Range>>>; namespace views { namespace __detail { template<typename _Range, typename _Pattern> concept __can_lazy_split_view = requires { lazy_split_view(std::declval<_Range>(), std::declval<_Pattern>()); }; } struct _LazySplit : __adaptor::_RangeAdaptor<_LazySplit> { template<viewable_range _Range, typename _Pattern> requires __detail::__can_lazy_split_view<_Range, _Pattern> constexpr auto operator() [[nodiscard]] (_Range&& __r, _Pattern&& __f) const ; using _RangeAdaptor<_LazySplit>::operator(); static constexpr int _S_arity = 2; template<typename _Pattern> static constexpr bool _S_has_simple_extra_args = is_scalar_v<_Pattern> || (view<_Pattern> && copy_constructible<_Pattern>); }; inline constexpr _LazySplit lazy_split; } template<forward_range _Vp, forward_range _Pattern> requires view<_Vp> && view<_Pattern> && indirectly_comparable<iterator_t<_Vp>, iterator_t<_Pattern>, ranges::equal_to> class split_view : public view_interface<split_view<_Vp, _Pattern>> { private: _Vp _M_base = _Vp(); _Pattern _M_pattern = _Pattern(); __detail::__non_propagating_cache<subrange<iterator_t<_Vp>>> _M_cached_begin; struct _Iterator; struct _Sentinel; public: split_view() requires (default_initializable<_Vp> && default_initializable<_Pattern>) = default; constexpr split_view(_Vp __base, _Pattern __pattern) ; template<forward_range _Range> requires constructible_from<_Vp, views::all_t<_Range>> && constructible_from<_Pattern, single_view<range_value_t<_Range>>> constexpr split_view(_Range&& __r, range_value_t<_Range> __e) ; constexpr _Vp base() const& requires copy_constructible<_Vp> ; constexpr _Vp base() && ; constexpr _Iterator begin() ; constexpr auto end() ; constexpr subrange<iterator_t<_Vp>> _M_find_next(iterator_t<_Vp> __it) ; private: struct _Iterator { private: split_view* _M_parent = nullptr; iterator_t<_Vp> _M_cur = iterator_t<_Vp>(); subrange<iterator_t<_Vp>> _M_next = subrange<iterator_t<_Vp>>(); bool _M_trailing_empty = false; friend struct _Sentinel; public: using iterator_concept = forward_iterator_tag; using iterator_category = input_iterator_tag; using value_type = subrange<iterator_t<_Vp>>; using difference_type = range_difference_t<_Vp>; _Iterator() = default; constexpr _Iterator(split_view* __parent, iterator_t<_Vp> __current, subrange<iterator_t<_Vp>> __next) ; constexpr iterator_t<_Vp> base() const ; constexpr value_type operator*() const ; constexpr _Iterator& operator++() ; constexpr _Iterator operator++(int) ; friend constexpr bool operator==(const _Iterator& __x, const _Iterator& __y) ; }; struct _Sentinel { private: sentinel_t<_Vp> _M_end = sentinel_t<_Vp>(); constexpr bool _M_equal(const _Iterator& __x) const ; public: _Sentinel() = default; constexpr explicit _Sentinel(split_view* __parent) ; friend constexpr bool operator==(const _Iterator& __x, const _Sentinel& __y) ; }; }; template<typename _Range, typename _Pattern> split_view(_Range&&, _Pattern&&) -> split_view<views::all_t<_Range>, views::all_t<_Pattern>>; template<forward_range _Range> split_view(_Range&&, range_value_t<_Range>) -> split_view<views::all_t<_Range>, single_view<range_value_t<_Range>>>; namespace views { namespace __detail { template<typename _Range, typename _Pattern> concept __can_split_view = requires { split_view(std::declval<_Range>(), std::declval<_Pattern>()); }; } struct _Split : __adaptor::_RangeAdaptor<_Split> { template<viewable_range _Range, typename _Pattern> requires __detail::__can_split_view<_Range, _Pattern> constexpr auto operator() [[nodiscard]] (_Range&& __r, _Pattern&& __f) const ; using _RangeAdaptor<_Split>::operator(); static constexpr int _S_arity = 2; template<typename _Pattern> static constexpr bool _S_has_simple_extra_args = _LazySplit::_S_has_simple_extra_args<_Pattern>; }; inline constexpr _Split split; } namespace views { struct _Counted { template<input_or_output_iterator _Iter> constexpr auto operator() [[nodiscard]] (_Iter __i, iter_difference_t<_Iter> __n) const ; }; inline constexpr _Counted counted{}; } template<view _Vp> requires (!common_range<_Vp>) && copyable<iterator_t<_Vp>> class common_view : public view_interface<common_view<_Vp>> { private: _Vp _M_base = _Vp(); public: common_view() requires default_initializable<_Vp> = default; constexpr explicit common_view(_Vp __r) ; constexpr _Vp base() const& requires copy_constructible<_Vp> ; constexpr _Vp base() && ; constexpr auto begin() ; constexpr auto begin() const requires range<const _Vp> ; constexpr auto end() ; constexpr auto end() const requires range<const _Vp> ; constexpr auto size() requires sized_range<_Vp> ; constexpr auto size() const requires sized_range<const _Vp> ; }; template<typename _Range> common_view(_Range&&) -> common_view<views::all_t<_Range>>; template<typename _Tp> inline constexpr bool enable_borrowed_range<common_view<_Tp>> = enable_borrowed_range<_Tp>; namespace views { namespace __detail { template<typename _Range> concept __already_common = common_range<_Range> && requires { views::all(std::declval<_Range>()); }; template<typename _Range> concept __can_common_view = requires { common_view{std::declval<_Range>()}; }; } struct _Common : __adaptor::_RangeAdaptorClosure { template<viewable_range _Range> requires __detail::__already_common<_Range> || __detail::__can_common_view<_Range> constexpr auto operator() [[nodiscard]] (_Range&& __r) const ; static constexpr bool _S_has_simple_call_op = true; }; inline constexpr _Common common; } template<view _Vp> requires bidirectional_range<_Vp> class reverse_view : public view_interface<reverse_view<_Vp>> { private: static constexpr bool _S_needs_cached_begin = !common_range<_Vp> && !(random_access_range<_Vp> && sized_sentinel_for<sentinel_t<_Vp>, iterator_t<_Vp>>); _Vp _M_base = _Vp(); [[no_unique_address]] __detail::__maybe_present_t<_S_needs_cached_begin, __detail::_CachedPosition<_Vp>> _M_cached_begin; public: reverse_view() requires default_initializable<_Vp> = default; constexpr explicit reverse_view(_Vp __r) ; constexpr _Vp base() const& requires copy_constructible<_Vp> ; constexpr _Vp base() && ; constexpr reverse_iterator<iterator_t<_Vp>> begin() ; constexpr auto begin() requires common_range<_Vp> ; constexpr auto begin() const requires common_range<const _Vp> ; constexpr reverse_iterator<iterator_t<_Vp>> end() ; constexpr auto end() const requires common_range<const _Vp> ; constexpr auto size() requires sized_range<_Vp> ; constexpr auto size() const requires sized_range<const _Vp> ; }; template<typename _Range> reverse_view(_Range&&) -> reverse_view<views::all_t<_Range>>; template<typename _Tp> inline constexpr bool enable_borrowed_range<reverse_view<_Tp>> = enable_borrowed_range<_Tp>; namespace views { namespace __detail { template<typename> inline constexpr bool __is_reversible_subrange = false; template<typename _Iter, subrange_kind _Kind> inline constexpr bool __is_reversible_subrange<subrange<reverse_iterator<_Iter>, reverse_iterator<_Iter>, _Kind>> = true; template<typename> inline constexpr bool __is_reverse_view = false; template<typename _Vp> inline constexpr bool __is_reverse_view<reverse_view<_Vp>> = true; template<typename _Range> concept __can_reverse_view = requires { reverse_view{std::declval<_Range>()}; }; } struct _Reverse : __adaptor::_RangeAdaptorClosure { template<viewable_range _Range> requires __detail::__is_reverse_view<remove_cvref_t<_Range>> || __detail::__is_reversible_subrange<remove_cvref_t<_Range>> || __detail::__can_reverse_view<_Range> constexpr auto operator() [[nodiscard]] (_Range&& __r) const ; static constexpr bool _S_has_simple_call_op = true; }; inline constexpr _Reverse reverse; } namespace __detail { template<typename _Tp, size_t _Nm> concept __has_tuple_element = requires(_Tp __t) { typename tuple_size<_Tp>::type; requires _Nm < tuple_size_v<_Tp>; typename tuple_element_t<_Nm, _Tp>; { std::get<_Nm>(__t) } -> convertible_to<const tuple_element_t<_Nm, _Tp>&>; }; template<typename _Tp, size_t _Nm> concept __returnable_element = is_reference_v<_Tp> || move_constructible<tuple_element_t<_Nm, _Tp>>; } template<input_range _Vp, size_t _Nm> requires view<_Vp> && __detail::__has_tuple_element<range_value_t<_Vp>, _Nm> && __detail::__has_tuple_element<remove_reference_t<range_reference_t<_Vp>>, _Nm> && __detail::__returnable_element<range_reference_t<_Vp>, _Nm> class elements_view : public view_interface<elements_view<_Vp, _Nm>> { public: elements_view() requires default_initializable<_Vp> = default; constexpr explicit elements_view(_Vp __base) ; constexpr _Vp base() const& requires copy_constructible<_Vp> ; constexpr _Vp base() && ; constexpr auto begin() requires (!__detail::__simple_view<_Vp>) ; constexpr auto begin() const requires range<const _Vp> ; constexpr auto end() requires (!__detail::__simple_view<_Vp> && !common_range<_Vp>) ; constexpr auto end() requires (!__detail::__simple_view<_Vp> && common_range<_Vp>) ; constexpr auto end() const requires range<const _Vp> ; constexpr auto end() const requires common_range<const _Vp> ; constexpr auto size() requires sized_range<_Vp> ; constexpr auto size() const requires sized_range<const _Vp> ; private: template<bool _Const> using _Base = __detail::__maybe_const_t<_Const, _Vp>; template<bool _Const> struct __iter_cat { }; template<bool _Const> requires forward_range<_Base<_Const>> struct __iter_cat<_Const> { private: static auto _S_iter_cat() ; public: using iterator_category = decltype(_S_iter_cat()); }; template<bool _Const> struct _Sentinel; template<bool _Const> struct _Iterator : __iter_cat<_Const> { private: using _Base = elements_view::_Base<_Const>; iterator_t<_Base> _M_current = iterator_t<_Base>(); static constexpr decltype(auto) _S_get_element(const iterator_t<_Base>& __i) ; static auto _S_iter_concept() ; friend _Iterator<!_Const>; public: using iterator_concept = decltype(_S_iter_concept()); using value_type = remove_cvref_t<tuple_element_t<_Nm, range_value_t<_Base>>>; using difference_type = range_difference_t<_Base>; _Iterator() requires default_initializable<iterator_t<_Base>> = default; constexpr explicit _Iterator(iterator_t<_Base> __current) ; constexpr _Iterator(_Iterator<!_Const> __i) ; constexpr const iterator_t<_Base>& base() const& noexcept ; constexpr iterator_t<_Base> base() && ; constexpr decltype(auto) operator*() const ; constexpr _Iterator& operator++() ; constexpr void operator++(int) ; constexpr _Iterator operator++(int) requires forward_range<_Base> ; constexpr _Iterator& operator--() requires bidirectional_range<_Base> ; constexpr _Iterator operator--(int) requires bidirectional_range<_Base> ; constexpr _Iterator& operator+=(difference_type __n) requires random_access_range<_Base> ; constexpr _Iterator& operator-=(difference_type __n) requires random_access_range<_Base> ; constexpr decltype(auto) operator[](difference_type __n) const requires random_access_range<_Base> { return _S_get_element(_M_current + __n); } friend constexpr bool operator==(const _Iterator& __x, const _Iterator& __y) requires equality_comparable<iterator_t<_Base>> { return __x._M_current == __y._M_current; } friend constexpr bool operator<(const _Iterator& __x, const _Iterator& __y) requires random_access_range<_Base> { return __x._M_current < __y._M_current; } friend constexpr bool operator>(const _Iterator& __x, const _Iterator& __y) requires random_access_range<_Base> { return __y._M_current < __x._M_current; } friend constexpr bool operator<=(const _Iterator& __x, const _Iterator& __y) requires random_access_range<_Base> { return !(__y._M_current > __x._M_current); } friend constexpr bool operator>=(const _Iterator& __x, const _Iterator& __y) requires random_access_range<_Base> { return !(__x._M_current > __y._M_current); } friend constexpr auto operator<=>(const _Iterator& __x, const _Iterator& __y) requires random_access_range<_Base> && three_way_comparable<iterator_t<_Base>> { return __x._M_current <=> __y._M_current; } friend constexpr _Iterator operator+(const _Iterator& __x, difference_type __y) requires random_access_range<_Base> { return _Iterator{__x} += __y; } friend constexpr _Iterator operator+(difference_type __x, const _Iterator& __y) requires random_access_range<_Base> { return __y + __x; } friend constexpr _Iterator operator-(const _Iterator& __x, difference_type __y) requires random_access_range<_Base> { return _Iterator{__x} -= __y; } friend constexpr difference_type operator-(const _Iterator& __x, const _Iterator& __y) requires sized_sentinel_for<iterator_t<_Base>, iterator_t<_Base>> { return __x._M_current - __y._M_current; } template <bool> friend struct _Sentinel; }; template<bool _Const> struct _Sentinel { private: template<bool _Const2> constexpr bool _M_equal(const _Iterator<_Const2>& __x) const { return __x._M_current == _M_end; } template<bool _Const2> constexpr auto _M_distance_from(const _Iterator<_Const2>& __i) const ; using _Base = elements_view::_Base<_Const>; sentinel_t<_Base> _M_end = sentinel_t<_Base>(); public: _Sentinel() = default; constexpr explicit _Sentinel(sentinel_t<_Base> __end) ; constexpr _Sentinel(_Sentinel<!_Const> __other) ; constexpr sentinel_t<_Base> base() const ; template<bool _Const2> requires sentinel_for<sentinel_t<_Base>, iterator_t<__detail::__maybe_const_t<_Const2, _Vp>>> friend constexpr bool operator==(const _Iterator<_Const2>& __x, const _Sentinel& __y) { return __y._M_equal(__x); } template<bool _Const2, typename _Base2 = __detail::__maybe_const_t<_Const2, _Vp>> requires sized_sentinel_for<sentinel_t<_Base>, iterator_t<_Base2>> friend constexpr range_difference_t<_Base2> operator-(const _Iterator<_Const2>& __x, const _Sentinel& __y) { return -__y._M_distance_from(__x); } template<bool _Const2, typename _Base2 = __detail::__maybe_const_t<_Const2, _Vp>> requires sized_sentinel_for<sentinel_t<_Base>, iterator_t<_Base2>> friend constexpr range_difference_t<_Base2> operator-(const _Sentinel& __x, const _Iterator<_Const2>& __y) { return __x._M_distance_from(__y); } friend _Sentinel<!_Const>; }; _Vp _M_base = _Vp(); }; template<typename _Tp, size_t _Nm> inline constexpr bool enable_borrowed_range<elements_view<_Tp, _Nm>> = enable_borrowed_range<_Tp>; template<typename _Range> using keys_view = elements_view<views::all_t<_Range>, 0>; template<typename _Range> using values_view = elements_view<views::all_t<_Range>, 1>; namespace views { namespace __detail { template<size_t _Nm, typename _Range> concept __can_elements_view = requires { elements_view<all_t<_Range>, _Nm>{std::declval<_Range>()}; }; } template<size_t _Nm> struct _Elements : __adaptor::_RangeAdaptorClosure { template<viewable_range _Range> requires __detail::__can_elements_view<_Nm, _Range> constexpr auto operator() [[nodiscard]] (_Range&& __r) const { return elements_view<all_t<_Range>, _Nm>{std::forward<_Range>(__r)}; } static constexpr bool _S_has_simple_call_op = true; }; template<size_t _Nm> inline constexpr _Elements<_Nm> elements; inline constexpr auto keys = elements<0>; inline constexpr auto values = elements<1>; } } namespace views = ranges::views; } namespace dwarfs { template <std::ranges::input_range Range, typename PrepareFunc, typename ExecuteFunc> void queued_for_each(Range range, PrepareFunc prep, ExecuteFunc exec) { using prep_result_t = std::invoke_result_t<PrepareFunc, decltype(*std::begin(range))>; using intermediate_t = typename prep_result_t::value_type; static_assert(std::is_same_v<prep_result_t, std::optional<intermediate_t>>); std::deque<intermediate_t> queue; auto begin = std::begin(range); auto end = std::end(range); for (;;) { while (begin != end) { if (auto intermediate = prep(*begin)) { queue.push_back(std::move(*intermediate)); ++begin; } else { break; } } if (queue.empty()) { if (begin != end) { throw std::runtime_error("queued_for_each: no progress"); } break; } exec(std::move(queue.front())); queue.pop_front(); } } } namespace dwarfs { class block_data { public: block_data() = default; explicit block_data(std::vector<uint8_t>&& vec) ; explicit block_data(std::string_view str) ; std::vector<uint8_t> const& vec() const ; std::vector<uint8_t>& vec() ; void reserve(size_t size) ; uint8_t const* data() const ; uint8_t* data() ; size_t size() const ; bool empty() const ; private: std::vector<uint8_t> vec_; }; } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Mutex> class unique_lock { public: typedef _Mutex mutex_type; unique_lock() ; explicit unique_lock(mutex_type& __m) ; unique_lock(mutex_type& __m, defer_lock_t) ; unique_lock(mutex_type& __m, try_to_lock_t) ; unique_lock(mutex_type& __m, adopt_lock_t) ; template<typename _Clock, typename _Duration> unique_lock(mutex_type& __m, const chrono::time_point<_Clock, _Duration>& __atime) ; template<typename _Rep, typename _Period> unique_lock(mutex_type& __m, const chrono::duration<_Rep, _Period>& __rtime) ; ~unique_lock() ; unique_lock(const unique_lock&) = delete; unique_lock& operator=(const unique_lock&) = delete; unique_lock(unique_lock&& __u) ; unique_lock& operator=(unique_lock&& __u) noexcept ; void lock() ; [[__nodiscard__]] bool try_lock() ; template<typename _Clock, typename _Duration> [[__nodiscard__]] bool try_lock_until(const chrono::time_point<_Clock, _Duration>& __atime) ; template<typename _Rep, typename _Period> [[__nodiscard__]] bool try_lock_for(const chrono::duration<_Rep, _Period>& __rtime) ; void unlock() ; void swap(unique_lock& __u) noexcept ; mutex_type* release() noexcept ; [[__nodiscard__]] bool owns_lock() const noexcept ; explicit operator bool() const noexcept ; [[__nodiscard__]] mutex_type* mutex() const noexcept ; private: mutex_type* _M_device; bool _M_owns; }; template<typename _Mutex> void swap(unique_lock<_Mutex>& __x, unique_lock<_Mutex>& __y) noexcept ; } namespace std __attribute__ ((__visibility__ ("default"))) { class __recursive_mutex_base { protected: typedef __gthread_recursive_mutex_t __native_type; __recursive_mutex_base(const __recursive_mutex_base&) = delete; __recursive_mutex_base& operator=(const __recursive_mutex_base&) = delete; __native_type _M_mutex = { { 0, 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, 0, 0, { 0, 0 } } }; __recursive_mutex_base() = default; }; class recursive_mutex : private __recursive_mutex_base { public: typedef __native_type* native_handle_type; recursive_mutex() = default; ~recursive_mutex() = default; recursive_mutex(const recursive_mutex&) = delete; recursive_mutex& operator=(const recursive_mutex&) = delete; void lock() ; [[__nodiscard__]] bool try_lock() noexcept ; void unlock() ; native_handle_type native_handle() noexcept ; }; template<typename _Derived> class __timed_mutex_impl { protected: template<typename _Rep, typename _Period> bool _M_try_lock_for(const chrono::duration<_Rep, _Period>& __rtime) ; template<typename _Duration> bool _M_try_lock_until(const chrono::time_point<chrono::system_clock, _Duration>& __atime) ; template<typename _Duration> bool _M_try_lock_until(const chrono::time_point<chrono::steady_clock, _Duration>& __atime) ; template<typename _Clock, typename _Duration> bool _M_try_lock_until(const chrono::time_point<_Clock, _Duration>& __atime) ; }; class timed_mutex : private __mutex_base, public __timed_mutex_impl<timed_mutex> { public: typedef __native_type* native_handle_type; timed_mutex() = default; ~timed_mutex() = default; timed_mutex(const timed_mutex&) = delete; timed_mutex& operator=(const timed_mutex&) = delete; void lock() ; [[__nodiscard__]] bool try_lock() noexcept ; template <class _Rep, class _Period> [[__nodiscard__]] bool try_lock_for(const chrono::duration<_Rep, _Period>& __rtime) ; template <class _Clock, class _Duration> [[__nodiscard__]] bool try_lock_until(const chrono::time_point<_Clock, _Duration>& __atime) ; void unlock() ; native_handle_type native_handle() noexcept ; private: friend class __timed_mutex_impl<timed_mutex>; bool _M_timedlock(const __gthread_time_t& __ts) ; bool _M_clocklock(clockid_t __clockid, const __gthread_time_t& __ts) ; }; class recursive_timed_mutex : private __recursive_mutex_base, public __timed_mutex_impl<recursive_timed_mutex> { public: typedef __native_type* native_handle_type; recursive_timed_mutex() = default; ~recursive_timed_mutex() = default; recursive_timed_mutex(const recursive_timed_mutex&) = delete; recursive_timed_mutex& operator=(const recursive_timed_mutex&) = delete; void lock() ; [[__nodiscard__]] bool try_lock() noexcept ; template <class _Rep, class _Period> [[__nodiscard__]] bool try_lock_for(const chrono::duration<_Rep, _Period>& __rtime) ; template <class _Clock, class _Duration> [[__nodiscard__]] bool try_lock_until(const chrono::time_point<_Clock, _Duration>& __atime) ; void unlock() ; native_handle_type native_handle() noexcept ; private: friend class __timed_mutex_impl<recursive_timed_mutex>; bool _M_timedlock(const __gthread_time_t& __ts) ; bool _M_clocklock(clockid_t __clockid, const __gthread_time_t& __ts) ; }; namespace __detail { template<typename _Lockable> int __try_lock_impl(_Lockable& __l) ; template<typename _L0, typename... _Lockables> int __try_lock_impl(_L0& __l0, _Lockables&... __lockables) ; } template<typename _L1, typename _L2, typename... _L3> [[__nodiscard__]] int try_lock(_L1& __l1, _L2& __l2, _L3&... __l3) ; namespace __detail { template<typename _L0, typename... _L1> void __lock_impl(int& __i, int __depth, _L0& __l0, _L1&... __l1) ; } template<typename _L1, typename _L2, typename... _L3> void lock(_L1& __l1, _L2& __l2, _L3&... __l3) ; template<typename... _MutexTypes> class scoped_lock { public: explicit scoped_lock(_MutexTypes&... __m) ; explicit scoped_lock(adopt_lock_t, _MutexTypes&... __m) ; ~scoped_lock() ; scoped_lock(const scoped_lock&) = delete; scoped_lock& operator=(const scoped_lock&) = delete; private: tuple<_MutexTypes&...> _M_devices; }; template<> class scoped_lock<> { public: explicit scoped_lock() = default; explicit scoped_lock(adopt_lock_t) noexcept ; ~scoped_lock() = default; scoped_lock(const scoped_lock&) = delete; scoped_lock& operator=(const scoped_lock&) = delete; }; template<typename _Mutex> class scoped_lock<_Mutex> { public: using mutex_type = _Mutex; explicit scoped_lock(mutex_type& __m) ; explicit scoped_lock(adopt_lock_t, mutex_type& __m) ; ~scoped_lock() ; scoped_lock(const scoped_lock&) = delete; scoped_lock& operator=(const scoped_lock&) = delete; private: mutex_type& _M_device; }; struct once_flag { constexpr once_flag() noexcept = default; once_flag(const once_flag&) = delete; once_flag& operator=(const once_flag&) = delete; private: __gthread_once_t _M_once = 0; struct _Prepare_execution; template<typename _Callable, typename... _Args> friend void call_once(once_flag& __once, _Callable&& __f, _Args&&... __args); }; extern __thread void* __once_callable; extern __thread void (*__once_call)(); struct once_flag::_Prepare_execution { template<typename _Callable> explicit _Prepare_execution(_Callable& __c) ; ~_Prepare_execution() ; _Prepare_execution(const _Prepare_execution&) = delete; _Prepare_execution& operator=(const _Prepare_execution&) = delete; }; extern "C" void __once_proxy(void); template<typename _Callable, typename... _Args> void call_once(once_flag& __once, _Callable&& __f, _Args&&... __args) ; } namespace dwarfs { class fragment_category { public: using value_type = uint32_t; static constexpr value_type const uninitialized{ std::numeric_limits<value_type>::max()}; static constexpr value_type const min{0}; static constexpr value_type const max{std::numeric_limits<value_type>::max() - 1}; fragment_category() = default; explicit fragment_category(value_type v) ; fragment_category(value_type v, value_type subcategory) ; fragment_category(fragment_category const&) = default; fragment_category(fragment_category&&) = default; fragment_category& operator=(fragment_category const&) = default; fragment_category& operator=(fragment_category&&) = default; fragment_category& operator=(value_type v) ; value_type value() const ; void clear() ; bool empty() const ; explicit operator bool() const ; void set_subcategory(value_type subcategory) ; bool has_subcategory() const ; value_type subcategory() const ; auto operator<=>(fragment_category const&) const = default; size_t hash() const ; private: value_type value_{uninitialized}; value_type subcategory_{uninitialized}; }; std::ostream& operator<<(std::ostream& os, fragment_category const& cat) ; } template <> struct fmt::formatter<dwarfs::fragment_category> : formatter<std::string> { template <typename FormatContext> auto format(dwarfs::fragment_category const& cat, FormatContext& ctx) ; }; namespace std { template <> struct hash<dwarfs::fragment_category> { std::size_t operator()(dwarfs::fragment_category const& k) const ; }; } namespace std __attribute__ ((__visibility__ ("default"))) { class bad_any_cast : public bad_cast { public: virtual const char* what() const noexcept ; }; [[gnu::noreturn]] void __throw_bad_any_cast() ; class any { union _Storage { constexpr _Storage() ; _Storage(const _Storage&) = delete; _Storage& operator=(const _Storage&) = delete; void* _M_ptr; aligned_storage<sizeof(_M_ptr), alignof(void*)>::type _M_buffer; }; template<typename _Tp, typename _Safe = is_nothrow_move_constructible<_Tp>, bool _Fits = (sizeof(_Tp) <= sizeof(_Storage)) && (alignof(_Tp) <= alignof(_Storage))> using _Internal = std::integral_constant<bool, _Safe::value && _Fits>; template<typename _Tp> struct _Manager_internal; template<typename _Tp> struct _Manager_external; template<typename _Tp> using _Manager = __conditional_t<_Internal<_Tp>::value, _Manager_internal<_Tp>, _Manager_external<_Tp>>; template<typename _Tp, typename _VTp = decay_t<_Tp>> using _Decay_if_not_any = enable_if_t<!is_same_v<_VTp, any>, _VTp>; template <typename _Tp, typename... _Args, typename _Mgr = _Manager<_Tp>> void __do_emplace(_Args&&... __args) ; template <typename _Tp, typename _Up, typename... _Args, typename _Mgr = _Manager<_Tp>> void __do_emplace(initializer_list<_Up> __il, _Args&&... __args) ; template <typename _Res, typename _Tp, typename... _Args> using __any_constructible = enable_if<__and_<is_copy_constructible<_Tp>, is_constructible<_Tp, _Args...>>::value, _Res>; template <typename _Tp, typename... _Args> using __any_constructible_t = typename __any_constructible<bool, _Tp, _Args...>::type; template<typename _VTp, typename... _Args> using __emplace_t = typename __any_constructible<_VTp&, _VTp, _Args...>::type; public: constexpr any() ; any(const any& __other) ; any(any&& __other) noexcept ; template <typename _Tp, typename _VTp = _Decay_if_not_any<_Tp>, typename _Mgr = _Manager<_VTp>, enable_if_t<is_copy_constructible_v<_VTp> && !__is_in_place_type_v<_VTp>, bool> = true> any(_Tp&& __value) ; template <typename _Tp, typename... _Args, typename _VTp = decay_t<_Tp>, typename _Mgr = _Manager<_VTp>, __any_constructible_t<_VTp, _Args&&...> = false> explicit any(in_place_type_t<_Tp>, _Args&&... __args) ; template <typename _Tp, typename _Up, typename... _Args, typename _VTp = decay_t<_Tp>, typename _Mgr = _Manager<_VTp>, __any_constructible_t<_VTp, initializer_list<_Up>&, _Args&&...> = false> explicit any(in_place_type_t<_Tp>, initializer_list<_Up> __il, _Args&&... __args) ; ~any() ; any& operator=(const any& __rhs) ; any& operator=(any&& __rhs) noexcept ; template<typename _Tp> enable_if_t<is_copy_constructible<_Decay_if_not_any<_Tp>>::value, any&> operator=(_Tp&& __rhs) ; template <typename _Tp, typename... _Args> __emplace_t<decay_t<_Tp>, _Args...> emplace(_Args&&... __args) ; template <typename _Tp, typename _Up, typename... _Args> __emplace_t<decay_t<_Tp>, initializer_list<_Up>&, _Args&&...> emplace(initializer_list<_Up> __il, _Args&&... __args) ; void reset() noexcept ; void swap(any& __rhs) noexcept ; bool has_value() const noexcept ; const type_info& type() const noexcept ; template<typename _Tp> static constexpr bool __is_valid_cast() ; private: enum _Op { _Op_access, _Op_get_type_info, _Op_clone, _Op_destroy, _Op_xfer }; union _Arg { void* _M_obj; const std::type_info* _M_typeinfo; any* _M_any; }; void (*_M_manager)(_Op, const any*, _Arg*); _Storage _M_storage; template<typename _Tp> friend void* __any_caster(const any* __any); template<typename _Tp> struct _Manager_internal { static void _S_manage(_Op __which, const any* __anyp, _Arg* __arg); template<typename _Up> static void _S_create(_Storage& __storage, _Up&& __value) ; template<typename... _Args> static void _S_create(_Storage& __storage, _Args&&... __args) ; static _Tp* _S_access(const _Storage& __storage) ; }; template<typename _Tp> struct _Manager_external { static void _S_manage(_Op __which, const any* __anyp, _Arg* __arg); template<typename _Up> static void _S_create(_Storage& __storage, _Up&& __value) ; template<typename... _Args> static void _S_create(_Storage& __storage, _Args&&... __args) ; static _Tp* _S_access(const _Storage& __storage) ; }; }; void swap(any& __x, any& __y) noexcept ; template <typename _Tp, typename... _Args> enable_if_t<is_constructible_v<any, in_place_type_t<_Tp>, _Args...>, any> make_any(_Args&&... __args) ; template <typename _Tp, typename _Up, typename... _Args> enable_if_t<is_constructible_v<any, in_place_type_t<_Tp>, initializer_list<_Up>&, _Args...>, any> make_any(initializer_list<_Up> __il, _Args&&... __args) ; template<typename _ValueType> _ValueType any_cast(const any& __any) ; template<typename _ValueType> _ValueType any_cast(any& __any) ; template<typename _ValueType> _ValueType any_cast(any&& __any) ; template<typename _Tp> void* __any_caster(const any* __any) ; template<typename _ValueType> const _ValueType* any_cast(const any* __any) noexcept ; template<typename _ValueType> _ValueType* any_cast(any* __any) noexcept ; namespace __detail::__variant { template<typename> struct _Never_valueless_alt; template<> struct _Never_valueless_alt<std::any> : std::true_type { }; } } namespace std __attribute__ ((__visibility__ ("default"))) { class shared_mutex; class shared_timed_mutex; ; static int __glibcxx_rwlock_rdlock (pthread_rwlock_t *__rwlock) ; ; static int __glibcxx_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) ; ; static int __glibcxx_rwlock_wrlock (pthread_rwlock_t *__rwlock) ; ; static int __glibcxx_rwlock_trywrlock (pthread_rwlock_t *__rwlock) ; ; static int __glibcxx_rwlock_unlock (pthread_rwlock_t *__rwlock) ; ; static int __glibcxx_rwlock_timedrdlock (pthread_rwlock_t *__rwlock, const timespec *__ts) ; ; static int __glibcxx_rwlock_timedwrlock (pthread_rwlock_t *__rwlock, const timespec *__ts) ; class __shared_mutex_pthread { friend class shared_timed_mutex; pthread_rwlock_t _M_rwlock = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, { 0, 0, 0, 0, 0, 0, 0 }, 0, PTHREAD_RWLOCK_DEFAULT_NP } }; public: __shared_mutex_pthread() = default; ~__shared_mutex_pthread() = default; __shared_mutex_pthread(const __shared_mutex_pthread&) = delete; __shared_mutex_pthread& operator=(const __shared_mutex_pthread&) = delete; void lock() ; bool try_lock() ; void unlock() ; void lock_shared() ; bool try_lock_shared() ; void unlock_shared() ; void* native_handle() ; }; class shared_mutex { public: shared_mutex() = default; ~shared_mutex() = default; shared_mutex(const shared_mutex&) = delete; shared_mutex& operator=(const shared_mutex&) = delete; void lock() ; [[nodiscard]] bool try_lock() ; void unlock() ; void lock_shared() ; [[nodiscard]] bool try_lock_shared() ; void unlock_shared() ; typedef void* native_handle_type; native_handle_type native_handle() ; private: __shared_mutex_pthread _M_impl; }; using __shared_timed_mutex_base = __shared_mutex_pthread; class shared_timed_mutex : private __shared_timed_mutex_base { using _Base = __shared_timed_mutex_base; using __clock_t = chrono::steady_clock; public: shared_timed_mutex() = default; ~shared_timed_mutex() = default; shared_timed_mutex(const shared_timed_mutex&) = delete; shared_timed_mutex& operator=(const shared_timed_mutex&) = delete; void lock() ; [[__nodiscard__]] bool try_lock() ; void unlock() ; template<typename _Rep, typename _Period> [[__nodiscard__]] bool try_lock_for(const chrono::duration<_Rep, _Period>& __rtime) ; void lock_shared() ; [[__nodiscard__]] bool try_lock_shared() ; void unlock_shared() ; template<typename _Rep, typename _Period> [[__nodiscard__]] bool try_lock_shared_for(const chrono::duration<_Rep, _Period>& __rtime) ; template<typename _Duration> [[__nodiscard__]] bool try_lock_until(const chrono::time_point<chrono::system_clock, _Duration>& __atime) ; template<typename _Duration> [[__nodiscard__]] bool try_lock_until(const chrono::time_point<chrono::steady_clock, _Duration>& __atime) ; template<typename _Clock, typename _Duration> [[__nodiscard__]] bool try_lock_until(const chrono::time_point<_Clock, _Duration>& __atime) ; template<typename _Duration> [[__nodiscard__]] bool try_lock_shared_until(const chrono::time_point<chrono::system_clock, _Duration>& __atime) ; template<typename _Duration> [[__nodiscard__]] bool try_lock_shared_until(const chrono::time_point<chrono::steady_clock, _Duration>& __atime) ; template<typename _Clock, typename _Duration> [[__nodiscard__]] bool try_lock_shared_until(const chrono::time_point<_Clock, _Duration>& __atime) ; }; template<typename _Mutex> class shared_lock { public: typedef _Mutex mutex_type; shared_lock() ; explicit shared_lock(mutex_type& __m) ; shared_lock(mutex_type& __m, defer_lock_t) ; shared_lock(mutex_type& __m, try_to_lock_t) ; shared_lock(mutex_type& __m, adopt_lock_t) ; template<typename _Clock, typename _Duration> shared_lock(mutex_type& __m, const chrono::time_point<_Clock, _Duration>& __abs_time) ; template<typename _Rep, typename _Period> shared_lock(mutex_type& __m, const chrono::duration<_Rep, _Period>& __rel_time) ; ~shared_lock() ; shared_lock(shared_lock const&) = delete; shared_lock& operator=(shared_lock const&) = delete; shared_lock(shared_lock&& __sl) ; shared_lock& operator=(shared_lock&& __sl) noexcept ; void lock() ; [[__nodiscard__]] bool try_lock() ; template<typename _Rep, typename _Period> [[__nodiscard__]] bool try_lock_for(const chrono::duration<_Rep, _Period>& __rel_time) ; template<typename _Clock, typename _Duration> [[__nodiscard__]] bool try_lock_until(const chrono::time_point<_Clock, _Duration>& __abs_time) ; void unlock() ; void swap(shared_lock& __u) noexcept ; mutex_type* release() noexcept ; [[__nodiscard__]] bool owns_lock() const noexcept ; explicit operator bool() const noexcept ; [[__nodiscard__]] mutex_type* mutex() const noexcept ; private: void _M_lockable() const ; mutex_type* _M_pm; bool _M_owns; }; template<typename _Mutex> void swap(shared_lock<_Mutex>& __x, shared_lock<_Mutex>& __y) noexcept ; } namespace folly { struct factory_constructor_t { explicit factory_constructor_t() = default; }; constexpr factory_constructor_t factory_constructor{}; template <typename T> class Indestructible final { public: template <typename S = T, typename = decltype(S())> constexpr Indestructible() noexcept(noexcept(T())) ; template < typename U = T, std::enable_if_t<std::is_constructible<T, U&&>::value>* = nullptr, std::enable_if_t< !std::is_same<Indestructible<T>, remove_cvref_t<U>>::value>* = nullptr, std::enable_if_t<!std::is_convertible<U&&, T>::value>* = nullptr> explicit constexpr Indestructible(U&& u) noexcept( noexcept(T(std::declval<U>()))) ; template < typename U = T, std::enable_if_t<std::is_constructible<T, U&&>::value>* = nullptr, std::enable_if_t< !std::is_same<Indestructible<T>, remove_cvref_t<U>>::value>* = nullptr, std::enable_if_t<std::is_convertible<U&&, T>::value>* = nullptr> constexpr Indestructible(U&& u) noexcept( noexcept(T(std::declval<U>()))) ; template <typename... Args, typename = decltype(T(std::declval<Args>()...))> explicit constexpr Indestructible(Args&&... args) noexcept( noexcept(T(std::declval<Args>()...))) ; template < typename U, typename... Args, typename = decltype(T( std::declval<std::initializer_list<U>&>(), std::declval<Args>()...))> explicit constexpr Indestructible(std::initializer_list<U> il, Args... args) noexcept( noexcept(T( std::declval<std::initializer_list<U>&>(), std::declval<Args>()...))) ; template <typename Factory> constexpr Indestructible(factory_constructor_t, Factory&& factory) noexcept( noexcept(factory())) ; Indestructible(Indestructible const&) = delete; Indestructible& operator=(Indestructible const&) = delete; T* get() noexcept ; T const* get() const noexcept ; T& operator*() noexcept ; T const& operator*() const noexcept ; T* operator->() noexcept ; T const* operator->() const noexcept ; operator T&() noexcept ; operator T const&() const noexcept ; private: struct Storage { aligned_storage_for_t<T> bytes; template <typename... Args, typename = decltype(T(std::declval<Args>()...))> explicit constexpr Storage(std::in_place_t, Args&&... args) noexcept( noexcept(T(std::declval<Args>()...))) ; template <typename Factory> constexpr Storage(factory_constructor_t, Factory factory) noexcept( noexcept(factory())) ; }; Storage storage_{}; }; } namespace folly { namespace detail { void* memrchr_fallback(void* s, int c, std::size_t len) noexcept; void const* memrchr_fallback(void const* s, int c, std::size_t len) noexcept; } void* memrchr(void* s, int c, std::size_t len) noexcept; void const* memrchr(void const* s, int c, std::size_t len) noexcept; std::size_t strlcpy(char* dest, char const* src, std::size_t size); } namespace folly { class CpuId { public: __attribute__((__always_inline__)) CpuId() ; __attribute__((__always_inline__)) bool sse3() const ; __attribute__((__always_inline__)) bool pclmuldq() const ; __attribute__((__always_inline__)) bool dtes64() const ; __attribute__((__always_inline__)) bool monitor() const ; __attribute__((__always_inline__)) bool dscpl() const ; __attribute__((__always_inline__)) bool vmx() const ; __attribute__((__always_inline__)) bool smx() const ; __attribute__((__always_inline__)) bool eist() const ; __attribute__((__always_inline__)) bool tm2() const ; __attribute__((__always_inline__)) bool ssse3() const ; __attribute__((__always_inline__)) bool cnxtid() const ; __attribute__((__always_inline__)) bool fma() const ; __attribute__((__always_inline__)) bool cx16() const ; __attribute__((__always_inline__)) bool xtpr() const ; __attribute__((__always_inline__)) bool pdcm() const ; __attribute__((__always_inline__)) bool pcid() const ; __attribute__((__always_inline__)) bool dca() const ; __attribute__((__always_inline__)) bool sse41() const ; __attribute__((__always_inline__)) bool sse42() const ; __attribute__((__always_inline__)) bool x2apic() const ; __attribute__((__always_inline__)) bool movbe() const ; __attribute__((__always_inline__)) bool popcnt() const ; __attribute__((__always_inline__)) bool tscdeadline() const ; __attribute__((__always_inline__)) bool aes() const ; __attribute__((__always_inline__)) bool xsave() const ; __attribute__((__always_inline__)) bool osxsave() const ; __attribute__((__always_inline__)) bool avx() const ; __attribute__((__always_inline__)) bool f16c() const ; __attribute__((__always_inline__)) bool rdrand() const ; __attribute__((__always_inline__)) bool fpu() const ; __attribute__((__always_inline__)) bool vme() const ; __attribute__((__always_inline__)) bool de() const ; __attribute__((__always_inline__)) bool pse() const ; __attribute__((__always_inline__)) bool tsc() const ; __attribute__((__always_inline__)) bool msr() const ; __attribute__((__always_inline__)) bool pae() const ; __attribute__((__always_inline__)) bool mce() const ; __attribute__((__always_inline__)) bool cx8() const ; __attribute__((__always_inline__)) bool apic() const ; __attribute__((__always_inline__)) bool sep() const ; __attribute__((__always_inline__)) bool mtrr() const ; __attribute__((__always_inline__)) bool pge() const ; __attribute__((__always_inline__)) bool mca() const ; __attribute__((__always_inline__)) bool cmov() const ; __attribute__((__always_inline__)) bool pat() const ; __attribute__((__always_inline__)) bool pse36() const ; __attribute__((__always_inline__)) bool psn() const ; __attribute__((__always_inline__)) bool clfsh() const ; __attribute__((__always_inline__)) bool ds() const ; __attribute__((__always_inline__)) bool acpi() const ; __attribute__((__always_inline__)) bool mmx() const ; __attribute__((__always_inline__)) bool fxsr() const ; __attribute__((__always_inline__)) bool sse() const ; __attribute__((__always_inline__)) bool sse2() const ; __attribute__((__always_inline__)) bool ss() const ; __attribute__((__always_inline__)) bool htt() const ; __attribute__((__always_inline__)) bool tm() const ; __attribute__((__always_inline__)) bool pbe() const ; __attribute__((__always_inline__)) bool bmi1() const ; __attribute__((__always_inline__)) bool hle() const ; __attribute__((__always_inline__)) bool avx2() const ; __attribute__((__always_inline__)) bool smep() const ; __attribute__((__always_inline__)) bool bmi2() const ; __attribute__((__always_inline__)) bool erms() const ; __attribute__((__always_inline__)) bool invpcid() const ; __attribute__((__always_inline__)) bool rtm() const ; __attribute__((__always_inline__)) bool mpx() const ; __attribute__((__always_inline__)) bool avx512f() const ; __attribute__((__always_inline__)) bool avx512dq() const ; __attribute__((__always_inline__)) bool rdseed() const ; __attribute__((__always_inline__)) bool adx() const ; __attribute__((__always_inline__)) bool smap() const ; __attribute__((__always_inline__)) bool avx512ifma() const ; __attribute__((__always_inline__)) bool pcommit() const ; __attribute__((__always_inline__)) bool clflushopt() const ; __attribute__((__always_inline__)) bool clwb() const ; __attribute__((__always_inline__)) bool avx512pf() const ; __attribute__((__always_inline__)) bool avx512er() const ; __attribute__((__always_inline__)) bool avx512cd() const ; __attribute__((__always_inline__)) bool sha() const ; __attribute__((__always_inline__)) bool avx512bw() const ; __attribute__((__always_inline__)) bool avx512vl() const ; __attribute__((__always_inline__)) bool prefetchwt1() const ; __attribute__((__always_inline__)) bool avx512vbmi() const ; __attribute__((__always_inline__)) bool avx512vbmi2() const ; __attribute__((__always_inline__)) bool vaes() const ; __attribute__((__always_inline__)) bool vpclmulqdq() const ; __attribute__((__always_inline__)) bool avx512vnni() const ; __attribute__((__always_inline__)) bool avx512bitalg() const ; __attribute__((__always_inline__)) bool avx512vpopcntdq() const ; __attribute__((__always_inline__)) bool rdpid() const ; __attribute__((__always_inline__)) bool avx5124vnniw() const ; __attribute__((__always_inline__)) bool avx5124fmaps() const ; __attribute__((__always_inline__)) bool avx512vp2intersect() const ; __attribute__((__always_inline__)) bool amxbf16() const ; __attribute__((__always_inline__)) bool avx512fp16() const ; __attribute__((__always_inline__)) bool amxtile() const ; __attribute__((__always_inline__)) bool amxint8() const ; __attribute__((__always_inline__)) bool vendor_intel() const ; __attribute__((__always_inline__)) bool vendor_amd() const ; private: uint32_t vendor_[3] = {0}; uint32_t f1c_ = 0; uint32_t f1d_ = 0; uint32_t f7b_ = 0; uint32_t f7c_ = 0; uint32_t f7d_ = 0; }; } namespace folly { namespace detail { class StringPieceLite { public: StringPieceLite(const char* b, const char* e) ; template <typename Range> StringPieceLite(const Range& r) ; const char* data() const { return b_; } const char* begin() const { return b_; } const char* end() const { return e_; } size_t size() const ; bool empty() const ; const char& operator[](size_t i) const ; template <typename Range> explicit operator Range() const ; private: const char* b_; const char* e_; }; size_t qfind_first_byte_of_std( const StringPieceLite haystack, const StringPieceLite needles) ; size_t qfind_first_byte_of_bitset( const StringPieceLite haystack, const StringPieceLite needles); size_t qfind_first_byte_of_byteset( const StringPieceLite haystack, const StringPieceLite needles); size_t qfind_first_byte_of_nosse( const StringPieceLite haystack, const StringPieceLite needles) ; } } namespace folly { namespace detail { size_t qfind_first_byte_of_sse42( const StringPieceLite haystack, const StringPieceLite needles); } } #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wshadow" namespace folly { template <class T> struct IsSomeString : std::false_type {}; template <typename Alloc> struct IsSomeString<std::basic_string<char, std::char_traits<char>, Alloc>> : std::true_type {}; template <class Iter> class Range; template < class Iter, class Comp = std::equal_to<typename Range<Iter>::value_type>> inline size_t qfind( const Range<Iter>& haystack, const Range<Iter>& needle, Comp eq = Comp()); template <class Iter> size_t qfind( const Range<Iter>& haystack, const typename Range<Iter>::value_type& needle); template <class Iter> size_t rfind( const Range<Iter>& haystack, const typename Range<Iter>::value_type& needle); template <class Iter> inline size_t qfind_first_of( const Range<Iter>& haystack, const Range<Iter>& needle); namespace detail { template <class T> struct IsCharPointer {}; template <> struct IsCharPointer<char*> { using type = int; }; template <> struct IsCharPointer<const char*> { using const_type = int; using type = int; }; template <class T> struct IsUnsignedCharPointer {}; template <> struct IsUnsignedCharPointer<unsigned char*> { using type = int; }; template <> struct IsUnsignedCharPointer<const unsigned char*> { using const_type = int; using type = int; }; void range_is_char_type_f_(char const*); void range_is_char_type_f_(wchar_t const*); void range_is_char_type_f_(char8_t const*); void range_is_char_type_f_(char16_t const*); void range_is_char_type_f_(char32_t const*); template <typename Iter> using range_is_char_type_d_ = decltype(folly::detail::range_is_char_type_f_(static_cast<Iter (*)() noexcept>(nullptr)())); template <typename Iter> constexpr bool range_is_char_type_v_ = is_detected_v<range_is_char_type_d_, Iter>; void range_is_byte_type_f_(unsigned char const*); void range_is_byte_type_f_(signed char const*); void range_is_byte_type_f_(std::byte const*); template <typename Iter> using range_is_byte_type_d_ = decltype(folly::detail::range_is_byte_type_f_(static_cast<Iter (*)() noexcept>(nullptr)())); template <typename Iter> constexpr bool range_is_byte_type_v_ = is_detected_v<range_is_byte_type_d_, Iter>; struct range_traits_char_ { template <typename Value> using apply = std::char_traits<Value>; }; struct range_traits_byte_ { template <typename Value> struct apply { __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) static constexpr bool eq(Value a, Value b) ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) static constexpr int compare( Value const* a, Value const* b, std::size_t c) ; }; }; struct range_traits_fbck_ { template <typename Value> struct apply { __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) static constexpr bool eq(Value a, Value b) ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) static constexpr int compare( Value const* a, Value const* b, std::size_t c) ; }; }; template <typename Iter> using range_traits_c_ = conditional_t< range_is_char_type_v_<Iter>, range_traits_char_, conditional_t< range_is_byte_type_v_<Iter>, range_traits_byte_, range_traits_fbck_>>; template <typename Iter, typename Value> using range_traits_t_ = typename range_traits_c_<Iter>::template apply<Value>; } template <class Iter> class Range { private: template <typename Alloc> using string = std::basic_string<char, std::char_traits<char>, Alloc>; public: using size_type = std::size_t; using iterator = Iter; using const_iterator = Iter; using value_type = typename std::remove_reference< typename std::iterator_traits<Iter>::reference>::type; using difference_type = typename std::iterator_traits<Iter>::difference_type; using reference = typename std::iterator_traits<Iter>::reference; using const_range_type = typename std::conditional< std::is_same<Iter, char*>::value || std::is_same<Iter, unsigned char*>::value, Range<const value_type*>, Range<Iter>>::type; using traits_type = detail::range_traits_t_< Iter, typename std::remove_const<value_type>::type>; static const size_type npos; constexpr Range() ; constexpr Range(const Range&) = default; constexpr Range(Range&&) = default; public: constexpr Range(Iter start, Iter end) ; constexpr Range(Iter start, size_t size) ; Range(std::nullptr_t) = delete; constexpr Range(Iter str) : b_(str), e_(str + constexpr_strlen(str)) { static_assert( std::is_same<int, typename detail::IsCharPointer<Iter>::type>::value, "This constructor is only available for character ranges"); } template < class Alloc, class T = Iter, typename detail::IsCharPointer<T>::const_type = 0> Range(const string<Alloc>& str) : b_(str.data()), e_(b_ + str.size()) {} template < class Alloc, class T = Iter, typename detail::IsCharPointer<T>::const_type = 0> Range(const string<Alloc>& str, typename string<Alloc>::size_type startFrom) { if (__builtin_expect(static_cast<bool>((startFrom > str.size())), 0)) { throw_exception<std::out_of_range>("index out of range"); } b_ = str.data() + startFrom; e_ = str.data() + str.size(); } template < class Alloc, class T = Iter, typename detail::IsCharPointer<T>::const_type = 0> Range( const string<Alloc>& str, typename string<Alloc>::size_type startFrom, typename string<Alloc>::size_type size) ; Range(const Range& other, size_type first, size_type length = npos) ; template < class Container, class = typename std::enable_if< std::is_same<Iter, typename Container::const_pointer>::value>::type, class = decltype( Iter(std::declval<Container const&>().data()), Iter( std::declval<Container const&>().data() + std::declval<Container const&>().size()))> constexpr Range(Container const& container) ; template < class Container, class = typename std::enable_if< std::is_same<Iter, typename Container::const_pointer>::value>::type, class = decltype( Iter(std::declval<Container const&>().data()), Iter( std::declval<Container const&>().data() + std::declval<Container const&>().size()))> Range(Container const& container, typename Container::size_type startFrom) ; template < class Container, class = typename std::enable_if< std::is_same<Iter, typename Container::const_pointer>::value>::type, class = decltype( Iter(std::declval<Container const&>().data()), Iter( std::declval<Container const&>().data() + std::declval<Container const&>().size()))> Range( Container const& container, typename Container::size_type startFrom, typename Container::size_type size) ; template < class Container, class T = Iter, typename detail::IsUnsignedCharPointer<T>::const_type = 0, class = typename std::enable_if< std::is_same<typename Container::const_pointer, const char*>::value >::type, class = decltype( Iter(std::declval<Container const&>().data()), Iter( std::declval<Container const&>().data() + std::declval<Container const&>().size()))> explicit Range(const Container& str) ; template < class OtherIter, typename std::enable_if< (std::is_same<Iter, const unsigned char*>::value && (std::is_same<OtherIter, const char*>::value || std::is_same<OtherIter, char*>::value)), int>::type = 0> Range(const Range<OtherIter>& other) ; template < class OtherIter, typename std::enable_if< (std::is_same<Iter, unsigned char*>::value && std::is_same<OtherIter, char*>::value), int>::type = 0> Range(const Range<OtherIter>& other) ; template < class OtherIter, typename std::enable_if< (std::is_same<Iter, const char*>::value && (std::is_same<OtherIter, const unsigned char*>::value || std::is_same<OtherIter, unsigned char*>::value)), int>::type = 0> explicit Range(const Range<OtherIter>& other) ; template < class OtherIter, typename std::enable_if< (std::is_same<Iter, char*>::value && std::is_same<OtherIter, unsigned char*>::value), int>::type = 0> explicit Range(const Range<OtherIter>& other) ; template < class OtherIter, typename std::enable_if< (!std::is_same<Iter, OtherIter>::value && std::is_convertible<OtherIter, Iter>::value), int>::type = 0> constexpr Range(const Range<OtherIter>& other) ; template < class OtherIter, typename std::enable_if< (!std::is_same<Iter, OtherIter>::value && !std::is_convertible<OtherIter, Iter>::value && std::is_constructible<Iter, const OtherIter&>::value), int>::type = 0> constexpr explicit Range(const Range<OtherIter>& other) ; template < class T, size_t N, typename = typename std::enable_if< std::is_convertible<const T*, Iter>::value>::type> constexpr explicit Range(const std::array<T, N>& array) ; template < class T, size_t N, typename = typename std::enable_if<std::is_convertible<T*, Iter>::value>::type> constexpr explicit Range(std::array<T, N>& array) ; Range& operator=(const Range& rhs) & = default; Range& operator=(Range&& rhs) & = default; template < class Alloc, class T = Iter, typename detail::IsCharPointer<T>::const_type = 0> Range& operator=(string<Alloc>&& rhs) = delete; void clear() ; void assign(Iter start, Iter end) ; void reset(Iter start, size_type size) ; template <typename Alloc> void reset(const string<Alloc>& str) ; constexpr size_type size() const ; constexpr size_type walk_size() const ; constexpr bool empty() const ; constexpr Iter data() const ; constexpr Iter start() const ; constexpr Iter begin() const ; constexpr Iter end() const ; constexpr Iter cbegin() const ; constexpr Iter cend() const ; value_type& front() ; value_type& back() ; const value_type& front() const ; const value_type& back() const ; private: struct NotStringView {}; template <typename ValueType> struct StringViewType : std::conditional< std::is_trivial<std::remove_const_t<ValueType>>::value, std::basic_string_view<std::remove_const_t<ValueType>>, NotStringView> {}; template <typename Target> struct IsConstructibleViaStringView : Conjunction< std::is_constructible< _t<StringViewType<value_type>>, Iter const&, size_type>, std::is_constructible<Target, _t<StringViewType<value_type>>>> {}; public: template < typename Tgt, std::enable_if_t< std::is_constructible<Tgt, Iter const&, size_type>::value && !IsConstructibleViaStringView<Tgt>::value, int> = 0> constexpr explicit operator Tgt() const noexcept( std::is_nothrow_constructible<Tgt, Iter const&, size_type>::value) ; template < typename Tgt, std::enable_if_t< !std::is_constructible<Tgt, Iter const&, size_type>::value && std::is_constructible<Tgt, Iter const&, Iter const&>::value && !IsConstructibleViaStringView<Tgt>::value, int> = 0> constexpr explicit operator Tgt() const noexcept( std::is_nothrow_constructible<Tgt, Iter const&, Iter const&>::value) ; template < typename Tgt, typename ValueType = value_type, std::enable_if_t< StrictConjunction< std::is_same<Tgt, _t<StringViewType<ValueType>>>, std::is_constructible< _t<StringViewType<ValueType>>, Iter const&, size_type>>::value, int> = 0> constexpr operator Tgt() const noexcept( std::is_nothrow_constructible<Tgt, Iter const&, size_type>::value) ; template <typename Tgt, typename... Args> constexpr std::enable_if_t< std::is_constructible<Tgt, Iter const&, size_type>::value, Tgt> to(Args&&... args) const noexcept( std::is_nothrow_constructible<Tgt, Iter const&, size_type, Args&&...>:: value) ; template <typename Tgt, typename... Args> constexpr std::enable_if_t< !std::is_constructible<Tgt, Iter const&, size_type>::value && std::is_constructible<Tgt, Iter const&, Iter const&>::value, Tgt> to(Args&&... args) const noexcept( std::is_nothrow_constructible<Tgt, Iter const&, Iter const&, Args&&...>:: value) ; std::string str() const ; std::string toString() const ; const_range_type castToConst() const ; int compare(const const_range_type& o) const ; value_type& operator[](size_t i) ; const value_type& operator[](size_t i) const ; value_type& at(size_t i) ; const value_type& at(size_t i) const ; [[deprecated( "Replace with folly::Hash if the hash is not serialized")]] uint32_t hash() const ; void advance(size_type n) ; void subtract(size_type n) ; Range subpiece(size_type first, size_type length = npos) const ; template < typename..., typename T = Iter, std::enable_if_t<detail::range_is_char_type_v_<T>, int> = 0> Range substr(size_type first, size_type length = npos) const ; void uncheckedAdvance(size_type n) ; void uncheckedSubtract(size_type n) ; Range uncheckedSubpiece(size_type first, size_type length = npos) const ; void pop_front() ; void pop_back() ; size_type find(const_range_type str) const ; size_type find(const_range_type str, size_t pos) const ; size_type find(Iter s, size_t pos, size_t n) const ; size_type find(const Iter s) const ; size_type find(const Iter s, size_t pos) const ; size_type find(value_type c) const ; size_type rfind(value_type c) const ; size_type find(value_type c, size_t pos) const ; size_type find_first_of(const_range_type needles) const ; size_type find_first_of(const_range_type needles, size_t pos) const ; size_type find_first_of(Iter needles) const ; size_type find_first_of(Iter needles, size_t pos) const ; size_type find_first_of(Iter needles, size_t pos, size_t n) const ; size_type find_first_of(value_type c) const ; size_type find_first_of(value_type c, size_t pos) const ; bool contains(const const_range_type& other) const ; bool contains(const value_type& other) const ; void swap(Range& rhs) ; bool startsWith(const const_range_type& other) const ; bool startsWith(value_type c) const ; template <class Comp> bool startsWith(const const_range_type& other, Comp&& eq) const ; bool starts_with(const_range_type other) const noexcept ; bool starts_with(value_type c) const noexcept ; template < typename..., typename T = Iter, std::enable_if_t<detail::range_is_char_type_v_<T>, int> = 0> bool starts_with(const value_type* other) const ; bool endsWith(const const_range_type& other) const ; bool endsWith(value_type c) const ; template <class Comp> bool endsWith(const const_range_type& other, Comp&& eq) const ; template <class Comp> bool equals(const const_range_type& other, Comp&& eq) const ; bool ends_with(const_range_type other) const noexcept ; bool ends_with(value_type c) const noexcept ; template < typename..., typename T = Iter, std::enable_if_t<detail::range_is_char_type_v_<T>, int> = 0> bool ends_with(const value_type* other) const ; void erase(Iter b, Iter e) ; bool removePrefix(const const_range_type& prefix) ; bool removePrefix(value_type prefix) ; bool removeSuffix(const const_range_type& suffix) ; bool removeSuffix(value_type suffix) ; bool replaceAt(size_t pos, const_range_type replacement) ; size_t replaceAll(const_range_type source, const_range_type dest) ; Range split_step(value_type delimiter) ; Range split_step(Range delimiter) ; template <typename TProcess, typename... Args> auto split_step(value_type delimiter, TProcess&& process, Args&&... args) -> decltype(process(std::declval<Range>(), std::forward<Args>(args)...)) ; template <typename TProcess, typename... Args> auto split_step(Range delimiter, TProcess&& process, Args&&... args) -> decltype(process(std::declval<Range>(), std::forward<Args>(args)...)) ; private: Iter b_; Iter e_; }; template <class Iter> const typename Range<Iter>::size_type Range<Iter>::npos = std::string::npos; template <class Iter> void swap(Range<Iter>& lhs, Range<Iter>& rhs) ; template <class Iter> constexpr Range<Iter> range(Iter first, Iter last) ; template <class Collection> constexpr auto range(Collection& v) -> Range<decltype(v.data())> ; template <class Collection> constexpr auto range(Collection const& v) -> Range<decltype(v.data())> ; template <class Collection> constexpr auto crange(Collection const& v) -> Range<decltype(v.data())> ; template <class T, size_t n> constexpr Range<T*> range(T (&array)[n]) ; template <class T, size_t n> constexpr Range<T const*> range(T const (&array)[n]) ; template <class T, size_t n> constexpr Range<T const*> crange(T const (&array)[n]) ; template <class T, size_t n> constexpr Range<T*> range(std::array<T, n>& array) ; template <class T, size_t n> constexpr Range<T const*> range(std::array<T, n> const& array) ; template <class T, size_t n> constexpr Range<T const*> crange(std::array<T, n> const& array) ; template <class T> constexpr Range<T const*> range(std::initializer_list<T> ilist) ; template <class T> constexpr Range<T const*> crange(std::initializer_list<T> ilist) ; using StringPiece = Range<const char*>; using MutableStringPiece = Range<char*>; using ByteRange = Range<const unsigned char*>; using MutableByteRange = Range<unsigned char*>; template <class C> std::basic_ostream<C>& operator<<( std::basic_ostream<C>& os, Range<C const*> piece) ; template <class C> std::basic_ostream<C>& operator<<(std::basic_ostream<C>& os, Range<C*> piece) ; template <class Iter> bool operator==(const Range<Iter>& lhs, const Range<Iter>& rhs) ; template <class Iter> bool operator!=(const Range<Iter>& lhs, const Range<Iter>& rhs) ; template <class Iter> bool operator<(const Range<Iter>& lhs, const Range<Iter>& rhs) ; template <class Iter> bool operator<=(const Range<Iter>& lhs, const Range<Iter>& rhs) ; template <class Iter> bool operator>(const Range<Iter>& lhs, const Range<Iter>& rhs) ; template <class Iter> bool operator>=(const Range<Iter>& lhs, const Range<Iter>& rhs) ; namespace detail { template <class A, class B> struct ComparableAsStringPiece { enum { value = (std::is_convertible<A, StringPiece>::value && std::is_same<B, StringPiece>::value) || (std::is_convertible<B, StringPiece>::value && std::is_same<A, StringPiece>::value) }; }; } template <class T, class U> std::enable_if_t<detail::ComparableAsStringPiece<T, U>::value, bool> operator==( const T& lhs, const U& rhs) ; template <class T, class U> std::enable_if_t<detail::ComparableAsStringPiece<T, U>::value, bool> operator!=( const T& lhs, const U& rhs) ; template <class T, class U> std::enable_if_t<detail::ComparableAsStringPiece<T, U>::value, bool> operator<( const T& lhs, const U& rhs) ; template <class T, class U> std::enable_if_t<detail::ComparableAsStringPiece<T, U>::value, bool> operator>( const T& lhs, const U& rhs) ; template <class T, class U> std::enable_if_t<detail::ComparableAsStringPiece<T, U>::value, bool> operator<=( const T& lhs, const U& rhs) ; template <class T, class U> std::enable_if_t<detail::ComparableAsStringPiece<T, U>::value, bool> operator>=( const T& lhs, const U& rhs) ; template <class Iter, class Comp> size_t qfind(const Range<Iter>& haystack, const Range<Iter>& needle, Comp eq) ; namespace detail { size_t qfind_first_byte_of( const StringPiece haystack, const StringPiece needles) ; } template <class Iter, class Comp> size_t qfind_first_of( const Range<Iter>& haystack, const Range<Iter>& needles, Comp eq) ; struct AsciiCaseSensitive { bool operator()(char lhs, char rhs) const ; }; struct AsciiCaseInsensitive { bool operator()(char lhs, char rhs) const ; }; template <class Iter> size_t qfind( const Range<Iter>& haystack, const typename Range<Iter>::value_type& needle) ; template <class Iter> size_t rfind( const Range<Iter>& haystack, const typename Range<Iter>::value_type& needle) ; template <> size_t qfind(const Range<const char*>& haystack, const char& needle) ; template <> size_t rfind(const Range<const char*>& haystack, const char& needle) ; template <> size_t qfind( const Range<const unsigned char*>& haystack, const unsigned char& needle) ; template <> size_t rfind( const Range<const unsigned char*>& haystack, const unsigned char& needle) ; template <class Iter> size_t qfind_first_of(const Range<Iter>& haystack, const Range<Iter>& needles) ; template <> size_t qfind_first_of( const Range<const char*>& haystack, const Range<const char*>& needles) ; template <> size_t qfind_first_of( const Range<const unsigned char*>& haystack, const Range<const unsigned char*>& needles) ; template <class Key, class Enable> struct hasher; template <class T> struct hasher< folly::Range<T*>, std::enable_if_t<std::is_integral<T>::value, void>> { using folly_is_avalanching = std::true_type; size_t operator()(folly::Range<T*> r) const ; }; inline namespace literals { inline namespace string_piece_literals { constexpr Range<char const*> operator""_sp( char const* str, size_t len) noexcept ; constexpr Range<char8_t const*> operator""_sp( char8_t const* str, size_t len) noexcept ; constexpr Range<char16_t const*> operator""_sp( char16_t const* str, size_t len) noexcept ; constexpr Range<char32_t const*> operator""_sp( char32_t const* str, size_t len) noexcept ; constexpr Range<wchar_t const*> operator""_sp( wchar_t const* str, size_t len) noexcept ; } } } namespace fmt { template <> struct formatter<folly::StringPiece> : private formatter<string_view> { using formatter<string_view>::parse; template <typename Context> typename Context::iterator format(folly::StringPiece s, Context& ctx) const ; }; } #pragma GCC diagnostic pop namespace folly { template <class T1> struct IsRelocatable<folly::Range<T1> > : std::true_type {}; } namespace ranges { template <class T> extern const bool enable_view; } namespace ranges { template <class Iter> inline constexpr bool enable_view<::folly::Range<Iter>> = true; } namespace folly { struct order_preserving_reinsertion_view_fn { private: using fn = order_preserving_reinsertion_view_fn; public: template <typename Container> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(Container const& container) const noexcept(is_nothrow_tag_invocable_v<fn, Container const&>) -> tag_invoke_result_t<fn, Container const&> ; }; namespace folly_cpo__ { inline constexpr order_preserving_reinsertion_view_fn order_preserving_reinsertion_view{}; } using namespace folly_cpo__; struct order_preserving_reinsertion_view_or_default_fn { private: using fn = order_preserving_reinsertion_view_fn; public: template < typename Container, std::enable_if_t<is_tag_invocable_v<fn, Container const&>, int> = 0> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(Container const& container) const noexcept(is_nothrow_tag_invocable_v<fn, Container const&>) -> tag_invoke_result_t<fn, Container const&> ; template < typename Container, std::enable_if_t<!is_tag_invocable_v<fn, Container const&>, int> = 0> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr Container const& operator()( Container const& container) const noexcept ; }; namespace folly_cpo__ { inline constexpr order_preserving_reinsertion_view_or_default_fn order_preserving_reinsertion_view_or_default{}; } using namespace folly_cpo__; } namespace folly { template <typename T, typename Enable = void> struct HeterogeneousAccessEqualTo; template <typename T, typename Enable = void> struct HeterogeneousAccessHash; template <typename CharT> struct TransparentStringEqualTo; template <typename CharT> struct TransparentStringHash; } namespace folly { namespace f14 { template <typename T> using DefaultHasher = HeterogeneousAccessHash<T>; template <typename T> using DefaultKeyEqual = HeterogeneousAccessEqualTo<T>; template <typename T> using DefaultAlloc = std::allocator<T>; } } namespace std __attribute__ ((__visibility__ ("default"))) { namespace pmr { template<typename _Tp = std::byte> class polymorphic_allocator; [[nodiscard, __gnu__::__returns_nonnull__, __gnu__::__const__]] memory_resource* new_delete_resource() noexcept; [[nodiscard, __gnu__::__returns_nonnull__, __gnu__::__const__]] memory_resource* null_memory_resource() noexcept; [[__gnu__::__returns_nonnull__]] memory_resource* set_default_resource(memory_resource* __r) noexcept; [[__gnu__::__returns_nonnull__]] memory_resource* get_default_resource() noexcept; struct pool_options; class synchronized_pool_resource; class unsynchronized_pool_resource; class monotonic_buffer_resource; struct pool_options { size_t max_blocks_per_chunk = 0; size_t largest_required_pool_block = 0; }; class __pool_resource { friend class synchronized_pool_resource; friend class unsynchronized_pool_resource; __pool_resource(const pool_options& __opts, memory_resource* __upstream); ~__pool_resource(); __pool_resource(const __pool_resource&) = delete; __pool_resource& operator=(const __pool_resource&) = delete; void* allocate(size_t __bytes, size_t __alignment); void deallocate(void* __p, size_t __bytes, size_t __alignment); void release() noexcept; memory_resource* resource() const noexcept ; struct _Pool; _Pool* _M_alloc_pools(); const pool_options _M_opts; struct _BigBlock; std::pmr::vector<_BigBlock> _M_unpooled; const int _M_npools; }; class synchronized_pool_resource : public memory_resource { public: synchronized_pool_resource(const pool_options& __opts, memory_resource* __upstream) __attribute__((__nonnull__)); synchronized_pool_resource() ; explicit synchronized_pool_resource(memory_resource* __upstream) __attribute__((__nonnull__)) ; explicit synchronized_pool_resource(const pool_options& __opts) ; synchronized_pool_resource(const synchronized_pool_resource&) = delete; virtual ~synchronized_pool_resource(); synchronized_pool_resource& operator=(const synchronized_pool_resource&) = delete; void release(); memory_resource* upstream_resource() const noexcept __attribute__((__returns_nonnull__)) ; pool_options options() const noexcept ; protected: void* do_allocate(size_t __bytes, size_t __alignment) override; void do_deallocate(void* __p, size_t __bytes, size_t __alignment) override; bool do_is_equal(const memory_resource& __other) const noexcept override ; public: struct _TPools; private: _TPools* _M_alloc_tpools(lock_guard<shared_mutex>&); _TPools* _M_alloc_shared_tpools(lock_guard<shared_mutex>&); auto _M_thread_specific_pools() noexcept; __pool_resource _M_impl; __gthread_key_t _M_key; _TPools* _M_tpools = nullptr; mutable shared_mutex _M_mx; }; class unsynchronized_pool_resource : public memory_resource { public: [[__gnu__::__nonnull__]] unsynchronized_pool_resource(const pool_options& __opts, memory_resource* __upstream); unsynchronized_pool_resource() ; [[__gnu__::__nonnull__]] explicit unsynchronized_pool_resource(memory_resource* __upstream) ; explicit unsynchronized_pool_resource(const pool_options& __opts) ; unsynchronized_pool_resource(const unsynchronized_pool_resource&) = delete; virtual ~unsynchronized_pool_resource(); unsynchronized_pool_resource& operator=(const unsynchronized_pool_resource&) = delete; void release(); [[__gnu__::__returns_nonnull__]] memory_resource* upstream_resource() const noexcept ; pool_options options() const noexcept ; protected: void* do_allocate(size_t __bytes, size_t __alignment) override; void do_deallocate(void* __p, size_t __bytes, size_t __alignment) override; bool do_is_equal(const memory_resource& __other) const noexcept override ; private: using _Pool = __pool_resource::_Pool; auto _M_find_pool(size_t) noexcept; __pool_resource _M_impl; _Pool* _M_pools = nullptr; }; class monotonic_buffer_resource : public memory_resource { public: explicit monotonic_buffer_resource(memory_resource* __upstream) noexcept __attribute__((__nonnull__)) ; monotonic_buffer_resource(size_t __initial_size, memory_resource* __upstream) noexcept __attribute__((__nonnull__)) ; monotonic_buffer_resource(void* __buffer, size_t __buffer_size, memory_resource* __upstream) noexcept __attribute__((__nonnull__(4))) ; monotonic_buffer_resource() ; explicit monotonic_buffer_resource(size_t __initial_size) ; monotonic_buffer_resource(void* __buffer, size_t __buffer_size) ; monotonic_buffer_resource(const monotonic_buffer_resource&) = delete; virtual ~monotonic_buffer_resource(); monotonic_buffer_resource& operator=(const monotonic_buffer_resource&) = delete; void release() noexcept ; memory_resource* upstream_resource() const noexcept __attribute__((__returns_nonnull__)) ; protected: void* do_allocate(size_t __bytes, size_t __alignment) override ; void do_deallocate(void*, size_t, size_t) override ; bool do_is_equal(const memory_resource& __other) const noexcept override ; private: void _M_new_buffer(size_t __bytes, size_t __alignment); void _M_release_buffers() noexcept; static size_t _S_next_bufsize(size_t __buffer_size) noexcept ; static constexpr size_t _S_init_bufsize = 128 * sizeof(void*); static constexpr float _S_growth_factor = 1.5; void* _M_current_buf = nullptr; size_t _M_avail = 0; size_t _M_next_bufsiz = _S_init_bufsize; memory_resource* const _M_upstream; void* const _M_orig_buf = nullptr; size_t const _M_orig_size = _M_next_bufsiz; class _Chunk; _Chunk* _M_head = nullptr; }; } } namespace folly { namespace detail { namespace std_pmr = ::std::pmr; } } namespace folly { template < typename Key, typename Mapped, typename Hasher = f14::DefaultHasher<Key>, typename KeyEqual = f14::DefaultKeyEqual<Key>, typename Alloc = f14::DefaultAlloc<std::pair<Key const, Mapped>>> class F14NodeMap; template < typename Key, typename Mapped, typename Hasher = f14::DefaultHasher<Key>, typename KeyEqual = f14::DefaultKeyEqual<Key>, typename Alloc = f14::DefaultAlloc<std::pair<Key const, Mapped>>> class F14ValueMap; template < typename Key, typename Mapped, typename Hasher = f14::DefaultHasher<Key>, typename KeyEqual = f14::DefaultKeyEqual<Key>, typename Alloc = f14::DefaultAlloc<std::pair<Key const, Mapped>>> class F14VectorMap; template < typename Key, typename Mapped, typename Hasher = f14::DefaultHasher<Key>, typename KeyEqual = f14::DefaultKeyEqual<Key>, typename Alloc = f14::DefaultAlloc<std::pair<Key const, Mapped>>> class F14FastMap; namespace pmr { template < typename Key, typename Mapped, typename Hasher = f14::DefaultHasher<Key>, typename KeyEqual = f14::DefaultKeyEqual<Key>> using F14NodeMap = folly::F14NodeMap< Key, Mapped, Hasher, KeyEqual, folly::detail::std_pmr::polymorphic_allocator< std::pair<Key const, Mapped>>>; template < typename Key, typename Mapped, typename Hasher = f14::DefaultHasher<Key>, typename KeyEqual = f14::DefaultKeyEqual<Key>> using F14ValueMap = folly::F14ValueMap< Key, Mapped, Hasher, KeyEqual, folly::detail::std_pmr::polymorphic_allocator< std::pair<Key const, Mapped>>>; template < typename Key, typename Mapped, typename Hasher = f14::DefaultHasher<Key>, typename KeyEqual = f14::DefaultKeyEqual<Key>> using F14VectorMap = folly::F14VectorMap< Key, Mapped, Hasher, KeyEqual, folly::detail::std_pmr::polymorphic_allocator< std::pair<Key const, Mapped>>>; template < typename Key, typename Mapped, typename Hasher = f14::DefaultHasher<Key>, typename KeyEqual = f14::DefaultKeyEqual<Key>> using F14FastMap = folly::F14FastMap< Key, Mapped, Hasher, KeyEqual, folly::detail::std_pmr::polymorphic_allocator< std::pair<Key const, Mapped>>>; } } namespace folly { namespace access { struct size_fn { template <typename C> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(C const& c) const noexcept(noexcept(c.size())) -> decltype(c.size()) ; template <typename T, std::size_t N> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr std::size_t operator()(T const (&)[N]) const noexcept ; }; inline constexpr size_fn size{}; struct empty_fn { template <typename C> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(C const& c) const noexcept(noexcept(c.empty())) -> decltype(c.empty()) ; template <typename T, std::size_t N> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr bool operator()(T const (&)[N]) const noexcept ; template <typename E> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr bool operator()( std::initializer_list<E> il) const noexcept ; }; inline constexpr empty_fn empty{}; struct data_fn { template <typename C> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(C& c) const noexcept(noexcept(c.data())) -> decltype(c.data()) ; template <typename C> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(C const& c) const noexcept(noexcept(c.data())) -> decltype(c.data()) ; template <typename T, std::size_t N> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr T* operator()(T (&a)[N]) const noexcept ; template <typename E> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr E const* operator()( std::initializer_list<E> il) const noexcept ; }; inline constexpr data_fn data{}; namespace begin_fn__folly_detail_invoke_ns { [[maybe_unused]] void begin(::folly::detail::invoke_private_overload&); using std::begin; struct __folly_detail_invoke_obj { template <typename... Args> [[maybe_unused]] __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()( Args&&... args) const noexcept(noexcept(begin(static_cast<Args&&>(args)...))) -> decltype(begin(static_cast<Args&&>(args)...)) ; }; } struct begin_fn : begin_fn__folly_detail_invoke_ns::__folly_detail_invoke_obj {}; inline constexpr begin_fn begin{}; namespace end_fn__folly_detail_invoke_ns { [[maybe_unused]] void end(::folly::detail::invoke_private_overload&); using std::end; struct __folly_detail_invoke_obj { template <typename... Args> [[maybe_unused]] __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()( Args&&... args) const noexcept(noexcept(end(static_cast<Args&&>(args)...))) -> decltype(end(static_cast<Args&&>(args)...)) ; }; } struct end_fn : end_fn__folly_detail_invoke_ns::__folly_detail_invoke_obj {}; inline constexpr end_fn end{}; } } namespace folly { template <class T> class rvalue_reference_wrapper { public: using type = T; rvalue_reference_wrapper() ; explicit rvalue_reference_wrapper(T&& ref) ; explicit rvalue_reference_wrapper(T&) noexcept = delete; rvalue_reference_wrapper(rvalue_reference_wrapper<T>&& other) ; rvalue_reference_wrapper& operator=( rvalue_reference_wrapper&& other) noexcept ; operator T&&() && noexcept ; T&& get() && noexcept ; template <class... Args> decltype(auto) operator()(Args&&... args) && noexcept( noexcept(std::declval<T>()(std::forward<Args>(args)...))) ; bool valid() const noexcept ; private: rvalue_reference_wrapper(const rvalue_reference_wrapper&) = delete; rvalue_reference_wrapper& operator=(const rvalue_reference_wrapper&) = delete; T* ptr_; }; template <typename T> rvalue_reference_wrapper<T> rref(T&& value) noexcept ; template <typename T> rvalue_reference_wrapper<T> rref(T&) noexcept = delete; } namespace folly { template <typename Iter, typename SentinelIter> inline constexpr bool iterator_has_known_distance_v = !require_sizeof<Iter> || !require_sizeof<SentinelIter>; template <typename Iter> inline constexpr bool iterator_has_known_distance_v<Iter, Iter> = std::is_base_of< std::random_access_iterator_tag, typename std::iterator_traits<Iter>::iterator_category>::value; template <typename Range> inline constexpr bool range_has_known_distance_v = iterator_has_known_distance_v< invoke_result_t<access::begin_fn, Range>, invoke_result_t<access::end_fn, Range>>; template <typename Iter> using iterator_category_t = typename std::iterator_traits<Iter>::iterator_category; namespace detail { template <typename Iter, typename Category, typename = void> inline constexpr bool iterator_category_matches_v_ = !require_sizeof<Iter> || !require_sizeof<Category>; template <typename Iter, typename Category> inline constexpr bool iterator_category_matches_v_< Iter, Category, void_t<iterator_category_t<Iter>>> = std::is_convertible<iterator_category_t<Iter>, Category>::value; } template <typename Iter, typename Category> inline constexpr bool iterator_category_matches_v = detail::iterator_category_matches_v_<Iter, Category>; template <typename Iter> using iterator_value_type_t = typename std::iterator_traits<Iter>::value_type; template <typename Iter> using iterator_key_type_t = remove_cvref_t<typename iterator_value_type_t<Iter>::first_type>; template <typename Iter> using iterator_mapped_type_t = typename iterator_value_type_t<Iter>::second_type; template <typename... Args> struct emplace_args : public std::tuple<std::decay_t<Args>...> { using storage_type = std::tuple<std::decay_t<Args>...>; using storage_type::storage_type; }; template <typename... Args> emplace_args<Args...> make_emplace_args(Args&&... args) noexcept( noexcept(emplace_args<Args...>(std::forward<Args>(args)...))) ; namespace detail { template <typename Arg> decltype(auto) unwrap_emplace_arg(Arg&& arg) noexcept ; template <typename Arg> decltype(auto) unwrap_emplace_arg(std::reference_wrapper<Arg> arg) noexcept ; template <typename Arg> decltype(auto) unwrap_emplace_arg( folly::rvalue_reference_wrapper<Arg> arg) noexcept ; } template <size_t I, typename... Args> decltype(auto) get_emplace_arg(emplace_args<Args...>&& args) noexcept ; template <size_t I, typename... Args> decltype(auto) get_emplace_arg(emplace_args<Args...>& args) noexcept ; template <size_t I, typename... Args> decltype(auto) get_emplace_arg(const emplace_args<Args...>& args) noexcept ; template <size_t I, typename Args> decltype(auto) get_emplace_arg(Args&& args) noexcept ; template <size_t I, typename Args> decltype(auto) get_emplace_arg(Args& args) noexcept ; template <size_t I, typename Args> decltype(auto) get_emplace_arg(const Args& args) noexcept ; namespace detail { template <typename Container> struct Emplace { Emplace(Container& c, typename Container::iterator i) ; template <typename... Args> void emplace(Args&&... args) ; Container* container; typename Container::iterator iter; }; template <typename Container> struct EmplaceHint { EmplaceHint(Container& c, typename Container::iterator i) ; template <typename... Args> void emplace(Args&&... args) ; Container* container; typename Container::iterator iter; }; template <typename Container> struct EmplaceFront { explicit EmplaceFront(Container& c) ; template <typename... Args> void emplace(Args&&... args) ; Container* container; }; template <typename Container> struct EmplaceBack { explicit EmplaceBack(Container& c) ; template <typename... Args> void emplace(Args&&... args) ; Container* container; }; template <typename Derived, typename EmplaceImpl, bool implicit_unpack> class emplace_iterator_base; template <typename Derived, typename EmplaceImpl> class emplace_iterator_base<Derived, EmplaceImpl, false> : protected EmplaceImpl { public: using iterator_category = std::output_iterator_tag; using value_type = void; using difference_type = void; using pointer = void; using reference = void; using container_type = std::remove_reference_t<decltype(*EmplaceImpl::container)>; using EmplaceImpl::EmplaceImpl; template <typename T> Derived& operator=(T&& arg) ; template <typename... Args> Derived& operator=(emplace_args<Args...>& args) ; template <typename... Args> Derived& operator=(const emplace_args<Args...>& args) ; template <typename... Args> Derived& operator=(emplace_args<Args...>&& args) ; Derived& operator*() ; Derived& operator++() ; Derived& operator++(int) ; emplace_iterator_base(const emplace_iterator_base&) = default; emplace_iterator_base(emplace_iterator_base&&) noexcept = default; emplace_iterator_base& operator=(emplace_iterator_base&) = default; emplace_iterator_base& operator=(const emplace_iterator_base&) = default; emplace_iterator_base& operator=(emplace_iterator_base&&) noexcept = default; protected: template <typename Args, std::size_t... I> Derived& unpackAndEmplace(Args& args, std::index_sequence<I...>) ; template <typename Args, std::size_t... I> Derived& unpackAndEmplace(const Args& args, std::index_sequence<I...>) ; template <typename Args, std::size_t... I> Derived& unpackAndEmplace(Args&& args, std::index_sequence<I...>) ; }; template <typename Derived, typename EmplaceImpl> class emplace_iterator_base<Derived, EmplaceImpl, true> : public emplace_iterator_base<Derived, EmplaceImpl, false> { private: using Base = emplace_iterator_base<Derived, EmplaceImpl, false>; public: using Base::Base; using Base::operator=; template <typename... Args> Derived& operator=(std::pair<Args...>& args) ; template <typename... Args> Derived& operator=(const std::pair<Args...>& args) ; template <typename... Args> Derived& operator=(std::pair<Args...>&& args) ; template <typename... Args> Derived& operator=(std::tuple<Args...>& args) ; template <typename... Args> Derived& operator=(const std::tuple<Args...>& args) ; template <typename... Args> Derived& operator=(std::tuple<Args...>&& args) ; emplace_iterator_base(const emplace_iterator_base&) = default; emplace_iterator_base(emplace_iterator_base&&) noexcept = default; emplace_iterator_base& operator=(emplace_iterator_base&) = default; emplace_iterator_base& operator=(const emplace_iterator_base&) = default; emplace_iterator_base& operator=(emplace_iterator_base&&) noexcept = default; }; template < template <typename> class EmplaceImplT, typename Container, bool implicit_unpack> class emplace_iterator_impl : public emplace_iterator_base< emplace_iterator_impl<EmplaceImplT, Container, implicit_unpack>, EmplaceImplT<Container>, implicit_unpack> { private: using Base = emplace_iterator_base< emplace_iterator_impl, EmplaceImplT<Container>, implicit_unpack>; public: using Base::Base; using Base::operator=; emplace_iterator_impl(const emplace_iterator_impl&) = default; emplace_iterator_impl(emplace_iterator_impl&&) noexcept = default; emplace_iterator_impl& operator=(emplace_iterator_impl&) = default; emplace_iterator_impl& operator=(const emplace_iterator_impl&) = default; emplace_iterator_impl& operator=(emplace_iterator_impl&&) noexcept = default; }; } template <typename Container, bool implicit_unpack = true> using emplace_iterator = detail::emplace_iterator_impl<detail::Emplace, Container, implicit_unpack>; template <typename Container, bool implicit_unpack = true> using hint_emplace_iterator = detail:: emplace_iterator_impl<detail::EmplaceHint, Container, implicit_unpack>; template <typename Container, bool implicit_unpack = true> using front_emplace_iterator = detail:: emplace_iterator_impl<detail::EmplaceFront, Container, implicit_unpack>; template <typename Container, bool implicit_unpack = true> using back_emplace_iterator = detail:: emplace_iterator_impl<detail::EmplaceBack, Container, implicit_unpack>; template <bool implicit_unpack = true, typename Container> emplace_iterator<Container, implicit_unpack> emplacer( Container& c, typename Container::iterator i) ; template <bool implicit_unpack = true, typename Container> hint_emplace_iterator<Container, implicit_unpack> hint_emplacer( Container& c, typename Container::iterator i) ; template <bool implicit_unpack = true, typename Container> front_emplace_iterator<Container, implicit_unpack> front_emplacer( Container& c) ; template <bool implicit_unpack = true, typename Container> back_emplace_iterator<Container, implicit_unpack> back_emplacer(Container& c) ; namespace detail { template <typename Ref> struct arrow_proxy { Ref res; Ref* operator->() ; explicit arrow_proxy(Ref* ref) ; }; } template <typename Container> class index_iterator { template <typename T> using get_size_type_t = typename std::remove_cv_t<T>::size_type; template <typename T> using get_difference_type_t = typename std::remove_cv_t<T>::difference_type; public: using container_type = Container; using size_type = detected_or_t<std::size_t, get_size_type_t, Container>; using value_type = typename std::remove_const_t<container_type>::value_type; using iterator_category = std::random_access_iterator_tag; using reference = decltype(static_cast<container_type& (*)() noexcept>(nullptr)()[size_type{}]); using difference_type = detected_or_t<std::ptrdiff_t, get_difference_type_t, Container>; using pointer = std::conditional_t< std::is_reference<reference>::value, std::remove_reference_t<reference>*, detail::arrow_proxy<reference>>; static_assert( std::is_signed<difference_type>::value, "difference_type must be signed"); container_type* get_container() const ; difference_type get_index() const ; constexpr index_iterator() = default; constexpr index_iterator(container_type& container, size_type index) ; template < typename OtherContainer, typename = std::enable_if_t< std::is_same<std::remove_const_t<container_type>, OtherContainer>:: value && std::is_const<container_type>::value>> constexpr index_iterator(index_iterator<OtherContainer> other) ; constexpr reference operator*() const ; pointer operator->() const ; constexpr reference operator[](difference_type n) const ; constexpr index_iterator& operator++() ; constexpr index_iterator operator++(int) ; constexpr index_iterator& operator--() ; constexpr index_iterator operator--(int) ; constexpr index_iterator& operator+=(difference_type n) ; constexpr index_iterator& operator-=(difference_type n) ; constexpr friend index_iterator operator+( index_iterator x, difference_type n) ; constexpr friend index_iterator operator+( difference_type n, index_iterator x) ; constexpr friend index_iterator operator-( index_iterator x, difference_type n) ; constexpr friend difference_type operator-( index_iterator x, index_iterator y) ; friend constexpr bool operator==( const index_iterator& x, const index_iterator& y) ; friend constexpr bool operator!=( const index_iterator& x, const index_iterator& y) ; friend constexpr bool operator<( const index_iterator& x, const index_iterator& y) { (static_cast<void> (0)); return x.index_ < y.index_; } friend constexpr bool operator<=( const index_iterator& x, const index_iterator& y) { return !(y < x); } friend constexpr bool operator>=( const index_iterator& x, const index_iterator& y) { return !(x < y); } friend constexpr bool operator>( const index_iterator& x, const index_iterator& y) { return y < x; } private: container_type* container_ = nullptr; size_type index_ = 0; }; } namespace folly { template <class Value> class Optional; namespace detail { struct OptionalEmptyTag {}; template <class Value> struct OptionalPromise; template <class Value> struct OptionalPromiseReturn; } struct None { enum class _secret { _token }; explicit constexpr None(_secret) {} }; constexpr None none{None::_secret::_token}; class __attribute__((__visibility__("default"))) OptionalEmptyException : public std::runtime_error { public: OptionalEmptyException() ; }; template <class Value> class Optional { public: typedef Value value_type; using promise_type = detail::OptionalPromise<Value>; static_assert( !std::is_reference<Value>::value, "Optional may not be used with reference types"); static_assert( !std::is_abstract<Value>::value, "Optional may not be used with abstract types"); constexpr Optional() noexcept ; Optional(const Optional& src) noexcept( std::is_nothrow_copy_constructible<Value>::value) ; Optional(Optional&& src) noexcept( std::is_nothrow_move_constructible<Value>::value) ; constexpr Optional(const None&) noexcept ; constexpr Optional(Value&& newValue) noexcept( std::is_nothrow_move_constructible<Value>::value) ; constexpr Optional(const Value& newValue) noexcept( std::is_nothrow_copy_constructible<Value>::value) ; template <typename... Args> constexpr explicit Optional(std::in_place_t, Args&&... args) noexcept( std::is_nothrow_constructible<Value, Args...>::value) ; template <typename U, typename... Args> constexpr explicit Optional( std::in_place_t, std::initializer_list<U> il, Args&&... args) noexcept(std:: is_nothrow_constructible< Value, std::initializer_list<U>, Args...>::value) ; Optional(const detail::OptionalPromiseReturn<Value>& p) ; template < typename U, typename = std::enable_if_t<std::is_same_v<U, std::optional<Value>>>> explicit Optional(U&& newValue) noexcept( std::is_nothrow_move_constructible<Value>::value) ; template < typename U, typename = std::enable_if_t<std::is_same_v<U, std::optional<Value>>>> explicit Optional(const U& newValue) noexcept( std::is_nothrow_copy_constructible<Value>::value) ; explicit operator std::optional<Value>() && noexcept( std::is_nothrow_move_constructible<Value>::value) ; explicit operator std::optional<Value>() const& noexcept( std::is_nothrow_copy_constructible<Value>::value) ; void assign(const None&) ; void assign(Optional&& src) ; void assign(const Optional& src) ; void assign(Value&& newValue) ; void assign(const Value& newValue) ; Optional& operator=(None) noexcept ; template <class Arg> Optional& operator=(Arg&& arg) ; Optional& operator=(Optional&& other) noexcept( std::is_nothrow_move_assignable<Value>::value) ; Optional& operator=(const Optional& other) noexcept( std::is_nothrow_copy_assignable<Value>::value) ; template <class... Args> Value& emplace(Args&&... args) ; template <class U, class... Args> typename std::enable_if< std::is_constructible<Value, std::initializer_list<U>&, Args&&...>::value, Value&>::type emplace(std::initializer_list<U> ilist, Args&&... args) ; void reset() noexcept ; void clear() noexcept ; void swap(Optional& that) noexcept(std::is_nothrow_swappable_v<Value>) ; constexpr const Value& value() const& ; constexpr Value& value() & ; constexpr Value&& value() && ; constexpr const Value&& value() const&& ; const Value* get_pointer() const& ; Value* get_pointer() & ; Value* get_pointer() && = delete; constexpr bool has_value() const noexcept ; constexpr bool hasValue() const noexcept ; constexpr explicit operator bool() const noexcept ; constexpr const Value& operator*() const& ; constexpr Value& operator*() & ; constexpr const Value&& operator*() const&& ; constexpr Value&& operator*() && ; constexpr const Value* operator->() const ; constexpr Value* operator->() ; template <class U> constexpr Value value_or(U&& dflt) const& ; template <class U> constexpr Value value_or(U&& dflt) && ; private: friend struct detail::OptionalPromiseReturn<Value>; template <class T> friend constexpr Optional<std::decay_t<T>> make_optional(T&&); template <class T, class... Args> friend constexpr Optional<T> make_optional(Args&&... args); template <class T, class U, class... As> friend constexpr Optional<T> make_optional(std::initializer_list<U>, As&&...); struct PrivateConstructor { explicit PrivateConstructor() = default; }; template <typename... Args> constexpr Optional(PrivateConstructor, Args&&... args) noexcept( std::is_nothrow_constructible<Value, Args&&...>::value) ; explicit Optional(detail::OptionalEmptyTag, Optional*& pointer) noexcept ; void require_value() const ; template <class... Args> void construct(Args&&... args) ; struct StorageTriviallyDestructible { union { char emptyState; Value value; }; bool hasValue; constexpr StorageTriviallyDestructible() ; void clear() ; }; struct StorageNonTriviallyDestructible { union { char emptyState; Value value; }; bool hasValue; constexpr StorageNonTriviallyDestructible() ; ~StorageNonTriviallyDestructible() ; void clear() ; }; using Storage = typename std::conditional< std::is_trivially_destructible<Value>::value, StorageTriviallyDestructible, StorageNonTriviallyDestructible>::type; Storage storage_; }; template <class T> const T* get_pointer(const Optional<T>& opt) ; template <class T> T* get_pointer(Optional<T>& opt) ; template <class T> void swap(Optional<T>& a, Optional<T>& b) noexcept(noexcept(a.swap(b))) ; template <class T> constexpr Optional<std::decay_t<T>> make_optional(T&& v) ; template <class T, class... Args> constexpr folly::Optional<T> make_optional(Args&&... args) ; template <class T, class U, class... Args> constexpr folly::Optional<T> make_optional( std::initializer_list<U> il, Args&&... args) ; template <class U, class V> constexpr bool operator==(const Optional<U>& a, const V& b) ; template <class U, class V> constexpr bool operator!=(const Optional<U>& a, const V& b) ; template <class U, class V> constexpr bool operator==(const U& a, const Optional<V>& b) ; template <class U, class V> constexpr bool operator!=(const U& a, const Optional<V>& b) ; template <class U, class V> constexpr bool operator==(const Optional<U>& a, const Optional<V>& b) ; template <class U, class V> constexpr bool operator!=(const Optional<U>& a, const Optional<V>& b) ; template <class U, class V> constexpr bool operator<(const Optional<U>& a, const Optional<V>& b) ; template <class U, class V> constexpr bool operator>(const Optional<U>& a, const Optional<V>& b) ; template <class U, class V> constexpr bool operator<=(const Optional<U>& a, const Optional<V>& b) ; template <class U, class V> constexpr bool operator>=(const Optional<U>& a, const Optional<V>& b) ; template <class V> bool operator<(const Optional<V>&, const V& other) = delete; template <class V> bool operator<=(const Optional<V>&, const V& other) = delete; template <class V> bool operator>=(const Optional<V>&, const V& other) = delete; template <class V> bool operator>(const Optional<V>&, const V& other) = delete; template <class V> bool operator<(const V& other, const Optional<V>&) = delete; template <class V> bool operator<=(const V& other, const Optional<V>&) = delete; template <class V> bool operator>=(const V& other, const Optional<V>&) = delete; template <class V> bool operator>(const V& other, const Optional<V>&) = delete; template <class V> constexpr bool operator==(const Optional<V>& a, None) noexcept ; template <class V> constexpr bool operator==(None, const Optional<V>& a) noexcept ; template <class V> constexpr bool operator<(const Optional<V>&, None) noexcept ; template <class V> constexpr bool operator<(None, const Optional<V>& a) noexcept ; template <class V> constexpr bool operator>(const Optional<V>& a, None) noexcept ; template <class V> constexpr bool operator>(None, const Optional<V>&) noexcept ; template <class V> constexpr bool operator<=(None, const Optional<V>&) noexcept ; template <class V> constexpr bool operator<=(const Optional<V>& a, None) noexcept ; template <class V> constexpr bool operator>=(const Optional<V>&, None) noexcept ; template <class V> constexpr bool operator>=(None, const Optional<V>& a) noexcept ; } namespace std { template <class T> struct hash< folly::enable_std_hash_helper<folly::Optional<T>, remove_const_t<T>>> { size_t operator()(folly::Optional<T> const& obj) const ; }; } namespace folly { namespace detail { unsigned int* uncaught_exceptions_ptr() noexcept; } [[gnu::pure]] __attribute__((__visibility__("default"))) __attribute__((__always_inline__)) int uncaught_exceptions() noexcept ; } namespace folly { namespace detail { struct ScopeGuardDismissed {}; class ScopeGuardImplBase { public: void dismiss() noexcept ; void rehire() noexcept ; protected: ScopeGuardImplBase(bool dismissed = false) ; [[noreturn]] static void terminate() noexcept; static ScopeGuardImplBase makeEmptyScopeGuard() noexcept ; bool dismissed_; }; template <typename FunctionType, bool InvokeNoexcept> class ScopeGuardImpl : public ScopeGuardImplBase { public: explicit ScopeGuardImpl(FunctionType& fn) noexcept( std::is_nothrow_copy_constructible<FunctionType>::value) ; explicit ScopeGuardImpl(const FunctionType& fn) noexcept( std::is_nothrow_copy_constructible<FunctionType>::value) ; explicit ScopeGuardImpl(FunctionType&& fn) noexcept( std::is_nothrow_move_constructible<FunctionType>::value) ; explicit ScopeGuardImpl(FunctionType&& fn, ScopeGuardDismissed) noexcept( std::is_nothrow_move_constructible<FunctionType>::value) ; ScopeGuardImpl(ScopeGuardImpl&& other) noexcept( std::is_nothrow_move_constructible<FunctionType>::value) ; ~ScopeGuardImpl() noexcept(InvokeNoexcept) ; private: static ScopeGuardImplBase makeFailsafe(std::true_type, const void*) noexcept ; template <typename Fn> static auto makeFailsafe(std::false_type, Fn* fn) noexcept -> ScopeGuardImpl<decltype(std::ref(*fn)), InvokeNoexcept> ; template <typename Fn> explicit ScopeGuardImpl(Fn&& fn, ScopeGuardImplBase&& failsafe) ; void* operator new(std::size_t) = delete; void execute() noexcept(InvokeNoexcept) ; FunctionType function_; }; template <typename F, bool INE> using ScopeGuardImplDecay = ScopeGuardImpl<typename std::decay<F>::type, INE>; } template <typename F> [[nodiscard]] detail::ScopeGuardImplDecay<F, true> makeGuard(F&& f) noexcept( noexcept(detail::ScopeGuardImplDecay<F, true>(static_cast<F&&>(f)))) ; template <typename F> [[nodiscard]] detail::ScopeGuardImplDecay<F, true> makeDismissedGuard(F&& f) noexcept( noexcept(detail::ScopeGuardImplDecay<F, true>( static_cast<F&&>(f), detail::ScopeGuardDismissed{}))) ; namespace detail { template <typename FunctionType, bool ExecuteOnException> class ScopeGuardForNewException { public: explicit ScopeGuardForNewException(const FunctionType& fn) ; explicit ScopeGuardForNewException(FunctionType&& fn) ; ScopeGuardForNewException(ScopeGuardForNewException&& other) = default; ~ScopeGuardForNewException() noexcept(ExecuteOnException) ; private: void* operator new(std::size_t) = delete; void operator delete(void*) = delete; ScopeGuardImpl<FunctionType, ExecuteOnException> guard_; int exceptionCounter_{uncaught_exceptions()}; }; enum class ScopeGuardOnFail {}; template <typename FunctionType> ScopeGuardForNewException<typename std::decay<FunctionType>::type, true> operator+(detail::ScopeGuardOnFail, FunctionType&& fn) ; enum class ScopeGuardOnSuccess {}; template <typename FunctionType> ScopeGuardForNewException<typename std::decay<FunctionType>::type, false> operator+(ScopeGuardOnSuccess, FunctionType&& fn) ; enum class ScopeGuardOnExit {}; template <typename FunctionType> ScopeGuardImpl<typename std::decay<FunctionType>::type, true> operator+( detail::ScopeGuardOnExit, FunctionType&& fn) { return ScopeGuardImpl<typename std::decay<FunctionType>::type, true>( std::forward<FunctionType>(fn)); } } } namespace folly { constexpr std::size_t register_pass_max_size = kMscVer ? 8u : 16u; template <typename T> constexpr bool is_register_pass_v = (sizeof(T) <= register_pass_max_size) && std::is_trivially_copyable_v<T>; template <typename T> constexpr bool is_register_pass_v<T&> = true; template <typename T> constexpr bool is_register_pass_v<T&&> = true; constexpr bool has_extended_alignment = kIsLinux && sizeof(void*) >= sizeof(std::uint64_t); namespace detail { template <typename... Ts> struct max_align_t_ { static constexpr std::size_t value() { std::size_t const values[] = {0u, alignof(Ts)...}; std::size_t r = 0u; for (auto const v : values) { r = r < v ? v : r; } return r; } }; using max_align_v_ = max_align_t_< long double, double, float, long long int, long int, int, short int, bool, char, char16_t, char32_t, wchar_t, void*, std::max_align_t>; } constexpr std::size_t max_align_v = detail::max_align_v_::value(); struct alignas(max_align_v) max_align_t {}; constexpr std::size_t hardware_destructive_interference_size = (kIsArchArm || kIsArchS390X) ? 64 : 128; static_assert(hardware_destructive_interference_size >= max_align_v, "math?"); constexpr std::size_t hardware_constructive_interference_size = 64; static_assert(hardware_constructive_interference_size >= max_align_v, "math?"); constexpr std::size_t cacheline_align_v = has_extended_alignment ? hardware_constructive_interference_size : max_align_v; struct alignas(cacheline_align_v) cacheline_align_t {}; } namespace folly { namespace detail { template <std::size_t S> using pretty_carray = c_array<char, S>; static constexpr char* pretty_carray_copy( char* dest, const char* src, std::size_t n) { for (std::size_t i = 0; i < n; ++i) { dest[i] = src[i]; } return dest + n; } template <std::size_t S> static constexpr pretty_carray<S> pretty_carray_from(char const (&in)[S]) { pretty_carray<S> out{}; pretty_carray_copy(out.data, in, S); return out; } struct pretty_info { std::size_t b; std::size_t e; }; template <typename To, std::size_t S> static constexpr To pretty_info_to(pretty_info info, char const (&name)[S]) ; template <std::size_t S> static constexpr std::size_t pretty_lfind( char const (&haystack)[S], char const needle) ; template <std::size_t S> static constexpr std::size_t pretty_rfind( char const (&haystack)[S], char const needle) ; struct pretty_tag_msc {}; struct pretty_tag_gcc {}; using pretty_default_tag = std::conditional_t< kMscVer && !kIsClang, pretty_tag_msc, pretty_tag_gcc>; template <typename T> static constexpr auto pretty_raw(pretty_tag_msc) ; template <typename T> static constexpr auto pretty_raw(pretty_tag_gcc) ; template <std::size_t S> static constexpr pretty_info pretty_parse( pretty_tag_msc, char const (&name)[S]) ; template <std::size_t S> static constexpr pretty_info pretty_parse( pretty_tag_gcc, char const (&name)[S]) ; template <typename T, typename Tag> struct pretty_name_zarray { static constexpr auto raw_() ; static constexpr auto raw = raw_(); static constexpr auto info = pretty_parse(Tag{}, raw.data); static constexpr auto size = info.e - info.b; static constexpr auto zarray_() ; static constexpr pretty_carray<size + 1> zarray = zarray_(); }; template <typename T> constexpr const auto& pretty_name_carray() ; } template <typename T> constexpr char const* pretty_name() ; } namespace folly { template <typename T, typename Enable> struct HeterogeneousAccessEqualTo : std::equal_to<T> {}; template <typename T, typename Enable> struct HeterogeneousAccessHash : std::hash<T> { using folly_is_avalanching = IsAvalanchingHasher<std::hash<T>, T>; }; namespace detail { template <typename T, typename Enable = void> struct ValueTypeForTransparentConversionToRange { using type = char; }; template <typename T> struct ValueTypeForTransparentConversionToRange< T, void_t< decltype(std::declval<hasher<Range<typename T::value_type const*>>>()( std::declval<Range<typename T::value_type const*>>()))>> { using type = std::remove_const_t<typename T::value_type>; }; template <typename T> using TransparentlyConvertibleToRange = std::is_convertible< T, Range<typename ValueTypeForTransparentConversionToRange<T>::type const*>>; template <typename T> struct TransparentRangeEqualTo { using is_transparent = void; template <typename U1, typename U2> bool operator()(U1 const& lhs, U2 const& rhs) const ; bool operator()(std::string const& lhs, std::string const& rhs) const ; }; template <typename T> struct TransparentRangeHash { using is_transparent = void; using folly_is_avalanching = std::true_type; private: template <typename U> static std::size_t hashImpl(Range<U const*> piece) ; static std::size_t hashImpl(StringPiece piece) ; public: template <typename U> std::size_t operator()(U const& stringish) const ; std::size_t operator()(std::string const& str) const ; }; template < typename TableKey, typename Hasher, typename KeyEqual, typename ArgKey> struct EligibleForHeterogeneousFind : Conjunction< is_transparent<Hasher>, is_transparent<KeyEqual>, is_invocable<Hasher, ArgKey const&>, is_invocable<KeyEqual, ArgKey const&, TableKey const&>> {}; template < typename TableKey, typename Hasher, typename KeyEqual, typename ArgKey> using EligibleForHeterogeneousInsert = Conjunction< EligibleForHeterogeneousFind<TableKey, Hasher, KeyEqual, ArgKey>, std::is_constructible<TableKey, ArgKey>>; } template <typename T> struct HeterogeneousAccessEqualTo< T, std::enable_if_t<detail::TransparentlyConvertibleToRange<T>::value>> : detail::TransparentRangeEqualTo< typename detail::ValueTypeForTransparentConversionToRange<T>::type> { }; template <typename T> struct HeterogeneousAccessHash< T, std::enable_if_t<detail::TransparentlyConvertibleToRange<T>::value>> : detail::TransparentRangeHash< typename detail::ValueTypeForTransparentConversionToRange<T>::type> { }; } namespace folly { namespace f14 { namespace detail { enum class F14IntrinsicsMode { None, Simd, SimdAndCrc }; static constexpr F14IntrinsicsMode getF14IntrinsicsMode() { return F14IntrinsicsMode::Simd; } } } } namespace folly { namespace f14 { namespace detail { template <typename T> inline __attribute__((__always_inline__)) static unsigned findFirstSetNonZero(T mask) { assume(mask != 0); if (sizeof(mask) == sizeof(unsigned)) { return __builtin_ctz(static_cast<unsigned>(mask)); } else { return __builtin_ctzll(mask); } } using MaskType = uint32_t; constexpr unsigned kMaskSpacing = 1; template <unsigned BitCount> struct FullMask { static constexpr MaskType value = (FullMask<BitCount - 1>::value << kMaskSpacing) + 1; }; template <> struct FullMask<1> : std::integral_constant<MaskType, 1> {}; class SparseMaskIter { MaskType mask_; public: explicit SparseMaskIter(MaskType mask) : mask_{mask} {} bool hasNext() { return mask_ != 0; } unsigned next() ; }; class DenseMaskIter { MaskType mask_; unsigned index_{0}; public: explicit DenseMaskIter(uint8_t const*, MaskType mask) ; bool hasNext() ; unsigned next() ; }; class MaskRangeIter { MaskType mask_; unsigned shift_{0}; public: explicit MaskRangeIter(MaskType mask) ; bool hasNext() ; std::pair<unsigned, unsigned> next() ; }; class LastOccupiedInMask { MaskType mask_; public: explicit LastOccupiedInMask(MaskType mask) ; bool hasIndex() const ; unsigned index() const ; }; class FirstEmptyInMask { MaskType mask_; public: explicit FirstEmptyInMask(MaskType mask) ; bool hasIndex() const ; unsigned index() const ; }; } } } typedef long long __m64 __attribute__((__vector_size__(8), __aligned__(8))); typedef long long __v1di __attribute__((__vector_size__(8))); typedef int __v2si __attribute__((__vector_size__(8))); typedef short __v4hi __attribute__((__vector_size__(8))); typedef char __v8qi __attribute__((__vector_size__(8))); static void __attribute__((__always_inline__, __nodebug__, __target__("mmx"))) _mm_empty(void) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_cvtsi32_si64(int __i) ; static int __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_cvtsi64_si32(__m64 __m) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_cvtsi64_m64(long long __i) ; static long long __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_cvtm64_si64(__m64 __m) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_packs_pi16(__m64 __m1, __m64 __m2) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_packs_pi32(__m64 __m1, __m64 __m2) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_packs_pu16(__m64 __m1, __m64 __m2) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_unpackhi_pi8(__m64 __m1, __m64 __m2) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_unpackhi_pi16(__m64 __m1, __m64 __m2) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_unpackhi_pi32(__m64 __m1, __m64 __m2) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_unpacklo_pi8(__m64 __m1, __m64 __m2) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_unpacklo_pi16(__m64 __m1, __m64 __m2) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_unpacklo_pi32(__m64 __m1, __m64 __m2) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_add_pi8(__m64 __m1, __m64 __m2) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_add_pi16(__m64 __m1, __m64 __m2) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_add_pi32(__m64 __m1, __m64 __m2) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_adds_pi8(__m64 __m1, __m64 __m2) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_adds_pi16(__m64 __m1, __m64 __m2) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_adds_pu8(__m64 __m1, __m64 __m2) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_adds_pu16(__m64 __m1, __m64 __m2) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_sub_pi8(__m64 __m1, __m64 __m2) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_sub_pi16(__m64 __m1, __m64 __m2) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_sub_pi32(__m64 __m1, __m64 __m2) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_subs_pi8(__m64 __m1, __m64 __m2) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_subs_pi16(__m64 __m1, __m64 __m2) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_subs_pu8(__m64 __m1, __m64 __m2) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_subs_pu16(__m64 __m1, __m64 __m2) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_madd_pi16(__m64 __m1, __m64 __m2) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_mulhi_pi16(__m64 __m1, __m64 __m2) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_mullo_pi16(__m64 __m1, __m64 __m2) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_sll_pi16(__m64 __m, __m64 __count) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_slli_pi16(__m64 __m, int __count) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_sll_pi32(__m64 __m, __m64 __count) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_slli_pi32(__m64 __m, int __count) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_sll_si64(__m64 __m, __m64 __count) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_slli_si64(__m64 __m, int __count) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_sra_pi16(__m64 __m, __m64 __count) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_srai_pi16(__m64 __m, int __count) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_sra_pi32(__m64 __m, __m64 __count) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_srai_pi32(__m64 __m, int __count) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_srl_pi16(__m64 __m, __m64 __count) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_srli_pi16(__m64 __m, int __count) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_srl_pi32(__m64 __m, __m64 __count) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_srli_pi32(__m64 __m, int __count) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_srl_si64(__m64 __m, __m64 __count) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_srli_si64(__m64 __m, int __count) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_and_si64(__m64 __m1, __m64 __m2) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_andnot_si64(__m64 __m1, __m64 __m2) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_or_si64(__m64 __m1, __m64 __m2) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_xor_si64(__m64 __m1, __m64 __m2) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_cmpeq_pi8(__m64 __m1, __m64 __m2) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_cmpeq_pi16(__m64 __m1, __m64 __m2) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_cmpeq_pi32(__m64 __m1, __m64 __m2) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_cmpgt_pi8(__m64 __m1, __m64 __m2) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_cmpgt_pi16(__m64 __m1, __m64 __m2) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_cmpgt_pi32(__m64 __m1, __m64 __m2) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_setzero_si64(void) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_set_pi32(int __i1, int __i0) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_set_pi16(short __s3, short __s2, short __s1, short __s0) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_set_pi8(char __b7, char __b6, char __b5, char __b4, char __b3, char __b2, char __b1, char __b0) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_set1_pi32(int __i) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_set1_pi16(short __w) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_set1_pi8(char __b) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_setr_pi32(int __i0, int __i1) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_setr_pi16(short __w0, short __w1, short __w2, short __w3) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_setr_pi8(char __b0, char __b1, char __b2, char __b3, char __b4, char __b5, char __b6, char __b7) ; typedef int __v4si __attribute__((__vector_size__(16))); typedef float __v4sf __attribute__((__vector_size__(16))); typedef float __m128 __attribute__((__vector_size__(16), __aligned__(16))); typedef float __m128_u __attribute__((__vector_size__(16), __aligned__(1))); typedef unsigned int __v4su __attribute__((__vector_size__(16))); extern "C" int posix_memalign(void **__memptr, size_t __alignment, size_t __size); static void *__attribute__((__always_inline__, __nodebug__, __malloc__, __alloc_size__(1), __alloc_align__(2))) _mm_malloc(size_t __size, size_t __align) ; static void __attribute__((__always_inline__, __nodebug__)) _mm_free(void *__p) ; static __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_add_ss(__m128 __a, __m128 __b) ; static __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_add_ps(__m128 __a, __m128 __b) ; static __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_sub_ss(__m128 __a, __m128 __b) ; static __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_sub_ps(__m128 __a, __m128 __b) ; static __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_mul_ss(__m128 __a, __m128 __b) ; static __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_mul_ps(__m128 __a, __m128 __b) ; static __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_div_ss(__m128 __a, __m128 __b) ; static __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_div_ps(__m128 __a, __m128 __b) ; static __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_sqrt_ss(__m128 __a) ; static __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_sqrt_ps(__m128 __a) ; static __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_rcp_ss(__m128 __a) ; static __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_rcp_ps(__m128 __a) ; static __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_rsqrt_ss(__m128 __a) ; static int __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_cvtss_si32(__m128 __a) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx,sse"), __min_vector_width__(64))) _mm_cvtps_pi32(__m128 __a) ; static int __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_cvttss_si32(__m128 __a) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx,sse"), __min_vector_width__(64))) _mm_cvttps_pi32(__m128 __a) ; static __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_cvtsi32_ss(__m128 __a, int __b) ; extern "C" { ; } extern "C" { ; ; } typedef double __m128d __attribute__((__vector_size__(16), __aligned__(16))); typedef long long __m128i __attribute__((__vector_size__(16), __aligned__(16))); typedef double __m128d_u __attribute__((__vector_size__(16), __aligned__(1))); typedef long long __m128i_u __attribute__((__vector_size__(16), __aligned__(1))); typedef double __v2df __attribute__((__vector_size__(16))); typedef long long __v2di __attribute__((__vector_size__(16))); typedef short __v8hi __attribute__((__vector_size__(16))); typedef char __v16qi __attribute__((__vector_size__(16))); typedef unsigned long long __v2du __attribute__((__vector_size__(16))); typedef unsigned short __v8hu __attribute__((__vector_size__(16))); typedef unsigned char __v16qu __attribute__((__vector_size__(16))); typedef signed char __v16qs __attribute__((__vector_size__(16))); typedef _Float16 __v8hf __attribute__((__vector_size__(16), __aligned__(16))); typedef _Float16 __m128h __attribute__((__vector_size__(16), __aligned__(16))); typedef _Float16 __m128h_u __attribute__((__vector_size__(16), __aligned__(1))); typedef __bf16 __v8bf __attribute__((__vector_size__(16), __aligned__(16))); typedef __bf16 __m128bh __attribute__((__vector_size__(16), __aligned__(16))); static void __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_store_pd1(double *__dp, __m128d __a) ; static void __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_storeu_pd(double *__dp, __m128d __a) ; static void __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_storer_pd(double *__dp, __m128d __a) ; static void __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_storeh_pd(double *__dp, __m128d __a) ; static void __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_storel_pd(double *__dp, __m128d __a) ; static __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_add_epi8(__m128i __a, __m128i __b) ; static __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_add_epi16(__m128i __a, __m128i __b) ; static __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_add_epi32(__m128i __a, __m128i __b) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx,sse2"), __min_vector_width__(64))) _mm_add_si64(__m64 __a, __m64 __b) ; static __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_add_epi64(__m128i __a, __m128i __b) ; static __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_adds_epi8(__m128i __a, __m128i __b) ; static __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_adds_epi16(__m128i __a, __m128i __b) ; static __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_adds_epu8(__m128i __a, __m128i __b) ; static __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_adds_epu16(__m128i __a, __m128i __b) ; static __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_avg_epu8(__m128i __a, __m128i __b) ; static __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_avg_epu16(__m128i __a, __m128i __b) ; static __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_madd_epi16(__m128i __a, __m128i __b) ; static __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_max_epi16(__m128i __a, __m128i __b) ; static __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_max_epu8(__m128i __a, __m128i __b) ; static __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_min_epi16(__m128i __a, __m128i __b) ; static __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_min_epu8(__m128i __a, __m128i __b) ; static __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_mulhi_epi16(__m128i __a, __m128i __b) ; static __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_mulhi_epu16(__m128i __a, __m128i __b) ; static __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_mullo_epi16(__m128i __a, __m128i __b) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx,sse2"), __min_vector_width__(64))) _mm_mul_su32(__m64 __a, __m64 __b) ; static __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_mul_epu32(__m128i __a, __m128i __b) ; static __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_sad_epu8(__m128i __a, __m128i __b) ; static __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_sub_epi8(__m128i __a, __m128i __b) ; static __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_sub_epi16(__m128i __a, __m128i __b) ; static __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_sub_epi32(__m128i __a, __m128i __b) ; static __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx,sse2"), __min_vector_width__(64))) _mm_sub_si64(__m64 __a, __m64 __b) ; static __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_sub_epi64(__m128i __a, __m128i __b) ; static __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_subs_epi8(__m128i __a, __m128i __b) ; static __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_subs_epi16(__m128i __a, __m128i __b) ; extern "C" { ; ; ; } extern "C" { ; } struct __uintr_frame { unsigned long long rip; unsigned long long rflags; unsigned long long rsp; }; typedef enum { _CMPCCX_O, _CMPCCX_NO, _CMPCCX_B, _CMPCCX_NB, _CMPCCX_Z, _CMPCCX_NZ, _CMPCCX_BE, _CMPCCX_NBE, _CMPCCX_S, _CMPCCX_NS, _CMPCCX_P, _CMPCCX_NP, _CMPCCX_L, _CMPCCX_NL, _CMPCCX_LE, _CMPCCX_NLE, } _CMPCCX_ENUM; typedef double __v4df __attribute__ ((__vector_size__ (32))); typedef float __v8sf __attribute__ ((__vector_size__ (32))); typedef long long __v4di __attribute__ ((__vector_size__ (32))); typedef int __v8si __attribute__ ((__vector_size__ (32))); typedef short __v16hi __attribute__ ((__vector_size__ (32))); typedef char __v32qi __attribute__ ((__vector_size__ (32))); typedef unsigned long long __v4du __attribute__ ((__vector_size__ (32))); typedef unsigned int __v8su __attribute__ ((__vector_size__ (32))); typedef unsigned short __v16hu __attribute__ ((__vector_size__ (32))); typedef unsigned char __v32qu __attribute__ ((__vector_size__ (32))); typedef signed char __v32qs __attribute__((__vector_size__(32))); typedef float __m256 __attribute__ ((__vector_size__ (32), __aligned__(32))); typedef double __m256d __attribute__((__vector_size__(32), __aligned__(32))); typedef long long __m256i __attribute__((__vector_size__(32), __aligned__(32))); typedef float __m256_u __attribute__ ((__vector_size__ (32), __aligned__(1))); typedef double __m256d_u __attribute__((__vector_size__(32), __aligned__(1))); typedef long long __m256i_u __attribute__((__vector_size__(32), __aligned__(1))); typedef _Float16 __v16hf __attribute__((__vector_size__(32), __aligned__(32))); typedef _Float16 __m256h __attribute__((__vector_size__(32), __aligned__(32))); typedef _Float16 __m256h_u __attribute__((__vector_size__(32), __aligned__(1))); typedef __bf16 __v16bf __attribute__((__vector_size__(32), __aligned__(32))); typedef __bf16 __m256bh __attribute__((__vector_size__(32), __aligned__(32))); typedef char __v64qi __attribute__((__vector_size__(64))); typedef short __v32hi __attribute__((__vector_size__(64))); typedef double __v8df __attribute__((__vector_size__(64))); typedef float __v16sf __attribute__((__vector_size__(64))); typedef long long __v8di __attribute__((__vector_size__(64))); typedef int __v16si __attribute__((__vector_size__(64))); typedef unsigned char __v64qu __attribute__((__vector_size__(64))); typedef unsigned short __v32hu __attribute__((__vector_size__(64))); typedef unsigned long long __v8du __attribute__((__vector_size__(64))); typedef unsigned int __v16su __attribute__((__vector_size__(64))); typedef signed char __v64qs __attribute__((__vector_size__(64))); typedef float __m512 __attribute__((__vector_size__(64), __aligned__(64))); typedef double __m512d __attribute__((__vector_size__(64), __aligned__(64))); typedef long long __m512i __attribute__((__vector_size__(64), __aligned__(64))); typedef float __m512_u __attribute__((__vector_size__(64), __aligned__(1))); typedef double __m512d_u __attribute__((__vector_size__(64), __aligned__(1))); typedef long long __m512i_u __attribute__((__vector_size__(64), __aligned__(1))); typedef unsigned char __mmask8; typedef unsigned short __mmask16; typedef enum { _MM_CMPINT_EQ, _MM_CMPINT_LT, _MM_CMPINT_LE, _MM_CMPINT_UNUSED, _MM_CMPINT_NE, _MM_CMPINT_NLT, _MM_CMPINT_NLE } _MM_CMPINT_ENUM; typedef enum { _MM_PERM_AAAA = 0x00, _MM_PERM_AAAB = 0x01, _MM_PERM_AAAC = 0x02, _MM_PERM_AAAD = 0x03, _MM_PERM_AABA = 0x04, _MM_PERM_AABB = 0x05, _MM_PERM_AABC = 0x06, _MM_PERM_AABD = 0x07, _MM_PERM_AACA = 0x08, _MM_PERM_AACB = 0x09, _MM_PERM_AACC = 0x0A, _MM_PERM_AACD = 0x0B, _MM_PERM_AADA = 0x0C, _MM_PERM_AADB = 0x0D, _MM_PERM_AADC = 0x0E, _MM_PERM_AADD = 0x0F, _MM_PERM_ABAA = 0x10, _MM_PERM_ABAB = 0x11, _MM_PERM_ABAC = 0x12, _MM_PERM_ABAD = 0x13, _MM_PERM_ABBA = 0x14, _MM_PERM_ABBB = 0x15, _MM_PERM_ABBC = 0x16, _MM_PERM_ABBD = 0x17, _MM_PERM_ABCA = 0x18, _MM_PERM_ABCB = 0x19, _MM_PERM_ABCC = 0x1A, _MM_PERM_ABCD = 0x1B, _MM_PERM_ABDA = 0x1C, _MM_PERM_ABDB = 0x1D, _MM_PERM_ABDC = 0x1E, _MM_PERM_ABDD = 0x1F, _MM_PERM_ACAA = 0x20, _MM_PERM_ACAB = 0x21, _MM_PERM_ACAC = 0x22, _MM_PERM_ACAD = 0x23, _MM_PERM_ACBA = 0x24, _MM_PERM_ACBB = 0x25, _MM_PERM_ACBC = 0x26, _MM_PERM_ACBD = 0x27, _MM_PERM_ACCA = 0x28, _MM_PERM_ACCB = 0x29, _MM_PERM_ACCC = 0x2A, _MM_PERM_ACCD = 0x2B, _MM_PERM_ACDA = 0x2C, _MM_PERM_ACDB = 0x2D, _MM_PERM_ACDC = 0x2E, _MM_PERM_ACDD = 0x2F, _MM_PERM_ADAA = 0x30, _MM_PERM_ADAB = 0x31, _MM_PERM_ADAC = 0x32, _MM_PERM_ADAD = 0x33, _MM_PERM_ADBA = 0x34, _MM_PERM_ADBB = 0x35, _MM_PERM_ADBC = 0x36, _MM_PERM_ADBD = 0x37, _MM_PERM_ADCA = 0x38, _MM_PERM_ADCB = 0x39, _MM_PERM_ADCC = 0x3A, _MM_PERM_ADCD = 0x3B, _MM_PERM_ADDA = 0x3C, _MM_PERM_ADDB = 0x3D, _MM_PERM_ADDC = 0x3E, _MM_PERM_ADDD = 0x3F, _MM_PERM_BAAA = 0x40, _MM_PERM_BAAB = 0x41, _MM_PERM_BAAC = 0x42, _MM_PERM_BAAD = 0x43, _MM_PERM_BABA = 0x44, _MM_PERM_BABB = 0x45, _MM_PERM_BABC = 0x46, _MM_PERM_BABD = 0x47, _MM_PERM_BACA = 0x48, _MM_PERM_BACB = 0x49, _MM_PERM_BACC = 0x4A, _MM_PERM_BACD = 0x4B, _MM_PERM_BADA = 0x4C, _MM_PERM_BADB = 0x4D, _MM_PERM_BADC = 0x4E, _MM_PERM_BADD = 0x4F, _MM_PERM_BBAA = 0x50, _MM_PERM_BBAB = 0x51, _MM_PERM_BBAC = 0x52, _MM_PERM_BBAD = 0x53, _MM_PERM_BBBA = 0x54, _MM_PERM_BBBB = 0x55, _MM_PERM_BBBC = 0x56, _MM_PERM_BBBD = 0x57, _MM_PERM_BBCA = 0x58, _MM_PERM_BBCB = 0x59, _MM_PERM_BBCC = 0x5A, _MM_PERM_BBCD = 0x5B, _MM_PERM_BBDA = 0x5C, _MM_PERM_BBDB = 0x5D, _MM_PERM_BBDC = 0x5E, _MM_PERM_BBDD = 0x5F, _MM_PERM_BCAA = 0x60, _MM_PERM_BCAB = 0x61, _MM_PERM_BCAC = 0x62, _MM_PERM_BCAD = 0x63, _MM_PERM_BCBA = 0x64, _MM_PERM_BCBB = 0x65, _MM_PERM_BCBC = 0x66, _MM_PERM_BCBD = 0x67, _MM_PERM_BCCA = 0x68, _MM_PERM_BCCB = 0x69, _MM_PERM_BCCC = 0x6A, _MM_PERM_BCCD = 0x6B, _MM_PERM_BCDA = 0x6C, _MM_PERM_BCDB = 0x6D, _MM_PERM_BCDC = 0x6E, _MM_PERM_BCDD = 0x6F, _MM_PERM_BDAA = 0x70, _MM_PERM_BDAB = 0x71, _MM_PERM_BDAC = 0x72, _MM_PERM_BDAD = 0x73, _MM_PERM_BDBA = 0x74, _MM_PERM_BDBB = 0x75, _MM_PERM_BDBC = 0x76, _MM_PERM_BDBD = 0x77, _MM_PERM_BDCA = 0x78, _MM_PERM_BDCB = 0x79, _MM_PERM_BDCC = 0x7A, _MM_PERM_BDCD = 0x7B, _MM_PERM_BDDA = 0x7C, _MM_PERM_BDDB = 0x7D, _MM_PERM_BDDC = 0x7E, _MM_PERM_BDDD = 0x7F, _MM_PERM_CAAA = 0x80, _MM_PERM_CAAB = 0x81, _MM_PERM_CAAC = 0x82, _MM_PERM_CAAD = 0x83, _MM_PERM_CABA = 0x84, _MM_PERM_CABB = 0x85, _MM_PERM_CABC = 0x86, _MM_PERM_CABD = 0x87, _MM_PERM_CACA = 0x88, _MM_PERM_CACB = 0x89, _MM_PERM_CACC = 0x8A, _MM_PERM_CACD = 0x8B, _MM_PERM_CADA = 0x8C, _MM_PERM_CADB = 0x8D, _MM_PERM_CADC = 0x8E, _MM_PERM_CADD = 0x8F, _MM_PERM_CBAA = 0x90, _MM_PERM_CBAB = 0x91, _MM_PERM_CBAC = 0x92, _MM_PERM_CBAD = 0x93, _MM_PERM_CBBA = 0x94, _MM_PERM_CBBB = 0x95, _MM_PERM_CBBC = 0x96, _MM_PERM_CBBD = 0x97, _MM_PERM_CBCA = 0x98, _MM_PERM_CBCB = 0x99, _MM_PERM_CBCC = 0x9A, _MM_PERM_CBCD = 0x9B, _MM_PERM_CBDA = 0x9C, _MM_PERM_CBDB = 0x9D, _MM_PERM_CBDC = 0x9E, _MM_PERM_CBDD = 0x9F, _MM_PERM_CCAA = 0xA0, _MM_PERM_CCAB = 0xA1, _MM_PERM_CCAC = 0xA2, _MM_PERM_CCAD = 0xA3, _MM_PERM_CCBA = 0xA4, _MM_PERM_CCBB = 0xA5, _MM_PERM_CCBC = 0xA6, _MM_PERM_CCBD = 0xA7, _MM_PERM_CCCA = 0xA8, _MM_PERM_CCCB = 0xA9, _MM_PERM_CCCC = 0xAA, _MM_PERM_CCCD = 0xAB, _MM_PERM_CCDA = 0xAC, _MM_PERM_CCDB = 0xAD, _MM_PERM_CCDC = 0xAE, _MM_PERM_CCDD = 0xAF, _MM_PERM_CDAA = 0xB0, _MM_PERM_CDAB = 0xB1, _MM_PERM_CDAC = 0xB2, _MM_PERM_CDAD = 0xB3, _MM_PERM_CDBA = 0xB4, _MM_PERM_CDBB = 0xB5, _MM_PERM_CDBC = 0xB6, _MM_PERM_CDBD = 0xB7, _MM_PERM_CDCA = 0xB8, _MM_PERM_CDCB = 0xB9, _MM_PERM_CDCC = 0xBA, _MM_PERM_CDCD = 0xBB, _MM_PERM_CDDA = 0xBC, _MM_PERM_CDDB = 0xBD, _MM_PERM_CDDC = 0xBE, _MM_PERM_CDDD = 0xBF, _MM_PERM_DAAA = 0xC0, _MM_PERM_DAAB = 0xC1, _MM_PERM_DAAC = 0xC2, _MM_PERM_DAAD = 0xC3, _MM_PERM_DABA = 0xC4, _MM_PERM_DABB = 0xC5, _MM_PERM_DABC = 0xC6, _MM_PERM_DABD = 0xC7, _MM_PERM_DACA = 0xC8, _MM_PERM_DACB = 0xC9, _MM_PERM_DACC = 0xCA, _MM_PERM_DACD = 0xCB, _MM_PERM_DADA = 0xCC, _MM_PERM_DADB = 0xCD, _MM_PERM_DADC = 0xCE, _MM_PERM_DADD = 0xCF, _MM_PERM_DBAA = 0xD0, _MM_PERM_DBAB = 0xD1, _MM_PERM_DBAC = 0xD2, _MM_PERM_DBAD = 0xD3, _MM_PERM_DBBA = 0xD4, _MM_PERM_DBBB = 0xD5, _MM_PERM_DBBC = 0xD6, _MM_PERM_DBBD = 0xD7, _MM_PERM_DBCA = 0xD8, _MM_PERM_DBCB = 0xD9, _MM_PERM_DBCC = 0xDA, _MM_PERM_DBCD = 0xDB, _MM_PERM_DBDA = 0xDC, _MM_PERM_DBDB = 0xDD, _MM_PERM_DBDC = 0xDE, _MM_PERM_DBDD = 0xDF, _MM_PERM_DCAA = 0xE0, _MM_PERM_DCAB = 0xE1, _MM_PERM_DCAC = 0xE2, _MM_PERM_DCAD = 0xE3, _MM_PERM_DCBA = 0xE4, _MM_PERM_DCBB = 0xE5, _MM_PERM_DCBC = 0xE6, _MM_PERM_DCBD = 0xE7, _MM_PERM_DCCA = 0xE8, _MM_PERM_DCCB = 0xE9, _MM_PERM_DCCC = 0xEA, _MM_PERM_DCCD = 0xEB, _MM_PERM_DCDA = 0xEC, _MM_PERM_DCDB = 0xED, _MM_PERM_DCDC = 0xEE, _MM_PERM_DCDD = 0xEF, _MM_PERM_DDAA = 0xF0, _MM_PERM_DDAB = 0xF1, _MM_PERM_DDAC = 0xF2, _MM_PERM_DDAD = 0xF3, _MM_PERM_DDBA = 0xF4, _MM_PERM_DDBB = 0xF5, _MM_PERM_DDBC = 0xF6, _MM_PERM_DDBD = 0xF7, _MM_PERM_DDCA = 0xF8, _MM_PERM_DDCB = 0xF9, _MM_PERM_DDCC = 0xFA, _MM_PERM_DDCD = 0xFB, _MM_PERM_DDDA = 0xFC, _MM_PERM_DDDB = 0xFD, _MM_PERM_DDDC = 0xFE, _MM_PERM_DDDD = 0xFF } _MM_PERM_ENUM; typedef enum { _MM_MANT_NORM_1_2, _MM_MANT_NORM_p5_2, _MM_MANT_NORM_p5_1, _MM_MANT_NORM_p75_1p5 } _MM_MANTISSA_NORM_ENUM; typedef enum { _MM_MANT_SIGN_src, _MM_MANT_SIGN_zero, _MM_MANT_SIGN_nan } _MM_MANTISSA_SIGN_ENUM; typedef enum { _MM_TERNLOG_A = 0xF0, _MM_TERNLOG_B = 0xCC, _MM_TERNLOG_C = 0xAA } _MM_TERNLOG_ENUM; typedef short __v2hi __attribute__((__vector_size__(4))); typedef char __v4qi __attribute__((__vector_size__(4))); typedef char __v2qi __attribute__((__vector_size__(2))); typedef unsigned int __mmask32; typedef unsigned long long __mmask64; typedef _Float16 __v32hf __attribute__((__vector_size__(64), __aligned__(64))); typedef _Float16 __m512h __attribute__((__vector_size__(64), __aligned__(64))); typedef _Float16 __m512h_u __attribute__((__vector_size__(64), __aligned__(1))); typedef __bf16 __v32bf __attribute__((__vector_size__(64), __aligned__(64))); typedef __bf16 __m512bh __attribute__((__vector_size__(64), __aligned__(64))); typedef __bf16 __bfloat16 __attribute__((deprecated("use __bf16 instead"))); extern "C" { ; ; ; ; ; ; } typedef int _tile1024i __attribute__((__vector_size__(1024), __aligned__(64))); typedef struct __tile1024i_str { const unsigned short row; const unsigned short col; _tile1024i tile; } __tile1024i; namespace folly { struct F14TableStats { char const* policy; std::size_t size{0}; std::size_t valueSize{0}; std::size_t bucketCount{0}; std::size_t chunkCount{0}; std::vector<std::size_t> chunkOccupancyHisto; std::vector<std::size_t> chunkOutboundOverflowHisto; std::vector<std::size_t> chunkHostedOverflowHisto; std::vector<std::size_t> keyProbeLengthHisto; std::vector<std::size_t> missProbeLengthHisto; std::size_t totalBytes{0}; std::size_t overheadBytes{0}; private: ; public: ; }; namespace f14 { namespace detail { template <F14IntrinsicsMode> struct F14LinkCheck {}; template <> struct F14LinkCheck<getF14IntrinsicsMode()> { }; template <typename H> struct StdIsFastHash : std::true_type {}; template <> struct StdIsFastHash<std::hash<long double>> : std::false_type {}; template <typename... Args> struct StdIsFastHash<std::hash<std::basic_string<Args...>>> : std::false_type { }; template <typename... Args> struct StdIsFastHash<std::hash<std::basic_string_view<Args...>>> : std::false_type {}; template <typename K, typename V, typename H, typename Enable = void> struct StdNodeReplica { void* next; V value; }; template <typename K, typename V, typename H> struct StdNodeReplica< K, V, H, std::enable_if_t< !StdIsFastHash<H>::value || !is_nothrow_invocable_v<H, K>>> { void* next; V value; std::size_t hash; }; ; } } namespace f14 { namespace detail { template <typename Policy> class F14Table; } } class F14HashToken final { public: private: using HashPair = std::pair<std::size_t, std::size_t>; HashPair hp_; template <typename Policy> friend class f14::detail::F14Table; template <typename Key, typename Hasher> friend class F14HashedKey; }; namespace f14 { namespace detail { template <typename Hasher, typename Void = void> struct ShouldAssume32BitHash : std::bool_constant<!require_sizeof<Hasher>> {}; template <typename Hasher> struct ShouldAssume32BitHash< Hasher, void_t<typename Hasher::folly_assume_32bit_hash>> : std::bool_constant<Hasher::folly_assume_32bit_hash::value> {}; ; } } template <typename TKeyType, typename Hasher = f14::DefaultHasher<TKeyType>> class F14HashedKey final { public: ; private: TKeyType key_; F14HashToken hash_; }; namespace f14 { namespace detail { template <typename Arg, typename Default> using VoidDefault = std::conditional_t<std::is_same<Arg, Default>::value, void, Arg>; template <typename Arg, typename Default> using Defaulted = std::conditional_t<std::is_same<Arg, void>::value, Default, Arg>; ; using TagVector = __m128i; constexpr std::size_t kRequiredVectorAlignment = constexpr_max(std::size_t{16}, alignof(max_align_t)); using EmptyTagVectorType = std::aligned_storage_t< sizeof(TagVector) + kRequiredVectorAlignment, alignof(max_align_t)>; __attribute__((__visibility__("default"))) extern EmptyTagVectorType kEmptyTagVector; template <typename ItemType> struct alignas(kRequiredVectorAlignment) F14Chunk { using Item = ItemType; static constexpr unsigned kCapacity = sizeof(Item) == 4 ? 12 : 14; static constexpr unsigned kDesiredCapacity = kCapacity - 2; static constexpr unsigned kAllocatedCapacity = kCapacity + (sizeof(Item) == 16 ? 1 : 0); static constexpr std::size_t kCapacityScaleBits = kCapacity == 12 ? 16 : 4; static constexpr std::size_t kCapacityScaleShift = kCapacityScaleBits - 4; static constexpr MaskType kFullMask = FullMask<kCapacity>::value; std::array<uint8_t, 14> tags_; uint8_t control_; uint8_t outboundOverflowCount_; std::array<aligned_storage_for_t<Item>, kAllocatedCapacity> rawItems_; static constexpr uint8_t kIncrHostedOverflowCount = 0x10; static constexpr uint8_t kDecrHostedOverflowCount = static_cast<uint8_t>(-0x10); std::size_t capacityScale() const ; void setCapacityScale(std::size_t scale) ; void markEof(std::size_t scale) ; unsigned outboundOverflowCount() const ; void incrOutboundOverflowCount() ; void decrOutboundOverflowCount() ; std::size_t tag(std::size_t index) const ; void setTag(std::size_t index, std::size_t tag) ; void clearTag(std::size_t index) ; TagVector const* tagVector() const ; SparseMaskIter tagMatchIter(std::size_t needle) const ; MaskType occupiedMask() const ; DenseMaskIter occupiedIter() const ; MaskRangeIter occupiedRangeIter() const ; LastOccupiedInMask lastOccupied() const ; FirstEmptyInMask firstEmpty() const ; bool occupied(std::size_t index) const ; Item* itemAddr(std::size_t i) const ; Item& item(std::size_t i) ; Item const& citem(std::size_t i) const ; static F14Chunk& owner(Item& item, std::size_t index) ; }; template <typename Ptr> class PackedChunkItemPtr { public: PackedChunkItemPtr(Ptr p, std::size_t i) ; Ptr ptr() const ; std::size_t index() const ; bool operator<(PackedChunkItemPtr const& rhs) const ; bool operator==(PackedChunkItemPtr const& rhs) const ; bool operator!=(PackedChunkItemPtr const& rhs) const ; private: Ptr ptr_; std::size_t index_; }; template <typename T> class PackedChunkItemPtr<T*> { static_assert((alignof(F14Chunk<T>) % 16) == 0, ""); static constexpr uintptr_t powerMod(uintptr_t x, uintptr_t y, uintptr_t m) ; static constexpr uintptr_t kIndexBits = 4; static constexpr uintptr_t kIndexMask = (uintptr_t{1} << kIndexBits) - 1; static constexpr uintptr_t kAlignBits = constexpr_min( uintptr_t{4}, constexpr_find_first_set(uintptr_t{sizeof(T)}) - 1); static constexpr uintptr_t kAlignMask = (uintptr_t{1} << kAlignBits) - 1; static constexpr uintptr_t kModulus = uintptr_t{1} << (kIndexBits - kAlignBits); static constexpr uintptr_t kSizeInverse = powerMod(sizeof(T) >> kAlignBits, kModulus - 1, kModulus); public: PackedChunkItemPtr(T* p, std::size_t i) noexcept ; T* ptr() const ; std::size_t index() const ; bool operator<(PackedChunkItemPtr const& rhs) const ; bool operator==(PackedChunkItemPtr const& rhs) const ; bool operator!=(PackedChunkItemPtr const& rhs) const ; private: uintptr_t raw_; }; template <typename ChunkPtr> class F14ItemIter { private: using Chunk = typename std::pointer_traits<ChunkPtr>::element_type; public: using Item = typename Chunk::Item; using ItemPtr = typename std::pointer_traits<ChunkPtr>::template rebind<Item>; using ItemConstPtr = typename std::pointer_traits<ChunkPtr>::template rebind<Item const>; using Packed = PackedChunkItemPtr<ItemPtr>; F14ItemIter() ; explicit F14ItemIter(Packed const& packed) ; F14ItemIter(ChunkPtr chunk, std::size_t index) ; __attribute__((__always_inline__)) void advanceImpl(bool checkEof, bool likelyDead) ; void precheckedAdvance() ; __attribute__((__always_inline__)) void advance() ; __attribute__((__always_inline__)) void advanceLikelyDead() ; ChunkPtr chunk() const ; std::size_t index() const ; Item* itemAddr() const ; Item& item() const ; Item const& citem() const ; bool atEnd() const ; Packed pack() const ; bool operator==(F14ItemIter const& rhs) const ; bool operator!=(F14ItemIter const& rhs) const ; private: ItemPtr itemPtr_; std::size_t index_; }; struct PackedSizeAndChunkShift { private: static constexpr uint32_t kSizeShift = 8; static constexpr uint32_t kChunkCountShiftMask = (1 << kSizeShift) - 1; uint64_t packedSizeAndChunkShift_{0}; public: static constexpr uint8_t kMaxSupportedChunkShift = std::numeric_limits<uint64_t>::digits - 1; static constexpr std::size_t kMaxSize = (size_t(1) << (std::numeric_limits<std::size_t>::digits - kSizeShift)) - 1; uint64_t size() const noexcept ; uint8_t chunkShift() const noexcept ; std::size_t chunkCount() const noexcept ; void setSize(std::size_t sz) noexcept ; void setChunkCount(std::size_t newCount) ; void swap(PackedSizeAndChunkShift& rhs) noexcept ; }; struct UnpackedSizeAndChunkShift { private: std::size_t size_ = 0; uint8_t chunkShift_ = 0; public: static constexpr uint8_t kMaxSupportedChunkShift = std::numeric_limits<std::size_t>::digits - 1; static constexpr std::size_t kMaxSize = std::numeric_limits<std::size_t>::max(); uint64_t size() const noexcept ; uint8_t chunkShift() const noexcept ; std::size_t chunkCount() const noexcept ; void setSize(std::size_t sz) noexcept ; void setChunkCount(std::size_t newCount) ; void swap(UnpackedSizeAndChunkShift& rhs) noexcept ; }; using SizeAndChunkShift = std::conditional_t< sizeof(uint64_t) == sizeof(std::size_t), PackedSizeAndChunkShift, UnpackedSizeAndChunkShift>; template <typename ItemIter, bool EnablePackedItemIter> struct SizeAndChunkShiftAndPackedBegin { private: SizeAndChunkShift sizeAndChunkShift_; typename ItemIter::Packed packedBegin_{ItemIter{}.pack()}; public: auto size() const ; auto chunkShift() const ; auto chunkCount() const ; void setSize(uint64_t sz) ; void incrementSize() ; void decrementSize() ; void setChunkCount(std::size_t count) ; typename ItemIter::Packed& packedBegin() ; typename ItemIter::Packed const& packedBegin() const ; void swap(SizeAndChunkShiftAndPackedBegin& rhs) noexcept ; }; template <typename ItemIter> struct SizeAndChunkShiftAndPackedBegin<ItemIter, false> { private: SizeAndChunkShift sizeAndChunkShift_; public: auto size() const ; auto chunkShift() const ; auto chunkCount() const ; void setSize(uint64_t sz) ; void incrementSize() ; void decrementSize() ; void setChunkCount(std::size_t count) ; [[noreturn]] typename ItemIter::Packed& packedBegin() ; [[noreturn]] typename ItemIter::Packed const& packedBegin() const ; }; template <typename Policy> class F14Table : public Policy { public: using Item = typename Policy::Item; using value_type = typename Policy::Value; using allocator_type = typename Policy::Alloc; private: using Alloc = typename Policy::Alloc; using AllocTraits = typename Policy::AllocTraits; using Hasher = typename Policy::Hasher; using InternalSizeType = typename Policy::InternalSizeType; using KeyEqual = typename Policy::KeyEqual; using Policy::kAllocIsAlwaysEqual; using Policy::kContinuousCapacity; using Policy::kDefaultConstructIsNoexcept; using Policy::kEnableItemIteration; using Policy::kSwapIsNoexcept; using Policy::destroyItemOnClear; using Policy::isAvalanchingHasher; using Policy::prefetchBeforeCopy; using Policy::prefetchBeforeDestroy; using Policy::prefetchBeforeRehash; using Policy::shouldAssume32BitHash; using ByteAlloc = typename AllocTraits::template rebind_alloc<uint8_t>; using BytePtr = typename std::allocator_traits<ByteAlloc>::pointer; using Chunk = F14Chunk<Item>; using ChunkPtr = typename std::pointer_traits<BytePtr>::template rebind<Chunk>; using HashPair = typename F14HashToken::HashPair; public: using ItemIter = F14ItemIter<ChunkPtr>; private: ChunkPtr chunks_{Chunk::emptyInstance()}; SizeAndChunkShiftAndPackedBegin<ItemIter, kEnableItemIteration> sizeAndChunkShiftAndPackedBegin_; auto chunkShift() const ; auto chunkCount() const ; std::size_t moduloByChunkCount(std::size_t index) const ; void swapContents(F14Table& rhs) noexcept ; public: F14Table() noexcept(Policy::kDefaultConstructIsNoexcept) ; F14Table( std::size_t initialCapacity, Hasher const& hasher, KeyEqual const& keyEqual, Alloc const& alloc) ; F14Table(F14Table const& rhs) ; F14Table(F14Table const& rhs, Alloc const& alloc) ; F14Table(F14Table&& rhs) noexcept( std::is_nothrow_move_constructible<Hasher>::value && std::is_nothrow_move_constructible<KeyEqual>::value && std::is_nothrow_move_constructible<Alloc>::value) ; F14Table(F14Table&& rhs, Alloc const& alloc) noexcept(kAllocIsAlwaysEqual) ; F14Table& operator=(F14Table const& rhs) ; F14Table& operator=(F14Table&& rhs) noexcept( std::is_nothrow_move_assignable<Hasher>::value && std::is_nothrow_move_assignable<KeyEqual>::value && (kAllocIsAlwaysEqual || (AllocTraits::propagate_on_container_move_assignment::value && std::is_nothrow_move_assignable<Alloc>::value))) ; ~F14Table() ; void swap(F14Table& rhs) noexcept(kSwapIsNoexcept) ; private: static HashPair splitHash(std::size_t hash) ; static std::size_t computeCapacity( std::size_t chunkCount, std::size_t scale) ; std::pair<std::size_t, std::size_t> computeChunkCountAndScale( std::size_t desiredCapacity, bool continuousSingleChunkCapacity, bool continuousMultiChunkCapacity) const ; static std::size_t chunkAllocSize( std::size_t chunkCount, std::size_t capacityScale) ; ChunkPtr initializeChunks( BytePtr raw, std::size_t chunkCount, std::size_t capacityScale) ; std::size_t itemCount() const noexcept ; public: ItemIter begin() const noexcept ; ItemIter end() const noexcept ; bool empty() const noexcept ; auto size() const noexcept ; std::size_t max_size() const noexcept ; std::size_t bucket_count() const noexcept ; std::size_t max_bucket_count() const noexcept ; float load_factor() const noexcept ; float max_load_factor() const noexcept ; void max_load_factor(float) noexcept ; private: std::size_t probeDelta(HashPair hp) const ; enum class Prefetch { DISABLED, ENABLED }; template <typename K> __attribute__((__always_inline__)) ItemIter findImpl(HashPair hp, K const& key, Prefetch prefetch) const ; public: template <typename K> F14HashToken prehash(K const& key) const ; void prefetch(F14HashToken const& token) const ; template <typename K> __attribute__((__always_inline__)) ItemIter find(K const& key) const ; template <typename K> __attribute__((__always_inline__)) ItemIter find(F14HashToken const& token, K const& key) const ; template <typename K, typename F> __attribute__((__always_inline__)) ItemIter findMatching(K const& key, F&& func) const ; private: void adjustSizeAndBeginAfterInsert(ItemIter iter) ; void eraseBlank(ItemIter iter, HashPair hp) ; void adjustSizeAndBeginBeforeErase(ItemIter iter) ; template <typename... Args> void insertAtBlank(ItemIter pos, HashPair hp, Args&&... args) ; ItemIter allocateTag(uint8_t* fullness, HashPair hp) ; ChunkPtr lastOccupiedChunk() const ; template <typename T> void directBuildFrom(T&& src) ; template <typename T> void rehashBuildFrom(T&& src) ; template <typename T> __attribute__((__noinline__)) void buildFromF14Table(T&& src) ; void maybeRehash(std::size_t desiredCapacity, bool attemptExact) ; void reserveImpl(std::size_t requestedCapacity) ; __attribute__((__noinline__)) void reserveForInsertImpl( std::size_t capacityMinusOne, std::size_t origChunkCount, std::size_t origCapacityScale, std::size_t origCapacity) ; void initialReserve(std::size_t desiredCapacity) ; void rehashImpl( std::size_t origSize, std::size_t origChunkCount, std::size_t origCapacityScale, std::size_t newChunkCount, std::size_t newCapacityScale) ; __attribute__((__always_inline__)) void debugModeOnReserve(std::size_t capacity) ; void debugModeSpuriousRehash() ; __attribute__((__always_inline__)) void debugModeBeforeInsert() ; __attribute__((__always_inline__)) void debugModeAfterInsert() ; __attribute__((__always_inline__)) void debugModePerturbSlotInsertOrder( ChunkPtr chunk, std::size_t& itemIndex) ; public: void rehash(std::size_t capacity) ; void reserve(std::size_t capacity) ; void reserveForInsert(size_t incoming = 1) ; template <typename K, typename... Args> std::pair<ItemIter, bool> tryEmplaceValue(K const& key, Args&&... args) ; template <typename K, typename... Args> std::pair<ItemIter, bool> tryEmplaceValueWithToken( F14HashToken const& token, K const& key, Args&&... args) ; template <typename K, typename... Args> std::pair<ItemIter, bool> tryEmplaceValueImpl( HashPair hp, K const& key, Args&&... args) ; private: template <bool Reset> void clearImpl() noexcept ; void eraseImpl(ItemIter pos, HashPair hp) ; public: template <typename BeforeDestroy> void eraseIterInto(ItemIter pos, BeforeDestroy&& beforeDestroy) ; template <typename K, typename BeforeDestroy> std::size_t eraseKeyInto(K const& key, BeforeDestroy&& beforeDestroy) ; void clear() noexcept ; void reset() noexcept ; std::size_t getAllocatedMemorySize() const ; template <typename V> void visitAllocationClasses(V&& visitor) const ; template <typename V> void visitItems(V&& visitor) const ; template <typename V> void visitContiguousItemRanges(V&& visitor) const ; private: static std::size_t& histoAt( std::vector<std::size_t>& histo, std::size_t index) ; public: F14TableStats computeStats() const ; }; } } namespace f14 { namespace test { void disableInsertOrderRandomization() ; } } } namespace folly { namespace detail { template <typename KeyType, typename Alloc> struct TemporaryEmplaceKey { TemporaryEmplaceKey(TemporaryEmplaceKey const&) = delete; TemporaryEmplaceKey(TemporaryEmplaceKey&&) = delete; template <typename... Args> TemporaryEmplaceKey(Alloc& a, std::tuple<Args...>&& args) ; ~TemporaryEmplaceKey() ; KeyType& value() ; Alloc& alloc_; std::aligned_storage_t<sizeof(KeyType), alignof(KeyType)> raw_; }; template < typename KeyType, typename MappedType, typename Func, typename UsableKeyType, typename Arg1, typename Arg2, std::enable_if_t< std::is_constructible< std::pair<KeyType const, MappedType>, Arg1&&, Arg2&&>::value, int> = 0> auto callWithKeyAndPairArgs( Func&& f, UsableKeyType const& key, std::tuple<Arg1>&& first_args, std::tuple<Arg2>&& second_args) ; template < typename KeyType, typename MappedType, typename Func, typename UsableKeyType, typename... Args1, typename... Args2> auto callWithKeyAndPairArgs( Func&& f, UsableKeyType const& key, std::tuple<Args1...>&& first_args, std::tuple<Args2...>&& second_args) ; template <typename> using ExactKeyMatchOnly = std::false_type; template < typename KeyType, typename MappedType, template <typename> class UsableAsKey = ExactKeyMatchOnly, typename Alloc, typename Func, typename Arg1, typename... Args2, std::enable_if_t< std::is_same<remove_cvref_t<Arg1>, KeyType>::value || UsableAsKey<remove_cvref_t<Arg1>>::value, int> = 0> auto callWithExtractedKey( Alloc&, Func&& f, std::piecewise_construct_t, std::tuple<Arg1>&& first_args, std::tuple<Args2...>&& second_args) ; template < typename KeyType, typename MappedType, template <typename> class UsableAsKey = ExactKeyMatchOnly, typename Alloc, typename Func, typename... Args1, typename... Args2> auto callWithExtractedKey( Alloc& a, Func&& f, std::piecewise_construct_t, std::tuple<Args1...>&& first_args, std::tuple<Args2...>&& second_args) ; template < typename KeyType, typename MappedType, template <typename> class UsableAsKey = ExactKeyMatchOnly, typename Alloc, typename Func> auto callWithExtractedKey(Alloc& a, Func&& f) ; template < typename KeyType, typename MappedType, template <typename> class UsableAsKey = ExactKeyMatchOnly, typename Alloc, typename Func, typename U1, typename U2> auto callWithExtractedKey(Alloc& a, Func&& f, U1&& x, U2&& y) ; template < typename KeyType, typename MappedType, template <typename> class UsableAsKey = ExactKeyMatchOnly, typename Alloc, typename Func, typename U1, typename U2> auto callWithExtractedKey(Alloc& a, Func&& f, std::pair<U1, U2> const& p) ; template < typename KeyType, typename MappedType, template <typename> class UsableAsKey = ExactKeyMatchOnly, typename Alloc, typename Func, typename U1, typename U2> auto callWithExtractedKey(Alloc& a, Func&& f, std::pair<U1, U2>&& p) ; template < typename KeyType, template <typename> class UsableAsKey = ExactKeyMatchOnly, typename Alloc, typename Func, typename Arg, std::enable_if_t< std::is_same<remove_cvref_t<Arg>, KeyType>::value || UsableAsKey<remove_cvref_t<Arg>>::value, int> = 0> auto callWithConstructedKey(Alloc&, Func&& f, Arg&& arg) ; template < typename KeyType, template <typename> class UsableAsKey = ExactKeyMatchOnly, typename Alloc, typename Func, typename... Args> auto callWithConstructedKey(Alloc& a, Func&& f, Args&&... args) ; template <typename T> using RequireAllocator = std::enable_if_t<is_allocator_v<T>, T>; template <typename T> using RequireNotAllocator = std::enable_if_t<!is_allocator_v<T>, T>; template <typename T> using RequireInputIterator = std::enable_if_t<iterator_category_matches_v<T, std::input_iterator_tag>>; } } namespace folly { namespace detail { constexpr auto cpp_aligned_new_ = 201606L >= 201606; constexpr auto cpp_sized_deallocation_ = false; constexpr auto op_new_builtin_ = 201802L >= 201802L; constexpr auto op_del_builtin_ = 0 >= 201802L; struct op_new_builtin_fn_ { template <typename... A> [[maybe_unused]] __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(A&&... a) const noexcept(noexcept(__builtin_operator_new(static_cast<A&&>(a)...)))->decltype(__builtin_operator_new(static_cast<A&&>(a)...)) ; }; struct op_new_library_fn_ { template <typename... A> [[maybe_unused]] __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(A&&... a) const noexcept(noexcept(::operator new(static_cast<A&&>(a)...)))->decltype(::operator new(static_cast<A&&>(a)...)) ; }; struct op_del_builtin_fn_ { template <typename... A> [[maybe_unused]] __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(A&&... a) const noexcept(noexcept(__builtin_operator_delete(static_cast<A&&>(a)...)))->decltype(__builtin_operator_delete(static_cast<A&&>(a)...)) ; }; struct op_del_library_fn_ { template <typename... A> [[maybe_unused]] __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(A&&... a) const noexcept(noexcept(::operator delete(static_cast<A&&>(a)...)))->decltype(::operator delete(static_cast<A&&>(a)...)) ; }; template <bool Usual, bool C = (Usual && op_new_builtin_)> constexpr conditional_t<C, op_new_builtin_fn_, op_new_library_fn_> op_new_; template <bool Usual, bool C = (Usual && op_del_builtin_)> constexpr conditional_t<C, op_del_builtin_fn_, op_del_library_fn_> op_del_; template <bool Usual, typename... A> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) void do_op_del_sized_( void* const p, std::size_t const s, A const... a) ; } struct operator_new_fn { [[nodiscard]] __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) void* operator()( std::size_t const s) const noexcept(noexcept(::operator new(0))) ; [[nodiscard]] __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) void* operator()( std::size_t const s, std::nothrow_t const& nt) const noexcept ; [[nodiscard]] __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) void* operator()( std::size_t const s, std::align_val_t const a) const noexcept(noexcept(::operator new(0))) ; [[nodiscard]] __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) void* operator()( std::size_t const s, std::align_val_t const a, std::nothrow_t const& nt) const noexcept ; }; inline constexpr operator_new_fn operator_new{}; struct operator_delete_fn { __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) void operator()( void* const p) const noexcept ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) void operator()( void* const p, std::size_t const s) const noexcept ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) void operator()( void* const p, std::align_val_t const a) const noexcept ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) void operator()( void* const p, std::size_t const s, std::align_val_t const a) const noexcept ; }; inline constexpr operator_delete_fn operator_delete{}; } namespace folly { namespace detail { struct thunk { template <typename T, typename... A> static void* make(A... a) ; template <typename T> static void ruin(void* const ptr) noexcept ; template <typename T> static void* make_copy(void const* const src) ; template <typename T> static void* make_move(void* const src) ; template <typename T, typename... A> static void* ctor(void* const ptr, A... a) ; template <typename T> static void dtor(void* const ptr) noexcept ; template <typename T> static void* ctor_copy(void* const dst, void const* const src) noexcept( noexcept(T(static_cast<T const& (*)() noexcept>(nullptr)()))) ; template <typename T> static void* ctor_move(void* const dst, void* const src) noexcept( noexcept(T(static_cast<T&& (*)() noexcept>(nullptr)()))) ; template <std::size_t Size, std::size_t Align> static void* operator_new() ; template <std::size_t Size, std::size_t Align> static void* operator_new_nx() ; template <std::size_t Size, std::size_t Align> static void operator_delete(void* const ptr) noexcept ; template <typename... A> static void noop(A...) noexcept ; template <typename R, typename... A> static R fail(A...) noexcept ; }; } } namespace folly { void* aligned_malloc(size_t size, size_t align) ; void aligned_free(void* aligned_ptr) ; namespace detail { template <typename Alloc, size_t kAlign, bool kAllocate> void rawOverAlignedImpl(Alloc const& alloc, size_t n, void*& raw) ; } template < typename Alloc, size_t kAlign = alignof(typename std::allocator_traits<Alloc>::value_type)> typename std::allocator_traits<Alloc>::pointer allocateOverAligned( Alloc const& alloc, size_t n) ; template < typename Alloc, size_t kAlign = alignof(typename std::allocator_traits<Alloc>::value_type)> void deallocateOverAligned( Alloc const& alloc, typename std::allocator_traits<Alloc>::pointer ptr, size_t n) ; template < typename Alloc, size_t kAlign = alignof(typename std::allocator_traits<Alloc>::value_type)> size_t allocationBytesForOverAligned(size_t n) ; template <typename T, void (*f)(T*)> struct static_function_deleter { void operator()(T* t) const ; }; template <typename T, typename D> std::shared_ptr<T> to_shared_ptr(std::unique_ptr<T, D>&& ptr) ; template <typename T, typename U> std::shared_ptr<U> to_shared_ptr_aliasing(std::shared_ptr<T> const& r, U* ptr) ; template <typename T> std::weak_ptr<T> to_weak_ptr(const std::shared_ptr<T>& ptr) ; namespace detail { void weak_ptr_set_stored_ptr(std::weak_ptr<void>& w, void* ptr); template <typename Tag, void* std::__weak_ptr<void>::*WeakPtr_Ptr_Field> struct GenerateWeakPtrInternalsAccessor { friend void weak_ptr_set_stored_ptr(std::weak_ptr<void>& w, void* ptr) ; }; namespace { struct MemoryAnonTag {}; } template struct GenerateWeakPtrInternalsAccessor< MemoryAnonTag, &std::__weak_ptr<void>::_M_ptr>; } template <typename T, typename U> std::weak_ptr<U> to_weak_ptr_aliasing(const std::shared_ptr<T>& r, U* ptr) ; template <typename T> std::unique_ptr<remove_cvref_t<T>> copy_to_unique_ptr(T&& t) ; template <typename T> std::shared_ptr<remove_cvref_t<T>> copy_to_shared_ptr(T&& t) ; template <typename T> std::unique_ptr<T> copy_through_unique_ptr(const std::unique_ptr<T>& t) ; using erased_unique_ptr = std::unique_ptr<void, void (*)(void*)>; namespace detail { template <typename T> void erased_unique_ptr_delete(void* ptr) ; } template <typename T> erased_unique_ptr to_erased_unique_ptr(T* const ptr) noexcept ; template <typename T> erased_unique_ptr to_erased_unique_ptr(std::unique_ptr<T> ptr) noexcept ; template <typename T, typename... A> erased_unique_ptr make_erased_unique(A&&... a) ; template <typename T> erased_unique_ptr copy_to_erased_unique_ptr(T&& obj) ; erased_unique_ptr empty_erased_unique_ptr() ; template <typename T> class SysAllocator { private: using Self = SysAllocator<T>; public: using value_type = T; constexpr SysAllocator() = default; constexpr SysAllocator(SysAllocator const&) = default; template <typename U, std::enable_if_t<!std::is_same<U, T>::value, int> = 0> constexpr SysAllocator(SysAllocator<U> const&) noexcept ; T* allocate(size_t count) ; void deallocate(T* p, size_t count) ; friend bool operator==(Self const&, Self const&) noexcept ; friend bool operator!=(Self const&, Self const&) noexcept ; }; class DefaultAlign { private: using Self = DefaultAlign; std::size_t align_; public: explicit DefaultAlign(std::size_t align) ; std::size_t operator()() const noexcept ; friend bool operator==(Self const& a, Self const& b) noexcept ; friend bool operator!=(Self const& a, Self const& b) noexcept ; }; template <std::size_t Align> class FixedAlign { private: static_assert(!(Align < sizeof(void*)), "bad align: too small"); static_assert(!(Align & (Align - 1)), "bad align: not power-of-two"); using Self = FixedAlign<Align>; public: constexpr std::size_t operator()() const noexcept ; friend bool operator==(Self const&, Self const&) noexcept ; friend bool operator!=(Self const&, Self const&) noexcept ; }; template <typename T, typename Align = DefaultAlign> class AlignedSysAllocator : private Align { private: using Self = AlignedSysAllocator<T, Align>; template <typename, typename> friend class AlignedSysAllocator; constexpr Align const& align() const ; public: static_assert(std::is_nothrow_copy_constructible<Align>::value, ""); static_assert(is_nothrow_invocable_r_v<std::size_t, Align>, ""); using value_type = T; using propagate_on_container_copy_assignment = std::true_type; using propagate_on_container_move_assignment = std::true_type; using propagate_on_container_swap = std::true_type; using Align::Align; template < typename S = Align, std::enable_if_t<std::is_default_constructible<S>::value, int> = 0> constexpr AlignedSysAllocator() noexcept(noexcept(Align())) ; constexpr AlignedSysAllocator(AlignedSysAllocator const&) = default; template <typename U, std::enable_if_t<!std::is_same<U, T>::value, int> = 0> constexpr AlignedSysAllocator( AlignedSysAllocator<U, Align> const& other) ; T* allocate(size_t count) ; void deallocate(T* p, size_t ) ; friend bool operator==(Self const& a, Self const& b) noexcept ; friend bool operator!=(Self const& a, Self const& b) noexcept ; }; template <typename T, class Inner, bool FallbackToStdAlloc = false> class CxxAllocatorAdaptor : private std::allocator<T> { private: using Self = CxxAllocatorAdaptor<T, Inner, FallbackToStdAlloc>; template <typename U, typename UInner, bool UFallback> friend class CxxAllocatorAdaptor; Inner* inner_ = nullptr; public: using value_type = T; using propagate_on_container_copy_assignment = std::true_type; using propagate_on_container_move_assignment = std::true_type; using propagate_on_container_swap = std::true_type; template <bool X = FallbackToStdAlloc, std::enable_if_t<X, int> = 0> constexpr explicit CxxAllocatorAdaptor() ; constexpr explicit CxxAllocatorAdaptor(Inner& ref) ; constexpr CxxAllocatorAdaptor(CxxAllocatorAdaptor const&) = default; template <typename U, std::enable_if_t<!std::is_same<U, T>::value, int> = 0> constexpr CxxAllocatorAdaptor( CxxAllocatorAdaptor<U, Inner, FallbackToStdAlloc> const& other) ; CxxAllocatorAdaptor& operator=(CxxAllocatorAdaptor const& other) = default; template <typename U, std::enable_if_t<!std::is_same<U, T>::value, int> = 0> CxxAllocatorAdaptor& operator=( CxxAllocatorAdaptor<U, Inner, FallbackToStdAlloc> const& other) noexcept ; T* allocate(std::size_t n) ; void deallocate(T* p, std::size_t n) ; friend bool operator==(Self const& a, Self const& b) noexcept ; friend bool operator!=(Self const& a, Self const& b) noexcept ; template <typename U> struct rebind { using other = CxxAllocatorAdaptor<U, Inner, FallbackToStdAlloc>; }; }; template <typename Alloc> class allocator_delete : private std::remove_reference<Alloc>::type { private: using allocator_type = typename std::remove_reference<Alloc>::type; using allocator_traits = std::allocator_traits<allocator_type>; using value_type = typename allocator_traits::value_type; using pointer = typename allocator_traits::pointer; public: allocator_delete() = default; allocator_delete(allocator_delete const&) = default; allocator_delete(allocator_delete&&) = default; allocator_delete& operator=(allocator_delete const&) = default; allocator_delete& operator=(allocator_delete&&) = default; explicit allocator_delete(const allocator_type& alloc) ; explicit allocator_delete(allocator_type&& alloc) ; template <typename U> allocator_delete(const allocator_delete<U>& other) ; allocator_type const& get_allocator() const ; void operator()(pointer p) const ; }; template <typename T, typename Alloc, typename... Args> std::unique_ptr< T, allocator_delete< typename std::allocator_traits<Alloc>::template rebind_alloc<T>>> allocate_unique(Alloc const& alloc, Args&&... args) ; struct SysBufferDeleter { void operator()(void* ptr) ; }; using SysBufferUniquePtr = std::unique_ptr<void, SysBufferDeleter>; SysBufferUniquePtr allocate_sys_buffer(std::size_t size) ; template <typename Alloc> struct AllocatorHasTrivialDeallocate : std::false_type {}; template <typename T, class Alloc> struct AllocatorHasTrivialDeallocate<CxxAllocatorAdaptor<T, Alloc>> : AllocatorHasTrivialDeallocate<Alloc> {}; namespace detail { struct AllocatorConstruct_ { template <typename O, typename... Args> [[maybe_unused]] __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()( O&& o, Args&&... args) const noexcept(noexcept( static_cast<O&&>(o).construct(static_cast<Args&&>(args)...))) -> decltype(static_cast<O&&>(o).construct( static_cast<Args&&>(args)...)) ; }; struct AllocatorDestroy_ { template <typename O, typename... Args> [[maybe_unused]] __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()( O&& o, Args&&... args) const noexcept(noexcept( static_cast<O&&>(o).destroy(static_cast<Args&&>(args)...))) -> decltype(static_cast<O&&>(o).destroy( static_cast<Args&&>(args)...)) ; }; template <typename Void, typename Alloc, typename... Args> struct AllocatorCustomizesConstruct_ : folly::is_invocable<AllocatorConstruct_, Alloc, Args...> {}; template <typename Alloc, typename... Args> struct AllocatorCustomizesConstruct_< void_t<typename Alloc::folly_has_default_object_construct>, Alloc, Args...> : Negation<typename Alloc::folly_has_default_object_construct> {}; template <typename Void, typename Alloc, typename... Args> struct AllocatorCustomizesDestroy_ : folly::is_invocable<AllocatorDestroy_, Alloc, Args...> {}; template <typename Alloc, typename... Args> struct AllocatorCustomizesDestroy_< void_t<typename Alloc::folly_has_default_object_destroy>, Alloc, Args...> : Negation<typename Alloc::folly_has_default_object_destroy> {}; } template <typename Alloc, typename T, typename... Args> struct AllocatorHasDefaultObjectConstruct : Negation< detail::AllocatorCustomizesConstruct_<void, Alloc, T*, Args...>> {}; template <typename Value, typename T, typename... Args> struct AllocatorHasDefaultObjectConstruct<std::allocator<Value>, T, Args...> : std::true_type {}; template <typename Alloc, typename T> struct AllocatorHasDefaultObjectDestroy : Negation<detail::AllocatorCustomizesDestroy_<void, Alloc, T*>> {}; template <typename Value, typename T> struct AllocatorHasDefaultObjectDestroy<std::allocator<Value>, T> : std::true_type {}; } namespace folly { struct Unit { constexpr bool operator==(const Unit& ) const ; constexpr bool operator!=(const Unit& ) const ; }; constexpr Unit unit{}; template <typename T> struct lift_unit { using type = T; }; template <> struct lift_unit<void> { using type = Unit; }; template <typename T> using lift_unit_t = typename lift_unit<T>::type; template <typename T> struct drop_unit { using type = T; }; template <> struct drop_unit<Unit> { using type = void; }; template <typename T> using drop_unit_t = typename drop_unit<T>::type; } namespace folly { namespace f14 { namespace detail { template <typename Ptr> using NonConstPtr = typename std::pointer_traits<Ptr>::template rebind< std::remove_const_t<typename std::pointer_traits<Ptr>::element_type>>; template <typename KeyType, typename MappedType> using MapValueType = std::pair<KeyType const, MappedType>; template <typename KeyType, typename MappedTypeOrVoid> using SetOrMapValueType = std::conditional_t< std::is_same<MappedTypeOrVoid, void>::value, KeyType, MapValueType<KeyType, MappedTypeOrVoid>>; template <typename T> using IsNothrowMoveAndDestroy = Conjunction< std::is_nothrow_move_constructible<T>, std::is_nothrow_destructible<T>>; template < char Tag, typename T, bool Inherit = std::is_empty<T>::value && !std::is_final<T>::value> struct ObjectHolder { T value_; template <typename... Args> ObjectHolder(Args&&... args) ; T& operator*() ; T const& operator*() const ; }; template <char Tag, typename T> struct ObjectHolder<Tag, T, true> : T { template <typename... Args> ObjectHolder(Args&&... args) ; T& operator*() ; T const& operator*() const ; }; template < typename KeyType, typename MappedTypeOrVoid, typename HasherOrVoid, typename KeyEqualOrVoid, typename AllocOrVoid, typename ItemType> struct BasePolicy : private ObjectHolder< 'H', Defaulted<HasherOrVoid, DefaultHasher<KeyType>>>, private ObjectHolder< 'E', Defaulted<KeyEqualOrVoid, DefaultKeyEqual<KeyType>>>, private ObjectHolder< 'A', Defaulted< AllocOrVoid, DefaultAlloc<SetOrMapValueType<KeyType, MappedTypeOrVoid>>>> { using Key = KeyType; using Mapped = MappedTypeOrVoid; using Value = SetOrMapValueType<Key, Mapped>; using Item = ItemType; using Hasher = Defaulted<HasherOrVoid, DefaultHasher<Key>>; using KeyEqual = Defaulted<KeyEqualOrVoid, DefaultKeyEqual<Key>>; using Alloc = Defaulted<AllocOrVoid, DefaultAlloc<Value>>; using AllocTraits = std::allocator_traits<Alloc>; using ByteAlloc = typename AllocTraits::template rebind_alloc<uint8_t>; using ByteAllocTraits = typename std::allocator_traits<ByteAlloc>; using BytePtr = typename ByteAllocTraits::pointer; static_assert( std::is_same<typename AllocTraits::value_type, Value>::value, "wrong allocator value_type"); private: using HasherHolder = ObjectHolder<'H', Hasher>; using KeyEqualHolder = ObjectHolder<'E', KeyEqual>; using AllocHolder = ObjectHolder<'A', Alloc>; template <typename A, typename = void> struct AllocIsAlwaysEqual : std::is_empty<A> {}; template <typename A> struct AllocIsAlwaysEqual<A, typename A::is_always_equal> : A::is_always_equal {}; public: static constexpr bool kAllocIsAlwaysEqual = AllocIsAlwaysEqual<Alloc>::value; static constexpr bool kDefaultConstructIsNoexcept = std::is_nothrow_default_constructible<Hasher>::value && std::is_nothrow_default_constructible<KeyEqual>::value && std::is_nothrow_default_constructible<Alloc>::value; static constexpr bool kSwapIsNoexcept = kAllocIsAlwaysEqual && std::is_nothrow_swappable_v<Hasher> && std::is_nothrow_swappable_v<KeyEqual>; static constexpr bool isAvalanchingHasher() ; static constexpr bool shouldAssume32BitHash() ; using InternalSizeType = std::size_t; static constexpr bool kEnableItemIteration = true; using Chunk = F14Chunk<Item>; using ChunkPtr = typename std::pointer_traits< typename AllocTraits::pointer>::template rebind<Chunk>; using ItemIter = F14ItemIter<ChunkPtr>; static constexpr bool kIsMap = !std::is_same<Key, Value>::value; static_assert( kIsMap == !std::is_void<MappedTypeOrVoid>::value, "Assumption for the kIsMap check violated."); using MappedOrBool = std::conditional_t<kIsMap, Mapped, bool>; static constexpr bool kContinuousCapacity = false; BasePolicy(Hasher const& hasher, KeyEqual const& keyEqual, Alloc const& alloc) ; BasePolicy(BasePolicy const& rhs) ; BasePolicy(BasePolicy const& rhs, Alloc const& alloc) ; BasePolicy(BasePolicy&& rhs) ; BasePolicy(BasePolicy&& rhs, Alloc const& alloc) ; private: template <typename Src> void maybeAssignAlloc(std::true_type, Src&& src) ; template <typename Src> void maybeAssignAlloc(std::false_type, Src&&) ; template <typename A> void maybeSwapAlloc(std::true_type, A& rhs) ; template <typename A> void maybeSwapAlloc(std::false_type, A&) ; public: BasePolicy& operator=(BasePolicy const& rhs) ; BasePolicy& operator=(BasePolicy&& rhs) noexcept ; void swapBasePolicy(BasePolicy& rhs) ; Hasher& hasher() ; Hasher const& hasher() const ; KeyEqual& keyEqual() ; KeyEqual const& keyEqual() const ; Alloc& alloc() ; Alloc const& alloc() const ; template <typename K> std::size_t computeKeyHash(K const& key) const ; Key const& keyForValue(Key const& v) const ; Key const& keyForValue(std::pair<Key const, MappedOrBool> const& p) const ; Key const& keyForValue(std::pair<Key&&, MappedOrBool&&> const& p) const ; template <typename Dummy = int> static std::pair<Key&&, MappedOrBool&&> moveValue( std::pair<Key const, MappedOrBool>& value, std::enable_if_t<kIsMap, Dummy> = 0) ; template <typename Dummy = int> static Value&& moveValue(Value& value, std::enable_if_t<!kIsMap, Dummy> = 0) ; template <typename P> bool beforeBuild( std::size_t , std::size_t , P&& ) ; template <typename P> void afterBuild( bool , bool , std::size_t , std::size_t , P&& ) ; std::size_t alignedAllocSize(std::size_t n) const ; bool beforeRehash( std::size_t , std::size_t , std::size_t , std::size_t chunkAllocSize, BytePtr& outChunkAllocation) ; void afterRehash( bool , bool , std::size_t , std::size_t , std::size_t , BytePtr chunkAllocation, std::size_t chunkAllocSize) ; void beforeClear(std::size_t , std::size_t ) ; void afterClear(std::size_t , std::size_t ) ; void beforeReset(std::size_t , std::size_t ) ; void afterReset( std::size_t , std::size_t , BytePtr chunkAllocation, std::size_t chunkAllocSize) ; void prefetchValue(Item const&) const ; void afterDestroyWithoutDeallocate(Value* addr, std::size_t n) ; }; template <typename ValuePtr, typename Item> class BaseIter { private: using pointee = typename std::pointer_traits<ValuePtr>::element_type; public: using iterator_category = std::forward_iterator_tag; using value_type = std::remove_const_t<pointee>; using difference_type = std::ptrdiff_t; using pointer = ValuePtr; using reference = pointee&; protected: using Chunk = F14Chunk<Item>; using ChunkPtr = typename std::pointer_traits<ValuePtr>::template rebind<Chunk>; using ItemIter = F14ItemIter<ChunkPtr>; using ValueConstPtr = typename std::pointer_traits<ValuePtr>::template rebind< std::add_const_t<typename std::pointer_traits<ValuePtr>::element_type>>; }; template < typename Key, typename Mapped, typename HasherOrVoid, typename KeyEqualOrVoid, typename AllocOrVoid> class ValueContainerPolicy; template <typename ValuePtr> using ValueContainerIteratorBase = BaseIter< ValuePtr, std::remove_const_t<typename std::pointer_traits<ValuePtr>::element_type>>; template <typename ValuePtr> class ValueContainerIterator : public ValueContainerIteratorBase<ValuePtr> { using Super = ValueContainerIteratorBase<ValuePtr>; using ItemIter = typename Super::ItemIter; using ValueConstPtr = typename Super::ValueConstPtr; public: using pointer = typename Super::pointer; using reference = typename Super::reference; using value_type = typename Super::value_type; ValueContainerIterator() = default; ValueContainerIterator(ValueContainerIterator const&) = default; ValueContainerIterator(ValueContainerIterator&&) = default; ValueContainerIterator& operator=(ValueContainerIterator const&) = default; ValueContainerIterator& operator=(ValueContainerIterator&&) = default; ~ValueContainerIterator() = default; operator ValueContainerIterator<ValueConstPtr>() const ; reference operator*() const ; pointer operator->() const ; ValueContainerIterator& operator++() ; ValueContainerIterator operator++(int) ; friend bool operator==( ValueContainerIterator const& lhs, ValueContainerIterator const& rhs) ; friend bool operator!=( ValueContainerIterator const& lhs, ValueContainerIterator const& rhs) ; private: ItemIter underlying_; explicit ValueContainerIterator(ItemIter const& underlying) ; template <typename K, typename M, typename H, typename E, typename A> friend class ValueContainerPolicy; template <typename P> friend class ValueContainerIterator; }; template < typename Key, typename MappedTypeOrVoid, typename HasherOrVoid, typename KeyEqualOrVoid, typename AllocOrVoid> class ValueContainerPolicy : public BasePolicy< Key, MappedTypeOrVoid, HasherOrVoid, KeyEqualOrVoid, AllocOrVoid, SetOrMapValueType<Key, MappedTypeOrVoid>> { public: using Super = BasePolicy< Key, MappedTypeOrVoid, HasherOrVoid, KeyEqualOrVoid, AllocOrVoid, SetOrMapValueType<Key, MappedTypeOrVoid>>; using Alloc = typename Super::Alloc; using AllocTraits = typename Super::AllocTraits; using Item = typename Super::Item; using ItemIter = typename Super::ItemIter; using Value = typename Super::Value; using KeyEqual = typename Super::KeyEqual; using Hasher = typename Super::Hasher; using Mapped = typename Super::Mapped; static constexpr bool kDefaultConstructIsNoexcept = Super::kDefaultConstructIsNoexcept; static constexpr bool kAllocIsAlwaysEqual = Super::kAllocIsAlwaysEqual; static constexpr bool kEnableItemIteration = Super::kEnableItemIteration; static constexpr bool kContinuousCapacity = Super::kContinuousCapacity; static constexpr auto isAvalanchingHasher = Super::isAvalanchingHasher; static constexpr bool kSwapIsNoexcept = Super::kSwapIsNoexcept; private: using ByteAlloc = typename Super::ByteAlloc; using Super::kIsMap; public: using ConstIter = ValueContainerIterator<typename AllocTraits::const_pointer>; using Iter = std::conditional_t< kIsMap, ValueContainerIterator<typename AllocTraits::pointer>, ConstIter>; static constexpr bool prefetchBeforeRehash() ; static constexpr bool prefetchBeforeCopy() ; static constexpr bool prefetchBeforeDestroy() ; static constexpr bool destroyItemOnClear() ; using Super::Super; void swapPolicy(ValueContainerPolicy& rhs) ; using Super::keyForValue; static_assert( std::is_same<Item, Value>::value, "Item and Value should be the same type for ValueContainerPolicy."); std::size_t computeItemHash(Item const& item) const ; template <typename K> bool keyMatchesItem(K const& key, Item const& item) const ; Value const& buildArgForItem(Item const& item) const& ; decltype(auto) buildArgForItem(Item& item) && ; Value const& valueAtItem(Item const& item) const ; Value&& valueAtItemForExtract(Item& item) ; template <typename Table, typename... Args> void constructValueAtItem(Table&&, Item* itemAddr, Args&&... args) ; template <typename T> std::enable_if_t<IsNothrowMoveAndDestroy<T>::value> complainUnlessNothrowMoveAndDestroy() ; template <typename T> [[deprecated( "mark {key_type,mapped_type} {move constructor,destructor} noexcept, or use F14Node* if they aren't")]] std:: enable_if_t<!IsNothrowMoveAndDestroy<T>::value> complainUnlessNothrowMoveAndDestroy() ; void moveItemDuringRehash(Item* itemAddr, Item& src) ; void destroyItem(Item& item) noexcept ; template <typename V> void visitPolicyAllocationClasses( std::size_t chunkAllocSize, std::size_t , std::size_t , V&& visitor) const ; __attribute__((__always_inline__)) Iter makeIter(ItemIter const& underlying) const ; ConstIter makeConstIter(ItemIter const& underlying) const ; ItemIter const& unwrapIter(ConstIter const& iter) const ; }; template < typename Key, typename Mapped, typename HasherOrVoid, typename KeyEqualOrVoid, typename AllocOrVoid> class NodeContainerPolicy; template <typename ValuePtr> class NodeContainerIterator : public BaseIter<ValuePtr, NonConstPtr<ValuePtr>> { using Super = BaseIter<ValuePtr, NonConstPtr<ValuePtr>>; using ItemIter = typename Super::ItemIter; using ValueConstPtr = typename Super::ValueConstPtr; public: using pointer = typename Super::pointer; using reference = typename Super::reference; using value_type = typename Super::value_type; NodeContainerIterator() = default; NodeContainerIterator(NodeContainerIterator const&) = default; NodeContainerIterator(NodeContainerIterator&&) = default; NodeContainerIterator& operator=(NodeContainerIterator const&) = default; NodeContainerIterator& operator=(NodeContainerIterator&&) = default; ~NodeContainerIterator() = default; operator NodeContainerIterator<ValueConstPtr>() const ; reference operator*() const ; pointer operator->() const ; NodeContainerIterator& operator++() ; NodeContainerIterator operator++(int) ; friend bool operator==( NodeContainerIterator const& lhs, NodeContainerIterator const& rhs) ; friend bool operator!=( NodeContainerIterator const& lhs, NodeContainerIterator const& rhs) ; private: ItemIter underlying_; explicit NodeContainerIterator(ItemIter const& underlying) ; template <typename K, typename M, typename H, typename E, typename A> friend class NodeContainerPolicy; template <typename P> friend class NodeContainerIterator; }; template < typename Key, typename MappedTypeOrVoid, typename HasherOrVoid, typename KeyEqualOrVoid, typename AllocOrVoid> class NodeContainerPolicy : public BasePolicy< Key, MappedTypeOrVoid, HasherOrVoid, KeyEqualOrVoid, AllocOrVoid, typename std::allocator_traits<Defaulted< AllocOrVoid, DefaultAlloc<std::conditional_t< std::is_void<MappedTypeOrVoid>::value, Key, MapValueType<Key, MappedTypeOrVoid>>>>>::pointer> { public: using Super = BasePolicy< Key, MappedTypeOrVoid, HasherOrVoid, KeyEqualOrVoid, AllocOrVoid, typename std::allocator_traits<Defaulted< AllocOrVoid, DefaultAlloc<std::conditional_t< std::is_void<MappedTypeOrVoid>::value, Key, MapValueType<Key, MappedTypeOrVoid>>>>>::pointer>; using Alloc = typename Super::Alloc; using AllocTraits = typename Super::AllocTraits; using Item = typename Super::Item; using ItemIter = typename Super::ItemIter; using Value = typename Super::Value; private: using ByteAlloc = typename Super::ByteAlloc; using Super::kIsMap; public: using ConstIter = NodeContainerIterator<typename AllocTraits::const_pointer>; using Iter = std::conditional_t< kIsMap, NodeContainerIterator<typename AllocTraits::pointer>, ConstIter>; static constexpr bool prefetchBeforeRehash() ; static constexpr bool prefetchBeforeCopy() ; static constexpr bool prefetchBeforeDestroy() ; static constexpr bool destroyItemOnClear() ; using Super::Super; void swapPolicy(NodeContainerPolicy& rhs) ; using Super::keyForValue; std::size_t computeItemHash(Item const& item) const ; template <typename K> bool keyMatchesItem(K const& key, Item const& item) const ; Value const& buildArgForItem(Item const& item) const& ; decltype(auto) buildArgForItem(Item& item) && ; Value const& valueAtItem(Item const& item) const ; Value&& valueAtItemForExtract(Item& item) ; template <typename Table, typename... Args> void constructValueAtItem(Table&&, Item* itemAddr, Args&&... args) ; void moveItemDuringRehash(Item* itemAddr, Item& src) ; void prefetchValue(Item const& item) const ; template <typename T> std::enable_if_t<std::is_nothrow_destructible<T>::value> complainUnlessNothrowDestroy() ; template <typename T> [[deprecated("Mark key and mapped type destructor nothrow")]] std:: enable_if_t<!std::is_nothrow_destructible<T>::value> complainUnlessNothrowDestroy() ; void destroyItem(Item& item) noexcept ; template <typename V> void visitPolicyAllocationClasses( std::size_t chunkAllocSize, std::size_t size, std::size_t , V&& visitor) const ; __attribute__((__always_inline__)) Iter makeIter(ItemIter const& underlying) const ; ConstIter makeConstIter(ItemIter const& underlying) const ; ItemIter const& unwrapIter(ConstIter const& iter) const ; }; template < typename Key, typename MappedTypeOrVoid, typename HasherOrVoid, typename KeyEqualOrVoid, typename AllocOrVoid, typename EligibleForPerturbedInsertionOrder> class VectorContainerPolicy; template <typename ValuePtr> class VectorContainerIterator : public BaseIter<ValuePtr, uint32_t> { using Super = BaseIter<ValuePtr, uint32_t>; using ValueConstPtr = typename Super::ValueConstPtr; public: using pointer = typename Super::pointer; using reference = typename Super::reference; using value_type = typename Super::value_type; VectorContainerIterator() = default; VectorContainerIterator(VectorContainerIterator const&) = default; VectorContainerIterator(VectorContainerIterator&&) = default; VectorContainerIterator& operator=(VectorContainerIterator const&) = default; VectorContainerIterator& operator=(VectorContainerIterator&&) = default; ~VectorContainerIterator() = default; operator VectorContainerIterator<ValueConstPtr>() const ; reference operator*() const ; pointer operator->() const ; VectorContainerIterator& operator++() ; VectorContainerIterator operator++(int) ; friend bool operator==( VectorContainerIterator const& lhs, VectorContainerIterator const& rhs) ; friend bool operator!=( VectorContainerIterator const& lhs, VectorContainerIterator const& rhs) ; private: ValuePtr current_; ValuePtr lowest_; explicit VectorContainerIterator(ValuePtr current, ValuePtr lowest) ; std::size_t index() const ; template < typename K, typename M, typename H, typename E, typename A, typename P> friend class VectorContainerPolicy; template <typename P> friend class VectorContainerIterator; }; struct VectorContainerIndexSearch { uint32_t index_; }; template < typename Key, typename MappedTypeOrVoid, typename HasherOrVoid, typename KeyEqualOrVoid, typename AllocOrVoid, typename EligibleForPerturbedInsertionOrder> class VectorContainerPolicy : public BasePolicy< Key, MappedTypeOrVoid, HasherOrVoid, KeyEqualOrVoid, AllocOrVoid, uint32_t> { public: using Super = BasePolicy< Key, MappedTypeOrVoid, HasherOrVoid, KeyEqualOrVoid, AllocOrVoid, uint32_t>; using Value = typename Super::Value; using Alloc = typename Super::Alloc; using AllocTraits = typename Super::AllocTraits; using ByteAlloc = typename Super::ByteAlloc; using ByteAllocTraits = typename Super::ByteAllocTraits; using BytePtr = typename Super::BytePtr; using Hasher = typename Super::Hasher; using Item = typename Super::Item; using ItemIter = typename Super::ItemIter; using KeyEqual = typename Super::KeyEqual; using Super::kAllocIsAlwaysEqual; private: using Super::kIsMap; public: static constexpr bool kEnableItemIteration = false; static constexpr bool kContinuousCapacity = true; using InternalSizeType = Item; using ConstIter = VectorContainerIterator<typename AllocTraits::const_pointer>; using Iter = std::conditional_t< kIsMap, VectorContainerIterator<typename AllocTraits::pointer>, ConstIter>; using ConstReverseIter = typename AllocTraits::const_pointer; using ReverseIter = std:: conditional_t<kIsMap, typename AllocTraits::pointer, ConstReverseIter>; using ValuePtr = typename AllocTraits::pointer; static constexpr bool prefetchBeforeRehash() ; static constexpr bool prefetchBeforeCopy() ; static constexpr bool prefetchBeforeDestroy() ; static constexpr bool destroyItemOnClear() ; private: static constexpr bool valueIsTriviallyCopyable() ; public: VectorContainerPolicy( Hasher const& hasher, KeyEqual const& keyEqual, Alloc const& alloc) ; VectorContainerPolicy(VectorContainerPolicy const& rhs) ; VectorContainerPolicy(VectorContainerPolicy const& rhs, Alloc const& alloc) ; VectorContainerPolicy(VectorContainerPolicy&& rhs) ; VectorContainerPolicy( VectorContainerPolicy&& rhs, Alloc const& alloc) ; VectorContainerPolicy& operator=(VectorContainerPolicy const& rhs) ; VectorContainerPolicy& operator=(VectorContainerPolicy&& rhs) noexcept ; void swapPolicy(VectorContainerPolicy& rhs) ; template <typename K> std::size_t computeKeyHash(K const& key) const ; std::size_t computeKeyHash(VectorContainerIndexSearch const& key) const ; using Super::keyForValue; std::size_t computeItemHash(Item const& item) const ; bool keyMatchesItem( VectorContainerIndexSearch const& key, Item const& item) const ; template <typename K> bool keyMatchesItem(K const& key, Item const& item) const ; Key const& keyForValue(VectorContainerIndexSearch const& arg) const ; VectorContainerIndexSearch buildArgForItem(Item const& item) const ; Value const& valueAtItem(Item const& item) const ; Value&& valueAtItemForExtract(Item& item) ; template <typename Table> void constructValueAtItem( Table&&, Item* itemAddr, VectorContainerIndexSearch arg) ; template <typename Table, typename... Args> void constructValueAtItem(Table&& table, Item* itemAddr, Args&&... args) ; void moveItemDuringRehash(Item* itemAddr, Item& src) ; void prefetchValue(Item const& item) const ; void destroyItem(Item&) noexcept ; template <typename T> std::enable_if_t<IsNothrowMoveAndDestroy<T>::value> complainUnlessNothrowMoveAndDestroy() ; template <typename T> [[deprecated( "mark {key_type,mapped_type} {move constructor,destructor} noexcept, or use F14Node* if they aren't")]] std:: enable_if_t<!IsNothrowMoveAndDestroy<T>::value> complainUnlessNothrowMoveAndDestroy() ; void transfer(Alloc& a, Value* src, Value* dst, std::size_t n) ; template <typename P, typename V> bool beforeBuildImpl(std::size_t size, P&& rhs, V const& constructorArgFor) ; bool beforeBuild( std::size_t size, std::size_t , VectorContainerPolicy const& rhs) ; bool beforeBuild( std::size_t size, std::size_t , VectorContainerPolicy&& rhs) ; template <typename P> void afterBuild( bool , bool success, std::size_t , std::size_t , P&& ) ; private: static std::size_t valuesOffset(std::size_t prefixBytes) ; static std::size_t allocSize( std::size_t prefixBytes, std::size_t valueCapacity) ; public: ValuePtr beforeRehash( std::size_t size, std::size_t oldCapacity, std::size_t newCapacity, std::size_t chunkAllocSize, BytePtr& outChunkAllocation) ; __attribute__((__noinline__)) void afterFailedRehash(ValuePtr state, std::size_t size) ; void afterRehash( ValuePtr state, bool success, std::size_t size, std::size_t oldCapacity, std::size_t newCapacity, BytePtr chunkAllocation, std::size_t chunkAllocSize) ; void beforeClear(std::size_t size, std::size_t capacity) ; void beforeReset(std::size_t size, std::size_t capacity) ; void afterReset( std::size_t , std::size_t capacity, BytePtr chunkAllocation, std::size_t chunkAllocSize) ; template <typename V> void visitPolicyAllocationClasses( std::size_t chunkAllocSize, std::size_t , std::size_t capacity, V&& visitor) const ; Iter linearBegin(std::size_t size) const ; Iter linearEnd() const ; Iter makeIter(ItemIter const& underlying) const ; ConstIter makeConstIter(ItemIter const& underlying) const ; Item iterToIndex(ConstIter const& iter) const ; Iter indexToIter(Item index) const ; Iter iter(ReverseIter it) ; ConstIter iter(ConstReverseIter it) const ; ReverseIter riter(Iter it) ; ConstReverseIter riter(ConstIter it) const ; ValuePtr values_{nullptr}; }; template < template <typename, typename, typename, typename, typename, typename...> class Policy, typename Key, typename Mapped, typename Hasher, typename KeyEqual, typename Alloc, typename... Args> using MapPolicyWithDefaults = Policy< Key, Mapped, VoidDefault<Hasher, DefaultHasher<Key>>, VoidDefault<KeyEqual, DefaultKeyEqual<Key>>, VoidDefault<Alloc, DefaultAlloc<std::pair<Key const, Mapped>>>, Args...>; template < template <typename, typename, typename, typename, typename, typename...> class Policy, typename Key, typename Hasher, typename KeyEqual, typename Alloc, typename... Args> using SetPolicyWithDefaults = Policy< Key, void, VoidDefault<Hasher, DefaultHasher<Key>>, VoidDefault<KeyEqual, DefaultKeyEqual<Key>>, VoidDefault<Alloc, DefaultAlloc<Key>>, Args...>; } } } namespace folly { namespace f14 { namespace detail { template <typename Policy> class F14BasicMap { template <typename K, typename T> using EnableHeterogeneousFind = std::enable_if_t< ::folly::detail::EligibleForHeterogeneousFind< typename Policy::Key, typename Policy::Hasher, typename Policy::KeyEqual, K>::value, T>; template <typename K, typename T> using EnableHeterogeneousInsert = std::enable_if_t< ::folly::detail::EligibleForHeterogeneousInsert< typename Policy::Key, typename Policy::Hasher, typename Policy::KeyEqual, K>::value, T>; template <typename K> using IsIter = Disjunction< std::is_same<typename Policy::Iter, remove_cvref_t<K>>, std::is_same<typename Policy::ConstIter, remove_cvref_t<K>>>; template <typename K, typename T> using EnableHeterogeneousErase = std::enable_if_t< ::folly::detail::EligibleForHeterogeneousFind< typename Policy::Key, typename Policy::Hasher, typename Policy::KeyEqual, std::conditional_t<IsIter<K>::value, typename Policy::Key, K>>:: value && !IsIter<K>::value, T>; public: using key_type = typename Policy::Key; using mapped_type = typename Policy::Mapped; using value_type = typename Policy::Value; using size_type = std::size_t; using difference_type = std::ptrdiff_t; using hasher = typename Policy::Hasher; using key_equal = typename Policy::KeyEqual; using allocator_type = typename Policy::Alloc; using reference = value_type&; using const_reference = value_type const&; using pointer = typename Policy::AllocTraits::pointer; using const_pointer = typename Policy::AllocTraits::const_pointer; using iterator = typename Policy::Iter; using const_iterator = typename Policy::ConstIter; private: using ItemIter = typename Policy::ItemIter; public: F14BasicMap() noexcept(Policy::kDefaultConstructIsNoexcept) ; explicit F14BasicMap( std::size_t initialCapacity, hasher const& hash = hasher{}, key_equal const& eq = key_equal{}, allocator_type const& alloc = allocator_type{}) ; explicit F14BasicMap(std::size_t initialCapacity, allocator_type const& alloc) ; explicit F14BasicMap( std::size_t initialCapacity, hasher const& hash, allocator_type const& alloc) ; explicit F14BasicMap(allocator_type const& alloc) ; template <typename InputIt> F14BasicMap( InputIt first, InputIt last, std::size_t initialCapacity = 0, hasher const& hash = hasher{}, key_equal const& eq = key_equal{}, allocator_type const& alloc = allocator_type{}) ; template <typename InputIt> F14BasicMap( InputIt first, InputIt last, std::size_t initialCapacity, allocator_type const& alloc) ; template <typename InputIt> F14BasicMap( InputIt first, InputIt last, std::size_t initialCapacity, hasher const& hash, allocator_type const& alloc) ; F14BasicMap(F14BasicMap const& rhs) = default; F14BasicMap(F14BasicMap const& rhs, allocator_type const& alloc) ; F14BasicMap(F14BasicMap&& rhs) = default; F14BasicMap(F14BasicMap&& rhs, allocator_type const& alloc) noexcept( Policy::kAllocIsAlwaysEqual) ; F14BasicMap( std::initializer_list<value_type> init, std::size_t initialCapacity = 0, hasher const& hash = hasher{}, key_equal const& eq = key_equal{}, allocator_type const& alloc = allocator_type{}) ; F14BasicMap( std::initializer_list<value_type> init, std::size_t initialCapacity, allocator_type const& alloc) ; F14BasicMap( std::initializer_list<value_type> init, std::size_t initialCapacity, hasher const& hash, allocator_type const& alloc) ; F14BasicMap& operator=(F14BasicMap const&) = default; F14BasicMap& operator=(F14BasicMap&&) = default; F14BasicMap& operator=(std::initializer_list<value_type> ilist) ; allocator_type get_allocator() const noexcept ; iterator begin() noexcept ; const_iterator begin() const noexcept ; const_iterator cbegin() const noexcept ; iterator end() noexcept ; const_iterator end() const noexcept ; const_iterator cend() const noexcept ; bool empty() const noexcept ; std::size_t size() const noexcept ; std::size_t max_size() const noexcept ; void clear() noexcept ; std::pair<iterator, bool> insert(value_type const& value) ; template <typename P> std::enable_if_t< std::is_constructible<value_type, P&&>::value, std::pair<iterator, bool>> insert(P&& value) ; template <typename U1, typename U2> std::enable_if_t< std::is_constructible<key_type, U1 const&>::value && std::is_constructible<mapped_type, U2 const&>::value, std::pair<iterator, bool>> insert(std::pair<U1, U2> const& value) ; template <typename U1, typename U2> std::enable_if_t< std::is_constructible<key_type, U1&&>::value && std::is_constructible<mapped_type, U2&&>::value, std::pair<iterator, bool>> insert(std::pair<U1, U2>&& value) ; std::pair<iterator, bool> insert(value_type&& value) ; iterator insert(const_iterator , value_type const& value) ; template <typename P> std::enable_if_t<std::is_constructible<value_type, P&&>::value, iterator> insert(const_iterator , P&& value) ; iterator insert(const_iterator , value_type&& value) ; template <class... Args> iterator emplace_hint(const_iterator , Args&&... args) ; private: template <class InputIt> __attribute__((__always_inline__)) void bulkInsert( InputIt first, InputIt last, bool autoReserve) ; template <class InputIt> void initialInsert(InputIt first, InputIt last, std::size_t initialCapacity) ; public: template <class InputIt> void insert(InputIt first, InputIt last) ; void insert(std::initializer_list<value_type> ilist) ; template <typename M> std::pair<iterator, bool> insert_or_assign(key_type const& key, M&& obj) ; template <typename M> std::pair<iterator, bool> insert_or_assign(key_type&& key, M&& obj) ; template <typename M> std::pair<iterator, bool> insert_or_assign( F14HashToken const& token, key_type const& key, M&& obj) ; template <typename M> std::pair<iterator, bool> insert_or_assign( const F14HashedKey<key_type, hasher>& hashedKey, M&& obj) ; template <typename M> std::pair<iterator, bool> insert_or_assign( F14HashToken const& token, key_type&& key, M&& obj) ; template <typename M> std::pair<iterator, bool> insert_or_assign( F14HashedKey<key_type, hasher>&& hashedKey, M&& obj) ; template <typename M> iterator insert_or_assign( const_iterator , key_type const& key, M&& obj) ; template <typename M> iterator insert_or_assign(const_iterator , key_type&& key, M&& obj) ; template <typename K, typename M> EnableHeterogeneousInsert<K, std::pair<iterator, bool>> insert_or_assign( K&& key, M&& obj) ; template <typename K, typename M> EnableHeterogeneousInsert<K, std::pair<iterator, bool>> insert_or_assign( F14HashToken const& token, K&& key, M&& obj) ; private: template <typename Arg> using UsableAsKey = ::folly::detail:: EligibleForHeterogeneousFind<key_type, hasher, key_equal, Arg>; public: template <typename... Args> std::pair<iterator, bool> emplace(Args&&... args) ; template <typename... Args> std::pair<iterator, bool> try_emplace(key_type const& key, Args&&... args) ; template <typename... Args> std::pair<iterator, bool> try_emplace(key_type&& key, Args&&... args) ; template <typename... Args> std::pair<iterator, bool> try_emplace_token( F14HashToken const& token, key_type const& key, Args&&... args) ; template <typename... Args> std::pair<iterator, bool> try_emplace_token( const F14HashedKey<key_type, hasher>& hashedKey, Args&&... args) ; template <typename... Args> std::pair<iterator, bool> try_emplace_token( F14HashToken const& token, key_type&& key, Args&&... args) ; template <typename... Args> std::pair<iterator, bool> try_emplace_token( F14HashedKey<key_type, hasher>&& hashedKey, Args&&... args) ; template <typename... Args> iterator try_emplace( const_iterator , key_type const& key, Args&&... args) ; template <typename... Args> iterator try_emplace( const_iterator , key_type&& key, Args&&... args) ; template <typename K, typename... Args> EnableHeterogeneousInsert<K, std::pair<iterator, bool>> try_emplace( K&& key, Args&&... args) ; template <typename K, typename... Args> EnableHeterogeneousInsert<K, std::pair<iterator, bool>> try_emplace_token( F14HashToken const& token, K&& key, Args&&... args) ; __attribute__((__always_inline__)) iterator erase(const_iterator pos) ; __attribute__((__always_inline__)) iterator erase(iterator pos) ; iterator erase(const_iterator first, const_iterator last) ; size_type erase(key_type const& key) ; template <typename K> EnableHeterogeneousErase<K, size_type> erase(K const& key) ; protected: template <typename BeforeDestroy> __attribute__((__always_inline__)) void tableEraseIterInto( ItemIter pos, BeforeDestroy&& beforeDestroy) ; template <typename K, typename BeforeDestroy> __attribute__((__always_inline__)) std::size_t tableEraseKeyInto( K const& key, BeforeDestroy&& beforeDestroy) ; public: template <typename BeforeDestroy> __attribute__((__always_inline__)) iterator eraseInto(const_iterator pos, BeforeDestroy&& beforeDestroy) ; template <typename BeforeDestroy> __attribute__((__always_inline__)) iterator eraseInto(iterator pos, BeforeDestroy&& beforeDestroy) ; template <typename BeforeDestroy> iterator eraseInto( const_iterator first, const_iterator last, BeforeDestroy&& beforeDestroy) ; template <typename BeforeDestroy> size_type eraseInto(key_type const& key, BeforeDestroy&& beforeDestroy) ; template <typename K, typename BeforeDestroy> EnableHeterogeneousErase<K, size_type> eraseInto( K const& key, BeforeDestroy&& beforeDestroy) ; __attribute__((__always_inline__)) mapped_type& at(key_type const& key) ; __attribute__((__always_inline__)) mapped_type const& at(key_type const& key) const ; template <typename K> EnableHeterogeneousFind<K, mapped_type&> at(K const& key) ; template <typename K> EnableHeterogeneousFind<K, mapped_type const&> at(K const& key) const ; mapped_type& operator[](key_type const& key) ; mapped_type& operator[](key_type&& key) ; template <typename K> EnableHeterogeneousInsert<K, mapped_type&> operator[](K&& key) ; __attribute__((__always_inline__)) size_type count(key_type const& key) const ; template <typename K> __attribute__((__always_inline__)) EnableHeterogeneousFind<K, size_type> count( K const& key) const ; F14HashToken prehash(key_type const& key) const ; template <typename K> EnableHeterogeneousFind<K, F14HashToken> prehash(K const& key) const ; void prefetch(F14HashToken const& token) const ; __attribute__((__always_inline__)) iterator find(key_type const& key) ; __attribute__((__always_inline__)) const_iterator find(key_type const& key) const ; __attribute__((__always_inline__)) iterator find(F14HashToken const& token, key_type const& key) ; __attribute__((__always_inline__)) iterator find(const F14HashedKey<key_type, hasher>& hashedKey) ; __attribute__((__always_inline__)) const_iterator find(F14HashToken const& token, key_type const& key) const ; __attribute__((__always_inline__)) const_iterator find(F14HashedKey<key_type, hasher> const& hashedKey) const ; template <typename K> __attribute__((__always_inline__)) EnableHeterogeneousFind<K, iterator> find(K const& key) ; template <typename K> __attribute__((__always_inline__)) EnableHeterogeneousFind<K, const_iterator> find( K const& key) const ; template <typename K> __attribute__((__always_inline__)) EnableHeterogeneousFind<K, iterator> find( F14HashToken const& token, K const& key) ; template <typename K> __attribute__((__always_inline__)) EnableHeterogeneousFind<K, const_iterator> find( F14HashToken const& token, K const& key) const ; __attribute__((__always_inline__)) bool contains(key_type const& key) const ; template <typename K> __attribute__((__always_inline__)) EnableHeterogeneousFind<K, bool> contains( K const& key) const ; __attribute__((__always_inline__)) bool contains( F14HashToken const& token, key_type const& key) const ; ; ; ; ; ; private: ; ; protected: F14Table<Policy> table_; }; } } template < typename Key, typename Mapped, typename Hasher, typename KeyEqual, typename Alloc> class F14ValueMap : public f14::detail::F14BasicMap<f14::detail::MapPolicyWithDefaults< f14::detail::ValueContainerPolicy, Key, Mapped, Hasher, KeyEqual, Alloc>> { protected: using Policy = f14::detail::MapPolicyWithDefaults< f14::detail::ValueContainerPolicy, Key, Mapped, Hasher, KeyEqual, Alloc>; private: using Super = f14::detail::F14BasicMap<Policy>; public: using typename Super::value_type; using Super::Super; ; }; ; ; ; ; ; ; template < typename Key, typename Mapped, typename Hasher, typename KeyEqual, typename Alloc> class F14NodeMap : public f14::detail::F14BasicMap<f14::detail::MapPolicyWithDefaults< f14::detail::NodeContainerPolicy, Key, Mapped, Hasher, KeyEqual, Alloc>> { protected: using Policy = f14::detail::MapPolicyWithDefaults< f14::detail::NodeContainerPolicy, Key, Mapped, Hasher, KeyEqual, Alloc>; private: using Super = f14::detail::F14BasicMap<Policy>; public: using typename Super::value_type; using Super::Super; ; }; ; ; ; ; ; ; namespace f14 { namespace detail { template < typename Key, typename Mapped, typename Hasher, typename KeyEqual, typename Alloc, typename EligibleForPerturbedInsertionOrder> class F14VectorMapImpl : public F14BasicMap<MapPolicyWithDefaults< VectorContainerPolicy, Key, Mapped, Hasher, KeyEqual, Alloc, EligibleForPerturbedInsertionOrder>> { protected: using Policy = MapPolicyWithDefaults< VectorContainerPolicy, Key, Mapped, Hasher, KeyEqual, Alloc, EligibleForPerturbedInsertionOrder>; private: using Super = F14BasicMap<Policy>; template <typename K> using IsIter = Disjunction< std::is_same<typename Policy::Iter, remove_cvref_t<K>>, std::is_same<typename Policy::ConstIter, remove_cvref_t<K>>, std::is_same<typename Policy::ReverseIter, remove_cvref_t<K>>, std::is_same<typename Policy::ConstReverseIter, remove_cvref_t<K>>>; template <typename K, typename T> using EnableHeterogeneousVectorErase = std::enable_if_t< ::folly::detail::EligibleForHeterogeneousFind< Key, Hasher, KeyEqual, std::conditional_t<IsIter<K>::value, Key, K>>::value && !IsIter<K>::value, T>; public: using typename Super::const_iterator; using typename Super::iterator; using typename Super::key_type; using typename Super::mapped_type; using typename Super::value_type; using Super::Super; private: ; ; public: ; ; ; ; ; ; ; }; } } template < typename Key, typename Mapped, typename Hasher, typename KeyEqual, typename Alloc> class F14VectorMap : public f14::detail::F14VectorMapImpl< Key, Mapped, Hasher, KeyEqual, Alloc, std::false_type> { using Super = f14::detail:: F14VectorMapImpl<Key, Mapped, Hasher, KeyEqual, Alloc, std::false_type>; public: using typename Super::const_iterator; using typename Super::iterator; using typename Super::value_type; using reverse_iterator = typename Super::Policy::ReverseIter; using const_reverse_iterator = typename Super::Policy::ConstReverseIter; using Super::Super; }; ; ; ; ; ; ; template < typename Key, typename Mapped, typename Hasher, typename KeyEqual, typename Alloc> class F14FastMap : public std::conditional_t< (sizeof(std::pair<Key const, Mapped>) < 24), F14ValueMap<Key, Mapped, Hasher, KeyEqual, Alloc>, f14::detail::F14VectorMapImpl< Key, Mapped, Hasher, KeyEqual, Alloc, std::true_type>> { using Super = std::conditional_t< sizeof(std::pair<Key const, Mapped>) < 24, F14ValueMap<Key, Mapped, Hasher, KeyEqual, Alloc>, f14::detail::F14VectorMapImpl< Key, Mapped, Hasher, KeyEqual, Alloc, std::true_type>>; public: using typename Super::value_type; using Super::Super; }; ; ; ; ; ; ; } namespace folly { namespace f14 { namespace detail { ; } } ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; } namespace folly { template < typename Key, typename Hasher = f14::DefaultHasher<Key>, typename KeyEqual = f14::DefaultKeyEqual<Key>, typename Alloc = f14::DefaultAlloc<Key>> class F14NodeSet; template < typename Key, typename Hasher = f14::DefaultHasher<Key>, typename KeyEqual = f14::DefaultKeyEqual<Key>, typename Alloc = f14::DefaultAlloc<Key>> class F14ValueSet; template < typename Key, typename Hasher = f14::DefaultHasher<Key>, typename KeyEqual = f14::DefaultKeyEqual<Key>, typename Alloc = f14::DefaultAlloc<Key>> class F14VectorSet; template < typename Key, typename Hasher = f14::DefaultHasher<Key>, typename KeyEqual = f14::DefaultKeyEqual<Key>, typename Alloc = f14::DefaultAlloc<Key>> class F14FastSet; namespace pmr { template < typename Key, typename Hasher = f14::DefaultHasher<Key>, typename KeyEqual = f14::DefaultKeyEqual<Key>> using F14NodeSet = folly::F14NodeSet< Key, Hasher, KeyEqual, folly::detail::std_pmr::polymorphic_allocator<Key>>; template < typename Key, typename Hasher = f14::DefaultHasher<Key>, typename KeyEqual = f14::DefaultKeyEqual<Key>> using F14ValueSet = folly::F14ValueSet< Key, Hasher, KeyEqual, folly::detail::std_pmr::polymorphic_allocator<Key>>; template < typename Key, typename Hasher = f14::DefaultHasher<Key>, typename KeyEqual = f14::DefaultKeyEqual<Key>> using F14VectorSet = folly::F14VectorSet< Key, Hasher, KeyEqual, folly::detail::std_pmr::polymorphic_allocator<Key>>; template < typename Key, typename Hasher = f14::DefaultHasher<Key>, typename KeyEqual = f14::DefaultKeyEqual<Key>> using F14FastSet = folly::F14FastSet< Key, Hasher, KeyEqual, folly::detail::std_pmr::polymorphic_allocator<Key>>; } } namespace std __attribute__ ((__visibility__ ("default"))) { 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>; 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; 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: 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; 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; using node_type = typename _Hashtable::node_type; using insert_return_type = typename _Hashtable::insert_return_type; ; ; ; [[__nodiscard__]] ; ; ; template<typename, typename, typename> friend class std::_Hash_merge_helper; ; ; ; ; ; ; ; ; ; ; ; }; ; ; ; ; ; ; 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: 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; 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; using node_type = typename _Hashtable::node_type; ; ; ; [[__nodiscard__]] ; ; ; template<typename, typename, typename> friend class std::_Hash_merge_helper; ; ; ; ; ; ; ; ; ; ; ; }; ; ; ; ; ; ; ; ; ; ; template<typename _Val, typename _Hash1, typename _Eq1, typename _Alloc, typename _Hash2, typename _Eq2> struct _Hash_merge_helper< std::unordered_set<_Val, _Hash1, _Eq1, _Alloc>, _Hash2, _Eq2> { private: template<typename... _Tp> using unordered_set = std::unordered_set<_Tp...>; template<typename... _Tp> using unordered_multiset = std::unordered_multiset<_Tp...>; friend unordered_set<_Val, _Hash1, _Eq1, _Alloc>; }; template<typename _Val, typename _Hash1, typename _Eq1, typename _Alloc, typename _Hash2, typename _Eq2> struct _Hash_merge_helper< std::unordered_multiset<_Val, _Hash1, _Eq1, _Alloc>, _Hash2, _Eq2> { private: template<typename... _Tp> using unordered_set = std::unordered_set<_Tp...>; template<typename... _Tp> using unordered_multiset = std::unordered_multiset<_Tp...>; friend unordered_multiset<_Val, _Hash1, _Eq1, _Alloc>; }; } namespace std __attribute__ ((__visibility__ ("default"))) { namespace pmr { 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 std __attribute__ ((__visibility__ ("default"))) { ; ; } namespace folly { namespace f14 { namespace detail { template <typename Policy> class F14BasicSet { template <typename K, typename T> using EnableHeterogeneousFind = std::enable_if_t< ::folly::detail::EligibleForHeterogeneousFind< typename Policy::Value, typename Policy::Hasher, typename Policy::KeyEqual, K>::value, T>; template <typename K, typename T> using EnableHeterogeneousInsert = std::enable_if_t< ::folly::detail::EligibleForHeterogeneousInsert< typename Policy::Value, typename Policy::Hasher, typename Policy::KeyEqual, K>::value, T>; template <typename K> using IsIter = std::is_same<typename Policy::Iter, remove_cvref_t<K>>; template <typename K, typename T> using EnableHeterogeneousErase = std::enable_if_t< ::folly::detail::EligibleForHeterogeneousFind< typename Policy::Value, typename Policy::Hasher, typename Policy::KeyEqual, std::conditional_t<IsIter<K>::value, typename Policy::Value, K>>:: value && !IsIter<K>::value, T>; public: using key_type = typename Policy::Value; using value_type = key_type; using size_type = std::size_t; using difference_type = std::ptrdiff_t; using hasher = typename Policy::Hasher; using key_equal = typename Policy::KeyEqual; using allocator_type = typename Policy::Alloc; using reference = value_type&; using const_reference = value_type const&; using pointer = typename Policy::AllocTraits::pointer; using const_pointer = typename Policy::AllocTraits::const_pointer; using iterator = typename Policy::Iter; using const_iterator = iterator; private: using ItemIter = typename Policy::ItemIter; public: ; ; ; ; private: ; ; public: ; private: template <typename Arg> using UsableAsKey = ::folly::detail:: EligibleForHeterogeneousFind<key_type, hasher, key_equal, Arg>; public: ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; private: ; protected: F14Table<Policy> table_; }; } } template <typename Key, typename Hasher, typename KeyEqual, typename Alloc> class F14ValueSet : public f14::detail::F14BasicSet<f14::detail::SetPolicyWithDefaults< f14::detail::ValueContainerPolicy, Key, Hasher, KeyEqual, Alloc>> { protected: friend struct F14ValueSetTester; using Policy = f14::detail::SetPolicyWithDefaults< f14::detail::ValueContainerPolicy, Key, Hasher, KeyEqual, Alloc>; private: using Super = f14::detail::F14BasicSet<Policy>; public: using typename Super::value_type; using Super::Super; ; }; ; ; ; ; ; ; template <typename Key, typename Hasher, typename KeyEqual, typename Alloc> class F14NodeSet : public f14::detail::F14BasicSet<f14::detail::SetPolicyWithDefaults< f14::detail::NodeContainerPolicy, Key, Hasher, KeyEqual, Alloc>> { protected: using Policy = f14::detail::SetPolicyWithDefaults< f14::detail::NodeContainerPolicy, Key, Hasher, KeyEqual, Alloc>; private: using Super = f14::detail::F14BasicSet<Policy>; public: using typename Super::value_type; using Super::Super; F14NodeSet& operator=(std::initializer_list<value_type> ilist) ; void swap(F14NodeSet& rhs) noexcept(Policy::kSwapIsNoexcept) ; template <typename V> void visitContiguousRanges(V&& visitor) const ; }; template < typename InputIt, typename Hasher = f14::DefaultHasher<iterator_value_type_t<InputIt>>, typename KeyEqual = f14::DefaultKeyEqual<iterator_value_type_t<InputIt>>, typename Alloc = f14::DefaultAlloc<iterator_value_type_t<InputIt>>, typename = detail::RequireInputIterator<InputIt>, typename = detail::RequireNotAllocator<Hasher>, typename = detail::RequireNotAllocator<KeyEqual>, typename = detail::RequireAllocator<Alloc>> F14NodeSet( InputIt, InputIt, std::size_t = {}, Hasher = {}, KeyEqual = {}, Alloc = {}) -> F14NodeSet<iterator_value_type_t<InputIt>, Hasher, KeyEqual, Alloc>; template < typename InputIt, typename Alloc, typename = detail::RequireInputIterator<InputIt>, typename = detail::RequireAllocator<Alloc>> F14NodeSet(InputIt, InputIt, std::size_t, Alloc) -> F14NodeSet< iterator_value_type_t<InputIt>, f14::DefaultHasher<iterator_value_type_t<InputIt>>, f14::DefaultKeyEqual<iterator_value_type_t<InputIt>>, Alloc>; template < typename InputIt, typename Hasher, typename Alloc, typename = detail::RequireInputIterator<InputIt>, typename = detail::RequireNotAllocator<Hasher>, typename = detail::RequireAllocator<Alloc>> F14NodeSet(InputIt, InputIt, std::size_t, Hasher, Alloc) -> F14NodeSet< iterator_value_type_t<InputIt>, Hasher, f14::DefaultKeyEqual<iterator_value_type_t<InputIt>>, Alloc>; template < typename Key, typename Hasher = f14::DefaultHasher<Key>, typename KeyEqual = f14::DefaultKeyEqual<Key>, typename Alloc = f14::DefaultAlloc<Key>, typename = detail::RequireNotAllocator<Hasher>, typename = detail::RequireNotAllocator<KeyEqual>, typename = detail::RequireAllocator<Alloc>> F14NodeSet( std::initializer_list<Key>, std::size_t = {}, Hasher = {}, KeyEqual = {}, Alloc = {}) -> F14NodeSet<Key, Hasher, KeyEqual, Alloc>; template < typename Key, typename Alloc, typename = detail::RequireAllocator<Alloc>> F14NodeSet(std::initializer_list<Key>, std::size_t, Alloc) -> F14NodeSet< Key, f14::DefaultHasher<Key>, f14::DefaultKeyEqual<Key>, Alloc>; template < typename Key, typename Hasher, typename Alloc, typename = detail::RequireAllocator<Alloc>> F14NodeSet(std::initializer_list<Key>, std::size_t, Hasher, Alloc) -> F14NodeSet<Key, Hasher, f14::DefaultKeyEqual<Key>, Alloc>; namespace f14 { namespace detail { template < typename Key, typename Hasher, typename KeyEqual, typename Alloc, typename EligibleForPerturbedInsertionOrder> class F14VectorSetImpl : public F14BasicSet<SetPolicyWithDefaults< VectorContainerPolicy, Key, Hasher, KeyEqual, Alloc, EligibleForPerturbedInsertionOrder>> { protected: using Policy = SetPolicyWithDefaults< VectorContainerPolicy, Key, Hasher, KeyEqual, Alloc, EligibleForPerturbedInsertionOrder>; private: using Super = F14BasicSet<Policy>; template <typename K> using IsIter = Disjunction< std::is_same<typename Policy::Iter, remove_cvref_t<K>>, std::is_same<typename Policy::ReverseIter, remove_cvref_t<K>>>; template <typename K, typename T> using EnableHeterogeneousVectorErase = std::enable_if_t< ::folly::detail::EligibleForHeterogeneousFind< typename Policy::Value, typename Policy::Hasher, typename Policy::KeyEqual, std::conditional_t<IsIter<K>::value, typename Policy::Value, K>>:: value && !IsIter<K>::value, T>; public: using typename Super::const_iterator; using typename Super::iterator; using typename Super::key_type; using typename Super::value_type; F14VectorSetImpl() = default; using Super::Super; F14VectorSetImpl& operator=(std::initializer_list<value_type> ilist) ; iterator begin() ; const_iterator begin() const ; const_iterator cbegin() const ; private: ; ; public: ; ; ; ; ; ; }; } } template <typename Key, typename Hasher, typename KeyEqual, typename Alloc> class F14VectorSet : public f14::detail:: F14VectorSetImpl<Key, Hasher, KeyEqual, Alloc, std::false_type> { using Super = f14::detail:: F14VectorSetImpl<Key, Hasher, KeyEqual, Alloc, std::false_type>; public: using typename Super::const_iterator; using typename Super::iterator; using typename Super::value_type; using reverse_iterator = typename Super::Policy::ReverseIter; using const_reverse_iterator = reverse_iterator; using Super::Super; }; ; ; ; ; ; ; template <typename Key, typename Hasher, typename KeyEqual, typename Alloc> class F14FastSet : public std::conditional_t< sizeof(Key) < 24, F14ValueSet<Key, Hasher, KeyEqual, Alloc>, f14::detail:: F14VectorSetImpl<Key, Hasher, KeyEqual, Alloc, std::true_type>> { using Super = std::conditional_t< sizeof(Key) < 24, F14ValueSet<Key, Hasher, KeyEqual, Alloc>, f14::detail:: F14VectorSetImpl<Key, Hasher, KeyEqual, Alloc, std::true_type>>; public: using typename Super::value_type; using Super::Super; }; ; ; ; ; ; ; } namespace folly { namespace f14 { namespace detail { ; } } ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; } namespace folly { namespace access { struct lock_fn { ; }; [[maybe_unused]] inline constexpr lock_fn lock {}; struct try_lock_fn { ; }; [[maybe_unused]] inline constexpr try_lock_fn try_lock {}; struct try_lock_for_fn { ; }; [[maybe_unused]] inline constexpr try_lock_for_fn try_lock_for {}; struct try_lock_until_fn { ; }; [[maybe_unused]] inline constexpr try_lock_until_fn try_lock_until {}; struct unlock_fn { ; }; [[maybe_unused]] inline constexpr unlock_fn unlock {}; struct lock_shared_fn { ; }; [[maybe_unused]] inline constexpr lock_shared_fn lock_shared {}; struct try_lock_shared_fn { ; }; [[maybe_unused]] inline constexpr try_lock_shared_fn try_lock_shared {}; struct try_lock_shared_for_fn { ; }; [[maybe_unused]] inline constexpr try_lock_shared_for_fn try_lock_shared_for {}; struct try_lock_shared_until_fn { ; }; [[maybe_unused]] inline constexpr try_lock_shared_until_fn try_lock_shared_until {}; struct unlock_shared_fn { ; }; [[maybe_unused]] inline constexpr unlock_shared_fn unlock_shared {}; struct lock_upgrade_fn { ; }; [[maybe_unused]] inline constexpr lock_upgrade_fn lock_upgrade {}; struct try_lock_upgrade_fn { ; }; [[maybe_unused]] inline constexpr try_lock_upgrade_fn try_lock_upgrade {}; struct try_lock_upgrade_for_fn { ; }; [[maybe_unused]] inline constexpr try_lock_upgrade_for_fn try_lock_upgrade_for {}; struct try_lock_upgrade_until_fn { ; }; [[maybe_unused]] inline constexpr try_lock_upgrade_until_fn try_lock_upgrade_until {}; struct unlock_upgrade_fn { ; }; [[maybe_unused]] inline constexpr unlock_upgrade_fn unlock_upgrade {}; struct unlock_and_lock_shared_fn { ; }; [[maybe_unused]] inline constexpr unlock_and_lock_shared_fn unlock_and_lock_shared {}; struct unlock_and_lock_upgrade_fn { ; }; [[maybe_unused]] inline constexpr unlock_and_lock_upgrade_fn unlock_and_lock_upgrade {}; struct try_unlock_shared_and_lock_fn { ; }; [[maybe_unused]] inline constexpr try_unlock_shared_and_lock_fn try_unlock_shared_and_lock {}; struct try_unlock_shared_and_lock_for_fn { ; }; [[maybe_unused]] inline constexpr try_unlock_shared_and_lock_for_fn try_unlock_shared_and_lock_for {}; struct try_unlock_shared_and_lock_until_fn { ; }; [[maybe_unused]] inline constexpr try_unlock_shared_and_lock_until_fn try_unlock_shared_and_lock_until {}; struct try_unlock_shared_and_lock_upgrade_fn { ; }; [[maybe_unused]] inline constexpr try_unlock_shared_and_lock_upgrade_fn try_unlock_shared_and_lock_upgrade {}; struct try_unlock_shared_and_lock_upgrade_for_fn { ; }; [[maybe_unused]] inline constexpr try_unlock_shared_and_lock_upgrade_for_fn try_unlock_shared_and_lock_upgrade_for {}; struct try_unlock_shared_and_lock_upgrade_until_fn { ; }; [[maybe_unused]] inline constexpr try_unlock_shared_and_lock_upgrade_until_fn try_unlock_shared_and_lock_upgrade_until {}; struct unlock_upgrade_and_lock_fn { ; }; [[maybe_unused]] inline constexpr unlock_upgrade_and_lock_fn unlock_upgrade_and_lock {}; struct try_unlock_upgrade_and_lock_fn { ; }; [[maybe_unused]] inline constexpr try_unlock_upgrade_and_lock_fn try_unlock_upgrade_and_lock {}; struct try_unlock_upgrade_and_lock_for_fn { ; }; [[maybe_unused]] inline constexpr try_unlock_upgrade_and_lock_for_fn try_unlock_upgrade_and_lock_for {}; struct try_unlock_upgrade_and_lock_until_fn { ; }; [[maybe_unused]] inline constexpr try_unlock_upgrade_and_lock_until_fn try_unlock_upgrade_and_lock_until {}; struct unlock_upgrade_and_lock_shared_fn { ; }; [[maybe_unused]] inline constexpr unlock_upgrade_and_lock_shared_fn unlock_upgrade_and_lock_shared {}; } namespace detail { template <typename Mutex, typename Policy> class lock_base { public: using mutex_type = Mutex; using state_type = invoke_result_t<typename Policy::lock_fn, mutex_type&>; static_assert( std::is_same<state_type, std::decay_t<state_type>>::value, "state_type, if not void, must be a value type"); static_assert( std::is_void<state_type>::value || (std::is_nothrow_default_constructible<state_type>::value && std::is_nothrow_copy_constructible<state_type>::value && std::is_nothrow_copy_assignable<state_type>::value && std::is_nothrow_destructible<state_type>::value), "state_type, if not void, must be noexcept-semiregular"); static_assert( std::is_void<state_type>::value || std::is_constructible<bool, state_type>::value, "state_type, if not void, must explicitly convert to bool"); private: static constexpr bool has_state_ = !std::is_void<state_type>::value; using owner_type = conditional_t<has_state_, state_type, bool>; template <bool C, typename V = int> using if_ = std::enable_if_t<C, V>; mutex_type* mutex_{}; owner_type state_{}; public: ; ; [[nodiscard]] [[nodiscard]] ; ; ; ; ; protected: private: ; ; }; template <typename Mutex, typename Policy> class lock_guard_base : unsafe_for_async_usage_if<!is_coro_aware_mutex_v<Mutex>> { private: using lock_type_ = lock_base<Mutex, Policy>; using lock_state_type_ = typename lock_type_::state_type; static constexpr bool has_state_ = !std::is_void<lock_state_type_>::value; using state_type_ = conditional_t<has_state_, lock_state_type_, bool>; template <bool C> using if_ = std::enable_if_t<C, int>; public: using mutex_type = Mutex; ; ; private: lock_type_ lock_; }; struct lock_policy_unique { using lock_fn = access::lock_fn; using try_lock_fn = access::try_lock_fn; using try_lock_for_fn = access::try_lock_for_fn; using try_lock_until_fn = access::try_lock_until_fn; using unlock_fn = access::unlock_fn; }; struct lock_policy_shared { using lock_fn = access::lock_shared_fn; using try_lock_fn = access::try_lock_shared_fn; using try_lock_for_fn = access::try_lock_shared_for_fn; using try_lock_until_fn = access::try_lock_shared_until_fn; using unlock_fn = access::unlock_shared_fn; }; struct lock_policy_upgrade { using lock_fn = access::lock_upgrade_fn; using try_lock_fn = access::try_lock_upgrade_fn; using try_lock_for_fn = access::try_lock_upgrade_for_fn; using try_lock_until_fn = access::try_lock_upgrade_until_fn; using unlock_fn = access::unlock_upgrade_fn; }; template <typename Mutex> using lock_policy_hybrid = conditional_t< is_invocable_v<access::lock_shared_fn, Mutex&>, lock_policy_shared, lock_policy_unique>; template <typename Mutex> using lock_base_unique = lock_base<Mutex, lock_policy_unique>; template <typename Mutex> using lock_base_shared = lock_base<Mutex, lock_policy_shared>; template <typename Mutex> using lock_base_upgrade = lock_base<Mutex, lock_policy_upgrade>; template <typename Mutex> using lock_base_hybrid = lock_base<Mutex, lock_policy_hybrid<Mutex>>; } template <typename Mutex> class unique_lock_base : public detail::lock_base_unique<Mutex> { private: using base = detail::lock_base_unique<Mutex>; using self = unique_lock_base; public: using base::base; }; template <typename Mutex> class shared_lock_base : public detail::lock_base_shared<Mutex> { private: using base = detail::lock_base_shared<Mutex>; using self = shared_lock_base; public: using base::base; }; template <typename Mutex> class upgrade_lock_base : public detail::lock_base_upgrade<Mutex> { private: using base = detail::lock_base_upgrade<Mutex>; using self = upgrade_lock_base; public: using base::base; }; template <typename Mutex> class hybrid_lock_base : public detail::lock_base_hybrid<Mutex> { private: using base = detail::lock_base_hybrid<Mutex>; using self = hybrid_lock_base; public: using base::base; }; using std::unique_lock; using std::shared_lock; template <typename Mutex> class upgrade_lock : public upgrade_lock_base<Mutex> { public: using upgrade_lock_base<Mutex>::upgrade_lock_base; }; ; template <typename Mutex> class hybrid_lock : public hybrid_lock_base<Mutex> { public: using hybrid_lock_base<Mutex>::hybrid_lock_base; }; ; template <typename Mutex> class unique_lock_guard_base : public detail::lock_guard_base<Mutex, detail::lock_policy_unique> { private: using base = detail::lock_guard_base<Mutex, detail::lock_policy_unique>; public: using base::base; }; template <typename Mutex> using unique_lock_guard = std::lock_guard<Mutex>; template <typename Mutex> class shared_lock_guard : public detail::lock_guard_base<Mutex, detail::lock_policy_shared> { private: using base = detail::lock_guard_base<Mutex, detail::lock_policy_shared>; public: using base::base; }; template <typename Mutex> class hybrid_lock_guard : public detail::lock_guard_base<Mutex, detail::lock_policy_hybrid<Mutex>> { private: using base = detail::lock_guard_base<Mutex, detail::lock_policy_hybrid<Mutex>>; public: using base::base; }; ; struct make_unique_lock_fn { ; }; inline constexpr make_unique_lock_fn make_unique_lock{}; struct make_shared_lock_fn { ; }; inline constexpr make_shared_lock_fn make_shared_lock{}; struct make_upgrade_lock_fn { ; }; inline constexpr make_upgrade_lock_fn make_upgrade_lock{}; struct make_hybrid_lock_fn { ; }; inline constexpr make_hybrid_lock_fn make_hybrid_lock{}; } namespace std { ; ; ; } namespace folly { namespace detail { template <typename L> using lock_state_type_of_t_ = typename L::state_type; template <typename L> using lock_state_type_of_t = detected_or_t<void, lock_state_type_of_t_, L>; template <typename State> struct transition_lock_result_ { template <typename Transition, typename Mutex, typename... A> using apply = invoke_result_t<Transition, Mutex&, State const&, A const&...>; }; template <> struct transition_lock_result_<void> { template <typename Transition, typename Mutex, typename... A> using apply = invoke_result_t<Transition, Mutex&, A const&...>; }; template <typename From, typename Transition, typename... A> using transition_lock_result_t_ = typename transition_lock_result_<lock_state_type_of_t<From>>:: template apply<Transition, typename From::mutex_type&, A...>; ; ; ; ; template <typename, typename> struct transition_lock_policy; template <typename Mutex> struct transition_lock_policy<unique_lock<Mutex>, shared_lock<Mutex>> { using transition_fn = access::unlock_and_lock_shared_fn; }; template <typename Mutex> struct transition_lock_policy<unique_lock<Mutex>, upgrade_lock<Mutex>> { using transition_fn = access::unlock_and_lock_upgrade_fn; }; template <typename Mutex> struct transition_lock_policy<shared_lock<Mutex>, unique_lock<Mutex>> { using try_transition_fn = access::try_unlock_shared_and_lock_fn; using try_transition_for_fn = access::try_unlock_shared_and_lock_for_fn; using try_transition_until_fn = access::try_unlock_shared_and_lock_until_fn; }; template <typename Mutex> struct transition_lock_policy<shared_lock<Mutex>, upgrade_lock<Mutex>> { using try_transition_fn = access::try_unlock_shared_and_lock_upgrade_fn; using try_transition_for_fn = access::try_unlock_shared_and_lock_upgrade_for_fn; using try_transition_until_fn = access::try_unlock_shared_and_lock_upgrade_until_fn; }; template <typename Mutex> struct transition_lock_policy<upgrade_lock<Mutex>, unique_lock<Mutex>> { using transition_fn = access::unlock_upgrade_and_lock_fn; using try_transition_fn = access::try_unlock_upgrade_and_lock_fn; using try_transition_for_fn = access::try_unlock_upgrade_and_lock_for_fn; using try_transition_until_fn = access::try_unlock_upgrade_and_lock_until_fn; }; template <typename Mutex> struct transition_lock_policy<upgrade_lock<Mutex>, shared_lock<Mutex>> { using transition_fn = access::unlock_upgrade_and_lock_shared_fn; }; } ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; } typedef long int ptrdiff_t; typedef long unsigned int size_t; typedef long unsigned int rsize_t; namespace apache { namespace thrift { namespace type { enum class FieldId : ::std::int16_t; struct all_c {}; struct primitive_c : all_c {}; struct number_c : primitive_c {}; struct integral_c : number_c {}; struct floating_point_c : number_c {}; struct enum_c : number_c {}; struct string_c : primitive_c {}; struct structured_c : all_c {}; struct struct_except_c : structured_c {}; struct struct_c : struct_except_c {}; struct exception_c : struct_except_c {}; struct union_c : structured_c {}; struct container_c : all_c {}; struct list_c : container_c {}; struct set_c : container_c {}; struct map_c : container_c {}; struct service_c {}; struct void_t {}; struct bool_t : integral_c {}; struct byte_t : integral_c {}; struct i16_t : integral_c {}; struct i32_t : integral_c {}; struct i64_t : integral_c {}; struct float_t : floating_point_c {}; struct double_t : floating_point_c {}; struct string_t : string_c {}; struct binary_t : string_c {}; template <typename T> struct enum_t : enum_c {}; template <typename T> struct struct_t : struct_c {}; template <typename T> struct union_t : union_c {}; template <typename T> struct exception_t : exception_c {}; template <typename VTag> struct list : list_c {}; template <typename KTag> struct set : set_c {}; template <typename KTag, typename VTag> struct map : map_c {}; template < typename Adapter, typename Tag> struct adapted : Tag {}; template < typename T, typename Tag> struct cpp_type : Tag {}; template <typename T> struct service_t : service_c {}; template <FieldId Id, typename Tag> struct field_t; template <class... Tags> struct fields; template <typename Tag, typename Context> struct field : Tag {}; } } } namespace apache { namespace thrift { namespace type { enum class Ordinal : uint32_t {}; template <Ordinal ord> using ordinal_tag = std::integral_constant<Ordinal, ord>; template <std::underlying_type_t<Ordinal> ord> using ordinal = ordinal_tag<Ordinal(ord)>; template <typename Id> inline constexpr bool is_ordinal_v = false; template <Ordinal ord> inline constexpr bool is_ordinal_v<std::integral_constant<Ordinal, ord>> = true; enum class FieldId : int16_t; template <FieldId id> using field_id_tag = std::integral_constant<FieldId, id>; template <std::underlying_type_t<FieldId> id> using field_id = field_id_tag<FieldId(id)>; template <typename Id> inline constexpr bool is_field_id_v = false; template <FieldId id> inline constexpr bool is_field_id_v<std::integral_constant<FieldId, id>> = true; template <typename Id, typename = void> inline constexpr bool is_ident_v = false; template <typename Id> inline constexpr bool is_ident_v< Id, decltype(__fbthrift_check_whether_type_is_ident_via_adl( static_cast<Id&& (*)() noexcept>(nullptr)()))> = true; namespace detail { template <class Id, class = void> inline constexpr bool is_type_tag_v = false; template <class Id> inline constexpr bool is_type_tag_v<Id, decltype(is_type_tag_impl(static_cast<Id&& (*)() noexcept>(nullptr)()))> = true; template <size_t pos> using pos_to_ordinal = ordinal<pos + 1>; } template <typename Id> inline constexpr bool is_id_v = detail::is_type_tag_v<Id> || is_field_id_v<Id> || is_ordinal_v<Id> || is_ident_v<Id>; template <typename Id, typename R = void> using if_id = std::enable_if_t<is_id_v<Id>, R>; template <typename Id, typename R = void> using if_not_id = std::enable_if_t<!is_id_v<Id>, R>; } } } namespace apache { namespace thrift { namespace type { enum class FieldId : ::std::int16_t; } using FieldId = type::FieldId; template <std::underlying_type_t<FieldId> id> using field_id = type::field_id_tag<FieldId(id)>; using FieldOrdinal = type::Ordinal; template <std::underlying_type_t<FieldOrdinal> ord> using field_ordinal = type::ordinal_tag<FieldOrdinal(ord)>; template <typename Struct, int16_t FieldId> struct FieldContext { static constexpr int16_t kFieldId = FieldId; Struct& object; }; } } namespace std __attribute__ ((__visibility__ ("default"))) { enum _Rb_tree_color { _S_red = false, _S_black = true }; struct _Rb_tree_node_base { typedef _Rb_tree_node_base* _Base_ptr; typedef const _Rb_tree_node_base* _Const_Base_ptr; _Rb_tree_color _M_color; _Base_ptr _M_parent; _Base_ptr _M_left; _Base_ptr _M_right; }; template<typename _Key_compare> struct _Rb_tree_key_compare { _Key_compare _M_key_compare; _Rb_tree_key_compare() noexcept(is_nothrow_default_constructible<_Key_compare>::value) ; }; struct _Rb_tree_header { _Rb_tree_node_base _M_header; size_t _M_node_count; }; template<typename _Val> struct _Rb_tree_node : public _Rb_tree_node_base { typedef _Rb_tree_node<_Val>* _Link_type; __gnu_cxx::__aligned_membuf<_Val> _M_storage; }; template<typename _Tp> struct _Rb_tree_iterator { typedef _Tp value_type; typedef _Tp& reference; typedef _Tp* pointer; typedef bidirectional_iterator_tag iterator_category; typedef ptrdiff_t difference_type; typedef _Rb_tree_iterator<_Tp> _Self; typedef _Rb_tree_node_base::_Base_ptr _Base_ptr; typedef _Rb_tree_node<_Tp>* _Link_type; _Base_ptr _M_node; }; template<typename _Tp> struct _Rb_tree_const_iterator { typedef _Tp value_type; typedef const _Tp& reference; typedef const _Tp* pointer; typedef _Rb_tree_iterator<_Tp> iterator; typedef bidirectional_iterator_tag iterator_category; typedef ptrdiff_t difference_type; typedef _Rb_tree_const_iterator<_Tp> _Self; typedef _Rb_tree_node_base::_Const_Base_ptr _Base_ptr; typedef const _Rb_tree_node<_Tp>* _Link_type; _Base_ptr _M_node; }; template<typename _Tree1, typename _Cmp2> struct _Rb_tree_merge_helper { }; template<typename _Key, typename _Val, typename _KeyOfValue, typename _Compare, typename _Alloc = allocator<_Val> > class _Rb_tree { typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template rebind<_Rb_tree_node<_Val> >::other _Node_allocator; typedef __gnu_cxx::__alloc_traits<_Node_allocator> _Alloc_traits; protected: typedef _Rb_tree_node_base* _Base_ptr; typedef const _Rb_tree_node_base* _Const_Base_ptr; typedef _Rb_tree_node<_Val>* _Link_type; typedef const _Rb_tree_node<_Val>* _Const_Link_type; private: struct _Reuse_or_alloc_node { ; private: _Base_ptr _M_root; _Base_ptr _M_nodes; _Rb_tree& _M_t; }; struct _Alloc_node { ; private: _Rb_tree& _M_t; }; public: typedef _Key key_type; typedef _Val value_type; typedef value_type* pointer; typedef const value_type* const_pointer; typedef value_type& reference; typedef const value_type& const_reference; typedef size_t size_type; typedef ptrdiff_t difference_type; typedef _Alloc allocator_type; protected: ; ; ; protected: template<typename _Key_compare, bool = __is_pod(_Key_compare)> struct _Rb_tree_impl : public _Node_allocator , public _Rb_tree_key_compare<_Key_compare> , public _Rb_tree_header { typedef _Rb_tree_key_compare<_Key_compare> _Base_key_compare; _Rb_tree_impl() noexcept(is_nothrow_default_constructible<_Node_allocator>::value && is_nothrow_default_constructible<_Base_key_compare>::value) ; }; _Rb_tree_impl<_Compare> _M_impl; protected: public: typedef _Rb_tree_iterator<value_type> iterator; typedef _Rb_tree_const_iterator<value_type> const_iterator; typedef std::reverse_iterator<iterator> reverse_iterator; typedef std::reverse_iterator<const_iterator> const_reverse_iterator; using node_type = _Node_handle<_Key, _Val, _Node_allocator>; using insert_return_type = _Node_insert_return< __conditional_t<is_same_v<_Key, _Val>, const_iterator, iterator>, node_type>; private: ; ; ; enum { __as_lvalue, __as_rvalue }; ; ; public: _Rb_tree() = default; private: public: ~_Rb_tree() noexcept ; [[__nodiscard__]] ; ; ; ; ; ; ; ; ; ; template<typename _Iter> using __same_value_type = is_same<value_type, typename iterator_traits<_Iter>::value_type>; ; ; ; ; private: public: ; ; ; ; ; ; ; ; ; ; ; private: public: template<typename _Compare2> using _Compatible_tree = _Rb_tree<_Key, _Val, _KeyOfValue, _Compare2, _Alloc>; template<typename, typename> friend struct _Rb_tree_merge_helper; ; ; private: struct _Auto_node { ; _Rb_tree& _M_t; _Link_type _M_node; }; }; ; template<typename _Key, typename _Val, typename _Sel, typename _Cmp1, typename _Alloc, typename _Cmp2> struct _Rb_tree_merge_helper<_Rb_tree<_Key, _Val, _Sel, _Cmp1, _Alloc>, _Cmp2> { private: friend class _Rb_tree<_Key, _Val, _Sel, _Cmp1, _Alloc>; }; } namespace std __attribute__ ((__visibility__ ("default"))) { template <typename _Key, typename _Tp, typename _Compare, typename _Alloc> class multimap; template <typename _Key, typename _Tp, typename _Compare = std::less<_Key>, typename _Alloc = std::allocator<std::pair<const _Key, _Tp> > > class map { public: typedef _Key key_type; typedef _Tp mapped_type; typedef std::pair<const _Key, _Tp> value_type; typedef _Compare key_compare; typedef _Alloc allocator_type; private: static_assert(is_same<typename _Alloc::value_type, value_type>::value, "std::map must have the same value_type as its allocator"); public: #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" class value_compare : public std::binary_function<value_type, value_type, bool> { friend class map<_Key, _Tp, _Compare, _Alloc>; protected: _Compare comp; public: }; #pragma GCC diagnostic pop private: typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template rebind<value_type>::other _Pair_alloc_type; typedef _Rb_tree<key_type, value_type, _Select1st<value_type>, key_compare, _Pair_alloc_type> _Rep_type; _Rep_type _M_t; typedef __gnu_cxx::__alloc_traits<_Pair_alloc_type> _Alloc_traits; template<typename _Up, typename _Vp = remove_reference_t<_Up>> static constexpr bool __usable_key = __or_v<is_same<const _Vp, const _Key>, __and_<is_scalar<_Vp>, is_scalar<_Key>>>; public: 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 _Rep_type::iterator iterator; typedef typename _Rep_type::const_iterator const_iterator; typedef typename _Rep_type::size_type size_type; typedef typename _Rep_type::difference_type difference_type; typedef typename _Rep_type::reverse_iterator reverse_iterator; typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; using node_type = typename _Rep_type::node_type; using insert_return_type = typename _Rep_type::insert_return_type; ; ; ; [[__nodiscard__]] ; ; template<typename, typename> friend struct std::_Rb_tree_merge_helper; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; }; ; ; ; ; ; ; ; template<typename _Key, typename _Val, typename _Cmp1, typename _Alloc, typename _Cmp2> struct _Rb_tree_merge_helper<std::map<_Key, _Val, _Cmp1, _Alloc>, _Cmp2> { private: friend class std::map<_Key, _Val, _Cmp1, _Alloc>; }; } namespace std __attribute__ ((__visibility__ ("default"))) { template <typename _Key, typename _Tp, typename _Compare, typename _Alloc> class map; template <typename _Key, typename _Tp, typename _Compare = std::less<_Key>, typename _Alloc = std::allocator<std::pair<const _Key, _Tp> > > class multimap { public: typedef _Key key_type; typedef _Tp mapped_type; typedef std::pair<const _Key, _Tp> value_type; typedef _Compare key_compare; typedef _Alloc allocator_type; private: static_assert(is_same<typename _Alloc::value_type, value_type>::value, "std::multimap must have the same value_type as its allocator"); public: #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" class value_compare : public std::binary_function<value_type, value_type, bool> { friend class multimap<_Key, _Tp, _Compare, _Alloc>; protected: _Compare comp; public: }; #pragma GCC diagnostic pop private: typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template rebind<value_type>::other _Pair_alloc_type; typedef _Rb_tree<key_type, value_type, _Select1st<value_type>, key_compare, _Pair_alloc_type> _Rep_type; _Rep_type _M_t; typedef __gnu_cxx::__alloc_traits<_Pair_alloc_type> _Alloc_traits; public: 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 _Rep_type::iterator iterator; typedef typename _Rep_type::const_iterator const_iterator; typedef typename _Rep_type::size_type size_type; typedef typename _Rep_type::difference_type difference_type; typedef typename _Rep_type::reverse_iterator reverse_iterator; typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; using node_type = typename _Rep_type::node_type; ; ; ; [[__nodiscard__]] ; ; ; ; ; template<typename, typename> friend struct std::_Rb_tree_merge_helper; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; }; ; ; ; ; ; ; ; template<typename _Key, typename _Val, typename _Cmp1, typename _Alloc, typename _Cmp2> struct _Rb_tree_merge_helper<std::multimap<_Key, _Val, _Cmp1, _Alloc>, _Cmp2> { private: friend class std::multimap<_Key, _Val, _Cmp1, _Alloc>; }; } namespace std __attribute__ ((__visibility__ ("default"))) { namespace pmr { template<typename _Key, typename _Tp, typename _Cmp = std::less<_Key>> using map = std::map<_Key, _Tp, _Cmp, polymorphic_allocator<pair<const _Key, _Tp>>>; template<typename _Key, typename _Tp, typename _Cmp = std::less<_Key>> using multimap = std::multimap<_Key, _Tp, _Cmp, polymorphic_allocator<pair<const _Key, _Tp>>>; } } namespace std __attribute__ ((__visibility__ ("default"))) { ; ; } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Key, typename _Compare, typename _Alloc> class multiset; template<typename _Key, typename _Compare = std::less<_Key>, typename _Alloc = std::allocator<_Key> > class set { static_assert(is_same<typename remove_cv<_Key>::type, _Key>::value, "std::set must have a non-const, non-volatile value_type"); static_assert(is_same<typename _Alloc::value_type, _Key>::value, "std::set must have the same value_type as its allocator"); public: typedef _Key key_type; typedef _Key value_type; typedef _Compare key_compare; typedef _Compare value_compare; typedef _Alloc allocator_type; private: typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template rebind<_Key>::other _Key_alloc_type; typedef _Rb_tree<key_type, value_type, _Identity<value_type>, key_compare, _Key_alloc_type> _Rep_type; _Rep_type _M_t; typedef __gnu_cxx::__alloc_traits<_Key_alloc_type> _Alloc_traits; public: 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 _Rep_type::const_iterator iterator; typedef typename _Rep_type::const_iterator const_iterator; typedef typename _Rep_type::const_reverse_iterator reverse_iterator; typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; typedef typename _Rep_type::size_type size_type; typedef typename _Rep_type::difference_type difference_type; using node_type = typename _Rep_type::node_type; using insert_return_type = typename _Rep_type::insert_return_type; ; ; ; ~set() = default; set& operator=(const set&) = default; [[__nodiscard__]] ; ; ; template<typename, typename> friend struct std::_Rb_tree_merge_helper; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; }; ; ; ; ; ; ; ; template<typename _Val, typename _Cmp1, typename _Alloc, typename _Cmp2> struct _Rb_tree_merge_helper<std::set<_Val, _Cmp1, _Alloc>, _Cmp2> { private: friend class std::set<_Val, _Cmp1, _Alloc>; }; } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Key, typename _Compare, typename _Alloc> class set; template <typename _Key, typename _Compare = std::less<_Key>, typename _Alloc = std::allocator<_Key> > class multiset { static_assert(is_same<typename remove_cv<_Key>::type, _Key>::value, "std::multiset must have a non-const, non-volatile value_type"); static_assert(is_same<typename _Alloc::value_type, _Key>::value, "std::multiset must have the same value_type as its allocator"); public: typedef _Key key_type; typedef _Key value_type; typedef _Compare key_compare; typedef _Compare value_compare; typedef _Alloc allocator_type; private: typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template rebind<_Key>::other _Key_alloc_type; typedef _Rb_tree<key_type, value_type, _Identity<value_type>, key_compare, _Key_alloc_type> _Rep_type; _Rep_type _M_t; typedef __gnu_cxx::__alloc_traits<_Key_alloc_type> _Alloc_traits; public: 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 _Rep_type::const_iterator iterator; typedef typename _Rep_type::const_iterator const_iterator; typedef typename _Rep_type::const_reverse_iterator reverse_iterator; typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; typedef typename _Rep_type::size_type size_type; typedef typename _Rep_type::difference_type difference_type; using node_type = typename _Rep_type::node_type; ; ; ; [[__nodiscard__]] ; ; ; template<typename, typename> friend struct std::_Rb_tree_merge_helper; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; }; ; ; ; ; ; ; template<typename _Key, typename _Compare, typename _Alloc> void swap(multiset<_Key, _Compare, _Alloc>& __x, multiset<_Key, _Compare, _Alloc>& __y) noexcept(noexcept(__x.swap(__y))) ; template<typename _Val, typename _Cmp1, typename _Alloc, typename _Cmp2> struct _Rb_tree_merge_helper<std::multiset<_Val, _Cmp1, _Alloc>, _Cmp2> { private: friend class std::multiset<_Val, _Cmp1, _Alloc>; static auto& _S_get_tree(std::set<_Val, _Cmp2, _Alloc>& __set) ; static auto& _S_get_tree(std::multiset<_Val, _Cmp2, _Alloc>& __set) ; }; } namespace std __attribute__ ((__visibility__ ("default"))) { namespace pmr { template<typename _Key, typename _Cmp = std::less<_Key>> using set = std::set<_Key, _Cmp, polymorphic_allocator<_Key>>; template<typename _Key, typename _Cmp = std::less<_Key>> using multiset = std::multiset<_Key, _Cmp, polymorphic_allocator<_Key>>; } } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Key, typename _Compare, typename _Alloc, typename _Predicate> typename set<_Key, _Compare, _Alloc>::size_type erase_if(set<_Key, _Compare, _Alloc>& __cont, _Predicate __pred) ; template<typename _Key, typename _Compare, typename _Alloc, typename _Predicate> typename multiset<_Key, _Compare, _Alloc>::size_type erase_if(multiset<_Key, _Compare, _Alloc>& __cont, _Predicate __pred) ; } extern "C" { struct timezone { int tz_minuteswest; int tz_dsttime; }; extern int gettimeofday (struct timeval *__restrict __tv, void *__restrict __tz) noexcept (true) __attribute__ ((__nonnull__ (1))); extern int settimeofday (const struct timeval *__tv, const struct timezone *__tz) noexcept (true); extern int adjtime (const struct timeval *__delta, struct timeval *__olddelta) noexcept (true); enum __itimer_which { ITIMER_REAL = 0, ITIMER_VIRTUAL = 1, ITIMER_PROF = 2 }; struct itimerval { struct timeval it_interval; struct timeval it_value; }; typedef int __itimer_which_t; extern int getitimer (__itimer_which_t __which, struct itimerval *__value) noexcept (true); extern int setitimer (__itimer_which_t __which, const struct itimerval *__restrict __new, struct itimerval *__restrict __old) noexcept (true); extern int utimes (const char *__file, const struct timeval __tvp[2]) noexcept (true) __attribute__ ((__nonnull__ (1))); extern int lutimes (const char *__file, const struct timeval __tvp[2]) noexcept (true) __attribute__ ((__nonnull__ (1))); extern int futimes (int __fd, const struct timeval __tvp[2]) noexcept (true); extern int futimesat (int __fd, const char *__file, const struct timeval __tvp[2]) noexcept (true); } using folly_port_struct_timezone = struct timezone; namespace apache { namespace thrift { namespace concurrency { class Util { public: static const int64_t NS_PER_S = 1000000000LL; static const int64_t US_PER_S = 1000000LL; static const int64_t MS_PER_S = 1000LL; static const int64_t NS_PER_MS = NS_PER_S / MS_PER_S; static const int64_t NS_PER_US = NS_PER_S / US_PER_S; static const int64_t US_PER_MS = US_PER_S / MS_PER_S; static void toTimespec(struct timespec& result, int64_t value) ; static void toTicks( int64_t& result, int64_t secs, int64_t oldTicks, int64_t oldTicksPerSec, int64_t newTicksPerSec) ; static void toTicks( int64_t& result, const struct timespec& value, int64_t ticksPerSec) ; static void toTicks( int64_t& result, const struct timeval& value, int64_t ticksPerSec) ; static void toMilliseconds(int64_t& result, const struct timespec& value) ; static void toMilliseconds(int64_t& result, const struct timeval& value) ; static int64_t currentTimeTicks(int64_t ticksPerSec); static int64_t currentTime() ; }; } } } namespace apache { namespace thrift { template <typename T> struct TEnumDataStorage { static_assert(sizeof(T) == ~0ull, "invalid use of base template"); }; template <typename T> struct TStructDataStorage { static_assert(sizeof(T) == ~0ull, "invalid use of base template"); }; template <typename T> struct TEnumTraits { static const char* findName(T) ; static bool findValue(const char*, T*) ; }; class TOutput { public: TOutput() ; void setOutputFunction(void (*function)(const char*)) ; void operator()(const char* message) ; void perror(const char* message, int errno_copy); void perror(const std::string& message, int errno_copy) ; void printf(const char* message, ...); static void errorTimeWrapper(const char* msg) ; static std::string strerror_s(int errno_copy); private: void (*f_)(const char*); }; extern TOutput GlobalOutput; class __attribute__((__visibility__("default"))) TException : public std::exception {}; class __attribute__((__visibility__("default"))) TLibraryException : public virtual TException { public: TLibraryException() ; explicit TLibraryException(const std::string& message) ; TLibraryException(const char* message, int errnoValue); ~TLibraryException() noexcept override ; const char* what() const noexcept override ; protected: std::string message_; }; class __attribute__((__visibility__("default"))) AppBaseError : public std::runtime_error { public: AppBaseError(const std::string& name, const std::string& what) ; AppBaseError(std::string&& name, std::string&& what) ; virtual const char* name() const noexcept ; virtual bool isClientError() const noexcept = 0; private: std::string name_; }; class __attribute__((__visibility__("default"))) AppServerError : public AppBaseError { public: using AppBaseError::AppBaseError; bool isClientError() const noexcept override ; }; class __attribute__((__visibility__("default"))) AppClientError : public AppBaseError { public: using AppBaseError::AppBaseError; bool isClientError() const noexcept override ; }; template <class ServiceTag> class ServiceHandler; template <class ServiceTag> class Client; } } namespace apache { namespace thrift { namespace type_class { struct unknown {}; struct nothing {}; struct integral {}; struct floating_point {}; struct binary {}; struct string {}; struct enumeration {}; struct structure {}; struct variant {}; template <typename ValueTypeClass> struct list {}; template <typename ValueTypeClass> struct set {}; template <typename KeyTypeClass, typename MappedTypeClass> struct map {}; } namespace detail { template <typename TypeClass, typename Indirection> struct indirection_tag; } } } namespace apache { namespace thrift { namespace detail { template <typename Tag> struct invoke_reffer; } template <typename Tag> using access_field_fn = detail::invoke_reffer<Tag>; template <typename Tag> inline constexpr access_field_fn<Tag> access_field{}; enum FragileConstructor { FRAGILE, }; enum class ExceptionKind { UNSPECIFIED = 0, TRANSIENT = 1, STATEFUL = 2, PERMANENT = 3, }; enum class ExceptionBlame { UNSPECIFIED = 0, SERVER = 1, CLIENT = 2, }; enum class ExceptionSafety { UNSPECIFIED = 0, SAFE = 1, }; namespace detail { namespace st { struct struct_private_access { template <typename T> static std::bool_constant<T::__fbthrift_cpp2_gen_json> __fbthrift_cpp2_gen_json(); template <typename T> static std::bool_constant<T::__fbthrift_cpp2_is_runtime_annotation> __fbthrift_cpp2_is_runtime_annotation(); template <typename T> static const char* __fbthrift_thrift_uri() ; template <typename T, typename Ord> static const folly::StringPiece __fbthrift_get_field_name() ; template <typename T> static const folly::StringPiece __fbthrift_get_class_name() ; template <typename T> static constexpr ExceptionSafety __fbthrift_cpp2_gen_exception_safety() ; template <typename T> static constexpr ExceptionKind __fbthrift_cpp2_gen_exception_kind() ; template <typename T> static constexpr ExceptionBlame __fbthrift_cpp2_gen_exception_blame() ; struct clear_fn { template <typename O, typename... Args> [[maybe_unused]] __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()( O&& o, Args&&... args) const noexcept(noexcept( static_cast<O&&>(o).__fbthrift_clear(static_cast<Args&&>(args)...))) -> decltype(static_cast<O&&>(o).__fbthrift_clear( static_cast<Args&&>(args)...)) ; }; struct clear_terse_fields_fn { template <typename O, typename... Args> [[maybe_unused]] __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()( O&& o, Args&&... args) const noexcept(noexcept( static_cast<O&&>(o).__fbthrift_clear_terse_fields(static_cast<Args&&>(args)...))) -> decltype(static_cast<O&&>(o).__fbthrift_clear_terse_fields( static_cast<Args&&>(args)...)) ; }; struct empty_fn { template <typename O, typename... Args> [[maybe_unused]] __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()( O&& o, Args&&... args) const noexcept(noexcept( static_cast<O&&>(o).__fbthrift_is_empty(static_cast<Args&&>(args)...))) -> decltype(static_cast<O&&>(o).__fbthrift_is_empty( static_cast<Args&&>(args)...)) ; }; template <typename T, typename Ord> static typename T::template __fbthrift_ident<Ord> __fbthrift_ident(); template <typename T, typename Ord> using ident = decltype(__fbthrift_ident<T, Ord>()); template <typename T, typename Ord> static typename T::template __fbthrift_id<Ord> __fbthrift_field_id(); template <typename T, typename Ord> using field_id = decltype(__fbthrift_field_id<T, Ord>()); template <typename T, typename Ord> static typename T::template __fbthrift_type_tag<Ord> __fbthrift_type_tag(); template <typename T, typename Ord> using type_tag = decltype(__fbthrift_type_tag<T, Ord>()); template <typename T, typename U> static typename T::template __fbthrift_ordinal<U> __fbthrift_ordinal(); template <typename T, typename U> using ordinal = decltype(__fbthrift_ordinal<T, U>()); template <typename T> static constexpr auto __fbthrift_field_size_v = T::__fbthrift_field_size_v; template <typename T> static typename T::__fbthrift_patch_struct __fbthrift_patch_struct(); template <typename T> using patch_struct = decltype(__fbthrift_patch_struct<T>()); template <typename T> static typename T::__fbthrift_safe_patch __fbthrift_safe_patch(); template <typename T> using safe_patch = decltype(__fbthrift_safe_patch<T>()); }; using private_access = struct_private_access; template <typename T, typename = void> struct IsThriftClass : std::false_type {}; template <typename T> struct IsThriftClass<T, folly::void_t<typename T::__fbthrift_cpp2_type>> : std::true_type {}; template <typename T, typename = void> struct IsThriftUnion : std::false_type {}; template <typename T> struct IsThriftUnion<T, folly::void_t<typename T::__fbthrift_cpp2_type>> : std::bool_constant<T::__fbthrift_cpp2_is_union> {}; using clear_terse_fields_fn = private_access::clear_terse_fields_fn; inline static constexpr clear_terse_fields_fn clear_terse_fields{}; } } using clear_fn = detail::st::private_access::clear_fn; inline constexpr clear_fn clear{}; using empty_fn = detail::st::private_access::empty_fn; inline static constexpr empty_fn empty{}; template <typename T> __attribute__((__visibility__("default"))) const std::string& uri() ; template <typename T> constexpr bool is_thrift_class_v = apache::thrift::detail::st::IsThriftClass<T>::value; template <typename T> constexpr bool is_thrift_union_v = apache::thrift::detail::st::IsThriftUnion<T>::value; template <typename T> constexpr bool is_thrift_exception_v = is_thrift_class_v<T> && std::is_base_of<apache::thrift::TException, T>::value; template <typename T> constexpr bool is_thrift_struct_v = is_thrift_class_v<T> && !is_thrift_union_v<T> && !is_thrift_exception_v<T>; template <typename T, typename Fallback> using type_class_of_thrift_class_or_t = folly::conditional_t< is_thrift_union_v<T>, type_class::variant, folly::conditional_t< is_thrift_class_v<T>, type_class::structure, Fallback>>; template <typename T, typename Fallback> using type_class_of_thrift_class_enum_or_t = folly::conditional_t< std::is_enum<T>::value, type_class::enumeration, type_class_of_thrift_class_or_t<T, Fallback>>; template <typename T> using type_class_of_thrift_class_t = type_class_of_thrift_class_or_t<T, void>; template <typename T> using type_class_of_thrift_class_enum_t = type_class_of_thrift_class_enum_or_t<T, void>; namespace detail { template <typename T> struct enum_hash { size_t operator()(T t) const ; }; } namespace detail { template <typename, typename...> struct is_safe_overload { using type = std::true_type; }; template <typename Class, typename T> struct is_safe_overload<Class, T> { using type = std::integral_constant< bool, !std::is_same< Class, typename std::remove_cv< typename std::remove_reference<T>::type>::type>::value>; }; } template <typename Class, typename... Args> using safe_overload_t = typename std::enable_if< apache::thrift::detail::is_safe_overload<Class, Args...>::type::value>:: type; } } namespace apache { namespace thrift { template <typename T> using detect_indirection_fn_t = typename T::__fbthrift_cpp2_indirection_fn; template <typename T> using indirection_fn_t = folly::detected_or_t<folly::identity_fn, detect_indirection_fn_t, T>; namespace detail { struct apply_indirection_fn { private: template <typename T> using i = indirection_fn_t<folly::remove_cvref_t<T>>; public: ; }; } inline constexpr detail::apply_indirection_fn apply_indirection; class ExceptionMetadataOverrideBase { public: protected: ExceptionKind errorKind_{ExceptionKind::UNSPECIFIED}; ExceptionBlame errorBlame_{ExceptionBlame::UNSPECIFIED}; ExceptionSafety errorSafety_{ExceptionSafety::UNSPECIFIED}; }; template <typename T> class ExceptionMetadataOverride : public T, public ExceptionMetadataOverrideBase { public: }; ; namespace detail { enum LazyDeserializationState : uint8_t { UNTAINTED = 1 << 0, DESERIALIZED = 1 << 1, }; ; ; ; ; ; ; ; ; ; namespace qualifier { template <class Struct, class Id> struct is_cpp_ref_field_optional : std::false_type { static_assert(sizeof(Struct), "Struct must be a complete type."); }; template <class Struct, class Id> struct is_cpp_ref_field_terse : std::false_type { static_assert(sizeof(Struct), "Struct must be a complete type."); }; } } } } namespace apache { namespace thrift { namespace adapt_detail { ; template <typename T> using is_mutable_ref = folly::Conjunction< std::is_reference<T>, folly::Negation<std::is_const<std::remove_reference_t<T>>>>; template <typename Adapter, typename ThriftT> using adapted_t = decltype(Adapter::fromThrift(std::declval<ThriftT&&>())); template <typename Adapter, int16_t FieldId, typename ThriftT, typename Struct> using FromThriftFieldIdType = decltype(Adapter::fromThriftField( std::declval<ThriftT>(), std::declval<FieldContext<Struct, FieldId>>())); template <typename Adapter, typename ThriftT, typename Struct> using FromThriftFieldType = decltype(Adapter::fromThriftField( std::declval<ThriftT>(), std::declval<FieldContext<Struct, 0>>())); template <typename Adapter, typename ThriftT, typename Struct> constexpr bool is_field_adapter_v = folly::is_detected_v<FromThriftFieldType, Adapter, ThriftT, Struct>; template < typename Adapter, int16_t FieldId, typename ThriftT, typename Struct, typename R = FromThriftFieldIdType<Adapter, FieldId, ThriftT, Struct>> using if_field_adapter = std::enable_if_t<is_field_adapter_v<Adapter, ThriftT, Struct>, R>; template < typename Adapter, typename ThriftT, typename Struct, typename R = adapted_t<Adapter, ThriftT>> using if_not_field_adapter = std::enable_if_t<!is_field_adapter_v<Adapter, ThriftT, Struct>, R>; template <typename Adapter, typename AdaptedT, typename Context> using ConstructType = decltype(Adapter::construct( std::declval<AdaptedT&>(), std::declval<Context>())); template <typename Adapter, typename AdaptedT, typename Context> constexpr bool is_ctor_adapter_v = folly::is_detected_v<ConstructType, Adapter, AdaptedT, Context>; template <typename Adapter, typename AdaptedT, typename Context> using if_ctor_adapter = std::enable_if_t<is_ctor_adapter_v<Adapter, AdaptedT, Context>>; template <typename Adapter, typename AdaptedT, typename Context> using if_not_ctor_adapter = std::enable_if_t<!is_ctor_adapter_v<Adapter, AdaptedT, Context>>; template <typename Adapter, typename AdaptedT> using ClearType = decltype(Adapter::clear(std::declval<AdaptedT&>())); template <typename Adapter, typename AdaptedT> constexpr bool is_clear_adapter_v = folly::is_detected_v<ClearType, Adapter, AdaptedT>; template <typename Adapter, typename AdaptedT, typename R = void> using if_clear_adapter = std::enable_if_t<is_clear_adapter_v<Adapter, AdaptedT>, R>; template <typename Adapter, typename AdaptedT, typename R = void> using if_not_clear_adapter = std::enable_if_t<!is_clear_adapter_v<Adapter, AdaptedT>, R>; template <typename Adapter, typename AdaptedT> using IsEmptyType = decltype(Adapter::isEmpty(std::declval<const AdaptedT&>())); template <typename Adapter, typename AdaptedT> constexpr bool is_empty_adapter_v = folly::is_detected_v<IsEmptyType, Adapter, AdaptedT>; template <typename Adapter, typename AdaptedT> using if_is_empty_adapter = std::enable_if_t<is_empty_adapter_v<Adapter, AdaptedT>, bool>; template <typename Adapter, typename AdaptedT> using if_not_is_empty_adapter = std::enable_if_t<!is_empty_adapter_v<Adapter, AdaptedT>, bool>; ; ; template <typename Adapter, int16_t FieldId, typename ThriftT, typename Struct> using adapted_field_t = decltype(fromThriftField<Adapter, FieldId>( std::declval<ThriftT&&>(), std::declval<Struct&>())); template <typename Adapter, typename AdaptedT> using thrift_t = decltype(Adapter::toThrift(std::declval<AdaptedT&>())); template <typename Adapter, typename AdaptedT, typename = void> using has_inplace_toThrift = is_mutable_ref<folly::detected_t<thrift_t, Adapter, AdaptedT>>; ; ; ; ; ; ; ; template <typename Adapter, typename AdaptedT> struct thrift_equal { }; template <typename Adapter, typename AdaptedT, typename = void> struct adapted_equal : thrift_equal<Adapter, AdaptedT> {}; template <typename Adapter, typename AdaptedT> struct adapted_equal< Adapter, AdaptedT, folly::void_t<decltype(cr<AdaptedT>() == cr<AdaptedT>())>> { }; template <typename Adapter, typename AdaptedT, typename = void> struct adapter_equal : adapted_equal<Adapter, AdaptedT> {}; template <typename Adapter, typename AdaptedT> struct adapter_equal< Adapter, AdaptedT, folly::void_t<decltype(Adapter::equal(cr<AdaptedT>(), cr<AdaptedT>()))>> { }; template <typename Adapter, typename AdaptedT> struct thrift_less { }; template <typename Adapter, typename AdaptedT, typename = void> struct adapted_less : thrift_less<Adapter, AdaptedT> {}; template <typename Adapter, typename AdaptedT> struct adapted_less< Adapter, AdaptedT, folly::void_t<decltype(cr<AdaptedT>() < cr<AdaptedT>())>> { }; template <typename Adapter, typename AdaptedT, typename = void> struct adapter_less : adapted_less<Adapter, AdaptedT> {}; template <typename Adapter, typename AdaptedT> struct adapter_less< Adapter, AdaptedT, folly::void_t<decltype(Adapter::less(cr<AdaptedT>(), cr<AdaptedT>()))>> { }; template <typename Adapter, typename AdaptedT> struct thrift_hash { }; template <typename Adapter, typename AdaptedT, typename = void> struct adapted_hash : thrift_hash<Adapter, AdaptedT> {}; template <typename Adapter, typename AdaptedT> struct adapted_hash< Adapter, AdaptedT, folly::void_t<decltype(std::hash<std::decay_t<AdaptedT>>())>> : std::hash<std::decay_t<AdaptedT>> {}; template <typename Adapter, typename AdaptedT, typename = void> struct adapter_hash : adapted_hash<Adapter, AdaptedT> {}; template <typename Adapter, typename AdaptedT> struct adapter_hash< Adapter, AdaptedT, folly::void_t<decltype(Adapter::hash(cr<AdaptedT>()))>> { }; ; ; ; ; ; ; ; ; ; template <typename KeyAdapter, typename StandardSet> using adapt_set_key_t = decltype(resolveSetForAdapated<KeyAdapter>(std::declval<StandardSet>())); ; ; template <typename KeyAdapter, typename StandardMap> using adapt_map_key_t = decltype(resolveMapForAdapated<KeyAdapter>(std::declval<StandardMap>())); ; ; ; template < bool ZeroCopy, typename Tag, typename Adapter, typename AdaptedT, typename Protocol, typename FallbackF, typename = void> struct adapter_serialized_size { }; template <typename Tag, typename Adapter, typename AdaptedT, typename Protocol> using serialized_size_type = decltype(Adapter::template serializedSize<false, Tag>( std::declval<Protocol&>(), std::declval<AdaptedT&>())); template < bool ZeroCopy, typename Tag, typename Adapter, typename AdaptedT, typename Protocol, typename FallbackF> struct adapter_serialized_size< ZeroCopy, Tag, Adapter, AdaptedT, Protocol, FallbackF, folly::void_t<serialized_size_type<Tag, Adapter, AdaptedT, Protocol>>> { }; ; ; ; ; ; ; ; template < bool ZeroCopy, typename Tag, typename Adapter, typename AdaptedT, typename Protocol, typename FallbackF> struct adapter_serialized_size< ZeroCopy, Tag, Adapter, AdaptedT, Protocol, FallbackF, std::enable_if_t< !folly::is_detected_v< serialized_size_type, Tag, Adapter, AdaptedT, Protocol> && std::is_arithmetic<decltype(Adapter::toThrift( std::declval<AdaptedT&>()))>::value>> { }; ; } } } namespace google { typedef int32_t int32; typedef uint32_t uint32; typedef int64_t int64; typedef uint64_t uint64; } namespace fLS { typedef std::string clstring; } namespace google { struct CommandLineFlagInfo { std::string name; std::string type; std::string description; std::string current_value; std::string default_value; std::string filename; bool has_validator_fn; bool is_default; const void* flag_ptr; }; enum __attribute__((visibility("default"))) FlagSettingMode { SET_FLAGS_VALUE, SET_FLAG_IF_DEFAULT, SET_FLAGS_DEFAULT }; class __attribute__((visibility("default"))) FlagSaver { public: private: class FlagSaverImpl* impl_; }__attribute((unused)); class __attribute__((visibility("default"))) FlagRegisterer { public: ; };;;;;;;; extern __attribute__((visibility("default"))) const char kStrippedFlagHelp[]; } namespace fLB { struct CompileAssert {}; typedef CompileAssert expected_sizeof_double_neq_sizeof_bool[ (sizeof(double) != sizeof(bool)) ? 1 : -1]; ; } namespace fLS { class StringFlagDestructor { void *current_storage_; void *defvalue_storage_; public: }; } namespace gflags { using google::int32; using google::uint32; using google::int64; using google::uint64; using google::CommandLineFlagInfo; using google::FlagSettingMode; using google::SET_FLAGS_VALUE; using google::SET_FLAG_IF_DEFAULT; using google::SET_FLAGS_DEFAULT; using google::FlagSaver; using google::FlagRegisterer; } namespace google { typedef int32_t int32; typedef uint32_t uint32; typedef int64_t int64; typedef uint64_t uint64; typedef double WallTime; struct __attribute__((visibility("default"))) LogMessageTime { private: std::tm time_struct_; time_t timestamp_; int32_t usecs_; long int gmtoffset_; }; } namespace fLB { extern __attribute__((visibility("default"))) bool FLAGS_timestamp_in_logfile_name; } using fLB::FLAGS_timestamp_in_logfile_name; namespace fLB { extern __attribute__((visibility("default"))) bool FLAGS_logtostdout; } using fLB::FLAGS_logtostdout; namespace fLB { extern __attribute__((visibility("default"))) bool FLAGS_colorlogtostdout; } using fLB::FLAGS_colorlogtostdout; namespace fLB { extern __attribute__((visibility("default"))) bool FLAGS_logtostderr; } using fLB::FLAGS_logtostderr; namespace fLB { extern __attribute__((visibility("default"))) bool FLAGS_alsologtostderr; } using fLB::FLAGS_alsologtostderr; namespace fLB { extern __attribute__((visibility("default"))) bool FLAGS_colorlogtostderr; } using fLB::FLAGS_colorlogtostderr; namespace fLI { extern __attribute__((visibility("default"))) google::int32 FLAGS_stderrthreshold; } using fLI::FLAGS_stderrthreshold; namespace fLB { extern __attribute__((visibility("default"))) bool FLAGS_log_prefix; } using fLB::FLAGS_log_prefix; namespace fLB { extern __attribute__((visibility("default"))) bool FLAGS_log_year_in_prefix; } using fLB::FLAGS_log_year_in_prefix; namespace fLI { extern __attribute__((visibility("default"))) google::int32 FLAGS_logbuflevel; } using fLI::FLAGS_logbuflevel; namespace fLI { extern __attribute__((visibility("default"))) google::int32 FLAGS_logbufsecs; } using fLI::FLAGS_logbufsecs; namespace fLI { extern __attribute__((visibility("default"))) google::int32 FLAGS_minloglevel; } using fLI::FLAGS_minloglevel; namespace fLS { extern __attribute__((visibility("default"))) std::string& FLAGS_log_dir; } using fLS::FLAGS_log_dir; namespace fLI { extern __attribute__((visibility("default"))) google::int32 FLAGS_logfile_mode; } using fLI::FLAGS_logfile_mode; namespace fLS { extern __attribute__((visibility("default"))) std::string& FLAGS_log_link; } using fLS::FLAGS_log_link; namespace fLI { extern __attribute__((visibility("default"))) google::int32 FLAGS_v; } using fLI::FLAGS_v; namespace fLS { extern __attribute__((visibility("default"))) std::string& FLAGS_vmodule; } using fLS::FLAGS_vmodule; namespace fLU { extern __attribute__((visibility("default"))) google::uint32 FLAGS_max_log_size; } using fLU::FLAGS_max_log_size; namespace fLB { extern __attribute__((visibility("default"))) bool FLAGS_stop_logging_if_full_disk; } using fLB::FLAGS_stop_logging_if_full_disk; namespace fLB { extern __attribute__((visibility("default"))) bool FLAGS_log_utc_time; } using fLB::FLAGS_log_utc_time; namespace google { typedef int LogSeverity; const int GLOG_INFO = 0, GLOG_WARNING = 1, GLOG_ERROR = 2, GLOG_FATAL = 3, NUM_SEVERITIES = 4; extern __attribute__((visibility("default"))) const char* const LogSeverityNames[NUM_SEVERITIES]; enum { DEBUG_MODE = 0 }; struct SiteFlag { google::int32* level; const char* base_name; size_t base_len; SiteFlag* next; }; typedef void (*logging_fail_func_t)() __attribute__((noreturn)); class LogSink; struct CheckOpString { std::string* str_; }; ; struct DummyClassToDefineOperator {}; } namespace google { ; ; namespace base { namespace internal { } class __attribute__((visibility("default"))) CheckOpMessageBuilder { public: private: std::ostringstream *stream_; }; } ; ; ; ; ; ; ; namespace glog_internal_namespace_ { template <bool> struct CompileAssert { }; struct CrashReason; } enum PRIVATE_Counter {COUNTER}; const LogSeverity GLOG_0 = GLOG_ERROR; namespace base_logging { class __attribute__((visibility("default"))) LogStreamBuf : public std::streambuf { public: }; } class __attribute__((visibility("default"))) LogMessage { public: enum { kNoLogPrefix = -1 }; class __attribute__((visibility("default"))) LogStream : public std::ostream { public: private: base_logging::LogStreamBuf streambuf_; int64 ctr_; LogStream *self_; }; public: typedef void (LogMessage::*SendMethod)(); static const size_t kMaxLogMessageLen; struct LogMessageData; private: static int64 num_messages_[NUM_SEVERITIES]; LogMessageData* allocated_; LogMessageData* data_; LogMessageTime logmsgtime_; friend class LogDestination; }; class __attribute__((visibility("default"))) LogMessageFatal : public LogMessage { public: }; ; class __attribute__((visibility("default"))) ErrnoLogMessage : public LogMessage { public: private: }; class __attribute__((visibility("default"))) LogMessageVoidify { public: }; class __attribute__((visibility("default"))) LogSink { public: }; namespace base { class __attribute__((visibility("default"))) Logger { public: }; } class __attribute__((visibility("default"))) NullStream : public LogMessage::LogStream { public: private: char message_buffer_[2]; }; ; class __attribute__((visibility("default"))) NullStreamFatal : public NullStream { public: }; } namespace folly { namespace detail { struct FormatTraitsBase { typedef void enabled; }; template <class T, class Enable = void> struct IndexableTraits; template <class C> struct IndexableTraitsSeq : public FormatTraitsBase { typedef C container_type; typedef typename C::value_type value_type; }; template <class C> struct IndexableTraitsAssoc : public FormatTraitsBase { typedef typename C::value_type::second_type value_type; }; } } namespace folly { template <class T, class Allocator = std::allocator<T>> class fbvector; } namespace folly { namespace detail { } template <class T, class Allocator> class fbvector { private: typedef std::allocator_traits<Allocator> A; struct Impl : public Allocator { typedef typename A::pointer pointer; typedef typename A::size_type size_type; pointer b_, e_, z_; } impl_; public: typedef T value_type; typedef value_type& reference; typedef const value_type& const_reference; typedef T* iterator; typedef const T* const_iterator; typedef size_t size_type; typedef typename std::make_signed<size_type>::type difference_type; typedef Allocator allocator_type; typedef typename A::pointer pointer; typedef typename A::const_pointer const_pointer; typedef std::reverse_iterator<iterator> reverse_iterator; typedef std::reverse_iterator<const_iterator> const_reverse_iterator; private: static constexpr bool should_pass_by_value = std::is_trivially_copyable<T>::value && sizeof(T) <= 16; typedef typename std::conditional<should_pass_by_value, T, const T&>::type VT; typedef typename std::conditional<should_pass_by_value, T, T&&>::type MT; static constexpr bool usingStdAllocator = std::is_same<Allocator, std::allocator<T>>::value; typedef std::bool_constant< usingStdAllocator || A::propagate_on_container_move_assignment::value> moveIsSwap; private: ; ; ; ; ; ; ; ; ; private: ; ; ; ; ; ; ; ; ; private: typedef std::bool_constant< folly::IsRelocatable<T>::value && usingStdAllocator> relocate_use_memcpy; typedef std::bool_constant< (std::is_nothrow_move_constructible<T>::value && usingStdAllocator) || !std::is_copy_constructible<T>::value> relocate_use_move; public: ; ; private: ; ; ; ; public: public: private: public: reference operator[](size_type n) ; const_reference operator[](size_type n) const ; const_reference at(size_type n) const ; reference at(size_type n) ; reference front() ; const_reference front() const ; reference back() ; const_reference back() const ; public: T* data() noexcept ; const T* data() const noexcept ; public: template <class... Args> reference emplace_back(Args&&... args) ; void push_back(const T& value) ; void push_back(T&& value) ; void pop_back() ; void swap(fbvector& other) noexcept ; void clear() noexcept ; private: size_type computePushBackCapacity() const ; template <class... Args> void emplace_back_aux(Args&&... args) ; public: iterator erase(const_iterator position) ; iterator erase(const_iterator first, const_iterator last) ; private: bool isValid(const_iterator it) ; size_type computeInsertCapacity(size_type n) ; void make_window(iterator position, size_type n) ; void undo_window(iterator position, size_type n) noexcept ; void wrap_frame(T* ledge, size_type idx, size_type n) ; bool insert_use_fresh(bool at_end, size_type n) ; template < typename IsInternalFunc, typename InsertInternalFunc, typename ConstructFunc, typename DestroyFunc> iterator do_real_insert( const_iterator cpos, size_type n, IsInternalFunc&& isInternalFunc, InsertInternalFunc&& insertInternalFunc, ConstructFunc&& constructFunc, DestroyFunc&& destroyFunc) ; public: template <class... Args> iterator emplace(const_iterator cpos, Args&&... args) ; iterator insert(const_iterator cpos, const T& value) ; iterator insert(const_iterator cpos, T&& value) ; iterator insert(const_iterator cpos, size_type n, VT value) ; template < class It, class Category = typename std::iterator_traits<It>::iterator_category> iterator insert(const_iterator cpos, It first, It last) ; iterator insert(const_iterator cpos, std::initializer_list<T> il) ; private: template <class FIt> iterator insert( const_iterator cpos, FIt first, FIt last, std::forward_iterator_tag) ; template <class IIt> iterator insert( const_iterator cpos, IIt first, IIt last, std::input_iterator_tag) ; public: bool operator==(const fbvector& other) const ; bool operator!=(const fbvector& other) const ; bool operator<(const fbvector& other) const ; bool operator>(const fbvector& other) const ; bool operator<=(const fbvector& other) const ; bool operator>=(const fbvector& other) const ; private: template <class _T, class _A> friend _T* relinquish(fbvector<_T, _A>&); template <class _T, class _A> friend void attach(fbvector<_T, _A>&, _T* data, size_t sz, size_t cap); }; template <class T, class A> void swap(fbvector<T, A>& lhs, fbvector<T, A>& rhs) noexcept ; namespace detail { template <class T, class A> struct IndexableTraits<fbvector<T, A>> : public IndexableTraitsSeq<fbvector<T, A>> {}; } template <class T, class A> void compactResize(fbvector<T, A>* v, size_t sz) ; template <class T, class A> T* relinquish(fbvector<T, A>& v) ; template <class T, class A> void attach(fbvector<T, A>& v, T* data, size_t sz, size_t cap) ; template < class InputIt, class Allocator = std::allocator<typename std::iterator_traits<InputIt>::value_type>> fbvector(InputIt, InputIt, Allocator = Allocator()) -> fbvector<typename std::iterator_traits<InputIt>::value_type, Allocator>; template <class T, class A, class U> void erase(fbvector<T, A>& v, U value) ; template <class T, class A, class Predicate> void erase_if(fbvector<T, A>& v, Predicate predicate) ; } namespace folly { template <typename FunctionType> class Function; template <typename ReturnType, typename... Args> Function<ReturnType(Args...) const> constCastFunction( Function<ReturnType(Args...)>&&) noexcept; template <typename ReturnType, typename... Args> Function<ReturnType(Args...) const noexcept> constCastFunction( Function<ReturnType(Args...) noexcept>&&) noexcept; namespace detail { namespace function { enum class Op { MOVE, NUKE, HEAP }; union Data { struct BigTrivialLayout { void* big; std::size_t size; std::size_t align; }; void* big; BigTrivialLayout bigt; std::aligned_storage<6 * sizeof(void*)>::type tiny; }; struct CoerceTag {}; template <typename T> using FunctionNullptrTest = decltype(static_cast<bool>(static_cast<T const&>(T(nullptr)) == nullptr)); template <typename T> constexpr bool IsNullptrCompatible = is_detected_v<FunctionNullptrTest, T>; template <typename T, std::enable_if_t<!IsNullptrCompatible<T>, int> = 0> constexpr bool isEmptyFunction(T const&) ; template <typename T, std::enable_if_t<IsNullptrCompatible<T>, int> = 0> constexpr bool isEmptyFunction(T const& t) ; template <typename F, typename... Args> using CallableResult = decltype(static_cast<F&& (*)() noexcept>(nullptr)()(static_cast<Args&& (*)() noexcept>(nullptr)()...)); template <typename F, typename... Args> constexpr bool CallableNoexcept = noexcept(static_cast<F&& (*)() noexcept>(nullptr)()(static_cast<Args&& (*)() noexcept>(nullptr)()...)); template < typename From, typename To, typename = typename std::enable_if< !std::is_reference<To>::value || std::is_reference<From>::value>::type> using IfSafeResultImpl = decltype(void(static_cast<To>(static_cast<From (*)() noexcept>(nullptr)()))); template <typename T> using CallArg = conditional_t<is_register_pass_v<T>, T, T&&>; template <typename F, bool Nx, typename R, typename... A> class FunctionTraitsSharedProxy { std::shared_ptr<Function<F>> sp_; public: explicit FunctionTraitsSharedProxy(std::nullptr_t) noexcept ; explicit FunctionTraitsSharedProxy(Function<F>&& func) ; R operator()(A... args) const noexcept(Nx) ; explicit operator bool() const noexcept ; friend bool operator==( FunctionTraitsSharedProxy const& proxy, std::nullptr_t) noexcept ; friend bool operator!=( FunctionTraitsSharedProxy const& proxy, std::nullptr_t) noexcept ; friend bool operator==( std::nullptr_t, FunctionTraitsSharedProxy const& proxy) noexcept ; friend bool operator!=( std::nullptr_t, FunctionTraitsSharedProxy const& proxy) noexcept ; }; template < typename Fun, bool Small, bool Nx, typename ReturnType, typename... Args> ReturnType call_(Args... args, Data& p) noexcept(Nx) ; template <typename FunctionType> struct FunctionTraits; template <typename ReturnType, typename... Args> struct FunctionTraits<ReturnType(Args...)> { using Call = ReturnType (*)(CallArg<Args>..., Data&); using ConstSignature = ReturnType(Args...) const; using NonConstSignature = ReturnType(Args...); using OtherSignature = ConstSignature; template <typename F, typename R = CallableResult<F&, Args...>> using IfSafeResult = IfSafeResultImpl<R, ReturnType>; template <typename Fun, bool Small> static constexpr Call call = call_<Fun, Small, false, ReturnType, CallArg<Args>...>; static ReturnType uninitCall(CallArg<Args>..., Data&) ; ReturnType operator()(Args... args) ; using SharedProxy = FunctionTraitsSharedProxy<NonConstSignature, false, ReturnType, Args...>; }; template <typename ReturnType, typename... Args> struct FunctionTraits<ReturnType(Args...) const> { using Call = ReturnType (*)(CallArg<Args>..., Data&); using ConstSignature = ReturnType(Args...) const; using NonConstSignature = ReturnType(Args...); using OtherSignature = NonConstSignature; template <typename F, typename R = CallableResult<const F&, Args...>> using IfSafeResult = IfSafeResultImpl<R, ReturnType>; template <typename Fun, bool Small> static constexpr Call call = call_<const Fun, Small, false, ReturnType, CallArg<Args>...>; static ReturnType uninitCall(CallArg<Args>..., Data&) ; ReturnType operator()(Args... args) const ; using SharedProxy = FunctionTraitsSharedProxy<ConstSignature, false, ReturnType, Args...>; }; template <typename ReturnType, typename... Args> struct FunctionTraits<ReturnType(Args...) noexcept> { using Call = ReturnType (*)(CallArg<Args>..., Data&) noexcept; using ConstSignature = ReturnType(Args...) const noexcept; using NonConstSignature = ReturnType(Args...) noexcept; using OtherSignature = ConstSignature; template < typename F, typename R = CallableResult<F&, Args...>, std::enable_if_t<CallableNoexcept<F&, Args...>, int> = 0> using IfSafeResult = IfSafeResultImpl<R, ReturnType>; template <typename Fun, bool Small> static constexpr Call call = call_<Fun, Small, true, ReturnType, CallArg<Args>...>; static ReturnType uninitCall(CallArg<Args>..., Data&) noexcept ; ReturnType operator()(Args... args) noexcept ; using SharedProxy = FunctionTraitsSharedProxy<NonConstSignature, true, ReturnType, Args...>; }; template <typename ReturnType, typename... Args> struct FunctionTraits<ReturnType(Args...) const noexcept> { using Call = ReturnType (*)(CallArg<Args>..., Data&) noexcept; using ConstSignature = ReturnType(Args...) const noexcept; using NonConstSignature = ReturnType(Args...) noexcept; using OtherSignature = NonConstSignature; template < typename F, typename R = CallableResult<const F&, Args...>, std::enable_if_t<CallableNoexcept<const F&, Args...>, int> = 0> using IfSafeResult = IfSafeResultImpl<R, ReturnType>; template <typename Fun, bool Small> static constexpr Call call = call_<const Fun, Small, true, ReturnType, CallArg<Args>...>; static ReturnType uninitCall(CallArg<Args>..., Data&) noexcept ; ReturnType operator()(Args... args) const noexcept ; using SharedProxy = FunctionTraitsSharedProxy<ConstSignature, true, ReturnType, Args...>; }; struct DispatchSmallTrivial { static constexpr bool is_in_situ = true; static constexpr bool is_trivial = true; template <std::size_t Size> static std::size_t exec_(Op o, Data* src, Data* dst) noexcept ; template <std::size_t size, std::size_t adjust = alignof(Data) - 1> static constexpr std::size_t size_ = (size + adjust) & ~adjust; template <typename Fun> static constexpr auto exec = exec_<size_<sizeof(Fun)>>; }; struct DispatchBigTrivial { static constexpr bool is_in_situ = false; static constexpr bool is_trivial = true; template <typename Fun, typename Base> static constexpr auto call = Base::template callBig<Fun>; static constexpr bool is_align_large(size_t align) ; template <bool IsAlignLarge> static std::size_t exec_(Op o, Data* src, Data* dst) noexcept ; template <typename T> static constexpr auto exec = exec_<is_align_large(alignof(T))>; __attribute__((__always_inline__)) static void ctor( Data& data, void const* fun, std::size_t size, std::size_t align) noexcept ; }; struct DispatchSmall { static constexpr bool is_in_situ = true; static constexpr bool is_trivial = false; template <typename Fun> static std::size_t exec(Op o, Data* src, Data* dst) noexcept ; }; struct DispatchBig { static constexpr bool is_in_situ = false; static constexpr bool is_trivial = false; template <typename Fun> static std::size_t exec(Op o, Data* src, Data* dst) noexcept ; }; template <bool InSitu, bool IsTriv> struct Dispatch; template <> struct Dispatch<true, true> : DispatchSmallTrivial {}; template <> struct Dispatch<true, false> : DispatchSmall {}; template <> struct Dispatch<false, true> : DispatchBigTrivial {}; template <> struct Dispatch<false, false> : DispatchBig {}; template < typename Fun, bool InSituSize = sizeof(Fun) <= sizeof(Data), bool InSituAlign = alignof(Fun) <= alignof(Data), bool InSituNoexcept = noexcept(Fun(static_cast<Fun (*)() noexcept>(nullptr)()))> using DispatchOf = Dispatch< InSituSize && InSituAlign && InSituNoexcept, std::is_trivially_copyable_v<Fun>>; } } template <typename FunctionType> class Function final : private detail::function::FunctionTraits<FunctionType> { using Data = detail::function::Data; using Op = detail::function::Op; using CoerceTag = detail::function::CoerceTag; using Traits = detail::function::FunctionTraits<FunctionType>; using Call = typename Traits::Call; using Exec = std::size_t (*)(Op, Data*, Data*) noexcept; mutable Data data_{unsafe_default_initialized}; Call call_{&Traits::uninitCall}; Exec exec_{nullptr}; std::size_t exec(Op o, Data* src, Data* dst) const ; friend Traits; friend Function<typename Traits::ConstSignature> folly::constCastFunction<>( Function<typename Traits::NonConstSignature>&&) noexcept; friend class Function<typename Traits::OtherSignature>; template <typename Signature> Function(Function<Signature>&& fun, CoerceTag) ; Function(Function<typename Traits::OtherSignature>&& that, CoerceTag) ; public: constexpr Function() = default; Function(const Function&) = delete; Function(Function&& that) ; constexpr Function(std::nullptr_t) noexcept ; template < typename Fun, typename = std::enable_if_t<!detail::is_similar_instantiation_v<Function, Fun>>, typename = typename Traits::template IfSafeResult<Fun>> constexpr Function(Fun fun) noexcept( detail::function::DispatchOf<Fun>::is_in_situ) ; template < typename Signature, typename Fun = Function<Signature>, typename = std::enable_if_t<!std::is_same<Function, Fun>::value>, typename = typename Traits::template IfSafeResult<Fun>> Function(Function<Signature>&& that) noexcept( noexcept(Function(std::move(that), CoerceTag{}))) ; template < typename Member, typename Class, typename = decltype(Function(std::mem_fn((Member Class::*)0)))> Function(Member Class::*ptr) noexcept ; ~Function() ; Function& operator=(const Function&) = delete; Function& operator=(Function&& that) noexcept ; template < typename Fun, typename..., bool Nx = noexcept(Function(static_cast<Fun&& (*)() noexcept>(nullptr)()))> Function& operator=(Fun fun) noexcept(Nx) ; template < typename Signature, typename..., typename = typename Traits::template IfSafeResult<Function<Signature>>> Function& operator=(Function<Signature>&& that) noexcept( noexcept(Function(std::move(that)))) ; Function& operator=(std::nullptr_t) noexcept ; template <typename Member, typename Class> auto operator=(Member Class::*ptr) noexcept -> decltype(operator=(std::mem_fn(ptr))) ; using Traits::operator(); void swap(Function& that) noexcept ; explicit operator bool() const noexcept ; std::size_t heapAllocatedMemory() const noexcept ; using typename Traits::SharedProxy; SharedProxy asSharedProxy() && ; std::function<typename Traits::NonConstSignature> asStdFunction() && ; }; template <typename FunctionType> void swap(Function<FunctionType>& lhs, Function<FunctionType>& rhs) noexcept ; template <typename FunctionType> bool operator==(const Function<FunctionType>& fn, std::nullptr_t) ; template <typename FunctionType> bool operator==(std::nullptr_t, const Function<FunctionType>& fn) ; template <typename FunctionType> bool operator!=(const Function<FunctionType>& fn, std::nullptr_t) ; template <typename FunctionType> bool operator!=(std::nullptr_t, const Function<FunctionType>& fn) ; template <typename ReturnType, typename... Args> Function<ReturnType(Args...) const> constCastFunction( Function<ReturnType(Args...)>&& that) noexcept ; template <typename ReturnType, typename... Args> Function<ReturnType(Args...) const> constCastFunction( Function<ReturnType(Args...) const>&& that) noexcept ; template <typename ReturnType, typename... Args> Function<ReturnType(Args...) const noexcept> constCastFunction( Function<ReturnType(Args...) noexcept>&& that) noexcept ; template <typename ReturnType, typename... Args> Function<ReturnType(Args...) const noexcept> constCastFunction( Function<ReturnType(Args...) const noexcept>&& that) noexcept ; namespace detail { template <typename Void, typename> struct function_ctor_deduce_; template <typename P> struct function_ctor_deduce_< std::enable_if_t<std::is_function<std::remove_pointer_t<P>>::value>, P> { using type = std::remove_pointer_t<P>; }; template <typename F> struct function_ctor_deduce_<void_t<decltype(&F::operator())>, F> { using type = typename member_pointer_traits<decltype(&F::operator())>::member_type; }; template <typename F> using function_ctor_deduce_t = typename function_ctor_deduce_<void, F>::type; } template <typename F> Function(F) -> Function<detail::function_ctor_deduce_t<F>>; template <typename FunctionType> class FunctionRef; template <typename ReturnType, typename... Args> class FunctionRef<ReturnType(Args...)> final { template <typename Arg> using CallArg = detail::function::CallArg<Arg>; using Call = ReturnType (*)(CallArg<Args>..., void*); static ReturnType uninitCall(CallArg<Args>..., void*) ; template < typename Fun, std::enable_if_t<!std::is_pointer<Fun>::value, int> = 0> static ReturnType call(CallArg<Args>... args, void* object) ; template < typename Fun, std::enable_if_t<std::is_pointer<Fun>::value, int> = 0> static ReturnType call(CallArg<Args>... args, void* object) ; void* object_{nullptr}; Call call_{&FunctionRef::uninitCall}; public: constexpr FunctionRef() = default; constexpr explicit FunctionRef(std::nullptr_t) noexcept ; template < typename Fun, std::enable_if_t< Conjunction< Negation<std::is_same<FunctionRef, std::decay_t<Fun>>>, is_invocable_r<ReturnType, Fun&&, Args&&...>>::value, int> = 0> constexpr FunctionRef(Fun&& fun) noexcept ; template < typename Fun, std::enable_if_t<std::is_function<Fun>::value, int> = 0, std::enable_if_t<is_invocable_r_v<ReturnType, Fun&, Args&&...>, int> = 0> constexpr FunctionRef(Fun* fun) noexcept ; ReturnType operator()(Args... args) const ; constexpr explicit operator bool() const noexcept ; constexpr friend bool operator==( FunctionRef<ReturnType(Args...)> ref, std::nullptr_t) noexcept ; constexpr friend bool operator!=( FunctionRef<ReturnType(Args...)> ref, std::nullptr_t) noexcept ; constexpr friend bool operator==( std::nullptr_t, FunctionRef<ReturnType(Args...)> ref) noexcept ; constexpr friend bool operator!=( std::nullptr_t, FunctionRef<ReturnType(Args...)> ref) noexcept ; }; } namespace folly { namespace detail { template <class D, class V, class Tag> class IteratorFacade { public: using value_type = V; using reference = value_type&; using pointer = value_type*; using difference_type = std::ptrdiff_t; using iterator_category = Tag; friend bool operator==(D const& lhs, D const& rhs) ; friend bool operator!=(D const& lhs, D const& rhs) ; V& operator*() const ; V* operator->() const ; D& operator++() ; D operator++(int) ; D& operator--() ; D operator--(int) ; private: D& asDerived() ; D const& asDerivedConst() const ; static bool equal(D const& lhs, D const& rhs) ; }; template <class D, class I, class V, class Tag> class IteratorAdaptor : public IteratorFacade<D, V, Tag> { public: using Super = IteratorFacade<D, V, Tag>; using value_type = typename Super::value_type; using iterator_category = typename Super::iterator_category; using reference = typename Super::reference; using pointer = typename Super::pointer; using difference_type = typename Super::difference_type; IteratorAdaptor() = default; explicit IteratorAdaptor(I base) ; void increment() ; void decrement() ; V& dereference() const ; bool equal(D const& rhs) const ; I const& base() const ; I& base() ; private: I base_; }; } } namespace folly { enum class ordering : std::int8_t { lt = -1, eq = 0, gt = 1 }; template <typename T> constexpr ordering to_ordering(T c) ; namespace detail { template <typename C, ordering o, bool ne> struct cmp_pred : private C { using C::C; template <typename A, typename B> constexpr bool operator()(A&& a, B&& b) const ; }; } template <typename C> struct compare_equal_to : detail::cmp_pred<C, ordering::eq, 0> { using detail::cmp_pred<C, ordering::eq, 0>::cmp_pred; }; template <typename C> struct compare_not_equal_to : detail::cmp_pred<C, ordering::eq, 1> { using detail::cmp_pred<C, ordering::eq, 1>::cmp_pred; }; template <typename C> struct compare_less : detail::cmp_pred<C, ordering::lt, 0> { using detail::cmp_pred<C, ordering::lt, 0>::cmp_pred; }; template <typename C> struct compare_less_equal : detail::cmp_pred<C, ordering::gt, 1> { using detail::cmp_pred<C, ordering::gt, 1>::cmp_pred; }; template <typename C> struct compare_greater : detail::cmp_pred<C, ordering::gt, 0> { using detail::cmp_pred<C, ordering::gt, 0>::cmp_pred; }; template <typename C> struct compare_greater_equal : detail::cmp_pred<C, ordering::lt, 1> { using detail::cmp_pred<C, ordering::lt, 1>::cmp_pred; }; namespace detail { template <typename D> struct partial_ordering_ { static D const less; static D const greater; static D const equivalent; static D const unordered; }; template <typename D> constexpr D const partial_ordering_<D>::less{ordering::lt}; template <typename D> constexpr D const partial_ordering_<D>::greater{ordering::gt}; template <typename D> constexpr D const partial_ordering_<D>::equivalent{ordering::eq}; template <typename D> constexpr D const partial_ordering_<D>::unordered{typename D::unordered_tag{}}; } class partial_ordering : private detail::partial_ordering_<partial_ordering> { private: using constants = detail::partial_ordering_<partial_ordering>; friend constants; class unordered_tag {}; public: using constants::equivalent; using constants::greater; using constants::less; using constants::unordered; explicit constexpr partial_ordering(unordered_tag) ; constexpr partial_ordering(ordering o) ; explicit operator ordering() const noexcept(false) ; friend bool operator==(partial_ordering a, partial_ordering b) noexcept ; friend bool operator!=(partial_ordering a, partial_ordering b) noexcept ; private: static constexpr int8_t undef = 2; int8_t value_ = undef; }; } typedef long unsigned int size_t; struct iovec { void *iov_base; size_t iov_len; }; extern "C" { extern ssize_t readv (int __fd, const struct iovec *__iovec, int __count) __attribute__ ((__warn_unused_result__)) ; extern ssize_t writev (int __fd, const struct iovec *__iovec, int __count) __attribute__ ((__warn_unused_result__)) ; extern ssize_t preadv (int __fd, const struct iovec *__iovec, int __count, __off_t __offset) __attribute__ ((__warn_unused_result__)) ; extern ssize_t pwritev (int __fd, const struct iovec *__iovec, int __count, __off_t __offset) __attribute__ ((__warn_unused_result__)) ; extern ssize_t preadv64 (int __fd, const struct iovec *__iovec, int __count, __off64_t __offset) __attribute__ ((__warn_unused_result__)) ; extern ssize_t pwritev64 (int __fd, const struct iovec *__iovec, int __count, __off64_t __offset) __attribute__ ((__warn_unused_result__)) ; extern ssize_t preadv2 (int __fp, const struct iovec *__iovec, int __count, __off_t __offset, int ___flags) __attribute__ ((__warn_unused_result__)) ; extern ssize_t pwritev2 (int __fd, const struct iovec *__iodev, int __count, __off_t __offset, int __flags) __attribute__ ((__warn_unused_result__)); extern ssize_t preadv64v2 (int __fp, const struct iovec *__iovec, int __count, __off64_t __offset, int ___flags) __attribute__ ((__warn_unused_result__)) ; extern ssize_t pwritev64v2 (int __fd, const struct iovec *__iodev, int __count, __off64_t __offset, int __flags) __attribute__ ((__warn_unused_result__)) ; } extern "C" { extern ssize_t process_vm_readv (pid_t __pid, const struct iovec *__lvec, unsigned long int __liovcnt, const struct iovec *__rvec, unsigned long int __riovcnt, unsigned long int __flags) noexcept (true); extern ssize_t process_vm_writev (pid_t __pid, const struct iovec *__lvec, unsigned long int __liovcnt, const struct iovec *__rvec, unsigned long int __riovcnt, unsigned long int __flags) noexcept (true); } namespace folly { using ::preadv; using ::pwritev; } namespace folly { constexpr size_t kIovMax = 1024; } namespace folly { enum class annotate_rwlock_level : long { rdlock = 0, wrlock = 1, }; namespace detail { using annotate_rwlock_cd_t = void(char const*, int, void const volatile*); using annotate_rwlock_ar_t = void(char const*, int, void const volatile*, long); using annotate_benign_race_sized_t = void(char const*, int, void const volatile*, long, char const*); using annotate_ignore_t = void(char const*, int); extern annotate_rwlock_cd_t* const annotate_rwlock_create_v; extern annotate_rwlock_cd_t* const annotate_rwlock_create_static_v; extern annotate_rwlock_cd_t* const annotate_rwlock_destroy_v; extern annotate_rwlock_ar_t* const annotate_rwlock_acquired_v; extern annotate_rwlock_ar_t* const annotate_rwlock_released_v; extern annotate_benign_race_sized_t* const annotate_benign_race_sized_v; extern annotate_ignore_t* const annotate_ignore_reads_begin_v; extern annotate_ignore_t* const annotate_ignore_reads_end_v; extern annotate_ignore_t* const annotate_ignore_writes_begin_v; extern annotate_ignore_t* const annotate_ignore_writes_end_v; extern annotate_ignore_t* const annotate_ignore_sync_begin_v; extern annotate_ignore_t* const annotate_ignore_sync_end_v; } __attribute__((__always_inline__)) static void annotate_rwlock_create( void const volatile* const addr, char const* const f, int const l) ; __attribute__((__always_inline__)) static void annotate_rwlock_create_static( void const volatile* const addr, char const* const f, int const l) ; __attribute__((__always_inline__)) static void annotate_rwlock_destroy( void const volatile* const addr, char const* const f, int const l) ; __attribute__((__always_inline__)) static void annotate_rwlock_acquired( void const volatile* const addr, annotate_rwlock_level const w, char const* const f, int const l) ; __attribute__((__always_inline__)) static void annotate_rwlock_try_acquired( void const volatile* const addr, annotate_rwlock_level const w, bool const result, char const* const f, int const l) ; __attribute__((__always_inline__)) static void annotate_rwlock_released( void const volatile* const addr, annotate_rwlock_level const w, char const* const f, int const l) ; __attribute__((__always_inline__)) static void annotate_benign_race_sized( void const volatile* const addr, long const size, char const* const desc, char const* const f, int const l) ; __attribute__((__always_inline__)) static void annotate_ignore_reads_begin( char const* const f, int const l) ; __attribute__((__always_inline__)) static void annotate_ignore_reads_end( char const* const f, int const l) ; __attribute__((__always_inline__)) static void annotate_ignore_writes_begin( char const* const f, int const l) ; __attribute__((__always_inline__)) static void annotate_ignore_writes_end( char const* const f, int const l) ; __attribute__((__always_inline__)) static void annotate_ignore_sync_begin( char const* const f, int const l) ; __attribute__((__always_inline__)) static void annotate_ignore_sync_end( char const* const f, int const l) ; class annotate_ignore_thread_sanitizer_guard { public: annotate_ignore_thread_sanitizer_guard( char const* const file, int const line) ; annotate_ignore_thread_sanitizer_guard( const annotate_ignore_thread_sanitizer_guard&) = delete; annotate_ignore_thread_sanitizer_guard& operator=( const annotate_ignore_thread_sanitizer_guard&) = delete; ~annotate_ignore_thread_sanitizer_guard() ; private: char const* const file_; int const line_; }; } namespace std __attribute__ ((__visibility__ ("default"))) { class thread { public: using native_handle_type = __gthread_t; class id { native_handle_type _M_thread; public: id() ; explicit id(native_handle_type __id) ; private: friend class thread; friend struct hash<id>; friend bool operator==(id __x, id __y) noexcept; friend strong_ordering operator<=>(id __x, id __y) noexcept; template<class _CharT, class _Traits> friend basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __out, id __id); }; private: id _M_id; template<typename _Tp> using __not_same = __not_<is_same<__remove_cvref_t<_Tp>, thread>>; public: thread() noexcept = default; private: static void _M_thread_deps_never_run() ; public: template<typename _Callable, typename... _Args, typename = _Require<__not_same<_Callable>>> explicit thread(_Callable&& __f, _Args&&... __args) ; ~thread() ; thread(const thread&) = delete; thread(thread&& __t) noexcept ; thread& operator=(const thread&) = delete; thread& operator=(thread&& __t) noexcept ; void swap(thread& __t) noexcept ; bool joinable() const noexcept ; void join(); void detach(); id get_id() const noexcept ; native_handle_type native_handle() ; static unsigned int hardware_concurrency() noexcept; private: struct _State { virtual ~_State(); virtual void _M_run() = 0; }; using _State_ptr = unique_ptr<_State>; private: template<typename _Callable> struct _State_impl : public _State { _Callable _M_func; template<typename... _Args> _State_impl(_Args&&... __args) ; void _M_run() ; }; void _M_start_thread(_State_ptr, void (*)()); private: template<typename _Tuple> struct _Invoker { template<typename... _Args> explicit _Invoker(_Args&&... __args) ; _Tuple _M_t; template<typename> struct __result; template<typename _Fn, typename... _Args> struct __result<tuple<_Fn, _Args...>> : __invoke_result<_Fn, _Args...> { }; template<size_t... _Ind> typename __result<_Tuple>::type _M_invoke(_Index_tuple<_Ind...>) ; typename __result<_Tuple>::type operator()() ; }; public: template<typename... _Tp> using _Call_wrapper = _Invoker<tuple<typename decay<_Tp>::type...>>; }; void swap(thread& __x, thread& __y) noexcept ; bool operator==(thread::id __x, thread::id __y) noexcept ; template<> struct hash<thread::id> : public __hash_base<size_t, thread::id> { size_t operator()(const thread::id& __id) const noexcept ; }; namespace this_thread { thread::id get_id() noexcept ; void yield() noexcept ; } } namespace std __attribute__ ((__visibility__ ("default"))) { namespace this_thread { template<typename _Rep, typename _Period> void sleep_for(const chrono::duration<_Rep, _Period>& __rtime) ; template<typename _Clock, typename _Duration> void sleep_until(const chrono::time_point<_Clock, _Duration>& __atime) ; } } namespace std __attribute__ ((__visibility__ ("default"))) { namespace __detail { using __wait_clock_t = chrono::steady_clock; template<typename _Clock, typename _Dur> __wait_clock_t::time_point __to_wait_clock(const chrono::time_point<_Clock, _Dur>& __atime) noexcept ; template<typename _Dur> __wait_clock_t::time_point __to_wait_clock(const chrono::time_point<__wait_clock_t, _Dur>& __atime) noexcept ; template<typename _Dur> bool __platform_wait_until_impl(const __platform_wait_t* __addr, __platform_wait_t __old, const chrono::time_point<__wait_clock_t, _Dur>& __atime) noexcept ; template<typename _Clock, typename _Dur> bool __platform_wait_until(const __platform_wait_t* __addr, __platform_wait_t __old, const chrono::time_point<_Clock, _Dur>& __atime) ; template<typename _Clock, typename _Dur> bool __cond_wait_until_impl(__condvar& __cv, mutex& __mx, const chrono::time_point<_Clock, _Dur>& __atime) ; template<typename _Clock, typename _Dur> bool __cond_wait_until(__condvar& __cv, mutex& __mx, const chrono::time_point<_Clock, _Dur>& __atime) ; struct __timed_waiter_pool : __waiter_pool_base { template<typename _Clock, typename _Dur> bool _M_do_wait_until(__platform_wait_t* __addr, __platform_wait_t __old, const chrono::time_point<_Clock, _Dur>& __atime) ; }; struct __timed_backoff_spin_policy { __wait_clock_t::time_point _M_deadline; __wait_clock_t::time_point _M_t0; template<typename _Clock, typename _Dur> __timed_backoff_spin_policy(chrono::time_point<_Clock, _Dur> __deadline = _Clock::time_point::max(), chrono::time_point<_Clock, _Dur> __t0 = _Clock::now()) ; bool operator()() const noexcept ; }; template<typename _EntersWait> struct __timed_waiter : __waiter_base<__timed_waiter_pool> { using __base_type = __waiter_base<__timed_waiter_pool>; template<typename _Tp> __timed_waiter(const _Tp* __addr) ; ~__timed_waiter() ; template<typename _Tp, typename _ValFn, typename _Clock, typename _Dur> bool _M_do_wait_until_v(_Tp __old, _ValFn __vfn, const chrono::time_point<_Clock, _Dur>& __atime) noexcept ; template<typename _Pred, typename _Clock, typename _Dur> bool _M_do_wait_until(_Pred __pred, __platform_wait_t __val, const chrono::time_point<_Clock, _Dur>& __atime) noexcept ; template<typename _Pred, typename _Clock, typename _Dur> bool _M_do_wait_until(_Pred __pred, const chrono::time_point<_Clock, _Dur>& __atime) noexcept ; template<typename _Tp, typename _ValFn, typename _Rep, typename _Period> bool _M_do_wait_for_v(_Tp __old, _ValFn __vfn, const chrono::duration<_Rep, _Period>& __rtime) noexcept ; template<typename _Pred, typename _Rep, typename _Period> bool _M_do_wait_for(_Pred __pred, const chrono::duration<_Rep, _Period>& __rtime) noexcept ; }; using __enters_timed_wait = __timed_waiter<std::true_type>; using __bare_timed_wait = __timed_waiter<std::false_type>; } template<typename _Tp, typename _ValFn, typename _Clock, typename _Dur> bool __atomic_wait_address_until_v(const _Tp* __addr, _Tp&& __old, _ValFn&& __vfn, const chrono::time_point<_Clock, _Dur>& __atime) noexcept ; template<typename _Tp, typename _Pred, typename _Clock, typename _Dur> bool __atomic_wait_address_until(const _Tp* __addr, _Pred __pred, const chrono::time_point<_Clock, _Dur>& __atime) noexcept ; template<typename _Pred, typename _Clock, typename _Dur> bool __atomic_wait_address_until_bare(const __detail::__platform_wait_t* __addr, _Pred __pred, const chrono::time_point<_Clock, _Dur>& __atime) noexcept ; template<typename _Tp, typename _ValFn, typename _Rep, typename _Period> bool __atomic_wait_address_for_v(const _Tp* __addr, _Tp&& __old, _ValFn&& __vfn, const chrono::duration<_Rep, _Period>& __rtime) noexcept ; template<typename _Tp, typename _Pred, typename _Rep, typename _Period> bool __atomic_wait_address_for(const _Tp* __addr, _Pred __pred, const chrono::duration<_Rep, _Period>& __rtime) noexcept ; template<typename _Pred, typename _Rep, typename _Period> bool __atomic_wait_address_for_bare(const __detail::__platform_wait_t* __addr, _Pred __pred, const chrono::duration<_Rep, _Period>& __rtime) noexcept ; } typedef union { char __size[32]; long int __align; } sem_t; extern "C" { extern int sem_init (sem_t *__sem, int __pshared, unsigned int __value) noexcept (true) __attribute__ ((__nonnull__ (1))); extern int sem_destroy (sem_t *__sem) noexcept (true) __attribute__ ((__nonnull__ (1))); extern sem_t *sem_open (const char *__name, int __oflag, ...) noexcept (true) __attribute__ ((__nonnull__ (1))); extern int sem_close (sem_t *__sem) noexcept (true) __attribute__ ((__nonnull__ (1))); extern int sem_unlink (const char *__name) noexcept (true) __attribute__ ((__nonnull__ (1))); extern int sem_wait (sem_t *__sem) __attribute__ ((__nonnull__ (1))); extern int sem_timedwait (sem_t *__restrict __sem, const struct timespec *__restrict __abstime) __attribute__ ((__nonnull__ (1, 2))); extern int sem_clockwait (sem_t *__restrict __sem, clockid_t clock, const struct timespec *__restrict __abstime) __attribute__ ((__nonnull__ (1, 3))); extern int sem_trywait (sem_t *__sem) noexcept (true) __attribute__ ((__nonnull__ (1))); extern int sem_post (sem_t *__sem) noexcept (true) __attribute__ ((__nonnull__ (1))); extern int sem_getvalue (sem_t *__restrict __sem, int *__restrict __sval) noexcept (true) __attribute__ ((__nonnull__ (1, 2))); } namespace std __attribute__ ((__visibility__ ("default"))) { struct __platform_semaphore { using __clock_t = chrono::system_clock; static constexpr ptrdiff_t _S_max = (2147483647); explicit __platform_semaphore(ptrdiff_t __count) noexcept ; __platform_semaphore(const __platform_semaphore&) = delete; __platform_semaphore& operator=(const __platform_semaphore&) = delete; ~__platform_semaphore() ; __attribute__((__always_inline__)) void _M_acquire() noexcept ; __attribute__((__always_inline__)) bool _M_try_acquire() noexcept ; __attribute__((__always_inline__)) void _M_release(std::ptrdiff_t __update) noexcept ; bool _M_try_acquire_until_impl(const chrono::time_point<__clock_t>& __atime) noexcept ; template<typename _Clock, typename _Duration> bool _M_try_acquire_until(const chrono::time_point<_Clock, _Duration>& __atime) noexcept ; template<typename _Rep, typename _Period> __attribute__((__always_inline__)) bool _M_try_acquire_for(const chrono::duration<_Rep, _Period>& __rtime) noexcept ; private: sem_t _M_semaphore; }; struct __atomic_semaphore { static constexpr ptrdiff_t _S_max = __gnu_cxx::__int_traits<int>::__max; explicit __atomic_semaphore(__detail::__platform_wait_t __count) ; __atomic_semaphore(const __atomic_semaphore&) = delete; __atomic_semaphore& operator=(const __atomic_semaphore&) = delete; static __attribute__((__always_inline__)) bool _S_do_try_acquire(__detail::__platform_wait_t* __counter) noexcept ; __attribute__((__always_inline__)) void _M_acquire() noexcept ; bool _M_try_acquire() noexcept ; template<typename _Clock, typename _Duration> __attribute__((__always_inline__)) bool _M_try_acquire_until(const chrono::time_point<_Clock, _Duration>& __atime) noexcept ; template<typename _Rep, typename _Period> __attribute__((__always_inline__)) bool _M_try_acquire_for(const chrono::duration<_Rep, _Period>& __rtime) noexcept ; __attribute__((__always_inline__)) void _M_release(ptrdiff_t __update) noexcept ; private: alignas(__detail::__platform_wait_alignment) __detail::__platform_wait_t _M_counter; }; using __semaphore_impl = __atomic_semaphore; } namespace std __attribute__ ((__visibility__ ("default"))) { template<ptrdiff_t __least_max_value = __semaphore_impl::_S_max> class counting_semaphore { static_assert(__least_max_value >= 0); static_assert(__least_max_value <= __semaphore_impl::_S_max); __semaphore_impl _M_sem; public: explicit counting_semaphore(ptrdiff_t __desired) ; ~counting_semaphore() = default; counting_semaphore(const counting_semaphore&) = delete; counting_semaphore& operator=(const counting_semaphore&) = delete; static constexpr ptrdiff_t max() noexcept ; void release(ptrdiff_t __update = 1) noexcept(noexcept(_M_sem._M_release(1))) ; void acquire() noexcept(noexcept(_M_sem._M_acquire())) ; bool try_acquire() noexcept(noexcept(_M_sem._M_try_acquire())) ; template<typename _Rep, typename _Period> bool try_acquire_for(const std::chrono::duration<_Rep, _Period>& __rtime) ; template<typename _Clock, typename _Dur> bool try_acquire_until(const std::chrono::time_point<_Clock, _Dur>& __atime) ; }; using binary_semaphore = std::counting_semaphore<1>; } namespace std __attribute__ ((__visibility__ ("default"))) { struct nostopstate_t { explicit nostopstate_t() = default; }; inline constexpr nostopstate_t nostopstate{}; class stop_source; class stop_token { public: stop_token() noexcept = default; stop_token(const stop_token&) noexcept = default; stop_token(stop_token&&) noexcept = default; ~stop_token() = default; stop_token& operator=(const stop_token&) noexcept = default; stop_token& operator=(stop_token&&) noexcept = default; [[nodiscard]] bool stop_possible() const noexcept { return static_cast<bool>(_M_state) && _M_state->_M_stop_possible(); } [[nodiscard]] bool stop_requested() const noexcept { return static_cast<bool>(_M_state) && _M_state->_M_stop_requested(); } void swap(stop_token& __rhs) noexcept { _M_state.swap(__rhs._M_state); } [[nodiscard]] friend bool operator==(const stop_token& __a, const stop_token& __b) { return __a._M_state == __b._M_state; } friend void swap(stop_token& __lhs, stop_token& __rhs) noexcept ; private: friend class stop_source; template<typename _Callback> friend class stop_callback; static void _S_yield() noexcept ; struct _Stop_cb { using __cb_type = void(_Stop_cb*) noexcept; __cb_type* _M_callback; _Stop_cb* _M_prev = nullptr; _Stop_cb* _M_next = nullptr; bool* _M_destroyed = nullptr; binary_semaphore _M_done{0}; [[__gnu__::__nonnull__]] explicit _Stop_cb(__cb_type* __cb) ; void _M_run() noexcept ; }; struct _Stop_state_t { using value_type = uint32_t; static constexpr value_type _S_stop_requested_bit = 1; static constexpr value_type _S_locked_bit = 2; static constexpr value_type _S_ssrc_counter_inc = 4; std::atomic<value_type> _M_owners{1}; std::atomic<value_type> _M_value{_S_ssrc_counter_inc}; _Stop_cb* _M_head = nullptr; std::thread::id _M_requester; _Stop_state_t() = default; bool _M_stop_possible() noexcept ; bool _M_stop_requested() noexcept ; void _M_add_owner() noexcept ; void _M_release_ownership() noexcept ; void _M_add_ssrc() noexcept ; void _M_sub_ssrc() noexcept ; void _M_lock() noexcept ; void _M_unlock() noexcept ; bool _M_request_stop() noexcept ; [[__gnu__::__nonnull__]] bool _M_register_callback(_Stop_cb* __cb) noexcept ; [[__gnu__::__nonnull__]] void _M_remove_callback(_Stop_cb* __cb) ; bool _M_try_lock(value_type& __curval, memory_order __failure = memory_order::acquire) noexcept ; bool _M_try_lock_and_stop(value_type& __curval) noexcept ; bool _M_do_try_lock(value_type& __curval, value_type __newbits, memory_order __success, memory_order __failure) noexcept ; }; struct _Stop_state_ref { _Stop_state_ref() = default; [[__gnu__::__access__(__none__, 2)]] explicit _Stop_state_ref(const stop_source&) ; _Stop_state_ref(const _Stop_state_ref& __other) ; _Stop_state_ref(_Stop_state_ref&& __other) ; _Stop_state_ref& operator=(const _Stop_state_ref& __other) noexcept ; _Stop_state_ref& operator=(_Stop_state_ref&& __other) noexcept ; ~_Stop_state_ref() ; void swap(_Stop_state_ref& __other) noexcept ; explicit operator bool() const noexcept ; _Stop_state_t* operator->() const noexcept ; friend bool operator==(const _Stop_state_ref&, const _Stop_state_ref&) = default; private: _Stop_state_t* _M_ptr = nullptr; }; _Stop_state_ref _M_state; explicit stop_token(const _Stop_state_ref& __state) ; }; class stop_source { public: stop_source() ; explicit stop_source(std::nostopstate_t) noexcept ; stop_source(const stop_source& __other) ; stop_source(stop_source&&) noexcept = default; stop_source& operator=(const stop_source& __other) noexcept ; stop_source& operator=(stop_source&&) noexcept = default; ~stop_source() ; [[nodiscard]] bool stop_possible() const noexcept ; [[nodiscard]] bool stop_requested() const noexcept ; bool request_stop() const noexcept ; [[nodiscard]] stop_token get_token() const noexcept { return stop_token{_M_state}; } void swap(stop_source& __other) noexcept { _M_state.swap(__other._M_state); } [[nodiscard]] friend bool operator==(const stop_source& __a, const stop_source& __b) noexcept { return __a._M_state == __b._M_state; } friend void swap(stop_source& __lhs, stop_source& __rhs) noexcept { __lhs.swap(__rhs); } private: stop_token::_Stop_state_ref _M_state; }; template<typename _Callback> class [[nodiscard]] stop_callback { static_assert(is_nothrow_destructible_v<_Callback>); static_assert(is_invocable_v<_Callback>); public: using callback_type = _Callback; template<typename _Cb, enable_if_t<is_constructible_v<_Callback, _Cb>, int> = 0> explicit stop_callback(const stop_token& __token, _Cb&& __cb) noexcept(is_nothrow_constructible_v<_Callback, _Cb>) ; template<typename _Cb, enable_if_t<is_constructible_v<_Callback, _Cb>, int> = 0> explicit stop_callback(stop_token&& __token, _Cb&& __cb) noexcept(is_nothrow_constructible_v<_Callback, _Cb>) ; ~stop_callback() ; stop_callback(const stop_callback&) = delete; stop_callback& operator=(const stop_callback&) = delete; stop_callback(stop_callback&&) = delete; stop_callback& operator=(stop_callback&&) = delete; private: struct _Cb_impl : stop_token::_Stop_cb { template<typename _Cb> explicit _Cb_impl(_Cb&& __cb) ; _Callback _M_cb; [[__gnu__::__nonnull__]] static void _S_execute(_Stop_cb* __that) noexcept ; }; _Cb_impl _M_cb; stop_token::_Stop_state_ref _M_state; }; template<typename _Callback> stop_callback(stop_token, _Callback) -> stop_callback<_Callback>; } namespace std __attribute__ ((__visibility__ ("default"))) { strong_ordering operator<=>(thread::id __x, thread::id __y) noexcept ; template<class _CharT, class _Traits> basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __out, thread::id __id) ; class jthread { public: using id = thread::id; using native_handle_type = thread::native_handle_type; jthread() ; template<typename _Callable, typename... _Args, typename = enable_if_t<!is_same_v<remove_cvref_t<_Callable>, jthread>>> explicit jthread(_Callable&& __f, _Args&&... __args) ; jthread(const jthread&) = delete; jthread(jthread&&) noexcept = default; ~jthread() ; jthread& operator=(const jthread&) = delete; jthread& operator=(jthread&& __other) noexcept ; void swap(jthread& __other) noexcept ; [[nodiscard]] bool joinable() const noexcept ; void join() ; void detach() ; [[nodiscard]] id get_id() const noexcept ; [[nodiscard]] native_handle_type native_handle() ; [[nodiscard]] static unsigned hardware_concurrency() noexcept ; [[nodiscard]] stop_source get_stop_source() noexcept ; [[nodiscard]] stop_token get_stop_token() const noexcept ; bool request_stop() noexcept ; friend void swap(jthread& __lhs, jthread& __rhs) noexcept ; private: template<typename _Callable, typename... _Args> static thread _S_create(stop_source& __ssrc, _Callable&& __f, _Args&&... __args) ; stop_source _M_stop_source; thread _M_thread; }; } namespace folly { void asm_volatile_memory() ; void asm_volatile_pause() ; } namespace folly { namespace detail { class Sleeper { const std::chrono::nanoseconds delta; uint32_t spinCount; static constexpr uint32_t kMaxActiveSpin = 4000; public: static constexpr std::chrono::nanoseconds kMinYieldingSleep = std::chrono::microseconds(500); constexpr Sleeper() ; explicit Sleeper(std::chrono::nanoseconds d) ; void wait() noexcept ; }; } } namespace folly { struct MicroSpinLock { enum { FREE = 0, LOCKED = 1 }; uint8_t lock_; void init() noexcept ; bool try_lock() noexcept ; void lock() noexcept ; void unlock() noexcept ; private: std::atomic<uint8_t>* payload() noexcept ; uint8_t xchg(uint8_t newVal) noexcept ; }; static_assert( std::is_standard_layout<MicroSpinLock>::value && std::is_trivial<MicroSpinLock>::value, "MicroSpinLock must be kept a POD type."); template <class T, size_t N> struct alignas(max_align_v) SpinLockArray { T& operator[](size_t i) noexcept ; const T& operator[](size_t i) const noexcept ; constexpr size_t size() const noexcept ; private: struct PaddedSpinLock { PaddedSpinLock() ; T lock; char padding[hardware_destructive_interference_size - sizeof(T)]; }; static_assert( sizeof(PaddedSpinLock) == hardware_destructive_interference_size, "Invalid size of PaddedSpinLock"); static_assert( max_align_v > 0 && hardware_destructive_interference_size % max_align_v == 0 && sizeof(T) <= max_align_v, "T can cross cache line boundaries"); char padding_[hardware_destructive_interference_size]; std::array<PaddedSpinLock, N> data_; }; typedef std::lock_guard<MicroSpinLock> MSLGuard; } #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wshadow" #pragma GCC diagnostic ignored "-Wpragmas" #pragma GCC diagnostic ignored "-Wdocumentation" namespace folly { namespace detail { template <typename T> struct IsUniquePtrToSL : std::false_type {}; template <typename T, typename D> struct IsUniquePtrToSL<std::unique_ptr<T, D>> : std::is_standard_layout<T> {}; } class IOBuf { public: class Iterator; enum CreateOp { CREATE }; enum WrapBufferOp { WRAP_BUFFER }; enum TakeOwnershipOp { TAKE_OWNERSHIP }; enum CopyBufferOp { COPY_BUFFER }; enum SizedFree { SIZED_FREE }; enum class CombinedOption { DEFAULT, COMBINED, SEPARATE }; typedef ByteRange value_type; typedef Iterator iterator; typedef Iterator const_iterator; using FreeFunction = void (*)(void* buf, void* userData); IOBuf(CreateOp, std::size_t capacity); static std::unique_ptr<IOBuf> create(std::size_t capacity); static std::unique_ptr<IOBuf> createCombined(std::size_t capacity); static std::unique_ptr<IOBuf> createSeparate(std::size_t capacity); static std::unique_ptr<IOBuf> createChain( size_t totalCapacity, std::size_t maxBufCapacity); static size_t goodSize( size_t minCapacity, CombinedOption combined = CombinedOption::DEFAULT); IOBuf( TakeOwnershipOp op, void* buf, std::size_t capacity, FreeFunction freeFn = nullptr, void* userData = nullptr, bool freeOnError = true) ; static std::unique_ptr<IOBuf> takeOwnership( void* buf, std::size_t capacity, FreeFunction freeFn = nullptr, void* userData = nullptr, bool freeOnError = true) ; static std::unique_ptr<IOBuf> takeOwnership( void* buf, std::size_t capacity, std::size_t length, FreeFunction freeFn = nullptr, void* userData = nullptr, bool freeOnError = true) ; IOBuf( TakeOwnershipOp op, void* buf, std::size_t capacity, std::size_t length, FreeFunction freeFn = nullptr, void* userData = nullptr, bool freeOnError = true) ; static std::unique_ptr<IOBuf> takeOwnership( void* buf, std::size_t capacity, std::size_t offset, std::size_t length, FreeFunction freeFn = nullptr, void* userData = nullptr, bool freeOnError = true) ; static std::unique_ptr<IOBuf> takeOwnership( SizedFree, void* buf, std::size_t capacity, std::size_t offset, std::size_t length, bool freeOnError = true) ; IOBuf( TakeOwnershipOp, void* buf, std::size_t capacity, std::size_t offset, std::size_t length, FreeFunction freeFn = nullptr, void* userData = nullptr, bool freeOnError = true); IOBuf( TakeOwnershipOp, SizedFree, void* buf, std::size_t capacity, std::size_t offset, std::size_t length, bool freeOnError = true); template <class UniquePtr> static typename std::enable_if< detail::IsUniquePtrToSL<UniquePtr>::value, std::unique_ptr<IOBuf>>::type takeOwnership(UniquePtr&& buf, size_t count = 1); IOBuf(WrapBufferOp op, ByteRange br) noexcept; IOBuf(WrapBufferOp op, const void* buf, std::size_t capacity) noexcept; static std::unique_ptr<IOBuf> wrapBuffer( const void* buf, std::size_t capacity); static std::unique_ptr<IOBuf> wrapBuffer(ByteRange br) ; static IOBuf wrapBufferAsValue( const void* buf, std::size_t capacity) noexcept; static IOBuf wrapBufferAsValue(ByteRange br) noexcept ; IOBuf( CopyBufferOp op, ByteRange br, std::size_t headroom = 0, std::size_t minTailroom = 0); IOBuf( CopyBufferOp op, const void* buf, std::size_t size, std::size_t headroom = 0, std::size_t minTailroom = 0); static std::unique_ptr<IOBuf> copyBuffer( ByteRange br, std::size_t headroom = 0, std::size_t minTailroom = 0) ; static std::unique_ptr<IOBuf> copyBuffer( const void* buf, std::size_t size, std::size_t headroom = 0, std::size_t minTailroom = 0); static std::unique_ptr<IOBuf> copyBuffer( StringPiece buf, std::size_t headroom = 0, std::size_t minTailroom = 0); IOBuf( CopyBufferOp op, StringPiece buf, std::size_t headroom = 0, std::size_t minTailroom = 0) ; static std::unique_ptr<IOBuf> maybeCopyBuffer( StringPiece buf, std::size_t headroom = 0, std::size_t minTailroom = 0); static void destroy(std::unique_ptr<IOBuf>&& data) ; ~IOBuf(); bool empty() const; const uint8_t* data() const ; uint8_t* writableData() ; const uint8_t* tail() const ; uint8_t* writableTail() ; std::size_t length() const ; std::size_t headroom() const ; std::size_t tailroom() const ; const uint8_t* buffer() const ; uint8_t* writableBuffer() ; const uint8_t* bufferEnd() const ; std::size_t capacity() const ; IOBuf* next() ; const IOBuf* next() const ; IOBuf* prev() ; const IOBuf* prev() const ; void advance(std::size_t amount) ; void retreat(std::size_t amount) ; void prepend(std::size_t amount) ; void append(std::size_t amount) ; void trimStart(std::size_t amount) ; void trimEnd(std::size_t amount) ; void trimWritableTail(std::size_t amount) ; void clear() ; void reserve(std::size_t minHeadroom, std::size_t minTailroom) ; bool isChained() const ; size_t countChainElements() const; std::size_t computeChainDataLength() const; std::size_t computeChainCapacity() const; void appendToChain(std::unique_ptr<IOBuf>&& iobuf); void insertAfterThisOne(std::unique_ptr<IOBuf>&& iobuf) ; void prependChain(std::unique_ptr<IOBuf>&& iobuf) ; void appendChain(std::unique_ptr<IOBuf>&& iobuf) ; std::unique_ptr<IOBuf> unlink() ; std::unique_ptr<IOBuf> pop() ; std::unique_ptr<IOBuf> separateChain(IOBuf* head, IOBuf* tail) ; bool isShared() const ; void* getUserData() const noexcept ; FreeFunction getFreeFn() const noexcept ; template <typename Observer> bool appendSharedInfoObserver(Observer&& observer) ; bool isManaged() const ; bool isManagedOne() const noexcept ; uint32_t approximateShareCountOne() const; bool isSharedOne() const noexcept ; void unshare() ; void unshareOne() ; void markExternallyShared(); void markExternallySharedOne() ; void makeManaged() ; void makeManagedOne() ; ByteRange coalesce() ; ByteRange coalesceWithHeadroomTailroom( std::size_t newHeadroom, std::size_t newTailroom) ; void gather(std::size_t contiguousLength) ; std::unique_ptr<IOBuf> clone() const; IOBuf cloneAsValue() const; std::unique_ptr<IOBuf> cloneOne() const; IOBuf cloneOneAsValue() const; std::unique_ptr<IOBuf> cloneCoalesced() const; std::unique_ptr<IOBuf> cloneCoalescedWithHeadroomTailroom( std::size_t newHeadroom, std::size_t newTailroom) const; IOBuf cloneCoalescedAsValue() const; IOBuf cloneCoalescedAsValueWithHeadroomTailroom( std::size_t newHeadroom, std::size_t newTailroom) const; void cloneInto(IOBuf& other) const ; void cloneOneInto(IOBuf& other) const ; template <class Container> void appendTo(Container& container) const; template <class Container> Container to() const; folly::fbvector<struct iovec> getIov() const; void appendToIov(folly::fbvector<struct iovec>* iov) const; struct FillIovResult { size_t numIovecs; size_t totalLength; }; FillIovResult fillIov(struct iovec* iov, size_t len) const; static std::unique_ptr<IOBuf> wrapIov(const iovec* vec, size_t count); static std::unique_ptr<IOBuf> takeOwnershipIov( const iovec* vec, size_t count, FreeFunction freeFn = nullptr, void* userData = nullptr, bool freeOnError = true); void* operator new(size_t size); void* operator new(size_t size, void* ptr); void operator delete(void* ptr); void operator delete(void* ptr, void* placement); fbstring moveToFbString(); Iterator cbegin() const; Iterator cend() const; Iterator begin() const; Iterator end() const; IOBuf() noexcept; IOBuf(IOBuf&& other) noexcept; IOBuf& operator=(IOBuf&& other) noexcept; private: enum class TakeOwnershipOption { DEFAULT, STORE_SIZE }; enum FlagsEnum : uintptr_t { kFlagFreeSharedInfo = 0x1, kFlagMask = (1 << 2 ) - 1, }; struct SharedInfoObserverEntryBase { SharedInfoObserverEntryBase* prev{this}; SharedInfoObserverEntryBase* next{this}; }; template <typename Observer> struct SharedInfoObserverEntry : SharedInfoObserverEntryBase { std::decay_t<Observer> observer; }; struct SharedInfo { using ObserverCb = folly::FunctionRef<void(SharedInfoObserverEntryBase&)>; FreeFunction freeFn; void* userData; SharedInfoObserverEntryBase* observerListHead{nullptr}; std::atomic<uint32_t> refcount; bool externallyShared{false}; bool useHeapFullStorage{false}; MicroSpinLock observerListLock{0}; }; struct HeapPrefix; struct HeapStorage; struct HeapFullStorage; struct InternalConstructor {}; std::size_t length_{0}; uint8_t* data_{nullptr}; std::size_t capacity_{0}; uint8_t* buf_{nullptr}; IOBuf* next_{this}; IOBuf* prev_{this}; uintptr_t flagsAndSharedInfo_{0}; struct DeleterBase { }; template <class UniquePtr> struct UniquePtrDeleter : public DeleterBase { typedef typename UniquePtr::pointer Pointer; typedef typename UniquePtr::deleter_type Deleter; private: Deleter deleter_; }; }; struct IOBufHash { }; struct IOBufCompare { private: }; struct IOBufEqualTo : compare_equal_to<IOBufCompare> {}; struct IOBufNotEqualTo : compare_not_equal_to<IOBufCompare> {}; struct IOBufLess : compare_less<IOBufCompare> {}; struct IOBufLessEqual : compare_less_equal<IOBufCompare> {}; struct IOBufGreater : compare_greater<IOBufCompare> {}; struct IOBufGreaterEqual : compare_greater_equal<IOBufCompare> {}; class IOBuf::Iterator : public detail::IteratorFacade< IOBuf::Iterator, ByteRange const, std::forward_iterator_tag> { public: private: const IOBuf* pos_{nullptr}; const IOBuf* end_{nullptr}; ByteRange val_; }; } #pragma GCC diagnostic pop namespace folly { namespace detail { using lsan_ignore_object_t = void(void const*); using lsan_register_root_region_t = void(void const*, std::size_t); using lsan_unregister_root_region_t = void(void const*, std::size_t); extern lsan_ignore_object_t* const lsan_ignore_object_v; extern lsan_register_root_region_t* const lsan_register_root_region_v; extern lsan_unregister_root_region_t* const lsan_unregister_root_region_v; } } namespace folly { namespace detail { struct atomic_value_type_alias_ { template <typename Atomic> using apply = typename Atomic::value_type; }; struct atomic_value_type_load_ { template <typename Atomic> using apply = decltype(std::declval<Atomic const&>().load()); }; } template <typename Atomic> using atomic_value_type_t = typename conditional_t< is_detected_v<detail::atomic_value_type_alias_::apply, Atomic>, detail::atomic_value_type_alias_, detail::atomic_value_type_load_>::template apply<Atomic>; template <typename Atomic> struct atomic_value_type { using type = atomic_value_type_t<Atomic>; }; ; ; struct atomic_fetch_set_fn { ; }; inline constexpr atomic_fetch_set_fn atomic_fetch_set{}; struct atomic_fetch_reset_fn { ; }; inline constexpr atomic_fetch_reset_fn atomic_fetch_reset{}; struct atomic_fetch_flip_fn { ; }; inline constexpr atomic_fetch_flip_fn atomic_fetch_flip{}; struct atomic_fetch_modify_fn { ; }; inline constexpr atomic_fetch_modify_fn atomic_fetch_modify{}; } namespace folly { template <typename T> class atomic_ref; namespace detail { } ; ; namespace detail { struct atomic_fetch_set_fallback_fn { ; }; inline constexpr atomic_fetch_set_fallback_fn atomic_fetch_set_fallback{}; struct atomic_fetch_reset_fallback_fn { ; }; inline constexpr atomic_fetch_reset_fallback_fn atomic_fetch_reset_fallback{}; struct atomic_fetch_flip_fallback_fn { ; }; inline constexpr atomic_fetch_flip_fallback_fn atomic_fetch_flip_fallback{}; enum class atomic_fetch_bit_op_native_instr_mnem { bts, btr, btc }; enum class atomic_fetch_bit_op_native_instr_suff { w, l, q }; template <atomic_fetch_bit_op_native_instr_mnem Instr> struct atomic_fetch_bit_op_native_do_instr_fn { ; }; template <atomic_fetch_bit_op_native_instr_mnem Instr> inline constexpr atomic_fetch_bit_op_native_do_instr_fn<Instr> atomic_fetch_bit_op_native_do_instr{}; static constexpr auto& atomic_fetch_bit_op_native_bts = atomic_fetch_bit_op_native_do_instr< atomic_fetch_bit_op_native_instr_mnem::bts>; static constexpr auto& atomic_fetch_bit_op_native_btr = atomic_fetch_bit_op_native_do_instr< atomic_fetch_bit_op_native_instr_mnem::btr>; static constexpr auto& atomic_fetch_bit_op_native_btc = atomic_fetch_bit_op_native_do_instr< atomic_fetch_bit_op_native_instr_mnem::btc>; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; } } namespace boost{ __extension__ typedef long long long_long_type; __extension__ typedef unsigned long long ulong_long_type; } namespace boost{ __extension__ typedef __int128 int128_type; __extension__ typedef unsigned __int128 uint128_type; } namespace boost { ; } namespace boost { ; } namespace boost { namespace operators_impl { namespace operators_detail { template <typename T> class empty_base {}; } template <class T, class U, class B = operators_detail::empty_base<T> > struct less_than_comparable2 : B { }; template <class T, class B = operators_detail::empty_base<T> > struct less_than_comparable1 : B { }; template <class T, class U, class B = operators_detail::empty_base<T> > struct equality_comparable2 : B { }; template <class T, class B = operators_detail::empty_base<T> > struct equality_comparable1 : B { }; template <class T, class U, class B = operators_detail::empty_base<T> > struct multipliable2 : B { }; template <class T, class B = operators_detail::empty_base<T> > struct multipliable1 : B { }; template <class T, class U, class B = operators_detail::empty_base<T> > struct addable2 : B { }; template <class T, class B = operators_detail::empty_base<T> > struct addable1 : B { }; template <class T, class U, class B = operators_detail::empty_base<T> > struct subtractable2 : B { }; template <class T, class U, class B = operators_detail::empty_base<T> > struct subtractable2_left : B { }; template <class T, class B = operators_detail::empty_base<T> > struct subtractable1 : B { }; template <class T, class U, class B = operators_detail::empty_base<T> > struct dividable2 : B { }; template <class T, class U, class B = operators_detail::empty_base<T> > struct dividable2_left : B { }; template <class T, class B = operators_detail::empty_base<T> > struct dividable1 : B { }; template <class T, class U, class B = operators_detail::empty_base<T> > struct modable2 : B { }; template <class T, class U, class B = operators_detail::empty_base<T> > struct modable2_left : B { }; template <class T, class B = operators_detail::empty_base<T> > struct modable1 : B { }; template <class T, class U, class B = operators_detail::empty_base<T> > struct xorable2 : B { }; template <class T, class B = operators_detail::empty_base<T> > struct xorable1 : B { }; template <class T, class U, class B = operators_detail::empty_base<T> > struct andable2 : B { }; template <class T, class B = operators_detail::empty_base<T> > struct andable1 : B { }; template <class T, class U, class B = operators_detail::empty_base<T> > struct orable2 : B { }; template <class T, class B = operators_detail::empty_base<T> > struct orable1 : B { }; template <class T, class B = operators_detail::empty_base<T> > struct incrementable : B { private: typedef T incrementable_type; }; template <class T, class B = operators_detail::empty_base<T> > struct decrementable : B { private: typedef T decrementable_type; }; template <class T, class P, class B = operators_detail::empty_base<T> > struct dereferenceable : B { }; template <class T, class I, class R, class B = operators_detail::empty_base<T> > struct indexable : B { }; template <class T, class U, class B = operators_detail::empty_base<T> > struct left_shiftable2 : B { }; template <class T, class B = operators_detail::empty_base<T> > struct left_shiftable1 : B { }; template <class T, class U, class B = operators_detail::empty_base<T> > struct right_shiftable2 : B { }; template <class T, class B = operators_detail::empty_base<T> > struct right_shiftable1 : B { }; template <class T, class U, class B = operators_detail::empty_base<T> > struct equivalent2 : B { }; template <class T, class B = operators_detail::empty_base<T> > struct equivalent1 : B { }; template <class T, class U, class B = operators_detail::empty_base<T> > struct partially_ordered2 : B { }; template <class T, class B = operators_detail::empty_base<T> > struct partially_ordered1 : B { }; template <class T, class U, class B = operators_detail::empty_base<T> > struct totally_ordered2 : less_than_comparable2<T, U , equality_comparable2<T, U, B > > {}; template <class T, class B = operators_detail::empty_base<T> > struct totally_ordered1 : less_than_comparable1<T , equality_comparable1<T, B > > {}; template <class T, class U, class B = operators_detail::empty_base<T> > struct additive2 : addable2<T, U , subtractable2<T, U, B > > {}; template <class T, class B = operators_detail::empty_base<T> > struct additive1 : addable1<T , subtractable1<T, B > > {}; template <class T, class U, class B = operators_detail::empty_base<T> > struct multiplicative2 : multipliable2<T, U , dividable2<T, U, B > > {}; template <class T, class B = operators_detail::empty_base<T> > struct multiplicative1 : multipliable1<T , dividable1<T, B > > {}; template <class T, class U, class B = operators_detail::empty_base<T> > struct integer_multiplicative2 : multiplicative2<T, U , modable2<T, U, B > > {}; template <class T, class B = operators_detail::empty_base<T> > struct integer_multiplicative1 : multiplicative1<T , modable1<T, B > > {}; template <class T, class U, class B = operators_detail::empty_base<T> > struct arithmetic2 : additive2<T, U , multiplicative2<T, U, B > > {}; template <class T, class B = operators_detail::empty_base<T> > struct arithmetic1 : additive1<T , multiplicative1<T, B > > {}; template <class T, class U, class B = operators_detail::empty_base<T> > struct integer_arithmetic2 : additive2<T, U , integer_multiplicative2<T, U, B > > {}; template <class T, class B = operators_detail::empty_base<T> > struct integer_arithmetic1 : additive1<T , integer_multiplicative1<T, B > > {}; template <class T, class U, class B = operators_detail::empty_base<T> > struct bitwise2 : xorable2<T, U , andable2<T, U , orable2<T, U, B > > > {}; template <class T, class B = operators_detail::empty_base<T> > struct bitwise1 : xorable1<T , andable1<T , orable1<T, B > > > {}; template <class T, class B = operators_detail::empty_base<T> > struct unit_steppable : incrementable<T , decrementable<T, B > > {}; template <class T, class U, class B = operators_detail::empty_base<T> > struct shiftable2 : left_shiftable2<T, U , right_shiftable2<T, U, B > > {}; template <class T, class B = operators_detail::empty_base<T> > struct shiftable1 : left_shiftable1<T , right_shiftable1<T, B > > {}; template <class T, class U, class B = operators_detail::empty_base<T> > struct ring_operators2 : additive2<T, U , subtractable2_left<T, U , multipliable2<T, U, B > > > {}; template <class T, class B = operators_detail::empty_base<T> > struct ring_operators1 : additive1<T , multipliable1<T, B > > {}; template <class T, class U, class B = operators_detail::empty_base<T> > struct ordered_ring_operators2 : ring_operators2<T, U , totally_ordered2<T, U, B > > {}; template <class T, class B = operators_detail::empty_base<T> > struct ordered_ring_operators1 : ring_operators1<T , totally_ordered1<T, B > > {}; template <class T, class U, class B = operators_detail::empty_base<T> > struct field_operators2 : ring_operators2<T, U , dividable2<T, U , dividable2_left<T, U, B > > > {}; template <class T, class B = operators_detail::empty_base<T> > struct field_operators1 : ring_operators1<T , dividable1<T, B > > {}; template <class T, class U, class B = operators_detail::empty_base<T> > struct ordered_field_operators2 : field_operators2<T, U , totally_ordered2<T, U, B > > {}; template <class T, class B = operators_detail::empty_base<T> > struct ordered_field_operators1 : field_operators1<T , totally_ordered1<T, B > > {}; template <class T, class U, class B = operators_detail::empty_base<T> > struct euclidian_ring_operators2 : ring_operators2<T, U , dividable2<T, U , dividable2_left<T, U , modable2<T, U , modable2_left<T, U, B > > > > > {}; template <class T, class B = operators_detail::empty_base<T> > struct euclidian_ring_operators1 : ring_operators1<T , dividable1<T , modable1<T, B > > > {}; template <class T, class U, class B = operators_detail::empty_base<T> > struct ordered_euclidian_ring_operators2 : totally_ordered2<T, U , euclidian_ring_operators2<T, U, B > > {}; template <class T, class B = operators_detail::empty_base<T> > struct ordered_euclidian_ring_operators1 : totally_ordered1<T , euclidian_ring_operators1<T, B > > {}; template <class T, class U, class B = operators_detail::empty_base<T> > struct euclidean_ring_operators2 : ring_operators2<T, U , dividable2<T, U , dividable2_left<T, U , modable2<T, U , modable2_left<T, U, B > > > > > {}; template <class T, class B = operators_detail::empty_base<T> > struct euclidean_ring_operators1 : ring_operators1<T , dividable1<T , modable1<T, B > > > {}; template <class T, class U, class B = operators_detail::empty_base<T> > struct ordered_euclidean_ring_operators2 : totally_ordered2<T, U , euclidean_ring_operators2<T, U, B > > {}; template <class T, class B = operators_detail::empty_base<T> > struct ordered_euclidean_ring_operators1 : totally_ordered1<T , euclidean_ring_operators1<T, B > > {}; template <class T, class P, class B = operators_detail::empty_base<T> > struct input_iteratable : equality_comparable1<T , incrementable<T , dereferenceable<T, P, B > > > {}; template <class T, class B = operators_detail::empty_base<T> > struct output_iteratable : incrementable<T, B > {}; template <class T, class P, class B = operators_detail::empty_base<T> > struct forward_iteratable : input_iteratable<T, P, B > {}; template <class T, class P, class B = operators_detail::empty_base<T> > struct bidirectional_iteratable : forward_iteratable<T, P , decrementable<T, B > > {}; template <class T, class P, class D, class R, class B = operators_detail::empty_base<T> > struct random_access_iteratable : bidirectional_iteratable<T, P , less_than_comparable1<T , additive2<T, D , indexable<T, D, R, B > > > > {}; namespace operators_detail { struct true_t {}; struct false_t {}; } template<class T> struct is_chained_base { typedef operators_detail::false_t value; }; template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct less_than_comparable; template<class T, class U, class B> struct less_than_comparable<T, U, B, operators_detail::false_t> : less_than_comparable2<T, U, B> {}; template<class T, class U> struct less_than_comparable<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : less_than_comparable1<T, U> {}; template <class T, class B> struct less_than_comparable<T, T, B, operators_detail::false_t> : less_than_comparable1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< less_than_comparable<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< less_than_comparable2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< less_than_comparable1<T, B> > { typedef operators_detail::true_t value; }; template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct equality_comparable; template<class T, class U, class B> struct equality_comparable<T, U, B, operators_detail::false_t> : equality_comparable2<T, U, B> {}; template<class T, class U> struct equality_comparable<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : equality_comparable1<T, U> {}; template <class T, class B> struct equality_comparable<T, T, B, operators_detail::false_t> : equality_comparable1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< equality_comparable<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< equality_comparable2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< equality_comparable1<T, B> > { typedef operators_detail::true_t value; }; template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct multipliable; template<class T, class U, class B> struct multipliable<T, U, B, operators_detail::false_t> : multipliable2<T, U, B> {}; template<class T, class U> struct multipliable<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : multipliable1<T, U> {}; template <class T, class B> struct multipliable<T, T, B, operators_detail::false_t> : multipliable1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< multipliable<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< multipliable2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< multipliable1<T, B> > { typedef operators_detail::true_t value; }; template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct addable; template<class T, class U, class B> struct addable<T, U, B, operators_detail::false_t> : addable2<T, U, B> {}; template<class T, class U> struct addable<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : addable1<T, U> {}; template <class T, class B> struct addable<T, T, B, operators_detail::false_t> : addable1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< addable<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< addable2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< addable1<T, B> > { typedef operators_detail::true_t value; }; template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct subtractable; template<class T, class U, class B> struct subtractable<T, U, B, operators_detail::false_t> : subtractable2<T, U, B> {}; template<class T, class U> struct subtractable<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : subtractable1<T, U> {}; template <class T, class B> struct subtractable<T, T, B, operators_detail::false_t> : subtractable1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< subtractable<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< subtractable2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< subtractable1<T, B> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< subtractable2_left<T, U, B> > { typedef operators_detail::true_t value; }; template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct dividable; template<class T, class U, class B> struct dividable<T, U, B, operators_detail::false_t> : dividable2<T, U, B> {}; template<class T, class U> struct dividable<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : dividable1<T, U> {}; template <class T, class B> struct dividable<T, T, B, operators_detail::false_t> : dividable1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< dividable<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< dividable2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< dividable1<T, B> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< dividable2_left<T, U, B> > { typedef operators_detail::true_t value; }; template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct modable; template<class T, class U, class B> struct modable<T, U, B, operators_detail::false_t> : modable2<T, U, B> {}; template<class T, class U> struct modable<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : modable1<T, U> {}; template <class T, class B> struct modable<T, T, B, operators_detail::false_t> : modable1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< modable<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< modable2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< modable1<T, B> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< modable2_left<T, U, B> > { typedef operators_detail::true_t value; }; template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct xorable; template<class T, class U, class B> struct xorable<T, U, B, operators_detail::false_t> : xorable2<T, U, B> {}; template<class T, class U> struct xorable<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : xorable1<T, U> {}; template <class T, class B> struct xorable<T, T, B, operators_detail::false_t> : xorable1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< xorable<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< xorable2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< xorable1<T, B> > { typedef operators_detail::true_t value; }; template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct andable; template<class T, class U, class B> struct andable<T, U, B, operators_detail::false_t> : andable2<T, U, B> {}; template<class T, class U> struct andable<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : andable1<T, U> {}; template <class T, class B> struct andable<T, T, B, operators_detail::false_t> : andable1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< andable<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< andable2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< andable1<T, B> > { typedef operators_detail::true_t value; }; template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct orable; template<class T, class U, class B> struct orable<T, U, B, operators_detail::false_t> : orable2<T, U, B> {}; template<class T, class U> struct orable<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : orable1<T, U> {}; template <class T, class B> struct orable<T, T, B, operators_detail::false_t> : orable1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< orable<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< orable2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< orable1<T, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< incrementable<T, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< decrementable<T, B> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< dereferenceable<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class U, class V, class B> struct is_chained_base< indexable<T, U, V, B> > { typedef operators_detail::true_t value; }; template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct left_shiftable; template<class T, class U, class B> struct left_shiftable<T, U, B, operators_detail::false_t> : left_shiftable2<T, U, B> {}; template<class T, class U> struct left_shiftable<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : left_shiftable1<T, U> {}; template <class T, class B> struct left_shiftable<T, T, B, operators_detail::false_t> : left_shiftable1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< left_shiftable<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< left_shiftable2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< left_shiftable1<T, B> > { typedef operators_detail::true_t value; }; template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct right_shiftable; template<class T, class U, class B> struct right_shiftable<T, U, B, operators_detail::false_t> : right_shiftable2<T, U, B> {}; template<class T, class U> struct right_shiftable<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : right_shiftable1<T, U> {}; template <class T, class B> struct right_shiftable<T, T, B, operators_detail::false_t> : right_shiftable1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< right_shiftable<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< right_shiftable2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< right_shiftable1<T, B> > { typedef operators_detail::true_t value; }; template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct equivalent; template<class T, class U, class B> struct equivalent<T, U, B, operators_detail::false_t> : equivalent2<T, U, B> {}; template<class T, class U> struct equivalent<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : equivalent1<T, U> {}; template <class T, class B> struct equivalent<T, T, B, operators_detail::false_t> : equivalent1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< equivalent<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< equivalent2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< equivalent1<T, B> > { typedef operators_detail::true_t value; }; template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct partially_ordered; template<class T, class U, class B> struct partially_ordered<T, U, B, operators_detail::false_t> : partially_ordered2<T, U, B> {}; template<class T, class U> struct partially_ordered<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : partially_ordered1<T, U> {}; template <class T, class B> struct partially_ordered<T, T, B, operators_detail::false_t> : partially_ordered1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< partially_ordered<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< partially_ordered2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< partially_ordered1<T, B> > { typedef operators_detail::true_t value; }; template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct totally_ordered; template<class T, class U, class B> struct totally_ordered<T, U, B, operators_detail::false_t> : totally_ordered2<T, U, B> {}; template<class T, class U> struct totally_ordered<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : totally_ordered1<T, U> {}; template <class T, class B> struct totally_ordered<T, T, B, operators_detail::false_t> : totally_ordered1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< totally_ordered<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< totally_ordered2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< totally_ordered1<T, B> > { typedef operators_detail::true_t value; }; template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct additive; template<class T, class U, class B> struct additive<T, U, B, operators_detail::false_t> : additive2<T, U, B> {}; template<class T, class U> struct additive<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : additive1<T, U> {}; template <class T, class B> struct additive<T, T, B, operators_detail::false_t> : additive1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< additive<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< additive2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< additive1<T, B> > { typedef operators_detail::true_t value; }; template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct multiplicative; template<class T, class U, class B> struct multiplicative<T, U, B, operators_detail::false_t> : multiplicative2<T, U, B> {}; template<class T, class U> struct multiplicative<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : multiplicative1<T, U> {}; template <class T, class B> struct multiplicative<T, T, B, operators_detail::false_t> : multiplicative1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< multiplicative<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< multiplicative2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< multiplicative1<T, B> > { typedef operators_detail::true_t value; }; template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct integer_multiplicative; template<class T, class U, class B> struct integer_multiplicative<T, U, B, operators_detail::false_t> : integer_multiplicative2<T, U, B> {}; template<class T, class U> struct integer_multiplicative<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : integer_multiplicative1<T, U> {}; template <class T, class B> struct integer_multiplicative<T, T, B, operators_detail::false_t> : integer_multiplicative1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< integer_multiplicative<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< integer_multiplicative2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< integer_multiplicative1<T, B> > { typedef operators_detail::true_t value; }; template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct arithmetic; template<class T, class U, class B> struct arithmetic<T, U, B, operators_detail::false_t> : arithmetic2<T, U, B> {}; template<class T, class U> struct arithmetic<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : arithmetic1<T, U> {}; template <class T, class B> struct arithmetic<T, T, B, operators_detail::false_t> : arithmetic1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< arithmetic<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< arithmetic2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< arithmetic1<T, B> > { typedef operators_detail::true_t value; }; template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct integer_arithmetic; template<class T, class U, class B> struct integer_arithmetic<T, U, B, operators_detail::false_t> : integer_arithmetic2<T, U, B> {}; template<class T, class U> struct integer_arithmetic<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : integer_arithmetic1<T, U> {}; template <class T, class B> struct integer_arithmetic<T, T, B, operators_detail::false_t> : integer_arithmetic1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< integer_arithmetic<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< integer_arithmetic2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< integer_arithmetic1<T, B> > { typedef operators_detail::true_t value; }; template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct bitwise; template<class T, class U, class B> struct bitwise<T, U, B, operators_detail::false_t> : bitwise2<T, U, B> {}; template<class T, class U> struct bitwise<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : bitwise1<T, U> {}; template <class T, class B> struct bitwise<T, T, B, operators_detail::false_t> : bitwise1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< bitwise<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< bitwise2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< bitwise1<T, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< unit_steppable<T, B> > { typedef operators_detail::true_t value; }; template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct shiftable; template<class T, class U, class B> struct shiftable<T, U, B, operators_detail::false_t> : shiftable2<T, U, B> {}; template<class T, class U> struct shiftable<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : shiftable1<T, U> {}; template <class T, class B> struct shiftable<T, T, B, operators_detail::false_t> : shiftable1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< shiftable<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< shiftable2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< shiftable1<T, B> > { typedef operators_detail::true_t value; }; template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct ring_operators; template<class T, class U, class B> struct ring_operators<T, U, B, operators_detail::false_t> : ring_operators2<T, U, B> {}; template<class T, class U> struct ring_operators<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : ring_operators1<T, U> {}; template <class T, class B> struct ring_operators<T, T, B, operators_detail::false_t> : ring_operators1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< ring_operators<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< ring_operators2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< ring_operators1<T, B> > { typedef operators_detail::true_t value; }; template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct ordered_ring_operators; template<class T, class U, class B> struct ordered_ring_operators<T, U, B, operators_detail::false_t> : ordered_ring_operators2<T, U, B> {}; template<class T, class U> struct ordered_ring_operators<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : ordered_ring_operators1<T, U> {}; template <class T, class B> struct ordered_ring_operators<T, T, B, operators_detail::false_t> : ordered_ring_operators1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< ordered_ring_operators<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< ordered_ring_operators2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< ordered_ring_operators1<T, B> > { typedef operators_detail::true_t value; }; template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct field_operators; template<class T, class U, class B> struct field_operators<T, U, B, operators_detail::false_t> : field_operators2<T, U, B> {}; template<class T, class U> struct field_operators<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : field_operators1<T, U> {}; template <class T, class B> struct field_operators<T, T, B, operators_detail::false_t> : field_operators1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< field_operators<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< field_operators2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< field_operators1<T, B> > { typedef operators_detail::true_t value; }; template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct ordered_field_operators; template<class T, class U, class B> struct ordered_field_operators<T, U, B, operators_detail::false_t> : ordered_field_operators2<T, U, B> {}; template<class T, class U> struct ordered_field_operators<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : ordered_field_operators1<T, U> {}; template <class T, class B> struct ordered_field_operators<T, T, B, operators_detail::false_t> : ordered_field_operators1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< ordered_field_operators<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< ordered_field_operators2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< ordered_field_operators1<T, B> > { typedef operators_detail::true_t value; }; template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct euclidian_ring_operators; template<class T, class U, class B> struct euclidian_ring_operators<T, U, B, operators_detail::false_t> : euclidian_ring_operators2<T, U, B> {}; template<class T, class U> struct euclidian_ring_operators<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : euclidian_ring_operators1<T, U> {}; template <class T, class B> struct euclidian_ring_operators<T, T, B, operators_detail::false_t> : euclidian_ring_operators1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< euclidian_ring_operators<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< euclidian_ring_operators2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< euclidian_ring_operators1<T, B> > { typedef operators_detail::true_t value; }; template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct ordered_euclidian_ring_operators; template<class T, class U, class B> struct ordered_euclidian_ring_operators<T, U, B, operators_detail::false_t> : ordered_euclidian_ring_operators2<T, U, B> {}; template<class T, class U> struct ordered_euclidian_ring_operators<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : ordered_euclidian_ring_operators1<T, U> {}; template <class T, class B> struct ordered_euclidian_ring_operators<T, T, B, operators_detail::false_t> : ordered_euclidian_ring_operators1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< ordered_euclidian_ring_operators<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< ordered_euclidian_ring_operators2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< ordered_euclidian_ring_operators1<T, B> > { typedef operators_detail::true_t value; }; template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct euclidean_ring_operators; template<class T, class U, class B> struct euclidean_ring_operators<T, U, B, operators_detail::false_t> : euclidean_ring_operators2<T, U, B> {}; template<class T, class U> struct euclidean_ring_operators<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : euclidean_ring_operators1<T, U> {}; template <class T, class B> struct euclidean_ring_operators<T, T, B, operators_detail::false_t> : euclidean_ring_operators1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< euclidean_ring_operators<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< euclidean_ring_operators2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< euclidean_ring_operators1<T, B> > { typedef operators_detail::true_t value; }; template <class T ,class U = T ,class B = operators_detail::empty_base<T> ,class O = typename is_chained_base<U>::value > struct ordered_euclidean_ring_operators; template<class T, class U, class B> struct ordered_euclidean_ring_operators<T, U, B, operators_detail::false_t> : ordered_euclidean_ring_operators2<T, U, B> {}; template<class T, class U> struct ordered_euclidean_ring_operators<T, U, operators_detail::empty_base<T>, operators_detail::true_t> : ordered_euclidean_ring_operators1<T, U> {}; template <class T, class B> struct ordered_euclidean_ring_operators<T, T, B, operators_detail::false_t> : ordered_euclidean_ring_operators1<T, B> {}; template<class T, class U, class B, class O> struct is_chained_base< ordered_euclidean_ring_operators<T, U, B, O> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< ordered_euclidean_ring_operators2<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< ordered_euclidean_ring_operators1<T, B> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< input_iteratable<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class B> struct is_chained_base< output_iteratable<T, B> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< forward_iteratable<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class U, class B> struct is_chained_base< bidirectional_iteratable<T, U, B> > { typedef operators_detail::true_t value; }; template<class T, class U, class V, class W, class B> struct is_chained_base< random_access_iteratable<T, U, V, W, B> > { typedef operators_detail::true_t value; }; template <class T, class U> struct operators2 : totally_ordered2<T,U , integer_arithmetic2<T,U , bitwise2<T,U > > > {}; template <class T, class U = T> struct operators : operators2<T, U> {}; template <class T> struct operators<T, T> : totally_ordered<T , integer_arithmetic<T , bitwise<T , unit_steppable<T > > > > {}; template <class Category, class T, class Distance = std::ptrdiff_t, class Pointer = T*, class Reference = T&> struct iterator_helper { typedef Category iterator_category; typedef T value_type; typedef Distance difference_type; typedef Pointer pointer; typedef Reference reference; }; template <class T, class V, class D = std::ptrdiff_t, class P = V const *, class R = V const &> struct input_iterator_helper : input_iteratable<T, P , iterator_helper<std::input_iterator_tag, V, D, P, R > > {}; template<class T> struct output_iterator_helper : output_iteratable<T , iterator_helper<std::output_iterator_tag, void, void, void, void > > { }; template <class T, class V, class D = std::ptrdiff_t, class P = V*, class R = V&> struct forward_iterator_helper : forward_iteratable<T, P , iterator_helper<std::forward_iterator_tag, V, D, P, R > > {}; template <class T, class V, class D = std::ptrdiff_t, class P = V*, class R = V&> struct bidirectional_iterator_helper : bidirectional_iteratable<T, P , iterator_helper<std::bidirectional_iterator_tag, V, D, P, R > > {}; template <class T, class V, class D = std::ptrdiff_t, class P = V*, class R = V&> struct random_access_iterator_helper : random_access_iteratable<T, P, D, R , iterator_helper<std::random_access_iterator_tag, V, D, P, R > > { }; } using namespace operators_impl; } namespace apache { namespace thrift { namespace type { class Ref; namespace detail { template < typename T, size_t Bits = folly::constexpr_log2(alignof(T)), size_t MaxBits = folly::constexpr_log2(alignof(T))> class AlignedPtr { public: static_assert(Bits > 0 && Bits <= MaxBits, "insufficent alignment"); constexpr static std::uintptr_t kMask = ~std::uintptr_t{} << Bits; ; ; ; private: std::uintptr_t ptr_ = {}; ; }; } } } } namespace apache { namespace thrift { namespace detail { template <typename T> class boxed_value_ptr { public: using element_type = T; private: std::unique_ptr<T> ptr_; public: ; ; ; }; template <typename T> class boxed_ptr { public: using element_type = T; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr const T& operator*() const noexcept ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr const T* operator->() const noexcept ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr explicit operator bool() const noexcept ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr T* mut() ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr void reset() ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr void reset(std::unique_ptr<T> p) ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr boxed_ptr copy() const ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr T* get() const noexcept ; private: static constexpr int kModeBits = 3; using aligned_pointer_type = type::detail::AlignedPtr<T, kModeBits, kModeBits>; enum Mode : std::uintptr_t { MutOwned = 0, ConstUnowned = 1, }; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr explicit boxed_ptr(const T* p) ; friend void swap(boxed_ptr& lhs, boxed_ptr& rhs) noexcept ; friend constexpr bool operator==( const boxed_ptr& lhs, const boxed_ptr& rhs) noexcept ; friend constexpr bool operator==( std::nullptr_t, const boxed_ptr& rhs) noexcept ; friend constexpr bool operator==( const boxed_ptr& lhs, std::nullptr_t) noexcept ; friend constexpr bool operator!=( const boxed_ptr& lhs, const boxed_ptr& rhs) noexcept ; friend constexpr bool operator!=( const boxed_ptr& lhs, std::nullptr_t) noexcept ; friend constexpr bool operator!=( std::nullptr_t, const boxed_ptr& rhs) noexcept ; Mode getMode() const ; void destroy() ; aligned_pointer_type copyPtr() const ; aligned_pointer_type ptr_; }; template <typename T> class boxed_value : public boost::totally_ordered<boxed_value<T>>, public boost::totally_ordered2<boxed_value<T>, T> { public: using element_type = T; static constexpr boxed_value fromStaticConstant(const T* t) ; inline __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr boxed_value() noexcept = default; inline __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr boxed_value(boxed_value&& other) noexcept = default; inline __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr boxed_value& operator=(boxed_value&& other) noexcept = default; inline __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ~boxed_value() = default; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr boxed_value(const boxed_value& other) ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr boxed_value& operator=(const boxed_value& other) ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr explicit boxed_value(std::unique_ptr<T> uptr) ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr bool has_value() const noexcept ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr const T& value() const noexcept ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr T& mut() & ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr T&& mut() && ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr const T& operator*() const noexcept ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr const T* operator->() const noexcept ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr explicit operator bool() const noexcept ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr const T& ensure() noexcept ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr void reset() noexcept ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr void reset(std::unique_ptr<T> p) noexcept ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr T* get() const noexcept ; private: __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) explicit constexpr boxed_value(const T* p) ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr void checkHasValue() ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr T& ensureMutable() ; friend void swap(boxed_value& lhs, boxed_value& rhs) noexcept ; friend bool operator<(const boxed_value& lhs, const T& rhs) ; friend bool operator==(const boxed_value& lhs, const T& rhs) ; friend bool operator>(const boxed_value& lhs, const T& rhs) ; friend bool operator<(const boxed_value& lhs, const boxed_value& rhs) ; friend bool operator==(const boxed_value& lhs, const boxed_value& rhs) ; boxed_ptr<T> ptr_; }; } } } namespace apache { namespace thrift { template <class T> class field_ref; template <class T> class optional_field_ref; template <class T> class required_field_ref; template <class T> class optional_boxed_field_ref; template <class T> class union_field_ref; template <class T> class intern_boxed_field_ref; template <class T> class terse_intern_boxed_field_ref; template <class T> class terse_field_ref; namespace detail { template <class T> inline constexpr bool is_field_ref_v = false; template <class T> inline constexpr bool is_field_ref_v<field_ref<T>> = true; template <class T> inline constexpr bool is_optional_field_ref_v = false; template <class T> inline constexpr bool is_optional_field_ref_v<optional_field_ref<T>> = true; template <class T> inline constexpr bool is_required_field_ref_v = false; template <class T> inline constexpr bool is_required_field_ref_v<required_field_ref<T>> = true; template <class T> inline constexpr bool is_optional_boxed_field_ref_v = false; template <class T> inline constexpr bool is_optional_boxed_field_ref_v<optional_boxed_field_ref<T>> = true; template <class T> inline constexpr bool is_union_field_ref_v = false; template <class T> inline constexpr bool is_union_field_ref_v<union_field_ref<T>> = true; template <class T> inline constexpr bool is_intern_boxed_field_ref_v = false; template <class T> inline constexpr bool is_intern_boxed_field_ref_v<intern_boxed_field_ref<T>> = true; template <class T> inline constexpr bool is_terse_intern_boxed_field_ref_v = false; template <class T> inline constexpr bool is_terse_intern_boxed_field_ref_v<terse_intern_boxed_field_ref<T>> = true; template <class T> inline constexpr bool is_terse_field_ref_v = false; template <class T> inline constexpr bool is_terse_field_ref_v<terse_field_ref<T>> = true; template <class T> inline constexpr bool is_unique_ptr_v = false; template <class T, class D> inline constexpr bool is_unique_ptr_v<std::unique_ptr<T, D>> = true; template <class T> inline constexpr bool is_shared_ptr_v = false; template <class T> inline constexpr bool is_shared_ptr_v<std::shared_ptr<T>> = true; template <class T> inline constexpr bool is_shared_or_unique_ptr_v = is_unique_ptr_v<T> || is_shared_ptr_v<T>; template <class T> inline constexpr bool is_optional_or_union_field_ref_v = is_optional_field_ref_v<T> || is_optional_boxed_field_ref_v<T> || is_union_field_ref_v<T>; } } } namespace apache { namespace thrift { namespace detail { template <typename T> using is_set_t = std::conditional_t<std::is_const<T>::value, const uint8_t, uint8_t>; [[noreturn]] void throw_on_bad_optional_field_access(); [[noreturn]] void throw_on_bad_union_field_access(); [[noreturn]] void throw_on_nullptr_dereferencing(); struct ensure_isset_unsafe_fn; struct unset_unsafe_fn; struct alias_isset_fn; struct move_to_unique_ptr_fn; struct assign_from_unique_ptr_fn; struct union_value_unsafe_fn; template <typename T> struct IntWrapper { IntWrapper() = default; explicit IntWrapper(T t) ; T value{0}; }; template <typename U> struct IntWrapper<std::atomic<U>> { IntWrapper() = default; IntWrapper(const IntWrapper& other) ; IntWrapper(IntWrapper&& other) ; IntWrapper& operator=(const IntWrapper& other) noexcept ; IntWrapper& operator=(IntWrapper&& other) noexcept ; std::atomic<U> value{0}; }; template <typename T> class BitSet { public: BitSet() = default; explicit BitSet(T value) ; BitSet(const BitSet&) = default; BitSet& operator=(const BitSet& other) = default; class reference { public: reference(BitSet& bitSet, const uint8_t bit) ; reference& operator=(bool flag) ; operator bool() const ; reference& operator=(reference& other) ; private: BitSet& bitSet_; const uint8_t bit_; }; bool operator[](const uint8_t bit) const ; reference operator[](const uint8_t bit) ; T& value() ; const T& value() const ; private: template <class U> static bool get(U u, std::size_t bit) ; template <class U> static void set(U& u, std::size_t bit) ; template <class U> static void reset(U& u, std::size_t bit) ; template <class U> static bool get(const std::atomic<U>& u, std::size_t bit) ; template <class U> static void set(std::atomic<U>& u, std::size_t bit) ; template <class U> static void reset(std::atomic<U>& u, std::size_t bit) ; bool get(std::size_t bit) const ; void set(std::size_t bit) ; void reset(std::size_t bit) ; IntWrapper<T> int_; static constexpr int NUM_BITS = sizeof(T) * 8; }; template <bool kIsConst> class BitRef { template <bool B> friend class BitRef; public: using Isset = std::conditional_t<kIsConst, const uint8_t, uint8_t>; using AtomicIsset = std:: conditional_t<kIsConst, const std::atomic<uint8_t>, std::atomic<uint8_t>>; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) BitRef(Isset& isset, uint8_t bit_index) ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) BitRef(AtomicIsset& isset, uint8_t bit_index) ; template <bool B> explicit BitRef(const BitRef<B>& other) ; void operator=(bool flag) ; explicit operator bool() const ; private: union IssetBitSet { explicit IssetBitSet(Isset& isset) ; explicit IssetBitSet(AtomicIsset& isset) ; apache::thrift::detail::BitSet<Isset&> non_atomic; apache::thrift::detail::BitSet<AtomicIsset&> atomic; } value_; const uint8_t bit_index_; const bool is_atomic_ = false; }; template <typename value_type, typename return_type = value_type> using EnableIfConst = std::enable_if_t<std::is_const<value_type>::value, return_type>; template <typename value_type, typename return_type = value_type> using EnableIfNonConst = std::enable_if_t<!std::is_const<value_type>::value, return_type>; template <typename T, typename U> using EnableIfImplicit = std::enable_if_t< std::is_same< std::add_const_t<std::remove_reference_t<U>>, std::remove_reference_t<T>>{} && !(std::is_rvalue_reference<T>{} && std::is_lvalue_reference<U>{})>; } template <typename T> class field_ref { static_assert(std::is_reference<T>::value, "not a reference"); template <typename U> friend class field_ref; friend struct apache::thrift::detail::unset_unsafe_fn; public: using value_type = std::remove_reference_t<T>; using reference_type = T; private: using BitRef = apache::thrift::detail::BitRef<std::is_const<value_type>::value>; public: __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) field_ref( reference_type value, typename BitRef::Isset& is_set, const uint8_t bit_index = 0) ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) field_ref( reference_type value, typename BitRef::AtomicIsset& is_set, const uint8_t bit_index = 0) ; template <typename U, typename = detail::EnableIfImplicit<T, U>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) field_ref(const field_ref<U>& other) ; template <typename U = value_type> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) std::enable_if_t<std::is_assignable<value_type&, U&&>::value, field_ref&> operator=(U&& value) noexcept( std::is_nothrow_assignable<value_type&, U&&>::value) ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) field_ref& operator=(value_type&& value) noexcept( std::is_nothrow_move_assignable<value_type>::value) ; template <typename U> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) void copy_from(field_ref<U> other) noexcept( std::is_nothrow_assignable<value_type&, U>::value) ; [[deprecated("Use is_set() method instead")]] __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) bool has_value() const noexcept ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) bool is_set() const noexcept ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) reference_type value() const noexcept ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) reference_type operator*() const noexcept ; template <typename U = value_type> [[deprecated( "Please use `foo.value().bar()` instead of `foo->bar()` " "since const is not propagated correctly in `operator->` API")]] __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) detail::EnableIfNonConst<U>* operator->() const noexcept ; template <typename U = value_type> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) detail::EnableIfConst<U>* operator->() const noexcept ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) value_type* operator->() noexcept ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) reference_type ensure() noexcept ; template <typename Index> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) auto operator[](const Index& index) const -> decltype(auto) ; template <typename... Args> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) value_type& emplace(Args&&... args) ; template <class U, class... Args> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) std::enable_if_t< std::is_constructible<value_type, std::initializer_list<U>, Args&&...>:: value, value_type&> emplace(std::initializer_list<U> ilist, Args&&... args) ; private: value_type& value_; BitRef bitref_; }; template <typename T, typename U> bool operator==(field_ref<T> lhs, field_ref<U> rhs) ; template <typename T, typename U> bool operator!=(field_ref<T> lhs, field_ref<U> rhs) ; template <typename T, typename U> bool operator<(field_ref<T> lhs, field_ref<U> rhs) ; template <typename T, typename U> bool operator>(field_ref<T> lhs, field_ref<U> rhs) ; template <typename T, typename U> bool operator<=(field_ref<T> lhs, field_ref<U> rhs) ; template <typename T, typename U> bool operator>=(field_ref<T> lhs, field_ref<U> rhs) ; template <typename T, typename U> bool operator==(field_ref<T> lhs, const U& rhs) ; template <typename T, typename U> bool operator!=(field_ref<T> lhs, const U& rhs) ; template <typename T, typename U> bool operator<(field_ref<T> lhs, const U& rhs) ; template <typename T, typename U> bool operator>(field_ref<T> lhs, const U& rhs) ; template <typename T, typename U> bool operator<=(field_ref<T> lhs, const U& rhs) ; template <typename T, typename U> bool operator>=(field_ref<T> lhs, const U& rhs) ; template <typename T, typename U> bool operator==(const T& lhs, field_ref<U> rhs) ; template <typename T, typename U> bool operator!=(const T& lhs, field_ref<U> rhs) ; template <typename T, typename U> bool operator<(const T& lhs, field_ref<U> rhs) ; template <typename T, typename U> bool operator>(const T& lhs, field_ref<U> rhs) ; template <typename T, typename U> bool operator<=(const T& lhs, field_ref<U> rhs) ; template <typename T, typename U> bool operator>=(const T& lhs, field_ref<U> rhs) ; template <typename T> class optional_field_ref { static_assert(std::is_reference<T>::value, "not a reference"); template <typename U> friend class optional_field_ref; friend struct apache::thrift::detail::ensure_isset_unsafe_fn; friend struct apache::thrift::detail::unset_unsafe_fn; friend struct apache::thrift::detail::alias_isset_fn; public: using value_type = std::remove_reference_t<T>; using reference_type = T; private: using BitRef = apache::thrift::detail::BitRef<std::is_const<value_type>::value>; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) optional_field_ref(reference_type value, BitRef bitref) ; public: __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) optional_field_ref( reference_type value, typename BitRef::Isset& is_set, const uint8_t bit_index = 0) ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) optional_field_ref( reference_type value, typename BitRef::AtomicIsset& is_set, const uint8_t bit_index = 0) ; template <typename U, typename = detail::EnableIfImplicit<T, U>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) optional_field_ref( const optional_field_ref<U>& other) ; ; template <typename U = value_type> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) std::enable_if_t< std::is_assignable<value_type&, U&&>::value, optional_field_ref&> operator=(U&& value) noexcept( std::is_nothrow_assignable<value_type&, U&&>::value) ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) optional_field_ref& operator=(value_type&& value) noexcept( std::is_nothrow_move_assignable<value_type>::value) ; ; ; ; ; ; ; ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) value_type* operator->() ; ; ; private: value_type& value_; BitRef bitref_; }; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; namespace detail { template <typename T> inline constexpr bool is_boxed_value_ptr_v = false; template <typename T> inline constexpr bool is_boxed_value_ptr_v<boxed_value_ptr<T>> = true; template <typename T> inline constexpr bool is_boxed_value_v = false; template <typename T> inline constexpr bool is_boxed_value_v<boxed_value<T>> = true; template <typename From, typename To> using copy_reference_t = std::conditional_t< std::is_lvalue_reference<From>{}, std::add_lvalue_reference_t<To>, std::add_rvalue_reference_t<To>>; template <typename From, typename To> using copy_const_t = std::conditional_t< std::is_const<std::remove_reference_t<From>>{}, std::add_const_t<To>, To>; } template <typename T> class optional_boxed_field_ref { static_assert(std::is_reference<T>::value, "not a reference"); static_assert( detail::is_boxed_value_ptr_v<folly::remove_cvref_t<T>>, "not a boxed_value_ptr"); using element_type = typename folly::remove_cvref_t<T>::element_type; template <typename U> friend class optional_boxed_field_ref; friend struct apache::thrift::detail::move_to_unique_ptr_fn; friend struct apache::thrift::detail::assign_from_unique_ptr_fn; public: using value_type = detail::copy_const_t<T, element_type>; using reference_type = detail::copy_reference_t<T, value_type>; ; ; ; ; ; ; ; ; ; ; ; ; private: std::remove_reference_t<T>& value_; }; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; template <typename T> class intern_boxed_field_ref { static_assert(std::is_reference<T>::value, "not a reference"); static_assert( detail::is_boxed_value_v<folly::remove_cvref_t<T>>, "not a boxed_value"); using element_type = typename folly::remove_cvref_t<T>::element_type; using boxed_value_type = std::remove_reference_t<T>; template <typename U> friend class intern_boxed_field_ref; using get_default_t = folly::FunctionRef<const element_type&()>; public: using value_type = detail::copy_const_t<T, element_type>; using reference_type = detail::copy_reference_t<T, value_type>; private: using BitRef = apache::thrift::detail::BitRef<std::is_const<value_type>::value>; public: ; ; ; [[deprecated("Use is_set() method instead")]] ; ; ; ; ; ; private: boxed_value_type& value_; get_default_t get_default_; BitRef bitref_; }; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; template <typename T> class terse_intern_boxed_field_ref { static_assert(std::is_reference<T>::value, "not a reference"); static_assert( detail::is_boxed_value_v<folly::remove_cvref_t<T>>, "not a boxed_value"); using element_type = typename folly::remove_cvref_t<T>::element_type; using boxed_value_type = std::remove_reference_t<T>; template <typename U> friend class terse_intern_boxed_field_ref; using get_default_t = folly::FunctionRef<const element_type&()>; public: using value_type = detail::copy_const_t<T, element_type>; using reference_type = detail::copy_reference_t<T, value_type>; ; ; ; template <typename U> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) void move_from(terse_intern_boxed_field_ref<U> other) noexcept( std::is_nothrow_assignable<value_type&, std::remove_reference_t<U>&&>:: value) ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) void reset() noexcept ; template <typename U = value_type> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) detail::EnableIfNonConst<U, reference_type> value() ; template <typename U = value_type> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) detail::EnableIfConst<U, reference_type> value() const ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) reference_type ensure() noexcept ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) reference_type operator*() ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) reference_type operator*() const ; template <typename U = value_type> [[deprecated( "Please use `foo.value().bar()` instead of `foo->bar()` " "since const is not propagated correctly in `operator->` API")]] __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) detail::EnableIfNonConst<U>* operator->() ; template <typename U = value_type> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) detail::EnableIfConst<U>* operator->() const ; template <typename... Args> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) value_type& emplace(Args&&... args) ; template <class U, class... Args> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) std::enable_if_t< std::is_constructible<value_type, std::initializer_list<U>&, Args&&...>:: value, value_type&> emplace(std::initializer_list<U> ilist, Args&&... args) ; private: boxed_value_type& value_; get_default_t get_default_; }; template <typename T> terse_intern_boxed_field_ref<const T&> as_const_intern_box( terse_intern_boxed_field_ref<T&> val) ; template <typename T1, typename T2> bool operator==( terse_intern_boxed_field_ref<T1> a, terse_intern_boxed_field_ref<T2> b) ; template <typename T1, typename T2> bool operator!=( terse_intern_boxed_field_ref<T1> a, terse_intern_boxed_field_ref<T2> b) ; template <typename T1, typename T2> bool operator<( terse_intern_boxed_field_ref<T1> a, terse_intern_boxed_field_ref<T2> b) ; template <typename T1, typename T2> bool operator>( terse_intern_boxed_field_ref<T1> a, terse_intern_boxed_field_ref<T2> b) ; template <typename T1, typename T2> bool operator<=( terse_intern_boxed_field_ref<T1> a, terse_intern_boxed_field_ref<T2> b) ; template <typename T1, typename T2> bool operator>=( terse_intern_boxed_field_ref<T1> a, terse_intern_boxed_field_ref<T2> b) ; template <typename T, typename U> bool operator==(terse_intern_boxed_field_ref<T> a, const U& b) ; template <typename T, typename U> bool operator!=(terse_intern_boxed_field_ref<T> a, const U& b) ; template <typename T, typename U> bool operator==(const U& a, terse_intern_boxed_field_ref<T> b) ; template <typename T, typename U> bool operator!=(const U& a, terse_intern_boxed_field_ref<T> b) ; template <typename T, typename U> bool operator<(terse_intern_boxed_field_ref<T> a, const U& b) ; template <typename T, typename U> bool operator>(terse_intern_boxed_field_ref<T> a, const U& b) ; template <typename T, typename U> bool operator<=(terse_intern_boxed_field_ref<T> a, const U& b) ; template <typename T, typename U> bool operator>=(terse_intern_boxed_field_ref<T> a, const U& b) ; template <typename T, typename U> bool operator<(const U& a, terse_intern_boxed_field_ref<T> b) ; template <typename T, typename U> bool operator<=(const U& a, terse_intern_boxed_field_ref<T> b) ; template <typename T, typename U> bool operator>(const U& a, terse_intern_boxed_field_ref<T> b) ; template <typename T, typename U> bool operator>=(const U& a, terse_intern_boxed_field_ref<T> b) ; namespace detail { struct get_pointer_fn { template <class T> T* operator()(optional_field_ref<T&> field) const ; template <class T> auto* operator()(optional_boxed_field_ref<T&> field) const ; }; struct can_throw_fn { template <typename T> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) T&& operator()(T&& value) const ; }; struct ensure_isset_unsafe_fn { template <typename T> void operator()(optional_field_ref<T> ref) const noexcept ; }; struct unset_unsafe_fn { template <typename T> void operator()(field_ref<T> ref) const noexcept ; template <typename T> void operator()(optional_field_ref<T> ref) const noexcept ; }; struct alias_isset_fn { template <typename T, typename F> auto operator()(optional_field_ref<T> ref, F functor) const noexcept(noexcept(functor(ref.value_))) ; }; template <typename T> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) apache::thrift::optional_field_ref<T&&> make_optional_field_ref( T&& ref, apache::thrift::detail::is_set_t<std::remove_reference_t<T>>& is_set) ; template <typename T> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) apache::thrift::field_ref<T&&> make_field_ref( T&& ref, apache::thrift::detail::is_set_t<std::remove_reference_t<T>>& is_set) ; struct move_to_unique_ptr_fn { template <typename T> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) auto operator()(optional_boxed_field_ref<T> ref) const noexcept ; }; struct assign_from_unique_ptr_fn { template <typename T> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) void operator()( optional_boxed_field_ref<T> ref, std::unique_ptr<typename folly::remove_cvref_t<T>::element_type> ptr) const noexcept ; }; } constexpr apache::thrift::detail::get_pointer_fn get_pointer; constexpr apache::thrift::detail::can_throw_fn can_throw; constexpr apache::thrift::detail::move_to_unique_ptr_fn move_to_unique_ptr; constexpr apache::thrift::detail::assign_from_unique_ptr_fn assign_from_unique_ptr; [[deprecated("Use `emplace` or `operator=` to set Thrift fields.")]] constexpr apache::thrift::detail::ensure_isset_unsafe_fn ensure_isset_unsafe; constexpr apache::thrift::detail::ensure_isset_unsafe_fn ensure_isset_unsafe_deprecated; [[deprecated("Use `reset` to clear Thrift fields.")]] constexpr apache::thrift::detail::unset_unsafe_fn unset_unsafe; constexpr apache::thrift::detail::unset_unsafe_fn unset_unsafe_deprecated; [[deprecated]] constexpr apache::thrift::detail::alias_isset_fn alias_isset; template <typename T> class required_field_ref { static_assert(std::is_reference<T>::value, "not a reference"); template <typename U> friend class required_field_ref; public: using value_type = std::remove_reference_t<T>; using reference_type = T; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) explicit required_field_ref(reference_type value) ; template <typename U, typename = detail::EnableIfImplicit<T, U>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) required_field_ref( const required_field_ref<U>& other) ; template <typename U = value_type> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) std::enable_if_t< std::is_assignable<value_type&, U&&>::value, required_field_ref&> operator=(U&& value) noexcept( std::is_nothrow_assignable<value_type&, U&&>::value) ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) required_field_ref& operator=(value_type&& value) noexcept( std::is_nothrow_move_assignable<value_type>::value) ; template <typename U> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) void copy_from(required_field_ref<U> other) noexcept( std::is_nothrow_assignable<value_type&, U>::value) ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) bool has_value() const noexcept ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) reference_type value() const noexcept ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) reference_type operator*() const noexcept ; template <typename U = value_type> [[deprecated( "Please use `foo.value().bar()` instead of `foo->bar()` " "since const is not propagated correctly in `operator->` API")]] __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) detail::EnableIfNonConst<U>* operator->() const noexcept ; template <typename U = value_type> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) detail::EnableIfConst<U>* operator->() const noexcept ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) value_type* operator->() noexcept ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) reference_type ensure() noexcept ; template <typename Index> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) auto operator[](const Index& index) const -> decltype(auto) ; template <typename... Args> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) value_type& emplace(Args&&... args) ; template <class U, class... Args> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) std::enable_if_t< std::is_constructible<value_type, std::initializer_list<U>, Args&&...>:: value, value_type&> emplace(std::initializer_list<U> ilist, Args&&... args) ; private: value_type& value_; }; template <typename T, typename U> bool operator==(required_field_ref<T> lhs, required_field_ref<U> rhs) ; template <typename T, typename U> bool operator!=(required_field_ref<T> lhs, required_field_ref<U> rhs) ; template <typename T, typename U> bool operator<(required_field_ref<T> lhs, required_field_ref<U> rhs) ; template <typename T, typename U> bool operator>(required_field_ref<T> lhs, required_field_ref<U> rhs) ; template <typename T, typename U> bool operator<=(required_field_ref<T> lhs, required_field_ref<U> rhs) ; template <typename T, typename U> bool operator>=(required_field_ref<T> lhs, required_field_ref<U> rhs) ; template <typename T, typename U> bool operator==(required_field_ref<T> lhs, const U& rhs) ; template <typename T, typename U> bool operator!=(required_field_ref<T> lhs, const U& rhs) ; template <typename T, typename U> bool operator<(required_field_ref<T> lhs, const U& rhs) ; template <typename T, typename U> bool operator>(required_field_ref<T> lhs, const U& rhs) ; template <typename T, typename U> bool operator<=(required_field_ref<T> lhs, const U& rhs) ; template <typename T, typename U> bool operator>=(required_field_ref<T> lhs, const U& rhs) ; template <typename T, typename U> bool operator==(const T& lhs, required_field_ref<U> rhs) ; template <typename T, typename U> bool operator!=(const T& lhs, required_field_ref<U> rhs) ; template <typename T, typename U> bool operator<(const T& lhs, required_field_ref<U> rhs) ; template <typename T, typename U> bool operator>(const T& lhs, required_field_ref<U> rhs) ; template <typename T, typename U> bool operator<=(const T& lhs, required_field_ref<U> rhs) ; template <typename T, typename U> bool operator>=(const T& lhs, required_field_ref<U> rhs) ; namespace detail { struct union_field_ref_owner_vtable { using reset_t = void(void*); reset_t* reset; }; struct union_field_ref_owner_vtable_impl { template <typename T> static void reset(void* obj) ; }; template <typename T> inline constexpr union_field_ref_owner_vtable union_field_ref_owner_vtable_for{nullptr}; template <typename T> inline constexpr union_field_ref_owner_vtable union_field_ref_owner_vtable_for<T&>{ &union_field_ref_owner_vtable_impl::reset<T>}; template <typename T> inline constexpr union_field_ref_owner_vtable union_field_ref_owner_vtable_for<const T&>{nullptr}; } template <typename T> class union_field_ref { static_assert(std::is_reference<T>::value, "not a reference"); template <typename> friend class union_field_ref; friend struct detail::union_value_unsafe_fn; using is_cpp_ref_or_boxed = std::bool_constant< detail::is_boxed_value_ptr_v<folly::remove_cvref_t<T>> || detail::is_shared_or_unique_ptr_v<folly::remove_cvref_t<T>>>; struct element_type_adapter { using element_type = folly::remove_cvref_t<T>; }; using element_type = typename std::conditional_t< is_cpp_ref_or_boxed::value, folly::remove_cvref_t<T>, element_type_adapter>::element_type; using storage_reference_type = T; using storage_value_type = std::remove_reference_t<T>; public: using value_type = detail::copy_const_t<T, element_type>; using reference_type = detail::copy_reference_t<T, value_type>; private: using int_t = detail::copy_const_t<T, int>; using owner = detail::copy_const_t<T, void>*; using vtable = apache::thrift::detail::union_field_ref_owner_vtable; public: __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) union_field_ref( storage_reference_type storage_value, int_t& type, int field_type, owner ow, const vtable& vt) ; template < typename U = value_type, std::enable_if_t< std::is_assignable<reference_type, U&&>::value && std::is_constructible<value_type, U&&>::value, int> = 0> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) union_field_ref& operator=(U&& other) noexcept( std::is_nothrow_constructible<value_type, U>::value && std::is_nothrow_assignable<value_type, U>::value) ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) bool has_value() const ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) explicit operator bool() const ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) reference_type value() const ; template <typename U = std::remove_const_t<value_type>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) std::remove_const_t<value_type> value_or( U&& default_value) const ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) reference_type operator*() const ; template <typename U = value_type> [[deprecated( "Please use `foo.value().bar()` instead of `foo->bar()` " "since const is not propagated correctly in `operator->` API")]] __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) detail::EnableIfNonConst<U>* operator->() const ; template <typename U = value_type> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) detail::EnableIfConst<U>* operator->() const ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) value_type* operator->() ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) reference_type ensure() ; template <typename... Args> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) value_type& emplace(Args&&... args) ; template <class U, class... Args> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) std::enable_if_t< std::is_constructible<value_type, std::initializer_list<U>, Args&&...>:: value, value_type&> emplace(std::initializer_list<U> ilist, Args&&... args) ; private: __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) void throw_if_unset() const ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) value_type& get_value() const ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) value_type& get_value(std::false_type) const ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) value_type& get_value(std::true_type) const ; template <class... Args> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) void emplace_impl(std::false_type, Args&&... args) ; template <class... Args> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) void emplace_impl(std::true_type, Args&&... args) ; storage_value_type& storage_value_; int_t& type_; const int field_type_; owner owner_; const vtable& vtable_; }; template <typename T1, typename T2> bool operator==(union_field_ref<T1> a, union_field_ref<T2> b) ; template <typename T1, typename T2> bool operator!=(union_field_ref<T1> a, union_field_ref<T2> b) ; template <typename T1, typename T2> bool operator<(union_field_ref<T1> a, union_field_ref<T2> b) ; template <typename T1, typename T2> bool operator>(union_field_ref<T1> a, union_field_ref<T2> b) ; template <typename T1, typename T2> bool operator<=(union_field_ref<T1> a, union_field_ref<T2> b) ; template <typename T1, typename T2> bool operator>=(union_field_ref<T1> a, union_field_ref<T2> b) ; template <typename T, typename U> bool operator==(union_field_ref<T> a, const U& b) ; template <typename T, typename U> bool operator!=(union_field_ref<T> a, const U& b) ; template <typename T, typename U> bool operator==(const U& a, union_field_ref<T> b) ; template <typename T, typename U> bool operator!=(const U& a, union_field_ref<T> b) ; template <typename T, typename U> bool operator<(union_field_ref<T> a, const U& b) ; template <typename T, typename U> bool operator>(union_field_ref<T> a, const U& b) ; template <typename T, typename U> bool operator<=(union_field_ref<T> a, const U& b) ; template <typename T, typename U> bool operator>=(union_field_ref<T> a, const U& b) ; template <typename T, typename U> bool operator<(const U& a, union_field_ref<T> b) ; template <typename T, typename U> bool operator<=(const U& a, union_field_ref<T> b) ; template <typename T, typename U> bool operator>(const U& a, union_field_ref<T> b) ; template <typename T, typename U> bool operator>=(const U& a, union_field_ref<T> b) ; namespace detail { struct union_value_unsafe_fn { template <typename T> auto&& operator()(union_field_ref<T> ref) const ; }; } template <typename T> class terse_field_ref { static_assert(std::is_reference<T>::value, "not a reference"); template <typename U> friend class terse_field_ref; public: using value_type = std::remove_reference_t<T>; using reference_type = T; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) terse_field_ref(reference_type value) ; template <typename U, typename = detail::EnableIfImplicit<T, U>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) terse_field_ref( const terse_field_ref<U>& other) ; template < typename U, std::enable_if_t< std::is_same<T, U&&>{} || std::is_same<T, const U&&>{}, int> = 0> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) explicit terse_field_ref( const terse_field_ref<U&>& other) ; template <typename U = value_type> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) std:: enable_if_t<std::is_assignable<value_type&, U&&>::value, terse_field_ref&> operator=(U&& value) noexcept( std::is_nothrow_assignable<value_type&, U&&>::value) ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) terse_field_ref& operator=(value_type&& value) noexcept( std::is_nothrow_move_assignable<value_type>::value) ; template <typename U> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) void copy_from(const terse_field_ref<U>& other) noexcept( std::is_nothrow_assignable<value_type&, U>::value) ; template <typename U> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) void move_from(terse_field_ref<U> other) noexcept( std::is_nothrow_assignable<value_type&, std::remove_reference_t<U>&&>:: value) ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) reference_type value() const noexcept ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) reference_type operator*() const noexcept ; template <typename U = value_type> [[deprecated( "Please use `foo.value().bar()` instead of `foo->bar()` " "since const is not propagated correctly in `operator->` API")]] __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) detail::EnableIfNonConst<U>* operator->() const noexcept ; template <typename U = value_type> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) detail::EnableIfConst<U>* operator->() const noexcept ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) value_type* operator->() noexcept ; template <typename Index> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) auto operator[](const Index& index) const -> decltype(auto) ; template <typename... Args> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) value_type& emplace(Args&&... args) ; template <class U, class... Args> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) std::enable_if_t< std::is_constructible<value_type, std::initializer_list<U>, Args&&...>:: value, value_type&> emplace(std::initializer_list<U> ilist, Args&&... args) ; private: value_type& value_; }; template <typename T, typename U> bool operator==(terse_field_ref<T> lhs, terse_field_ref<U> rhs) ; template <typename T, typename U> bool operator!=(terse_field_ref<T> lhs, terse_field_ref<U> rhs) ; template <typename T, typename U> bool operator<(terse_field_ref<T> lhs, terse_field_ref<U> rhs) ; template <typename T, typename U> bool operator>(terse_field_ref<T> lhs, terse_field_ref<U> rhs) ; template <typename T, typename U> bool operator<=(terse_field_ref<T> lhs, terse_field_ref<U> rhs) ; template <typename T, typename U> bool operator>=(terse_field_ref<T> lhs, terse_field_ref<U> rhs) ; template <typename T, typename U> bool operator==(terse_field_ref<T> lhs, const U& rhs) ; template <typename T, typename U> bool operator!=(terse_field_ref<T> lhs, const U& rhs) ; template <typename T, typename U> bool operator<(terse_field_ref<T> lhs, const U& rhs) ; template <typename T, typename U> bool operator>(terse_field_ref<T> lhs, const U& rhs) ; template <typename T, typename U> bool operator<=(terse_field_ref<T> lhs, const U& rhs) ; template <typename T, typename U> bool operator>=(terse_field_ref<T> lhs, const U& rhs) ; template <typename T, typename U> bool operator==(const T& lhs, terse_field_ref<U> rhs) ; template <typename T, typename U> bool operator!=(const T& lhs, terse_field_ref<U> rhs) ; template <typename T, typename U> bool operator<(const T& lhs, terse_field_ref<U> rhs) ; template <typename T, typename U> bool operator>(const T& lhs, terse_field_ref<U> rhs) ; template <typename T, typename U> bool operator<=(const T& lhs, terse_field_ref<U> rhs) ; template <typename T, typename U> bool operator>=(const T& lhs, terse_field_ref<U> rhs) ; } } namespace folly { namespace detail { template <typename T> struct FunctionClassType { using type = T; }; template <bool Noexcept, typename Return, typename... Args> struct FunctionClassType<Return (*)(Args...) noexcept(Noexcept)> { using Ptr = Return (*)(Args...) noexcept(Noexcept); struct type { constexpr type(Ptr function) ; constexpr auto operator()(Args... args) const noexcept(Noexcept)->Return ; private: Ptr function_; }; }; template < bool Noexcept, typename Return, typename Self, typename... Args> struct FunctionClassType<Return (Self::*)(Args...) noexcept(Noexcept)> { using Ptr = Return (Self::*)(Args...) noexcept(Noexcept); struct type { constexpr type(Ptr memberPointer) ; constexpr auto operator()(Self& self, Args... args) const noexcept(Noexcept)->Return ; constexpr auto operator()(Self&& self, Args... args) const noexcept(Noexcept)->Return ; private: Ptr memberPointer_; }; }; template < bool Noexcept, typename Return, typename Self, typename... Args> struct FunctionClassType<Return (Self::*)(Args...) const noexcept(Noexcept)> { using Ptr = Return (Self::*)(Args...) const noexcept(Noexcept); struct type { constexpr type(Ptr memberPointer) ; constexpr auto operator()(const Self& self, Args... args) const noexcept(Noexcept)->Return ; private: Ptr memberPointer_; }; }; template < bool Noexcept, typename Return, typename Self, typename... Args> struct FunctionClassType< Return (Self::*)(Args...) & noexcept(Noexcept)> { using Ptr = Return (Self::*)(Args...) & noexcept(Noexcept); struct type { constexpr type(Ptr memberPointer) ; constexpr auto operator()(Self& self, Args&&... args) const noexcept(Noexcept)->Return ; private: Ptr memberPointer_; }; }; template < bool Noexcept, typename Return, typename Self, typename... Args> struct FunctionClassType< Return (Self::*)(Args...) const & noexcept(Noexcept)> { using Ptr = Return (Self::*)(Args...) const& noexcept(Noexcept); struct type { constexpr type(Ptr memberPointer) ; constexpr auto operator()(const Self& self, Args... args) const noexcept(Noexcept)->Return ; private: Ptr memberPointer_; }; }; template < bool Noexcept, typename Return, typename Self, typename... Args> struct FunctionClassType< Return (Self::*)(Args...) && noexcept(Noexcept)> { using Ptr = Return (Self::*)(Args...) && noexcept(Noexcept); struct type { constexpr type(Ptr memberPointer) ; constexpr auto operator()(Self&& self, Args... args) const noexcept(Noexcept)->Return ; private: Ptr memberPointer_; }; }; template < bool Noexcept, typename Return, typename Self, typename... Args> struct FunctionClassType< Return (Self::*)(Args...) const && noexcept(Noexcept)> { using Ptr = Return (Self::*)(Args...) const&& noexcept(Noexcept); struct type { constexpr type(Ptr memberPointer) ; constexpr auto operator()(const Self&& self, Args... args) const noexcept(Noexcept)->Return ; private: Ptr memberPointer_; }; }; template <typename T, typename Self> struct FunctionClassType<T Self::*> { using Ptr = T Self::*; struct type { constexpr type(Ptr memberPointer) ; constexpr auto operator()(Self& self) const noexcept -> T& ; constexpr auto operator()(const Self& self) const noexcept -> const T& ; constexpr auto operator()(Self&& self) const noexcept -> T&& ; constexpr auto operator()(const Self&& self) const noexcept -> const T&& ; private: Ptr memberPointer_; }; }; template <typename...> struct Overload {}; template <typename Case, typename... Cases> struct Overload<Case, Cases...> : Overload<Cases...>, Case { explicit constexpr Overload(Case c, Cases... cs) ; using Case::operator(); using Overload<Cases...>::operator(); }; template <typename Case> struct Overload<Case> : Case { explicit constexpr Overload(Case c) ; using Case::operator(); }; } template <typename... Cases> constexpr decltype(auto) overload(Cases&&... cases) ; namespace overload_detail { struct valueless_by_exception { template <typename O, typename... Args> [[maybe_unused]] __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()( O&& o, Args&&... args) const noexcept(noexcept( static_cast<O&&>(o).valueless_by_exception(static_cast<Args&&>(args)...))) -> decltype(static_cast<O&&>(o).valueless_by_exception( static_cast<Args&&>(args)...)) ; }; #pragma GCC diagnostic push namespace visit__folly_detail_invoke_ns { [[maybe_unused]] void visit(::folly::detail::invoke_private_overload&); struct __folly_detail_invoke_obj { template <typename... Args> [[maybe_unused]] __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()( Args&&... args) const noexcept(noexcept(visit(static_cast<Args&&>(args)...))) -> decltype(visit(static_cast<Args&&>(args)...)) ; }; } struct visit : visit__folly_detail_invoke_ns::__folly_detail_invoke_obj {}; namespace apply_visitor__folly_detail_invoke_ns { [[maybe_unused]] void apply_visitor(::folly::detail::invoke_private_overload&); struct __folly_detail_invoke_obj { template <typename... Args> [[maybe_unused]] __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()( Args&&... args) const noexcept(noexcept(apply_visitor(static_cast<Args&&>(args)...))) -> decltype(apply_visitor(static_cast<Args&&>(args)...)) ; }; } struct apply_visitor : apply_visitor__folly_detail_invoke_ns::__folly_detail_invoke_obj {}; #pragma GCC diagnostic pop } template <typename Variant, typename... Cases> decltype(auto) variant_match(Variant&& variant, Cases&&... cases) ; template <typename R, typename Variant, typename... Cases> R variant_match(Variant&& variant, Cases&&... cases) ; } namespace apache { namespace thrift { namespace type { template <typename Tag> struct is_concrete : std::false_type {}; template <typename Tag> constexpr bool is_concrete_v = is_concrete<Tag>::value; template <typename Tag> struct is_thrift_type_tag : is_concrete<Tag> {}; template <typename Tag> constexpr bool is_thrift_type_tag_v = is_thrift_type_tag<Tag>::value; template <typename Tag> struct is_abstract : std::false_type {}; template <typename Tag> constexpr bool is_abstract_v = is_thrift_type_tag<Tag>::value && !is_concrete<Tag>::value; namespace detail { template <typename... Tags> constexpr void checkTags() ; } template <typename Tag, typename CTag> constexpr bool is_a_v = (detail::checkTags<Tag, CTag>(), std::is_base_of_v<CTag, Tag>); template <typename Tag, typename R = void, typename...> using if_concrete = std::enable_if_t<is_concrete_v<Tag>, R>; template <typename Tag, typename R = void, typename...> using if_abstract = std::enable_if_t<is_abstract_v<Tag>, R>; template <typename Tag, typename R = void, typename...> using if_not_concrete = if_abstract<Tag, R>; template <typename CTag, typename Tag, typename R = void, typename...> using if_is_a = std::enable_if_t<is_a_v<CTag, Tag>, R>; template <typename Tag, typename R = void, typename...> using if_thrift_type_tag = std::enable_if_t<is_thrift_type_tag_v<Tag>, R>; template <typename Tag, typename R = void, typename...> using if_not_thrift_type_tag = std::enable_if_t<!is_thrift_type_tag_v<Tag>, R>; namespace bound { struct is_concrete { template <typename Tag> using apply = type::is_concrete<Tag>; }; struct is_thrift_type_tag { template <typename Tag> using apply = type::is_thrift_type_tag<Tag>; }; struct is_abstract { template <typename Tag> using apply = type::is_abstract<Tag>; }; template <typename CTag> struct is_a { template <typename Tag> using apply = std::bool_constant<type::is_a_v<Tag, CTag>>; }; } template <> struct is_concrete<void_t> : std::true_type {}; template <> struct is_concrete<bool_t> : std::true_type {}; template <> struct is_concrete<byte_t> : std::true_type {}; template <> struct is_concrete<i16_t> : std::true_type {}; template <> struct is_concrete<i32_t> : std::true_type {}; template <> struct is_concrete<i64_t> : std::true_type {}; template <> struct is_concrete<float_t> : std::true_type {}; template <> struct is_concrete<double_t> : std::true_type {}; template <> struct is_concrete<string_t> : std::true_type {}; template <> struct is_concrete<binary_t> : std::true_type {}; template <typename T> struct is_concrete<enum_t<T>> : std::true_type {}; template <typename T> struct is_concrete<struct_t<T>> : std::true_type {}; template <typename T> struct is_concrete<union_t<T>> : std::true_type {}; template <typename T> struct is_concrete<exception_t<T>> : std::true_type {}; template <typename T> struct is_concrete<service_t<T>> : std::true_type {}; template <typename VTag> struct is_concrete<list<VTag>> : std::bool_constant<is_concrete_v<VTag>> {}; template <typename KTag> struct is_concrete<set<KTag>> : std::bool_constant<is_concrete_v<KTag>> {}; template <typename KTag, typename VTag> struct is_concrete<map<KTag, VTag>> : std::bool_constant<is_concrete_v<KTag> && is_concrete_v<VTag>> {}; template <typename Adapter, typename Tag> struct is_concrete<adapted<Adapter, Tag>> : std::bool_constant<is_concrete_v<Tag>> {}; template <typename T, typename Tag> struct is_concrete<cpp_type<T, Tag>> : std::bool_constant<is_concrete_v<Tag>> { }; template <typename Tag, typename Context> struct is_concrete<field<Tag, Context>> : std::bool_constant<is_concrete_v<Tag>> {}; template <typename Adapter, typename Tag, typename Context> struct is_concrete<field<adapted<Adapter, Tag>, Context>> : std::bool_constant<is_concrete_v<Tag>> {}; template <> struct is_thrift_type_tag<all_c> : std::true_type {}; template <> struct is_thrift_type_tag<primitive_c> : std::true_type {}; template <> struct is_thrift_type_tag<number_c> : std::true_type {}; template <> struct is_thrift_type_tag<integral_c> : std::true_type {}; template <> struct is_thrift_type_tag<floating_point_c> : std::true_type {}; template <> struct is_thrift_type_tag<enum_c> : std::true_type {}; template <> struct is_thrift_type_tag<string_c> : std::true_type {}; template <> struct is_thrift_type_tag<structured_c> : std::true_type {}; template <> struct is_thrift_type_tag<struct_except_c> : std::true_type {}; template <> struct is_thrift_type_tag<struct_c> : std::true_type {}; template <> struct is_thrift_type_tag<union_c> : std::true_type {}; template <> struct is_thrift_type_tag<exception_c> : std::true_type {}; template <> struct is_thrift_type_tag<container_c> : std::true_type {}; template <> struct is_thrift_type_tag<list_c> : std::true_type {}; template <> struct is_thrift_type_tag<set_c> : std::true_type {}; template <> struct is_thrift_type_tag<map_c> : std::true_type {}; template <> struct is_thrift_type_tag<service_c> : std::true_type {}; template <typename VTag> struct is_thrift_type_tag<list<VTag>> : std::bool_constant<is_thrift_type_tag_v<VTag>> {}; template <typename KTag> struct is_thrift_type_tag<set<KTag>> : std::bool_constant<is_thrift_type_tag_v<KTag>> {}; template <typename KTag, typename VTag> struct is_thrift_type_tag<map<KTag, VTag>> : std::bool_constant< is_thrift_type_tag_v<KTag> && is_thrift_type_tag_v<VTag>> {}; template <typename Adapter, typename Tag> struct is_thrift_type_tag<adapted<Adapter, Tag>> : std::bool_constant<is_thrift_type_tag_v<Tag>> {}; template <typename T, typename Tag> struct is_thrift_type_tag<cpp_type<T, Tag>> : std::bool_constant<is_thrift_type_tag_v<Tag>> {}; template <typename Tag, typename Context> struct is_thrift_type_tag<field<Tag, Context>> : std::true_type {}; template <typename V1, typename V2> inline constexpr bool is_a_v<list<V1>, list<V2>> = is_a_v<V1, V2>; template <typename K1, typename K2> inline constexpr bool is_a_v<set<K1>, set<K2>> = is_a_v<K1, K2>; template <typename K1, typename V1, typename K2, typename V2> inline constexpr bool is_a_v<map<K1, V1>, map<K2, V2>> = is_a_v<K1, K2> && is_a_v<V1, V2>; template <typename A, typename Tag, typename CTag> inline constexpr bool is_a_v<adapted<A, Tag>, CTag> = is_a_v<Tag, CTag>; template <typename A, typename Tag, typename CTag> inline constexpr bool is_a_v<adapted<A, Tag>, adapted<A, CTag>> = is_a_v<Tag, CTag>; template <typename T, typename Tag, typename CTag> inline constexpr bool is_a_v<cpp_type<T, Tag>, CTag> = is_a_v<Tag, CTag>; template <typename T, typename Tag, typename CTag> inline constexpr bool is_a_v<cpp_type<T, Tag>, cpp_type<T, CTag>> = is_a_v<Tag, CTag>; } } } namespace apache { namespace thrift { namespace op { namespace detail { using pa = ::apache::thrift::detail::st::private_access; template <typename Id, typename T, typename = void> struct Get; template <typename Id, typename Tag> struct GetOrdinalImpl; template <size_t... I, typename F> constexpr void for_each_ordinal_impl(F&& f, std::index_sequence<I...>); template <typename F, size_t I = 0> using ord_result_t = decltype(std::declval<F>()(type::detail::pos_to_ordinal<I>{})); template <size_t... I, typename F> ord_result_t<F> find_by_ordinal_impl(F&& f, std::index_sequence<I...>); struct GetValueOrNull { template <typename T> auto* operator()(field_ref<T&> field_ref) const ; template <typename T> auto* operator()(required_field_ref<T&> field_ref) const ; template <typename T> auto* operator()(optional_field_ref<T&> field_ref) const ; template <typename T> auto* operator()(optional_boxed_field_ref<T&> field_ref) const ; template <typename T> auto* operator()(terse_field_ref<T&> field_ref) const ; template <typename T> auto* operator()(union_field_ref<T&> field_ref) const ; template <typename T> auto* operator()(terse_intern_boxed_field_ref<T&> field_ref) const ; template <typename T> auto* operator()(intern_boxed_field_ref<T&> field_ref) const ; template <typename T> T* operator()(std::optional<T>& opt) const ; template <typename T> const T* operator()(const std::optional<T>& opt) const ; template <typename T, typename Deleter> T* operator()(const std::unique_ptr<T, Deleter>&& ptr) const = delete; template <typename T, typename Deleter> T* operator()(const std::unique_ptr<T, Deleter>& ptr) const ; template <typename T> T* operator()(const std::shared_ptr<T>&& ptr) const = delete; template <typename T> T* operator()(const std::shared_ptr<T>& ptr) const ; }; } } } } typedef uint16_t uc16; namespace double_conversion { int StrLength(const char* string) ; template <typename T> class Vector { public: Vector() ; Vector(T* data, int len) ; Vector<T> SubVector(int from, int to) ; int length() const ; bool is_empty() const ; T* start() const ; T& operator[](int index) const ; T& first() ; T& last() ; void pop_back() ; private: T* start_; int length_; }; class StringBuilder { public: StringBuilder(char* buffer, int buffer_size) ; ~StringBuilder() ; int size() const ; int position() const ; void Reset() ; void AddCharacter(char c) ; void AddString(const char* s) ; void AddSubstring(const char* s, int n) ; void AddPadding(char c, int count) ; char* Finalize() ; private: Vector<char> buffer_; int position_; bool is_finalized() const ; StringBuilder(); StringBuilder(const StringBuilder&); void operator=(const StringBuilder&); }; template <class Dest, class Source> Dest BitCast(const Source& source) ; template <class Dest, class Source> Dest BitCast(Source* source) ; } namespace double_conversion { class StringToDoubleConverter { public: enum Flags { NO_FLAGS = 0, ALLOW_HEX = 1, ALLOW_OCTALS = 2, ALLOW_TRAILING_JUNK = 4, ALLOW_LEADING_SPACES = 8, ALLOW_TRAILING_SPACES = 16, ALLOW_SPACES_AFTER_SIGN = 32, ALLOW_CASE_INSENSITIVITY = 64, ALLOW_CASE_INSENSIBILITY = 64, ALLOW_HEX_FLOATS = 128, }; static const uc16 kNoSeparator = '\0'; StringToDoubleConverter(int flags, double empty_string_value, double junk_string_value, const char* infinity_symbol, const char* nan_symbol, uc16 separator = kNoSeparator) ; double StringToDouble(const char* buffer, int length, int* processed_characters_count) const; double StringToDouble(const uc16* buffer, int length, int* processed_characters_count) const; float StringToFloat(const char* buffer, int length, int* processed_characters_count) const; float StringToFloat(const uc16* buffer, int length, int* processed_characters_count) const; template <typename T> T StringTo(const char* buffer, int length, int* processed_characters_count) const; template <typename T> T StringTo(const uc16* buffer, int length, int* processed_characters_count) const; private: const int flags_; const double empty_string_value_; const double junk_string_value_; const char* const infinity_symbol_; const char* const nan_symbol_; const uc16 separator_; template <class Iterator> double StringToIeee(Iterator start_pointer, int length, bool read_as_double, int* processed_characters_count) const; StringToDoubleConverter(); StringToDoubleConverter(const StringToDoubleConverter&); void operator=(const StringToDoubleConverter&); }; } namespace double_conversion { class DoubleToStringConverter { public: static const int kMaxFixedDigitsBeforePoint = 60; static const int kMaxFixedDigitsAfterPoint = 100; static const int kMaxExponentialDigits = 120; static const int kMinPrecisionDigits = 1; static const int kMaxPrecisionDigits = 120; static const int kBase10MaximalLength = 17; static const int kBase10MaximalLengthSingle = 9; static const int kMaxCharsEcmaScriptShortest = 25; enum Flags { NO_FLAGS = 0, EMIT_POSITIVE_EXPONENT_SIGN = 1, EMIT_TRAILING_DECIMAL_POINT = 2, EMIT_TRAILING_ZERO_AFTER_POINT = 4, UNIQUE_ZERO = 8, NO_TRAILING_ZERO = 16 }; DoubleToStringConverter(int flags, const char* infinity_symbol, const char* nan_symbol, char exponent_character, int decimal_in_shortest_low, int decimal_in_shortest_high, int max_leading_padding_zeroes_in_precision_mode, int max_trailing_padding_zeroes_in_precision_mode, int min_exponent_width = 0) ; static const DoubleToStringConverter& EcmaScriptConverter(); bool ToShortest(double value, StringBuilder* result_builder) const ; bool ToShortestSingle(float value, StringBuilder* result_builder) const ; bool ToFixed(double value, int requested_digits, StringBuilder* result_builder) const; bool ToExponential(double value, int requested_digits, StringBuilder* result_builder) const; bool ToPrecision(double value, int precision, StringBuilder* result_builder) const; enum DtoaMode { SHORTEST, SHORTEST_SINGLE, FIXED, PRECISION }; static void DoubleToAscii(double v, DtoaMode mode, int requested_digits, char* buffer, int buffer_length, bool* sign, int* length, int* point); private: bool ToShortestIeeeNumber(double value, StringBuilder* result_builder, DtoaMode mode) const; bool HandleSpecialValues(double value, StringBuilder* result_builder) const; void CreateExponentialRepresentation(const char* decimal_digits, int length, int exponent, StringBuilder* result_builder) const; void CreateDecimalRepresentation(const char* decimal_digits, int length, int decimal_point, int digits_after_point, StringBuilder* result_builder) const; const int flags_; const char* const infinity_symbol_; const char* const nan_symbol_; const char exponent_character_; const int decimal_in_shortest_low_; const int decimal_in_shortest_high_; const int max_leading_padding_zeroes_in_precision_mode_; const int max_trailing_padding_zeroes_in_precision_mode_; const int min_exponent_width_; DoubleToStringConverter(); DoubleToStringConverter(const DoubleToStringConverter&); void operator=(const DoubleToStringConverter&); }; } namespace folly { inline constexpr size_t demangle_max_symbol_size = 1024; extern bool const demangle_build_has_cxxabi; extern bool const demangle_build_has_liberty; fbstring demangle(const char* name); fbstring demangle(const std::type_info& type) ; size_t demangle(const char* name, char* out, size_t outSize); size_t demangle(const std::type_info& type, char* buf, size_t bufSize) ; } namespace folly { namespace expected_detail { namespace expected_detail_ExpectedHelper { struct ExpectedHelper; } using expected_detail_ExpectedHelper::ExpectedHelper; } template <class Error> class Unexpected final { template <class E> friend class Unexpected; template <class V, class E> friend class Expected; friend struct expected_detail::ExpectedHelper; public: Unexpected() = default; Unexpected(const Unexpected&) = default; Unexpected(Unexpected&&) = default; Unexpected& operator=(const Unexpected&) = default; Unexpected& operator=(Unexpected&&) = default; __attribute__((__cold__)) constexpr Unexpected(const Error& err) ; __attribute__((__cold__)) constexpr Unexpected(Error&& err) ; template <class Other , bool FollyRequires90 = false, typename std::enable_if< (FollyRequires90 || static_cast<bool>(std::is_constructible<Error, Other&&>::value)), int>::type = 0> constexpr Unexpected(Unexpected<Other> that) ; template <class Other , bool FollyRequires98 = false, typename std::enable_if< (FollyRequires98 || static_cast<bool>(std::is_assignable<Error&, Other&&>::value)), int>::type = 0> Unexpected& operator=(Unexpected<Other> that) ; Error& error() & ; const Error& error() const& ; Error&& error() && ; const Error&& error() const&& ; private: Error error_; }; template < class Error , bool FollyRequires116 = false, typename std::enable_if< (FollyRequires116 || static_cast<bool>(IsEqualityComparable<Error>::value)), int>::type = 0> bool operator==( const Unexpected<Error>& lhs, const Unexpected<Error>& rhs) ; template < class Error , bool FollyRequires123 = false, typename std::enable_if< (FollyRequires123 || static_cast<bool>(IsEqualityComparable<Error>::value)), int>::type = 0> bool operator!=( const Unexpected<Error>& lhs, const Unexpected<Error>& rhs) ; template <class Error> [[nodiscard]] constexpr Unexpected<typename std::decay<Error>::type> makeUnexpected(Error&& err) ; template <class Error> class __attribute__((__visibility__("default"))) BadExpectedAccess; template <> class __attribute__((__visibility__("default"))) BadExpectedAccess<void> : public std::exception { public: explicit BadExpectedAccess() noexcept = default; BadExpectedAccess(BadExpectedAccess const&) ; BadExpectedAccess& operator=(BadExpectedAccess const&) ; char const* what() const noexcept override ; }; template <class Error> class __attribute__((__visibility__("default"))) BadExpectedAccess : public BadExpectedAccess<void> { public: explicit BadExpectedAccess(Error error) ; Error& error() & ; Error const& error() const& ; Error&& error() && ; Error const&& error() const&& ; private: Error error_; }; template <class Value, class Error> class Expected; template <class Error, class Value> [[nodiscard]] constexpr Expected<typename std::decay<Value>::type, Error> makeExpected(Value&&); template <class Expected> using ExpectedValueType = typename std::remove_reference<Expected>::type::value_type; template <class Expected> using ExpectedErrorType = typename std::remove_reference<Expected>::type::error_type; namespace expected_detail { template <typename Value, typename Error> struct Promise; template <typename Value, typename Error> struct PromiseReturn; template <template <class...> class Trait, class... Ts> using StrictAllOf = StrictConjunction<Trait<Ts>...>; template <class T> using IsCopyable = StrictConjunction< std::is_copy_constructible<T>, std::is_copy_assignable<T>>; template <class T> using IsMovable = StrictConjunction< std::is_move_constructible<T>, std::is_move_assignable<T>>; template <class T> using IsNothrowCopyable = StrictConjunction< std::is_nothrow_copy_constructible<T>, std::is_nothrow_copy_assignable<T>>; template <class T> using IsNothrowMovable = StrictConjunction< std::is_nothrow_move_constructible<T>, std::is_nothrow_move_assignable<T>>; template <class From, class To> using IsConvertible = StrictConjunction< std::is_constructible<To, From>, std::is_assignable<To&, From>>; template <class T, class U> auto doEmplaceAssign(int, T& t, U&& u) -> decltype(void(t = static_cast<U&&>(u))) ; template <class T, class U> auto doEmplaceAssign(long, T& t, U&& u) -> decltype(void(T(static_cast<U&&>(u)))) ; template <class T, class... Us> auto doEmplaceAssign(int, T& t, Us&&... us) -> decltype(void(t = T(static_cast<Us&&>(us)...))) ; template <class T, class... Us> auto doEmplaceAssign(long, T& t, Us&&... us) -> decltype(void(T(static_cast<Us&&>(us)...))) ; struct EmptyTag {}; struct ValueTag {}; struct ErrorTag {}; enum class Which : unsigned char { eEmpty, eValue, eError }; enum class StorageType { ePODStruct, ePODUnion, eUnion }; template <class Value, class Error> constexpr StorageType getStorageType() { return StrictAllOf<std::is_trivially_copyable, Value, Error>::value ? (sizeof(std::pair<Value, Error>) <= sizeof(void* [2]) && StrictAllOf<std::is_trivial, Value, Error>::value ? StorageType::ePODStruct : StorageType::ePODUnion) : StorageType::eUnion; } template < class Value, class Error, StorageType = expected_detail::getStorageType<Value, Error>()> struct ExpectedStorage { using value_type = Value; using error_type = Error; union { Value value_; Error error_; char ch_; }; Which which_; template <class E = Error, class = decltype(E{})> constexpr ExpectedStorage() noexcept(noexcept(E{})) : error_{}, which_(Which::eError) {} explicit constexpr ExpectedStorage(EmptyTag) noexcept : ch_{unsafe_default_initialized}, which_(Which::eEmpty) {} template <class... Vs> explicit constexpr ExpectedStorage(ValueTag, Vs&&... vs) noexcept( noexcept(Value(static_cast<Vs&&>(vs)...))) : value_(static_cast<Vs&&>(vs)...), which_(Which::eValue) {} template <class... Es> explicit constexpr ExpectedStorage(ErrorTag, Es&&... es) noexcept( noexcept(Error(static_cast<Es&&>(es)...))) : error_(static_cast<Es&&>(es)...), which_(Which::eError) {} void clear() noexcept {} static constexpr bool uninitializedByException() noexcept ; template <class... Vs> void assignValue(Vs&&... vs) ; template <class... Es> void assignError(Es&&... es) ; template <class Other> void assign(Other&& that) ; Value& value() & ; const Value& value() const& ; Value&& value() && ; const Value&& value() const&& ; Error& error() & ; const Error& error() const& ; Error&& error() && ; const Error&& error() const&& ; }; template <class Value, class Error> struct ExpectedUnion { union { Value value_; Error error_; char ch_ = unsafe_default_initialized; }; Which which_ = Which::eEmpty; explicit constexpr ExpectedUnion(EmptyTag) noexcept ; template <class... Vs> explicit constexpr ExpectedUnion(ValueTag, Vs&&... vs) noexcept( noexcept(Value(static_cast<Vs&&>(vs)...))) ; template <class... Es> explicit constexpr ExpectedUnion(ErrorTag, Es&&... es) noexcept( noexcept(Error(static_cast<Es&&>(es)...))) ; ExpectedUnion(const ExpectedUnion&) ; ExpectedUnion(ExpectedUnion&&) noexcept ; ExpectedUnion& operator=(const ExpectedUnion&) ; ExpectedUnion& operator=(ExpectedUnion&&) noexcept ; ~ExpectedUnion() ; Value& value() & ; const Value& value() const& ; Value&& value() && ; const Value&& value() const&& ; Error& error() & ; const Error& error() const& ; Error&& error() && ; const Error&& error() const&& ; }; template <class Derived, bool, bool Noexcept> struct CopyConstructible { constexpr CopyConstructible() = default; CopyConstructible(const CopyConstructible& that) noexcept(Noexcept) ; constexpr CopyConstructible(CopyConstructible&&) = default; CopyConstructible& operator=(const CopyConstructible&) = default; CopyConstructible& operator=(CopyConstructible&&) = default; }; template <class Derived, bool Noexcept> struct CopyConstructible<Derived, false, Noexcept> { constexpr CopyConstructible() = default; CopyConstructible(const CopyConstructible&) = delete; constexpr CopyConstructible(CopyConstructible&&) = default; CopyConstructible& operator=(const CopyConstructible&) = default; CopyConstructible& operator=(CopyConstructible&&) = default; }; template <class Derived, bool, bool Noexcept> struct MoveConstructible { constexpr MoveConstructible() = default; constexpr MoveConstructible(const MoveConstructible&) = default; MoveConstructible(MoveConstructible&& that) noexcept(Noexcept) ; MoveConstructible& operator=(const MoveConstructible&) = default; MoveConstructible& operator=(MoveConstructible&&) = default; }; template <class Derived, bool Noexcept> struct MoveConstructible<Derived, false, Noexcept> { constexpr MoveConstructible() = default; constexpr MoveConstructible(const MoveConstructible&) = default; MoveConstructible(MoveConstructible&&) = delete; MoveConstructible& operator=(const MoveConstructible&) = default; MoveConstructible& operator=(MoveConstructible&&) = default; }; template <class Derived, bool, bool Noexcept> struct CopyAssignable { constexpr CopyAssignable() = default; constexpr CopyAssignable(const CopyAssignable&) = default; constexpr CopyAssignable(CopyAssignable&&) = default; CopyAssignable& operator=(const CopyAssignable& that) noexcept(Noexcept) ; CopyAssignable& operator=(CopyAssignable&&) = default; }; template <class Derived, bool Noexcept> struct CopyAssignable<Derived, false, Noexcept> { constexpr CopyAssignable() = default; constexpr CopyAssignable(const CopyAssignable&) = default; constexpr CopyAssignable(CopyAssignable&&) = default; CopyAssignable& operator=(const CopyAssignable&) = delete; CopyAssignable& operator=(CopyAssignable&&) = default; }; template <class Derived, bool, bool Noexcept> struct MoveAssignable { constexpr MoveAssignable() = default; constexpr MoveAssignable(const MoveAssignable&) = default; constexpr MoveAssignable(MoveAssignable&&) = default; MoveAssignable& operator=(const MoveAssignable&) = default; MoveAssignable& operator=(MoveAssignable&& that) noexcept(Noexcept) ; }; template <class Derived, bool Noexcept> struct MoveAssignable<Derived, false, Noexcept> { constexpr MoveAssignable() = default; constexpr MoveAssignable(const MoveAssignable&) = default; constexpr MoveAssignable(MoveAssignable&&) = default; MoveAssignable& operator=(const MoveAssignable&) = default; MoveAssignable& operator=(MoveAssignable&& that) = delete; }; template <class Value, class Error> struct ExpectedStorage<Value, Error, StorageType::eUnion> : ExpectedUnion<Value, Error>, CopyConstructible< ExpectedStorage<Value, Error, StorageType::eUnion>, StrictAllOf<std::is_copy_constructible, Value, Error>::value, StrictAllOf<std::is_nothrow_copy_constructible, Value, Error>::value>, MoveConstructible< ExpectedStorage<Value, Error, StorageType::eUnion>, StrictAllOf<std::is_move_constructible, Value, Error>::value, StrictAllOf<std::is_nothrow_move_constructible, Value, Error>::value>, CopyAssignable< ExpectedStorage<Value, Error, StorageType::eUnion>, StrictAllOf<IsCopyable, Value, Error>::value, StrictAllOf<IsNothrowCopyable, Value, Error>::value>, MoveAssignable< ExpectedStorage<Value, Error, StorageType::eUnion>, StrictAllOf<IsMovable, Value, Error>::value, StrictAllOf<IsNothrowMovable, Value, Error>::value> { using value_type = Value; using error_type = Error; using Base = ExpectedUnion<Value, Error>; template <class E = Error, class = decltype(E{})> constexpr ExpectedStorage() noexcept(noexcept(E{})) ; ExpectedStorage(const ExpectedStorage&) = default; ExpectedStorage(ExpectedStorage&&) = default; ExpectedStorage& operator=(const ExpectedStorage&) = default; ExpectedStorage& operator=(ExpectedStorage&&) = default; using ExpectedUnion<Value, Error>::ExpectedUnion; ~ExpectedStorage() ; void clear() noexcept ; bool uninitializedByException() const noexcept ; template <class... Vs> void assignValue(Vs&&... vs) ; template <class... Es> void assignError(Es&&... es) ; bool isSelfAssign(const ExpectedStorage* that) const ; constexpr bool isSelfAssign(const void*) const ; template <class Other> void assign(Other&& that) ; }; template <class Value, class Error> struct ExpectedStorage<Value, Error, StorageType::ePODStruct> { using value_type = Value; using error_type = Error; Which which_; Error error_; Value value_; constexpr ExpectedStorage() ; explicit constexpr ExpectedStorage(EmptyTag) ; template <class... Vs> explicit constexpr ExpectedStorage(ValueTag, Vs&&... vs) noexcept( noexcept(Value(static_cast<Vs&&>(vs)...))) ; template <class... Es> explicit constexpr ExpectedStorage(ErrorTag, Es&&... es) noexcept( noexcept(Error(static_cast<Es&&>(es)...))) ; void clear() noexcept ; constexpr static bool uninitializedByException() noexcept ; template <class... Vs> void assignValue(Vs&&... vs) ; template <class... Es> void assignError(Es&&... es) ; template <class Other> void assign(Other&& that) ; Value& value() & ; const Value& value() const& ; Value&& value() && ; const Value&& value() const&& ; Error& error() & ; const Error& error() const& ; Error&& error() && ; const Error&& error() const&& ; }; namespace expected_detail_ExpectedHelper { template <class T> T&& operator,(T&& t, Unit) noexcept ; struct ExpectedHelper { template <typename V, typename E> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) static void assume_empty(Expected<V, E> const& x) ; template <class Error, class T> static constexpr Expected<typename std::decay<T>::type, Error> return_( T&& t) ; template < class Error, class T, class U , bool FollyRequires650 = false, typename std::enable_if< (FollyRequires650 || static_cast<bool>(expected_detail::IsConvertible<U&&, Error>::value)), int>::type = 0> static constexpr Expected<T, Error> return_(Expected<T, U>&& t) ; template <class This> static typename std::decay<This>::type then_(This&& ex) ; #pragma GCC diagnostic push template < class This, class Fn, class... Fns, class E = ExpectedErrorType<This>, class T = ExpectedHelper> static auto then_(This&& ex, Fn&& fn, Fns&&... fns) -> decltype(T::then_( T::template return_<E>( (std::declval<Fn>()(std::declval<This>().value()), unit)), std::declval<Fns>()...)) ; template < class This, class Yes, class No, class Ret = decltype(std::declval<Yes>()(std::declval<This>().value())), class Err = decltype(std::declval<No>()(std::declval<This>().error())) , bool FollyRequires691 = false, typename std::enable_if< (FollyRequires691 || static_cast<bool>(!std::is_void<Err>::value)), int>::type = 0> static Ret thenOrThrow_(This&& ex, Yes&& yes, No&& no) ; template < class This, class Yes, class No, class Ret = decltype(std::declval<Yes>()(std::declval<This>().value())), class Err = decltype(std::declval<No>()(std::declval<This&>().error())) , bool FollyRequires705 = false, typename std::enable_if< (FollyRequires705 || static_cast<bool>(std::is_void<Err>::value)), int>::type = 0> static Ret thenOrThrow_(This&& ex, Yes&& yes, No&& no) ; template < class This, class No, class... AndFns, class E = ExpectedErrorType<This>, class V = ExpectedValueType<This>, class T = ExpectedHelper, class RetValue = decltype(T::then_( T::template return_<E>((std::declval<No>()( std::declval<This>().error()))), std::declval<AndFns>()...) .value()), typename std::enable_if<!std::is_same< std::remove_reference<RetValue>, std::remove_reference<folly::Unit&&>>::value>::type* = nullptr, class Err = decltype(std::declval<No>()(std::declval<This&>().error())) , bool FollyRequires736 = false, typename std::enable_if< (FollyRequires736 || static_cast<bool>(!std::is_void<Err>::value)), int>::type = 0> static auto orElse_(This&& ex, No&& no, AndFns&&... fns) -> Expected<V, E> ; template < class This, class No, class... AndFns, class E = ExpectedErrorType<This>, class T = ExpectedHelper, class RetValue = decltype(T::then_( T::template return_<E>((std::declval<No>()( std::declval<This>().error()))), std::declval<AndFns>()...) .value()), typename std::enable_if<std::is_same< std::remove_reference<RetValue>, std::remove_reference<folly::Unit&&>>::value>::type* = nullptr, class Err = decltype(std::declval<No>()(std::declval<This&>().error())) , bool FollyRequires772 = false, typename std::enable_if< (FollyRequires772 || static_cast<bool>(!std::is_void<Err>::value)), int>::type = 0> static auto orElse_(This&& ex, No&& no, AndFns&&... fns) -> Expected<folly::Unit, E> ; template < class This, class No, class... AndFns, class E = ExpectedErrorType<This>, class V = ExpectedValueType<This>, class T = ExpectedHelper, class Err = decltype(std::declval<No>()(std::declval<This&>().error())) , bool FollyRequires801 = false, typename std::enable_if< (FollyRequires801 || static_cast<bool>(std::is_void<Err>::value)), int>::type = 0> static auto orElse_(This&& ex, No&& no, AndFns&&...) -> Expected<V, E> ; #pragma GCC diagnostic pop }; } struct UnexpectedTag {}; } using unexpected_t = expected_detail::UnexpectedTag (&)(expected_detail::UnexpectedTag); expected_detail::UnexpectedTag unexpected( expected_detail::UnexpectedTag = {}) ; namespace expected_detail { } template <class Value, class Error> class Expected final : expected_detail::ExpectedStorage<Value, Error> { template <class, class> friend class Expected; template <class, class, expected_detail::StorageType> friend struct expected_detail::ExpectedStorage; friend struct expected_detail::ExpectedHelper; using Base = expected_detail::ExpectedStorage<Value, Error>; Base& base() & ; const Base& base() const& ; Base&& base() && ; struct MakeBadExpectedAccess { template <class E> auto operator()(E&& e) ; }; public: using value_type = Value; using error_type = Error; template <class U> using rebind = Expected<U, Error>; using promise_type = expected_detail::Promise<Value, Error>; static_assert( !std::is_reference<Value>::value, "Expected may not be used with reference types"); static_assert( !std::is_abstract<Value>::value, "Expected may not be used with abstract types"); template <class B = Base, class = decltype(B{})> Expected() noexcept(noexcept(B{})) ; Expected(const Expected& that) = default; Expected(Expected&& that) = default; template < class V, class E , bool FollyRequires972 = false, typename std::enable_if< (FollyRequires972 || static_cast<bool>(!std::is_same<Expected<V, E>, Expected>::value && std::is_constructible<Value, V&&>::value && std::is_constructible<Error, E&&>::value)), int>::type = 0> Expected(Expected<V, E> that) ; template < class V, class E , bool FollyRequires990 = false, typename std::enable_if< (FollyRequires990 || static_cast<bool>(!std::is_same<Expected<V, E>, Expected>::value && !std::is_constructible<Value, V&&>::value && std::is_constructible<Expected<Value, Error>, V&&>::value && std::is_constructible<Error, E&&>::value)), int>::type = 0> Expected(Expected<V, E> that) ; template <bool FollyRequires998 = false, typename std::enable_if< (FollyRequires998 || static_cast<bool>(std::is_copy_constructible<Value>::value)), int>::type = 0> constexpr Expected(const Value& val) noexcept( noexcept(Value(val))) ; template <bool FollyRequires1003 = false, typename std::enable_if< (FollyRequires1003 || static_cast<bool>(std::is_move_constructible<Value>::value)), int>::type = 0> constexpr Expected(Value&& val) noexcept( noexcept(Value(std::move(val)))) ; template <class T , bool FollyRequires1010 = false, typename std::enable_if< (FollyRequires1010 || static_cast<bool>(std::is_convertible<T, Value>::value && !std::is_convertible<T, Error>::value)), int>::type = 0> constexpr Expected(T&& val) noexcept( noexcept(Value(static_cast<T&&>(val)))) ; template <class... Ts , bool FollyRequires1016 = false, typename std::enable_if< (FollyRequires1016 || static_cast<bool>(std::is_constructible<Value, Ts&&...>::value)), int>::type = 0> explicit constexpr Expected(std::in_place_t, Ts&&... ts) noexcept( noexcept(Value(std::declval<Ts>()...))) ; template < class U, class... Ts , bool FollyRequires1025 = false, typename std::enable_if< (FollyRequires1025 || static_cast<bool>(std::is_constructible<Value, std::initializer_list<U>&, Ts&&...>:: value)), int>::type = 0> explicit constexpr Expected( std::in_place_t, std::initializer_list<U> il, Ts&&... ts) noexcept(noexcept(Value(std::declval<Ts>()...))) ; Expected(const Error&) = delete; Expected(Error&&) = delete; template <bool FollyRequires1037 = false, typename std::enable_if< (FollyRequires1037 || static_cast<bool>(std::is_copy_constructible<Error>::value)), int>::type = 0> constexpr Expected(unexpected_t, const Error& err) noexcept( noexcept(Error(err))) ; template <bool FollyRequires1042 = false, typename std::enable_if< (FollyRequires1042 || static_cast<bool>(std::is_move_constructible<Error>::value)), int>::type = 0> constexpr Expected(unexpected_t, Error&& err) noexcept( noexcept(Error(std::move(err)))) ; template <bool FollyRequires1047 = false, typename std::enable_if< (FollyRequires1047 || static_cast<bool>(std::is_copy_constructible<Error>::value)), int>::type = 0> constexpr Expected(const Unexpected<Error>& err) noexcept( noexcept(Error(err.error()))) ; template <bool FollyRequires1052 = false, typename std::enable_if< (FollyRequires1052 || static_cast<bool>(std::is_move_constructible<Error>::value)), int>::type = 0> constexpr Expected(Unexpected<Error>&& err) noexcept( noexcept(Error(std::move(err.error())))) ; template <class OtherError , bool FollyRequires1058 = false, typename std::enable_if< (FollyRequires1058 || static_cast<bool>(std::is_convertible<const OtherError&, Error>::value)), int>::type = 0> constexpr Expected(const Unexpected<OtherError>& err) noexcept( noexcept(Error(err.error()))) ; template <class OtherError , bool FollyRequires1064 = false, typename std::enable_if< (FollyRequires1064 || static_cast<bool>(std::is_convertible<OtherError&&, Error>::value)), int>::type = 0> constexpr Expected(Unexpected<OtherError>&& err) noexcept( noexcept(Error(std::move(err.error())))) ; Expected& operator=(const Expected& that) = default; Expected& operator=(Expected&& that) = default; template < class V, class E , bool FollyRequires1080 = false, typename std::enable_if< (FollyRequires1080 || static_cast<bool>(!std::is_same<Expected<V, E>, Expected>::value && expected_detail::IsConvertible<V&&, Value>::value && expected_detail::IsConvertible<E&&, Error>::value)), int>::type = 0> Expected& operator=(Expected<V, E> that) ; template <bool FollyRequires1086 = false, typename std::enable_if< (FollyRequires1086 || static_cast<bool>(expected_detail::IsCopyable<Value>::value)), int>::type = 0> Expected& operator=(const Value& val) noexcept( expected_detail::IsNothrowCopyable<Value>::value) ; template <bool FollyRequires1093 = false, typename std::enable_if< (FollyRequires1093 || static_cast<bool>(expected_detail::IsMovable<Value>::value)), int>::type = 0> Expected& operator=(Value&& val) noexcept( expected_detail::IsNothrowMovable<Value>::value) ; template <class T , bool FollyRequires1102 = false, typename std::enable_if< (FollyRequires1102 || static_cast<bool>(std::is_convertible<T, Value>::value && !std::is_convertible<T, Error>::value)), int>::type = 0> Expected& operator=(T&& val) ; template <bool FollyRequires1108 = false, typename std::enable_if< (FollyRequires1108 || static_cast<bool>(expected_detail::IsCopyable<Error>::value)), int>::type = 0> Expected& operator=(const Unexpected<Error>& err) noexcept( expected_detail::IsNothrowCopyable<Error>::value) ; ; ; ; ; constexpr bool hasValue() const noexcept ; using Base::uninitializedByException; Value& value() & ; Value&& value() && ; Error& error() & ; ; template <class U> Value value_or(U&& dflt) && ; explicit constexpr operator bool() const noexcept ; Value& operator*() & ; ; ; template <class... Fns , bool FollyRequires1289 = false, typename std::enable_if< (FollyRequires1289 || static_cast<bool>(sizeof...(Fns) >= 1)), int>::type = 0> auto then(Fns&&... fns) && -> decltype(expected_detail::ExpectedHelper::then_( std::declval<Base&&>(), std::declval<Fns>()...)) ; ; ; ; ; ; ; private: friend struct expected_detail::PromiseReturn<Value, Error>; using EmptyTag = expected_detail::EmptyTag; ; }; ; ; ; ; ; ; ; ; ; template <class Error, class Value> [[nodiscard]] constexpr Expected<typename std::decay<Value>::type, Error> makeExpected(Value&& val) ; ; ; ; ; ; ; ; ; ; ; ; ; } namespace folly { template <bool Upper> struct to_ascii_alphabet { }; using to_ascii_alphabet_lower = to_ascii_alphabet<false>; using to_ascii_alphabet_upper = to_ascii_alphabet<true>; namespace detail { template <uint64_t Base, typename Alphabet> struct to_ascii_array { using data_type_ = c_array<uint8_t, Base>; static constexpr data_type_ data_() ; static data_type_ const data; constexpr char operator()(uint8_t index) const ; }; template <uint64_t Base, typename Alphabet> alignas(kIsMobile ? sizeof(size_t) : hardware_constructive_interference_size) typename to_ascii_array<Base, Alphabet>::data_type_ const to_ascii_array<Base, Alphabet>::data = to_ascii_array<Base, Alphabet>::data_(); extern template to_ascii_array<8, to_ascii_alphabet_lower>::data_type_ const to_ascii_array<8, to_ascii_alphabet_lower>::data; extern template to_ascii_array<10, to_ascii_alphabet_lower>::data_type_ const to_ascii_array<10, to_ascii_alphabet_lower>::data; extern template to_ascii_array<16, to_ascii_alphabet_lower>::data_type_ const to_ascii_array<16, to_ascii_alphabet_lower>::data; extern template to_ascii_array<8, to_ascii_alphabet_upper>::data_type_ const to_ascii_array<8, to_ascii_alphabet_upper>::data; extern template to_ascii_array<10, to_ascii_alphabet_upper>::data_type_ const to_ascii_array<10, to_ascii_alphabet_upper>::data; extern template to_ascii_array<16, to_ascii_alphabet_upper>::data_type_ const to_ascii_array<16, to_ascii_alphabet_upper>::data; template <uint64_t Base, typename Alphabet> struct to_ascii_table { using data_type_ = c_array<uint16_t, Base * Base>; static constexpr data_type_ data_() ; static data_type_ const data; }; template <uint64_t Base, typename Alphabet> alignas(hardware_constructive_interference_size) typename to_ascii_table<Base, Alphabet>::data_type_ const to_ascii_table<Base, Alphabet>::data = to_ascii_table<Base, Alphabet>::data_(); extern template to_ascii_table<8, to_ascii_alphabet_lower>::data_type_ const to_ascii_table<8, to_ascii_alphabet_lower>::data; extern template to_ascii_table<10, to_ascii_alphabet_lower>::data_type_ const to_ascii_table<10, to_ascii_alphabet_lower>::data; extern template to_ascii_table<16, to_ascii_alphabet_lower>::data_type_ const to_ascii_table<16, to_ascii_alphabet_lower>::data; extern template to_ascii_table<8, to_ascii_alphabet_upper>::data_type_ const to_ascii_table<8, to_ascii_alphabet_upper>::data; extern template to_ascii_table<10, to_ascii_alphabet_upper>::data_type_ const to_ascii_table<10, to_ascii_alphabet_upper>::data; extern template to_ascii_table<16, to_ascii_alphabet_upper>::data_type_ const to_ascii_table<16, to_ascii_alphabet_upper>::data; template <uint64_t Base, typename Int> struct to_ascii_powers { static constexpr size_t size_(Int v) { return 1 + (v < Base ? 0 : size_(v / Base)); } static constexpr size_t const size = size_(~Int(0)); using data_type_ = c_array<Int, size>; static constexpr data_type_ data_() { data_type_ result{}; for (size_t i = 0; i < size; ++i) { result.data[i] = constexpr_pow(Base, i); } return result; } static data_type_ const data; }; template <uint64_t Base, typename Int> alignas(hardware_constructive_interference_size) typename to_ascii_powers<Base, Int>::data_type_ const to_ascii_powers<Base, Int>::data = to_ascii_powers<Base, Int>::data_(); extern template to_ascii_powers<8, uint64_t>::data_type_ const to_ascii_powers<8, uint64_t>::data; extern template to_ascii_powers<10, uint64_t>::data_type_ const to_ascii_powers<10, uint64_t>::data; extern template to_ascii_powers<16, uint64_t>::data_type_ const to_ascii_powers<16, uint64_t>::data; template <uint64_t Base> __attribute__((__always_inline__)) size_t to_ascii_size_array(uint64_t v) ; template <uint64_t Base> __attribute__((__always_inline__)) size_t to_ascii_size_clzll(uint64_t v) ; template <uint64_t Base> __attribute__((__always_inline__)) size_t to_ascii_size_route(uint64_t v) ; template <uint64_t Base, typename Alphabet> __attribute__((__always_inline__)) void to_ascii_with_basic( char* out, size_t size, uint64_t v) ; template <uint64_t Base, typename Alphabet> inline __attribute__((__always_inline__)) void to_ascii_with_array( char* out, size_t size, uint64_t v) { using array = to_ascii_array<Base, Alphabet>; to_ascii_with_basic<Base, array>(out, size, v); } template <uint64_t Base, typename Alphabet> inline __attribute__((__always_inline__)) void to_ascii_with_table( char* out, size_t size, uint64_t v) { using table = to_ascii_table<Base, Alphabet>; auto pos = size; while (__builtin_expect(static_cast<bool>((pos > 2)), 0)) { pos -= 2; auto const q = v / (Base * Base); auto const r = v % (Base * Base); auto const val = table::data.data[size_t(r)]; std::memcpy(out + pos, &val, 2); v = q; } auto const val = table::data.data[size_t(v)]; if (__builtin_expect(static_cast<bool>((pos == 2)), 0)) { std::memcpy(out, &val, 2); } else { *out = val >> (kIsLittleEndian ? 8 : 0); } } template <uint64_t Base, typename Alphabet> __attribute__((__always_inline__)) void to_ascii_with_route( char* outb, size_t size, uint64_t v) ; template <uint64_t Base, typename Alphabet> __attribute__((__always_inline__)) size_t to_ascii_with_route(char* outb, char const* oute, uint64_t v) ; } template <uint64_t Base, typename Int> inline constexpr size_t to_ascii_size_max = detail::to_ascii_powers<Base, Int>::size; template <typename Int> inline constexpr size_t to_ascii_size_max_decimal = to_ascii_size_max<10, Int>; template <uint64_t Base> size_t to_ascii_size(uint64_t v) ; size_t to_ascii_size_decimal(uint64_t v) ; template <uint64_t Base, typename Alphabet> size_t to_ascii_with(char* outb, char const* oute, uint64_t v) ; template <uint64_t Base> size_t to_ascii_lower(char* outb, char const* oute, uint64_t v) ; size_t to_ascii_decimal(char* outb, char const* oute, uint64_t v) ; } namespace folly { using std::nextafter; } namespace folly { enum class ConversionCode : unsigned char { SUCCESS, EMPTY_INPUT_STRING, NO_DIGITS, BOOL_OVERFLOW, BOOL_INVALID_VALUE, NON_DIGIT_CHAR, INVALID_LEADING_CHAR, POSITIVE_OVERFLOW, NEGATIVE_OVERFLOW, STRING_TO_FLOAT_ERROR, NON_WHITESPACE_AFTER_END, ARITH_POSITIVE_OVERFLOW, ARITH_NEGATIVE_OVERFLOW, ARITH_LOSS_OF_PRECISION, NUM_ERROR_CODES, }; struct __attribute__((__visibility__("default"))) ConversionErrorBase : std::range_error { using std::range_error::range_error; }; class __attribute__((__visibility__("default"))) ConversionError : public ConversionErrorBase { public: private: ConversionCode code_; }; ConversionError makeConversionError(ConversionCode code, StringPiece input); namespace detail { ConversionCode enforceWhitespaceErr(StringPiece sp) ; } template <class Tgt, class Src> typename std::enable_if< std::is_same<Tgt, typename std::decay<Src>::type>::value, Expected<Tgt, ConversionCode>>::type tryTo(Src&& value) ; template <class Tgt, class Src> typename std::enable_if< std::is_same<Tgt, typename std::decay<Src>::type>::value, Tgt>::type to(Src&& value) ; namespace detail { template <class... T> using LastElement = type_pack_element_t<sizeof...(T) - 1, T...>; template <typename...> struct LastElementImpl; template <> struct LastElementImpl<> { }; template <typename Ign, typename... Igns> struct LastElementImpl<Ign, Igns...> { }; template <typename... Ts, typename R = LastElement<Ts...>> const R& getLastElement(const Ts&... ts) ; } template <class Tgt> void toAppend(char value, Tgt* result) ; template <class T> constexpr typename std::enable_if<std::is_same<T, char>::value, size_t>::type estimateSpaceNeeded(T) ; namespace detail { constexpr int kConvMaxDecimalInShortestLow = -6; constexpr int kConvMaxDecimalInShortestHigh = 21; } namespace detail { template <typename> struct EstimateSpaceToReserveAll; template <size_t... I> struct EstimateSpaceToReserveAll<std::index_sequence<I...>> { template <size_t J, size_t N = sizeof...(I)> using tag = std::bool_constant<J + 1 < N>; }; template <class O> void reserveInTarget(const O& o) ; template <class Delimiter, class... Ts> void reserveInTargetDelim(const Delimiter& d, const Ts&... vs) ; template <typename> struct ToAppendStrImplAll; template <size_t... I> struct ToAppendStrImplAll<std::index_sequence<I...>> { }; template <typename> struct ToAppendDelimStrImplAll; template <size_t... I> struct ToAppendDelimStrImplAll<std::index_sequence<I...>> { template <size_t J, size_t N = sizeof...(I), size_t K = N - J - 1> using tag = index_constant<(K < 2 ? K : 2)>; }; template < class Delimiter, class T, class... Ts, std::enable_if_t< sizeof...(Ts) >= 2 && IsSomeString<typename std::remove_pointer< detail::LastElement<Ts...>>::type>::value, int> = 0> void toAppendDelimStrImpl(const Delimiter& delim, const T& v, const Ts&... vs) ; } template < class... Ts, std::enable_if_t< IsSomeString<typename std::remove_pointer< detail::LastElement<Ts...>>::type>::value, int> = 0> void toAppendFit(const Ts&... vs) ; template <class Delimiter, class Tgt> typename std::enable_if<IsSomeString<Tgt>::value>::type toAppendDelim( const Delimiter& , Tgt* ) ; template < class Delimiter, class... Ts, std::enable_if_t< IsSomeString<typename std::remove_pointer< detail::LastElement<Ts...>>::type>::value, int> = 0> void toAppendDelimFit(const Delimiter& delim, const Ts&... vs) ; namespace detail { Expected<bool, ConversionCode> str_to_bool(StringPiece* src) noexcept; template <typename T> Expected<T, ConversionCode> str_to_floating(StringPiece* src) noexcept; extern template Expected<float, ConversionCode> str_to_floating<float>( StringPiece* src) noexcept; extern template Expected<double, ConversionCode> str_to_floating<double>( StringPiece* src) noexcept; template <class Tgt> Expected<Tgt, ConversionCode> digits_to(const char* b, const char* e) noexcept; extern template Expected<char, ConversionCode> digits_to<char>( const char*, const char*) noexcept; extern template Expected<signed char, ConversionCode> digits_to<signed char>( const char*, const char*) noexcept; extern template Expected<unsigned char, ConversionCode> digits_to<unsigned char>(const char*, const char*) noexcept; extern template Expected<short, ConversionCode> digits_to<short>( const char*, const char*) noexcept; extern template Expected<unsigned short, ConversionCode> digits_to<unsigned short>(const char*, const char*) noexcept; extern template Expected<int, ConversionCode> digits_to<int>( const char*, const char*) noexcept; extern template Expected<unsigned int, ConversionCode> digits_to<unsigned int>( const char*, const char*) noexcept; extern template Expected<long, ConversionCode> digits_to<long>( const char*, const char*) noexcept; extern template Expected<unsigned long, ConversionCode> digits_to<unsigned long>(const char*, const char*) noexcept; extern template Expected<long long, ConversionCode> digits_to<long long>( const char*, const char*) noexcept; extern template Expected<unsigned long long, ConversionCode> digits_to<unsigned long long>(const char*, const char*) noexcept; template <class T> Expected<T, ConversionCode> str_to_integral(StringPiece* src) noexcept; extern template Expected<char, ConversionCode> str_to_integral<char>( StringPiece* src) noexcept; extern template Expected<signed char, ConversionCode> str_to_integral<signed char>(StringPiece* src) noexcept; extern template Expected<unsigned char, ConversionCode> str_to_integral<unsigned char>(StringPiece* src) noexcept; extern template Expected<short, ConversionCode> str_to_integral<short>( StringPiece* src) noexcept; extern template Expected<unsigned short, ConversionCode> str_to_integral<unsigned short>(StringPiece* src) noexcept; extern template Expected<int, ConversionCode> str_to_integral<int>( StringPiece* src) noexcept; extern template Expected<unsigned int, ConversionCode> str_to_integral<unsigned int>(StringPiece* src) noexcept; extern template Expected<long, ConversionCode> str_to_integral<long>( StringPiece* src) noexcept; extern template Expected<unsigned long, ConversionCode> str_to_integral<unsigned long>(StringPiece* src) noexcept; extern template Expected<long long, ConversionCode> str_to_integral<long long>( StringPiece* src) noexcept; extern template Expected<unsigned long long, ConversionCode> str_to_integral<unsigned long long>(StringPiece* src) noexcept; template <typename T> typename std:: enable_if<std::is_same<T, bool>::value, Expected<T, ConversionCode>>::type convertTo(StringPiece* src) noexcept ; template <typename T> typename std::enable_if< is_integral_v<T> && !std::is_same<T, bool>::value, Expected<T, ConversionCode>>::type convertTo(StringPiece* src) noexcept ; } template <typename Tgt> [[nodiscard]] typename std::enable_if< is_arithmetic_v<Tgt>, Expected<StringPiece, ConversionCode>>::type parseTo(StringPiece src, Tgt& out) ; namespace detail { template <typename Tgt, typename Src> typename std::enable_if< std::is_floating_point<Src>::value && is_integral_v<Tgt> && !std::is_same<Tgt, bool>::value, bool>::type checkConversion(const Src& value) ; template <typename Tgt, typename Src> std::string errorValue(const Src& value) ; template <typename Tgt, typename Src> using IsArithToArith = std::bool_constant< !std::is_same<Tgt, Src>::value && !std::is_same<Tgt, bool>::value && is_arithmetic_v<Src> && is_arithmetic_v<Tgt>>; } template <typename Tgt, typename Src> typename std::enable_if< detail::IsArithToArith<Tgt, Src>::value, Expected<Tgt, ConversionCode>>::type tryTo(const Src& value) noexcept ; template <typename Tgt, typename Src> typename std::enable_if<detail::IsArithToArith<Tgt, Src>::value, Tgt>::type to( const Src& value) ; template <class T> [[nodiscard]] typename std::enable_if< std::is_enum<T>::value, Expected<StringPiece, ConversionCode>>::type parseTo(StringPiece in, T& out) noexcept ; [[nodiscard]] Expected<StringPiece, ConversionCode> parseTo( StringPiece in, StringPiece& out) noexcept ; namespace detail { template <class Str> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) Expected<StringPiece, ConversionCode> parseToStr( StringPiece in, Str& out) ; } [[nodiscard]] Expected<StringPiece, ConversionCode> parseTo( StringPiece in, std::string& out) ; [[nodiscard]] Expected<StringPiece, ConversionCode> parseTo( StringPiece in, std::string_view& out) ; [[nodiscard]] Expected<StringPiece, ConversionCode> parseTo( StringPiece in, fbstring& out) ; template <class Str> [[nodiscard]] typename std::enable_if< IsSomeString<Str>::value, Expected<StringPiece, ConversionCode>>::type parseTo(StringPiece in, Str& out) ; namespace detail { template <typename Tgt> using ParseToResult = decltype(parseTo(StringPiece{}, std::declval<Tgt&>())); struct CheckTrailingSpace { Expected<Unit, ConversionCode> operator()(StringPiece sp) const ; }; template <class Error> struct ReturnUnit { template <class T> constexpr Expected<Unit, Error> operator()(T&&) const ; }; template <class Tgt> typename std::enable_if< std::is_void<ParseToResult<Tgt>>::value, Expected<StringPiece, ConversionCode>>::type parseToWrap(StringPiece sp, Tgt& out) ; template <class Tgt> typename std::enable_if< !std::is_void<ParseToResult<Tgt>>::value, ParseToResult<Tgt>>::type parseToWrap(StringPiece sp, Tgt& out) ; template <typename Tgt> using ParseToError = ExpectedErrorType<decltype(detail::parseToWrap( StringPiece{}, std::declval<Tgt&>()))>; } template <class Tgt> typename std::enable_if< !std::is_same<StringPiece, Tgt>::value, Expected<Tgt, detail::ParseToError<Tgt>>>::type tryTo(StringPiece src) ; template <class Tgt, class Src> typename std::enable_if< IsSomeString<Src>::value && !std::is_same<StringPiece, Tgt>::value, Tgt>::type to(Src const& src) ; template <class Tgt> typename std::enable_if<!std::is_same<StringPiece, Tgt>::value, Tgt>::type to(StringPiece src) ; template <class Tgt> Expected<Tgt, detail::ParseToError<Tgt>> tryTo(StringPiece* src) ; template <class Tgt> Tgt to(StringPiece* src) ; template <class Tgt, class Src> typename std::enable_if< std::is_enum<Src>::value && !std::is_same<Src, Tgt>::value && !std::is_convertible<Tgt, StringPiece>::value, Expected<Tgt, ConversionCode>>::type tryTo(const Src& value) ; template <class Tgt, class Src> typename std::enable_if< !std::is_convertible<Src, StringPiece>::value && std::is_enum<Tgt>::value && !std::is_same<Src, Tgt>::value, Expected<Tgt, ConversionCode>>::type tryTo(const Src& value) ; template <class Tgt, class Src> typename std::enable_if< std::is_enum<Src>::value && !std::is_same<Src, Tgt>::value && !std::is_convertible<Tgt, StringPiece>::value, Tgt>::type to(const Src& value) ; template <class Tgt, class Src> typename std::enable_if< !std::is_convertible<Src, StringPiece>::value && std::is_enum<Tgt>::value && !std::is_same<Src, Tgt>::value, Tgt>::type to(const Src& value) ; } namespace apache { namespace thrift { namespace util { template <typename EnumType, typename = void> inline constexpr bool is_thrift_enum_v = false; template <typename EnumType> inline constexpr bool is_thrift_enum_v< EnumType, folly::void_t<decltype(TEnumTraits<EnumType>::size)>> = true; template <typename EnumType> bool tryParseEnum(std::string_view name, EnumType* out) ; template <typename EnumType> EnumType enumValueOrThrow(std::string_view name) ; template <typename EnumType> const char* enumName(EnumType value, const char* defaultName = nullptr) ; template <typename EnumType> std::optional<std::string_view> tryGetEnumName(EnumType value) ; template <typename EnumType> std::string enumNameSafe(EnumType value) ; template <typename EnumType> const char* enumNameOrThrow(EnumType value) ; } } } namespace apache { namespace thrift { namespace protocol { enum TType : uint8_t { T_STOP = 0, T_VOID = 1, T_BOOL = 2, T_BYTE = 3, T_I08 = 3, T_I16 = 6, T_I32 = 8, T_U64 = 9, T_I64 = 10, T_DOUBLE = 4, T_STRING = 11, T_UTF7 = 11, T_STRUCT = 12, T_MAP = 13, T_SET = 14, T_LIST = 15, T_UTF8 = 16, T_UTF16 = 17, T_STREAM = 18, T_FLOAT = 19, }; } } } namespace apache { namespace thrift { namespace type { enum class BaseType { Void = 0, Bool = 1, Byte = 2, I16 = 3, I32 = 4, I64 = 5, Float = 6, Double = 7, String = 8, Binary = 9, Enum = 10, Struct = 11, Union = 12, Exception = 13, List = 14, Set = 15, Map = 16 }; const char* getBaseTypeName(BaseType type) noexcept; namespace detail { constexpr BaseType getBaseType(void_t) ; constexpr BaseType getBaseType(bool_t) ; constexpr BaseType getBaseType(byte_t) ; constexpr BaseType getBaseType(i16_t) ; constexpr BaseType getBaseType(i32_t) ; constexpr BaseType getBaseType(i64_t) ; constexpr BaseType getBaseType(float_t) ; constexpr BaseType getBaseType(double_t) ; constexpr BaseType getBaseType(string_t) ; constexpr BaseType getBaseType(binary_t) ; constexpr BaseType getBaseType(enum_c) ; constexpr BaseType getBaseType(struct_c) ; constexpr BaseType getBaseType(union_c) ; constexpr BaseType getBaseType(exception_c) ; constexpr BaseType getBaseType(list_c) ; constexpr BaseType getBaseType(set_c) ; constexpr BaseType getBaseType(map_c) ; } template <typename Tag> constexpr BaseType base_type_v = detail::getBaseType(Tag{}); template <typename Tag, BaseType B, typename R = void> using if_base_type = std::enable_if_t<B == base_type_v<Tag>, R>; constexpr protocol::TType toTType(BaseType type) ; constexpr BaseType toBaseType(protocol::TType type) ; } } } namespace apache { namespace thrift { template <class T> struct InlineAdapter; namespace type { namespace detail { template <typename T, typename Tag> class Wrap; template <typename Tag, typename = void> struct NativeTypes { static_assert(is_abstract_v<Tag>, ""); }; template <typename T, typename = void> struct InferTag; template <template <typename...> class TemplateT, typename... Tags> using standard_template_t = TemplateT<typename NativeTypes<Tags>::standard_type...>; template <template <typename...> class TemplateT, typename... Tags> using native_template_t = TemplateT<typename NativeTypes<Tags>::native_type...>; template <template <typename...> class TemplateT, typename... Tags> struct native_template { using type = native_template_t<TemplateT, Tags...>; }; template <typename StandardType, typename NativeType = StandardType> struct ConcreteType { using standard_type = StandardType; using native_type = NativeType; }; struct AbstractType {}; template <typename Tag> struct StandardTag { using type = Tag; }; template <typename T, typename Tag> struct CppTag { using type = cpp_type<T, Tag>; }; template <template <typename...> class T, typename... ParamTags> using parameterized_type = folly::conditional_t< (is_concrete_v<ParamTags> && ...), ConcreteType< standard_template_t<T, ParamTags...>, native_template_t<T, ParamTags...>>, AbstractType>; template <> struct NativeTypes<void_t> : ConcreteType<void> {}; template <> struct InferTag<void> : StandardTag<void_t> {}; template <> struct InferTag<std::nullptr_t> : StandardTag<void_t> {}; template <typename T, size_t I = sizeof(T)> struct IntegerTag; template <typename T> struct InferTag<T, std::enable_if_t<folly::is_integral_v<T>>> : IntegerTag<T> { }; template <> struct NativeTypes<bool_t> : ConcreteType<bool> {}; template <> struct IntegerTag<bool> : StandardTag<bool_t> {}; template <> struct NativeTypes<byte_t> : ConcreteType<int8_t> {}; template <> struct IntegerTag<int8_t> : StandardTag<byte_t> {}; template <typename T> struct IntegerTag<T, sizeof(int8_t)> : CppTag<T, byte_t> {}; template <> struct NativeTypes<i16_t> : ConcreteType<int16_t> {}; template <> struct IntegerTag<int16_t> : StandardTag<i16_t> {}; template <typename T> struct IntegerTag<T, sizeof(int16_t)> : CppTag<T, i16_t> {}; template <> struct NativeTypes<i32_t> : ConcreteType<int32_t> {}; template <> struct IntegerTag<int32_t> : StandardTag<i32_t> {}; template <typename T> struct IntegerTag<T, sizeof(int32_t)> : CppTag<T, i32_t> {}; template <> struct NativeTypes<i64_t> : ConcreteType<int64_t> {}; template <> struct IntegerTag<int64_t> : StandardTag<i64_t> {}; template <typename T> struct IntegerTag<T, sizeof(int64_t)> : CppTag<T, i64_t> {}; template <> struct NativeTypes<float_t> : ConcreteType<float> {}; template <> struct InferTag<float> : StandardTag<float_t> {}; template <> struct NativeTypes<double_t> : ConcreteType<double> {}; template <> struct InferTag<double> : StandardTag<double_t> {}; template <> struct NativeTypes<string_t> : ConcreteType<std::string> {}; template <> struct NativeTypes<binary_t> : ConcreteType<std::string> {}; template <typename E> struct NativeTypes<enum_t<E>> : ConcreteType<E> {}; template <typename T> struct InferTag<T, std::enable_if_t<util::is_thrift_enum_v<T>>> { using type = type::enum_t<T>; }; template <typename T> struct NativeTypes<struct_t<T>> : ConcreteType<T> {}; template <typename T> struct NativeTypes<union_t<T>> : ConcreteType<T> {}; template <typename T> struct NativeTypes<exception_t<T>> : ConcreteType<T> {}; template <typename VTag> struct NativeTypes<type::list<VTag>> : parameterized_type<std::vector, VTag> {}; template <typename T> struct InferTag<std::vector<T>> { using type = type::list<typename InferTag<T>::type>; }; template <typename KTag> struct NativeTypes<set<KTag>> : parameterized_type<std::set, KTag> {}; template <typename T> struct InferTag<std::set<T>> { using type = type::set<typename InferTag<T>::type>; }; template <typename KTag, typename VTag> struct NativeTypes<map<KTag, VTag>> : parameterized_type<std::map, KTag, VTag> { }; template <typename K, typename V> struct InferTag<std::map<K, V>> { using type = type::map<typename InferTag<K>::type, typename InferTag<V>::type>; }; template <typename Adapter, typename Tag> struct NativeTypes<adapted<Adapter, Tag>> : ConcreteType< typename NativeTypes<Tag>::standard_type, adapt_detail:: adapted_t<Adapter, typename NativeTypes<Tag>::native_type>> {}; template <typename T, typename Tag> struct NativeTypes<cpp_type<T, Tag>> : NativeTypes<Tag> { using native_type = T; }; template <typename Tag, FieldId Id> struct NativeTypes<field_t<Id, Tag>> : NativeTypes<Tag> {}; template <typename Tag, typename Context> struct NativeTypes<field<Tag, Context>> : NativeTypes<Tag> {}; template <typename Adapter, typename Tag, typename Struct, int16_t FieldId> struct NativeTypes<field<adapted<Adapter, Tag>, FieldContext<Struct, FieldId>>> : ConcreteType< typename NativeTypes<Tag>::standard_type, adapt_detail::adapted_field_t< Adapter, FieldId, typename NativeTypes<Tag>::native_type, Struct>> {}; template <typename T> struct InferTag<T, std::enable_if_t<is_thrift_union_v<T>>> { using type = type::union_t<T>; }; template <typename T> struct InferTag<T, std::enable_if_t<is_thrift_exception_v<T>>> { using type = type::exception_t<T>; }; template <typename T> struct InferTag<T, std::enable_if_t<is_thrift_struct_v<T>>> { using type = type::struct_t<T>; }; template <typename Tag> struct InferTag<Tag, if_thrift_type_tag<Tag>> { using type = Tag; }; template <typename T> struct InferTag< T, std::enable_if_t<std::is_base_of< Wrap<typename T::underlying_type, typename T::underlying_tag>, T>::value>> { using type = adapted<InlineAdapter<T>, typename T::underlying_tag>; }; } } } } namespace apache { namespace thrift { namespace type { template <typename Tag> using standard_type = typename detail::NativeTypes<Tag, if_thrift_type_tag<Tag>>::standard_type; template <typename Tag> using native_type = typename detail::NativeTypes<Tag, if_thrift_type_tag<Tag>>::native_type; template <typename T> using infer_tag = typename detail::InferTag<folly::remove_cvref_t<T>>::type; } } } namespace apache { namespace thrift { namespace op { template <typename T> inline constexpr std::size_t size_v = detail::pa::__fbthrift_field_size_v<T>; template <typename T, typename Id> using get_ordinal = typename detail::GetOrdinalImpl<Id, type::infer_tag<T>>::type; template <typename T, typename Id> inline constexpr type::Ordinal get_ordinal_v = get_ordinal<T, Id>::value; template <typename T, typename F> constexpr void for_each_ordinal(F&& f) ; template <typename T, typename F, std::enable_if_t<size_v<T> != 0>* = nullptr> decltype(auto) find_by_ordinal(F&& f) ; template <typename T, typename F> std::enable_if_t<size_v<T> == 0, bool> find_by_ordinal(F&&) ; template <typename T, typename Id> using get_field_id = folly::conditional_t< get_ordinal<T, Id>::value == type::Ordinal{}, type::field_id<0>, detail::pa::field_id<T, get_ordinal<T, Id>>>; template <typename T, typename Id> inline constexpr FieldId get_field_id_v = get_field_id<T, Id>::value; template <typename T, typename F> void for_each_field_id(F&& f) ; template <typename T, typename F> decltype(auto) find_by_field_id(F&& f) ; template <typename T, typename Id> using get_ident = detail::pa::ident<T, get_ordinal<T, Id>>; template <typename T, typename F> void for_each_ident(F&& f) ; template <typename T, typename Id> using get_type_tag = detail::pa::type_tag<T, get_ordinal<T, Id>>; template <typename T, typename Id> using get_field_tag = typename std::conditional_t< get_ordinal<T, Id>::value == type::Ordinal{}, void, type::field< get_type_tag<T, Id>, FieldContext<T, folly::to_underlying(get_field_id_v<T, Id>)>>>; template <typename T, typename Id> using get_native_type = type::native_type<get_field_tag<T, Id>>; template <typename T, typename Id> inline const folly::StringPiece get_name_v = detail::pa::__fbthrift_get_field_name<T, get_ordinal<T, Id>>(); template <typename T> inline const folly::StringPiece get_class_name_v = detail::pa::__fbthrift_get_class_name<T>(); template <typename Id = void, typename T = void> inline constexpr detail::Get<Id, T> get = {}; inline constexpr detail::GetValueOrNull getValueOrNull; template <typename T, typename Id> using get_field_ref = folly::remove_cvref_t<decltype(get<Id>(std::declval<T&>()))>; namespace detail { template <typename Id, typename Tag> struct GetOrdinalImpl { static_assert(type::is_id_v<Id>, ""); using type = detail::pa::ordinal<type::native_type<Tag>, Id>; }; template <type::Ordinal Ord, typename Tag> struct GetOrdinalImpl<std::integral_constant<type::Ordinal, Ord>, Tag> { static_assert( folly::to_underlying(Ord) <= size_v<type::native_type<Tag>>, "Ordinal cannot be larger than the number of definitions"); using type = type::ordinal_tag<Ord>; }; template <typename TypeTag, typename Struct, int16_t Id, typename Tag> struct GetOrdinalImpl<type::field<TypeTag, FieldContext<Struct, Id>>, Tag> : GetOrdinalImpl<field_id<Id>, Tag> {}; template <size_t... I, typename F> constexpr void for_each_ordinal_impl(F&& f, std::index_sequence<I...>) ; template <size_t... I, typename F> ord_result_t<F> find_by_ordinal_impl(F&& f, std::index_sequence<I...>) ; template <typename Id, typename T, typename> struct Get { template <typename U> constexpr decltype(auto) operator()(U&& obj) const ; }; template <typename Id, typename Tag> struct Get<Id, Tag, type::if_concrete<Tag>> { using T = type::native_type<Tag>; constexpr decltype(auto) operator()(T& obj) const ; constexpr decltype(auto) operator()(T&& obj) const ; constexpr decltype(auto) operator()(const T& obj) const ; constexpr decltype(auto) operator()(const T&& obj) const ; }; template <typename Id> struct Get<Id, void> { template <typename U> constexpr decltype(auto) operator()(U&& obj) const ; }; template <> struct Get<void, void> { template <typename Id, typename U> constexpr decltype(auto) operator()(Id, U&& obj) const ; }; template <typename Tag> struct get_adapter { static_assert(sizeof(Tag) == 0, "Not adapter."); }; template <typename UTag, typename Context> struct get_adapter<type::field<UTag, Context>> : get_adapter<UTag> {}; template <typename Adapter, typename UTag> struct get_adapter<type::adapted<Adapter, UTag>> { using type = Adapter; }; template <typename Tag> using get_adapter_t = typename get_adapter<Tag>::type; template <typename T, std::size_t pos = 0> class InvokeByFieldId { static constexpr auto N = size_v<T>; template <std::size_t Ordinal> using OrdToFieldId = get_field_id<T, field_ordinal<std::min(Ordinal, N)>>; public: template < typename F, std::enable_if_t<sizeof(F) != 0 && pos != N, bool> = false> __attribute__((__always_inline__)) constexpr decltype(auto) operator()( FieldId id, F&& f) const ; template < typename F, std::enable_if_t<sizeof(F) != 0 && pos == N, bool> = false> __attribute__((__always_inline__)) constexpr decltype(auto) operator()( FieldId, F&& f) const ; template <typename... F> __attribute__((__always_inline__)) constexpr decltype(auto) operator()( FieldId id, F&&... f) const ; }; } template <typename T> inline constexpr detail::InvokeByFieldId<T> invoke_by_field_id{}; } } } namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Tp, typename _Sequence = deque<_Tp> > class stack { template<typename _Tp1, typename _Seq1> friend bool operator==(const stack<_Tp1, _Seq1>&, const stack<_Tp1, _Seq1>&); template<typename _Tp1, typename _Seq1> friend bool operator<(const stack<_Tp1, _Seq1>&, const stack<_Tp1, _Seq1>&); template<typename _Tp1, three_way_comparable _Seq1> friend compare_three_way_result_t<_Seq1> operator<=>(const stack<_Tp1, _Seq1>&, const stack<_Tp1, _Seq1>&); template<typename _Alloc> using _Uses = typename enable_if<uses_allocator<_Sequence, _Alloc>::value>::type; static_assert(is_same<_Tp, typename _Sequence::value_type>::value, "value_type must be the same as the underlying container"); 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: _Sequence c; public: template<typename _Seq = _Sequence, typename _Requires = typename enable_if<is_default_constructible<_Seq>::value>::type> stack() ; explicit stack(const _Sequence& __c) ; explicit stack(_Sequence&& __c) ; template<typename _Alloc, typename _Requires = _Uses<_Alloc>> explicit stack(const _Alloc& __a) ; template<typename _Alloc, typename _Requires = _Uses<_Alloc>> stack(const _Sequence& __c, const _Alloc& __a) ; template<typename _Alloc, typename _Requires = _Uses<_Alloc>> stack(_Sequence&& __c, const _Alloc& __a) ; template<typename _Alloc, typename _Requires = _Uses<_Alloc>> stack(const stack& __q, const _Alloc& __a) ; template<typename _Alloc, typename _Requires = _Uses<_Alloc>> stack(stack&& __q, const _Alloc& __a) ; [[__nodiscard__]] bool empty() const ; [[__nodiscard__]] size_type size() const ; [[__nodiscard__]] reference top() ; [[__nodiscard__]] const_reference top() const ; void push(const value_type& __x) ; void push(value_type&& __x) ; template<typename... _Args> decltype(auto) emplace(_Args&&... __args) ; void pop() ; void swap(stack& __s) noexcept(__is_nothrow_swappable<_Sequence>::value) ; }; template<typename _Container, typename = _RequireNotAllocator<_Container>> stack(_Container) -> stack<typename _Container::value_type, _Container>; template<typename _Container, typename _Allocator, typename = _RequireNotAllocator<_Container>> stack(_Container, _Allocator) -> stack<typename _Container::value_type, _Container>; template<typename _Tp, typename _Seq> [[__nodiscard__]] bool operator==(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y) ; template<typename _Tp, typename _Seq> [[__nodiscard__]] bool operator<(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y) ; template<typename _Tp, typename _Seq> [[__nodiscard__]] bool operator!=(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y) ; template<typename _Tp, typename _Seq> [[__nodiscard__]] bool operator>(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y) ; template<typename _Tp, typename _Seq> [[__nodiscard__]] bool operator<=(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y) ; template<typename _Tp, typename _Seq> [[__nodiscard__]] bool operator>=(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y) ; template<typename _Tp, three_way_comparable _Seq> [[nodiscard]] compare_three_way_result_t<_Seq> operator<=>(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y) ; template<typename _Tp, typename _Seq> typename enable_if<__is_swappable<_Seq>::value>::type swap(stack<_Tp, _Seq>& __x, stack<_Tp, _Seq>& __y) noexcept(noexcept(__x.swap(__y))) ; template<typename _Tp, typename _Seq, typename _Alloc> struct uses_allocator<stack<_Tp, _Seq>, _Alloc> : public uses_allocator<_Seq, _Alloc>::type { }; } namespace apache { namespace thrift { namespace op { template <typename HasherGenerator> class DeterministicAccumulator { private: using Hasher = decltype(std::declval<HasherGenerator>()()); public: DeterministicAccumulator() = default; explicit DeterministicAccumulator(HasherGenerator generator) ; Hasher& result() ; const Hasher& result() const ; template <typename T> void combine(const T& val); void beginOrdered(); void endOrdered(); void beginUnordered() ; void endUnordered(); private: struct Context { Context() = default; explicit Context(bool has_unordered_ctx) ; std::vector<Hasher> hashers; size_t ordered_count{}; bool has_unordered_context{}; }; HasherGenerator generator_; std::stack<Context, std::vector<Context>> context_; Hasher result_ = generator_(); constexpr auto& context() ; void exitContext(Hasher result); }; template <class Hasher> [[nodiscard]] auto makeDeterministicAccumulator() ; template <class Accumulator> [[nodiscard]] auto makeOrderedHashGuard(Accumulator& accumulator) ; template <class Accumulator> [[nodiscard]] auto makeUnorderedHashGuard(Accumulator& accumulator) ; } } } namespace apache { namespace thrift { namespace op { class StdHasher { public: size_t getResult() const ; template <typename T> constexpr std::enable_if_t<std::is_arithmetic<T>::value> combine( const T& val) ; template <typename T> constexpr std::enable_if_t<std::is_enum<T>::value> combine(const T& val) ; void combine(folly::ByteRange value) ; void combine(const StdHasher& other) ; void combine(const folly::IOBuf& value) ; void finalize() ; bool operator<(const StdHasher& other) const ; private: size_t result_ = 0; }; } } } namespace apache { namespace thrift { namespace protocol { class __attribute__((__visibility__("default"))) TProtocolException : public apache::thrift::TLibraryException { public: enum TProtocolExceptionType { UNKNOWN = 0, INVALID_DATA = 1, NEGATIVE_SIZE = 2, SIZE_LIMIT = 3, BAD_VERSION = 4, NOT_IMPLEMENTED = 5, MISSING_REQUIRED_FIELD = 6, CHECKSUM_MISMATCH = 7, DEPTH_LIMIT = 8, }; TProtocolException() ; explicit TProtocolException(TProtocolExceptionType type) ; explicit TProtocolException(const std::string& message) ; TProtocolException(TProtocolExceptionType type, const std::string& message) ; ~TProtocolException() noexcept override ; TProtocolExceptionType getType() const ; const char* what() const noexcept override ; [[noreturn]] static void throwUnionMissingStop(); [[noreturn]] static void throwReportedTypeMismatch(); [[noreturn]] static void throwNegativeSize(); [[deprecated("Use override with size and limit.")]] [[noreturn]] static void throwExceededSizeLimit(); [[noreturn]] static void throwExceededSizeLimit(size_t size, size_t limit); [[noreturn]] static void throwExceededDepthLimit(); [[noreturn]] static void throwMissingRequiredField( folly::StringPiece field, folly::StringPiece type); [[noreturn]] static void throwBoolValueOutOfRange(uint8_t value); [[noreturn]] static void throwInvalidSkipType(TType type); [[noreturn]] static void throwInvalidFieldData(); [[noreturn]] static void throwTruncatedData(); protected: TProtocolExceptionType type_; }; } } } namespace folly { class __attribute__((__visibility__("default"))) AsyncSocketException : public std::runtime_error { public: enum AsyncSocketExceptionType { UNKNOWN = 0, NOT_OPEN = 1, ALREADY_OPEN = 2, TIMED_OUT = 3, END_OF_FILE = 4, INTERRUPTED = 5, BAD_ARGS = 6, CORRUPTED_DATA = 7, INTERNAL_ERROR = 8, NOT_SUPPORTED = 9, INVALID_STATE = 10, SSL_ERROR = 12, COULD_NOT_BIND = 13, NETWORK_ERROR = 15, EARLY_DATA_REJECTED = 16, CANCELED = 17, }; AsyncSocketException( AsyncSocketExceptionType type, const std::string& message, int errnoCopy = 0) ; AsyncSocketExceptionType getType() const noexcept ; int getErrno() const noexcept ; protected: static folly::StringPiece getExceptionTypeString( AsyncSocketExceptionType type); static std::string getMessage( AsyncSocketExceptionType type, const std::string& message, int errnoCopy); AsyncSocketExceptionType type_; int errno_; }; } namespace apache { namespace thrift { namespace transport { class __attribute__((__visibility__("default"))) TTransportException : public apache::thrift::TLibraryException { public: enum TTransportExceptionType { UNKNOWN = 0, NOT_OPEN = 1, ALREADY_OPEN = 2, TIMED_OUT = 3, END_OF_FILE = 4, INTERRUPTED = 5, BAD_ARGS = 6, CORRUPTED_DATA = 7, INTERNAL_ERROR = 8, NOT_SUPPORTED = 9, INVALID_STATE = 10, INVALID_FRAME_SIZE = 11, SSL_ERROR = 12, COULD_NOT_BIND = 13, NETWORK_ERROR = 15, EARLY_DATA_REJECTED = 16, STREAMING_CONTRACT_VIOLATION = 17, }; using TTransportExceptionTypeSize = std::integral_constant<std::size_t, 18>; TTransportException() ; explicit TTransportException(TTransportExceptionType type) ; explicit TTransportException(const std::string& message) ; TTransportException(TTransportExceptionType type, std::string message) ; TTransportException( TTransportExceptionType type, std::string message, int errno_copy) ; explicit TTransportException(const folly::AsyncSocketException& ex) ; ~TTransportException() noexcept override ; TTransportExceptionType getType() const noexcept ; enum Options { CHANNEL_IS_VALID = 1 << 0, }; int getOptions() const ; void setOptions(int options) ; const char* what() const noexcept override ; int getErrno() const ; protected: std::string strerror_s(int errno_copy); static std::string getMessage(std::string&& message, int errno_copy) ; static std::string getDefaultMessage( TTransportExceptionType type, std::string&& message) ; TTransportExceptionType type_; int errno_; int options_; }; } } } namespace apache { namespace thrift { namespace transport { template <class Transport_> uint32_t readAll(Transport_& trans, uint8_t* buf, uint32_t len) ; class TTransport { public: virtual ~TTransport() ; virtual bool isOpen() ; virtual bool peek() ; virtual void open() ; virtual void close() ; uint32_t read(uint8_t* buf, uint32_t len) ; virtual uint32_t read_virt(uint8_t* , uint32_t ) ; uint32_t readAll(uint8_t* buf, uint32_t len) ; virtual uint32_t readAll_virt(uint8_t* buf, uint32_t len) ; virtual uint32_t readEnd() ; void write(const uint8_t* buf, uint32_t len) ; virtual void write_virt(const uint8_t* , uint32_t ) ; virtual uint32_t writeEnd() ; virtual void flush() ; virtual void onewayFlush() ; const uint8_t* borrow(uint8_t* buf, uint32_t* len) ; virtual const uint8_t* borrow_virt(uint8_t* , uint32_t* ) ; void consume(uint32_t len) ; virtual void consume_virt(uint32_t ) ; protected: TTransport() ; }; class TTransportFactory { public: TTransportFactory() ; virtual ~TTransportFactory() ; virtual std::shared_ptr<TTransport> getTransport( std::shared_ptr<TTransport> trans) ; }; typedef std::pair<std::shared_ptr<TTransport>, std::shared_ptr<TTransport>> TTransportPair; class TDuplexTransportFactory { public: TDuplexTransportFactory() ; virtual ~TDuplexTransportFactory() ; virtual TTransportPair getTransport(std::shared_ptr<TTransport> trans) ; virtual TTransportPair getTransport(TTransportPair transports) ; }; template <class Factory_> class TSingleTransportFactory : public TDuplexTransportFactory { public: TSingleTransportFactory() ; explicit TSingleTransportFactory(std::shared_ptr<Factory_> factory) ; TTransportPair getTransport(std::shared_ptr<TTransport> trans) override ; TTransportPair getTransport(TTransportPair transports) override ; private: std::shared_ptr<Factory_> factory_; }; class TDualTransportFactory : public TDuplexTransportFactory { public: TDualTransportFactory( std::shared_ptr<TTransportFactory> inputFactory, std::shared_ptr<TTransportFactory> outputFactory) ; TTransportPair getTransport(std::shared_ptr<TTransport> trans) override ; TTransportPair getTransport(TTransportPair transports) override ; private: std::shared_ptr<TTransportFactory> inputFactory_; std::shared_ptr<TTransportFactory> outputFactory_; }; } } } namespace apache { namespace thrift { namespace reflection { class Schema; } } } namespace apache { namespace thrift { namespace protocol { using apache::thrift::transport::TTransport; enum TMessageType { T_CALL = 1, T_REPLY = 2, T_EXCEPTION = 3, T_ONEWAY = 4 }; template <class Protocol_> uint32_t skip(Protocol_& prot, TType arg_type) ; class TProtocol { public: virtual ~TProtocol() ; virtual void setVersion_virt(const int8_t version) = 0; void setVersion(const int8_t version) ; virtual ::apache::thrift::reflection::Schema* getSchema_virt() = 0; ::apache::thrift::reflection::Schema* getSchema() ; virtual uint32_t writeMessageBegin_virt( const std::string& name, const TMessageType messageType, const int32_t seqid) = 0; virtual uint32_t writeMessageEnd_virt() = 0; virtual uint32_t writeStructBegin_virt(const char* name) = 0; virtual uint32_t writeStructEnd_virt() = 0; virtual uint32_t writeFieldBegin_virt( const char* name, const TType fieldType, const int16_t fieldId) = 0; virtual uint32_t writeFieldEnd_virt() = 0; virtual uint32_t writeFieldStop_virt() = 0; virtual uint32_t writeMapBegin_virt( const TType keyType, const TType valType, const uint32_t size) = 0; virtual uint32_t writeMapEnd_virt() = 0; virtual uint32_t writeListBegin_virt( const TType elemType, const uint32_t size) = 0; virtual uint32_t writeListEnd_virt() = 0; virtual uint32_t writeSetBegin_virt( const TType elemType, const uint32_t size) = 0; virtual uint32_t writeSetEnd_virt() = 0; virtual uint32_t writeBool_virt(const bool value) = 0; virtual uint32_t writeByte_virt(const int8_t byte) = 0; virtual uint32_t writeI16_virt(const int16_t i16) = 0; virtual uint32_t writeI32_virt(const int32_t i32) = 0; virtual uint32_t writeI64_virt(const int64_t i64) = 0; virtual uint32_t writeDouble_virt(const double dub) = 0; virtual uint32_t writeFloat_virt(const float flt) = 0; virtual uint32_t writeString_virt(const std::string& str) = 0; virtual uint32_t writeBinary_virt(const std::string& str) = 0; uint32_t writeMessageBegin( const std::string& name, const TMessageType messageType, const int32_t seqid) ; uint32_t writeMessageEnd() ; uint32_t writeStructBegin(const char* name) ; uint32_t writeStructEnd() ; uint32_t writeFieldBegin( const char* name, const TType fieldType, const int16_t fieldId) ; uint32_t writeFieldEnd() ; uint32_t writeFieldStop() ; uint32_t writeMapBegin( const TType keyType, const TType valType, const uint32_t size) ; uint32_t writeMapEnd() ; uint32_t writeListBegin(const TType elemType, const uint32_t size) ; uint32_t writeListEnd() ; uint32_t writeSetBegin(const TType elemType, const uint32_t size) ; uint32_t writeSetEnd() ; uint32_t writeBool(const bool value) ; uint32_t writeByte(const int8_t byte) ; uint32_t writeI16(const int16_t i16) ; uint32_t writeI32(const int32_t i32) ; uint32_t writeI64(const int64_t i64) ; uint32_t writeDouble(const double dub) ; uint32_t writeFloat(const float flt) ; uint32_t writeString(const std::string& str) ; uint32_t writeString(const folly::fbstring& str) ; uint32_t writeBinary(const std::string& str) ; uint32_t writeBinary(const folly::fbstring& str) ; virtual uint32_t readMessageBegin_virt( std::string& name, TMessageType& messageType, int32_t& seqid) = 0; virtual uint32_t readMessageEnd_virt() = 0; virtual void setNextStructType_virt(uint64_t reflection_id) = 0; virtual uint32_t readStructBegin_virt(std::string& name) = 0; virtual uint32_t readStructEnd_virt() = 0; virtual uint32_t readFieldBegin_virt( std::string& name, TType& fieldType, int16_t& fieldId) = 0; virtual uint32_t readFieldEnd_virt() = 0; virtual uint32_t readMapBegin_virt( TType& keyType, TType& valType, uint32_t& size, bool& sizeUnknown) = 0; virtual bool peekMap_virt() = 0; virtual uint32_t readMapEnd_virt() = 0; virtual uint32_t readListBegin_virt( TType& elemType, uint32_t& size, bool& sizeUnknown) = 0; virtual bool peekList_virt() = 0; virtual uint32_t readListEnd_virt() = 0; virtual uint32_t readSetBegin_virt( TType& elemType, uint32_t& size, bool& sizeUnknown) = 0; virtual bool peekSet_virt() = 0; virtual uint32_t readSetEnd_virt() = 0; virtual uint32_t readBool_virt(bool& value) = 0; virtual uint32_t readBool_virt(std::vector<bool>::reference value) = 0; virtual uint32_t readByte_virt(int8_t& byte) = 0; virtual uint32_t readI16_virt(int16_t& i16) = 0; virtual uint32_t readI32_virt(int32_t& i32) = 0; virtual uint32_t readI64_virt(int64_t& i64) = 0; virtual uint32_t readDouble_virt(double& dub) = 0; virtual uint32_t readFloat_virt(float& flt) = 0; virtual uint32_t readString_virt(std::string& str) = 0; virtual uint32_t readBinary_virt(std::string& str) = 0; uint32_t readMessageBegin( std::string& name, TMessageType& messageType, int32_t& seqid) ; uint32_t readMessageEnd() ; void setNextStructType(uint64_t reflection_id) ; uint32_t readStructBegin(std::string& name) ; uint32_t readStructEnd() ; uint32_t readFieldBegin( std::string& name, TType& fieldType, int16_t& fieldId) ; uint32_t readFieldEnd() ; uint32_t readMapBegin( TType& keyType, TType& valType, uint32_t& size, bool& sizeUnknown) ; bool peekMap() ; uint32_t readMapEnd() ; uint32_t readListBegin(TType& elemType, uint32_t& size, bool& sizeUnknown) ; bool peekList() ; uint32_t readListEnd() ; uint32_t readSetBegin(TType& elemType, uint32_t& size, bool& sizeUnknown) ; bool peekSet() ; uint32_t readSetEnd() ; uint32_t readBool(bool& value) ; uint32_t readByte(int8_t& byte) ; uint32_t readI16(int16_t& i16) ; uint32_t readI32(int32_t& i32) ; uint32_t readI64(int64_t& i64) ; uint32_t readDouble(double& dub) ; uint32_t readFloat(float& flt) ; uint32_t readString(std::string& str) ; uint32_t readString(folly::fbstring& str) ; uint32_t readBinary(std::string& str) ; uint32_t readBinary(folly::fbstring& str) ; int32_t getStringSizeLimit() ; int32_t getContainerSizeLimit() ; uint32_t readBool(std::vector<bool>::reference value) ; uint32_t skip(TType type) ; virtual uint32_t skip_virt(TType type) ; std::shared_ptr<TTransport> getTransport() ; std::shared_ptr<TTransport> getInputTransport() ; std::shared_ptr<TTransport> getOutputTransport() ; protected: explicit TProtocol(std::shared_ptr<TTransport> ptrans) ; std::shared_ptr<TTransport> ptrans_; private: }; class TProtocolFactory { public: }; typedef std::pair<std::shared_ptr<TProtocol>, std::shared_ptr<TProtocol>> TProtocolPair; class TDuplexProtocolFactory { public: }; template <class Factory_> class TSingleProtocolFactory : public TDuplexProtocolFactory { public: private: std::shared_ptr<Factory_> factory_; }; class TDualProtocolFactory : public TDuplexProtocolFactory { public: private: std::shared_ptr<TProtocolFactory> inputFactory_; std::shared_ptr<TProtocolFactory> outputFactory_; }; class TDummyProtocol : public TProtocol {}; } } } namespace apache { namespace thrift { namespace op { namespace detail { ; ; ; ; ; ; ; template <typename Accumulator> class HashProtocol { public: private: Accumulator& acc_; }; } } } } namespace apache { namespace thrift { namespace op { namespace detail { ; ; ; ; ; ; template <typename Tag> struct Hash { ; ; }; } } } } namespace apache { namespace thrift { namespace op { template <typename Tag> using Hash = detail::Hash<Tag>; template <typename Tag> inline constexpr Hash<Tag> hash{}; } } } namespace folly { namespace io { enum class CursorAccess; template <CursorAccess> class RWCursor; } class IOBufQueue { private: template <io::CursorAccess> friend class io::RWCursor; struct WritableRangeCacheData { std::pair<uint8_t*, uint8_t*> cachedRange; bool attached{false}; }; public: struct Options { Options() ; bool cacheChainLength; }; class WritableRangeCache { public: explicit WritableRangeCache(folly::IOBufQueue* q = nullptr) ; private: WritableRangeCacheData data_; IOBufQueue* queue_; }; static constexpr size_t kMaxPackCopy = 4096; private: static const size_t kChainLengthNotCached = (size_t)-1; Options options_; mutable size_t chainLength_{0}; std::unique_ptr<folly::IOBuf> head_; mutable uint8_t* tailStart_{nullptr}; WritableRangeCacheData* cachePtr_{nullptr}; WritableRangeCacheData localCache_; folly::IOBuf* reusableTail_ = nullptr; }; } namespace apache { namespace thrift { namespace protocol { enum PROTOCOL_TYPES : uint16_t { T_BINARY_PROTOCOL = 0, T_JSON_PROTOCOL = 1, T_COMPACT_PROTOCOL = 2, T_DEBUG_PROTOCOL = 3, T_VIRTUAL_PROTOCOL = 4, T_SIMPLE_JSON_PROTOCOL = 5, }; } } } namespace apache { namespace thrift { namespace detail { template <typename T, typename Deleter = std::default_delete<T>> class CloneableUniquePtr : public std::unique_ptr<T, Deleter> { public: typedef std::unique_ptr<T, Deleter> Base; ; }; ; } typedef apache::thrift::detail::CloneableUniquePtr<folly::IOBuf> CloneableIOBuf; } } namespace apache { namespace thrift { namespace detail { template <typename Protocol> struct ProtocolReaderWireTypeInfo { using WireType = apache::thrift::protocol::TType; }; } } } namespace apache { namespace thrift { namespace detail { class ProtocolBase { public: protected: private: size_t height_; }; } enum ExternalBufferSharing { COPY_EXTERNAL_BUFFER, SHARE_EXTERNAL_BUFFER, }; using apache::thrift::protocol::TProtocolException; using apache::thrift::protocol::TType; typedef apache::thrift::protocol::PROTOCOL_TYPES ProtocolType; enum class MessageType { T_CALL = 1, T_REPLY = 2, T_EXCEPTION = 3, T_ONEWAY = 4, }; namespace detail { struct SkipNoopString { }; } ; ; ; ; template <class StrType> struct StringTraits { }; template <> struct StringTraits<folly::IOBuf> { }; template <> struct StringTraits<std::unique_ptr<folly::IOBuf>> { }; } } namespace apache { namespace thrift { namespace op { namespace detail { template <typename LTag = void, typename RTag = LTag, typename = void> struct EqualTo { static_assert(type::is_concrete_v<LTag>, ""); static_assert(type::is_concrete_v<RTag>, ""); }; template <> struct EqualTo<type::void_t> { ; }; template <typename LTag> struct EqualTo<LTag, type::void_t> { ; }; template <typename RTag> struct EqualTo<type::void_t, RTag> { ; }; template <typename Tag, typename = void> struct IdenticalTo : EqualTo<Tag> {}; template <> struct IdenticalTo<type::void_t> { ; }; template <typename LTag, typename RTag = LTag, typename = void> struct LessThan : std::less<> { static_assert(type::is_concrete_v<LTag>, ""); static_assert(type::is_concrete_v<RTag>, ""); }; template <> struct LessThan<type::void_t> { ; }; template <typename LTag> struct LessThan<LTag, type::void_t> { ; }; template <typename RTag> struct LessThan<type::void_t, RTag> { ; }; template <typename LTag, typename RTag = LTag> using less_than_t = decltype(LessThan<LTag, RTag>{}( std::declval<const type::native_type<LTag>&>(), std::declval<const type::native_type<RTag>&>())); template <typename LTag, typename RTag = LTag> inline constexpr bool less_than_comparable_v = folly::is_detected_v<less_than_t, LTag, RTag>; template <typename LTag, typename RTag = LTag, typename R = void> using if_less_than_comparable = folly::type_t<R, less_than_t<LTag, RTag>>; template < typename LTag, typename RTag = LTag, typename EqualTo = EqualTo<LTag, RTag>, typename LessThan = LessThan<LTag, RTag>, typename L = type::native_type<LTag>, typename R = type::native_type<RTag>, typename = if_less_than_comparable<LTag, RTag>> struct DefaultCompareWith { protected: EqualTo equalTo; LessThan lessThan; }; template <typename LTag, typename RTag = LTag, typename = void> struct CompareWith : DefaultCompareWith<LTag, RTag> {}; template <> struct CompareWith<type::void_t> { ; }; template <typename LTag> struct CompareWith<LTag, type::void_t> { ; }; template <typename RTag> struct CompareWith<type::void_t, RTag> { ; }; template <typename LTag, typename RTag = LTag> using compare_with_t = decltype(CompareWith<LTag, RTag>{}( std::declval<const type::native_type<LTag>&>(), std::declval<const type::native_type<RTag>&>())); template <typename LTag, typename RTag = LTag> inline constexpr bool comparable_v = folly::is_detected_v<compare_with_t, LTag, RTag>; template < typename LTag, typename RTag = LTag, typename R = folly::partial_ordering> using if_comparable = folly::type_t<R, compare_with_t<LTag, RTag>>; template < typename LTag, typename RTag = LTag, typename R = folly::partial_ordering> using if_not_comparable = std::enable_if_t<!comparable_v<LTag, RTag>, R>; template < typename LTag, typename RTag = LTag, typename CompareWith = CompareWith<LTag, RTag>, typename L = type::native_type<LTag>, typename R = type::native_type<RTag>> struct DefaultEqualTo { protected: CompareWith compareWith; }; template < typename LTag, typename RTag = LTag, typename CompareWith = CompareWith<LTag, RTag>, typename L = type::native_type<LTag>, typename R = type::native_type<RTag>> struct DefaultLessThan { protected: CompareWith compareWith; }; template <typename F, typename I> struct FloatIdenticalTo { }; template <> struct IdenticalTo<type::float_t> : FloatIdenticalTo<float, int32_t> {}; template <> struct IdenticalTo<type::double_t> : FloatIdenticalTo<double, int64_t> {}; template <typename LUTag, typename RUTag> struct CheckIOBufOp { static_assert( type::is_a_v<LUTag, type::string_c> && type::is_a_v<RUTag, type::string_c>, "expected string or binary"); }; template <typename LUTag, typename RUTag> struct EqualTo< type::cpp_type<folly::IOBuf, LUTag>, type::cpp_type<folly::IOBuf, RUTag>> : CheckIOBufOp<LUTag, RUTag>, folly::IOBufEqualTo {}; template <typename LUTag, typename RUTag> struct EqualTo< type::cpp_type<std::unique_ptr<folly::IOBuf>, LUTag>, type::cpp_type<std::unique_ptr<folly::IOBuf>, RUTag>> : CheckIOBufOp<LUTag, RUTag>, folly::IOBufEqualTo {}; template <typename LUTag, typename RUTag> struct LessThan< type::cpp_type<folly::IOBuf, LUTag>, type::cpp_type<folly::IOBuf, RUTag>> : CheckIOBufOp<LUTag, RUTag>, folly::IOBufLess {}; template <typename LUTag, typename RUTag> struct LessThan< type::cpp_type<std::unique_ptr<folly::IOBuf>, LUTag>, type::cpp_type<std::unique_ptr<folly::IOBuf>, RUTag>> : CheckIOBufOp<LUTag, RUTag>, folly::IOBufLess {}; template <typename LUTag, typename RUTag> struct CompareWith< type::cpp_type<folly::IOBuf, LUTag>, type::cpp_type<folly::IOBuf, RUTag>> : CheckIOBufOp<LUTag, RUTag>, folly::IOBufCompare {}; template <typename LUTag, typename RUTag> struct CompareWith< type::cpp_type<std::unique_ptr<folly::IOBuf>, LUTag>, type::cpp_type<std::unique_ptr<folly::IOBuf>, RUTag>> : CheckIOBufOp<LUTag, RUTag>, folly::IOBufCompare {}; ; template <class T, class E, template <class...> class LessThanImpl = LessThan> struct ListLessThan { }; template <class T, class E, template <class...> class LessThanImpl = LessThan> struct SetLessThan { }; template < class T, class K, class V, template <class...> class LessThanImpl = LessThan> struct MapLessThan { }; template <typename T, typename E> struct LessThan< type::cpp_type<T, type::list<E>>, type::cpp_type<T, type::list<E>>> : std::conditional_t< folly::is_invocable_v<std::less<>, const T&, const T&>, std::less<>, ListLessThan<T, E>> {}; template <typename VTag> struct LessThan<type::list<VTag>, type::list<VTag>> { ; }; template <typename T, typename E> struct LessThan< type::cpp_type<T, type::set<E>>, type::cpp_type<T, type::set<E>>> : std::conditional_t< folly::is_invocable_v<std::less<>, const T&, const T&>, std::less<>, SetLessThan<T, E>> {}; template <typename T, typename K, typename V> struct LessThan< type::cpp_type<T, type::map<K, V>>, type::cpp_type<T, type::map<K, V>>> : std::conditional_t< folly::is_invocable_v<std::less<>, const T&, const T&>, std::less<>, MapLessThan<T, K, V>> {}; template < typename VTag, typename Tag = type::list<VTag>, typename T = type::native_type<Tag>> struct ListIdenticalTo { protected: IdenticalTo<VTag> cmp; }; template <typename VTag> struct IdenticalTo<type::list<VTag>> : ListIdenticalTo<VTag> {}; template <typename T, typename VTag> struct IdenticalTo<type::cpp_type<T, type::list<VTag>>> : ListIdenticalTo<VTag, type::cpp_type<T, type::list<VTag>>> {}; template <typename VTag> struct EqualTo<type::list<VTag>> { ; }; template < typename KTag, typename Tag = type::set<KTag>, typename T = type::native_type<Tag>> struct SetIdenticalTo { private: ; }; template <typename KTag> struct IdenticalTo<type::set<KTag>> : SetIdenticalTo<KTag> {}; template <typename T, typename KTag> struct IdenticalTo<type::cpp_type<T, type::set<KTag>>> : SetIdenticalTo<KTag, type::cpp_type<T, type::set<KTag>>> {}; template < typename KTag, typename VTag, template <class...> typename Equality, typename Tag = type::map<KTag, VTag>, typename T = type::native_type<Tag>> struct MapEquality { private: ; }; template <typename KTag, typename VTag> struct IdenticalTo<type::map<KTag, VTag>> : MapEquality<KTag, VTag, IdenticalTo> {}; template <typename T, typename KTag, typename VTag> struct IdenticalTo<type::cpp_type<T, type::map<KTag, VTag>>> : MapEquality< KTag, VTag, IdenticalTo, type::cpp_type<T, type::map<KTag, VTag>>> {}; template <typename T, typename KTag, typename VTag> struct EqualTo<type::cpp_type<T, type::map<KTag, VTag>>> : std::conditional_t< folly::is_invocable_v< std::equal_to<>, const type::native_type<KTag>&, const type::native_type<KTag>&> && folly::is_invocable_v< std::equal_to<>, const type::native_type<VTag>&, const type::native_type<VTag>&>, std::equal_to<>, MapEquality< KTag, VTag, EqualTo, type::cpp_type<T, type::map<KTag, VTag>>>> {}; template <typename Tag, typename Context> struct IdenticalTo<type::field<Tag, Context>> : IdenticalTo<Tag> {}; template <typename Adapter, typename Tag> struct EqualTo<type::adapted<Adapter, Tag>> { using adapted_tag = type::adapted<Adapter, Tag>; static_assert(type::is_concrete_v<adapted_tag>, ""); ; }; template <typename Adapter, typename Tag> struct LessThan<type::adapted<Adapter, Tag>> { using adapted_tag = type::adapted<Adapter, Tag>; static_assert(type::is_concrete_v<adapted_tag>, ""); ; }; template <template <class...> class LessThanImpl = LessThan> struct StructLessThan { ; }; template <template <class...> class Equality = EqualTo> struct StructEquality { ; }; template <template <class...> class LessThanImpl = LessThan> struct UnionLessThan { ; }; template <template <class...> class Equality = EqualTo> struct UnionEquality { ; }; } } } } namespace apache { namespace thrift { namespace op { template <typename LTag = void, typename RTag = LTag> struct EqualTo : detail::EqualTo<LTag, RTag> {}; template <typename LTagOrT = void, typename RTagOrT = LTagOrT> inline constexpr EqualTo<type::infer_tag<LTagOrT>, type::infer_tag<RTagOrT>> equal{}; template <typename Tag = void> struct IdenticalTo : detail::IdenticalTo<Tag> {}; template <typename TagOrT = void> inline constexpr IdenticalTo<type::infer_tag<TagOrT>> identical{}; template <typename LTag = void, typename RTag = LTag> struct Less : detail::LessThan<LTag, RTag> {}; template <typename LTagOrT = void, typename RTagOrT = LTagOrT> inline constexpr Less<type::infer_tag<LTagOrT>, type::infer_tag<RTagOrT>> less{}; template <typename LTagOrT = void, typename RTagOrT = LTagOrT> inline constexpr detail:: CompareWith<type::infer_tag<LTagOrT>, type::infer_tag<RTagOrT>> compare{}; } } } namespace apache { namespace thrift { namespace type { template <typename T, typename Id> inline constexpr bool is_optional_or_union_field_v = ::apache::thrift::detail::is_optional_or_union_field_ref_v< op::get_field_ref<T, Id>> || ::apache::thrift::detail::qualifier:: is_cpp_ref_field_optional<T, op::get_field_id<T, Id>>::value; template <typename U, typename R = void> using if_optional_or_union_field_ref = std::enable_if_t< ::apache::thrift::detail::is_optional_or_union_field_ref_v< folly::remove_cvref_t<U>>, R>; template <typename U, typename R = void> using if_not_optional_or_union_field_ref = std::enable_if_t< !::apache::thrift::detail::is_optional_or_union_field_ref_v< folly::remove_cvref_t<U>>, R>; template <typename T, typename Id> inline constexpr bool is_terse_field_v = ::apache::thrift::detail::is_terse_field_ref_v<op::get_field_ref<T, Id>> || ::apache::thrift::detail::is_terse_intern_boxed_field_ref_v< op::get_field_ref<T, Id>> || ::apache::thrift::detail::qualifier:: is_cpp_ref_field_terse<T, op::get_field_id<T, Id>>::value; } } } namespace apache { namespace thrift { namespace op { namespace detail { ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; template <typename Tag> struct Create { static_assert(type::is_concrete_v<Tag>, ""); ; }; template <typename Id = void, typename Tag = void, typename = void> struct Ensure { ; }; template <typename Id> struct Ensure<Id, void> { ; }; template <> struct Ensure<void, void> { ; }; template <typename Adapter, typename Tag> struct Create<type::adapted<Adapter, Tag>> { using adapted_tag = type::adapted<Adapter, Tag>; static_assert(type::is_concrete_v<adapted_tag>, ""); ; }; template <typename Tag, typename Context> struct Create<type::field<Tag, Context>> : Create<Tag> {}; template <typename Adapter, typename Tag, typename Struct, int16_t FieldId> struct Create< type::field<type::adapted<Adapter, Tag>, FieldContext<Struct, FieldId>>> { using field_adapted_tag = type::field<type::adapted<Adapter, Tag>, FieldContext<Struct, FieldId>>; static_assert(type::is_concrete_v<field_adapted_tag>, ""); ; ; }; template <typename Tag, typename Context> struct Ensure<type::field<Tag, Context>> { using field_tag = type::field<Tag, Context>; static_assert(type::is_concrete_v<field_tag>, ""); ; }; } } } } namespace apache { namespace thrift { namespace op { template <typename Tag> inline constexpr detail::Create<Tag> create{}; template <typename Id = void, typename Tag = void> inline constexpr detail::Ensure<Id, Tag> ensure{}; } } } namespace apache { namespace thrift { namespace op { namespace detail { template <typename Tag, typename = void> struct GetDefault { static_assert(!type::is_a_v<Tag, type::structured_c>, ""); }; template <typename Tag, typename = void> struct GetIntrinsicDefault : GetDefault<Tag> { static_assert(!type::is_a_v<Tag, type::structured_c>, ""); }; template <typename TagOrId, typename PTag = void, typename = void> struct Clear { using Tag = TagOrId; private: ; ; ; }; template <typename Id> struct Clear<Id, type::if_id<Id>, type::if_not_thrift_type_tag<Id>> { ; }; template <> struct Clear<void> { ; ; }; template <typename Tag> struct IsEmpty { private: ; ; ; ; ; }; template <> struct IsEmpty<void> { ; }; template <typename Tag> struct ThriftClearDefault { }; template <typename Tag> struct CreateDefault { }; template <typename T> struct GetDefault<type::struct_t<T>> : CreateDefault<type::struct_t<T>> {}; template <typename T> struct GetDefault<type::exception_t<T>> : CreateDefault<type::exception_t<T>> { }; template <typename T> struct GetDefault<type::union_t<T>> : CreateDefault<type::union_t<T>> {}; template <typename T> struct GetIntrinsicDefault<type::struct_t<T>> : ThriftClearDefault<type::struct_t<T>> {}; template <typename T> struct GetIntrinsicDefault<type::exception_t<T>> : ThriftClearDefault<type::exception_t<T>> {}; template <typename T> struct GetIntrinsicDefault<type::union_t<T>> : ThriftClearDefault<type::union_t<T>> {}; template <typename Adapter, typename UTag, typename Struct, int16_t FieldId> using adapted_field_tag = type::field<type::adapted<Adapter, UTag>, FieldContext<Struct, FieldId>>; template <typename Adapter, typename UTag> struct GetDefault<type::adapted<Adapter, UTag>> : CreateDefault<type::adapted<Adapter, UTag>> {}; template <typename Adapter, typename UTag, typename Struct, int16_t FieldId> struct GetDefault< type::field<type::adapted<Adapter, UTag>, FieldContext<Struct, FieldId>>> { using Tag = type::field<type::adapted<Adapter, UTag>, FieldContext<Struct, FieldId>>; ; ; }; template <typename Adapter, typename UTag> struct GetIntrinsicDefault<type::adapted<Adapter, UTag>> { using Tag = type::adapted<Adapter, UTag>; }; template <typename Adapter, typename UTag, typename Struct, int16_t FieldId> struct GetIntrinsicDefault<adapted_field_tag<Adapter, UTag, Struct, FieldId>> { using Tag = adapted_field_tag<Adapter, UTag, Struct, FieldId>; ; ; }; template <typename Adapter, typename UTag> struct Clear<type::adapted<Adapter, UTag>> { using Tag = type::adapted<Adapter, UTag>; constexpr void operator()(type::native_type<Tag>& value) const ; }; template <typename Adapter, typename UTag> struct IsEmpty<type::adapted<Adapter, UTag>> { using Tag = type::adapted<Adapter, UTag>; template <typename AdapterT = Adapter> constexpr adapt_detail::if_is_empty_adapter<AdapterT, type::native_type<Tag>> operator()(const type::native_type<Tag>& value) const ; template <typename AdapterT = Adapter> constexpr adapt_detail:: if_not_is_empty_adapter<AdapterT, type::native_type<Tag>> operator()(const type::native_type<Tag>& value) const ; }; template <typename Adapter, typename UTag, typename Struct, int16_t FieldId> struct IsEmpty<adapted_field_tag<Adapter, UTag, Struct, FieldId>> { using Tag = adapted_field_tag<Adapter, UTag, Struct, FieldId>; template <typename AdapterT = Adapter> constexpr adapt_detail::if_is_empty_adapter<AdapterT, type::native_type<Tag>> operator()(const type::native_type<Tag>& value) const ; template <typename AdapterT = Adapter> constexpr adapt_detail:: if_not_is_empty_adapter<AdapterT, type::native_type<Tag>> operator()(const type::native_type<Tag>& value) const ; }; template <typename Tag, typename Context> struct GetDefault<type::field<Tag, Context>> : GetDefault<Tag> {}; template <typename Tag, typename Context> struct GetIntrinsicDefault<type::field<Tag, Context>> : GetIntrinsicDefault<Tag> {}; template <typename Tag, typename Context> struct IsEmpty<type::field<Tag, Context>> : IsEmpty<Tag> {}; struct ClearOptionalField { template <typename T, typename Struct> void operator()(optional_boxed_field_ref<T> field, Struct&) const ; template <typename T, typename Struct> void operator()(optional_field_ref<T> field, Struct&) const ; template <typename T, typename Union> void operator()(union_field_ref<T> field, Union& u) const ; template <typename T, typename Struct> void operator()(terse_intern_boxed_field_ref<T> field, Struct&) const ; }; template <typename> struct ClearField {}; template <typename Tag, typename Context> struct ClearField<type::field<Tag, Context>> : ClearOptionalField { using ClearOptionalField::operator(); template <typename T, typename Struct> void operator()(required_field_ref<T> field, Struct&) const ; template <typename T, typename Struct> void operator()(terse_field_ref<T> field, Struct&) const ; template <typename T, typename Struct> void operator()(field_ref<T> field, Struct&) const ; template <typename T, typename Struct> void operator()(std::shared_ptr<T>& field, Struct&) const ; template <typename T, typename Struct> void operator()(std::unique_ptr<T>& field, Struct&) const ; }; template <typename Adapter, typename UTag, typename Struct, int16_t FieldId> struct ClearField<adapted_field_tag<Adapter, UTag, Struct, FieldId>> : ClearOptionalField { using Tag = adapted_field_tag<Adapter, UTag, Struct, FieldId>; static_assert(type::is_concrete_v<Tag>, ""); using ClearOptionalField::operator(); template <typename T> void operator()(required_field_ref<T> field, Struct& s) const ; template <typename T> void operator()(terse_field_ref<T> field, Struct& s) const ; template <typename T> void operator()(field_ref<T> field, Struct& s) const ; template <typename T> void operator()(std::shared_ptr<T>& field, Struct& s) const ; template <typename T> void operator()(std::unique_ptr<T>& field, Struct& s) const ; }; template <typename Id, typename Tag> struct Clear<Id, Tag, type::if_thrift_type_tag<Tag>> { static_assert(type::is_id_v<Id>, ""); using T = type::native_type<Tag>; constexpr void operator()(T& val) const ; }; } } } } namespace apache { namespace thrift { namespace op { template <typename Tag = void> inline constexpr detail::IsEmpty<Tag> isEmpty{}; template <typename TagOrT> inline constexpr detail::GetDefault<type::infer_tag<TagOrT>> getDefault{}; template <typename TagOrT> inline constexpr detail::GetIntrinsicDefault<type::infer_tag<TagOrT>> getIntrinsicDefault{}; template <typename TagOrId = void, typename PTag = void> inline constexpr detail::Clear<TagOrId, PTag> clear{}; template <typename Tag> inline constexpr detail::ClearField<Tag> clear_field{}; } } } namespace apache { namespace thrift { namespace adapt_detail { template <typename AdaptedT> using HasResetType = decltype(std::declval<AdaptedT>().reset()); template <typename AdaptedT> constexpr bool has_reset_v = folly::is_detected_v<HasResetType, AdaptedT>; template <typename AdaptedT, typename R = void> using if_has_reset = std::enable_if_t<has_reset_v<AdaptedT>, R>; template <typename AdaptedT, typename R = void> using if_has_no_reset = std::enable_if_t<!has_reset_v<AdaptedT>, R>; } template <typename AdaptedT> struct IndirectionAdapter { template <typename ThriftT> static constexpr AdaptedT fromThrift(ThriftT&& value) ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) static constexpr decltype(auto) toThrift(AdaptedT& adapted) noexcept( noexcept(::apache::thrift::apply_indirection(adapted))) ; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) static constexpr decltype(auto) toThrift(const AdaptedT& adapted) noexcept( noexcept(::apache::thrift::apply_indirection(adapted))) ; }; namespace type { template <typename Type, typename Tag> using indirected = adapted< ::apache::thrift::IndirectionAdapter<Type>, cpp_type< folly::remove_cvref_t<::apache::thrift::adapt_detail::thrift_t< ::apache::thrift::IndirectionAdapter<Type>, folly::remove_cvref_t<Type>>>, Tag>>; } template <typename AdaptedT, typename ThriftT> struct StaticCastAdapter { template <typename T> static constexpr decltype(auto) fromThrift(T&& value) ; template <typename T> static constexpr decltype(auto) toThrift(T&& value) ; }; template <class T> struct InlineAdapter { template <typename U> static decltype(auto) toThrift(U&& value) ; template <typename U> static adapt_detail::if_has_reset<U> clear(U& value) ; template <typename Tag, typename Protocol, typename U> static auto encode(Protocol& prot_, const U& u) -> decltype(u.encode(prot_)) ; template <typename Tag, typename Protocol, typename U> static auto decode(Protocol& prot_, U& u) -> decltype(u.decode(prot_)) ; template <typename U> static adapt_detail::if_has_no_reset<U> clear(U& value) ; template <typename U> static T fromThrift(U&& value) ; template <typename U> static bool isEmpty(const U& value) ; }; } } namespace apache { namespace thrift { template <class T, class = void> class Cpp2Ops { static_assert( sizeof(T) == ~0ull, "(only Thrift-generated classes are serializable)"); }; } } namespace apache { namespace thrift { namespace detail { template < typename C, typename T = decltype(std::declval<C&>().push_back( std::declval<typename C::value_type>()))> struct push_back_result { using type = T; }; template < typename C, typename T = decltype(std::declval<C&>().insert( std::declval<typename C::key_type>()))> struct insert_key_result { using type = T; }; template < typename C, typename T = decltype(std::declval<C&>()[std::declval<typename C::key_type>()])> struct subscript_key_result { using type = T; }; template < typename C, typename T = decltype(std::declval<C&>().reserve( std::declval<typename C::size_type>()))> struct reserve_result { using type = T; }; template <typename C, typename = void> struct Reserver { static void reserve(C&, typename C::size_type) ; }; template <typename C> struct Reserver<C, folly::void_t<typename reserve_result<C>::type>> { static void reserve(C& container, typename C::size_type size) ; }; template <typename Cont, typename Elem, typename Enable = void> inline constexpr bool alloc_is_recursive = false; template <typename Cont, typename Elem> inline constexpr bool alloc_is_recursive< Cont, Elem, folly:: void_t<typename Cont::allocator_type, typename Elem::allocator_type>> = std::uses_allocator<Elem, typename Cont::allocator_type>::value; template <typename Cont, typename Elem> inline constexpr bool alloc_should_propagate = alloc_is_recursive<Cont, Elem> && !std::uses_allocator<Cont, std::allocator<char>>::value; template <typename Map> inline constexpr bool alloc_should_propagate_map = alloc_should_propagate<Map, typename Map::key_type> || alloc_should_propagate<Map, typename Map::mapped_type>; template <typename C> std::enable_if_t< alloc_should_propagate<C, typename C::value_type>, typename C::value_type> default_set_element(C& c) ; template <typename C> std::enable_if_t< !alloc_should_propagate<C, typename C::value_type>, typename C::value_type> default_set_element(C&) ; template <typename Map> std::enable_if_t< alloc_should_propagate<Map, typename Map::key_type>, typename Map::key_type> default_map_key(Map& m) ; template <typename Map> std::enable_if_t< !alloc_should_propagate<Map, typename Map::key_type>, typename Map::key_type> default_map_key(Map&) ; template <typename C> std::enable_if_t< alloc_should_propagate<C, typename C::mapped_type>, typename C::mapped_type> default_map_value(C& map) ; template <typename C> std::enable_if_t< !alloc_should_propagate<C, typename C::mapped_type>, typename C::mapped_type> default_map_value(C&) ; } template <> class Cpp2Ops<folly::fbstring> { public: typedef folly::fbstring Type; static constexpr protocol::TType thriftType() ; template <class Protocol> static uint32_t write(Protocol* prot, const Type* value) ; template <class Protocol> static void read(Protocol* prot, Type* value) ; template <class Protocol> static uint32_t serializedSize(Protocol* prot, const Type* value) ; template <class Protocol> static uint32_t serializedSizeZC(Protocol* prot, const Type* value) ; }; template <> class Cpp2Ops<std::string> { public: typedef std::string Type; static constexpr protocol::TType thriftType() ; template <class Protocol> static uint32_t write(Protocol* prot, const Type* value) ; template <class Protocol> static void read(Protocol* prot, Type* value) ; template <class Protocol> static uint32_t serializedSize(Protocol* prot, const Type* value) ; template <class Protocol> static uint32_t serializedSizeZC(Protocol* prot, const Type* value) ; }; template <> class Cpp2Ops<int8_t> { public: typedef int8_t Type; static constexpr protocol::TType thriftType() ; template <class Protocol> static uint32_t write(Protocol* prot, const Type* value) ; template <class Protocol> static void read(Protocol* prot, Type* value) ; template <class Protocol> static uint32_t serializedSize(Protocol* prot, const Type* value) ; template <class Protocol> static uint32_t serializedSizeZC(Protocol* prot, const Type* value) ; }; template <> class Cpp2Ops<int16_t> { public: typedef int16_t Type; static constexpr protocol::TType thriftType() ; template <class Protocol> static uint32_t write(Protocol* prot, const Type* value) ; template <class Protocol> static void read(Protocol* prot, Type* value) ; template <class Protocol> static uint32_t serializedSize(Protocol* prot, const Type* value) ; template <class Protocol> static uint32_t serializedSizeZC(Protocol* prot, const Type* value) ; }; template <> class Cpp2Ops<int32_t> { public: typedef int32_t Type; static constexpr protocol::TType thriftType() ; template <class Protocol> static uint32_t write(Protocol* prot, const Type* value) ; template <class Protocol> static void read(Protocol* prot, Type* value) ; template <class Protocol> static uint32_t serializedSize(Protocol* prot, const Type* value) ; ; }; template <> class Cpp2Ops<int64_t> { public: typedef int64_t Type; ; ; ; ; }; template <> class Cpp2Ops<uint8_t> { public: using Type = uint8_t; using SignedType = std::make_signed_t<Type>; ; ; ; ; }; template <> class Cpp2Ops<uint16_t> { public: using Type = uint16_t; using SignedType = std::make_signed_t<Type>; ; ; ; ; }; template <> class Cpp2Ops<uint32_t> { public: using Type = uint32_t; using SignedType = std::make_signed_t<Type>; ; ; ; ; }; template <> class Cpp2Ops<uint64_t> { public: using Type = uint64_t; using SignedType = std::make_signed_t<Type>; ; ; ; ; }; template <> class Cpp2Ops<bool> { public: typedef bool Type; ; ; ; ; }; template <> class Cpp2Ops<double> { public: typedef double Type; ; ; ; ; }; template <class E> class Cpp2Ops<E, typename std::enable_if<std::is_enum<E>::value>::type> { public: typedef E Type; ; ; ; ; }; template <> class Cpp2Ops<float> { public: typedef float Type; ; ; ; ; }; namespace detail { ; ; } template <class L> class Cpp2Ops< L, folly::void_t<typename apache::thrift::detail::push_back_result<L>::type>> { private: ; ; public: typedef L Type; ; ; ; ; }; template <class S> class Cpp2Ops< S, folly::void_t< typename apache::thrift::detail::insert_key_result<S>::type>> { private: ; ; public: typedef S Type; ; ; ; ; }; template <class M> class Cpp2Ops< M, folly::void_t< typename apache::thrift::detail::subscript_key_result<M>::type>> { private: ; ; public: typedef M Type; ; ; ; ; }; template <> class Cpp2Ops<folly::IOBuf> { public: typedef folly::IOBuf Type; ; ; ; ; }; template <> class Cpp2Ops<std::unique_ptr<folly::IOBuf>> { public: typedef std::unique_ptr<folly::IOBuf> Type; ; ; ; ; }; template <class T> class Cpp2Ops< T, std::enable_if_t< is_thrift_class_v<T> && !folly::is_detected_v<detect_indirection_fn_t, T>>> { public: typedef T Type; ; ; ; ; }; template <class T> class Cpp2Ops< T, std::enable_if_t<folly::is_detected_v<detect_indirection_fn_t, T>>> { private: using S = folly::remove_cvref_t< folly::invoke_result_t<detail::apply_indirection_fn, T>>; public: using Type = T; ; ; ; ; }; } } namespace folly { template <class Value> class Optional; } namespace apache { namespace thrift { namespace detail { union ThriftValue; using OptionalThriftValue = folly::Optional<ThriftValue>; using VoidFuncPtr = void (*)(void*); struct TypeInfo { protocol::TType type; OptionalThriftValue (*get)(const void* object, const TypeInfo& typeInfo); VoidFuncPtr set; const void* typeExt; }; template <typename TypeClass, typename T, typename Enable = void> struct TypeToInfo; } } } namespace folly { } namespace folly { namespace detail { template <typename T> struct atomic_ref_base { static_assert(sizeof(T) == sizeof(std::atomic<T>), "size mismatch"); static_assert( std::is_trivially_copyable_v<T>, "value not trivially-copyable"); using value_type = T; static inline constexpr std::size_t required_alignment = alignof(std::atomic<T>); private: T& ref_; }; template <typename T> struct atomic_ref_integral_base : atomic_ref_base<T> { using atomic_ref_base<T>::atomic_ref_base; using atomic_ref_base<T>::atomic; }; template <typename T> using atomic_ref_select = conditional_t< std::is_integral<T>::value && !std::is_same<T, bool>::value, atomic_ref_integral_base<T>, atomic_ref_base<T>>; } template <typename T> class atomic_ref : public detail::atomic_ref_select<T> { private: using base = detail::atomic_ref_select<T>; public: using base::base; }; ; struct make_atomic_ref_t { ; }; inline constexpr make_atomic_ref_t make_atomic_ref; } namespace folly { struct CacheLocality { size_t numCpus; std::vector<size_t> numCachesByLevel; std::vector<size_t> localityIndexByCpu; ; }; struct Getcpu { typedef int (*Func)(unsigned* cpu, unsigned* node, void* unused); }; struct SequentialThreadId { }; struct HashingThreadId { }; template <typename ThreadId> struct FallbackGetcpu { }; using FallbackGetcpuType = FallbackGetcpu< conditional_t<kIsMobile, HashingThreadId, SequentialThreadId>>; namespace detail { class AccessSpreaderBase { protected: enum { kMaxCpus = kIsMobile ? 16 : 256, }; using CompactStripe = uint8_t; static_assert( (kMaxCpus & (kMaxCpus - 1)) == 0, "kMaxCpus should be a power of two so modulo is fast"); static_assert( kMaxCpus - 1 <= std::numeric_limits<CompactStripe>::max(), "stripeByCpu element type isn't wide enough"); using CompactStripeTable = CompactStripe[kMaxCpus + 1][kMaxCpus]; struct GlobalState { mutable CompactStripeTable table; std::atomic<Getcpu::Func> getcpu; }; }; } template <template <typename> class Atom = std::atomic> struct AccessSpreader : private detail::AccessSpreaderBase { private: struct GlobalState : detail::AccessSpreaderBase::GlobalState {}; static_assert( std::is_trivially_destructible<GlobalState>::value, "unsuitable for global state"); public: __attribute__((__visibility__("default"))) static GlobalState& state() ; private: class CpuCache { public: private: static constexpr unsigned kMaxCachedCpuUses = 32; unsigned cachedCpu_ = 0; unsigned cachedCpuUses_ = 0; }; }; namespace detail { } template <typename T> class CoreAllocator : private std::allocator<T> { public: using value_type = T; ; template <typename U> struct rebind { using other = CoreAllocator<U>; }; }; class [[nodiscard]] CoreAllocatorGuard { public: private: size_t numStripes_; size_t stripe_; }; } namespace folly { namespace detail { enum class FutexResult { VALUE_CHANGED, AWOKEN, INTERRUPTED, TIMEDOUT, }; template <template <typename> class Atom = std::atomic> using Futex = Atom<std::uint32_t>; ; ; ; template <typename T> struct EmulatedFutexAtomic : public std::atomic<T> { }; } } namespace std __attribute__ ((__visibility__ ("default"))) { enum class cv_status { no_timeout, timeout }; class condition_variable { using steady_clock = chrono::steady_clock; using system_clock = chrono::system_clock; using __clock_t = steady_clock; __condvar _M_cond; public: typedef __gthread_cond_t* native_handle_type; ; ; ; ; ; ; ; private: ; ; }; struct __at_thread_exit_elt { __at_thread_exit_elt* _M_next; void (*_M_cb)(void*); }; inline namespace _V2 { class condition_variable_any { using __clock_t = chrono::steady_clock; condition_variable _M_cond; shared_ptr<mutex> _M_mutex; template<typename _Lock> struct _Unlock { #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" #pragma GCC diagnostic pop _Lock& _M_lock; }; public: ; ; ; ; ; ; ; ; ; }; } } namespace folly { namespace parking_lot_detail { struct WaitNodeBase { const uint64_t key_; const uint64_t lotid_; WaitNodeBase* next_{nullptr}; WaitNodeBase* prev_{nullptr}; bool signaled_; std::mutex mutex_; std::condition_variable cond_; ; }; extern std::atomic<uint64_t> idallocator; struct Bucket { std::mutex mutex_; WaitNodeBase* head_; WaitNodeBase* tail_; std::atomic<uint64_t> count_; }; } enum class UnparkControl { RetainContinue, RemoveContinue, RetainBreak, RemoveBreak, }; enum class ParkResult { Skip, Unpark, Timeout, }; template <typename Data = Unit> class ParkingLot { const uint64_t lotid_; struct WaitNode : public parking_lot_detail::WaitNodeBase { const Data data_; ; }; public: template <typename Key, typename D, typename ToPark, typename PreWait> ParkResult park(const Key key, D&& data, ToPark&& toPark, PreWait&& preWait) ; template < typename Key, typename D, typename ToPark, typename PreWait, typename Clock, typename Duration> ParkResult park_until( const Key key, D&& data, ToPark&& toPark, PreWait&& preWait, std::chrono::time_point<Clock, Duration> deadline); template < typename Key, typename D, typename ToPark, typename PreWait, typename Rep, typename Period> ParkResult park_for( const Key key, D&& data, ToPark&& toPark, PreWait&& preWait, std::chrono::duration<Rep, Period>& timeout) ; template <typename Key, typename Unparker> void unpark(const Key key, Unparker&& func); }; } namespace folly { namespace detail { template <typename TargetClock, typename Clock, typename Duration> typename TargetClock::time_point time_point_conv( std::chrono::time_point<Clock, Duration> const& time) ; int futexWakeImpl( const Futex<std::atomic>* futex, int count, uint32_t wakeMask); FutexResult futexWaitImpl( const Futex<std::atomic>* futex, uint32_t expected, std::chrono::system_clock::time_point const* absSystemTime, std::chrono::steady_clock::time_point const* absSteadyTime, uint32_t waitMask); int futexWakeImpl( const Futex<EmulatedFutexAtomic>* futex, int count, uint32_t wakeMask); FutexResult futexWaitImpl( const Futex<EmulatedFutexAtomic>* futex, uint32_t expected, std::chrono::system_clock::time_point const* absSystemTime, std::chrono::steady_clock::time_point const* absSteadyTime, uint32_t waitMask); template <typename Futex, typename Deadline> typename std::enable_if<Deadline::clock::is_steady, FutexResult>::type futexWaitImpl( Futex* futex, uint32_t expected, Deadline const& deadline, uint32_t waitMask) ; template <typename Futex, typename Deadline> typename std::enable_if<!Deadline::clock::is_steady, FutexResult>::type futexWaitImpl( Futex* futex, uint32_t expected, Deadline const& deadline, uint32_t waitMask) ; ; ; ; } } namespace folly { template <typename T> struct relaxed_atomic; namespace detail { template <typename T> struct relaxed_atomic_base : protected std::atomic<T> { private: using atomic = std::atomic<T>; public: using value_type = T; using atomic::atomic; T operator=(T desired) noexcept ; T operator=(T desired) volatile noexcept ; bool is_lock_free() const noexcept ; bool is_lock_free() const volatile noexcept ; void store(T desired) noexcept ; void store(T desired) volatile noexcept ; T load() const noexcept ; T load() const volatile noexcept ; operator T() const noexcept ; operator T() const volatile noexcept ; T exchange(T desired) noexcept ; T exchange(T desired) volatile noexcept ; bool compare_exchange_weak(T& expected, T desired) noexcept ; bool compare_exchange_weak(T& expected, T desired) volatile noexcept ; bool compare_exchange_strong(T& expected, T desired) noexcept ; bool compare_exchange_strong(T& expected, T desired) volatile noexcept ; }; template <typename T> struct relaxed_atomic_integral_base : private relaxed_atomic_base<T> { private: using atomic = std::atomic<T>; using base = relaxed_atomic_base<T>; public: using typename base::value_type; using base::relaxed_atomic_base; using base::operator=; using base::operator T; using base::compare_exchange_strong; using base::compare_exchange_weak; using base::exchange; using base::is_lock_free; using base::load; using base::store; T fetch_add(T arg) noexcept ; T fetch_add(T arg) volatile noexcept ; T fetch_sub(T arg) noexcept ; T fetch_sub(T arg) volatile noexcept ; T fetch_and(T arg) noexcept ; T fetch_and(T arg) volatile noexcept ; T fetch_or(T arg) noexcept ; T fetch_or(T arg) volatile noexcept ; T fetch_xor(T arg) noexcept ; T fetch_xor(T arg) volatile noexcept ; T operator++() noexcept ; T operator++() volatile noexcept ; T operator++(int) noexcept ; T operator++(int) volatile noexcept ; T operator--() noexcept ; T operator--() volatile noexcept ; T operator--(int) noexcept ; T operator--(int) volatile noexcept ; T operator+=(T arg) noexcept ; T operator+=(T arg) volatile noexcept ; T operator-=(T arg) noexcept ; T operator-=(T arg) volatile noexcept ; T operator&=(T arg) noexcept ; T operator&=(T arg) volatile noexcept ; T operator|=(T arg) noexcept ; T operator|=(T arg) volatile noexcept ; T operator^=(T arg) noexcept ; T operator^=(T arg) volatile noexcept ; }; } template <> struct relaxed_atomic<bool> : detail::relaxed_atomic_base<bool> { private: using base = detail::relaxed_atomic_base<bool>; public: using typename base::value_type; using base::relaxed_atomic_base; using base::operator=; using base::operator bool; }; using relaxed_atomic_bool = relaxed_atomic<bool>; template <typename T> struct relaxed_atomic : detail::relaxed_atomic_base<T> { private: using base = detail::relaxed_atomic_base<T>; public: using typename base::value_type; using base::relaxed_atomic_base; using base::operator=; using base::operator T; }; template <typename T> struct relaxed_atomic<T*> : detail::relaxed_atomic_base<T*> { private: using atomic = std::atomic<T*>; using base = detail::relaxed_atomic_base<T*>; public: using typename base::value_type; using detail::relaxed_atomic_base<T*>::relaxed_atomic_base; using base::operator=; using base::operator T*; T* fetch_add(std::ptrdiff_t arg) noexcept ; T* fetch_add(std::ptrdiff_t arg) volatile noexcept ; T* fetch_sub(std::ptrdiff_t arg) noexcept ; T* fetch_sub(std::ptrdiff_t arg) volatile noexcept ; T* operator++() noexcept ; T* operator++() volatile noexcept ; T* operator++(int) noexcept ; T* operator++(int) volatile noexcept ; T* operator--() noexcept ; T* operator--() volatile noexcept ; T* operator--(int) noexcept ; T* operator--(int) volatile noexcept ; T* operator+=(std::ptrdiff_t arg) noexcept ; T* operator+=(std::ptrdiff_t arg) volatile noexcept ; T* operator-=(std::ptrdiff_t arg) noexcept ; T* operator-=(std::ptrdiff_t arg) volatile noexcept ; }; template <typename T> relaxed_atomic(T) -> relaxed_atomic<T>; template <> struct relaxed_atomic<char> : detail::relaxed_atomic_integral_base<char> { private: using base = detail::relaxed_atomic_integral_base<char>; public: using base::relaxed_atomic_integral_base; using base::operator=; using base::operator char; }; template <> struct relaxed_atomic<signed char> : detail::relaxed_atomic_integral_base<signed char> { private: using base = detail::relaxed_atomic_integral_base<signed char>; public: using base::relaxed_atomic_integral_base; using base::operator=; using base::operator signed char; }; template <> struct relaxed_atomic<unsigned char> : detail::relaxed_atomic_integral_base<unsigned char> { private: using base = detail::relaxed_atomic_integral_base<unsigned char>; public: using base::relaxed_atomic_integral_base; using base::operator=; using base::operator unsigned char; }; template <> struct relaxed_atomic<signed short> : detail::relaxed_atomic_integral_base<signed short> { private: using base = detail::relaxed_atomic_integral_base<signed short>; public: using base::relaxed_atomic_integral_base; using base::operator=; using base::operator signed short; }; template <> struct relaxed_atomic<unsigned short> : detail::relaxed_atomic_integral_base<unsigned short> { private: using base = detail::relaxed_atomic_integral_base<unsigned short>; public: using base::relaxed_atomic_integral_base; using base::operator=; using base::operator unsigned short; }; template <> struct relaxed_atomic<signed int> : detail::relaxed_atomic_integral_base<signed int> { private: using base = detail::relaxed_atomic_integral_base<signed int>; public: using base::relaxed_atomic_integral_base; using base::operator=; using base::operator signed int; }; template <> struct relaxed_atomic<unsigned int> : detail::relaxed_atomic_integral_base<unsigned int> { private: using base = detail::relaxed_atomic_integral_base<unsigned int>; public: using base::relaxed_atomic_integral_base; using base::operator=; using base::operator unsigned int; }; template <> struct relaxed_atomic<signed long> : detail::relaxed_atomic_integral_base<signed long> { private: using base = detail::relaxed_atomic_integral_base<signed long>; public: using base::relaxed_atomic_integral_base; using base::operator=; using base::operator signed long; }; template <> struct relaxed_atomic<unsigned long> : detail::relaxed_atomic_integral_base<unsigned long> { private: using base = detail::relaxed_atomic_integral_base<unsigned long>; public: using base::relaxed_atomic_integral_base; using base::operator=; using base::operator unsigned long; }; template <> struct relaxed_atomic<signed long long> : detail::relaxed_atomic_integral_base<signed long long> { private: using base = detail::relaxed_atomic_integral_base<signed long long>; public: using base::relaxed_atomic_integral_base; using base::operator=; using base::operator signed long long; }; template <> struct relaxed_atomic<unsigned long long> : detail::relaxed_atomic_integral_base<unsigned long long> { private: using base = detail::relaxed_atomic_integral_base<unsigned long long>; public: using base::relaxed_atomic_integral_base; using base::operator=; using base::operator unsigned long long; }; using relaxed_atomic_char = relaxed_atomic<char>; using relaxed_atomic_schar = relaxed_atomic<signed char>; using relaxed_atomic_uchar = relaxed_atomic<unsigned char>; using relaxed_atomic_short = relaxed_atomic<short>; using relaxed_atomic_ushort = relaxed_atomic<unsigned short>; using relaxed_atomic_int = relaxed_atomic<int>; using relaxed_atomic_uint = relaxed_atomic<unsigned int>; using relaxed_atomic_long = relaxed_atomic<long>; using relaxed_atomic_ulong = relaxed_atomic<unsigned long>; using relaxed_atomic_llong = relaxed_atomic<long long>; using relaxed_atomic_ullong = relaxed_atomic<unsigned long long>; using relaxed_atomic_char16_t = relaxed_atomic<char16_t>; using relaxed_atomic_char32_t = relaxed_atomic<char32_t>; using relaxed_atomic_wchar_t = relaxed_atomic<wchar_t>; using relaxed_atomic_int8_t = relaxed_atomic<std::int8_t>; using relaxed_atomic_uint8_t = relaxed_atomic<std::uint8_t>; using relaxed_atomic_int16_t = relaxed_atomic<std::int16_t>; using relaxed_atomic_uint16_t = relaxed_atomic<std::uint16_t>; using relaxed_atomic_int32_t = relaxed_atomic<std::int32_t>; using relaxed_atomic_uint32_t = relaxed_atomic<std::uint32_t>; using relaxed_atomic_int64_t = relaxed_atomic<std::int64_t>; using relaxed_atomic_uint64_t = relaxed_atomic<std::uint64_t>; using relaxed_atomic_int_least8_t = relaxed_atomic<std::int_least8_t>; using relaxed_atomic_uint_least8_t = relaxed_atomic<std::uint_least8_t>; using relaxed_atomic_int_least16_t = relaxed_atomic<std::int_least16_t>; using relaxed_atomic_uint_least16_t = relaxed_atomic<std::uint_least16_t>; using relaxed_atomic_int_least32_t = relaxed_atomic<std::int_least32_t>; using relaxed_atomic_uint_least32_t = relaxed_atomic<std::uint_least32_t>; using relaxed_atomic_int_least64_t = relaxed_atomic<std::int_least64_t>; using relaxed_atomic_uint_least64_t = relaxed_atomic<std::uint_least64_t>; using relaxed_atomic_int_fast8_t = relaxed_atomic<std::int_fast8_t>; using relaxed_atomic_uint_fast8_t = relaxed_atomic<std::uint_fast8_t>; using relaxed_atomic_int_fast16_t = relaxed_atomic<std::int_fast16_t>; using relaxed_atomic_uint_fast16_t = relaxed_atomic<std::uint_fast16_t>; using relaxed_atomic_int_fast32_t = relaxed_atomic<std::int_fast32_t>; using relaxed_atomic_uint_fast32_t = relaxed_atomic<std::uint_fast32_t>; using relaxed_atomic_int_fast64_t = relaxed_atomic<std::int_fast64_t>; using relaxed_atomic_uint_fast64_t = relaxed_atomic<std::uint_fast64_t>; using relaxed_atomic_intptr_t = relaxed_atomic<std::intptr_t>; using relaxed_atomic_uintptr_t = relaxed_atomic<std::uintptr_t>; using relaxed_atomic_size_t = relaxed_atomic<std::size_t>; using relaxed_atomic_ptrdiff_t = relaxed_atomic<std::ptrdiff_t>; using relaxed_atomic_intmax_t = relaxed_atomic<std::intmax_t>; using relaxed_atomic_uintmax_t = relaxed_atomic<std::uintmax_t>; } namespace folly { uint64_t getCurrentThreadID(); uint64_t getOSThreadID(); } namespace folly { struct SharedMutexToken { enum class State : uint16_t { Invalid = 0, LockedShared, LockedInlineShared, LockedDeferredShared, }; State state_{}; uint16_t slot_{}; constexpr SharedMutexToken() = default; explicit operator bool() const ; }; struct SharedMutexPolicyDefault { static constexpr uint64_t max_spin_cycles = 4000; static constexpr uint32_t max_soft_yield_count = 1; static constexpr bool track_thread_id = false; static constexpr bool skip_annotate_rwlock = false; }; namespace shared_mutex_detail { struct PolicyTracked : SharedMutexPolicyDefault { static constexpr bool track_thread_id = true; }; struct PolicySuppressTSAN : SharedMutexPolicyDefault { static constexpr bool skip_annotate_rwlock = true; }; std::unique_lock<std::mutex> annotationGuard(void* ptr); constexpr uint32_t kMaxDeferredReadersAllocated = 256 * 2; __attribute__((__cold__)) uint32_t getMaxDeferredReadersSlow(relaxed_atomic<uint32_t>& cache); long getCurrentThreadInvoluntaryContextSwitchCount(); __attribute__((__visibility__("default"))) __attribute__((__always_inline__)) uint32_t getMaxDeferredReaders() ; class NopOwnershipTracker { public: void beginThreadOwnership() ; void maybeBeginThreadOwnership(bool) ; void endThreadOwnership() ; }; class ThreadIdOwnershipTracker { public: void beginThreadOwnership() ; void maybeBeginThreadOwnership(bool own) ; void endThreadOwnership() ; private: static unsigned tid() ; private: unsigned ownerTid_ = 0; }; } template < bool ReaderPriority, typename Tag_ = void, template <typename> class Atom = std::atomic, typename Policy = SharedMutexPolicyDefault> class SharedMutexImpl : std::conditional_t< Policy::track_thread_id, shared_mutex_detail::ThreadIdOwnershipTracker, shared_mutex_detail::NopOwnershipTracker> { private: static constexpr bool AnnotateForThreadSanitizer = kIsSanitizeThread && !ReaderPriority && !Policy::skip_annotate_rwlock; typedef std::conditional_t< Policy::track_thread_id, shared_mutex_detail::ThreadIdOwnershipTracker, shared_mutex_detail::NopOwnershipTracker> OwnershipTrackerBase; public: static constexpr bool kReaderPriority = ReaderPriority; typedef Tag_ Tag; typedef SharedMutexToken Token; constexpr SharedMutexImpl() ; SharedMutexImpl(const SharedMutexImpl&) = delete; SharedMutexImpl(SharedMutexImpl&&) = delete; SharedMutexImpl& operator=(const SharedMutexImpl&) = delete; SharedMutexImpl& operator=(SharedMutexImpl&&) = delete; ~SharedMutexImpl() ; bool eligible_for_lock_elision() const ; bool eligible_for_lock_upgrade_elision() const ; bool eligible_for_lock_shared_elision() const ; void lock() ; bool try_lock() ; template <class Rep, class Period> bool try_lock_for(const std::chrono::duration<Rep, Period>& duration) ; template <class Clock, class Duration> bool try_lock_until( const std::chrono::time_point<Clock, Duration>& absDeadline) ; void unlock() ; void lock_shared() ; void lock_shared(Token& token) ; bool try_lock_shared() ; bool try_lock_shared(Token& token) ; template <class Rep, class Period> bool try_lock_shared_for(const std::chrono::duration<Rep, Period>& duration) ; template <class Rep, class Period> bool try_lock_shared_for( const std::chrono::duration<Rep, Period>& duration, Token& token) ; template <class Clock, class Duration> bool try_lock_shared_until( const std::chrono::time_point<Clock, Duration>& absDeadline) ; template <class Clock, class Duration> bool try_lock_shared_until( const std::chrono::time_point<Clock, Duration>& absDeadline, Token& token) ; void unlock_shared() ; void unlock_shared(Token& token) ; void release_token(Token& token) ; void unlock_and_lock_shared() ; void unlock_and_lock_shared(Token& token) ; void lock_upgrade() ; bool try_lock_upgrade() ; template <class Rep, class Period> bool try_lock_upgrade_for( const std::chrono::duration<Rep, Period>& duration) ; template <class Clock, class Duration> bool try_lock_upgrade_until( const std::chrono::time_point<Clock, Duration>& absDeadline) ; void unlock_upgrade() ; void unlock_upgrade_and_lock() ; void unlock_upgrade_and_lock_shared() ; void unlock_upgrade_and_lock_shared(Token& token) ; void unlock_and_lock_upgrade() ; private: typedef typename folly::detail::Futex<Atom> Futex; struct WaitForever { bool canBlock() ; bool canTimeOut() ; bool shouldTimeOut() ; bool doWait(Futex& futex, uint32_t expected, uint32_t waitMask) ; }; struct WaitNever { bool canBlock() ; bool canTimeOut() ; bool shouldTimeOut() ; bool doWait( Futex& , uint32_t , uint32_t ) ; }; template <class Rep, class Period> struct WaitForDuration { std::chrono::duration<Rep, Period> duration_; bool deadlineComputed_; std::chrono::steady_clock::time_point deadline_; explicit WaitForDuration(const std::chrono::duration<Rep, Period>& duration) ; std::chrono::steady_clock::time_point deadline() ; bool canBlock() ; bool canTimeOut() ; bool shouldTimeOut() ; bool doWait(Futex& futex, uint32_t expected, uint32_t waitMask) ; }; template <class Clock, class Duration> struct WaitUntilDeadline { std::chrono::time_point<Clock, Duration> absDeadline_; bool canBlock() ; bool canTimeOut() ; bool shouldTimeOut() ; bool doWait(Futex& futex, uint32_t expected, uint32_t waitMask) ; }; void annotateLazyCreate() ; void annotateDestroy() ; void annotateAcquired(annotate_rwlock_level w) ; void annotateTryAcquired(bool result, annotate_rwlock_level w) ; void annotateReleased(annotate_rwlock_level w) ; Futex state_{}; static constexpr uint32_t kIncrHasS = 1 << 11; static constexpr uint32_t kHasS = ~(kIncrHasS - 1); static constexpr uint32_t kAnnotationCreated = 1 << 10; static constexpr uint32_t kMayDefer = 1 << 9; static constexpr uint32_t kPrevDefer = 1 << 8; static constexpr uint32_t kHasE = 1 << 7; static constexpr uint32_t kBegunE = 1 << 6; static constexpr uint32_t kHasU = 1 << 5; static constexpr uint32_t kHasSolo = kHasE | kBegunE | kHasU; static constexpr uint32_t kWaitingNotS = 1 << 4; static constexpr uint32_t kWaitingESingle = 1 << 2; static constexpr uint32_t kWaitingEMultiple = 1 << 3; static constexpr uint32_t kWaitingE = kWaitingESingle | kWaitingEMultiple; static constexpr uint32_t kWaitingU = 1 << 1; static constexpr uint32_t kWaitingS = 1 << 0; static constexpr uint32_t kWaitingAny = kWaitingNotS | kWaitingE | kWaitingU | kWaitingS; static constexpr uint32_t kNumSharedToStartDeferring = 2; static constexpr uint64_t kMaxSpinCycles = Policy::max_spin_cycles; static constexpr uint32_t kMaxSoftYieldCount = Policy::max_soft_yield_count; public: static constexpr uint32_t kDeferredSearchDistance = 2; static constexpr uint32_t kDeferredSeparationFactor = 4; private: static_assert( !(kDeferredSearchDistance & (kDeferredSearchDistance - 1)), "kDeferredSearchDistance must be a power of 2"); static constexpr uintptr_t kTokenless = 0x1; __attribute__((__visibility__("default"))) __attribute__((__always_inline__)) static relaxed_atomic<uint32_t>& tls_lastTokenlessSlot() ; __attribute__((__visibility__("default"))) __attribute__((__always_inline__)) static relaxed_atomic<uint32_t>& tls_lastDeferredReaderSlot() ; public: typedef Atom<uintptr_t> DeferredReaderSlot; private: alignas(hardware_destructive_interference_size) static DeferredReaderSlot deferredReaders [shared_mutex_detail::kMaxDeferredReadersAllocated * kDeferredSeparationFactor]; template <class WaitContext> bool lockExclusiveImpl(uint32_t preconditionGoalMask, WaitContext& ctx) ; template <class WaitContext> bool lockExclusiveImpl( uint32_t& state, uint32_t preconditionGoalMask, WaitContext& ctx) ; template <class WaitContext> bool waitForZeroBits( uint32_t& state, uint32_t goal, uint32_t waitMask, WaitContext& ctx) ; template <class WaitContext> bool yieldWaitForZeroBits( uint32_t& state, uint32_t goal, uint32_t waitMask, WaitContext& ctx) ; template <class WaitContext> bool futexWaitForZeroBits( uint32_t& state, uint32_t goal, uint32_t waitMask, WaitContext& ctx) ; void wakeRegisteredWaiters(uint32_t& state, uint32_t wakeMask) ; void wakeRegisteredWaitersImpl(uint32_t& state, uint32_t wakeMask) ; void futexWakeAll(uint32_t wakeMask) ; DeferredReaderSlot* deferredReader(uint32_t slot) ; uintptr_t tokenfulSlotValue() ; uintptr_t tokenlessSlotValue() ; bool slotValueIsThis(uintptr_t slotValue) ; template <class WaitContext> void applyDeferredReaders(uint32_t& state, WaitContext& ctx) ; template <class WaitContext> void applyDeferredReaders(uint32_t& state, WaitContext& ctx, uint32_t slot) ; template <class WaitContext> bool lockSharedImpl(Token* token, WaitContext& ctx) ; template <class WaitContext> bool lockSharedImpl(uint32_t& state, Token* token, WaitContext& ctx); void cleanupTokenlessSharedDeferred(uint32_t& state) ; bool tryUnlockTokenlessSharedDeferred(); bool tryUnlockSharedDeferred(uint32_t slot) ; uint32_t unlockSharedInline() ; template <class WaitContext> bool lockUpgradeImpl(WaitContext& ctx) ; }; using SharedMutexReadPriority = SharedMutexImpl<true>; using SharedMutexWritePriority = SharedMutexImpl<false>; using SharedMutex = SharedMutexWritePriority; using SharedMutexTracked = SharedMutexImpl< false, void, std::atomic, shared_mutex_detail::PolicyTracked>; using SharedMutexSuppressTSAN = SharedMutexImpl< false, void, std::atomic, shared_mutex_detail::PolicySuppressTSAN>; extern template class SharedMutexImpl<true>; extern template class SharedMutexImpl<false>; template < bool ReaderPriority, typename Tag_, template <typename> class Atom, typename Policy> alignas(hardware_destructive_interference_size) typename SharedMutexImpl<ReaderPriority, Tag_, Atom, Policy>:: DeferredReaderSlot SharedMutexImpl<ReaderPriority, Tag_, Atom, Policy>::deferredReaders [shared_mutex_detail::kMaxDeferredReadersAllocated * kDeferredSeparationFactor] = {}; namespace shared_mutex_detail { [[noreturn]] void throwOperationNotPermitted(); [[noreturn]] void throwDeadlockWouldOccur(); } } namespace std { template < bool ReaderPriority, typename Tag_, template <typename> class Atom, typename Policy> class shared_lock< ::folly::SharedMutexImpl<ReaderPriority, Tag_, Atom, Policy>> { public: using mutex_type = ::folly::SharedMutexImpl<ReaderPriority, Tag_, Atom, Policy>; using token_type = typename mutex_type::Token; shared_lock() noexcept = default; [[nodiscard]] explicit shared_lock(mutex_type& mutex) ; shared_lock(mutex_type& mutex, std::defer_lock_t) ; [[nodiscard]] shared_lock(mutex_type& mutex, std::try_to_lock_t) ; [[nodiscard]] shared_lock(mutex_type& mutex, std::adopt_lock_t) ; template <typename Clock, typename Duration> [[nodiscard]] shared_lock( mutex_type& mutex, const std::chrono::time_point<Clock, Duration>& deadline) ; template <typename Rep, typename Period> [[nodiscard]] shared_lock( mutex_type& mutex, const std::chrono::duration<Rep, Period>& timeout) ; ~shared_lock() ; shared_lock(const shared_lock&) = delete; shared_lock& operator=(const shared_lock&) = delete; shared_lock(shared_lock&& other) ; shared_lock& operator=(shared_lock&& other) noexcept ; void lock() ; bool try_lock() ; template <typename Rep, typename Period> bool try_lock_for(const std::chrono::duration<Rep, Period>& timeout) ; template <typename Clock, typename Duration> bool try_lock_until( const std::chrono::time_point<Clock, Duration>& deadline) ; void unlock() ; void swap(shared_lock& other) noexcept ; mutex_type* release() noexcept ; [[nodiscard]] bool owns_lock() const noexcept ; explicit operator bool() const noexcept ; [[nodiscard]] mutex_type* mutex() const noexcept ; private: void error_if_not_lockable() const ; mutex_type* mutex_ = nullptr; token_type token_; }; } namespace apache { namespace thrift { namespace detail { template <typename T> constexpr ptrdiff_t fieldOffset(std::int16_t fieldIndex); template <typename T> constexpr ptrdiff_t issetOffset(std::int16_t fieldIndex); template <typename T> constexpr ptrdiff_t unionTypeOffset(); template <typename Ident, typename Adapter, FieldId Id, typename Ref> struct wrapped_struct_argument { static_assert(std::is_reference<Ref>::value, "not a reference"); Ref ref; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) explicit wrapped_struct_argument(Ref ref_) ; }; template <typename Ident, typename Adapter, FieldId Id, typename T> struct wrapped_struct_argument<Ident, Adapter, Id, std::initializer_list<T>> { std::initializer_list<T> ref; __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) explicit wrapped_struct_argument(std::initializer_list<T> list) ; }; template < typename Ident, typename Adapter = void, FieldId Id = static_cast<FieldId>(0), typename T> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) wrapped_struct_argument<Ident, Adapter, Id, std::initializer_list<T>> wrap_struct_argument(std::initializer_list<T> value) ; template < typename Ident, typename Adapter = void, FieldId Id = static_cast<FieldId>(0), typename T> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) wrapped_struct_argument<Ident, Adapter, Id, T&&> wrap_struct_argument(T&& value) ; template <typename Adapter, FieldId Id, typename F, typename T, typename S> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) typename std::enable_if<std::is_void<Adapter>::value>::type assign_struct_field(F f, T&& t, S&) ; template <typename Adapter, FieldId Id, typename F, typename T, typename S> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) void assign_struct_field(std::unique_ptr<F>& f, T&& t, S&) ; template <typename Adapter, FieldId Id, typename F, typename T, typename S> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) void assign_struct_field(std::shared_ptr<F>& f, T&& t, S&) ; template <typename Adapter, FieldId Id, typename F, typename T, typename S> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) typename std::enable_if<!std::is_void<Adapter>::value>::type assign_struct_field(F f, T&& t, S& s) ; template < typename Struct, typename... Ident, typename... Adapter, FieldId... Id, typename... T> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr Struct make_structured_constant( wrapped_struct_argument<Ident, Adapter, Id, T>... arg) ; template <typename S, typename... A, typename... T, typename TypeClass> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr S make_constant( TypeClass, wrapped_struct_argument<A, void, static_cast<FieldId>(0), T>... arg) ; template <typename T, std::enable_if_t<st::IsThriftClass<T>{}, int> = 0> constexpr bool operator!=(const T& lhs, const T& rhs) ; template <typename T, std::enable_if_t<st::IsThriftClass<T>{}, int> = 0> constexpr bool operator>(const T& lhs, const T& rhs) ; template <typename T, std::enable_if_t<st::IsThriftClass<T>{}, int> = 0> constexpr bool operator<=(const T& lhs, const T& rhs) ; template <typename T, std::enable_if_t<st::IsThriftClass<T>{}, int> = 0> constexpr bool operator>=(const T& lhs, const T& rhs) ; enum class IssetBitsetOption { Unpacked, Packed, PackedWithAtomic, }; template < size_t NumBits, IssetBitsetOption kOption = IssetBitsetOption::Unpacked> class isset_bitset { private: using IntType = std::conditional_t< kOption == IssetBitsetOption::PackedWithAtomic, std::atomic<uint8_t>, uint8_t>; public: bool get(size_t field_index) const ; void set(size_t field_index, bool isset_flag) ; const IntType& at(size_t field_index) const ; IntType& at(size_t field_index) ; uint8_t bit(size_t field_index) const ; static constexpr ptrdiff_t get_offset() ; private: static void check(size_t field_index) ; static constexpr size_t kBits = kOption == IssetBitsetOption::Unpacked ? 1 : 8; std::array< apache::thrift::detail::BitSet<IntType>, (NumBits + kBits - 1) / kBits> array_isset; }; namespace st { using DeserializationMutex = folly::SharedMutex; } template <class List, FieldOrdinal> struct at_impl { static_assert(sizeof(List) < 0, ""); }; template <class... Args, FieldOrdinal Ord> struct at_impl<folly::tag_t<Args...>, Ord> { using type = folly::type_pack_element_t<folly::to_underlying(Ord), void, Args...>; }; template <class List, FieldOrdinal Ord> using at = typename at_impl<List, Ord>::type; template <class T> consteval type::Ordinal findOrdinal( const T* first, const T* last, const T& value) ; template <class T, class List> class FindOrdinal { static_assert(sizeof(T) < 0, ""); }; template <class T, class... Args> class FindOrdinal<T, folly::tag_t<Args...>> { private: static constexpr bool matches[sizeof...(Args)] = { std::is_same<T, Args>::value...}; public: static constexpr auto value = findOrdinal(matches, std::end(matches), true); static consteval size_t count() ; }; template <class T, class List> inline constexpr type::Ordinal FindOrdinalInUniqueTypes = FindOrdinal<T, List>::value; template <int> struct IntTag {}; template < class A0 = IntTag<0> , class A1 = IntTag<1> , class A2 = IntTag<2> , class A3 = IntTag<3> , class A4 = IntTag<4> , class A5 = IntTag<5> , class A6 = IntTag<6> , class A7 = IntTag<7> , class A8 = IntTag<8> , class A9 = IntTag<9> , class A10 = IntTag<10> , class A11 = IntTag<11> , class A12 = IntTag<12> , class A13 = IntTag<13> , class A14 = IntTag<14> , class A15 = IntTag<15> , class A16 = IntTag<16> , class A17 = IntTag<17> , class A18 = IntTag<18> , class A19 = IntTag<19> , class A20 = IntTag<20> , class A21 = IntTag<21> , class A22 = IntTag<22> , class A23 = IntTag<23> , class A24 = IntTag<24> , class A25 = IntTag<25> , class A26 = IntTag<26> , class A27 = IntTag<27> , class A28 = IntTag<28> , class A29 = IntTag<29> , class A30 = IntTag<30> , class A31 = IntTag<31> , class A32 = IntTag<32> , class A33 = IntTag<33> , class A34 = IntTag<34> , class A35 = IntTag<35> , class A36 = IntTag<36> , class A37 = IntTag<37> , class A38 = IntTag<38> , class A39 = IntTag<39> , class A40 = IntTag<40> , class A41 = IntTag<41> , class A42 = IntTag<42> , class A43 = IntTag<43> , class A44 = IntTag<44> , class A45 = IntTag<45> , class A46 = IntTag<46> , class A47 = IntTag<47> , class A48 = IntTag<48> , class A49 = IntTag<49> , class A50 = IntTag<50> , class A51 = IntTag<51> , class A52 = IntTag<52> , class A53 = IntTag<53> , class A54 = IntTag<54> , class A55 = IntTag<55> , class A56 = IntTag<56> , class A57 = IntTag<57> , class A58 = IntTag<58> , class A59 = IntTag<59> , class A60 = IntTag<60> , class A61 = IntTag<61> , class A62 = IntTag<62> > struct MultiWayLookup { template <class> static const int value = 0; template <> static const int value<A0> = 0 + 1; template <> static const int value<A1> = 1 + 1; template <> static const int value<A2> = 2 + 1; template <> static const int value<A3> = 3 + 1; template <> static const int value<A4> = 4 + 1; template <> static const int value<A5> = 5 + 1; template <> static const int value<A6> = 6 + 1; template <> static const int value<A7> = 7 + 1; template <> static const int value<A8> = 8 + 1; template <> static const int value<A9> = 9 + 1; template <> static const int value<A10> = 10 + 1; template <> static const int value<A11> = 11 + 1; template <> static const int value<A12> = 12 + 1; template <> static const int value<A13> = 13 + 1; template <> static const int value<A14> = 14 + 1; template <> static const int value<A15> = 15 + 1; template <> static const int value<A16> = 16 + 1; template <> static const int value<A17> = 17 + 1; template <> static const int value<A18> = 18 + 1; template <> static const int value<A19> = 19 + 1; template <> static const int value<A20> = 20 + 1; template <> static const int value<A21> = 21 + 1; template <> static const int value<A22> = 22 + 1; template <> static const int value<A23> = 23 + 1; template <> static const int value<A24> = 24 + 1; template <> static const int value<A25> = 25 + 1; template <> static const int value<A26> = 26 + 1; template <> static const int value<A27> = 27 + 1; template <> static const int value<A28> = 28 + 1; template <> static const int value<A29> = 29 + 1; template <> static const int value<A30> = 30 + 1; template <> static const int value<A31> = 31 + 1; template <> static const int value<A32> = 32 + 1; template <> static const int value<A33> = 33 + 1; template <> static const int value<A34> = 34 + 1; template <> static const int value<A35> = 35 + 1; template <> static const int value<A36> = 36 + 1; template <> static const int value<A37> = 37 + 1; template <> static const int value<A38> = 38 + 1; template <> static const int value<A39> = 39 + 1; template <> static const int value<A40> = 40 + 1; template <> static const int value<A41> = 41 + 1; template <> static const int value<A42> = 42 + 1; template <> static const int value<A43> = 43 + 1; template <> static const int value<A44> = 44 + 1; template <> static const int value<A45> = 45 + 1; template <> static const int value<A46> = 46 + 1; template <> static const int value<A47> = 47 + 1; template <> static const int value<A48> = 48 + 1; template <> static const int value<A49> = 49 + 1; template <> static const int value<A50> = 50 + 1; template <> static const int value<A51> = 51 + 1; template <> static const int value<A52> = 52 + 1; template <> static const int value<A53> = 53 + 1; template <> static const int value<A54> = 54 + 1; template <> static const int value<A55> = 55 + 1; template <> static const int value<A56> = 56 + 1; template <> static const int value<A57> = 57 + 1; template <> static const int value<A58> = 58 + 1; template <> static const int value<A59> = 59 + 1; template <> static const int value<A60> = 60 + 1; template <> static const int value<A61> = 61 + 1; template <> static const int value<A62> = 62 + 1; }; template <class T, class... Args> struct FindOrdinalInUniqueTypesImpl; template <int Found, class... Args> struct FoundOrdinalOrCheckTheRest : field_ordinal<Found> {}; template <type::Ordinal ord> using Rest = field_ordinal< ord == static_cast<type::Ordinal>(0) ? 0 : folly::to_underlying(ord) + 63>; template <class... Args> struct FoundOrdinalOrCheckTheRest<0, Args...> : Rest<FindOrdinalInUniqueTypesImpl<Args...>::value> {}; template <class T, class... Args> struct FindOrdinalInUniqueTypesImpl : field_ordinal<MultiWayLookup<Args...>::template value<T>> {}; template <class T, class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 , class A13 , class A14 , class A15 , class A16 , class A17 , class A18 , class A19 , class A20 , class A21 , class A22 , class A23 , class A24 , class A25 , class A26 , class A27 , class A28 , class A29 , class A30 , class A31 , class A32 , class A33 , class A34 , class A35 , class A36 , class A37 , class A38 , class A39 , class A40 , class A41 , class A42 , class A43 , class A44 , class A45 , class A46 , class A47 , class A48 , class A49 , class A50 , class A51 , class A52 , class A53 , class A54 , class A55 , class A56 , class A57 , class A58 , class A59 , class A60 , class A61 , class A62, class... Args> struct FindOrdinalInUniqueTypesImpl<T, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35 , A36 , A37 , A38 , A39 , A40 , A41 , A42 , A43 , A44 , A45 , A46 , A47 , A48 , A49 , A50 , A51 , A52 , A53 , A54 , A55 , A56 , A57 , A58 , A59 , A60 , A61 , A62, Args...> : FoundOrdinalOrCheckTheRest< MultiWayLookup< A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20 , A21 , A22 , A23 , A24 , A25 , A26 , A27 , A28 , A29 , A30 , A31 , A32 , A33 , A34 , A35 , A36 , A37 , A38 , A39 , A40 , A41 , A42 , A43 , A44 , A45 , A46 , A47 , A48 , A49 , A50 , A51 , A52 , A53 , A54 , A55 , A56 , A57 , A58 , A59 , A60 , A61 , A62>::template value<T>, T, Args...> {}; template <class T, class... Args> inline constexpr type::Ordinal FindOrdinalInUniqueTypes<T, folly::tag_t<Args...>> = FindOrdinalInUniqueTypesImpl<T, Args...>::value; template <class Id, class Idents, class TypeTags, class IdList> consteval std::enable_if_t<std::is_same<Id, void>::value, FieldOrdinal> getFieldOrdinal(IdList&&) ; template <class Id, class Idents, class TypeTags, class IdList> consteval std::enable_if_t<type::is_field_id_v<Id>, FieldOrdinal> getFieldOrdinal(IdList&& ids) ; template <class Id, class Idents, class TypeTags, class IdList> consteval std::enable_if_t<type::is_ident_v<Id>, FieldOrdinal> getFieldOrdinal(IdList&&) ; template <class Id, class Idents, class TypeTags, class IdList> consteval std::enable_if_t<type::detail::is_type_tag_v<Id>, FieldOrdinal> getFieldOrdinal(IdList&&) ; } namespace ident { template <class T> void __fbthrift_check_whether_type_is_ident_via_adl(T&&); } } } namespace apache::thrift::detail::annotation { const std::vector<std::any>& empty_annotations() ; template <class Struct> const std::vector<std::any>& field_annotation_values(FieldId) ; template <class T> inline constexpr bool is_runtime_annotation = decltype(detail::st::struct_private_access:: __fbthrift_cpp2_is_runtime_annotation<T>())::value; } namespace apache::thrift { template <class Annotation, class Struct, class Id> const Annotation* get_field_annotation() ; } namespace apache { namespace thrift { namespace ident { struct block; struct offset; struct size; struct parent_entry; struct first_entry; struct mode_index; struct owner_index; struct group_index; struct atime_offset; struct mtime_offset; struct ctime_offset; struct name_index_v2_2; struct inode_v2_2; struct name_index; struct inode_num; struct mtime_only; struct time_resolution_sec; struct packed_chunk_table; struct packed_directories; struct packed_shared_files_table; struct buffer; struct symtab; struct index; struct packed_index; struct chunks; struct directories; struct inodes; struct chunk_table; struct entry_table_v2_2; struct symlink_table; struct uids; struct gids; struct modes; struct names; struct symlinks; struct timestamp_base; struct block_size; struct total_fs_size; struct devices; struct options; struct dir_entries; struct shared_files_table; struct total_hardlink_size; struct dwarfs_version; struct create_timestamp; struct compact_names; struct compact_symlinks; struct preferred_path_separator; struct features; struct category_names; struct block_categories; } namespace detail { template <> struct invoke_reffer<::apache::thrift::ident::block> { template <typename T> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(T&& t) const noexcept(noexcept(static_cast<T&&>(t).block_ref())) -> decltype(static_cast<T&&>(t).block_ref()) ; }; template <> struct invoke_reffer<::apache::thrift::ident::offset> { template <typename T> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(T&& t) const noexcept(noexcept(static_cast<T&&>(t).offset_ref())) -> decltype(static_cast<T&&>(t).offset_ref()) ; }; template <> struct invoke_reffer<::apache::thrift::ident::size> { template <typename T> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(T&& t) const noexcept(noexcept(static_cast<T&&>(t).size_ref())) -> decltype(static_cast<T&&>(t).size_ref()) ; }; template <> struct invoke_reffer<::apache::thrift::ident::parent_entry> { template <typename T> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(T&& t) const noexcept(noexcept(static_cast<T&&>(t).parent_entry_ref())) -> decltype(static_cast<T&&>(t).parent_entry_ref()) ; }; template <> struct invoke_reffer<::apache::thrift::ident::first_entry> { template <typename T> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(T&& t) const noexcept(noexcept(static_cast<T&&>(t).first_entry_ref())) -> decltype(static_cast<T&&>(t).first_entry_ref()) ; }; template <> struct invoke_reffer<::apache::thrift::ident::mode_index> { template <typename T> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(T&& t) const noexcept(noexcept(static_cast<T&&>(t).mode_index_ref())) -> decltype(static_cast<T&&>(t).mode_index_ref()) ; }; template <> struct invoke_reffer<::apache::thrift::ident::owner_index> { template <typename T> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(T&& t) const noexcept(noexcept(static_cast<T&&>(t).owner_index_ref())) -> decltype(static_cast<T&&>(t).owner_index_ref()) ; }; template <> struct invoke_reffer<::apache::thrift::ident::group_index> { template <typename T> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(T&& t) const noexcept(noexcept(static_cast<T&&>(t).group_index_ref())) -> decltype(static_cast<T&&>(t).group_index_ref()) ; }; template <> struct invoke_reffer<::apache::thrift::ident::atime_offset> { template <typename T> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(T&& t) const noexcept(noexcept(static_cast<T&&>(t).atime_offset_ref())) -> decltype(static_cast<T&&>(t).atime_offset_ref()) ; }; template <> struct invoke_reffer<::apache::thrift::ident::mtime_offset> { template <typename T> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(T&& t) const noexcept(noexcept(static_cast<T&&>(t).mtime_offset_ref())) -> decltype(static_cast<T&&>(t).mtime_offset_ref()) ; }; template <> struct invoke_reffer<::apache::thrift::ident::ctime_offset> { template <typename T> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(T&& t) const noexcept(noexcept(static_cast<T&&>(t).ctime_offset_ref())) -> decltype(static_cast<T&&>(t).ctime_offset_ref()) ; }; template <> struct invoke_reffer<::apache::thrift::ident::name_index_v2_2> { template <typename T> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(T&& t) const noexcept(noexcept(static_cast<T&&>(t).name_index_v2_2_ref())) -> decltype(static_cast<T&&>(t).name_index_v2_2_ref()) ; }; template <> struct invoke_reffer<::apache::thrift::ident::inode_v2_2> { template <typename T> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(T&& t) const noexcept(noexcept(static_cast<T&&>(t).inode_v2_2_ref())) -> decltype(static_cast<T&&>(t).inode_v2_2_ref()) ; }; template <> struct invoke_reffer<::apache::thrift::ident::name_index> { template <typename T> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(T&& t) const noexcept(noexcept(static_cast<T&&>(t).name_index_ref())) -> decltype(static_cast<T&&>(t).name_index_ref()) ; }; template <> struct invoke_reffer<::apache::thrift::ident::inode_num> { template <typename T> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(T&& t) const noexcept(noexcept(static_cast<T&&>(t).inode_num_ref())) -> decltype(static_cast<T&&>(t).inode_num_ref()) ; }; template <> struct invoke_reffer<::apache::thrift::ident::mtime_only> { template <typename T> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(T&& t) const noexcept(noexcept(static_cast<T&&>(t).mtime_only_ref())) -> decltype(static_cast<T&&>(t).mtime_only_ref()) ; }; template <> struct invoke_reffer<::apache::thrift::ident::time_resolution_sec> { template <typename T> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(T&& t) const noexcept(noexcept(static_cast<T&&>(t).time_resolution_sec_ref())) -> decltype(static_cast<T&&>(t).time_resolution_sec_ref()) ; }; template <> struct invoke_reffer<::apache::thrift::ident::packed_chunk_table> { template <typename T> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(T&& t) const noexcept(noexcept(static_cast<T&&>(t).packed_chunk_table_ref())) -> decltype(static_cast<T&&>(t).packed_chunk_table_ref()) ; }; template <> struct invoke_reffer<::apache::thrift::ident::packed_directories> { ; }; template <> struct invoke_reffer<::apache::thrift::ident::packed_shared_files_table> { ; }; template <> struct invoke_reffer<::apache::thrift::ident::buffer> { ; }; template <> struct invoke_reffer<::apache::thrift::ident::symtab> { ; }; template <> struct invoke_reffer<::apache::thrift::ident::index> { ; }; template <> struct invoke_reffer<::apache::thrift::ident::packed_index> { ; }; template <> struct invoke_reffer<::apache::thrift::ident::chunks> { ; }; template <> struct invoke_reffer<::apache::thrift::ident::directories> { ; }; template <> struct invoke_reffer<::apache::thrift::ident::inodes> { ; }; template <> struct invoke_reffer<::apache::thrift::ident::chunk_table> { ; }; template <> struct invoke_reffer<::apache::thrift::ident::entry_table_v2_2> { ; }; template <> struct invoke_reffer<::apache::thrift::ident::symlink_table> { ; }; template <> struct invoke_reffer<::apache::thrift::ident::uids> { ; }; template <> struct invoke_reffer<::apache::thrift::ident::gids> { ; }; template <> struct invoke_reffer<::apache::thrift::ident::modes> { ; }; template <> struct invoke_reffer<::apache::thrift::ident::names> { ; }; template <> struct invoke_reffer<::apache::thrift::ident::symlinks> { ; }; template <> struct invoke_reffer<::apache::thrift::ident::timestamp_base> { ; }; template <> struct invoke_reffer<::apache::thrift::ident::block_size> { ; }; template <> struct invoke_reffer<::apache::thrift::ident::total_fs_size> { ; }; template <> struct invoke_reffer<::apache::thrift::ident::devices> { ; }; template <> struct invoke_reffer<::apache::thrift::ident::options> { ; }; template <> struct invoke_reffer<::apache::thrift::ident::dir_entries> { ; }; template <> struct invoke_reffer<::apache::thrift::ident::shared_files_table> { ; }; template <> struct invoke_reffer<::apache::thrift::ident::total_hardlink_size> { ; }; template <> struct invoke_reffer<::apache::thrift::ident::dwarfs_version> { ; }; template <> struct invoke_reffer<::apache::thrift::ident::create_timestamp> { ; }; template <> struct invoke_reffer<::apache::thrift::ident::compact_names> { ; }; template <> struct invoke_reffer<::apache::thrift::ident::compact_symlinks> { ; }; template <> struct invoke_reffer<::apache::thrift::ident::preferred_path_separator> { ; }; template <> struct invoke_reffer<::apache::thrift::ident::features> { ; }; template <> struct invoke_reffer<::apache::thrift::ident::category_names> { ; }; template <> struct invoke_reffer<::apache::thrift::ident::block_categories> { ; }; } } } namespace dwarfs::thrift::metadata { class chunk; class directory; class inode_data; class dir_entry; class fs_options; class string_table; class metadata; } namespace apache::thrift::detail::annotation { } namespace apache::thrift::detail::qualifier { } namespace dwarfs::thrift::metadata { using ::apache::thrift::detail::operator!=; using ::apache::thrift::detail::operator>; using ::apache::thrift::detail::operator<=; using ::apache::thrift::detail::operator>=; typedef uint8_t UInt8; typedef uint16_t UInt16; typedef uint32_t UInt32; typedef uint64_t UInt64; class chunk final { private: friend struct ::apache::thrift::detail::st::struct_private_access; template<class> friend struct ::apache::thrift::detail::invoke_reffer; static constexpr bool __fbthrift_cpp2_gen_json = false; static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false; using __fbthrift_reflection_ident_list = folly::tag_t< ::apache::thrift::ident::block, ::apache::thrift::ident::offset, ::apache::thrift::ident::size >; static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,1,2,3}; using __fbthrift_reflection_type_tags = folly::tag_t< ::apache::thrift::type::cpp_type<uint32_t, ::apache::thrift::type::i32_t>, ::apache::thrift::type::cpp_type<uint32_t, ::apache::thrift::type::i32_t>, ::apache::thrift::type::cpp_type<uint32_t, ::apache::thrift::type::i32_t> >; static constexpr std::size_t __fbthrift_field_size_v = 3; template<class T> using __fbthrift_id = ::apache::thrift::type::field_id<__fbthrift_reflection_field_id_list[folly::to_underlying(T::value)]>; template<class T> using __fbthrift_type_tag = ::apache::thrift::detail::at<__fbthrift_reflection_type_tags, T::value>; template<class T> using __fbthrift_ident = ::apache::thrift::detail::at<__fbthrift_reflection_ident_list, T::value>; template<class T> using __fbthrift_ordinal = ::apache::thrift::type::ordinal_tag< ::apache::thrift::detail::getFieldOrdinal<T, __fbthrift_reflection_ident_list, __fbthrift_reflection_type_tags>( __fbthrift_reflection_field_id_list ) >; public: using __fbthrift_cpp2_type = chunk; static constexpr bool __fbthrift_cpp2_is_union = false; public: [[deprecated("This constructor is deprecated")]] chunk(chunk&&) noexcept; private: ::dwarfs::thrift::metadata::UInt32 __fbthrift_field_block; private: ::dwarfs::thrift::metadata::UInt32 __fbthrift_field_offset; private: ::dwarfs::thrift::metadata::UInt32 __fbthrift_field_size; private: apache::thrift::detail::isset_bitset<3, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset; public: ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; [[deprecated("Use `FOO.block_ref() = BAR;` instead of `FOO.set_block(BAR);`")]] [[deprecated("Use `FOO.offset_ref() = BAR;` instead of `FOO.set_offset(BAR);`")]] [[deprecated("Use `FOO.size_ref() = BAR;` instead of `FOO.set_size(BAR);`")]] ; ; ; ; private: ; friend class ::apache::thrift::Cpp2Ops<chunk>; }; class directory final { private: friend struct ::apache::thrift::detail::st::struct_private_access; template<class> friend struct ::apache::thrift::detail::invoke_reffer; static constexpr bool __fbthrift_cpp2_gen_json = false; static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false; using __fbthrift_reflection_ident_list = folly::tag_t< ::apache::thrift::ident::parent_entry, ::apache::thrift::ident::first_entry >; static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,1,2}; using __fbthrift_reflection_type_tags = folly::tag_t< ::apache::thrift::type::cpp_type<uint32_t, ::apache::thrift::type::i32_t>, ::apache::thrift::type::cpp_type<uint32_t, ::apache::thrift::type::i32_t> >; static constexpr std::size_t __fbthrift_field_size_v = 2; template<class T> using __fbthrift_id = ::apache::thrift::type::field_id<__fbthrift_reflection_field_id_list[folly::to_underlying(T::value)]>; template<class T> using __fbthrift_type_tag = ::apache::thrift::detail::at<__fbthrift_reflection_type_tags, T::value>; template<class T> using __fbthrift_ident = ::apache::thrift::detail::at<__fbthrift_reflection_ident_list, T::value>; template<class T> using __fbthrift_ordinal = ::apache::thrift::type::ordinal_tag< ::apache::thrift::detail::getFieldOrdinal<T, __fbthrift_reflection_ident_list, __fbthrift_reflection_type_tags>( __fbthrift_reflection_field_id_list ) >; public: using __fbthrift_cpp2_type = directory; static constexpr bool __fbthrift_cpp2_is_union = false; public: directory() ; [[deprecated("This constructor is deprecated")]] directory(directory&&) noexcept; directory(const directory& src); private: ::dwarfs::thrift::metadata::UInt32 __fbthrift_field_parent_entry; private: ::dwarfs::thrift::metadata::UInt32 __fbthrift_field_first_entry; private: apache::thrift::detail::isset_bitset<2, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset; public: ; ; ; ; ; ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> parent_entry() & ; ; ; ; ; ; ; ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> first_entry() & ; ; [[deprecated("Use `FOO.parent_entry_ref() = BAR;` instead of `FOO.set_parent_entry(BAR);`")]] [[deprecated("Use `FOO.first_entry_ref() = BAR;` instead of `FOO.set_first_entry(BAR);`")]] ; ; ; ; private: ; friend class ::apache::thrift::Cpp2Ops<directory>; }; class inode_data final { private: friend struct ::apache::thrift::detail::st::struct_private_access; template<class> friend struct ::apache::thrift::detail::invoke_reffer; static constexpr bool __fbthrift_cpp2_gen_json = false; static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false; using __fbthrift_reflection_ident_list = folly::tag_t< ::apache::thrift::ident::mode_index, ::apache::thrift::ident::owner_index, ::apache::thrift::ident::group_index, ::apache::thrift::ident::atime_offset, ::apache::thrift::ident::mtime_offset, ::apache::thrift::ident::ctime_offset, ::apache::thrift::ident::name_index_v2_2, ::apache::thrift::ident::inode_v2_2 >; static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,2,4,5,6,7,8,1,3}; using __fbthrift_reflection_type_tags = folly::tag_t< ::apache::thrift::type::cpp_type<uint32_t, ::apache::thrift::type::i32_t>, ::apache::thrift::type::cpp_type<uint32_t, ::apache::thrift::type::i32_t>, ::apache::thrift::type::cpp_type<uint32_t, ::apache::thrift::type::i32_t>, ::apache::thrift::type::cpp_type<uint64_t, ::apache::thrift::type::i64_t>, ::apache::thrift::type::cpp_type<uint64_t, ::apache::thrift::type::i64_t>, ::apache::thrift::type::cpp_type<uint64_t, ::apache::thrift::type::i64_t>, ::apache::thrift::type::cpp_type<uint32_t, ::apache::thrift::type::i32_t>, ::apache::thrift::type::cpp_type<uint32_t, ::apache::thrift::type::i32_t> >; static constexpr std::size_t __fbthrift_field_size_v = 8; template<class T> using __fbthrift_id = ::apache::thrift::type::field_id<__fbthrift_reflection_field_id_list[folly::to_underlying(T::value)]>; template<class T> using __fbthrift_type_tag = ::apache::thrift::detail::at<__fbthrift_reflection_type_tags, T::value>; template<class T> using __fbthrift_ident = ::apache::thrift::detail::at<__fbthrift_reflection_ident_list, T::value>; template<class T> using __fbthrift_ordinal = ::apache::thrift::type::ordinal_tag< ::apache::thrift::detail::getFieldOrdinal<T, __fbthrift_reflection_ident_list, __fbthrift_reflection_type_tags>( __fbthrift_reflection_field_id_list ) >; public: using __fbthrift_cpp2_type = inode_data; static constexpr bool __fbthrift_cpp2_is_union = false; public: [[deprecated("This constructor is deprecated")]] inode_data(inode_data&&) noexcept; private: ::dwarfs::thrift::metadata::UInt32 __fbthrift_field_mode_index; private: ::dwarfs::thrift::metadata::UInt32 __fbthrift_field_owner_index; private: ::dwarfs::thrift::metadata::UInt32 __fbthrift_field_group_index; private: ::dwarfs::thrift::metadata::UInt64 __fbthrift_field_atime_offset; private: ::dwarfs::thrift::metadata::UInt64 __fbthrift_field_mtime_offset; private: ::dwarfs::thrift::metadata::UInt64 __fbthrift_field_ctime_offset; private: ::dwarfs::thrift::metadata::UInt32 __fbthrift_field_name_index_v2_2; private: ::dwarfs::thrift::metadata::UInt32 __fbthrift_field_inode_v2_2; private: apache::thrift::detail::isset_bitset<8, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset; public: ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> mode_index_ref() const&& ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> mode_index_ref() & ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> mode_index_ref() && ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> mode_index() const& ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> mode_index() const&& ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> mode_index() & ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> mode_index() && ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> owner_index_ref() const& ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> owner_index_ref() const&& ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> owner_index_ref() & ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> owner_index_ref() && ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> owner_index() const& ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> owner_index() const&& ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> owner_index() & ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> owner_index() && ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> group_index_ref() const& ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> group_index_ref() const&& ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> group_index_ref() & ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> group_index_ref() && ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> group_index() const& ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> group_index() const&& ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> group_index() & ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> group_index() && ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt64> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> atime_offset_ref() const& ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt64> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> atime_offset_ref() const&& ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt64> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> atime_offset_ref() & ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt64> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> atime_offset_ref() && ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt64> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> atime_offset() const& ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt64> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> atime_offset() const&& ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt64> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> atime_offset() & ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt64> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> atime_offset() && ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt64> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> mtime_offset_ref() const& ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt64> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> mtime_offset_ref() const&& ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt64> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> mtime_offset_ref() & ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt64> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> mtime_offset_ref() && ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt64> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> mtime_offset() const& ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt64> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> mtime_offset() const&& ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt64> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> mtime_offset() & ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt64> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> mtime_offset() && ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt64> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> ctime_offset_ref() const& ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt64> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> ctime_offset_ref() const&& ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt64> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> ctime_offset_ref() & ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt64> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> ctime_offset_ref() && ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt64> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> ctime_offset() const& ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt64> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> ctime_offset() const&& ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt64> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> ctime_offset() & ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt64> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> ctime_offset() && ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> name_index_v2_2_ref() const& ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> name_index_v2_2_ref() const&& ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> name_index_v2_2_ref() & ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> name_index_v2_2_ref() && ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> name_index_v2_2() const& ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> name_index_v2_2() const&& ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> name_index_v2_2() & ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> name_index_v2_2() && ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> inode_v2_2_ref() const& ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> inode_v2_2_ref() const&& ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> inode_v2_2_ref() & ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> inode_v2_2_ref() && ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> inode_v2_2() const& ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> inode_v2_2() const&& ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> inode_v2_2() & ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> inode_v2_2() && ; ::dwarfs::thrift::metadata::UInt32 get_mode_index() const ; [[deprecated("Use `FOO.mode_index_ref() = BAR;` instead of `FOO.set_mode_index(BAR);`")]] ::dwarfs::thrift::metadata::UInt32& set_mode_index(::dwarfs::thrift::metadata::UInt32 mode_index_) ; ::dwarfs::thrift::metadata::UInt32 get_owner_index() const ; [[deprecated("Use `FOO.owner_index_ref() = BAR;` instead of `FOO.set_owner_index(BAR);`")]] ::dwarfs::thrift::metadata::UInt32& set_owner_index(::dwarfs::thrift::metadata::UInt32 owner_index_) ; ::dwarfs::thrift::metadata::UInt32 get_group_index() const ; [[deprecated("Use `FOO.group_index_ref() = BAR;` instead of `FOO.set_group_index(BAR);`")]] ::dwarfs::thrift::metadata::UInt32& set_group_index(::dwarfs::thrift::metadata::UInt32 group_index_) ; ::dwarfs::thrift::metadata::UInt64 get_atime_offset() const ; [[deprecated("Use `FOO.atime_offset_ref() = BAR;` instead of `FOO.set_atime_offset(BAR);`")]] ::dwarfs::thrift::metadata::UInt64& set_atime_offset(::dwarfs::thrift::metadata::UInt64 atime_offset_) ; ::dwarfs::thrift::metadata::UInt64 get_mtime_offset() const ; [[deprecated("Use `FOO.mtime_offset_ref() = BAR;` instead of `FOO.set_mtime_offset(BAR);`")]] ::dwarfs::thrift::metadata::UInt64& set_mtime_offset(::dwarfs::thrift::metadata::UInt64 mtime_offset_) ; ::dwarfs::thrift::metadata::UInt64 get_ctime_offset() const ; [[deprecated("Use `FOO.ctime_offset_ref() = BAR;` instead of `FOO.set_ctime_offset(BAR);`")]] ::dwarfs::thrift::metadata::UInt64& set_ctime_offset(::dwarfs::thrift::metadata::UInt64 ctime_offset_) ; ::dwarfs::thrift::metadata::UInt32 get_name_index_v2_2() const ; [[deprecated("Use `FOO.name_index_v2_2_ref() = BAR;` instead of `FOO.set_name_index_v2_2(BAR);`")]] ::dwarfs::thrift::metadata::UInt32& set_name_index_v2_2(::dwarfs::thrift::metadata::UInt32 name_index_v2_2_) ; ::dwarfs::thrift::metadata::UInt32 get_inode_v2_2() const ; [[deprecated("Use `FOO.inode_v2_2_ref() = BAR;` instead of `FOO.set_inode_v2_2(BAR);`")]] ::dwarfs::thrift::metadata::UInt32& set_inode_v2_2(::dwarfs::thrift::metadata::UInt32 inode_v2_2_) ; template <class Protocol_> unsigned long read(Protocol_* iprot); template <class Protocol_> uint32_t serializedSize(Protocol_ const* prot_) const; template <class Protocol_> uint32_t serializedSizeZC(Protocol_ const* prot_) const; template <class Protocol_> uint32_t write(Protocol_* prot_) const; private: template <class Protocol_> void readNoXfer(Protocol_* iprot); friend class ::apache::thrift::Cpp2Ops<inode_data>; friend void swap(inode_data& a, inode_data& b); }; class dir_entry final { private: friend struct ::apache::thrift::detail::st::struct_private_access; template<class> friend struct ::apache::thrift::detail::invoke_reffer; static constexpr bool __fbthrift_cpp2_gen_json = false; static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false; static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord); static std::string_view __fbthrift_get_class_name(); using __fbthrift_reflection_ident_list = folly::tag_t< ::apache::thrift::ident::name_index, ::apache::thrift::ident::inode_num >; static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,1,2}; using __fbthrift_reflection_type_tags = folly::tag_t< ::apache::thrift::type::cpp_type<uint32_t, ::apache::thrift::type::i32_t>, ::apache::thrift::type::cpp_type<uint32_t, ::apache::thrift::type::i32_t> >; static constexpr std::size_t __fbthrift_field_size_v = 2; template<class T> using __fbthrift_id = ::apache::thrift::type::field_id<__fbthrift_reflection_field_id_list[folly::to_underlying(T::value)]>; template<class T> using __fbthrift_type_tag = ::apache::thrift::detail::at<__fbthrift_reflection_type_tags, T::value>; template<class T> using __fbthrift_ident = ::apache::thrift::detail::at<__fbthrift_reflection_ident_list, T::value>; template<class T> using __fbthrift_ordinal = ::apache::thrift::type::ordinal_tag< ::apache::thrift::detail::getFieldOrdinal<T, __fbthrift_reflection_ident_list, __fbthrift_reflection_type_tags>( __fbthrift_reflection_field_id_list ) >; void __fbthrift_clear(); void __fbthrift_clear_terse_fields(); bool __fbthrift_is_empty() const; public: using __fbthrift_cpp2_type = dir_entry; static constexpr bool __fbthrift_cpp2_is_union = false; public: dir_entry() ; [[deprecated("This constructor is deprecated")]] dir_entry(apache::thrift::FragileConstructor, ::dwarfs::thrift::metadata::UInt32 name_index__arg, ::dwarfs::thrift::metadata::UInt32 inode_num__arg); dir_entry(dir_entry&&) noexcept; dir_entry(const dir_entry& src); dir_entry& operator=(dir_entry&&) noexcept; dir_entry& operator=(const dir_entry& src); private: ::dwarfs::thrift::metadata::UInt32 __fbthrift_field_name_index; private: ::dwarfs::thrift::metadata::UInt32 __fbthrift_field_inode_num; private: apache::thrift::detail::isset_bitset<2, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset; public: bool operator==(const dir_entry&) const; bool operator<(const dir_entry&) const; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> name_index_ref() const& ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> name_index_ref() const&& ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> name_index_ref() & ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> name_index_ref() && ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> name_index() const& ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> name_index() const&& ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> name_index() & ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> name_index() && ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> inode_num_ref() const& ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> inode_num_ref() const&& ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> inode_num_ref() & ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> inode_num_ref() && ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> inode_num() const& ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> inode_num() const&& ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> inode_num() & ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> inode_num() && ; ::dwarfs::thrift::metadata::UInt32 get_name_index() const ; [[deprecated("Use `FOO.name_index_ref() = BAR;` instead of `FOO.set_name_index(BAR);`")]] ::dwarfs::thrift::metadata::UInt32& set_name_index(::dwarfs::thrift::metadata::UInt32 name_index_) ; ::dwarfs::thrift::metadata::UInt32 get_inode_num() const ; [[deprecated("Use `FOO.inode_num_ref() = BAR;` instead of `FOO.set_inode_num(BAR);`")]] ::dwarfs::thrift::metadata::UInt32& set_inode_num(::dwarfs::thrift::metadata::UInt32 inode_num_) ; template <class Protocol_> unsigned long read(Protocol_* iprot); template <class Protocol_> uint32_t serializedSize(Protocol_ const* prot_) const; template <class Protocol_> uint32_t serializedSizeZC(Protocol_ const* prot_) const; template <class Protocol_> uint32_t write(Protocol_* prot_) const; private: template <class Protocol_> void readNoXfer(Protocol_* iprot); friend class ::apache::thrift::Cpp2Ops<dir_entry>; friend void swap(dir_entry& a, dir_entry& b); }; class fs_options final { private: friend struct ::apache::thrift::detail::st::struct_private_access; template<class> friend struct ::apache::thrift::detail::invoke_reffer; static constexpr bool __fbthrift_cpp2_gen_json = false; static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false; static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord); static std::string_view __fbthrift_get_class_name(); using __fbthrift_reflection_ident_list = folly::tag_t< ::apache::thrift::ident::mtime_only, ::apache::thrift::ident::time_resolution_sec, ::apache::thrift::ident::packed_chunk_table, ::apache::thrift::ident::packed_directories, ::apache::thrift::ident::packed_shared_files_table >; static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,1,2,3,4,5}; using __fbthrift_reflection_type_tags = folly::tag_t< ::apache::thrift::type::bool_t, ::apache::thrift::type::cpp_type<uint32_t, ::apache::thrift::type::i32_t>, ::apache::thrift::type::bool_t, ::apache::thrift::type::bool_t, ::apache::thrift::type::bool_t >; static constexpr std::size_t __fbthrift_field_size_v = 5; template<class T> using __fbthrift_id = ::apache::thrift::type::field_id<__fbthrift_reflection_field_id_list[folly::to_underlying(T::value)]>; template<class T> using __fbthrift_type_tag = ::apache::thrift::detail::at<__fbthrift_reflection_type_tags, T::value>; template<class T> using __fbthrift_ident = ::apache::thrift::detail::at<__fbthrift_reflection_ident_list, T::value>; template<class T> using __fbthrift_ordinal = ::apache::thrift::type::ordinal_tag< ::apache::thrift::detail::getFieldOrdinal<T, __fbthrift_reflection_ident_list, __fbthrift_reflection_type_tags>( __fbthrift_reflection_field_id_list ) >; void __fbthrift_clear(); void __fbthrift_clear_terse_fields(); public: using __fbthrift_cpp2_type = fs_options; static constexpr bool __fbthrift_cpp2_is_union = false; public: fs_options() ; [[deprecated("This constructor is deprecated")]] fs_options& operator=(const fs_options& src); private: bool __fbthrift_field_mtime_only; private: ::dwarfs::thrift::metadata::UInt32 __fbthrift_field_time_resolution_sec; private: bool __fbthrift_field_packed_chunk_table; private: bool __fbthrift_field_packed_directories; private: bool __fbthrift_field_packed_shared_files_table; private: apache::thrift::detail::isset_bitset<5, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset; public: ; ; ; ; ; ; template <typename..., typename T = bool> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> mtime_only() & ; ; ; ; ; ; ; ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<T&> time_resolution_sec() & ; ; ; ; ; ; ; ; template <typename..., typename T = bool> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> packed_chunk_table() & ; ; ; ; ; ; ; ; template <typename..., typename T = bool> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> packed_directories() & ; ; ; ; ; ; ; ; template <typename..., typename T = bool> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> packed_shared_files_table() & ; ; [[deprecated("Use `FOO.mtime_only_ref() = BAR;` instead of `FOO.set_mtime_only(BAR);`")]] [[deprecated("Use `FOO.time_resolution_sec_ref() = BAR;` instead of `FOO.set_time_resolution_sec(BAR);`")]] [[deprecated("Use `FOO.packed_chunk_table_ref() = BAR;` instead of `FOO.set_packed_chunk_table(BAR);`")]] [[deprecated("Use `FOO.packed_directories_ref() = BAR;` instead of `FOO.set_packed_directories(BAR);`")]] [[deprecated("Use `FOO.packed_shared_files_table_ref() = BAR;` instead of `FOO.set_packed_shared_files_table(BAR);`")]] ; ; ; ; private: ; friend class ::apache::thrift::Cpp2Ops<fs_options>; }; class string_table final { private: friend struct ::apache::thrift::detail::st::struct_private_access; template<class> friend struct ::apache::thrift::detail::invoke_reffer; static constexpr bool __fbthrift_cpp2_gen_json = false; static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false; using __fbthrift_reflection_ident_list = folly::tag_t< ::apache::thrift::ident::buffer, ::apache::thrift::ident::symtab, ::apache::thrift::ident::index, ::apache::thrift::ident::packed_index >; static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,1,2,3,4}; using __fbthrift_reflection_type_tags = folly::tag_t< ::apache::thrift::type::string_t, ::apache::thrift::type::string_t, ::apache::thrift::type::list<::apache::thrift::type::cpp_type<uint32_t, ::apache::thrift::type::i32_t>>, ::apache::thrift::type::bool_t >; static constexpr std::size_t __fbthrift_field_size_v = 4; template<class T> using __fbthrift_id = ::apache::thrift::type::field_id<__fbthrift_reflection_field_id_list[folly::to_underlying(T::value)]>; template<class T> using __fbthrift_type_tag = ::apache::thrift::detail::at<__fbthrift_reflection_type_tags, T::value>; template<class T> using __fbthrift_ident = ::apache::thrift::detail::at<__fbthrift_reflection_ident_list, T::value>; template<class T> using __fbthrift_ordinal = ::apache::thrift::type::ordinal_tag< ::apache::thrift::detail::getFieldOrdinal<T, __fbthrift_reflection_ident_list, __fbthrift_reflection_type_tags>( __fbthrift_reflection_field_id_list ) >; public: using __fbthrift_cpp2_type = string_table; static constexpr bool __fbthrift_cpp2_is_union = false; public: [[deprecated("This constructor is deprecated")]] string_table& operator=(string_table&&) noexcept; ~string_table(); private: ::std::string __fbthrift_field_buffer; private: ::std::string __fbthrift_field_symtab; private: ::std::vector<::dwarfs::thrift::metadata::UInt32> __fbthrift_field_index; private: bool __fbthrift_field_packed_index; private: apache::thrift::detail::isset_bitset<4, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset; public: ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; [[deprecated("Use `FOO.packed_index_ref() = BAR;` instead of `FOO.set_packed_index(BAR);`")]] ; ; ; ; private: ; friend class ::apache::thrift::Cpp2Ops<string_table>; }; class metadata final { private: friend struct ::apache::thrift::detail::st::struct_private_access; template<class> friend struct ::apache::thrift::detail::invoke_reffer; static constexpr bool __fbthrift_cpp2_gen_json = false; static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false; using __fbthrift_reflection_ident_list = folly::tag_t< ::apache::thrift::ident::chunks, ::apache::thrift::ident::directories, ::apache::thrift::ident::inodes, ::apache::thrift::ident::chunk_table, ::apache::thrift::ident::entry_table_v2_2, ::apache::thrift::ident::symlink_table, ::apache::thrift::ident::uids, ::apache::thrift::ident::gids, ::apache::thrift::ident::modes, ::apache::thrift::ident::names, ::apache::thrift::ident::symlinks, ::apache::thrift::ident::timestamp_base, ::apache::thrift::ident::block_size, ::apache::thrift::ident::total_fs_size, ::apache::thrift::ident::devices, ::apache::thrift::ident::options, ::apache::thrift::ident::dir_entries, ::apache::thrift::ident::shared_files_table, ::apache::thrift::ident::total_hardlink_size, ::apache::thrift::ident::dwarfs_version, ::apache::thrift::ident::create_timestamp, ::apache::thrift::ident::compact_names, ::apache::thrift::ident::compact_symlinks, ::apache::thrift::ident::preferred_path_separator, ::apache::thrift::ident::features, ::apache::thrift::ident::category_names, ::apache::thrift::ident::block_categories >; static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29}; using __fbthrift_reflection_type_tags = folly::tag_t< ::apache::thrift::type::list<::apache::thrift::type::struct_t<::dwarfs::thrift::metadata::chunk>>, ::apache::thrift::type::list<::apache::thrift::type::struct_t<::dwarfs::thrift::metadata::directory>>, ::apache::thrift::type::list<::apache::thrift::type::struct_t<::dwarfs::thrift::metadata::inode_data>>, ::apache::thrift::type::list<::apache::thrift::type::cpp_type<uint32_t, ::apache::thrift::type::i32_t>>, ::apache::thrift::type::list<::apache::thrift::type::cpp_type<uint32_t, ::apache::thrift::type::i32_t>>, ::apache::thrift::type::list<::apache::thrift::type::cpp_type<uint32_t, ::apache::thrift::type::i32_t>>, ::apache::thrift::type::list<::apache::thrift::type::cpp_type<uint32_t, ::apache::thrift::type::i32_t>>, ::apache::thrift::type::list<::apache::thrift::type::cpp_type<uint32_t, ::apache::thrift::type::i32_t>>, ::apache::thrift::type::list<::apache::thrift::type::cpp_type<uint32_t, ::apache::thrift::type::i32_t>>, ::apache::thrift::type::list<::apache::thrift::type::string_t>, ::apache::thrift::type::list<::apache::thrift::type::string_t>, ::apache::thrift::type::cpp_type<uint64_t, ::apache::thrift::type::i64_t>, ::apache::thrift::type::cpp_type<uint32_t, ::apache::thrift::type::i32_t>, ::apache::thrift::type::cpp_type<uint64_t, ::apache::thrift::type::i64_t>, ::apache::thrift::type::list<::apache::thrift::type::cpp_type<uint64_t, ::apache::thrift::type::i64_t>>, ::apache::thrift::type::struct_t<::dwarfs::thrift::metadata::fs_options>, ::apache::thrift::type::list<::apache::thrift::type::struct_t<::dwarfs::thrift::metadata::dir_entry>>, ::apache::thrift::type::list<::apache::thrift::type::cpp_type<uint32_t, ::apache::thrift::type::i32_t>>, ::apache::thrift::type::cpp_type<uint64_t, ::apache::thrift::type::i64_t>, ::apache::thrift::type::string_t, ::apache::thrift::type::cpp_type<uint64_t, ::apache::thrift::type::i64_t>, ::apache::thrift::type::struct_t<::dwarfs::thrift::metadata::string_table>, ::apache::thrift::type::struct_t<::dwarfs::thrift::metadata::string_table>, ::apache::thrift::type::cpp_type<uint32_t, ::apache::thrift::type::i32_t>, ::apache::thrift::type::set<::apache::thrift::type::string_t>, ::apache::thrift::type::list<::apache::thrift::type::string_t>, ::apache::thrift::type::list<::apache::thrift::type::cpp_type<uint32_t, ::apache::thrift::type::i32_t>> >; static constexpr std::size_t __fbthrift_field_size_v = 27; template<class T> using __fbthrift_id = ::apache::thrift::type::field_id<__fbthrift_reflection_field_id_list[folly::to_underlying(T::value)]>; template<class T> using __fbthrift_type_tag = ::apache::thrift::detail::at<__fbthrift_reflection_type_tags, T::value>; template<class T> using __fbthrift_ident = ::apache::thrift::detail::at<__fbthrift_reflection_ident_list, T::value>; template<class T> using __fbthrift_ordinal = ::apache::thrift::type::ordinal_tag< ::apache::thrift::detail::getFieldOrdinal<T, __fbthrift_reflection_ident_list, __fbthrift_reflection_type_tags>( __fbthrift_reflection_field_id_list ) >; public: using __fbthrift_cpp2_type = metadata; static constexpr bool __fbthrift_cpp2_is_union = false; public: metadata(); [[deprecated("This constructor is deprecated")]] ~metadata(); private: ::std::vector<::dwarfs::thrift::metadata::chunk> __fbthrift_field_chunks; private: ::std::vector<::dwarfs::thrift::metadata::directory> __fbthrift_field_directories; private: ::std::vector<::dwarfs::thrift::metadata::inode_data> __fbthrift_field_inodes; private: ::std::vector<::dwarfs::thrift::metadata::UInt32> __fbthrift_field_chunk_table; private: ::std::vector<::dwarfs::thrift::metadata::UInt32> __fbthrift_field_entry_table_v2_2; private: ::std::vector<::dwarfs::thrift::metadata::UInt32> __fbthrift_field_symlink_table; private: ::std::vector<::dwarfs::thrift::metadata::UInt32> __fbthrift_field_uids; private: ::std::vector<::dwarfs::thrift::metadata::UInt32> __fbthrift_field_gids; private: ::std::vector<::dwarfs::thrift::metadata::UInt32> __fbthrift_field_modes; private: ::std::vector<::std::string> __fbthrift_field_names; private: ::std::vector<::std::string> __fbthrift_field_symlinks; private: ::dwarfs::thrift::metadata::UInt64 __fbthrift_field_timestamp_base; private: ::dwarfs::thrift::metadata::UInt32 __fbthrift_field_block_size; private: ::dwarfs::thrift::metadata::UInt64 __fbthrift_field_total_fs_size; private: ::std::vector<::dwarfs::thrift::metadata::UInt64> __fbthrift_field_devices; private: ::dwarfs::thrift::metadata::fs_options __fbthrift_field_options; private: ::std::vector<::dwarfs::thrift::metadata::dir_entry> __fbthrift_field_dir_entries; private: ::std::vector<::dwarfs::thrift::metadata::UInt32> __fbthrift_field_shared_files_table; private: ::dwarfs::thrift::metadata::UInt64 __fbthrift_field_total_hardlink_size; private: ::std::string __fbthrift_field_dwarfs_version; private: ::dwarfs::thrift::metadata::UInt64 __fbthrift_field_create_timestamp; private: ::dwarfs::thrift::metadata::string_table __fbthrift_field_compact_names; private: ::dwarfs::thrift::metadata::string_table __fbthrift_field_compact_symlinks; private: ::dwarfs::thrift::metadata::UInt32 __fbthrift_field_preferred_path_separator; private: ::std::set<::std::string> __fbthrift_field_features; private: ::std::vector<::std::string> __fbthrift_field_category_names; private: ::std::vector<::dwarfs::thrift::metadata::UInt32> __fbthrift_field_block_categories; private: apache::thrift::detail::isset_bitset<27, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset; public: ; ; ; ; ; ; template <typename..., typename T = ::std::vector<::dwarfs::thrift::metadata::chunk>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> chunks() & ; ; ; ; ; ; ; ; template <typename..., typename T = ::std::vector<::dwarfs::thrift::metadata::directory>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> directories() & ; ; ; ; ; ; ; ; template <typename..., typename T = ::std::vector<::dwarfs::thrift::metadata::inode_data>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> inodes() & ; ; ; ; ; ; ; ; template <typename..., typename T = ::std::vector<::dwarfs::thrift::metadata::UInt32>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> chunk_table() & ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; template <typename..., typename T = ::std::vector<::dwarfs::thrift::metadata::UInt32>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> symlink_table() & ; ; ; ; ; ; ; ; template <typename..., typename T = ::std::vector<::dwarfs::thrift::metadata::UInt32>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> uids() & ; ; ; ; ; ; ; ; template <typename..., typename T = ::std::vector<::dwarfs::thrift::metadata::UInt32>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> gids() & ; ; ; ; ; ; ; ; template <typename..., typename T = ::std::vector<::dwarfs::thrift::metadata::UInt32>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> modes() & ; ; ; ; ; ; ; ; template <typename..., typename T = ::std::vector<::std::string>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> names() & ; ; ; ; ; ; ; ; template <typename..., typename T = ::std::vector<::std::string>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> symlinks() & ; ; ; ; ; ; ; ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt64> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> timestamp_base() & ; ; ; ; ; ; ; ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> block_size() & ; ; ; ; ; ; ; ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt64> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> total_fs_size() & ; ; ; ; ; ; ; ; template <typename..., typename T = ::std::vector<::dwarfs::thrift::metadata::UInt64>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<T&> devices() & ; ; ; ; ; ; ; ; template <typename..., typename T = ::dwarfs::thrift::metadata::fs_options> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<T&> options() & ; ; ; ; ; ; ; ; template <typename..., typename T = ::std::vector<::dwarfs::thrift::metadata::dir_entry>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<T&> dir_entries() & ; ; ; ; ; ; ; ; template <typename..., typename T = ::std::vector<::dwarfs::thrift::metadata::UInt32>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<T&> shared_files_table() & ; ; ; ; ; ; ; ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt64> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<T&> total_hardlink_size() & ; ; ; ; ; ; ; ; template <typename..., typename T = ::std::string> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<T&> dwarfs_version() & ; ; ; ; ; ; ; ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt64> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<T&> create_timestamp() & ; ; ; ; ; ; ; ; template <typename..., typename T = ::dwarfs::thrift::metadata::string_table> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<T&> compact_names() & ; ; ; ; ; ; ; ; template <typename..., typename T = ::dwarfs::thrift::metadata::string_table> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<T&> compact_symlinks() & ; ; ; ; ; ; ; ; template <typename..., typename T = ::dwarfs::thrift::metadata::UInt32> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<T&> preferred_path_separator() & ; ; ; ; ; ; ; ; template <typename..., typename T = ::std::set<::std::string>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<T&> features() & ; ; ; ; ; ; ; ; template <typename..., typename T = ::std::vector<::std::string>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<T&> category_names() & ; ; ; ; ; ; ; ; template <typename..., typename T = ::std::vector<::dwarfs::thrift::metadata::UInt32>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<T&> block_categories() & ; ; ; ; ; ; ; ; ; ; ; ; ; [[deprecated("Use `FOO.timestamp_base_ref() = BAR;` instead of `FOO.set_timestamp_base(BAR);`")]] [[deprecated("Use `FOO.block_size_ref() = BAR;` instead of `FOO.set_block_size(BAR);`")]] [[deprecated("Use `FOO.total_fs_size_ref() = BAR;` instead of `FOO.set_total_fs_size(BAR);`")]] ; ; ; ; [[deprecated("Use `FOO.total_hardlink_size_ref() = BAR;` instead of `FOO.set_total_hardlink_size(BAR);`")]] ; [[deprecated("Use `FOO.create_timestamp_ref() = BAR;` instead of `FOO.set_create_timestamp(BAR);`")]] ; ; [[deprecated("Use `FOO.preferred_path_separator_ref() = BAR;` instead of `FOO.set_preferred_path_separator(BAR);`")]] ; ; ; ; ; ; ; private: ; friend class ::apache::thrift::Cpp2Ops<metadata>; }; } namespace dwarfs { class block_manager { public: using chunk_type = thrift::metadata::chunk; void set_written_block(size_t logical_block, size_t written_block, fragment_category::value_type category); void map_logical_blocks(std::vector<chunk_type>& vec); std::vector<fragment_category::value_type> get_written_block_categories() const; private: std::mutex mutable mx_; size_t mutable num_blocks_{0}; std::vector<std::optional<std::pair<size_t, fragment_category::value_type>>> block_map_; }; } namespace std __attribute__ ((__visibility__ ("default"))) { namespace filesystem { inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { } class file_status; namespace __cxx11 { class path; class filesystem_error; class directory_entry; class directory_iterator; class recursive_directory_iterator; } struct space_info { uintmax_t capacity; uintmax_t free; uintmax_t available; }; enum class file_type : signed char { none = 0, not_found = -1, regular = 1, directory = 2, symlink = 3, block = 4, character = 5, fifo = 6, socket = 7, unknown = 8 }; enum class copy_options : unsigned short { none = 0, skip_existing = 1, overwrite_existing = 2, update_existing = 4, recursive = 8, copy_symlinks = 16, skip_symlinks = 32, directories_only = 64, create_symlinks = 128, create_hard_links = 256 }; enum class perms : unsigned { none = 0, owner_read = 0400, owner_write = 0200, owner_exec = 0100, owner_all = 0700, group_read = 040, group_write = 020, group_exec = 010, group_all = 070, others_read = 04, others_write = 02, others_exec = 01, others_all = 07, all = 0777, set_uid = 04000, set_gid = 02000, sticky_bit = 01000, mask = 07777, unknown = 0xFFFF, }; enum class perm_options : unsigned { replace = 0x1, add = 0x2, remove = 0x4, nofollow = 0x8 }; enum class directory_options : unsigned char { none = 0, follow_directory_symlink = 1, skip_permission_denied = 2 }; using file_time_type = __file_clock::time_point; path current_path(); bool exists(file_status) noexcept; bool is_other(file_status) noexcept; void permissions(const path&, perms, perm_options, error_code&) noexcept; path proximate(const path& __p, const path& __base, error_code& __ec); path proximate(const path& __p, const path& __base, error_code& __ec); path relative(const path& __p, const path& __base, error_code& __ec); file_status status(const path&); file_status status(const path&, error_code&) noexcept; ; file_status symlink_status(const path&); file_status symlink_status(const path&, error_code&) noexcept; bool is_regular_file(file_status) noexcept; bool is_symlink(file_status) noexcept; } } namespace std __attribute__ ((__visibility__ ("default"))) { enum codecvt_mode { consume_header = 4, generate_header = 2, little_endian = 1 }; template<typename _Elem, unsigned long _Maxcode = 0x10ffff, codecvt_mode _Mode = (codecvt_mode)0> class codecvt_utf8 : public codecvt<_Elem, char, mbstate_t> { public: }; template<typename _Elem, unsigned long _Maxcode = 0x10ffff, codecvt_mode _Mode = (codecvt_mode)0> class codecvt_utf16 : public codecvt<_Elem, char, mbstate_t> { public: }; template<typename _Elem, unsigned long _Maxcode = 0x10ffff, codecvt_mode _Mode = (codecvt_mode)0> class codecvt_utf8_utf16 : public codecvt<_Elem, char, mbstate_t> { public: }; template<typename _Elem> class __codecvt_utf8_base; template<typename _Elem> class __codecvt_utf16_base; template<typename _Elem> class __codecvt_utf8_utf16_base; template<> class __codecvt_utf8_base<char16_t> : public codecvt<char16_t, char, mbstate_t> { public: typedef char16_t intern_type; typedef char extern_type; typedef mbstate_t state_type; protected: private: unsigned long _M_maxcode; codecvt_mode _M_mode; }; template<unsigned long _Maxcode, codecvt_mode _Mode> class codecvt_utf8<char16_t, _Maxcode, _Mode> : public __codecvt_utf8_base<char16_t> { public: }; template<> class __codecvt_utf16_base<char16_t> : public codecvt<char16_t, char, mbstate_t> { public: typedef char16_t intern_type; typedef char extern_type; typedef mbstate_t state_type; protected: private: unsigned long _M_maxcode; codecvt_mode _M_mode; }; template<unsigned long _Maxcode, codecvt_mode _Mode> class codecvt_utf16<char16_t, _Maxcode, _Mode> : public __codecvt_utf16_base<char16_t> { public: }; template<> class __codecvt_utf8_utf16_base<char16_t> : public codecvt<char16_t, char, mbstate_t> { public: typedef char16_t intern_type; typedef char extern_type; typedef mbstate_t state_type; protected: private: unsigned long _M_maxcode; codecvt_mode _M_mode; }; template<unsigned long _Maxcode, codecvt_mode _Mode> class codecvt_utf8_utf16<char16_t, _Maxcode, _Mode> : public __codecvt_utf8_utf16_base<char16_t> { public: }; template<> class __codecvt_utf8_base<char32_t> : public codecvt<char32_t, char, mbstate_t> { public: typedef char32_t intern_type; typedef char extern_type; typedef mbstate_t state_type; protected: private: unsigned long _M_maxcode; codecvt_mode _M_mode; }; template<unsigned long _Maxcode, codecvt_mode _Mode> class codecvt_utf8<char32_t, _Maxcode, _Mode> : public __codecvt_utf8_base<char32_t> { public: }; template<> class __codecvt_utf16_base<char32_t> : public codecvt<char32_t, char, mbstate_t> { public: typedef char32_t intern_type; typedef char extern_type; typedef mbstate_t state_type; protected: private: unsigned long _M_maxcode; codecvt_mode _M_mode; }; template<unsigned long _Maxcode, codecvt_mode _Mode> class codecvt_utf16<char32_t, _Maxcode, _Mode> : public __codecvt_utf16_base<char32_t> { public: }; template<> class __codecvt_utf8_utf16_base<char32_t> : public codecvt<char32_t, char, mbstate_t> { public: typedef char32_t intern_type; typedef char extern_type; typedef mbstate_t state_type; protected: private: unsigned long _M_maxcode; codecvt_mode _M_mode; }; template<unsigned long _Maxcode, codecvt_mode _Mode> class codecvt_utf8_utf16<char32_t, _Maxcode, _Mode> : public __codecvt_utf8_utf16_base<char32_t> { public: }; template<> class __codecvt_utf8_base<wchar_t> : public codecvt<wchar_t, char, mbstate_t> { public: typedef wchar_t intern_type; typedef char extern_type; typedef mbstate_t state_type; protected: private: unsigned long _M_maxcode; codecvt_mode _M_mode; }; template<unsigned long _Maxcode, codecvt_mode _Mode> class codecvt_utf8<wchar_t, _Maxcode, _Mode> : public __codecvt_utf8_base<wchar_t> { public: }; template<> class __codecvt_utf16_base<wchar_t> : public codecvt<wchar_t, char, mbstate_t> { public: typedef wchar_t intern_type; typedef char extern_type; typedef mbstate_t state_type; protected: private: unsigned long _M_maxcode; codecvt_mode _M_mode; }; template<unsigned long _Maxcode, codecvt_mode _Mode> class codecvt_utf16<wchar_t, _Maxcode, _Mode> : public __codecvt_utf16_base<wchar_t> { public: }; template<> class __codecvt_utf8_utf16_base<wchar_t> : public codecvt<wchar_t, char, mbstate_t> { public: typedef wchar_t intern_type; typedef char extern_type; typedef mbstate_t state_type; protected: private: unsigned long _M_maxcode; codecvt_mode _M_mode; }; template<unsigned long _Maxcode, codecvt_mode _Mode> class codecvt_utf8_utf16<wchar_t, _Maxcode, _Mode> : public __codecvt_utf8_utf16_base<wchar_t> { public: }; } namespace std __attribute__ ((__visibility__ ("default"))) { namespace filesystem { namespace __cxx11 { class path; namespace __detail { template<typename _CharT> inline constexpr bool __is_encoded_char = false; template<> inline constexpr bool __is_encoded_char<char> = true; template<> inline constexpr bool __is_encoded_char<char8_t> = true; template<> inline constexpr bool __is_encoded_char<wchar_t> = true; template<> inline constexpr bool __is_encoded_char<char16_t> = true; template<> inline constexpr bool __is_encoded_char<char32_t> = true; template<typename _Iter> using __safe_iterator_traits = std::iterator_traits<_Iter>; template<typename _Iter_traits, typename = void> inline constexpr bool __is_path_iter_src = false; template<typename _Iter_traits> inline constexpr bool __is_path_iter_src<_Iter_traits, void_t<typename _Iter_traits::value_type>> = __is_encoded_char<typename _Iter_traits::value_type>; template<typename _Source> inline constexpr bool __is_path_src = __is_path_iter_src<iterator_traits<decay_t<_Source>>>; template<> inline constexpr bool __is_path_src<path> = false; template<> inline constexpr bool __is_path_src<volatile path> = false; template<> inline constexpr bool __is_path_src<void*> = false; template<> inline constexpr bool __is_path_src<const void*> = false; template<> inline constexpr bool __is_path_src<volatile void*> = false; template<> inline constexpr bool __is_path_src<const volatile void*> = false; template<typename _CharT, typename _Traits, typename _Alloc> inline constexpr bool __is_path_src<basic_string<_CharT, _Traits, _Alloc>> = __is_encoded_char<_CharT>; template<typename _CharT, typename _Traits> inline constexpr bool __is_path_src<basic_string_view<_CharT, _Traits>> = __is_encoded_char<_CharT>; template<typename _Tp> using _Path = enable_if_t<__is_path_src<_Tp>, path>; template<typename _Iter, typename _Tr = __safe_iterator_traits<_Iter>> using _Path2 = enable_if_t<__is_path_iter_src<_Tr>, path>; template<typename _Iter> constexpr bool __is_contiguous = std::contiguous_iterator<_Iter>; template<typename _Tp> constexpr bool __is_contiguous<_Tp*> = true; template<typename _Tp, typename _Seq> constexpr bool __is_contiguous<__gnu_cxx::__normal_iterator<_Tp*, _Seq>> = true; template<typename _EcharT> using __unified_u8_t = __conditional_t<is_same_v<_EcharT, char8_t>, char, _EcharT>; ; ; ; template<typename _Source> struct __source_value_type_impl { using type = typename __safe_iterator_traits<decay_t<_Source>>::value_type; }; template<typename _CharT, typename _Traits, typename _Alloc> struct __source_value_type_impl<basic_string<_CharT, _Traits, _Alloc>> { using type = _CharT; }; template<typename _CharT, typename _Traits> struct __source_value_type_impl<basic_string_view<_CharT, _Traits>> { using type = _CharT; }; template<typename _Source> using __source_value_t = typename __source_value_type_impl<_Source>::type; template<typename _Tp, typename _Val = __source_value_t<_Tp>> using __value_type_is_char = std::enable_if_t<std::is_same_v<_Val, char>, _Val>; template<typename _Tp, typename _Val = __source_value_t<_Tp>> using __value_type_is_char_or_char8_t = std::enable_if_t<std::is_same_v<_Val, char> || std::is_same_v<_Val, char8_t> , _Val>; ; } class path { public: using value_type = char; static constexpr value_type preferred_separator = '/'; using string_type = std::basic_string<value_type>; enum format : unsigned char { native_format, generic_format, auto_format }; path() noexcept ; path(string_type&& __source, format = auto_format) ; template<typename _Source, typename _Require = __detail::_Path<_Source>> path(_Source const& __source, format = auto_format) ; ; ; ; ~path() = default; ; ; ; ; ; ; ; ; ; ; ; std::string string() const; ; path parent_path() const; [[nodiscard]] class iterator; using const_iterator = iterator; iterator begin() const noexcept; iterator end() const noexcept; template<typename _CharT, typename _Traits> friend std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const path& __p) ; ; private: enum class _Type : unsigned char { _Multi = 0, _Root_name, _Root_dir, _Filename }; enum class _Split { _Stem, _Extension }; void _M_concat(basic_string_view<value_type>); pair<const string_type*, size_t> _M_find_extension() const noexcept; template<typename _Tp> static auto _S_convert(_Tp __str) noexcept(is_same_v<typename _Tp::value_type, value_type>) ; template<typename _EcharT> static auto _S_convert(const _EcharT* __first, const _EcharT* __last); static string_type _S_convert_loc(const char* __first, const char* __last, const std::locale& __loc); template<typename _Iter> static string_type _S_convert_loc(_Iter __first, _Iter __last, const std::locale& __loc) ; template<typename _Tp> static string_type _S_convert_loc(const _Tp& __s, const std::locale& __loc) ; template<typename _CharT, typename _Traits, typename _Allocator> static basic_string<_CharT, _Traits, _Allocator> _S_str_convert(basic_string_view<value_type>, const _Allocator&); __attribute__((__always_inline__)) static int _S_compare(const path& __lhs, const path& __rhs) noexcept; void _M_split_cmpts(); _Type _M_type() const noexcept ; string_type _M_pathname; struct _Cmpt; struct _List { using value_type = _Cmpt; using iterator = value_type*; using const_iterator = const value_type*; _List(); _List(const _List&); _List(_List&&) = default; _List& operator=(const _List&); _List& operator=(_List&&) = default; ~_List() = default; _Type type() const noexcept ; void type(_Type) noexcept; int size() const noexcept; bool empty() const noexcept; void clear(); void swap(_List& __l) noexcept ; int capacity() const noexcept; void reserve(int, bool); iterator begin() noexcept; iterator end() noexcept; const_iterator begin() const noexcept; const_iterator end() const noexcept; value_type& front() noexcept; value_type& back() noexcept; const value_type& front() const noexcept; const value_type& back() const noexcept; void pop_back(); void _M_erase_from(const_iterator __pos); struct _Impl; struct _Impl_deleter { void operator()(_Impl*) const noexcept; }; unique_ptr<_Impl, _Impl_deleter> _M_impl; }; _List _M_cmpts; struct _Parser; template<typename _EcharT> struct _Codecvt; }; void swap(path& __lhs, path& __rhs) noexcept ; size_t hash_value(const path& __p) noexcept; class filesystem_error : public std::system_error { public: filesystem_error(const string& __what_arg, error_code __ec); filesystem_error(const string& __what_arg, const path& __p1, error_code __ec); filesystem_error(const string& __what_arg, const path& __p1, const path& __p2, error_code __ec); filesystem_error(const filesystem_error&) = default; filesystem_error& operator=(const filesystem_error&) = default; ~filesystem_error(); const path& path1() const noexcept; const path& path2() const noexcept; const char* what() const noexcept; private: struct _Impl; std::__shared_ptr<const _Impl> _M_impl; }; namespace __detail { [[noreturn]] void __throw_conversion_error() ; } template<typename _InputIterator, typename _Require = __detail::_Path2<_InputIterator>, typename _CharT = __detail::__value_type_is_char_or_char8_t<_InputIterator>> __attribute__ ((__deprecated__ ("use '" "path(u8string(first, last))" "' instead"))) path u8path(_InputIterator __first, _InputIterator __last) ; template<typename _Source, typename _Require = __detail::_Path<_Source>, typename _CharT = __detail::__value_type_is_char_or_char8_t<_Source>> __attribute__ ((__deprecated__ ("use '" "path((const char8_t*)&*source)" "' instead"))) path u8path(const _Source& __source) ; struct path::_Cmpt : path { _Cmpt(basic_string_view<value_type> __s, _Type __t, size_t __pos); _Cmpt() ; size_t _M_pos; }; template<typename _EcharT> struct path::_Codecvt : std::codecvt<_EcharT, char, mbstate_t> { }; template<> struct path::_Codecvt<wchar_t> : __conditional_t<sizeof(wchar_t) == sizeof(char32_t), std::codecvt_utf8<wchar_t>, std::codecvt_utf8_utf16<wchar_t>> { }; class path::iterator { public: using difference_type = std::ptrdiff_t; using value_type = path; using reference = const path&; using pointer = const path*; using iterator_category = std::bidirectional_iterator_tag; iterator() ; iterator(const iterator&) = default; iterator& operator=(const iterator&) = default; reference operator*() const noexcept; pointer operator->() const noexcept ; iterator& operator++() noexcept; iterator operator++(int) noexcept ; iterator& operator--() noexcept; iterator operator--(int) noexcept ; friend bool operator==(const iterator& __lhs, const iterator& __rhs) noexcept ; friend bool operator!=(const iterator& __lhs, const iterator& __rhs) noexcept ; private: friend class path; bool _M_is_multi() const noexcept ; friend difference_type __path_iter_distance(const iterator& __first, const iterator& __last) noexcept ; friend void __path_iter_advance(iterator& __i, difference_type __n) noexcept ; iterator(const path* __path, path::_List::const_iterator __iter) ; iterator(const path* __path, bool __at_end) ; bool _M_equals(iterator) const noexcept; const path* _M_path; path::_List::const_iterator _M_cur; bool _M_at_end; }; } } ptrdiff_t distance(filesystem::path::iterator __first, filesystem::path::iterator __last) noexcept ; template<typename _Distance> void advance(filesystem::path::iterator& __i, _Distance __n) noexcept ; extern template class __shared_ptr<const filesystem::filesystem_error::_Impl>; template<> struct hash<filesystem::path> { size_t operator()(const filesystem::path& __p) const noexcept ; }; } namespace std __attribute__ ((__visibility__ ("default"))) { namespace filesystem { class file_status { public: file_status() ; explicit file_status(file_type __ft, perms __prms = perms::unknown) ; file_status(const file_status&) noexcept = default; file_status(file_status&&) noexcept = default; ~file_status() = default; file_status& operator=(const file_status&) noexcept = default; file_status& operator=(file_status&&) noexcept = default; file_type type() const noexcept ; perms permissions() const noexcept ; void type(file_type __ft) noexcept ; void permissions(perms __prms) noexcept ; friend bool operator==(const file_status&, const file_status&) noexcept = default; private: file_type _M_type; perms _M_perms; }; namespace __cxx11 { struct _Dir; class directory_iterator; class recursive_directory_iterator; class directory_entry { public: directory_entry() noexcept = default; directory_entry(const directory_entry&) = default; directory_entry(directory_entry&&) noexcept = default; explicit directory_entry(const filesystem::path& __p) ; directory_entry(const filesystem::path& __p, error_code& __ec) ; ~directory_entry() = default; directory_entry& operator=(const directory_entry&) = default; directory_entry& operator=(directory_entry&&) noexcept = default; void assign(const filesystem::path& __p) ; void assign(const filesystem::path& __p, error_code& __ec) ; void replace_filename(const filesystem::path& __p) ; void replace_filename(const filesystem::path& __p, error_code& __ec) ; void refresh() ; void refresh(error_code& __ec) noexcept ; const filesystem::path& path() const noexcept ; operator const filesystem::path& () const noexcept ; bool exists() const ; bool exists(error_code& __ec) const noexcept ; bool is_block_file() const ; bool is_block_file(error_code& __ec) const noexcept ; bool is_character_file() const ; bool is_character_file(error_code& __ec) const noexcept ; bool is_directory() const ; bool is_directory(error_code& __ec) const noexcept ; bool is_fifo() const ; bool is_fifo(error_code& __ec) const noexcept ; bool is_other() const ; bool is_other(error_code& __ec) const noexcept ; bool is_regular_file() const ; bool is_regular_file(error_code& __ec) const noexcept ; bool is_socket() const ; bool is_socket(error_code& __ec) const noexcept ; bool is_symlink() const ; bool is_symlink(error_code& __ec) const noexcept ; uintmax_t file_size() const ; uintmax_t file_size(error_code& __ec) const noexcept ; uintmax_t hard_link_count() const ; uintmax_t hard_link_count(error_code& __ec) const noexcept ; file_time_type last_write_time() const ; file_time_type last_write_time(error_code& __ec) const noexcept ; file_status status() const ; file_status status(error_code& __ec) const noexcept ; file_status symlink_status() const ; file_status symlink_status(error_code& __ec) const noexcept ; bool operator==(const directory_entry& __rhs) const noexcept ; strong_ordering operator<=>(const directory_entry& __rhs) const noexcept ; private: friend struct _Dir; friend class directory_iterator; friend class recursive_directory_iterator; template<typename _CharT, typename _Traits> friend basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const directory_entry& __d) ; directory_entry(const filesystem::path& __p, file_type __t) ; file_type _M_file_type() const ; file_type _M_file_type(error_code& __ec) const noexcept ; filesystem::path _M_path; file_type _M_type = file_type::none; }; struct __directory_iterator_proxy { const directory_entry& operator*() const& noexcept ; directory_entry operator*() && noexcept ; private: friend class directory_iterator; friend class recursive_directory_iterator; explicit __directory_iterator_proxy(const directory_entry& __e) ; directory_entry _M_entry; }; class directory_iterator { public: typedef directory_entry value_type; typedef ptrdiff_t difference_type; typedef const directory_entry* pointer; typedef const directory_entry& reference; typedef input_iterator_tag iterator_category; directory_iterator() = default; explicit directory_iterator(const path& __p) ; directory_iterator(const path& __p, directory_options __options) ; directory_iterator(const path& __p, error_code& __ec) ; directory_iterator(const path& __p, directory_options __options, error_code& __ec) ; directory_iterator(const directory_iterator& __rhs) = default; directory_iterator(directory_iterator&& __rhs) noexcept = default; ~directory_iterator() = default; directory_iterator& operator=(const directory_iterator& __rhs) = default; directory_iterator& operator=(directory_iterator&& __rhs) noexcept = default; const directory_entry& operator*() const noexcept; const directory_entry* operator->() const noexcept ; directory_iterator& operator++(); directory_iterator& increment(error_code& __ec); __directory_iterator_proxy operator++(int) ; friend bool operator==(const directory_iterator& __lhs, const directory_iterator& __rhs) noexcept ; bool operator==(default_sentinel_t) const noexcept ; private: directory_iterator(const path&, directory_options, error_code*); friend class recursive_directory_iterator; std::__shared_ptr<_Dir> _M_dir; }; directory_iterator begin(directory_iterator __iter) noexcept ; directory_iterator end(directory_iterator) noexcept ; class recursive_directory_iterator { public: typedef directory_entry value_type; typedef ptrdiff_t difference_type; typedef const directory_entry* pointer; typedef const directory_entry& reference; typedef input_iterator_tag iterator_category; recursive_directory_iterator() = default; explicit recursive_directory_iterator(const path& __p) ; recursive_directory_iterator(const path& __p, directory_options __options) ; recursive_directory_iterator(const path& __p, directory_options __options, error_code& __ec) ; recursive_directory_iterator(const path& __p, error_code& __ec) ; recursive_directory_iterator( const recursive_directory_iterator&) = default; recursive_directory_iterator(recursive_directory_iterator&&) = default; ~recursive_directory_iterator(); directory_options options() const noexcept; int depth() const noexcept; bool recursion_pending() const noexcept; const directory_entry& operator*() const noexcept; const directory_entry* operator->() const noexcept ; recursive_directory_iterator& operator=(const recursive_directory_iterator& __rhs) noexcept; recursive_directory_iterator& operator=(recursive_directory_iterator&& __rhs) noexcept; recursive_directory_iterator& operator++(); recursive_directory_iterator& increment(error_code& __ec); __directory_iterator_proxy operator++(int) ; void pop(); void pop(error_code&); void disable_recursion_pending() noexcept; friend bool operator==(const recursive_directory_iterator& __lhs, const recursive_directory_iterator& __rhs) noexcept ; bool operator==(default_sentinel_t) const noexcept ; private: recursive_directory_iterator(const path&, directory_options, error_code*); struct _Dir_stack; std::__shared_ptr<_Dir_stack> _M_dirs; recursive_directory_iterator& __erase(error_code* = nullptr); }; recursive_directory_iterator begin(recursive_directory_iterator __iter) noexcept ; recursive_directory_iterator end(recursive_directory_iterator) noexcept ; } } extern template class __shared_ptr<filesystem::_Dir>; extern template class __shared_ptr<filesystem::recursive_directory_iterator::_Dir_stack>; } namespace std __attribute__ ((__visibility__ ("default"))) { namespace filesystem { [[nodiscard]] path absolute(const path& __p); [[nodiscard]] path absolute(const path& __p, error_code& __ec); [[nodiscard]] path canonical(const path& __p); [[nodiscard]] path canonical(const path& __p, error_code& __ec); void copy(const path& __from, const path& __to) ; void copy(const path& __from, const path& __to, error_code& __ec) ; bool copy_file(const path& __from, const path& __to) ; bool copy_file(const path& __from, const path& __to, error_code& __ec) ; void copy_symlink(const path& __existing_symlink, const path& __new_symlink); void copy_symlink(const path& __existing_symlink, const path& __new_symlink, error_code& __ec) noexcept; bool create_directories(const path& __p); bool create_directories(const path& __p, error_code& __ec); bool create_directory(const path& __p); bool create_directory(const path& __p, error_code& __ec) noexcept; bool create_directory(const path& __p, const path& __attributes); bool create_directory(const path& __p, const path& __attributes, error_code& __ec) noexcept; void create_directory_symlink(const path& __to, const path& __new_symlink); void create_directory_symlink(const path& __to, const path& __new_symlink, error_code& __ec) noexcept; void create_hard_link(const path& __to, const path& __new_hard_link); void create_hard_link(const path& __to, const path& __new_hard_link, error_code& __ec) noexcept; void create_symlink(const path& __to, const path& __new_symlink); void create_symlink(const path& __to, const path& __new_symlink, error_code& __ec) noexcept; [[nodiscard]] path current_path(); [[nodiscard]] path current_path(error_code& __ec); void current_path(const path& __p); void current_path(const path& __p, error_code& __ec) noexcept; [[nodiscard]] bool equivalent(const path& __p1, const path& __p2); [[nodiscard]] bool equivalent(const path& __p1, const path& __p2, error_code& __ec) noexcept; [[nodiscard]] bool exists(file_status __s) noexcept ; [[nodiscard]] bool exists(const path& __p) ; [[nodiscard]] bool exists(const path& __p, error_code& __ec) noexcept ; [[nodiscard]] [[nodiscard]] [[nodiscard]] [[nodiscard]] [[nodiscard]] bool is_block_file(file_status __s) noexcept ; [[nodiscard]] bool is_block_file(const path& __p) ; [[nodiscard]] bool is_block_file(const path& __p, error_code& __ec) noexcept ; [[nodiscard]] bool is_character_file(file_status __s) noexcept ; [[nodiscard]] bool is_character_file(const path& __p) ; [[nodiscard]] bool is_character_file(const path& __p, error_code& __ec) noexcept ; [[nodiscard]] bool is_directory(file_status __s) noexcept ; [[nodiscard]] bool is_directory(const path& __p) ; [[nodiscard]] bool is_directory(const path& __p, error_code& __ec) noexcept ; [[nodiscard]] bool is_empty(const path& __p); [[nodiscard]] bool is_empty(const path& __p, error_code& __ec); [[nodiscard]] bool is_fifo(file_status __s) noexcept ; [[nodiscard]] bool is_fifo(const path& __p) ; [[nodiscard]] bool is_fifo(const path& __p, error_code& __ec) noexcept ; [[nodiscard]] bool is_other(file_status __s) noexcept ; [[nodiscard]] bool is_other(const path& __p) ; [[nodiscard]] bool is_other(const path& __p, error_code& __ec) noexcept ; [[nodiscard]] bool is_regular_file(file_status __s) noexcept ; [[nodiscard]] bool is_regular_file(const path& __p) ; [[nodiscard]] bool is_regular_file(const path& __p, error_code& __ec) noexcept ; [[nodiscard]] bool is_socket(file_status __s) noexcept ; [[nodiscard]] bool is_socket(const path& __p) ; [[nodiscard]] bool is_socket(const path& __p, error_code& __ec) noexcept ; [[nodiscard]] bool is_symlink(file_status __s) noexcept ; [[nodiscard]] bool is_symlink(const path& __p) ; [[nodiscard]] bool is_symlink(const path& __p, error_code& __ec) noexcept ; [[nodiscard]] [[nodiscard]] void last_write_time(const path& __p, file_time_type __new_time); void last_write_time(const path& __p, file_time_type __new_time, error_code& __ec) noexcept; void permissions(const path& __p, perms __prms, perm_options __opts = perm_options::replace); void permissions(const path& __p, perms __prms, error_code& __ec) noexcept ; void permissions(const path& __p, perms __prms, perm_options __opts, error_code& __ec) noexcept; [[nodiscard]] path proximate(const path& __p, error_code& __ec) ; [[nodiscard]] path proximate(const path& __p, const path& __base = current_path()); [[nodiscard]] path proximate(const path& __p, const path& __base, error_code& __ec); [[nodiscard]] path read_symlink(const path& __p); [[nodiscard]] path read_symlink(const path& __p, error_code& __ec); [[nodiscard]] path relative(const path& __p, error_code& __ec) ; [[nodiscard]] path relative(const path& __p, const path& __base = current_path()); [[nodiscard]] path relative(const path& __p, const path& __base, error_code& __ec); bool remove(const path& __p); void rename(const path& __from, const path& __to); void rename(const path& __from, const path& __to, error_code& __ec) noexcept; void resize_file(const path& __p, uintmax_t __size); void resize_file(const path& __p, uintmax_t __size, error_code& __ec) noexcept; [[nodiscard]] space_info space(const path& __p); [[nodiscard]] space_info space(const path& __p, error_code& __ec) noexcept; [[nodiscard]] file_status status(const path& __p); [[nodiscard]] file_status status(const path& __p, error_code& __ec) noexcept; [[nodiscard]] [[nodiscard]] file_status symlink_status(const path& __p); [[nodiscard]] file_status symlink_status(const path& __p, error_code& __ec) noexcept; [[nodiscard]] path temp_directory_path(); [[nodiscard]] path temp_directory_path(error_code& __ec); [[nodiscard]] path weakly_canonical(const path& __p); [[nodiscard]] path weakly_canonical(const path& __p, error_code& __ec); } } namespace dwarfs { class category_resolver { public: virtual ~category_resolver() = default; virtual std::string_view category_name(fragment_category::value_type c) const = 0; virtual std::optional<fragment_category::value_type> category_value(std::string_view name) const = 0; }; } #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wshadow" namespace folly { namespace small_vector_policy { namespace detail { struct item_size_type { template <typename T> using get = typename T::size_type; template <typename T> struct set { using size_type = T; }; }; struct item_in_situ_only { template <typename T> using get = typename T::in_situ_only; template <typename T> struct set { using in_situ_only = T; }; }; template <template <typename> class F, typename... T> constexpr size_t last_matching_() { bool const values[] = {is_detected_v<F, T>..., false}; for (size_t i = 0; i < sizeof...(T); ++i) { auto const j = sizeof...(T) - 1 - i; if (values[j]) { return j; } } return sizeof...(T); } template <size_t M, typename I, typename... P> struct merge_ : I::template set<typename I::template get< type_pack_element_t<sizeof...(P) - M, P...>>> {}; template <typename I, typename... P> struct merge_<0, I, P...> {}; template <typename I, typename... P> using merge = merge_<sizeof...(P) - last_matching_<I::template get, P...>(), I, P...>; } template <typename... Policy> struct merge : detail::merge<detail::item_size_type, Policy...>, detail::merge<detail::item_in_situ_only, Policy...> {}; template <typename SizeType> struct policy_size_type { using size_type = SizeType; }; template <bool Value> struct policy_in_situ_only { using in_situ_only = std::bool_constant<Value>; }; } template <class T, std::size_t M, class P> class small_vector; namespace detail { template <class T, class Create> typename std::enable_if<!std::is_trivially_copyable_v<T>>::type moveObjectsRightAndCreate( T* const first, T* const lastConstructed, T* const realLast, Create&& create) { if (lastConstructed == realLast) { return; } T* out = realLast; T* in = lastConstructed; { auto rollback = makeGuard([&] { if (out < lastConstructed) { out = lastConstructed - 1; } std::destroy(out + 1, realLast); }); for (; in != first && out > lastConstructed;) { --out; new (out) T(std::move(*(--in))); } for (; in != first;) { --out; *out = std::move(*(--in)); } for (; out > lastConstructed;) { --out; new (out) T(create()); } for (; out != first;) { --out; *out = create(); } rollback.dismiss(); } } template <class T, class Create> typename std::enable_if<std::is_trivially_copyable_v<T>>::type moveObjectsRightAndCreate( T* const first, T* const lastConstructed, T* const realLast, Create&& create) ; template <class T, class Function> void populateMemForward(T* mem, std::size_t n, Function const& op) ; template <class Iterator1, class Iterator2> void partiallyUninitializedCopy( Iterator1 from, size_t fromSize, Iterator2 to, size_t toSize) ; template <class SizeType, bool ShouldUseHeap, bool AlwaysUseHeap> struct IntegralSizePolicyBase { typedef SizeType InternalSizeType; IntegralSizePolicyBase() ; protected: static constexpr std::size_t policyMaxSize() ; std::size_t doSize() const ; std::size_t isExtern() const ; void setExtern(bool b) ; std::size_t isHeapifiedCapacity() const ; void setHeapifiedCapacity(bool b) ; void setSize(std::size_t sz) ; void incrementSize(std::size_t n) ; std::size_t getInternalSize() ; void swapSizePolicy(IntegralSizePolicyBase& o) ; void resetSizePolicy() ; protected: static bool constexpr kShouldUseHeap = ShouldUseHeap || AlwaysUseHeap; static bool constexpr kAlwaysUseHeap = AlwaysUseHeap; private: static SizeType constexpr kExternMask = kShouldUseHeap ? SizeType(1) << (sizeof(SizeType) * 8 - 1) : 0; static SizeType constexpr kCapacityMask = kShouldUseHeap ? SizeType(1) << (sizeof(SizeType) * 8 - 2) : 0; static SizeType constexpr kClearMask = kShouldUseHeap ? SizeType(3) << (sizeof(SizeType) * 8 - 2) : 0; SizeType size_; }; template <class SizeType, bool ShouldUseHeap, bool AlwaysUseHeap> struct IntegralSizePolicy; template <class SizeType, bool AlwaysUseHeap> struct IntegralSizePolicy<SizeType, true, AlwaysUseHeap> : public IntegralSizePolicyBase<SizeType, true, AlwaysUseHeap> { public: template <class T> typename std::enable_if<!std::is_trivially_copyable_v<T>>::type moveToUninitialized(T* first, T* last, T* out) ; template <class T> typename std::enable_if<std::is_trivially_copyable_v<T>>::type moveToUninitialized(T* first, T* last, T* out) ; template <class T, class EmplaceFunc> void moveToUninitializedEmplace( T* begin, T* end, T* out, SizeType pos, EmplaceFunc&& emplaceFunc) ; }; template <class SizeType, bool AlwaysUseHeap> struct IntegralSizePolicy<SizeType, false, AlwaysUseHeap> : public IntegralSizePolicyBase<SizeType, false, AlwaysUseHeap> { public: template <class T> void moveToUninitialized(T* , T* , T* ) ; template <class T, class EmplaceFunc> void moveToUninitializedEmplace( T* , T* , T* , SizeType , EmplaceFunc&& ) ; }; template <class Value, std::size_t RequestedMaxInline, class InPolicy> struct small_vector_base { static_assert(!std::is_integral<InPolicy>::value, "legacy"); using Policy = small_vector_policy::merge< small_vector_policy::policy_size_type<size_t>, small_vector_policy::policy_in_situ_only<false>, conditional_t<std::is_void<InPolicy>::value, tag_t<>, InPolicy>>; typedef IntegralSizePolicy< typename Policy::size_type, !Policy::in_situ_only::value, RequestedMaxInline == 0> ActualSizePolicy; typedef boost::totally_ordered1< small_vector<Value, RequestedMaxInline, InPolicy>, ActualSizePolicy> type; }; void* unshiftPointer(void* p, size_t sizeBytes) ; void* shiftPointer(void* p, size_t sizeBytes) ; } template <class Value, std::size_t RequestedMaxInline = 1, class Policy = void> class small_vector : public detail::small_vector_base<Value, RequestedMaxInline, Policy>:: type { typedef typename detail:: small_vector_base<Value, RequestedMaxInline, Policy>::type BaseType; typedef typename BaseType::InternalSizeType InternalSizeType; static constexpr auto kSizeOfValuePtr = sizeof(Value*); static constexpr auto kSizeOfValue = sizeof(Value); static constexpr std::size_t MaxInline{ RequestedMaxInline == 0 ? 0 : constexpr_max(kSizeOfValuePtr / kSizeOfValue, RequestedMaxInline)}; public: typedef std::size_t size_type; typedef Value value_type; typedef std::allocator<Value> allocator_type; typedef value_type& reference; typedef value_type const& const_reference; typedef value_type* iterator; typedef value_type* pointer; typedef value_type const* const_iterator; typedef value_type const* const_pointer; typedef std::ptrdiff_t difference_type; typedef std::reverse_iterator<iterator> reverse_iterator; typedef std::reverse_iterator<const_iterator> const_reverse_iterator; small_vector() = default; small_vector(const std::allocator<Value>&) ; small_vector(small_vector const& o) ; small_vector(small_vector&& o) noexcept( std::is_nothrow_move_constructible<Value>::value) ; small_vector(std::initializer_list<value_type> il) ; explicit small_vector(size_type n) ; small_vector(size_type n, value_type const& t) ; template <class Arg> explicit small_vector(Arg arg1, Arg arg2) ; ~small_vector() ; small_vector& operator=(small_vector const& o) ; small_vector& operator=(small_vector&& o) noexcept( std::is_nothrow_move_constructible<Value>::value) ; bool operator==(small_vector const& o) const ; bool operator<(small_vector const& o) const ; static constexpr size_type max_size() ; allocator_type get_allocator() const ; size_type size() const ; bool empty() const ; iterator begin() ; iterator end() ; const_iterator begin() const ; const_iterator end() const ; const_iterator cbegin() const ; const_iterator cend() const ; reverse_iterator rbegin() ; reverse_iterator rend() ; const_reverse_iterator rbegin() const ; const_reverse_iterator rend() const ; const_reverse_iterator crbegin() const ; const_reverse_iterator crend() const ; void swap(small_vector& o) noexcept( std::is_nothrow_move_constructible<Value>::value && std::is_nothrow_swappable_v<Value>) ; void resize(size_type sz) ; void resize(size_type sz, value_type const& v) ; value_type* data() noexcept ; value_type const* data() const noexcept ; template <class... Args> iterator emplace(const_iterator p, Args&&... args) ; void reserve(size_type sz) ; size_type capacity() const ; void shrink_to_fit() ; template <class... Args> reference emplace_back(Args&&... args) ; void push_back(value_type&& t) ; void push_back(value_type const& t) ; void pop_back() ; iterator insert(const_iterator constp, value_type&& t) ; iterator insert(const_iterator p, value_type const& t) ; iterator insert(const_iterator pos, size_type n, value_type const& val) ; template <class Arg> iterator insert(const_iterator p, Arg arg1, Arg arg2) ; iterator insert(const_iterator p, std::initializer_list<value_type> il) ; iterator erase(const_iterator q) ; iterator erase(const_iterator q1, const_iterator q2) ; void clear() ; template <class Arg> void assign(Arg first, Arg last) ; void assign(std::initializer_list<value_type> il) ; void assign(size_type n, const value_type& t) ; reference front() ; reference back() ; const_reference front() const ; const_reference back() const ; reference operator[](size_type i) ; const_reference operator[](size_type i) const ; reference at(size_type i) ; const_reference at(size_type i) const ; private: static iterator unconst(const_iterator it) ; void downsize(size_type sz) ; void copyWholeInlineStorageTrivial(small_vector const& o) ; void moveInlineStorageRelocatable(small_vector&& o) ; void reset() ; template <class It> iterator insertImpl(iterator pos, It first, It last, std::false_type) ; iterator insertImpl( iterator pos, size_type n, const value_type& val, std::true_type) ; void destroy() ; template <class It> void constructImpl(It first, It last, std::false_type) ; template <typename InitFunc> void doConstruct(size_type n, InitFunc&& func) ; void constructImpl(size_type n, value_type const& val, std::true_type) ; size_type computeNewSize() const ; void makeSize(size_type newSize) ; template <typename EmplaceFunc> void makeSize(size_type newSize, EmplaceFunc&& emplaceFunc, size_type pos) ; template <typename EmplaceFunc> void makeSizeInternal( size_type newSize, bool insert, EmplaceFunc&& emplaceFunc, size_type pos) ; void setCapacity(size_type newCapacity) ; private: struct HeapPtrWithCapacity { value_type* heap_; InternalSizeType capacity_; InternalSizeType getCapacity() const ; void setCapacity(InternalSizeType c) ; size_t allocationExtraBytes() const ; } __attribute__((__packed__)); struct HeapPtr { value_type* heap_; InternalSizeType getCapacity() const ; void setCapacity(InternalSizeType c) ; size_t allocationExtraBytes() const ; } __attribute__((__packed__)); static constexpr size_t kMaxInlineNonZero = MaxInline ? MaxInline : 1u; typedef aligned_storage_for_t<value_type[kMaxInlineNonZero]> InlineStorageDataType; typedef typename std::conditional< sizeof(value_type) * MaxInline != 0, InlineStorageDataType, char>::type InlineStorageType; static constexpr bool kMayCopyWholeInlineStorage = sizeof(InlineStorageType) <= hardware_constructive_interference_size / 2; static constexpr bool kShouldCopyWholeInlineStorageTrivial = std::is_trivially_copyable_v<Value> && kMayCopyWholeInlineStorage; static bool constexpr kHasInlineCapacity = !BaseType::kAlwaysUseHeap && sizeof(HeapPtrWithCapacity) < sizeof(InlineStorageType); static size_t constexpr kHeapifyCapacitySize = sizeof( typename std:: aligned_storage<sizeof(InternalSizeType), alignof(value_type)>::type); struct AllocationSize { auto operator()(void* ptr) const ; }; static bool constexpr kMustTrackHeapifiedCapacity = BaseType::kAlwaysUseHeap || !is_invocable_r_v<size_t, AllocationSize, void*>; static size_t constexpr kHeapifyCapacityThreshold = (kMustTrackHeapifiedCapacity ? 0 : 100) * kHeapifyCapacitySize; static bool constexpr kAlwaysHasCapacity = kHasInlineCapacity || kMustTrackHeapifiedCapacity; typedef typename std:: conditional<kHasInlineCapacity, HeapPtrWithCapacity, HeapPtr>::type PointerType; bool hasCapacity() const ; void freeHeap() ; union Data { explicit Data() ; PointerType pdata_; InlineStorageType storage_; value_type* buffer() noexcept ; value_type const* buffer() const noexcept ; value_type* heap() noexcept ; value_type const* heap() const noexcept ; InternalSizeType getCapacity() const ; void setCapacity(InternalSizeType c) ; } u; }; template <class T, std::size_t MaxInline, class P> void swap(small_vector<T, MaxInline, P>& a, small_vector<T, MaxInline, P>& b) ; template <class T, std::size_t MaxInline, class P, class U> void erase(small_vector<T, MaxInline, P>& v, U value) ; template <class T, std::size_t MaxInline, class P, class Predicate> void erase_if(small_vector<T, MaxInline, P>& v, Predicate predicate) ; namespace detail { template <class T, size_t M, class P> struct IndexableTraits<small_vector<T, M, P>> : public IndexableTraitsSeq<small_vector<T, M, P>> {}; } } #pragma GCC diagnostic pop namespace std { template <class T, std::size_t M, class P> struct hash<folly::small_vector<T, M, P>> { size_t operator()(const folly::small_vector<T, M, P>& v) const { return folly::hash::hash_range(v.begin(), v.end()); } }; } namespace std __attribute__ ((__visibility__ ("default"))) { extern istream cin; extern ostream cout; extern ostream cerr; extern ostream clog; extern wistream wcin; extern wostream wcout; extern wostream wcerr; extern wostream wclog; __extension__ __asm (".globl _ZSt21ios_base_library_initv"); } namespace dwarfs { using file_off_t = int64_t; using sys_char = char; using sys_string = std::string; } namespace dwarfs { class single_inode_fragment { public: single_inode_fragment(fragment_category category, file_off_t length) : category_{category} , length_{length} {} fragment_category category() const { return category_; } file_off_t length() const ; file_off_t size() const ; void add_chunk(size_t block, size_t offset, size_t size); std::span<thrift::metadata::chunk const> chunks() const ; void extend(file_off_t length) ; bool chunks_are_consistent() const; private: fragment_category category_; file_off_t length_; folly::small_vector<thrift::metadata::chunk, 1> chunks_; }; class inode_fragments { public: using mapper_function_type = std::function<std::string(fragment_category::value_type)>; inode_fragments() = default; single_inode_fragment& emplace_back(fragment_category category, file_off_t length) ; std::span<single_inode_fragment const> span() const ; single_inode_fragment const& back() const ; single_inode_fragment& back() ; auto begin() const ; auto begin() { return fragments_.begin(); } auto end() const { return fragments_.end(); } auto end() { return fragments_.end(); } size_t size() const { return fragments_.size(); } bool empty() const ; void clear() ; fragment_category get_single_category() const ; explicit operator bool() const ; std::ostream& to_stream(std::ostream& os, mapper_function_type const& mapper = mapper_function_type()) const; std::string to_string(mapper_function_type const& mapper = mapper_function_type()) const; std::unordered_map<fragment_category, file_off_t> get_category_sizes() const; private: folly::small_vector<single_inode_fragment, 1> fragments_; }; std::ostream& operator<<(std::ostream& os, inode_fragments const& frag) ; } namespace boost::program_options { class options_description; class variables_map; } namespace dwarfs { class logger; using category_mapper = std::function<fragment_category::value_type(std::string_view)>; class categorizer { public: static constexpr std::string_view const DEFAULT_CATEGORY{"<default>"}; virtual ~categorizer() = default; virtual std::span<std::string_view const> categories() const = 0; virtual std::string category_metadata(std::string_view category_name, fragment_category c) const; virtual void set_metadata_requirements(std::string_view category_name, std::string requirements); virtual bool subcategory_less(fragment_category a, fragment_category b) const = 0; }; class random_access_categorizer : public categorizer { public: virtual inode_fragments categorize(std::filesystem::path const& path, std::span<uint8_t const> data, category_mapper const& mapper) const = 0; }; class sequential_categorizer_job { public: virtual ~sequential_categorizer_job() = default; virtual void add(std::span<uint8_t const> data) = 0; virtual inode_fragments result() = 0; }; class sequential_categorizer : public categorizer { public: virtual std::unique_ptr<sequential_categorizer_job> job(std::filesystem::path const& path, size_t total_size, category_mapper const& mapper) const = 0; }; class categorizer_job { public: class impl; categorizer_job(); categorizer_job(std::unique_ptr<impl> impl); void set_total_size(size_t total_size) ; void categorize_random_access(std::span<uint8_t const> data) ; void categorize_sequential(std::span<uint8_t const> data) ; inode_fragments result() ; explicit operator bool() const ; bool best_result_found() const ; class impl { public: virtual ~impl() = default; virtual void set_total_size(size_t total_size) = 0; virtual void categorize_random_access(std::span<uint8_t const> data) = 0; virtual void categorize_sequential(std::span<uint8_t const> data) = 0; virtual inode_fragments result() = 0; virtual bool best_result_found() const = 0; }; private: std::unique_ptr<impl> impl_; }; class categorizer_manager : public category_resolver { public: categorizer_manager(logger& lgr); static fragment_category default_category(); void add(std::shared_ptr<categorizer> c) ; categorizer_job job(std::filesystem::path const& path) const ; std::string_view category_name(fragment_category::value_type c) const override ; std::optional<fragment_category::value_type> category_value(std::string_view name) const override ; std::string category_metadata(fragment_category c) const ; void set_metadata_requirements(fragment_category::value_type c, std::string req) ; bool deterministic_less(fragment_category a, fragment_category b) const ; class impl { public: virtual ~impl() = default; virtual void add(std::shared_ptr<categorizer> c) = 0; virtual categorizer_job job(std::filesystem::path const& path) const = 0; virtual std::string_view category_name(fragment_category::value_type c) const = 0; virtual std::optional<fragment_category::value_type> category_value(std::string_view name) const = 0; virtual std::string category_metadata(fragment_category c) const = 0; virtual void set_metadata_requirements(fragment_category::value_type c, std::string req) = 0; virtual bool deterministic_less(fragment_category a, fragment_category b) const = 0; }; private: std::unique_ptr<impl> impl_; }; std::string category_prefix(std::shared_ptr<categorizer_manager> const& mgr, fragment_category cat); std::string category_prefix(std::unique_ptr<categorizer_manager> const& mgr, fragment_category cat); std::string category_prefix(categorizer_manager const* mgr, fragment_category cat); std::string category_prefix(std::shared_ptr<categorizer_manager> const& mgr, fragment_category::value_type cat); std::string category_prefix(std::unique_ptr<categorizer_manager> const& mgr, fragment_category::value_type cat); std::string category_prefix(categorizer_manager const* mgr, fragment_category::value_type cat); class categorizer_info { public: virtual ~categorizer_info() = default; virtual std::string_view name() const = 0; virtual std::shared_ptr<boost::program_options::options_description const> options() const = 0; }; class categorizer_factory : public categorizer_info { public: virtual std::unique_ptr<categorizer> create(logger& lgr, boost::program_options::variables_map const& vm) const = 0; }; namespace detail { template <typename T> class categorizer_factory_registrar { public: categorizer_factory_registrar(); }; } class categorizer_registry { public: template <typename T> friend class detail::categorizer_factory_registrar; static categorizer_registry& instance(); std::unique_ptr<categorizer> create(logger& lgr, std::string const& name, boost::program_options::variables_map const& vm) const; void add_options(boost::program_options::options_description& opts) const; std::vector<std::string> categorizer_names() const; private: categorizer_registry(); ~categorizer_registry(); void register_factory(std::unique_ptr<categorizer_factory const>&& factory); std::map<std::string, std::unique_ptr<categorizer_factory const>> factories_; }; namespace detail { } } namespace dwarfs { struct posix_file_type { static constexpr uint16_t mask = 0170000; enum value : uint16_t { socket = 0140000, symlink = 0120000, regular = 0100000, block = 0060000, directory = 0040000, character = 0020000, fifo = 0010000, }; static constexpr value from_mode(uint16_t mode) ; }; std::filesystem::file_status file_mode_to_status(uint16_t mode); uint16_t file_status_to_mode(std::filesystem::file_status status); } namespace dwarfs { struct file_stat { using perms_type = std::underlying_type_t<std::filesystem::perms>; using mode_type = uint32_t; using dev_type = uint64_t; using ino_type = uint64_t; using nlink_type = uint64_t; using uid_type = uint32_t; using gid_type = uint32_t; using off_type = int64_t; using blksize_type = int64_t; using blkcnt_type = int64_t; using time_type = int64_t; std::filesystem::file_status status() const ;; posix_file_type::value type() const ;; perms_type permissions() const ;; void set_permissions(perms_type perms) ; bool is_directory() const ; bool is_regular_file() const ; bool is_symlink() const ; bool is_device() const ; static std::string perm_string(mode_type mode); static std::string mode_string(mode_type mode); dev_type dev; ino_type ino; nlink_type nlink; mode_type mode; uid_type uid; gid_type gid; dev_type rdev; off_type size; blksize_type blksize; blkcnt_type blocks; time_type atime; time_type mtime; time_type ctime; }; file_stat make_file_stat(std::filesystem::path const& path); template <bool with_block_info = true, typename T> void copy_file_stat(T* out, file_stat const& in) ; } namespace dwarfs { class object { public: virtual ~object() = default; }; } namespace dwarfs { class entry_interface : public object { public: using uid_type = file_stat::uid_type; using gid_type = file_stat::gid_type; using mode_type = file_stat::mode_type; virtual std::string path_as_string() const = 0; virtual std::string dpath() const = 0; virtual std::string unix_dpath() const = 0; virtual std::string const& name() const = 0; virtual size_t size() const = 0; virtual bool is_directory() const = 0; virtual mode_type get_permissions() const = 0; virtual void set_permissions(mode_type perm) = 0; virtual uid_type get_uid() const = 0; virtual void set_uid(uid_type uid) = 0; virtual gid_type get_gid() const = 0; virtual void set_gid(gid_type gid) = 0; virtual uint64_t get_atime() const = 0; virtual void set_atime(uint64_t atime) = 0; virtual uint64_t get_mtime() const = 0; virtual void set_mtime(uint64_t mtime) = 0; virtual uint64_t get_ctime() const = 0; virtual void set_ctime(uint64_t ctime) = 0; }; } namespace dwarfs { namespace thrift::metadata { class inode_data; class metadata; } class file; class link; class dir; class device; class inode; class mmif; class os_access; class progress; class global_entry_data; class entry_visitor { public: virtual ~entry_visitor() = default; virtual void visit(file* p) = 0; virtual void visit(device* p) = 0; virtual void visit(link* p) = 0; virtual void visit(dir* p) = 0; }; class entry : public entry_interface { public: enum type_t { E_FILE, E_DIR, E_LINK, E_DEVICE, E_OTHER }; entry(std::filesystem::path const& path, std::shared_ptr<entry> parent, file_stat const& st); bool has_parent() const; std::shared_ptr<entry> parent() const; void set_name(std::string const& name); std::filesystem::path fs_path() const; std::string path_as_string() const override; std::string dpath() const override; std::string unix_dpath() const override; std::string const& name() const override ; bool less_revpath(entry const& rhs) const; size_t size() const override ; virtual type_t type() const = 0; bool is_directory() const override; virtual void walk(std::function<void(entry*)> const& f); virtual void walk(std::function<void(const entry*)> const& f) const; void pack(thrift::metadata::inode_data& entry_v2, global_entry_data const& data) const; void update(global_entry_data& data) const; virtual void accept(entry_visitor& v, bool preorder = false) = 0; virtual void scan(os_access const& os, progress& prog) = 0; file_stat const& status() const ; void set_entry_index(uint32_t index) ; std::optional<uint32_t> const& entry_index() const ; uint64_t raw_inode_num() const ; uint64_t num_hard_links() const ; virtual void set_inode_num(uint32_t ino) = 0; virtual std::optional<uint32_t> const& inode_num() const = 0; mode_type get_permissions() const override; void set_permissions(mode_type perm) override; uid_type get_uid() const override; void set_uid(uid_type uid) override; gid_type get_gid() const override; void set_gid(gid_type gid) override; uint64_t get_atime() const override; void set_atime(uint64_t atime) override; uint64_t get_mtime() const override; void set_mtime(uint64_t mtime) override; uint64_t get_ctime() const override; void set_ctime(uint64_t ctime) override; void override_size(size_t size) ; private: std::u8string u8name() const; std::string name_; std::weak_ptr<entry> parent_; file_stat stat_; std::optional<uint32_t> entry_index_; }; class file : public entry { public: using entry::entry; type_t type() const override; std::string_view hash() const; void set_inode(std::shared_ptr<inode> ino); std::shared_ptr<inode> get_inode() const; void accept(entry_visitor& v, bool preorder) override; void scan(os_access const& os, progress& prog) override; void scan(mmif* mm, progress& prog, std::optional<std::string> const& hash_alg); void create_data(); void hardlink(file* other, progress& prog); uint32_t unique_file_id() const; void set_inode_num(uint32_t ino) override; std::optional<uint32_t> const& inode_num() const override; void set_invalid() ; bool is_invalid() const ; uint32_t refcount() const ; private: struct data { using hash_type = folly::small_vector<char, 16>; hash_type hash; uint32_t refcount{1}; std::optional<uint32_t> inode_num; std::atomic<bool> invalid{false}; }; std::shared_ptr<data> data_; std::shared_ptr<inode> inode_; }; class dir : public entry { public: using entry::entry; type_t type() const override; void add(std::shared_ptr<entry> e); void walk(std::function<void(entry*)> const& f) override; void walk(std::function<void(const entry*)> const& f) const override; void accept(entry_visitor& v, bool preorder) override; void sort(); void pack(thrift::metadata::metadata& mv2, global_entry_data const& data) const; void pack_entry(thrift::metadata::metadata& mv2, global_entry_data const& data) const; void scan(os_access const& os, progress& prog) override; bool empty() const ; void remove_empty_dirs(progress& prog); void set_inode_num(uint32_t ino) override ; std::optional<uint32_t> const& inode_num() const override ; std::shared_ptr<entry> find(std::filesystem::path const& path); private: using entry_ptr = std::shared_ptr<entry>; using lookup_table = std::unordered_map<std::string_view, entry_ptr>; void populate_lookup_table(); std::vector<std::shared_ptr<entry>> entries_; std::optional<uint32_t> inode_num_; std::unique_ptr<lookup_table> lookup_; }; class link : public entry { public: using entry::entry; type_t type() const override; const std::string& linkname() const; void accept(entry_visitor& v, bool preorder) override; void scan(os_access const& os, progress& prog) override; void set_inode_num(uint32_t ino) override ; std::optional<uint32_t> const& inode_num() const override ; private: std::string link_; std::optional<uint32_t> inode_num_; }; class device : public entry { public: using entry::entry; type_t type() const override; void accept(entry_visitor& v, bool preorder) override; void scan(os_access const& os, progress& prog) override; uint64_t device_id() const; void set_inode_num(uint32_t ino) override ; std::optional<uint32_t> const& inode_num() const override ; private: std::optional<uint32_t> inode_num_; }; class entry_factory { public: static std::unique_ptr<entry_factory> create(); virtual ~entry_factory() = default; virtual std::shared_ptr<entry> create(os_access const& os, std::filesystem::path const& path, std::shared_ptr<entry> parent = nullptr) = 0; }; } namespace dwarfs { class error : public std::exception { public: char const* what() const noexcept override ; char const* file() const ; int line() const ; protected: error(std::string const& s, char const* file, int line) noexcept; private: std::string what_; char const* file_; int line_; }; class runtime_error : public error { public: runtime_error(std::string const& s, char const* file, int line) ; }; class system_error : public std::system_error { public: system_error(char const* file, int line) noexcept; system_error(std::string const& s, char const* file, int line) noexcept; system_error(std::string const& s, int err, char const* file, int line) noexcept; system_error(int err, char const* file, int line) noexcept; int get_errno() const ; char const* file() const ; int line() const ; private: char const* file_; int line_; }; void dump_exceptions(); [[noreturn]] void handle_nothrow(char const* expr, char const* file, int line); [[noreturn]] void assertion_failed(char const* expr, std::string const& msg, char const* file, int line); } namespace dwarfs { enum class feature { }; } namespace std { template<> struct hash<::dwarfs::feature> : ::apache::thrift::detail::enum_hash<::dwarfs::feature> {}; } namespace apache { namespace thrift { template <> struct TEnumDataStorage<::dwarfs::feature>; template <> struct TEnumTraits<::dwarfs::feature> { using type = ::dwarfs::feature; static constexpr std::size_t const size = 0; static folly::Range<type const*> const values; static folly::Range<std::string_view const*> const names; static bool findName(type value, std::string_view* out) noexcept; static bool findValue(std::string_view name, type* out) noexcept; static char const* findName(type value) noexcept ; }; }} namespace apache::thrift::detail::annotation { } namespace apache::thrift::detail::qualifier { } namespace dwarfs { using ::apache::thrift::detail::operator!=; using ::apache::thrift::detail::operator>; using ::apache::thrift::detail::operator<=; using ::apache::thrift::detail::operator>=; } namespace dwarfs { class feature_set { public: static std::set<std::string> get_supported(); static std::set<std::string> get_unsupported(std::set<std::string> features); void add(feature f); std::set<std::string> const& get() const ; private: std::set<std::string> features_; }; } namespace dwarfs { class input_stream { public: virtual ~input_stream() = default; virtual std::istream& is() = 0; virtual void close() = 0; virtual void close(std::error_code& ec) = 0; }; class output_stream { public: virtual ~output_stream() = default; virtual std::ostream& os() = 0; virtual void close() = 0; virtual void close(std::error_code& ec) = 0; }; class file_access { public: virtual ~file_access() = default; virtual bool exists(std::filesystem::path const& path) const = 0; virtual std::unique_ptr<input_stream> open_input(std::filesystem::path const& path) const = 0; virtual std::unique_ptr<input_stream> open_input(std::filesystem::path const& path, std::error_code& ec) const = 0; virtual std::unique_ptr<input_stream> open_input_binary(std::filesystem::path const& path) const = 0; virtual std::unique_ptr<input_stream> open_input_binary(std::filesystem::path const& path, std::error_code& ec) const = 0; virtual std::unique_ptr<output_stream> open_output(std::filesystem::path const& path) const = 0; virtual std::unique_ptr<output_stream> open_output(std::filesystem::path const& path, std::error_code& ec) const = 0; virtual std::unique_ptr<output_stream> open_output_binary(std::filesystem::path const& path) const = 0; virtual std::unique_ptr<output_stream> open_output_binary(std::filesystem::path const& path, std::error_code& ec) const = 0; }; } namespace dwarfs { class file; class inode_manager; class logger; class os_access; class progress; class worker_group; struct inode_options; namespace detail { class file_scanner { public: struct options { std::optional<std::string> hash_algo{}; bool debug_inode_create{false}; }; file_scanner(logger& lgr, worker_group& wg, os_access const& os, inode_manager& im, progress& prog, options const& opts); void scan(file* p) ; void finalize(uint32_t& inode_num) ; uint32_t num_unique() const ; void dump(std::ostream& os) const ; class impl { public: virtual ~impl() = default; virtual void scan(file* p) = 0; virtual void finalize(uint32_t& inode_num) = 0; virtual uint32_t num_unique() const = 0; virtual void dump(std::ostream& os) const = 0; }; private: std::unique_ptr<impl> impl_; }; } } namespace dwarfs { struct compression_constraints { std::optional<uint32_t> granularity; }; } namespace dwarfs { enum class compression_type_v1 : uint8_t { NONE = 0 , LZMA = 1 , ZSTD = 2 , LZ4 = 3 , LZ4HC = 4 , BROTLI = 5 , FLAC = 6 , RICEPP = 7 }; enum class compression_type : uint16_t { NONE = 0 , LZMA = 1 , ZSTD = 2 , LZ4 = 3 , LZ4HC = 4 , BROTLI = 5 , FLAC = 6 , RICEPP = 7 }; } namespace dwarfs { class option_map; class bad_compression_ratio_error : public std::runtime_error { public: bad_compression_ratio_error() ; }; class block_compressor { public: block_compressor() = default; explicit block_compressor(const std::string& spec); block_compressor(const block_compressor& bc) ; block_compressor(block_compressor&& bc) = default; block_compressor& operator=(block_compressor&& rhs) = default; std::vector<uint8_t> compress(std::vector<uint8_t> const& data) const ; std::vector<uint8_t> compress(std::vector<uint8_t>&& data) const ; std::vector<uint8_t> compress(std::vector<uint8_t> const& data, std::string const& metadata) const ; std::vector<uint8_t> compress(std::vector<uint8_t>&& data, std::string const& metadata) const ; compression_type type() const ; std::string describe() const ; std::string metadata_requirements() const ; compression_constraints get_compression_constraints(std::string const& metadata) const ; class impl { public: virtual ~impl() = default; virtual std::unique_ptr<impl> clone() const = 0; virtual std::vector<uint8_t> compress(const std::vector<uint8_t>& data, std::string const* metadata) const = 0; virtual std::vector<uint8_t> compress(std::vector<uint8_t>&& data, std::string const* metadata) const = 0; virtual compression_type type() const = 0; virtual std::string describe() const = 0; virtual std::string metadata_requirements() const = 0; virtual compression_constraints get_compression_constraints(std::string const& metadata) const = 0; }; private: std::unique_ptr<impl> impl_; }; class block_decompressor { public: block_decompressor(compression_type type, const uint8_t* data, size_t size, std::vector<uint8_t>& target); bool decompress_frame(size_t frame_size = 8192) ; size_t uncompressed_size() const ; compression_type type() const ; std::optional<std::string> metadata() const ; static std::vector<uint8_t> decompress(compression_type type, const uint8_t* data, size_t size) ; class impl { public: virtual ~impl() = default; virtual bool decompress_frame(size_t frame_size) = 0; virtual size_t uncompressed_size() const = 0; virtual std::optional<std::string> metadata() const = 0; virtual compression_type type() const = 0; }; private: std::unique_ptr<impl> impl_; }; class compression_info { public: virtual ~compression_info() = default; virtual std::string_view name() const = 0; virtual std::string_view description() const = 0; virtual std::vector<std::string> const& options() const = 0; virtual std::set<std::string> library_dependencies() const = 0; }; class compression_factory : public compression_info { public: virtual std::unique_ptr<block_compressor::impl> make_compressor(option_map& om) const = 0; virtual std::unique_ptr<block_decompressor::impl> make_decompressor(std::span<uint8_t const> data, std::vector<uint8_t>& target) const = 0; }; namespace detail { template <typename T> class compression_factory_registrar { public: compression_factory_registrar(compression_type type); }; } class compression_registry { public: template <typename T> friend class detail::compression_factory_registrar; static compression_registry& instance(); std::unique_ptr<block_compressor::impl> make_compressor(std::string_view spec) const; std::unique_ptr<block_decompressor::impl> make_decompressor(compression_type type, std::span<uint8_t const> data, std::vector<uint8_t>& target) const; void for_each_algorithm( std::function<void(compression_type, compression_info const&)> const& fn) const; private: compression_registry(); ~compression_registry(); void register_factory(compression_type type, std::unique_ptr<compression_factory const>&& factory); std::unordered_map<compression_type, std::unique_ptr<compression_factory const>> factories_; std::unordered_map<std::string, compression_type> names_; }; namespace detail { } } namespace dwarfs { class checksum { public: enum class algorithm { SHA2_512_256, XXH3_64, XXH3_128, }; static bool is_available(std::string const& algo); static std::vector<std::string> available_algorithms(); static bool verify(algorithm alg, void const* data, size_t size, void const* digest, size_t digest_size); static bool verify(std::string const& alg, void const* data, size_t size, void const* digest, size_t digest_size); checksum(algorithm alg); checksum(std::string const& alg); checksum& update(void const* data, size_t size) ; bool finalize(void* digest) const ; size_t digest_size() const ; std::string hexdigest() const ; class impl { public: virtual ~impl() = default; virtual void update(void const* data, size_t size) = 0; virtual bool finalize(void* digest) = 0; virtual size_t digest_size() = 0; virtual std::string hexdigest() = 0; }; private: std::unique_ptr<impl> impl_; }; std::ostream& operator<<(std::ostream& os, checksum::algorithm alg); } namespace dwarfs { constexpr uint8_t MAJOR_VERSION = 2; constexpr uint8_t MINOR_VERSION = 5; enum class section_type : uint16_t { BLOCK = 0, METADATA_V2_SCHEMA = 7, METADATA_V2 = 8, SECTION_INDEX = 9, HISTORY = 10, }; struct file_header { char magic[6]; uint8_t major; uint8_t minor; }; struct section_header { section_type type; compression_type_v1 compression; uint8_t unused; uint32_t length; std::string to_string() const; void dump(std::ostream& os) const; }; struct section_header_v2 { char magic[6]; uint8_t major; uint8_t minor; uint8_t sha2_512_256[32]; uint64_t xxh3_64; uint32_t number; uint16_t type; uint16_t compression; uint64_t length; std::string to_string() const; void dump(std::ostream& os) const; }; struct filesystem_info { uint64_t block_count{0}; uint64_t compressed_block_size{0}; uint64_t uncompressed_block_size{0}; uint64_t compressed_metadata_size{0}; uint64_t uncompressed_metadata_size{0}; bool uncompressed_block_size_is_estimate{false}; bool uncompressed_metadata_size_is_estimate{false}; std::vector<size_t> compressed_block_sizes; std::vector<std::optional<size_t>> uncompressed_block_sizes; }; bool is_known_compression_type(compression_type type); bool is_known_section_type(section_type type); std::string get_compression_name(compression_type type); std::string get_section_name(section_type type); } namespace dwarfs { class mmif; class fs_section { public: fs_section(mmif const& mm, size_t offset, int version); fs_section(std::shared_ptr<mmif const> mm, section_type type, size_t offset, size_t size, int version); size_t start() const ; size_t length() const ; bool is_known_compression() const ; bool is_known_type() const ; compression_type compression() const ; section_type type() const ; std::string name() const ; std::string description() const ; bool check_fast(mmif const& mm) const ; bool check(mmif const& mm) const ; bool verify(mmif const& mm) const ; std::span<uint8_t const> data(mmif const& mm) const ; size_t end() const ; std::optional<uint32_t> section_number() const ; std::optional<uint64_t> xxh3_64_value() const ; std::optional<std::vector<uint8_t>> sha2_512_256_value() const ; class impl { public: virtual ~impl() = default; virtual size_t start() const = 0; virtual size_t length() const = 0; virtual bool is_known_compression() const = 0; virtual bool is_known_type() const = 0; virtual compression_type compression() const = 0; virtual section_type type() const = 0; virtual std::string name() const = 0; virtual std::string description() const = 0; virtual bool check_fast(mmif const& mm) const = 0; virtual bool check(mmif const& mm) const = 0; virtual bool verify(mmif const& mm) const = 0; virtual std::span<uint8_t const> data(mmif const& mm) const = 0; virtual std::optional<uint32_t> section_number() const = 0; virtual std::optional<uint64_t> xxh3_64_value() const = 0; virtual std::optional<std::vector<uint8_t>> sha2_512_256_value() const = 0; }; private: std::shared_ptr<impl const> impl_; }; } namespace dwarfs { enum class contextual_option_policy { normal, fallback, }; template <typename OptionType, typename ContextParser, typename OptionParser> class contextual_option_parser; template <typename Policy> class contextual_option { public: using policy_type = Policy; using context_argument_type = typename policy_type::ContextArgumentType; using context_type = typename policy_type::ContextType; using value_type = typename policy_type::ValueType; template <typename OptionType, typename ContextParser, typename OptionParser> friend class contextual_option_parser; contextual_option() = default; explicit contextual_option(value_type const& def) ; void set_default(value_type const& val) ; bool add_contextual( context_type const& ctx, value_type const& val, contextual_option_policy policy = contextual_option_policy::normal) ; std::optional<value_type> get_optional(context_argument_type const& arg) const ; value_type get(context_argument_type const& arg) const ; std::optional<value_type> get_optional() const ; value_type get() const ; template <typename T> bool any_is(T&& pred) const ; template <typename T> void visit_contextual(T&& visitor) const ; private: std::optional<value_type> get_optional_impl(context_type const& ctx) const ; value_type get_impl(context_type const& ctx) const ; std::optional<value_type> default_; std::unordered_map<context_type, value_type> contextual_; }; template <typename OptionType, typename ContextParser, typename OptionParser> class contextual_option_parser { public: using option_type = OptionType; using policy_type = typename option_type::policy_type; contextual_option_parser(std::string_view name, OptionType& opt, ContextParser const& cp, OptionParser const& op) ; void parse(std::string_view arg, contextual_option_policy policy = contextual_option_policy::normal) const ; void parse_fallback(std::string_view arg) const ; void parse(std::span<std::string const> list) const ; void parse(std::span<std::string_view const> list) const ; void dump(std::ostream& os) const ; std::string as_string() const ; std::string const& name() const ; private: void add_contextual(typename option_type::context_type const& ctx, typename option_type::value_type const& val, contextual_option_policy policy) const ; OptionType& opt_; ContextParser const& cp_; OptionParser const& op_; std::string const name_; }; } namespace dwarfs { namespace detail { template <typename T> struct categorized_option_policy { using ContextArgumentType = fragment_category; using ContextType = fragment_category::value_type; using ValueType = T; static ContextType context_from_arg(ContextArgumentType const& arg) ; }; } template <typename ValueType> using categorized_option = contextual_option<detail::categorized_option_policy<ValueType>>; } namespace dwarfs { class categorizer_manager; class entry; enum class mlock_mode { NONE, TRY, MUST }; enum class cache_tidy_strategy { NONE, EXPIRY_TIME, BLOCK_SWAPPED_OUT }; enum class filesystem_check_level { CHECKSUM, INTEGRITY, FULL }; struct block_cache_options { size_t max_bytes{0}; size_t num_workers{0}; double decompress_ratio{1.0}; bool mm_release{true}; bool init_workers{true}; bool disable_block_integrity_check{false}; size_t sequential_access_detector_threshold{0}; }; struct history_config { bool with_timestamps{false}; }; struct cache_tidy_config { cache_tidy_strategy strategy{cache_tidy_strategy::NONE}; std::chrono::milliseconds interval{std::chrono::seconds(1)}; std::chrono::milliseconds expiry_time{std::chrono::seconds(60)}; }; struct metadata_options { bool enable_nlink{false}; bool readonly{false}; bool check_consistency{false}; size_t block_size{512}; }; struct inode_reader_options { size_t readahead{0}; }; struct filesystem_options { static constexpr file_off_t IMAGE_OFFSET_AUTO{-1}; mlock_mode lock_mode{mlock_mode::NONE}; file_off_t image_offset{0}; block_cache_options block_cache{}; metadata_options metadata{}; inode_reader_options inode_reader{}; int inode_offset{0}; }; struct filesystem_writer_options { size_t max_queue_size{64 << 20}; size_t worst_case_block_size{4 << 20}; bool remove_header{false}; bool no_section_index{false}; }; enum class file_order_mode { NONE, PATH, REVPATH, SIMILARITY, NILSIMSA }; struct file_order_options { static constexpr int const kDefaultNilsimsaMaxChildren{16384}; static constexpr int const kDefaultNilsimsaMaxClusterSize{16384}; file_order_mode mode{file_order_mode::NONE}; int nilsimsa_max_children{kDefaultNilsimsaMaxChildren}; int nilsimsa_max_cluster_size{kDefaultNilsimsaMaxClusterSize}; }; struct inode_options { std::optional<size_t> max_similarity_scan_size; std::shared_ptr<categorizer_manager> categorizer_mgr; categorized_option<file_order_options> fragment_order{file_order_options()}; }; struct scanner_options { std::optional<std::string> file_hash_algorithm{"xxh3-128"}; std::optional<file_stat::uid_type> uid; std::optional<file_stat::gid_type> gid; std::optional<uint64_t> timestamp; bool keep_all_times{false}; bool remove_empty_dirs{false}; bool with_devices{false}; bool with_specials{false}; uint32_t time_resolution_sec{1}; inode_options inode; bool pack_chunk_table{false}; bool pack_directories{false}; bool pack_shared_files_table{false}; bool plain_names_table{false}; bool pack_names{false}; bool pack_names_index{false}; bool plain_symlinks_table{false}; bool pack_symlinks{false}; bool pack_symlinks_index{false}; bool force_pack_string_tables{false}; bool no_create_timestamp{false}; std::optional<std::function<void(bool, entry const*)>> debug_filter_function; size_t num_segmenter_workers{1}; bool enable_history{true}; std::optional<std::vector<std::string>> command_line_arguments; history_config history; }; struct rewrite_options { bool recompress_block{false}; bool recompress_metadata{false}; std::unordered_set<std::string> recompress_categories; bool recompress_categories_exclude{false}; bool enable_history{true}; std::optional<std::vector<std::string>> command_line_arguments; history_config history; }; std::ostream& operator<<(std::ostream& os, file_order_mode mode); std::ostream& operator<<(std::ostream& os, block_cache_options const& opts); mlock_mode parse_mlock_mode(std::string_view mode); } namespace std __attribute__ ((__visibility__ ("default"))) { struct __atomic_futex_unsigned_base { bool _M_futex_wait_until(unsigned *__addr, unsigned __val, bool __has_timeout, chrono::seconds __s, chrono::nanoseconds __ns); bool _M_futex_wait_until_steady(unsigned *__addr, unsigned __val, bool __has_timeout, chrono::seconds __s, chrono::nanoseconds __ns); static void _M_futex_notify_all(unsigned* __addr); }; template <unsigned _Waiter_bit = 0x80000000> class __atomic_futex_unsigned : __atomic_futex_unsigned_base { typedef chrono::steady_clock __clock_t; atomic<unsigned> _M_data; public: explicit __atomic_futex_unsigned(unsigned __data) ; __attribute__((__always_inline__)) unsigned _M_load(memory_order __mo) ; private: unsigned _M_load_and_test_until(unsigned __assumed, unsigned __operand, bool __equal, memory_order __mo, bool __has_timeout, chrono::seconds __s, chrono::nanoseconds __ns) ; unsigned _M_load_and_test_until_steady(unsigned __assumed, unsigned __operand, bool __equal, memory_order __mo, bool __has_timeout, chrono::seconds __s, chrono::nanoseconds __ns) ; unsigned _M_load_and_test(unsigned __assumed, unsigned __operand, bool __equal, memory_order __mo) ; template<typename _Dur> unsigned _M_load_and_test_until_impl(unsigned __assumed, unsigned __operand, bool __equal, memory_order __mo, const chrono::time_point<std::chrono::system_clock, _Dur>& __atime) ; template<typename _Dur> unsigned _M_load_and_test_until_impl(unsigned __assumed, unsigned __operand, bool __equal, memory_order __mo, const chrono::time_point<std::chrono::steady_clock, _Dur>& __atime) ; public: __attribute__((__always_inline__)) unsigned _M_load_when_not_equal(unsigned __val, memory_order __mo) ; __attribute__((__always_inline__)) void _M_load_when_equal(unsigned __val, memory_order __mo) ; template<typename _Rep, typename _Period> __attribute__((__always_inline__)) bool _M_load_when_equal_for(unsigned __val, memory_order __mo, const chrono::duration<_Rep, _Period>& __rtime) ; template<typename _Clock, typename _Duration> __attribute__((__always_inline__)) bool _M_load_when_equal_until(unsigned __val, memory_order __mo, const chrono::time_point<_Clock, _Duration>& __atime) ; template<typename _Duration> __attribute__((__always_inline__)) bool _M_load_when_equal_until(unsigned __val, memory_order __mo, const chrono::time_point<std::chrono::system_clock, _Duration>& __atime) ; template<typename _Duration> __attribute__((__always_inline__)) bool _M_load_when_equal_until(unsigned __val, memory_order __mo, const chrono::time_point<std::chrono::steady_clock, _Duration>& __atime) ; __attribute__((__always_inline__)) void _M_store_notify_all(unsigned __val, memory_order __mo) ; }; } namespace std __attribute__ ((__visibility__ ("default"))) { enum class future_errc { future_already_retrieved = 1, promise_already_satisfied, no_state, broken_promise }; template<> struct is_error_code_enum<future_errc> : public true_type { }; [[__nodiscard__, __gnu__::__const__]] const error_category& future_category() noexcept; [[__nodiscard__]] error_code make_error_code(future_errc __errc) noexcept ; [[__nodiscard__]] error_condition make_error_condition(future_errc __errc) noexcept ; class future_error : public logic_error { public: explicit future_error(future_errc __errc) ; virtual ~future_error() noexcept; virtual const char* what() const noexcept; const error_code& code() const noexcept ; private: explicit future_error(error_code __ec) ; friend void __throw_future_error(int); error_code _M_code; }; template<typename _Res> class future; template<typename _Res> class shared_future; template<typename _Signature> class packaged_task; template<typename _Res> class promise; enum class launch { async = 1, deferred = 2 }; constexpr launch operator&(launch __x, launch __y) noexcept ; constexpr launch operator|(launch __x, launch __y) noexcept ; constexpr launch operator^(launch __x, launch __y) noexcept ; constexpr launch operator~(launch __x) noexcept ; launch& operator&=(launch& __x, launch __y) noexcept ; launch& operator|=(launch& __x, launch __y) noexcept ; launch& operator^=(launch& __x, launch __y) noexcept ; enum class future_status { ready, timeout, deferred }; template<typename _Fn, typename... _Args> using __async_result_of = typename __invoke_result< typename decay<_Fn>::type, typename decay<_Args>::type...>::type; template<typename _Fn, typename... _Args> future<__async_result_of<_Fn, _Args...>> async(launch __policy, _Fn&& __fn, _Args&&... __args); template<typename _Fn, typename... _Args> future<__async_result_of<_Fn, _Args...>> async(_Fn&& __fn, _Args&&... __args); struct __future_base { struct _Result_base { exception_ptr _M_error; _Result_base(const _Result_base&) = delete; _Result_base& operator=(const _Result_base&) = delete; virtual void _M_destroy() = 0; struct _Deleter { void operator()(_Result_base* __fr) const ; }; protected: _Result_base(); virtual ~_Result_base(); }; template<typename _Res> using _Ptr = unique_ptr<_Res, _Result_base::_Deleter>; template<typename _Res> struct _Result : _Result_base { private: __gnu_cxx::__aligned_buffer<_Res> _M_storage; bool _M_initialized; public: typedef _Res result_type; _Result() ; ~_Result() ; _Res& _M_value() noexcept ; void _M_set(const _Res& __res) ; void _M_set(_Res&& __res) ; private: void _M_destroy() ; }; template<typename _Res, typename _Alloc> struct _Result_alloc final : _Result<_Res>, _Alloc { using __allocator_type = __alloc_rebind<_Alloc, _Result_alloc>; explicit _Result_alloc(const _Alloc& __a) ; private: void _M_destroy() ; }; template<typename _Res, typename _Allocator> static _Ptr<_Result_alloc<_Res, _Allocator>> _S_allocate_result(const _Allocator& __a) ; template<typename _Res, typename _Tp> static _Ptr<_Result<_Res>> _S_allocate_result(const std::allocator<_Tp>&) ; class _State_baseV2 { typedef _Ptr<_Result_base> _Ptr_type; enum _Status : unsigned { __not_ready, __ready }; _Ptr_type _M_result; __atomic_futex_unsigned<> _M_status; atomic_flag _M_retrieved = { 0 }; once_flag _M_once; public: _State_baseV2() ; _State_baseV2(const _State_baseV2&) = delete; _State_baseV2& operator=(const _State_baseV2&) = delete; virtual ~_State_baseV2() = default; _Result_base& wait() ; template<typename _Rep, typename _Period> future_status wait_for(const chrono::duration<_Rep, _Period>& __rel) ; template<typename _Clock, typename _Duration> future_status wait_until(const chrono::time_point<_Clock, _Duration>& __abs) ; void _M_set_result(function<_Ptr_type()> __res, bool __ignore_failure = false) ; void _M_set_delayed_result(function<_Ptr_type()> __res, weak_ptr<_State_baseV2> __self) ; void _M_break_promise(_Ptr_type __res) ; void _M_set_retrieved_flag() ; template<typename _Res, typename _Arg> struct _Setter; template<typename _Res, typename _Arg> struct _Setter<_Res, _Arg&> { static_assert(is_same<_Res, _Arg&>::value || is_same<const _Res, _Arg>::value, "Invalid specialisation"); typename promise<_Res>::_Ptr_type operator()() const ; promise<_Res>* _M_promise; _Arg* _M_arg; }; template<typename _Res> struct _Setter<_Res, _Res&&> { typename promise<_Res>::_Ptr_type operator()() const ; promise<_Res>* _M_promise; _Res* _M_arg; }; template<typename _Res> struct _Setter<_Res, void> { static_assert(is_void<_Res>::value, "Only used for promise<void>"); typename promise<_Res>::_Ptr_type operator()() const ; promise<_Res>* _M_promise; }; struct __exception_ptr_tag { }; template<typename _Res> struct _Setter<_Res, __exception_ptr_tag> { typename promise<_Res>::_Ptr_type operator()() const ; promise<_Res>* _M_promise; exception_ptr* _M_ex; }; template<typename _Res, typename _Arg> __attribute__((__always_inline__)) static _Setter<_Res, _Arg&&> __setter(promise<_Res>* __prom, _Arg&& __arg) noexcept ; template<typename _Res> __attribute__((__always_inline__)) static _Setter<_Res, __exception_ptr_tag> __setter(exception_ptr& __ex, promise<_Res>* __prom) noexcept ; template<typename _Res> __attribute__((__always_inline__)) static _Setter<_Res, void> __setter(promise<_Res>* __prom) noexcept ; template<typename _Tp> static void _S_check(const shared_ptr<_Tp>& __p) ; private: void _M_do_set(function<_Ptr_type()>* __f, bool* __did_set) ; virtual void _M_complete_async() ; virtual bool _M_is_deferred_future() const ; struct _Make_ready final : __at_thread_exit_elt { weak_ptr<_State_baseV2> _M_shared_state; }; }; using _State_base = _State_baseV2; class _Async_state_commonV2; template<typename _BoundFn, typename _Res = decltype(std::declval<_BoundFn&>()())> class _Deferred_state; template<typename _BoundFn, typename _Res = decltype(std::declval<_BoundFn&>()())> class _Async_state_impl; template<typename _Signature> struct _Task_state_base; template<typename _Fn, typename _Alloc, typename _Signature> struct _Task_state; template<typename _Res_ptr, typename _Fn, typename _Res = typename _Res_ptr::element_type::result_type> struct _Task_setter; ; }; template<typename _Res> struct __future_base::_Result<_Res&> : __future_base::_Result_base { typedef _Res& result_type; private: _Res* _M_value_ptr; }; template<> struct __future_base::_Result<void> : __future_base::_Result_base { typedef void result_type; private: }; template<typename _Res, typename _Arg> struct __is_location_invariant <__future_base::_State_base::_Setter<_Res, _Arg>> : true_type { }; template<typename _Res_ptr, typename _Fn, typename _Res> struct __is_location_invariant <__future_base::_Task_setter<_Res_ptr, _Fn, _Res>> : true_type { }; template<typename _Res> class __basic_future : public __future_base { protected: typedef shared_ptr<_State_base> __state_type; typedef __future_base::_Result<_Res>& __result_type; private: __state_type _M_state; public: ; ; protected: struct _Reset { __basic_future& _M_fut; }; }; template<typename _Res> class future : public __basic_future<_Res> { static_assert(!is_array<_Res>{}, "result type must not be an array"); static_assert(!is_function<_Res>{}, "result type must not be a function"); static_assert(is_destructible<_Res>{}, "result type must be destructible"); friend class promise<_Res>; template<typename> friend class packaged_task; ; typedef __basic_future<_Res> _Base_type; typedef typename _Base_type::__state_type __state_type; public: }; template<typename _Res> class future<_Res&> : public __basic_future<_Res&> { friend class promise<_Res&>; template<typename> friend class packaged_task; ; typedef __basic_future<_Res&> _Base_type; typedef typename _Base_type::__state_type __state_type; public: }; template<> class future<void> : public __basic_future<void> { friend class promise<void>; template<typename> friend class packaged_task; template<typename _Fn, typename... _Args> friend future<__async_result_of<_Fn, _Args...>> async(launch, _Fn&&, _Args&&...); typedef __basic_future<void> _Base_type; typedef typename _Base_type::__state_type __state_type; public: }; template<typename _Res> class shared_future : public __basic_future<_Res> { static_assert(!is_array<_Res>{}, "result type must not be an array"); static_assert(!is_function<_Res>{}, "result type must not be a function"); static_assert(is_destructible<_Res>{}, "result type must be destructible"); typedef __basic_future<_Res> _Base_type; public: }; template<typename _Res> class shared_future<_Res&> : public __basic_future<_Res&> { typedef __basic_future<_Res&> _Base_type; public: }; template<> class shared_future<void> : public __basic_future<void> { typedef __basic_future<void> _Base_type; public: }; template<typename _Res> class promise { static_assert(!is_array<_Res>{}, "result type must not be an array"); static_assert(!is_function<_Res>{}, "result type must not be a function"); static_assert(is_destructible<_Res>{}, "result type must be destructible"); typedef __future_base::_State_base _State; typedef __future_base::_Result<_Res> _Res_type; typedef __future_base::_Ptr<_Res_type> _Ptr_type; template<typename, typename> friend struct _State::_Setter; friend _State; shared_ptr<_State> _M_future; _Ptr_type _M_storage; public: ; ; private: }; ; template<typename _Res, typename _Alloc> struct uses_allocator<promise<_Res>, _Alloc> : public true_type { }; template<typename _Res> class promise<_Res&> { typedef __future_base::_State_base _State; typedef __future_base::_Result<_Res&> _Res_type; typedef __future_base::_Ptr<_Res_type> _Ptr_type; template<typename, typename> friend struct _State::_Setter; friend _State; shared_ptr<_State> _M_future; _Ptr_type _M_storage; public: ; ; private: }; template<> class promise<void> { typedef __future_base::_State_base _State; typedef __future_base::_Result<void> _Res_type; typedef __future_base::_Ptr<_Res_type> _Ptr_type; template<typename, typename> friend struct _State::_Setter; friend _State; shared_ptr<_State> _M_future; _Ptr_type _M_storage; public: ; ; private: }; template<typename _Ptr_type, typename _Fn, typename _Res> struct __future_base::_Task_setter { _Ptr_type* _M_result; _Fn* _M_fn; }; template<typename _Ptr_type, typename _Fn> struct __future_base::_Task_setter<_Ptr_type, _Fn, void> { _Ptr_type* _M_result; _Fn* _M_fn; }; template<typename _Res, typename... _Args> struct __future_base::_Task_state_base<_Res(_Args...)> : __future_base::_State_base { typedef _Res _Res_type; ; typedef __future_base::_Ptr<_Result<_Res>> _Ptr_type; _Ptr_type _M_result; }; template<typename _Fn, typename _Alloc, typename _Res, typename... _Args> struct __future_base::_Task_state<_Fn, _Alloc, _Res(_Args...)> final : __future_base::_Task_state_base<_Res(_Args...)> { ; private: struct _Impl : _Alloc { ; _Fn _M_fn; } _M_impl; }; ; template<typename _Res, typename... _ArgTypes> class packaged_task<_Res(_ArgTypes...)> { typedef __future_base::_Task_state_base<_Res(_ArgTypes...)> _State_type; shared_ptr<_State_type> _M_state; template<typename _Fn, typename _Fn2 = __remove_cvref_t<_Fn>> using __not_same = typename enable_if<!is_same<packaged_task, _Fn2>::value>::type; public: ; }; ; ; ; template<typename _BoundFn, typename _Res> class __future_base::_Deferred_state final : public __future_base::_State_base { public: ; private: typedef __future_base::_Ptr<_Result<_Res>> _Ptr_type; _Ptr_type _M_result; _BoundFn _M_fn; }; class __future_base::_Async_state_commonV2 : public __future_base::_State_base { protected: thread _M_thread; once_flag _M_once; }; template<typename _BoundFn, typename _Res> class __future_base::_Async_state_impl final : public __future_base::_Async_state_commonV2 { public: ; private: typedef __future_base::_Ptr<_Result<_Res>> _Ptr_type; _Ptr_type _M_result; _BoundFn _M_fn; }; template<typename _Fn, typename... _Args> [[__nodiscard__]] future<__async_result_of<_Fn, _Args...>> async(launch __policy, _Fn&& __fn, _Args&&... __args) ; template<typename _Fn, typename... _Args> [[__nodiscard__]] future<__async_result_of<_Fn, _Args...>> async(_Fn&& __fn, _Args&&... __args) ; } namespace dwarfs { class logger; class os_access; class worker_group { public: using job_t = folly::Function<void()>; explicit worker_group( logger& lgr, os_access const& os, const char* group_name, size_t num_workers = 1, size_t max_queue_len = std::numeric_limits<size_t>::max(), int niceness = 0); ~worker_group() = default; void wait() ; bool add_job(job_t&& job) ; folly::Expected<std::chrono::nanoseconds, std::error_code> get_cpu_time() const ; ; class impl { public: virtual ~impl() = default; }; private: std::unique_ptr<impl> impl_; }; } namespace dwarfs { class block_compressor; class block_data; class logger; class progress; class worker_group; class filesystem_writer { public: using physical_block_cb_type = folly::Function<void(size_t)>; compression_constraints get_compression_constraints(fragment_category::value_type cat, std::string const& metadata) const ; void configure(std::vector<fragment_category> const& expected_categories, size_t max_active_slots) ; void write_block(fragment_category cat, std::shared_ptr<block_data>&& data, physical_block_cb_type physical_block_cb, std::optional<std::string> meta = std::nullopt) ; void finish_category(fragment_category cat) ; void write_metadata_v2_schema(std::shared_ptr<block_data>&& data) ; void write_metadata_v2(std::shared_ptr<block_data>&& data) ; void write_history(std::shared_ptr<block_data>&& data) ; void flush() ; class impl { public: }; private: std::unique_ptr<impl> impl_; }; } namespace dwarfs { class file; class chunkable { public: }; } namespace dwarfs { class categorizer_manager; class inode; class mmif; class single_inode_fragment; class fragment_chunkable : public chunkable { public: fragment_chunkable(inode const& ino, single_inode_fragment& frag, file_off_t offset, mmif& mm, categorizer_manager const* catmgr); ~fragment_chunkable(); private: inode const& ino_; single_inode_fragment& frag_; file_off_t offset_; mmif& mm_; categorizer_manager const* catmgr_; }; } namespace dwarfs { struct scanner_options; class global_entry_data { public: using uid_type = file_stat::uid_type; using gid_type = file_stat::gid_type; using mode_type = file_stat::mode_type; enum class timestamp_type { ATIME, MTIME, CTIME }; global_entry_data(scanner_options const& options) ; void add_name(std::string const& name) ; void add_link(std::string const& link) ; void index() ; uint32_t get_symlink_table_entry(std::string const& link) const; std::vector<uid_type> get_uids() const; std::vector<gid_type> get_gids() const; std::vector<mode_type> get_modes() const; std::vector<std::string> get_names() const; std::vector<std::string> get_symlinks() const; uint64_t get_timestamp_base() const; private: template <typename K, typename V> using map_type = folly::F14FastMap<K, V>; ; ; map_type<uid_type, uid_type> uids_; map_type<gid_type, gid_type> gids_; map_type<mode_type, mode_type> modes_; map_type<std::string, uint32_t> names_; map_type<std::string, uint32_t> symlinks_; uid_type next_uid_index_{0}; gid_type next_gid_index_{0}; mode_type next_mode_index_{0}; uint64_t timestamp_base_{std::numeric_limits<uint64_t>::max()}; scanner_options const& options_; }; } namespace folly { class json_pointer { public: enum class parse_error { invalid_first_character, invalid_escape_sequence, }; class parse_exception : public std::runtime_error { using std::runtime_error::runtime_error; }; private: std::vector<std::string> tokens_; }; } namespace folly { struct const_dynamic_view; struct dynamic; struct dynamic_view; struct TypeError; namespace dynamic_detail { template <typename T> using detect_construct_string = decltype(std::string( static_cast<T const& (*)() noexcept>(nullptr)().data(), static_cast<T const& (*)() noexcept>(nullptr)().size())); } struct dynamic { enum Type { NULLT, ARRAY, BOOL, DOUBLE, INT64, OBJECT, STRING, }; template <class T, class Enable = void> struct NumericTypeHelper; private: typedef std::vector<dynamic> Array; struct VectorBoolConstRefFake : std::false_type {}; using VectorBoolConstRefCtorType = std::conditional_t< std::is_same<std::vector<bool>::const_reference, bool>::value, VectorBoolConstRefFake, std::vector<bool>::const_reference>; public: typedef Array::iterator iterator; typedef Array::const_iterator const_iterator; typedef dynamic value_type; struct const_key_iterator; struct const_value_iterator; struct const_item_iterator; struct value_iterator; struct item_iterator; private: struct EmptyArrayTag {}; struct ObjectMaker; public: ; static ObjectMaker object(); dynamic(); dynamic(std::nullptr_t); template < typename Stringish, typename = std::enable_if_t< is_detected_v<dynamic_detail::detect_construct_string, Stringish>>> dynamic(Stringish&& s); dynamic(ObjectMaker (*)()); ; ; dynamic(dynamic const&); dynamic(dynamic&&) noexcept; ~dynamic() noexcept; friend bool operator>(dynamic const& a, dynamic const& b) ; friend bool operator<=(dynamic const& a, dynamic const& b) ; friend bool operator>=(dynamic const& a, dynamic const& b) ; dynamic& operator+=(dynamic const&); dynamic& operator-=(dynamic const&); dynamic& operator*=(dynamic const&); dynamic& operator/=(dynamic const&); dynamic& operator%=(dynamic const&); dynamic& operator|=(dynamic const&); dynamic& operator&=(dynamic const&); dynamic& operator^=(dynamic const&); dynamic& operator++(); dynamic& operator--(); friend dynamic operator+(dynamic const& a, dynamic const& b) ; friend dynamic operator-(dynamic const& a, dynamic const& b) ; friend dynamic operator*(dynamic const& a, dynamic const& b) ; friend dynamic operator/(dynamic const& a, dynamic const& b) ; friend dynamic operator%(dynamic const& a, dynamic const& b) ; friend dynamic operator|(dynamic const& a, dynamic const& b) ; friend dynamic operator&(dynamic const& a, dynamic const& b) ; friend dynamic operator^(dynamic const& a, dynamic const& b) ; friend dynamic operator+(dynamic&& a, dynamic const& b) ; dynamic operator++(int) ; dynamic operator--(int) ; dynamic& operator=(dynamic const&); dynamic& operator=(dynamic&&) noexcept; template <class T, class NumericType = typename NumericTypeHelper<T>::type> dynamic& operator=(T t); dynamic& operator=(std::nullptr_t); friend std::ostream& operator<<(std::ostream&, dynamic const&); bool isString() const; bool isObject() const; bool isBool() const; bool isNull() const; bool isArray() const; bool isDouble() const; bool isInt() const; bool isNumber() const; Type type() const; const char* typeName() const; std::string asString() const; double asDouble() const; int64_t asInt() const; bool asBool() const; const std::string& getString() const&; double getDouble() const&; int64_t getInt() const&; bool getBool() const&; std::string& getString() &; double& getDouble() &; int64_t& getInt() &; bool& getBool() &; std::string&& getString() &&; double getDouble() &&; int64_t getInt() &&; bool getBool() &&; const char* c_str() const&; const char* c_str() && = delete; StringPiece stringPiece() const; bool empty() const; std::size_t size() const; const_iterator begin() const; const_iterator end() const; iterator begin(); iterator end(); private: template <class T> struct IterableProxy; template <typename K, typename T> using IfIsNonStringDynamicConvertible = std::enable_if_t< !std::is_convertible<K, StringPiece>::value && std::is_convertible<K, dynamic>::value, T>; template <typename K, typename T> using IfNotIterator = std::enable_if_t<!std::is_convertible<K, iterator>::value, T>; public: IterableProxy<const_key_iterator> keys() const; IterableProxy<const_value_iterator> values() const; IterableProxy<const_item_iterator> items() const; IterableProxy<value_iterator> values(); IterableProxy<item_iterator> items(); template <typename K> IfIsNonStringDynamicConvertible<K, const_item_iterator> find(K&&) const; template <typename K> IfIsNonStringDynamicConvertible<K, item_iterator> find(K&&); const_item_iterator find(StringPiece) const; item_iterator find(StringPiece); template <typename K> IfIsNonStringDynamicConvertible<K, std::size_t> count(K&&) const; std::size_t count(StringPiece) const; private: dynamic const& atImpl(dynamic const&) const&; public: template <typename K> IfIsNonStringDynamicConvertible<K, dynamic const&> at(K&&) const&; template <typename K> IfIsNonStringDynamicConvertible<K, dynamic&> at(K&&) &; template <typename K> IfIsNonStringDynamicConvertible<K, dynamic&&> at(K&&) &&; dynamic const& at(StringPiece) const&; dynamic& at(StringPiece) &; dynamic&& at(StringPiece) &&; enum class json_pointer_resolution_error_code : uint8_t { other = 0, key_not_found, index_out_of_bounds, append_requested, index_not_numeric, index_has_leading_zero, element_not_object_or_array, json_pointer_out_of_bounds, }; template <typename Dynamic> struct json_pointer_resolution_error { json_pointer_resolution_error_code error_code{}; size_t index{0}; Dynamic* context{nullptr}; }; template <typename Dynamic> struct json_pointer_resolved_value { Dynamic* parent{nullptr}; Dynamic* value{nullptr}; StringPiece parent_key; size_t parent_index{0}; }; template <typename Dynamic> using resolved_json_pointer = Expected< json_pointer_resolved_value<Dynamic>, json_pointer_resolution_error<Dynamic>>; resolved_json_pointer<dynamic const> try_get_ptr(json_pointer const&) const&; resolved_json_pointer<dynamic> try_get_ptr(json_pointer const&) &; resolved_json_pointer<dynamic const> try_get_ptr(json_pointer const&) const&& = delete; resolved_json_pointer<dynamic const> try_get_ptr(json_pointer const&) && = delete; const dynamic* get_ptr(json_pointer const&) const&; dynamic* get_ptr(json_pointer const&) &; const dynamic* get_ptr(json_pointer const&) const&& = delete; dynamic* get_ptr(json_pointer const&) && = delete; private: const dynamic* get_ptrImpl(dynamic const&) const&; public: template <typename K> IfIsNonStringDynamicConvertible<K, const dynamic*> get_ptr(K&&) const&; template <typename K> IfIsNonStringDynamicConvertible<K, dynamic*> get_ptr(K&&) &; template <typename K> IfIsNonStringDynamicConvertible<K, dynamic*> get_ptr(K&&) && = delete; const dynamic* get_ptr(StringPiece) const&; dynamic* get_ptr(StringPiece) &; dynamic* get_ptr(StringPiece) && = delete; template <typename K> IfIsNonStringDynamicConvertible<K, dynamic&> operator[](K&&) &; template <typename K> IfIsNonStringDynamicConvertible<K, dynamic const&> operator[](K&&) const&; template <typename K> IfIsNonStringDynamicConvertible<K, dynamic&&> operator[](K&&) &&; dynamic& operator[](StringPiece) &; dynamic const& operator[](StringPiece) const&; dynamic&& operator[](StringPiece) &&; template <typename K> IfIsNonStringDynamicConvertible<K, dynamic> getDefault( K&& k, const dynamic& v = dynamic::object) const&; template <typename K> IfIsNonStringDynamicConvertible<K, dynamic> getDefault( K&& k, dynamic&& v) const&; template <typename K> IfIsNonStringDynamicConvertible<K, dynamic> getDefault( K&& k, const dynamic& v = dynamic::object) &&; template <typename K> IfIsNonStringDynamicConvertible<K, dynamic> getDefault(K&& k, dynamic&& v) &&; dynamic getDefault(StringPiece k, const dynamic& v = dynamic::object) const&; dynamic getDefault(StringPiece k, dynamic&& v) const&; dynamic getDefault(StringPiece k, const dynamic& v = dynamic::object) &&; dynamic getDefault(StringPiece k, dynamic&& v) &&; template <typename K, typename V> IfIsNonStringDynamicConvertible<K, dynamic&> setDefault(K&& k, V&& v); template <typename V> dynamic& setDefault(StringPiece k, V&& v); template <typename K> IfIsNonStringDynamicConvertible<K, dynamic&> setDefault(K&& k, dynamic&& v); template <typename K> IfIsNonStringDynamicConvertible<K, dynamic&> setDefault( K&& k, const dynamic& v = dynamic::object); dynamic& setDefault(StringPiece k, dynamic&& v); dynamic& setDefault(StringPiece k, const dynamic& v = dynamic::object); void resize(std::size_t sz, dynamic const& = nullptr); void reserve(std::size_t capacity); template <class K, class V> IfNotIterator<K, void> insert(K&&, V&& val); template <class... Args> std::pair<item_iterator, bool> emplace(Args&&... args); template <class K, class... Args> std::pair<item_iterator, bool> try_emplace(K&& key, Args&&... args); template <class T> iterator insert(const_iterator pos, T&& value); template <class InputIt> iterator insert(const_iterator pos, InputIt first, InputIt last); void update(const dynamic& mergeObj); void update_missing(const dynamic& mergeObj1); static dynamic merge(const dynamic& mergeObj1, const dynamic& mergeObj2); void merge_patch(const dynamic& patch); static dynamic merge_diff(const dynamic& source, const dynamic& target); template <typename K> IfIsNonStringDynamicConvertible<K, std::size_t> erase(K&&); std::size_t erase(StringPiece); iterator erase(const_iterator it); iterator erase(const_iterator first, const_iterator last); const_key_iterator erase(const_key_iterator it); const_key_iterator erase(const_key_iterator first, const_key_iterator last); value_iterator erase(const_value_iterator it); value_iterator erase(const_value_iterator first, const_value_iterator last); item_iterator erase(const_item_iterator it); item_iterator erase(const_item_iterator first, const_item_iterator last); void push_back(dynamic const&); void push_back(dynamic&&); void pop_back(); const dynamic& back() const; std::size_t hash() const; private: friend struct const_dynamic_view; friend struct dynamic_view; friend struct TypeError; struct ObjectImpl; template <class T> struct TypeInfo; template <class T> struct CompareOp; template <class T> struct GetAddrImpl; template <class T> struct PrintImpl; explicit dynamic(Array&& r); template <class T> T const& get() const; template <class T> T& get(); template <class T> T* get_nothrow() & noexcept; template <class T> T const* get_nothrow() const& noexcept; template <class T> T* get_nothrow() && noexcept = delete; template <class T> T* getAddress() noexcept; template <class T> T const* getAddress() const noexcept; template <class T> T asImpl() const; static char const* typeName(Type); void destroy() noexcept; void print(std::ostream&) const; void print_as_pseudo_json(std::ostream&) const; private: Type type_; union Data { explicit Data() ; ~Data() ; std::nullptr_t nul; Array array; bool boolean; double doubl; int64_t integer; std::string string; aligned_storage_for_t<F14NodeMap<int, int>> objectBuffer; } u_; }; struct const_dynamic_view { const_dynamic_view() noexcept = default; const_dynamic_view(dynamic const& d) noexcept; const_dynamic_view(const_dynamic_view const&) noexcept = default; const_dynamic_view& operator=(const_dynamic_view const&) noexcept = default; const_dynamic_view(dynamic_view& view) noexcept; const_dynamic_view& operator=(dynamic_view& view) noexcept; explicit const_dynamic_view(dynamic&&) = delete; explicit operator bool() const noexcept; bool empty() const noexcept; void reset() noexcept; template <typename Key, typename... Keys> const_dynamic_view descend( Key const& key, Keys const&... keys) const noexcept; dynamic value_or(dynamic&& val = nullptr) const; std::string string_or(char const* val) const; std::string string_or(std::string val) const; template < typename Stringish, typename = std::enable_if_t< is_detected_v<dynamic_detail::detect_construct_string, Stringish>>> std::string string_or(Stringish&& val) const; double double_or(double val) const noexcept; int64_t int_or(int64_t val) const noexcept; bool bool_or(bool val) const noexcept; protected: const_dynamic_view(dynamic const* d) noexcept; template <typename Key1, typename Key2, typename... Keys> dynamic const* descend_( Key1 const& key1, Key2 const& key2, Keys const&... keys) const noexcept; template <typename Key> dynamic const* descend_(Key const& key) const noexcept; template <typename Key> dynamic::IfIsNonStringDynamicConvertible<Key, dynamic const*> descend_unchecked_(Key const& key) const noexcept; dynamic const* descend_unchecked_(StringPiece key) const noexcept; dynamic const* d_ = nullptr; template <typename T, typename... Args> T get_copy(Args&&... args) const; }; struct dynamic_view : public const_dynamic_view { dynamic_view() noexcept = default; dynamic_view(dynamic& d) noexcept; dynamic_view(dynamic_view const&) noexcept = default; dynamic_view& operator=(dynamic_view const&) noexcept = default; explicit dynamic_view(dynamic const&) = delete; explicit dynamic_view(const_dynamic_view const&) = delete; template <typename Key, typename... Keys> dynamic_view descend(Key const& key, Keys const&... keys) const noexcept; dynamic move_value_or(dynamic&& val = nullptr) noexcept; std::string move_string_or(std::string val) noexcept; std::string move_string_or(char const* val); template < typename Stringish, typename = std::enable_if_t< is_detected_v<dynamic_detail::detect_construct_string, Stringish>>> std::string move_string_or(Stringish&& val); private: template <typename T, typename... Args> T get_move(Args&&... args); }; auto make_dynamic_view(dynamic const& d) ; auto make_dynamic_view(dynamic& d) ; auto make_dynamic_view(dynamic&&) = delete; } namespace std { template <> struct hash<::folly::dynamic> { using folly_is_avalanching = std::true_type; size_t operator()(::folly::dynamic const& d) const ; }; } namespace folly { struct FormatArg; class __attribute__((__visibility__("default"))) BadFormatArg : public std::invalid_argument { private: friend struct FormatArg; struct ErrorStrTag {}; template <typename... A> static std::string str(StringPiece descr, A const&... a) ; public: using invalid_argument::invalid_argument; template <typename... A> explicit BadFormatArg(ErrorStrTag, StringPiece descr, A const&... a) ; }; struct FormatArg { explicit FormatArg(StringPiece sp) ; enum class Type { INTEGER, FLOAT, OTHER, }; void validate(Type type) const; template <typename Check, typename... Args> void enforce(Check const& v, Args&&... args) const ; template <typename... Args> [[noreturn]] void error(Args&&... args) const; StringPiece fullArgString; static constexpr char kDefaultFill = '\0'; char fill; enum class Align : uint8_t { DEFAULT, LEFT, RIGHT, PAD_AFTER_SIGN, CENTER, INVALID, }; Align align; enum class Sign : uint8_t { DEFAULT, PLUS_OR_MINUS, MINUS, SPACE_OR_MINUS, INVALID, }; Sign sign; bool basePrefix; bool thousandsSeparator; bool trailingDot; static constexpr int kDefaultWidth = -1; static constexpr int kDynamicWidth = -2; static constexpr int kNoIndex = -1; int width; int widthIndex; static constexpr int kDefaultPrecision = -1; int precision; static constexpr char kDefaultPresentation = '\0'; char presentation; template <bool emptyOk = false> StringPiece splitKey(); bool keyEmpty() const ; int splitIntKey(); void setNextIntKey(int val) ; void setNextKey(StringPiece val) ; private: void initSlow(); template <bool emptyOk> StringPiece doSplitKey(); StringPiece key_; int nextIntKey_; StringPiece nextKey_; enum class NextKeyMode { NONE, INT, STRING, }; NextKeyMode nextKeyMode_; }; } typedef __builtin_va_list va_list; namespace std { using ::va_list; } namespace folly { namespace detail { bool simdHasSpaceOrCntrlSymbols(folly::StringPiece s); } } namespace folly { template <typename T, std::size_t M, typename P> class small_vector; template <typename T, typename Allocator> class fbvector; template <class Char> class fbstring_core; template <typename E, typename T, typename A, typename Storage> class basic_fbstring; namespace detail { using PredeclareFbString = basic_fbstring< char, std::char_traits<char>, std::allocator<char>, fbstring_core<char>>; template <typename Container> struct SimdSplitByCharImpl { static void keepEmpty(char sep, folly::StringPiece what, Container& res); static void dropEmpty(char sep, folly::StringPiece what, Container& res); }; template <typename Container> struct SimdSplitByCharImplToStrings { static void keepEmpty(char sep, folly::StringPiece what, Container& res); static void dropEmpty(char sep, folly::StringPiece what, Container& res); }; template <typename T> constexpr bool isSimdSplitSupportedStringViewType = std::is_same<T, folly::StringPiece>::value || std::is_same<T, std::string_view>::value; template <typename T> constexpr bool isSimdSplitSupportedStringType = std::is_same<T, PredeclareFbString>::value || std::is_same<T, std::string>::value; template <typename> struct SimdSplitByCharIsDefinedFor { static constexpr bool value = false; }; template <typename T> struct SimdSplitByCharIsDefinedFor<std::vector<T>> { static constexpr bool value = isSimdSplitSupportedStringViewType<T> || isSimdSplitSupportedStringType<T>; }; template <typename T, typename A> struct SimdSplitByCharIsDefinedFor<folly::fbvector<T, A>> : SimdSplitByCharIsDefinedFor<std::vector<T, A>> {}; template <typename T, std::size_t M> struct SimdSplitByCharIsDefinedFor<folly::small_vector<T, M, void>> { static constexpr bool value = isSimdSplitSupportedStringViewType<T> && 0 < M && M <= 8; }; template <typename Container> std::enable_if_t< isSimdSplitSupportedStringViewType<typename Container::value_type>> simdSplitByChar( char sep, folly::StringPiece what, Container& res, bool ignoreEmpty) ; template <typename Container> std::enable_if_t<isSimdSplitSupportedStringType<typename Container::value_type>> simdSplitByChar( char sep, folly::StringPiece what, Container& res, bool ignoreEmpty) ; extern template struct SimdSplitByCharImpl<std::vector<folly::StringPiece>>; extern template struct SimdSplitByCharImpl<folly::fbvector<folly::StringPiece, std::allocator<folly::StringPiece>>>; extern template struct SimdSplitByCharImpl<folly::small_vector<folly::StringPiece, 1, void>>; extern template struct SimdSplitByCharImpl<folly::small_vector<folly::StringPiece, 2, void>>; extern template struct SimdSplitByCharImpl<folly::small_vector<folly::StringPiece, 3, void>>; extern template struct SimdSplitByCharImpl<folly::small_vector<folly::StringPiece, 4, void>>; extern template struct SimdSplitByCharImpl<folly::small_vector<folly::StringPiece, 5, void>>; extern template struct SimdSplitByCharImpl<folly::small_vector<folly::StringPiece, 6, void>>; extern template struct SimdSplitByCharImpl<folly::small_vector<folly::StringPiece, 7, void>>; extern template struct SimdSplitByCharImpl<folly::small_vector<folly::StringPiece, 8, void>>; extern template struct SimdSplitByCharImpl<std::vector<std::string_view>>; extern template struct SimdSplitByCharImpl<folly::fbvector<std::string_view, std::allocator<std::string_view>>>; extern template struct SimdSplitByCharImpl<folly::small_vector<std::string_view, 1, void>>; extern template struct SimdSplitByCharImpl<folly::small_vector<std::string_view, 2, void>>; extern template struct SimdSplitByCharImpl<folly::small_vector<std::string_view, 3, void>>; extern template struct SimdSplitByCharImpl<folly::small_vector<std::string_view, 4, void>>; extern template struct SimdSplitByCharImpl<folly::small_vector<std::string_view, 5, void>>; extern template struct SimdSplitByCharImpl<folly::small_vector<std::string_view, 6, void>>; extern template struct SimdSplitByCharImpl<folly::small_vector<std::string_view, 7, void>>; extern template struct SimdSplitByCharImpl<folly::small_vector<std::string_view, 8, void>>; extern template struct SimdSplitByCharImplToStrings<std::vector<std::string>>; extern template struct SimdSplitByCharImplToStrings< std::vector<PredeclareFbString>>; extern template struct SimdSplitByCharImplToStrings< fbvector<std::string, std::allocator<std::string>>>; extern template struct SimdSplitByCharImplToStrings< fbvector<PredeclareFbString, std::allocator<PredeclareFbString>>>; } } namespace folly { template <class String> void cEscape(StringPiece str, String& out); template <class String> String cEscape(StringPiece str) ; template <class String> void cUnescape(StringPiece str, String& out, bool strict = true); template <class String> String cUnescape(StringPiece str, bool strict = true) ; enum class UriEscapeMode : unsigned char { ALL = 0, QUERY = 1, PATH = 2 }; template <class String> void uriEscape( StringPiece str, String& out, UriEscapeMode mode = UriEscapeMode::ALL); template <class String> String uriEscape(StringPiece str, UriEscapeMode mode = UriEscapeMode::ALL) ; template <class String> bool tryUriUnescape( StringPiece str, String& out, UriEscapeMode mode = UriEscapeMode::ALL); template <class String> folly::Optional<String> tryUriUnescape( StringPiece str, UriEscapeMode mode = UriEscapeMode::ALL) ; template <class String> void uriUnescape( StringPiece str, String& out, UriEscapeMode mode = UriEscapeMode::ALL); template <class String> String uriUnescape(StringPiece str, UriEscapeMode mode = UriEscapeMode::ALL) ; std::string stringPrintf( const char* format, ...) __attribute__((__format__(__printf__, 1, 2))); void stringPrintf(std::string* out, const char* format, ...) __attribute__((__format__(__printf__, 2, 3))); std::string& stringAppendf( std::string* output, const char* format, ...) __attribute__((__format__(__printf__, 2, 3))); std::string stringVPrintf(const char* format, va_list ap); void stringVPrintf(std::string* out, const char* format, va_list ap); std::string& stringVAppendf(std::string* out, const char* format, va_list ap); template <class OutputString> void backslashify( folly::StringPiece input, OutputString& output, bool hex_style = false); template <class OutputString = std::string> OutputString backslashify(StringPiece input, bool hex_style = false) ; template <class String1, class String2> void humanify(const String1& input, String2& output); template <class String> String humanify(const String& input) ; template <class InputString, class OutputString> bool hexlify( const InputString& input, OutputString& output, bool append = false); template <class OutputString = std::string> OutputString hexlify(ByteRange input) ; template <class OutputString = std::string> OutputString hexlify(StringPiece input) ; template <class InputString, class OutputString> bool unhexlify(const InputString& input, OutputString& output); template <class OutputString = std::string> OutputString unhexlify(StringPiece input) ; enum PrettyType { PRETTY_TIME, PRETTY_TIME_HMS, PRETTY_BYTES_METRIC, PRETTY_BYTES_BINARY, PRETTY_BYTES = PRETTY_BYTES_BINARY, PRETTY_BYTES_BINARY_IEC, PRETTY_BYTES_IEC = PRETTY_BYTES_BINARY_IEC, PRETTY_UNITS_METRIC, PRETTY_UNITS_BINARY, PRETTY_UNITS_BINARY_IEC, PRETTY_SI, PRETTY_NUM_TYPES, }; std::string prettyPrint(double val, PrettyType, bool addSpace = true); double prettyToDouble( folly::StringPiece* const prettyString, const PrettyType type); double prettyToDouble(folly::StringPiece prettyString, const PrettyType type); template <class OutIt> void hexDump(const void* ptr, size_t size, OutIt out); std::string hexDump(const void* ptr, size_t size); std::string errnoStr(int err); template <typename T, std::size_t M, typename P> class small_vector; template <typename T, typename Allocator> class fbvector; namespace detail { template <typename> struct IsSplitSupportedContainer : std::false_type {}; template <typename T> using HasSimdSplitCompatibleValueType = std::is_convertible<typename T::value_type, folly::StringPiece>; template <typename T, typename A> struct IsSplitSupportedContainer<std::vector<T, A>> : std::true_type {}; template <typename T, typename A> struct IsSplitSupportedContainer<fbvector<T, A>> : std::true_type {}; template <typename T, std::size_t M, typename P> struct IsSplitSupportedContainer<small_vector<T, M, P>> : std::true_type {}; template <typename> struct IsSimdSupportedDelim : std::false_type {}; template <> struct IsSimdSupportedDelim<char> : std::true_type {}; } template <class Delim, class String, class OutputType> __attribute__((__always_inline__)) std::enable_if_t< detail::IsSimdSupportedDelim<Delim>::value && detail::HasSimdSplitCompatibleValueType<OutputType>::value && detail::IsSplitSupportedContainer<OutputType>::value> split( const Delim& delimiter, const String& input, OutputType& out, const bool ignoreEmpty = false) ; template <class Delim, class String, class OutputType> std::enable_if_t< (!detail::IsSimdSupportedDelim<Delim>::value || !detail::HasSimdSplitCompatibleValueType<OutputType>::value) && detail::IsSplitSupportedContainer<OutputType>::value> split( const Delim& delimiter, const String& input, OutputType& out, const bool ignoreEmpty = false); template < class OutputValueType, class Delim, class String, class OutputIterator> void splitTo( const Delim& delimiter, const String& input, OutputIterator out, const bool ignoreEmpty = false); namespace detail { template <typename Void, typename OutputType> struct IsConvertible : std::false_type {}; template <> struct IsConvertible<void, decltype(std::ignore)> : std::true_type {}; template <typename OutputType> struct IsConvertible< void_t<decltype(parseTo(StringPiece{}, std::declval<OutputType&>()))>, OutputType> : std::true_type {}; } template <typename OutputType> struct IsConvertible : detail::IsConvertible<void, OutputType> {}; template <bool exact = true, class Delim, class... OutputTypes> typename std::enable_if< StrictConjunction<IsConvertible<OutputTypes>...>::value && sizeof...(OutputTypes) >= 1, bool>::type split(const Delim& delimiter, StringPiece input, OutputTypes&... outputs); template <class Delim, class Iterator, class String> void join(const Delim& delimiter, Iterator begin, Iterator end, String& output); template <class Delim, class Container, class String> void join(const Delim& delimiter, const Container& container, String& output) ; template <class Delim, class Value, class String> void join( const Delim& delimiter, const std::initializer_list<Value>& values, String& output) ; template <class Delim, class Container> std::string join(const Delim& delimiter, const Container& container) ; template <class Delim, class Value> std::string join( const Delim& delimiter, const std::initializer_list<Value>& values) ; template < class Delim, class Iterator, typename std::enable_if<std::is_base_of< std::forward_iterator_tag, typename std::iterator_traits<Iterator>::iterator_category>::value>:: type* = nullptr> std::string join(const Delim& delimiter, Iterator begin, Iterator end) ; StringPiece ltrimWhitespace(StringPiece sp); StringPiece rtrimWhitespace(StringPiece sp); StringPiece trimWhitespace(StringPiece sp) ; StringPiece skipWhitespace(StringPiece sp) ; template <typename ToTrim> StringPiece ltrim(StringPiece sp, ToTrim toTrim) ; template <typename ToTrim> StringPiece rtrim(StringPiece sp, ToTrim toTrim) ; template <typename ToTrim> StringPiece trim(StringPiece sp, ToTrim toTrim) ; std::string stripLeftMargin(std::string s); void toLowerAscii(char* str, size_t length); void toLowerAscii(MutableStringPiece str) ; void toLowerAscii(std::string& str) ; bool hasSpaceOrCntrlSymbols(folly::StringPiece s) ; } namespace folly { namespace detail { template <typename C> using detect_capacity = decltype(static_cast<C (*)() noexcept>(nullptr)().capacity()); template <typename C> using detect_bucket_count = decltype(static_cast<C (*)() noexcept>(nullptr)().bucket_count()); template <typename C> using detect_max_load_factor = decltype(static_cast<C (*)() noexcept>(nullptr)().max_load_factor()); } struct grow_capacity_by_fn { template <typename C> void operator()(C& c, typename C::size_type const n) const ; }; inline constexpr grow_capacity_by_fn grow_capacity_by{}; } namespace folly { namespace detail { extern const std::array<char, 256> cEscapeTable; } template <class String> void cEscape(StringPiece str, String& out) ; namespace detail { extern const std::array<char, 256> cUnescapeTable; extern const std::array<unsigned char, 256> hexTable; } template <class String> void cUnescape(StringPiece str, String& out, bool strict) ; namespace detail { extern const std::array<unsigned char, 256> uriEscapeTable; } template <class String> void uriEscape(StringPiece str, String& out, UriEscapeMode mode) ; template <class String> bool tryUriUnescape(StringPiece str, String& out, UriEscapeMode mode) ; template <class String> void uriUnescape(StringPiece str, String& out, UriEscapeMode mode) ; namespace detail { size_t delimSize(char) ; size_t delimSize(StringPiece s) ; bool atDelim(const char* s, char c) ; bool atDelim(const char* s, StringPiece sp) ; char delimFront(char) ; char delimFront(StringPiece s) ; template <class OutStringT, class DelimT, class OutputIterator> void internalSplit( DelimT delim, StringPiece sp, OutputIterator out, bool ignoreEmpty); template <class OutStringT, class Container> std::enable_if_t< IsSplitSupportedContainer<Container>::value && HasSimdSplitCompatibleValueType<Container>::value> internalSplitRecurseChar( char delim, folly::StringPiece sp, std::back_insert_iterator<Container> it, bool ignoreEmpty) ; template <class OutStringT, class Iterator> void internalSplitRecurseChar( char delim, folly::StringPiece sp, Iterator it, bool ignoreEmpty) ; template <class OutStringT, class DelimT, class OutputIterator> void internalSplit( DelimT delim, StringPiece sp, OutputIterator out, bool ignoreEmpty) ; template <class String> StringPiece prepareDelim(const String& s) ; char prepareDelim(char c) ; template <class OutputType> void toOrIgnore(StringPiece input, OutputType& output) ; void toOrIgnore(StringPiece, decltype(std::ignore)&) ; template <bool exact, class Delim, class OutputType> bool splitFixed(const Delim& delimiter, StringPiece input, OutputType& output) ; template <bool exact, class Delim, class OutputType, class... OutputTypes> bool splitFixed( const Delim& delimiter, StringPiece input, OutputType& outHead, OutputTypes&... outTail) ; } template <class Delim, class String, class OutputType> std::enable_if_t< (!detail::IsSimdSupportedDelim<Delim>::value || !detail::HasSimdSplitCompatibleValueType<OutputType>::value) && detail::IsSplitSupportedContainer<OutputType>::value> split( const Delim& delimiter, const String& input, OutputType& out, bool ignoreEmpty) ; template < class OutputValueType, class Delim, class String, class OutputIterator> void splitTo( const Delim& delimiter, const String& input, OutputIterator out, bool ignoreEmpty) ; template <bool exact, class Delim, class... OutputTypes> typename std::enable_if< StrictConjunction<IsConvertible<OutputTypes>...>::value && sizeof...(OutputTypes) >= 1, bool>::type split(const Delim& delimiter, StringPiece input, OutputTypes&... outputs) ; namespace detail { template <class T> struct IsSizableString { enum { value = IsSomeString<T>::value || std::is_same<T, StringPiece>::value }; }; template <class Iterator> struct IsSizableStringContainerIterator : IsSizableString<typename std::iterator_traits<Iterator>::value_type> {}; template <class Delim, class Iterator, class String> void internalJoinAppend( Delim delimiter, Iterator begin, Iterator end, String& output) ; template <class Delim, class Iterator, class String> typename std::enable_if<IsSizableStringContainerIterator<Iterator>::value>::type internalJoin(Delim delimiter, Iterator begin, Iterator end, String& output) ; template <class Delim, class Iterator, class String> typename std::enable_if< !IsSizableStringContainerIterator<Iterator>::value>::type internalJoin(Delim delimiter, Iterator begin, Iterator end, String& output) ; } template <class Delim, class Iterator, class String> void join( const Delim& delimiter, Iterator begin, Iterator end, String& output) ; template <class OutputString> void backslashify( folly::StringPiece input, OutputString& output, bool hex_style) { static const char hexValues[] = "0123456789abcdef"; output.clear(); output.reserve(3 * input.size()); for (unsigned char c : input) { if (c < 0x20 || c > 0x7e || c == '\\') { bool hex_append = false; output.push_back('\\'); if (hex_style) { hex_append = true; } else { if (c == '\r') { output += 'r'; } else if (c == '\n') { output += 'n'; } else if (c == '\t') { output += 't'; } else if (c == '\a') { output += 'a'; } else if (c == '\b') { output += 'b'; } else if (c == '\0') { output += '0'; } else if (c == '\\') { output += '\\'; } else { hex_append = true; } } if (hex_append) { output.push_back('x'); output.push_back(hexValues[(c >> 4) & 0xf]); output.push_back(hexValues[c & 0xf]); } } else { output += c; } } } template <class String1, class String2> void humanify(const String1& input, String2& output) ; template <class InputString, class OutputString> bool hexlify( const InputString& input, OutputString& output, bool append_output) ; template <class InputString, class OutputString> bool unhexlify(const InputString& input, OutputString& output) ; namespace detail { size_t hexDumpLine( const void* ptr, size_t offset, size_t size, std::string& line); } template <class OutIt> void hexDump(const void* ptr, size_t size, OutIt out) ; } #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wshadow" namespace folly { template <bool containerMode, class... Args> class Formatter; template <class... Args> Formatter<false, Args...> format(StringPiece fmt, Args&&... args); template <class C> Formatter<true, C> vformat(StringPiece fmt, C&& container); template <class T, class Enable = void> class FormatValue; namespace detail { class FormatterTag {}; struct BaseFormatterBase { template <class Callback> using DoFormatFn = void(const BaseFormatterBase&, FormatArg&, Callback&); StringPiece str_; static std::false_type recordUsedArg(const BaseFormatterBase&, size_t) { return {}; } }; template <size_t I, typename A> struct BaseFormatterTupleIndexedValue { A value; }; template <typename, typename...> struct BaseFormatterTuple; template <size_t... I, typename... A> struct BaseFormatterTuple<std::index_sequence<I...>, A...> : BaseFormatterTupleIndexedValue<I, A>... { explicit BaseFormatterTuple(std::in_place_t, A&&... a) : BaseFormatterTupleIndexedValue<I, A>{static_cast<A&&>(a)}... {} }; template <typename Str> struct BaseFormatterAppendToString { Str& str; void operator()(StringPiece s) const { str.append(s.data(), s.size()); } }; inline void formatCheckIndex(size_t i, const FormatArg& arg, size_t max) { arg.enforce(i < max, "argument index out of range, max=", max); } } template <class Derived, bool containerMode, class Indices, class... Args> class BaseFormatterImpl; template <class Derived, bool containerMode, size_t... I, class... Args> class BaseFormatterImpl< Derived, containerMode, std::index_sequence<I...>, Args...> : public detail::BaseFormatterBase { public: template <class Output> void operator()(Output& out) const; template <class Str> typename std::enable_if<IsSomeString<Str>::value>::type appendTo( Str& str) const ; std::string str() const ; typedef detail::FormatterTag IsFormatter; private: template <typename T, typename D = typename std::decay<T>::type> using IsSizeable = std::bool_constant< std::is_integral<D>::value && !std::is_same<D, bool>::value>; template <class Callback> static constexpr c_array<DoFormatFn<Callback>*, sizeof...(Args) + 1> getDoFormatFnArray() ; template <size_t, typename> constexpr int getSizeArgAt(std::false_type) const ; template <size_t K, typename T> int getSizeArgAt(std::true_type) const { using V = detail::BaseFormatterTupleIndexedValue<K, T>; return static_cast<int>(static_cast<const V&>(values_).value); } void getSizeArg(int* out) const ; protected: explicit BaseFormatterImpl(StringPiece str, Args&&... args) ; BaseFormatterImpl(const BaseFormatterImpl&) = delete; BaseFormatterImpl& operator=(const BaseFormatterImpl&) = delete; BaseFormatterImpl(BaseFormatterImpl&&) = default; BaseFormatterImpl& operator=(BaseFormatterImpl&&) = default; template <size_t K, typename T = type_pack_element_t<K, Args...>> FormatValue<typename std::decay<T>::type> getFormatValue() const ; detail::BaseFormatterTuple<std::index_sequence<I...>, Args...> values_; }; template <class Derived, bool containerMode, class... Args> using BaseFormatter = BaseFormatterImpl< Derived, containerMode, std::index_sequence_for<Args...>, Args...>; template <bool containerMode, class... Args> class Formatter : public BaseFormatter< Formatter<containerMode, Args...>, containerMode, Args...> { using self = Formatter<containerMode, Args...>; using base = BaseFormatter<self, containerMode, Args...>; static_assert( !containerMode || sizeof...(Args) == 1, "Exactly one argument required in container mode"); private: using base::base; template <size_t K, class Callback> static void doFormatArg( const detail::BaseFormatterBase& obj, FormatArg& arg, Callback& cb) ; friend base; template <class... A> friend Formatter<false, A...> format(StringPiece fmt, A&&... arg); template <class Str, class... A> friend typename std::enable_if<IsSomeString<Str>::value>::type format( Str* out, StringPiece fmt, A&&... args); template <class... A> friend std::string sformat(StringPiece fmt, A&&... arg); template <class C> friend Formatter<true, C> vformat(StringPiece fmt, C&& container); }; namespace detail { template <typename Out> struct FormatterOstreamInsertionWriterFn { Out& out; void operator()(StringPiece sp) const ; }; } template <class C, class CT, bool containerMode, class... Args> std::ostream& operator<<( std::basic_ostream<C, CT>& out, const Formatter<containerMode, Args...>& formatter) ; template <class... Args> [[deprecated( "Use fmt::format instead of folly::format for better performance, build " "times and compatibility with std::format")]] Formatter<false, Args...> format(StringPiece fmt, Args&&... args) ; template <class... Args> std::string sformat(StringPiece fmt, Args&&... args) ; template <class Container> [[deprecated( "Use fmt::format instead of folly::vformat for better performance, build " "times and compatibility with std::format")]] Formatter<true, Container> vformat(StringPiece fmt, Container&& container) ; template <class Container> [[deprecated( "Use fmt::format instead of folly::svformat for better performance, build " "times and compatibility with std::format")]] std::string svformat(StringPiece fmt, Container&& container) ; class __attribute__((__visibility__("default"))) FormatKeyNotFoundException : public std::out_of_range { public: explicit FormatKeyNotFoundException(StringPiece key); char const* key() const noexcept ; private: static constexpr StringPiece const kMessagePrefix = "format key not found: "; }; namespace detail { template <class Container, class Value> struct DefaultValueWrapper { DefaultValueWrapper(const Container& container, const Value& defaultValue) ; const Container& container; const Value& defaultValue; }; } template <class Container, class Value> detail::DefaultValueWrapper<Container, Value> defaulted( const Container& c, const Value& v) ; template <class Str, class... Args> typename std::enable_if<IsSomeString<Str>::value>::type format( Str* out, StringPiece fmt, Args&&... args) ; template <class Str, class Container> typename std::enable_if<IsSomeString<Str>::value>::type vformat( Str* out, StringPiece fmt, Container&& container) ; namespace format_value { template <class FormatCallback> void formatString(StringPiece val, FormatArg& arg, FormatCallback& cb); template <class FormatCallback> void formatNumber( StringPiece val, int prefixLen, FormatArg& arg, FormatCallback& cb); ; } namespace detail { template <class T, class Enable = void> struct IsFormatter : public std::false_type {}; template <class T> struct IsFormatter< T, typename std::enable_if< std::is_same<typename T::IsFormatter, detail::FormatterTag>::value>:: type> : public std::true_type {}; } } namespace folly { const std::error_category& errorCategoryForErrnoDomain() noexcept ; std::system_error makeSystemErrorExplicit(int err, const char* msg) ; [[noreturn]] void throwSystemErrorExplicit(int err, const char* msg) ; template <class... Args> [[noreturn]] void throwSystemError(Args&&... args) ; } namespace folly { ; ; ; ; ; namespace detail { template < class T, size_t pathLength, class = typename std::enable_if<(pathLength > 0)>::type> struct NestedMapType { using type = typename NestedMapType<T, pathLength - 1>::type::mapped_type; }; template <class T> struct NestedMapType<T, 1> { using type = typename T::mapped_type; }; template <typename... KeysDefault> struct DefaultType; template <typename Default> struct DefaultType<Default> { using type = Default; }; template <typename Key, typename... KeysDefault> struct DefaultType<Key, KeysDefault...> { using type = typename DefaultType<KeysDefault...>::type; }; ; } ; ; ; ; ; } #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wformat-nonliteral" #pragma GCC diagnostic ignored "-Wconversion" namespace folly { namespace detail { extern const std::array<std::array<char, 2>, 256> formatHexUpper; extern const std::array<std::array<char, 2>, 256> formatHexLower; extern const std::array<std::array<char, 3>, 512> formatOctal; extern const std::array<std::array<char, 8>, 256> formatBinary; const size_t kMaxHexLength = 2 * sizeof(uintmax_t); const size_t kMaxOctalLength = 3 * sizeof(uintmax_t); const size_t kMaxBinaryLength = 8 * sizeof(uintmax_t); ; ; ; ; ; ; } namespace format_value { template <class FormatCallback> void formatString(StringPiece val, FormatArg& arg, FormatCallback& cb) ; template <class FormatCallback> void formatNumber( StringPiece val, int prefixLen, FormatArg& arg, FormatCallback& cb) ; template <typename FormatCallback> struct FormatFormatterFn { FormatArg& arg; FormatCallback& cb; }; ; } template <class T> class FormatValue< T, typename std::enable_if< std::is_integral<T>::value && !std::is_same<T, bool>::value>::type> { public: ; ; private: T val_; }; template <> class FormatValue<bool> { public: ; private: bool val_; }; template <> class FormatValue<double> { public: ; private: double val_; }; template <> class FormatValue<float> { public: ; private: float val_; }; template <class T> class FormatValue< T, typename std::enable_if< (!std::is_pointer<T>::value || !std::is_same< char, typename std::decay<typename std::remove_pointer<T>::type>::type>:: value) && std::is_convertible<T, StringPiece>::value>::type> { public: ; private: StringPiece val_; }; template <> class FormatValue<std::nullptr_t> { public: ; }; template <class T> class FormatValue< T*, typename std::enable_if< std::is_same<char, typename std::decay<T>::type>::value>::type> { public: ; private: T* val_; }; template <class T> class FormatValue< T*, typename std::enable_if< std::is_same<void, typename std::decay<T>::type>::value>::type> { public: ; private: T* val_; }; template <class T, class = void> class TryFormatValue { public: ; }; template <class T> class TryFormatValue< T, typename std::enable_if< 0 < sizeof(FormatValue<typename std::decay<T>::type>)>::type> { public: ; }; template <class T> class FormatValue< T*, typename std::enable_if< !std::is_same<char, typename std::decay<T>::type>::value && !std::is_same<void, typename std::decay<T>::type>::value>::type> { public: ; private: T* val_; }; namespace detail { template <class T, size_t N> struct IndexableTraits<std::array<T, N>> : public IndexableTraitsSeq<std::array<T, N>> {}; template <class T, class A> struct IndexableTraits<std::vector<T, A>> : public IndexableTraitsSeq<std::vector<T, A>> {}; template <class T, class A> struct IndexableTraits<std::deque<T, A>> : public IndexableTraitsSeq<std::deque<T, A>> {}; template <class K, class T, class C, class A> struct IndexableTraits< std::map<K, T, C, A>, typename std::enable_if<std::is_integral<K>::value>::type> : public IndexableTraitsAssoc<std::map<K, T, C, A>> {}; template <class K, class T, class H, class E, class A> struct IndexableTraits< std::unordered_map<K, T, H, E, A>, typename std::enable_if<std::is_integral<K>::value>::type> : public IndexableTraitsAssoc<std::unordered_map<K, T, H, E, A>> {}; } template <class T> class FormatValue<T, typename detail::IndexableTraits<T>::enabled> { public: ; private: const T& val_; }; template <class Container, class Value> class FormatValue< detail::DefaultValueWrapper<Container, Value>, typename detail::IndexableTraits<Container>::enabled> { public: ; private: const detail::DefaultValueWrapper<Container, Value>& val_; }; namespace detail { template <class T> struct KeyFromStringPiece; template <> struct KeyFromStringPiece<std::string> : public FormatTraitsBase { typedef std::string key_type; typedef void enabled; }; template <> struct KeyFromStringPiece<fbstring> : public FormatTraitsBase { typedef fbstring key_type; }; template <> struct KeyFromStringPiece<StringPiece> : public FormatTraitsBase { typedef StringPiece key_type; }; template <class T> struct KeyableTraitsAssoc : public FormatTraitsBase { typedef typename T::key_type key_type; typedef typename T::value_type::second_type value_type; }; template <class T, class Enabled = void> struct KeyableTraits; template <class K, class T, class C, class A> struct KeyableTraits< std::map<K, T, C, A>, typename KeyFromStringPiece<K>::enabled> : public KeyableTraitsAssoc<std::map<K, T, C, A>> {}; template <class K, class T, class H, class E, class A> struct KeyableTraits< std::unordered_map<K, T, H, E, A>, typename KeyFromStringPiece<K>::enabled> : public KeyableTraitsAssoc<std::unordered_map<K, T, H, E, A>> {}; } template <class T> class FormatValue<T, typename detail::KeyableTraits<T>::enabled> { public: ; private: const T& val_; }; template <class Container, class Value> class FormatValue< detail::DefaultValueWrapper<Container, Value>, typename detail::KeyableTraits<Container>::enabled> { public: ; private: const detail::DefaultValueWrapper<Container, Value>& val_; }; template <class A, class B> class FormatValue<std::pair<A, B>> { public: ; private: const std::pair<A, B>& val_; }; template <class... Args> class FormatValue<std::tuple<Args...>> { typedef std::tuple<Args...> Tuple; public: ; private: template <size_t K> using FV = FormatValue< typename std::decay<typename std::tuple_element<K, Tuple>::type>::type>; ; ; const Tuple& val_; }; template <bool containerMode, class... Args, template <bool, class...> class F> class FormatValue< F<containerMode, Args...>, typename std::enable_if< detail::IsFormatter<F<containerMode, Args...>>::value>::type> { typedef F<containerMode, Args...> FormatterValue; public: ; private: const FormatterValue& f_; }; ; } #pragma GCC diagnostic pop #pragma GCC diagnostic pop namespace folly { namespace detail { struct DynamicHasher { using is_transparent = void; using folly_is_avalanching = std::true_type; size_t operator()(dynamic const& d) const ; template <typename T> std::enable_if_t<std::is_convertible<T, StringPiece>::value, size_t> operator()(T const& val) const ; }; struct DynamicKeyEqual { using is_transparent = void; bool operator()(const dynamic& lhs, const dynamic& rhs) const ; ; template <typename A> std::enable_if_t<std::is_convertible<A, StringPiece>::value, bool> operator()( A const& lhs, dynamic const& rhs) const ; ; }; } } namespace folly { struct __attribute__((__visibility__("default"))) TypeError : std::runtime_error { }; namespace detail { struct Destroy { ; }; template <template <class> class Op> dynamic numericOp(dynamic const& a, dynamic const& b) ; } struct dynamic::ObjectImpl : F14NodeMap< dynamic, dynamic, detail::DynamicHasher, detail::DynamicKeyEqual> {}; struct dynamic::ObjectMaker { friend struct dynamic; private: dynamic val_; }; struct dynamic::item_iterator : detail::IteratorAdaptor< dynamic::item_iterator, dynamic::ObjectImpl::iterator, std::pair<dynamic const, dynamic>, std::forward_iterator_tag> { using Super = detail::IteratorAdaptor< dynamic::item_iterator, dynamic::ObjectImpl::iterator, std::pair<dynamic const, dynamic>, std::forward_iterator_tag>; item_iterator() = default; item_iterator(dynamic::ObjectImpl::iterator b) ; using object_type = dynamic::ObjectImpl; }; struct dynamic::value_iterator : detail::IteratorAdaptor< dynamic::value_iterator, dynamic::ObjectImpl::iterator, dynamic, std::forward_iterator_tag> { using Super = detail::IteratorAdaptor< dynamic::value_iterator, dynamic::ObjectImpl::iterator, dynamic, std::forward_iterator_tag>; using object_type = dynamic::ObjectImpl; }; struct dynamic::const_item_iterator : detail::IteratorAdaptor< dynamic::const_item_iterator, dynamic::ObjectImpl::const_iterator, std::pair<dynamic const, dynamic> const, std::forward_iterator_tag> { using Super = detail::IteratorAdaptor< dynamic::const_item_iterator, dynamic::ObjectImpl::const_iterator, std::pair<dynamic const, dynamic> const, std::forward_iterator_tag>; const_item_iterator(dynamic::ObjectImpl::const_iterator b) ; const_item_iterator(item_iterator i) ; using object_type = dynamic::ObjectImpl const; }; struct dynamic::const_key_iterator : detail::IteratorAdaptor< dynamic::const_key_iterator, dynamic::ObjectImpl::const_iterator, dynamic const, std::forward_iterator_tag> { using Super = detail::IteratorAdaptor< dynamic::const_key_iterator, dynamic::ObjectImpl::const_iterator, dynamic const, std::forward_iterator_tag>; using object_type = dynamic::ObjectImpl const; }; struct dynamic::const_value_iterator : detail::IteratorAdaptor< dynamic::const_value_iterator, dynamic::ObjectImpl::const_iterator, dynamic const, std::forward_iterator_tag> { using Super = detail::IteratorAdaptor< dynamic::const_value_iterator, dynamic::ObjectImpl::const_iterator, dynamic const, std::forward_iterator_tag>; using object_type = dynamic::ObjectImpl const; }; template <class T> struct dynamic::NumericTypeHelper< T, typename std::enable_if<std::is_integral<T>::value>::type> { static_assert( !kIsObjC || sizeof(T) > sizeof(char), "char-sized types are ambiguous in objc; cast to bool or wider type"); using type = int64_t; }; template <> struct dynamic::NumericTypeHelper<bool> { using type = bool; }; template <> struct dynamic::NumericTypeHelper<float> { using type = double; }; template <> struct dynamic::NumericTypeHelper<double> { using type = double; }; template <class It> struct dynamic::IterableProxy { typedef It iterator; typedef typename It::value_type value_type; typedef typename It::object_type object_type; It begin() const ; It end() const ; private: object_type* o_; }; template <class T> struct dynamic::CompareOp { }; template <> struct dynamic::CompareOp<dynamic::ObjectImpl> { }; template <> struct dynamic::CompareOp<std::nullptr_t> { }; template <> struct dynamic::TypeInfo<std::nullptr_t> { static const char* const name; static constexpr dynamic::Type type = dynamic::NULLT; }; template <> struct dynamic::TypeInfo<bool> { static const char* const name; static constexpr dynamic::Type type = dynamic::BOOL; }; template <> struct dynamic::TypeInfo<std::string> { static const char* const name; static constexpr dynamic::Type type = dynamic::STRING; }; template <> struct dynamic::TypeInfo<dynamic::Array> { static const char* const name; static constexpr dynamic::Type type = dynamic::ARRAY; }; template <> struct dynamic::TypeInfo<double> { static const char* const name; static constexpr dynamic::Type type = dynamic::DOUBLE; }; template <> struct dynamic::TypeInfo<int64_t> { static const char* const name; static constexpr dynamic::Type type = dynamic::INT64; }; template <> struct dynamic::TypeInfo<dynamic::ObjectImpl> { static const char* const name; static constexpr dynamic::Type type = dynamic::OBJECT; }; template <class T> struct dynamic::GetAddrImpl {}; template <> struct dynamic::GetAddrImpl<std::nullptr_t> { }; template <> struct dynamic::GetAddrImpl<dynamic::Array> { }; template <> struct dynamic::GetAddrImpl<bool> { }; template <> struct dynamic::GetAddrImpl<int64_t> { }; template <> struct dynamic::GetAddrImpl<double> { }; template <> struct dynamic::GetAddrImpl<std::string> { }; template <> struct dynamic::GetAddrImpl<dynamic::ObjectImpl> { static_assert( sizeof(ObjectImpl) <= sizeof(Data::objectBuffer), "In your implementation, F14NodeMap<> apparently takes different" " amount of space depending on its template parameters. This is " "weird. Make objectBuffer bigger if you want to compile dynamic."); }; template <class T> struct dynamic::PrintImpl { }; template <> struct dynamic::PrintImpl<std::nullptr_t> { }; template <> struct dynamic::PrintImpl<dynamic::ObjectImpl> { }; template <> struct dynamic::PrintImpl<dynamic::Array> { }; std::ostream& operator<<(std::ostream& out, dynamic const& d) ; template <> class FormatValue<dynamic> { public: ; private: const dynamic& val_; }; template <class V> class FormatValue<detail::DefaultValueWrapper<dynamic, V>> { public: ; private: const detail::DefaultValueWrapper<dynamic, V>& val_; }; } namespace apache { namespace thrift { namespace ident { struct major; struct minor; struct patch; struct is_release; struct git_rev; struct git_branch; struct git_desc; struct version; struct system_id; struct compiler_id; struct arguments; struct timestamp; struct library_versions; struct entries; } namespace detail { template <> struct invoke_reffer<::apache::thrift::ident::major> { template <typename T> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(T&& t) const noexcept(noexcept(static_cast<T&&>(t).major_ref())) -> decltype(static_cast<T&&>(t).major_ref()) ; }; template <> struct invoke_reffer<::apache::thrift::ident::minor> { template <typename T> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(T&& t) const noexcept(noexcept(static_cast<T&&>(t).minor_ref())) -> decltype(static_cast<T&&>(t).minor_ref()) ; }; template <> struct invoke_reffer<::apache::thrift::ident::patch> { template <typename T> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(T&& t) const noexcept(noexcept(static_cast<T&&>(t).patch_ref())) -> decltype(static_cast<T&&>(t).patch_ref()) ; }; template <> struct invoke_reffer<::apache::thrift::ident::is_release> { template <typename T> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(T&& t) const noexcept(noexcept(static_cast<T&&>(t).is_release_ref())) -> decltype(static_cast<T&&>(t).is_release_ref()) ; }; template <> struct invoke_reffer<::apache::thrift::ident::git_rev> { template <typename T> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(T&& t) const noexcept(noexcept(static_cast<T&&>(t).git_rev_ref())) -> decltype(static_cast<T&&>(t).git_rev_ref()) ; }; template <> struct invoke_reffer<::apache::thrift::ident::git_branch> { template <typename T> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(T&& t) const noexcept(noexcept(static_cast<T&&>(t).git_branch_ref())) -> decltype(static_cast<T&&>(t).git_branch_ref()) ; }; template <> struct invoke_reffer<::apache::thrift::ident::git_desc> { template <typename T> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(T&& t) const noexcept(noexcept(static_cast<T&&>(t).git_desc_ref())) -> decltype(static_cast<T&&>(t).git_desc_ref()) ; }; template <> struct invoke_reffer<::apache::thrift::ident::version> { template <typename T> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(T&& t) const noexcept(noexcept(static_cast<T&&>(t).version_ref())) -> decltype(static_cast<T&&>(t).version_ref()) ; }; template <> struct invoke_reffer<::apache::thrift::ident::system_id> { template <typename T> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(T&& t) const noexcept(noexcept(static_cast<T&&>(t).system_id_ref())) -> decltype(static_cast<T&&>(t).system_id_ref()) ; }; template <> struct invoke_reffer<::apache::thrift::ident::compiler_id> { template <typename T> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(T&& t) const noexcept(noexcept(static_cast<T&&>(t).compiler_id_ref())) -> decltype(static_cast<T&&>(t).compiler_id_ref()) ; }; template <> struct invoke_reffer<::apache::thrift::ident::arguments> { template <typename T> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(T&& t) const noexcept(noexcept(static_cast<T&&>(t).arguments_ref())) -> decltype(static_cast<T&&>(t).arguments_ref()) ; }; template <> struct invoke_reffer<::apache::thrift::ident::timestamp> { template <typename T> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(T&& t) const noexcept(noexcept(static_cast<T&&>(t).timestamp_ref())) -> decltype(static_cast<T&&>(t).timestamp_ref()) ; }; template <> struct invoke_reffer<::apache::thrift::ident::library_versions> { template <typename T> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(T&& t) const noexcept(noexcept(static_cast<T&&>(t).library_versions_ref())) -> decltype(static_cast<T&&>(t).library_versions_ref()) ; }; template <> struct invoke_reffer<::apache::thrift::ident::entries> { template <typename T> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(T&& t) const noexcept(noexcept(static_cast<T&&>(t).entries_ref())) -> decltype(static_cast<T&&>(t).entries_ref()) ; }; } } } namespace dwarfs::thrift::history { class dwarfs_version; class history_entry; class history; } namespace apache::thrift::detail::annotation { } namespace apache::thrift::detail::qualifier { } namespace dwarfs::thrift::history { using ::apache::thrift::detail::operator!=; using ::apache::thrift::detail::operator>; using ::apache::thrift::detail::operator<=; using ::apache::thrift::detail::operator>=; typedef uint8_t UInt8; typedef uint16_t UInt16; typedef uint32_t UInt32; typedef uint64_t UInt64; class dwarfs_version final { private: friend struct ::apache::thrift::detail::st::struct_private_access; template<class> friend struct ::apache::thrift::detail::invoke_reffer; static constexpr bool __fbthrift_cpp2_gen_json = false; static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false; static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord); static std::string_view __fbthrift_get_class_name(); using __fbthrift_reflection_ident_list = folly::tag_t< ::apache::thrift::ident::major, ::apache::thrift::ident::minor, ::apache::thrift::ident::patch, ::apache::thrift::ident::is_release, ::apache::thrift::ident::git_rev, ::apache::thrift::ident::git_branch, ::apache::thrift::ident::git_desc >; static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,1,2,3,4,5,6,7}; using __fbthrift_reflection_type_tags = folly::tag_t< ::apache::thrift::type::cpp_type<uint16_t, ::apache::thrift::type::i16_t>, ::apache::thrift::type::cpp_type<uint16_t, ::apache::thrift::type::i16_t>, ::apache::thrift::type::cpp_type<uint16_t, ::apache::thrift::type::i16_t>, ::apache::thrift::type::bool_t, ::apache::thrift::type::string_t, ::apache::thrift::type::string_t, ::apache::thrift::type::string_t >; static constexpr std::size_t __fbthrift_field_size_v = 7; template<class T> using __fbthrift_id = ::apache::thrift::type::field_id<__fbthrift_reflection_field_id_list[folly::to_underlying(T::value)]>; template<class T> using __fbthrift_type_tag = ::apache::thrift::detail::at<__fbthrift_reflection_type_tags, T::value>; template<class T> using __fbthrift_ident = ::apache::thrift::detail::at<__fbthrift_reflection_ident_list, T::value>; template<class T> using __fbthrift_ordinal = ::apache::thrift::type::ordinal_tag< ::apache::thrift::detail::getFieldOrdinal<T, __fbthrift_reflection_ident_list, __fbthrift_reflection_type_tags>( __fbthrift_reflection_field_id_list ) >; void __fbthrift_clear(); void __fbthrift_clear_terse_fields(); bool __fbthrift_is_empty() const; public: using __fbthrift_cpp2_type = dwarfs_version; static constexpr bool __fbthrift_cpp2_is_union = false; public: dwarfs_version(); [[deprecated("This constructor is deprecated")]] dwarfs_version(apache::thrift::FragileConstructor, ::dwarfs::thrift::history::UInt16 major__arg, ::dwarfs::thrift::history::UInt16 minor__arg, ::dwarfs::thrift::history::UInt16 patch__arg, bool is_release__arg, ::std::string git_rev__arg, ::std::string git_branch__arg, ::std::string git_desc__arg); dwarfs_version(dwarfs_version&&) noexcept; dwarfs_version(const dwarfs_version& src); dwarfs_version& operator=(dwarfs_version&&) noexcept; dwarfs_version& operator=(const dwarfs_version& src); ~dwarfs_version(); private: ::dwarfs::thrift::history::UInt16 __fbthrift_field_major; private: ::dwarfs::thrift::history::UInt16 __fbthrift_field_minor; private: ::dwarfs::thrift::history::UInt16 __fbthrift_field_patch; private: bool __fbthrift_field_is_release; private: ::std::string __fbthrift_field_git_rev; private: ::std::string __fbthrift_field_git_branch; private: ::std::string __fbthrift_field_git_desc; private: apache::thrift::detail::isset_bitset<7, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset; public: bool operator==(const dwarfs_version&) const; bool operator<(const dwarfs_version&) const; template <typename..., typename T = ::dwarfs::thrift::history::UInt16> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> major_ref() const& ; template <typename..., typename T = ::dwarfs::thrift::history::UInt16> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> major_ref() const&& ; template <typename..., typename T = ::dwarfs::thrift::history::UInt16> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> major_ref() & ; template <typename..., typename T = ::dwarfs::thrift::history::UInt16> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> major_ref() && ; template <typename..., typename T = ::dwarfs::thrift::history::UInt16> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> major() const& ; template <typename..., typename T = ::dwarfs::thrift::history::UInt16> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> major() const&& ; template <typename..., typename T = ::dwarfs::thrift::history::UInt16> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> major() & ; template <typename..., typename T = ::dwarfs::thrift::history::UInt16> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> major() && ; template <typename..., typename T = ::dwarfs::thrift::history::UInt16> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> minor_ref() const& ; template <typename..., typename T = ::dwarfs::thrift::history::UInt16> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> minor_ref() const&& ; template <typename..., typename T = ::dwarfs::thrift::history::UInt16> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> minor_ref() & ; template <typename..., typename T = ::dwarfs::thrift::history::UInt16> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> minor_ref() && ; template <typename..., typename T = ::dwarfs::thrift::history::UInt16> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> minor() const& ; template <typename..., typename T = ::dwarfs::thrift::history::UInt16> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> minor() const&& ; template <typename..., typename T = ::dwarfs::thrift::history::UInt16> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> minor() & ; template <typename..., typename T = ::dwarfs::thrift::history::UInt16> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> minor() && ; template <typename..., typename T = ::dwarfs::thrift::history::UInt16> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> patch_ref() const& ; template <typename..., typename T = ::dwarfs::thrift::history::UInt16> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> patch_ref() const&& ; template <typename..., typename T = ::dwarfs::thrift::history::UInt16> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> patch_ref() & ; template <typename..., typename T = ::dwarfs::thrift::history::UInt16> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> patch_ref() && ; template <typename..., typename T = ::dwarfs::thrift::history::UInt16> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> patch() const& ; template <typename..., typename T = ::dwarfs::thrift::history::UInt16> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> patch() const&& ; template <typename..., typename T = ::dwarfs::thrift::history::UInt16> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> patch() & ; template <typename..., typename T = ::dwarfs::thrift::history::UInt16> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> patch() && ; template <typename..., typename T = bool> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> is_release_ref() const& ; template <typename..., typename T = bool> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> is_release_ref() const&& ; template <typename..., typename T = bool> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> is_release_ref() & ; template <typename..., typename T = bool> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> is_release_ref() && ; template <typename..., typename T = bool> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> is_release() const& ; template <typename..., typename T = bool> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> is_release() const&& ; template <typename..., typename T = bool> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> is_release() & ; template <typename..., typename T = bool> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> is_release() && ; template <typename..., typename T = ::std::string> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<const T&> git_rev_ref() const& ; template <typename..., typename T = ::std::string> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<const T&&> git_rev_ref() const&& ; template <typename..., typename T = ::std::string> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<T&> git_rev_ref() & ; template <typename..., typename T = ::std::string> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<T&&> git_rev_ref() && ; template <typename..., typename T = ::std::string> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<const T&> git_rev() const& ; template <typename..., typename T = ::std::string> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<const T&&> git_rev() const&& ; template <typename..., typename T = ::std::string> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<T&> git_rev() & ; template <typename..., typename T = ::std::string> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<T&&> git_rev() && ; template <typename..., typename T = ::std::string> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<const T&> git_branch_ref() const& ; template <typename..., typename T = ::std::string> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<const T&&> git_branch_ref() const&& ; template <typename..., typename T = ::std::string> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<T&> git_branch_ref() & ; template <typename..., typename T = ::std::string> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<T&&> git_branch_ref() && ; template <typename..., typename T = ::std::string> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<const T&> git_branch() const& ; template <typename..., typename T = ::std::string> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<const T&&> git_branch() const&& ; template <typename..., typename T = ::std::string> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<T&> git_branch() & ; template <typename..., typename T = ::std::string> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<T&&> git_branch() && ; template <typename..., typename T = ::std::string> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<const T&> git_desc_ref() const& ; template <typename..., typename T = ::std::string> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<const T&&> git_desc_ref() const&& ; template <typename..., typename T = ::std::string> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<T&> git_desc_ref() & ; template <typename..., typename T = ::std::string> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<T&&> git_desc_ref() && ; template <typename..., typename T = ::std::string> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<const T&> git_desc() const& ; template <typename..., typename T = ::std::string> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<const T&&> git_desc() const&& ; template <typename..., typename T = ::std::string> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<T&> git_desc() & ; template <typename..., typename T = ::std::string> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<T&&> git_desc() && ; ::dwarfs::thrift::history::UInt16 get_major() const ; [[deprecated("Use `FOO.major_ref() = BAR;` instead of `FOO.set_major(BAR);`")]] ::dwarfs::thrift::history::UInt16& set_major(::dwarfs::thrift::history::UInt16 major_) ; ::dwarfs::thrift::history::UInt16 get_minor() const ; [[deprecated("Use `FOO.minor_ref() = BAR;` instead of `FOO.set_minor(BAR);`")]] ::dwarfs::thrift::history::UInt16& set_minor(::dwarfs::thrift::history::UInt16 minor_) ; ::dwarfs::thrift::history::UInt16 get_patch() const ; [[deprecated("Use `FOO.patch_ref() = BAR;` instead of `FOO.set_patch(BAR);`")]] ::dwarfs::thrift::history::UInt16& set_patch(::dwarfs::thrift::history::UInt16 patch_) ; bool get_is_release() const ; [[deprecated("Use `FOO.is_release_ref() = BAR;` instead of `FOO.set_is_release(BAR);`")]] bool& set_is_release(bool is_release_) ; const ::std::string* get_git_rev() const& ; ::std::string* get_git_rev() & ; ::std::string* get_git_rev() && = delete; template <typename T_dwarfs_version_git_rev_struct_setter = ::std::string> [[deprecated("Use `FOO.git_rev_ref() = BAR;` instead of `FOO.set_git_rev(BAR);`")]] ::std::string& set_git_rev(T_dwarfs_version_git_rev_struct_setter&& git_rev_) ; const ::std::string* get_git_branch() const& ; ::std::string* get_git_branch() & ; ::std::string* get_git_branch() && = delete; template <typename T_dwarfs_version_git_branch_struct_setter = ::std::string> [[deprecated("Use `FOO.git_branch_ref() = BAR;` instead of `FOO.set_git_branch(BAR);`")]] ::std::string& set_git_branch(T_dwarfs_version_git_branch_struct_setter&& git_branch_) ; const ::std::string* get_git_desc() const& ; ::std::string* get_git_desc() & ; ::std::string* get_git_desc() && = delete; template <typename T_dwarfs_version_git_desc_struct_setter = ::std::string> [[deprecated("Use `FOO.git_desc_ref() = BAR;` instead of `FOO.set_git_desc(BAR);`")]] ::std::string& set_git_desc(T_dwarfs_version_git_desc_struct_setter&& git_desc_) ; template <class Protocol_> unsigned long read(Protocol_* iprot); template <class Protocol_> uint32_t serializedSize(Protocol_ const* prot_) const; template <class Protocol_> uint32_t serializedSizeZC(Protocol_ const* prot_) const; template <class Protocol_> uint32_t write(Protocol_* prot_) const; private: template <class Protocol_> void readNoXfer(Protocol_* iprot); friend class ::apache::thrift::Cpp2Ops<dwarfs_version>; friend void swap(dwarfs_version& a, dwarfs_version& b); }; class history_entry final { private: friend struct ::apache::thrift::detail::st::struct_private_access; template<class> friend struct ::apache::thrift::detail::invoke_reffer; static constexpr bool __fbthrift_cpp2_gen_json = false; static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false; static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord); static std::string_view __fbthrift_get_class_name(); using __fbthrift_reflection_ident_list = folly::tag_t< ::apache::thrift::ident::version, ::apache::thrift::ident::system_id, ::apache::thrift::ident::compiler_id, ::apache::thrift::ident::arguments, ::apache::thrift::ident::timestamp, ::apache::thrift::ident::library_versions >; static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,1,2,3,4,5,6}; using __fbthrift_reflection_type_tags = folly::tag_t< ::apache::thrift::type::struct_t<::dwarfs::thrift::history::dwarfs_version>, ::apache::thrift::type::string_t, ::apache::thrift::type::string_t, ::apache::thrift::type::list<::apache::thrift::type::string_t>, ::apache::thrift::type::cpp_type<uint64_t, ::apache::thrift::type::i64_t>, ::apache::thrift::type::set<::apache::thrift::type::string_t> >; static constexpr std::size_t __fbthrift_field_size_v = 6; template<class T> using __fbthrift_id = ::apache::thrift::type::field_id<__fbthrift_reflection_field_id_list[folly::to_underlying(T::value)]>; template<class T> using __fbthrift_type_tag = ::apache::thrift::detail::at<__fbthrift_reflection_type_tags, T::value>; template<class T> using __fbthrift_ident = ::apache::thrift::detail::at<__fbthrift_reflection_ident_list, T::value>; template<class T> using __fbthrift_ordinal = ::apache::thrift::type::ordinal_tag< ::apache::thrift::detail::getFieldOrdinal<T, __fbthrift_reflection_ident_list, __fbthrift_reflection_type_tags>( __fbthrift_reflection_field_id_list ) >; void __fbthrift_clear(); void __fbthrift_clear_terse_fields(); bool __fbthrift_is_empty() const; public: using __fbthrift_cpp2_type = history_entry; static constexpr bool __fbthrift_cpp2_is_union = false; public: history_entry(); [[deprecated("This constructor is deprecated")]] history_entry(apache::thrift::FragileConstructor, ::dwarfs::thrift::history::dwarfs_version version__arg, ::std::string system_id__arg, ::std::string compiler_id__arg, ::std::vector<::std::string> arguments__arg, ::dwarfs::thrift::history::UInt64 timestamp__arg, ::std::set<::std::string> library_versions__arg); history_entry(history_entry&&) noexcept; history_entry(const history_entry& src); history_entry& operator=(history_entry&&) noexcept; history_entry& operator=(const history_entry& src); ~history_entry(); private: ::dwarfs::thrift::history::dwarfs_version __fbthrift_field_version; private: ::std::string __fbthrift_field_system_id; private: ::std::string __fbthrift_field_compiler_id; private: ::std::vector<::std::string> __fbthrift_field_arguments; private: ::dwarfs::thrift::history::UInt64 __fbthrift_field_timestamp; private: ::std::set<::std::string> __fbthrift_field_library_versions; private: apache::thrift::detail::isset_bitset<6, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset; public: bool operator==(const history_entry&) const; bool operator<(const history_entry&) const; template <typename..., typename T = ::dwarfs::thrift::history::dwarfs_version> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> version_ref() const& ; template <typename..., typename T = ::dwarfs::thrift::history::dwarfs_version> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> version_ref() const&& ; template <typename..., typename T = ::dwarfs::thrift::history::dwarfs_version> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> version_ref() & ; template <typename..., typename T = ::dwarfs::thrift::history::dwarfs_version> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> version_ref() && ; template <typename..., typename T = ::dwarfs::thrift::history::dwarfs_version> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> version() const& ; template <typename..., typename T = ::dwarfs::thrift::history::dwarfs_version> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> version() const&& ; template <typename..., typename T = ::dwarfs::thrift::history::dwarfs_version> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> version() & ; template <typename..., typename T = ::dwarfs::thrift::history::dwarfs_version> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> version() && ; template <typename..., typename T = ::std::string> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> system_id_ref() const& ; template <typename..., typename T = ::std::string> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> system_id_ref() const&& ; template <typename..., typename T = ::std::string> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> system_id_ref() & ; template <typename..., typename T = ::std::string> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> system_id_ref() && ; template <typename..., typename T = ::std::string> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> system_id() const& ; template <typename..., typename T = ::std::string> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> system_id() const&& ; template <typename..., typename T = ::std::string> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> system_id() & ; template <typename..., typename T = ::std::string> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> system_id() && ; template <typename..., typename T = ::std::string> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> compiler_id_ref() const& ; template <typename..., typename T = ::std::string> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> compiler_id_ref() const&& ; template <typename..., typename T = ::std::string> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> compiler_id_ref() & ; template <typename..., typename T = ::std::string> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> compiler_id_ref() && ; template <typename..., typename T = ::std::string> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> compiler_id() const& ; template <typename..., typename T = ::std::string> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> compiler_id() const&& ; template <typename..., typename T = ::std::string> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> compiler_id() & ; template <typename..., typename T = ::std::string> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> compiler_id() && ; template <typename..., typename T = ::std::vector<::std::string>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<const T&> arguments_ref() const& ; template <typename..., typename T = ::std::vector<::std::string>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<const T&&> arguments_ref() const&& ; template <typename..., typename T = ::std::vector<::std::string>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<T&> arguments_ref() & ; template <typename..., typename T = ::std::vector<::std::string>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<T&&> arguments_ref() && ; template <typename..., typename T = ::std::vector<::std::string>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<const T&> arguments() const& ; template <typename..., typename T = ::std::vector<::std::string>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<const T&&> arguments() const&& ; template <typename..., typename T = ::std::vector<::std::string>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<T&> arguments() & ; template <typename..., typename T = ::std::vector<::std::string>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<T&&> arguments() && ; template <typename..., typename T = ::dwarfs::thrift::history::UInt64> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<const T&> timestamp_ref() const& ; template <typename..., typename T = ::dwarfs::thrift::history::UInt64> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<const T&&> timestamp_ref() const&& ; template <typename..., typename T = ::dwarfs::thrift::history::UInt64> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<T&> timestamp_ref() & ; template <typename..., typename T = ::dwarfs::thrift::history::UInt64> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<T&&> timestamp_ref() && ; template <typename..., typename T = ::dwarfs::thrift::history::UInt64> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<const T&> timestamp() const& ; template <typename..., typename T = ::dwarfs::thrift::history::UInt64> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<const T&&> timestamp() const&& ; template <typename..., typename T = ::dwarfs::thrift::history::UInt64> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<T&> timestamp() & ; template <typename..., typename T = ::dwarfs::thrift::history::UInt64> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<T&&> timestamp() && ; template <typename..., typename T = ::std::set<::std::string>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<const T&> library_versions_ref() const& ; template <typename..., typename T = ::std::set<::std::string>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<const T&&> library_versions_ref() const&& ; template <typename..., typename T = ::std::set<::std::string>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<T&> library_versions_ref() & ; template <typename..., typename T = ::std::set<::std::string>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<T&&> library_versions_ref() && ; template <typename..., typename T = ::std::set<::std::string>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<const T&> library_versions() const& ; template <typename..., typename T = ::std::set<::std::string>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<const T&&> library_versions() const&& ; template <typename..., typename T = ::std::set<::std::string>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<T&> library_versions() & ; template <typename..., typename T = ::std::set<::std::string>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::optional_field_ref<T&&> library_versions() && ; const ::dwarfs::thrift::history::dwarfs_version& get_version() const&; ::dwarfs::thrift::history::dwarfs_version get_version() &&; template <typename T_history_entry_version_struct_setter = ::dwarfs::thrift::history::dwarfs_version> [[deprecated("Use `FOO.version_ref() = BAR;` instead of `FOO.set_version(BAR);`")]] ::dwarfs::thrift::history::dwarfs_version& set_version(T_history_entry_version_struct_setter&& version_) ; const ::std::string& get_system_id() const& ; ::std::string get_system_id() && ; template <typename T_history_entry_system_id_struct_setter = ::std::string> [[deprecated("Use `FOO.system_id_ref() = BAR;` instead of `FOO.set_system_id(BAR);`")]] ::std::string& set_system_id(T_history_entry_system_id_struct_setter&& system_id_) ; const ::std::string& get_compiler_id() const& ; ::std::string get_compiler_id() && ; template <typename T_history_entry_compiler_id_struct_setter = ::std::string> [[deprecated("Use `FOO.compiler_id_ref() = BAR;` instead of `FOO.set_compiler_id(BAR);`")]] ::std::string& set_compiler_id(T_history_entry_compiler_id_struct_setter&& compiler_id_) ; const ::std::vector<::std::string>* get_arguments() const&; ::std::vector<::std::string>* get_arguments() &; ::std::vector<::std::string>* get_arguments() && = delete; template <typename T_history_entry_arguments_struct_setter = ::std::vector<::std::string>> [[deprecated("Use `FOO.arguments_ref() = BAR;` instead of `FOO.set_arguments(BAR);`")]] ::std::vector<::std::string>& set_arguments(T_history_entry_arguments_struct_setter&& arguments_) ; const ::dwarfs::thrift::history::UInt64* get_timestamp() const& ; ::dwarfs::thrift::history::UInt64* get_timestamp() & ; ::dwarfs::thrift::history::UInt64* get_timestamp() && = delete; [[deprecated("Use `FOO.timestamp_ref() = BAR;` instead of `FOO.set_timestamp(BAR);`")]] ::dwarfs::thrift::history::UInt64& set_timestamp(::dwarfs::thrift::history::UInt64 timestamp_) ; const ::std::set<::std::string>* get_library_versions() const&; ::std::set<::std::string>* get_library_versions() &; ::std::set<::std::string>* get_library_versions() && = delete; template <typename T_history_entry_library_versions_struct_setter = ::std::set<::std::string>> [[deprecated("Use `FOO.library_versions_ref() = BAR;` instead of `FOO.set_library_versions(BAR);`")]] ::std::set<::std::string>& set_library_versions(T_history_entry_library_versions_struct_setter&& library_versions_) ; template <class Protocol_> unsigned long read(Protocol_* iprot); template <class Protocol_> uint32_t serializedSize(Protocol_ const* prot_) const; template <class Protocol_> uint32_t serializedSizeZC(Protocol_ const* prot_) const; template <class Protocol_> uint32_t write(Protocol_* prot_) const; private: template <class Protocol_> void readNoXfer(Protocol_* iprot); friend class ::apache::thrift::Cpp2Ops<history_entry>; friend void swap(history_entry& a, history_entry& b); }; class history final { private: friend struct ::apache::thrift::detail::st::struct_private_access; template<class> friend struct ::apache::thrift::detail::invoke_reffer; static constexpr bool __fbthrift_cpp2_gen_json = false; static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false; static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord); static std::string_view __fbthrift_get_class_name(); using __fbthrift_reflection_ident_list = folly::tag_t< ::apache::thrift::ident::entries >; static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,1}; using __fbthrift_reflection_type_tags = folly::tag_t< ::apache::thrift::type::list<::apache::thrift::type::struct_t<::dwarfs::thrift::history::history_entry>> >; static constexpr std::size_t __fbthrift_field_size_v = 1; template<class T> using __fbthrift_id = ::apache::thrift::type::field_id<__fbthrift_reflection_field_id_list[folly::to_underlying(T::value)]>; template<class T> using __fbthrift_type_tag = ::apache::thrift::detail::at<__fbthrift_reflection_type_tags, T::value>; template<class T> using __fbthrift_ident = ::apache::thrift::detail::at<__fbthrift_reflection_ident_list, T::value>; template<class T> using __fbthrift_ordinal = ::apache::thrift::type::ordinal_tag< ::apache::thrift::detail::getFieldOrdinal<T, __fbthrift_reflection_ident_list, __fbthrift_reflection_type_tags>( __fbthrift_reflection_field_id_list ) >; void __fbthrift_clear(); void __fbthrift_clear_terse_fields(); bool __fbthrift_is_empty() const; public: using __fbthrift_cpp2_type = history; static constexpr bool __fbthrift_cpp2_is_union = false; public: history(); [[deprecated("This constructor is deprecated")]] history(apache::thrift::FragileConstructor, ::std::vector<::dwarfs::thrift::history::history_entry> entries__arg); history(history&&) noexcept; history(const history& src); history& operator=(history&&) noexcept; history& operator=(const history& src); ~history(); private: ::std::vector<::dwarfs::thrift::history::history_entry> __fbthrift_field_entries; private: apache::thrift::detail::isset_bitset<1, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset; public: bool operator==(const history&) const; bool operator<(const history&) const; template <typename..., typename T = ::std::vector<::dwarfs::thrift::history::history_entry>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> entries_ref() const& ; template <typename..., typename T = ::std::vector<::dwarfs::thrift::history::history_entry>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> entries_ref() const&& ; template <typename..., typename T = ::std::vector<::dwarfs::thrift::history::history_entry>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> entries_ref() & ; template <typename..., typename T = ::std::vector<::dwarfs::thrift::history::history_entry>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> entries_ref() && ; template <typename..., typename T = ::std::vector<::dwarfs::thrift::history::history_entry>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> entries() const& ; template <typename..., typename T = ::std::vector<::dwarfs::thrift::history::history_entry>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> entries() const&& ; template <typename..., typename T = ::std::vector<::dwarfs::thrift::history::history_entry>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> entries() & ; template <typename..., typename T = ::std::vector<::dwarfs::thrift::history::history_entry>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> entries() && ; const ::std::vector<::dwarfs::thrift::history::history_entry>& get_entries() const&; ::std::vector<::dwarfs::thrift::history::history_entry> get_entries() &&; template <typename T_history_entries_struct_setter = ::std::vector<::dwarfs::thrift::history::history_entry>> [[deprecated("Use `FOO.entries_ref() = BAR;` instead of `FOO.set_entries(BAR);`")]] ::std::vector<::dwarfs::thrift::history::history_entry>& set_entries(T_history_entries_struct_setter&& entries_) ; template <class Protocol_> unsigned long read(Protocol_* iprot); template <class Protocol_> uint32_t serializedSize(Protocol_ const* prot_) const; template <class Protocol_> uint32_t serializedSizeZC(Protocol_ const* prot_) const; template <class Protocol_> uint32_t write(Protocol_* prot_) const; private: template <class Protocol_> void readNoXfer(Protocol_* iprot); friend class ::apache::thrift::Cpp2Ops<history>; friend void swap(history& a, history& b); }; } namespace dwarfs { class history { public: explicit history(history_config const& cfg = {}); void parse(std::span<uint8_t const> data); void parse_append(std::span<uint8_t const> data); thrift::history::history const& get() const ; void append(std::optional<std::vector<std::string>> args); std::vector<uint8_t> serialize() const; void dump(std::ostream& os) const; folly::dynamic as_dynamic() const; private: thrift::history::history history_; history_config const cfg_; }; } namespace dwarfs { class nilsimsa { public: using hash_type = std::array<uint64_t, 4>; nilsimsa(); ~nilsimsa(); void update(uint8_t const* data, size_t size); void finalize(hash_type& hash) const; void operator()(std::span<uint8_t const> data) ; private: class impl; std::unique_ptr<impl> impl_; }; } namespace mpl_ { namespace aux {} } namespace boost { namespace mpl { using namespace mpl_; namespace aux { using namespace mpl_::aux; } }} namespace mpl_ { template< bool C_ > struct bool_; typedef bool_<true> true_; typedef bool_<false> false_; } namespace boost { namespace mpl { using ::mpl_::bool_; } } namespace boost { namespace mpl { using ::mpl_::true_; } } namespace boost { namespace mpl { using ::mpl_::false_; } } namespace mpl_ { struct integral_c_tag { static const int value = 0; }; } namespace boost { namespace mpl { using ::mpl_::integral_c_tag; } } namespace mpl_ { template< bool C_ > struct bool_ { static const bool value = C_; typedef integral_c_tag tag; typedef bool_ type; typedef bool value_type; constexpr operator bool() const ; }; template< bool C_ > bool const bool_<C_>::value; } namespace boost { namespace mpl { namespace aux { template< typename T > struct nested_type_wknd : T::type { }; }}} namespace mpl_ { struct void_; } namespace boost { namespace mpl { using ::mpl_::void_; } } namespace mpl_ { struct na { typedef na type; enum { value = 0 }; }; } namespace boost { namespace mpl { using ::mpl_::na; } } namespace boost { namespace mpl { template< typename T > struct is_na : false_ { }; template<> struct is_na<na> : true_ { }; template< typename T > struct is_not_na : true_ { }; template<> struct is_not_na<na> : false_ { }; template< typename T, typename U > struct if_na { typedef T type; }; template< typename U > struct if_na<na,U> { typedef U type; }; }} namespace mpl_ { template< int N > struct int_; } namespace boost { namespace mpl { using ::mpl_::int_; } } namespace mpl_ { template< int N > struct int_ { static const int value = N; typedef int_ type; typedef int value_type; typedef integral_c_tag tag; typedef mpl_::int_< static_cast<int>((value + 1)) > next; typedef mpl_::int_< static_cast<int>((value - 1)) > prior; constexpr operator int() const ; }; template< int N > int const mpl_::int_< N >::value; } namespace boost { namespace mpl { namespace aux { template< typename F > struct template_arity; }}} namespace boost { namespace mpl { template< typename T = na , typename Tag = void_ , typename Arity = int_< aux::template_arity<T>::value > > struct lambda; }} namespace boost { namespace mpl { namespace aux { template< bool C_, typename T1, typename T2, typename T3, typename T4 > struct or_impl : true_ { }; template< typename T1, typename T2, typename T3, typename T4 > struct or_impl< false,T1,T2,T3,T4 > : or_impl< ::boost::mpl::aux::nested_type_wknd<T1>::value , T2, T3, T4 , false_ > { }; template<> struct or_impl< false , false_, false_, false_, false_ > : false_ { }; } template< typename T1 = na , typename T2 = na , typename T3 = false_, typename T4 = false_, typename T5 = false_ > struct or_ : aux::or_impl< ::boost::mpl::aux::nested_type_wknd<T1>::value , T2, T3, T4, T5 > { }; template<> struct or_< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : or_< T1 , T2 > { }; }; template< typename Tag > struct lambda< or_< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef or_< na , na > result_; typedef or_< na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct template_arity< or_< T1 , T2 , T3 , T4 , T5 > > : int_<5> { }; template<> struct template_arity< or_< na , na > > : int_<-1> { }; } }} namespace mpl_{ template <bool B> struct bool_; template <class I, I val> struct integral_c; struct integral_c_tag; } namespace boost { namespace mpl { using ::mpl_::bool_; using ::mpl_::integral_c; using ::mpl_::integral_c_tag; } } namespace boost{ template <class T, T val> struct integral_constant { typedef mpl::integral_c_tag tag; typedef T value_type; typedef integral_constant<T, val> type; static const T value = val; operator const mpl::integral_c<T, val>& ()const ; constexpr operator T()const ; }; template <class T, T val> T const integral_constant<T, val>::value; template <bool val> struct integral_constant<bool, val> { typedef mpl::integral_c_tag tag; typedef bool value_type; typedef integral_constant<bool, val> type; static const bool value = val; operator const mpl::bool_<val>& ()const ; constexpr operator bool()const ; }; template <bool val> bool const integral_constant<bool, val>::value; typedef integral_constant<bool, true> true_type; typedef integral_constant<bool, false> false_type; } namespace boost { template <class T> struct is_void : public false_type {}; template<> struct is_void<void> : public true_type {}; template<> struct is_void<const void> : public true_type{}; template<> struct is_void<const volatile void> : public true_type{}; template<> struct is_void<volatile void> : public true_type{}; } namespace boost { template <class T> struct is_lvalue_reference : public false_type{}; template <class T> struct is_lvalue_reference<T&> : public true_type{}; } namespace boost { template <class T> struct is_rvalue_reference : public false_type {}; template <class T> struct is_rvalue_reference<T&&> : public true_type {}; } namespace boost { template <class T> struct is_reference : public integral_constant< bool, ::boost::is_lvalue_reference<T>::value || ::boost::is_rvalue_reference<T>::value> {}; } namespace boost { namespace type_traits_detail { template <typename T, bool b> struct add_rvalue_reference_helper { typedef T type; }; template <typename T> struct add_rvalue_reference_helper<T, true> { typedef T&& type; }; template <typename T> struct add_rvalue_reference_imp { typedef typename boost::type_traits_detail::add_rvalue_reference_helper <T, (is_void<T>::value == false && is_reference<T>::value == false) >::type type; }; } template <class T> struct add_rvalue_reference { typedef typename boost::type_traits_detail::add_rvalue_reference_imp<T>::type type; }; template <class T> using add_rvalue_reference_t = typename add_rvalue_reference<T>::type; } namespace boost { template <typename T> typename add_rvalue_reference<T>::type declval() noexcept; } namespace boost { namespace detail{ template <class T> struct remove_rvalue_ref { typedef T type; }; template <class T> struct remove_rvalue_ref<T&&> { typedef T type; }; } template <class T> struct remove_reference{ typedef typename boost::detail::remove_rvalue_ref<T>::type type; }; template <class T> struct remove_reference<T&>{ typedef T type; }; template <class T> using remove_reference_t = typename remove_reference<T>::type; } namespace boost { template <class T> struct is_function : public false_type {}; template <class Ret, class...Args , bool NE> struct is_function<Ret (Args...)noexcept(NE)> : public true_type {}; template <class Ret, class ...Args , bool NE> struct is_function<Ret(Args..., ...)noexcept(NE)> : public true_type {}; template <class Ret, class...Args , bool NE> struct is_function<Ret (Args...)const noexcept(NE)> : public true_type {}; template <class Ret, class ...Args , bool NE> struct is_function<Ret(Args..., ...)const noexcept(NE)> : public true_type {}; template <class Ret, class...Args , bool NE> struct is_function<Ret (Args...)volatile noexcept(NE)> : public true_type {}; template <class Ret, class ...Args , bool NE> struct is_function<Ret(Args..., ...)volatile noexcept(NE)> : public true_type {}; template <class Ret, class...Args , bool NE> struct is_function<Ret (Args...)const volatile noexcept(NE)> : public true_type {}; template <class Ret, class ...Args , bool NE> struct is_function<Ret(Args..., ...)const volatile noexcept(NE)> : public true_type {}; template <class Ret, class...Args , bool NE> struct is_function<Ret (Args...)& noexcept(NE)> : public true_type {}; template <class Ret, class ...Args , bool NE> struct is_function<Ret(Args..., ...)& noexcept(NE)> : public true_type {}; template <class Ret, class...Args , bool NE> struct is_function<Ret (Args...)const & noexcept(NE)> : public true_type {}; template <class Ret, class ...Args , bool NE> struct is_function<Ret(Args..., ...)const & noexcept(NE)> : public true_type {}; template <class Ret, class...Args , bool NE> struct is_function<Ret (Args...)volatile & noexcept(NE)> : public true_type {}; template <class Ret, class ...Args , bool NE> struct is_function<Ret(Args..., ...)volatile & noexcept(NE)> : public true_type {}; template <class Ret, class...Args , bool NE> struct is_function<Ret (Args...)const volatile & noexcept(NE)> : public true_type {}; template <class Ret, class ...Args , bool NE> struct is_function<Ret(Args..., ...)const volatile & noexcept(NE)> : public true_type {}; template <class Ret, class...Args , bool NE> struct is_function<Ret (Args...)&& noexcept(NE)> : public true_type {}; template <class Ret, class ...Args , bool NE> struct is_function<Ret(Args..., ...)&& noexcept(NE)> : public true_type {}; template <class Ret, class...Args , bool NE> struct is_function<Ret (Args...)const && noexcept(NE)> : public true_type {}; template <class Ret, class ...Args , bool NE> struct is_function<Ret(Args..., ...)const && noexcept(NE)> : public true_type {}; template <class Ret, class...Args , bool NE> struct is_function<Ret (Args...)volatile && noexcept(NE)> : public true_type {}; template <class Ret, class ...Args , bool NE> struct is_function<Ret(Args..., ...)volatile && noexcept(NE)> : public true_type {}; template <class Ret, class...Args , bool NE> struct is_function<Ret (Args...)const volatile && noexcept(NE)> : public true_type {}; template <class Ret, class ...Args , bool NE> struct is_function<Ret(Args..., ...)const volatile && noexcept(NE)> : public true_type {}; } namespace boost { namespace type_traits { typedef char yes_type; struct no_type { char padding[8]; }; } } namespace boost { namespace detail{ template <std::size_t N> struct ok_tag { double d; char c[N]; }; template <class T> ok_tag<sizeof(T)> check_is_complete(int); template <class T> char check_is_complete(...); } template <class T> struct is_complete : public integral_constant<bool, ::boost::is_function<typename boost::remove_reference<T>::type>::value || (sizeof(boost::detail::check_is_complete<T>(0)) != sizeof(char))> {}; } namespace boost { template <class T> struct is_array : public false_type {}; template <class T, std::size_t N> struct is_array<T[N]> : public true_type {}; template <class T, std::size_t N> struct is_array<T const[N]> : public true_type{}; template <class T, std::size_t N> struct is_array<T volatile[N]> : public true_type{}; template <class T, std::size_t N> struct is_array<T const volatile[N]> : public true_type{}; template <class T> struct is_array<T[]> : public true_type{}; template <class T> struct is_array<T const[]> : public true_type{}; template <class T> struct is_array<T const volatile[]> : public true_type{}; template <class T> struct is_array<T volatile[]> : public true_type{}; } namespace boost { template <class From, class To> struct is_convertible : public integral_constant<bool, __is_convertible_to(From,To)> { static_assert(boost::is_complete<To>::value || boost::is_void<To>::value || boost::is_array<To>::value, "Destination argument type to is_convertible must be a complete type"); static_assert(boost::is_complete<From>::value || boost::is_void<From>::value || boost::is_array<From>::value, "From argument type to is_convertible must be a complete type"); }; } namespace boost { namespace iterators { template <typename A, typename B> struct is_interoperable : mpl::or_< is_convertible< A, B > , is_convertible< B, A > > { }; } using iterators::is_interoperable; } namespace boost { namespace iterators { template <class Iterator> struct iterator_value { typedef typename std::iterator_traits<Iterator>::value_type type; }; template <class Iterator> struct iterator_reference { typedef typename std::iterator_traits<Iterator>::reference type; }; template <class Iterator> struct iterator_pointer { typedef typename std::iterator_traits<Iterator>::pointer type; }; template <class Iterator> struct iterator_difference { typedef typename std::iterator_traits<Iterator>::difference_type type; }; template <class Iterator> struct iterator_category { typedef typename std::iterator_traits<Iterator>::iterator_category type; }; } using iterators::iterator_value; using iterators::iterator_reference; using iterators::iterator_pointer; using iterators::iterator_difference; using iterators::iterator_category; } namespace boost { namespace mpl { namespace aux { template< typename T > struct value_type_wknd { typedef typename T::value_type type; }; }}} namespace boost { namespace mpl { template< bool C , typename T1 , typename T2 > struct if_c { typedef T1 type; }; template< typename T1 , typename T2 > struct if_c<false,T1,T2> { typedef T2 type; }; template< typename T1 = na , typename T2 = na , typename T3 = na > struct if_ { private: typedef if_c< static_cast<bool>(T1::value) , T2 , T3 > almost_type_; public: typedef typename almost_type_::type type; }; template<> struct if_< na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 =na , typename T5 =na > struct apply : if_< T1 , T2 , T3 > { }; }; template< typename Tag > struct lambda< if_< na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef if_< na , na , na > result_; typedef if_< na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< if_< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< if_< na , na , na > > : int_<-1> { }; } }} namespace boost { namespace mpl { template< typename C = na , typename F1 = na , typename F2 = na > struct eval_if { typedef typename if_<C,F1,F2>::type f_; typedef typename f_::type type; }; template< bool C , typename F1 , typename F2 > struct eval_if_c { typedef typename if_c<C,F1,F2>::type f_; typedef typename f_::type type; }; template<> struct eval_if< na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 =na , typename T5 =na > struct apply : eval_if< T1 , T2 , T3 > { }; }; template< typename Tag > struct lambda< eval_if< na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef eval_if< na , na , na > result_; typedef eval_if< na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< eval_if< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< eval_if< na , na , na > > : int_<-1> { }; } }} namespace boost { namespace mpl { template< typename T = na > struct identity { typedef T type; }; template< typename T = na > struct make_identity { typedef identity<T> type; }; template<> struct identity< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : identity< T1 > { }; }; template< typename Tag > struct lambda< identity< na > , Tag , int_<-1> > { typedef false_ is_le; typedef identity< na > result_; typedef identity< na > type; }; namespace aux { template< typename T1 > struct template_arity< identity< T1 > > : int_<1> { }; template<> struct template_arity< identity< na > > : int_<-1> { }; } template<> struct make_identity< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : make_identity< T1 > { }; }; template< typename Tag > struct lambda< make_identity< na > , Tag , int_<-1> > { typedef false_ is_le; typedef make_identity< na > result_; typedef make_identity< na > type; }; namespace aux { template< typename T1 > struct template_arity< make_identity< T1 > > : int_<1> { }; template<> struct template_arity< make_identity< na > > : int_<-1> { }; } }} namespace mpl_ { template< int N > struct arg; } namespace boost { namespace mpl { using ::mpl_::arg; } } namespace boost { namespace mpl { namespace aux { template< long C_ > struct not_impl : bool_<!C_> { }; } template< typename T = na > struct not_ : aux::not_impl< ::boost::mpl::aux::nested_type_wknd<T>::value > { }; template<> struct not_< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : not_< T1 > { }; }; template< typename Tag > struct lambda< not_< na > , Tag , int_<-1> > { typedef false_ is_le; typedef not_< na > result_; typedef not_< na > type; }; namespace aux { template< typename T1 > struct template_arity< not_< T1 > > : int_<1> { }; template<> struct template_arity< not_< na > > : int_<-1> { }; } }} namespace boost { namespace mpl { namespace aux { typedef char (&no_tag)[1]; typedef char (&yes_tag)[2]; template< bool C_ > struct yes_no_tag { typedef no_tag type; }; template<> struct yes_no_tag<true> { typedef yes_tag type; }; template< std::size_t n > struct weighted_tag { typedef char (&type)[n]; }; }}} namespace mpl_ { struct failed {}; template< bool C > struct assert { typedef void* type; }; template<> struct assert<false> { typedef assert type; }; template< bool C > int assertion_failed( typename assert<C>::type ); template< bool C > struct assertion { static int failed( assert<false> ); }; template<> struct assertion<true> { static int failed( void* ); }; struct assert_ { template< typename T1, typename T2 = na, typename T3 = na, typename T4 = na > struct types {}; static assert_ const arg; enum relations { equal = 1, not_equal, greater, greater_equal, less, less_equal }; }; boost::mpl::aux::weighted_tag<1>::type operator==( assert_, assert_ ); boost::mpl::aux::weighted_tag<2>::type operator!=( assert_, assert_ ); boost::mpl::aux::weighted_tag<3>::type operator>( assert_, assert_ ); boost::mpl::aux::weighted_tag<4>::type operator>=( assert_, assert_ ); boost::mpl::aux::weighted_tag<5>::type operator<( assert_, assert_ ); boost::mpl::aux::weighted_tag<6>::type operator<=( assert_, assert_ ); template< assert_::relations r, long x, long y > struct assert_relation {}; template< bool > struct assert_arg_pred_impl { typedef int type; }; template<> struct assert_arg_pred_impl<true> { typedef void* type; }; template< typename P > struct assert_arg_pred { typedef typename P::type p_type; typedef typename assert_arg_pred_impl< p_type::value >::type type; }; template< typename P > struct assert_arg_pred_not { typedef typename P::type p_type; enum { p = !p_type::value }; typedef typename assert_arg_pred_impl<p>::type type; }; template< typename Pred > failed ************ (Pred::************ assert_arg( void (*)(Pred), typename assert_arg_pred<Pred>::type ) ); template< typename Pred > failed ************ (boost::mpl::not_<Pred>::************ assert_not_arg( void (*)(Pred), typename assert_arg_pred_not<Pred>::type ) ); template< typename Pred > assert<false> assert_arg( void (*)(Pred), typename assert_arg_pred_not<Pred>::type ); template< typename Pred > assert<false> assert_not_arg( void (*)(Pred), typename assert_arg_pred<Pred>::type ); } namespace mpl_ { template<> struct arg< -1 > { static const int value = -1; template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; enum { mpl_assertion_in_line_27 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_not_arg( (void (*) (boost::mpl::is_na<type>))nullptr, 1 ) ) ) }; }; }; template<> struct arg<1> { static const int value = 1; typedef arg<2> next; template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; enum { mpl_assertion_in_line_45 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_not_arg( (void (*) (boost::mpl::is_na<type>))nullptr, 1 ) ) ) }; }; }; template<> struct arg<2> { static const int value = 2; typedef arg<3> next; template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U2 type; enum { mpl_assertion_in_line_63 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_not_arg( (void (*) (boost::mpl::is_na<type>))nullptr, 1 ) ) ) }; }; }; template<> struct arg<3> { static const int value = 3; typedef arg<4> next; template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U3 type; enum { mpl_assertion_in_line_81 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_not_arg( (void (*) (boost::mpl::is_na<type>))nullptr, 1 ) ) ) }; }; }; template<> struct arg<4> { static const int value = 4; typedef arg<5> next; template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U4 type; enum { mpl_assertion_in_line_99 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_not_arg( (void (*) (boost::mpl::is_na<type>))nullptr, 1 ) ) ) }; }; }; template<> struct arg<5> { static const int value = 5; typedef arg<6> next; template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U5 type; enum { mpl_assertion_in_line_117 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_not_arg( (void (*) (boost::mpl::is_na<type>))nullptr, 1 ) ) ) }; }; }; } namespace mpl_ { typedef arg< -1 > _; } namespace boost { namespace mpl { using ::mpl_::_; namespace placeholders { using mpl_::_; } }} namespace mpl_ { typedef arg<1> _1; } namespace boost { namespace mpl { using ::mpl_::_1; namespace placeholders { using mpl_::_1; } }} namespace mpl_ { typedef arg<2> _2; } namespace boost { namespace mpl { using ::mpl_::_2; namespace placeholders { using mpl_::_2; } }} namespace mpl_ { typedef arg<3> _3; } namespace boost { namespace mpl { using ::mpl_::_3; namespace placeholders { using mpl_::_3; } }} namespace mpl_ { typedef arg<4> _4; } namespace boost { namespace mpl { using ::mpl_::_4; namespace placeholders { using mpl_::_4; } }} namespace mpl_ { typedef arg<5> _5; } namespace boost { namespace mpl { using ::mpl_::_5; namespace placeholders { using mpl_::_5; } }} namespace mpl_ { typedef arg<6> _6; } namespace boost { namespace mpl { using ::mpl_::_6; namespace placeholders { using mpl_::_6; } }} namespace boost { namespace iterators { struct no_traversal_tag {}; struct incrementable_traversal_tag : no_traversal_tag { }; struct single_pass_traversal_tag : incrementable_traversal_tag { }; struct forward_traversal_tag : single_pass_traversal_tag { }; struct bidirectional_traversal_tag : forward_traversal_tag { }; struct random_access_traversal_tag : bidirectional_traversal_tag { }; namespace detail { template <class Cat> struct old_category_to_traversal : mpl::eval_if< is_convertible<Cat,std::random_access_iterator_tag> , mpl::identity<random_access_traversal_tag> , mpl::eval_if< is_convertible<Cat,std::bidirectional_iterator_tag> , mpl::identity<bidirectional_traversal_tag> , mpl::eval_if< is_convertible<Cat,std::forward_iterator_tag> , mpl::identity<forward_traversal_tag> , mpl::eval_if< is_convertible<Cat,std::input_iterator_tag> , mpl::identity<single_pass_traversal_tag> , mpl::eval_if< is_convertible<Cat,std::output_iterator_tag> , mpl::identity<incrementable_traversal_tag> , void > > > > > {}; } template <class Cat> struct iterator_category_to_traversal : mpl::eval_if< is_convertible<Cat,incrementable_traversal_tag> , mpl::identity<Cat> , boost::iterators::detail::old_category_to_traversal<Cat> > {}; template <class Iterator = mpl::_1> struct iterator_traversal : iterator_category_to_traversal< typename std::iterator_traits<Iterator>::iterator_category > {}; template <class Traversal> struct pure_traversal_tag : mpl::eval_if< is_convertible<Traversal,random_access_traversal_tag> , mpl::identity<random_access_traversal_tag> , mpl::eval_if< is_convertible<Traversal,bidirectional_traversal_tag> , mpl::identity<bidirectional_traversal_tag> , mpl::eval_if< is_convertible<Traversal,forward_traversal_tag> , mpl::identity<forward_traversal_tag> , mpl::eval_if< is_convertible<Traversal,single_pass_traversal_tag> , mpl::identity<single_pass_traversal_tag> , mpl::eval_if< is_convertible<Traversal,incrementable_traversal_tag> , mpl::identity<incrementable_traversal_tag> , void > > > > > { }; template <class Iterator = mpl::_1> struct pure_iterator_traversal : pure_traversal_tag<typename iterator_traversal<Iterator>::type> {}; } using iterators::no_traversal_tag; using iterators::incrementable_traversal_tag; using iterators::single_pass_traversal_tag; using iterators::forward_traversal_tag; using iterators::bidirectional_traversal_tag; using iterators::random_access_traversal_tag; using iterators::iterator_category_to_traversal; using iterators::iterator_traversal; namespace detail { using iterators::pure_traversal_tag; } } namespace boost { struct use_default { }; } namespace boost { namespace mpl { namespace aux { template< bool C_, typename T1, typename T2, typename T3, typename T4 > struct and_impl : false_ { }; template< typename T1, typename T2, typename T3, typename T4 > struct and_impl< true,T1,T2,T3,T4 > : and_impl< ::boost::mpl::aux::nested_type_wknd<T1>::value , T2, T3, T4 , true_ > { }; template<> struct and_impl< true , true_, true_, true_, true_ > : true_ { }; } template< typename T1 = na , typename T2 = na , typename T3 = true_, typename T4 = true_, typename T5 = true_ > struct and_ : aux::and_impl< ::boost::mpl::aux::nested_type_wknd<T1>::value , T2, T3, T4, T5 > { }; template<> struct and_< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : and_< T1 , T2 > { }; }; template< typename Tag > struct lambda< and_< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef and_< na , na > result_; typedef and_< na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct template_arity< and_< T1 , T2 , T3 , T4 , T5 > > : int_<5> { }; template<> struct template_arity< and_< na , na > > : int_<-1> { }; } }} namespace boost { template <class T, class U> struct is_same : public false_type {}; template <class T> struct is_same<T,T> : public true_type {}; } namespace boost { template <class T> struct is_const : public false_type {}; template <class T> struct is_const<T const> : public true_type{}; template <class T, std::size_t N> struct is_const<T const[N]> : public true_type{}; template <class T> struct is_const<T const[]> : public true_type{}; } namespace boost { template <class T> struct is_pointer : public false_type{}; template <class T> struct is_pointer<T*> : public true_type{}; template <class T> struct is_pointer<T*const> : public true_type{}; template <class T> struct is_pointer<T*const volatile> : public true_type{}; template <class T> struct is_pointer<T*volatile> : public true_type{}; } namespace boost { namespace detail { template <typename T> struct is_class_impl { static const bool value = __is_class(T); }; } template <class T> struct is_class : public integral_constant<bool, ::boost::detail::is_class_impl<T>::value> {}; } namespace boost { template <class T> struct is_volatile : public false_type {}; template <class T> struct is_volatile<T volatile> : public true_type{}; template <class T, std::size_t N> struct is_volatile<T volatile[N]> : public true_type{}; template <class T> struct is_volatile<T volatile[]> : public true_type{}; } namespace boost { template <class T> struct is_member_function_pointer : public false_type {}; template <class T> struct is_member_function_pointer<T const> : public is_member_function_pointer<T> {}; template <class T> struct is_member_function_pointer<T volatile> : public is_member_function_pointer<T> {}; template <class T> struct is_member_function_pointer<T const volatile> : public is_member_function_pointer<T> {}; template <class Ret, class C, class...Args , bool NE> struct is_member_function_pointer<Ret ( C::*)(Args...)noexcept(NE)> : public true_type {}; template <class Ret, class C, class ...Args , bool NE> struct is_member_function_pointer<Ret (C::*)(Args..., ...)noexcept(NE)> : public true_type {}; template <class Ret, class C, class...Args , bool NE> struct is_member_function_pointer<Ret ( C::*)(Args...)const noexcept(NE)> : public true_type {}; template <class Ret, class C, class ...Args , bool NE> struct is_member_function_pointer<Ret(C::*)(Args..., ...)const noexcept(NE)> : public true_type {}; template <class Ret, class C, class...Args , bool NE> struct is_member_function_pointer<Ret ( C::*)(Args...)volatile noexcept(NE)> : public true_type {}; template <class Ret, class C, class ...Args , bool NE> struct is_member_function_pointer<Ret(C::*)(Args..., ...)volatile noexcept(NE)> : public true_type {}; template <class Ret, class C, class...Args , bool NE> struct is_member_function_pointer<Ret ( C::*)(Args...)const volatile noexcept(NE)> : public true_type {}; template <class Ret, class C, class ...Args , bool NE> struct is_member_function_pointer<Ret(C::*)(Args..., ...)const volatile noexcept(NE)> : public true_type {}; template <class Ret, class C, class...Args , bool NE> struct is_member_function_pointer<Ret ( C::*)(Args...)& noexcept(NE)> : public true_type {}; template <class Ret, class C, class ...Args , bool NE> struct is_member_function_pointer<Ret(C::*)(Args..., ...)& noexcept(NE)> : public true_type {}; template <class Ret, class C, class...Args , bool NE> struct is_member_function_pointer<Ret ( C::*)(Args...)const & noexcept(NE)> : public true_type {}; template <class Ret, class C, class ...Args , bool NE> struct is_member_function_pointer<Ret(C::*)(Args..., ...)const & noexcept(NE)> : public true_type {}; template <class Ret, class C, class...Args , bool NE> struct is_member_function_pointer<Ret ( C::*)(Args...)volatile & noexcept(NE)> : public true_type {}; template <class Ret, class C, class ...Args , bool NE> struct is_member_function_pointer<Ret(C::*)(Args..., ...)volatile & noexcept(NE)> : public true_type {}; template <class Ret, class C, class...Args , bool NE> struct is_member_function_pointer<Ret ( C::*)(Args...)const volatile & noexcept(NE)> : public true_type {}; template <class Ret, class C, class ...Args , bool NE> struct is_member_function_pointer<Ret(C::*)(Args..., ...)const volatile & noexcept(NE)> : public true_type {}; template <class Ret, class C, class...Args , bool NE> struct is_member_function_pointer<Ret ( C::*)(Args...) && noexcept(NE)> : public true_type {}; template <class Ret, class C, class ...Args , bool NE> struct is_member_function_pointer<Ret(C::*)(Args..., ...) && noexcept(NE)> : public true_type {}; template <class Ret, class C, class...Args , bool NE> struct is_member_function_pointer<Ret ( C::*)(Args...)const && noexcept(NE)> : public true_type {}; template <class Ret, class C, class ...Args , bool NE> struct is_member_function_pointer<Ret(C::*)(Args..., ...)const && noexcept(NE)> : public true_type {}; template <class Ret, class C, class...Args , bool NE> struct is_member_function_pointer<Ret ( C::*)(Args...)volatile && noexcept(NE)> : public true_type {}; template <class Ret, class C, class ...Args , bool NE> struct is_member_function_pointer<Ret(C::*)(Args..., ...)volatile && noexcept(NE)> : public true_type {}; template <class Ret, class C, class...Args , bool NE> struct is_member_function_pointer<Ret ( C::*)(Args...)const volatile && noexcept(NE)> : public true_type {}; template <class Ret, class C, class ...Args , bool NE> struct is_member_function_pointer<Ret(C::*)(Args..., ...)const volatile && noexcept(NE)> : public true_type {}; } namespace boost { template <class T> struct is_member_pointer : public integral_constant<bool, ::boost::is_member_function_pointer<T>::value>{}; template <class T, class U> struct is_member_pointer<U T::* > : public true_type{}; template <class T, class U> struct is_member_pointer<U T::*const> : public true_type{}; template <class T, class U> struct is_member_pointer<U T::*const volatile> : public true_type{}; template <class T, class U> struct is_member_pointer<U T::*volatile> : public true_type{}; } namespace boost { template <class T> struct remove_cv{ typedef T type; }; template <class T> struct remove_cv<T const>{ typedef T type; }; template <class T> struct remove_cv<T volatile>{ typedef T type; }; template <class T> struct remove_cv<T const volatile>{ typedef T type; }; template <class T, std::size_t N> struct remove_cv<T const[N]>{ typedef T type[N]; }; template <class T, std::size_t N> struct remove_cv<T const volatile[N]>{ typedef T type[N]; }; template <class T, std::size_t N> struct remove_cv<T volatile[N]>{ typedef T type[N]; }; template <class T> struct remove_cv<T const[]>{ typedef T type[]; }; template <class T> struct remove_cv<T const volatile[]>{ typedef T type[]; }; template <class T> struct remove_cv<T volatile[]>{ typedef T type[]; }; template <class T> using remove_cv_t = typename remove_cv<T>::type; } namespace boost { template <class T> struct remove_pointer{ typedef T type; }; template <class T> struct remove_pointer<T*>{ typedef T type; }; template <class T> struct remove_pointer<T*const>{ typedef T type; }; template <class T> struct remove_pointer<T*volatile>{ typedef T type; }; template <class T> struct remove_pointer<T*const volatile>{ typedef T type; }; template <class T> using remove_pointer_t = typename remove_pointer<T>::type; } namespace boost { namespace detail { template <bool b> struct if_true { template <class T, class F> struct then { typedef T type; }; }; template <> struct if_true<false> { template <class T, class F> struct then { typedef F type; }; }; }} namespace boost { namespace detail { namespace indirect_traits { template <class T> struct is_reference_to_const : boost::false_type { }; template <class T> struct is_reference_to_const<T const&> : boost::true_type { }; template <class T> struct is_reference_to_function : boost::false_type { }; template <class T> struct is_reference_to_function<T&> : is_function<T> { }; template <class T> struct is_pointer_to_function : boost::false_type { }; template <class T> struct is_pointer_to_function<T*> : is_function<T> { }; template <class T> struct is_reference_to_member_function_pointer_impl : boost::false_type { }; template <class T> struct is_reference_to_member_function_pointer_impl<T&> : is_member_function_pointer<typename remove_cv<T>::type> { }; template <class T> struct is_reference_to_member_function_pointer : is_reference_to_member_function_pointer_impl<T> { }; template <class T> struct is_reference_to_function_pointer_aux : boost::integral_constant<bool, is_reference<T>::value && is_pointer_to_function< typename remove_cv< typename remove_reference<T>::type >::type >::value > { }; template <class T> struct is_reference_to_function_pointer : boost::detail::if_true< is_reference_to_function<T>::value >::template then< boost::false_type , is_reference_to_function_pointer_aux<T> >::type { }; template <class T> struct is_reference_to_non_const : boost::integral_constant<bool, is_reference<T>::value && !is_reference_to_const<T>::value > { }; template <class T> struct is_reference_to_volatile : boost::false_type { }; template <class T> struct is_reference_to_volatile<T volatile&> : boost::true_type { }; template <class T> struct is_reference_to_pointer : boost::false_type { }; template <class T> struct is_reference_to_pointer<T*&> : boost::true_type { }; template <class T> struct is_reference_to_pointer<T* const&> : boost::true_type { }; template <class T> struct is_reference_to_pointer<T* volatile&> : boost::true_type { }; template <class T> struct is_reference_to_pointer<T* const volatile&> : boost::true_type { }; template <class T> struct is_reference_to_class : boost::integral_constant<bool, is_reference<T>::value && is_class< typename remove_cv< typename remove_reference<T>::type >::type >::value > { }; template <class T> struct is_pointer_to_class : boost::integral_constant<bool, is_pointer<T>::value && is_class< typename remove_cv< typename remove_pointer<T>::type >::type >::value > { }; } using namespace indirect_traits; }} namespace boost { namespace iterators { using boost::use_default; namespace detail { struct input_output_iterator_tag : std::input_iterator_tag { operator std::output_iterator_tag() const ; }; template <class ValueParam, class Reference> struct iterator_writability_disabled : mpl::or_< is_const<Reference> , boost::detail::indirect_traits::is_reference_to_const<Reference> , is_const<ValueParam> > {}; template <class Traversal, class ValueParam, class Reference> struct iterator_facade_default_category : mpl::eval_if< mpl::and_< is_reference<Reference> , is_convertible<Traversal,forward_traversal_tag> > , mpl::eval_if< is_convertible<Traversal,random_access_traversal_tag> , mpl::identity<std::random_access_iterator_tag> , mpl::if_< is_convertible<Traversal,bidirectional_traversal_tag> , std::bidirectional_iterator_tag , std::forward_iterator_tag > > , typename mpl::eval_if< mpl::and_< is_convertible<Traversal, single_pass_traversal_tag> , is_convertible<Reference, ValueParam> > , mpl::identity<std::input_iterator_tag> , mpl::identity<Traversal> > > { }; template <class T> struct is_iterator_category : mpl::or_< is_convertible<T,std::input_iterator_tag> , is_convertible<T,std::output_iterator_tag> > { }; template <class T> struct is_iterator_traversal : is_convertible<T,incrementable_traversal_tag> {}; template <class Category, class Traversal> struct iterator_category_with_traversal : Category, Traversal { static_assert(( !is_convertible< typename iterator_category_to_traversal<Category>::type , Traversal >::value), "( !is_convertible< typename iterator_category_to_traversal<Category>::type , Traversal >::value)"); static_assert(is_iterator_category<Category>::value, "is_iterator_category<Category>::value"); static_assert(!is_iterator_category<Traversal>::value, "!is_iterator_category<Traversal>::value"); static_assert(!is_iterator_traversal<Category>::value, "!is_iterator_traversal<Category>::value"); static_assert(is_iterator_traversal<Traversal>::value, "is_iterator_traversal<Traversal>::value"); }; template <class Traversal, class ValueParam, class Reference> struct facade_iterator_category_impl { static_assert(!is_iterator_category<Traversal>::value, "!is_iterator_category<Traversal>::value"); typedef typename iterator_facade_default_category< Traversal,ValueParam,Reference >::type category; typedef typename mpl::if_< is_same< Traversal , typename iterator_category_to_traversal<category>::type > , category , iterator_category_with_traversal<category,Traversal> >::type type; }; template <class CategoryOrTraversal, class ValueParam, class Reference> struct facade_iterator_category : mpl::eval_if< is_iterator_category<CategoryOrTraversal> , mpl::identity<CategoryOrTraversal> , facade_iterator_category_impl<CategoryOrTraversal,ValueParam,Reference> > { }; }}} namespace boost { namespace iterators { template<bool> struct enabled { template<typename T> struct base { typedef T type; }; }; template<> struct enabled<false> { template<typename T> struct base { }; }; template <class Cond, class Return> struct enable_if : enabled<(Cond::value)>::template base<Return> { }; } } namespace boost { template <class T> struct add_const { typedef T const type; }; template <class T> struct add_const<T&> { typedef T& type; }; template <class T> using add_const_t = typename add_const<T>::type; } namespace boost { template <typename T> struct add_pointer { typedef typename remove_reference<T>::type no_ref_type; typedef no_ref_type* type; }; template <class T> using add_pointer_t = typename add_pointer<T>::type; } namespace boost { namespace detail { template <typename T> struct add_reference_impl { typedef T& type; }; template <typename T> struct add_reference_impl<T&&> { typedef T&& type; }; } template <class T> struct add_reference { typedef typename boost::detail::add_reference_impl<T>::type type; }; template <class T> struct add_reference<T&> { typedef T& type; }; template <> struct add_reference<void> { typedef void type; }; template <> struct add_reference<const void> { typedef const void type; }; template <> struct add_reference<const volatile void> { typedef const volatile void type; }; template <> struct add_reference<volatile void> { typedef volatile void type; }; template <class T> using add_reference_t = typename add_reference<T>::type; } namespace boost{ template <class T> struct add_lvalue_reference { typedef typename boost::add_reference<T>::type type; }; template <class T> struct add_lvalue_reference<T&&> { typedef T& type; }; template <class T> using add_lvalue_reference_t = typename add_lvalue_reference<T>::type; } namespace boost { template <class T> struct remove_const{ typedef T type; }; template <class T> struct remove_const<T const>{ typedef T type; }; template <class T, std::size_t N> struct remove_const<T const[N]>{ typedef T type[N]; }; template <class T> struct remove_const<T const[]>{ typedef T type[]; }; template <class T> using remove_const_t = typename remove_const<T>::type; } namespace boost { template <class T> struct is_integral : public false_type {}; template <class T> struct is_integral<const T> : public is_integral<T> {}; template <class T> struct is_integral<volatile const T> : public is_integral<T>{}; template <class T> struct is_integral<volatile T> : public is_integral<T>{}; template<> struct is_integral<unsigned char> : public true_type {}; template<> struct is_integral<unsigned short> : public true_type{}; template<> struct is_integral<unsigned int> : public true_type{}; template<> struct is_integral<unsigned long> : public true_type{}; template<> struct is_integral<signed char> : public true_type{}; template<> struct is_integral<short> : public true_type{}; template<> struct is_integral<int> : public true_type{}; template<> struct is_integral<long> : public true_type{}; template<> struct is_integral<char> : public true_type{}; template<> struct is_integral<bool> : public true_type{}; template<> struct is_integral<wchar_t> : public true_type{}; template<> struct is_integral< ::boost::ulong_long_type> : public true_type{}; template<> struct is_integral< ::boost::long_long_type> : public true_type{}; template<> struct is_integral<boost::int128_type> : public true_type{}; template<> struct is_integral<boost::uint128_type> : public true_type{}; template<> struct is_integral<char16_t> : public true_type{}; template<> struct is_integral<char32_t> : public true_type{}; template<> struct is_integral<char8_t> : public true_type{}; } namespace boost { template <class T> struct is_floating_point : public false_type{}; template <class T> struct is_floating_point<const T> : public is_floating_point<T>{}; template <class T> struct is_floating_point<volatile const T> : public is_floating_point<T>{}; template <class T> struct is_floating_point<volatile T> : public is_floating_point<T>{}; template<> struct is_floating_point<float> : public true_type{}; template<> struct is_floating_point<double> : public true_type{}; template<> struct is_floating_point<long double> : public true_type{}; } namespace boost { template <class T> struct is_arithmetic : public integral_constant<bool, is_integral<T>::value || is_floating_point<T>::value> {}; } namespace boost { template <class T> struct is_enum : public integral_constant<bool, __is_enum(T)> {}; } namespace boost { template <typename T> struct is_scalar : public integral_constant<bool, ::boost::is_arithmetic<T>::value || ::boost::is_enum<T>::value || ::boost::is_pointer<T>::value || ::boost::is_member_pointer<T>::value> {}; } namespace boost { template< typename T > struct is_POD; template <typename T> struct is_pod : public integral_constant<bool, ::boost::is_scalar<T>::value || ::boost::is_void<T>::value || __is_pod(T)> {}; template <typename T, std::size_t sz> struct is_pod<T[sz]> : public is_pod<T>{}; template<> struct is_pod<void> : public true_type{}; template<> struct is_pod<void const> : public true_type{}; template<> struct is_pod<void const volatile> : public true_type{}; template<> struct is_pod<void volatile> : public true_type{}; template<class T> struct is_POD : public is_pod<T>{}; } namespace boost { namespace mpl { template< typename Value > struct always { template< typename T1 = na , typename T2 = na , typename T3 = na , typename T4 = na , typename T5 = na > struct apply { typedef Value type; }; }; }} namespace boost { namespace mpl { template< typename F, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na > struct apply; template< typename F > struct apply0; template< typename F, typename T1 > struct apply1; template< typename F, typename T1, typename T2 > struct apply2; template< typename F, typename T1, typename T2, typename T3 > struct apply3; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5; }} namespace boost { namespace mpl { namespace aux { template< typename T > struct type_wrapper { typedef T type; }; template< typename T > struct wrapped_type; template< typename T > struct wrapped_type< type_wrapper<T> > { typedef T type; }; }}} namespace boost { namespace mpl { namespace aux { template< typename T, typename fallback_ = boost::mpl::bool_<false> > struct has_apply { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper<U> const volatile* , boost::mpl::aux::type_wrapper<typename U::apply>* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper<T> t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast<t_*>(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_<value> type; }; }}} namespace boost { namespace mpl { template< typename F , typename has_apply_ = typename aux::has_apply<F>::type > struct apply_wrap0 : F::template apply< > { }; template< typename F > struct apply_wrap0< F,true_ > : F::apply { }; template< typename F, typename T1 > struct apply_wrap1 : F::template apply<T1> { }; template< typename F, typename T1, typename T2 > struct apply_wrap2 : F::template apply< T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3 > struct apply_wrap3 : F::template apply< T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply_wrap4 : F::template apply< T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply_wrap5 : F::template apply< T1,T2,T3,T4,T5 > { }; }} namespace boost { namespace mpl { template< typename F, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na > struct bind; template< typename F > struct bind0; template< typename F, typename T1 > struct bind1; template< typename F, typename T1, typename T2 > struct bind2; template< typename F, typename T1, typename T2, typename T3 > struct bind3; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5; }} namespace boost { namespace mpl { template< typename T = na > struct next { typedef typename T::next type; }; template< typename T = na > struct prior { typedef typename T::prior type; }; template<> struct next< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : next< T1 > { }; }; template< typename Tag > struct lambda< next< na > , Tag , int_<-1> > { typedef false_ is_le; typedef next< na > result_; typedef next< na > type; }; namespace aux { template< typename T1 > struct template_arity< next< T1 > > : int_<1> { }; template<> struct template_arity< next< na > > : int_<-1> { }; } template<> struct prior< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : prior< T1 > { }; }; template< typename Tag > struct lambda< prior< na > , Tag , int_<-1> > { typedef false_ is_le; typedef prior< na > result_; typedef prior< na > type; }; namespace aux { template< typename T1 > struct template_arity< prior< T1 > > : int_<1> { }; template<> struct template_arity< prior< na > > : int_<-1> { }; } }} namespace boost { namespace mpl { template< typename T = na , int not_le_ = 0 > struct protect : T { typedef protect type; }; template<> struct protect< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : protect< T1 > { }; }; namespace aux { template< typename T1 > struct template_arity< protect< T1 > > : int_<1> { }; template<> struct template_arity< protect< na > > : int_<-1> { }; } }} namespace boost { namespace mpl { namespace aux { template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg { typedef T type; }; template< typename T , typename Arg > struct replace_unnamed_arg { typedef Arg next; typedef T type; }; template< typename Arg > struct replace_unnamed_arg< arg< -1 >, Arg > { typedef typename Arg::next next; typedef Arg type; }; template< int N, typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< arg<N>, U1, U2, U3, U4, U5 > { typedef typename apply_wrap5<mpl::arg<N>, U1, U2, U3, U4, U5>::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } template< typename F > struct bind0 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; public: typedef typename apply_wrap0< f_ >::type type; }; }; namespace aux { template< typename F, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind0<F>, U1, U2, U3, U4, U5 > { typedef bind0<F> f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } namespace aux { template< typename T1 > struct template_arity< bind0< T1> > : int_<1> { }; } template< typename F > struct bind< F,na,na,na,na,na > : bind0<F> { }; template< typename F, typename T1 > struct bind1 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; public: typedef typename apply_wrap1< f_ , typename t1::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct resolve_bind_arg< bind1< F,T1 >, U1, U2, U3, U4, U5 > { typedef bind1< F,T1 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } namespace aux { template< typename T1 , typename T2 > struct template_arity< bind1< T1 , T2> > : int_<2> { }; } template< typename F, typename T1 > struct bind< F,T1,na,na,na,na > : bind1< F,T1 > { }; template< typename F, typename T1, typename T2 > struct bind2 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; public: typedef typename apply_wrap2< f_ , typename t1::type, typename t2::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename U1, typename U2 , typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind2< F,T1,T2 >, U1, U2, U3, U4, U5 > { typedef bind2< F,T1,T2 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< bind2< T1 , T2 , T3> > : int_<3> { }; } template< typename F, typename T1, typename T2 > struct bind< F,T1,T2,na,na,na > : bind2< F,T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3 > struct bind3 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; public: typedef typename apply_wrap3< f_ , typename t1::type, typename t2::type, typename t3::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename U1 , typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 > { typedef bind3< F,T1,T2,T3 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 > struct template_arity< bind3< T1 , T2 , T3 , T4> > : int_<4> { }; } template< typename F, typename T1, typename T2, typename T3 > struct bind< F,T1,T2,T3,na,na > : bind3< F,T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; typedef typename r4::next n5; typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; public: typedef typename apply_wrap4< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 > { typedef bind4< F,T1,T2,T3,T4 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct template_arity< bind4< T1 , T2 , T3 , T4 , T5> > : int_<5> { }; } template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind< F,T1,T2,T3,T4,na > : bind4< F,T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; typedef typename r4::next n5; typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; typedef aux::replace_unnamed_arg< T5,n5 > r5; typedef typename r5::type a5; typedef typename r5::next n6; typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; public: typedef typename apply_wrap5< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type, typename t5::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind5< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 > struct template_arity< bind5< T1 , T2 , T3 , T4 , T5 , T6> > : int_<6> { }; } template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind : bind5< F,T1,T2,T3,T4,T5 > { }; template< template< typename T1, typename T2, typename T3 > class F, typename Tag > struct quote3; template< typename T1, typename T2, typename T3 > struct if_; template< typename Tag, typename T1, typename T2, typename T3 > struct bind3< quote3< if_,Tag > , T1, T2, T3 > { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef mpl::arg<1> n1; typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; typedef typename if_< typename t1::type , t2, t3 >::type f_; public: typedef typename f_::type type; }; }; template< template< typename T1, typename T2, typename T3 > class F, typename Tag > struct quote3; template< typename T1, typename T2, typename T3 > struct eval_if; template< typename Tag, typename T1, typename T2, typename T3 > struct bind3< quote3< eval_if,Tag > , T1, T2, T3 > { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef mpl::arg<1> n1; typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; typedef typename eval_if< typename t1::type , t2, t3 >::type f_; public: typedef typename f_::type type; }; }; }} namespace mpl_ { struct void_ { typedef void_ type; }; } namespace boost { namespace mpl { template< typename T > struct is_void_ : false_ { }; template<> struct is_void_<void_> : true_ { }; template< typename T > struct is_not_void_ : true_ { }; template<> struct is_not_void_<void_> : false_ { }; template<> struct is_void_< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : is_void_< T1 > { }; }; template< typename Tag > struct lambda< is_void_< na > , Tag , int_<-1> > { typedef false_ is_le; typedef is_void_< na > result_; typedef is_void_< na > type; }; namespace aux { template< typename T1 > struct template_arity< is_void_< T1 > > : int_<1> { }; template<> struct template_arity< is_void_< na > > : int_<-1> { }; } template<> struct is_not_void_< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : is_not_void_< T1 > { }; }; template< typename Tag > struct lambda< is_not_void_< na > , Tag , int_<-1> > { typedef false_ is_le; typedef is_not_void_< na > result_; typedef is_not_void_< na > type; }; namespace aux { template< typename T1 > struct template_arity< is_not_void_< T1 > > : int_<1> { }; template<> struct template_arity< is_not_void_< na > > : int_<-1> { }; } }} namespace boost { namespace mpl { namespace aux { template< typename T, typename fallback_ = boost::mpl::bool_<true> > struct has_type { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper<U> const volatile* , boost::mpl::aux::type_wrapper<typename U::type>* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper<T> t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast<t_*>(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_<value> type; }; }}} namespace boost { namespace mpl { template< typename T, bool has_type_ > struct quote_impl { typedef typename T::type type; }; template< typename T > struct quote_impl< T,false > { typedef T type; }; template< template< typename P1 > class F , typename Tag = void_ > struct quote1 { template< typename U1 > struct apply : quote_impl< F<U1> , aux::has_type< F<U1> >::value > { }; }; template< template< typename P1, typename P2 > class F , typename Tag = void_ > struct quote2 { template< typename U1, typename U2 > struct apply : quote_impl< F< U1,U2 > , aux::has_type< F< U1,U2 > >::value > { }; }; template< template< typename P1, typename P2, typename P3 > class F , typename Tag = void_ > struct quote3 { template< typename U1, typename U2, typename U3 > struct apply : quote_impl< F< U1,U2,U3 > , aux::has_type< F< U1,U2,U3 > >::value > { }; }; template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename Tag = void_ > struct quote4 { template< typename U1, typename U2, typename U3, typename U4 > struct apply : quote_impl< F< U1,U2,U3,U4 > , aux::has_type< F< U1,U2,U3,U4 > >::value > { }; }; template< template< typename P1, typename P2, typename P3, typename P4 , typename P5 > class F , typename Tag = void_ > struct quote5 { template< typename U1, typename U2, typename U3, typename U4 , typename U5 > struct apply : quote_impl< F< U1,U2,U3,U4,U5 > , aux::has_type< F< U1,U2,U3,U4,U5 > >::value > { }; }; }} namespace boost { namespace mpl { namespace aux { template< int N > struct arity_tag { typedef char (&type)[(unsigned)N + 1]; }; template< int C1, int C2, int C3, int C4, int C5, int C6 > struct max_arity { static const int value = ( C6 > 0 ? C6 : ( C5 > 0 ? C5 : ( C4 > 0 ? C4 : ( C3 > 0 ? C3 : ( C2 > 0 ? C2 : ( C1 > 0 ? C1 : -1 ) ) ) ) ) ); }; arity_tag<0>::type arity_helper(...); template< template< typename P1 > class F , typename T1 > typename arity_tag<1>::type arity_helper(type_wrapper< F<T1> >, arity_tag<1>); template< template< typename P1, typename P2 > class F , typename T1, typename T2 > typename arity_tag<2>::type arity_helper(type_wrapper< F< T1,T2 > >, arity_tag<2>); template< template< typename P1, typename P2, typename P3 > class F , typename T1, typename T2, typename T3 > typename arity_tag<3>::type arity_helper(type_wrapper< F< T1,T2,T3 > >, arity_tag<3>); template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename T1, typename T2, typename T3, typename T4 > typename arity_tag<4>::type arity_helper(type_wrapper< F< T1,T2,T3,T4 > >, arity_tag<4>); template< template< typename P1, typename P2, typename P3, typename P4 , typename P5 > class F , typename T1, typename T2, typename T3, typename T4, typename T5 > typename arity_tag<5>::type arity_helper(type_wrapper< F< T1,T2,T3,T4,T5 > >, arity_tag<5>); template< template< typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6 > class F , typename T1, typename T2, typename T3, typename T4, typename T5 , typename T6 > typename arity_tag<6>::type arity_helper(type_wrapper< F< T1,T2,T3,T4,T5,T6 > >, arity_tag<6>); template< typename F, int N > struct template_arity_impl { static const int value = sizeof(::boost::mpl::aux::arity_helper(type_wrapper<F>(), arity_tag<N>())) - 1; }; template< typename F > struct template_arity { static const int value = ( max_arity< template_arity_impl< F,1 >::value, template_arity_impl< F,2 >::value, template_arity_impl< F,3 >::value, template_arity_impl< F,4 >::value, template_arity_impl< F,5 >::value, template_arity_impl< F,6 >::value >::value ); typedef mpl::int_<value> type; }; }}} namespace boost { namespace mpl { namespace aux { template< bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false , bool C5 = false > struct lambda_or : true_ { }; template<> struct lambda_or< false,false,false,false,false > : false_ { }; } template< typename T , typename Tag , typename Arity > struct lambda { typedef false_ is_le; typedef T result_; typedef T type; }; template< typename T > struct is_lambda_expression : lambda<T>::is_le { }; template< int N, typename Tag > struct lambda< arg<N>,Tag, int_< -1 > > { typedef true_ is_le; typedef mpl::arg<N> result_; typedef mpl::protect<result_> type; }; template< typename F , typename Tag > struct lambda< bind0<F> , Tag , int_<1> > { typedef false_ is_le; typedef bind0< F > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1 > class F , typename L1 > struct le_result1 { typedef F< typename L1::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1 > class F , typename L1 > struct le_result1< true_,Tag,F,L1 > { typedef bind1< quote1< F,Tag > , typename L1::result_ > result_; typedef mpl::protect<result_> type; }; } template< template< typename P1 > class F , typename T1 , typename Tag > struct lambda< F<T1> , Tag , int_<1> > { typedef lambda< T1,Tag > l1; typedef typename l1::is_le is_le1; typedef typename aux::lambda_or< is_le1::value >::type is_le; typedef aux::le_result1< is_le, Tag, F, l1 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1 , typename Tag > struct lambda< bind1< F,T1 > , Tag , int_<2> > { typedef false_ is_le; typedef bind1< F , T1 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > struct le_result2 { typedef F< typename L1::type, typename L2::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > struct le_result2< true_,Tag,F,L1,L2 > { typedef bind2< quote2< F,Tag > , typename L1::result_, typename L2::result_ > result_; typedef mpl::protect<result_> type; }; } template< template< typename P1, typename P2 > class F , typename T1, typename T2 , typename Tag > struct lambda< F< T1,T2 > , Tag , int_<2> > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename aux::lambda_or< is_le1::value, is_le2::value >::type is_le; typedef aux::le_result2< is_le, Tag, F, l1, l2 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2 , typename Tag > struct lambda< bind2< F,T1,T2 > , Tag , int_<3> > { typedef false_ is_le; typedef bind2< F , T1, T2 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > struct le_result3 { typedef F< typename L1::type, typename L2::type, typename L3::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > struct le_result3< true_,Tag,F,L1,L2,L3 > { typedef bind3< quote3< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ > result_; typedef mpl::protect<result_> type; }; } template< template< typename P1, typename P2, typename P3 > class F , typename T1, typename T2, typename T3 , typename Tag > struct lambda< F< T1,T2,T3 > , Tag , int_<3> > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value >::type is_le; typedef aux::le_result3< is_le, Tag, F, l1, l2, l3 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3 , typename Tag > struct lambda< bind3< F,T1,T2,T3 > , Tag , int_<4> > { typedef false_ is_le; typedef bind3< F , T1, T2, T3 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > struct le_result4 { typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > struct le_result4< true_,Tag,F,L1,L2,L3,L4 > { typedef bind4< quote4< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ , typename L4::result_ > result_; typedef mpl::protect<result_> type; }; } template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename T1, typename T2, typename T3, typename T4 , typename Tag > struct lambda< F< T1,T2,T3,T4 > , Tag , int_<4> > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef lambda< T4,Tag > l4; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value, is_le4::value >::type is_le; typedef aux::le_result4< is_le, Tag, F, l1, l2, l3, l4 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename Tag > struct lambda< bind4< F,T1,T2,T3,T4 > , Tag , int_<5> > { typedef false_ is_le; typedef bind4< F , T1, T2, T3, T4 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > struct le_result5 { typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type, typename L5::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > { typedef bind5< quote5< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ , typename L4::result_, typename L5::result_ > result_; typedef mpl::protect<result_> type; }; } template< template< typename P1, typename P2, typename P3, typename P4 , typename P5 > class F , typename T1, typename T2, typename T3, typename T4, typename T5 , typename Tag > struct lambda< F< T1,T2,T3,T4,T5 > , Tag , int_<5> > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef lambda< T4,Tag > l4; typedef lambda< T5,Tag > l5; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename l5::is_le is_le5; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value, is_le4::value , is_le5::value >::type is_le; typedef aux::le_result5< is_le, Tag, F, l1, l2, l3, l4, l5 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag > struct lambda< bind5< F,T1,T2,T3,T4,T5 > , Tag , int_<6> > { typedef false_ is_le; typedef bind5< F , T1, T2, T3, T4, T5 > result_; typedef result_ type; }; template< typename T, typename Tag > struct lambda< mpl::protect<T>,Tag, int_<1> > { typedef false_ is_le; typedef mpl::protect<T> result_; typedef result_ type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag > struct lambda< bind< F,T1,T2,T3,T4,T5 > , Tag , int_<6> > { typedef false_ is_le; typedef bind< F,T1,T2,T3,T4,T5 > result_; typedef result_ type; }; template< typename F , typename Tag1 , typename Tag2 , typename Arity > struct lambda< lambda< F,Tag1,Arity > , Tag2 , int_<3> > { typedef lambda< F,Tag2 > l1; typedef lambda< Tag1,Tag2 > l2; typedef typename l1::is_le is_le; typedef bind1< quote1<aux::template_arity>, typename l1::result_ > arity_; typedef lambda< typename if_< is_le,arity_,Arity >::type, Tag2 > l3; typedef aux::le_result3<is_le, Tag2, mpl::lambda, l1, l2, l3> le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template<> struct lambda< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : lambda< T1 , T2 > { }; }; template< typename Tag > struct lambda< lambda< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef lambda< na , na > result_; typedef lambda< na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< lambda< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< lambda< na , na > > : int_<-1> { }; } }} namespace boost { namespace mpl { template< typename F > struct apply0 : apply_wrap0< typename lambda<F>::type > { }; template< typename F > struct apply< F,na,na,na,na,na > : apply0<F> { }; template< typename F, typename T1 > struct apply1 : apply_wrap1< typename lambda<F>::type , T1 > { }; template< typename F, typename T1 > struct apply< F,T1,na,na,na,na > : apply1< F,T1 > { }; template< typename F, typename T1, typename T2 > struct apply2 : apply_wrap2< typename lambda<F>::type , T1, T2 > { }; template< typename F, typename T1, typename T2 > struct apply< F,T1,T2,na,na,na > : apply2< F,T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3 > struct apply3 : apply_wrap3< typename lambda<F>::type , T1, T2, T3 > { }; template< typename F, typename T1, typename T2, typename T3 > struct apply< F,T1,T2,T3,na,na > : apply3< F,T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4 : apply_wrap4< typename lambda<F>::type , T1, T2, T3, T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply< F,T1,T2,T3,T4,na > : apply4< F,T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5 : apply_wrap5< typename lambda<F>::type , T1, T2, T3, T4, T5 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply : apply5< F,T1,T2,T3,T4,T5 > { }; }} namespace boost { namespace iterators { template <class I, class V, class TC, class R, class D> class iterator_facade; namespace detail { struct always_bool2 { template <class T, class U> struct apply { typedef bool type; }; }; template< typename CategoryOrTraversal, typename Required > struct is_traversal_at_least : public boost::is_convertible< typename iterator_category_to_traversal< CategoryOrTraversal >::type, Required > {}; template < class Facade1 , class Facade2 , class Return > struct enable_if_interoperable : public boost::iterators::enable_if< is_interoperable< Facade1, Facade2 > , Return > {}; template < class Facade1 , class Facade2 , class Return > struct enable_if_interoperable_and_random_access_traversal : public boost::iterators::enable_if< mpl::and_< is_interoperable< Facade1, Facade2 > , is_traversal_at_least< typename iterator_category< Facade1 >::type, random_access_traversal_tag > , is_traversal_at_least< typename iterator_category< Facade2 >::type, random_access_traversal_tag > > , Return > {}; template < class ValueParam , class CategoryOrTraversal , class Reference , class Difference > struct iterator_facade_types { typedef typename facade_iterator_category< CategoryOrTraversal, ValueParam, Reference >::type iterator_category; typedef typename remove_const<ValueParam>::type value_type; typedef typename mpl::eval_if< boost::iterators::detail::iterator_writability_disabled<ValueParam,Reference> , add_pointer<const value_type> , add_pointer<value_type> >::type pointer; }; template <class Iterator> class postfix_increment_proxy { typedef typename iterator_value<Iterator>::type value_type; public: explicit postfix_increment_proxy(Iterator const& x) ; value_type& operator*() const ; operator Iterator const&() const ; value_type* operator->() const ; private: Iterator stored_iterator; mutable value_type stored_value; }; template <class Iterator> class writable_postfix_increment_dereference_proxy; template <class T> struct is_not_writable_postfix_increment_dereference_proxy : public boost::true_type {}; template <class Iterator> struct is_not_writable_postfix_increment_dereference_proxy< writable_postfix_increment_dereference_proxy<Iterator> > : public boost::false_type {}; template <class Iterator> class writable_postfix_increment_proxy; template <class Iterator> class writable_postfix_increment_dereference_proxy { friend class writable_postfix_increment_proxy<Iterator>; typedef typename iterator_value<Iterator>::type value_type; public: explicit writable_postfix_increment_dereference_proxy(Iterator const& x) ; operator value_type&() const ; template <class OtherIterator> writable_postfix_increment_dereference_proxy const& operator=(writable_postfix_increment_dereference_proxy<OtherIterator> const& x) const ; template <class T> typename iterators::enable_if< is_not_writable_postfix_increment_dereference_proxy< T >, writable_postfix_increment_dereference_proxy const& >::type operator=(T&& x) const ; private: Iterator stored_iterator; mutable value_type stored_value; }; template <class Iterator> class writable_postfix_increment_proxy { typedef typename iterator_value<Iterator>::type value_type; public: explicit writable_postfix_increment_proxy(Iterator const& x) ; writable_postfix_increment_dereference_proxy<Iterator> const& operator*() const ; operator Iterator const&() const ; value_type* operator->() const ; private: writable_postfix_increment_dereference_proxy<Iterator> dereference_proxy; }; template <class Reference, class Value> struct is_non_proxy_reference : is_convertible< typename remove_reference<Reference>::type const volatile* , Value const volatile* > {}; template <class Iterator, class Value, class Reference, class CategoryOrTraversal> struct postfix_increment_result : mpl::eval_if< mpl::and_< is_convertible< Reference , typename add_lvalue_reference<Value const>::type > , mpl::not_< is_convertible< typename iterator_category_to_traversal<CategoryOrTraversal>::type , forward_traversal_tag > > > , mpl::if_< is_non_proxy_reference<Reference,Value> , postfix_increment_proxy<Iterator> , writable_postfix_increment_proxy<Iterator> > , mpl::identity<Iterator> > {}; template <class Reference, class Pointer> struct operator_arrow_dispatch { struct proxy { explicit proxy(Reference const & x) ; Reference* operator->() ; operator Reference*() ; Reference m_ref; }; typedef proxy result_type; static result_type apply(Reference const & x) ; }; template <class T, class Pointer> struct operator_arrow_dispatch<T&, Pointer> { typedef Pointer result_type; static result_type apply(T& x) ; }; template <class Iterator> class operator_brackets_proxy { typedef typename Iterator::reference reference; typedef typename Iterator::value_type value_type; public: operator_brackets_proxy(Iterator const& iter) ; operator reference() const ; operator_brackets_proxy& operator=(value_type const& val) ; private: Iterator m_iter; }; template <class ValueType, class Reference> struct use_operator_brackets_proxy : mpl::not_< mpl::and_< boost::is_POD<ValueType> , iterator_writability_disabled<ValueType,Reference> > > {}; template <class Iterator, class Value, class Reference> struct operator_brackets_result { typedef typename mpl::if_< use_operator_brackets_proxy<Value,Reference> , operator_brackets_proxy<Iterator> , Value >::type type; }; template <class Iterator> operator_brackets_proxy<Iterator> make_operator_brackets_result(Iterator const& iter, mpl::true_) ; template <class Iterator> typename Iterator::value_type make_operator_brackets_result(Iterator const& iter, mpl::false_) ; struct choose_difference_type { template <class I1, class I2> struct apply : mpl::eval_if< is_convertible<I2,I1> , iterator_difference<I1> , iterator_difference<I2> > {}; }; template < class Derived , class Value , class CategoryOrTraversal , class Reference , class Difference , bool IsBidirectionalTraversal , bool IsRandomAccessTraversal > class iterator_facade_base; } class iterator_core_access { template <class I, class V, class TC, class R, class D> friend class iterator_facade; template <class I, class V, class TC, class R, class D, bool IsBidirectionalTraversal, bool IsRandomAccessTraversal> friend class detail::iterator_facade_base; template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > friend typename boost::iterators::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2<boost::iterators::detail::always_bool2,Derived1,Derived2>::type >::type operator ==( iterator_facade<Derived1, V1, TC1, Reference1, Difference1> const& lhs , iterator_facade<Derived2, V2, TC2, Reference2, Difference2> const& rhs); template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > friend typename boost::iterators::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2<boost::iterators::detail::always_bool2,Derived1,Derived2>::type >::type operator !=( iterator_facade<Derived1, V1, TC1, Reference1, Difference1> const& lhs , iterator_facade<Derived2, V2, TC2, Reference2, Difference2> const& rhs); template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > friend typename boost::iterators::detail::enable_if_interoperable_and_random_access_traversal< Derived1, Derived2 , typename mpl::apply2<boost::iterators::detail::always_bool2,Derived1,Derived2>::type >::type operator <( iterator_facade<Derived1, V1, TC1, Reference1, Difference1> const& lhs , iterator_facade<Derived2, V2, TC2, Reference2, Difference2> const& rhs); template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > friend typename boost::iterators::detail::enable_if_interoperable_and_random_access_traversal< Derived1, Derived2 , typename mpl::apply2<boost::iterators::detail::always_bool2,Derived1,Derived2>::type >::type operator >( iterator_facade<Derived1, V1, TC1, Reference1, Difference1> const& lhs , iterator_facade<Derived2, V2, TC2, Reference2, Difference2> const& rhs); template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > friend typename boost::iterators::detail::enable_if_interoperable_and_random_access_traversal< Derived1, Derived2 , typename mpl::apply2<boost::iterators::detail::always_bool2,Derived1,Derived2>::type >::type operator <=( iterator_facade<Derived1, V1, TC1, Reference1, Difference1> const& lhs , iterator_facade<Derived2, V2, TC2, Reference2, Difference2> const& rhs); template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > friend typename boost::iterators::detail::enable_if_interoperable_and_random_access_traversal< Derived1, Derived2 , typename mpl::apply2<boost::iterators::detail::always_bool2,Derived1,Derived2>::type >::type operator >=( iterator_facade<Derived1, V1, TC1, Reference1, Difference1> const& lhs , iterator_facade<Derived2, V2, TC2, Reference2, Difference2> const& rhs); template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > friend typename boost::iterators::detail::enable_if_interoperable_and_random_access_traversal< Derived1, Derived2 , typename mpl::apply2<boost::iterators::detail::choose_difference_type,Derived1,Derived2>::type >::type operator -( iterator_facade<Derived1, V1, TC1, Reference1, Difference1> const& lhs , iterator_facade<Derived2, V2, TC2, Reference2, Difference2> const& rhs) ; template <class Derived, class V, class TC, class R, class D> friend typename boost::iterators::enable_if< boost::iterators::detail::is_traversal_at_least< TC, boost::iterators::random_access_traversal_tag >, Derived >::type operator+ (iterator_facade<Derived, V, TC, R, D> const& , typename Derived::difference_type) ; template <class Derived, class V, class TC, class R, class D> friend typename boost::iterators::enable_if< boost::iterators::detail::is_traversal_at_least< TC, boost::iterators::random_access_traversal_tag >, Derived >::type operator+ (typename Derived::difference_type , iterator_facade<Derived, V, TC, R, D> const&) ; template <class Facade> static typename Facade::reference dereference(Facade const& f) ; template <class Facade> static void increment(Facade& f) ; template <class Facade> static void decrement(Facade& f) ; template <class Facade1, class Facade2> static bool equal(Facade1 const& f1, Facade2 const& f2, mpl::true_) ; template <class Facade1, class Facade2> static bool equal(Facade1 const& f1, Facade2 const& f2, mpl::false_) ; template <class Facade> static void advance(Facade& f, typename Facade::difference_type n) ; template <class Facade1, class Facade2> static typename Facade1::difference_type distance_from( Facade1 const& f1, Facade2 const& f2, mpl::true_) ; template <class Facade1, class Facade2> static typename Facade2::difference_type distance_from( Facade1 const& f1, Facade2 const& f2, mpl::false_) ; template <class I, class V, class TC, class R, class D> static I& derived(iterator_facade<I,V,TC,R,D>& facade) ; template <class I, class V, class TC, class R, class D> static I const& derived(iterator_facade<I,V,TC,R,D> const& facade) ; iterator_core_access() = delete; }; namespace detail { template < class Derived , class Value , class CategoryOrTraversal , class Reference , class Difference > class iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, false, false > { private: typedef boost::iterators::detail::iterator_facade_types< Value, CategoryOrTraversal, Reference, Difference > associated_types; typedef boost::iterators::detail::operator_arrow_dispatch< Reference , typename associated_types::pointer > operator_arrow_dispatch_; public: typedef typename associated_types::value_type value_type; typedef Reference reference; typedef Difference difference_type; typedef typename operator_arrow_dispatch_::result_type pointer; typedef typename associated_types::iterator_category iterator_category; public: reference operator*() const ; pointer operator->() const ; Derived& operator++() ; protected: Derived& derived() ; Derived const& derived() const ; }; template < class Derived , class Value , class CategoryOrTraversal , class Reference , class Difference > class iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, true, false > : public iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, false, false > { public: Derived& operator--() ; Derived operator--(int) ; }; template < class Derived , class Value , class CategoryOrTraversal , class Reference , class Difference > class iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, true, true > : public iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, true, false > { private: typedef iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, true, false > base_type; public: typedef typename base_type::reference reference; typedef typename base_type::difference_type difference_type; public: typename boost::iterators::detail::operator_brackets_result<Derived, Value, reference>::type operator[](difference_type n) const ; Derived& operator+=(difference_type n) ; Derived& operator-=(difference_type n) ; Derived operator-(difference_type x) const ; }; } template < class Derived , class Value , class CategoryOrTraversal , class Reference = Value& , class Difference = std::ptrdiff_t > class iterator_facade : public detail::iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, detail::is_traversal_at_least< CategoryOrTraversal, bidirectional_traversal_tag >::value, detail::is_traversal_at_least< CategoryOrTraversal, random_access_traversal_tag >::value > { protected: typedef iterator_facade<Derived,Value,CategoryOrTraversal,Reference,Difference> iterator_facade_; }; template <class I, class V, class TC, class R, class D> typename boost::iterators::detail::postfix_increment_result<I,V,R,TC>::type operator++( iterator_facade<I,V,TC,R,D>& i , int ) ; template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > typename boost::iterators::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2<boost::iterators::detail::always_bool2,Derived1,Derived2>::type >::type operator ==( iterator_facade<Derived1, V1, TC1, Reference1, Difference1> const& lhs , iterator_facade<Derived2, V2, TC2, Reference2, Difference2> const& rhs) ; template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > typename boost::iterators::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2<boost::iterators::detail::always_bool2,Derived1,Derived2>::type >::type operator !=( iterator_facade<Derived1, V1, TC1, Reference1, Difference1> const& lhs , iterator_facade<Derived2, V2, TC2, Reference2, Difference2> const& rhs) ; template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > typename boost::iterators::detail::enable_if_interoperable_and_random_access_traversal< Derived1, Derived2 , typename mpl::apply2<boost::iterators::detail::always_bool2,Derived1,Derived2>::type >::type operator <( iterator_facade<Derived1, V1, TC1, Reference1, Difference1> const& lhs , iterator_facade<Derived2, V2, TC2, Reference2, Difference2> const& rhs) ; template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > typename boost::iterators::detail::enable_if_interoperable_and_random_access_traversal< Derived1, Derived2 , typename mpl::apply2<boost::iterators::detail::always_bool2,Derived1,Derived2>::type >::type operator >( iterator_facade<Derived1, V1, TC1, Reference1, Difference1> const& lhs , iterator_facade<Derived2, V2, TC2, Reference2, Difference2> const& rhs) ; template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > typename boost::iterators::detail::enable_if_interoperable_and_random_access_traversal< Derived1, Derived2 , typename mpl::apply2<boost::iterators::detail::always_bool2,Derived1,Derived2>::type >::type operator <=( iterator_facade<Derived1, V1, TC1, Reference1, Difference1> const& lhs , iterator_facade<Derived2, V2, TC2, Reference2, Difference2> const& rhs) ; template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > typename boost::iterators::detail::enable_if_interoperable_and_random_access_traversal< Derived1, Derived2 , typename mpl::apply2<boost::iterators::detail::always_bool2,Derived1,Derived2>::type >::type operator >=( iterator_facade<Derived1, V1, TC1, Reference1, Difference1> const& lhs , iterator_facade<Derived2, V2, TC2, Reference2, Difference2> const& rhs) ; template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > typename boost::iterators::detail::enable_if_interoperable_and_random_access_traversal< Derived1, Derived2 , typename mpl::apply2<boost::iterators::detail::choose_difference_type,Derived1,Derived2>::type >::type operator -( iterator_facade<Derived1, V1, TC1, Reference1, Difference1> const& lhs , iterator_facade<Derived2, V2, TC2, Reference2, Difference2> const& rhs) ; template <class Derived, class V, class TC, class R, class D> typename boost::iterators::enable_if< boost::iterators::detail::is_traversal_at_least< TC, boost::iterators::random_access_traversal_tag >, Derived >::type operator+ ( iterator_facade<Derived, V, TC, R, D> const& i , typename Derived::difference_type n ) ; template <class Derived, class V, class TC, class R, class D> typename boost::iterators::enable_if< boost::iterators::detail::is_traversal_at_least< TC, boost::iterators::random_access_traversal_tag >, Derived >::type operator+ ( typename Derived::difference_type n , iterator_facade<Derived, V, TC, R, D> const& i ) ; } using iterators::iterator_core_access; using iterators::iterator_facade; } namespace dwarfs { template <typename T, typename IndexValueType = size_t> class sortable_span { public: using value_type = T; using index_value_type = IndexValueType; class iterator : public boost::iterator_facade<iterator, value_type, boost::random_access_traversal_tag> { public: using difference_type = typename boost::iterator_facade< iterator, value_type, boost::random_access_traversal_tag>::difference_type; iterator() = default; iterator(iterator const& other) = default; private: friend class boost::iterator_core_access; friend class sortable_span; iterator(sortable_span const* vv, typename std::vector<index_value_type>::iterator it) ; bool equal(iterator const& other) const ; void increment() ; void decrement() ; void advance(difference_type n) ; difference_type distance_to(iterator const& other) const ; value_type& dereference() const ; sortable_span const* vv_{nullptr}; typename std::vector<index_value_type>::iterator it_; }; explicit sortable_span(std::span<value_type> values) ; template <typename P> void select(P&& predicate) ; void all() ; bool empty() const ; size_t size() const ; value_type const& operator[](size_t i) const ; iterator begin() ; iterator end() ; std::vector<index_value_type>& index() ; std::vector<index_value_type> const& index() const ; std::span<value_type> raw() const ; private: std::vector<index_value_type> index_; std::span<value_type> const values_; }; } namespace dwarfs { namespace thrift::metadata { class chunk; } class file; class mmif; class os_access; class progress; struct inode_options; class inode : public object { public: using files_vector = folly::small_vector<file*, 1>; virtual void set_files(files_vector&& fv) = 0; virtual void populate(size_t size) = 0; virtual void scan(mmif* mm, inode_options const& options, progress& prog) = 0; virtual void set_num(uint32_t num) = 0; virtual uint32_t num() const = 0; virtual bool has_category(fragment_category cat) const = 0; virtual std::optional<uint32_t> similarity_hash(fragment_category cat) const = 0; virtual nilsimsa::hash_type const* nilsimsa_similarity_hash(fragment_category cat) const = 0; virtual size_t size() const = 0; virtual file const* any() const = 0; virtual files_vector const& all() const = 0; virtual bool append_chunks_to(std::vector<thrift::metadata::chunk>& vec) const = 0; virtual inode_fragments& fragments() = 0; virtual void dump(std::ostream& os, inode_options const& options) const = 0; virtual void set_scan_error(file const* fp, std::exception_ptr ep) = 0; virtual std::optional<std::pair<file const*, std::exception_ptr>> get_scan_error() const = 0; virtual std::tuple<std::unique_ptr<mmif>, file const*, std::vector<std::pair<file const*, std::exception_ptr>>> mmap_any(os_access const& os) const = 0; }; using sortable_inode_span = sortable_span<std::shared_ptr<inode> const, uint32_t>; } namespace dwarfs { class file; class inode; class logger; class os_access; class progress; class script; class worker_group; struct inode_options; class inode_manager { public: using inode_cb = std::function<void(std::shared_ptr<inode> const&)>; struct fragment_info { fragment_info(fragment_category::value_type cat, size_t count, size_t size) ; fragment_category::value_type category; size_t fragment_count; size_t total_size; }; struct fragment_infos { std::vector<fragment_category> categories; std::vector<fragment_info> info; std::unordered_map<fragment_category, size_t> category_size; size_t total_size{0}; }; inode_manager(logger& lgr, progress& prog, inode_options const& opts); std::shared_ptr<inode> create_inode() ; size_t count() const ; void for_each_inode_in_order(inode_cb const& fn) const ; fragment_infos fragment_category_info() const ; void scan_background(worker_group& wg, os_access const& os, std::shared_ptr<inode> ino, file* p) const ; bool has_invalid_inodes() const ; void try_scan_invalid(worker_group& wg, os_access const& os) ; void dump(std::ostream& os) const ; sortable_inode_span sortable_span() const ; sortable_inode_span ordered_span(fragment_category cat, worker_group& wg) const ; class impl { public: virtual ~impl() = default; virtual std::shared_ptr<inode> create_inode() = 0; virtual size_t count() const = 0; virtual void for_each_inode_in_order( std::function<void(std::shared_ptr<inode> const&)> const& fn) const = 0; virtual fragment_infos fragment_category_info() const = 0; virtual void scan_background(worker_group& wg, os_access const& os, std::shared_ptr<inode> ino, file* p) const = 0; virtual bool has_invalid_inodes() const = 0; virtual void try_scan_invalid(worker_group& wg, os_access const& os) = 0; virtual void dump(std::ostream& os) const = 0; virtual sortable_inode_span sortable_span() const = 0; virtual sortable_inode_span ordered_span(fragment_category cat, worker_group& wg) const = 0; }; private: std::unique_ptr<impl> impl_; }; } namespace dwarfs { class logger; class progress; class worker_group; struct inode_options; struct similarity_ordering_options; class inode_ordering { public: inode_ordering(logger& lgr, progress& prog, inode_options const& opts); void by_inode_number(sortable_inode_span& sp) const ; void by_path(sortable_inode_span& sp) const ; void by_reverse_path(sortable_inode_span& sp) const ; void by_similarity(sortable_inode_span& sp, fragment_category cat) const ; void by_nilsimsa(worker_group& wg, similarity_ordering_options const& opts, sortable_inode_span& sp, fragment_category cat) const ; class impl { public: virtual ~impl() = default; virtual void by_inode_number(sortable_inode_span& sp) const = 0; virtual void by_path(sortable_inode_span& sp) const = 0; virtual void by_reverse_path(sortable_inode_span& sp) const = 0; virtual void by_similarity(sortable_inode_span& sp, fragment_category cat) const = 0; virtual void by_nilsimsa(worker_group& wg, similarity_ordering_options const& opts, sortable_inode_span& sp, fragment_category cat) const = 0; }; private: std::unique_ptr<impl> impl_; }; } typedef long int ptrdiff_t; typedef long unsigned int size_t; typedef long unsigned int rsize_t; namespace boost { using std::ratio; using std::ratio_add; using std::ratio_subtract; using std::ratio_multiply; using std::ratio_divide; using std::ratio_equal; using std::ratio_not_equal; using std::ratio_less; using std::ratio_less_equal; using std::ratio_greater; using std::ratio_greater_equal; using std::atto; using std::femto; using std::pico; using std::nano; using std::micro; using std::milli; using std::centi; using std::deci; using std::deca; using std::hecto; using std::kilo; using std::mega; using std::giga; using std::tera; using std::peta; using std::exa; } namespace boost { namespace ratio_detail { template<std::intmax_t A> struct abs_: std::integral_constant<std::intmax_t, A < 0? -A: A> { }; template<> struct abs_<(-9223372036854775807L -1)>: std::integral_constant<std::intmax_t, (-9223372036854775807L -1)> { }; template<std::intmax_t A, std::intmax_t B> struct gcd_: public gcd_<B, A % B> { }; template<std::intmax_t A> struct gcd_<A, 0>: std::integral_constant<std::intmax_t, A> { }; template<std::intmax_t A, std::intmax_t B> struct lcm_: std::integral_constant<std::intmax_t, (A / gcd_<A, B>::value) * B> { }; template<> struct lcm_<0, 0>: std::integral_constant<std::intmax_t, 0> { }; template<std::intmax_t A, std::intmax_t B> struct gcd: abs_< gcd_<A, B>::value > { }; template<std::intmax_t A, std::intmax_t B> struct lcm: abs_< lcm_<A, B>::value > { }; } } namespace boost { template <class R1, class R2> using ratio_gcd = typename ratio< ratio_detail::gcd<R1::num, R2::num>::value, ratio_detail::lcm<R1::den, R2::den>::value>::type; } namespace boost { namespace ratio_detail { template<class T> struct is_ratio: std::false_type { }; template<std::intmax_t A, std::intmax_t B> struct is_ratio< boost::ratio<A, B> >: std::true_type { }; } } namespace boost { template <class T> struct remove_extent{ typedef T type; }; template <typename T, std::size_t N> struct remove_extent<T[N]> { typedef T type; }; template <typename T, std::size_t N> struct remove_extent<T const[N]> { typedef T const type; }; template <typename T, std::size_t N> struct remove_extent<T volatile [N]> { typedef T volatile type; }; template <typename T, std::size_t N> struct remove_extent<T const volatile [N]> { typedef T const volatile type; }; template <typename T> struct remove_extent<T[]> { typedef T type; }; template <typename T> struct remove_extent<T const[]> { typedef T const type; }; template <typename T> struct remove_extent<T volatile[]> { typedef T volatile type; }; template <typename T> struct remove_extent<T const volatile[]> { typedef T const volatile type; }; template <class T> using remove_extent_t = typename remove_extent<T>::type; } namespace boost { template <class T> struct remove_bounds : public remove_extent<T> {}; template <class T> using remove_bounds_t = typename remove_bounds<T>::type; } namespace boost { namespace detail { template <class T, bool Array, bool Function> struct decay_imp { typedef typename remove_cv<T>::type type; }; template <class T> struct decay_imp<T, true, false> { typedef typename remove_bounds<T>::type* type; }; template <class T> struct decay_imp<T, false, true> { typedef T* type; }; } template< class T > struct decay { private: typedef typename remove_reference<T>::type Ty; public: typedef typename boost::detail::decay_imp<Ty, boost::is_array<Ty>::value, boost::is_function<Ty>::value>::type type; }; template <class T> using decay_t = typename decay<T>::type; } namespace boost { template <bool b, class T, class U> struct conditional { typedef T type; }; template <class T, class U> struct conditional<false, T, U> { typedef U type; }; template <bool b, class T, class U> using conditional_t = typename conditional<b, T, U>::type; } namespace boost { namespace type_traits_detail { template<template<class...> class F, class... T> struct mp_valid_impl { template<template<class...> class G, class = G<T...>> static boost::true_type check_s(int); template<template<class...> class> static boost::false_type check_s(...); using type = decltype(check_s<F>(0)); }; template<template<class...> class F, class... T> using mp_valid = typename mp_valid_impl<F, T...>::type; struct mp_empty { }; template<template<class...> class F, class... T> struct mp_defer_impl { using type = F<T...>; }; template<template<class...> class F, class... T> using mp_defer = typename boost::conditional<mp_valid<F, T...>::value, mp_defer_impl<F, T...>, mp_empty>::type; } } namespace boost { template<class... T> struct common_type { }; template<class... T> using common_type_t = typename common_type<T...>::type; namespace type_traits_detail { template<class T1, class T2, class... T> using common_type_fold = common_type_t<common_type_t<T1, T2>, T...>; } template<class T1, class T2, class... T> struct common_type<T1, T2, T...>: type_traits_detail::mp_defer<type_traits_detail::common_type_fold, T1, T2, T...> { }; template<class T> struct common_type<T>: boost::decay<T> { static_assert(::boost::is_complete<T>::value || ::boost::is_void<T>::value || ::boost::is_array<T>::value, "Arguments to common_type must both be complete types"); }; namespace type_traits_detail { template<class T1, class T2> using builtin_common_type = typename boost::decay<decltype( boost::declval<bool>()? boost::declval<T1>(): boost::declval<T2>() )>::type; template<class T1, class T2> struct common_type_impl: mp_defer<builtin_common_type, T1, T2> { }; template<class T1, class T2, class T1d = typename boost::decay<T1>::type, class T2d = typename boost::decay<T2>::type> struct common_type_decay_helper: boost::common_type<T1d, T2d> { }; template<class T1, class T2> struct common_type_decay_helper<T1, T2, T1, T2>: common_type_impl<T1, T2> { }; } template<class T1, class T2> struct common_type<T1, T2>: type_traits_detail::common_type_decay_helper<T1, T2> { static_assert(::boost::is_complete<T1>::value || ::boost::is_void<T1>::value || ::boost::is_array<T1>::value, "Arguments to common_type must both be complete types"); static_assert(::boost::is_complete<T2>::value || ::boost::is_void<T2>::value || ::boost::is_array<T2>::value, "Arguments to common_type must both be complete types"); }; } namespace boost { namespace detail{ template <class T> struct is_unsigned_values { typedef typename remove_cv<T>::type no_cv_t; static const no_cv_t minus_one = (static_cast<no_cv_t>(-1)); static const no_cv_t zero = (static_cast<no_cv_t>(0)); }; template <class T> struct is_ununsigned_helper { static const bool value = (::boost::detail::is_unsigned_values<T>::minus_one > ::boost::detail::is_unsigned_values<T>::zero); }; template <bool integral_type> struct is_unsigned_select_helper { template <class T> struct rebind { typedef is_ununsigned_helper<T> type; }; }; template <> struct is_unsigned_select_helper<false> { template <class T> struct rebind { typedef false_type type; }; }; template <class T> struct is_unsigned { typedef ::boost::detail::is_unsigned_select_helper< ::boost::is_integral<T>::value || ::boost::is_enum<T>::value > selector; typedef typename selector::template rebind<T> binder; typedef typename binder::type type; static const bool value = type::value; }; } template <class T> struct is_unsigned : public integral_constant<bool, boost::detail::is_unsigned<T>::value> {}; template <> struct is_unsigned<unsigned char> : public true_type{}; template <> struct is_unsigned<const unsigned char> : public true_type{}; template <> struct is_unsigned<volatile unsigned char> : public true_type{}; template <> struct is_unsigned<const volatile unsigned char> : public true_type{}; template <> struct is_unsigned<unsigned short> : public true_type{}; template <> struct is_unsigned<const unsigned short> : public true_type{}; template <> struct is_unsigned<volatile unsigned short> : public true_type{}; template <> struct is_unsigned<const volatile unsigned short> : public true_type{}; template <> struct is_unsigned<unsigned int> : public true_type{}; template <> struct is_unsigned<const unsigned int> : public true_type{}; template <> struct is_unsigned<volatile unsigned int> : public true_type{}; template <> struct is_unsigned<const volatile unsigned int> : public true_type{}; template <> struct is_unsigned<unsigned long> : public true_type{}; template <> struct is_unsigned<const unsigned long> : public true_type{}; template <> struct is_unsigned<volatile unsigned long> : public true_type{}; template <> struct is_unsigned<const volatile unsigned long> : public true_type{}; template <> struct is_unsigned<signed char> : public false_type{}; template <> struct is_unsigned<const signed char> : public false_type{}; template <> struct is_unsigned<volatile signed char> : public false_type{}; template <> struct is_unsigned<const volatile signed char> : public false_type{}; template <> struct is_unsigned< short> : public false_type{}; template <> struct is_unsigned<const short> : public false_type{}; template <> struct is_unsigned<volatile short> : public false_type{}; template <> struct is_unsigned<const volatile short> : public false_type{}; template <> struct is_unsigned< int> : public false_type{}; template <> struct is_unsigned<const int> : public false_type{}; template <> struct is_unsigned<volatile int> : public false_type{}; template <> struct is_unsigned<const volatile int> : public false_type{}; template <> struct is_unsigned< long> : public false_type{}; template <> struct is_unsigned<const long> : public false_type{}; template <> struct is_unsigned<volatile long> : public false_type{}; template <> struct is_unsigned<const volatile long> : public false_type{}; template <> struct is_unsigned< ::boost::ulong_long_type> : public true_type{}; template <> struct is_unsigned<const ::boost::ulong_long_type> : public true_type{}; template <> struct is_unsigned<volatile ::boost::ulong_long_type> : public true_type{}; template <> struct is_unsigned<const volatile ::boost::ulong_long_type> : public true_type{}; template <> struct is_unsigned< ::boost::long_long_type> : public false_type{}; template <> struct is_unsigned<const ::boost::long_long_type> : public false_type{}; template <> struct is_unsigned<volatile ::boost::long_long_type> : public false_type{}; template <> struct is_unsigned<const volatile ::boost::long_long_type> : public false_type{}; template <> struct is_unsigned<char> : public false_type{}; template <> struct is_unsigned<const char> : public false_type{}; template <> struct is_unsigned<volatile char> : public false_type{}; template <> struct is_unsigned<const volatile char> : public false_type{}; template <> struct is_unsigned<wchar_t> : public false_type{}; template <> struct is_unsigned<const wchar_t> : public false_type{}; template <> struct is_unsigned<volatile wchar_t> : public false_type{}; template <> struct is_unsigned<const volatile wchar_t> : public false_type{}; } namespace boost { namespace ratio_detail { template<std::intmax_t A, std::intmax_t B> struct is_evenly_divisible_by_: std::integral_constant<bool, A % B == 0> { }; template<std::intmax_t A> struct is_evenly_divisible_by_<A, 0>: std::false_type { }; template<class R1, class R2> struct is_evenly_divisible_by: std::integral_constant<bool, is_evenly_divisible_by_<R1::num, R2::num>::value && is_evenly_divisible_by_<R2::den, R1::den>::value> { }; } } namespace boost { namespace chrono { namespace chrono_detail { template <class R1, class R2> struct is_evenly_divisible_by : public boost::ratio_detail::is_evenly_divisible_by<R1, R2> {}; } } } namespace boost { using ::int8_t; using ::int_least8_t; using ::int_fast8_t; using ::uint8_t; using ::uint_least8_t; using ::uint_fast8_t; using ::int16_t; using ::int_least16_t; using ::int_fast16_t; using ::uint16_t; using ::uint_least16_t; using ::uint_fast16_t; using ::int32_t; using ::int_least32_t; using ::int_fast32_t; using ::uint32_t; using ::uint_least32_t; using ::uint_fast32_t; using ::int64_t; using ::int_least64_t; using ::int_fast64_t; using ::uint64_t; using ::uint_least64_t; using ::uint_fast64_t; using ::intmax_t; using ::uintmax_t; } namespace boost { using ::intptr_t; using ::uintptr_t; } namespace boost { template<typename T, typename R=void> struct enable_if_has_type { typedef R type; }; template <bool B, class T = void> struct enable_if_c { typedef T type; }; template <class T> struct enable_if_c<false, T> {}; template <class Cond, class T = void> struct enable_if : public enable_if_c<Cond::value, T> {}; template <bool B, class T> struct lazy_enable_if_c { typedef typename T::type type; }; template <class T> struct lazy_enable_if_c<false, T> {}; template <class Cond, class T> struct lazy_enable_if : public lazy_enable_if_c<Cond::value, T> {}; template <bool B, class T = void> struct disable_if_c { typedef T type; }; template <class T> struct disable_if_c<true, T> {}; template <class Cond, class T = void> struct disable_if : public disable_if_c<Cond::value, T> {}; template <bool B, class T> struct lazy_disable_if_c { typedef typename T::type type; }; template <class T> struct lazy_disable_if_c<true, T> {}; template <class Cond, class T> struct lazy_disable_if : public lazy_disable_if_c<Cond::value, T> {}; } namespace boost { template<class T> class integer_traits : public std::numeric_limits<T> { public: static const bool is_integral = false; }; namespace detail { template<class T, T min_val, T max_val> class integer_traits_base { public: static const bool is_integral = true; static const T const_min = min_val; static const T const_max = max_val; }; template<class T, T min_val, T max_val> const bool integer_traits_base<T, min_val, max_val>::is_integral; template<class T, T min_val, T max_val> const T integer_traits_base<T, min_val, max_val>::const_min; template<class T, T min_val, T max_val> const T integer_traits_base<T, min_val, max_val>::const_max; } template<> class integer_traits<bool> : public std::numeric_limits<bool>, public detail::integer_traits_base<bool, false, true> { }; template<> class integer_traits<char> : public std::numeric_limits<char>, public detail::integer_traits_base<char, (-127 -1), 127> { }; template<> class integer_traits<signed char> : public std::numeric_limits<signed char>, public detail::integer_traits_base<signed char, (-127 -1), 127> { }; template<> class integer_traits<unsigned char> : public std::numeric_limits<unsigned char>, public detail::integer_traits_base<unsigned char, 0, (127*2 +1)> { }; template<> class integer_traits<wchar_t> : public std::numeric_limits<wchar_t>, public detail::integer_traits_base<wchar_t, (-2147483647 - 1), 2147483647> { }; template<> class integer_traits<short> : public std::numeric_limits<short>, public detail::integer_traits_base<short, (-32767 -1), 32767> { }; template<> class integer_traits<unsigned short> : public std::numeric_limits<unsigned short>, public detail::integer_traits_base<unsigned short, 0, (32767 * 2 + 1)> { }; template<> class integer_traits<int> : public std::numeric_limits<int>, public detail::integer_traits_base<int, (-2147483647 -1), 2147483647> { }; template<> class integer_traits<unsigned int> : public std::numeric_limits<unsigned int>, public detail::integer_traits_base<unsigned int, 0, (2147483647 *2U +1U)> { }; template<> class integer_traits<long> : public std::numeric_limits<long>, public detail::integer_traits_base<long, (-9223372036854775807L -1L), 9223372036854775807L> { }; template<> class integer_traits<unsigned long> : public std::numeric_limits<unsigned long>, public detail::integer_traits_base<unsigned long, 0, (9223372036854775807L *2UL+1UL)> { }; template<> class integer_traits< ::boost::long_long_type> : public std::numeric_limits< ::boost::long_long_type>, public detail::integer_traits_base< ::boost::long_long_type, (-9223372036854775807LL -1LL), 9223372036854775807LL> { }; template<> class integer_traits< ::boost::ulong_long_type> : public std::numeric_limits< ::boost::ulong_long_type>, public detail::integer_traits_base< ::boost::ulong_long_type, 0, (9223372036854775807LL*2ULL+1ULL)> { }; } namespace boost { namespace chrono { template <class Rep, class Period = ratio<1> > class duration; namespace detail { template <class T> struct is_duration : boost::false_type {}; template <class Rep, class Period> struct is_duration<duration<Rep, Period> > : boost::true_type {}; template <class Duration, class Rep, bool = is_duration<Rep>::value> struct duration_divide_result { }; template <class Duration, class Rep2, bool = ( ((boost::is_convertible<typename Duration::rep, typename common_type<typename Duration::rep, Rep2>::type>::value)) && ((boost::is_convertible<Rep2, typename common_type<typename Duration::rep, Rep2>::type>::value)) ) > struct duration_divide_imp { }; template <class Rep1, class Period, class Rep2> struct duration_divide_imp<duration<Rep1, Period>, Rep2, true> { typedef duration<typename common_type<Rep1, Rep2>::type, Period> type; }; template <class Rep1, class Period, class Rep2> struct duration_divide_result<duration<Rep1, Period>, Rep2, false> : duration_divide_imp<duration<Rep1, Period>, Rep2> { }; template <class Rep, class Duration, bool = is_duration<Rep>::value> struct duration_divide_result2 { }; template <class Rep, class Duration, bool = ( ((boost::is_convertible<typename Duration::rep, typename common_type<typename Duration::rep, Rep>::type>::value)) && ((boost::is_convertible<Rep, typename common_type<typename Duration::rep, Rep>::type>::value)) ) > struct duration_divide_imp2 { }; template <class Rep1, class Rep2, class Period > struct duration_divide_imp2<Rep1, duration<Rep2, Period>, true> { typedef double type; }; template <class Rep1, class Rep2, class Period > struct duration_divide_result2<Rep1, duration<Rep2, Period>, false> : duration_divide_imp2<Rep1, duration<Rep2, Period> > { }; template <class Duration, class Rep, bool = is_duration<Rep>::value> struct duration_modulo_result { }; template <class Duration, class Rep2, bool = ( boost::is_convertible<Rep2, typename common_type<typename Duration::rep, Rep2>::type>::value ) > struct duration_modulo_imp { }; template <class Rep1, class Period, class Rep2> struct duration_modulo_imp<duration<Rep1, Period>, Rep2, true> { typedef duration<typename common_type<Rep1, Rep2>::type, Period> type; }; template <class Rep1, class Period, class Rep2> struct duration_modulo_result<duration<Rep1, Period>, Rep2, false> : duration_modulo_imp<duration<Rep1, Period>, Rep2> { }; } } template <class Rep1, class Period1, class Rep2, class Period2> struct common_type<chrono::duration<Rep1, Period1>, chrono::duration<Rep2, Period2> >; namespace chrono { template <class Rep> struct treat_as_floating_point; template <class Rep> struct duration_values; typedef duration<boost::int_least64_t, nano> nanoseconds; typedef duration<boost::int_least64_t, micro> microseconds; typedef duration<boost::int_least64_t, milli> milliseconds; typedef duration<boost::int_least64_t> seconds; typedef duration<boost::int_least32_t, ratio< 60> > minutes; typedef duration<boost::int_least32_t, ratio<3600> > hours; namespace detail { template <class FromDuration, class ToDuration, class Period, bool PeriodNumEq1, bool PeriodDenEq1> struct duration_cast_aux; template <class FromDuration, class ToDuration, class Period> struct duration_cast_aux<FromDuration, ToDuration, Period, true, true> { constexpr ToDuration operator()(const FromDuration& fd) const ; }; template <class FromDuration, class ToDuration, class Period> struct duration_cast_aux<FromDuration, ToDuration, Period, true, false> { constexpr ToDuration operator()(const FromDuration& fd) const ; }; template <class FromDuration, class ToDuration, class Period> struct duration_cast_aux<FromDuration, ToDuration, Period, false, true> { constexpr ToDuration operator()(const FromDuration& fd) const ; }; template <class FromDuration, class ToDuration, class Period> struct duration_cast_aux<FromDuration, ToDuration, Period, false, false> { constexpr ToDuration operator()(const FromDuration& fd) const ; }; template <class FromDuration, class ToDuration> struct duration_cast { typedef typename ratio_divide<typename FromDuration::period, typename ToDuration::period>::type Period; typedef duration_cast_aux< FromDuration, ToDuration, Period, Period::num == 1, Period::den == 1 > Aux; constexpr ToDuration operator()(const FromDuration& fd) const ; }; } template <class Rep> struct treat_as_floating_point : boost::is_floating_point<Rep> {}; namespace detail { template <class T, bool = is_arithmetic<T>::value> struct chrono_numeric_limits { static constexpr T lowest() noexcept ; }; template <class T> struct chrono_numeric_limits<T,true> { static constexpr T lowest() noexcept ; }; template <> struct chrono_numeric_limits<float,true> { static constexpr float lowest() noexcept ; }; template <> struct chrono_numeric_limits<double,true> { static constexpr double lowest() noexcept ; }; template <> struct chrono_numeric_limits<long double,true> { static constexpr long double lowest() noexcept ; }; template <class T> struct numeric_limits : chrono_numeric_limits<typename remove_cv<T>::type> {}; } template <class Rep> struct duration_values { static constexpr Rep zero() ; static constexpr Rep max () ; static constexpr Rep min () ; }; } template <class Rep1, class Period1, class Rep2, class Period2> struct common_type<chrono::duration<Rep1, Period1>, chrono::duration<Rep2, Period2> > { typedef chrono::duration<typename common_type<Rep1, Rep2>::type, typename boost::ratio_gcd<Period1, Period2>::type> type; }; namespace chrono { template <class Rep, class Period> class __attribute__((__visibility__("default"))) duration { static_assert(!boost::chrono::detail::is_duration<Rep>::value,"A duration representation can not be a duration"); static_assert(boost::ratio_detail::is_ratio<typename Period::type>::value,"Second template parameter of duration must be a boost::ratio"); static_assert(Period::num>0,"duration period must be positive"); public: typedef Rep rep; typedef Period period; private: rep rep_; public: constexpr duration() = default; template <class Rep2> __attribute__((__visibility__("default"))) __attribute__ ((__always_inline__)) constexpr explicit duration(const Rep2& r , typename boost::enable_if < mpl::and_ < boost::is_convertible<Rep2, rep>, mpl::or_ < treat_as_floating_point<rep>, mpl::and_ < mpl::not_ < treat_as_floating_point<rep> >, mpl::not_ < treat_as_floating_point<Rep2> > > > > >::type* = nullptr ) ; duration& operator=(const duration& rhs) = default; duration(const duration&) = default; template <class Rep2, class Period2> __attribute__ ((__always_inline__)) constexpr duration(const duration<Rep2, Period2>& d , typename boost::enable_if < mpl::or_ < treat_as_floating_point<rep>, mpl::and_ < chrono_detail::is_evenly_divisible_by<Period2, period>, mpl::not_ < treat_as_floating_point<Rep2> > > > >::type* = nullptr ) ; constexpr rep count() const ; constexpr duration operator+() const ; constexpr duration operator-() const ; duration& operator++() ; duration operator++(int) ; duration& operator--() ; duration operator--(int) ; duration& operator+=(const duration& d) ; duration& operator-=(const duration& d) ; duration& operator*=(const rep& rhs) ; duration& operator/=(const rep& rhs) ; duration& operator%=(const rep& rhs) ; duration& operator%=(const duration& rhs) ; static constexpr duration zero() ; static constexpr duration min () ; static constexpr duration max () ; }; template <class Rep1, class Period1, class Rep2, class Period2> constexpr typename common_type<duration<Rep1, Period1>, duration<Rep2, Period2> >::type operator+(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs) ; template <class Rep1, class Period1, class Rep2, class Period2> constexpr typename common_type<duration<Rep1, Period1>, duration<Rep2, Period2> >::type operator-(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs) ; template <class Rep1, class Period, class Rep2> constexpr typename boost::enable_if < mpl::and_ < boost::is_convertible<Rep1, typename common_type<Rep1, Rep2>::type>, boost::is_convertible<Rep2, typename common_type<Rep1, Rep2>::type> >, duration<typename common_type<Rep1, Rep2>::type, Period> >::type operator*(const duration<Rep1, Period>& d, const Rep2& s) ; template <class Rep1, class Period, class Rep2> constexpr typename boost::enable_if < mpl::and_ < boost::is_convertible<Rep1, typename common_type<Rep1, Rep2>::type>, boost::is_convertible<Rep2, typename common_type<Rep1, Rep2>::type> >, duration<typename common_type<Rep1, Rep2>::type, Period> >::type operator*(const Rep1& s, const duration<Rep2, Period>& d) ; template <class Rep1, class Period, class Rep2> constexpr typename boost::disable_if <boost::chrono::detail::is_duration<Rep2>, typename boost::chrono::detail::duration_divide_result< duration<Rep1, Period>, Rep2>::type >::type operator/(const duration<Rep1, Period>& d, const Rep2& s) ; template <class Rep1, class Period1, class Rep2, class Period2> constexpr typename common_type<Rep1, Rep2>::type operator/(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs) ; template <class Rep1, class Period, class Rep2> constexpr typename boost::disable_if <boost::chrono::detail::is_duration<Rep2>, typename boost::chrono::detail::duration_modulo_result< duration<Rep1, Period>, Rep2>::type >::type operator%(const duration<Rep1, Period>& d, const Rep2& s) ; template <class Rep1, class Period1, class Rep2, class Period2> constexpr typename common_type<duration<Rep1, Period1>, duration<Rep2, Period2> >::type operator%(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs) ; namespace detail { template <class LhsDuration, class RhsDuration> struct duration_eq { constexpr bool operator()(const LhsDuration& lhs, const RhsDuration& rhs) const ; }; template <class LhsDuration> struct duration_eq<LhsDuration, LhsDuration> { constexpr bool operator()(const LhsDuration& lhs, const LhsDuration& rhs) const ; }; template <class LhsDuration, class RhsDuration> struct duration_lt { constexpr bool operator()(const LhsDuration& lhs, const RhsDuration& rhs) const ; }; template <class LhsDuration> struct duration_lt<LhsDuration, LhsDuration> { constexpr bool operator()(const LhsDuration& lhs, const LhsDuration& rhs) const ; }; } template <class Rep1, class Period1, class Rep2, class Period2> constexpr bool operator==(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs) ; template <class Rep1, class Period1, class Rep2, class Period2> constexpr bool operator!=(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs) ; template <class Rep1, class Period1, class Rep2, class Period2> constexpr bool operator< (const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs) ; template <class Rep1, class Period1, class Rep2, class Period2> constexpr bool operator> (const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs) ; template <class Rep1, class Period1, class Rep2, class Period2> constexpr bool operator<=(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs) ; template <class Rep1, class Period1, class Rep2, class Period2> constexpr bool operator>=(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs) ; template <class ToDuration, class Rep, class Period> constexpr typename boost::enable_if < boost::chrono::detail::is_duration<ToDuration>, ToDuration>::type duration_cast(const duration<Rep, Period>& fd) ; } } namespace boost { namespace chrono { template <class Clock, class Duration = typename Clock::duration> class time_point; } template <class Clock, class Duration1, class Duration2> struct common_type<chrono::time_point<Clock, Duration1>, chrono::time_point<Clock, Duration2> >; template <class Clock, class Duration1, class Duration2> struct common_type<chrono::time_point<Clock, Duration1>, chrono::time_point<Clock, Duration2> > { typedef chrono::time_point<Clock, typename common_type<Duration1, Duration2>::type> type; }; namespace chrono { template <class Clock, class Duration1, class Rep2, class Period2> constexpr time_point<Clock, typename common_type<Duration1, duration<Rep2, Period2> >::type> operator+( const time_point<Clock, Duration1>& lhs, const duration<Rep2, Period2>& rhs); template <class Rep1, class Period1, class Clock, class Duration2> constexpr time_point<Clock, typename common_type<duration<Rep1, Period1>, Duration2>::type> operator+( const duration<Rep1, Period1>& lhs, const time_point<Clock, Duration2>& rhs); template <class Clock, class Duration1, class Rep2, class Period2> constexpr time_point<Clock, typename common_type<Duration1, duration<Rep2, Period2> >::type> operator-( const time_point<Clock, Duration1>& lhs, const duration<Rep2, Period2>& rhs); template <class Clock, class Duration1, class Duration2> constexpr typename common_type<Duration1, Duration2>::type operator-( const time_point<Clock, Duration1>& lhs, const time_point<Clock, Duration2>& rhs); template <class Clock, class Duration1, class Duration2> constexpr bool operator==( const time_point<Clock, Duration1>& lhs, const time_point<Clock, Duration2>& rhs); template <class Clock, class Duration1, class Duration2> constexpr bool operator!=( const time_point<Clock, Duration1>& lhs, const time_point<Clock, Duration2>& rhs); template <class Clock, class Duration1, class Duration2> constexpr bool operator< ( const time_point<Clock, Duration1>& lhs, const time_point<Clock, Duration2>& rhs); template <class Clock, class Duration1, class Duration2> constexpr bool operator<=( const time_point<Clock, Duration1>& lhs, const time_point<Clock, Duration2>& rhs); template <class Clock, class Duration1, class Duration2> constexpr bool operator> ( const time_point<Clock, Duration1>& lhs, const time_point<Clock, Duration2>& rhs); template <class Clock, class Duration1, class Duration2> constexpr bool operator>=( const time_point<Clock, Duration1>& lhs, const time_point<Clock, Duration2>& rhs); template <class ToDuration, class Clock, class Duration> inline constexpr time_point<Clock, ToDuration> time_point_cast(const time_point<Clock, Duration>& t); template <class Clock, class Duration> class time_point { static_assert(boost::chrono::detail::is_duration<Duration>::value,"Second template parameter of time_point must be a boost::chrono::duration"); public: typedef Clock clock; typedef Duration duration; typedef typename duration::rep rep; typedef typename duration::period period; typedef Duration difference_type; private: duration d_; public: __attribute__ ((__always_inline__)) constexpr time_point() ; __attribute__ ((__always_inline__)) constexpr explicit time_point(const duration& d) ; template <class Duration2> __attribute__ ((__always_inline__)) constexpr time_point(const time_point<clock, Duration2>& t , typename boost::enable_if < boost::is_convertible<Duration2, duration> >::type* = nullptr ) ; constexpr duration time_since_epoch() const ; time_point& operator+=(const duration& d) ; time_point& operator-=(const duration& d) ; static constexpr time_point min () ; static constexpr time_point max () ; }; template <class Clock, class Duration1, class Rep2, class Period2> constexpr time_point<Clock, typename common_type<Duration1, duration<Rep2, Period2> >::type> operator+(const time_point<Clock, Duration1>& lhs, const duration<Rep2, Period2>& rhs) ; template <class Rep1, class Period1, class Clock, class Duration2> constexpr time_point<Clock, typename common_type<duration<Rep1, Period1>, Duration2>::type> operator+(const duration<Rep1, Period1>& lhs, const time_point<Clock, Duration2>& rhs) ; template <class Clock, class Duration1, class Rep2, class Period2> constexpr time_point<Clock, typename common_type<Duration1, duration<Rep2, Period2> >::type> operator-(const time_point<Clock, Duration1>& lhs, const duration<Rep2, Period2>& rhs) ; template <class Clock, class Duration1, class Duration2> constexpr typename common_type<Duration1, Duration2>::type operator-(const time_point<Clock, Duration1>& lhs, const time_point<Clock, Duration2>& rhs) ; template <class Clock, class Duration1, class Duration2> constexpr bool operator==(const time_point<Clock, Duration1>& lhs, const time_point<Clock, Duration2>& rhs) ; template <class Clock, class Duration1, class Duration2> constexpr bool operator!=(const time_point<Clock, Duration1>& lhs, const time_point<Clock, Duration2>& rhs) ; template <class Clock, class Duration1, class Duration2> constexpr bool operator<(const time_point<Clock, Duration1>& lhs, const time_point<Clock, Duration2>& rhs) ; template <class Clock, class Duration1, class Duration2> constexpr bool operator>(const time_point<Clock, Duration1>& lhs, const time_point<Clock, Duration2>& rhs) ; template <class Clock, class Duration1, class Duration2> constexpr bool operator<=(const time_point<Clock, Duration1>& lhs, const time_point<Clock, Duration2>& rhs) ; template <class Clock, class Duration1, class Duration2> constexpr bool operator>=(const time_point<Clock, Duration1>& lhs, const time_point<Clock, Duration2>& rhs) ; template <class ToDuration, class Clock, class Duration> inline constexpr time_point<Clock, ToDuration> time_point_cast(const time_point<Clock, Duration>& t) { return time_point<Clock, ToDuration>( duration_cast<ToDuration>(t.time_since_epoch())); } } } namespace boost { namespace system { class error_code; template<class T> struct is_error_code_enum { static const bool value = false; }; } } namespace boost { namespace system { class error_category; class error_code; class error_condition; std::size_t hash_value( error_code const & ec ); namespace detail { constexpr bool failed_impl( int ev, error_category const & cat ); class std_category; } #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wnon-virtual-dtor" class __attribute__((__visibility__("default"))) error_category { private: friend std::size_t hash_value( error_code const & ec ); friend constexpr bool detail::failed_impl( int ev, error_category const & cat ); friend class error_code; friend class error_condition; public: error_category( error_category const & ) = delete; error_category& operator=( error_category const & ) = delete; private: boost::ulong_long_type id_; static std::size_t const stdcat_size_ = 4 * sizeof( void const* ); union { mutable unsigned char stdcat_[ stdcat_size_ ]; void const* stdcat_align_; }; mutable std::atomic< unsigned > sc_init_; protected: ~error_category() = default; constexpr error_category() noexcept: id_( 0 ), stdcat_(), sc_init_() { } explicit constexpr error_category( boost::ulong_long_type id ) noexcept: id_( id ), stdcat_(), sc_init_() { } public: virtual const char * name() const noexcept = 0; virtual error_condition default_error_condition( int ev ) const noexcept; virtual bool equivalent( int code, const error_condition & condition ) const noexcept; virtual bool equivalent( const error_code & code, int condition ) const noexcept; virtual std::string message( int ev ) const = 0; virtual char const * message( int ev, char * buffer, std::size_t len ) const noexcept; virtual bool failed( int ev ) const noexcept ; friend constexpr bool operator==( error_category const & lhs, error_category const & rhs ) noexcept ; friend constexpr bool operator!=( error_category const & lhs, error_category const & rhs ) noexcept ; friend constexpr bool operator<( error_category const & lhs, error_category const & rhs ) noexcept ; void init_stdcat() const; operator std::error_category const & () const __attribute__((__visibility__("default"))); }; #pragma GCC diagnostic pop namespace detail { static const boost::ulong_long_type generic_category_id = ( boost::ulong_long_type( 0xB2AB117A ) << 32 ) + 0x257EDFD0; static const boost::ulong_long_type system_category_id = generic_category_id + 1; static const boost::ulong_long_type interop_category_id = generic_category_id + 2; constexpr bool failed_impl( int ev, error_category const & cat ) ; } } } namespace boost { namespace system { namespace detail { char const * strerror_r_helper( char const * r, char const * ) noexcept ; char const * strerror_r_helper( int r, char const * buffer ) noexcept ; char const * generic_error_category_message( int ev, char * buffer, std::size_t len ) noexcept ; inline std::string generic_error_category_message( int ev ) { char buffer[ 128 ]; return generic_error_category_message( ev, buffer, sizeof( buffer ) ); } } } } namespace boost { namespace system { namespace detail { #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wnon-virtual-dtor" class __attribute__((__visibility__("default"))) generic_error_category: public error_category { public: constexpr generic_error_category() noexcept: error_category( detail::generic_category_id ) { } const char * name() const noexcept override { return "generic"; } std::string message( int ev ) const override; char const * message( int ev, char * buffer, std::size_t len ) const noexcept override; }; #pragma GCC diagnostic pop inline char const * generic_error_category::message( int ev, char * buffer, std::size_t len ) const noexcept { return generic_error_category_message( ev, buffer, len ); } } namespace detail { template<class T> struct __attribute__((__visibility__("default"))) generic_cat_holder { static constexpr generic_error_category instance{}; }; } constexpr error_category const & generic_category() noexcept ; } } namespace boost { namespace system { namespace detail { template<bool C, class T = void> struct enable_if { typedef T type; }; template<class T> struct enable_if<false, T> { }; } } } namespace boost { namespace system { namespace detail { template<class T1, class T2> struct is_same { enum _vt { value = 0 }; }; template<class T> struct is_same<T, T> { enum _vt { value = 1 }; }; } } } namespace boost { namespace system { class error_condition; template<class T> struct is_error_condition_enum { static const bool value = false; }; } } namespace boost { namespace system { namespace errc { enum errc_t { success = 0, address_family_not_supported = 97, address_in_use = 98, address_not_available = 99, already_connected = 106, argument_list_too_long = 7, argument_out_of_domain = 33, bad_address = 14, bad_file_descriptor = 9, bad_message = 74, broken_pipe = 32, connection_aborted = 103, connection_already_in_progress = 114, connection_refused = 111, connection_reset = 104, cross_device_link = 18, destination_address_required = 89, device_or_resource_busy = 16, directory_not_empty = 39, executable_format_error = 8, file_exists = 17, file_too_large = 27, filename_too_long = 36, function_not_supported = 38, host_unreachable = 113, identifier_removed = 43, illegal_byte_sequence = 84, inappropriate_io_control_operation = 25, interrupted = 4, invalid_argument = 22, invalid_seek = 29, io_error = 5, is_a_directory = 21, message_size = 90, network_down = 100, network_reset = 102, network_unreachable = 101, no_buffer_space = 105, no_child_process = 10, no_link = 67, no_lock_available = 37, no_message_available = 61, no_message = 42, no_protocol_option = 92, no_space_on_device = 28, no_stream_resources = 63, no_such_device_or_address = 6, no_such_device = 19, no_such_file_or_directory = 2, no_such_process = 3, not_a_directory = 20, not_a_socket = 88, not_a_stream = 60, not_connected = 107, not_enough_memory = 12, not_supported = 95, operation_canceled = 125, operation_in_progress = 115, operation_not_permitted = 1, operation_not_supported = 95, operation_would_block = 11, owner_dead = 130, permission_denied = 13, protocol_error = 71, protocol_not_supported = 93, read_only_file_system = 30, resource_deadlock_would_occur = 35, resource_unavailable_try_again = 11, result_out_of_range = 34, state_not_recoverable = 131, stream_timeout = 62, text_file_busy = 26, timed_out = 110, too_many_files_open_in_system = 23, too_many_files_open = 24, too_many_links = 31, too_many_symbolic_link_levels = 40, value_too_large = 75, wrong_protocol_type = 91 }; } template<> struct is_error_condition_enum<errc::errc_t> { static const bool value = true; }; } } namespace boost { namespace system { namespace detail { __attribute__((__format__ (__printf__, 3, 4))) void snprintf( char * buffer, std::size_t len, char const * format, ... ) ; } } } namespace boost { namespace system { namespace detail { void append_int( std::string& s, int v ) ; } } } namespace boost { namespace system { namespace detail { struct generic_value_tag { int value; constexpr explicit generic_value_tag( int v ) ; }; } class error_condition { private: int val_; error_category const * cat_; private: boost::ulong_long_type cat_id() const noexcept ; public: constexpr error_condition() ; constexpr error_condition( int val, const error_category & cat ) ; constexpr explicit error_condition( boost::system::detail::generic_value_tag vt ) ; template<class ErrorConditionEnum> constexpr error_condition( ErrorConditionEnum e, typename detail::enable_if< is_error_condition_enum<ErrorConditionEnum>::value && !boost::system::detail::is_same<ErrorConditionEnum, errc::errc_t>::value >::type* = 0) noexcept ; template<class ErrorConditionEnum> constexpr error_condition( ErrorConditionEnum e, typename detail::enable_if<boost::system::detail::is_same<ErrorConditionEnum, errc::errc_t>::value>::type* = 0) ; constexpr void assign( int val, const error_category & cat ) noexcept ; template<typename ErrorConditionEnum> constexpr typename detail::enable_if<is_error_condition_enum<ErrorConditionEnum>::value, error_condition>::type & operator=( ErrorConditionEnum val ) noexcept ; constexpr void clear() noexcept ; constexpr int value() const noexcept ; constexpr const error_category & category() const noexcept ; std::string message() const ; char const * message( char * buffer, std::size_t len ) const noexcept ; constexpr bool failed() const noexcept ; constexpr explicit operator bool() const noexcept ; constexpr friend bool operator==( const error_condition & lhs, const error_condition & rhs ) noexcept ; constexpr friend bool operator<( const error_condition & lhs, const error_condition & rhs ) noexcept ; constexpr friend bool operator!=( const error_condition & lhs, const error_condition & rhs ) noexcept ; operator std::error_condition () const ; friend bool operator==( std::error_code const & lhs, error_condition const & rhs ) noexcept ; friend bool operator==( error_condition const & lhs, std::error_code const & rhs ) noexcept ; friend bool operator!=( std::error_code const & lhs, error_condition const & rhs ) noexcept ; inline friend bool operator!=( error_condition const & lhs, std::error_code const & rhs ) noexcept { return !( lhs == rhs ); } template<class E, class N = typename detail::enable_if<std::is_error_condition_enum<E>::value>::type> constexpr inline friend bool operator==( error_condition const & lhs, E rhs ) noexcept { return lhs == make_error_condition( rhs ); } template<class E, class N = typename detail::enable_if<std::is_error_condition_enum<E>::value>::type> constexpr inline friend bool operator==( E lhs, error_condition const & rhs ) noexcept { return make_error_condition( lhs ) == rhs; } template<class E, class N = typename detail::enable_if<std::is_error_condition_enum<E>::value>::type> constexpr inline friend bool operator!=( error_condition const & lhs, E rhs ) noexcept { return !( lhs == rhs ); } template<class E, class N = typename detail::enable_if<std::is_error_condition_enum<E>::value>::type> constexpr inline friend bool operator!=( E lhs, error_condition const & rhs ) noexcept { return !( lhs == rhs ); } template<class E, class N1 = void, class N2 = typename detail::enable_if<std::is_error_code_enum<E>::value>::type> inline friend bool operator==( error_condition const & lhs, E rhs ) noexcept { return lhs == make_error_code( rhs ); } template<class E, class N1 = void, class N2 = typename detail::enable_if<std::is_error_code_enum<E>::value>::type> inline friend bool operator==( E lhs, error_condition const & rhs ) noexcept { return make_error_code( lhs ) == rhs; } template<class E, class N1 = void, class N2 = typename detail::enable_if<std::is_error_code_enum<E>::value>::type> inline friend bool operator!=( error_condition const & lhs, E rhs ) noexcept { return !( lhs == rhs ); } template<class E, class N1 = void, class N2 = typename detail::enable_if<std::is_error_code_enum<E>::value>::type> inline friend bool operator!=( E lhs, error_condition const & rhs ) noexcept { return !( lhs == rhs ); } std::string to_string() const { std::string r( "cond:" ); if( cat_ ) { r += cat_->name(); } else { r += "generic"; } detail::append_int( r, value() ); return r; } template<class Ch, class Tr> inline friend std::basic_ostream<Ch, Tr>& operator<< (std::basic_ostream<Ch, Tr>& os, error_condition const & en) { os << en.to_string(); return os; } }; } } namespace boost { namespace system { namespace detail { #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wnon-virtual-dtor" class __attribute__((__visibility__("default"))) system_error_category: public error_category { public: constexpr system_error_category() noexcept: error_category( detail::system_category_id ) { } const char * name() const noexcept override ; error_condition default_error_condition( int ev ) const noexcept override; std::string message( int ev ) const override; char const * message( int ev, char * buffer, std::size_t len ) const noexcept override; }; #pragma GCC diagnostic pop } namespace detail { template<class T> struct __attribute__((__visibility__("default"))) system_cat_holder { static constexpr system_error_category instance{}; }; } constexpr error_category const & system_category() noexcept ; } } namespace boost { namespace system { namespace detail { std::string system_error_category_message( int ev ) ; char const * system_error_category_message( int ev, char * buffer, std::size_t len ) noexcept ; } } } inline boost::system::error_condition boost::system::detail::system_error_category::default_error_condition( int ev ) const noexcept { return error_condition( boost::system::detail::generic_value_tag( ev ) ); } inline std::string boost::system::detail::system_error_category::message( int ev ) const { return system_error_category_message( ev ); } inline char const * boost::system::detail::system_error_category::message( int ev, char * buffer, std::size_t len ) const noexcept { return system_error_category_message( ev, buffer, len ); } namespace boost { namespace system { namespace detail { #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wnon-virtual-dtor" class __attribute__((__visibility__("default"))) interop_error_category: public error_category { public: constexpr interop_error_category() noexcept: error_category( detail::interop_category_id ) { } const char * name() const noexcept override ; std::string message( int ev ) const override; char const * message( int ev, char * buffer, std::size_t len ) const noexcept override; }; #pragma GCC diagnostic pop template<class T> struct __attribute__((__visibility__("default"))) interop_cat_holder { static constexpr interop_error_category instance{}; }; constexpr error_category const & interop_category() noexcept ; } } } namespace boost { namespace system { namespace detail { template<unsigned Id> struct id_wrapper {}; class __attribute__((__visibility__("default"))) std_category: public std::error_category { private: boost::system::error_category const * pc_; public: boost::system::error_category const & original_category() const noexcept ; public: template<unsigned Id> explicit std_category( boost::system::error_category const * pc, id_wrapper<Id> ) ; const char * name() const noexcept override ; std::string message( int ev ) const override ; std::error_condition default_error_condition( int ev ) const noexcept override ; inline bool equivalent( int code, const std::error_condition & condition ) const noexcept override; inline bool equivalent( const std::error_code & code, int condition ) const noexcept override; }; } } } namespace std { struct source_location { private: using uint_least32_t = unsigned int; struct __impl { const char* _M_file_name; const char* _M_function_name; unsigned _M_line; unsigned _M_column; }; using __builtin_ret_type = decltype(__builtin_source_location()); public: static consteval source_location current(__builtin_ret_type __p = __builtin_source_location()) noexcept ; constexpr source_location() noexcept ; constexpr uint_least32_t line() const noexcept ; constexpr uint_least32_t column() const noexcept ; constexpr const char* file_name() const noexcept ; constexpr const char* function_name() const noexcept ; private: const __impl* _M_impl = nullptr; }; } namespace boost { struct source_location { private: char const * file_; char const * function_; boost::uint_least32_t line_; boost::uint_least32_t column_; public: constexpr source_location() ; constexpr source_location( char const * file, boost::uint_least32_t ln, char const * function, boost::uint_least32_t col = 0 ) ; constexpr source_location( std::source_location const& loc ) ; constexpr char const * file_name() const noexcept ; constexpr char const * function_name() const noexcept ; constexpr boost::uint_least32_t line() const noexcept ; constexpr boost::uint_least32_t column() const noexcept ; std::string to_string() const ; friend bool operator==( source_location const& s1, source_location const& s2 ) noexcept ; friend bool operator!=( source_location const& s1, source_location const& s2 ) noexcept ; }; template<class E, class T> std::basic_ostream<E, T> & operator<<( std::basic_ostream<E, T> & os, source_location const & loc ) ; } namespace boost { namespace system { bool operator==( const error_code & code, const error_condition & condition ) noexcept; std::size_t hash_value( error_code const & ec ); class error_code { private: friend bool operator==( const error_code & code, const error_condition & condition ) noexcept; friend std::size_t hash_value( error_code const & ec ); private: struct data { int val_; const error_category * cat_; }; union { data d1_; unsigned char d2_[ sizeof(std::error_code) ]; }; boost::uintptr_t lc_flags_; private: char const* category_name() const noexcept ; public: constexpr error_code() ; constexpr error_code( int val, const error_category & cat ) ; error_code( int val, const error_category & cat, source_location const * loc ) ; template<class ErrorCodeEnum> constexpr error_code( ErrorCodeEnum e, typename detail::enable_if< is_error_code_enum<ErrorCodeEnum>::value || std::is_error_code_enum<ErrorCodeEnum>::value >::type* = 0 ) ; error_code( error_code const& ec, source_location const * loc ) ; error_code( std::error_code const& ec ) ; constexpr void assign( int val, const error_category & cat ) noexcept ; void assign( int val, const error_category & cat, source_location const * loc ) noexcept ; void assign( error_code const& ec, source_location const * loc ) noexcept ; template<typename ErrorCodeEnum> constexpr typename detail::enable_if<is_error_code_enum<ErrorCodeEnum>::value, error_code>::type & operator=( ErrorCodeEnum val ) noexcept ; constexpr void clear() noexcept ; constexpr int value() const noexcept ; constexpr const error_category & category() const noexcept ; error_condition default_error_condition() const noexcept ; std::string message() const ; char const * message( char * buffer, std::size_t len ) const noexcept ; constexpr bool failed() const noexcept ; constexpr explicit operator bool() const noexcept ; bool has_location() const noexcept ; source_location const & location() const noexcept ; private: friend class error_category; constexpr bool equals( int val, error_category const& cat ) const noexcept ; public: constexpr friend bool operator==( const error_code & lhs, const error_code & rhs ) noexcept ; constexpr friend bool operator<( const error_code & lhs, const error_code & rhs ) noexcept ; constexpr friend bool operator!=( const error_code & lhs, const error_code & rhs ) noexcept ; friend bool operator==( std::error_code const & lhs, error_code const & rhs ) noexcept ; friend bool operator==( error_code const & lhs, std::error_code const & rhs ) noexcept ; friend bool operator!=( std::error_code const & lhs, error_code const & rhs ) noexcept ; friend bool operator!=( error_code const & lhs, std::error_code const & rhs ) noexcept ; template<class E, class N = typename detail::enable_if<std::is_error_condition_enum<E>::value>::type> inline friend bool operator==( error_code const & lhs, E rhs ) noexcept { return lhs == make_error_condition( rhs ); } template<class E, class N = typename detail::enable_if<std::is_error_condition_enum<E>::value>::type> inline friend bool operator==( E lhs, error_code const & rhs ) noexcept { return make_error_condition( lhs ) == rhs; } template<class E, class N = typename detail::enable_if<std::is_error_condition_enum<E>::value>::type> inline friend bool operator!=( error_code const & lhs, E rhs ) noexcept { return !( lhs == rhs ); } template<class E, class N = typename detail::enable_if<std::is_error_condition_enum<E>::value>::type> inline friend bool operator!=( E lhs, error_code const & rhs ) noexcept { return !( lhs == rhs ); } template<class E, class N1 = void, class N2 = typename detail::enable_if<std::is_error_code_enum<E>::value>::type> constexpr inline friend bool operator==( error_code const & lhs, E rhs ) noexcept { return lhs == make_error_code( rhs ); } template<class E, class N1 = void, class N2 = typename detail::enable_if<std::is_error_code_enum<E>::value>::type> constexpr inline friend bool operator==( E lhs, error_code const & rhs ) noexcept { return make_error_code( lhs ) == rhs; } template<class E, class N1 = void, class N2 = typename detail::enable_if<std::is_error_code_enum<E>::value>::type> constexpr inline friend bool operator!=( error_code const & lhs, E rhs ) noexcept { return !( lhs == rhs ); } template<class E, class N1 = void, class N2 = typename detail::enable_if<std::is_error_code_enum<E>::value>::type> constexpr inline friend bool operator!=( E lhs, error_code const & rhs ) noexcept { return !( lhs == rhs ); } operator std::error_code () const ; operator std::error_code () ; template<class T, class E = typename detail::enable_if<detail::is_same<T, std::error_code>::value>::type> operator T& () ; std::string to_string() const ; template<class Ch, class Tr> friend std::basic_ostream<Ch, Tr>& operator<< (std::basic_ostream<Ch, Tr>& os, error_code const & ec) ; std::string what() const ; }; bool operator==( const error_code & code, const error_condition & condition ) noexcept ; bool operator==( const error_condition & condition, const error_code & code ) noexcept ; bool operator!=( const error_code & lhs, const error_condition & rhs ) noexcept ; bool operator!=( const error_condition & lhs, const error_code & rhs ) noexcept ; std::size_t hash_value( error_code const & ec ) ; } } namespace boost { namespace system { } } namespace boost { namespace system { namespace detail { } } } namespace boost { namespace system { namespace detail { using std::mutex; } } } namespace boost { namespace system { namespace detail { template<class Mtx> class lock_guard { private: Mtx& mtx_; private: lock_guard( lock_guard const& ); lock_guard& operator=( lock_guard const& ); public: explicit lock_guard( Mtx& mtx ) ; ~lock_guard() ; }; } } } namespace boost { namespace system { } } namespace boost { namespace system { namespace errc { constexpr error_code make_error_code( errc_t e ) noexcept ; error_code make_error_code( errc_t e, boost::source_location const * loc ) noexcept ; constexpr error_condition make_error_condition( errc_t e ) noexcept ; } } } namespace boost { namespace system { class error_code; } namespace detail { system::error_code* throws() ; } system::error_code& throws() ; } namespace boost { namespace chrono { bool is_throws(system::error_code & ec) ; } } namespace boost { namespace chrono { template<class Clock, class CharT> struct clock_string; } } namespace boost { namespace chrono { class thread_clock { public: typedef nanoseconds duration; typedef duration::rep rep; typedef duration::period period; typedef chrono::time_point<thread_clock> time_point; static constexpr bool is_steady = true; static time_point now( ) noexcept; static time_point now( system::error_code & ec ); }; template <class CharT> struct clock_string<thread_clock, CharT> { static std::basic_string<CharT> name() ; static std::basic_string<CharT> since() ; }; } } namespace dwarfs { struct iolayer; std::string time_with_unit(double sec); std::string time_with_unit(std::chrono::nanoseconds ns); std::string size_with_unit(size_t size); size_t parse_size_with_unit(std::string const& str); std::chrono::milliseconds parse_time_with_unit(std::string const& str); std::chrono::system_clock::time_point parse_time_point(std::string const& str); file_off_t parse_image_offset(std::string const& str); std::u8string string_to_u8string(std::string const& in) ; std::string u8string_to_string(std::u8string const& in) ; std::string sys_string_to_string(sys_string const& in); sys_string string_to_sys_string(std::string const& in); int call_sys_main_iolayer(std::span<std::string_view> args, iolayer const& iol, int (*main)(int, sys_char**, iolayer const&)); int call_sys_main_iolayer(std::span<std::string> args, iolayer const& iol, int (*main)(int, sys_char**, iolayer const&)); size_t utf8_display_width(char const* p, size_t len); size_t utf8_display_width(std::string const& str); void utf8_truncate(std::string& str, size_t len); void utf8_sanitize(std::string& str); void shorten_path_string(std::string& path, char separator, size_t max_len); std::filesystem::path canonical_path(std::filesystem::path p); bool getenv_is_enabled(char const* var); void setup_default_locale(); std::string_view basename(std::string_view path); } namespace dwarfs { class terminal; class logger { public: enum level_type : unsigned { FATAL, ERROR, WARN, INFO, VERBOSE, DEBUG, TRACE }; static char level_char(level_type level) ; virtual ~logger() = default; virtual void write(level_type level, const std::string& output, char const* file, int line) = 0; const std::string& policy_name() const ; template <class Policy> void set_policy() ; void set_policy_name(const std::string& name) ; static level_type parse_level(std::string_view level); static std::string_view level_name(level_type level); static std::string all_level_names(); private: std::string policy_name_; }; std::ostream& operator<<(std::ostream& os, logger::level_type const& optval); std::istream& operator>>(std::istream& is, logger::level_type& optval); struct logger_options { logger::level_type threshold{logger::WARN}; std::optional<bool> with_context{}; }; class stream_logger : public logger { public: stream_logger(std::shared_ptr<terminal const> term, std::ostream& os, logger_options const& options = {}); void write(level_type level, const std::string& output, char const* file, int line) override; void set_threshold(level_type threshold); void set_with_context(bool with_context) ; protected: virtual void preamble(std::ostream& os); virtual void postamble(std::ostream& os); virtual std::string_view get_newline() const; void write_nolock(std::string_view output); std::mutex& log_mutex() const ; bool log_is_colored() const ; level_type log_threshold() const ; terminal const& term() const ; private: std::ostream& os_; std::mutex mutable mx_; std::atomic<level_type> threshold_; bool const color_; bool const enable_stack_trace_; bool with_context_; std::shared_ptr<terminal const> term_; }; class null_logger : public logger { public: null_logger() = default; void write(level_type, const std::string&, char const*, int) override ; }; class level_logger { public: level_logger(logger& lgr, logger::level_type level, char const* file = nullptr, int line = 0) ; level_logger(level_logger const&) = delete; ~level_logger() ; template <typename T> level_logger& operator<<(const T& val) ; private: logger& lgr_; std::ostringstream oss_; logger::level_type const level_; char const* const file_; int const line_; }; class timed_level_logger { public: using thread_clock = boost::chrono::thread_clock; timed_level_logger(logger& lgr, logger::level_type level, char const* file = nullptr, int line = 0, bool with_cpu = false) ; timed_level_logger(timed_level_logger const&) = delete; ~timed_level_logger() ; template <typename T> timed_level_logger& operator<<(const T& val) ; private: logger& lgr_; std::ostringstream oss_; logger::level_type const level_; std::chrono::time_point<std::chrono::high_resolution_clock> start_time_; thread_clock::time_point cpu_start_time_; bool output_{false}; bool const with_cpu_; char const* const file_; int const line_; }; class no_logger { public: no_logger(logger&, logger::level_type) ; no_logger(logger&, logger::level_type, char const*, int) ; template <typename T> no_logger& operator<<(const T&) ; }; namespace detail { template <bool LoggingEnabled> using logger_type = typename std::conditional<LoggingEnabled, level_logger, no_logger>::type; template <bool LoggingEnabled> using timed_logger_type = typename std::conditional<LoggingEnabled, timed_level_logger, no_logger>::type; } template <unsigned MinLogLevel> class MinimumLogLevelPolicy { public: template <unsigned Level> using logger_type = detail::logger_type<Level <= MinLogLevel>; template <unsigned Level> using timed_logger_type = detail::timed_logger_type<Level <= MinLogLevel>; static constexpr bool is_enabled_for(logger::level_type level) { return level <= MinLogLevel; } }; template <typename LogPolicy> class log_proxy { public: log_proxy(logger& lgr) : lgr_(lgr) {} static constexpr bool is_enabled_for(logger::level_type level) { return LogPolicy::is_enabled_for(level); } auto fatal(char const* file, int line) const { return level_logger(lgr_, logger::FATAL, file, line); } auto error(char const* file, int line) const { return typename LogPolicy::template logger_type<logger::ERROR>( lgr_, logger::ERROR, file, line); } auto warn(char const* file, int line) const { return typename LogPolicy::template logger_type<logger::WARN>( lgr_, logger::WARN, file, line); } auto info(char const* file, int line) const { return typename LogPolicy::template logger_type<logger::INFO>( lgr_, logger::INFO, file, line); } auto verbose(char const* file, int line) const { return typename LogPolicy::template logger_type<logger::VERBOSE>( lgr_, logger::VERBOSE, file, line); } auto debug(char const* file, int line) const { return typename LogPolicy::template logger_type<logger::DEBUG>( lgr_, logger::DEBUG, file, line); } auto trace(char const* file, int line) const { return typename LogPolicy::template logger_type<logger::TRACE>( lgr_, logger::TRACE, file, line); } auto timed_error(char const* file, int line) const { return typename LogPolicy::template timed_logger_type<logger::ERROR>( lgr_, logger::ERROR, file, line); } auto timed_warn(char const* file, int line) const { return typename LogPolicy::template timed_logger_type<logger::WARN>( lgr_, logger::WARN, file, line); } auto timed_info(char const* file, int line) const { return typename LogPolicy::template timed_logger_type<logger::INFO>( lgr_, logger::INFO, file, line); } auto timed_verbose(char const* file, int line) const { return typename LogPolicy::template timed_logger_type<logger::VERBOSE>( lgr_, logger::VERBOSE, file, line); } auto timed_debug(char const* file, int line) const { return typename LogPolicy::template timed_logger_type<logger::DEBUG>( lgr_, logger::DEBUG, file, line); } auto timed_trace(char const* file, int line) const { return typename LogPolicy::template timed_logger_type<logger::TRACE>( lgr_, logger::TRACE, file, line); } auto cpu_timed_error(char const* file, int line) const { return typename LogPolicy::template timed_logger_type<logger::ERROR>( lgr_, logger::ERROR, file, line, true); } auto cpu_timed_warn(char const* file, int line) const { return typename LogPolicy::template timed_logger_type<logger::WARN>( lgr_, logger::WARN, file, line, true); } auto cpu_timed_info(char const* file, int line) const { return typename LogPolicy::template timed_logger_type<logger::INFO>( lgr_, logger::INFO, file, line, true); } auto cpu_timed_verbose(char const* file, int line) const { return typename LogPolicy::template timed_logger_type<logger::VERBOSE>( lgr_, logger::VERBOSE, file, line, true); } auto cpu_timed_debug(char const* file, int line) const ; auto cpu_timed_trace(char const* file, int line) const ; logger& get_logger() const ; private: logger& lgr_; }; class prod_logger_policy : public MinimumLogLevelPolicy<logger::VERBOSE> { public: static std::string name() ; }; class debug_logger_policy : public MinimumLogLevelPolicy<logger::TRACE> { public: static std::string name() { return "debug"; } }; using logger_policies = std::tuple<debug_logger_policy, prod_logger_policy>; template <class T> struct unique_ptr_policy { using return_type = std::unique_ptr<T>; template <class U, class... Args> static return_type create(Args&&... args) { return std::make_unique<U>(std::forward<Args>(args)...); } }; template <class T> struct shared_ptr_policy { using return_type = std::shared_ptr<T>; template <class U, class... Args> static return_type create(Args&&... args) { return std::make_shared<U>(std::forward<Args>(args)...); } }; template <template <class> class T, class CreatePolicy, class LoggerPolicyList, size_t N> struct logging_class_factory { template <class... Args> static typename CreatePolicy::return_type create(logger& lgr, Args&&... args) { if (std::tuple_element<N - 1, LoggerPolicyList>::type::name() == lgr.policy_name()) { using obj_type = T<typename std::tuple_element<N - 1, LoggerPolicyList>::type>; return CreatePolicy::template create<obj_type>( lgr, std::forward<Args>(args)...); } return logging_class_factory<T, CreatePolicy, LoggerPolicyList, N - 1>::create(lgr, std::forward<Args>(args)...); } }; template <template <class> class T, class CreatePolicy, class LoggerPolicyList> struct logging_class_factory<T, CreatePolicy, LoggerPolicyList, 0> { template <class... Args> static typename CreatePolicy::return_type create(logger& lgr, Args&&...) { throw runtime_error("no such logger policy: " + lgr.policy_name(), "/home/mhx/git/github/dwarfs/include/dwarfs/logger.h", 454); } }; template <class Base, template <class> class T, class LoggerPolicyList, class... Args> std::unique_ptr<Base> make_unique_logging_object(logger& lgr, Args&&... args) { return logging_class_factory< T, unique_ptr_policy<Base>, LoggerPolicyList, std::tuple_size<LoggerPolicyList>::value>::create(lgr, std::forward<Args>( args)...); } template <class Base, template <class> class T, class LoggerPolicyList, class... Args> std::shared_ptr<Base> make_shared_logging_object(logger& lgr, Args&&... args) ; std::string get_logger_context(char const* path, int line); std::string get_current_time_string(); } namespace boost { namespace detail{ template <class T> struct is_abstract_imp { static const bool value = __is_abstract(T); }; } template <class T> struct is_abstract : public integral_constant<bool, ::boost::detail::is_abstract_imp<T>::value> {}; } namespace boost { namespace detail { template <typename B, typename D> struct is_base_and_derived_impl { typedef typename remove_cv<B>::type ncvB; typedef typename remove_cv<D>::type ncvD; static const bool value = ((__is_base_of(B,D) && !is_same<B,D>::value) && ! ::boost::is_same<ncvB,ncvD>::value); }; } template <class Base, class Derived> struct is_base_and_derived : public integral_constant<bool, (::boost::detail::is_base_and_derived_impl<Base, Derived>::value)> {}; template <class Base, class Derived> struct is_base_and_derived<Base&, Derived> : public false_type{}; template <class Base, class Derived> struct is_base_and_derived<Base, Derived&> : public false_type{}; template <class Base, class Derived> struct is_base_and_derived<Base&, Derived&> : public false_type{}; } namespace boost { template<typename C, typename Enabler> struct range_iterator; template<typename C, typename Enabler> struct range_mutable_iterator; template<typename C, typename Enabler> struct range_const_iterator; template<typename IteratorT> class iterator_range; template<typename ForwardRange> class sub_range; template<typename T> struct range_category; template<typename T> struct range_difference; template<typename T> struct range_pointer; template<typename T> struct range_reference; template<typename T> struct range_reverse_iterator; template<typename T> struct range_size; template<typename T> struct range_value; template<typename T> struct has_range_iterator; template<typename T> struct has_range_const_iterator; } namespace boost { namespace range_detail { template< typename T, typename fallback_ = boost::mpl::bool_<false> > struct has_iterator { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper<U> const volatile* , boost::mpl::aux::type_wrapper<typename U::iterator>* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper<T> t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast<t_*>(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_<value> type; }; template< typename C, bool B = has_iterator<C>::value > struct extract_iterator {}; template< typename C > struct extract_iterator< C, true > { typedef typename C::iterator type; }; template< typename C > struct range_mutable_iterator : range_detail::extract_iterator< typename remove_reference<C>::type> {}; template< typename Iterator > struct range_mutable_iterator< std::pair<Iterator,Iterator> > { typedef Iterator type; }; template< typename T, std::size_t sz > struct range_mutable_iterator< T[sz] > { typedef T* type; }; } template<typename C, typename Enabler=void> struct range_mutable_iterator : range_detail::range_mutable_iterator< typename remove_reference<C>::type > { }; } namespace boost { namespace range_detail { template< typename T, typename fallback_ = boost::mpl::bool_<false> > struct has_const_iterator { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper<U> const volatile* , boost::mpl::aux::type_wrapper<typename U::const_iterator>* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper<T> t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast<t_*>(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_<value> type; }; template< typename C, bool B = has_const_iterator<C>::value > struct extract_const_iterator {}; template< typename C > struct extract_const_iterator< C, true > { typedef typename C::const_iterator type; }; template< typename C > struct range_const_iterator_helper : extract_const_iterator<C> {}; template< typename Iterator > struct range_const_iterator_helper<std::pair<Iterator,Iterator> > { typedef Iterator type; }; template< typename T, std::size_t sz > struct range_const_iterator_helper< T[sz] > { typedef const T* type; }; } template<typename C, typename Enabler=void> struct range_const_iterator : range_detail::range_const_iterator_helper< typename remove_reference<C>::type > { }; } namespace boost { template< typename C, typename Enabler=void > struct range_iterator : mpl::if_c< is_const<typename remove_reference<C>::type>::value, range_const_iterator<typename remove_const<typename remove_reference<C>::type>::type>, range_mutable_iterator<typename remove_reference<C>::type> >::type { }; } namespace boost { namespace range_detail { template< typename C > constexpr typename range_iterator<C>::type range_begin( C& c ) ; template< typename Iterator > constexpr Iterator range_begin( const std::pair<Iterator,Iterator>& p ) ; template< typename Iterator > constexpr Iterator range_begin( std::pair<Iterator,Iterator>& p ) ; template< typename T, std::size_t sz > constexpr const T* range_begin( const T (&a)[sz] ) noexcept ; template< typename T, std::size_t sz > constexpr T* range_begin( T (&a)[sz] ) noexcept ; } namespace range_adl_barrier { template< class T > constexpr typename range_iterator<T>::type begin( T& r ) ; template< class T > constexpr typename range_iterator<const T>::type begin( const T& r ) ; } } namespace boost { namespace range_adl_barrier { template< class T > typename range_iterator<const T>::type const_begin( const T& r ) ; } using namespace range_adl_barrier; } namespace boost { namespace range_detail { using type_traits::yes_type; using type_traits::no_type; yes_type is_string_impl( const char* const ); yes_type is_string_impl( const wchar_t* const ); no_type is_string_impl( ... ); template< std::size_t sz > yes_type is_char_array_impl( char (&boost_range_array)[sz] ); template< std::size_t sz > yes_type is_char_array_impl( const char (&boost_range_array)[sz] ); no_type is_char_array_impl( ... ); template< std::size_t sz > yes_type is_wchar_t_array_impl( wchar_t (&boost_range_array)[sz] ); template< std::size_t sz > yes_type is_wchar_t_array_impl( const wchar_t (&boost_range_array)[sz] ); no_type is_wchar_t_array_impl( ... ); yes_type is_char_ptr_impl( char* const ); no_type is_char_ptr_impl( ... ); yes_type is_const_char_ptr_impl( const char* const ); no_type is_const_char_ptr_impl( ... ); yes_type is_wchar_t_ptr_impl( wchar_t* const ); no_type is_wchar_t_ptr_impl( ... ); yes_type is_const_wchar_t_ptr_impl( const wchar_t* const ); no_type is_const_wchar_t_ptr_impl( ... ); template< typename Iterator > yes_type is_pair_impl( const std::pair<Iterator,Iterator>* ); no_type is_pair_impl( ... ); struct char_or_wchar_t_array_tag {}; } } namespace boost { namespace range_detail { typedef mpl::int_<1>::type std_container_; typedef mpl::int_<2>::type std_pair_; typedef mpl::int_<3>::type const_std_pair_; typedef mpl::int_<4>::type array_; typedef mpl::int_<5>::type const_array_; typedef mpl::int_<6>::type char_array_; typedef mpl::int_<7>::type wchar_t_array_; typedef mpl::int_<8>::type char_ptr_; typedef mpl::int_<9>::type const_char_ptr_; typedef mpl::int_<10>::type wchar_t_ptr_; typedef mpl::int_<11>::type const_wchar_t_ptr_; typedef mpl::int_<12>::type string_; template< typename C > struct range_helper { static C* c; static C ptr; static const bool is_pair_ = sizeof( boost::range_detail::is_pair_impl( c ) ) == sizeof( yes_type ); static const bool is_char_ptr_ = sizeof( boost::range_detail::is_char_ptr_impl( ptr ) ) == sizeof( yes_type ); static const bool is_const_char_ptr_ = sizeof( boost::range_detail::is_const_char_ptr_impl( ptr ) ) == sizeof( yes_type ); static const bool is_wchar_t_ptr_ = sizeof( boost::range_detail::is_wchar_t_ptr_impl( ptr ) ) == sizeof( yes_type ); static const bool is_const_wchar_t_ptr_ = sizeof( boost::range_detail::is_const_wchar_t_ptr_impl( ptr ) ) == sizeof( yes_type ); static const bool is_char_array_ = sizeof( boost::range_detail::is_char_array_impl( ptr ) ) == sizeof( yes_type ); static const bool is_wchar_t_array_ = sizeof( boost::range_detail::is_wchar_t_array_impl( ptr ) ) == sizeof( yes_type ); static const bool is_string_ = (is_const_char_ptr_ || is_const_wchar_t_ptr_); static const bool is_array_ = boost::is_array<C>::value; }; template< typename C > class range { typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper<C>::is_pair_, boost::range_detail::std_pair_, void >::type pair_t; typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper<C>::is_array_, boost::range_detail::array_, pair_t >::type array_t; typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper<C>::is_string_, boost::range_detail::string_, array_t >::type string_t; typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper<C>::is_const_char_ptr_, boost::range_detail::const_char_ptr_, string_t >::type const_char_ptr_t; typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper<C>::is_char_ptr_, boost::range_detail::char_ptr_, const_char_ptr_t >::type char_ptr_t; typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper<C>::is_const_wchar_t_ptr_, boost::range_detail::const_wchar_t_ptr_, char_ptr_t >::type const_wchar_ptr_t; typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper<C>::is_wchar_t_ptr_, boost::range_detail::wchar_t_ptr_, const_wchar_ptr_t >::type wchar_ptr_t; typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper<C>::is_wchar_t_array_, boost::range_detail::wchar_t_array_, wchar_ptr_t >::type wchar_array_t; typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper<C>::is_char_array_, boost::range_detail::char_array_, wchar_array_t >::type char_array_t; public: typedef typename boost::mpl::if_c< ::boost::is_void<char_array_t>::value, boost::range_detail::std_container_, char_array_t >::type type; }; } } namespace boost { namespace range_detail { template <typename T> void boost_range_silence_warning( const T& ) ; const char* str_end( const char* s, const char* ) ; const wchar_t* str_end( const wchar_t* s, const wchar_t* ) ; template< class Char > Char* str_end( Char* s ) ; template< class T, std::size_t sz > constexpr T* array_end( T (&boost_range_array)[sz] ) noexcept ; template< class T, std::size_t sz > constexpr const T* array_end( const T (&boost_range_array)[sz] ) noexcept ; template< class Char > std::size_t str_size( const Char* const& s ) ; template< class T, std::size_t sz > std::size_t array_size( T (&boost_range_array)[sz] ) ; template< class T, std::size_t sz > std::size_t array_size( const T (&boost_range_array)[sz] ) ; bool is_same_address(const void* l, const void* r) ; template<class T1, class T2> bool is_same_object(const T1& l, const T2& r) ; } } namespace boost { namespace range_detail { template< typename C > constexpr typename range_iterator<C>::type range_end( C& c ) ; template< typename Iterator > constexpr Iterator range_end( const std::pair<Iterator,Iterator>& p ) ; template< typename Iterator > constexpr Iterator range_end( std::pair<Iterator,Iterator>& p ) ; template< typename T, std::size_t sz > constexpr const T* range_end( const T (&a)[sz] ) noexcept ; template< typename T, std::size_t sz > constexpr T* range_end( T (&a)[sz] ) noexcept ; } namespace range_adl_barrier { template< class T > constexpr typename range_iterator<T>::type end( T& r ) ; template< class T > constexpr typename range_iterator<const T>::type end( const T& r ) ; } } namespace boost { namespace range_adl_barrier { template< class T > constexpr typename range_iterator<const T>::type const_end( const T& r ) ; } using namespace range_adl_barrier; } namespace boost { namespace range_detail { template< typename T, typename fallback_ = boost::mpl::bool_<false> > struct has_type { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper<U> const volatile* , boost::mpl::aux::type_wrapper<typename U::type>* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper<T> t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast<t_*>(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_<value> type; }; template<class T, class Enabler = void> struct has_range_iterator_impl : boost::mpl::false_ { }; template<class T> struct has_range_iterator_impl< T, typename ::boost::enable_if< typename mpl::eval_if<is_const<T>, has_type<boost::range_const_iterator< typename remove_const<T>::type> >, has_type<boost::range_mutable_iterator<T> > >::type >::type > : boost::mpl::true_ { }; template<class T, class Enabler = void> struct has_range_const_iterator_impl : boost::mpl::false_ { }; template<class T> struct has_range_const_iterator_impl< T, typename ::boost::enable_if< has_type<boost::range_const_iterator<T> > >::type > : boost::mpl::true_ { }; } template<class T> struct has_range_iterator : range_detail::has_range_iterator_impl< typename remove_reference<T>::type> {}; template<class T> struct has_range_const_iterator : range_detail::has_range_const_iterator_impl< typename remove_reference<T>::type> {}; } namespace boost { namespace range_detail { template< class T, bool B = has_type<range_iterator<T> >::value > struct range_difference { }; template< class T > struct range_difference<T, true> : iterator_difference< typename range_iterator<T>::type > { }; } template< class T > struct range_difference : range_detail::range_difference<typename remove_reference<T>::type> { }; } namespace boost { namespace concepts {} } namespace boost { namespace concepts { namespace detail { typedef char yes; typedef char (&no)[2]; template <class Model, void (Model::*)()> struct wrap_constraints {}; template <class Model> inline yes has_constraints_(Model*, wrap_constraints<Model,&Model::constraints>* = 0); inline no has_constraints_(...); } template <class Model> struct not_satisfied { static const bool value = sizeof( detail::has_constraints_((Model*)0) ) == sizeof(detail::yes); typedef boost::integral_constant<bool, value> type; }; }} namespace boost { namespace concepts { template <class ModelFn> struct requirement_; namespace detail { template <void(*)()> struct instantiate {}; } template <class Model> struct requirement { static void failed() ; }; struct failed {}; template <class Model> struct requirement<failed ************ Model::************> { static void failed() ; }; template <class Model> struct constraint { static void failed() ; }; template <class Model> struct requirement_<void(*)(Model)> : boost::conditional< concepts::not_satisfied<Model>::value , constraint<Model> , requirement<failed ************ Model::************> >::type {}; }} namespace boost { namespace concepts { template <class Model> struct usage_requirements { ~usage_requirements() ; }; }} namespace boost { template <class Model> void function_requires(Model* = 0) ; template <class T> void ignore_unused_variable_warning(T const&) ; template < typename T > struct Integer; template < typename T > struct IntegerConcept : Integer< T > { }; template < typename T > struct Integer { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<Integer>)>::failed> boost_concept_check72 __attribute__((__unused__)); ~Integer() ; private: T x; }; template <> struct Integer<char> {}; template <> struct Integer<signed char> {}; template <> struct Integer<unsigned char> {}; template <> struct Integer<short> {}; template <> struct Integer<unsigned short> {}; template <> struct Integer<int> {}; template <> struct Integer<unsigned int> {}; template <> struct Integer<long> {}; template <> struct Integer<unsigned long> {}; template <> struct Integer< ::boost::long_long_type> {}; template <> struct Integer< ::boost::ulong_long_type> {}; template < typename T > struct SignedInteger; template < typename T > struct SignedIntegerConcept : SignedInteger< T > { }; template < typename T > struct SignedInteger { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<SignedInteger>)>::failed> boost_concept_check98 __attribute__((__unused__)); ~SignedInteger() ; private: T x; }; template <> struct SignedInteger<signed char> { }; template <> struct SignedInteger<short> {}; template <> struct SignedInteger<int> {}; template <> struct SignedInteger<long> {}; template <> struct SignedInteger< ::boost::long_long_type> {}; template < typename T > struct UnsignedInteger; template < typename T > struct UnsignedIntegerConcept : UnsignedInteger< T > { }; template < typename T > struct UnsignedInteger { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<UnsignedInteger>)>::failed> boost_concept_check115 __attribute__((__unused__)); ~UnsignedInteger() ; private: T x; }; template <> struct UnsignedInteger<unsigned char> {}; template <> struct UnsignedInteger<unsigned short> {}; template <> struct UnsignedInteger<unsigned int> {}; template <> struct UnsignedInteger<unsigned long> {}; template <> struct UnsignedInteger< ::boost::ulong_long_type> {}; template < typename TT > struct DefaultConstructible; template < typename TT > struct DefaultConstructibleConcept : DefaultConstructible< TT > { }; template < typename TT > struct DefaultConstructible { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<DefaultConstructible>)>::failed> boost_concept_check137 __attribute__((__unused__)); ~DefaultConstructible() ; }; template < typename TT > struct Assignable; template < typename TT > struct AssignableConcept : Assignable< TT > { }; template < typename TT > struct Assignable { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<Assignable>)>::failed> boost_concept_check145 __attribute__((__unused__)); ~Assignable() ; private: void const_constraints(const TT& x) ; private: TT a; TT b; }; template < typename TT > struct CopyConstructible; template < typename TT > struct CopyConstructibleConcept : CopyConstructible< TT > { }; template < typename TT > struct CopyConstructible { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<CopyConstructible>)>::failed> boost_concept_check167 __attribute__((__unused__)); ~CopyConstructible() ; private: void const_constraints(const TT& a) ; TT b; }; template < typename TT > struct SGIAssignable; template < typename TT > struct SGIAssignableConcept : SGIAssignable< TT > { }; template < typename TT > struct SGIAssignable { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<SGIAssignable>)>::failed> boost_concept_check186 __attribute__((__unused__)); ~SGIAssignable() ; private: void const_constraints(const TT& x) ; TT a; TT b; }; template < typename X , typename Y > struct Convertible; template < typename X , typename Y > struct ConvertibleConcept : Convertible< X, Y > { }; template < typename X , typename Y > struct Convertible { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<Convertible>)>::failed> boost_concept_check208 __attribute__((__unused__)); ~Convertible() ; private: X x; }; template <class TT> void require_boolean_expr(const TT& t) ; template < typename TT > struct EqualityComparable; template < typename TT > struct EqualityComparableConcept : EqualityComparable< TT > { }; template < typename TT > struct EqualityComparable { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<EqualityComparable>)>::failed> boost_concept_check233 __attribute__((__unused__)); ~EqualityComparable() ; private: TT a, b; }; template < typename TT > struct LessThanComparable; template < typename TT > struct LessThanComparableConcept : LessThanComparable< TT > { }; template < typename TT > struct LessThanComparable { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<LessThanComparable>)>::failed> boost_concept_check243 __attribute__((__unused__)); ~LessThanComparable() ; private: TT a, b; }; template < typename TT > struct Comparable; template < typename TT > struct ComparableConcept : Comparable< TT > { }; template < typename TT > struct Comparable { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<Comparable>)>::failed> boost_concept_check253 __attribute__((__unused__)); ~Comparable() ; private: TT a, b; }; template < typename First , typename Second > struct EqualOp; template < typename First , typename Second > struct EqualOpConcept : EqualOp< First, Second > { }; template < typename First , typename Second > struct EqualOp { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<EqualOp>)>::failed> boost_concept_check283 __attribute__((__unused__)); ~EqualOp() ; private: bool constraints_() ; First a; Second b; }; template < typename First , typename Second > struct NotEqualOp; template < typename First , typename Second > struct NotEqualOpConcept : NotEqualOp< First, Second > { }; template < typename First , typename Second > struct NotEqualOp { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<NotEqualOp>)>::failed> boost_concept_check284 __attribute__((__unused__)); ~NotEqualOp() ; private: bool constraints_() ; First a; Second b; }; template < typename First , typename Second > struct LessThanOp; template < typename First , typename Second > struct LessThanOpConcept : LessThanOp< First, Second > { }; template < typename First , typename Second > struct LessThanOp { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<LessThanOp>)>::failed> boost_concept_check285 __attribute__((__unused__)); ~LessThanOp() ; private: bool constraints_() ; First a; Second b; }; template < typename First , typename Second > struct LessEqualOp; template < typename First , typename Second > struct LessEqualOpConcept : LessEqualOp< First, Second > { }; template < typename First , typename Second > struct LessEqualOp { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<LessEqualOp>)>::failed> boost_concept_check286 __attribute__((__unused__)); ~LessEqualOp() ; private: bool constraints_() ; First a; Second b; }; template < typename First , typename Second > struct GreaterThanOp; template < typename First , typename Second > struct GreaterThanOpConcept : GreaterThanOp< First, Second > { }; template < typename First , typename Second > struct GreaterThanOp { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<GreaterThanOp>)>::failed> boost_concept_check287 __attribute__((__unused__)); ~GreaterThanOp() { (void)constraints_(); } private: bool constraints_() { return a > b; } First a; Second b; }; template < typename First , typename Second > struct GreaterEqualOp; template < typename First , typename Second > struct GreaterEqualOpConcept : GreaterEqualOp< First, Second > { }; template < typename First , typename Second > struct GreaterEqualOp { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<GreaterEqualOp>)>::failed> boost_concept_check288 __attribute__((__unused__)); ~GreaterEqualOp() ; private: bool constraints_() ; First a; Second b; }; template < typename Ret , typename First , typename Second > struct PlusOp; template < typename Ret , typename First , typename Second > struct PlusOpConcept : PlusOp< Ret, First, Second > { }; template < typename Ret , typename First , typename Second > struct PlusOp { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<PlusOp>)>::failed> boost_concept_check290 __attribute__((__unused__)); ~PlusOp() ; private: Ret constraints_() ; First a; Second b; }; template < typename Ret , typename First , typename Second > struct TimesOp; template < typename Ret , typename First , typename Second > struct TimesOpConcept : TimesOp< Ret, First, Second > { }; template < typename Ret , typename First , typename Second > struct TimesOp { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<TimesOp>)>::failed> boost_concept_check291 __attribute__((__unused__)); ~TimesOp() { (void)constraints_(); } private: Ret constraints_() ; First a; Second b; }; template < typename Ret , typename First , typename Second > struct DivideOp; template < typename Ret , typename First , typename Second > struct DivideOpConcept : DivideOp< Ret, First, Second > { }; template < typename Ret , typename First , typename Second > struct DivideOp { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<DivideOp>)>::failed> boost_concept_check292 __attribute__((__unused__)); ~DivideOp() ; private: Ret constraints_() ; First a; Second b; }; template < typename Ret , typename First , typename Second > struct SubtractOp; template < typename Ret , typename First , typename Second > struct SubtractOpConcept : SubtractOp< Ret, First, Second > { }; template < typename Ret , typename First , typename Second > struct SubtractOp { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<SubtractOp>)>::failed> boost_concept_check293 __attribute__((__unused__)); ~SubtractOp() ; private: Ret constraints_() ; First a; Second b; }; template < typename Ret , typename First , typename Second > struct ModOp; template < typename Ret , typename First , typename Second > struct ModOpConcept : ModOp< Ret, First, Second > { }; template < typename Ret , typename First , typename Second > struct ModOp { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<ModOp>)>::failed> boost_concept_check294 __attribute__((__unused__)); ~ModOp() ; private: Ret constraints_() ; First a; Second b; }; template < typename Func , typename Return > struct Generator; template < typename Func , typename Return > struct GeneratorConcept : Generator< Func, Return > { }; template < typename Func , typename Return > struct Generator { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<Generator>)>::failed> boost_concept_check301 __attribute__((__unused__)); ~Generator() ; private: void test(boost::false_type) ; void test(boost::true_type) ; Func f; }; template < typename Func , typename Return , typename Arg > struct UnaryFunction; template < typename Func , typename Return , typename Arg > struct UnaryFunctionConcept : UnaryFunction< Func, Return, Arg > { }; template < typename Func , typename Return , typename Arg > struct UnaryFunction { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<UnaryFunction>)>::failed> boost_concept_check321 __attribute__((__unused__)); ~UnaryFunction() ; private: void test(boost::false_type) ; Func f; Arg arg; }; template < typename Func , typename Return , typename First , typename Second > struct BinaryFunction; template < typename Func , typename Return , typename First , typename Second > struct BinaryFunctionConcept : BinaryFunction< Func, Return, First, Second > { }; template < typename Func , typename Return , typename First , typename Second > struct BinaryFunction { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<BinaryFunction>)>::failed> boost_concept_check351 __attribute__((__unused__)); private: Func f; First first; Second second; }; template < typename Func , typename Arg > struct UnaryPredicate; template < typename Func , typename Arg > struct UnaryPredicateConcept : UnaryPredicate< Func, Arg > { }; template < typename Func , typename Arg > struct UnaryPredicate { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<UnaryPredicate>)>::failed> boost_concept_check381 __attribute__((__unused__)); private: Func f; Arg arg; }; template < typename Func , typename First , typename Second > struct BinaryPredicate; template < typename Func , typename First , typename Second > struct BinaryPredicateConcept : BinaryPredicate< Func, First, Second > { }; template < typename Func , typename First , typename Second > struct BinaryPredicate { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<BinaryPredicate>)>::failed> boost_concept_check400 __attribute__((__unused__)); private: Func f; First a; Second b; }; template < typename Func , typename First , typename Second > struct Const_BinaryPredicate; template < typename Func , typename First , typename Second > struct Const_BinaryPredicateConcept : Const_BinaryPredicate< Func, First, Second > { }; template < typename Func , typename First , typename Second > struct Const_BinaryPredicate : BinaryPredicate<Func, First, Second> { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<Const_BinaryPredicate>)>::failed> boost_concept_check421 __attribute__((__unused__)); private: Func f; First a; Second b; }; template < typename Func , typename Return > struct AdaptableGenerator; template < typename Func , typename Return > struct AdaptableGeneratorConcept : AdaptableGenerator< Func, Return > { }; template < typename Func , typename Return > struct AdaptableGenerator : Generator<Func, typename Func::result_type> { typedef typename Func::result_type result_type; typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<AdaptableGenerator>)>::failed> boost_concept_check448 __attribute__((__unused__)); }; template < typename Func , typename Return , typename Arg > struct AdaptableUnaryFunction; template < typename Func , typename Return , typename Arg > struct AdaptableUnaryFunctionConcept : AdaptableUnaryFunction< Func, Return, Arg > { }; template < typename Func , typename Return , typename Arg > struct AdaptableUnaryFunction : UnaryFunction<Func, typename Func::result_type, typename Func::argument_type> { typedef typename Func::argument_type argument_type; typedef typename Func::result_type result_type; }; template < typename Func , typename Return , typename First , typename Second > struct AdaptableBinaryFunction; template < typename Func , typename Return , typename First , typename Second > struct AdaptableBinaryFunctionConcept : AdaptableBinaryFunction< Func, Return, First, Second > { }; template < typename Func , typename Return , typename First , typename Second > struct AdaptableBinaryFunction : BinaryFunction< Func , typename Func::result_type , typename Func::first_argument_type , typename Func::second_argument_type > { typedef typename Func::first_argument_type first_argument_type; typedef typename Func::second_argument_type second_argument_type; typedef typename Func::result_type result_type; }; template < typename Func , typename Arg > struct AdaptablePredicate; template < typename Func , typename Arg > struct AdaptablePredicateConcept : AdaptablePredicate< Func, Arg > { }; template < typename Func , typename Arg > struct AdaptablePredicate : UnaryPredicate<Func, Arg> , AdaptableUnaryFunction<Func, bool, Arg> { }; template < typename Func , typename First , typename Second > struct AdaptableBinaryPredicate; template < typename Func , typename First , typename Second > struct AdaptableBinaryPredicateConcept : AdaptableBinaryPredicate< Func, First, Second > { }; template < typename Func , typename First , typename Second > struct AdaptableBinaryPredicate : BinaryPredicate<Func, First, Second> , AdaptableBinaryFunction<Func, bool, First, Second> { }; template < typename TT > struct InputIterator; template < typename TT > struct InputIteratorConcept : InputIterator< TT > { }; template < typename TT > struct InputIterator : Assignable<TT> , EqualityComparable<TT> { typedef typename std::iterator_traits<TT>::value_type value_type; typedef typename std::iterator_traits<TT>::difference_type difference_type; typedef typename std::iterator_traits<TT>::reference reference; typedef typename std::iterator_traits<TT>::pointer pointer; typedef typename std::iterator_traits<TT>::iterator_category iterator_category; typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<InputIterator>)>::failed> boost_concept_check512 __attribute__((__unused__)); private: TT i; }; template < typename TT , typename ValueT > struct OutputIterator; template < typename TT , typename ValueT > struct OutputIteratorConcept : OutputIterator< TT, ValueT > { }; template < typename TT , typename ValueT > struct OutputIterator : Assignable<TT> { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<OutputIterator>)>::failed> boost_concept_check529 __attribute__((__unused__)); private: TT i, j; ValueT t; }; template < typename TT > struct ForwardIterator; template < typename TT > struct ForwardIteratorConcept : ForwardIterator< TT > { }; template < typename TT > struct ForwardIterator : InputIterator<TT> { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<ForwardIterator>)>::failed> boost_concept_check543 __attribute__((__unused__)); private: TT i; }; template < typename TT > struct Mutable_ForwardIterator; template < typename TT > struct Mutable_ForwardIteratorConcept : Mutable_ForwardIterator< TT > { }; template < typename TT > struct Mutable_ForwardIterator : ForwardIterator<TT> { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<Mutable_ForwardIterator>)>::failed> boost_concept_check561 __attribute__((__unused__)); private: TT i, j; }; template < typename TT > struct BidirectionalIterator; template < typename TT > struct BidirectionalIteratorConcept : BidirectionalIterator< TT > { }; template < typename TT > struct BidirectionalIterator : ForwardIterator<TT> { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<BidirectionalIterator>)>::failed> boost_concept_check571 __attribute__((__unused__)); private: TT i; }; template < typename TT > struct Mutable_BidirectionalIterator; template < typename TT > struct Mutable_BidirectionalIteratorConcept : Mutable_BidirectionalIterator< TT > { }; template < typename TT > struct Mutable_BidirectionalIterator : BidirectionalIterator<TT> , Mutable_ForwardIterator<TT> { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<Mutable_BidirectionalIterator>)>::failed> boost_concept_check589 __attribute__((__unused__)); private: TT i, j; }; template < typename TT > struct RandomAccessIterator; template < typename TT > struct RandomAccessIteratorConcept : RandomAccessIterator< TT > { }; template < typename TT > struct RandomAccessIterator : BidirectionalIterator<TT> , Comparable<TT> { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<RandomAccessIterator>)>::failed> boost_concept_check601 __attribute__((__unused__)); private: TT a, b; TT i, j; typename std::iterator_traits<TT>::difference_type n; }; template < typename TT > struct Mutable_RandomAccessIterator; template < typename TT > struct Mutable_RandomAccessIteratorConcept : Mutable_RandomAccessIterator< TT > { }; template < typename TT > struct Mutable_RandomAccessIterator : RandomAccessIterator<TT> , Mutable_BidirectionalIterator<TT> { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<Mutable_RandomAccessIterator>)>::failed> boost_concept_check626 __attribute__((__unused__)); private: TT i; typename std::iterator_traits<TT>::difference_type n; }; template < typename C > struct Container; template < typename C > struct ContainerConcept : Container< C > { }; template < typename C > struct Container : Assignable<C> { typedef typename C::value_type value_type; typedef typename C::difference_type difference_type; typedef typename C::size_type size_type; typedef typename C::const_reference const_reference; typedef typename C::const_pointer const_pointer; typedef typename C::const_iterator const_iterator; typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<Container>)>::failed> boost_concept_check648 __attribute__((__unused__)); private: C c; bool b; const_iterator i; size_type n; }; template < typename C > struct Mutable_Container; template < typename C > struct Mutable_ContainerConcept : Mutable_Container< C > { }; template < typename C > struct Mutable_Container : Container<C> { typedef typename C::reference reference; typedef typename C::iterator iterator; typedef typename C::pointer pointer; typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<Mutable_Container>)>::failed> boost_concept_check675 __attribute__((__unused__)); private: iterator i; C c, c2; }; template < typename C > struct ForwardContainer; template < typename C > struct ForwardContainerConcept : ForwardContainer< C > { }; template < typename C > struct ForwardContainer : Container<C> { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<ForwardContainer>)>::failed> boost_concept_check695 __attribute__((__unused__)); }; template < typename C > struct Mutable_ForwardContainer; template < typename C > struct Mutable_ForwardContainerConcept : Mutable_ForwardContainer< C > { }; template < typename C > struct Mutable_ForwardContainer : ForwardContainer<C> , Mutable_Container<C> { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<Mutable_ForwardContainer>)>::failed> boost_concept_check708 __attribute__((__unused__)); }; template < typename C > struct ReversibleContainer; template < typename C > struct ReversibleContainerConcept : ReversibleContainer< C > { }; template < typename C > struct ReversibleContainer : ForwardContainer<C> { typedef typename C::const_reverse_iterator const_reverse_iterator; typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<ReversibleContainer>)>::failed> boost_concept_check724 __attribute__((__unused__)); private: C c; }; template < typename C > struct Mutable_ReversibleContainer; template < typename C > struct Mutable_ReversibleContainerConcept : Mutable_ReversibleContainer< C > { }; template < typename C > struct Mutable_ReversibleContainer : Mutable_ForwardContainer<C> , ReversibleContainer<C> { typedef typename C::reverse_iterator reverse_iterator; typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<Mutable_ReversibleContainer>)>::failed> boost_concept_check749 __attribute__((__unused__)); private: C c; }; template < typename C > struct RandomAccessContainer; template < typename C > struct RandomAccessContainerConcept : RandomAccessContainer< C > { }; template < typename C > struct RandomAccessContainer : ReversibleContainer<C> { typedef typename C::size_type size_type; typedef typename C::const_reference const_reference; typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<RandomAccessContainer>)>::failed> boost_concept_check768 __attribute__((__unused__)); private: C c; size_type n; }; template < typename C > struct Mutable_RandomAccessContainer; template < typename C > struct Mutable_RandomAccessContainerConcept : Mutable_RandomAccessContainer< C > { }; template < typename C > struct Mutable_RandomAccessContainer : Mutable_ReversibleContainer<C> , RandomAccessContainer<C> { private: typedef Mutable_RandomAccessContainer self; public: typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<Mutable_RandomAccessContainer>)>::failed> boost_concept_check795 __attribute__((__unused__)); private: typename Mutable_ReversibleContainer<C>::size_type i; C c; }; template < typename S > struct Sequence; template < typename S > struct SequenceConcept : Sequence< S > { }; template < typename S > struct Sequence : Mutable_ForwardContainer<S> , DefaultConstructible<S> { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<Sequence>)>::failed> boost_concept_check817 __attribute__((__unused__)); private: typename S::value_type t; typename S::size_type n; typename S::value_type* first, *last; typename S::iterator p, q; }; template < typename S > struct FrontInsertionSequence; template < typename S > struct FrontInsertionSequenceConcept : FrontInsertionSequence< S > { }; template < typename S > struct FrontInsertionSequence : Sequence<S> { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<FrontInsertionSequence>)>::failed> boost_concept_check852 __attribute__((__unused__)); private: S c; typename S::value_type t; }; template < typename S > struct BackInsertionSequence; template < typename S > struct BackInsertionSequenceConcept : BackInsertionSequence< S > { }; template < typename S > struct BackInsertionSequence : Sequence<S> { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<BackInsertionSequence>)>::failed> boost_concept_check865 __attribute__((__unused__)); private: S c; typename S::value_type t; }; template < typename C > struct AssociativeContainer; template < typename C > struct AssociativeContainerConcept : AssociativeContainer< C > { }; template < typename C > struct AssociativeContainer : ForwardContainer<C> , DefaultConstructible<C> { typedef typename C::key_type key_type; typedef typename C::key_compare key_compare; typedef typename C::value_compare value_compare; typedef typename C::iterator iterator; typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<AssociativeContainer>)>::failed> boost_concept_check892 __attribute__((__unused__)); typedef typename C::const_iterator const_iterator; private: C c; iterator i; std::pair<iterator,iterator> r; const_iterator ci; std::pair<const_iterator,const_iterator> cr; typename C::key_type k; typename C::size_type n; }; template < typename C > struct UniqueAssociativeContainer; template < typename C > struct UniqueAssociativeContainerConcept : UniqueAssociativeContainer< C > { }; template < typename C > struct UniqueAssociativeContainer : AssociativeContainer<C> { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<UniqueAssociativeContainer>)>::failed> boost_concept_check928 __attribute__((__unused__)); private: std::pair<typename C::iterator, bool> pos_flag; typename C::value_type t; typename C::value_type* first, *last; }; template < typename C > struct MultipleAssociativeContainer; template < typename C > struct MultipleAssociativeContainerConcept : MultipleAssociativeContainer< C > { }; template < typename C > struct MultipleAssociativeContainer : AssociativeContainer<C> { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<MultipleAssociativeContainer>)>::failed> boost_concept_check946 __attribute__((__unused__)); private: typename C::iterator pos; typename C::value_type t; typename C::value_type* first, *last; }; template < typename C > struct SimpleAssociativeContainer; template < typename C > struct SimpleAssociativeContainerConcept : SimpleAssociativeContainer< C > { }; template < typename C > struct SimpleAssociativeContainer : AssociativeContainer<C> { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<SimpleAssociativeContainer>)>::failed> boost_concept_check965 __attribute__((__unused__)); }; template < typename C > struct PairAssociativeContainer; template < typename C > struct PairAssociativeContainerConcept : PairAssociativeContainer< C > { }; template < typename C > struct PairAssociativeContainer : AssociativeContainer<C> { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<PairAssociativeContainer>)>::failed> boost_concept_check976 __attribute__((__unused__)); }; template < typename C > struct SortedAssociativeContainer; template < typename C > struct SortedAssociativeContainerConcept : SortedAssociativeContainer< C > { }; template < typename C > struct SortedAssociativeContainer : AssociativeContainer<C> , ReversibleContainer<C> { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<SortedAssociativeContainer>)>::failed> boost_concept_check990 __attribute__((__unused__)); private: typename C::key_compare kc; typename C::value_compare vc; typename C::value_type t; typename C::key_type k; typedef typename C::iterator iterator; typedef typename C::const_iterator const_iterator; typedef SortedAssociativeContainer self; iterator p; const_iterator cp; std::pair<typename self::iterator,typename self::iterator> r; std::pair<typename self::const_iterator,typename self::const_iterator> cr; typename C::value_type* first, *last; }; template < typename C > struct Collection; template < typename C > struct CollectionConcept : Collection< C > { }; template < typename C > struct Collection { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<Collection>)>::failed> boost_concept_check1039 __attribute__((__unused__)); private: typedef typename C::value_type value_type; typedef typename C::iterator iterator; typedef typename C::const_iterator const_iterator; typedef typename C::reference reference; typedef typename C::const_reference const_reference; typedef typename C::difference_type difference_type; typedef typename C::size_type size_type; C c; bool b; iterator i; const_iterator ci; size_type n; }; } namespace boost_concepts { template < typename Iterator > struct ReadableIterator; template < typename Iterator > struct ReadableIteratorConcept : ReadableIterator< Iterator > { }; template < typename Iterator > struct ReadableIterator : boost::Assignable<Iterator> , boost::CopyConstructible<Iterator> { typedef typename std::iterator_traits<Iterator>::value_type value_type; typedef typename std::iterator_traits<Iterator>::reference reference; typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<ReadableIterator>)>::failed> boost_concept_check48 __attribute__((__unused__)); private: Iterator i; }; template < typename Iterator , typename ValueType = typename std::iterator_traits<Iterator>::value_type > struct WritableIterator : boost::CopyConstructible<Iterator> { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<WritableIterator>)>::failed> boost_concept_check65 __attribute__((__unused__)); private: ValueType v; Iterator i; }; template < typename Iterator , typename ValueType = typename std::iterator_traits<Iterator>::value_type > struct WritableIteratorConcept : WritableIterator<Iterator,ValueType> {}; template < typename Iterator > struct SwappableIterator; template < typename Iterator > struct SwappableIteratorConcept : SwappableIterator< Iterator > { }; template < typename Iterator > struct SwappableIterator { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<SwappableIterator>)>::failed> boost_concept_check82 __attribute__((__unused__)); private: Iterator i1; Iterator i2; }; template < typename Iterator > struct LvalueIterator; template < typename Iterator > struct LvalueIteratorConcept : LvalueIterator< Iterator > { }; template < typename Iterator > struct LvalueIterator { typedef typename std::iterator_traits<Iterator>::value_type value_type; typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<LvalueIterator>)>::failed> boost_concept_check95 __attribute__((__unused__)); private: Iterator i; }; template < typename Iterator > struct IncrementableIterator; template < typename Iterator > struct IncrementableIteratorConcept : IncrementableIterator< Iterator > { }; template < typename Iterator > struct IncrementableIterator : boost::Assignable<Iterator> , boost::CopyConstructible<Iterator> { typedef typename boost::iterator_traversal<Iterator>::type traversal_category; typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( boost::Convertible< traversal_category , boost::incrementable_traversal_tag >)>::failed> boost_concept_check118 __attribute__((__unused__)); typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<IncrementableIterator>)>::failed> boost_concept_check120 __attribute__((__unused__)); private: Iterator i; }; template < typename Iterator > struct SinglePassIterator; template < typename Iterator > struct SinglePassIteratorConcept : SinglePassIterator< Iterator > { }; template < typename Iterator > struct SinglePassIterator : IncrementableIterator<Iterator> , boost::EqualityComparable<Iterator> { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( boost::Convertible< typename SinglePassIterator::traversal_category , boost::single_pass_traversal_tag > )>::failed> boost_concept_check138 __attribute__((__unused__)); }; template < typename Iterator > struct ForwardTraversal; template < typename Iterator > struct ForwardTraversalConcept : ForwardTraversal< Iterator > { }; template < typename Iterator > struct ForwardTraversal : SinglePassIterator<Iterator> , boost::DefaultConstructible<Iterator> { typedef typename std::iterator_traits<Iterator>::difference_type difference_type; static_assert(boost::is_integral<difference_type>::value, "boost::is_integral<difference_type>::value"); static_assert(std::numeric_limits<difference_type>::is_signed, "std::numeric_limits<difference_type>::is_signed"); typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( boost::Convertible< typename ForwardTraversal::traversal_category , boost::forward_traversal_tag > )>::failed> boost_concept_check154 __attribute__((__unused__)); }; template < typename Iterator > struct BidirectionalTraversal; template < typename Iterator > struct BidirectionalTraversalConcept : BidirectionalTraversal< Iterator > { }; template < typename Iterator > struct BidirectionalTraversal : ForwardTraversal<Iterator> { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( boost::Convertible< typename BidirectionalTraversal::traversal_category , boost::bidirectional_traversal_tag > )>::failed> boost_concept_check164 __attribute__((__unused__)); typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<BidirectionalTraversal>)>::failed> boost_concept_check166 __attribute__((__unused__)); private: Iterator i; }; template < typename Iterator > struct RandomAccessTraversal; template < typename Iterator > struct RandomAccessTraversalConcept : RandomAccessTraversal< Iterator > { }; template < typename Iterator > struct RandomAccessTraversal : BidirectionalTraversal<Iterator> { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( boost::Convertible< typename RandomAccessTraversal::traversal_category , boost::random_access_traversal_tag > )>::failed> boost_concept_check182 __attribute__((__unused__)); typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<RandomAccessTraversal>)>::failed> boost_concept_check184 __attribute__((__unused__)); private: typename BidirectionalTraversal<Iterator>::difference_type n; Iterator i, j; }; namespace detail { ; ; ; } template < typename Iterator , typename ConstIterator > struct InteroperableIterator; template < typename Iterator , typename ConstIterator > struct InteroperableIteratorConcept : InteroperableIterator< Iterator, ConstIterator > { }; template < typename Iterator , typename ConstIterator > struct InteroperableIterator { private: typedef typename boost::iterators::pure_iterator_traversal<Iterator>::type traversal_category; typedef typename boost::iterators::pure_iterator_traversal<ConstIterator>::type const_traversal_category; public: typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(SinglePassIterator<Iterator>)>::failed> boost_concept_check253 __attribute__((__unused__)); typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(SinglePassIterator<ConstIterator>)>::failed> boost_concept_check254 __attribute__((__unused__)); typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<InteroperableIterator>)>::failed> boost_concept_check256 __attribute__((__unused__)); private: Iterator i; ConstIterator ci; }; } namespace boost { template< class T > struct range_value : iterator_value< typename range_iterator<T>::type > { }; } namespace boost { namespace range_detail { template<typename T1, typename T2> class SameTypeConcept { public: typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<SameTypeConcept>)>::failed> boost_concept_check21 __attribute__((__unused__)); private: ; T1 a; T2 b; }; } } namespace boost { namespace range_detail { template<class Iterator> struct IncrementableIteratorConcept : CopyConstructible<Iterator> { typedef typename iterator_traversal<Iterator>::type traversal_category; typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( Convertible< traversal_category, incrementable_traversal_tag >)>::failed> boost_concept_check134 __attribute__((__unused__)); typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<IncrementableIteratorConcept>)>::failed> boost_concept_check136 __attribute__((__unused__)); private: Iterator i; }; template<class Iterator> struct SinglePassIteratorConcept : IncrementableIteratorConcept<Iterator> , EqualityComparable<Iterator> { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( Convertible< typename SinglePassIteratorConcept::traversal_category, single_pass_traversal_tag >)>::failed> boost_concept_check156 __attribute__((__unused__)); typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<SinglePassIteratorConcept>)>::failed> boost_concept_check158 __attribute__((__unused__)); private: Iterator i; }; template<class Iterator> struct ForwardIteratorConcept : SinglePassIteratorConcept<Iterator> , DefaultConstructible<Iterator> { typedef typename std::iterator_traits<Iterator>::difference_type difference_type; enum { mpl_assertion_in_line_188 = sizeof( boost::mpl::assertion_failed<false>( boost::mpl::assert_arg( (void (*) (is_integral<difference_type>))nullptr, 1 ) ) ) }; enum { mpl_assert_rel_value189 = (std::numeric_limits<difference_type>::is_signed == true) }; enum { mpl_assertion_in_line_189 = sizeof( boost::mpl::assertion_failed<mpl_assert_rel_value189>( (boost::mpl::failed ************ ( boost::mpl::assert_relation< boost::mpl::assert_::relations( sizeof( boost::mpl::assert_::arg == boost::mpl::assert_::arg ) ) , std::numeric_limits<difference_type>::is_signed , true >::************)) 0 ) ) }; typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( Convertible< typename ForwardIteratorConcept::traversal_category, forward_traversal_tag >)>::failed> boost_concept_check195 __attribute__((__unused__)); typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<ForwardIteratorConcept>)>::failed> boost_concept_check197 __attribute__((__unused__)); private: Iterator i; }; template<class Iterator> struct BidirectionalIteratorConcept : ForwardIteratorConcept<Iterator> { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( Convertible< typename BidirectionalIteratorConcept::traversal_category, bidirectional_traversal_tag >)>::failed> boost_concept_check222 __attribute__((__unused__)); typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<BidirectionalIteratorConcept>)>::failed> boost_concept_check224 __attribute__((__unused__)); private: Iterator i; }; template<class Iterator> struct RandomAccessIteratorConcept : BidirectionalIteratorConcept<Iterator> { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( Convertible< typename RandomAccessIteratorConcept::traversal_category, random_access_traversal_tag >)>::failed> boost_concept_check243 __attribute__((__unused__)); typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<RandomAccessIteratorConcept>)>::failed> boost_concept_check245 __attribute__((__unused__)); private: typename BidirectionalIteratorConcept<Iterator>::difference_type n; Iterator i; Iterator j; }; } template<class T> struct SinglePassRangeConcept { typedef typename remove_reference<T>::type Rng; typedef typename range_iterator< Rng const >::type const_iterator; typedef typename range_iterator<Rng>::type iterator; typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( range_detail::SinglePassIteratorConcept<iterator>)>::failed> boost_concept_check279 __attribute__((__unused__)); typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)( range_detail::SinglePassIteratorConcept<const_iterator>)>::failed> boost_concept_check282 __attribute__((__unused__)); typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<SinglePassRangeConcept>)>::failed> boost_concept_check284 __attribute__((__unused__)); private: Rng* m_range; }; template<class T> struct ForwardRangeConcept : SinglePassRangeConcept<T> { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(range_detail::ForwardIteratorConcept<typename ForwardRangeConcept::iterator>)>::failed> boost_concept_check321 __attribute__((__unused__)); typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(range_detail::ForwardIteratorConcept<typename ForwardRangeConcept::const_iterator>)>::failed> boost_concept_check322 __attribute__((__unused__)); }; template<class T> struct WriteableRangeConcept { typedef typename range_iterator<T>::type iterator; typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(boost::concepts::usage_requirements<WriteableRangeConcept>)>::failed> boost_concept_check332 __attribute__((__unused__)); private: iterator i; typename range_value<T>::type v; }; template<class T> struct WriteableForwardRangeConcept : ForwardRangeConcept<T> , WriteableRangeConcept<T> { }; template<class T> struct BidirectionalRangeConcept : ForwardRangeConcept<T> { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(range_detail::BidirectionalIteratorConcept<typename BidirectionalRangeConcept::iterator>)>::failed> boost_concept_check355 __attribute__((__unused__)); typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(range_detail::BidirectionalIteratorConcept<typename BidirectionalRangeConcept::const_iterator>)>::failed> boost_concept_check356 __attribute__((__unused__)); }; template<class T> struct WriteableBidirectionalRangeConcept : BidirectionalRangeConcept<T> , WriteableRangeConcept<T> { }; template<class T> struct RandomAccessRangeConcept : BidirectionalRangeConcept<T> { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(range_detail::RandomAccessIteratorConcept<typename RandomAccessRangeConcept::iterator>)>::failed> boost_concept_check373 __attribute__((__unused__)); typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_<void(*)(range_detail::RandomAccessIteratorConcept<typename RandomAccessRangeConcept::const_iterator>)>::failed> boost_concept_check374 __attribute__((__unused__)); }; template<class T> struct WriteableRandomAccessRangeConcept : RandomAccessRangeConcept<T> , WriteableRangeConcept<T> { }; } namespace boost { namespace detail{ template <class T> struct is_signed_values { typedef typename remove_cv<T>::type no_cv_t; static const no_cv_t minus_one = (static_cast<no_cv_t>(-1)); static const no_cv_t zero = (static_cast<no_cv_t>(0)); }; template <class T> struct is_signed_helper { typedef typename remove_cv<T>::type no_cv_t; static const bool value = (!(::boost::detail::is_signed_values<T>::minus_one > boost::detail::is_signed_values<T>::zero)); }; template <bool integral_type> struct is_signed_select_helper { template <class T> struct rebind { typedef is_signed_helper<T> type; }; }; template <> struct is_signed_select_helper<false> { template <class T> struct rebind { typedef false_type type; }; }; template <class T> struct is_signed_impl { typedef ::boost::detail::is_signed_select_helper< ::boost::is_integral<T>::value || ::boost::is_enum<T>::value> selector; typedef typename selector::template rebind<T> binder; typedef typename binder::type type; static const bool value = type::value; }; } template <class T> struct is_signed : public integral_constant<bool, boost::detail::is_signed_impl<T>::value> {}; template <> struct is_signed<signed char> : public true_type{}; template <> struct is_signed<const signed char> : public true_type{}; template <> struct is_signed<volatile signed char> : public true_type{}; template <> struct is_signed<const volatile signed char> : public true_type{}; template <> struct is_signed<short> : public true_type{}; template <> struct is_signed<const short> : public true_type{}; template <> struct is_signed<volatile short> : public true_type{}; template <> struct is_signed<const volatile short> : public true_type{}; template <> struct is_signed<int> : public true_type{}; template <> struct is_signed<const int> : public true_type{}; template <> struct is_signed<volatile int> : public true_type{}; template <> struct is_signed<const volatile int> : public true_type{}; template <> struct is_signed<long> : public true_type{}; template <> struct is_signed<const long> : public true_type{}; template <> struct is_signed<volatile long> : public true_type{}; template <> struct is_signed<const volatile long> : public true_type{}; template <> struct is_signed<unsigned char> : public false_type{}; template <> struct is_signed<const unsigned char> : public false_type{}; template <> struct is_signed<volatile unsigned char> : public false_type{}; template <> struct is_signed<const volatile unsigned char> : public false_type{}; template <> struct is_signed<unsigned short> : public false_type{}; template <> struct is_signed<const unsigned short> : public false_type{}; template <> struct is_signed<volatile unsigned short> : public false_type{}; template <> struct is_signed<const volatile unsigned short> : public false_type{}; template <> struct is_signed<unsigned int> : public false_type{}; template <> struct is_signed<const unsigned int> : public false_type{}; template <> struct is_signed<volatile unsigned int> : public false_type{}; template <> struct is_signed<const volatile unsigned int> : public false_type{}; template <> struct is_signed<unsigned long> : public false_type{}; template <> struct is_signed<const unsigned long> : public false_type{}; template <> struct is_signed<volatile unsigned long> : public false_type{}; template <> struct is_signed<const volatile unsigned long> : public false_type{}; template <> struct is_signed< ::boost::long_long_type> : public true_type{}; template <> struct is_signed<const ::boost::long_long_type> : public true_type{}; template <> struct is_signed<volatile ::boost::long_long_type> : public true_type{}; template <> struct is_signed<const volatile ::boost::long_long_type> : public true_type{}; template <> struct is_signed< ::boost::ulong_long_type> : public false_type{}; template <> struct is_signed<const ::boost::ulong_long_type> : public false_type{}; template <> struct is_signed<volatile ::boost::ulong_long_type> : public false_type{}; template <> struct is_signed<const volatile ::boost::ulong_long_type> : public false_type{}; template <> struct is_signed<char> : public true_type{}; template <> struct is_signed<const char> : public true_type{}; template <> struct is_signed<volatile char> : public true_type{}; template <> struct is_signed<const volatile char> : public true_type{}; template <> struct is_signed<wchar_t> : public true_type{}; template <> struct is_signed<const wchar_t> : public true_type{}; template <> struct is_signed<volatile wchar_t> : public true_type{}; template <> struct is_signed<const volatile wchar_t> : public true_type{}; } namespace boost { template <class T> struct add_volatile{ typedef T volatile type; }; template <class T> struct add_volatile<T&>{ typedef T& type; }; template <class T> using add_volatile_t = typename add_volatile<T>::type; } namespace boost { template <class T> struct make_unsigned { private: static_assert((::boost::is_integral<T>::value || ::boost::is_enum<T>::value), "The template argument to make_unsigned must be an integer or enum type."); static_assert((! ::boost::is_same<typename remove_cv<T>::type, bool>::value), "The template argument to make_unsigned must not be the type bool"); typedef typename remove_cv<T>::type t_no_cv; typedef typename conditional< (::boost::is_unsigned<T>::value && ::boost::is_integral<T>::value && ! ::boost::is_same<t_no_cv, char>::value && ! ::boost::is_same<t_no_cv, wchar_t>::value && ! ::boost::is_same<t_no_cv, bool>::value), T, typename conditional< (::boost::is_integral<T>::value && ! ::boost::is_same<t_no_cv, char>::value && ! ::boost::is_same<t_no_cv, wchar_t>::value && ! ::boost::is_same<t_no_cv, bool>::value), typename conditional< is_same<t_no_cv, signed char>::value, unsigned char, typename conditional< is_same<t_no_cv, short>::value, unsigned short, typename conditional< is_same<t_no_cv, int>::value, unsigned int, typename conditional< is_same<t_no_cv, long>::value, unsigned long, typename conditional< sizeof(t_no_cv) == sizeof(boost::ulong_long_type), boost::ulong_long_type, boost::uint128_type >::type >::type >::type >::type >::type, typename conditional< sizeof(t_no_cv) == sizeof(unsigned char), unsigned char, typename conditional< sizeof(t_no_cv) == sizeof(unsigned short), unsigned short, typename conditional< sizeof(t_no_cv) == sizeof(unsigned int), unsigned int, typename conditional< sizeof(t_no_cv) == sizeof(unsigned long), unsigned long, typename conditional< sizeof(t_no_cv) == sizeof(boost::ulong_long_type), boost::ulong_long_type, boost::uint128_type >::type >::type >::type >::type >::type >::type >::type base_integer_type; typedef typename conditional< is_const<T>::value, typename add_const<base_integer_type>::type, base_integer_type >::type const_base_integer_type; public: typedef typename conditional< is_volatile<T>::value, typename add_volatile<const_base_integer_type>::type, const_base_integer_type >::type type; }; template <class T> using make_unsigned_t = typename make_unsigned<T>::type; } namespace boost { namespace detail { template<typename T> class has_size_type { typedef char no_type; struct yes_type { char dummy[2]; }; ; ; public: static const bool value = sizeof(test<T>(0)) == sizeof(yes_type); }; template<typename C, typename Enabler=void> struct range_size_ { typedef typename make_unsigned< typename range_difference<C>::type >::type type; }; template<typename C> struct range_size_< C, typename ::boost::enable_if<has_size_type<C>, void>::type > { typedef typename C::size_type type; }; template<typename C, bool B = range_detail::has_type< range_iterator<C> >::value> struct range_size { }; template<typename C> struct range_size<C, true> : range_size_<C> { }; } template< class T > struct range_size : detail::range_size<T> { }; } namespace boost { namespace range_detail { template<class T> class has_member_size_impl { private: template<class U, U> class check { }; ; ; public: static const bool value = (sizeof(f<T>(0)) == sizeof(boost::uint8_t)); typedef typename mpl::if_c< (sizeof(f<T>(0)) == sizeof(boost::uint8_t)), mpl::true_, mpl::false_ >::type type; }; template<class T> struct has_member_size { typedef typename mpl::and_< typename is_class<T>::type, typename has_member_size_impl<const T>::type >::type type; static const bool value = is_class<T>::value && has_member_size_impl<const T>::value; }; } } namespace boost { namespace detail { template < typename T > struct remove_cv_ref { typedef typename ::boost::remove_cv<typename ::boost::remove_reference<T>::type>::type type; }; template < typename T, typename U > struct is_related : public ::boost::is_same< typename ::boost::detail::remove_cv_ref<T>::type, typename ::boost::detail::remove_cv_ref<U>::type > {}; template<typename ...T> struct enable_if_unrelated : public ::boost::enable_if_c<true> {}; template<typename T, typename U, typename ...U2> struct enable_if_unrelated<T, U, U2...> : public ::boost::disable_if< ::boost::detail::is_related<T, U> > {}; } template < typename MemberType, int UniqueID = 0 > class base_from_member { protected: MemberType member; ; ; ; ; ; ; ; ; ; ; }; template < typename MemberType, int UniqueID > class base_from_member<MemberType&, UniqueID> { protected: MemberType& member; }; } namespace boost { namespace detail { template<typename Function> struct function_traits_helper; template<typename R> struct function_traits_helper<R (*)(void)> { static const unsigned arity = 0; typedef R result_type; }; template<typename R, typename T1> struct function_traits_helper<R (*)(T1)> { static const unsigned arity = 1; typedef R result_type; typedef T1 arg1_type; typedef T1 argument_type; }; template<typename R, typename T1, typename T2> struct function_traits_helper<R (*)(T1, T2)> { static const unsigned arity = 2; typedef R result_type; typedef T1 arg1_type; typedef T2 arg2_type; typedef T1 first_argument_type; typedef T2 second_argument_type; }; template<typename R, typename T1, typename T2, typename T3> struct function_traits_helper<R (*)(T1, T2, T3)> { static const unsigned arity = 3; typedef R result_type; typedef T1 arg1_type; typedef T2 arg2_type; typedef T3 arg3_type; }; template<typename R, typename T1, typename T2, typename T3, typename T4> struct function_traits_helper<R (*)(T1, T2, T3, T4)> { static const unsigned arity = 4; typedef R result_type; typedef T1 arg1_type; typedef T2 arg2_type; typedef T3 arg3_type; typedef T4 arg4_type; }; template<typename R, typename T1, typename T2, typename T3, typename T4, typename T5> struct function_traits_helper<R (*)(T1, T2, T3, T4, T5)> { static const unsigned arity = 5; typedef R result_type; typedef T1 arg1_type; typedef T2 arg2_type; typedef T3 arg3_type; typedef T4 arg4_type; typedef T5 arg5_type; }; template<typename R, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6> struct function_traits_helper<R (*)(T1, T2, T3, T4, T5, T6)> { static const unsigned arity = 6; typedef R result_type; typedef T1 arg1_type; typedef T2 arg2_type; typedef T3 arg3_type; typedef T4 arg4_type; typedef T5 arg5_type; typedef T6 arg6_type; }; template<typename R, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7> struct function_traits_helper<R (*)(T1, T2, T3, T4, T5, T6, T7)> { static const unsigned arity = 7; typedef R result_type; typedef T1 arg1_type; typedef T2 arg2_type; typedef T3 arg3_type; typedef T4 arg4_type; typedef T5 arg5_type; typedef T6 arg6_type; typedef T7 arg7_type; }; template<typename R, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8> struct function_traits_helper<R (*)(T1, T2, T3, T4, T5, T6, T7, T8)> { static const unsigned arity = 8; typedef R result_type; typedef T1 arg1_type; typedef T2 arg2_type; typedef T3 arg3_type; typedef T4 arg4_type; typedef T5 arg5_type; typedef T6 arg6_type; typedef T7 arg7_type; typedef T8 arg8_type; }; template<typename R, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9> struct function_traits_helper<R (*)(T1, T2, T3, T4, T5, T6, T7, T8, T9)> { static const unsigned arity = 9; typedef R result_type; typedef T1 arg1_type; typedef T2 arg2_type; typedef T3 arg3_type; typedef T4 arg4_type; typedef T5 arg5_type; typedef T6 arg6_type; typedef T7 arg7_type; typedef T8 arg8_type; typedef T9 arg9_type; }; template<typename R, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10> struct function_traits_helper<R (*)(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)> { static const unsigned arity = 10; typedef R result_type; typedef T1 arg1_type; typedef T2 arg2_type; typedef T3 arg3_type; typedef T4 arg4_type; typedef T5 arg5_type; typedef T6 arg6_type; typedef T7 arg7_type; typedef T8 arg8_type; typedef T9 arg9_type; typedef T10 arg10_type; }; } template<typename Function> struct function_traits : public boost::detail::function_traits_helper<typename boost::add_pointer<Function>::type> { }; } namespace boost { ; ; template<class T> struct checked_deleter { typedef void result_type; typedef T * argument_type; }; template<class T> struct checked_array_deleter { typedef void result_type; typedef T * argument_type; }; } namespace boost { namespace noncopyable_ { struct base_token {}; class noncopyable: base_token { protected: ~noncopyable() = default; }; } typedef noncopyable_::noncopyable noncopyable; } namespace boost { namespace range_detail { ; ; } ; } namespace boost { namespace iterators { namespace detail { ; ; } namespace distance_adl_barrier { ; } using namespace distance_adl_barrier; } using namespace iterators::distance_adl_barrier; } namespace boost { namespace range_distance_adl_barrier { ; } using namespace range_distance_adl_barrier; } namespace boost { ; } namespace boost { namespace iterators { using boost::use_default; } template<class To> struct is_convertible<use_default,To> : mpl::false_ {}; namespace iterators { namespace detail { struct enable_type; } template<typename From, typename To> struct enable_if_convertible : iterators::enable_if< is_convertible<From, To> , boost::iterators::detail::enable_type > {}; namespace detail { template <class T, class DefaultNullaryFn> struct ia_dflt_help : mpl::eval_if< is_same<T, use_default> , DefaultNullaryFn , mpl::identity<T> > { }; template < class Derived , class Base , class Value , class Traversal , class Reference , class Difference > struct iterator_adaptor_base { typedef iterator_facade< Derived , typename boost::iterators::detail::ia_dflt_help< Value , mpl::eval_if< is_same<Reference,use_default> , iterator_value<Base> , remove_reference<Reference> > >::type , typename boost::iterators::detail::ia_dflt_help< Traversal , iterator_traversal<Base> >::type , typename boost::iterators::detail::ia_dflt_help< Reference , mpl::eval_if< is_same<Value,use_default> , iterator_reference<Base> , add_reference<Value> > >::type , typename boost::iterators::detail::ia_dflt_help< Difference, iterator_difference<Base> >::type > type; }; ; } template < class Derived , class Base , class Value = use_default , class Traversal = use_default , class Reference = use_default , class Difference = use_default > class iterator_adaptor : public boost::iterators::detail::iterator_adaptor_base< Derived, Base, Value, Traversal, Reference, Difference >::type { friend class iterator_core_access; protected: typedef typename boost::iterators::detail::iterator_adaptor_base< Derived, Base, Value, Traversal, Reference, Difference >::type super_t; public: typedef Base base_type; protected: typedef iterator_adaptor<Derived,Base,Value,Traversal,Reference,Difference> iterator_adaptor_; private: ; typedef typename iterator_category_to_traversal< typename super_t::iterator_category >::type my_traversal; ; private: Base m_iterator; }; } using iterators::iterator_adaptor; using iterators::enable_if_convertible; } namespace boost { namespace iterators { template <class Iterator> class reverse_iterator : public iterator_adaptor< reverse_iterator<Iterator>, Iterator > { typedef iterator_adaptor< reverse_iterator<Iterator>, Iterator > super_t; friend class iterator_core_access; public: ; private: ; }; ; } using iterators::reverse_iterator; } namespace boost { template< typename T > struct range_reverse_iterator { typedef reverse_iterator< typename range_iterator< typename remove_reference<T>::type>::type > type; }; } namespace boost { ; ; ; } namespace boost { ; ; template< class T > typename range_reverse_iterator<const T>::type const_rend( const T& r ) ; } namespace boost { namespace range_detail { template< class SinglePassTraversalReadableIterator1, class SinglePassTraversalReadableIterator2, class IteratorCategoryTag1, class IteratorCategoryTag2 > bool equal_impl( SinglePassTraversalReadableIterator1 first1, SinglePassTraversalReadableIterator1 last1, SinglePassTraversalReadableIterator2 first2, SinglePassTraversalReadableIterator2 last2, IteratorCategoryTag1, IteratorCategoryTag2 ) ; template< class SinglePassTraversalReadableIterator1, class SinglePassTraversalReadableIterator2, class IteratorCategoryTag1, class IteratorCategoryTag2, class BinaryPredicate > bool equal_impl( SinglePassTraversalReadableIterator1 first1, SinglePassTraversalReadableIterator1 last1, SinglePassTraversalReadableIterator2 first2, SinglePassTraversalReadableIterator2 last2, BinaryPredicate pred, IteratorCategoryTag1, IteratorCategoryTag2 ) ; template< class RandomAccessTraversalReadableIterator1, class RandomAccessTraversalReadableIterator2 > bool equal_impl( RandomAccessTraversalReadableIterator1 first1, RandomAccessTraversalReadableIterator1 last1, RandomAccessTraversalReadableIterator2 first2, RandomAccessTraversalReadableIterator2 last2, std::random_access_iterator_tag, std::random_access_iterator_tag ) ; template< class RandomAccessTraversalReadableIterator1, class RandomAccessTraversalReadableIterator2, class BinaryPredicate > bool equal_impl( RandomAccessTraversalReadableIterator1 first1, RandomAccessTraversalReadableIterator1 last1, RandomAccessTraversalReadableIterator2 first2, RandomAccessTraversalReadableIterator2 last2, BinaryPredicate pred, std::random_access_iterator_tag, std::random_access_iterator_tag ) ; template< class SinglePassTraversalReadableIterator1, class SinglePassTraversalReadableIterator2 > bool equal( SinglePassTraversalReadableIterator1 first1, SinglePassTraversalReadableIterator1 last1, SinglePassTraversalReadableIterator2 first2, SinglePassTraversalReadableIterator2 last2 ) ; template< class SinglePassTraversalReadableIterator1, class SinglePassTraversalReadableIterator2, class BinaryPredicate > bool equal( SinglePassTraversalReadableIterator1 first1, SinglePassTraversalReadableIterator1 last1, SinglePassTraversalReadableIterator2 first2, SinglePassTraversalReadableIterator2 last2, BinaryPredicate pred ) ; } namespace range { template< class SinglePassRange1, class SinglePassRange2 > bool equal( const SinglePassRange1& rng1, const SinglePassRange2& rng2 ) ; template< class SinglePassRange1, class SinglePassRange2, class BinaryPredicate > bool equal( const SinglePassRange1& rng1, const SinglePassRange2& rng2, BinaryPredicate pred ) ; } using ::boost::range::equal; } namespace boost { namespace range_detail { template<class DataMemberPtr> class safe_bool { public: typedef safe_bool this_type; typedef DataMemberPtr unspecified_bool_type; static unspecified_bool_type to_unspecified_bool(const bool x, DataMemberPtr p) ; private: safe_bool(); safe_bool(const safe_bool&); void operator=(const safe_bool&); ~safe_bool(); }; } } namespace boost { template<class...> struct make_void { typedef void type; }; template<class... Ts> using void_t = typename make_void<Ts...>::type; } namespace boost { namespace binary_op_detail { struct dont_care; template <class T, class U, class Ret, class = void> struct has_plus_ret_imp : public boost::false_type {}; template <class T, class U, class Ret> struct has_plus_ret_imp<T, U, Ret, typename boost::make_void<decltype(std::declval<typename add_reference<T>::type>() + std::declval<typename add_reference<U>::type>())>::type> : public boost::integral_constant<bool, ::boost::is_convertible<decltype(std::declval<typename add_reference<T>::type>() + std::declval<typename add_reference<U>::type>()), Ret>::value> {}; template <class T, class U, class = void > struct has_plus_void_imp : public boost::false_type {}; template <class T, class U> struct has_plus_void_imp<T, U, typename boost::make_void<decltype(std::declval<typename add_reference<T>::type>() + std::declval<typename add_reference<U>::type>())>::type> : public boost::integral_constant<bool, ::boost::is_void<decltype(std::declval<typename add_reference<T>::type>() + std::declval<typename add_reference<U>::type>())>::value> {}; template <class T, class U, class = void> struct has_plus_dc_imp : public boost::false_type {}; template <class T, class U> struct has_plus_dc_imp<T, U, typename boost::make_void<decltype(std::declval<typename add_reference<T>::type>() + std::declval<typename add_reference<U>::type>())>::type> : public boost::true_type {}; } template <class T, class U = T, class Ret = boost::binary_op_detail::dont_care> struct has_plus : public boost::binary_op_detail:: has_plus_ret_imp <T, U, Ret> {}; template <class T, class U> struct has_plus<T, U, void> : public boost::binary_op_detail:: has_plus_void_imp <T, U> {}; template <class T, class U> struct has_plus<T, U, boost::binary_op_detail::dont_care> : public boost::binary_op_detail:: has_plus_dc_imp <T, U> {}; } namespace boost { namespace binary_op_detail { struct dont_care; template <class T, class U, class Ret, class = void> struct has_plus_assign_ret_imp : public boost::false_type {}; template <class T, class U, class Ret> struct has_plus_assign_ret_imp<T, U, Ret, typename boost::make_void<decltype(std::declval<typename add_reference<T>::type>() += std::declval<typename add_reference<U>::type>())>::type> : public boost::integral_constant<bool, ::boost::is_convertible<decltype(std::declval<typename add_reference<T>::type>() += std::declval<typename add_reference<U>::type>()), Ret>::value> {}; template <class T, class U, class = void > struct has_plus_assign_void_imp : public boost::false_type {}; template <class T, class U> struct has_plus_assign_void_imp<T, U, typename boost::make_void<decltype(std::declval<typename add_reference<T>::type>() += std::declval<typename add_reference<U>::type>())>::type> : public boost::integral_constant<bool, ::boost::is_void<decltype(std::declval<typename add_reference<T>::type>() += std::declval<typename add_reference<U>::type>())>::value> {}; template <class T, class U, class = void> struct has_plus_assign_dc_imp : public boost::false_type {}; template <class T, class U> struct has_plus_assign_dc_imp<T, U, typename boost::make_void<decltype(std::declval<typename add_reference<T>::type>() += std::declval<typename add_reference<U>::type>())>::type> : public boost::true_type {}; template <class T, class U, class Ret> struct has_plus_assign_filter_ret : public boost::binary_op_detail:: has_plus_assign_ret_imp <T, U, Ret> {}; template <class T, class U> struct has_plus_assign_filter_ret<T, U, void> : public boost::binary_op_detail:: has_plus_assign_void_imp <T, U> {}; template <class T, class U> struct has_plus_assign_filter_ret<T, U, boost::binary_op_detail::dont_care> : public boost::binary_op_detail:: has_plus_assign_dc_imp <T, U> {}; template <class T, class U, class Ret, bool f> struct has_plus_assign_filter_impossible : public boost::binary_op_detail:: has_plus_assign_filter_ret <T, U, Ret> {}; template <class T, class U, class Ret> struct has_plus_assign_filter_impossible<T, U, Ret, true> : public boost::false_type {}; } template <class T, class U = T, class Ret = boost::binary_op_detail::dont_care> struct has_plus_assign : public boost::binary_op_detail:: has_plus_assign_filter_impossible <T, U, Ret, boost::is_arithmetic<typename boost::remove_reference<T>::type>::value && boost::is_pointer<typename remove_reference<U>::type>::value && !boost::is_same<bool, typename boost::remove_cv<typename remove_reference<T>::type>::type>::value> {}; } namespace boost { namespace binary_op_detail { struct dont_care; template <class T, class U, class Ret, class = void> struct has_minus_ret_imp : public boost::false_type {}; template <class T, class U, class Ret> struct has_minus_ret_imp<T, U, Ret, typename boost::make_void<decltype(std::declval<typename add_reference<T>::type>() - std::declval<typename add_reference<U>::type>())>::type> : public boost::integral_constant<bool, ::boost::is_convertible<decltype(std::declval<typename add_reference<T>::type>() - std::declval<typename add_reference<U>::type>()), Ret>::value> {}; template <class T, class U, class = void > struct has_minus_void_imp : public boost::false_type {}; template <class T, class U> struct has_minus_void_imp<T, U, typename boost::make_void<decltype(std::declval<typename add_reference<T>::type>() - std::declval<typename add_reference<U>::type>())>::type> : public boost::integral_constant<bool, ::boost::is_void<decltype(std::declval<typename add_reference<T>::type>() - std::declval<typename add_reference<U>::type>())>::value> {}; template <class T, class U, class = void> struct has_minus_dc_imp : public boost::false_type {}; template <class T, class U> struct has_minus_dc_imp<T, U, typename boost::make_void<decltype(std::declval<typename add_reference<T>::type>() - std::declval<typename add_reference<U>::type>())>::type> : public boost::true_type {}; template <class T, class U, class Ret> struct has_minus_ret_filter : public boost::binary_op_detail::has_minus_ret_imp <T, U, Ret> {}; template <class T, class U> struct has_minus_ret_filter<T, U, void> : public boost::binary_op_detail::has_minus_void_imp <T, U> {}; template <class T, class U> struct has_minus_ret_filter<T, U, boost::binary_op_detail::dont_care> : public boost::binary_op_detail::has_minus_dc_imp <T, U> {}; template <class T, class U, class Ret, bool b> struct has_minus_void_ptr_filter : public boost::binary_op_detail::has_minus_ret_filter <T, U, Ret> {}; template <class T, class U, class Ret> struct has_minus_void_ptr_filter<T, U, Ret, true> : public boost::false_type {}; } template <class T, class U = T, class Ret = boost::binary_op_detail::dont_care> struct has_minus : public boost::binary_op_detail::has_minus_void_ptr_filter< T, U, Ret, boost::is_void<typename remove_pointer<typename remove_reference<T>::type>::type>::value || boost::is_void<typename remove_pointer<typename remove_reference<U>::type>::type>::value> {}; } namespace boost { namespace binary_op_detail { struct dont_care; template <class T, class U, class Ret, class = void> struct has_minus_assign_ret_imp : public boost::false_type {}; template <class T, class U, class Ret> struct has_minus_assign_ret_imp<T, U, Ret, typename boost::make_void<decltype(std::declval<typename add_reference<T>::type>() -= std::declval<typename add_reference<U>::type>())>::type> : public boost::integral_constant<bool, ::boost::is_convertible<decltype(std::declval<typename add_reference<T>::type>() -= std::declval<typename add_reference<U>::type>()), Ret>::value> {}; template <class T, class U, class = void > struct has_minus_assign_void_imp : public boost::false_type {}; template <class T, class U> struct has_minus_assign_void_imp<T, U, typename boost::make_void<decltype(std::declval<typename add_reference<T>::type>() -= std::declval<typename add_reference<U>::type>())>::type> : public boost::integral_constant<bool, ::boost::is_void<decltype(std::declval<typename add_reference<T>::type>() -= std::declval<typename add_reference<U>::type>())>::value> {}; template <class T, class U, class = void> struct has_minus_assign_dc_imp : public boost::false_type {}; template <class T, class U> struct has_minus_assign_dc_imp<T, U, typename boost::make_void<decltype(std::declval<typename add_reference<T>::type>() -= std::declval<typename add_reference<U>::type>())>::type> : public boost::true_type {}; template <class T, class U, class Ret> struct has_minus_assign_ret_filter : public boost::binary_op_detail::has_minus_assign_ret_imp <T, U, Ret> {}; template <class T, class U> struct has_minus_assign_ret_filter<T, U, void> : public boost::binary_op_detail::has_minus_assign_void_imp <T, U> {}; template <class T, class U> struct has_minus_assign_ret_filter<T, U, boost::binary_op_detail::dont_care> : public boost::binary_op_detail::has_minus_assign_dc_imp <T, U> {}; template <class T, class U, class Ret, bool b> struct has_minus_assign_void_ptr_filter : public boost::binary_op_detail::has_minus_assign_ret_filter <T, U, Ret> {}; template <class T, class U, class Ret> struct has_minus_assign_void_ptr_filter<T, U, Ret, true> : public boost::false_type {}; } template <class T, class U = T, class Ret = boost::binary_op_detail::dont_care> struct has_minus_assign : public boost::binary_op_detail::has_minus_assign_void_ptr_filter< T, U, Ret, boost::is_void<typename remove_pointer<typename remove_reference<T>::type>::type>::value || boost::is_void<typename remove_pointer<typename remove_reference<U>::type>::type>::value || (boost::is_pointer<typename remove_reference<T>::type>::value && boost::is_pointer<typename remove_reference<U>::type>::value)> {}; } namespace boost { template<class T> struct negation : integral_constant<bool, !bool(T::value)> { }; } namespace boost { template<class...> struct conjunction : true_type { }; template<class T> struct conjunction<T> : T { }; template<class T, class... U> struct conjunction<T, U...> : conditional<bool(T::value), conjunction<U...>, T>::type { }; } namespace boost { namespace iterators { namespace detail { namespace has_iterator_category_detail { typedef char yes_type; struct no_type { char padding[2]; }; template< typename T > yes_type check( typename std::iterator_traits< T >::iterator_category* ); template< typename > no_type check(...); } template< typename T > struct is_iterator_impl : public boost::integral_constant< bool, sizeof(has_iterator_category_detail::check< T >(0)) == sizeof(has_iterator_category_detail::yes_type) > { }; template< typename T > struct is_iterator_impl< T* > : public boost::conjunction< boost::is_complete< T >, boost::negation< boost::is_function< T > > >::type { }; template< typename T, typename U > struct is_iterator_impl< T U::* > : public boost::false_type { }; template< typename T > struct is_iterator_impl< T& > : public boost::false_type { }; template< typename T, std::size_t N > struct is_iterator_impl< T[N] > : public boost::false_type { }; } template< typename T > struct is_iterator : public detail::is_iterator_impl< T >::type {}; template< typename T > struct is_iterator< const T > : public detail::is_iterator_impl< T >::type {}; template< typename T > struct is_iterator< volatile T > : public detail::is_iterator_impl< T >::type {}; template< typename T > struct is_iterator< const volatile T > : public detail::is_iterator_impl< T >::type {}; } using iterators::is_iterator; } namespace boost { namespace iterators { namespace detail { template <typename InputIterator, typename Distance> constexpr void advance_impl( InputIterator& it , Distance n , incrementable_traversal_tag ) ; template <typename BidirectionalIterator, typename Distance> constexpr void advance_impl( BidirectionalIterator& it , Distance n , bidirectional_traversal_tag ) ; template <typename RandomAccessIterator, typename Distance> constexpr void advance_impl( RandomAccessIterator& it , Distance n , random_access_traversal_tag ) ; } namespace advance_adl_barrier { template <typename InputIterator, typename Distance> constexpr void advance(InputIterator& it, Distance n) ; } using namespace advance_adl_barrier; } using namespace iterators::advance_adl_barrier; } namespace boost { namespace next_prior_detail { template< typename T, typename Distance, bool HasPlus = has_plus< T, Distance >::value > struct next_plus_impl; template< typename T, typename Distance > struct next_plus_impl< T, Distance, true > { static T call(T x, Distance n) ; }; template< typename T, typename Distance, bool HasPlusAssign = has_plus_assign< T, Distance >::value > struct next_plus_assign_impl : public next_plus_impl< T, Distance > { }; template< typename T, typename Distance > struct next_plus_assign_impl< T, Distance, true > { static T call(T x, Distance n) ; }; template< typename T, typename Distance, bool IsIterator = boost::iterators::is_iterator< T >::value > struct next_advance_impl : public next_plus_assign_impl< T, Distance > { }; template< typename T, typename Distance > struct next_advance_impl< T, Distance, true > { static T call(T x, Distance n) ; }; template< typename T, typename Distance, bool HasMinus = has_minus< T, Distance >::value > struct prior_minus_impl; template< typename T, typename Distance > struct prior_minus_impl< T, Distance, true > { static T call(T x, Distance n) ; }; template< typename T, typename Distance, bool HasMinusAssign = has_minus_assign< T, Distance >::value > struct prior_minus_assign_impl : public prior_minus_impl< T, Distance > { }; template< typename T, typename Distance > struct prior_minus_assign_impl< T, Distance, true > { static T call(T x, Distance n) ; }; template< typename T, typename Distance, bool IsIterator = boost::iterators::is_iterator< T >::value > struct prior_advance_impl : public prior_minus_assign_impl< T, Distance > { }; template< typename T, typename Distance > struct prior_advance_impl< T, Distance, true > { static T call(T x, Distance n) ; }; } template <class T> T next(T x) ; template <class T, class Distance> T next(T x, Distance n) ; template <class T> T prior(T x) ; template <class T, class Distance> T prior(T x, Distance n) ; } namespace boost { namespace iterator_range_detail { template<class IteratorT> struct iterator_range_impl { template< class ForwardRange > static IteratorT adl_begin( ForwardRange& r ) ; template< class ForwardRange > static IteratorT adl_end( ForwardRange& r ) ; }; template< class Left, class Right > bool less_than( const Left& l, const Right& r ) ; template< class Left, class Right > bool greater_than( const Left& l, const Right& r ) ; template< class Left, class Right > bool less_or_equal_than( const Left& l, const Right& r ) ; template< class Left, class Right > bool greater_or_equal_than( const Left& l, const Right& r ) ; template< class Left, class Right > bool equal(const Left& l, const Right& r) ; struct range_tag { }; struct const_range_tag { }; struct iterator_range_tag { }; typedef char (&incrementable_t)[1]; typedef char (&bidirectional_t)[2]; typedef char (&random_access_t)[3]; incrementable_t test_traversal_tag(boost::incrementable_traversal_tag); bidirectional_t test_traversal_tag(boost::bidirectional_traversal_tag); random_access_t test_traversal_tag(boost::random_access_traversal_tag); template<std::size_t S> struct pure_iterator_traversal_impl { typedef boost::incrementable_traversal_tag type; }; template<> struct pure_iterator_traversal_impl<sizeof(bidirectional_t)> { typedef boost::bidirectional_traversal_tag type; }; template<> struct pure_iterator_traversal_impl<sizeof(random_access_t)> { typedef boost::random_access_traversal_tag type; }; template<typename IteratorT> struct pure_iterator_traversal { typedef typename iterator_traversal<IteratorT>::type traversal_t; static const std::size_t traversal_i = sizeof(iterator_range_detail::test_traversal_tag((traversal_t()))); typedef typename pure_iterator_traversal_impl<traversal_i>::type type; }; template<class IteratorT, class TraversalTag> class iterator_range_base : public iterator_range_tag { typedef range_detail::safe_bool< IteratorT iterator_range_base<IteratorT, TraversalTag>::* > safe_bool_t; typedef iterator_range_base<IteratorT, TraversalTag> type; protected: typedef iterator_range_impl<IteratorT> impl; public: typedef typename safe_bool_t::unspecified_bool_type unspecified_bool_type; typedef typename iterator_value<IteratorT>::type value_type; typedef typename iterator_difference<IteratorT>::type difference_type; typedef std::size_t size_type; typedef typename iterator_reference<IteratorT>::type reference; typedef IteratorT const_iterator; typedef IteratorT iterator; protected: iterator_range_base() ; template<class Iterator> iterator_range_base(Iterator Begin, Iterator End) ; public: IteratorT begin() const ; IteratorT end() const ; bool empty() const ; operator unspecified_bool_type() const ; bool operator!() const ; bool equal(const iterator_range_base& r) const ; reference front() const ; void drop_front() ; void drop_front(difference_type n) ; void pop_front() ; protected: template<class Iterator> void assign(Iterator first, Iterator last) ; template<class SinglePassRange> void assign(const SinglePassRange& r) ; template<class SinglePassRange> void assign(SinglePassRange& r) ; IteratorT m_Begin; IteratorT m_End; }; template<class IteratorT> class iterator_range_base<IteratorT, bidirectional_traversal_tag> : public iterator_range_base<IteratorT, incrementable_traversal_tag> { typedef iterator_range_base<IteratorT, incrementable_traversal_tag> base_type; protected: iterator_range_base() ; template<class Iterator> iterator_range_base(Iterator first, Iterator last) ; public: typedef typename base_type::difference_type difference_type; typedef typename base_type::reference reference; reference back() const ; void drop_back() ; void drop_back(difference_type n) ; void pop_back() ; }; template<class IteratorT> class iterator_range_base<IteratorT, random_access_traversal_tag> : public iterator_range_base<IteratorT, bidirectional_traversal_tag> { typedef iterator_range_base< IteratorT, bidirectional_traversal_tag> base_type; public: typedef typename boost::mpl::if_< boost::mpl::or_< boost::is_abstract< typename base_type::value_type >, boost::is_array< typename base_type::value_type >, boost::is_function< typename base_type::value_type > >, typename base_type::reference, typename base_type::value_type >::type abstract_value_type; typedef typename base_type::difference_type difference_type; typedef typename base_type::size_type size_type; typedef typename base_type::reference reference; protected: iterator_range_base() ; template<class Iterator> iterator_range_base(Iterator first, Iterator last) ; public: reference operator[](difference_type at) const ; abstract_value_type operator()(difference_type at) const ; typename base_type::size_type size() const ; }; } template<class IteratorT> class iterator_range : public iterator_range_detail::iterator_range_base< IteratorT, typename iterator_range_detail::pure_iterator_traversal<IteratorT>::type > { typedef iterator_range_detail::iterator_range_base< IteratorT, typename iterator_range_detail::pure_iterator_traversal<IteratorT>::type > base_type; template<class Source> struct is_compatible_range_ : is_convertible< typename mpl::eval_if< has_range_iterator<Source>, range_iterator<Source>, mpl::identity<void> >::type, typename base_type::iterator > { }; template<class Source> struct is_compatible_range : mpl::and_< mpl::not_< is_convertible< Source, typename base_type::iterator > >, is_compatible_range_<Source> > { }; protected: typedef iterator_range_detail::iterator_range_impl<IteratorT> impl; public: typedef iterator_range<IteratorT> type; iterator_range() ; template<class Iterator> iterator_range(Iterator first, Iterator last) ; template<class SinglePassRange> iterator_range( const SinglePassRange& r, typename ::boost::enable_if< is_compatible_range<const SinglePassRange> >::type* = 0 ) ; template<class SinglePassRange> iterator_range( SinglePassRange& r, typename ::boost::enable_if< is_compatible_range<SinglePassRange> >::type* = 0 ) ; template<class SinglePassRange> iterator_range(const SinglePassRange& r, iterator_range_detail::const_range_tag) ; template<class SinglePassRange> iterator_range(SinglePassRange& r, iterator_range_detail::range_tag) ; template<class Iterator> iterator_range& operator=(const iterator_range<Iterator>& other) ; template<class Iterator> iterator_range& operator=(iterator_range<Iterator>& other) ; template<class SinglePassRange> iterator_range& operator=(SinglePassRange& r) ; template<class SinglePassRange> iterator_range& operator=(const SinglePassRange& r) ; iterator_range& advance_begin( typename base_type::difference_type n) ; iterator_range& advance_end( typename base_type::difference_type n) ; protected: typedef iterator_range iterator_range_; }; template< class IteratorT, class ForwardRange > typename boost::enable_if< mpl::not_<is_base_and_derived<iterator_range_detail::iterator_range_tag, ForwardRange> >, bool >::type operator==( const ForwardRange& l, const iterator_range<IteratorT>& r ) ; template< class IteratorT, class ForwardRange > typename boost::enable_if< mpl::not_<boost::is_base_and_derived<iterator_range_detail::iterator_range_tag, ForwardRange> >, bool >::type operator!=( const ForwardRange& l, const iterator_range<IteratorT>& r ) ; template< class IteratorT, class ForwardRange > typename boost::enable_if< mpl::not_<boost::is_base_and_derived<iterator_range_detail::iterator_range_tag, ForwardRange> >, bool >::type operator<( const ForwardRange& l, const iterator_range<IteratorT>& r ) ; template< class IteratorT, class ForwardRange > typename boost::enable_if< mpl::not_<boost::is_base_and_derived<iterator_range_detail::iterator_range_tag, ForwardRange> >, bool >::type operator<=( const ForwardRange& l, const iterator_range<IteratorT>& r ) ; template< class IteratorT, class ForwardRange > typename boost::enable_if< mpl::not_<boost::is_base_and_derived<iterator_range_detail::iterator_range_tag, ForwardRange> >, bool >::type operator>( const ForwardRange& l, const iterator_range<IteratorT>& r ) ; template< class IteratorT, class ForwardRange > typename boost::enable_if< mpl::not_<boost::is_base_and_derived<iterator_range_detail::iterator_range_tag, ForwardRange> >, bool >::type operator>=( const ForwardRange& l, const iterator_range<IteratorT>& r ) ; template< class Iterator1T, class Iterator2T > bool operator==( const iterator_range<Iterator1T>& l, const iterator_range<Iterator2T>& r ) ; template< class IteratorT, class ForwardRange > typename boost::enable_if< mpl::not_<boost::is_base_and_derived<iterator_range_detail::iterator_range_tag, ForwardRange> >, bool >::type operator==( const iterator_range<IteratorT>& l, const ForwardRange& r ) ; template< class Iterator1T, class Iterator2T > bool operator!=( const iterator_range<Iterator1T>& l, const iterator_range<Iterator2T>& r ) ; template< class IteratorT, class ForwardRange > typename boost::enable_if< mpl::not_<boost::is_base_and_derived<iterator_range_detail::iterator_range_tag, ForwardRange> >, bool >::type operator!=( const iterator_range<IteratorT>& l, const ForwardRange& r ) ; template< class Iterator1T, class Iterator2T > bool operator<( const iterator_range<Iterator1T>& l, const iterator_range<Iterator2T>& r ) ; template< class IteratorT, class ForwardRange > typename boost::enable_if< mpl::not_<boost::is_base_and_derived<iterator_range_detail::iterator_range_tag, ForwardRange> >, bool >::type operator<( const iterator_range<IteratorT>& l, const ForwardRange& r ) ; template< class Iterator1T, class Iterator2T > bool operator<=( const iterator_range<Iterator1T>& l, const iterator_range<Iterator2T>& r ) ; template< class IteratorT, class ForwardRange > typename boost::enable_if< mpl::not_<boost::is_base_and_derived<iterator_range_detail::iterator_range_tag, ForwardRange> >, bool >::type operator<=( const iterator_range<IteratorT>& l, const ForwardRange& r ) ; template< class Iterator1T, class Iterator2T > bool operator>( const iterator_range<Iterator1T>& l, const iterator_range<Iterator2T>& r ) ; template< class IteratorT, class ForwardRange > typename boost::enable_if< mpl::not_<boost::is_base_and_derived<iterator_range_detail::iterator_range_tag, ForwardRange> >, bool >::type operator>( const iterator_range<IteratorT>& l, const ForwardRange& r ) ; template< class Iterator1T, class Iterator2T > bool operator>=( const iterator_range<Iterator1T>& l, const iterator_range<Iterator2T>& r ) ; template< class IteratorT, class ForwardRange > typename boost::enable_if< mpl::not_<boost::is_base_and_derived<iterator_range_detail::iterator_range_tag, ForwardRange> >, bool >::type operator>=( const iterator_range<IteratorT>& l, const ForwardRange& r ) ; template< typename IteratorT > iterator_range< IteratorT > make_iterator_range( IteratorT Begin, IteratorT End ) ; template<typename IteratorT, typename IntegerT> iterator_range<IteratorT> make_iterator_range_n(IteratorT first, IntegerT n) ; template< class ForwardRange > iterator_range< typename range_iterator<ForwardRange>::type > make_iterator_range( ForwardRange& r ) ; template< class ForwardRange > iterator_range< typename range_iterator<const ForwardRange>::type > make_iterator_range( const ForwardRange& r ) ; namespace iterator_range_detail { template< class Range > iterator_range< typename range_iterator<Range>::type > make_range_impl( Range& r, typename range_difference<Range>::type advance_begin, typename range_difference<Range>::type advance_end ) ; } template< class Range > iterator_range< typename range_iterator<Range>::type > make_iterator_range( Range& r, typename range_difference<Range>::type advance_begin, typename range_difference<Range>::type advance_end ) ; template< class Range > iterator_range< typename range_iterator<const Range>::type > make_iterator_range( const Range& r, typename range_difference<Range>::type advance_begin, typename range_difference<Range>::type advance_end ) ; template< typename SeqT, typename Range > SeqT copy_range( const Range& r ) ; } namespace boost { template< typename IteratorT, typename Elem, typename Traits > std::basic_ostream<Elem,Traits>& operator<<( std::basic_ostream<Elem, Traits>& Os, const iterator_range<IteratorT>& r ) ; } namespace boost { namespace range_detail { template<typename Integer> class integer_iterator : public boost::iterator_facade< integer_iterator<Integer>, Integer, boost::random_access_traversal_tag, Integer, std::ptrdiff_t > { typedef boost::iterator_facade< integer_iterator<Integer>, Integer, boost::random_access_traversal_tag, Integer, std::ptrdiff_t > base_t; public: typedef typename base_t::value_type value_type; typedef typename base_t::difference_type difference_type; typedef typename base_t::reference reference; typedef std::random_access_iterator_tag iterator_category; integer_iterator() ; explicit integer_iterator(value_type x) ; private: void increment() ; void decrement() ; void advance(difference_type offset) ; difference_type distance_to(const integer_iterator& other) const ; bool equal(const integer_iterator& other) const ; reference dereference() const ; friend class ::boost::iterator_core_access; value_type m_value; }; template<typename Integer> class integer_iterator_with_step : public boost::iterator_facade< integer_iterator_with_step<Integer>, Integer, boost::random_access_traversal_tag, Integer, std::ptrdiff_t > { typedef boost::iterator_facade< integer_iterator_with_step<Integer>, Integer, boost::random_access_traversal_tag, Integer, std::ptrdiff_t > base_t; public: typedef typename base_t::value_type value_type; typedef typename base_t::difference_type difference_type; typedef typename base_t::reference reference; typedef std::random_access_iterator_tag iterator_category; integer_iterator_with_step(value_type first, difference_type step, value_type step_size) ; private: void increment() ; void decrement() ; void advance(difference_type offset) ; difference_type distance_to(const integer_iterator_with_step& other) const ; bool equal(const integer_iterator_with_step& other) const ; reference dereference() const ; friend class ::boost::iterator_core_access; value_type m_first; difference_type m_step; difference_type m_step_size; }; } template<typename Integer> class integer_range : public iterator_range< range_detail::integer_iterator<Integer> > { typedef range_detail::integer_iterator<Integer> iterator_t; typedef iterator_range<iterator_t> base_t; public: integer_range(Integer first, Integer last) ; }; template<typename Integer> class strided_integer_range : public iterator_range< range_detail::integer_iterator_with_step<Integer> > { typedef range_detail::integer_iterator_with_step<Integer> iterator_t; typedef iterator_range<iterator_t> base_t; public: template<typename Iterator> strided_integer_range(Iterator first, Iterator last) ; }; template<typename Integer> integer_range<Integer> irange(Integer first, Integer last) ; template<typename Integer, typename StepSize> strided_integer_range<Integer> irange(Integer first, Integer last, StepSize step_size) ; template<typename Integer> integer_range<Integer> irange(Integer last) ; } extern "C" { struct flock { short int l_type; short int l_whence; __off_t l_start; __off_t l_len; __pid_t l_pid; }; struct flock64 { short int l_type; short int l_whence; __off64_t l_start; __off64_t l_len; __pid_t l_pid; }; enum __pid_type { F_OWNER_TID = 0, F_OWNER_PID, F_OWNER_PGRP, F_OWNER_GID = F_OWNER_PGRP }; struct f_owner_ex { enum __pid_type type; __pid_t pid; }; struct file_handle { unsigned int handle_bytes; int handle_type; unsigned char f_handle[0]; }; extern "C" { extern __ssize_t readahead (int __fd, __off64_t __offset, size_t __count) noexcept (true); extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count, unsigned int __flags); extern __ssize_t vmsplice (int __fdout, const struct iovec *__iov, size_t __count, unsigned int __flags); ; ; ; ; ; ; } struct stat { __dev_t st_dev; __ino_t st_ino; __nlink_t st_nlink; __mode_t st_mode; __uid_t st_uid; __gid_t st_gid; int __pad0; __dev_t st_rdev; __off_t st_size; __blksize_t st_blksize; __blkcnt_t st_blocks; struct timespec st_atim; struct timespec st_mtim; struct timespec st_ctim; __syscall_slong_t __glibc_reserved[3]; }; struct stat64 { __dev_t st_dev; __ino64_t st_ino; __nlink_t st_nlink; __mode_t st_mode; __uid_t st_uid; __gid_t st_gid; int __pad0; __dev_t st_rdev; __off_t st_size; __blksize_t st_blksize; __blkcnt64_t st_blocks; struct timespec st_atim; struct timespec st_mtim; struct timespec st_ctim; __syscall_slong_t __glibc_reserved[3]; }; ; ; ; ; ; ; ; ; ; ; ; ; } extern "C" { ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; typedef __signed__ char __s8; typedef unsigned char __u8; typedef __signed__ short __s16; typedef unsigned short __u16; typedef __signed__ int __s32; typedef unsigned int __u32; __extension__ typedef __signed__ long long __s64; __extension__ typedef unsigned long long __u64; typedef struct { unsigned long fds_bits[1024 / (8 * sizeof(long))]; } __kernel_fd_set; typedef void (*__kernel_sighandler_t)(int); typedef int __kernel_key_t; typedef int __kernel_mqd_t; typedef unsigned short __kernel_old_uid_t; typedef unsigned short __kernel_old_gid_t; typedef unsigned long __kernel_old_dev_t; typedef long __kernel_long_t; typedef unsigned long __kernel_ulong_t; typedef __kernel_ulong_t __kernel_ino_t; typedef unsigned int __kernel_mode_t; typedef int __kernel_pid_t; typedef int __kernel_ipc_pid_t; typedef unsigned int __kernel_uid_t; typedef unsigned int __kernel_gid_t; typedef __kernel_long_t __kernel_suseconds_t; typedef int __kernel_daddr_t; typedef unsigned int __kernel_uid32_t; typedef unsigned int __kernel_gid32_t; typedef __kernel_ulong_t __kernel_size_t; typedef __kernel_long_t __kernel_ssize_t; typedef __kernel_long_t __kernel_ptrdiff_t; typedef struct { int val[2]; } __kernel_fsid_t; typedef __kernel_long_t __kernel_off_t; typedef long long __kernel_loff_t; typedef __kernel_long_t __kernel_old_time_t; typedef __kernel_long_t __kernel_time_t; typedef long long __kernel_time64_t; typedef __kernel_long_t __kernel_clock_t; typedef int __kernel_timer_t; typedef int __kernel_clockid_t; typedef char * __kernel_caddr_t; typedef unsigned short __kernel_uid16_t; typedef unsigned short __kernel_gid16_t; typedef __signed__ __int128 __s128 __attribute__((aligned(16))); typedef unsigned __int128 __u128 __attribute__((aligned(16))); typedef __u16 __le16; typedef __u16 __be16; typedef __u32 __le32; typedef __u32 __be32; typedef __u64 __le64; typedef __u64 __be64; typedef __u16 __sum16; typedef __u32 __wsum; typedef unsigned __poll_t; struct statx_timestamp { __s64 tv_sec; __u32 tv_nsec; __s32 __reserved; }; struct statx { __u32 stx_mask; __u32 stx_blksize; __u64 stx_attributes; __u32 stx_nlink; __u32 stx_uid; __u32 stx_gid; __u16 stx_mode; __u16 __spare0[1]; __u64 stx_ino; __u64 stx_size; __u64 stx_blocks; __u64 stx_attributes_mask; struct statx_timestamp stx_atime; struct statx_timestamp stx_btime; struct statx_timestamp stx_ctime; struct statx_timestamp stx_mtime; __u32 stx_rdev_major; __u32 stx_rdev_minor; __u32 stx_dev_major; __u32 stx_dev_minor; __u64 stx_mnt_id; __u32 stx_dio_mem_align; __u32 stx_dio_offset_align; __u64 __spare3[12]; }; extern "C" { ; } } namespace folly { namespace detail { template <typename> struct function_traits_base_; template <typename R, typename... A> struct function_traits_base_<R(A...)> { using result_type = R; template <std::size_t Idx> using argument = type_pack_element_t<Idx, A...>; template <template <typename...> class F> using arguments = F<A...>; }; template <bool Nx> struct function_traits_nx_ { static constexpr bool is_nothrow = Nx; }; template <bool Var> struct function_traits_var_ { static constexpr bool is_variadic = Var; }; template <typename T> struct function_traits_cvref_ { template <typename D> using value_like = like_t<T, D>; }; } template <typename> struct function_traits; template <typename R, typename... A> struct function_traits<R(A...)> : detail::function_traits_base_<R(A...)>, detail::function_traits_nx_<false>, detail::function_traits_var_<false>, detail::function_traits_cvref_<int> {}; template <typename R, typename... A> struct function_traits<R(A...) const> : detail::function_traits_base_<R(A...)>, detail::function_traits_nx_<false>, detail::function_traits_var_<false>, detail::function_traits_cvref_<int const> {}; template <typename R, typename... A> struct function_traits<R(A...) volatile> : detail::function_traits_base_<R(A...)>, detail::function_traits_nx_<false>, detail::function_traits_var_<false>, detail::function_traits_cvref_<int volatile> {}; template <typename R, typename... A> struct function_traits<R(A...) const volatile> : detail::function_traits_base_<R(A...)>, detail::function_traits_nx_<false>, detail::function_traits_var_<false>, detail::function_traits_cvref_<int const volatile> {}; template <typename R, typename... A> struct function_traits<R(A...)&> : detail::function_traits_base_<R(A...)>, detail::function_traits_nx_<false>, detail::function_traits_var_<false>, detail::function_traits_cvref_<int&> {}; template <typename R, typename... A> struct function_traits<R(A...) const&> : detail::function_traits_base_<R(A...)>, detail::function_traits_nx_<false>, detail::function_traits_var_<false>, detail::function_traits_cvref_<int const&> {}; template <typename R, typename... A> struct function_traits<R(A...) volatile&> : detail::function_traits_base_<R(A...)>, detail::function_traits_nx_<false>, detail::function_traits_var_<false>, detail::function_traits_cvref_<int volatile&> {}; template <typename R, typename... A> struct function_traits<R(A...) const volatile&> : detail::function_traits_base_<R(A...)>, detail::function_traits_nx_<false>, detail::function_traits_var_<false>, detail::function_traits_cvref_<int const volatile&> {}; template <typename R, typename... A> struct function_traits<R(A...) &&> : detail::function_traits_base_<R(A...)>, detail::function_traits_nx_<false>, detail::function_traits_var_<false>, detail::function_traits_cvref_<int&&> {}; template <typename R, typename... A> struct function_traits<R(A...) const&&> : detail::function_traits_base_<R(A...)>, detail::function_traits_nx_<false>, detail::function_traits_var_<false>, detail::function_traits_cvref_<int const&&> {}; template <typename R, typename... A> struct function_traits<R(A...) volatile&&> : detail::function_traits_base_<R(A...)>, detail::function_traits_nx_<false>, detail::function_traits_var_<false>, detail::function_traits_cvref_<int volatile&&> {}; template <typename R, typename... A> struct function_traits<R(A...) const volatile&&> : detail::function_traits_base_<R(A...)>, detail::function_traits_nx_<false>, detail::function_traits_var_<false>, detail::function_traits_cvref_<int const volatile&&> {}; template <typename R, typename... A> struct function_traits<R(A..., ...)> : detail::function_traits_base_<R(A...)>, detail::function_traits_nx_<false>, detail::function_traits_var_<true>, detail::function_traits_cvref_<int> {}; template <typename R, typename... A> struct function_traits<R(A..., ...) const> : detail::function_traits_base_<R(A...)>, detail::function_traits_nx_<false>, detail::function_traits_var_<true>, detail::function_traits_cvref_<int const> {}; template <typename R, typename... A> struct function_traits<R(A..., ...) volatile> : detail::function_traits_base_<R(A...)>, detail::function_traits_nx_<false>, detail::function_traits_var_<true>, detail::function_traits_cvref_<int volatile> {}; template <typename R, typename... A> struct function_traits<R(A..., ...) const volatile> : detail::function_traits_base_<R(A...)>, detail::function_traits_nx_<false>, detail::function_traits_var_<true>, detail::function_traits_cvref_<int const volatile> {}; template <typename R, typename... A> struct function_traits<R(A..., ...)&> : detail::function_traits_base_<R(A...)>, detail::function_traits_nx_<false>, detail::function_traits_var_<true>, detail::function_traits_cvref_<int&> {}; template <typename R, typename... A> struct function_traits<R(A..., ...) const&> : detail::function_traits_base_<R(A...)>, detail::function_traits_nx_<false>, detail::function_traits_var_<true>, detail::function_traits_cvref_<int const&> {}; template <typename R, typename... A> struct function_traits<R(A..., ...) volatile&> : detail::function_traits_base_<R(A...)>, detail::function_traits_nx_<false>, detail::function_traits_var_<true>, detail::function_traits_cvref_<int volatile&> {}; template <typename R, typename... A> struct function_traits<R(A..., ...) const volatile&> : detail::function_traits_base_<R(A...)>, detail::function_traits_nx_<false>, detail::function_traits_var_<true>, detail::function_traits_cvref_<int const volatile&> {}; template <typename R, typename... A> struct function_traits<R(A..., ...) &&> : detail::function_traits_base_<R(A...)>, detail::function_traits_nx_<false>, detail::function_traits_var_<true>, detail::function_traits_cvref_<int&&> {}; template <typename R, typename... A> struct function_traits<R(A..., ...) const&&> : detail::function_traits_base_<R(A...)>, detail::function_traits_nx_<false>, detail::function_traits_var_<true>, detail::function_traits_cvref_<int const&&> {}; template <typename R, typename... A> struct function_traits<R(A..., ...) volatile&&> : detail::function_traits_base_<R(A...)>, detail::function_traits_nx_<false>, detail::function_traits_var_<true>, detail::function_traits_cvref_<int volatile&&> {}; template <typename R, typename... A> struct function_traits<R(A..., ...) const volatile&&> : detail::function_traits_base_<R(A...)>, detail::function_traits_nx_<false>, detail::function_traits_var_<true>, detail::function_traits_cvref_<int const volatile&&> {}; template <typename R, typename... A> struct function_traits<R(A...) noexcept> : detail::function_traits_base_<R(A...)>, detail::function_traits_nx_<true>, detail::function_traits_var_<false>, detail::function_traits_cvref_<int> {}; template <typename R, typename... A> struct function_traits<R(A...) const noexcept> : detail::function_traits_base_<R(A...)>, detail::function_traits_nx_<true>, detail::function_traits_var_<false>, detail::function_traits_cvref_<int const> {}; template <typename R, typename... A> struct function_traits<R(A...) volatile noexcept> : detail::function_traits_base_<R(A...)>, detail::function_traits_nx_<true>, detail::function_traits_var_<false>, detail::function_traits_cvref_<int volatile> {}; template <typename R, typename... A> struct function_traits<R(A...) const volatile noexcept> : detail::function_traits_base_<R(A...)>, detail::function_traits_nx_<true>, detail::function_traits_var_<false>, detail::function_traits_cvref_<int const volatile> {}; template <typename R, typename... A> struct function_traits<R(A...) & noexcept> : detail::function_traits_base_<R(A...)>, detail::function_traits_nx_<true>, detail::function_traits_var_<false>, detail::function_traits_cvref_<int&> {}; template <typename R, typename... A> struct function_traits<R(A...) const & noexcept> : detail::function_traits_base_<R(A...)>, detail::function_traits_nx_<true>, detail::function_traits_var_<false>, detail::function_traits_cvref_<int const&> {}; template <typename R, typename... A> struct function_traits<R(A...) volatile & noexcept> : detail::function_traits_base_<R(A...)>, detail::function_traits_nx_<true>, detail::function_traits_var_<false>, detail::function_traits_cvref_<int volatile&> {}; template <typename R, typename... A> struct function_traits<R(A...) const volatile & noexcept> : detail::function_traits_base_<R(A...)>, detail::function_traits_nx_<true>, detail::function_traits_var_<false>, detail::function_traits_cvref_<int const volatile&> {}; template <typename R, typename... A> struct function_traits<R(A...) && noexcept> : detail::function_traits_base_<R(A...)>, detail::function_traits_nx_<true>, detail::function_traits_var_<false>, detail::function_traits_cvref_<int&&> {}; template <typename R, typename... A> struct function_traits<R(A...) const && noexcept> : detail::function_traits_base_<R(A...)>, detail::function_traits_nx_<true>, detail::function_traits_var_<false>, detail::function_traits_cvref_<int const&&> {}; template <typename R, typename... A> struct function_traits<R(A...) volatile && noexcept> : detail::function_traits_base_<R(A...)>, detail::function_traits_nx_<true>, detail::function_traits_var_<false>, detail::function_traits_cvref_<int volatile&&> {}; template <typename R, typename... A> struct function_traits<R(A...) const volatile && noexcept> : detail::function_traits_base_<R(A...)>, detail::function_traits_nx_<true>, detail::function_traits_var_<false>, detail::function_traits_cvref_<int const volatile&&> {}; template <typename R, typename... A> struct function_traits<R(A..., ...) noexcept> : detail::function_traits_base_<R(A...)>, detail::function_traits_nx_<true>, detail::function_traits_var_<true>, detail::function_traits_cvref_<int> {}; template <typename R, typename... A> struct function_traits<R(A..., ...) const noexcept> : detail::function_traits_base_<R(A...)>, detail::function_traits_nx_<true>, detail::function_traits_var_<true>, detail::function_traits_cvref_<int const> {}; template <typename R, typename... A> struct function_traits<R(A..., ...) volatile noexcept> : detail::function_traits_base_<R(A...)>, detail::function_traits_nx_<true>, detail::function_traits_var_<true>, detail::function_traits_cvref_<int volatile> {}; template <typename R, typename... A> struct function_traits<R(A..., ...) const volatile noexcept> : detail::function_traits_base_<R(A...)>, detail::function_traits_nx_<true>, detail::function_traits_var_<true>, detail::function_traits_cvref_<int const volatile> {}; template <typename R, typename... A> struct function_traits<R(A..., ...) & noexcept> : detail::function_traits_base_<R(A...)>, detail::function_traits_nx_<true>, detail::function_traits_var_<true>, detail::function_traits_cvref_<int&> {}; template <typename R, typename... A> struct function_traits<R(A..., ...) const & noexcept> : detail::function_traits_base_<R(A...)>, detail::function_traits_nx_<true>, detail::function_traits_var_<true>, detail::function_traits_cvref_<int const&> {}; template <typename R, typename... A> struct function_traits<R(A..., ...) volatile & noexcept> : detail::function_traits_base_<R(A...)>, detail::function_traits_nx_<true>, detail::function_traits_var_<true>, detail::function_traits_cvref_<int volatile&> {}; template <typename R, typename... A> struct function_traits<R(A..., ...) const volatile & noexcept> : detail::function_traits_base_<R(A...)>, detail::function_traits_nx_<true>, detail::function_traits_var_<true>, detail::function_traits_cvref_<int const volatile&> {}; template <typename R, typename... A> struct function_traits<R(A..., ...) && noexcept> : detail::function_traits_base_<R(A...)>, detail::function_traits_nx_<true>, detail::function_traits_var_<true>, detail::function_traits_cvref_<int&&> {}; template <typename R, typename... A> struct function_traits<R(A..., ...) const && noexcept> : detail::function_traits_base_<R(A...)>, detail::function_traits_nx_<true>, detail::function_traits_var_<true>, detail::function_traits_cvref_<int const&&> {}; template <typename R, typename... A> struct function_traits<R(A..., ...) volatile && noexcept> : detail::function_traits_base_<R(A...)>, detail::function_traits_nx_<true>, detail::function_traits_var_<true>, detail::function_traits_cvref_<int volatile&&> {}; template <typename R, typename... A> struct function_traits<R(A..., ...) const volatile && noexcept> : detail::function_traits_base_<R(A...)>, detail::function_traits_nx_<true>, detail::function_traits_var_<true>, detail::function_traits_cvref_<int const volatile&&> {}; namespace detail { template <bool Nx, bool Var, typename R> struct function_remove_cvref_; template <typename R> struct function_remove_cvref_<false, false, R> { template <typename... A> using apply = R(A...); }; template <typename R> struct function_remove_cvref_<false, true, R> { template <typename... A> using apply = R(A..., ...); }; template <typename R> struct function_remove_cvref_<true, false, R> { template <typename... A> using apply = R(A...) noexcept; }; template <typename R> struct function_remove_cvref_<true, true, R> { template <typename... A> using apply = R(A..., ...) noexcept; }; template <typename F, typename T = function_traits<F>> using function_remove_cvref_t_ = typename T::template arguments<function_remove_cvref_< T::is_nothrow, T::is_variadic, typename T::result_type>::template apply>; } template <typename F> using function_remove_cvref_t = detail::function_remove_cvref_t_<F>; template <typename F> struct function_remove_cvref { using type = function_remove_cvref_t<F>; }; namespace detail { template <typename Src, bool Var> struct function_like_src_; template <typename Src> struct function_like_src_<Src, 0> { template <bool Nx, typename R, typename... A> using apply = R(A...) noexcept(Nx); }; template <typename Src> struct function_like_src_<Src const, 0> { template <bool Nx, typename R, typename... A> using apply = R(A...) const noexcept(Nx); }; template <typename Src> struct function_like_src_<Src volatile, 0> { template <bool Nx, typename R, typename... A> using apply = R(A...) volatile noexcept(Nx); }; template <typename Src> struct function_like_src_<Src const volatile, 0> { template <bool Nx, typename R, typename... A> using apply = R(A...) const volatile noexcept(Nx); }; template <typename Src> struct function_like_src_<Src&, 0> { template <bool Nx, typename R, typename... A> using apply = R(A...) & noexcept(Nx); }; template <typename Src> struct function_like_src_<Src const&, 0> { template <bool Nx, typename R, typename... A> using apply = R(A...) const& noexcept(Nx); }; template <typename Src> struct function_like_src_<Src volatile&, 0> { template <bool Nx, typename R, typename... A> using apply = R(A...) volatile& noexcept(Nx); }; template <typename Src> struct function_like_src_<Src const volatile&, 0> { template <bool Nx, typename R, typename... A> using apply = R(A...) const volatile& noexcept(Nx); }; template <typename Src> struct function_like_src_<Src&&, 0> { template <bool Nx, typename R, typename... A> using apply = R(A...) && noexcept(Nx); }; template <typename Src> struct function_like_src_<Src const&&, 0> { template <bool Nx, typename R, typename... A> using apply = R(A...) const&& noexcept(Nx); }; template <typename Src> struct function_like_src_<Src volatile&&, 0> { template <bool Nx, typename R, typename... A> using apply = R(A...) volatile&& noexcept(Nx); }; template <typename Src> struct function_like_src_<Src const volatile&&, 0> { template <bool Nx, typename R, typename... A> using apply = R(A...) const volatile&& noexcept(Nx); }; template <typename Src> struct function_like_src_<Src, 1> { template <bool Nx, typename R, typename... A> using apply = R(A..., ...) noexcept(Nx); }; template <typename Src> struct function_like_src_<Src const, 1> { template <bool Nx, typename R, typename... A> using apply = R(A..., ...) const noexcept(Nx); }; template <typename Src> struct function_like_src_<Src volatile, 1> { template <bool Nx, typename R, typename... A> using apply = R(A..., ...) volatile noexcept(Nx); }; template <typename Src> struct function_like_src_<Src const volatile, 1> { template <bool Nx, typename R, typename... A> using apply = R(A..., ...) const volatile noexcept(Nx); }; template <typename Src> struct function_like_src_<Src&, 1> { template <bool Nx, typename R, typename... A> using apply = R(A..., ...) & noexcept(Nx); }; template <typename Src> struct function_like_src_<Src const&, 1> { template <bool Nx, typename R, typename... A> using apply = R(A..., ...) const& noexcept(Nx); }; template <typename Src> struct function_like_src_<Src volatile&, 1> { template <bool Nx, typename R, typename... A> using apply = R(A..., ...) volatile& noexcept(Nx); }; template <typename Src> struct function_like_src_<Src const volatile&, 1> { template <bool Nx, typename R, typename... A> using apply = R(A..., ...) const volatile& noexcept(Nx); }; template <typename Src> struct function_like_src_<Src&&, 1> { template <bool Nx, typename R, typename... A> using apply = R(A..., ...) && noexcept(Nx); }; template <typename Src> struct function_like_src_<Src const&&, 1> { template <bool Nx, typename R, typename... A> using apply = R(A..., ...) const&& noexcept(Nx); }; template <typename Src> struct function_like_src_<Src volatile&&, 1> { template <bool Nx, typename R, typename... A> using apply = R(A..., ...) volatile&& noexcept(Nx); }; template <typename Src> struct function_like_src_<Src const volatile&&, 1> { template <bool Nx, typename R, typename... A> using apply = R(A..., ...) const volatile&& noexcept(Nx); }; template <typename Dst> struct function_like_dst_ : function_like_dst_<function_remove_cvref_t<Dst>> {}; template <typename R, typename... A> struct function_like_dst_<R(A...)> { template <typename Src> using apply = typename function_like_src_<Src, 0>::template apply<0, R, A...>; }; template <typename R, typename... A> struct function_like_dst_<R(A..., ...)> { template <typename Src> using apply = typename function_like_src_<Src, 1>::template apply<0, R, A...>; }; template <typename R, typename... A> struct function_like_dst_<R(A...) noexcept> { template <typename Src> using apply = typename function_like_src_<Src, 0>::template apply<1, R, A...>; }; template <typename R, typename... A> struct function_like_dst_<R(A..., ...) noexcept> { template <typename Src> using apply = typename function_like_src_<Src, 1>::template apply<1, R, A...>; }; } template <typename Src, typename Dst> using function_like_value_t = typename detail::function_like_dst_<Dst>::template apply<Src>; template <typename Src, typename Dst> struct function_like_value { using type = function_like_value_t<Src, Dst>; }; } namespace folly { class exception_wrapper final { private: struct with_exception_from_fn_; struct with_exception_from_ex_; [[noreturn]] static void onNoExceptionError(char const* name); template <class Ex> using IsStdException = std::is_base_of<std::exception, std::decay_t<Ex>>; struct PrivateCtor {}; std::exception_ptr ptr_; ; template <class T> struct IsRegularExceptionType : StrictConjunction< std::is_copy_constructible<T>, Negation<std::is_base_of<exception_wrapper, T>>, Negation<std::is_abstract<T>>> {}; template <class This, class Fn> static bool with_exception_(This& this_, Fn fn_, tag_t<void>); ; ; template <class This, class... CatchFns> static void handle_(This& this_, char const* name, CatchFns&... fns); public: exception_wrapper() noexcept ; exception_wrapper(exception_wrapper&& that) noexcept; exception_wrapper(exception_wrapper const& that) = default; exception_wrapper& operator=(exception_wrapper&& that) noexcept; exception_wrapper& operator=(exception_wrapper const& that) = default; explicit exception_wrapper(std::exception_ptr&& ptr) noexcept; ; ; ; ; ; bool operator!() const noexcept; ; ; ; std::exception const* get_exception() const noexcept; ; ; ; std::type_info const* type() const noexcept; ; folly::fbstring class_name() const; ; [[noreturn]] void throw_exception() const; [[noreturn]] ; ; ; ; ; }; ; ; ; } namespace folly { struct exception_wrapper::with_exception_from_fn_ { struct impl_var_ { template <typename> using apply = void; }; struct impl_arg_ { template <typename F> using apply = typename function_traits<F>::template argument<0>; }; struct impl_bye_; template < typename Sig, typename Traits = function_traits<Sig>, std::size_t NArgs = Traits::template arguments<type_pack_size_t>::value> using impl_ = conditional_t< Traits::is_variadic, impl_var_, conditional_t<NArgs == 1, impl_arg_, impl_bye_>>; template <typename T> using member_ = typename member_pointer_traits<T>::member_type; template <typename Void, typename> struct arg_type_; template <class Sig> struct arg_type_<std::enable_if_t<std::is_function<Sig>::value>, Sig> { using type = typename impl_<Sig>::template apply<Sig>; }; template <class Ptr> struct arg_type_<std::enable_if_t<std::is_pointer<Ptr>::value>, Ptr> : arg_type_<void, std::remove_pointer_t<Ptr>> {}; template <class Obj> struct arg_type_<void_t<decltype(&Obj::operator())>, Obj> : arg_type_<void, member_<decltype(&Obj::operator())>> {}; template <typename, typename Fn> using apply = _t<arg_type_<void, Fn>>; }; struct exception_wrapper::with_exception_from_ex_ { template <typename Ex, typename> using apply = Ex; }; namespace exception_wrapper_detail { ; } inline folly::fbstring exception_wrapper::class_name() const { auto const* const ti = type(); return !*this ? "" : !ti ? "<unknown>" : folly::demangle(*ti); } [[noreturn]] inline void exception_wrapper::throw_exception() const { ptr_ ? std::rethrow_exception(ptr_) : onNoExceptionError(__func__); } template <class This, class Fn> inline bool exception_wrapper::with_exception_(This&, Fn fn_, tag_t<void>) { return void(fn_()), true; } } namespace folly { class File { public: constexpr File() ; ~File(); int fd() const ; File(File&&) noexcept; File& operator=(File&&); private: int fd_; bool ownsFd_; }; } namespace folly { using FlagSaver = gflags::FlagSaver; } namespace folly { class MemoryMapping { public: enum class LockMode { TRY_LOCK, MUST_LOCK, }; struct LockFlags { LockFlags() ; bool lockOnFault = false; }; struct Options { Options() ; Options& setWritable(bool v) ; Options& setGrow(bool v) ; off64_t pageSize = 0; bool shared = true; bool prefault = false; bool readable = true; bool writable = false; bool grow = false; void* address = nullptr; }; enum AnonymousType { kAnonymous, }; template <class T> Range<const T*> asRange() const ; private: enum InitFlags { kGrow = 1 << 0, kAnon = 1 << 1, }; File file_; void* mapStart_ = nullptr; off64_t mapLength_ = 0; Options options_; bool locked_ = false; MutableByteRange data_; }; } namespace std __attribute__ ((__visibility__ ("default"))) { struct type_index { type_index(const type_info& __rhs) ; bool operator==(const type_index& __rhs) const noexcept ; bool operator<(const type_index& __rhs) const noexcept ; bool operator<=(const type_index& __rhs) const noexcept ; bool operator>(const type_index& __rhs) const noexcept ; bool operator>=(const type_index& __rhs) const noexcept ; strong_ordering operator<=>(const type_index& __rhs) const noexcept ; size_t hash_code() const noexcept ; const char* name() const noexcept ; private: const type_info* _M_target; }; template<typename _Tp> struct hash; template<> struct hash<type_index> { typedef size_t result_type; typedef type_index argument_type; size_t operator()(const type_index& __ti) const noexcept ; }; } namespace folly { template < typename Key, typename Value, typename Compare, typename Allocator, typename GrowthPolicy, typename Container> class heap_vector_map; namespace detail { namespace heap_vector_detail { template <typename size_type> size_type firstOffset(size_type size) ; template <typename size_type> size_type lastOffset(size_type size) ; template <typename size_type> size_type next(size_type offset, size_type size) ; template <typename size_type> size_type prev(size_type offset, size_type size) ; template <typename size_type> size_type getStartOffsetToScan(size_type offset1, size_type offset2) ; template <typename Container, typename size_type> typename Container::difference_type distance( Container& cont, size_type start, size_type end) ; template <typename size_type, typename Offsets> void getOffsets(size_type size, Offsets& offsets) ; template <class Container> void heapify(Container& cont) ; template <typename size_type, typename Offsets> bool getOffsetRange( size_type size, Offsets& offsets, size_type offset, size_type current) ; template <typename size_type, typename Offsets> void getOffsetRange(size_type size, Offsets& offsets, size_type offset) ; template <typename size_type, class Container> size_type insert(size_type offset, Container& cont) ; template <typename size_type, class Container> size_type erase(size_type offset, Container& cont) ; template <typename Compare, typename RCompare, typename Container> typename Container::size_type lower_bound( Container& cont, Compare cmp, RCompare reverseCmp) ; template <typename Compare, typename Container> typename Container::size_type upper_bound(Container& cont, Compare cmp) ; template <typename, typename Compare, typename Key, typename T> struct heap_vector_enable_if_is_transparent {}; template <typename Compare, typename Key, typename T> struct heap_vector_enable_if_is_transparent< void_t<typename Compare::is_transparent>, Compare, Key, T> { using type = T; }; template <class Policy> struct growth_policy_wrapper : private Policy { template <class Container, class Iterator> Iterator increase_capacity(Container& c, Iterator desired_insertion) ; }; template <> struct growth_policy_wrapper<void> { template <class Container, class Iterator> Iterator increase_capacity(Container&, Iterator it) ; }; template <class OurContainer, class Container, class InputIterator> void bulk_insert( OurContainer& sorted, Container& cont, InputIterator first, InputIterator last) ; template <typename Container, typename Compare> bool is_sorted_unique(Container const& container, Compare const& comp) ; template <typename Container, typename Compare> Container&& as_sorted_unique(Container&& container, Compare const& comp) ; template <class Compare> struct value_compare_map : Compare { template <typename... value_type> auto operator()(const value_type&... a) const noexcept(is_nothrow_invocable_v<const Compare&, decltype((a.first))...>) -> invoke_result_t<const Compare&, decltype((a.first))...> ; template <typename value_type> const auto& getKey(const value_type& a) const noexcept ; explicit value_compare_map(const Compare& c) noexcept( std::is_nothrow_copy_constructible<Compare>::value) ; }; template <class Compare> struct value_compare_set : Compare { using Compare::operator(); template <typename value_type> value_type& getKey(value_type& a) const noexcept ; explicit value_compare_set(const Compare& c) noexcept( std::is_nothrow_copy_constructible<Compare>::value) ; }; template < class T, class Compare = std::less<T>, class Allocator = std::allocator<T>, class GrowthPolicy = void, class Container = std::vector<T, Allocator>, class KeyT = T, class ValueCompare = value_compare_set<Compare>> class heap_vector_container : growth_policy_wrapper<GrowthPolicy> { protected: growth_policy_wrapper<GrowthPolicy>& get_growth_policy() ; template <typename K, typename V, typename C = Compare> using if_is_transparent = _t<heap_vector_enable_if_is_transparent<void, C, K, V>>; struct EBO; public: using key_type = KeyT; using value_type = T; using key_compare = Compare; using value_compare = ValueCompare; using allocator_type = Allocator; using container_type = Container; using pointer = typename Container::pointer; using reference = typename Container::reference; using const_reference = typename Container::const_reference; using difference_type = typename Container::difference_type; using size_type = typename Container::size_type; template <typename Iter> struct heap_iterator { using iterator_category = std::random_access_iterator_tag; using size_type = typename Container::size_type; using difference_type = typename std::iterator_traits<Iter>::difference_type; using value_type = typename std::iterator_traits<Iter>::value_type; using pointer = typename std::iterator_traits<Iter>::pointer; using reference = typename std::iterator_traits<Iter>::reference; heap_iterator() = default; template <typename C> heap_iterator(Iter ptr, C* cont) ; template < typename I2, typename = typename std::enable_if< std::is_same<typename Container::iterator, I2>::value>::type> heap_iterator(const heap_iterator<I2>& rawIterator) ; ~heap_iterator() = default; heap_iterator(const heap_iterator& rawIterator) = default; heap_iterator& operator=(const heap_iterator& rawIterator) = default; heap_iterator& operator=(Iter ptr) ; bool operator==(const heap_iterator& rawIterator) const ; bool operator!=(const heap_iterator& rawIterator) const ; heap_iterator& operator+=(const difference_type& movement) ; heap_iterator& operator-=(const difference_type& movement) ; heap_iterator& operator++() ; heap_iterator& operator--() ; heap_iterator operator++(int) ; heap_iterator operator--(int) ; heap_iterator operator+(const difference_type& movement) ; heap_iterator operator+(const difference_type& movement) const ; heap_iterator operator-(const difference_type& movement) ; heap_iterator operator-(const difference_type& movement) const ; difference_type operator-(const heap_iterator& rawIterator) ; difference_type operator-(const heap_iterator& rawIterator) const ; reference operator*() const ; pointer operator->() const ; protected: template <typename I2> friend struct heap_iterator; template < typename T2, typename Compare2, typename Allocator2, typename GrowthPolicy2, typename Container2, typename KeyT2, typename ValueCompare2> friend class heap_vector_container; template < typename Key2, typename Value2, typename Compare2, typename Allocator2, typename GrowthPolicy2, typename Container2> friend class ::folly::heap_vector_map; Iter ptr_; Container* cont_; }; using iterator = heap_iterator<typename Container::iterator>; using const_iterator = heap_iterator<typename Container::const_iterator>; using reverse_iterator = std::reverse_iterator<iterator>; using const_reverse_iterator = std::reverse_iterator<const_iterator>; heap_vector_container() ; heap_vector_container(const heap_vector_container&) = default; heap_vector_container( const heap_vector_container& other, const Allocator& alloc) ; heap_vector_container(heap_vector_container&&) = default; heap_vector_container( heap_vector_container&& other, const Allocator& alloc) noexcept(std:: is_nothrow_constructible< EBO, EBO&&, const Allocator&>::value) ; explicit heap_vector_container(const Allocator& alloc) ; explicit heap_vector_container( const Compare& comp, const Allocator& alloc = Allocator()) ; template <class InputIterator> explicit heap_vector_container( InputIterator first, InputIterator last, const Compare& comp = Compare(), const Allocator& alloc = Allocator()) ; template <class InputIterator> heap_vector_container( InputIterator first, InputIterator last, const Allocator& alloc) ; heap_vector_container( std::initializer_list<value_type> list, const Compare& comp = Compare(), const Allocator& alloc = Allocator()) ; heap_vector_container( std::initializer_list<value_type> list, const Allocator& alloc) ; explicit heap_vector_container( Container&& container, const Compare& comp = Compare()) noexcept(std:: is_nothrow_constructible< EBO, value_compare, Container&&>::value) ; heap_vector_container( sorted_unique_t , Container&& container, const Compare& comp = Compare()) noexcept(std:: is_nothrow_constructible< EBO, value_compare, Container&&>::value) ; Allocator get_allocator() const ; const Container& get_container() const noexcept ; heap_vector_container& operator=(const heap_vector_container& other) = default; heap_vector_container& operator=(heap_vector_container&& other) = default; heap_vector_container& operator=(std::initializer_list<value_type> ilist) ; key_compare key_comp() const ; value_compare value_comp() const ; iterator begin() ; iterator end() ; const_iterator cbegin() const ; const_iterator begin() const ; const_iterator cend() const ; const_iterator end() const ; reverse_iterator rbegin() ; reverse_iterator rend() ; const_reverse_iterator rbegin() const ; const_reverse_iterator rend() const ; const_reverse_iterator crbegin() const ; const_reverse_iterator crend() const ; void clear() ; size_type size() const ; size_type max_size() const ; bool empty() const ; void reserve(size_type s) ; void shrink_to_fit() ; size_type capacity() const ; const value_type* data() const noexcept ; std::pair<iterator, bool> insert(const value_type& value) ; std::pair<iterator, bool> insert(value_type&& value) ; iterator insert(const_iterator , const value_type& value) ; iterator insert(const_iterator , value_type&& value) ; template <class InputIterator> void insert(InputIterator first, InputIterator last) ; void insert(std::initializer_list<value_type> ilist) ; template <typename... Args> std::pair<iterator, bool> emplace(Args&&... args) ; std::pair<iterator, bool> emplace(const value_type& value) ; std::pair<iterator, bool> emplace(value_type&& value) ; template <typename... Args> iterator emplace_hint(const_iterator , Args&&... args) ; iterator emplace_hint(const_iterator hint, const value_type& value) ; iterator emplace_hint(const_iterator hint, value_type&& value) ; ; ; ; ; ; ; ; ; ; ; bool operator==(const heap_vector_container& other) const ; protected: struct EBO : value_compare { Container cont_; } m_; template <typename Self> using self_iterator_t = typename std:: conditional<std::is_const<Self>::value, const_iterator, iterator>::type; ; ; ; }; } } template < class T, class Compare = std::less<T>, class Allocator = std::allocator<T>, class GrowthPolicy = void, class Container = std::vector<T, Allocator>> class heap_vector_set : public detail::heap_vector_detail::heap_vector_container< T, Compare, Allocator, GrowthPolicy, Container, T, detail::heap_vector_detail::value_compare_set<Compare>> { private: using heap_vector_container = detail::heap_vector_detail::heap_vector_container< T, Compare, Allocator, GrowthPolicy, Container, T, detail::heap_vector_detail::value_compare_set<Compare>>; public: using heap_vector_container::heap_vector_container; }; ; namespace pmr { template < class T, class Compare = std::less<T>, class GrowthPolicy = void, class Container = std::vector<T, folly::detail::std_pmr::polymorphic_allocator<T>>> using heap_vector_set = folly::heap_vector_set< T, Compare, folly::detail::std_pmr::polymorphic_allocator<T>, GrowthPolicy, Container>; } template < class Key, class Value, class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<Key, Value>>, class GrowthPolicy = void, class Container = std::vector<std::pair<Key, Value>, Allocator>> class heap_vector_map : public detail::heap_vector_detail::heap_vector_container< typename Container::value_type, Compare, Allocator, GrowthPolicy, Container, Key, detail::heap_vector_detail::value_compare_map<Compare>> { public: using key_type = Key; using mapped_type = Value; using value_type = typename Container::value_type; using key_compare = Compare; using allocator_type = Allocator; using container_type = Container; using pointer = typename Container::pointer; using reference = typename Container::reference; using const_reference = typename Container::const_reference; using difference_type = typename Container::difference_type; using size_type = typename Container::size_type; using value_compare = detail::heap_vector_detail::value_compare_map<Compare>; protected: using heap_vector_container = detail::heap_vector_detail::heap_vector_container< value_type, key_compare, Allocator, GrowthPolicy, Container, key_type, value_compare>; using heap_vector_container::get_growth_policy; using heap_vector_container::m_; public: using iterator = typename heap_vector_container::iterator; using const_iterator = typename heap_vector_container::const_iterator; using reverse_iterator = std::reverse_iterator<iterator>; using const_reverse_iterator = std::reverse_iterator<const_iterator>; using heap_vector_container::end; using heap_vector_container::find; using heap_vector_container::heap_vector_container; using heap_vector_container::key_comp; using heap_vector_container::lower_bound; }; ; namespace pmr { template < class Key, class Value, class Compare = std::less<Key>, class GrowthPolicy = void, class Container = std::vector< std::pair<Key, Value>, folly::detail::std_pmr::polymorphic_allocator<std::pair<Key, Value>>>> using heap_vector_map = folly::heap_vector_map< Key, Value, Compare, folly::detail::std_pmr::polymorphic_allocator<std::pair<Key, Value>>, GrowthPolicy, Container>; } template < typename Key, typename Value, typename SizeType = uint32_t, class Container = folly::small_vector< std::pair<Key, Value>, 0, folly::small_vector_policy::policy_size_type<SizeType>>, typename = std::enable_if_t< std::is_integral<Key>::value || std::is_enum<Key>::value>> class small_heap_vector_map : public folly::heap_vector_map< Key, Value, std::less<Key>, typename Container::allocator_type, void, Container> { public: using key_type = Key; using mapped_type = Value; using value_type = typename Container::value_type; using key_compare = std::less<Key>; using allocator_type = typename Container::allocator_type; using container_type = Container; using pointer = typename Container::pointer; using reference = typename Container::reference; using const_reference = typename Container::const_reference; using difference_type = typename Container::difference_type; using size_type = typename Container::size_type; using value_compare = detail::heap_vector_detail::value_compare_map<std::less<Key>>; private: using heap_vector_map = folly:: heap_vector_map<Key, Value, key_compare, allocator_type, void, Container>; using heap_vector_map::m_; public: using iterator = typename heap_vector_map::iterator; using const_iterator = typename heap_vector_map::const_iterator; using reverse_iterator = std::reverse_iterator<iterator>; using const_reverse_iterator = std::reverse_iterator<const_iterator>; using heap_vector_map::begin; using heap_vector_map::heap_vector_map; using heap_vector_map::size; private: ; }; } namespace folly { template <class T> struct UnalignedNoASan : public Unaligned<T> {}; namespace detail { template <class T, class Enable = void> struct BitsTraits; template <class T> struct BitsTraits< Unaligned<T>, typename std::enable_if<(std::is_integral<T>::value)>::type> { typedef T UnderlyingType; }; template <class T> struct BitsTraits< UnalignedNoASan<T>, typename std::enable_if<(std::is_integral<T>::value)>::type> { typedef T UnderlyingType; }; template <class T> struct BitsTraits< T, typename std::enable_if<(std::is_integral<T>::value)>::type> { typedef T UnderlyingType; }; } template <class T, class Traits = detail::BitsTraits<T>> struct Bits { typedef typename Traits::UnderlyingType UnderlyingType; typedef T type; static_assert(sizeof(T) == sizeof(UnderlyingType), "Size mismatch"); static constexpr size_t bitsPerBlock = std::numeric_limits< typename std::make_unsigned<UnderlyingType>::type>::digits; private: static constexpr UnderlyingType zero = UnderlyingType(0); static constexpr UnderlyingType one = UnderlyingType(1); using UnsignedType = typename std::make_unsigned<UnderlyingType>::type; }; } namespace folly { namespace access { namespace swap_fn__folly_detail_invoke_ns { [[maybe_unused]] using ::std::swap; struct __folly_detail_invoke_obj { ; }; } struct swap_fn : swap_fn__folly_detail_invoke_ns::__folly_detail_invoke_obj {}; [[maybe_unused]] inline constexpr swap_fn swap {}; } } namespace folly { namespace detail { template <typename, typename Compare, typename Key, typename T> struct sorted_vector_enable_if_is_transparent {}; template <typename Compare, typename Key, typename T> struct sorted_vector_enable_if_is_transparent< void_t<typename Compare::is_transparent>, Compare, Key, T> { using type = T; }; template <class Policy> struct growth_policy_wrapper : private Policy { ; }; template <> struct growth_policy_wrapper<void> { ; }; ; ; ; template <typename Container, typename Compare> class DirectMutationGuard { public: private: Container& container_; const Compare comp_; const bool isSortedUnique_; }; ; } template < class T, class Compare = std::less<T>, class Allocator = std::allocator<T>, class GrowthPolicy = void, class Container = std::vector<T, Allocator>> class sorted_vector_set : detail::growth_policy_wrapper<GrowthPolicy> { template <typename K, typename V, typename C = Compare> using if_is_transparent = _t<detail::sorted_vector_enable_if_is_transparent<void, C, K, V>>; struct EBO; public: typedef T value_type; typedef T key_type; typedef Compare key_compare; typedef Compare value_compare; typedef Allocator allocator_type; typedef Container container_type; typedef typename Container::pointer pointer; typedef typename Container::reference reference; typedef typename Container::const_reference const_reference; typedef typename Container::const_pointer const_pointer; typedef typename Container::iterator iterator; typedef typename Container::const_iterator const_iterator; typedef typename Container::difference_type difference_type; typedef typename Container::size_type size_type; typedef typename Container::reverse_iterator reverse_iterator; typedef typename Container::const_reverse_iterator const_reverse_iterator; typedef detail::DirectMutationGuard<Container, value_compare> direct_mutation_guard; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; private: struct EBO : Compare { Container cont_; } m_; template <typename Self> using self_iterator_t = _t< std::conditional<std::is_const<Self>::value, const_iterator, iterator>>; ; ; ; }; ; template <typename T> inline constexpr bool is_sorted_vector_set_v = detail::is_instantiation_of_v<sorted_vector_set, T>; template <typename T> struct is_sorted_vector_set : std::bool_constant<is_sorted_vector_set_v<T>> {}; namespace pmr { template < class T, class Compare = std::less<T>, class GrowthPolicy = void, class Container = std::vector<T, folly::detail::std_pmr::polymorphic_allocator<T>>> using sorted_vector_set = folly::sorted_vector_set< T, Compare, folly::detail::std_pmr::polymorphic_allocator<T>, GrowthPolicy, Container>; } template < class Key, class Value, class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<Key, Value>>, class GrowthPolicy = void, class Container = std::vector<std::pair<Key, Value>, Allocator>> class sorted_vector_map : detail::growth_policy_wrapper<GrowthPolicy> { template <typename K, typename V, typename C = Compare> using if_is_transparent = _t<detail::sorted_vector_enable_if_is_transparent<void, C, K, V>>; struct EBO; public: typedef Key key_type; typedef Value mapped_type; typedef typename Container::value_type value_type; typedef Compare key_compare; typedef Allocator allocator_type; typedef Container container_type; struct value_compare : private Compare { protected: friend class sorted_vector_map; }; typedef typename Container::pointer pointer; typedef typename Container::const_pointer const_pointer; typedef typename Container::reference reference; typedef typename Container::const_reference const_reference; typedef typename Container::iterator iterator; typedef typename Container::const_iterator const_iterator; typedef typename Container::difference_type difference_type; typedef typename Container::size_type size_type; typedef typename Container::reverse_iterator reverse_iterator; typedef typename Container::const_reverse_iterator const_reverse_iterator; typedef detail::DirectMutationGuard<Container, value_compare> direct_mutation_guard; ; ; sorted_vector_map& operator=(const sorted_vector_map& other) = default; sorted_vector_map& operator=(sorted_vector_map&& other) = default; sorted_vector_map& operator=(std::initializer_list<value_type> ilist) ; key_compare key_comp() const ; value_compare value_comp() const ; iterator begin() ; iterator end() ; const_iterator cbegin() const ; const_iterator begin() const ; const_iterator cend() const ; const_iterator end() const ; reverse_iterator rbegin() ; reverse_iterator rend() ; const_reverse_iterator crbegin() const ; const_reverse_iterator rbegin() const ; const_reverse_iterator crend() const ; const_reverse_iterator rend() const ; void clear() ; size_type size() const ; size_type max_size() const ; bool empty() const ; void reserve(size_type s) ; void shrink_to_fit() ; size_type capacity() const ; std::pair<iterator, bool> insert(const value_type& value) ; std::pair<iterator, bool> insert(value_type&& value) ; iterator insert(const_iterator hint, const value_type& value) ; iterator insert(const_iterator hint, value_type&& value) ; template <class InputIterator> void insert(InputIterator first, InputIterator last) ; template <class InputIterator> void insert(sorted_unique_t, InputIterator first, InputIterator last) ; void insert(std::initializer_list<value_type> ilist) ; template <typename... Args> std::pair<iterator, bool> emplace(Args&&... args) ; std::pair<iterator, bool> emplace(const value_type& value) ; std::pair<iterator, bool> emplace(value_type&& value) ; template <typename... Args> iterator emplace_hint(const_iterator hint, Args&&... args) ; iterator emplace_hint(const_iterator hint, const value_type& value) ; iterator emplace_hint(const_iterator hint, value_type&& value) ; template <typename... Args> std::pair<iterator, bool> try_emplace(key_type&& k, Args&&... args) ; template <typename... Args> std::pair<iterator, bool> try_emplace(const key_type& k, Args&&... args) ; template <typename M> std::pair<iterator, bool> insert_or_assign(const key_type& k, M&& obj) ; template <typename M> std::pair<iterator, bool> insert_or_assign(key_type&& k, M&& obj) ; template <class M> iterator insert_or_assign(const_iterator hint, const key_type& k, M&& obj) ; template <class M> iterator insert_or_assign(const_iterator hint, key_type&& k, M&& obj) ; size_type erase(const key_type& key) ; iterator erase(const_iterator it) ; iterator erase(const_iterator first, const_iterator last) ; template <class Predicate> friend size_type erase_if(sorted_vector_map& container, Predicate predicate) ; iterator find(const key_type& key) ; const_iterator find(const key_type& key) const ; template <typename K> if_is_transparent<K, iterator> find(const K& key) ; template <typename K> if_is_transparent<K, const_iterator> find(const K& key) const ; std::pair<iterator, iterator> find( const key_type& key1, const key_type& key2) ; std::pair<const_iterator, const_iterator> find( const key_type& key1, const key_type& key2) const ; template <typename K> std::pair<if_is_transparent<K, iterator>, if_is_transparent<K, iterator>> find(const K& key1, const K& key2) ; template <typename K> std::pair< if_is_transparent<K, const_iterator>, if_is_transparent<K, const_iterator>> find(const K& key1, const K& key2) const ; mapped_type& at(const key_type& key) ; const mapped_type& at(const key_type& key) const ; size_type count(const key_type& key) const ; template <typename K> if_is_transparent<K, size_type> count(const K& key) const ; bool contains(const key_type& key) const ; template <typename K> if_is_transparent<K, bool> contains(const K& key) const ; iterator lower_bound(const key_type& key) ; const_iterator lower_bound(const key_type& key) const ; template <typename K> if_is_transparent<K, iterator> lower_bound(const K& key) ; template <typename K> if_is_transparent<K, const_iterator> lower_bound(const K& key) const ; iterator upper_bound(const key_type& key) ; const_iterator upper_bound(const key_type& key) const ; template <typename K> if_is_transparent<K, iterator> upper_bound(const K& key) ; template <typename K> if_is_transparent<K, const_iterator> upper_bound(const K& key) const ; std::pair<iterator, iterator> equal_range(const key_type& key) ; std::pair<const_iterator, const_iterator> equal_range( const key_type& key) const ; template <typename K> if_is_transparent<K, std::pair<iterator, iterator>> equal_range( const K& key) ; template <typename K> if_is_transparent<K, std::pair<const_iterator, const_iterator>> equal_range( const K& key) const ; void swap(sorted_vector_map& o) ; mapped_type& operator[](const key_type& key) ; bool operator==(const sorted_vector_map& other) const ; bool operator!=(const sorted_vector_map& other) const ; bool operator<(const sorted_vector_map& other) const ; bool operator>(const sorted_vector_map& other) const ; bool operator<=(const sorted_vector_map& other) const ; bool operator>=(const sorted_vector_map& other) const ; const value_type* data() const noexcept ; private: struct EBO : value_compare { explicit EBO(const value_compare& c, const Allocator& alloc) noexcept( std::is_nothrow_default_constructible<Container>::value) ; EBO(const EBO& other, const Allocator& alloc) noexcept( std::is_nothrow_constructible< Container, const Container&, const Allocator&>::value) ; EBO(EBO&& other, const Allocator& alloc) noexcept( std::is_nothrow_constructible< Container, Container&&, const Allocator&>::value) ; EBO(const Compare& c, Container&& cont) noexcept( std::is_nothrow_move_constructible<Container>::value) ; Container cont_; } m_; template <typename Self> using self_iterator_t = _t< std::conditional<std::is_const<Self>::value, const_iterator, iterator>>; template <typename Self, typename K> static self_iterator_t<Self> find_(Self& self, K const& key) ; template <typename Self, typename K> static self_iterator_t<Self> lower_bound(Self& self, K const& key) ; template <typename Self, typename K> static self_iterator_t<Self> upper_bound(Self& self, K const& key) ; template <typename Self, typename K> static std::pair<self_iterator_t<Self>, self_iterator_t<Self>> equal_range( Self& self, K const& key) ; template <typename Self, typename K> static std::pair<self_iterator_t<Self>, self_iterator_t<Self>> lower_bound2_( Self& self, K const& key1, K const& key2) ; template <typename Self, typename K> static std::pair<self_iterator_t<Self>, self_iterator_t<Self>> find2_( Self& self, K const& key1, K const& key2) ; template <typename... Args> std::pair<iterator, bool> try_emplace_impl( const key_type& key, Args&&... args) ; template <class K, class M> iterator insert_or_assign_impl(const_iterator hint, K&& k, M&& obj) ; }; template <class K, class V, class C, class A, class G> void swap( sorted_vector_map<K, V, C, A, G>& a, sorted_vector_map<K, V, C, A, G>& b) ; template <typename T> inline constexpr bool is_sorted_vector_map_v = detail::is_instantiation_of_v<sorted_vector_map, T>; template <typename T> struct is_sorted_vector_map : std::bool_constant<is_sorted_vector_map_v<T>> {}; namespace pmr { template < class Key, class Value, class Compare = std::less<Key>, class GrowthPolicy = void, class Container = std::vector< std::pair<Key, Value>, folly::detail::std_pmr::polymorphic_allocator<std::pair<Key, Value>>>> using sorted_vector_map = folly::sorted_vector_map< Key, Value, Compare, folly::detail::std_pmr::polymorphic_allocator<std::pair<Key, Value>>, GrowthPolicy, Container>; } } namespace apache { namespace thrift { template <class> struct IsString : std::false_type {}; template <class> struct IsHashMap : std::false_type {}; template <class> struct IsHashSet : std::false_type {}; template <class> struct IsOrderedMap : std::false_type {}; template <class> struct IsOrderedSet : std::false_type {}; template <class> struct IsList : std::false_type {}; template <class> struct HasSortedUniqueCtor : std::false_type {}; namespace frozen { template <class> struct IsExcluded : std::false_type {}; } } } namespace apache::thrift::frozen { namespace detail { template <typename T> const uint8_t* rangeDataStart(const T& value) ; template <> const uint8_t* rangeDataStart<folly::ByteRange>( const folly::ByteRange& value) ; } template <size_t kSize, typename RangeType> struct FixedSizeStringHash { static uint64_t hash(const RangeType& value) ; }; } namespace apache { namespace thrift { namespace frozen { template <class T> class VectorUnpacked : public std::vector<T> { static_assert( std::is_arithmetic<T>::value || std::is_enum<T>::value, "Unpacked storage is only available for simple item types"); using std::vector<T>::vector; }; template <size_t kSize> class FixedSizeString : public std::string { public: static constexpr size_t kFixedSize = kSize; template <typename... Args> explicit FixedSizeString(Args&&... args) ; FixedSizeString& operator=(const std::string& other) ; }; } } } namespace apache { namespace thrift { template <class... Args> struct IsString<apache::thrift::frozen::VectorUnpacked<Args...>> : std::true_type {}; } } namespace std { template <size_t kSize> struct hash<apache::thrift::frozen::FixedSizeString<kSize>> { size_t operator()( const apache::thrift::frozen::FixedSizeString<kSize>& value) const ; }; } namespace apache { namespace thrift { template <class T> struct BaseDistinctTablePolicy { template <class Hash, class Equal> using Index = std::unordered_set<size_t, Hash, Equal>; using Hash = std::hash<T>; using Equal = std::equal_to<T>; using Store = std::vector<T>; }; template <class T, template <class> class Policy = BaseDistinctTablePolicy> class DistinctTable { public: typedef typename Policy<T>::Store Store; typedef typename Policy<T>::Hash Hash; typedef typename Policy<T>::Equal Equal; explicit DistinctTable( Store* store, Equal equal = Equal(), Hash hash = Hash()) ; template <class... Args> size_t add(Args&&... args) ; private: class HashIndirect : public Hash { public: HashIndirect(Hash _hash, Store* store) ; size_t operator()(size_t i) const ; private: Store* store_; }; class EqualIndirect : public Equal { public: EqualIndirect(Equal equal, Store* store) ; bool operator()(size_t a, size_t b) const ; private: Store* store_; }; typedef typename Policy<T>::template Index<HashIndirect, EqualIndirect> Index; Store* store_; Index indexes_; }; } } namespace apache { namespace thrift { namespace ident { struct layoutId; struct offset; struct size; struct bits; struct fields; struct typeName; struct fileVersion; struct relaxTypeChecks; struct layouts; struct rootLayout; } namespace detail { template <> struct invoke_reffer<::apache::thrift::ident::layoutId> { template <typename T> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(T&& t) const noexcept(noexcept(static_cast<T&&>(t).layoutId_ref())) -> decltype(static_cast<T&&>(t).layoutId_ref()) ; }; template <> struct invoke_reffer<::apache::thrift::ident::bits> { template <typename T> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(T&& t) const noexcept(noexcept(static_cast<T&&>(t).bits_ref())) -> decltype(static_cast<T&&>(t).bits_ref()) ; }; template <> struct invoke_reffer<::apache::thrift::ident::fields> { template <typename T> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(T&& t) const noexcept(noexcept(static_cast<T&&>(t).fields_ref())) -> decltype(static_cast<T&&>(t).fields_ref()) ; }; template <> struct invoke_reffer<::apache::thrift::ident::typeName> { template <typename T> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(T&& t) const noexcept(noexcept(static_cast<T&&>(t).typeName_ref())) -> decltype(static_cast<T&&>(t).typeName_ref()) ; }; template <> struct invoke_reffer<::apache::thrift::ident::fileVersion> { template <typename T> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(T&& t) const noexcept(noexcept(static_cast<T&&>(t).fileVersion_ref())) -> decltype(static_cast<T&&>(t).fileVersion_ref()) ; }; template <> struct invoke_reffer<::apache::thrift::ident::relaxTypeChecks> { template <typename T> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(T&& t) const noexcept(noexcept(static_cast<T&&>(t).relaxTypeChecks_ref())) -> decltype(static_cast<T&&>(t).relaxTypeChecks_ref()) ; }; template <> struct invoke_reffer<::apache::thrift::ident::layouts> { template <typename T> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(T&& t) const noexcept(noexcept(static_cast<T&&>(t).layouts_ref())) -> decltype(static_cast<T&&>(t).layouts_ref()) ; }; template <> struct invoke_reffer<::apache::thrift::ident::rootLayout> { template <typename T> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) constexpr auto operator()(T&& t) const noexcept(noexcept(static_cast<T&&>(t).rootLayout_ref())) -> decltype(static_cast<T&&>(t).rootLayout_ref()) ; }; } } } namespace apache::thrift::frozen::schema { class Field; class Layout; class Schema; } namespace apache::thrift::detail::annotation { } namespace apache::thrift::detail::qualifier { } namespace apache::thrift::frozen::schema { using ::apache::thrift::detail::operator!=; using ::apache::thrift::detail::operator>; using ::apache::thrift::detail::operator<=; using ::apache::thrift::detail::operator>=; class Field final { private: friend struct ::apache::thrift::detail::st::struct_private_access; template<class> friend struct ::apache::thrift::detail::invoke_reffer; static constexpr bool __fbthrift_cpp2_gen_json = false; static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false; static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord); static std::string_view __fbthrift_get_class_name(); using __fbthrift_reflection_ident_list = folly::tag_t< ::apache::thrift::ident::layoutId, ::apache::thrift::ident::offset >; static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,1,2}; using __fbthrift_reflection_type_tags = folly::tag_t< ::apache::thrift::type::i16_t, ::apache::thrift::type::i16_t >; static constexpr std::size_t __fbthrift_field_size_v = 2; template<class T> using __fbthrift_id = ::apache::thrift::type::field_id<__fbthrift_reflection_field_id_list[folly::to_underlying(T::value)]>; template<class T> using __fbthrift_type_tag = ::apache::thrift::detail::at<__fbthrift_reflection_type_tags, T::value>; template<class T> using __fbthrift_ident = ::apache::thrift::detail::at<__fbthrift_reflection_ident_list, T::value>; template<class T> using __fbthrift_ordinal = ::apache::thrift::type::ordinal_tag< ::apache::thrift::detail::getFieldOrdinal<T, __fbthrift_reflection_ident_list, __fbthrift_reflection_type_tags>( __fbthrift_reflection_field_id_list ) >; void __fbthrift_clear(); void __fbthrift_clear_terse_fields(); bool __fbthrift_is_empty() const; public: using __fbthrift_cpp2_type = Field; static constexpr bool __fbthrift_cpp2_is_union = false; public: Field() ; [[deprecated("This constructor is deprecated")]] Field(apache::thrift::FragileConstructor, ::std::int16_t layoutId__arg, ::std::int16_t offset__arg); Field(Field&&) = default; Field(const Field&) = default; Field& operator=(Field&&) = default; Field& operator=(const Field&) = default; private: ::std::int16_t __fbthrift_field_layoutId; private: ::std::int16_t __fbthrift_field_offset; private: apache::thrift::detail::isset_bitset<2, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset; public: bool operator==(const Field&) const; bool operator<(const Field&) const; template <typename..., typename T = ::std::int16_t> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> layoutId_ref() const& ; template <typename..., typename T = ::std::int16_t> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> layoutId_ref() const&& ; template <typename..., typename T = ::std::int16_t> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> layoutId_ref() & ; template <typename..., typename T = ::std::int16_t> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> layoutId_ref() && ; template <typename..., typename T = ::std::int16_t> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> layoutId() const& ; template <typename..., typename T = ::std::int16_t> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> layoutId() const&& ; template <typename..., typename T = ::std::int16_t> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> layoutId() & ; template <typename..., typename T = ::std::int16_t> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> layoutId() && ; template <typename..., typename T = ::std::int16_t> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> offset_ref() const& ; template <typename..., typename T = ::std::int16_t> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> offset_ref() const&& ; template <typename..., typename T = ::std::int16_t> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> offset_ref() & ; template <typename..., typename T = ::std::int16_t> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> offset_ref() && ; template <typename..., typename T = ::std::int16_t> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> offset() const& ; template <typename..., typename T = ::std::int16_t> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> offset() const&& ; template <typename..., typename T = ::std::int16_t> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> offset() & ; template <typename..., typename T = ::std::int16_t> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> offset() && ; ::std::int16_t get_layoutId() const ; [[deprecated("Use `FOO.layoutId_ref() = BAR;` instead of `FOO.set_layoutId(BAR);`")]] ::std::int16_t& set_layoutId(::std::int16_t layoutId_) ; ::std::int16_t get_offset() const ; [[deprecated("Use `FOO.offset_ref() = BAR;` instead of `FOO.set_offset(BAR);`")]] ::std::int16_t& set_offset(::std::int16_t offset_) ; template <class Protocol_> unsigned long read(Protocol_* iprot); template <class Protocol_> uint32_t serializedSize(Protocol_ const* prot_) const; template <class Protocol_> uint32_t serializedSizeZC(Protocol_ const* prot_) const; template <class Protocol_> uint32_t write(Protocol_* prot_) const; private: template <class Protocol_> void readNoXfer(Protocol_* iprot); friend class ::apache::thrift::Cpp2Ops<Field>; friend void swap(Field& a, Field& b); }; class Layout final { private: friend struct ::apache::thrift::detail::st::struct_private_access; template<class> friend struct ::apache::thrift::detail::invoke_reffer; static constexpr bool __fbthrift_cpp2_gen_json = false; static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false; static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord); static std::string_view __fbthrift_get_class_name(); using __fbthrift_reflection_ident_list = folly::tag_t< ::apache::thrift::ident::size, ::apache::thrift::ident::bits, ::apache::thrift::ident::fields, ::apache::thrift::ident::typeName >; static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,1,2,3,4}; using __fbthrift_reflection_type_tags = folly::tag_t< ::apache::thrift::type::i32_t, ::apache::thrift::type::i16_t, ::apache::thrift::type::cpp_type<folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Field>, ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::apache::thrift::frozen::schema::Field>>>, ::apache::thrift::type::string_t >; static constexpr std::size_t __fbthrift_field_size_v = 4; template<class T> using __fbthrift_id = ::apache::thrift::type::field_id<__fbthrift_reflection_field_id_list[folly::to_underlying(T::value)]>; template<class T> using __fbthrift_type_tag = ::apache::thrift::detail::at<__fbthrift_reflection_type_tags, T::value>; template<class T> using __fbthrift_ident = ::apache::thrift::detail::at<__fbthrift_reflection_ident_list, T::value>; template<class T> using __fbthrift_ordinal = ::apache::thrift::type::ordinal_tag< ::apache::thrift::detail::getFieldOrdinal<T, __fbthrift_reflection_ident_list, __fbthrift_reflection_type_tags>( __fbthrift_reflection_field_id_list ) >; void __fbthrift_clear(); void __fbthrift_clear_terse_fields(); bool __fbthrift_is_empty() const; public: using __fbthrift_cpp2_type = Layout; static constexpr bool __fbthrift_cpp2_is_union = false; public: Layout(); [[deprecated("This constructor is deprecated")]] Layout(apache::thrift::FragileConstructor, ::std::int32_t size__arg, ::std::int16_t bits__arg, folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Field> fields__arg, ::std::string typeName__arg); Layout(Layout&&) noexcept; Layout(const Layout& src); Layout& operator=(Layout&&) noexcept; Layout& operator=(const Layout& src); ~Layout(); private: ::std::int32_t __fbthrift_field_size; private: ::std::int16_t __fbthrift_field_bits; private: folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Field> __fbthrift_field_fields; private: ::std::string __fbthrift_field_typeName; private: apache::thrift::detail::isset_bitset<4, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset; public: bool operator==(const Layout&) const; bool operator<(const Layout&) const; template <typename..., typename T = ::std::int32_t> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> size_ref() const& ; template <typename..., typename T = ::std::int32_t> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> size_ref() const&& ; template <typename..., typename T = ::std::int32_t> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> size_ref() & ; template <typename..., typename T = ::std::int32_t> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> size_ref() && ; template <typename..., typename T = ::std::int32_t> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> size() const& ; template <typename..., typename T = ::std::int32_t> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> size() const&& ; template <typename..., typename T = ::std::int32_t> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> size() & ; template <typename..., typename T = ::std::int32_t> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> size() && ; template <typename..., typename T = ::std::int16_t> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> bits_ref() const& ; template <typename..., typename T = ::std::int16_t> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> bits_ref() const&& ; template <typename..., typename T = ::std::int16_t> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> bits_ref() & ; template <typename..., typename T = ::std::int16_t> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> bits_ref() && ; template <typename..., typename T = ::std::int16_t> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> bits() const& ; template <typename..., typename T = ::std::int16_t> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> bits() const&& ; template <typename..., typename T = ::std::int16_t> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> bits() & ; template <typename..., typename T = ::std::int16_t> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> bits() && ; template <typename..., typename T = folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Field>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> fields_ref() const& ; template <typename..., typename T = folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Field>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> fields_ref() const&& ; template <typename..., typename T = folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Field>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> fields_ref() & ; template <typename..., typename T = folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Field>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> fields_ref() && ; template <typename..., typename T = folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Field>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> fields() const& ; template <typename..., typename T = folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Field>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> fields() const&& ; template <typename..., typename T = folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Field>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> fields() & ; template <typename..., typename T = folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Field>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> fields() && ; template <typename..., typename T = ::std::string> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> typeName_ref() const& ; template <typename..., typename T = ::std::string> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> typeName_ref() const&& ; template <typename..., typename T = ::std::string> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> typeName_ref() & ; template <typename..., typename T = ::std::string> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> typeName_ref() && ; template <typename..., typename T = ::std::string> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> typeName() const& ; template <typename..., typename T = ::std::string> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> typeName() const&& ; template <typename..., typename T = ::std::string> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> typeName() & ; template <typename..., typename T = ::std::string> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> typeName() && ; ::std::int32_t get_size() const ; [[deprecated("Use `FOO.size_ref() = BAR;` instead of `FOO.set_size(BAR);`")]] ::std::int32_t& set_size(::std::int32_t size_) ; ::std::int16_t get_bits() const ; [[deprecated("Use `FOO.bits_ref() = BAR;` instead of `FOO.set_bits(BAR);`")]] ::std::int16_t& set_bits(::std::int16_t bits_) ; const folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Field>& get_fields() const&; folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Field> get_fields() &&; template <typename T_Layout_fields_struct_setter = folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Field>> [[deprecated("Use `FOO.fields_ref() = BAR;` instead of `FOO.set_fields(BAR);`")]] folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Field>& set_fields(T_Layout_fields_struct_setter&& fields_) ; const ::std::string& get_typeName() const& ; ::std::string get_typeName() && ; template <typename T_Layout_typeName_struct_setter = ::std::string> [[deprecated("Use `FOO.typeName_ref() = BAR;` instead of `FOO.set_typeName(BAR);`")]] ::std::string& set_typeName(T_Layout_typeName_struct_setter&& typeName_) ; template <class Protocol_> unsigned long read(Protocol_* iprot); template <class Protocol_> uint32_t serializedSize(Protocol_ const* prot_) const; template <class Protocol_> uint32_t serializedSizeZC(Protocol_ const* prot_) const; template <class Protocol_> uint32_t write(Protocol_* prot_) const; private: template <class Protocol_> void readNoXfer(Protocol_* iprot); friend class ::apache::thrift::Cpp2Ops<Layout>; friend void swap(Layout& a, Layout& b); }; class Schema final { private: friend struct ::apache::thrift::detail::st::struct_private_access; template<class> friend struct ::apache::thrift::detail::invoke_reffer; static constexpr bool __fbthrift_cpp2_gen_json = false; static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false; static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord); static std::string_view __fbthrift_get_class_name(); using __fbthrift_reflection_ident_list = folly::tag_t< ::apache::thrift::ident::fileVersion, ::apache::thrift::ident::relaxTypeChecks, ::apache::thrift::ident::layouts, ::apache::thrift::ident::rootLayout >; static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,4,1,2,3}; using __fbthrift_reflection_type_tags = folly::tag_t< ::apache::thrift::type::i32_t, ::apache::thrift::type::bool_t, ::apache::thrift::type::cpp_type<folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Layout>, ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::apache::thrift::frozen::schema::Layout>>>, ::apache::thrift::type::i16_t >; static constexpr std::size_t __fbthrift_field_size_v = 4; template<class T> using __fbthrift_id = ::apache::thrift::type::field_id<__fbthrift_reflection_field_id_list[folly::to_underlying(T::value)]>; template<class T> using __fbthrift_type_tag = ::apache::thrift::detail::at<__fbthrift_reflection_type_tags, T::value>; template<class T> using __fbthrift_ident = ::apache::thrift::detail::at<__fbthrift_reflection_ident_list, T::value>; template<class T> using __fbthrift_ordinal = ::apache::thrift::type::ordinal_tag< ::apache::thrift::detail::getFieldOrdinal<T, __fbthrift_reflection_ident_list, __fbthrift_reflection_type_tags>( __fbthrift_reflection_field_id_list ) >; void __fbthrift_clear(); void __fbthrift_clear_terse_fields(); bool __fbthrift_is_empty() const; public: using __fbthrift_cpp2_type = Schema; static constexpr bool __fbthrift_cpp2_is_union = false; public: Schema(); [[deprecated("This constructor is deprecated")]] Schema(apache::thrift::FragileConstructor, ::std::int32_t fileVersion__arg, bool relaxTypeChecks__arg, folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Layout> layouts__arg, ::std::int16_t rootLayout__arg); Schema(Schema&&) noexcept; Schema(const Schema& src); Schema& operator=(Schema&&) noexcept; Schema& operator=(const Schema& src); ~Schema(); private: ::std::int32_t __fbthrift_field_fileVersion; private: bool __fbthrift_field_relaxTypeChecks; private: folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Layout> __fbthrift_field_layouts; private: ::std::int16_t __fbthrift_field_rootLayout; private: apache::thrift::detail::isset_bitset<4, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset; public: bool operator==(const Schema&) const; bool operator<(const Schema&) const; template <typename..., typename T = ::std::int32_t> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> fileVersion_ref() const& ; template <typename..., typename T = ::std::int32_t> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> fileVersion_ref() const&& ; template <typename..., typename T = ::std::int32_t> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> fileVersion_ref() & ; template <typename..., typename T = ::std::int32_t> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> fileVersion_ref() && ; template <typename..., typename T = ::std::int32_t> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> fileVersion() const& ; template <typename..., typename T = ::std::int32_t> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> fileVersion() const&& ; template <typename..., typename T = ::std::int32_t> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> fileVersion() & ; template <typename..., typename T = ::std::int32_t> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> fileVersion() && ; template <typename..., typename T = bool> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> relaxTypeChecks_ref() const& ; template <typename..., typename T = bool> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> relaxTypeChecks_ref() const&& ; template <typename..., typename T = bool> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> relaxTypeChecks_ref() & ; template <typename..., typename T = bool> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> relaxTypeChecks_ref() && ; template <typename..., typename T = bool> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> relaxTypeChecks() const& ; template <typename..., typename T = bool> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> relaxTypeChecks() const&& ; template <typename..., typename T = bool> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> relaxTypeChecks() & ; template <typename..., typename T = bool> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> relaxTypeChecks() && ; template <typename..., typename T = folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Layout>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> layouts_ref() const& ; template <typename..., typename T = folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Layout>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> layouts_ref() const&& ; template <typename..., typename T = folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Layout>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> layouts_ref() & ; template <typename..., typename T = folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Layout>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> layouts_ref() && ; template <typename..., typename T = folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Layout>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> layouts() const& ; template <typename..., typename T = folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Layout>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> layouts() const&& ; template <typename..., typename T = folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Layout>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> layouts() & ; template <typename..., typename T = folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Layout>> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> layouts() && ; template <typename..., typename T = ::std::int16_t> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> rootLayout_ref() const& ; template <typename..., typename T = ::std::int16_t> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> rootLayout_ref() const&& ; template <typename..., typename T = ::std::int16_t> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> rootLayout_ref() & ; template <typename..., typename T = ::std::int16_t> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> rootLayout_ref() && ; template <typename..., typename T = ::std::int16_t> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&> rootLayout() const& ; template <typename..., typename T = ::std::int16_t> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<const T&&> rootLayout() const&& ; template <typename..., typename T = ::std::int16_t> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&> rootLayout() & ; template <typename..., typename T = ::std::int16_t> __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) ::apache::thrift::field_ref<T&&> rootLayout() && ; ::std::int32_t get_fileVersion() const ; [[deprecated("Use `FOO.fileVersion_ref() = BAR;` instead of `FOO.set_fileVersion(BAR);`")]] ::std::int32_t& set_fileVersion(::std::int32_t fileVersion_) ; bool get_relaxTypeChecks() const ; [[deprecated("Use `FOO.relaxTypeChecks_ref() = BAR;` instead of `FOO.set_relaxTypeChecks(BAR);`")]] bool& set_relaxTypeChecks(bool relaxTypeChecks_) ; const folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Layout>& get_layouts() const&; folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Layout> get_layouts() &&; template <typename T_Schema_layouts_struct_setter = folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Layout>> [[deprecated("Use `FOO.layouts_ref() = BAR;` instead of `FOO.set_layouts(BAR);`")]] folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Layout>& set_layouts(T_Schema_layouts_struct_setter&& layouts_) ; ::std::int16_t get_rootLayout() const ; [[deprecated("Use `FOO.rootLayout_ref() = BAR;` instead of `FOO.set_rootLayout(BAR);`")]] ::std::int16_t& set_rootLayout(::std::int16_t rootLayout_) ; template <class Protocol_> unsigned long read(Protocol_* iprot); template <class Protocol_> uint32_t serializedSize(Protocol_ const* prot_) const; template <class Protocol_> uint32_t serializedSizeZC(Protocol_ const* prot_) const; template <class Protocol_> uint32_t write(Protocol_* prot_) const; private: template <class Protocol_> void readNoXfer(Protocol_* iprot); friend class ::apache::thrift::Cpp2Ops<Schema>; friend void swap(Schema& a, Schema& b); }; } namespace apache { namespace thrift { namespace frozen { namespace schema { class MemoryField; class MemoryLayoutBase; class MemoryLayout; class MemorySchema; } } } } namespace std { template <> struct hash<apache::thrift::frozen::schema::MemoryField> { size_t operator()(const apache::thrift::frozen::schema::MemoryField& x) const; }; } namespace std { template <> struct hash<apache::thrift::frozen::schema::MemoryLayoutBase> { size_t operator()(const apache::thrift::frozen::schema::MemoryLayoutBase& x) const; }; } namespace std { template <> struct hash<apache::thrift::frozen::schema::MemoryLayout> { size_t operator()(const apache::thrift::frozen::schema::MemoryLayout& x) const; }; } namespace std { template <> struct hash<apache::thrift::frozen::schema::MemorySchema> { size_t operator()(const apache::thrift::frozen::schema::MemorySchema& x) const; }; } namespace apache { namespace thrift { namespace frozen { namespace schema { class MemoryField { public: MemoryField() = default; ~MemoryField() = default; size_t hash() const ; bool operator==(const MemoryField& other) const ; void setId(int16_t i) ; int16_t getId() const ; void setLayoutId(int16_t lid) ; int16_t getLayoutId() const ; void setOffset(int16_t o) ; int16_t getOffset() const ; private: int16_t id; int16_t layoutId; int16_t offset; }; static_assert( sizeof(MemoryField) == 3 * sizeof(int16_t), "Memory Field is not padded."); class MemoryLayoutBase { public: MemoryLayoutBase() = default; virtual ~MemoryLayoutBase() = default; size_t hash() const ; bool operator==(const MemoryLayoutBase& other) const ; void setSize(int32_t s) ; int32_t getSize() const ; void setBits(int16_t b) ; int16_t getBits() const ; private: int32_t size; int16_t bits; }; class MemoryLayout : public MemoryLayoutBase { public: using MemoryLayoutBase::MemoryLayoutBase; size_t hash() const ; bool operator==(const MemoryLayout& other) const ; void addField(MemoryField&& field) ; void setFields(std::vector<MemoryField>&& fs) ; const std::vector<MemoryField>& getFields() const ; private: std::vector<MemoryField> fields; }; class Schema; class MemorySchema { public: MemorySchema() = default; ~MemorySchema() = default; size_t hash() const ; bool operator==(const MemorySchema& other) const ; void setRootLayoutId(int16_t rootId) ; int16_t getRootLayoutId() const ; const MemoryLayout& getRootLayout() const ; const MemoryLayout& getLayoutForField(const MemoryField& field) const ; const std::vector<MemoryLayout>& getLayouts() const ; class Helper { public: explicit Helper(MemorySchema& schema) ; int16_t add(MemoryLayout&& layout); private: DistinctTable<MemoryLayout> layoutTable_; }; void initFromSchema(Schema&& schema); private: std::vector<MemoryLayout> layouts; int16_t rootLayout; }; struct SchemaInfo { using Field = MemoryField; using Layout = MemoryLayout; using Schema = MemorySchema; using Helper = MemorySchema::Helper; }; void convert(Schema&& schema, MemorySchema& memSchema); void convert(const MemorySchema& memSchema, Schema& schema); } } } } namespace apache { namespace thrift { namespace frozen { typedef uint8_t byte; class LoadRoot; struct DebugLine { int level; explicit DebugLine(int _level) ; }; std::ostream& operator<<(std::ostream& os, DebugLine dl); struct FieldPosition { int32_t offset; int32_t bitOffset; explicit FieldPosition(int32_t _offset = 0, int32_t _bitOffset = 0) ; }; struct LayoutPosition { size_t start; size_t bitOffset; LayoutPosition operator()(FieldPosition f) const ; int64_t byteOffset(LayoutPosition that) const ; }; struct FreezePosition { byte* start; size_t bitOffset; FreezePosition operator()(FieldPosition f) const ; int64_t byteOffset(FreezePosition that) const ; }; struct ViewPosition { const byte* start; size_t bitOffset; ViewPosition operator()(FieldPosition f) const ; ViewPosition operator()(int64_t bytes) const ; int64_t toBits() const noexcept ; bool operator==(const ViewPosition& that) const noexcept ; bool operator!=(const ViewPosition& that) const noexcept ; }; struct LayoutBase { size_t size = 0; size_t bits = 0; bool inlined = false; std::type_index type; explicit LayoutBase(std::type_index _type) ; bool resize(FieldPosition after, bool inlined); FieldPosition startFieldPosition() const ; bool empty() const ; virtual ~LayoutBase() ; virtual void clear(); virtual void print(std::ostream& os, int level) const; template <typename SchemaInfo> void save( typename SchemaInfo::Schema&, typename SchemaInfo::Layout& layout, typename SchemaInfo::Helper&) const ; template <typename SchemaInfo> void load( const typename SchemaInfo::Schema&, const typename SchemaInfo::Layout& layout, LoadRoot&) ; template <typename K> static size_t hash(const K& key) ; protected: LayoutBase(const LayoutBase&) = default; LayoutBase(LayoutBase&&) = default; }; template <class T, class = void> struct Layout : public LayoutBase { static_assert( sizeof(T) == 0, "Objects of this type cannot be frozen yet.\n" "Be sure to 'frozen2' cpp option was enabled and " "'#include \"..._layouts.h\"'"); }; std::ostream& operator<<(std::ostream& os, const LayoutBase& layout); struct FieldBase { const int16_t key; FieldPosition pos; const char* name; explicit FieldBase(int16_t _key, const char* _name) ; virtual ~FieldBase() ; virtual void clear() = 0; }; template <class T, class Layout = Layout<typename std::decay<T>::type>> struct Field final : public FieldBase { Layout layout; explicit Field(int16_t _key, const char* _name) ; void print(std::ostream& os, int level) const ; void clear() override ; template <typename SchemaInfo> void load( const typename SchemaInfo::Schema& schema, const typename SchemaInfo::Field& field, LoadRoot& root) ; template <typename SchemaInfo> void save( typename SchemaInfo::Schema& schema, typename SchemaInfo::Layout& parent, typename SchemaInfo::Helper& helper) const ; }; template <typename T> class FieldView { public: using value_type = T; explicit FieldView(T value) ; bool is_set() const noexcept ; bool has_value() const noexcept ; T value() const noexcept ; const T& operator*() const noexcept ; const T* operator->() const noexcept ; private: T value_; }; template <class Self, class Layout, class T> class ViewBase { protected: const Layout* layout_; ViewPosition position_; static const Layout* defaultLayout() ; public: ViewBase() ; ViewBase(const Layout* layout, ViewPosition position) ; explicit operator bool() const ; ViewPosition getPosition() const ; T thaw() const ; }; template <class Self, class Layout, class T> T thaw(const ViewBase<Self, Layout, T>& view) ; template <class T> T thaw(T value) ; template <class T, class Layout> FieldPosition maximizeField(FieldPosition fieldPos, Field<T, Layout>& field) ; template <class T> Layout<T> maximumLayout() ; class FieldCycleHolder { public: template <class T, class D> Field<T>* pushCycle( std::unique_ptr<Field<T>, D>& owned, int16_t key, const char* name) ; template <class T, class D> void popCycle(std::unique_ptr<Field<T>, D>& owned) ; template <class T> Field<T>* pushCycle( std::shared_ptr<Field<T>>& owned, int16_t key, const char* name) ; template <class T> void popCycle(std::shared_ptr<Field<T>>& owned) ; template <class T> void updateCycle(std::shared_ptr<Field<T>>& owned) ; private: struct SharedField { FieldBase* field = nullptr; size_t refCount = 0; }; std::unordered_map<std::type_index, SharedField> cyclicFields_; }; class LayoutRoot : public FieldCycleHolder { LayoutRoot() ; template <class T> size_t doLayout(const T& root, Layout<T>& _layout, size_t& resizes) ; public: static constexpr size_t kPaddingBytes = 8; static constexpr size_t kMaxAlignment = 8; template <class T> static size_t layout(const T& root, Layout<T>& layout) ; template <class T> static void layout( const T& root, Layout<T>& layout, bool& layoutChanged, size_t& size) ; template <class T, class Layout, class Arg> FieldPosition layoutField( LayoutPosition self, FieldPosition fieldPos, Field<T, Layout>& field, const Arg& value) ; template <class T, class Layout> FieldPosition layoutOptionalField( LayoutPosition self, FieldPosition fieldPos, Field<folly::Optional<T>, Layout>& field, optional_field_ref<const T&> ref) ; size_t layoutBytesDistance(size_t origin, size_t count, size_t align) ; template <typename T> void shareField(const T* ptr, std::shared_ptr<Field<T>> field) ; template <typename T> std::shared_ptr<Field<T>> sharedFieldOf(const T* ptr) const ; template <typename T> void registerLayoutPosition(const T* ptr, LayoutPosition pos) ; template <typename T> const LayoutPosition* layoutPositionOf(const T* ptr) const ; protected: bool resized_; size_t cursor_; std::unordered_map<uintptr_t, std::shared_ptr<FieldBase>> sharedFields_; std::unordered_map<uintptr_t, LayoutPosition> positions_; }; class __attribute__((__visibility__("default"))) LayoutException : public std::length_error { public: LayoutException() ; }; class __attribute__((__visibility__("default"))) LayoutTypeMismatchException : public std::logic_error { public: LayoutTypeMismatchException( const std::string& expected, const std::string& actual) ; }; class FreezeRoot { protected: std::unordered_map<uintptr_t, FreezePosition> positions_; template <class T> typename Layout<T>::View doFreeze(const Layout<T>& layout, const T& root) ; public: virtual ~FreezeRoot() ; template <class T, class Layout, class Arg> void freezeField( FreezePosition self, const Field<T, Layout>& field, const Arg& value) ; template <class T, class Layout> void freezeOptionalField( FreezePosition self, const Field<folly::Optional<T>, Layout>& field, optional_field_ref<const T&> ref) ; template <typename T> const FreezePosition* freezePositionOf(const T* ptr) const ; template <typename T> void registerFreezePosition(const T* ptr, FreezePosition pos) ; void appendBytes( byte* origin, size_t n, folly::MutableByteRange& range, size_t& distance, size_t align) ; private: virtual void doAppendBytes( byte* origin, size_t n, folly::MutableByteRange& range, size_t& distance, size_t align) = 0; }; size_t alignBy(size_t start, size_t alignment) ; class ByteRangeFreezer final : public FreezeRoot { protected: explicit ByteRangeFreezer(folly::MutableByteRange& write) ; public: template <class T> static typename Layout<T>::View freeze( const Layout<T>& layout, const T& root, folly::MutableByteRange& write) ; private: void doAppendBytes( byte* origin, size_t n, folly::MutableByteRange& range, size_t& distance, size_t alignment) override; folly::MutableByteRange& write_; }; class LoadRoot : public FieldCycleHolder { public: LoadRoot() ; }; template <typename T, typename SchemaInfo = schema::SchemaInfo> void saveRoot(const Layout<T>& layout, typename SchemaInfo::Schema& schema) ; template <typename T, typename SchemaInfo = schema::SchemaInfo> void loadRoot(Layout<T>& layout, const typename SchemaInfo::Schema& schema) ; struct Holder { virtual ~Holder() ; }; template <class T> struct HolderImpl : public Holder { explicit HolderImpl(const T& t) ; explicit HolderImpl(T&& t) ; T t_; }; template <class Base> class Bundled : public Base { public: Bundled() ; Bundled(Bundled&&) = default; explicit Bundled(Base&& base) ; explicit Bundled(const Base& base) ; Bundled& operator=(Bundled&&) = default; template <class T, class Decayed = typename std::decay<T>::type> Decayed* hold(T&& t) ; template <class T> void holdImpl(std::unique_ptr<HolderImpl<T>>&& holder) ; template <typename T, class Decayed = typename std::decay<T>::type> const Decayed* findFirstOfType() const ; private: std::vector<std::unique_ptr<Holder>> holds_; }; enum class Frozen2 { Marker }; template <class T, class Return = Bundled<typename Layout<T>::View>> Return freeze(const T& x, Frozen2 = Frozen2::Marker) ; template <class T, class Layout> void thawField(ViewPosition self, const Field<T, Layout>& f, T& out) ; template <class T> void thawField( ViewPosition self, const Field<folly::Optional<T>>& f, optional_field_ref<T&> ref) ; template <class T> void thawField(ViewPosition self, const Field<T>& f, field_ref<T&> ref) ; template < class T, class D, std::enable_if_t<!std::is_same<T, folly::IOBuf>::value>> void thawField( ViewPosition self, const Field<std::unique_ptr<T, D>>& f, std::unique_ptr<T, D>& out) ; template <class T> void thawField( ViewPosition self, const Field<std::shared_ptr<T>>& f, std::shared_ptr<T>& out) ; template <class T> void thawField( ViewPosition self, const Field<T>& f, optional_boxed_field_ref<T&> out) ; template <class T> using View = typename Layout<T>::View; } } } namespace apache { namespace thrift { namespace frozen { namespace detail { class __attribute__((__visibility__("default"))) FixedSizeMismatchException : public std::length_error { public: FixedSizeMismatchException(size_t expected, size_t actual) ; }; template <typename T> struct FixedSizeStringLayout : public LayoutBase { using Base = LayoutBase; FixedSizeStringLayout() ; FieldPosition maximize() ; FieldPosition layout(LayoutRoot&, const T&, LayoutPosition ) ; void freeze(FreezeRoot&, const T& o, FreezePosition self) const ; void thaw(ViewPosition self, T& out) const ; void print(std::ostream& os, int level) const override ; struct View : public folly::ByteRange { public: using folly::ByteRange::ByteRange; View(folly::ByteRange bytes) ; bool operator==(View rhs) ; using folly::ByteRange::toString; }; View view(ViewPosition self) const ; static size_t hash(const T& value) ; static size_t hash(const View& value) ; }; } template <size_t kSize> class FixedSizeString; template <size_t kSize> struct Layout<FixedSizeString<kSize>> : detail::FixedSizeStringLayout<FixedSizeString<kSize>> {}; } } } namespace apache { namespace thrift { namespace frozen { namespace detail { template <class T> struct TrivialLayout : public LayoutBase { typedef LayoutBase Base; TrivialLayout() ; FieldPosition maximize() ; FieldPosition layout(LayoutRoot&, const T&, LayoutPosition ) ; void freeze(FreezeRoot&, const T& o, FreezePosition self) const ; void thaw(ViewPosition self, T& out) const ; void print(std::ostream& os, int level) const override ; typedef T View; View view(ViewPosition self) const ; static size_t hash(const T& value) ; }; template <class T> struct IsBlitType : std::integral_constant< bool, (std::is_trivially_copyable<T>::value && !std::is_pointer<T>::value && !std::is_enum<T>::value && !std::is_integral<T>::value)> {}; template <class T> struct IsStdPair : public std::false_type {}; template <class T1, class T2> struct IsStdPair<std::pair<T1, T2>> : public std::true_type {}; } template <class T> struct Layout< T, typename std::enable_if< apache::thrift::frozen::detail::IsBlitType<T>::value && !apache::thrift::frozen::IsExcluded<T>::value && !apache::thrift::frozen::detail::IsStdPair<T>::value && !std::is_pointer<T>::value>::type> : apache::thrift::frozen::detail::TrivialLayout<T> {}; } } } namespace apache { namespace thrift { namespace frozen { namespace detail { struct BoolLayout : public LayoutBase { typedef LayoutBase Base; typedef bool T; BoolLayout() ; FieldPosition maximize() ; FieldPosition layout(LayoutRoot&, const T& o, LayoutPosition ) ; void freeze(FreezeRoot&, const T& o, FreezePosition self) const ; void thaw(ViewPosition self, T& out) const ; void print(std::ostream& os, int level) const override ; typedef T View; View view(ViewPosition self) const ; }; } template <> struct Layout<bool, void> : public apache::thrift::frozen::detail::BoolLayout { }; } } } namespace apache { namespace thrift { namespace frozen { namespace detail { template < class T, class = typename std::enable_if<std::is_integral<T>::value>::type> size_t bitsNeeded(const T& x) ; template <class T> struct PackedIntegerLayout : public LayoutBase { typedef LayoutBase Base; PackedIntegerLayout() ; explicit PackedIntegerLayout(const std::type_info& _type) ; FieldPosition maximize() ; FieldPosition layout(LayoutRoot&, const T& x, LayoutPosition ) ; void freeze(FreezeRoot&, const T& x, FreezePosition self) const ; void thaw(ViewPosition self, T& out) const ; void print(std::ostream& os, int level) const override ; typedef T View; View view(ViewPosition self) const ; static size_t hash(const T& v) ; }; } template <class T> struct Layout<T, typename std::enable_if<std::is_integral<T>::value>::type> : apache::thrift::frozen::detail::PackedIntegerLayout<T> {}; } } } namespace apache { namespace thrift { namespace frozen { template <typename T> class OptionalFieldView : private folly::Optional<T> { private: const folly::Optional<T>& toFolly() const ; public: using folly::Optional<T>::operator->; using folly::Optional<T>::operator*; using folly::Optional<T>::operator bool; using folly::Optional<T>::has_value; using folly::Optional<T>::value; using folly::Optional<T>::value_or; using folly::Optional<T>::reset; using folly::Optional<T>::emplace; template <typename L, typename R> friend bool operator==( const OptionalFieldView<L>& lhs, const OptionalFieldView<R>& rhs); template <typename L, typename R> friend bool operator!=( const OptionalFieldView<L>& lhs, const OptionalFieldView<R>& rhs); template <typename L, typename R> friend bool operator==(const L& lhs, const OptionalFieldView<R>& rhs); template <typename L, typename R> friend bool operator==(const OptionalFieldView<L>& lhs, const R& rhs); template <typename L, typename R> friend bool operator!=(const L& lhs, const OptionalFieldView<R>& rhs); template <typename L, typename R> friend bool operator!=(const OptionalFieldView<L>& lhs, const R& rhs); template <typename U> friend bool operator==( const OptionalFieldView<U>& lhs, const folly::Optional<U>& rhs); template <typename U> friend bool operator==( const folly::Optional<U>& lhs, const OptionalFieldView<U>& rhs); }; template <typename L, typename R> bool operator==( const OptionalFieldView<L>& lhs, const OptionalFieldView<R>& rhs) ; template <typename L, typename R> bool operator!=( const OptionalFieldView<L>& lhs, const OptionalFieldView<R>& rhs) ; template <typename L, typename R> bool operator==(const L& lhs, const OptionalFieldView<R>& rhs) ; template <typename L, typename R> bool operator==(const OptionalFieldView<L>& lhs, const R& rhs) ; template <typename L, typename R> bool operator!=(const L& lhs, const OptionalFieldView<R>& rhs) ; template <typename L, typename R> bool operator!=(const OptionalFieldView<L>& lhs, const R& rhs) ; template <typename U> [[deprecated("comparison with folly::Optional is deprecated")]] bool operator==( const OptionalFieldView<U>& lhs, const folly::Optional<U>& rhs) ; template <typename U> [[deprecated("comparison with folly::Optional is deprecated")]] bool operator==( const folly::Optional<U>& lhs, const OptionalFieldView<U>& rhs) ; namespace detail { template <class T> struct OptionalLayout : public LayoutBase { typedef LayoutBase Base; Field<bool> issetField; Field<T> valueField; OptionalLayout() ; FieldPosition maximize() ; FieldPosition layout( LayoutRoot& root, const folly::Optional<T>& o, LayoutPosition self) ; FieldPosition layout(LayoutRoot& root, const T& o, LayoutPosition self) ; void freeze( FreezeRoot& root, const folly::Optional<T>& o, FreezePosition self) const ; void freeze(FreezeRoot& root, const T& o, FreezePosition self) const ; void thaw(ViewPosition self, folly::Optional<T>& out) const ; using View = OptionalFieldView<typename Layout<T>::View>; View view(ViewPosition self) const ; void print(std::ostream& os, int level) const final ; void clear() final ; template <typename SchemaInfo> void save( typename SchemaInfo::Schema& schema, typename SchemaInfo::Layout& _layout, typename SchemaInfo::Helper& helper) const ; template <typename SchemaInfo> void load( const typename SchemaInfo::Schema& schema, const typename SchemaInfo::Layout& _layout, LoadRoot& root) ; }; } template <class T> struct Layout<folly::Optional<T>> : public apache::thrift::frozen::detail::OptionalLayout<T> {}; } } } namespace apache { namespace thrift { namespace frozen { namespace detail { template <class First, class Second> struct PairLayout : public LayoutBase { typedef LayoutBase Base; typedef std::pair<First, Second> T; typedef PairLayout LayoutSelf; typedef typename std::decay<First>::type FirstDecayed; typedef typename std::decay<Second>::type SecondDecayed; Field<FirstDecayed> firstField; Field<SecondDecayed> secondField; PairLayout() ; FieldPosition maximize() ; FieldPosition layout( LayoutRoot& root, const std::pair<First, Second>& o, LayoutPosition self) ; void freeze( FreezeRoot& root, const std::pair<First, Second>& o, FreezePosition self) const ; void thaw(ViewPosition self, std::pair<First, Second>& out) const ; struct View : public ViewBase<View, LayoutSelf, T> { View() ; View(const LayoutSelf* layout, ViewPosition position) ; bool operator==(const View& other) const; bool operator<(const View& other) const; auto first() const ; auto first_ref() const ; auto get_first() const ; auto second() const ; auto second_ref() const ; auto get_second() const ; }; View view(ViewPosition self) const ; void print(std::ostream& os, int level) const final ; void clear() final ; template <typename SchemaInfo> void save( typename SchemaInfo::Schema& schema, typename SchemaInfo::Layout& _layout, typename SchemaInfo::Helper& helper) const ; template <typename SchemaInfo> void load( const typename SchemaInfo::Schema& schema, const typename SchemaInfo::Layout& _layout, LoadRoot& root) ; }; } template <class First, class Second> struct Layout<std::pair<First, Second>> : public apache::thrift::frozen::detail::PairLayout<First, Second> {}; } } } namespace apache { namespace thrift { namespace frozen { namespace detail { template <class T, class Item> struct ArrayLayout : public LayoutBase { typedef LayoutBase Base; typedef ArrayLayout LayoutSelf; Field<size_t> distanceField; Field<size_t> countField; Field<Item> itemField; ArrayLayout() ; FieldPosition maximize() ; FieldPosition layout(LayoutRoot& root, const T& coll, LayoutPosition self) ; virtual FieldPosition layoutItems( LayoutRoot& root, const T& coll, LayoutPosition , FieldPosition pos, LayoutPosition write, FieldPosition writeStep) ; void freeze(FreezeRoot& root, const T& coll, FreezePosition self) const ; virtual void freezeItems( FreezeRoot& root, const T& coll, FreezePosition , FreezePosition write, FieldPosition writeStep) const ; ; ; class View : public ViewBase<View, ArrayLayout, T> { typedef typename Layout<Item>::View ItemView; class Iterator; public: typedef ItemView value_type; typedef ItemView reference_type; typedef Iterator iterator; typedef Iterator const_iterator; private: class Iterator { public: using difference_type = ptrdiff_t; using value_type = ItemView; using pointer = const value_type*; using reference = value_type; using iterator_category = std::random_access_iterator_tag; struct ArrowProxy { ItemView item_; }; private: View outer_; size_t index_{0}; }; const byte* data_{nullptr}; size_t count_{0}; }; }; } template <class T> struct Layout<T, typename std::enable_if<IsList<T>::value>::type> : public apache::thrift::frozen::detail:: ArrayLayout<T, typename T::value_type> {}; } } } namespace apache { namespace thrift { template <class... Args> struct IsList<std::vector<Args...>> : std::true_type {}; } } namespace apache { namespace thrift { template <class... Args> struct IsList<std::deque<Args...>> : std::true_type {}; } } namespace apache { namespace thrift { template <class... Args> struct IsList<folly::fbvector<Args...>> : std::true_type {}; } } namespace apache { namespace thrift { namespace frozen { namespace detail { static constexpr int64_t kOffsetNull = 0; template <class T> struct RefLayout : public LayoutBase { typedef LayoutBase Base; Field<int64_t> offsetField; Field<T>* valueField_{nullptr}; class View : public ViewBase<View, RefLayout, T> { typedef typename Layout<T>::View ValueView; public: private: folly::Optional<ValueView> valueView_; }; }; template <class T> struct SharedRefLayout : public RefLayout<T> { std::shared_ptr<Field<T>> ownedField_; ; ; ; ; using View = typename RefLayout<T>::View; }; template <class T> struct UniqueRefLayout : public RefLayout<T> { std::unique_ptr<Field<T>> ownedField_; ; ; ; ; ; using View = typename RefLayout<T>::View; }; } template <class T> struct Layout<std::shared_ptr<T>> : public apache::thrift::frozen::detail::SharedRefLayout<T> {}; template <class T> struct Layout<std::shared_ptr<const T>> : public apache::thrift::frozen::detail::SharedRefLayout<T> {}; template <class T, class D> struct Layout< std::unique_ptr<T, D>, std::enable_if_t<!std::is_same<T, folly::IOBuf>::value>> : public apache::thrift::frozen::detail::UniqueRefLayout<T> {}; template <class T> struct Layout<apache::thrift::detail::boxed_value_ptr<T>> : public apache::thrift::frozen::detail::UniqueRefLayout<T> {}; } } } namespace folly { class IOBuf; } namespace apache { namespace thrift { namespace frozen { namespace detail { template <class T> struct BufferHelpers { typedef typename T::value_type Item; static_assert( std::is_arithmetic<Item>::value || std::is_enum<Item>::value, "String storage requires simple item types"); }; template <> struct BufferHelpers<std::unique_ptr<folly::IOBuf>> { typedef uint8_t Item; }; template <> struct BufferHelpers<folly::IOBuf> { typedef uint8_t Item; }; template <class T> struct StringLayout : public LayoutBase { typedef LayoutBase Base; typedef BufferHelpers<T> Helper; typedef typename Helper::Item Item; Field<size_t> distanceField; Field<size_t> countField; typedef folly::Range<const Item*> View; ; ; }; } template <class T> struct Layout<T, typename std::enable_if<IsString<T>::value>::type> : apache::thrift::frozen::detail::StringLayout< typename std::decay<T>::type> {}; } } } namespace apache { namespace thrift { template <> struct IsString<std::string> : std::true_type {}; } } namespace apache { namespace thrift { template <> struct IsString<folly::fbstring> : std::true_type {}; } } namespace apache { namespace thrift { template <> struct IsString<std::unique_ptr<folly::IOBuf> > : std::true_type {}; } } namespace apache { namespace thrift { template <> struct IsString<folly::IOBuf> : std::true_type {}; } } namespace apache::thrift::frozen::detail { class Fast64BitRemainderCalculator { public: }; } namespace apache { namespace thrift { namespace frozen { namespace detail { struct Block { uint64_t mask = 0; size_t offset = 0; static constexpr size_t bits = 64; }; struct BlockLayout : public LayoutBase { typedef LayoutBase Base; typedef Block T; typedef BlockLayout LayoutSelf; Field<uint64_t, TrivialLayout<uint64_t>> maskField; Field<uint64_t> offsetField; ; ; struct View : public ViewBase<View, LayoutSelf, T> { }; }; } template <> struct Layout<apache::thrift::frozen::detail::Block> : apache::thrift::frozen::detail::BlockLayout {}; namespace detail { template <class T, class Item, class KeyExtractor, class Key> struct HashTableLayout : public ArrayLayout<T, Item> { typedef ArrayLayout<T, Item> Base; Field<std::vector<Block>> sparseTableField; typedef Layout<Key> KeyLayout; typedef HashTableLayout LayoutSelf; ; ; class View : public Base::View { typedef typename Layout<Key>::View KeyView; typedef typename Layout<Item>::View ItemView; typedef typename Layout<std::vector<Block>>::View TableView; TableView table_; Fast64BitRemainderCalculator remainderCalculator_; public: typedef typename Base::View::iterator iterator; ; ; private: ; }; }; } } } } namespace std __attribute__ ((__visibility__ ("default"))) { template<size_t _Nw> struct _Base_bitset { typedef unsigned long _WordT; _WordT _M_w[_Nw]; constexpr _WordT& _M_getword(size_t __pos) noexcept ; _WordT& _M_hiword() noexcept ; void _M_do_and(const _Base_bitset<_Nw>& __x) noexcept ; constexpr void _M_do_or(const _Base_bitset<_Nw>& __x) noexcept ; constexpr void _M_do_xor(const _Base_bitset<_Nw>& __x) noexcept ; constexpr void _M_do_left_shift(size_t __shift) noexcept; constexpr void _M_do_right_shift(size_t __shift) noexcept; constexpr void _M_do_flip() noexcept ; constexpr void _M_do_set() noexcept ; constexpr void _M_do_reset() noexcept ; constexpr bool _M_is_equal(const _Base_bitset<_Nw>& __x) const noexcept ; template<size_t _Nb> constexpr bool _M_are_all() const noexcept ; constexpr bool _M_is_any() const noexcept ; constexpr size_t _M_do_count() const noexcept ; constexpr unsigned long _M_do_to_ulong() const; constexpr unsigned long long _M_do_to_ullong() const; constexpr size_t _M_do_find_first(size_t) const noexcept; constexpr size_t _M_do_find_next(size_t, size_t) const noexcept; }; template<> struct _Base_bitset<1> { typedef unsigned long _WordT; _WordT _M_w; ; }; template<> struct _Base_bitset<0> { typedef unsigned long _WordT; ; }; template<size_t _Extrabits> struct _Sanitize { typedef unsigned long _WordT; }; template<> struct _Sanitize<0> { typedef unsigned long _WordT; }; template<size_t _Nb, bool = (_Nb < (8 * 8))> struct _Sanitize_val { }; template<size_t _Nb> struct _Sanitize_val<_Nb, true> { }; namespace __bitset { template<typename _CharT> using __string = std::basic_string<_CharT>; } template<size_t _Nb> class bitset : private _Base_bitset<((_Nb) / (8 * 8) + ((_Nb) % (8 * 8) == 0 ? 0 : 1))> { private: typedef _Base_bitset<((_Nb) / (8 * 8) + ((_Nb) % (8 * 8) == 0 ? 0 : 1))> _Base; typedef unsigned long _WordT; void _M_check(size_t __position, const char *__s) const ; void _M_do_sanitize() noexcept ; friend struct std::hash<bitset>; public: class reference { friend class bitset; _WordT* _M_wp; size_t _M_bpos; public: bool operator~() const noexcept ; }; friend class reference; bitset<_Nb>& operator&=(const bitset<_Nb>& __rhs) noexcept ; bitset<_Nb>& operator|=(const bitset<_Nb>& __rhs) noexcept ; bitset<_Nb>& operator^=(const bitset<_Nb>& __rhs) noexcept ; bitset<_Nb>& operator<<=(size_t __position) noexcept ; bitset<_Nb>& operator>>=(size_t __position) noexcept ; bitset<_Nb>& _Unchecked_reset(size_t __pos) noexcept ; bitset<_Nb>& _Unchecked_flip(size_t __pos) noexcept ; constexpr bool _Unchecked_test(size_t __pos) const noexcept ; bitset<_Nb> operator~() const noexcept ; bool operator==(const bitset<_Nb>& __rhs) const noexcept ; size_t _Find_first() const noexcept ; size_t _Find_next(size_t __prev) const noexcept ; private: ; ; ; template <class _CharT, class _Traits, size_t _Nb2> friend std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>&, const bitset<_Nb2>&); }; template<size_t _Nb> bitset<_Nb> operator&(const bitset<_Nb>& __x, const bitset<_Nb>& __y) noexcept ; template<size_t _Nb> bitset<_Nb> operator|(const bitset<_Nb>& __x, const bitset<_Nb>& __y) noexcept ; template <size_t _Nb> bitset<_Nb> operator^(const bitset<_Nb>& __x, const bitset<_Nb>& __y) noexcept ; template<class _CharT, class _Traits, size_t _Nb> std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x) ; template <class _CharT, class _Traits, size_t _Nb> std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const bitset<_Nb>& __x) ; } namespace std __attribute__ ((__visibility__ ("default"))) { template<size_t _Nb> struct hash<std::bitset<_Nb>> : public __hash_base<size_t, std::bitset<_Nb>> { size_t operator()(const std::bitset<_Nb>& __b) const noexcept ; }; template<> struct hash<std::bitset<0>> : public __hash_base<size_t, std::bitset<0>> { size_t operator()(const std::bitset<0>&) const noexcept ; }; } namespace std __attribute__ ((__visibility__ ("default"))) { namespace __detail { struct _List_node_base { _List_node_base* _M_next; _List_node_base* _M_prev; static void swap(_List_node_base& __x, _List_node_base& __y) noexcept; void _M_transfer(_List_node_base* const __first, _List_node_base* const __last) noexcept; void _M_reverse() noexcept; void _M_hook(_List_node_base* const __position) noexcept; void _M_unhook() noexcept; }; struct _List_node_header : public _List_node_base { std::size_t _M_size; _List_node_header() noexcept ; _List_node_header(_List_node_header&& __x) ; void _M_move_nodes(_List_node_header&& __x) ; void _M_init() noexcept ; private: _List_node_base* _M_base() ; }; struct _Scratch_list : _List_node_base { _Scratch_list() ; bool empty() const ; void swap(_List_node_base& __l) ; template<typename _Iter, typename _Cmp> struct _Ptr_cmp { _Cmp _M_cmp; bool operator()(__detail::_List_node_base* __lhs, __detail::_List_node_base* __rhs) ; }; template<typename _Iter> struct _Ptr_cmp<_Iter, void> { bool operator()(__detail::_List_node_base* __lhs, __detail::_List_node_base* __rhs) const ; }; template<typename _Cmp> void merge(_List_node_base& __x, _Cmp __comp) ; void _M_take_one(_List_node_base* __i) ; void _M_put_all(_List_node_base* __i) ; }; } template<typename _Tp> struct _List_node : public __detail::_List_node_base { __gnu_cxx::__aligned_membuf<_Tp> _M_storage; _Tp* _M_valptr() ; _Tp const* _M_valptr() const ; }; template<typename _Tp> struct _List_iterator { typedef _List_iterator<_Tp> _Self; typedef _List_node<_Tp> _Node; typedef ptrdiff_t difference_type; typedef std::bidirectional_iterator_tag iterator_category; typedef _Tp value_type; typedef _Tp* pointer; typedef _Tp& reference; _List_iterator() ; explicit _List_iterator(__detail::_List_node_base* __x) ; _Self _M_const_cast() const noexcept ; [[__nodiscard__]] reference operator*() const noexcept ; [[__nodiscard__]] pointer operator->() const noexcept ; _Self& operator++() noexcept ; _Self operator++(int) noexcept ; _Self& operator--() noexcept { _M_node = _M_node->_M_prev; return *this; } _Self operator--(int) noexcept { _Self __tmp = *this; _M_node = _M_node->_M_prev; return __tmp; } [[__nodiscard__]] friend bool operator==(const _Self& __x, const _Self& __y) noexcept { return __x._M_node == __y._M_node; } __detail::_List_node_base* _M_node; }; template<typename _Tp> struct _List_const_iterator { typedef _List_const_iterator<_Tp> _Self; typedef const _List_node<_Tp> _Node; typedef _List_iterator<_Tp> iterator; typedef ptrdiff_t difference_type; typedef std::bidirectional_iterator_tag iterator_category; typedef _Tp value_type; typedef const _Tp* pointer; typedef const _Tp& reference; _List_const_iterator() noexcept : _M_node() { } explicit _List_const_iterator(const __detail::_List_node_base* __x) ; _List_const_iterator(const iterator& __x) ; iterator _M_const_cast() const noexcept ; [[__nodiscard__]] reference operator*() const noexcept ; [[__nodiscard__]] pointer operator->() const noexcept ; _Self& operator++() noexcept ; _Self operator++(int) noexcept ; _Self& operator--() noexcept ; _Self operator--(int) noexcept { _Self __tmp = *this; _M_node = _M_node->_M_prev; return __tmp; } [[__nodiscard__]] friend bool operator==(const _Self& __x, const _Self& __y) noexcept { return __x._M_node == __y._M_node; } const __detail::_List_node_base* _M_node; }; namespace __cxx11 { template<typename _Tp, typename _Alloc> class _List_base { protected: typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template rebind<_Tp>::other _Tp_alloc_type; typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Tp_alloc_traits; typedef typename _Tp_alloc_traits::template rebind<_List_node<_Tp> >::other _Node_alloc_type; typedef __gnu_cxx::__alloc_traits<_Node_alloc_type> _Node_alloc_traits; static size_t _S_distance(const __detail::_List_node_base* __first, const __detail::_List_node_base* __last) { size_t __n = 0; while (__first != __last) { __first = __first->_M_next; ++__n; } return __n; } struct _List_impl : public _Node_alloc_type { __detail::_List_node_header _M_node; _List_impl() noexcept(is_nothrow_default_constructible<_Node_alloc_type>::value) ; _List_impl(const _Node_alloc_type& __a) ; _List_impl(_List_impl&&) = default; _List_impl(_Node_alloc_type&& __a, _List_impl&& __x) ; _List_impl(_Node_alloc_type&& __a) ; }; _List_impl _M_impl; size_t _M_get_size() const ; void _M_set_size(size_t __n) ; void _M_inc_size(size_t __n) ; void _M_dec_size(size_t __n) ; size_t _M_distance(const __detail::_List_node_base* __first, const __detail::_List_node_base* __last) const ; size_t _M_node_count() const ; typename _Node_alloc_traits::pointer _M_get_node() ; void _M_put_node(typename _Node_alloc_traits::pointer __p) noexcept ; public: typedef _Alloc allocator_type; _Node_alloc_type& _M_get_Node_allocator() noexcept ; const _Node_alloc_type& _M_get_Node_allocator() const noexcept ; _List_base() = default; _List_base(const _Node_alloc_type& __a) ; _List_base(_List_base&&) = default; _List_base(_List_base&& __x, _Node_alloc_type&& __a) ; _List_base(_Node_alloc_type&& __a, _List_base&& __x) ; _List_base(_Node_alloc_type&& __a) ; void _M_move_nodes(_List_base&& __x) ; ~_List_base() noexcept ; void _M_clear() noexcept; void _M_init() noexcept ; }; template<typename _Tp, typename _Alloc = std::allocator<_Tp> > class list : protected _List_base<_Tp, _Alloc> { static_assert(is_same<typename remove_cv<_Tp>::type, _Tp>::value, "std::list must have a non-const, non-volatile value_type"); static_assert(is_same<typename _Alloc::value_type, _Tp>::value, "std::list must have the same value_type as its allocator"); typedef _List_base<_Tp, _Alloc> _Base; typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; typedef typename _Base::_Tp_alloc_traits _Tp_alloc_traits; typedef typename _Base::_Node_alloc_type _Node_alloc_type; typedef typename _Base::_Node_alloc_traits _Node_alloc_traits; public: typedef _Tp value_type; typedef typename _Tp_alloc_traits::pointer pointer; typedef typename _Tp_alloc_traits::const_pointer const_pointer; typedef typename _Tp_alloc_traits::reference reference; typedef typename _Tp_alloc_traits::const_reference const_reference; typedef _List_iterator<_Tp> iterator; typedef _List_const_iterator<_Tp> 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: typedef _List_node<_Tp> _Node; using _Base::_M_impl; using _Base::_M_put_node; using _Base::_M_get_node; using _Base::_M_get_Node_allocator; template<typename... _Args> _Node* _M_create_node(_Args&&... __args) ; static size_t _S_distance(const_iterator __first, const_iterator __last) ; size_t _M_node_count() const ; public: list() = default; explicit list(const allocator_type& __a) ; explicit list(size_type __n, const allocator_type& __a = allocator_type()) ; list(size_type __n, const value_type& __value, const allocator_type& __a = allocator_type()) ; list(const list& __x) ; list(list&&) = default; list(initializer_list<value_type> __l, const allocator_type& __a = allocator_type()) ; list(const list& __x, const __type_identity_t<allocator_type>& __a) ; private: list(list&& __x, const allocator_type& __a, true_type) ; list(list&& __x, const allocator_type& __a, false_type) ; public: list(list&& __x, const __type_identity_t<allocator_type>& __a) noexcept(_Node_alloc_traits::_S_always_equal()) ; template<typename _InputIterator, typename = std::_RequireInputIter<_InputIterator>> list(_InputIterator __first, _InputIterator __last, const allocator_type& __a = allocator_type()) ; ~list() = default; list& operator=(const list& __x); list& operator=(list&& __x) noexcept(_Node_alloc_traits::_S_nothrow_move()) ; list& operator=(initializer_list<value_type> __l) ; void assign(size_type __n, const value_type& __val) ; template<typename _InputIterator, typename = std::_RequireInputIter<_InputIterator>> void assign(_InputIterator __first, _InputIterator __last) ; void assign(initializer_list<value_type> __l) ; allocator_type get_allocator() const noexcept ; [[__nodiscard__]] iterator begin() noexcept ; [[__nodiscard__]] const_iterator begin() const noexcept ; [[__nodiscard__]] iterator end() noexcept ; [[__nodiscard__]] const_iterator end() const noexcept ; [[__nodiscard__]] reverse_iterator rbegin() noexcept ; [[__nodiscard__]] const_reverse_iterator rbegin() const noexcept ; [[__nodiscard__]] reverse_iterator rend() noexcept ; [[__nodiscard__]] const_reverse_iterator rend() const noexcept ; [[__nodiscard__]] const_iterator cbegin() const noexcept ; [[__nodiscard__]] const_iterator cend() const noexcept ; [[__nodiscard__]] const_reverse_iterator crbegin() const noexcept ; [[__nodiscard__]] const_reverse_iterator crend() const noexcept ; [[__nodiscard__]] bool empty() const noexcept ; [[__nodiscard__]] size_type size() const noexcept ; [[__nodiscard__]] size_type max_size() const noexcept ; void resize(size_type __new_size); void resize(size_type __new_size, const value_type& __x); [[__nodiscard__]] reference front() noexcept ; [[__nodiscard__]] const_reference front() const noexcept ; [[__nodiscard__]] reference back() noexcept ; [[__nodiscard__]] const_reference back() const noexcept ; void push_front(const value_type& __x) ; void push_front(value_type&& __x) ; template<typename... _Args> reference emplace_front(_Args&&... __args) ; void pop_front() noexcept ; void push_back(const value_type& __x) ; void push_back(value_type&& __x) ; template<typename... _Args> reference emplace_back(_Args&&... __args) ; void pop_back() noexcept ; template<typename... _Args> iterator emplace(const_iterator __position, _Args&&... __args); iterator insert(const_iterator __position, const value_type& __x); iterator insert(const_iterator __position, value_type&& __x) ; iterator insert(const_iterator __p, initializer_list<value_type> __l) ; ; private: typedef size_type __remove_return_type; public: ; ; ; ; ; protected: ; ; ; ; ; struct _Finalize_merge { list& _M_dest; list& _M_src; const iterator& _M_next; }; }; ; } ; ; ; template<typename _Tp> ptrdiff_t __distance(std::_List_iterator<_Tp> __first, std::_List_iterator<_Tp> __last, input_iterator_tag __tag) ; template<typename _Tp> ptrdiff_t __distance(std::_List_const_iterator<_Tp> __first, std::_List_const_iterator<_Tp> __last, input_iterator_tag) ; } namespace std __attribute__ ((__visibility__ ("default"))) { } namespace std __attribute__ ((__visibility__ ("default"))) { namespace pmr { template<typename _Tp> using list = std::list<_Tp, polymorphic_allocator<_Tp>>; } } namespace std __attribute__ ((__visibility__ ("default"))) { ; ; } namespace apache { namespace thrift { namespace detail { template <typename... T> constexpr protocol::TType protocol_type_ill_formed_(T&&...) ; template <typename TypeClass> struct protocol_type_ {}; template <> struct protocol_type_<type_class::integral> { template <typename Type> static constexpr protocol::TType apply = std::is_same<Type, bool>::value ? protocol::TType::T_BOOL : sizeof(Type) == 1 ? protocol::TType::T_BYTE : sizeof(Type) == 2 ? protocol::TType::T_I16 : sizeof(Type) == 4 ? protocol::TType::T_I32 : sizeof(Type) == 8 ? protocol::TType::T_I64 : protocol_type_ill_formed_(); }; template <> struct protocol_type_<type_class::floating_point> { template <typename Type> static constexpr protocol::TType apply = sizeof(Type) == 4 ? protocol::TType::T_FLOAT : sizeof(Type) == 8 ? protocol::TType::T_DOUBLE : protocol_type_ill_formed_(); }; template <> struct protocol_type_<type_class::binary> { template <typename> static constexpr protocol::TType apply = protocol::TType::T_STRING; }; template <> struct protocol_type_<type_class::string> { template <typename> static constexpr protocol::TType apply = protocol::TType::T_STRING; }; template <> struct protocol_type_<type_class::enumeration> { template <typename> static constexpr protocol::TType apply = protocol::TType::T_I32; }; template <> struct protocol_type_<type_class::structure> { template <typename> static constexpr protocol::TType apply = protocol::TType::T_STRUCT; }; template <> struct protocol_type_<type_class::variant> { template <typename> static constexpr protocol::TType apply = protocol::TType::T_STRUCT; }; template <typename ValueTypeClass> struct protocol_type_<type_class::list<ValueTypeClass>> { template <typename> static constexpr protocol::TType apply = protocol::TType::T_LIST; }; template <typename ValueTypeClass> struct protocol_type_<type_class::set<ValueTypeClass>> { template <typename> static constexpr protocol::TType apply = protocol::TType::T_SET; }; template <typename KeyTypeClass, typename MappedTypeClass> struct protocol_type_<type_class::map<KeyTypeClass, MappedTypeClass>> { template <typename> static constexpr protocol::TType apply = protocol::TType::T_MAP; }; template <typename IndirectedTypeClass, typename Indirection> struct protocol_type_<indirection_tag<IndirectedTypeClass, Indirection>> { template <typename Type> static constexpr protocol::TType apply = protocol_type_<IndirectedTypeClass>::template apply< std::remove_reference_t<folly::invoke_result_t<Indirection, Type&>>>; }; } template <typename TypeClass, typename Type> inline constexpr protocol::TType protocol_type_v = ::apache::thrift::detail::protocol_type_<TypeClass>::template apply<Type>; template <typename TypeClass, typename Type> struct protocol_type : std::integral_constant< protocol::TType, protocol_type_v<TypeClass, Type>> {}; namespace detail { template <typename TypeClass> struct fixed_cost_skip_ {}; template <> struct fixed_cost_skip_<type_class::integral> { template <typename, typename> static constexpr bool apply = true; }; template <> struct fixed_cost_skip_<type_class::floating_point> { template <typename, typename> static constexpr bool apply = true; }; template <> struct fixed_cost_skip_<type_class::binary> { template <typename Protocol, typename> static constexpr bool apply = !Protocol::kOmitsStringSizes(); }; template <> struct fixed_cost_skip_<type_class::string> { template <typename Protocol, typename> static constexpr bool apply = !Protocol::kOmitsStringSizes(); }; template <> struct fixed_cost_skip_<type_class::enumeration> { template <typename, typename> static constexpr bool apply = true; }; template <> struct fixed_cost_skip_<type_class::structure> { template <typename, typename> static constexpr bool apply = false; }; template <> struct fixed_cost_skip_<type_class::variant> { template <typename, typename> static constexpr bool apply = false; }; template <typename ValueTypeClass> struct fixed_cost_skip_<type_class::list<ValueTypeClass>> { template <typename Protocol, typename Type> static constexpr bool apply = !Protocol::kOmitsContainerSizes() && Protocol::fixedSizeInContainer( protocol_type_v<ValueTypeClass, typename Type::value_type>) > 0; }; template <typename ValueTypeClass> struct fixed_cost_skip_<type_class::set<ValueTypeClass>> { template <typename Protocol, typename Type> static constexpr bool apply = !Protocol::kOmitsContainerSizes() && Protocol::fixedSizeInContainer( protocol_type_v<ValueTypeClass, typename Type::value_type>) > 0; }; template <typename KeyTypeClass, typename MappedTypeClass> struct fixed_cost_skip_<type_class::map<KeyTypeClass, MappedTypeClass>> { template <typename Protocol, typename Type> static constexpr bool apply = !Protocol::kOmitsContainerSizes() && Protocol::fixedSizeInContainer( protocol_type_v<KeyTypeClass, typename Type::key_type>) > 0 && Protocol::fixedSizeInContainer( protocol_type_v<MappedTypeClass, typename Type::mapped_type>) > 0; }; } template <class Protocol, class TypeClass, class Type> inline constexpr bool fixed_cost_skip_v = ::apache::thrift::detail::fixed_cost_skip_< TypeClass>::template apply<Protocol, Type>; } } namespace apache { namespace thrift { namespace type { namespace detail { template <typename, typename> class Wrap; } } namespace detail { namespace pm { template <typename C, typename... A> using detect_reserve = decltype(static_cast<C (*)() noexcept>(nullptr)().reserve(static_cast<A (*)() noexcept>(nullptr)()...)); ; ; ; ; ; template <typename Void, typename T> inline constexpr bool sorted_unique_constructible_ = false; template <typename T> inline constexpr bool sorted_unique_constructible_< folly::void_t< decltype(T(folly::sorted_unique, typename T::container_type())), decltype(T(typename T::container_type()))>, T> = true; template <typename T> inline constexpr bool sorted_unique_constructible_v = sorted_unique_constructible_<void, T>; struct emplace_hint_invoker { ; }; template <typename T> using detect_key_compare = typename T::key_compare; template <typename T> constexpr bool map_emplace_hint_is_invocable_v = folly::is_invocable_v< emplace_hint_invoker, T, typename T::iterator, typename T::key_type, typename T::mapped_type>; template <typename T> constexpr bool set_emplace_hint_is_invocable_v = folly::is_invocable_v< emplace_hint_invoker, T, typename T::iterator, typename T::value_type>; ; ; ; ; ; ; template <typename TypeClass, typename Type, typename Enable = void> struct protocol_methods; template <> struct protocol_methods<type_class::integral, std::int8_t> { ; ; ; ; }; template <> struct protocol_methods<type_class::integral, std::int16_t> { ; ; ; ; }; template <> struct protocol_methods<type_class::integral, std::int32_t> { ; ; ; ; }; template <> struct protocol_methods<type_class::integral, std::int64_t> { ; ; ; ; }; template <> struct protocol_methods<type_class::integral, std::uint8_t> { using SignedType = std::make_signed_t<std::uint8_t>; ; ; ; ; }; template <> struct protocol_methods<type_class::integral, std::uint16_t> { using SignedType = std::make_signed_t<std::uint16_t>; ; ; ; ; }; template <> struct protocol_methods<type_class::integral, std::uint32_t> { using SignedType = std::make_signed_t<std::uint32_t>; ; ; ; ; }; template <> struct protocol_methods<type_class::integral, std::uint64_t> { using SignedType = std::make_signed_t<std::uint64_t>; ; ; ; ; }; template <> struct protocol_methods<type_class::integral, bool> { ; ; ; ; ; }; template <> struct protocol_methods<type_class::floating_point, double> { ; ; ; ; }; template <> struct protocol_methods<type_class::floating_point, float> { ; ; ; ; }; template <typename Type> struct protocol_methods<type_class::string, Type> { ; ; ; ; }; template <typename Type> struct protocol_methods<type_class::binary, Type> { ; ; ; ; ; }; template <typename Type, typename int_type = std::underlying_type_t<Type>> struct enum_protocol_methods { static_assert(std::is_enum<Type>::value, "must be enum"); using int_methods = protocol_methods<type_class::integral, int_type>; ; ; ; ; }; template <typename Type> struct protocol_methods<type_class::enumeration, Type> : enum_protocol_methods<Type, std::int32_t> {}; template <typename Type> struct protocol_methods< type_class::integral, Type, std::enable_if_t<std::is_enum<Type>::value>> : enum_protocol_methods<Type> { }; template <typename ElemClass, typename Type> struct protocol_methods<type_class::list<ElemClass>, Type> { static_assert( !std::is_same<ElemClass, type_class::unknown>(), "Unable to serialize unknown list element"); using elem_type = folly::remove_cvref_t<typename Type::value_type>; using elem_methods = protocol_methods<ElemClass, elem_type>; using elem_ttype = protocol_type<ElemClass, elem_type>; private: ; public: ; ; ; ; }; template <typename ElemClass, typename Type> struct protocol_methods<type_class::set<ElemClass>, Type> { static_assert( !std::is_same<ElemClass, type_class::unknown>(), "Unable to serialize unknown type"); using elem_type = typename Type::value_type; using elem_methods = protocol_methods<ElemClass, elem_type>; using elem_ttype = protocol_type<ElemClass, elem_type>; private: ; public: ; ; ; ; }; template <typename KeyClass, typename MappedClass, typename Type> struct protocol_methods<type_class::map<KeyClass, MappedClass>, Type> { static_assert( !std::is_same<KeyClass, type_class::unknown>(), "Unable to serialize unknown key type in map"); static_assert( !std::is_same<MappedClass, type_class::unknown>(), "Unable to serialize unknown mapped type in map"); using key_type = typename Type::key_type; using mapped_type = typename Type::mapped_type; using key_methods = protocol_methods<KeyClass, key_type>; using mapped_methods = protocol_methods<MappedClass, mapped_type>; using key_ttype = protocol_type<KeyClass, key_type>; using mapped_ttype = protocol_type<MappedClass, mapped_type>; protected: ; public: ; ; ; ; private: template <typename Protocol> using map_value_begin_t = decltype(std::declval<Protocol>().writeMapValueBegin()); template <typename Protocol> using map_value_end_t = decltype(std::declval<Protocol>().writeMapValueEnd()); template <typename Protocol> static constexpr bool map_value_api_v = folly::is_detected_v<map_value_begin_t, Protocol> && folly::is_detected_v<map_value_end_t, Protocol>; ; ; }; template <typename ElemClass, typename Indirection, typename Type> struct protocol_methods<indirection_tag<ElemClass, Indirection>, Type> { using indirection = Indirection; using elem_type = std::remove_reference_t<folly::invoke_result_t<indirection, Type&>>; using elem_methods = protocol_methods<ElemClass, elem_type>; ; ; ; ; }; template <typename Type> struct protocol_methods<type_class::structure, Type> { template <typename Tag> using Wrap = type::detail::Wrap<Type, Tag>; ; ; ; ; ; ; }; template <typename Type> struct protocol_methods<type_class::variant, Type> : protocol_methods<type_class::structure, Type> {}; } } } } namespace apache { namespace thrift { namespace frozen { namespace detail { template <typename Container> using detect_key_compare = typename Container::key_compare; ; template <class T, class Item, class KeyExtractor, class Key = T> struct SortedTableLayout : public ArrayLayout<T, Item> { private: public: typedef ArrayLayout<T, Item> Base; typedef SortedTableLayout LayoutSelf; class View : public Base::View { typedef typename Layout<Key>::View KeyView; typedef typename Layout<Item>::View ItemView; public: typedef typename Base::View::iterator iterator; ; ; ; ; ; }; }; } } } } namespace apache { namespace thrift { namespace frozen { namespace detail { template <class Table, class K, class V> struct KeyExtractor { using KeyType = K; using rvalue_reference = std::add_rvalue_reference_t< std::remove_reference_t<typename Table::const_reference>>; using const_reference = typename Table::const_reference; ; ; }; template <class K> struct SelfKey { using KeyType = K; }; template < class T, class K, class V, template <class, class, class, class> class Table> struct MapTableLayout : public Table<T, std::pair<const K, V>, KeyExtractor<T, K, V>, K> { typedef Table<T, std::pair<const K, V>, KeyExtractor<T, K, V>, K> Base; typedef MapTableLayout LayoutSelf; class View : public Base::View { public: typedef typename Layout<K>::View key_type; typedef typename Layout<V>::View mapped_type; }; }; template <class T, class V, template <class, class, class, class> class Table> struct SetTableLayout : public Table<T, V, SelfKey<V>, V> { typedef Table<T, V, SelfKey<V>, V> Base; }; } template <class T> struct Layout<T, typename std::enable_if<IsOrderedMap<T>::value>::type> : public apache::thrift::frozen::detail::MapTableLayout< T, typename T::key_type, typename T::mapped_type, apache::thrift::frozen::detail::SortedTableLayout> {}; template <class T> struct Layout<T, typename std::enable_if<IsOrderedSet<T>::value>::type> : public apache::thrift::frozen::detail::SetTableLayout< T, typename T::value_type, apache::thrift::frozen::detail::SortedTableLayout> {}; template <class T> struct Layout<T, typename std::enable_if<IsHashMap<T>::value>::type> : public apache::thrift::frozen::detail::MapTableLayout< T, typename T::key_type, typename T::mapped_type, apache::thrift::frozen::detail::HashTableLayout> {}; template <class T> struct Layout<T, typename std::enable_if<IsHashSet<T>::value>::type> : public apache::thrift::frozen::detail::SetTableLayout< T, typename T::value_type, apache::thrift::frozen::detail::HashTableLayout> {}; } } } namespace apache { namespace thrift { template <class... Args> struct IsHashMap<std::unordered_map<Args...>> : std::true_type {}; } } namespace apache { namespace thrift { template <class... Args> struct IsHashSet<std::unordered_set<Args...>> : std::true_type {}; } } namespace apache { namespace thrift { template <class... Args> struct IsHashMap<folly::F14NodeMap<Args...>> : std::true_type {}; } } namespace apache { namespace thrift { template <class... Args> struct IsHashMap<folly::F14ValueMap<Args...>> : std::true_type {}; } } namespace apache { namespace thrift { template <class... Args> struct IsHashMap<folly::F14VectorMap<Args...>> : std::true_type {}; } } namespace apache { namespace thrift { template <class... Args> struct IsHashMap<folly::F14FastMap<Args...>> : std::true_type {}; } } namespace apache { namespace thrift { template <class... Args> struct IsHashSet<folly::F14NodeSet<Args...>> : std::true_type {}; } } namespace apache { namespace thrift { template <class... Args> struct IsHashSet<folly::F14ValueSet<Args...>> : std::true_type {}; } } namespace apache { namespace thrift { template <class... Args> struct IsHashSet<folly::F14VectorSet<Args...>> : std::true_type {}; } } namespace apache { namespace thrift { template <class... Args> struct IsHashSet<folly::F14FastSet<Args...>> : std::true_type {}; } } namespace apache { namespace thrift { template <class... Args> struct IsOrderedMap<std::map<Args...>> : std::true_type {}; } } namespace apache { namespace thrift { template <class... Args> struct IsOrderedMap<folly::sorted_vector_map<Args...>> : std::true_type {}; } } namespace apache { namespace thrift { template <class... Args> struct IsOrderedMap<folly::heap_vector_map<Args...>> : std::true_type {}; } } namespace apache { namespace thrift { template <class... Args> struct IsOrderedMap<folly::small_heap_vector_map<Args...>> : std::true_type {}; } } namespace apache { namespace thrift { template <class... Args> struct IsOrderedSet<std::set<Args...>> : std::true_type {}; } } namespace apache { namespace thrift { template <class... Args> struct IsOrderedSet<folly::sorted_vector_set<Args...>> : std::true_type {}; } } namespace apache { namespace thrift { template <class... Args> struct IsOrderedSet<folly::heap_vector_set<Args...>> : std::true_type {}; } } namespace apache { namespace thrift { template <class... Args> struct HasSortedUniqueCtor<folly::sorted_vector_map<Args...>> : std::true_type {}; } } namespace apache { namespace thrift { template <class... Args> struct HasSortedUniqueCtor<folly::heap_vector_map<Args...>> : std::true_type {}; } } namespace apache { namespace thrift { template <class... Args> struct HasSortedUniqueCtor<folly::small_heap_vector_map<Args...>> : std::true_type {}; } } namespace apache { namespace thrift { template <class... Args> struct HasSortedUniqueCtor<folly::sorted_vector_set<Args...>> : std::true_type {}; } } namespace apache { namespace thrift { template <class... Args> struct HasSortedUniqueCtor<folly::heap_vector_set<Args...>> : std::true_type {}; } } namespace apache { namespace thrift { namespace frozen { namespace detail { template < class T, class Underlying = typename std::enable_if< std::is_enum<T>::value, typename std::underlying_type<T>::type>::type> struct EnumLayout : public PackedIntegerLayout<Underlying> { typedef PackedIntegerLayout<Underlying> Base; typedef T View; }; } template <class T> struct Layout<T, typename std::enable_if<std::is_enum<T>::value>::type> : public apache::thrift::frozen::detail::EnumLayout<T> {}; } } } namespace apache { namespace thrift { namespace frozen { class LayoutExcludedException : public std::runtime_error { public: }; namespace detail { template <class T> struct ExcludedLayout : public LayoutBase { typedef LayoutBase Base; typedef T View; }; } template <class T> struct Layout<T, typename std::enable_if<IsExcluded<T>::value>::type> : public apache::thrift::frozen::detail::ExcludedLayout<T> {}; } } } namespace apache { namespace thrift { namespace protocol { class TProtocol; } class __attribute__((__visibility__("default"))) TApplicationException : public TException { public: enum TApplicationExceptionType { UNKNOWN = 0, UNKNOWN_METHOD = 1, INVALID_MESSAGE_TYPE = 2, WRONG_METHOD_NAME = 3, BAD_SEQUENCE_ID = 4, MISSING_RESULT = 5, INTERNAL_ERROR = 6, PROTOCOL_ERROR = 7, INVALID_TRANSFORM = 8, INVALID_PROTOCOL = 9, UNSUPPORTED_CLIENT_TYPE = 10, LOADSHEDDING = 11, TIMEOUT = 12, INJECTED_FAILURE = 13, CHECKSUM_MISMATCH = 14, INTERRUPTION = 15, TENANT_QUOTA_EXCEEDED = 16, }; ; ; ; ; protected: std::string message_; TApplicationExceptionType type_; }; struct __attribute__((__visibility__("default"))) AppClientException : public TApplicationException { private: std::string name_; }; struct __attribute__((__visibility__("default"))) AppServerException : TApplicationException { private: std::string name_; }; struct __attribute__((__visibility__("default"))) AppOverloadedException : TApplicationException { private: std::string name_; }; struct __attribute__((__visibility__("default"))) AppQuotaExceededException : TApplicationException { const std::string tenantId_; }; } } namespace folly { namespace io { class Cursor; class ThinCursor; template <class Derived, class BufType> class CursorBase { template <class D, typename B> friend class CursorBase; protected: ; ; public: ; ; ; ; ; ; std::string readTerminatedString( char termChar = '\0', size_t maxLength = std::numeric_limits<size_t>::max()); template <typename Predicate> std::string readWhile(const Predicate& predicate); template <typename Predicate, typename Output> void readWhile(const Predicate& predicate, Output& out); template <typename Predicate> void skipWhile(const Predicate& predicate); size_t skipAtMost(size_t len) ; void skip(size_t len) ; void skipNoAdvance(size_t len) ; size_t retreatAtMost(size_t len) ; void retreat(size_t len) ; size_t pullAtMost(void* buf, size_t len) ; void pull(void* buf, size_t len) ; ByteRange peekBytes() ; std::pair<const uint8_t*, size_t> peek() ; void clone(std::unique_ptr<folly::IOBuf>& buf, size_t len) ; void clone(folly::IOBuf& buf, size_t len) ; size_t cloneAtMost(folly::IOBuf& buf, size_t len) ; size_t cloneAtMost(std::unique_ptr<folly::IOBuf>& buf, size_t len) ; size_t operator-(const CursorBase& other) const ; size_t operator-(const BufType* buf) const ; bool isBounded() const ; protected: void dcheckIntegrity() const ; CursorBase(CursorBase const&) = default; CursorBase(CursorBase&&) = default; CursorBase& operator=(CursorBase const&) = default; CursorBase& operator=(CursorBase&&) = default; ~CursorBase() = default; BufType* head() ; bool tryAdvanceBuffer() ; bool tryRetreatBuffer() ; void advanceBufferIfEmpty() ; BufType* crtBuf_; BufType* buffer_; const uint8_t* crtBegin_{nullptr}; const uint8_t* crtEnd_{nullptr}; const uint8_t* crtPos_{nullptr}; size_t absolutePos_{0}; size_t remainingLen_{std::numeric_limits<size_t>::max()}; bool* borrowed() ; const bool* borrowed() const ; private: Derived& derived() ; Derived const& derived() const ; template <class T> __attribute__((__noinline__)) T readSlow() ; __attribute__((__noinline__)) void readFixedStringSlow(std::string* str, size_t len) ; __attribute__((__noinline__)) size_t pullAtMostSlow(void* buf, size_t len) ; __attribute__((__noinline__)) void pullSlow(void* buf, size_t len) ; __attribute__((__noinline__)) size_t skipAtMostSlow(size_t len) ; __attribute__((__noinline__)) void skipSlow(size_t len) ; __attribute__((__noinline__)) size_t retreatAtMostSlow(size_t len) ; __attribute__((__noinline__)) void retreatSlow(size_t len) ; void advanceDone() ; }; namespace detail { template <typename T> ThinCursor thinCursorReadSlow(ThinCursor, T&, Cursor&); ThinCursor thinCursorSkipSlow(ThinCursor, Cursor&, size_t); } class ThinCursor { public: ThinCursor() = default; ThinCursor(ThinCursor&&) = default; ThinCursor(const ThinCursor&) = delete; ThinCursor& operator=(ThinCursor&&) = default; ThinCursor& operator=(const ThinCursor&) = delete; const uint8_t* data() const ; size_t length() const ; bool canAdvance(size_t amount) const ; bool isAtEnd() const ; template <class T> __attribute__((__always_inline__)) T read(Cursor& fallback) ; template <class T> T readBE(Cursor& fallback) ; template <class T> T readLE(Cursor& fallback) ; void skip(Cursor& fallback, size_t len) ; void skipNoAdvance(size_t len) ; private: void dcheckIntegrity() const ; friend class Cursor; ThinCursor(const uint8_t* crtPos, const uint8_t* crtEnd) ; const uint8_t* crtPos_; const uint8_t* crtEnd_; }; class Cursor : public CursorBase<Cursor, const IOBuf> { public: explicit Cursor(const IOBuf* buf) ; explicit Cursor(const IOBuf* buf, size_t len) ; template <class OtherDerived, class OtherBuf> explicit Cursor(const CursorBase<OtherDerived, OtherBuf>& cursor) ; template <class OtherDerived, class OtherBuf> Cursor(const CursorBase<OtherDerived, OtherBuf>& cursor, size_t len) ; ThinCursor borrow() ; void unborrow(ThinCursor&& cursor) ; }; namespace detail { template <typename T> ThinCursor thinCursorReadSlow(ThinCursor borrowed, T& val, Cursor& fallback) ; ThinCursor thinCursorSkipSlow( ThinCursor borrowed, Cursor& fallback, size_t len) ; } template <class Derived> class Writable { public: template <class T> typename std::enable_if<std::is_arithmetic<T>::value>::type write( T value, size_t n = sizeof(T)) ; template <class T> void writeBE(T value) ; template <class T> void writeLE(T value) ; void push(const uint8_t* buf, size_t len) ; void push(ByteRange buf) ; size_t pushAtMost(ByteRange buf) ; void push(Cursor cursor, size_t len) ; size_t pushAtMost(Cursor cursor, size_t len) ; }; enum class CursorAccess { PRIVATE, UNSHARE }; template <CursorAccess access> class RWCursor : public CursorBase<RWCursor<access>, IOBuf>, public Writable<RWCursor<access>> { friend class CursorBase<RWCursor<access>, IOBuf>; public: explicit RWCursor(IOBuf* buf) ; explicit RWCursor(IOBufQueue& queue) ; struct AtEnd {}; RWCursor(IOBufQueue& queue, AtEnd) ; template <class OtherDerived, class OtherBuf> explicit RWCursor(const CursorBase<OtherDerived, OtherBuf>& cursor) ; void gather(size_t n) ; void gatherAtMost(size_t n) ; using Writable<RWCursor<access>>::pushAtMost; size_t pushAtMost(const uint8_t* buf, size_t len) ; void insert(std::unique_ptr<folly::IOBuf> buf) ; uint8_t* writableData() ; private: void maybeUnshare() ; void advanceDone() ; bool maybeShared_; }; typedef RWCursor<CursorAccess::PRIVATE> RWPrivateCursor; typedef RWCursor<CursorAccess::UNSHARE> RWUnshareCursor; class Appender : public Writable<Appender> { public: Appender(IOBuf* buf, std::size_t growth) ; uint8_t* writableData() ; size_t length() const ; void append(size_t n) ; void ensure(std::size_t n) ; using Writable<Appender>::pushAtMost; size_t pushAtMost(const uint8_t* buf, size_t len) ; void printf( const char* fmt, ...) __attribute__((__format__(__printf__, 2, 3))); void vprintf(const char* fmt, va_list ap); void operator()(StringPiece sp) ; private: bool tryGrowChain() ; IOBuf* buffer_; IOBuf* crtBuf_; std::size_t growth_; }; class QueueAppender : public Writable<QueueAppender> { public: QueueAppender(IOBufQueue* queue, std::size_t growth) ; void reset(IOBufQueue* queue, std::size_t growth) ; uint8_t* writableData() ; size_t length() ; void append(size_t n) ; void ensure(size_t n) ; template <class T> typename std::enable_if<std::is_arithmetic<T>::value>::type write( T value, size_t n = sizeof(T)) ; using Writable<QueueAppender>::pushAtMost; size_t pushAtMost(const uint8_t* buf, size_t len) ; void insert(std::unique_ptr<folly::IOBuf> buf) ; void insert(const folly::IOBuf& buf) ; template <CursorAccess access> explicit operator RWCursor<access>() ; template <CursorAccess access> RWCursor<access> tail(size_t n) ; void trimEnd(size_t n) ; private: folly::IOBufQueue::WritableRangeCache queueCache_{nullptr}; size_t growth_{0}; __attribute__((__noinline__)) void ensureSlow(size_t n) ; template <class T> typename std::enable_if<std::is_arithmetic<T>::value>::type __attribute__((__noinline__)) writeSlow(T value, size_t n = sizeof(T)) ; }; } } namespace folly { namespace io { class CursorStringAppender { public: void append(ByteRange bytes) ; std::string extractString() ; private: std::string str_; }; class CursorNoopAppender { public: void append(ByteRange) ; }; } } namespace fLI { extern __attribute__((visibility("default"))) ::google::int32 FLAGS_thrift_cpp2_protocol_reader_string_limit; } using fLI::FLAGS_thrift_cpp2_protocol_reader_string_limit; namespace fLI { extern __attribute__((visibility("default"))) ::google::int32 FLAGS_thrift_cpp2_protocol_reader_container_limit; } using fLI::FLAGS_thrift_cpp2_protocol_reader_container_limit; namespace apache { namespace thrift { using folly::IOBuf; using folly::IOBufQueue; typedef folly::io::RWPrivateCursor RWCursor; using folly::io::Cursor; using folly::io::QueueAppender; class BinaryProtocolReader; class BinaryProtocolWriter : public detail::ProtocolBase { public: static const int32_t VERSION_1 = 0x80010000; using ProtocolReader = BinaryProtocolReader; explicit BinaryProtocolWriter( ExternalBufferSharing sharing = COPY_EXTERNAL_BUFFER) ; static constexpr ProtocolType protocolType() ; static constexpr bool kSortKeys() ; static constexpr bool kHasIndexSupport() ; void setOutput( IOBufQueue* queue, size_t maxGrowth = std::numeric_limits<size_t>::max()) ; void setOutput(QueueAppender&& output) ; uint32_t writeMessageBegin( folly::StringPiece name, MessageType messageType, int32_t seqid); uint32_t writeMessageEnd(); uint32_t writeStructBegin(const char* name); uint32_t writeStructEnd(); uint32_t writeFieldBegin(const char* name, TType fieldType, int16_t fieldId); uint32_t writeFieldEnd(); uint32_t writeFieldStop(); uint32_t writeMapBegin(TType keyType, TType valType, uint32_t size); uint32_t writeMapEnd(); uint32_t writeListBegin(TType elemType, uint32_t size); uint32_t writeListEnd(); uint32_t writeSetBegin(TType elemType, uint32_t size); uint32_t writeSetEnd(); uint32_t writeBool(bool value); uint32_t writeByte(int8_t byte); uint32_t writeI16(int16_t i16); uint32_t writeI32(int32_t i32); uint32_t writeI64(int64_t i64); uint32_t writeDouble(double dub); uint32_t writeFloat(float flt); uint32_t writeString(folly::StringPiece str); uint32_t writeBinary(folly::StringPiece str); uint32_t writeBinary(folly::ByteRange str); uint32_t writeBinary(const std::unique_ptr<folly::IOBuf>& str); uint32_t writeBinary(const folly::IOBuf& str); uint32_t writeRaw(const IOBuf& buf); uint32_t serializedMessageSize(folly::StringPiece name) const; uint32_t serializedFieldSize( const char* name, TType fieldType, int16_t fieldId) const; uint32_t serializedStructSize(const char* name) const; uint32_t serializedSizeMapBegin( TType keyType, TType valType, uint32_t size) const; uint32_t serializedSizeMapEnd() const; uint32_t serializedSizeListBegin(TType elemType, uint32_t size) const; uint32_t serializedSizeListEnd() const; uint32_t serializedSizeSetBegin(TType elemType, uint32_t size) const; uint32_t serializedSizeSetEnd() const; uint32_t serializedSizeStop() const; uint32_t serializedSizeBool(bool = false) const; uint32_t serializedSizeByte(int8_t = 0) const; uint32_t serializedSizeI16(int16_t = 0) const; uint32_t serializedSizeI32(int32_t = 0) const; uint32_t serializedSizeI64(int64_t = 0) const; uint32_t serializedSizeDouble(double = 0.0) const; uint32_t serializedSizeFloat(float = 0) const; uint32_t serializedSizeString(folly::StringPiece str) const; uint32_t serializedSizeBinary(folly::StringPiece str) const; uint32_t serializedSizeBinary(folly::ByteRange) const; uint32_t serializedSizeBinary(const std::unique_ptr<folly::IOBuf>& v) const; uint32_t serializedSizeBinary(const folly::IOBuf& v) const; uint32_t serializedSizeZCBinary(folly::StringPiece str) const; uint32_t serializedSizeZCBinary(folly::ByteRange v) const; uint32_t serializedSizeZCBinary(const std::unique_ptr<folly::IOBuf>&) const; uint32_t serializedSizeZCBinary(const folly::IOBuf& ) const; void rewriteDouble(double dub, int64_t offset); folly::io::Cursor tail(size_t n); private: static void checkBinarySize(uint64_t size); template <bool kWriteSize> inline __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) uint32_t writeBinaryImpl(const folly::IOBuf& str); QueueAppender out_; ExternalBufferSharing sharing_; }; class BinaryProtocolReader : public detail::ProtocolBase { public: static const int32_t VERSION_MASK = 0xffff0000; static const int32_t VERSION_1 = 0x80010000; using ProtocolWriter = BinaryProtocolWriter; explicit BinaryProtocolReader( ExternalBufferSharing sharing = COPY_EXTERNAL_BUFFER) ; BinaryProtocolReader( int32_t string_limit, int32_t container_limit, ExternalBufferSharing sharing = COPY_EXTERNAL_BUFFER) ; static constexpr ProtocolType protocolType() ; static constexpr bool kUsesFieldNames() ; static constexpr bool kOmitsContainerSizes() ; static constexpr bool kOmitsStringSizes() ; static constexpr bool kHasDeferredRead() ; void setStringSizeLimit(int32_t string_limit) ; void setContainerSizeLimit(int32_t container_limit) ; void setStrict(bool strict_read = true) ; void setInput(const Cursor& cursor) ; void setInput(const IOBuf* buf) ; void readMessageBegin( std::string& name, MessageType& messageType, int32_t& seqid); void readMessageEnd(); void readStructBegin(std::string& name); void readStructEnd(); void readFieldBegin(std::string& name, TType& fieldType, int16_t& fieldId); void readFieldEnd(); void readMapBegin(TType& keyType, TType& valType, uint32_t& size); void readMapEnd(); void readListBegin(TType& elemType, uint32_t& size); void readListEnd(); void readSetBegin(TType& elemType, uint32_t& size); void readSetEnd(); void readBool(bool& value); void readBool(std::vector<bool>::reference value); void readByte(int8_t& byte); void readI16(int16_t& i16); void readI32(int32_t& i32); void readI64(int64_t& i64); void readDouble(double& dub); void readFloat(float& flt); template <typename StrType> void readString(StrType& str); template <typename StrType> void readBinary(StrType& str); void readBinary(std::unique_ptr<folly::IOBuf>& str); void readBinary(folly::IOBuf& str); bool peekMap() ; bool peekSet() ; bool peekList() ; static constexpr std::size_t fixedSizeInContainer(TType type); void skipBytes(size_t bytes) ; void skip(TType type) ; const Cursor& getCursor() const ; size_t getCursorPosition() const ; struct StructReadState; protected: template <typename StrType> void readStringBody(StrType& str, int32_t sz); inline __attribute__((__always_inline__)) bool advanceToNextField( int16_t nextFieldId, TType nextFieldType, StructReadState& state); void readFieldBeginWithState(StructReadState& state); void checkStringSize(int32_t size); void checkContainerSize(int32_t size); [[noreturn]] static void throwBadVersionIdentifier(int32_t sz); [[noreturn]] static void throwMissingVersionIdentifier(int32_t sz); int32_t string_limit_; int32_t container_limit_; ExternalBufferSharing sharing_; bool strict_read_; Cursor in_; template <typename T> friend class ProtocolReaderWithRefill; friend class BinaryProtocolReaderWithRefill; private: bool readBoolSafe(); }; struct BinaryProtocolReader::StructReadState { int16_t fieldId; apache::thrift::protocol::TType fieldType; constexpr static bool kAcceptsContext = false; void readStructBegin(BinaryProtocolReader* ) ; void readStructEnd(BinaryProtocolReader* ) ; void readFieldBegin(BinaryProtocolReader* iprot) ; __attribute__((__noinline__)) void readFieldBeginNoInline(BinaryProtocolReader* iprot) ; void readFieldEnd(BinaryProtocolReader* ) ; __attribute__((__always_inline__)) bool advanceToNextField( BinaryProtocolReader* iprot, int16_t , int16_t nextFieldId, TType nextFieldType) ; __attribute__((__always_inline__)) bool isCompatibleWithType( BinaryProtocolReader* , TType expectedFieldType) ; void skip(BinaryProtocolReader* iprot) ; std::string& fieldName() ; void afterAdvanceFailure(BinaryProtocolReader* ) ; void beforeSubobject(BinaryProtocolReader* ) ; void afterSubobject(BinaryProtocolReader* ) ; bool atStop() ; template <typename StructTraits> void fillFieldTraitsFromName() ; }; namespace detail { template <class Protocol> struct ProtocolReaderStructReadState; template <> struct ProtocolReaderStructReadState<BinaryProtocolReader> : BinaryProtocolReader::StructReadState {}; } } } namespace apache { namespace thrift { } } namespace fLI { extern __attribute__((visibility("default"))) ::google::int32 FLAGS_thrift_cpp2_protocol_reader_string_limit; } using fLI::FLAGS_thrift_cpp2_protocol_reader_string_limit; namespace fLI { extern __attribute__((visibility("default"))) ::google::int32 FLAGS_thrift_cpp2_protocol_reader_container_limit; } using fLI::FLAGS_thrift_cpp2_protocol_reader_container_limit; namespace apache { namespace thrift { using folly::IOBuf; using folly::IOBufQueue; typedef folly::io::RWPrivateCursor RWCursor; using folly::io::Cursor; using folly::io::QueueAppender; namespace detail { namespace compact { static const int8_t COMPACT_PROTOCOL_VERSION = 0x02; static const int32_t VERSION_2 = 0x82020000; static const int8_t PROTOCOL_ID = int8_t(0x82); static const int8_t TYPE_MASK = int8_t(0xE0); static const int32_t TYPE_SHIFT_AMOUNT = 5; } } class CompactProtocolReader; class CompactProtocolWriter : public detail::ProtocolBase { public: using ProtocolReader = CompactProtocolReader; explicit CompactProtocolWriter( ExternalBufferSharing sharing = COPY_EXTERNAL_BUFFER) ; static constexpr ProtocolType protocolType() ; static constexpr bool kSortKeys() ; static constexpr bool kHasIndexSupport() ; void setOutput( IOBufQueue* storage, size_t maxGrowth = std::numeric_limits<size_t>::max()) ; void setOutput(QueueAppender&& output) ; uint32_t writeMessageBegin( folly::StringPiece name, MessageType messageType, int32_t seqid); uint32_t writeMessageEnd(); uint32_t writeStructBegin(const char* name); uint32_t writeStructEnd(); uint32_t writeFieldBegin( const char* name, TType fieldType, int16_t fieldId) ; inline __attribute__((__always_inline__)) uint32_t writeFieldBegin( const char* name, TType fieldType, int16_t fieldId, int16_t previousId); uint32_t writeFieldEnd(); uint32_t writeFieldStop(); uint32_t writeMapBegin(TType keyType, TType valType, uint32_t size); uint32_t writeMapEnd(); uint32_t writeListBegin(TType elemType, uint32_t size); uint32_t writeListEnd(); uint32_t writeSetBegin(TType elemType, uint32_t size); uint32_t writeSetEnd(); uint32_t writeBool(bool value); uint32_t writeByte(int8_t byte); uint32_t writeI16(int16_t i16); uint32_t writeI32(int32_t i32); uint32_t writeI64(int64_t i64); uint32_t writeDouble(double dub); uint32_t writeFloat(float flt); uint32_t writeString(folly::StringPiece str); uint32_t writeBinary(folly::StringPiece str); uint32_t writeBinary(folly::ByteRange str); uint32_t writeBinary(const std::unique_ptr<IOBuf>& str); uint32_t writeBinary(const IOBuf& str); uint32_t writeRaw(const IOBuf& buf); uint32_t serializedMessageSize(folly::StringPiece name) const; uint32_t serializedFieldSize( const char* name, TType fieldType, int16_t fieldId) const; uint32_t serializedStructSize(const char* name) const; inline uint32_t serializedSizeMapBegin( TType keyType, TType valType, uint32_t size) const; uint32_t serializedSizeMapEnd() const; uint32_t serializedSizeListBegin(TType elemType, uint32_t size) const; uint32_t serializedSizeListEnd() const; uint32_t serializedSizeSetBegin(TType elemType, uint32_t size) const; uint32_t serializedSizeSetEnd() const; uint32_t serializedSizeStop() const; uint32_t serializedSizeBool(bool = false) const; uint32_t serializedSizeByte(int8_t = 0) const; uint32_t serializedSizeI16(int16_t = 0) const; uint32_t serializedSizeI32(int32_t = 0) const; uint32_t serializedSizeI64(int64_t = 0) const; uint32_t serializedSizeDouble(double = 0.0) const; uint32_t serializedSizeFloat(float = 0) const; uint32_t serializedSizeString(folly::StringPiece str) const; uint32_t serializedSizeBinary(folly::StringPiece str) const; uint32_t serializedSizeBinary(folly::ByteRange v) const; uint32_t serializedSizeBinary(const std::unique_ptr<IOBuf>& v) const; uint32_t serializedSizeBinary(const IOBuf& v) const; uint32_t serializedSizeZCBinary(folly::StringPiece str) const; uint32_t serializedSizeZCBinary(folly::ByteRange v) const; uint32_t serializedSizeZCBinary(const std::unique_ptr<IOBuf>& ) const; uint32_t serializedSizeZCBinary(const IOBuf& ) const; void rewriteDouble(double dub, int64_t offset); folly::io::Cursor tail(size_t n); protected: QueueAppender out_; private: ExternalBufferSharing sharing_; struct { const char* name; TType fieldType; int16_t fieldId; } booleanField_; private: std::stack<int16_t, folly::small_vector<int16_t, 10>> lastField_; int16_t lastFieldId_{-1}; uint32_t writeCollectionBegin(int8_t elemType, int32_t size); static void checkBinarySize(uint64_t size); template <bool kWriteSize> inline __attribute__((__always_inline__)) __attribute__((__visibility__("hidden"))) uint32_t writeBinaryImpl(const folly::IOBuf& str); uint32_t writeFieldBeginInternal( const char* name, const TType fieldType, const int16_t fieldId, int8_t typeOverride, int16_t previousId); }; class CompactProtocolReader : public detail::ProtocolBase { public: static const int8_t VERSION_MASK = 0x1f; using ProtocolWriter = CompactProtocolWriter; explicit CompactProtocolReader( ExternalBufferSharing sharing = COPY_EXTERNAL_BUFFER) ; CompactProtocolReader( int32_t string_limit, int32_t container_limit, ExternalBufferSharing sharing = COPY_EXTERNAL_BUFFER) ; static constexpr ProtocolType protocolType() ; static constexpr bool kUsesFieldNames() ; static constexpr bool kOmitsContainerSizes() ; static constexpr bool kOmitsStringSizes() ; static constexpr bool kHasDeferredRead() ; void setStringSizeLimit(int32_t string_limit) ; void setContainerSizeLimit(int32_t container_limit) ; void setInput(const Cursor& cursor) ; void setInput(const IOBuf* buf) ; void readMessageBegin( std::string& name, MessageType& messageType, int32_t& seqid); void readMessageEnd(); void readStructBegin(std::string& name); void readStructEnd(); void readFieldBegin(std::string& name, TType& fieldType, int16_t& fieldId); void readFieldEnd(); void readMapBegin(TType& keyType, TType& valType, uint32_t& size); void readMapEnd(); void readListBegin(TType& elemType, uint32_t& size); void readListEnd(); void readSetBegin(TType& elemType, uint32_t& size); void readSetEnd(); void readBool(bool& value); void readBool(std::vector<bool>::reference value); void readByte(int8_t& byte); void readI16(int16_t& i16); void readI32(int32_t& i32); void readI64(int64_t& i64); void readDouble(double& dub); void readFloat(float& flt); template <typename StrType> void readString(StrType& str); template <typename StrType> void readBinary(StrType& str); void readBinary(std::unique_ptr<IOBuf>& str); void readBinary(IOBuf& str); static constexpr std::size_t fixedSizeInContainer(TType type); void skipBytes(size_t bytes) ; void skip(TType type) ; bool peekMap() ; bool peekSet() ; bool peekList() ; const Cursor& getCursor() const ; size_t getCursorPosition() const ; struct StructReadState; protected: Cursor in_; void readStringSize(int32_t& size); private: template <typename StrType> void readStringBody(StrType& str, int32_t size); TType getType(int8_t type); void readStructBeginWithState(StructReadState& state); void readFieldBeginWithState(StructReadState& state); __attribute__((__noinline__)) void readFieldBeginWithStateMediumSlow( StructReadState& state, int16_t prevFieldId); inline __attribute__((__always_inline__)) void readFieldBeginWithStateImpl( StructReadState& state, int16_t prevFieldId, uint8_t firstByte); inline __attribute__((__always_inline__)) bool matchTypeHeader( uint8_t byte, TType type, uint8_t diff); inline __attribute__((__always_inline__)) bool advanceToNextField( int16_t currFieldId, int16_t nextFieldId, TType type, StructReadState& state); [[noreturn]] static void throwBadProtocolIdentifier(); [[noreturn]] static void throwBadProtocolVersion(); [[noreturn]] static void throwBadType(uint8_t type); int32_t string_limit_; int32_t container_limit_; ExternalBufferSharing sharing_; std::stack<int16_t, folly::small_vector<int16_t, 10>> lastField_; int16_t lastFieldId_{-1}; struct { bool hasBoolValue; bool boolValue; } boolValue_; template <typename T> friend class ProtocolReaderWithRefill; friend class CompactProtocolReaderWithRefill; }; struct CompactProtocolReader::StructReadState { int16_t fieldId; apache::thrift::protocol::TType fieldType; constexpr static bool kAcceptsContext = false; void readStructBegin(CompactProtocolReader* iprot) ; void readStructEnd(CompactProtocolReader* ) ; void readFieldBegin(CompactProtocolReader* iprot) ; __attribute__((__noinline__)) void readFieldBeginNoInline(CompactProtocolReader* iprot) ; void readFieldEnd(CompactProtocolReader* ) ; __attribute__((__always_inline__)) bool advanceToNextField( CompactProtocolReader* iprot, int16_t currFieldId, int16_t nextFieldId, TType nextFieldType) ; void afterAdvanceFailure(CompactProtocolReader* ) ; void beforeSubobject(CompactProtocolReader* ) ; void afterSubobject(CompactProtocolReader* ) ; bool atStop() ; __attribute__((__always_inline__)) bool isCompatibleWithType( CompactProtocolReader* , TType expectedFieldType) ; void skip(CompactProtocolReader* iprot) ; std::string& fieldName() ; template <typename StructTraits> void fillFieldTraitsFromName() ; }; namespace detail { template <class Protocol> struct ProtocolReaderStructReadState; template <> struct ProtocolReaderStructReadState<CompactProtocolReader> : CompactProtocolReader::StructReadState {}; } } } namespace apache { namespace thrift { namespace util { uint32_t readVarint16( const uint8_t* ptr, int16_t* i16, const uint8_t* boundary); uint32_t readVarint32( const uint8_t* ptr, int32_t* i32, const uint8_t* boundary); uint32_t readVarint64( const uint8_t* ptr, int64_t* i64, const uint8_t* boundary); uint32_t writeVarint32(uint32_t n, uint8_t* pkt); constexpr uint32_t i32ToZigzag(const int32_t n); constexpr uint64_t i64ToZigzag(const int64_t l); int64_t zigzagToI64(uint64_t n); int32_t zigzagToI32(uint32_t n); uint32_t toI32ZigZagOrdinal(size_t pos); size_t fromI32ZigZagOrdinal(uint32_t pos); } } } namespace apache { namespace thrift { namespace util { namespace detail { template <typename T> constexpr std::make_signed_t<T> zigzagToSignedInt(T n) ; template <typename T> constexpr std::make_unsigned_t<T> signedIntToZigzag(T n) ; template <class T, class CursorT> void readVarintSlow(CursorT& c, T& value) ; [[noreturn]] void throwInvalidVarint(); template <class T> size_t readVarintMediumSlowUnrolled(T& value, const uint8_t* p) ; __attribute__((__always_inline__)) bool tryReadFirstTwoBytesU64( uint64_t& result, const uint8_t* p) ; template <class T, class CursorT> void readVarintMediumSlow(CursorT& c, T& value, const uint8_t* p, size_t len) ; } template <class T, class CursorT> void readVarint(CursorT& c, T& value) ; template <class T, class CursorT> T readVarint(CursorT& c) ; namespace detail { template <class Cursor, class T> uint8_t writeVarintSlow(Cursor& c, T value) ; } template <class Cursor, class T> uint8_t writeVarintUnrolled(Cursor& c, T value) ; template <class Cursor, class T> uint8_t writeVarint(Cursor& c, T value) ; int32_t zigzagToI32(uint32_t n) ; int64_t zigzagToI64(uint64_t n) ; constexpr uint32_t i32ToZigzag(const int32_t n) ; constexpr uint64_t i64ToZigzag(const int64_t n) ; uint32_t toI32ZigZagOrdinal(size_t pos) ; size_t fromI32ZigZagOrdinal(uint32_t pos) ; template <class Cursor, class T> __attribute__((__always_inline__)) void readZigzaggedVarint(Cursor& c, T& out) ; } } } namespace apache { namespace thrift { namespace detail { namespace compact { enum Types { CT_STOP = 0x00, CT_BOOLEAN_TRUE = 0x01, CT_BOOLEAN_FALSE = 0x02, CT_BYTE = 0x03, CT_I16 = 0x04, CT_I32 = 0x05, CT_I64 = 0x06, CT_DOUBLE = 0x07, CT_BINARY = 0x08, CT_LIST = 0x09, CT_SET = 0x0A, CT_MAP = 0x0B, CT_STRUCT = 0x0C, CT_FLOAT = 0x0D, }; const int8_t TTypeToCType[20] = { CT_STOP, 0, CT_BOOLEAN_TRUE, CT_BYTE, CT_DOUBLE, 0, CT_I16, 0, CT_I32, 0, CT_I64, CT_BINARY, CT_STRUCT, CT_MAP, CT_SET, CT_LIST, 0, 0, 0, CT_FLOAT, }; const TType CTypeToTType[14] = { TType::T_STOP, TType::T_BOOL, TType::T_BOOL, TType::T_BYTE, TType::T_I16, TType::T_I32, TType::T_I64, TType::T_DOUBLE, TType::T_STRING, TType::T_LIST, TType::T_SET, TType::T_MAP, TType::T_STRUCT, TType::T_FLOAT, }; } } } } namespace folly { namespace json { struct serialization_opts { bool allow_non_string_keys{false}; bool convert_int_keys{false}; bool javascript_safe{false}; bool pretty_formatting{false}; unsigned int pretty_formatting_indent_width{2}; bool encode_non_ascii{false}; bool validate_utf8{false}; bool validate_keys{false}; bool allow_trailing_comma{false}; bool sort_keys{false}; Function<bool(dynamic const&, dynamic const&) const> sort_keys_by; bool skip_invalid_utf8{false}; bool allow_nan_inf{false}; double_conversion::DoubleToStringConverter::DtoaMode double_mode{ double_conversion::DoubleToStringConverter::SHORTEST}; unsigned int double_num_digits{0}; double_conversion::DoubleToStringConverter::Flags double_flags{ double_conversion::DoubleToStringConverter::NO_FLAGS}; bool double_fallback{false}; bool parse_numbers_as_strings{false}; unsigned int recursion_limit{100}; std::array<uint64_t, 2> extra_ascii_to_escape_bitmap{}; }; std::array<uint64_t, 2> buildExtraAsciiToEscapeBitmap(StringPiece chars); std::string serialize(dynamic const&, serialization_opts const&); void escapeString( StringPiece input, std::string& out, const serialization_opts& opts); std::string stripComments(StringPiece jsonC); class __attribute__((__visibility__("default"))) parse_error : public std::runtime_error { public: using std::runtime_error::runtime_error; }; class __attribute__((__visibility__("default"))) print_error : public std::runtime_error { public: using std::runtime_error::runtime_error; }; struct parse_location { uint32_t line{}; }; struct parse_range { parse_location begin; }; struct parse_metadata { parse_range key_range; parse_range value_range; }; using metadata_map = std::unordered_map<dynamic const*, parse_metadata>; } dynamic parseJson(StringPiece, json::serialization_opts const&); dynamic parseJson(StringPiece); dynamic parseJsonWithMetadata(StringPiece range, json::metadata_map* map); dynamic parseJsonWithMetadata( StringPiece range, json::serialization_opts const& opts, json::metadata_map* map); std::string toJson(dynamic const&); std::string toPrettyJson(dynamic const&); void PrintTo(const dynamic&, std::ostream*); } namespace apache { namespace thrift { namespace protocol { void base64_encode(const uint8_t* in, uint32_t len, uint8_t* buf); void base64_decode(uint8_t* buf, uint32_t len); std::string base64Encode(folly::ByteRange binary); std::unique_ptr<folly::IOBuf> base64Decode(folly::StringPiece base64); } } } namespace apache { namespace thrift { namespace detail { template <typename T> using value_type_of = typename T::value_type; template <typename T> using is_string = std::is_same<char, folly::detected_t<value_type_of, T>>; namespace json { constexpr uint8_t kJSONObjectStart = '{'; constexpr uint8_t kJSONObjectEnd = '}'; constexpr uint8_t kJSONArrayStart = '['; constexpr uint8_t kJSONArrayEnd = ']'; constexpr uint8_t kJSONPairSeparator = ':'; constexpr uint8_t kJSONElemSeparator = ','; constexpr uint8_t kJSONBackslash = '\\'; constexpr uint8_t kJSONStringDelimiter = '"'; constexpr uint8_t kJSONZeroChar = '0'; constexpr uint8_t kJSONEscapeChar = 'u'; constexpr uint8_t kJSONSpace = ' '; constexpr uint8_t kJSONNewline = '\n'; constexpr uint8_t kJSONTab = '\t'; constexpr uint8_t kJSONCarriageReturn = '\r'; constexpr uint32_t kThriftVersion1 = 1; constexpr folly::StringPiece kJSONEscapePrefix("\\u00"); constexpr folly::StringPiece kJSONTrue("true"); constexpr folly::StringPiece kJSONFalse("false"); constexpr folly::StringPiece kThriftNan("NaN"); constexpr folly::StringPiece kThriftNegativeNan("-NaN"); constexpr folly::StringPiece kThriftInfinity("Infinity"); constexpr folly::StringPiece kThriftNegativeInfinity("-Infinity"); } } class JSONProtocolWriterCommon : public detail::ProtocolBase { public: explicit JSONProtocolWriterCommon( ExternalBufferSharing = COPY_EXTERNAL_BUFFER ) ; void setOutput( folly::IOBufQueue* queue, size_t maxGrowth = std::numeric_limits<size_t>::max()) ; void setOutput(folly::io::QueueAppender&& output) ; uint32_t writeMessageBegin( const std::string& name, MessageType messageType, int32_t seqid); uint32_t writeMessageEnd(); uint32_t writeByte(int8_t byte); uint32_t writeI16(int16_t i16); uint32_t writeI32(int32_t i32); uint32_t writeI64(int64_t i64); uint32_t writeDouble(double dub); uint32_t writeFloat(float flt); uint32_t writeString(folly::StringPiece str); uint32_t writeBinary(folly::StringPiece str); uint32_t writeBinary(folly::ByteRange v); uint32_t writeBinary(const std::unique_ptr<folly::IOBuf>& str); uint32_t writeBinary(const folly::IOBuf& str); uint32_t serializedSizeByte(int8_t = 0) const; uint32_t serializedSizeI16(int16_t = 0) const; uint32_t serializedSizeI32(int32_t = 0) const; uint32_t serializedSizeI64(int64_t = 0) const; uint32_t serializedSizeDouble(double = 0.0) const; uint32_t serializedSizeFloat(float = 0) const; uint32_t serializedSizeString(folly::StringPiece) const; uint32_t serializedSizeBinary(folly::StringPiece str) const; uint32_t serializedSizeBinary(folly::ByteRange v) const; uint32_t serializedSizeBinary(const std::unique_ptr<folly::IOBuf>& v) const; uint32_t serializedSizeBinary(const folly::IOBuf& v) const; uint32_t serializedSizeZCBinary(folly::StringPiece str) const; uint32_t serializedSizeZCBinary(folly::ByteRange v) const; uint32_t serializedSizeZCBinary( const std::unique_ptr<folly::IOBuf>& ) const; uint32_t serializedSizeZCBinary(const folly::IOBuf& ) const; protected: enum class ContextType { MAP, ARRAY }; uint32_t beginContext(ContextType); uint32_t endContext(); uint32_t writeContext(); uint32_t writeJSONEscapeChar(uint8_t ch); uint32_t writeJSONChar(uint8_t ch); uint32_t writeJSONString(folly::StringPiece); uint32_t writeJSONBase64(folly::ByteRange); uint32_t writeJSONBool(bool val); uint32_t writeJSONInt(int64_t num); template <typename T> uint32_t writeJSONDouble(T dbl); static const uint8_t kJSONCharTable[0x30]; static uint8_t hexChar(uint8_t val); void base64_encode(const uint8_t* in, uint32_t len, uint8_t* buf) ; folly::io::QueueAppender out_{nullptr, 0}; struct Context { ContextType type; int meta; }; std::vector<Context> context; private: uint32_t writeJSONDoubleInternal(double dbl); uint32_t writeJSONDoubleInternal(float flt); uint32_t writeJSONIntInternal(int64_t num); uint32_t writeJSONBoolInternal(bool val); bool isMapKey() ; }; class JSONProtocolReaderCommon : public detail::ProtocolBase { public: explicit JSONProtocolReaderCommon( ExternalBufferSharing = COPY_EXTERNAL_BUFFER ) ; void setAllowDecodeUTF8(bool val) ; void setInput(const folly::io::Cursor& cursor) ; void setInput(const folly::IOBuf* buf) ; void readMessageBegin( std::string& name, MessageType& messageType, int32_t& seqid); void readMessageEnd(); void readByte(int8_t& byte); void readI16(int16_t& i16); void readI32(int32_t& i32); void readI64(int64_t& i64); void readDouble(double& dub); void readFloat(float& flt); template <typename StrType> void readString(StrType& str); template <typename StrType> void readBinary(StrType& str); void readBinary(std::unique_ptr<folly::IOBuf>& str); void readBinary(folly::IOBuf& str); const folly::io::Cursor& getCursor() const ; size_t getCursorPosition() const ; static constexpr std::size_t fixedSizeInContainer(TType) ; void skipBytes(size_t bytes) ; protected: enum class ContextType { MAP, ARRAY }; void skipWhitespace(); uint32_t readWhitespace(); uint32_t ensureCharNoWhitespace(char expected); uint32_t ensureChar(char expected); void ensureAndSkipContext(); void ensureAndReadContext(bool& keyish); void beginContext(ContextType type); void ensureAndBeginContext(ContextType type); void endContext(); template <typename T> static T castIntegral(folly::StringPiece val); template <typename T> void readInContext(T& val); void readJSONKey(bool& key); template <typename T> void readJSONKey(T& key); template <typename T> void readJSONIntegral(T& val); void readNumericalChars(std::string& val); void readJSONVal(int8_t& val); void readJSONVal(int16_t& val); void readJSONVal(int32_t& val); void readJSONVal(int64_t& val); template <typename Floating> typename std::enable_if<std::is_floating_point<Floating>::value>::type readJSONVal(Floating& val); template <typename Str> typename std::enable_if<apache::thrift::detail::is_string<Str>::value>::type readJSONVal(Str& val); bool JSONtoBool(const std::string& s); void readJSONVal(bool& val); void readJSONNull(); void readJSONKeyword(std::string& kw); void readJSONEscapeChar(uint8_t& out); template <typename StrType> void readJSONString(StrType& val); template <typename StrType> void readJSONBase64(StrType& s); static constexpr folly::StringPiece kEscapeChars() ; static const uint8_t kEscapeCharVals[8]; static uint8_t hexVal(uint8_t ch); void base64_decode(uint8_t* buf, uint32_t len) ; template <class Predicate> uint32_t readWhile(const Predicate& pred, std::string& out); int8_t peekCharSafe(); [[noreturn]] static void throwBadVersion(); [[noreturn]] static void throwUnrecognizableAsBoolean(const std::string& s); [[noreturn]] static void throwUnrecognizableAsIntegral( folly::StringPiece s, folly::StringPiece typeName); [[noreturn]] static void throwUnrecognizableAsFloatingPoint( const std::string& s); [[noreturn]] static void throwUnrecognizableAsString( const std::string& s, const std::exception& e); [[noreturn]] static void throwUnrecognizableAsAny(const std::string& s); [[noreturn]] static void throwInvalidFieldStart(char ch); [[noreturn]] static void throwUnexpectedChar(char ch, char expected); [[noreturn]] static void throwInvalidEscapeChar(char ch); [[noreturn]] static void throwInvalidHexChar(char ch); std::array<folly::StringPiece, 2> bools_{{"", ""}}; folly::io::Cursor in_{nullptr}; struct Context { ContextType type; int meta; }; std::vector<Context> context; bool keyish_{false}; uint32_t skippedWhitespace_{0}; uint32_t skippedChars_{0}; bool skippedIsUnread_{false}; bool allowDecodeUTF8_{true}; }; } } namespace apache { namespace thrift { } } namespace apache { namespace thrift { class JSONProtocolReader; class JSONProtocolWriter : public JSONProtocolWriterCommon { public: static const int32_t VERSION_1 = 0x80010000; using ProtocolReader = JSONProtocolReader; using JSONProtocolWriterCommon::JSONProtocolWriterCommon; static constexpr ProtocolType protocolType() ; static constexpr bool kSortKeys() ; static constexpr bool kHasIndexSupport() ; inline uint32_t writeStructBegin(const char* name); inline uint32_t writeStructEnd(); inline uint32_t writeFieldBegin( const char* name, TType fieldType, int16_t fieldId); inline uint32_t writeFieldEnd(); inline uint32_t writeFieldStop(); inline uint32_t writeMapBegin(TType keyType, TType valType, uint32_t size); inline uint32_t writeMapEnd(); inline uint32_t writeListBegin(TType elemType, uint32_t size); inline uint32_t writeListEnd(); inline uint32_t writeSetBegin(TType elemType, uint32_t size); inline uint32_t writeSetEnd(); inline uint32_t writeBool(bool value); inline uint32_t serializedMessageSize(const std::string& name) const; inline uint32_t serializedFieldSize( const char* name, TType fieldType, int16_t fieldId) const; inline uint32_t serializedStructSize(const char* name) const; inline uint32_t serializedSizeMapBegin( TType keyType, TType valType, uint32_t size) const; inline uint32_t serializedSizeMapEnd() const; inline uint32_t serializedSizeListBegin(TType elemType, uint32_t size) const; inline uint32_t serializedSizeListEnd() const; inline uint32_t serializedSizeSetBegin(TType elemType, uint32_t size) const; inline uint32_t serializedSizeSetEnd() const; inline uint32_t serializedSizeStop() const; inline uint32_t serializedSizeBool(bool = false) const; }; class JSONProtocolReader : public JSONProtocolReaderCommon { public: static const int32_t VERSION_MASK = 0xffff0000; static const int32_t VERSION_1 = 0x80010000; using ProtocolWriter = JSONProtocolWriter; using JSONProtocolReaderCommon::JSONProtocolReaderCommon; static constexpr ProtocolType protocolType() ; static constexpr bool kUsesFieldNames() ; static constexpr bool kOmitsContainerSizes() ; static constexpr bool kOmitsStringSizes() ; static constexpr bool kHasDeferredRead() ; inline void readStructBegin(std::string& name); inline void readStructEnd(); inline void readFieldBegin( std::string& name, TType& fieldType, int16_t& fieldId); inline void readFieldEnd(); inline void readMapBegin(TType& keyType, TType& valType, uint32_t& size); inline void readMapEnd(); inline void readListBegin(TType& elemType, uint32_t& size); inline void readListEnd(); inline void readSetBegin(TType& elemType, uint32_t& size); inline void readSetEnd(); inline void readBool(bool& value); inline void readBool(std::vector<bool>::reference value); inline bool peekMap(); inline bool peekSet(); inline bool peekList(); inline void skip(TType type); private: [[noreturn]] static void throwUnrecognizableAsBoolean(int8_t byte); }; } } namespace apache { namespace thrift { namespace detail { namespace json { static constexpr folly::StringPiece kTypeNameBool("tf"); static constexpr folly::StringPiece kTypeNameByte("i8"); static constexpr folly::StringPiece kTypeNameI16("i16"); static constexpr folly::StringPiece kTypeNameI32("i32"); static constexpr folly::StringPiece kTypeNameI64("i64"); static constexpr folly::StringPiece kTypeNameDouble("dbl"); static constexpr folly::StringPiece kTypeNameFloat("flt"); static constexpr folly::StringPiece kTypeNameStruct("rec"); static constexpr folly::StringPiece kTypeNameString("str"); static constexpr folly::StringPiece kTypeNameMap("map"); static constexpr folly::StringPiece kTypeNameList("lst"); static constexpr folly::StringPiece kTypeNameSet("set"); [[noreturn]] void throwNegativeSize(int64_t size); [[noreturn]] void throwExceededSizeLimit(int64_t size, int64_t sizeMax); [[noreturn]] void throwUnrecognizedType(); static folly::StringPiece getTypeNameForTypeID(TType typeID) ; static protocol::TType getTypeIDForTypeName(folly::StringPiece name) ; static uint32_t clampSize(int64_t size) ; } } } } namespace apache { namespace thrift { using folly::IOBuf; using folly::IOBufQueue; typedef folly::io::RWPrivateCursor RWCursor; using folly::io::Cursor; using folly::io::QueueAppender; class SimpleJSONProtocolReader; class SimpleJSONProtocolWriter : public JSONProtocolWriterCommon { public: static const int32_t VERSION_1 = 0x80010000; using ProtocolReader = SimpleJSONProtocolReader; using JSONProtocolWriterCommon::JSONProtocolWriterCommon; static constexpr ProtocolType protocolType() ; static constexpr bool kSortKeys() ; static constexpr bool kHasIndexSupport() ; inline uint32_t writeStructBegin(const char* name); inline uint32_t writeStructEnd(); inline uint32_t writeFieldBegin( const char* name, TType fieldType, int16_t fieldId); inline uint32_t writeFieldEnd(); inline uint32_t writeFieldStop(); inline uint32_t writeMapBegin(TType keyType, TType valType, uint32_t size); inline uint32_t writeMapEnd(); inline uint32_t writeListBegin(TType elemType, uint32_t size); inline uint32_t writeListEnd(); inline uint32_t writeSetBegin(TType elemType, uint32_t size); inline uint32_t writeSetEnd(); inline uint32_t writeBool(bool value); inline uint32_t serializedMessageSize(const std::string& name) const; inline uint32_t serializedFieldSize( const char* name, TType fieldType, int16_t fieldId) const; inline uint32_t serializedStructSize(const char* name) const; inline uint32_t serializedSizeMapBegin( TType keyType, TType valType, uint32_t size) const; inline uint32_t serializedSizeMapEnd() const; inline uint32_t serializedSizeListBegin(TType elemType, uint32_t size) const; inline uint32_t serializedSizeListEnd() const; inline uint32_t serializedSizeSetBegin(TType elemType, uint32_t size) const; inline uint32_t serializedSizeSetEnd() const; inline uint32_t serializedSizeStop() const; inline uint32_t serializedSizeBool(bool = false) const; }; class SimpleJSONProtocolReader : public JSONProtocolReaderCommon { public: static const int32_t VERSION_MASK = 0xffff0000; static const int32_t VERSION_1 = 0x80010000; using ProtocolWriter = SimpleJSONProtocolWriter; using JSONProtocolReaderCommon::JSONProtocolReaderCommon; static constexpr ProtocolType protocolType() ; static constexpr bool kUsesFieldNames() ; static constexpr bool kOmitsContainerSizes() ; static constexpr bool kOmitsStringSizes() ; static constexpr bool kOmitsContainerElemTypes() ; static constexpr bool kHasDeferredRead() ; inline void readStructBegin(std::string& name); inline void readStructEnd(); inline void readFieldBegin( std::string& name, TType& fieldType, int16_t& fieldId); inline void readFieldEnd(); inline void readMapBegin(TType& keyType, TType& valType, uint32_t& size); inline void readMapEnd(); inline void readListBegin(TType& elemType, uint32_t& size); inline void readListEnd(); inline void readSetBegin(TType& elemType, uint32_t& size); inline void readSetEnd(); inline void readBool(bool& value); inline void readBool(std::vector<bool>::reference value); inline bool peekMap(); inline bool peekList(); inline bool peekSet(); inline void skip(TType type); }; } } namespace apache { namespace thrift { } } namespace apache { namespace thrift { template <typename Reader, typename Writer> struct Serializer { private: template <typename T> using is_thrift_class = std::bool_constant<is_thrift_class_v<T>>; template <typename T> static void warn_unless(folly::tag_t<T>, const char* which, std::false_type) ; template <typename T> static void warn_unless(folly::tag_t<T>, const char*, std::true_type) ; public: using ProtocolReader = Reader; using ProtocolWriter = Writer; template <class T> static folly::io::Cursor deserialize( const folly::io::Cursor& cursor, T& obj, ExternalBufferSharing sharing = COPY_EXTERNAL_BUFFER) ; template <class T> static size_t deserialize( const folly::IOBuf* buf, T& obj, ExternalBufferSharing sharing = COPY_EXTERNAL_BUFFER) ; ; ; ; ; ; ; ; ; ; ; ; ; private: ; ; ; }; typedef Serializer<CompactProtocolReader, CompactProtocolWriter> CompactSerializer; typedef Serializer<BinaryProtocolReader, BinaryProtocolWriter> BinarySerializer; typedef Serializer<JSONProtocolReader, JSONProtocolWriter> JSONSerializer; typedef Serializer<SimpleJSONProtocolReader, SimpleJSONProtocolWriter> SimpleJSONSerializer; ; ; ; ; } } namespace apache::thrift::frozen::schema { struct frozen_constants { static constexpr ::std::int32_t const kCurrentFrozenFileVersion_ = static_cast<::std::int32_t>(1); }; } namespace fLB { extern __attribute__((visibility("default"))) bool FLAGS_thrift_frozen_util_disable_mlock; } using fLB::FLAGS_thrift_frozen_util_disable_mlock; namespace fLB { extern __attribute__((visibility("default"))) bool FLAGS_thrift_frozen_util_mlock_on_fault; } using fLB::FLAGS_thrift_frozen_util_mlock_on_fault; namespace apache { namespace thrift { namespace frozen { class FrozenFileForwardIncompatible : public std::runtime_error { public: private: int fileVersion_; }; class MallocFreezer final : public FreezeRoot { public: ; private: struct Segment { size_t size{0}; byte* buffer{nullptr}; }; std::map<const byte*, size_t> offsets_; std::vector<Segment> segments_; size_t size_{0}; }; ; ; ; ; ; ; ; ; ; template <class T> using MappedFrozen = Bundled<typename Layout<T>::View>; ; ; ; ; ; ; ; } } } namespace apache { namespace thrift { namespace frozen { template <> struct Layout< ::dwarfs::thrift::metadata::chunk, void> : public LayoutBase { typedef LayoutBase Base; typedef Layout LayoutSelf; typedef ::dwarfs::thrift::metadata::chunk T; struct View; Field< ::dwarfs::thrift::metadata::UInt32> blockField; Field< ::dwarfs::thrift::metadata::UInt32> offsetField; Field< ::dwarfs::thrift::metadata::UInt32> sizeField; struct View : public ViewBase<View, LayoutSelf, T> { }; ; ; }; template <> struct Layout< ::dwarfs::thrift::metadata::directory, void> : public LayoutBase { typedef LayoutBase Base; typedef Layout LayoutSelf; typedef ::dwarfs::thrift::metadata::directory T; struct View; Field< ::dwarfs::thrift::metadata::UInt32> parent_entryField; Field< ::dwarfs::thrift::metadata::UInt32> first_entryField; struct View : public ViewBase<View, LayoutSelf, T> { }; ; ; }; template <> struct Layout< ::dwarfs::thrift::metadata::inode_data, void> : public LayoutBase { typedef LayoutBase Base; typedef Layout LayoutSelf; typedef ::dwarfs::thrift::metadata::inode_data T; struct View; Field< ::dwarfs::thrift::metadata::UInt32> mode_indexField; Field< ::dwarfs::thrift::metadata::UInt32> owner_indexField; Field< ::dwarfs::thrift::metadata::UInt32> group_indexField; Field< ::dwarfs::thrift::metadata::UInt64> atime_offsetField; Field< ::dwarfs::thrift::metadata::UInt64> mtime_offsetField; Field< ::dwarfs::thrift::metadata::UInt64> ctime_offsetField; Field< ::dwarfs::thrift::metadata::UInt32> name_index_v2_2Field; Field< ::dwarfs::thrift::metadata::UInt32> inode_v2_2Field; struct View : public ViewBase<View, LayoutSelf, T> { }; ; ; }; template <> struct Layout< ::dwarfs::thrift::metadata::dir_entry, void> : public LayoutBase { typedef LayoutBase Base; typedef Layout LayoutSelf; typedef ::dwarfs::thrift::metadata::dir_entry T; struct View; Field< ::dwarfs::thrift::metadata::UInt32> name_indexField; Field< ::dwarfs::thrift::metadata::UInt32> inode_numField; struct View : public ViewBase<View, LayoutSelf, T> { View() ; }; ; ; }; template <> struct Layout< ::dwarfs::thrift::metadata::fs_options, void> : public LayoutBase { typedef LayoutBase Base; typedef Layout LayoutSelf; typedef ::dwarfs::thrift::metadata::fs_options T; struct View; Field<bool> mtime_onlyField; Field<folly::Optional< ::dwarfs::thrift::metadata::UInt32>> time_resolution_secField; Field<bool> packed_chunk_tableField; Field<bool> packed_directoriesField; Field<bool> packed_shared_files_tableField; struct View : public ViewBase<View, LayoutSelf, T> { }; ; ; }; template <> struct Layout< ::dwarfs::thrift::metadata::string_table, void> : public LayoutBase { typedef LayoutBase Base; typedef Layout LayoutSelf; typedef ::dwarfs::thrift::metadata::string_table T; struct View; Field< ::std::string> bufferField; Field<folly::Optional< ::std::string>> symtabField; Field< ::std::vector<::dwarfs::thrift::metadata::UInt32> > indexField; Field<bool> packed_indexField; struct View : public ViewBase<View, LayoutSelf, T> { }; ; ; }; template <> struct Layout< ::dwarfs::thrift::metadata::metadata, void> : public LayoutBase { typedef LayoutBase Base; typedef Layout LayoutSelf; typedef ::dwarfs::thrift::metadata::metadata T; struct View; Field< ::std::vector<::dwarfs::thrift::metadata::chunk> > chunksField; Field< ::std::vector<::dwarfs::thrift::metadata::directory> > directoriesField; Field< ::std::vector<::dwarfs::thrift::metadata::inode_data> > inodesField; Field< ::std::vector<::dwarfs::thrift::metadata::UInt32> > chunk_tableField; Field< ::std::vector<::dwarfs::thrift::metadata::UInt32> > entry_table_v2_2Field; Field< ::std::vector<::dwarfs::thrift::metadata::UInt32> > symlink_tableField; Field< ::std::vector<::dwarfs::thrift::metadata::UInt32> > uidsField; Field< ::std::vector<::dwarfs::thrift::metadata::UInt32> > gidsField; Field< ::std::vector<::dwarfs::thrift::metadata::UInt32> > modesField; Field< ::std::vector<::std::string> > namesField; Field< ::std::vector<::std::string> > symlinksField; Field< ::dwarfs::thrift::metadata::UInt64> timestamp_baseField; Field< ::dwarfs::thrift::metadata::UInt32> block_sizeField; Field< ::dwarfs::thrift::metadata::UInt64> total_fs_sizeField; Field<folly::Optional< ::std::vector<::dwarfs::thrift::metadata::UInt64> >> devicesField; Field<folly::Optional< ::dwarfs::thrift::metadata::fs_options>> optionsField; Field<folly::Optional< ::std::vector<::dwarfs::thrift::metadata::dir_entry> >> dir_entriesField; Field<folly::Optional< ::std::vector<::dwarfs::thrift::metadata::UInt32> >> shared_files_tableField; Field<folly::Optional< ::dwarfs::thrift::metadata::UInt64>> total_hardlink_sizeField; Field<folly::Optional< ::std::string>> dwarfs_versionField; Field<folly::Optional< ::dwarfs::thrift::metadata::UInt64>> create_timestampField; Field<folly::Optional< ::dwarfs::thrift::metadata::string_table>> compact_namesField; Field<folly::Optional< ::dwarfs::thrift::metadata::string_table>> compact_symlinksField; Field<folly::Optional< ::dwarfs::thrift::metadata::UInt32>> preferred_path_separatorField; Field<folly::Optional< ::std::set<::std::string> >> featuresField; Field<folly::Optional< ::std::vector<::std::string> >> category_namesField; Field<folly::Optional< ::std::vector<::dwarfs::thrift::metadata::UInt32> >> block_categoriesField; struct View : public ViewBase<View, LayoutSelf, T> { }; ; ; }; }}} namespace dwarfs { class logger; class string_table { public: using LegacyTableView = ::apache::thrift::frozen::View<std::vector<std::string>>; using PackedTableView = ::apache::thrift::frozen::View<thrift::metadata::string_table>; struct pack_options { pack_options(bool pack_data = true, bool pack_index = true, bool force_pack_data = false) ; bool pack_data; bool pack_index; bool force_pack_data; }; static thrift::metadata::string_table pack(std::vector<std::string> const& input, pack_options const& options = pack_options()) ; ; class impl { public: }; private: ; std::unique_ptr<impl const> impl_; }; } namespace dwarfs { template <typename T> class metadata_; class dir_entry_view; class logger; enum class readlink_mode { raw, preferred, unix, }; class global_metadata { public: using Meta = ::apache::thrift::frozen::MappedFrozen<thrift::metadata::metadata>; private: Meta const& meta_; std::vector<thrift::metadata::directory> const directories_storage_; thrift::metadata::directory const* const directories_; string_table const names_; }; class inode_view : public ::apache::thrift::frozen::View<thrift::metadata::inode_data> { using InodeView = ::apache::thrift::frozen::View<thrift::metadata::inode_data>; using Meta = ::apache::thrift::frozen::MappedFrozen<thrift::metadata::metadata>; template <typename T> friend class metadata_; friend class dir_entry_view; public: using uid_type = file_stat::uid_type; using gid_type = file_stat::gid_type; using mode_type = file_stat::mode_type; private: uint32_t inode_num_; Meta const* meta_; }; class directory_view { using DirView = ::apache::thrift::frozen::View<thrift::metadata::directory>; using Meta = ::apache::thrift::frozen::MappedFrozen<thrift::metadata::metadata>; template <typename T> friend class metadata_; friend class dir_entry_view; public: private: uint32_t inode_; global_metadata const* g_; }; class dir_entry_view { using InodeView = ::apache::thrift::frozen::View<thrift::metadata::inode_data>; using DirEntryView = ::apache::thrift::frozen::View<thrift::metadata::dir_entry>; template <typename T> friend class metadata_; public: private: std::variant<DirEntryView, InodeView> v_; uint32_t self_index_, parent_index_; global_metadata const* g_; }; using chunk_view = ::apache::thrift::frozen::View<thrift::metadata::chunk>; class chunk_range { using Meta = ::apache::thrift::frozen::MappedFrozen<thrift::metadata::metadata>; template <typename T> friend class metadata_; public: class iterator : public boost::iterator_facade<iterator, chunk_view const, boost::random_access_traversal_tag> { public: private: friend class boost::iterator_core_access; friend class chunk_range; Meta const* meta_; uint32_t it_{0}; mutable chunk_view view_; }; private: Meta const* meta_; uint32_t begin_{0}; uint32_t end_{0}; }; } namespace dwarfs { class logger; struct metadata_options; struct filesystem_info; struct file_stat; struct vfs_stat; namespace thrift::metadata { class metadata; } class metadata_v2 { public: static std::pair<std::vector<uint8_t>, std::vector<uint8_t>> freeze(const thrift::metadata::metadata& data); class impl { public: }; private: std::unique_ptr<impl> impl_; }; } namespace dwarfs { enum class advice { normal, random, sequential, willneed, dontneed, }; class mmif : public boost::noncopyable { public: virtual ~mmif() = default; ; ; ; virtual std::error_code advise(advice adv, file_off_t offset, size_t size) = 0; }; } namespace dwarfs { class mmif; class dir_reader { public: virtual ~dir_reader() = default; virtual bool read(std::filesystem::path& name) = 0; }; class os_access { public: virtual std::unique_ptr<dir_reader> opendir(std::filesystem::path const& path) const = 0; virtual int access(std::filesystem::path const& path, int mode) const = 0; virtual std::optional<std::string> getenv(std::string_view name) const = 0; }; } namespace dwarfs { template <typename ClockT, typename ValueT> class basic_speedometer { public: using clock_type = ClockT; using value_type = ValueT; basic_speedometer(std::chrono::milliseconds window_length) ; private: std::deque<std::pair<typename clock_type::time_point, value_type>> samples_; std::chrono::milliseconds window_length_; }; template <typename T> using speedometer = basic_speedometer<std::chrono::steady_clock, T>; } namespace dwarfs { enum class termcolor { NORMAL, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE, GRAY, BOLD_RED, BOLD_GREEN, BOLD_YELLOW, BOLD_BLUE, BOLD_MAGENTA, BOLD_CYAN, BOLD_WHITE, BOLD_GRAY, DIM_RED, DIM_GREEN, DIM_YELLOW, DIM_BLUE, DIM_MAGENTA, DIM_CYAN, DIM_WHITE, DIM_GRAY, NUM_COLORS }; enum class termstyle { NORMAL, BOLD, DIM }; class terminal { public: virtual std::string_view carriage_return() const = 0; virtual std::string_view rewind_line() const = 0; virtual std::string_view clear_line() const = 0; }; std::string_view terminal_ansi_color(termcolor color, termstyle style = termstyle::NORMAL); std::string terminal_ansi_colored(std::string_view text, termcolor color, bool enable = true, termstyle style = termstyle::NORMAL); } namespace dwarfs { class object; class progress { public: class context { public: struct status { termcolor color; std::string context; std::string status_string; std::optional<std::string> path; std::optional<size_t> bytes_processed; std::optional<size_t> bytes_total; }; virtual ~context() = default; virtual status get_status() const = 0; virtual int get_priority() const ; speedometer<uint64_t> speed{std::chrono::seconds(5)}; }; using status_function_type = folly::Function<std::string(progress const&, size_t) const>; progress(folly::Function<void(progress&, bool)>&& func, unsigned interval_ms); ~progress() noexcept; void set_status_function(status_function_type status_fun); std::string status(size_t max_len); template <typename T, typename... Args> std::shared_ptr<T> create_context(Args&&... args) const ; std::vector<std::shared_ptr<context>> get_active_contexts() const; std::atomic<object const*> current{nullptr}; std::atomic<uint64_t> total_bytes_read{0}; std::atomic<size_t> current_size{0}; std::atomic<size_t> current_offset{0}; std::atomic<size_t> files_found{0}; std::atomic<size_t> files_scanned{0}; std::atomic<size_t> dirs_found{0}; std::atomic<size_t> dirs_scanned{0}; std::atomic<size_t> symlinks_found{0}; std::atomic<size_t> symlinks_scanned{0}; std::atomic<size_t> specials_found{0}; std::atomic<size_t> duplicate_files{0}; std::atomic<size_t> hardlinks{0}; std::atomic<size_t> block_count{0}; std::atomic<size_t> chunk_count{0}; std::atomic<size_t> inodes_scanned{0}; std::atomic<size_t> inodes_written{0}; std::atomic<size_t> fragments_found{0}; std::atomic<size_t> fragments_written{0}; std::atomic<size_t> blocks_written{0}; std::atomic<size_t> errors{0}; std::atomic<uint64_t> original_size{0}; std::atomic<uint64_t> hardlink_size{0}; std::atomic<uint64_t> symlink_size{0}; std::atomic<uint64_t> saved_by_deduplication{0}; std::atomic<uint64_t> saved_by_segmentation{0}; std::atomic<uint64_t> filesystem_size{0}; std::atomic<uint64_t> compressed_size{0}; struct scan_progress { std::atomic<size_t> scans{0}; std::atomic<uint64_t> bytes{0}; std::atomic<uint64_t> usec{0}; std::atomic<uint64_t> chunk_size{16UL << 20}; std::atomic<uint64_t> bytes_per_sec{0}; }; class scan_updater { public: scan_updater(scan_progress& sp, size_t bytes) ; ~scan_updater() ; private: scan_progress& sp_; size_t const bytes_; std::chrono::steady_clock::time_point const start_; }; scan_progress similarity; scan_progress categorize; scan_progress hash; private: void add_context(std::shared_ptr<context> const& ctx) const; mutable std::mutex running_mx_; bool running_; mutable std::mutex mx_; std::condition_variable cond_; std::shared_ptr<status_function_type> status_fun_; std::vector<std::weak_ptr<context>> mutable contexts_; std::thread thread_; }; } namespace dwarfs { struct scanner_options; class entry_factory; class file_access; class filesystem_writer; class logger; class os_access; class progress; class script; class segmenter_factory; class worker_group; class scanner { public: scanner(logger& lgr, worker_group& wg, std::shared_ptr<segmenter_factory> sf, std::shared_ptr<entry_factory> ef, std::shared_ptr<os_access const> os, std::shared_ptr<script> scr, const scanner_options& options); void scan( filesystem_writer& fsw, const std::filesystem::path& path, progress& prog, std::optional<std::span<std::filesystem::path const>> list = std::nullopt, std::shared_ptr<file_access const> fa = nullptr) ; class impl { public: virtual ~impl() = default; virtual void scan(filesystem_writer& fsw, const std::filesystem::path& path, progress& prog, std::optional<std::span<std::filesystem::path const>> list, std::shared_ptr<file_access const> fa) = 0; }; private: std::unique_ptr<impl> impl_; }; } namespace dwarfs { class entry_interface; class inode; class options_interface; class script { public: using inode_ptr = std::shared_ptr<inode>; using inode_vector = std::vector<inode_ptr>; virtual ~script() = default; virtual bool has_configure() const = 0; virtual bool has_filter() const = 0; virtual bool has_transform() const = 0; virtual bool filter(entry_interface const& ei) = 0; virtual void transform(entry_interface& ei) = 0; }; } namespace dwarfs { class block_data; class block_manager; class chunkable; class logger; class progress; struct compression_constraints; class segmenter { public: struct config { std::string context{}; unsigned blockhash_window_size{12}; unsigned window_increment_shift{1}; size_t max_active_blocks{1}; unsigned bloom_filter_size{4}; unsigned block_size_bits{22}; }; using block_ready_cb = folly::Function<void(std::shared_ptr<block_data>, size_t logical_block_num)>; void add_chunkable(chunkable& chkable) ; void finish() ; class impl { public: virtual ~impl() = default; }; private: std::unique_ptr<impl> impl_; }; } namespace dwarfs { class categorizer_manager; class logger; class progress; struct compression_constraints; class segmenter_factory { public: struct config { categorized_option<unsigned> blockhash_window_size; categorized_option<unsigned> window_increment_shift; categorized_option<size_t> max_active_blocks; categorized_option<unsigned> bloom_filter_size; unsigned block_size_bits{22}; }; segmenter create(fragment_category cat, size_t cat_size, compression_constraints const& cc, std::shared_ptr<block_manager> blkmgr, segmenter::block_ready_cb block_ready) const ; size_t get_block_size() const ; class impl { public: }; private: std::unique_ptr<impl> impl_; }; } namespace dwarfs { extern char const* PRJ_GIT_REV; extern char const* PRJ_GIT_DATE; extern char const* PRJ_GIT_DESC; extern char const* PRJ_GIT_BRANCH; extern char const* PRJ_GIT_ID; } namespace dwarfs { using namespace std::chrono_literals; namespace { constexpr std::string_view kEnvVarDumpFilesRaw{"DWARFS_DUMP_FILES_RAW"}; constexpr std::string_view kEnvVarDumpFilesFinal{"DWARFS_DUMP_FILES_FINAL"}; constexpr std::string_view kEnvVarDumpInodes{"DWARFS_DUMP_INODES"}; class visitor_base : public entry_visitor { public: void visit(file*) override ; void visit(link*) override ; void visit(dir*) override ; void visit(device*) override ; }; class dir_set_inode_visitor : public visitor_base { public: explicit dir_set_inode_visitor(uint32_t& inode_num) ; void visit(dir* p) override ; private: uint32_t& inode_num_; }; class link_set_inode_visitor : public visitor_base { public: explicit link_set_inode_visitor(uint32_t& inode_num) ; void visit(link* p) override ; private: uint32_t& inode_num_; }; class device_set_inode_visitor : public visitor_base { public: explicit device_set_inode_visitor(uint32_t& inode_num) ; void visit(device* p) override ; std::vector<uint64_t>& device_ids() ; private: std::vector<uint64_t> dev_ids_; uint32_t& inode_num_; }; class pipe_set_inode_visitor : public visitor_base { public: explicit pipe_set_inode_visitor(uint32_t& inode_num) ; void visit(device* p) override ; private: uint32_t& inode_num_; }; class names_and_symlinks_visitor : public visitor_base { public: explicit names_and_symlinks_visitor(global_entry_data& data) ; void visit(file* p) override ; void visit(device* p) override ; void visit(link* p) override { data_.add_name(p->name()); data_.add_link(p->linkname()); } void visit(dir* p) override ; private: global_entry_data& data_; }; class save_directories_visitor : public visitor_base { public: explicit save_directories_visitor(size_t num_directories) ; void visit(dir* p) override ; void pack(thrift::metadata::metadata& mv2, global_entry_data& ge_data) ; private: std::vector<dir*> directories_; }; class save_shared_files_visitor : public visitor_base { public: explicit save_shared_files_visitor(uint32_t inode_begin, uint32_t inode_end, uint32_t num_unique_files) ; void visit(file* p) override ; void pack_shared_files() ; std::vector<uint32_t>& get_shared_files() ; private: uint32_t const begin_shared_; uint32_t const num_unique_; std::vector<uint32_t> shared_files_; }; std::string status_string(progress const& p, size_t width) ; } template <typename LoggerPolicy> class scanner_ final : public scanner::impl { public: ; void scan(filesystem_writer& fsw, std::filesystem::path const& path, progress& prog, std::optional<std::span<std::filesystem::path const>> list, std::shared_ptr<file_access const> fa) override; private: std::shared_ptr<entry> scan_tree(std::filesystem::path const& path, progress& prog, detail::file_scanner& fs); std::shared_ptr<entry> scan_list(std::filesystem::path const& path, std::span<std::filesystem::path const> list, progress& prog, detail::file_scanner& fs); std::shared_ptr<entry> add_entry(std::filesystem::path const& name, std::shared_ptr<dir> parent, progress& prog, detail::file_scanner& fs, bool debug_filter = false); void dump_state(std::string_view env_var, std::string_view what, std::shared_ptr<file_access const> fa, std::function<void(std::ostream&)> dumper) const; ::dwarfs::log_proxy<LoggerPolicy> log_; worker_group& wg_; scanner_options const& options_; std::shared_ptr<segmenter_factory> segmenter_factory_; std::shared_ptr<entry_factory> entry_factory_; std::shared_ptr<os_access const> os_; std::shared_ptr<script> script_; }; template <typename LoggerPolicy> void scanner_<LoggerPolicy>::scan( filesystem_writer& fsw, const std::filesystem::path& path, progress& prog, std::optional<std::span<std::filesystem::path const>> list, std::shared_ptr<file_access const> fa) { if (!options_.debug_filter_function) { if constexpr (std::decay_t<decltype(log_)>::is_enabled_for( ::dwarfs::logger::INFO)) log_.info("/home/mhx/git/github/dwarfs/src/dwarfs/scanner.cpp", 610) << "scanning " << path; } prog.set_status_function(status_string); inode_manager im(log_.get_logger(), prog, options_.inode); detail::file_scanner fs( log_.get_logger(), wg_, *os_, im, prog, {.hash_algo = options_.file_hash_algorithm, .debug_inode_create = os_->getenv(kEnvVarDumpFilesRaw) || os_->getenv(kEnvVarDumpFilesFinal)}); auto root = list ? scan_list(path, *list, prog, fs) : scan_tree(path, prog, fs); if (options_.debug_filter_function) { return; } if (options_.remove_empty_dirs) { if constexpr (std::decay_t<decltype(log_)>::is_enabled_for( ::dwarfs::logger::INFO)) log_.info("/home/mhx/git/github/dwarfs/src/dwarfs/scanner.cpp", 630) << "removing empty directories..."; auto d = dynamic_cast<dir*>(root.get()); d->remove_empty_dirs(prog); } if constexpr (std::decay_t<decltype(log_)>::is_enabled_for( ::dwarfs::logger::INFO)) log_.info("/home/mhx/git/github/dwarfs/src/dwarfs/scanner.cpp", 635) << "assigning directory and link inodes..."; uint32_t first_link_inode = 0; dir_set_inode_visitor dsiv(first_link_inode); root->accept(dsiv, true); uint32_t first_file_inode = first_link_inode; link_set_inode_visitor lsiv(first_file_inode); root->accept(lsiv, true); if constexpr (std::decay_t<decltype(log_)>::is_enabled_for( ::dwarfs::logger::INFO)) log_.info("/home/mhx/git/github/dwarfs/src/dwarfs/scanner.cpp", 645) << "waiting for background scanners..."; wg_.wait(); if constexpr (std::decay_t<decltype(log_)>::is_enabled_for( ::dwarfs::logger::INFO)) log_.info("/home/mhx/git/github/dwarfs/src/dwarfs/scanner.cpp", 649) << "scanning CPU time: " << time_with_unit(wg_.get_cpu_time().value_or(0ns)); dump_state(kEnvVarDumpFilesRaw, "raw files", fa, [&fs](auto& os) { fs.dump(os); }); if constexpr (std::decay_t<decltype(log_)>::is_enabled_for( ::dwarfs::logger::INFO)) log_.info("/home/mhx/git/github/dwarfs/src/dwarfs/scanner.cpp", 655) << "finalizing file inodes..."; uint32_t first_device_inode = first_file_inode; fs.finalize(first_device_inode); dump_state(kEnvVarDumpFilesFinal, "final files", fa, [&fs](auto& os) { fs.dump(os); }); if (im.has_invalid_inodes()) { if constexpr (std::decay_t<decltype(log_)>::is_enabled_for( ::dwarfs::logger::INFO)) log_.info("/home/mhx/git/github/dwarfs/src/dwarfs/scanner.cpp", 665) << "trying to recover any invalid inodes..."; im.try_scan_invalid(wg_, *os_); wg_.wait(); } if constexpr (std::decay_t<decltype(log_)>::is_enabled_for( ::dwarfs::logger::INFO)) log_.info("/home/mhx/git/github/dwarfs/src/dwarfs/scanner.cpp", 670) << "saved " << size_with_unit(prog.saved_by_deduplication) << " / " << size_with_unit(prog.original_size) << " in " << prog.duplicate_files << "/" << prog.files_found << " duplicate files"; auto frag_info = im.fragment_category_info(); if (auto catmgr = options_.inode.categorizer_mgr) { for (auto const& ci : frag_info.info) { if constexpr (std::decay_t<decltype(log_)>::is_enabled_for( ::dwarfs::logger::VERBOSE)) log_.verbose("/home/mhx/git/github/dwarfs/src/dwarfs/scanner.cpp", 679) << "found " << ci.fragment_count << " " << catmgr->category_name(ci.category) << " fragments (" << size_with_unit(ci.total_size) << ")"; } } global_entry_data ge_data(options_); thrift::metadata::metadata mv2; feature_set features; mv2.symlink_table()->resize(first_file_inode - first_link_inode); if constexpr (std::decay_t<decltype(log_)>::is_enabled_for( ::dwarfs::logger::INFO)) log_.info("/home/mhx/git/github/dwarfs/src/dwarfs/scanner.cpp", 691) << "assigning device inodes..."; uint32_t first_pipe_inode = first_device_inode; device_set_inode_visitor devsiv(first_pipe_inode); root->accept(devsiv); mv2.devices() = std::move(devsiv.device_ids()); if constexpr (std::decay_t<decltype(log_)>::is_enabled_for( ::dwarfs::logger::INFO)) log_.info("/home/mhx/git/github/dwarfs/src/dwarfs/scanner.cpp", 697) << "assigning pipe/socket inodes..."; uint32_t last_inode = first_pipe_inode; pipe_set_inode_visitor pipsiv(last_inode); root->accept(pipsiv); if constexpr (std::decay_t<decltype(log_)>::is_enabled_for( ::dwarfs::logger::INFO)) log_.info("/home/mhx/git/github/dwarfs/src/dwarfs/scanner.cpp", 702) << "building metadata..."; wg_.add_job([&] { if constexpr (std::decay_t<decltype(log_)>::is_enabled_for( ::dwarfs::logger::INFO)) log_.info("/home/mhx/git/github/dwarfs/src/dwarfs/scanner.cpp", 705) << "saving names and symlinks..."; names_and_symlinks_visitor nlv(ge_data); root->accept(nlv); ge_data.index(); if constexpr (std::decay_t<decltype(log_)>::is_enabled_for( ::dwarfs::logger::INFO)) log_.info("/home/mhx/git/github/dwarfs/src/dwarfs/scanner.cpp", 711) << "updating name and link indices..."; root->walk([&](entry* ep) { ep->update(ge_data); if (auto lp = dynamic_cast<link*>(ep)) { [&]() -> decltype(mv2.symlink_table()->at(ep->inode_num().value() - first_link_inode)) { try { return mv2.symlink_table()->at(ep->inode_num().value() - first_link_inode); } catch (...) { handle_nothrow("mv2.symlink_table()->at(ep->inode_num().value() - first_link_inode)", "/home/mhx/git/github/dwarfs/src/dwarfs/scanner.cpp", 716); } }() = ge_data.get_symlink_table_entry(lp->linkname()); } }); }); dump_state(kEnvVarDumpInodes, "inodes", fa, [&im](auto& os) { im.dump(os); }); if constexpr (std::decay_t<decltype(log_)>::is_enabled_for( ::dwarfs::logger::INFO)) log_.info("/home/mhx/git/github/dwarfs/src/dwarfs/scanner.cpp", 724) << "building blocks..."; auto blockmgr = std::make_shared<block_manager>(); { size_t const num_threads = options_.num_segmenter_workers; worker_group wg_ordering(log_.get_logger(), *os_, "ordering", num_threads); worker_group wg_blockify(log_.get_logger(), *os_, "blockify", num_threads); fsw.configure(frag_info.categories, num_threads); for (auto category : frag_info.categories) { auto cat_size = frag_info.category_size.at(category); auto catmgr = options_.inode.categorizer_mgr.get(); std::string meta; if (catmgr) { meta = catmgr->category_metadata(category); if (!meta.empty()) { if constexpr (std::decay_t<decltype(log_)>::is_enabled_for( ::dwarfs::logger::VERBOSE)) log_.verbose("/home/mhx/git/github/dwarfs/src/dwarfs/scanner.cpp", 749) << category_prefix(catmgr, category) << "metadata: " << meta; } } auto cc = fsw.get_compression_constraints(category.value(), meta); wg_blockify.add_job([this, catmgr, blockmgr, category, cat_size, meta, cc, &prog, &fsw, &im, &wg_ordering] { auto span = im.ordered_span(category, wg_ordering); auto tv = log_.cpu_timed_verbose("/home/mhx/git/github/dwarfs/src/dwarfs/scanner.cpp", 759); auto seg = segmenter_factory_->create( category, cat_size, cc, blockmgr, [category, meta, blockmgr, &fsw](auto block, auto logical_block_num) { fsw.write_block( category, std::move(block), [blockmgr, logical_block_num, category](auto physical_block_num) { blockmgr->set_written_block(logical_block_num, physical_block_num, category.value()); }, meta); }); size_t prepared_files{0}; struct prepared_file { std::shared_ptr<inode> ino; std::unique_ptr<mmif> mm; }; queued_for_each(span, [&](auto ino) -> std::optional<prepared_file> { if (prepared_files >= 10) { return std::nullopt; } ++prepared_files; auto f = ino->any(); if (auto size = f->size(); size == 0 || f->is_invalid()) { return prepared_file{std::move(ino), nullptr}; } auto [mm, _, errors] = ino->mmap_any(*os_); if (!mm) { for (auto& [fp, e] : errors) { if constexpr (std::decay_t<decltype(log_)>::is_enabled_for( ::dwarfs::logger::ERROR)) log_.error("/home/mhx/git/github/dwarfs/src/dwarfs/scanner.cpp", 800) << "failed to map file " << fp->path_as_string() << ": " << folly::exceptionStr(e) << ", creating empty inode"; ++prog.errors; } for (auto& frag : ino->fragments()) { if (frag.category() == category) { prog.fragments_found--; } } return prepared_file{std::move(ino), nullptr}; } file_off_t offset{0}; for (auto& frag : ino->fragments()) { if (frag.category() == category) { mm->advise(advice::sequential, offset, frag.size()); } offset += frag.size(); } return prepared_file{std::move(ino), std::move(mm)}; }, [&](prepared_file pf) { --prepared_files; if (pf.mm) { file_off_t offset{0}; for (auto& frag : pf.ino->fragments()) { if (frag.category() == category) { fragment_chunkable fc(*pf.ino, frag, offset, *pf.mm, catmgr); seg.add_chunkable(fc); prog.fragments_written++; } offset += frag.size(); } } prog.inodes_written++; }); seg.finish(); fsw.finish_category(category); tv << category_prefix(catmgr, category) << "segmenting finished"; }); } if constexpr (std::decay_t<decltype(log_)>::is_enabled_for( ::dwarfs::logger::INFO)) log_.info("/home/mhx/git/github/dwarfs/src/dwarfs/scanner.cpp", 854) << "waiting for segmenting/blockifying to finish..."; wg_blockify.wait(); wg_ordering.wait(); if constexpr (std::decay_t<decltype(log_)>::is_enabled_for( ::dwarfs::logger::INFO)) log_.info("/home/mhx/git/github/dwarfs/src/dwarfs/scanner.cpp", 861) << "total ordering CPU time: " << time_with_unit(wg_ordering.get_cpu_time().value_or(0ns)); if constexpr (std::decay_t<decltype(log_)>::is_enabled_for( ::dwarfs::logger::INFO)) log_.info("/home/mhx/git/github/dwarfs/src/dwarfs/scanner.cpp", 864) << "total segmenting CPU time: " << time_with_unit(wg_blockify.get_cpu_time().value_or(0ns)); } wg_.wait(); prog.set_status_function([](progress const&, size_t) { return "waiting for block compression to finish"; }); prog.current.store(nullptr); root->set_name(std::string()); if constexpr (std::decay_t<decltype(log_)>::is_enabled_for( ::dwarfs::logger::INFO)) log_.info("/home/mhx/git/github/dwarfs/src/dwarfs/scanner.cpp", 879) << "saving chunks..."; mv2.chunk_table()->resize(im.count() + 1); mv2.chunks().value().reserve(prog.chunk_count); im.for_each_inode_in_order([&](std::shared_ptr<inode> const& ino) { [&]() -> decltype(mv2.chunk_table()->at(ino->num())) { try { return mv2.chunk_table()->at(ino->num()); } catch (...) { handle_nothrow("mv2.chunk_table()->at(ino->num())", "/home/mhx/git/github/dwarfs/src/dwarfs/scanner.cpp", 886); } }() = mv2.chunks()->size(); if (!ino->append_chunks_to(mv2.chunks().value())) { std::ostringstream oss; for (auto fp : ino->all()) { oss << "\n " << fp->path_as_string(); } if constexpr (std::decay_t<decltype(log_)>::is_enabled_for( ::dwarfs::logger::ERROR)) log_.error("/home/mhx/git/github/dwarfs/src/dwarfs/scanner.cpp", 892) << "inconsistent fragments in inode " << ino->num() << ", the following files will be empty:" << oss.str(); } }); blockmgr->map_logical_blocks(mv2.chunks().value()); [&]() -> decltype(mv2.chunk_table()->at(im.count())) { try { return mv2.chunk_table()->at(im.count()); } catch (...) { handle_nothrow("mv2.chunk_table()->at(im.count())", "/home/mhx/git/github/dwarfs/src/dwarfs/scanner.cpp", 900); } }() = mv2.chunks()->size(); if constexpr (std::decay_t<decltype(log_)>::is_enabled_for( ::dwarfs::logger::DEBUG)) log_.debug("/home/mhx/git/github/dwarfs/src/dwarfs/scanner.cpp", 902) << "total number of unique files: " << im.count(); if constexpr (std::decay_t<decltype(log_)>::is_enabled_for( ::dwarfs::logger::DEBUG)) log_.debug("/home/mhx/git/github/dwarfs/src/dwarfs/scanner.cpp", 903) << "total number of chunks: " << mv2.chunks()->size(); if constexpr (std::decay_t<decltype(log_)>::is_enabled_for( ::dwarfs::logger::INFO)) log_.info("/home/mhx/git/github/dwarfs/src/dwarfs/scanner.cpp", 905) << "saving directories..."; mv2.dir_entries() = std::vector<thrift::metadata::dir_entry>(); mv2.inodes()->resize(last_inode); mv2.directories()->reserve(first_link_inode + 1); save_directories_visitor sdv(first_link_inode); root->accept(sdv); sdv.pack(mv2, ge_data); if (options_.pack_directories) { uint32_t last_first_entry = 0; for (auto& d : mv2.directories().value()) { d.parent_entry() = 0; auto delta = d.first_entry().value() - last_first_entry; last_first_entry = d.first_entry().value(); d.first_entry() = delta; } } if (options_.pack_chunk_table) { std::adjacent_difference(mv2.chunk_table()->begin(), mv2.chunk_table()->end(), mv2.chunk_table()->begin()); } if constexpr (std::decay_t<decltype(log_)>::is_enabled_for( ::dwarfs::logger::INFO)) log_.info("/home/mhx/git/github/dwarfs/src/dwarfs/scanner.cpp", 932) << "saving shared files table..."; save_shared_files_visitor ssfv(first_file_inode, first_device_inode, fs.num_unique()); root->accept(ssfv); if (options_.pack_shared_files_table) { ssfv.pack_shared_files(); } mv2.shared_files_table() = std::move(ssfv.get_shared_files()); thrift::metadata::fs_options fsopts; fsopts.mtime_only() = !options_.keep_all_times; if (options_.time_resolution_sec > 1) { fsopts.time_resolution_sec() = options_.time_resolution_sec; } fsopts.packed_chunk_table() = options_.pack_chunk_table; fsopts.packed_directories() = options_.pack_directories; fsopts.packed_shared_files_table() = options_.pack_shared_files_table; if (options_.plain_names_table) { mv2.names() = ge_data.get_names(); } else { auto ti = log_.timed_info("/home/mhx/git/github/dwarfs/src/dwarfs/scanner.cpp", 953); mv2.compact_names() = string_table::pack( ge_data.get_names(), string_table::pack_options( options_.pack_names, options_.pack_names_index, options_.force_pack_string_tables)); ti << "saving names table..."; } if (options_.plain_symlinks_table) { mv2.symlinks() = ge_data.get_symlinks(); } else { auto ti = log_.timed_info("/home/mhx/git/github/dwarfs/src/dwarfs/scanner.cpp", 964); mv2.compact_symlinks() = string_table::pack( ge_data.get_symlinks(), string_table::pack_options(options_.pack_symlinks, options_.pack_symlinks_index, options_.force_pack_string_tables)); ti << "saving symlinks table..."; } mv2.uids() = ge_data.get_uids(); mv2.gids() = ge_data.get_gids(); mv2.modes() = ge_data.get_modes(); mv2.timestamp_base() = ge_data.get_timestamp_base(); mv2.block_size() = segmenter_factory_->get_block_size(); mv2.total_fs_size() = prog.original_size; mv2.total_hardlink_size() = prog.hardlink_size; mv2.options() = fsopts; mv2.dwarfs_version() = std::string("libdwarfs ") + PRJ_GIT_ID; if (!options_.no_create_timestamp) { mv2.create_timestamp() = std::time(nullptr); } mv2.preferred_path_separator() = static_cast<uint32_t>(std::filesystem::path::preferred_separator); if (auto catmgr = options_.inode.categorizer_mgr) { std::unordered_map<fragment_category::value_type, fragment_category::value_type> category_indices; std::vector<std::string> category_names; category_indices.reserve(frag_info.info.size()); category_names.reserve(frag_info.info.size()); for (auto const& ci : frag_info.info) { auto [it, inserted] = category_indices.emplace(ci.category, category_names.size()); if (inserted) { category_names.emplace_back(catmgr->category_name(ci.category)); } } auto written_categories = blockmgr->get_written_block_categories(); std::transform(written_categories.begin(), written_categories.end(), written_categories.begin(), [&](auto const& cat) { return category_indices.at(cat); }); mv2.category_names() = std::move(category_names); mv2.block_categories() = std::move(written_categories); } mv2.features() = features.get(); auto [schema, data] = metadata_v2::freeze(mv2); if constexpr (std::decay_t<decltype(log_)>::is_enabled_for( ::dwarfs::logger::VERBOSE)) log_.verbose("/home/mhx/git/github/dwarfs/src/dwarfs/scanner.cpp", 1019) << "uncompressed metadata size: " << size_with_unit(data.size()); fsw.write_metadata_v2_schema(std::make_shared<block_data>(std::move(schema))); fsw.write_metadata_v2(std::make_shared<block_data>(std::move(data))); if (options_.enable_history) { history hist(options_.history); hist.append(options_.command_line_arguments); fsw.write_history(std::make_shared<block_data>(hist.serialize())); } if constexpr (std::decay_t<decltype(log_)>::is_enabled_for( ::dwarfs::logger::INFO)) log_.info("/home/mhx/git/github/dwarfs/src/dwarfs/scanner.cpp", 1030) << "waiting for compression to finish..."; fsw.flush(); if constexpr (std::decay_t<decltype(log_)>::is_enabled_for( ::dwarfs::logger::INFO)) log_.info("/home/mhx/git/github/dwarfs/src/dwarfs/scanner.cpp", 1034) << "compressed " << size_with_unit(prog.original_size) << " to " << size_with_unit(prog.compressed_size) << " (ratio=" << static_cast<double>(prog.compressed_size) / prog.original_size << ")"; } scanner::scanner(logger& lgr, worker_group& wg, std::shared_ptr<segmenter_factory> sf, std::shared_ptr<entry_factory> ef, std::shared_ptr<os_access const> os, std::shared_ptr<script> scr, const scanner_options& options) : impl_(make_unique_logging_object<impl, scanner_, logger_policies>( lgr, wg, std::move(sf), std::move(ef), std::move(os), std::move(scr), options)) {} }
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